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.
Built from https://develop.svn.wordpress.org/trunk@45723


git-svn-id: http://core.svn.wordpress.org/trunk@45534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2019-08-03 03:35:56 +00:00
parent 60431f3c53
commit c26f1c5d90
19 changed files with 73 additions and 49 deletions

View File

@@ -151,8 +151,8 @@ function wp_ajax_ajax_tag_search() {
}
$results = get_terms(
$taxonomy,
array(
'taxonomy' => $taxonomy,
'name__like' => $s,
'fields' => 'names',
'hide_empty' => false,
@@ -1085,11 +1085,11 @@ function wp_ajax_get_tagcloud() {
}
$tags = get_terms(
$taxonomy,
array(
'number' => 45,
'orderby' => 'count',
'order' => 'DESC',
'taxonomy' => $taxonomy,
'number' => 45,
'orderby' => 'count',
'order' => 'DESC',
)
);