[wp-trac] [WordPress Trac] #50531: Standardise the terminology used for hooks, actions, and filters in documentation

WordPress Trac noreply at wordpress.org
Thu Jul 2 09:28:31 UTC 2020


#50531: Standardise the terminology used for hooks, actions, and filters in
documentation
-------------------------+----------------------------
 Reporter:  johnbillion  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Future Release
Component:  Plugins      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:  docs         |
-------------------------+----------------------------
 The docs and parameter names in plugin API functions use inconsistent
 terminology when referring to hooks, actions, and filters. Hooks are
 referred to variously as actions, filters, or tags. Actions and filters
 are sometimes referred to as hooks.

 Let's improve and standardise the documentation and the parameter names.
 This will help developers who are new to the actions and filters API.

 The correct terminology is that an action or a filter refers to the
 callback function attached to a hook. The `add_filter()`,
 `apply_filters()`, and `add_action()` functions support this terminology,
 but the `do_action()` function is the odd one out.

 That said, I know that not everyone agrees with this terminology, so it
 might need some further discussion.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50531>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list