-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Try: make logic for conditional editor_styles consistent #45351
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
Closed
Closed
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fdf86e0
Update logic to match client-assets
mikachan 5bff2b2
Move gutenberg_override_style into if statement
mikachan cb30700
Merge branch 'trunk' into fix/editor-block-styles
mikachan 50f2144
Update logic to match client-assets
mikachan 9e5bece
Merge branch 'trunk' into fix/editor-block-styles
mikachan 89c3d7d
Move wp-block-library-theme inside current_theme_supports logic
mikachan 0939f34
Revert "Move wp-block-library-theme inside current_theme_supports logic"
mikachan b3b368b
Remove $editor_styles check
mikachan ddbd300
Revert "Remove $editor_styles check"
mikachan 0d73fd2
Merge branch 'trunk' into fix/editor-block-styles
mikachan 0c230f6
Remove empty line
mikachan 823dfcc
Merge branch 'trunk' into fix/editor-block-styles
carolinan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,7 +178,7 @@ static function( $classes ) { | |
| wp_enqueue_media(); | ||
|
|
||
| if ( | ||
| current_theme_supports( 'wp-block-styles' ) || | ||
| current_theme_supports( 'wp-block-styles' ) && | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be updated in Core in wp-admin/site-editor.php. |
||
| ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) | ||
| ) { | ||
| wp_enqueue_style( 'wp-block-library-theme' ); | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ static function () use ( $style ) { | |
| * Note for core merge: see inline comment on what's been updated. | ||
| */ | ||
| function gutenberg_resolve_assets_override() { | ||
| global $pagenow; | ||
| global $pagenow, $editor_styles; | ||
|
|
||
| $script_handles = array( | ||
| 'wp-polyfill', | ||
|
|
@@ -80,7 +80,10 @@ function gutenberg_resolve_assets_override() { | |
| 'wp-edit-blocks', | ||
| ); | ||
|
|
||
| if ( current_theme_supports( 'wp-block-styles' ) ) { | ||
| if ( | ||
| current_theme_supports( 'wp-block-styles' ) && | ||
| ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) | ||
| ) { | ||
|
Comment on lines
+83
to
+86
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be updated in Core in wp-includes/script-loader.php. |
||
| $style_handles[] = 'wp-block-library-theme'; | ||
| } | ||
|
|
||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.