Make WordPress Core


Ignore:
Timestamp:
06/10/2022 03:15:07 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Query: Some documentation and test improvements for update_post_author_caches():

  • Make the descriptions for update_post_author_caches() and update_post_caches() more specific.
  • Move the unit test into its own file, for consistency with update_post_cache() tests. This also allows for using shared fixtures in case more tests are added in the future.

Follow-up to [53482].

See #55716.

File:
1 edited

Legend:

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

    r53482 r53483  
    34353435    public function the_post() {
    34363436        global $post;
     3437
    34373438        if ( ! $this->in_the_loop ) {
    34383439            update_post_author_caches( $this->posts );
    34393440        }
     3441
    34403442        $this->in_the_loop = true;
    34413443
Note: See TracChangeset for help on using the changeset viewer.