Definition:
function get_cat_name( $cat_id ) {}
Retrieve the name of a category from its ID.
Parameters
- int $cat_id: Category ID
Return values
returns:Category name, or an empty string if category doesn’t exist.
Source code
function get_cat_name( $cat_id ) { $cat_id = (int) $cat_id; $category = &get_category( $cat_id ); if ( ! $category || is_wp_error( $category ) ) return ''; return $category->name; }
1266
No comments yet... Be the first to leave a reply!