WordPress.org

Make WordPress Core

Ticket #4712: 4712.delay_filter_after_cache.diff

File 4712.delay_filter_after_cache.diff, 646 bytes (added by DD32, 12 years ago)

delay the fitlering until after caching

  • wp-includes/post.php

     
    11831183        $query .= " ORDER BY " . $sort_column . " " . $sort_order ;
    11841184
    11851185        $pages = $wpdb->get_results($query);
    1186         $pages = apply_filters('get_pages', $pages, $r);
    11871186
    11881187        if ( empty($pages) )
    11891188                return array();
     
    11971196        $cache[ $key ] = $pages;
    11981197        wp_cache_set( 'get_pages', $cache, 'page' );
    11991198
     1199        $pages = apply_filters('get_pages', $pages, $r);
     1200
    12001201        return $pages;
    12011202}
    12021203
     
    18781879        }
    18791880}
    18801881
    1881 ?>
    1882  No newline at end of file
     1882?>