Ticket #14624: 14624.diff
| File 14624.diff, 2.2 KB (added by , 16 years ago) |
|---|
-
wp-includes/post.php
1122 1122 } elseif ( ! empty($r['exclude']) ) 1123 1123 $r['post__not_in'] = wp_parse_id_list( $r['exclude'] ); 1124 1124 1125 $r[' caller_get_posts'] = true;1125 $r['ignore_stickies'] = true; 1126 1126 1127 1127 $get_posts = new WP_Query; 1128 1128 return $get_posts->query($r); 1129 1130 1129 } 1131 1130 1132 1131 // -
wp-includes/default-widgets.php
542 542 else if ( $number > 15 ) 543 543 $number = 15; 544 544 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_stickies' => true)); 546 546 if ($r->have_posts()) : 547 547 ?> 548 548 <?php echo $before_widget; ?> -
wp-includes/query.php
1625 1625 $post_status_join = false; 1626 1626 $page = 1; 1627 1627 1628 if ( !isset($q['caller_get_posts']) ) 1629 $q['caller_get_posts'] = false; 1628 if ( isset( $q['caller_get_posts'] ) ) { 1629 _deprecated_argument( 'WP_Query', '3.1', __( '"caller_get_posts" is deprecated. Use "ignore_stickies" instead.' ) ); 1630 if ( !isset( $q['ignore_stickies'] ) ) 1631 $q['ignore_stickies'] = $q['caller_get_posts']; 1632 } 1630 1633 1634 if ( !isset( $q['ignore_stickies'] ) ) 1635 $q['ignore_stickies'] = false; 1636 1631 1637 if ( !isset($q['suppress_filters']) ) 1632 1638 $q['suppress_filters'] = false; 1633 1639 … … 2468 2474 2469 2475 // Put sticky posts at the top of the posts array 2470 2476 $sticky_posts = get_option('sticky_posts'); 2471 if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q[' caller_get_posts'] ) {2477 if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_stickies'] ) { 2472 2478 $num_posts = count($this->posts); 2473 2479 $sticky_offset = 0; 2474 2480 // Loop over posts and relocate stickies to the front.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)