#31766 closed defect (bug) (fixed)
'word-count' always enqueued, even when not needed
| Reported by: | johnjamesjacoby | Owned by: | iseulde |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch 2nd-opinion |
| Cc: | Focuses: |
Description
When tinymce is false (and subsequently when teeny is true) the word-count script is still enqueued, even though there is no relevant UI for it to report back to.
This results in WordPress enqueueing /wp-admin/js/word-count$suffix.js when it does not appear to be necessary, and also inserts an additional script tag for the accompanying wordCountL10n localized value.
Attachments (1)
Change History (8)
#2
@
12 years ago
For a quick way to confirm this:
- Login to bbpress.org
- Visit: https://bbpress.org/forums/topic/bbpress-2-5-5/
- View source of page
- Search for
wordCount
Notice the script tag and included javascript file, even though no visual editor or word count UI exists
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Move the
word-countenqueue into theself::$has_tinymcecheck