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:
ryan 2009-03-04 22:05:49 +00:00
parent e3e53f3463
commit ead9ed7938

View File

@ -77,13 +77,13 @@ function hash_hmac($algo, $data, $key, $raw_output = false) {
} }
endif; endif;
if ( ! function_exists('mb_strcut') ): if ( ! function_exists('mb_substr') ):
function mb_strcut( $str, $start, $length=null, $encoding=null ) { function mb_substr( $str, $start, $length=null, $encoding=null ) {
return _mb_strcut($str, $start, $length, $encoding); return _mb_substr($str, $start, $length, $encoding);
} }
endif; 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 // the solution below, works only for utf-8, so in case of a different
// charset, just use built-in substr // charset, just use built-in substr
$charset = get_option( 'blog_charset' ); $charset = get_option( 'blog_charset' );