WordPress.org

Make WordPress Core

Ticket #9055: r10506-wphtmlexcerpt-mbstrcut-mbsubstr.diff

File r10506-wphtmlexcerpt-mbstrcut-mbsubstr.diff, 489 bytes (added by demetris, 7 years ago)

Tentatively replaces mb_strcut with mb_substr in wp_html_excerpt

  • wp-includes/formatting.php

     
    22582258 */ 
    22592259function wp_html_excerpt( $str, $count ) { 
    22602260        $str = strip_tags( $str ); 
    2261         $str = mb_strcut( $str, 0, $count ); 
     2261        $str = mb_substr( $str, 0, $count ); 
    22622262        // remove part of an entity at the end 
    22632263        $str = preg_replace( '/&[^;\s]{0,6}$/', '', $str ); 
    22642264        return $str;