wp_delete_category()
wp_delete_category( int $cat_ID ) 删除一个现有类别。 Deletes one…
wp_delete_category( int $cat_ID )
删除一个现有类别。
Deletes one existing category.
目录锚点:#参数#源码#笔记
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $cat_ID | (int) | 类别术语ID。 |
源码(Source)
/**
* Deletes one existing category.
*
* @since 2.0.0
*
* @param int $cat_ID
* @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.
*/
function wp_delete_category( $cat_ID ) {
return wp_delete_term( $cat_ID, 'category' );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 2.0.0 | wp-includes/taxonomy.php | 5 | 18 |
笔记(Notes)
例子
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!