plugin_auto_update_debug_string
云策文档标注
概述
此文档介绍了一个 WordPress 过滤器 Hook,用于在站点健康调试数据中自定义每个插件的自动更新设置文本字符串。它允许开发者修改插件自动更新状态的显示内容。
关键要点
- Hook 名称:plugin_auto_update_debug_string
- 用途:过滤站点健康调试数据中插件自动更新设置的文本输出
- 参数:包括 $auto_updates_string(原始字符串)、$plugin_path(插件文件路径)、$plugin(插件数据数组)、$enabled(自动更新是否启用)
- 引入版本:WordPress 5.5.0
代码示例
$auto_updates_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_string, $plugin_path, $plugin, $enabled );
原文内容
Filters the text string of the auto-updates setting for each plugin in the Site Health debug data.
Parameters
$auto_updates_stringstring-
The string output for the auto-updates column.
$plugin_pathstring-
The path to the plugin file.
$pluginarray-
An array of plugin data.
$enabledbool-
Whether auto-updates are enabled for this item.
Source
$auto_updates_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_string, $plugin_path, $plugin, $enabled );
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |