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

Output CSS generated by Customizer inline #323

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Output CSS generated by Customizer inline #323

wants to merge 3 commits into from

Conversation

raamdev
Copy link
Owner

@raamdev raamdev commented Oct 25, 2021

Note: This is a work in progress.


The current method of outputting CSS generated by the theme options in the Customizer uses Admin AJAX. This is not compatible with caching and is an unnecessary performance bottleneck.

Instead of dynamically generating the needed CSS on-the-fly via Admin AJAX, let's store the generated CSS in a theme mod, then output the CSS inline via wp_add_inline_style().


Addresses #305.

@raamdev raamdev mentioned this pull request Oct 25, 2021
@raamdev raamdev linked an issue Oct 25, 2021 that may be closed by this pull request
@raamdev
Copy link
Owner Author

raamdev commented Oct 25, 2021

I've got a proof of concept working on https://raamdev.com/ but there's still something wrong with saving the theme mod when saving the customizer. I need to dig into that a bit more. I also need to work on a plan for backwards compatibility (i.e., upgrading from the previous version of the theme to this new approach should be seamless).

@raamdev raamdev added this to the Next Release milestone Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabling Customizer?
1 participant