Make WordPress Core


Ignore:
Timestamp:
08/21/2020 10:30:06 PM (6 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php

    r48782 r48840  
    151151                }
    152152
    153                 $term_count = wp_count_terms( $taxonomy, $this->get_taxonomies_query_args( $taxonomy ) );
     153                $term_count = wp_count_terms( $this->get_taxonomies_query_args( $taxonomy ) );
    154154
    155155                return (int) ceil( $term_count / wp_sitemaps_get_max_urls( $this->object_type ) );
Note: See TracChangeset for help on using the changeset viewer.