WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#54135 new defect (bug)

`nav_menu_meta_box_object` filter doesn't work on taxonomies

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

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
2 months ago

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