mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Plugins: Introduce the delete_plugin
transactional hook, which fires immediately after a plugin deletion attempt occurs.
Props Veraxus for the initial patch. Fixes #26904. Built from https://develop.svn.wordpress.org/trunk@35094 git-svn-id: http://core.svn.wordpress.org/trunk@35059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad6a1303dc
commit
bcc7f8d079
@ -824,6 +824,16 @@ function delete_plugins( $plugins, $deprecated = '' ) {
|
||||
$deleted = $wp_filesystem->delete( $plugins_dir . $plugin_file );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires immediately after a plugin deletion attempt.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string $plugin_file Plugin file name.
|
||||
* @param bool $deleted Whether the plugin deletion was successful.
|
||||
*/
|
||||
do_action( 'delete_plugin', $plugin_file, $deleted );
|
||||
|
||||
if ( ! $deleted ) {
|
||||
$errors[] = $plugin_file;
|
||||
continue;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-35093';
|
||||
$wp_version = '4.4-alpha-35094';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user