On this page
wp_delete_category( int $cat_ID ): bool|int|WP_Error
Deletes one existing category.
Parameters
$cat_IDint Required-
Category term ID.
Return
bool|int|WP_Error Returns true if completes delete action; false if term doesn't exist; Zero on attempted deletion of default Category; WP_Error object is also a possibility.
Source
File: wp-includes/taxonomy.php. View all references
function wp_delete_category( $cat_ID ) {
return wp_delete_term( $cat_ID, 'category' );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_delete_term() wp-includes/taxonomy.php | Removes a term from the database. |
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_delete_category