Changeset 27844
- Timestamp:
- 03/29/2014 08:59:38 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r27839 r27844 88 88 89 89 // '99 '99s '99's (apostrophe) 90 if ( "'" != $apos )90 if ( "'" !== $apos ) { 91 91 $dynamic[ '/\'(?=\d)/' ] = $apos; 92 } 92 93 93 94 // Single quote at start, or preceded by (, {, <, [, ", or spaces. 94 if ( "'" != $opening_single_quote )95 if ( "'" !== $opening_single_quote ) { 95 96 $dynamic[ '/(?<=\A|[([{<"]|' . $spaces . ')\'/' ] = $opening_single_quote; 97 } 96 98 97 99 // 9" (double prime) 98 if ( '"' != $double_prime )100 if ( '"' !== $double_prime ) { 99 101 $dynamic[ '/(?<=\d)"/' ] = $double_prime; 102 } 100 103 101 104 // 9' (prime) 102 if ( "'" != $prime )105 if ( "'" !== $prime ) { 103 106 $dynamic[ '/(?<=\d)\'/' ] = $prime; 107 } 104 108 105 109 // Apostrophe in a word. No spaces or double primes. 106 if ( "'" != $apos )110 if ( "'" !== $apos ) { 107 111 $dynamic[ '/(?<!' . $spaces . ')\'(?!\'|' . $spaces . ')/' ] = $apos; 112 } 108 113 109 114 // Double quote at start, or preceded by (, {, <, [, or spaces, and not followed by spaces. 110 if ( '"' != $opening_quote )115 if ( '"' !== $opening_quote ) { 111 116 $dynamic[ '/(?<=\A|[([{<]|' . $spaces . ')"(?!' . $spaces . ')/' ] = $opening_quote; 117 } 112 118 113 119 // Any remaining double quotes. 114 if ( '"' != $closing_quote )120 if ( '"' !== $closing_quote ) { 115 121 $dynamic[ '/"/' ] = $closing_quote; 122 } 116 123 117 124 // Single quotes followed by spaces or a period. 118 if ( "'" != $closing_single_quote ) 119 $dynamic[ '/\'(?=\Z|\.|' . $spaces . ')/' ] = $closing_single_quote; 125 if ( "'" !== $closing_single_quote ) { 126 $dynamic[ '/\'(?=\Z|\.|' . $spaces . ')/' ] = $closing_single_quote; 127 } 120 128 121 129 $dynamic_characters = array_keys( $dynamic ); … … 148 156 149 157 foreach ( $textarr as &$curl ) { 150 if ( empty( $curl ) ) 158 if ( empty( $curl ) ) { 151 159 continue; 160 } 152 161 153 162 // Only call _wptexturize_pushpop_element if first char is correct tag opening … … 213 222 214 223 // Make sure it matches the opening tag 215 if ($last != $matches[1]) 216 array_push($stack, $last); 224 if ( $last != $matches[1] ) { 225 array_push( $stack, $last ); 226 } 217 227 } 218 228 }
Note: See TracChangeset
for help on using the changeset viewer.