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.

git-svn-id: https://develop.svn.wordpress.org/trunk@53483 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-06-10 15:15:07 +00:00
parent aff6a79b27
commit de009085a9
6 changed files with 87 additions and 41 deletions

View File

@@ -143,6 +143,7 @@ if ( ! function_exists( 'cache_users' ) ) :
$list = implode( ',', $clean );
$users = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($list)" );
foreach ( $users as $user ) {
update_user_caches( $user );
}