diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index d94bb928df..75c36e6068 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -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', ) ); diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index 99f76fd632..44ad543464 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -214,6 +214,7 @@ class WP_Terms_List_Table extends WP_List_Table { $args = wp_parse_args( $this->callback_args, array( + 'taxonomy' => $taxonomy, 'page' => 1, 'number' => 20, 'search' => '', @@ -237,7 +238,8 @@ class WP_Terms_List_Table extends WP_List_Table { $args['number'] = 0; $args['offset'] = $args['number']; } - $terms = get_terms( $taxonomy, $args ); + + $terms = get_terms( $args ); if ( empty( $terms ) || ! is_array( $terms ) ) { echo ''; diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index c9959cb852..54e0af0346 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -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 ) ) { diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 212ca7a0d9..81b1d18612 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -663,6 +663,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0; $args = array( + 'taxonomy' => $taxonomy_name, 'child_of' => 0, 'exclude' => '', 'hide_empty' => false, @@ -675,7 +676,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { 'pad_counts' => false, ); - $terms = get_terms( $taxonomy_name, $args ); + $terms = get_terms( $args ); if ( ! $terms || is_wp_error( $terms ) ) { echo '

' . __( 'No items.' ) . '

'; @@ -774,8 +775,8 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {