Make WordPress Core

Opened 12 years ago

Last modified 5 years ago

#19514 new enhancement

Add per-page filter for nav menu post type meta box

Reported by: wpsmith's profile wpsmith Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords: has-patch
Focuses: Cc:


Currently, there is a default (50) for paginating Post Type Entries on the wp_nav_menu_item_post_type_meta_box(). While there are other ways to filter this, it would be great for larger sites or larger number of post objects to be able to increase this for UX reasons.

Attachments (4)

nav-menu-patch.patch (565 bytes) - added by wpsmith 12 years ago.
19514.diff (754 bytes) - added by MikeHansenMe 9 years ago.
19514.2.diff (755 bytes) - added by MikeHansenMe 9 years ago.
missed a ;
19514.3.diff (1.3 KB) - added by MikeHansenMe 9 years ago.

Download all attachments as: .zip

Change History (10)

#1 @mordauk
10 years ago

Seems reasonable to me, though I'd propose a filter named wp_nav_menu_per_page instead.

#2 @McGuive7
10 years ago

+1. Would love to see this as well. Another use case is wanting to also include private pages (and other post types) in the post type meta boxes. We have several clients who like to set pages to private while developing, which means these pages won't appear in the "Most Recent" or "View All" tabs in the post type metaboxes on the menus admin page. It would be great to be able to filter the $args passed to the $posts = $get_posts->query( $args ) call.

#3 @DrewAPicture
10 years ago

  • Component changed from General to Menus
  • Keywords needs-refresh needs-docs added

I agree that the filter should be renamed to something more obvious, maybe even something like wp_nav_menu_posts_per_page, or mimicking the list table *per_page hook, wp_nav_menu_{$post_type}_per_page.

At the very least, the patch will need a refresh and regeneration from the root directory. The filter will also need hook docs.

9 years ago

#4 @MikeHansenMe
9 years ago

  • Keywords needs-refresh needs-docs removed

9 years ago

missed a ;

#5 @DrewAPicture
9 years ago

  • Summary changed from Add Per Page Filter for Nav Menu Post Type Meta Box to Add per-page filter for nav menu post type meta box

#6 @SergeyBiryukov
9 years ago

wp_nav_menu_item_taxonomy_meta_box() should get a similar filter for consistency.

9 years ago

Note: See TracTickets for help on using tickets.