wp_remove_object_terms()删除一个文章/页面的分类信息

目录

描述

Remove term(s) associated with a given object.

wp_remove_object_terms() 描述

用法

 <?php wp_remove_object_terms$id$terms$taxonomy ); ?> 

wp_remove_object_terms() 用法

参数

$object_id

(int) (必填) The ID of the object from which the terms will be removed.

默认值: None

$terms

(mixed) (必填) The slug(s) or ID(s) of the term(s) to remove. Accepts array, int or string.

默认值: None

$taxonomy

(mixed) (必填) The taxonomy name. Accepts array or string.

默认值: None

wp_remove_object_terms() 参数

历史

  • 添加于 版本: 3.6.0

wp_remove_object_terms() 历史

源文件

wp_remove_object_terms() 函数的代码位于 wp-includes/taxonomy.php.

wp_remove_object_terms() 源文件