• Resolved shmulim

    (@shmulim)


    Hi, I’m installing this plugin on a series of websites and I want to avoid configuring it each time. I have tried to programmatically configure it in my code by setting the model_post_gallery option in the wp_options table. This is my code:

    
    update_option('model_post_gallery',
    	     '{ "can_enqueue": 0,
    	       "types": ["custom-post-type"],
                   "metabox_context": "advanced",
                   "metabox_priority": "default",
                   "ID": "post_gallery"
                   }',
                  true);
    

    This returns unpredictable results though. While it changes the options checkbox display, it doesn’t necessarily have an effect on which post types the gallery metabox will show. Is there a better way to programmatically configure the plugin? Thanks!

    • This topic was modified 7 years, 12 months ago by shmulim. Reason: code
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Install plugin with preconfigurations’ is closed to new replies.