pre_uninstall_plugin
Fires in uninstall_plugin() immediately before the plugin is uninstalled.
Usage
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(string)
- Path to the plugin file relative to the plugins directory.
- $uninstallable_plugins(array)
- Uninstallable plugins.
Changelog
Since 4.5.0 | Introduced. |
Where the hook is called
pre_uninstall_plugin
wp-admin/includes/plugin.php 1302
do_action( 'pre_uninstall_plugin', $plugin, $uninstallable_plugins );