rest_insert_{$this->taxonomy}
do_action( “rest_insert_{$this->taxonomy}”, WP_Term $term , WP_REST_Request $request , bool $creating )
动作钩子::在通过REST API创建或更新单个术语后激发。
Action Hook: Fires after a single term is created or updated via the REST API.
说明(Description)
钩子名的动态部分,$this->taxonomy,指的是taxonomy slug。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$term | (WP_Term) | 插入或更新的术语对象。 |
$request | (WP_REST_Request) | 请求对象。 |
$creating | (bool) | 创建术语时为True,更新时为false。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php:484 | 2 | 0 |
rest_insert_{$this->taxonomy} 为WP2原创文章,链接:https://www.wp2.cn/hook/rest_insert_this-taxonomy/