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; |
| 31 | static $opening_quote, $closing_quote, $opening_single_quote, $closing_single_quote, $en_dash, $em_dash, |
| 32 | $apos, $prime, $double_prime, $default_no_texturize_tags, $default_no_texturize_shortcodes, |
| 33 | $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements; |
35 | | /* translators: opening curly quote */ |
36 | | $opening_quote = _x('“', 'opening curly quote'); |
37 | | /* translators: closing curly quote */ |
38 | | $closing_quote = _x('”', 'closing curly quote'); |
| 37 | /* translators: opening curly double quote */ |
| 38 | $opening_quote = _x( '“', 'opening curly double quote' ); |
| 39 | /* translators: closing curly double quote */ |
| 40 | $closing_quote = _x( '”', 'closing curly double quote' ); |
| 41 | |
| 42 | /* translators: apostrophe, for example in 'cause or can't */ |
| 43 | $apos = _x( '’', 'apostrophe' ); |
| 44 | |
| 45 | /* translators: prime, for example in 9' (nine feet) */ |
| 46 | $prime = _x( '′', 'prime' ); |
| 47 | /* translators: double prime, for example in 9" (nine inches) */ |
| 48 | $double_prime = _x( '″', 'double prime' ); |
| 49 | |
| 50 | /* translators: opening curly single quote */ |
| 51 | $opening_single_quote = _x( '‘', 'opening curly single quote' ); |
| 52 | /* translators: closing curly single quote */ |
| 53 | $closing_single_quote = _x( '’', 'closing curly single quote' ); |
| 54 | |
52 | | $cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause"); |
53 | | $cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause"); |
| 68 | $cockney = array( "'tain't", "'twere", "'twas", "'tis", "'twill", "'til", "'bout", "'nuff", "'round", "'cause" ); |
| 69 | $cockneyreplace = array( $apos . "tain" . $apos . "t", $apos . "twere", $apos . "twas", $apos . "tis", $apos . "twill", $apos . "til", $apos . "bout", $apos . "nuff", $apos . "round", $apos . "cause" ); |
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 ); |
| 72 | $static_characters = array_merge( array( '---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)' ), $cockney ); |
| 73 | $static_replacements = array_merge( array( $em_dash, ' ' . $em_dash . ' ', $en_dash, ' ' . $en_dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace ); |
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/'); |
60 | | $dynamic_replacements = array('’$1','’$1', '$1‘', '$1″', '$1′', '$1’$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '’$1', '$1×$2'); |
| 75 | $dynamic_characters = array( |
| 76 | '/\'(\d\d(?:’|\')?s)/', // '99's |
| 77 | '/\'(\d)/', // '99 (year) |
| 78 | '/(\s|\A|[([{<]|")\'/', // opening single quote, even after (, {, <, [, etc. |
| 79 | '/(\d)"/', // 9" (double prime) |
| 80 | '/(\d)\'/', // 9' (prime) |
| 81 | '/(\S)\'([^\'\s])/', // Matt's (apos) |
| 82 | '/(\s|\A|[([{<])"(?!\s)/', // opening double quote, even after (, {, <, [, etc. |
| 83 | '/"(\s|\S|\Z)/', // closing double quote |
| 84 | '/\'([\s.]|\Z)/', // closing single quote |
| 85 | '/\b(\d+)x(\d+)\b/' // 9 x 9 (times) |
| 86 | ); |
| 87 | |
| 88 | $dynamic_replacements = array( $apos . '$1', $apos . '$1', '$1' . $opening_single_quote, '$1' . $double_prime, '$1' . $prime, |
| 89 | '$1' . $apos . '$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', $closing_single_quote . '$1', '$1×$2' ); |