apply_filters( "update_themes_{$hostname}", array|false $update, array $theme_data, string $theme_stylesheet, string[] $locales )
- Since
- 6.1.0
Filters the update response for a given theme 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 6.1.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 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 theUpdate URIheader 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 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 theme for update purposes, should be a URI specified in theUpdate URIheader field.$themestringDirectory name of the theme.$versionstringThe version of the theme.$urlstringThe URL for details of the theme.$packagestringOptional. The update ZIP for the theme.$testedstringOptional. The version of WordPress the theme is tested against.$requires_phpstringOptional. The version of PHP which the theme requires.$autoupdateboolOptional. Whether the theme should automatically update.$translationsarrayOptional. List of translation updates for the theme.$languagestringThe language the translation update is for.$versionstringThe version of the theme 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.
$theme_dataarray- Theme headers.
$theme_stylesheetstring- Theme stylesheet.
$localesstring[]- Installed locales to look up translations for.
Where this hook fires · 1
wp-includes/update.php:833wp_update_themes()
Source code
* } * } * @param array $theme_data Theme headers. * @param string $theme_stylesheet Theme stylesheet. * @param string[] $locales Installed locales to look up translations for. */ $update = apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales ); if ( ! $update ) { continue; } $update = (object) $update;Changelog
Introduced in 6.1.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 7.1.0 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.