Changeset 47808 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r47617 r47808 330 330 // Get the site domain and get rid of www. 331 331 $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 332 if ( substr( $sitename, 0, 4 ) == 'www.') {332 if ( 'www.' === substr( $sitename, 0, 4 ) ) { 333 333 $sitename = substr( $sitename, 4 ); 334 334 } … … 433 433 434 434 // Set whether it's plaintext, depending on $content_type. 435 if ( 'text/html' == $content_type ) {435 if ( 'text/html' === $content_type ) { 436 436 $phpmailer->isHTML( true ); 437 437 } … … 634 634 635 635 // Allow a grace period for POST and Ajax requests. 636 if ( wp_doing_ajax() || 'POST' == $_SERVER['REQUEST_METHOD'] ) {636 if ( wp_doing_ajax() || 'POST' === $_SERVER['REQUEST_METHOD'] ) { 637 637 $expired += HOUR_IN_SECONDS; 638 638 } … … 1267 1267 $location = wp_sanitize_redirect( $location ); 1268 1268 1269 if ( ! $is_IIS && PHP_SAPI != 'cgi-fcgi') {1269 if ( ! $is_IIS && 'cgi-fcgi' !== PHP_SAPI ) { 1270 1270 status_header( $status ); // This causes problems on IIS and some FastCGI setups. 1271 1271 } … … 1415 1415 $location = trim( $location, " \t\n\r\0\x08\x0B" ); 1416 1416 // Browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'. 1417 if ( substr( $location, 0, 2 ) == '//') {1417 if ( '//' === substr( $location, 0, 2 ) ) { 1418 1418 $location = 'http:' . $location; 1419 1419 } … … 1432 1432 1433 1433 // Allow only 'http' and 'https' schemes. No 'data:', etc. 1434 if ( isset( $lp['scheme'] ) && ! ( 'http' == $lp['scheme'] || 'https'== $lp['scheme'] ) ) {1434 if ( isset( $lp['scheme'] ) && ! ( 'http' === $lp['scheme'] || 'https' === $lp['scheme'] ) ) { 1435 1435 return $default; 1436 1436 } … … 1647 1647 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', strtolower( $_SERVER['SERVER_NAME'] ) ); 1648 1648 1649 if ( '' == $comment->comment_author ) {1649 if ( '' === $comment->comment_author ) { 1650 1650 $from = "From: \"$blogname\" <$wp_email>"; 1651 if ( '' != $comment->comment_author_email ) {1651 if ( '' !== $comment->comment_author_email ) { 1652 1652 $reply_to = "Reply-To: $comment->comment_author_email"; 1653 1653 } 1654 1654 } else { 1655 1655 $from = "From: \"$comment->comment_author\" <$wp_email>"; 1656 if ( '' != $comment->comment_author_email ) {1656 if ( '' !== $comment->comment_author_email ) { 1657 1657 $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>"; 1658 1658 } … … 2272 2272 $values['key'] = SECRET_KEY; 2273 2273 } 2274 if ( 'auth' == $scheme && defined( 'SECRET_SALT' ) && SECRET_SALT && empty( $duplicated_keys[ SECRET_SALT ] ) ) {2274 if ( 'auth' === $scheme && defined( 'SECRET_SALT' ) && SECRET_SALT && empty( $duplicated_keys[ SECRET_SALT ] ) ) { 2275 2275 $values['salt'] = SECRET_SALT; 2276 2276 }
Note: See TracChangeset
for help on using the changeset viewer.