mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
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
This commit is contained in:
parent
f9f77d86d8
commit
6ffc7914f1
@ -118,10 +118,11 @@ function translate( $text, $domain = 'default' ) {
|
|||||||
*/
|
*/
|
||||||
function before_last_bar( $string ) {
|
function before_last_bar( $string ) {
|
||||||
$last_bar = strrpos( $string, '|' );
|
$last_bar = strrpos( $string, '|' );
|
||||||
if ( false === $last_bar )
|
if ( false === $last_bar ) {
|
||||||
return $string;
|
return $string;
|
||||||
else
|
} else {
|
||||||
return substr( $string, 0, $last_bar );
|
return substr( $string, 0, $last_bar );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user