admin_action_{$action}
云策文档标注
概述
admin_action_{$action} 是一个动态 Hook,当请求中包含 'action' 变量时触发,用于处理管理后台的自定义操作。
关键要点
- 这是一个动态 Hook,名称中的 $action 部分来自 GET 或 POST 请求中的 'action' 变量。
- 主要用于在 WordPress 管理后台执行自定义操作,开发者可以添加回调函数来响应特定 action 请求。
- 自 WordPress 2.6.0 版本引入,是核心功能的一部分。
原文内容
Fires when an ‘action’ request variable is sent.
Description
The dynamic portion of the hook name, $action, refers to the action derived from the GET or POST request.
Source
do_action( "admin_action_{$action}" );
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |