mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Shears of vigorous pinking.
git-svn-id: https://develop.svn.wordpress.org/trunk@20944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2143,8 +2143,8 @@ function wp_trim_words( $text, $num_words = 55, $more = null ) {
|
||||
$more = __( '…' );
|
||||
$original_text = $text;
|
||||
$text = wp_strip_all_tags( $text );
|
||||
/* translators: If your word count is based on single characters (East Asian characters),
|
||||
enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
|
||||
/* translators: If your word count is based on single characters (East Asian characters),
|
||||
enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
|
||||
if ( 'characters' == _x( 'words', 'word count: words or characters?' ) && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
|
||||
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
|
||||
preg_match_all( '/./u', $text, $words_array );
|
||||
|
||||
Reference in New Issue
Block a user