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 - WordPress Tutorial
From the course: WordPress: Action and Filter Hooks
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
-
-
-
-
(Locked)
Finding references and documentation3m 33s
-
(Locked)
Identifying available hooks and filters4m 14s
-
(Locked)
A look at load order and dependencies4m 19s
-
(Locked)
Understanding callback functions4m 44s
-
(Locked)
Using apply_filters3m 55s
-
(Locked)
Registering and executing hooks in JavaScript47s
-
(Locked)
-
-
-