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.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-05-16 18:42:12 +00:00
parent 3083369e6c
commit 37db988ca7
2 changed files with 5 additions and 5 deletions

View File

@ -158,11 +158,11 @@ function twentytwelve_get_font_url() {
*/
$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );
if ( 'cyrillic' == $subset ) {
if ( 'cyrillic' === $subset ) {
$subsets .= ',cyrillic,cyrillic-ext';
} elseif ( 'greek' == $subset ) {
} elseif ( 'greek' === $subset ) {
$subsets .= ',greek,greek-ext';
} elseif ( 'vietnamese' == $subset ) {
} elseif ( 'vietnamese' === $subset ) {
$subsets .= ',vietnamese';
}

View File

@ -41,9 +41,9 @@
value.bind( function( to ) {
var body = $( 'body' );
if ( ( '#ffffff' == to || '#fff' == to ) && 'none' == body.css( 'background-image' ) )
if ( ( '#ffffff' === to || '#fff' === to ) && 'none' === body.css( 'background-image' ) )
body.addClass( 'custom-background-white' );
else if ( '' == to && 'none' == body.css( 'background-image' ) )
else if ( '' === to && 'none' === body.css( 'background-image' ) )
body.addClass( 'custom-background-empty' );
else
body.removeClass( 'custom-background-empty custom-background-white' );