]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/compat.php
Wordpress 2.8-scripts
[autoinstalls/wordpress.git] / wp-includes / compat.php
index 47e6c8ba7cc57d93fe3fa6ecfed4707b0c7dcebf..0043865000503fe8465d007c325a427ac3e1094d 100644 (file)
@@ -77,13 +77,13 @@ function hash_hmac($algo, $data, $key, $raw_output = false) {
 }
 endif;
 
 }
 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;
 
        }
 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' );
        // 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' );
@@ -99,7 +99,7 @@ function _mb_strcut( $str, $start, $length=null, $encoding=null ) {
 if ( !function_exists( 'htmlspecialchars_decode' ) ) {
        // Added in PHP 5.1.0
        // Error checks from PEAR::PHP_Compat
 if ( !function_exists( 'htmlspecialchars_decode' ) ) {
        // Added in PHP 5.1.0
        // Error checks from PEAR::PHP_Compat
-       function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT )
+       function htmlspecialchars_decode( $string, $quote_style = ENT_COMPAT )
        {
                if ( !is_scalar( $string ) ) {
                        trigger_error( 'htmlspecialchars_decode() expects parameter 1 to be string, ' . gettype( $string ) . ' given', E_USER_WARNING );
        {
                if ( !is_scalar( $string ) ) {
                        trigger_error( 'htmlspecialchars_decode() expects parameter 1 to be string, ' . gettype( $string ) . ' given', E_USER_WARNING );
@@ -111,7 +111,7 @@ if ( !function_exists( 'htmlspecialchars_decode' ) ) {
                        return;
                }
 
                        return;
                }
 
-               return wp_specialchars_decode( $str, $quote_style );
+               return wp_specialchars_decode( $string, $quote_style );
        }
 }
 
        }
 }