钩子文档

theme_auto_update_debug_string

💡 云策文档标注

概述

theme_auto_update_debug_string 是一个 WordPress 过滤器钩子,用于在站点健康调试数据中自定义每个主题的自动更新设置文本字符串。它允许开发者修改自动更新列的显示内容。

关键要点

  • 这是一个过滤器钩子,用于过滤主题自动更新设置的文本字符串。
  • 主要应用于站点健康调试数据中,影响自动更新列的显示。
  • 接受三个参数:$auto_updates_string(原始字符串)、$theme(主题数据对象)和$enabled(自动更新是否启用)。
  • 首次在 WordPress 5.5.0 版本中引入。

代码示例

$auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled );

📄 原文内容

Filters the text string of the auto-updates setting for each theme in the Site Health debug data.

Parameters

$auto_updates_stringstring
The string output for the auto-updates column.
$themeWP_Theme
An object of theme data.
$enabledbool
Whether auto-updates are enabled for this item.

Source

$auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled );

Changelog

Version Description
5.5.0 Introduced.