Changeset 45723 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 08/03/2019 03:34:54 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r45711 r45723 1132 1132 * parameter will be interpreted as `$args`, and the first function parameter will 1133 1133 * be parsed as a taxonomy or array of taxonomies. 1134 * @return array|int|WP_Error List of WP_Term instances and their children. Will return WP_Error, if any of $taxonomies1134 * @return array|int|WP_Error List of WP_Term instances and their children. Will return WP_Error, if any of taxonomies 1135 1135 * do not exist. 1136 1136 */ … … 1686 1686 */ 1687 1687 function wp_count_terms( $taxonomy, $args = array() ) { 1688 $defaults = array( 'hide_empty' => false ); 1688 $defaults = array( 1689 'taxonomy' => $taxonomy, 1690 'hide_empty' => false, 1691 ); 1689 1692 $args = wp_parse_args( $args, $defaults ); 1690 1693 … … 1697 1700 $args['fields'] = 'count'; 1698 1701 1699 return get_terms( $ taxonomy, $args );1702 return get_terms( $args ); 1700 1703 } 1701 1704 … … 2192 2195 */ 2193 2196 $name_matches = get_terms( 2194 $taxonomy,2195 2197 array( 2198 'taxonomy' => $taxonomy, 2196 2199 'name' => $name, 2197 2200 'hide_empty' => false, … … 2220 2223 if ( is_taxonomy_hierarchical( $taxonomy ) ) { 2221 2224 $siblings = get_terms( 2222 $taxonomy,2223 2225 array( 2226 'taxonomy' => $taxonomy, 2224 2227 'get' => 'all', 2225 2228 'parent' => $parent, … … 3471 3474 $children = array(); 3472 3475 $terms = get_terms( 3473 $taxonomy,3474 3476 array( 3477 'taxonomy' => $taxonomy, 3475 3478 'get' => 'all', 3476 3479 'orderby' => 'id',
Note: See TracChangeset
for help on using the changeset viewer.