On this page
get_category_to_edit( int $id ): object
Gets category object for given ID and ‘edit’ filter context.
Parameters
$idint Required
Return
object
Source
File: wp-admin/includes/taxonomy.php. View all references
function get_category_to_edit( $id ) {
$category = get_term( $id, 'category', OBJECT, 'edit' );
_make_cat_compat( $category );
return $category;
}
Related
Uses
| Uses | Description |
|---|---|
| _make_cat_compat() wp-includes/category.php | Updates category structure to old pre-2.3 from new taxonomy structure. |
| get_term() wp-includes/taxonomy.php | Gets all term data from database by term ID. |
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_category_to_edit