wp_delete_category()WP 2.0.0

Deletes one existing category.

Хуков нет.

Возвращает

true|false|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.

Использование

wp_delete_category( $cat_ID );
$cat_ID(int) (обязательный)
Category term ID.

Список изменений

С версии 2.0.0 Введена.

Код wp_delete_category() WP 6.0.2

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