Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1301714

    Hi
    I wanted to reopen a ticket but it’s closed already. The code I’ve gotten vom Ismael in the linked thread is still working but in WP debug mode I get a deprecated notice:

    avia_append_lang_flags ist seit Version 4.8.2 veraltet! Benutzen Sie stattdessen Avia_WPML()->handler_append_lang_flags().

    How should I modify the code?

    Thanks in advance
    Filz51

    #1301959

    Hey,

    Thanks for contacting us!

    Could you please try changing the code to following one

    //--------------------------------------------------------------
    // Remove Enfold Language Switcher
    //--------------------------------------------------------------
    function avia_remove_main_menu_flags(){
    	global $avia_WPML;
    
    	add_filter( 'wp_nav_menu_items', [ new avia_WPML, 'handler_append_lang_flags' ], 9999, 2 );
        remove_filter( 'wp_nav_menu_items', [ 'avia_WPML', 'handler_append_lang_flags' ], 9998, 2 );
    	remove_filter( 'avf_fallback_menu_items', [ 'avia_WPML', 'handler_append_lang_flags' ], 9998, 2 );
    	remove_action( 'avia_meta_header', 'avia_wpml_language_switch', 10 );
    	remove_action( 'ava_main_header_sidebar', 'avia_wpml_language_switch', 10 );
    }
    add_action('init','avia_remove_main_menu_flags', 9999);

    Best regards,
    Yigit

    #1302251

    Hi Yigit
    Thank you. The debug notice is gone now.
    Best, Filz

    #1302252

    Hi,

    You are welcome!
    Let us know if you have any other questions and enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove WPML Language Flags’ is closed to new replies.