WordPress.org

Make WordPress Core

Ticket #18282: 18282-disable-nav-menu-pagination.patch

File 18282-disable-nav-menu-pagination.patch, 621 bytes (added by Aries-Belgium, 11 months ago)

Patch to work around nav menu pagination

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

    diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php
    index 0dbcb0c..4cf8811 100644
    a b function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) { 
    621621 
    622622        // @todo transient caching of these results with proper invalidation on updating of a post of this type 
    623623        $get_posts = new WP_Query; 
    624         $posts = $get_posts->query( $args ); 
     624        $posts = $get_posts->query( array_merge( $args, array( 'nopaging' => true ) ) ); 
    625625        if ( ! $get_posts->post_count ) { 
    626626                echo '<p>' . __( 'No items.' ) . '</p>'; 
    627627                return;