doing_it_wrong_run
云策文档标注
概述
doing_it_wrong_run 是一个 WordPress 动作钩子,用于在函数被错误调用时触发,帮助开发者识别和调试代码问题。
关键要点
- 触发时机:当指定的函数被不正确使用时触发。
- 参数:$function_name(被调用的函数名)、$message(错误说明消息)、$version(消息添加的 WordPress 版本)。
- 相关函数:与 _doing_it_wrong() 函数关联,用于标记错误调用。
- 版本历史:自 WordPress 3.1.0 版本引入。
原文内容
Fires when the given function is being used incorrectly.
Parameters
$function_namestring-
The function that was called.
$messagestring-
A message explaining what has been done incorrectly.
$versionstring-
The version of WordPress where the message was added.
Source
do_action( 'doing_it_wrong_run', $function_name, $message, $version );
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |