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的主機名。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$update = apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales );
$update = apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales );
$update = apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales );

常見問題

FAQs
檢視更多 >