-
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
Style engine: enqueue block support styles #42452
Merged
ramonjd
merged 30 commits into
trunk
from
try/style-engine-enqueue-block-supports-styles
Aug 2, 2022
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0840074
Enqueuing block support styles version 1.
ramonjd 6a42821
Linter, this one's for you.
ramonjd 1f2b4a8
Post trunk merge cleanup and update tests.
ramonjd 5a51073
Removed spacing around curly braces in CSS rules. Updated tests.
ramonjd 55576b9
Splitting `wp_style_engine_enqueue_block_supports_styles` and `wp_sty…
ramonjd acc6209
Integrate the processor class
ramonjd 7a22c5b
Migrate layout styles to style engine store.
ramonjd 7a6aa60
Update packages/style-engine/class-wp-style-engine.php
ramonjd 49b1433
Tweaks for #42452 (#42691)
aristath d7893a6
Adding check for the context argument.
ramonjd bc6e39a
Updating the processor so that it's ignorant of stores. Why? So that …
ramonjd e8a621d
dump var_dump()
ramonjd 9ba5232
Improve the processor
aristath b41af7d
remove trailing commas - compatibility with PHP < 7.2
aristath 4ccf650
rename css_declarations to declarations
aristath e30e4fb
remove unused variable
aristath 062b920
Switch parse_block_styles from public to protected static
ramonjd 5e4164a
Now that all methods are static, there's no need to call `get_instanc…
ramonjd fcebf93
Revert get_instance() in wp_style_engine_add_to_store because we want…
ramonjd d0d5fe5
Adding a test for the 'enqueue' flag.
ramonjd e59eb10
Update lib/block-supports/layout.php
ramonjd 5d7b827
Adding a test for the 'enqueue' flag.
ramonjd 4d9f6c8
Merge branch 'try/style-engine-enqueue-block-supports-styles' of gith…
ramonjd 8d021ee
Add named stores to the processor
aristath 5f60026
avoid setting var for something that only gets used once
aristath a63f9cb
Only use "else" if absolutely necessary
aristath 0eaef08
Add a set_name method
aristath e4c791b
combine & simplify conditions
aristath 787f793
use empty() instead of isset() checks here
aristath 7dd5773
shorten it
aristath 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 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Nice one, this looks like a good way to abstract it to me (a clean public function, and that function calls a simple method on the Style Engine class, which in turn calls the Processor class 👍).
Output looks good via logging, each rendered block gets its own string: