钩子文档

plugin_auto_update_setting_html

💡 云策文档标注

概述

plugin_auto_update_setting_html 过滤器用于修改插件列表表中每个插件的自动更新设置列的 HTML 内容。它允许开发者自定义显示,包括切换链接和下次更新时间。

关键要点

  • 过滤器名称:plugin_auto_update_setting_html
  • 参数:$html(插件自动更新列的 HTML 内容)、$plugin_file(插件文件路径)、$plugin_data(插件数据数组)
  • 用途:在 WP_Plugins_List_Table::single_row() 中调用,用于渲染插件行的自动更新设置
  • 版本:从 WordPress 5.5.0 引入

📄 原文内容

Filters the HTML of the auto-updates setting for each plugin in the Plugins list table.

Parameters

$htmlstring
The HTML of the plugin’s auto-update column content, including toggle auto-update action links and time to next update.
$plugin_filestring
Path to the plugin file relative to the plugins directory.
$plugin_dataarray
An array of plugin data. See get_plugin_data() and the ‘plugin_row_meta’ filter for the list of possible values.

Source

echo apply_filters( 'plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data );

Changelog

Version Description
5.5.0 Introduced.