wp_admin_notice_args
云策文档标注
概述
wp_admin_notice_args 是一个 WordPress 过滤器钩子,用于在生成管理通知时过滤其参数。它允许开发者自定义通知的显示属性。
关键要点
- 这是一个过滤器钩子,用于修改 admin notice 的参数数组。
- 参数包括 $args(通知参数数组)和 $message(通知消息字符串)。
- 在 wp_get_admin_notice() 函数中被调用,用于创建通知标记。
- 从 WordPress 6.4.0 版本开始引入。
原文内容
Filters the arguments for an admin notice.
Parameters
$argsarray-
The arguments for the admin notice.
$messagestring-
The message for the admin notice.
Source
$args = apply_filters( 'wp_admin_notice_args', $args, $message );
Changelog
| Version | Description |
|---|---|
| 6.4.0 | Introduced. |