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



wp_delete_category › WordPress Function

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' );
}