Ticket #36790: 36790.patch
File 36790.patch, 1000 bytes (added by , 7 years ago) |
---|
-
src/wp-includes/functions.php
182 182 */ 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 } 195 200