Ticket #7427: 7427.diff
| File 7427.diff, 759 bytes (added by DD32, 4 years ago) |
|---|
-
wp-includes/category.php
37 37 * @return array List of categories. 38 38 */ 39 39 function &get_categories( $args = '' ) { 40 $defaults = array( 'type' => 'category' );40 $defaults = array( 'type' => 'category', 'taxonomy' => 'category' ); 41 41 $args = wp_parse_args( $args, $defaults ); 42 42 43 $taxonomy = 'category';44 43 if ( 'link' == $args['type'] ) 45 44 $taxonomy = 'link_category'; 46 $categories = (array) get_terms( $ taxonomy, $args );45 $categories = (array) get_terms( $args['taxonomy'], $args ); 47 46 48 47 foreach ( array_keys( $categories ) as $k ) 49 48 _make_cat_compat( $categories[$k] );
