mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Avoid running get_posts filter twice. Props DD32. fixes #4712
git-svn-id: http://svn.automattic.com/wordpress/trunk@5855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
773e23d2e6
commit
2af150e496
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user