Make WordPress Core


Ignore:
Timestamp:
09/22/2015 06:05:39 AM (11 years ago)
Author:
wonderboymusic
Message:

List Tables: when comparing string literals (non-numeric in nature) against vars, strict comparison can/should be used.

Props wonderboymusic, Viper007Bond.
Fixes #21249.

File:
1 edited

Legend:

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

    r34128 r34383  
    258258                        return 0;
    259259
    260                 if ( 'DESC' == $order ) {
     260                if ( 'DESC' === $order ) {
    261261                        return strcasecmp( $b, $a );
    262262                } else {
     
    338338                        }
    339339
    340                         if ( 'search' != $type ) {
     340                        if ( 'search' !== $type ) {
    341341                                $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
    342342                                        add_query_arg('plugin_status', $type, 'plugins.php'),
    343                                         ( $type == $status ) ? ' class="current"' : '',
     343                                        ( $type === $status ) ? ' class="current"' : '',
    344344                                        sprintf( $text, number_format_i18n( $count ) )
    345345                                        );
     
    401401                echo '<div class="alignleft actions">';
    402402
    403                 if ( ! $this->screen->in_admin( 'network' ) && 'recently_activated' == $status )
     403                if ( ! $this->screen->in_admin( 'network' ) && 'recently_activated' === $status ) {
    404404                        submit_button( __( 'Clear List' ), 'button', 'clear-recent-list', false );
    405                 elseif ( 'top' == $which && 'mustuse' == $status )
     405                } elseif ( 'top' === $which && 'mustuse' === $status ) {
    406406                        echo '<p>' . sprintf( __( 'Files in the <code>%s</code> directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '</p>';
    407                 elseif ( 'top' == $which && 'dropins' == $status )
     407                } elseif ( 'top' === $which && 'dropins' === $status ) {
    408408                        echo '<p>' . sprintf( __( 'Drop-ins are advanced plugins in the <code>%s</code> directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '</p>';
    409 
     409                }
    410410                echo '</div>';
    411411        }
     
    459459                );
    460460
    461                 if ( 'mustuse' == $context ) {
     461                if ( 'mustuse' === $context ) {
    462462                        $is_active = true;
    463                 } elseif ( 'dropins' == $context ) {
     463                } elseif ( 'dropins' === $context ) {
    464464                        $dropins = _get_dropins();
    465465                        $plugin_name = $plugin_file;
Note: See TracChangeset for help on using the changeset viewer.