WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #30966


Ignore:
Timestamp:
01/09/2015 02:07:24 PM (6 years ago)
Author:
iseulde
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30966 – Description

    initial v1  
    1 1) Make the code readable (don't use short variable names such as `tx`, `w`, `tc`, `t`, `wc`, `c`, which have no meaning).
    2 2) Make the word count function more abstract so that it can be used elsewhere. So, it should only count the words in a given text, nothing else.
    3 3) Maybe move to `wp-includes`.
    4 4) The word count should update at the right times. At the moment it updates on `enter`, `delete` and `backspace`. It should at least be updated on `space` too. Consider things like cut and paste, and look at TinyMCE events that change the content.
    5 5) Exclude more patterns like known shortcodes and ellipsis (#27386, #27391).
    6 6) Add some good unit tests for all of this.
    7 7) Make sure it's as fast as it can be (e.g. don't needlessly manipulate the DOM).
     11. Make the code readable (don't use short variable names such as `tx`, `w`, `tc`, `t`, `wc`, `c`, which have no meaning).
     22. Make the word count function more abstract so that it can be used elsewhere. So, it should only count the words in a given text, nothing else.
     33. Maybe move to `wp-includes`.
     44. The word count should update at the right times. At the moment it updates on `enter`, `delete` and `backspace`. It should at least be updated on `space` too. Consider things like cut and paste, and look at TinyMCE events that change the content.
     55. Exclude more patterns like known shortcodes and ellipsis (#27386, #27391).
     66. Add some good unit tests for all of this.
     77. Make sure it's as fast as it can be (e.g. don't needlessly manipulate the DOM).
    88
    99This could be a small improvement that makes people less annoyed with WordPress. :)