Changeset 54894 for trunk/src/wp-includes/post.php
- Timestamp:
- 11/29/2022 08:27:29 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r54891 r54894 7877 7877 * @since 6.1.0 This function is no longer marked as "private". 7878 7878 * 7879 * @see update_post_caches() 7879 * @see update_post_cache() 7880 * @see update_postmeta_cache() 7881 * @see update_object_term_cache() 7880 7882 * 7881 7883 * @global wpdb $wpdb WordPress database abstraction object. … … 7892 7894 $fresh_posts = $wpdb->get_results( sprintf( "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE ID IN (%s)", implode( ',', $non_cached_ids ) ) ); 7893 7895 7894 update_post_caches( $fresh_posts, 'any', $update_term_cache, $update_meta_cache ); 7896 if ( $fresh_posts ) { 7897 // Despite the name, update_post_cache() expects an array rather than a single post. 7898 update_post_cache( $fresh_posts ); 7899 } 7900 } 7901 7902 if ( $update_meta_cache ) { 7903 update_postmeta_cache( $ids ); 7904 } 7905 7906 if ( $update_term_cache ) { 7907 $post_types = array_map( 'get_post_type', $ids ); 7908 $post_types = array_unique( $post_types ); 7909 update_object_term_cache( $ids, $post_types ); 7895 7910 } 7896 7911 }
Note: See TracChangeset
for help on using the changeset viewer.