{
  "landingPage": "/wp-admin/edit.php?post_type=ig_campaign",
  "preferredVersions": {
    "php": "7.4",
    "wp": "5.9"
  },
  "features": {
    "networking": true
  },
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "icegram"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "setSiteOptions",
      "options": {
        "ig_is_onboarding_completed": "yes"
      }
    },
    {
      "step": "runPHP",
      "code": "<?php\r\nrequire_once 'wordpress/wp-load.php';\r\n$new_campaign_id = wp_insert_post(array(\r\n    'post_title' => 'My First Icegram Campaign',\r\n    'post_type' => 'ig_campaign',\r\n    'post_status' => 'publish',\r\n    'post_content' => 'This is the content of my first campaign.'\r\n));\r\n$target_rules = array(\r\n    'homepage' => 'yes',\r\n    'when' => 'always',\r\n    'mobile' => 'yes',\r\n    'tablet' => 'yes',\r\n    'laptop' => 'yes',\r\n    'logged_in' => 'all'\r\n);\r\nupdate_post_meta($new_campaign_id, 'icegram_campaign_target_rules', $target_rules);\r\n$new_message_id1 = wp_insert_post(array(\r\n    'post_title' => 'Get 2x more Contacts with Your Website',\r\n    'post_name' => 'Get 2x more Contacts with Your Website',\r\n    'post_type' => 'ig_message',\r\n    'post_status' => 'publish'\r\n));\r\n$message_data1 = array(\r\n    'id' => $new_message_id1,\r\n    'post_title' => 'Get 2x more Contacts with Your Website',\r\n    'post_name' => 'Get 2x more Contacts with Your Website',\r\n    'post_type' => 'ig_message',\r\n    'post_status' => 'publish',\r\n    'time' => '0',\r\n    'type' => 'action-bar',\r\n    'theme' => 'hello',\r\n    'headline' => 'Get 2x more Contacts with Your Website',\r\n    'label' => 'Show Me How',\r\n    'message' => 'Instant Results Guaranteed',\r\n    'position' => '01',\r\n    'text_color' => '#000000',\r\n    'bg_color' => '#EB593C'\r\n);\r\nupdate_post_meta($new_message_id1, 'icegram_message_data', $message_data1);\r\nupdate_post_meta($new_message_id1, 'icegram_message_preview_data', $message_data1);\r\n\r\n$new_message_id2 = wp_insert_post(array(\r\n    'post_title' => 'Showcase The Latest Collection',\r\n    'post_name' => 'Showcase The Latest Collection',\r\n    'post_type' => 'ig_message',\r\n    'post_status' => 'publish'\r\n));\r\n\r\n$message_data2 = Array(\r\n    'id' => $new_message_id2,\r\n    'post_title' => 'Showcase The Latest Collection',\r\n    'type' => 'messenger',\r\n    'theme' => 'canvas',\r\n    'headline' => '',\r\n    'headline_font_family' => '',\r\n    'icon' => '',\r\n    'message' => '<div class=\"ig_heading\">LATEST<br>\r\nCOLLECTION</div>\r\nA Journey through the<br>\r\nAW\\'s Latest collection - Now Live!</div>\r\n<div class=\"ig_btn_container\"><button class=\"ig_btn1 ig_cta\">SHOP WOMEN</button><button class=\"ig_btn2 ig_cta\">SHOP MEN</button></div>',\r\n    'animation' => 'no-anim',\r\n    'form_font_family' => '',\r\n    'form_header' => '',\r\n    'form_html_original' => '',\r\n    'form_footer' => '',\r\n    'label' => '',\r\n    'cta_font_family' => '',\r\n    'link' => '',\r\n    'use_custom_code' => 'yes',\r\n    'custom_css' => '#ig_this_message{width:40%}#ig_this_message .ig_content{background-color:#01aaf6!important;border:none}#ig_this_message .ig_body{overflow-y:hidden}#ig_this_message .ig_message{text-align:center;font-family:\\'Roboto\\',sans-serif;color:#fff;line-height:1.4;font-size:1.3em}#ig_this_message .ig_heading{font-size:1.6em;line-height:1.2em;font-weight:600;margin-bottom:.6em;position:relative}#ig_this_message .ig_heading:after{content:\\'\\';position:absolute;width:60%;margin-left:20%;left:0;bottom:-.3em;border-bottom:3px solid #fff}#ig_this_message .ig_btn_container{width:100%;padding:.6em 0}#ig_this_message .ig_btn_container>button{display:inline-block;width:48%;font-size:1em;border:0;color:#fff;font-weight:600;border-radius:0;padding:.5em 0;height:2.5em}#ig_this_message button.ig_btn1{background:#0071a5;border:0;font-weight:600;border-radius:0;box-shadow:none}#ig_this_message button.ig_btn2{background:0 0;border:2px solid #fff;margin-left:2%;box-shadow:none}#ig_this_message .ig_close:after{background-image:url(https://www.icegram.com/gallery/wp-content/uploads/2017/07/sprite_close_02_white_48.png);background-position:-258px center}@media only screen and (max-width:319px),(min-width:320px) and (max-width:359px),(min-width:360px) and (max-width:413px),(min-width:414px) and (max-width:643px),(min-width:644px) and (max-width:767px){#ig_this_message{width:90%;font-size:.9em}}@media only screen and (min-width:768px) and (max-width:992px),(min-width:993px) and (max-width:1023px){#ig_this_message{width:80%}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2) format(\\'woff2\\');unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2) format(\\'woff2\\');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/-2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2) format(\\'woff2\\');unicode-range:U+1F00-1FFF}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2) format(\\'woff2\\');unicode-range:U+0370-03FF}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2) format(\\'woff2\\');unicode-range:U+0102-0103,U+1EA0-1EF9,U+20AB}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2) format(\\'woff2\\');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:\\'Roboto\\';font-style:normal;font-weight:400;src:local(\\'Roboto\\'),local(\\'Roboto-Regular\\'),url(https://fonts.gstatic.com/s/roboto/v16/CWB0XYA8bzo0kSThX0UTuA.woff2) format(\\'woff2\\');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215}}',\r\n    'message_font_family' => '',\r\n    'form_style' => 'style_0',\r\n    'form_layout' => 'inline',\r\n    'form_bg_color' => '',\r\n    'form_text_color' => '',\r\n    'use_theme_defaults' => 'yes',\r\n    'bg_color' => '',\r\n    'text_color' => '',\r\n    'cta_bg_color' => '',\r\n    'cta_text_color' => '',\r\n    'position' => 22\r\n);\r\n\r\nupdate_post_meta($new_message_id2, 'icegram_message_data', $message_data2);\r\nupdate_post_meta($new_message_id2, 'icegram_message_preview_data', $message_data2);\r\n\r\n$new_message_id3 = wp_insert_post(array(\r\n    'post_title' => 'Latest offer subscription email',\r\n    'post_name' => 'Latest offer subscription email',\r\n    'post_type' => 'ig_message',\r\n    'post_status' => 'publish'\r\n));\r\n\r\n$message_data3 = array(\r\n    'id' => $new_message_id3,\r\n    'post_title' => 'Latest offer subscription email',\r\n    'type' => 'popup',\r\n    'theme' => 'inspire',\r\n    'headline' => '',\r\n    'headline_font_family' => '',\r\n    'icon' => '',\r\n    'message' => '<div class=\"ig_msg_content_left\">\r\n        <img src=\"http://www.icegram.com/gallery/wp-content/uploads/2022/08/illustration-hello-discount-man.png\" alt=\"Offer\" width=\"259\" height=\"389\" />\r\n        </div>\r\n        <div class=\"ig_msg_content_right\">\r\n        <div class=\"ig_sub_headline\"> Latest offers and updates on trendy gadgets</div>\r\n        <div class=\"ig_sub_text\">Grab the latest offers on the go, be the first one to know about the next big things</div>\r\n        [ig_form]\r\n        </div>',\r\n    'animation' => 'appear',\r\n    'use_form' => 'yes',\r\n    'form_font_family' => '',\r\n    'form_header' => '',\r\n    'form_html_original' => '<form action=\"\" method=\"post\" id=\"demo-embed-subscribe-form\" name=\"demo-embed-subscribe-form\" class=\"\" target=\"blank\">\r\n              <label for=\"NAME\">Name </label>\r\n              <input type=\"text\" value=\"\" name=\"NAME\" class=\"\" id=\"NAME\" required>\r\n              <label for=\"EMAIL\">Email Address<span class=\"asterisk\"></span> </label>\r\n              <input type=\"email\" value=\"\" name=\"EMAIL\" class=\"required email\" id=\"EMAIL\" required>\r\n              <input type=\"submit\" value=\"SEND IT NOW\" name=\"subscribe\" id=\"subscribe\" class=\"button\">\r\n             </form>',\r\n    'form_footer' => '',\r\n    'label' => 'SEND IT NOW',\r\n    'cta_font_family' => '',\r\n    'link' => 'https://downloads.wordpress.org/plugin/icegram.latest-stable.zip?utm_source=site&utm_medium=download&utm_campaign=Download',\r\n    'use_custom_code' => 'yes',\r\n    'custom_css' => '#ig_this_message{font-family:\\'Open Sans\\',sans-serif;padding:1.5rem 0;border-radius:10px;width:64%}#ig_this_message .ig_sub_headline{padding:.2em;text-align:left;font-size:2em;line-height:1.3em;font-weight:600;color:#565454}#ig_this_message .ig_form_els{width:100%}#ig_this_message .ig_sub_text{padding:.8em;font-size:.8em;font-weight:500;text-align:left;color:#706f6f}#ig_this_message .ig_msg_content_right{float:right;width:60%}#ig_this_message .ig_msg_content_left img{margin-top:13%;width:290px;height:300px}#ig_this_message .ig_msg_content_left{float:left;font-size:.9em}#ig_this_message .ig_close{background-image:url(https://www.icegram.com/gallery/wp-content/uploads/2017/07/sprite_close_02_black_48.png);background-position:-369px center;background-color:transparent;top:15px;right:15px;opacity:.6;height:30px;width:30px}#ig_this_message .ig_cta_wrapper{width:90%}#ig_this_message .ig_button{box-shadow:none;border:0;border-radius:5px;text-shadow:none;font-size:1.2em}@media only screen and (max-device-width:319px),(min-width:320px) and (max-width:359px),(min-width:360px) and (max-width:413px),(min-width:414px) and (max-width:643px){#ig_this_message{width:90%}#ig_this_message .ig_headline{font-size:2.2em}#ig_this_message .ig_msg_content_right{width:inherit}#ig_this_message .ig_msg_content_left img{display:none}}@media only screen and (min-width:644px) and (max-width:767px),(min-width:768px) and (max-width:992px){#ig_this_message{width:75%}#ig_this_message .ig_msg_content_left img{width:180px;height:250px}}@media only screen and (min-width:993px) and (max-width:1024px),(min-width:1025px) and (max-width:1036px){#ig_this_message{width:65%}}@media only screen and (min-width:768px) and (max-width:992px),(min-width:993px) and (max-width:1024px),(min-width:1025px) and (max-width:1583px){#ig_this_message .ig_msg_content_left{width:45%}#ig_this_message .ig_msg_content_right{width:55%}}',\r\n    'custom_js' => '<script type=\"text/javascript\"></script>',\r\n    'message_font_family' => '',\r\n    'form_style' => 'style_1',\r\n    'form_layout' => 'inline',\r\n    'form_bg_color' => '',\r\n    'form_text_color' => '',\r\n    'bg_color' => '#ffffff',\r\n    'text_color' => '#000000',\r\n    'cta_bg_color' => '#361f39',\r\n    'cta_text_color' => ''\r\n);\r\n\r\nupdate_post_meta($new_message_id3, 'icegram_message_data', $message_data3);\r\nupdate_post_meta($new_message_id3, 'icegram_message_preview_data', $message_data3);\r\n\r\n$new_message_id4 = wp_insert_post(array(\r\n    'post_title' => 'Demo 4: Stand Out Copy',\r\n    'post_name' => 'Demo 4: Stand Out Copy',\r\n    'post_type' => 'ig_message',\r\n    'post_status' => 'publish'\r\n));\r\n\r\n$message_data4 = Array(\r\n    'id' => $new_message_id4,\r\n    'post_title' => 'Demo 4: Stand Out Copy',\r\n    'type' => 'toast',\r\n    'theme' => 'stand-out',\r\n    'headline' => '<div class=\"ig_demo_headline_light\">Bill Gates says</div>',\r\n    'headline_font_family' => '',\r\n    'icon' => 'https://www.icegram.com/gallery/wp-content/uploads/2016/04/billgates-1-150x150.jpg',\r\n    'message' => '<span class=\"st\">\"<em>Your most unhappy customers are</em> your greatest source of learning.\" </span>',\r\n    'animation' => 'slide',\r\n    'form_font_family' => '',\r\n    'form_header' => '',\r\n    'form_html_original' => '',\r\n    'form_footer' => '',\r\n    'label' => '',\r\n    'cta_font_family' => '',\r\n    'link' => '',\r\n    'use_custom_code' => 'yes',\r\n    'custom_css' => '#ig_this_message .ig_content{color: #FFFFFF;}',\r\n    'custom_js' => '<script type=\"text/javascript\"></script>',\r\n    'message_font_family' => '',\r\n    'form_style' => 'style_0',\r\n    'form_bg_color' => '',\r\n    'form_text_color' => '',\r\n    'bg_color' => '#ffffff',\r\n    'text_color' => '#000000',\r\n    'cta_bg_color' => '',\r\n    'cta_text_color' => '',\r\n    'position' => '02'\r\n);\r\n\r\nupdate_post_meta($new_message_id4, 'icegram_message_data', $message_data4);\r\nupdate_post_meta($new_message_id4, 'icegram_message_preview_data', $message_data4);\r\n$messages = array();\r\n$messages[] = array(\r\n    'id' => $new_message_id1,\r\n    'time' => 0\r\n);\r\n$messages[] = array(\r\n    'id' => $new_message_id2,\r\n    'time' => 5\r\n);\r\n$messages[] = array(\r\n    'id' => $new_message_id3,\r\n    'time' => 8\r\n);\r\n$messages[] = array(\r\n    'id' => $new_message_id4,\r\n    'time' => 10\r\n);\r\nupdate_post_meta($new_campaign_id, 'messages', $messages);\r\nupdate_post_meta($new_campaign_id, 'campaign_preview', $messages);\r\n?>\r\n "
    },
    {
      "step": "mkdir",
      "path": "wordpress/wp-content/mu-plugins"
    },
    {
      "step": "writeFile",
      "path": "wordpress/wp-content/mu-plugins/removeMergeFeedback.php",
      "data": "<?php\nfunction disable_ig_render_iges_merge_feedback() {\n    remove_action( 'admin_footer', 'icegram_render_iges_merge_feedback' );\n}\nadd_action( 'admin_init', 'disable_ig_render_iges_merge_feedback' );\n?>"
    }
  ]
}
