valendesigns / option-tree

Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
GNU General Public License v2.0
610 stars 181 forks source link

Rendering Dynamic CSS in the wp_head #557

Open artboard-studio opened 9 years ago

artboard-studio commented 9 years ago

Hi

I hope everything is fine, it's been a long time since I stopped by with another one of my questions.

Is there any way to render the dynamic css in the header of the page? Enqueuing another CSS file isn't always the best option and based on my research rendering it in the head is more efficient, plus rendering the dynamic CSS in the header will solve the long term issue of users updating their premium themes and losing their options having to go to theme options and resaving their options after each update.

I assume the dynamic css is doing some search replace to turn the handlebars into standard CSS and some how writing them into a file, I looked in the core files and couldn't find a way to stop that and hook the output into the wp_head filter.

Any hints would be helpful. I have no issue with altering the core files for now, so just point me in the right direction and I might be able to take it from there.

Thanks as always.

BassemN commented 9 years ago

+1 for adding the ability to hook dynamic css into wp_head. This will fix the loss of dynamic.css file after updating the theme as described here https://github.com/valendesigns/option-tree/issues/471

valendesigns commented 5 years ago

Seems possible.

BassemN commented 5 years ago

@valendesigns Welcome back :)