mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Taxonomy: Fix deprecated calls to get_terms().
The taxonomy should be passed as part of `$args`, rather than as its own argument. Props sgastard, mukesh27, SergeyBiryukov. Fixes #47819. git-svn-id: https://develop.svn.wordpress.org/trunk@45723 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1287,7 +1287,13 @@ function get_all_category_ids() {
|
||||
_deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
|
||||
|
||||
if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
|
||||
$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
|
||||
$cat_ids = get_terms(
|
||||
array(
|
||||
'taxonomy' => 'category',
|
||||
'fields' => 'ids',
|
||||
'get' => 'all',
|
||||
)
|
||||
);
|
||||
wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user