Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#54135 new defect (bug)

`nav_menu_meta_box_object` filter doesn't work on taxonomies

Reported by: papazetis Owned by:
Priority: normal Milestone: Awaiting Review
Component: Menus Version:
Severity: normal Keywords:
Cc: Focuses:

Description

I am trying to remove the pagination on main category taxonomy but it doesn't work

<?php
function disable_pagination_in_category_meta_box( $post_type ) {
    if ( 'category' == $post_type->name ) {
        $post_type->_default_query['number'] = -1;
    }
   return $post_type;
}
add_filter( 'nav_menu_meta_box_object', 'disable_pagination_in_category_meta_box', 9 );

Think it's bug but not sure

Change History (1)

#1 @papazetis
5 years ago

  • Component General → Menus
  • Summary `nav_menu_meta_box_object` doesn't work on taxonomies → `nav_menu_meta_box_object` filter doesn't work on taxonomies
Note: See TracTickets for help on using tickets.