Minify JS files
Some time ago you were kind enough to write a child theme function to minify the Element and Synapse themes without the overhead of a plugin. Here’s the direct link to that forum topic.
I took a stab at a similar function to minify JS in Mobius. Here’s my child theme’s functions.php: http://hastebin.com/nerinewuco.php
It seems to work fine, but is this the optimal approach (i.e., is there anything you’d change)? Separately, is there any disadvantage to enqueuing these scripts in the footer as opposed to the head?
It looks right to me. Nice job. Enqueing in the footer can definitely speed up the initial page load, but I’d look out for JS errors when a slider is called via shortcode. It may be fine, but that’s where I’d test first because flexslider does load script within the body.
Thanks so much for the quick reply and the heads-up on the slider script. I’ll definitely test it.
And Casey, Mobius looks awesome. You’ve done great work on it!