edit_form_after_title
云策文档标注
概述
edit_form_after_title 是一个 WordPress 动作钩子,在经典编辑器的标题字段后触发,用于在文章编辑页面添加自定义内容或功能。
关键要点
- 这是一个动作钩子,在文章编辑页面的标题字段后执行。
- 仅适用于经典编辑器,不支持 Gutenberg 编辑器(自 WordPress 5.0 起默认)。
- 可用于自定义文章类型(Custom Post Type)。
- 参数为 $post,类型为 WP_Post 对象。
- 源代码为 do_action( 'edit_form_after_title', $post );。
- 自 WordPress 3.5.0 版本引入。
注意事项
- 注意:此钩子仅在经典编辑器中有效,Gutenberg 编辑器不支持。
原文内容
Fires after the title field.
Parameters
$postWP_Post-
Post object.
Source
do_action( 'edit_form_after_title', $post );
Changelog
| Version | Description |
|---|---|
| 3.5.0 | Introduced. |
Skip to note 2 content
tabib2m
Remember that this hook only works on the classic editor, and it is not supported by the new Gutenberg editor (that is the default editor since version 5)