Changeset 3856
- Timestamp:
- 06/08/2006 03:21:04 AM (18 years ago)
- Location:
- branches/2.0/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-includes/functions-formatting.php
r3794 r3856 518 518 function zeroise($number,$threshold) { // function to add leading zeros when necessary 519 519 return sprintf('%0'.$threshold.'s', $number); 520 520 } 521 521 522 522 523 523 function backslashit($string) { 524 $string = preg_replace('/^([0-9])/', '\\\\\\\\\1', $string); 524 525 $string = preg_replace('/([a-z])/i', '\\\\\1', $string); 525 526 return $string; -
branches/2.0/wp-includes/functions.php
r3841 r3856 33 33 $dateweekday_abbrev = $weekday_abbrev[$dateweekday]; 34 34 $dateformatstring = ' '.$dateformatstring; 35 $dateformatstring = preg_replace("/([^\\\])D/", "\ ${1}".backslashit($dateweekday_abbrev), $dateformatstring);36 $dateformatstring = preg_replace("/([^\\\])F/", "\ ${1}".backslashit($datemonth), $dateformatstring);37 $dateformatstring = preg_replace("/([^\\\])l/", "\ ${1}".backslashit($dateweekday), $dateformatstring);38 $dateformatstring = preg_replace("/([^\\\])M/", "\ ${1}".backslashit($datemonth_abbrev), $dateformatstring);35 $dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit($dateweekday_abbrev), $dateformatstring); 36 $dateformatstring = preg_replace("/([^\\\])F/", "\\1".backslashit($datemonth), $dateformatstring); 37 $dateformatstring = preg_replace("/([^\\\])l/", "\\1".backslashit($dateweekday), $dateformatstring); 38 $dateformatstring = preg_replace("/([^\\\])M/", "\\1".backslashit($datemonth_abbrev), $dateformatstring); 39 39 40 40 $dateformatstring = substr($dateformatstring, 1, strlen($dateformatstring)-1); … … 72 72 $dateweekday_abbrev = $weekday_abbrev[$dateweekday]; 73 73 $dateformatstring = ' '.$dateformatstring; 74 $dateformatstring = preg_replace("/([^\\\])D/", "\ ${1}".backslashit($dateweekday_abbrev), $dateformatstring);75 $dateformatstring = preg_replace("/([^\\\])F/", "\ ${1}".backslashit($datemonth), $dateformatstring);76 $dateformatstring = preg_replace("/([^\\\])l/", "\ ${1}".backslashit($dateweekday), $dateformatstring);77 $dateformatstring = preg_replace("/([^\\\])M/", "\ ${1}".backslashit($datemonth_abbrev), $dateformatstring);74 $dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit($dateweekday_abbrev), $dateformatstring); 75 $dateformatstring = preg_replace("/([^\\\])F/", "\\1".backslashit($datemonth), $dateformatstring); 76 $dateformatstring = preg_replace("/([^\\\])l/", "\\1".backslashit($dateweekday), $dateformatstring); 77 $dateformatstring = preg_replace("/([^\\\])M/", "\\1".backslashit($datemonth_abbrev), $dateformatstring); 78 78 $dateformatstring = substr($dateformatstring, 1, strlen($dateformatstring)-1); 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.