mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Taxonomy: Allow for wp_count_terms( $args ) signature, making passing a taxonomy optional.
This brings `wp_count_terms()` in line with other taxonomy functions such as `get_terms()` which technically no longer require a taxonomy. Similar to the previously modified functions, no deprecation warning is triggered when using the legacy signature. Fixes #36399. git-svn-id: https://develop.svn.wordpress.org/trunk@48840 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -129,7 +129,12 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
|
||||
$this->set_pagination_args(
|
||||
array(
|
||||
'total_items' => wp_count_terms( $this->screen->taxonomy, compact( 'search' ) ),
|
||||
'total_items' => wp_count_terms(
|
||||
array(
|
||||
'taxonomy' => $this->screen->taxonomy,
|
||||
'search' => $search,
|
||||
)
|
||||
),
|
||||
'per_page' => $tags_per_page,
|
||||
)
|
||||
);
|
||||
|
||||
@@ -725,7 +725,6 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
|
||||
|
||||
$num_pages = ceil(
|
||||
wp_count_terms(
|
||||
$taxonomy_name,
|
||||
array_merge(
|
||||
$args,
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user