Make WordPress Core

Ticket #1171: wplistpage.diff

File wplistpage.diff, 619 bytes (added by mdawaffe, 20 years ago)
  • wp-includes/template-functions-post.php

     
    311311}
    312312
    313313function wp_list_pages($args = '') {
     314        global $cache_pages;
    314315        parse_str($args, $r);
    315316        if (!isset($r['depth'])) $r['depth'] = 0;
    316317        if (!isset($r['show_date'])) $r['show_date'] = '';
     
    319320
    320321
    321322        // Query pages.
    322         $pages = get_pages($args);
     323        $pages = (isset($cache_pages)) ? $cache_pages : get_pages();
    323324        if ( $pages ) :
    324325
    325326        if ( $r['title_li'] )