get_category_to_edit() WordPress Function
The get_category_to_edit() function is used to retrieve a category object by its ID. This function is useful for editing an existing category.
get_category_to_edit( int $id ) #
Get category object for given ID and ‘edit’ filter context.
Parameters
- $id
(int)(Required)
Return
(object)
Source
File: wp-admin/includes/taxonomy.php
function get_category_to_edit( $id ) { $category = get_term( $id, 'category', OBJECT, 'edit' ); _make_cat_compat( $category ); return $category; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |