228 | | switch ( $quote_style ) { |
229 | | case ENT_QUOTES: |
230 | | default: |
231 | | $quote_style = ENT_QUOTES; |
232 | | $_quote_style = ENT_QUOTES; |
233 | | break; |
234 | | case ENT_COMPAT: |
235 | | case 'double': |
236 | | $quote_style = ENT_COMPAT; |
237 | | $_quote_style = ENT_COMPAT; |
238 | | break; |
239 | | case 'single': |
240 | | $quote_style = ENT_NOQUOTES; |
241 | | $_quote_style = 'single'; |
242 | | break; |
243 | | case ENT_NOQUOTES: |
244 | | case false: |
245 | | case 0: |
246 | | case '': |
247 | | case null: |
248 | | $quote_style = ENT_NOQUOTES; |
249 | | $_quote_style = ENT_NOQUOTES; |
250 | | break; |
| 235 | $_quote_style = $quote_style; |
| 236 | |
| 237 | if ( $quote_style === 'double' ) { |
| 238 | $quote_style = ENT_COMPAT; |
| 239 | $_quote_style = ENT_COMPAT; |
| 240 | } elseif ( $quote_style === 'single' ) { |
| 241 | $quote_style = ENT_NOQUOTES; |
309 | | switch ( $quote_style ) { |
310 | | case ENT_QUOTES: |
311 | | default: |
312 | | $translation = array_merge( $single, $double, $others ); |
313 | | $translation_preg = array_merge( $single_preg, $double_preg, $others_preg ); |
314 | | break; |
315 | | case ENT_COMPAT: |
316 | | case 'double': |
317 | | $translation = array_merge( $double, $others ); |
318 | | $translation_preg = array_merge( $double_preg, $others_preg ); |
319 | | break; |
320 | | case 'single': |
321 | | $translation = array_merge( $single, $others ); |
322 | | $translation_preg = array_merge( $single_preg, $others_preg ); |
323 | | break; |
324 | | case ENT_NOQUOTES: |
325 | | case false: |
326 | | case 0: |
327 | | case '': |
328 | | case null: |
329 | | $translation = $others; |
330 | | $translation_preg = $others_preg; |
331 | | break; |
| 307 | if ( $quote_style === ENT_QUOTES ) { |
| 308 | $translation = array_merge( $single, $double, $others ); |
| 309 | $translation_preg = array_merge( $single_preg, $double_preg, $others_preg ); |
| 310 | } elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) { |
| 311 | $translation = array_merge( $double, $others ); |
| 312 | $translation_preg = array_merge( $double_preg, $others_preg ); |
| 313 | } elseif ( $quote_style === 'single' ) { |
| 314 | $translation = array_merge( $single, $others ); |
| 315 | $translation_preg = array_merge( $single_preg, $others_preg ); |
| 316 | } elseif ( $quote_style === ENT_NOQUOTES ) { |
| 317 | $translation = $others; |
| 318 | $translation_preg = $others_preg; |