wp_delete_category( int $cat_ID )

Deletes one existing category.


Parameters Parameters

$cat_ID

(int) (Required) Category term ID.


Top ↑

Return 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.


Top ↑

Source Source

File: wp-includes/taxonomy.php

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


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.