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

Easily override theme default settings via theme.json #54142

Closed
flexseth opened this issue Sep 4, 2023 · 1 comment
Closed

Easily override theme default settings via theme.json #54142

flexseth opened this issue Sep 4, 2023 · 1 comment
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.

Comments

@flexseth
Copy link
Contributor

flexseth commented Sep 4, 2023

What problem does this address?

Very simple customization of theme features by overriding theme settings.

What is your proposed solution?

php hook to override a setting in theme.json. Allowing the ability to create a user interface to modify theme settings.

Example

<?php 
/**
 * Custom theme.json injection: Theme Supports: Dropcap
 * @see WordPress documentation on theme.json overrides (DNE)
 */

 // Add support for Dropcap in TwentyTwenty*
 add_theme_supports('dropcap', 'twentytwentythree') {
    return { 
        "typography": {
            "dropcap": "true"
        }
    }
 }
@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Package] Style Engine /packages/style-engine labels Sep 4, 2023
@flexseth
Copy link
Contributor Author

flexseth commented Sep 5, 2023

Referenced in this Style Engine feature requests / PR: #42493

File commit here - a filter exposing the style engine from the data store and storing it to an array.

Did not pass E2E testing... Just was looking around at some of the style engine info (didn't know that's what it was called 🤩)

@flexseth flexseth closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants