Viewing 6 replies - 1 through 6 (of 6 total)
  • Please update 1.2.0 and write the following your site plugin code.

    add_action( 'cptp_post_type_link_priority' , function(){
       return 10;
    } );
    
    add_action( 'cptp_term_link_priority' , function(){
       return 10;
    } );
    Thread Starter mikele3

    (@mikele3)

    it didn’t help my case unfortunately.

    I have a menu consisting of custom posts and custom taxonomy.

    with version 1.0.5, wp_get_nav_menu_items returns all menu items URLs in the current WPML language. (like desired)

    with version 1.1.0 and 1.2.0, wp_get_nav_menu_items returns all custom posts in the default language and custom taxonomy items’ URLs in the current WPML language

    Sorry,

    my Code is Wrong.

    add_filter( 'cptp_post_type_link_priority' , function(){
       return 10;
    } );
    
    add_filter( 'cptp_term_link_priority' , function(){
       return 10;
    } );
    Thread Starter mikele3

    (@mikele3)

    still not working for me.

    if code on functions.php, It not work.

    The filters are need to be registered before the plugins_loaded.

    Thread Starter mikele3

    (@mikele3)

    YES!

    I ddi place your code in a mu-plugin, now it works.

    thank you!

    would it be better if I had this in function.php:

    <?php
    add_action( 'muplugins_loaded', 'my_plugin_override' );
    
    function my_plugin_override() {
        add_filter( 'cptp_post_type_link_priority' , function(){
       return 10;
    } );
    
    add_filter( 'cptp_term_link_priority' , function(){
       return 10;
    } );
    }
    ?>

    ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘v1.1.0 broke my site (using WPML)’ is closed to new replies.