Make WordPress Core

Changeset 36124


Ignore:
Timestamp:
12/30/2015 10:37:49 PM (9 years ago)
Author:
swissspidy
Message:

Plugins: Add a new pre_uninstall_plugin action that runs right before uninstalling a plugin.

Fixes #34569.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r36072 r36124  
    972972
    973973    $uninstallable_plugins = (array) get_option('uninstall_plugins');
     974
     975    /**
     976     * Fires in uninstall_plugin() before the plugin is uninstalled.
     977     *
     978     * @since 4.5.0
     979     *
     980     * @param string $plugin                Relative plugin path from plugin directory.
     981     * @param array  $uninstallable_plugins Uninstallable plugins.
     982     */
     983    do_action( 'pre_uninstall_plugin', $plugin, $uninstallable_plugins );
     984
    974985    if ( file_exists( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' ) ) {
    975986        if ( isset( $uninstallable_plugins[$file] ) ) {
Note: See TracChangeset for help on using the changeset viewer.