Make WordPress Core


Ignore:
Timestamp:
07/01/2019 12:50:14 PM (6 years ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.

See #47632.

File:
1 edited

Legend:

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

    r45546 r45583  
    153153    // Translate fields
    154154    if ( $translate ) {
    155         if ( $textdomain = $plugin_data['TextDomain'] ) {
     155        $textdomain = $plugin_data['TextDomain'];
     156        if ( $textdomain ) {
    156157            if ( ! is_textdomain_loaded( $textdomain ) ) {
    157158                if ( $plugin_data['DomainPath'] ) {
     
    365366        return $wp_plugins;
    366367    }
    367     if ( $plugins_dir = @ opendir( WPMU_PLUGIN_DIR ) ) {
     368    $plugins_dir = @opendir( WPMU_PLUGIN_DIR );
     369    if ( $plugins_dir ) {
    368370        while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
    369371            if ( substr( $file, -4 ) == '.php' ) {
     
    432434
    433435    // These exist in the wp-content directory
    434     if ( $plugins_dir = @ opendir( WP_CONTENT_DIR ) ) {
     436    $plugins_dir = @opendir( WP_CONTENT_DIR );
     437    if ( $plugins_dir ) {
    435438        while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
    436439            if ( isset( $_dropins[ $file ] ) ) {
     
    734737        $network_current = get_site_option( 'active_sitewide_plugins', array() );
    735738    }
    736     $current = get_option( 'active_plugins', array() );
    737     $do_blog = $do_network = false;
     739    $current    = get_option( 'active_plugins', array() );
     740    $do_blog    = false;
     741    $do_network = false;
    738742
    739743    foreach ( (array) $plugins as $plugin ) {
     
    993997
    994998    // Remove deleted plugins from the plugin updates list.
    995     if ( $current = get_site_transient( 'update_plugins' ) ) {
     999    $current = get_site_transient( 'update_plugins' );
     1000    if ( $current ) {
    9961001        // Don't remove the plugins that weren't deleted.
    9971002        $deleted = array_diff( $plugins, $errors );
     
    18201825    $hook = get_plugin_page_hook( $plugin_page, $pagenow );
    18211826
    1822     $parent = $parent1 = get_admin_page_parent();
     1827    $parent  = get_admin_page_parent();
     1828    $parent1 = $parent;
    18231829
    18241830    if ( empty( $parent ) ) {
Note: See TracChangeset for help on using the changeset viewer.