Make WordPress Core


Ignore:
Timestamp:
09/22/2015 06:05:39 AM (10 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-plugin-install-list-table.php

    r32656 r34383  
    7878        $tabs = array();
    7979
    80         if ( 'search' == $tab )
     80        if ( 'search' === $tab ) {
    8181            $tabs['search'] = __( 'Search Results' );
     82        }
    8283        $tabs['featured']  = _x( 'Featured', 'Plugin Installer' );
    8384        $tabs['popular']   = _x( 'Popular', 'Plugin Installer' );
     
    239240        $display_tabs = array();
    240241        foreach ( (array) $tabs as $action => $text ) {
    241             $class = ( $action == $tab ) ? ' current' : '';
     242            $class = ( $action === $tab ) ? ' current' : '';
    242243            $href = self_admin_url('plugin-install.php?tab=' . $action);
    243244            $display_tabs['plugin-install-'.$action] = "<a href='$href' class='$class'>$text</a>";
     
    311312        }
    312313
    313         if ( 'top' ==  $which ) {
     314        if ( 'top' === $which ) {
    314315            wp_referer_field();
    315316        ?>
     
    368369        }
    369370
    370         if ( 'DESC' == $this->order ) {
     371        if ( 'DESC' === $this->order ) {
    371372            return ( $a < $b ) ? 1 : -1;
    372373        } else {
Note: See TracChangeset for help on using the changeset viewer.