WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r47588 r47808  
    518518        $actions = array();
    519519
    520         if ( 'active' != $status ) {
     520        if ( 'active' !== $status ) {
    521521            $actions['activate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Activate' ) : __( 'Activate' );
    522522        }
    523523
    524         if ( 'inactive' != $status && 'recent' != $status ) {
     524        if ( 'inactive' !== $status && 'recent' !== $status ) {
    525525            $actions['deactivate-selected'] = $this->screen->in_admin( 'network' ) ? __( 'Network Deactivate' ) : __( 'Deactivate' );
    526526        }
     
    531531            }
    532532
    533             if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) {
     533            if ( current_user_can( 'delete_plugins' ) && ( 'active' !== $status ) ) {
    534534                $actions['delete-selected'] = __( 'Delete' );
    535535            }
     
    566566        echo '<div class="alignleft actions">';
    567567
    568         if ( 'recently_activated' == $status ) {
     568        if ( 'recently_activated' === $status ) {
    569569            submit_button( __( 'Clear List' ), '', 'clear-recent-list', false );
    570570        } elseif ( 'top' === $which && 'mustuse' === $status ) {
     
    859859            );
    860860        }
    861         if ( 'dropins' != $context ) {
     861        if ( 'dropins' !== $context ) {
    862862            $description = '<p>' . ( $plugin_data['Description'] ? $plugin_data['Description'] : '&nbsp;' ) . '</p>';
    863863            $plugin_name = $plugin_data['Name'];
Note: See TracChangeset for help on using the changeset viewer.