WordPress.org

Filter Reference Edit

Hooks are a way for one piece of code to interact/modify another piece of code. They provide one way for plugins and themes interact with the editor, but they’re also used extensively by WordPress Core itself.

There are two types of hooks: Actions and Filters. In addition to PHP actions and filters, WordPress also provides a mechanism for registering and executing hooks in JavaScript. This functionality is also available on npm as the @wordpress/hooks package, for general purpose use.

You can also learn more about both APIs: PHP and JavaScript.

Skip to toolbar