Action
in_plugin_update_message-{$file}
On this page
Fires inside the update notice row of an extension on the Plugins screen.
Runs in RestroPress_Addon_Updater::show_update_notification() when an update is available and the user can manage plugins, after the update message is printed, before the row is closed. The dynamic part is the plugin file path of the extension, for example my-addon/my-addon.php. Both arguments are the plugin data array of the extension.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$plugin | array | Plugin data array of the extension. |
$plugin | array | Same plugin data array, passed a second time. |
Example#
function my_addon_update_message( $plugin, $plugin_again ) {
echo ' ' . esc_html__( 'Back up your site before updating.', 'my-textdomain' );
}
add_action( 'in_plugin_update_message-my-addon/my-addon.php', 'my_addon_update_message', 10, 2 );
Notes#
This is the same hook name that WordPress core fires for plugin update rows; here it is fired from the updater with the plugin data passed twice.
Source#
Fired from:
includes/class-rpress-addon-updater.php(line 204), inRestroPress_Addon_Updater::show_update_notification()
Was this page helpful?
