update_plugins_{$hostname}

過濾鉤子
apply_filters( "update_plugins_{$hostname}", false, $plugin_data, $plugin_file, $locales )
引數
  • (array|false) $update { The plugin update data with the latest details. Default false. @type string $id Optional. ID of the plugin for update purposes, should be a URI specified in the `Update URI` header field. @type string $slug Slug of the plugin. @type string $version The version of the plugin. @type string $url The URL for details of the plugin. @type string $package Optional. The update ZIP for the plugin. @type string $tested Optional. The version of WordPress the plugin is tested against. @type string $requires_php Optional. The version of PHP which the plugin requires. @type bool $autoupdate Optional. Whether the plugin should automatically update. @type array $icons Optional. Array of plugin icons. @type array $banners Optional. Array of plugin banners. @type array $banners_rtl Optional. Array of plugin RTL banners. @type array $translations { Optional. List of translation updates for the plugin. @type string $language The language the translation update is for. @type string $version The version of the plugin 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) $plugin_data Plugin headers.
    Required:
  • (string) $plugin_file Plugin filename.
    Required:
  • (string[]) $locales Installed locales to look up translations for.
    Required:
定義位置
相關勾子
update_themes_hostnameupdate_postmetaupdated_postmetaupdate_plugin_complete_actionsafter_plugin_row
相關方法
wp_update_pluginswp_update_pluginupdate_post_metaupdate_post_cache_maybe_update_pluginsdisplay_plugins_table
引入
5.8.0
棄用
-

update_plugins_{$hostname} 是 WordPress 中的一個動作鉤子,在從特定主機更新外掛後觸發。 此鉤子用於在外掛更新完成後執行其他處理或日誌記錄。

過濾給定外掛主機名的更新響應。

鉤子名稱的動態部分,$hostname,是指 Update URI 頭域中指定的URI的主機名。

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

常見問題

FAQs
檢視更多 >