wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_delete_category › WordPress Function

Since2.0.0
Deprecatedn/a
wp_delete_category ( $cat_id )
Parameters:
  • (int) $cat_id Category term ID.
    Required: Yes
Returns:
  • (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.
Defined at:
Codex:

Deletes one existing category.



Source

function wp_delete_category( $cat_id ) {
	return wp_delete_term( $cat_id, 'category' );
}