{$taxonomy}_pre_edit_form
云策文档标注
概述
这是一个 WordPress 动作钩子,在所有分类法的编辑术语表单之前触发。钩子名称的动态部分 $taxonomy 指代分类法 slug。
关键要点
- 钩子名称格式为 {$taxonomy}_pre_edit_form,例如 category_pre_edit_form 或 post_tag_pre_edit_form。
- 参数包括 $tag(WP_Term 对象,当前分类术语)和 $taxonomy(字符串,当前分类法 slug)。
- 源代码为 do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy );。
- 自 WordPress 3.0.0 版本引入。
原文内容
Fires before the Edit Term form for all taxonomies.
Description
The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
Possible hook names include:
category_pre_edit_formpost_tag_pre_edit_form
Parameters
$tagWP_Term-
Current taxonomy term object.
$taxonomystring-
Current $taxonomy slug.
Source
do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |