WordPress.org

Make WordPress Core

Changeset 35094


Ignore:
Timestamp:
10/13/2015 12:56:32 AM (6 years ago)
Author:
DrewAPicture
Message:

Plugins: Introduce the delete_plugin transactional hook, which fires immediately after a plugin deletion attempt occurs.

Props Veraxus for the initial patch.
Fixes #26904.

File:
1 edited

Legend:

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

    r34912 r35094  
    825825        }
    826826
     827        /**
     828         * Fires immediately after a plugin deletion attempt.
     829         *
     830         * @since 4.4.0
     831         *
     832         * @param string $plugin_file Plugin file name.
     833         * @param bool   $deleted     Whether the plugin deletion was successful.
     834         */
     835        do_action( 'delete_plugin', $plugin_file, $deleted );
     836
    827837        if ( ! $deleted ) {
    828838            $errors[] = $plugin_file;
Note: See TracChangeset for help on using the changeset viewer.