pre_uninstall_plugin

pre_uninstall_plugin

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('pre_uninstall_plugin') is found 1 times:

  • /wp-admin/includes/plugin.php line 1302
    	 *
    	 * @param string $plugin                Path to the plugin file relative to the plugins directory.
    	 * @param array  $uninstallable_plugins Uninstallable plugins.
    	 */
    	do_action( 'pre_uninstall_plugin', $plugin, $uninstallable_plugins );
    
    	if ( file_exists( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
    		if ( isset( $uninstallable_plugins[ $file ] ) ) {
    			unset( $uninstallable_plugins[ $file ] );
    			update_option( 'uninstall_plugins', $uninstallable_plugins );
    		}