-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add actions for plugins to register frontend and editor assets #1717
Conversation
...and fire this action in both admin context and on the frontend.
As of 00e7c3a there are two actions here:
|
Then |
👍 Changed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
lib/client-assets.php
Outdated
// action for a couple of reasons: (1) we want to load these assets | ||
// (usually stylesheets) in *both* frontend and editor contexts, and (2) | ||
// one day we may need to be smarter about whether assets are included | ||
// based on whether blocks are actually present on the page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a multi-line comment, e.g.
/*
* ddd
*/
(with one asterisk on the first line)
Adds actions so that someone can hook into where Gutenberg styles and scripts are loaded and bring in styles and scripts of their own, for both the frontend and the editor.
This modifies functionality added in #1418, adding a Gutenberg-specific action intended for plugin use in enqueuing front-end assets. It also adds a corresponding action for plugins to enqueue editor assets.
See also #422, #514, and #1420.