Make WordPress Core


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

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

  • Make the function description more specific, for consistency with update_post_author_caches().
  • Add missing @covers tags for the unit test.

Follow-up to [53506].

See #55593.

File:
1 edited

Legend:

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

    r53506 r53507  
    74917491
    74927492/**
    7493  * Prime post parent post caches.
     7493 * Updates parent post caches for a list of post objects.
    74947494 *
    74957495 * @since 6.1.0
    74967496 *
    7497  * @param WP_Post[] $posts Array of Post objects.
     7497 * @param WP_Post[] $posts Array of post objects.
    74987498 */
    74997499function update_post_parent_caches( $posts ) {
     
    75017501    $parent_ids = array_map( 'absint', $parent_ids );
    75027502    $parent_ids = array_unique( array_filter( $parent_ids ) );
     7503
    75037504    if ( ! empty( $parent_ids ) ) {
    75047505        _prime_post_caches( $parent_ids, false );
Note: See TracChangeset for help on using the changeset viewer.