Make WordPress Core

Ticket #20104: 20104.5.diff

File 20104.5.diff, 909 bytes (added by johnjamesjacoby, 8 years ago)

Set default $restrict variable values to prevent notices

  • src/wp-admin/includes/class-wp-plugins-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php
    index 3a51d17..43dcc6e 100644
    a b  
    503503                        'delete' => '',
    504504                );
    505505
     506                // Do not restrict by default
     507                $restrict_network_active = false;
     508                $restrict_network_only = false;
     509
    506510                if ( 'mustuse' === $context ) {
    507511                        $is_active = true;
    508512                } elseif ( 'dropins' === $context ) {
     
    525529                } else {
    526530                        if ( $screen->in_admin( 'network' ) ) {
    527531                                $is_active = is_plugin_active_for_network( $plugin_file );
    528                                 $restrict_network_active = false;
    529                                 $restrict_network_only = false;
    530532                        } else {
    531533                                $is_active = is_plugin_active( $plugin_file );
    532534                                $restrict_network_active = ( is_multisite() && is_plugin_active_for_network( $plugin_file ) );