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;
} );
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;
} );
still not working for me.
if code on functions.php, It not work.
The filters are need to be registered before the plugins_loaded.
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;
} );
}
?>
?