[wp-trac] [WordPress Trac] #57987: Introduce new `wp_word_count` function
WordPress Trac
noreply at wordpress.org
Sat Nov 15 01:44:37 UTC 2025
#57987: Introduce new `wp_word_count` function
-------------------------------------------------+-------------------------
Reporter: wildworks | Owner: pbearne
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Editor | Version:
Severity: normal | Resolution: maybelater
Keywords: has-patch has-unit-tests needs- | Focuses:
testing |
-------------------------------------------------+-------------------------
Comment (by dmsnell):
@wildworks when it’s time to re-open this I would encourage updating the
JavaScript library as well, which should also have full access to the ICU
word segmentation through [https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter
Intl.Segmenter].
The value of matching JS and PHP values is obvious, but I think less so
when the counts are wrong. If we add in the tolerance given by the
assumptions about reading speed in the time-to-read block we should have
even more practical flexibility in defining these.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57987#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list