Avoid running get_posts filter twice. Props DD32. fixes #4712

git-svn-id: https://develop.svn.wordpress.org/trunk@5855 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-08-08 04:24:44 +00:00
parent 59b3c1ce47
commit c974ff5406
1 changed files with 2 additions and 1 deletions

View File

@ -1183,7 +1183,6 @@ function &get_pages($args = '') {
$query .= " ORDER BY " . $sort_column . " " . $sort_order ;
$pages = $wpdb->get_results($query);
$pages = apply_filters('get_pages', $pages, $r);
if ( empty($pages) )
return array();
@ -1197,6 +1196,8 @@ function &get_pages($args = '') {
$cache[ $key ] = $pages;
wp_cache_set( 'get_pages', $cache, 'page' );
$pages = apply_filters('get_pages', $pages, $r);
return $pages;
}