钩子文档

edit_tag_form

💡 云策文档标注

概述

edit_tag_form 是一个在编辑分类法术语表单末尾触发的已弃用 Hook,用于在 WordPress 中处理术语编辑操作。自 3.0.0 版本起,建议使用 {$taxonomy}_edit_form 替代。

关键要点

  • Hook 名称:edit_tag_form,在编辑术语表单末尾触发
  • 参数:$tag,类型为 WP_Term,表示当前分类法术语对象
  • 弃用状态:自 WordPress 3.0.0 起弃用,推荐使用 {$taxonomy}_edit_form 替代
  • 引入版本:2.5.0,弃用版本:3.0.0
  • 源代码:do_action_deprecated( 'edit_tag_form', array( $tag ), '3.0.0', '{$taxonomy}_edit_form' )

注意事项

开发者应避免在新代码中使用此 Hook,并迁移到 {$taxonomy}_edit_form 以确保兼容性。


📄 原文内容

Fires at the end of the Edit Term form.

Parameters

$tagWP_Term
Current taxonomy term object.

Source

do_action_deprecated( 'edit_tag_form', array( $tag ), '3.0.0', '{$taxonomy}_edit_form' );

Changelog

Version Description
3.0.0 Deprecated. Use '{$taxonomy_edit_form'} instead.
2.5.0 Introduced.