Make WordPress Core

Ticket #26904: 26904.3.diff

File 26904.3.diff, 1.1 KB (added by johnjamesjacoby, 10 years ago)

Same as 2.patch, but with corrected filter documentation

  • src/wp-admin/includes/plugin.php

    diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
    index f2b2a9a..d132ac1 100644
    a b  
    816816                        uninstall_plugin($plugin_file);
    817817                }
    818818
     819                /**
     820                 * Fires immediately before a plugin deletion attempt.
     821                 *
     822                 * @since 4.4.0
     823                 *
     824                 * @param string $plugin_file Plugin file name.
     825                 */
     826                do_action( 'delete_plugin', $plugin_file );
     827
    819828                $this_plugin_dir = trailingslashit( dirname( $plugins_dir . $plugin_file ) );
    820829                // If plugin is in its own directory, recursively delete the directory.
    821830                if ( strpos( $plugin_file, '/' ) && $this_plugin_dir != $plugins_dir ) { //base check on if plugin includes directory separator AND that it's not the root plugin folder
     
    832841                 * @param string $plugin_file Plugin file name.
    833842                 * @param bool   $deleted     Whether the plugin deletion was successful.
    834843                 */
    835                 do_action( 'delete_plugin', $plugin_file, $deleted );
     844                do_action( 'deleted_plugin', $plugin_file, $deleted );
    836845
    837846                if ( ! $deleted ) {
    838847                        $errors[] = $plugin_file;