Make WordPress Core


Ignore:
Timestamp:
10/21/2025 03:57:16 PM (4 months ago)
Author:
davidbaumwald
Message:

Users: Revert Lazy-load user meta.

With [60915] reverted, this changeset is also being reverted to resolve test failures due to common code.

Reverts [60989].

Follow-up to [61037].

Props jorbin, ellatrix, spacedmonkey.
See #63021, #58001.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/updatePostAuthorCaches.php

    r60989 r61038  
    6868        }
    6969
    70         $this->assertSame( 0, $action->get_call_count(), 'Ensure that user meta are not primed' );
    71     }
    72 
    73     /**
    74      * @ticket 63021
    75      */
    76     public function test_update_post_author_caches_force_load_meta() {
    77         $action = new MockAction();
    78         add_filter( 'update_user_metadata_cache', array( $action, 'filter' ), 10, 2 );
    79 
    80         $q = new WP_Query(
    81             array(
    82                 'post_type'      => 'post',
    83                 'posts_per_page' => self::$post_author_count,
    84             )
    85         );
    86 
    87         while ( $q->have_posts() ) {
    88             $q->the_post();
    89             get_the_author_meta(); // Force loading of author meta.
    90         }
    91 
    9270        $args      = $action->get_args();
    9371        $last_args = end( $args );
Note: See TracChangeset for help on using the changeset viewer.