WordPress.org

Make WordPress Core

Ticket #4539: abbreviated_year_patch.diff

File abbreviated_year_patch.diff, 1.7 KB (added by jmstacey, 7 years ago)
  • wp-includes/formatting.php

     
    1717                $cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause"); 
    1818        } 
    1919 
    20         $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 
    21         $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace); 
     20        $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney); 
     21        $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '”', ' ™'), $cockneyreplace); 
    2222 
    23         $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 
    24         $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2'); 
     23        $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/\'(\d+)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 
     24        $dynamic_replacements = array('’$1', '’$1', '$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2'); 
    2525 
    2626        for ( $i = 0; $i < $stop; $i++ ) { 
    2727                $curl = $textarr[$i];