Front-end Scripts and Styles Actions
Actions for Front-end Scripts and Styles. Every other area is listed on the Action Hooks Reference. Each name links to its own page, with its parameters, notes and an example.
Benecaster registers its front-end script and style handles on init, not on wp_enqueue_scripts, so they exist in wp-admin, the block editor and preview requests as well as on the front end. Each file is still added to a page only when the shortcode that needs it renders there.
To keep a Benecaster file off a page, call wp_dequeue_style() or wp_dequeue_script() on its handle. Removing a Benecaster callback from wp_enqueue_scripts with remove_action() does nothing. The handle names, and how to load them into the block editor, are in Load Benecaster’s front-end styles into the block editor.
See Also
Need this built rather than just documented? See our services →