From the course: WordPress: Action and Filter Hooks

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Registering and executing hooks in JavaScript

Registering and executing hooks in JavaScript - WordPress Tutorial

From the course: WordPress: Action and Filter Hooks

Start my 1-month free trial

Registering and executing hooks in JavaScript

- [Instructor] Although this course is focused on the plugin API, and using PHP to hook into WordPress, it's worth noting that there's a JavaScript equivalent. When WordPress introduced the block editor, aka Gutenberg, it brought with it a JavaScript hooks package. These hooks work in much the same way as what we've already seen, and can be used to extend the block editor, which is based on the React JavaScript library. This is outside the scope of what we're learning in this course, but if you want to use more, I suggest starting here at the Block Editor Handbook. This article on how to use the WordPress hooks package provides a nice overview as well. And I'd also recommend taking a look at this presentation from WordPress Core Contributor Adam Silverstein on working with JavaScript hooks in WordPress.

Contents