in_plugin_update_message-(file)
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.
Usage
add_action( 'in_plugin_update_message-(file)', 'wp_kama_in_plugin_update_message_file_action', 10, 2 ); /** * Function for `in_plugin_update_message-(file)` action-hook. * * @param array $plugin_data An array of plugin metadata. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values. * @param object $response An object of metadata about the available plugin update. * * @return void */ function wp_kama_in_plugin_update_message_file_action( $plugin_data, $response ){ // action... }
- $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.
-
id(string)
Plugin ID, e.g. w.org/plugins/[plugin-name]. -
slug(string)
Plugin slug. -
plugin(string)
Plugin basename. -
new_version(string)
New plugin version. -
url(string)
Plugin URL. -
package(string)
Plugin update package URL. -
icons(string[])
An array of plugin icon URLs. -
banners(string[])
An array of plugin banner URLs. -
banners_rtl(string[])
An array of plugin RTL banner URLs. -
requires(string)
The version of WordPress which the plugin requires. -
tested(string)
The version of WordPress the plugin is tested against. - requires_php(string)
The version of PHP which the plugin requires.
-
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores