Changeset 11504
- Timestamp:
- 06/02/2009 12:27:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r11490 r11504 33 33 $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); 34 34 $stop = count($textarr); 35 36 /* translators: opening curly quote */ 37 $opening_quote = _x('“', 'opening curly quote'); 38 /* translators: closing curly quote */ 39 $closing_quote = _x('”', 'closing curly quote'); 40 35 41 $no_texturize_tags = apply_filters('no_texturize_tags', array('pre', 'code', 'kbd', 'style', 'script', 'tt')); 36 42 $no_texturize_shortcodes = apply_filters('no_texturize_shortcodes', array('code')); … … 48 54 49 55 $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 50 $static_replacements = array_merge(array('—', ' — ', '–', ' – ', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace);56 $static_replacements = array_merge(array('—', ' — ', '–', ' – ', 'xn--', '…', $opening_quote, '’s', $closing_quote, ' ™'), $cockneyreplace); 51 57 52 58 $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 53 $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1 “$2', '”$1', '’$1', '$1×$2');59 $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '’$1', '$1×$2'); 54 60 55 61 for ( $i = 0; $i < $stop; $i++ ) {
Note: See TracChangeset
for help on using the changeset viewer.