WordPress.org

Forums

Simple Fields
Auto-import settings when installing new site? (2 posts)

  1. kebbet
    Member
    Posted 1 year ago #

    Hi and thanks for a great plugin!

    I'm currently setting up a bunch of websites with the same setup (one theme and all the plugins in a "mu-plugins"-folder). Now I want to speed up and simplify the installation process. Is there a way I can import the file simple-fields-export.json when I activate the plugin or when run my custom install.php-file when setting up a new website?

    http://wordpress.org/plugins/simple-fields/

  2. Pär Thernström
    Member
    Plugin Author

    Posted 1 year ago #

    it's a nice idea, but not possible right now. you can check inc-admin-options-export-import.php lines 38-77. basically you just have to read the json, convert it to an array and then update all simple fields settings.

    bascially this is the main import part:

    update_option("simple_fields_post_connectors", $arr_post_connectors);
    update_option("simple_fields_groups", $arr_field_groups);
    update_option("simple_fields_post_type_defaults", $arr_post_type_defaults);

    There should be a function for this, for sure. I'll add it as an issue/feature request and hopefully I'll fix it in an later version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.