mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Add compat for mb_substr rather than mb_strcut. fixes #9055
git-svn-id: http://svn.automattic.com/wordpress/trunk@10707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e3e53f3463
commit
ead9ed7938
@ -77,13 +77,13 @@ function hash_hmac($algo, $data, $key, $raw_output = false) {
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( ! function_exists('mb_strcut') ):
|
||||
function mb_strcut( $str, $start, $length=null, $encoding=null ) {
|
||||
return _mb_strcut($str, $start, $length, $encoding);
|
||||
if ( ! function_exists('mb_substr') ):
|
||||
function mb_substr( $str, $start, $length=null, $encoding=null ) {
|
||||
return _mb_substr($str, $start, $length, $encoding);
|
||||
}
|
||||
endif;
|
||||
|
||||
function _mb_strcut( $str, $start, $length=null, $encoding=null ) {
|
||||
function _mb_substr( $str, $start, $length=null, $encoding=null ) {
|
||||
// the solution below, works only for utf-8, so in case of a different
|
||||
// charset, just use built-in substr
|
||||
$charset = get_option( 'blog_charset' );
|
||||
|
Loading…
Reference in New Issue
Block a user