WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21170, comment 102


Ignore:
Timestamp:
12/07/2015 11:01:56 PM (4 years ago)
Author:
atimmer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21170, comment 102

    initial v1  
    33* The whole`MethodsAvailable` is weird readability wise. It works because the declaration of the variable is hoisted to the top, then the functions are hoisted and then `MethodsAvailable` is set to the correct value. I think it's better to be explicit that that's going on so to fix that add a `var MethodsAvailable` on top and moving the assignment to the bottom.
    44* If the first argument of `doAction` is required shouldn't it just be placed in the first position in the function declaration? Same goes for `applyFilters`.
    5 * We can document that we accept a list of arguments using 3 dots: http://usejsdoc.org/tags-param.html, so for `doAction`: `@param {...}`
     5* It is possible to document that a function accepts a list of arguments using 3 dots: http://usejsdoc.org/tags-param.html, so for `doAction`: `@param {...}`
    66* There is a space missing before the first `(` of all if statements.
    77* `_removeHook` doesn't need a context argument because it's never called with a context. This also makes the function cleaner.