Title: Hooks Reference
Published: March 9, 2021
Last modified: October 14, 2026

---

# Hooks Reference

[Hooks](https://developer.wordpress.org/plugins/hooks/) are a way for one piece 
of code to interact/modify another piece of code. They provide one way for plugins
and themes to interact with the editor, but they’re also used extensively by WordPress
Core itself.

There are two types of hooks: [Actions](https://developer.wordpress.org/plugins/hooks/actions/)
and [Filters](https://developer.wordpress.org/plugins/hooks/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](https://www.npmjs.com/package/@wordpress/hooks) package, 
for general purpose use.

You can also learn more about both APIs: [PHP](https://developer.wordpress.org/reference/)
and [JavaScript](https://developer.wordpress.org/block-editor/reference-guide/packages/packages-hooks/).

First published

March 9, 2021

Last updated

October 14, 2026

Edit article

[ Improve it on GitHub: Hooks Reference ](https://github.com/WordPress/gutenberg/edit/trunk/docs/reference-guides/filters/README.md)

[  Previous: Tag Cloud](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-widgets/core-block-tag-cloud/)

[  Next: Block Filters](https://developer.wordpress.org/block-editor/reference-guides/filters/block-filters/)