Make WordPress Core

Ticket #47555: 47555.patch

File 47555.patch, 677 bytes (added by manishamakhija, 6 years ago)

Added filter for category list per page in nav menu metabox

  • src/wp-admin/includes/nav-menu.php

    diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
    index 0539e7f253..2c8c570ece 100644
    a b function wp_nav_menu_item_post_type_meta_box( $object, $box ) { 
    335335        $post_type_name = $box['args']->name;
    336336
    337337        // Paginate browsing for large numbers of post objects.
    338         $per_page = 50;
     338        $per_page = apply_filters('nav_menu_metabox_list_categories_per_page', 50 );
    339339        $pagenum  = isset( $_REQUEST[ $post_type_name . '-tab' ] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
    340340        $offset   = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
    341341