I'm currently working with the Redux Framework to allow users of my theme to add additional CSS and JS code to their theme's header and footer, respectively. Redux stores this code in a global variable, so it's easy to access.
However, this means I must call the global variable in the header.php or footer.php file and then echo the code from Redux there. This doesn't seem ideal. I was wondering if there is any way to enqueue these blocks of code in the function.php file rather than trying to code it directly into the template files.
margin: 0 auto;
Is typed into my CSS box inside of Redux. I can then access it in header.php with something like:
...and it'll spit out the above CSS. That's all well and good, but if I do this its not properly enqueued. Per my understanding I can only use a URL with wp_enqueue_style and wp_enqueue_script so I'm at a loss.
Thank you for your help!