Make WordPress Core

Ticket #36406: plugins.2.patch

File plugins.2.patch, 1.1 KB (added by mensmaximus, 8 years ago)

Original Patch updated for WP 4.7

  • plugins.

    old new  
    159159                                error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    160160                        }
    161161
     162                        $network_wide = isset( $_REQUEST['network_wide'] ) ? $_REQUEST[ 'network_wide' ] : false;
    162163                        @ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
    163164                        // Go back to "sandbox" scope so we get the same errors as before
    164165                        plugin_sandbox_scrape( $plugin );
    165166                        /** This action is documented in wp-admin/includes/plugin.php */
    166                         do_action( "activate_{$plugin}" );
     167                        do_action( "activate_{$plugin}", $network_wide );
    167168                        exit;
    168169
    169170                case 'deactivate':
     
    451452                                'action'   => 'error_scrape',
    452453                                'plugin'   => urlencode( $plugin ),
    453454                                '_wpnonce' => urlencode( $_GET['_error_nonce'] ),
     455                                'network_wide'  => is_network_admin(),
    454456                        ), admin_url( 'plugins.php' ) );
    455457                ?>
    456458                <iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>