Skip to content
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

Don't enqueue Gutenberg styles if Gutenberg isn't running #3052

Merged
merged 2 commits into from
Oct 18, 2017

Conversation

pento
Copy link
Member

@pento pento commented Oct 18, 2017

#2951 introduced a bug where Gutenberg scripts and styles were being enqueued on every page, instead of just the editor page.

@pento pento added Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Bug An existing feature does not function as intended labels Oct 18, 2017
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issues for me!

I wonder if it's not possible to just call gutenberg_editor_scripts_and_styles in gutenberg_init or something instead of having two entry points.

@pento pento mentioned this pull request Oct 18, 2017
3 tasks
...once we've decided to load Gutenberg, instead of having a kind of weird side-effect function.
@pento
Copy link
Member Author

pento commented Oct 18, 2017

@youknowriad: That's a fair point, the weird side effect function was kind of bugging me, too.

The new commit is nicer, I think.

@youknowriad
Copy link
Contributor

@pento I like it 👍

@pento pento merged commit 15c515b into master Oct 18, 2017
@pento pento deleted the fix/gutenberg-styles-shouldnt-load-everywhere branch October 18, 2017 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants