[wp-trac] [WordPress Trac] #56698: Define 'Word count type' as a WP_Locale property
WordPress Trac
noreply at wordpress.org
Wed Feb 15 23:31:54 UTC 2023
#56698: Define 'Word count type' as a WP_Locale property
-------------------------------------------------+-------------------------
Reporter: pedromendonca | Owner: audrasjb
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.2
Component: I18N | Version: 4.3
Severity: normal | Resolution:
Keywords: has-patch needs-testing-info needs- | Focuses:
testing has-unit-tests |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:18 kraftbj]:
> I have a case where `wp_trim_words` being used in a mu-plugin before
`$wp_locale` is set.
>
> `wp_trim_words` is calling `wp_get_word_count_type` and then directly
calling on `$wp_locale->get_word_count_type`.
Good catch, thanks!
The suggested approach looks good to me. `wp_get_list_item_separator()`
could use a similar change for consistency.
Commit incoming :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56698#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list