Make WordPress Core

Changeset 15589


Ignore:
Timestamp:
09/07/2010 04:46:08 AM (14 years ago)
Author:
markjaquith
Message:

Rename caller_get_posts WP_Query flag to ignore_sticky_posts, because that is the only thing it does. fixes #14624. props scribu

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r15316 r15589  
    543543            $number = 15;
    544544
    545         $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'caller_get_posts' => 1));
     545        $r = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => true));
    546546        if ($r->have_posts()) :
    547547?>
  • trunk/wp-includes/post.php

    r15582 r15589  
    11231123        $r['post__not_in'] = wp_parse_id_list( $r['exclude'] );
    11241124
    1125     $r['caller_get_posts'] = true;
     1125    $r['ignore_sticky_posts'] = true;
    11261126    $r['no_found_rows'] = true;
    11271127
  • trunk/wp-includes/query.php

    r15581 r15589  
    15411541        $page = 1;
    15421542
    1543         if ( !isset($q['caller_get_posts']) )
    1544             $q['caller_get_posts'] = false;
     1543        if ( isset( $q['caller_get_posts'] ) ) {
     1544            _deprecated_argument( 'WP_Query', '3.1', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
     1545            if ( !isset( $q['ignore_sticky_posts'] ) )
     1546                $q['ignore_sticky_posts'] = $q['caller_get_posts'];
     1547        }
     1548
     1549        if ( !isset( $q['ignore_sticky_posts'] ) )
     1550            $q['ignore_sticky_posts'] = false;
    15451551
    15461552        if ( !isset($q['suppress_filters']) )
     
    23782384        // Put sticky posts at the top of the posts array
    23792385        $sticky_posts = get_option('sticky_posts');
    2380         if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) {
     2386        if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) {
    23812387            $num_posts = count($this->posts);
    23822388            $sticky_offset = 0;
Note: See TracChangeset for help on using the changeset viewer.