I18N: Adjust the regex in wp_maybe_decline_date() to handle word boundaries correctly.

Props semil.
Fixes #36790.
Built from https://develop.svn.wordpress.org/trunk@37717


git-svn-id: http://core.svn.wordpress.org/trunk@37683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2016-06-15 17:45:30 +00:00
parent 3c6265bcca
commit b0bb179da7
2 changed files with 2 additions and 2 deletions

View File

@@ -186,7 +186,7 @@ function wp_maybe_decline_date( $date ) {
$months = $wp_locale->month;
foreach ( $months as $key => $month ) {
$months[ $key ] = '#' . $month . '#';
$months[ $key ] = '#\b' . $month . '\b#u';
}
$date = preg_replace( $months, $wp_locale->month_genitive, $date );

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37716';
$wp_version = '4.6-alpha-37717';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.