Home Forums General Issues Options page + polylang Reply To: Options page + polylang

  • I used the plugin 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 🙂