in_plugin_update_message-(file) хук-событиеWP 2.8.0

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.

Использование

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(массив)
An array of plugin metadata. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values.
$response(объект)

An object of metadata about the available plugin update.

  • id(строка)
    Plugin ID, e.g. w.org/plugins/[plugin-name].

  • slug(строка)
    Plugin slug.

  • plugin(строка)
    Plugin basename.

  • new_version(строка)
    New plugin version.

  • url(строка)
    Plugin URL.

  • package(строка)
    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(строка)
    The version of WordPress which the plugin requires.

  • tested(строка)
    The version of WordPress the plugin is tested against.

  • requires_php(строка)
    The version of PHP which the plugin requires.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

wp_plugin_update_row()
in_plugin_update_message-(file)
wp-admin/includes/update.php 618
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Где используется хук в WordPress

Использование не найдено.