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

View File

@@ -159,7 +159,12 @@ function export_wp( $args = array() ) {
$tags = (array) get_tags( array( 'get' => 'all' ) );
$custom_taxonomies = get_taxonomies( array( '_builtin' => false ) );
$custom_terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) );
$custom_terms = (array) get_terms(
array(
'taxonomy' => $custom_taxonomies,
'get' => 'all',
)
);
// Put categories in order with no child going before its parent.
while ( $cat = array_shift( $categories ) ) {