wp_before_execute_ability
云策文档标注
概述
wp_before_execute_ability 是一个 WordPress 钩子,在能力执行前触发,用于在输入验证和权限检查之后进行自定义操作。
关键要点
- 触发时机:在能力执行前,输入验证和权限检查之后
- 参数:$ability_name(能力名称,字符串类型),$input(输入数据,混合类型)
- 相关函数:WP_Ability::execute() 用于执行能力
- 引入版本:WordPress 6.9.0
原文内容
Fires before an ability gets executed, after input validation and permissions check.
Parameters
$ability_namestring-
The name of the ability.
$inputmixed-
The input data for the ability.
Source
do_action( 'wp_before_execute_ability', $this->name, $input );
Changelog
| Version | Description |
|---|---|
| 6.9.0 | Introduced. |