Changeset 52985
- Timestamp:
- 03/23/2022 04:26:01 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r52982 r52985 3261 3261 $stickies = get_posts( 3262 3262 array( 3263 'cache_results' => $q['cache_results'],3264 'lazy_load_term_meta' => $q['lazy_load_term_meta'],3265 3263 'post__in' => $sticky_posts, 3266 3264 'post_type' => $post_type, 3267 3265 'post_status' => 'publish', 3268 3266 'suppress_filters' => $q['suppress_filters'], 3267 'cache_results' => $q['cache_results'], 3269 3268 'update_post_meta_cache' => $q['update_post_meta_cache'], 3270 3269 'update_post_term_cache' => $q['update_post_term_cache'], 3270 'lazy_load_term_meta' => $q['lazy_load_term_meta'], 3271 3271 ) 3272 3272 ); -
trunk/tests/phpunit/tests/query/stickies.php
r52982 r52985 110 110 * @ticket 36907 111 111 */ 112 public function test_stickies_ nest_query() {112 public function test_stickies_should_obey_parameters_from_the_main_query() { 113 113 $filter = new MockAction(); 114 114 add_filter( 'posts_pre_query', array( $filter, 'filter' ), 10, 2 ); … … 120 120 $this->assertNotEmpty( $sticky_query_vars['posts_per_page'] ); 121 121 $this->assertSame( $query_vars['suppress_filters'], $sticky_query_vars['suppress_filters'] ); 122 $this->assertSame( $query_vars['cache_results'], $sticky_query_vars['cache_results'] ); 122 123 $this->assertSame( $query_vars['update_post_meta_cache'], $sticky_query_vars['update_post_meta_cache'] ); 123 124 $this->assertSame( $query_vars['update_post_term_cache'], $sticky_query_vars['update_post_term_cache'] ); 124 125 $this->assertSame( $query_vars['lazy_load_term_meta'], $sticky_query_vars['lazy_load_term_meta'] ); 125 $this->assertSame( $query_vars['cache_results'], $sticky_query_vars['cache_results'] );126 126 $this->assertTrue( $sticky_query_vars['ignore_sticky_posts'] ); 127 127 $this->assertTrue( $sticky_query_vars['no_found_rows'] );
Note: See TracChangeset
for help on using the changeset viewer.