pre_uninstall_plugin хук-событиеWP 4.5.0

Fires in uninstall_plugin() immediately before the plugin is uninstalled.

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

add_action( 'pre_uninstall_plugin', 'wp_kama_pre_uninstall_plugin_action', 10, 2 );

/**
 * Function for `pre_uninstall_plugin` action-hook.
 * 
 * @param string $plugin                Path to the plugin file relative to the plugins directory.
 * @param array  $uninstallable_plugins Uninstallable plugins.
 *
 * @return void
 */
function wp_kama_pre_uninstall_plugin_action( $plugin, $uninstallable_plugins ){

	// action...
}
$plugin(строка)
Path to the plugin file relative to the plugins directory.
$uninstallable_plugins(массив)
Uninstallable plugins.

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

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

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

uninstall_plugin()
pre_uninstall_plugin
wp-admin/includes/plugin.php 1302
do_action( 'pre_uninstall_plugin', $plugin, $uninstallable_plugins );

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

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