WordPress.org

Make WordPress Core

Ticket #19514: 19514.3.diff

File 19514.3.diff, 1.3 KB (added by MikeHansenMe, 5 years ago)
  • src/wp-admin/includes/nav-menu.php

     
    614614
    615615        $post_type_name = $post_type['args']->name;
    616616
    617         // Paginate browsing for large numbers of post objects.
    618         $per_page = 50;
     617        /**
     618         * Filter the amount of post type items per page.
     619         *
     620         * @since 4.2
     621         *
     622         * @param int The amount of post type items to show per page.
     623         */
     624        $per_page = apply_filters( 'wp_nav_menu_post_type_per_page' , 50 );
    619625        $pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
    620626        $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
    621627
     
    856862        global $nav_menu_selected_id;
    857863        $taxonomy_name = $taxonomy['args']->name;
    858864
    859         // Paginate browsing for large numbers of objects.
    860         $per_page = 50;
     865        /**
     866         * Filter the amount of taxonomy items per page.
     867         *
     868         * @since 4.2
     869         *
     870         * @param int The amount of taxonomy items to show per page.
     871         */
     872        $per_page = apply_filters( 'wp_nav_menu_taxonomy_per_page' , 50 );
    861873        $pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
    862874        $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
    863875