Changeset 19187
- Timestamp:
- 11/06/2011 06:31:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r19125 r19187 29 29 function wptexturize($text) { 30 30 global $wp_cockneyreplace; 31 static $opening_quote, $closing_quote, $ default_no_texturize_tags, $default_no_texturize_shortcodes, $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements;31 static $opening_quote, $closing_quote, $en_dash, $em_dash, $default_no_texturize_tags, $default_no_texturize_shortcodes, $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements; 32 32 33 33 // No need to set up these static variables more than once … … 37 37 /* translators: closing curly quote */ 38 38 $closing_quote = _x('”', 'closing curly quote'); 39 /* translators: en dash */ 40 $en_dash = _x('–', 'en dash'); 41 /* translators: em dash */ 42 $em_dash = _x('—', 'em dash'); 39 43 40 44 $default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt'); … … 50 54 } 51 55 52 $static_characters = array_merge( array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney);53 $static_replacements = array_merge( array('—', ' — ', '–', ' – ', 'xn--', '…', $opening_quote, $closing_quote, ' ™'), $cockneyreplace);56 $static_characters = array_merge( array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney ); 57 $static_replacements = array_merge( array($em_dash, ' ' . $em_dash . ' ', $en_dash, ' ' . $en_dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™'), $cockneyreplace ); 54 58 55 59 $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/\'(\d)/', '/(\s|\A|[([{<]|")\'/', '/(\d)"/', '/(\d)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/\b(\d+)x(\d+)\b/');
Note: See TracChangeset
for help on using the changeset viewer.