How to use the JavaScript WordPress Hooks API (Without Any Extra Libraries)
…“add” hooks into the base JS file (such as main.js) so they are never “late” or missed by the actual action or filter. wp.hooks.doAction() Use wp.hooks.doAction() where the “hooked” action…