Changeset 37979
- Timestamp:
- 07/05/2016 09:42:06 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r37962 r37979 183 183 if ( 'on' === _x( 'off', 'decline months names: on or off' ) ) { 184 184 // Match a format like 'j F Y' or 'j. F' 185 if ( @preg_match( '#^\d{1,2}\.? \w+#u', $date ) ) { 186 $months = $wp_locale->month; 185 if ( @preg_match( '#^\d{1,2}\.? [^\d ]+#u', $date ) ) { 186 $months = $wp_locale->month; 187 $months_genitive = $wp_locale->month_genitive; 187 188 188 189 foreach ( $months as $key => $month ) { 189 $months[ $key ] = '# \b' . $month . '\b#u';190 $months[ $key ] = '# ' . $month . '( |$)#u'; 190 191 } 191 192 192 $date = preg_replace( $months, $wp_locale->month_genitive, $date ); 193 foreach ( $months_genitive as $key => $month ) { 194 $months_genitive[ $key ] = ' ' . $month . '$1'; 195 } 196 197 $date = preg_replace( $months, $months_genitive, $date ); 193 198 } 194 199 }
Note: See TracChangeset
for help on using the changeset viewer.