-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global Styles: Re-add third party blocks #44018
Conversation
On the front, I am seeing the following:
I tested three different blocks from two different plugins and the styling worked on two of them. I don't believe that is a problem with this PR but possibly with how that third block is built. |
A rebase might be necessary because |
…d party blocks having predictable file names
Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
d270ecc
to
ffa4c95
Compare
@carolinan I think I fixed the warning you were getting. Give it another try. |
ffa4c95
to
fd60049
Compare
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.
Tested this and works! The code LGTM
@priethor @michalczaplinski @ockham should this be backport to 14.1, so it makes it into WP 6.1? |
cc/ @c4rl0sbr4v0 |
cc/ @oandregal for general Global Styles expertise and @sunyatasattva for Woo counseling 🙂 |
I think this needs to be in 6.1 |
* Global Styles: Add support for third party blocks * Append style to the global styles stylesheet as we can't rely on third party blocks having predictable file names * Update lib/compat/wordpress-6.1/get-global-styles-and-settings.php Co-authored-by: Ari Stathopoulos <aristath@gmail.com> * refactor for readability * Fix undefined array key "name" warning Co-authored-by: Ari Stathopoulos <aristath@gmail.com> Co-authored-by: Alex Lende <alex@lende.xyz>
* Global Styles: Add support for third party blocks * Append style to the global styles stylesheet as we can't rely on third party blocks having predictable file names * Update lib/compat/wordpress-6.1/get-global-styles-and-settings.php Co-authored-by: Ari Stathopoulos <aristath@gmail.com> * refactor for readability * Fix undefined array key "name" warning Co-authored-by: Ari Stathopoulos <aristath@gmail.com> Co-authored-by: Alex Lende <alex@lende.xyz>
I just cherry-picked this PR to the wp/6.1 branch to get it included in the next release: 3b4341d |
Hey, did we backport this one? I don't see this changes in the current source at core https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/global-styles-and-settings.php#L210 |
Uhhh, looks like we missed this one, since it's PHP code that requires manual backporting 🤦♂️ We'll file a PR now. I hope we'll manage to get it into 6.1 🤞 cc/ @c4rl0sbr4v0 |
Handled in WordPress/wordpress-develop#3529, which was merged to Core This means the fix should make it into 6.1 😌 |
What?
This outputs Global Styles CSS for third party blocks.
Why?
Third party blocks should be able to consume Global Styles settings as well as core blocks.
How?
Since we can't predict the name for CSS files used for third party blocks, we need to add the block CSS to the global-styles inline CSS.
Testing Instructions
Screenshots or screencast
@WordPress/block-themers