Definition:
function &get_category( $category, $output = OBJECT, $filter = 'raw' ) {}
Retrieves category data given a category ID or category object.
If you pass the $category parameter an object, which is assumed to be the category row object retrieved the database. It will cache the category data.
Parameters
- int|object $category: Category ID or Category row object
- string $output: Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- string $filter: Optional. Default is raw or no WordPress defined filter will applied.
Return values
returns:Category data in type defined by $output parameter.
Source code
function &get_category( $category, $output = OBJECT, $filter = 'raw' ) { $category = get_term( $category, 'category', $output, $filter ); if ( is_wp_error( $category ) ) return $category; _make_cat_compat( $category ); return $category; }
1242
No comments yet... Be the first to leave a reply!