apply_filters( "update_plugins_{$hostname}", array|false $update, array $plugin_data, string $plugin_file, string[] $locales )
- Since
- 5.8.0
Filters the update response for a given plugin hostname.
Description
The dynamic portion of the hook name, $hostname, refers to the hostname of the URI specified in the Update URI header field.
Compatibility
- WordPress
- since 5.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$updatearray|false- { 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 theUpdate URIheader 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 string[] $icons Optional. Array of plugin icons.
@type string[] $banners Optional. Array of plugin banners.
@type string[] $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 theYYYY-MM-DD HH:MM:SSformat.
@type string $package The ZIP location containing the translation update.
@type string $autoupdate Whether the translation should be automatically installed.
} }$idstringOptional. ID of the plugin for update purposes, should be a URI specified in theUpdate URIheader field.$slugstringSlug of the plugin.$versionstringThe version of the plugin.$urlstringThe URL for details of the plugin.$packagestringOptional. The update ZIP for the plugin.$testedstringOptional. The version of WordPress the plugin is tested against.$requires_phpstringOptional. The version of PHP which the plugin requires.$autoupdateboolOptional. Whether the plugin should automatically update.$iconsstring[]Optional. Array of plugin icons.$bannersstring[]Optional. Array of plugin banners.$banners_rtlstring[]Optional. Array of plugin RTL banners.$translationsarrayOptional. List of translation updates for the plugin.$languagestringThe language the translation update is for.$versionstringThe version of the plugin this translation is for. This is not the version of the language file.$updatedstringThe update timestamp of the translation file. Should be a date in theYYYY-MM-DD HH:MM:SSformat.$packagestringThe ZIP location containing the translation update.$autoupdatestringWhether the translation should be automatically installed.
$plugin_dataarray- Plugin headers.
$plugin_filestring- Plugin filename.
$localesstring[]- Installed locales to look up translations for.
Where this hook fires · 1
wp-includes/update.php:524wp_update_plugins()
Source code
* } * } * @param array $plugin_data Plugin headers. * @param string $plugin_file Plugin filename. * @param string[] $locales Installed locales to look up translations for. */ $update = apply_filters( "update_plugins_{$hostname}", false, $plugin_data, $plugin_file, $locales ); if ( ! $update ) { continue; } $update = (object) $update;Changelog
Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.