Make WordPress Core

Ticket #40947: 40947.diff

File 40947.diff, 775 bytes (added by welcher, 7 years ago)

Updated patch from root

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

    diff --git src/wp-includes/nav-menu.php src/wp-includes/nav-menu.php
    index 2177d6a..24595ea 100644
    function wp_get_nav_menu_items( $menu, $args = array() ) { 
    593593        }
    594594
    595595        static $fetched = array();
     596        global $_menu_item_sort_prop;
    596597
    597598        $items = get_objects_in_term( $menu->term_id, 'nav_menu' );
    598599        if ( is_wp_error( $items ) ) {
    function wp_get_nav_menu_items( $menu, $args = array() ) { 
    603604                'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true );
    604605        $args = wp_parse_args( $args, $defaults );
    605606        $args['include'] = $items;
     607        $_menu_item_sort_prop = $args['output_key'];
    606608
    607609        if ( ! empty( $items ) ) {
    608610                $items = get_posts( $args );