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

Add border theme_support #51777

Merged
merged 1 commit into from
Jun 28, 2023
Merged

Add border theme_support #51777

merged 1 commit into from
Jun 28, 2023

Conversation

carolinan
Copy link
Contributor

@carolinan carolinan commented Jun 22, 2023

What?

The PR adds theme supports for border settings.

Update: This core patch has been committed https://core.trac.wordpress.org/ticket/58598


Replaces #47675
Alternative to #47451

Related:
Matching core ticket and patch: https://core.trac.wordpress.org/ticket/58598

core 57460 Backport: appearance-tools theme_support
core 56487 Bundled themes: opt-in to appearance tools

Why?

There is no way for themes to enable border settings without theme.json (Theme.json can not be added to all classic themes without friction).

How?

Adds a conditional check, and if the theme or plugin adds add_theme_support( 'border' ); enables the setting in the block editor.

Testing Instructions

Activate a classic theme.
Open the themes functions.php and locate a setup function or similar that uses add_action( 'after_setup_theme',.
For example if you are using Twenty Twenty-One, look for the function called twenty_twenty_one_setup()
Add add_theme_support( 'border' ); inside that function.
Open the block editor.
Add a block that supports borders, for example, a group.
Confirm that the border controls are available.

Palette colors will not work on the front, that is a separate issue: a classic theme needs to add CSS to support using its custom palette for the borders. Adding this will be up to each theme developer.

@carolinan carolinan marked this pull request as ready for review June 22, 2023 03:52
@carolinan carolinan added [Type] Enhancement A suggestion for improvement. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Jun 22, 2023
@github-actions
Copy link

github-actions bot commented Jun 22, 2023

Flaky tests detected in 01ec569139ff3467b6f8ffcec2433e53e3e19fd2.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5341407683
📝 Reported issues:

@aristath aristath requested a review from Mamaduka June 22, 2023 05:54
@carolinan carolinan added the Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core label Jun 26, 2023
@kafleg
Copy link
Member

kafleg commented Jun 27, 2023

Tested and looks good to me.

Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

This has already been merged in Core, approving the PR so it can be merged in Gutenberg as well. 👍

@aristath aristath enabled auto-merge (squash) June 28, 2023 08:30
@aristath aristath merged commit 4ef676e into trunk Jun 28, 2023
@aristath aristath deleted the add/border-theme-support branch June 28, 2023 08:58
@github-actions github-actions bot added this to the Gutenberg 16.2 milestone Jun 28, 2023
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants