Changeset 45723 for trunk/src/wp-includes/category.php
- Timestamp:
- 08/03/2019 03:34:54 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category.php
r45590 r45723 27 27 $defaults = array( 'taxonomy' => 'category' ); 28 28 $args = wp_parse_args( $args, $defaults ); 29 30 $taxonomy = $args['taxonomy'];31 29 32 30 /** … … 38 36 * @param array $args An array of arguments. See get_terms(). 39 37 */ 40 $ taxonomy = apply_filters( 'get_categories_taxonomy', $taxonomy, $args );38 $args['taxonomy'] = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args ); 41 39 42 40 // Back compat … … 52 50 ) 53 51 ); 54 $taxonomy = 'link_category'; 55 $args['taxonomy'] = $taxonomy; 56 } 57 58 $categories = get_terms( $taxonomy, $args ); 52 $args['taxonomy'] = 'link_category'; 53 } 54 55 $categories = get_terms( $args ); 59 56 60 57 if ( is_wp_error( $categories ) ) { … … 137 134 } 138 135 $categories = get_terms( 139 'category',140 136 array( 141 'get' => 'all', 142 'slug' => $leaf_path, 137 'taxonomy' => 'category', 138 'get' => 'all', 139 'slug' => $leaf_path, 143 140 ) 144 141 ); … … 280 277 */ 281 278 function get_tags( $args = '' ) { 282 $tags = get_terms( 'post_tag', $args ); 279 $defaults = array( 'taxonomy' => 'post_tag' ); 280 $args = wp_parse_args( $args, $defaults ); 281 282 $tags = get_terms( $args ); 283 283 284 284 if ( empty( $tags ) ) {
Note: See TracChangeset
for help on using the changeset viewer.