Ticket #8722: 8722.diff
| File 8722.diff, 991 bytes (added by wojtek.szkutnik, 3 years ago) |
|---|
-
category.php
76 76 * @param int|object $category Category ID or Category row object 77 77 * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N 78 78 * @param string $filter Optional. Default is raw or no WordPress defined filter will applied. 79 * @param string $taxonomy Optional. Default is 'category'. 79 80 * @return mixed Category data in type defined by $output parameter. 80 81 */ 81 function &get_category( $category, $output = OBJECT, $filter = 'raw' ) { 82 $category = get_term( $category, 'category', $output, $filter ); 82 function &get_category( $category, $output = OBJECT, $filter = 'raw', $taxonomy = 'category' ) { 83 $taxonomy = apply_filters( 'get_category_taxonomy', $taxonomy, $category ); 84 $category = get_term( $category, $taxonomy, $output, $filter ); 83 85 if ( is_wp_error( $category ) ) 84 86 return $category; 85 87
