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

Avoid loading Gutenberg assets in other admin pages #7117

Merged
merged 1 commit into from
Jun 6, 2018

Conversation

youknowriad
Copy link
Contributor

This introduces a is_gutenberg_page helper used to ensure Gutenberg assets are only loaded when necessary.

Testing instructions

  • Open any admin page, check that Gutenberg assets are not being loaded.

@youknowriad youknowriad self-assigned this Jun 4, 2018
@youknowriad youknowriad requested a review from mtias June 4, 2018 09:56
Copy link
Member

@noisysocks noisysocks left a comment

Choose a reason for hiding this comment

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

This looks good. I tested locally and:

✅ Gutenberg still loads on posts
✅ Gutenberg still loads on pages
✅ Gutenberg still loads on CPTs
✅ Gutenberg styles are still applied on the frontend
✅ Gutenberg isn't loaded on e.g. the WP dashboard

gutenberg.php Outdated
*
* @return boolean Whether Gutenberg is being loaded.
*
* @since 3.0.0
Copy link
Member

Choose a reason for hiding this comment

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

Should this be 3.1.0?

@youknowriad youknowriad force-pushed the fix/avoid-loading-gutenberg-assets-in-wpadmin branch from 5cec0bc to 0ef0fbb Compare June 6, 2018 08:28
@youknowriad youknowriad added this to the 3.1 milestone Jun 6, 2018
@youknowriad youknowriad merged commit 4ec4177 into master Jun 6, 2018
@youknowriad youknowriad deleted the fix/avoid-loading-gutenberg-assets-in-wpadmin branch June 6, 2018 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants