1. 首页
  2. WordPress 函数手册

get_term_to_edit()

get_term_to_edit( int|object $id, string $taxonomy )

清理用于编辑的术语。
Sanitizes Term for editing.

目录锚点:#说明#参数#返回#源码


说明(Description)

返回值是sanitize_term(),用于清除要编辑的术语。功能是为了上下文和简单。


参数(Parameters)

参数 类型 必填 说明
$id (int | object) 必需 术语ID或对象。
$taxonomy (string) 必需 分类法名称。

返回(Return)

(string|int|null|WP_Error)如果$term不是对象,则将返回空string。


源码(Source)


更新版本 源码位置 使用 被使用
2.3.0 wp-includes/taxonomy.php:1078 0 3

get_term_to_edit() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_term_to_edit/