1. 首页
  2. WordPress钩子手册

add_term_relationship

do_action( ‘add_term_relationship’, int $object_id, int $tt_id, string $taxonomy )

动作钩子::在添加对象项关系之前立即激发。
Action Hook: Fires immediately before an object-term relationship is added.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$object_id (int) 对象ID。
$tt_id (int) 术语分类ID。
$taxonomy (string) 分类蛞蝓。

源码(Source)


更新版本 源码位置 使用 被使用
4.7.0 wp-includes/taxonomy.php:2496 1 0

add_term_relationship 为WP2原创文章,链接:https://www.wp2.cn/hook/add_term_relationship/