From b0bb179da7f6cc7347a9ef4b4780450422ced237 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 15 Jun 2016 17:45:30 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 497d264a89..f0e91851cb 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index da751dc701..97d4dd908a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.