Add actions for plugins to register frontend and editor assets#1717
Merged
Add actions for plugins to register frontend and editor assets#1717
Conversation
...and fire this action in both admin context and on the frontend.
Member
Author
|
As of 00e7c3a there are two actions here:
|
Member
Then |
Member
Author
👍 Changed to |
swissspidy
reviewed
Jul 5, 2017
lib/client-assets.php
Outdated
| // Enqueue block styles built through plugins. This lives in a separate | ||
| // 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 |
Member
There was a problem hiding this comment.
This should be a multi-line comment, e.g.
/*
* ddd
*/
(with one asterisk on the first line)
swissspidy
approved these changes
Jul 5, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.