Changeset 47219 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 02/09/2020 04:52:28 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r47122 r47219 480 480 481 481 // Malformed HTML? 482 if ( $start === false) {482 if ( false === $start ) { 483 483 $pee .= $pee_part; 484 484 continue; … … 985 985 $_quote_style = $quote_style; 986 986 987 if ( $quote_style === 'double') {987 if ( 'double' === $quote_style ) { 988 988 $quote_style = ENT_COMPAT; 989 989 $_quote_style = ENT_COMPAT; 990 } elseif ( $quote_style === 'single') {990 } elseif ( 'single' === $quote_style ) { 991 991 $quote_style = ENT_NOQUOTES; 992 992 } … … 1081 1081 ); 1082 1082 1083 if ( $quote_style === ENT_QUOTES) {1083 if ( ENT_QUOTES === $quote_style ) { 1084 1084 $translation = array_merge( $single, $double, $others ); 1085 1085 $translation_preg = array_merge( $single_preg, $double_preg, $others_preg ); 1086 } elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double') {1086 } elseif ( ENT_COMPAT === $quote_style || 'double' === $quote_style ) { 1087 1087 $translation = array_merge( $double, $others ); 1088 1088 $translation_preg = array_merge( $double_preg, $others_preg ); 1089 } elseif ( $quote_style === 'single') {1089 } elseif ( 'single' === $quote_style ) { 1090 1090 $translation = array_merge( $single, $others ); 1091 1091 $translation_preg = array_merge( $single_preg, $others_preg ); 1092 } elseif ( $quote_style === ENT_NOQUOTES) {1092 } elseif ( ENT_NOQUOTES === $quote_style ) { 1093 1093 $translation = $others; 1094 1094 $translation_preg = $others_preg; … … 2794 2794 for ( $i = 0, $len = strlen( $email_address ); $i < $len; $i++ ) { 2795 2795 $j = rand( 0, 1 + $hex_encoding ); 2796 if ( $j == 0) {2796 if ( 0 == $j ) { 2797 2797 $email_no_spam_address .= '&#' . ord( $email_address[ $i ] ) . ';'; 2798 } elseif ( $j == 1) {2798 } elseif ( 1 == $j ) { 2799 2799 $email_no_spam_address .= $email_address[ $i ]; 2800 } elseif ( $j == 2) {2800 } elseif ( 2 == $j ) { 2801 2801 $email_no_spam_address .= '%' . zeroise( dechex( ord( $email_address[ $i ] ) ), 2 ); 2802 2802 } … … 2939 2939 } 2940 2940 2941 if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<'&& ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) {2941 if ( $nested_code_pre || empty( $piece ) || ( '<' === $piece[0] && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) { 2942 2942 $r .= $piece; 2943 2943 continue; … … 3553 3553 function iso8601_timezone_to_offset( $timezone ) { 3554 3554 // $timezone is either 'Z' or '[+|-]hhmm'. 3555 if ( $timezone == 'Z') {3555 if ( 'Z' === $timezone ) { 3556 3556 $offset = 0; 3557 3557 } else { … … 4627 4627 case 'default_comment_status': 4628 4628 // Options that if not there have 0 value but need to be something like "closed". 4629 if ( $value == '0' || $value == '') {4629 if ( '0' == $value || '' == $value ) { 4630 4630 $value = 'closed'; 4631 4631 } … … 4973 4973 4974 4974 // Fragment has a specifier. 4975 if ( $pattern[ $start ] == '%') {4975 if ( '%' === $pattern[ $start ] ) { 4976 4976 // Find numbered arguments or take the next one in order. 4977 4977 if ( preg_match( '/^%(\d+)\$/', $fragment, $matches ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)