钩子文档

{$taxonomy}_term_new_form_tag

💡 云策文档标注

概述

这是一个 WordPress 动作钩子,在添加分类法术语的表单标签内触发。钩子名称包含动态部分 $taxonomy,用于指定分类法。

关键要点

  • 钩子名称格式为 {$taxonomy}_term_new_form_tag,其中 $taxonomy 是分类法的 slug。
  • 常见示例包括 category_term_new_form_tag 和 post_tag_term_new_form_tag。
  • 从 WordPress 3.7.0 版本开始引入。

代码示例

do_action( "{$taxonomy}_term_new_form_tag" );

📄 原文内容

Fires inside the Add Tag form tag.

Description

The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.

Possible hook names include:

  • category_term_new_form_tag
  • post_tag_term_new_form_tag

Source

do_action( "{$taxonomy}_term_new_form_tag" );

Changelog

Version Description
3.7.0 Introduced.