independent-publisher
independent-publisher copied to clipboard
Output CSS generated by Customizer inline
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.
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).