filtrdynamicznyod 6.1.0
update_themes_{$hostname}
Args 4Plik wp-includes/update.php
Opis — z kodu źródłowego
Filters the update response for a given theme hostname.
The dynamic portion of the hook name, $hostname, refers to the hostname of the URI specified in the Update URI header field.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$update | array | 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 the <code>Update URI</code> 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 <code>YYYY-MM-DD HH:MM:SS</code> format. @type string $package The ZIP location containing the translation update. @type string $autoupdate Whether the translation should be automatically installed. } } |
$theme_data | array | Theme headers. |
$theme_stylesheet | string | Theme stylesheet. |
$locales | string[] | Installed locales to look up translations for. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'update_themes_{$hostname}', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'update_themes_{$hostname}', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii