diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 2c9ec0672..6a63fa1f0 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -542,7 +542,7 @@ class WP_Widget_Recent_Posts extends WP_Widget { else if ( $number > 15 ) $number = 15; - $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1)); + $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => true)); if ($r->have_posts()) : ?> diff --git a/wp-includes/post.php b/wp-includes/post.php index b5923ea39..61496abe3 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1122,7 +1122,7 @@ function get_posts($args = null) { } elseif ( ! empty($r['exclude']) ) $r['post__not_in'] = wp_parse_id_list( $r['exclude'] ); - $r['caller_get_posts'] = true; + $r['ignore_sticky_posts'] = true; $r['no_found_rows'] = true; $get_posts = new WP_Query; diff --git a/wp-includes/query.php b/wp-includes/query.php index 94b18cd33..3354f555c 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1540,8 +1540,14 @@ class WP_Query { $post_status_join = false; $page = 1; - if ( !isset($q['caller_get_posts']) ) - $q['caller_get_posts'] = false; + if ( isset( $q['caller_get_posts'] ) ) { + _deprecated_argument( 'WP_Query', '3.1', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) ); + if ( !isset( $q['ignore_sticky_posts'] ) ) + $q['ignore_sticky_posts'] = $q['caller_get_posts']; + } + + if ( !isset( $q['ignore_sticky_posts'] ) ) + $q['ignore_sticky_posts'] = false; if ( !isset($q['suppress_filters']) ) $q['suppress_filters'] = false; @@ -2377,7 +2383,7 @@ class WP_Query { // Put sticky posts at the top of the posts array $sticky_posts = get_option('sticky_posts'); - if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) { + if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) { $num_posts = count($this->posts); $sticky_offset = 0; // Loop over posts and relocate stickies to the front.