Make WordPress Core


Ignore:
Timestamp:
06/15/2022 01:35:28 PM (3 years ago)
Author:
SergeyBiryukov
Message:

REST API: Some documentation and test improvements for update_menu_item_cache():

  • Make the function description more specific, for consistency with other similar functions.
  • Add a @since note for the $update_menu_item_cache parameter of WP_Query::parse_query().
  • Add missing @covers tags for the unit tests.

Follow-up to [53504].

See #55620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r53504 r53508  
    754754
    755755/**
    756  * Prime all linked objects to menu items.
     756 * Updates post and term caches for all linked objects for a list of menu items.
    757757 *
    758758 * @since 6.1.0
    759759 *
    760  * @param WP_Post[] $menu_items Array post objects of menu items.
     760 * @param WP_Post[] $menu_items Array of menu item post objects.
    761761 */
    762762function update_menu_item_cache( $menu_items ) {
     
    768768            continue;
    769769        }
     770
    770771        $object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true );
    771772        $type      = get_post_meta( $menu_item->ID, '_menu_item_type', true );
Note: See TracChangeset for help on using the changeset viewer.