-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backport background image block support from Gutenberg #5209
Backport background image block support from Gutenberg #5209
Conversation
1e7c9ea
to
1538e1a
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.
Thanks @andrewserong for PR. Some quick feedback.
tests/phpunit/tests/block-supports/wpRenderBackgroundSupport.php
Outdated
Show resolved
Hide resolved
Thanks for the quick code style fixes @mukeshpanchal27! 👍 |
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
062d571
to
b5dfb01
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.
Changes LGTM! Thanks for adding tests ❤️
Committed in r56614. |
Backport background image block support feature that was introduced in Gutenberg in WordPress/gutenberg#53934.
Note this PR backports the PHP parts of the block support. This can be safely done prior to the JS packages landing for core, as the UI for the feature will not be exposed until the JS packages are updated.
Testing this PR manually in
wordpress-develop
is possible via the following steps:block.json
file to includebackground: { backgroundImage: true }
under thesupports
key. I.e. that section will look like the following:Skip the block.json cache so the changes to the
block.json
file are picked up. A quick way is to comment out the following lines:wordpress-develop/src/wp-includes/blocks.php
Lines 363 to 365 in 7b90f22
In a post or page, paste in the following block markup that displays a background image from
wordpress.org
:Trac ticket: https://core.trac.wordpress.org/ticket/59357
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.