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:
Sergey Biryukov
2019-08-03 03:34:54 +00:00
parent 2adeb5b6d5
commit 3c73c7a56f
18 changed files with 72 additions and 48 deletions
+7 -1
View File
@@ -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' );
}