Make WordPress Core


Ignore:
Timestamp:
08/05/2021 03:29:53 AM (4 years ago)
Author:
peterwilsoncc
Message:

Coding Standards: Use strict comparisons in wp-admin/options-discussion.php.

See #53359.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-discussion.php

    r51475 r51548  
    110110for ( $i = 2; $i <= $maxdeep; $i++ ) {
    111111    $thread_comments_depth .= "<option value='" . esc_attr( $i ) . "'";
    112     if ( get_option( 'thread_comments_depth' ) == $i ) {
     112    if ( (int) get_option( 'thread_comments_depth' ) === $i ) {
    113113        $thread_comments_depth .= " selected='selected'";
    114114    }
     
    257257);
    258258foreach ( $ratings as $key => $rating ) :
    259     $selected = ( get_option( 'avatar_rating' ) == $key ) ? 'checked="checked"' : '';
     259    $selected = ( get_option( 'avatar_rating' ) === $key ) ? 'checked="checked"' : '';
    260260    echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr( $key ) . "' $selected/> $rating</label><br />";
    261261endforeach;
     
    300300
    301301foreach ( $avatar_defaults as $default_key => $default_name ) {
    302     $selected     = ( $default == $default_key ) ? 'checked="checked" ' : '';
     302    $selected     = ( $default === $default_key ) ? 'checked="checked" ' : '';
    303303    $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr( $default_key ) . "' {$selected}/> ";
    304304    $avatar_list .= get_avatar( $user_email, 32, $default_key, '', array( 'force_default' => true ) );
Note: See TracChangeset for help on using the changeset viewer.