Forum Replies Created
-
AuthorPosts
-
July 28, 2014 at 8:09 pm in reply to: Suggestion: Allow PHP code in Theme Settings >Head Scripts #116177TrishaMMember
Thanks for the suggestion Marc - I'm aware of that Plugin but my preference is to keep things as simple as possible and that also means as Plugin-free as possible.
On this particular site I'm working on (sorry, on a development server only at the moment, not accessible to the outside world), our prime directive is that every line of code, and every plugin, has to earn it's way in. Lean and mean is the watchword. So I'll wind up using a hook, but without the plugin - I'll put it in the Child Theme functions.php
That said, I've already added quite a bit of stuff to the Child Theme's functions.php, but I would prefer a better way to handle that as well - if the Child Theme gets updated the functions.php will be overwritten. Sure I can perform regular backups of the Theme files, but that won't help the site owner who does a Theme update and wipes out half of the added functionality *until* we can get a restore done from backups.
Since Genesis *already has* a setting for injecting scripts into the head, why not allow for PHP to be injected also? And ideally, a way to call a secondary functions.php file (or somewhere that custom functions have been added) to protect against Child Theme updates that could overwrite custom functionality?
There are some amazingly well-designed Child Themes available, but since even minor modifications often mean adding stuff to the functions.php, it would be nice to have a way to add those mods in a update-proof way.
So it's just a suggestion - we'll take steps to protect ourselves, but adding this to Genesis would really make it a bullet-proof framework that would be even more useful than it already is.
-
AuthorPosts