mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 13:44:30 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56811 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user