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

Blockbase: allow individual style variation to be removed. #8673

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

pkevan
Copy link
Contributor

@pkevan pkevan commented Jan 31, 2025

As described in #8671, the option to opt-out of parent styles individually via excludedParentStyleVariations custom option currently doesn't work - this allow the functionality to be corrected.

@pkevan pkevan added [Type] Bug Something isn't working [Theme] Blockbase labels Jan 31, 2025
Copy link
Contributor

Preview changes

I've detected changes to the following themes in this PR: Blockbase.
You can preview these changes by following the links below:

I will update this comment with the latest preview links as you push more changes to this PR.

Note

The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

$handler_method = isset( $handler['callback'][1] ) ? $handler['callback'][1] : null;
$remove_variations = wp_get_global_settings( array( 'custom', 'excludedParentStyleVariations' ) );

if ( is_a( $handler_class, 'WP_REST_Global_Styles_Controller_Gutenberg' ) && 'get_theme_items' === $handler_method && ! empty( $remove_variations ) ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this needs to change to allow for when the Gutenberg plugin is active, and not, as per #8638

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done via: 9f43603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Theme] Blockbase [Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant