akcjadynamicznyod 2.8.0
in_plugin_update_message-{$file}
Args 2Plik wp-admin/includes/update.php
Opis — z kodu źródłowego
Fires at the end of the update message container in each row of the plugins list table.
The dynamic portion of the hook name, $file, refers to the path of the plugin's primary file relative to the plugins directory.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$plugin_data | array | An array of plugin metadata. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values. |
$response | object | { An object of metadata about the available plugin update. @type string $id Plugin ID, e.g. <code>w.org/plugins/[plugin-name]</code>. @type string $slug Plugin slug. @type string $plugin Plugin basename. @type string $new_version New plugin version. @type string $url Plugin URL. @type string $package Plugin update package URL. @type string[] $icons An array of plugin icon URLs. @type string[] $banners An array of plugin banner URLs. @type string[] $banners_rtl An array of plugin RTL banner URLs. @type string $requires The version of WordPress which the plugin requires. @type string $tested The version of WordPress the plugin is tested against. @type string $requires_php The version of PHP which the plugin requires. } |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'in_plugin_update_message-{$file}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'in_plugin_update_message-{$file}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii