Site logo

Archived topic

Feature request: Export Elements as PHP code

2 replies · Started by Benedikt on May 4, 2020

Viewing posts 1–3 of 3

Hey guys!

I hope I find you safe and healthy in those interesting times!

As we are constantly searching for ways to make our WP sites safer, faster and better to handle, I had the following idea:

Would it be feasible to export GP elements’ PHP code to put into the functions.php of my child theme, so that I can set DISALLOW_FILE_EDIT = 'true' for my live site, which is way safer, while keeping the elements editable in my dev version? ACF for example does exactly that (and does it very well), so that I can conveniently export the whole PHP code of all my field groups and put them into my (child) theme’s functions.php.

Wouldn’t that be a great idea? :)

Best regards from Vienna!
Bene

Hi there,

The part of this that would be incredibly difficult is building the conditionals built by the Display Rules.

Exporting standard hooks would likely be possible, but I'm not sure how we'd add the necessary display rules in there. I'll definitely give it some thought :)

Thanks!

Hi Tom!

Okay, I see the complexity … though it really would be a great step towards GP being a fantastic frameworkish theme for devs.

Cheers!
Bene

This archived topic is closed to new replies.