update_themes_{$hostname}

过滤钩子
apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales )
参数
  • (array|false) $update { The theme update data with the latest details. Default false. @type string $id Optional. ID of the theme for update purposes, should be a URI specified in the `Update URI` header field. @type string $theme Directory name of the theme. @type string $version The version of the theme. @type string $url The URL for details of the theme. @type string $package Optional. The update ZIP for the theme. @type string $tested Optional. The version of WordPress the theme is tested against. @type string $requires_php Optional. The version of PHP which the theme requires. @type bool $autoupdate Optional. Whether the theme should automatically update. @type array $translations { Optional. List of translation updates for the theme. @type string $language The language the translation update is for. @type string $version The version of the theme this translation is for. This is not the version of the language file. @type string $updated The update timestamp of the translation file. Should be a date in the `YYYY-MM-DD HH:MM:SS` format. @type string $package The ZIP location containing the translation update. @type string $autoupdate Whether the translation should be automatically installed. } }
    Required:
  • (array) $theme_data Theme headers.
    Required:
  • (string) $theme_stylesheet Theme stylesheet.
    Required:
  • (string[]) $locales Installed locales to look up translations for.
    Required:
定义位置
相关勾子
update_plugins_hostnameupdate_postmetaupdate_theme_complete_actionsupdated_postmetawp_update_term_parent
相关方法
update_site_metawp_update_themesupdate_term_metaupdate_metawp_update_themeupdate_usermeta
引入
6.1.0
弃用
-

update_themes_{$hostname}:此过滤器用于修改特定插件主机上主题的更新检查选项。 钩子名称的 $hostname 部分动态替换为插件主机的主机名。 此过滤器可用于自定义检查特定插件主机上托管的主题更新的方式。

过滤给定主题主机名的更新响应。

钩子名称的动态部分$hostname是指在UpdateURI头字段中指定的URI的主机名。

$update = apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales );

常见问题

FAQs
查看更多 >