mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Taxonomy: Remove redundant caching from get_all_category_ids()
, deprecated in favor of get_terms()
in [28679].
The `all_category_ids` cache key it relied on was removed in [5555] and never repopulated, causing invalid or unexpected results when using a persistent object cache. Props itowhid06, johnjamesjacoby. Fixes #48176. Built from https://develop.svn.wordpress.org/trunk@46810 git-svn-id: http://core.svn.wordpress.org/trunk@46610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
135e608b46
commit
6d1ed93c91
@ -1286,7 +1286,6 @@ function get_category_children( $id, $before = '/', $after = '', $visited = arra
|
|||||||
function get_all_category_ids() {
|
function get_all_category_ids() {
|
||||||
_deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
|
_deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
|
||||||
|
|
||||||
if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
|
|
||||||
$cat_ids = get_terms(
|
$cat_ids = get_terms(
|
||||||
array(
|
array(
|
||||||
'taxonomy' => 'category',
|
'taxonomy' => 'category',
|
||||||
@ -1294,8 +1293,6 @@ function get_all_category_ids() {
|
|||||||
'get' => 'all',
|
'get' => 'all',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $cat_ids;
|
return $cat_ids;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-46809';
|
$wp_version = '5.4-alpha-46810';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user