Ticket #1032: 1032.diff
File 1032.diff, 2.0 KB (added by , 18 years ago) |
---|
-
wp-includes/formatting.php
1 1 <?php 2 2 3 3 function wptexturize($text) { 4 global $wpautocorrect; 4 5 $output = ''; 5 6 // Capture tags and everything inside them 6 7 $textarr = preg_split("/(<.*>)/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE); … … 16 17 $curl = str_replace('...', '…', $curl); 17 18 $curl = str_replace('``', '“', $curl); 18 19 19 // This is a hack, look at this more later. It works pretty well though. 20 $cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause"); 21 $cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause"); 22 $curl = str_replace($cockney, $cockneyreplace, $curl); 20 // Replacement for cockneyreplace 21 // Array now set in wp-config.php or wp-includes/vars.php 22 $curl = str_replace(array_keys($wpautocorrect), array_values($wpautocorrect), $curl); 23 23 24 24 $curl = preg_replace("/'s/", '’s', $curl); 25 25 $curl = preg_replace("/'(\d\d(?:’|')?s)/", "’$1", $curl); -
wp-includes/vars.php
92 92 $wp_smiliesreplace[] = " <img src='" . get_option('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> "; 93 93 } 94 94 95 // if the config file does not provide the autocorrect array, let's define it here 96 if (!isset($wpautocorrect)) { 97 $wpautocorrect = array( 98 "'tain't" => '’tain’t', 99 "'twere" => '’twere', 100 "'twas" => '’twas', 101 "'tis" => '’tis', 102 "'twill" => '’twill', 103 "'til" => '’til', 104 "'bout" => '’bout', 105 "'nuff" => '’nuff', 106 "'round" => '’round', 107 "'cause" => '’cause', 108 ); 109 } 110 95 111 ?>