From 61658a27a31735d363f448e127d7bd02cc2d2459 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 9 Oct 2023 23:04:16 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-query.php | 2 +- wp-includes/post.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index a52b5a484e..3fcb942aa7 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -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' ); diff --git a/wp-includes/post.php b/wp-includes/post.php index 1f2c65e158..a85d8fbdb5 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c60903ab70..09b51ab409 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.