Support

Account

Forum Replies Created

  • Thank you for the snippet!

    Juste $number should be $year.

    $field['choices'][$number] = $year; => $field['choices'][$year] = $year;

  • I used the plugin https://github.com/BeAPI/acf-options-for-polylang and it worked very nice for me.
    For people how wants to remove the confusing ‘all languages options page’, they can use these filters:

    add_filter( 'bea.aofp.get_default', '__return_false' );
    In order to remove the fallback feature for this generic option page if the field in the option page for a certain language is empty.

    add_filter( 'pll_admin_languages_filter', function ( $adminBarLanguages ) {
        global $pagenow;
        if ( $pagenow === 'admin.php' && isset( $_GET['page'] ) && $_GET['page'] === 'acf-options' ) {
            unset( $adminBarLanguages[0] );
        }
    
        return $adminBarLanguages;
    } );

    In order to remove the all language entry fron the admin dropdown menu.

    * Feel free to respond to me if something seems wrong with my workaround 🙂

Viewing 2 posts - 1 through 2 (of 2 total)