[wp-trac] [WordPress Trac] #34230: Wordcount broken in frontend (v. 4.3)

WordPress Trac noreply at wordpress.org
Fri Oct 9 14:51:53 UTC 2015


#34230: Wordcount broken in frontend (v. 4.3)
--------------------------+----------------------
 Reporter:  finnj         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Editor        |     Version:  4.3
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by finnj):

 Replying to [comment:1 iseulde]:
 > You'll have to initialise the counter yourself now. It's not part of
 `wp_editor` and the word count script was only meant to be used with the
 main editor. You could use the script now though, it's more abstract and
 might be moved to `wp-includes`. See #30966 for more background and take a
 look at `wp-admin/js/post.js` for an example on how to use it with
 `wp_editor`. If you're using scrips under `wp-admin` on the front-end,
 you'll have to keep up with the development of them.

 That was a rough answer!
 This has worked for years in the frontend, just using:
 {{{
 printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' );
 }}}
 I am sorry but I am not able to keep up with all wordpress scripts.
 And I do not understand your point on it should just work for the main
 editor.
 I can load the wordcount plugin from tinymce (works fine), but that adds
 overhead, which I do not like.
 As you do not see this as a bug, do I need to open a enhancement request ?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34230#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list