Query: Rename `_prime_post_parents_caches()` for clarity.
Change the name of `_prime_post_parents_caches()` to `_prime_post_parent_id_caches()` to make it clearer only the parent post ID is cached rather than the entire post parent object. Follow up to [56763]. Props spacedmonkey, joemcgill, peterwilsoncc. See #59188. Built from https://develop.svn.wordpress.org/trunk@56811 git-svn-id: http://core.svn.wordpress.org/trunk@56323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
203ae545d2
commit
61658a27a3
|
@ -3191,7 +3191,7 @@ class WP_Query {
|
|||
|
||||
return $this->posts;
|
||||
} elseif ( 'id=>parent' === $q['fields'] ) {
|
||||
_prime_post_parents_caches( $post_ids );
|
||||
_prime_post_parent_id_caches( $post_ids );
|
||||
|
||||
/** @var int[] */
|
||||
$post_parents = wp_cache_get_multiple( $post_ids, 'post_parent' );
|
||||
|
|
|
@ -7797,7 +7797,7 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache
|
|||
}
|
||||
|
||||
/**
|
||||
* Prime post parent caches.
|
||||
* Prime the cache containing the parent ID of various post objects.
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
|
@ -7805,7 +7805,7 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache
|
|||
*
|
||||
* @param int[] $ids ID list.
|
||||
*/
|
||||
function _prime_post_parents_caches( array $ids ) {
|
||||
function _prime_post_parent_id_caches( array $ids ) {
|
||||
global $wpdb;
|
||||
|
||||
$non_cached_ids = _get_non_cached_ids( $ids, 'post_parent' );
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.4-beta2-56810';
|
||||
$wp_version = '6.4-beta2-56811';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue