Make WordPress Core

Ticket #4660: get_pages_order.2.2.1.patch

File get_pages_order.2.2.1.patch, 875 bytes (added by reedom, 19 years ago)

Please test well since I haven't.

  • post.php

     
    10701070       extract($r, EXTR_SKIP);
    10711071
    10721072       $key = md5( serialize( $r ) );
    1073        if ( $cache = wp_cache_get( 'get_pages', 'page' ) )
    1074                if ( isset( $cache[ $key ] ) )
    1075                        return apply_filters('get_pages', $cache[ $key ], $r );
     1073       if ( $cache = wp_cache_get( 'get_pages', 'page' ) ) {
     1074               if ( isset( $cache[ $key ] ) ) {
     1075                       $pages = apply_filters('get_pages', $cache[ $key ], $r );
     1076            if ( $pages && ( $child_of || $hierarchical ) )
     1077                $pages = & get_page_children($child_of, $pages);
     1078            return $pages;
     1079        }
     1080    }
    10761081
    10771082       $inclusions = '';
    10781083       if ( !empty($include) ) {