Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#50021 new feature request

Internationalization of excerpt function in "Latest Posts" block

Reported by: tmatsuur's profile tmatsuur Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4
Component: I18N Keywords:
Focuses: Cc:

Description

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.

Change History (1)

#1 @sabernhardt
3 years ago

  • Component changed from Editor to I18N
Note: See TracTickets for help on using tickets.