Taxonomy terms order affecting WP nav menu editing
-
Hello!
The filter in taxonomy-terms-order.php:145 affects the editing of WP navigation menus as well.
As you probably know WP navigation menus is stored within the taxonomy table structure.
Not really sure why, but this plugin made all the menus disappear from WP Admin when the plugin was active. Note that this was on a multisite setup, and it only happened on the sub-site, not the main site.
I added the following code (in a MU-plugin) which removes the filter when editing the menus in WP Admin:
// Prevent the plugin intervening when editing the nav menu in WP Admin add_action( 'current_screen', function() { // Bail if not in WP Admin if ( ! is_admin() ) { return; } // Get current screen $screen = get_current_screen(); if ( isset( $screen->id ) && $screen->id == 'nav-menus' ) { // Remove filter remove_filter( 'get_terms_orderby', 'TO_applyorderfilter', 10, 2 ); } } );
It works like normal after adding this snippet.
Hopefully this can help other who has the same problem.Is this something that should be implemented in the actual plugin?
Should taxonomy terms ordering affect the editing of WP nav menus?Best regards,
Robert S.
- The topic ‘Taxonomy terms order affecting WP nav menu editing’ is closed to new replies.