From 6ffc7914f11a8967c99a96a5e266f42e292fb6f0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 16 Dec 2015 08:04:26 +0000 Subject: [PATCH] I18N: Add a unit test for `before_last_bar()`. Props realloc. Fixes #35073. Built from https://develop.svn.wordpress.org/trunk@35959 git-svn-id: http://core.svn.wordpress.org/trunk@35923 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 2a679128e5..53b3ab79a4 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -118,10 +118,11 @@ function translate( $text, $domain = 'default' ) { */ function before_last_bar( $string ) { $last_bar = strrpos( $string, '|' ); - if ( false === $last_bar ) + if ( false === $last_bar ) { return $string; - else + } else { return substr( $string, 0, $last_bar ); + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 2284ac3889..07097f7b23 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35958'; +$wp_version = '4.5-alpha-35959'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.