Make WordPress Core

Opened 5 weeks ago

Last modified 11 days ago

#47555 reviewing enhancement

Add per_page filter to nav-menu.php

Reported by: Martin Snajdr Owned by: audrasjb
Milestone: 5.3 Priority: low
Severity: normal Version:
Component: Menus Keywords: has-patch
Focuses: Cc:


Right now there is a hardcoded number of posts / terms (50) displayed per page in wp-admin/includes/nav-menu.php, which might be ok for posts, but it's a nightmare when having a lot of terms (hierarchical). For example in WooCommerce, I have like 200 categories and some of those are having the same name (but different parent). When I go through the list of those categories, it's quite hard to find exactly the one I'm looking for if the parent is on previous page.

Having pagination as default is ok, but there should be a simple filter that will allow plugins / themes to change the per_page variable value (at least in wp_nav_menu_item_taxonomy_meta_box), so you could list more than 50 terms per page.

Attachments (1)

47555.patch (677 bytes) - added by manishamakhija 4 weeks ago.
Added filter for category list per page in nav menu metabox

Download all attachments as: .zip

Change History (3)

4 weeks ago

Added filter for category list per page in nav menu metabox

#1 @manishamakhija
4 weeks ago

  • Component changed from Administration to Menus
  • Keywords has-patch added

#2 @audrasjb
11 days ago

  • Focuses administration removed
  • Milestone changed from Awaiting Review to 5.3
  • Owner set to audrasjb
  • Priority changed from normal to low
  • Status changed from new to reviewing
  • Version 5.2.1 deleted

Hi, thanks for the the ticket and thaks @manishamakhija for the patch. Looks good on my side.
Moving this one for 5.3 consideration.

Note: See TracTickets for help on using tickets.