themes_auto_update_enabled
云策文档标注
概述
该文档介绍了 themes_auto_update_enabled 过滤器,用于控制主题自动更新是否启用。开发者可以通过此过滤器修改主题自动更新的状态。
关键要点
- themes_auto_update_enabled 是一个过滤器,用于判断主题自动更新是否启用。
- 参数 $enabled 是一个布尔值,true 表示启用,false 表示禁用。
- 此过滤器在 WordPress 5.5.0 版本中引入。
代码示例
return apply_filters( 'themes_auto_update_enabled', $enabled );注意事项
- 相关函数 wp_is_auto_update_enabled_for_type() 可用于检查自动更新是否启用。
- 开发者应谨慎使用此过滤器,以避免影响主题更新功能。
原文内容
Filters whether themes auto-update is enabled.
Parameters
$enabledbool-
True if themes auto-update is enabled, false otherwise.
Source
return apply_filters( 'themes_auto_update_enabled', $enabled );
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |