Home Forums Feedback Workflow hassle for multiple developers making a theme and plugins Reply To: Workflow hassle for multiple developers making a theme and plugins

  • I’ve played around with that plugin and some snippets, yours included. 😉 Most are quite old, but @infinimbal ‘s is quite new, and the UI is nicely integrated into the FGE. I’ve played with his code a bit and made myself this:

    It works, but its got a few bugs, will post the code later.

    Regarding my rant yesterday. I’ve done some testing and drawn some nice to know conclusions. Probably amateur hour, but it was useful for me.

    (FG: Field Group. FGE: Field Group Editor.)

    1. When you save a FG in the FGE, it gets a DB entry, and optionally a JSON. (obvious)
    2. Syncing is making a DB entry from a JSON FG. (obvious?)
    3. The FGE only loads from the DB. You cannot make it edit JSON files.
    4. Both private and public JSON FG are active right away, if in a load_json dir.
    5. Public JSON FG can be synced. Private can not.
    6. Private JSON FG do not sync automatically either.

    Sooooooo.. DB entries cannot be abandoned if I want to use the FGE. To get the JSON in the DB we need to sync. To sync (manually) we need public JSON FGs, so private is of no benefit.

    The solution I’m going for right now is to still distribute via JSON files over git. Then automate syncing so the DB gets the changes (Todo). Then use dir selection shown in the screenshot to always have a JSON file made for every new DB entry. And allow us to move the existing JSON FGs to any of the load_json dirs. Lastly, if the WP_ENV is not local I just remove the ‘Custom fields’ menu item. Easy! I hope.