WordPress开发者和主题制作者的搜索引擎



wp_delete_category ›

Since2.0.0
已弃用n/a
wp_delete_category ( $cat_ID )
参数:
  • (int) $cat_ID Category term ID.
    Required: Yes
返回:
  • (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.
定义在:
文档:

Deletes one existing category.



源码

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