Changeset 45555 for trunk/src/wp-includes/functions.php
- Timestamp:
- 06/20/2019 01:46:20 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r45473 r45555 220 220 */ 221 221 if ( 'on' === _x( 'off', 'decline months names: on or off' ) ) { 222 223 $months = $wp_locale->month; 224 $months_genitive = $wp_locale->month_genitive; 225 222 226 // Match a format like 'j F Y' or 'j. F' 223 227 if ( @preg_match( '#^\d{1,2}\.? [^\d ]+#u', $date ) ) { 224 $months = $wp_locale->month;225 $months_genitive = $wp_locale->month_genitive;226 228 227 229 foreach ( $months as $key => $month ) { … … 231 233 foreach ( $months_genitive as $key => $month ) { 232 234 $months_genitive[ $key ] = ' ' . $month . '$1'; 235 } 236 237 $date = preg_replace( $months, $months_genitive, $date ); 238 } 239 240 // Match a format like 'F jS' or 'F j' and change it to 'j F' 241 if ( @preg_match( '#^[^\d ]+ \d{1,2}(st|nd|rd|th)? #u', trim( $date ) ) ) { 242 foreach ( $months as $key => $month ) { 243 $months[ $key ] = '#' . $month . ' (\d{1,2})(st|nd|rd|th)?#u'; 244 } 245 246 foreach ( $months_genitive as $key => $month ) { 247 $months_genitive[ $key ] = '$1 ' . $month; 233 248 } 234 249
Note: See TracChangeset
for help on using the changeset viewer.