[wp-trac] [WordPress Trac] #50021: Internationalization of excerpt function in "Latest Posts" block
WordPress Trac
noreply at wordpress.org
Tue Apr 28 07:02:29 UTC 2020
#50021: Internationalization of excerpt function in "Latest Posts" block
-----------------------------+-----------------------------
Reporter: tmatsuur | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.4
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
In "Latest Posts" block, when extracting excerpts from posted articles,
they are always separated by the specified number of words.
The Japanese text is not space-separated, so the excerpt displayed by
the "Latest posts" block is not shortened.
The wp_trim_words function is used to extract excerpts from "post".
This function determines whether to cut off by the number of words or
the number of characters by the following conditions.
{{{
if ( strpos( _x( 'words', 'Word count type. Do not translate!' ),
'characters' ) === 0 &&
preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
}}}
I think it is desirable to be able to extract the "latest posts" block
excerpt under the same conditions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50021>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list