WordPress.org

Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#50531 new enhancement

Standardise the terminology used for hooks, actions, and filters in documentation

Reported by: johnbillion Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch
Focuses: docs Cc:

Description

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.

Change History (1)

#1 @johnbillion
5 weeks ago

  • Keywords has-patch added

PR here which hasn't been picked up: https://github.com/WordPress/wordpress-develop/pull/377

Note: See TracTickets for help on using tickets.