Changeset 53508
- Timestamp:
- 06/15/2022 01:35:28 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r53504 r53508 628 628 * @since 5.1.0 Introduced the `$meta_compare_key` parameter. 629 629 * @since 5.3.0 Introduced the `$meta_type_key` parameter. 630 * @since 6.1.0 Introduced the `$update_menu_item_cache` parameter. 630 631 * 631 632 * @param string|array $query { -
trunk/src/wp-includes/nav-menu.php
r53504 r53508 754 754 755 755 /** 756 * Prime all linked objects tomenu items.756 * Updates post and term caches for all linked objects for a list of menu items. 757 757 * 758 758 * @since 6.1.0 759 759 * 760 * @param WP_Post[] $menu_items Array post objects of menu items.760 * @param WP_Post[] $menu_items Array of menu item post objects. 761 761 */ 762 762 function update_menu_item_cache( $menu_items ) { … … 768 768 continue; 769 769 } 770 770 771 $object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true ); 771 772 $type = get_post_meta( $menu_item->ID, '_menu_item_type', true ); -
trunk/tests/phpunit/tests/post/nav-menu.php
r53504 r53508 205 205 /** 206 206 * @ticket 55620 207 */ 208 public function test_update_menu_item_cache_primed_post() { 207 * @covers update_menu_item_cache 208 */ 209 public function test_update_menu_item_cache_primed_posts() { 209 210 $post_id = self::factory()->post->create(); 210 211 wp_update_nav_menu_item( … … 230 231 $args = $action->get_args(); 231 232 $last = end( $args ); 232 $this->assertEqualSets( array( $post_id ), $last[1], '_prime_post_caches was not executed.' );233 $this->assertEqualSets( array( $post_id ), $last[1], '_prime_post_caches() was not executed.' ); 233 234 } 234 235 235 236 /** 236 237 * @ticket 55620 238 * @covers update_menu_item_cache 237 239 */ 238 240 public function test_update_menu_item_cache_primed_terms() { … … 261 263 $args = $action->get_args(); 262 264 $last = end( $args ); 263 $this->assertEqualSets( array( $term_id ), $last[1], '_prime_term_caches was not executed.' );265 $this->assertEqualSets( array( $term_id ), $last[1], '_prime_term_caches() was not executed.' ); 264 266 } 265 267
Note: See TracChangeset
for help on using the changeset viewer.