{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/frequently-asked-questions",
  "preferredVersions": {
    "php": "8.3",
    "wp": "latest"
  },
  "phpExtensionBundles": ["kitchen-sink"],
  "features": {
    "networking": true
  },
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "setSiteOptions",
      "options": {
        "blogname": "Ultimate FAQ Demo",
        "blogdescription": "A live preview of the Ultimate FAQ plugin"
      }
    },
    {
      "step": "installTheme",
      "themeData": {
        "resource": "wordpress.org/themes",
        "slug": "blocksy"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "writeFile",
      "path": "/wordpress/wp-content/mu-plugins/custom-styles.php",
      "data": "<?php add_action('wp_head', function() { echo '<style>.view-admin-faqs{position:relative;font-size:13px;font-weight:500;color:#fff;background:#1a1a1a;text-decoration:none;border:none;border-radius:6px;padding:7px 16px;cursor:pointer;overflow:hidden;white-space:nowrap;transition:background .2s,transform .15s,box-shadow .2s;box-shadow:0 1px 2px rgba(0,0,0,.15);display:block;width:max-content;margin-top:10px}.view-admin-faqs::after{content:none;position:absolute;inset:0;background:rgba(255,255,255,0);transition:background .2s}.view-admin-faqs:hover{background:#111;transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.25);color:#fff;text-decoration:none}.view-admin-faqs:hover::after{background:rgba(255,255,255,.06)}.view-admin-faqs:active{transform:translateY(0);box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform 80ms,box-shadow 80ms}.ewd-ufaq-faq-category-title h3{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#888;background:#fafafa;border:.5px solid rgba(0,0,0,.08);border-radius:8px 8px 0 0;padding:8px 20px;margin:24px 0 0}.ewd-ufaq-faq-div{border:.5px solid rgba(0,0,0,.1);border-radius:0 0 8px 8px;overflow:hidden;margin-bottom:2px}.ewd-ufaq-faq-category-title h3+.ewd-ufaq-faq-div,.ewd-ufaq-faq-category-title h3~.ewd-ufaq-faq-div{border-top:none}.ewd-ufaq-faq-title{border-bottom:.5px solid rgba(0,0,0,.07)}.ewd-ufaq-faq-title a.ewd-ufaq-post-margin{display:flex;align-items:center;gap:12px;padding:14px 20px;text-decoration:none;background:#fff;transition:background .15s}.ewd-ufaq-faq-title a.ewd-ufaq-post-margin:hover{background:#fafafa}.ewd-ufaq-post-margin-symbol{width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.06);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:EWD-UFAQ-Font;font-size:14px;color:#555;transition:transform .2s,background .15s}.ewd-ufaq-faq-title a.ewd-ufaq-post-margin:hover .ewd-ufaq-post-margin-symbol{background:rgba(0,0,0,.1)}.ewd-ufaq-can-be-toggled.ewd-ufaq-toggled .ewd-ufaq-post-margin-symbol{transform:rotate(90deg);background:rgba(0,0,0,.1)}.ewd-ufaq-faq-title-text h4{font-size:14px;font-weight:500;color:#1a1a1a;margin:0}.ewd-ufaq-faq-body{background:#fff;padding:16px 20px 16px 54px;border-top:.5px solid rgba(0,0,0,.07)}.ewd-ufaq-faq-post p{font-size:14px;color:#333;line-height:1.65;margin:0 0 12px}.ewd-ufaq-faq-post p:last-child{margin-bottom:0}.ewd-ufaq-faq-categories,.ewd-ufaq-faq-tags{font-size:12px;color:#888;margin-top:12px}.ewd-ufaq-faq-categories a,.ewd-ufaq-faq-tags a{display:inline-block;font-size:11px;font-weight:500;text-decoration:none;background:#f0f0f0;color:#555;border-radius:4px;padding:2px 8px;margin:2px 2px 0 0;transition:background .15s}.ewd-ufaq-faq-categories a:hover,.ewd-ufaq-faq-tags a:hover{background:#e0e0e0;color:#1a1a1a}.ewd-ufaq-permalink{margin-top:10px}.ewd-ufaq-permalink a{font-size:12px;color:#888;text-decoration:none;border-bottom:.5px solid rgba(0,0,0,.15)}.ewd-ufaq-permalink a:hover{color:#1a1a1a;border-bottom-color:rgba(0,0,0,.4)}.ewd-ufaq-clear{display:none}</style>'; });"
    },
    {
      "step": "installPlugin",
      "options": {
        "activate": true
      },
      "pluginData": {
        "resource": "wordpress.org/plugins",
        "slug": "ultimate-faqs"
      }
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once 'wordpress/wp-load.php';\nupdate_option('ewd-ufaq-settings', unserialize('a:27:{s:8:\"faq-page\";i:0;s:10:\"custom-css\";s:0:\"\";s:13:\"scroll-to-top\";s:1:\"1\";s:11:\"comments-on\";s:0:\"\";s:17:\"disable-microdata\";s:0:\"\";s:17:\"include-permalink\";s:4:\"text\";s:14:\"permalink-type\";s:15:\"individual_page\";s:23:\"disable-permalink-pages\";s:0:\"\";s:11:\"access-role\";s:13:\"administrator\";s:18:\"disable-faq-toggle\";s:0:\"\";s:13:\"faq-accordion\";s:1:\"1\";s:19:\"faq-category-toggle\";s:1:\"0\";s:22:\"faq-category-accordion\";s:0:\"\";s:19:\"expand-collapse-all\";s:0:\"\";s:15:\"hide-categories\";s:0:\"\";s:9:\"hide-tags\";s:0:\"\";s:19:\"display-all-answers\";s:0:\"\";s:14:\"display-author\";s:0:\"\";s:12:\"display-date\";s:0:\"\";s:19:\"display-back-to-top\";s:0:\"\";s:17:\"group-by-category\";s:1:\"1\";s:23:\"group-by-category-count\";s:1:\"1\";s:17:\"category-order-by\";s:4:\"name\";s:21:\"category-hierarchical\";s:0:\"\";s:14:\"category-order\";s:3:\"asc\";s:12:\"faq-order-by\";s:5:\"title\";s:9:\"faq-order\";s:3:\"asc\";}'));\n?>"
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once 'wordpress/wp-load.php';\n\n$categories = [\n  'Location' => [\n    ['Q' => 'Where are you located?', 'A' => 'We are located at 123 Main Street, Suite 100, downtown. You can find us between Oak Ave and Elm St, just across from the central park.', 'tags' => ['address', 'directions']],\n    ['Q' => 'Do you have parking available?', 'A' => 'Yes! We have a free parking lot behind the building with 50 spaces. Street parking is also available on Main Street with a 2-hour limit.', 'tags' => ['parking', 'directions']],\n    ['Q' => 'Are you accessible by public transit?', 'A' => 'Absolutely. Bus routes 12 and 47 stop directly in front of our building. The nearest subway station is Central Station, a 5-minute walk away.', 'tags' => ['transit', 'accessibility']],\n    ['Q' => 'Do you have a second location?', 'A' => 'Yes, we recently opened a second location at 456 West Boulevard. It offers the same services and is open the same hours as our main location.', 'tags' => ['locations', 'branches']],\n    ['Q' => 'Is your location wheelchair accessible?', 'A' => 'Our premises are fully wheelchair accessible. We have ramp access at the front entrance, an elevator inside, and accessible restrooms on every floor.', 'tags' => ['accessibility', 'wheelchair']],\n    ['Q' => 'Can I visit without an appointment?', 'A' => 'Walk-ins are welcome during business hours, though we recommend booking ahead for consultations to minimize your wait time.', 'tags' => ['walk-in', 'appointment']],\n  ],\n  'Hours' => [\n    ['Q' => 'What are your business hours?', 'A' => 'We are open Monday through Friday from 9:00 AM to 6:00 PM, and Saturday from 10:00 AM to 4:00 PM. We are closed on Sundays.', 'tags' => ['hours', 'schedule']],\n    ['Q' => 'Are you open on public holidays?', 'A' => 'We are closed on major public holidays including New Year\\'s Day, Thanksgiving, and Christmas Day. Hours may vary on other holidays — check our website for updates.', 'tags' => ['holidays', 'schedule']],\n    ['Q' => 'Do you offer extended hours during peak seasons?', 'A' => 'Yes, during the holiday season (late November through December) we extend our hours to 8:00 PM on weekdays to accommodate increased demand.', 'tags' => ['holiday-hours', 'schedule']],\n    ['Q' => 'What time does your phone support close?', 'A' => 'Our phone lines are open Monday to Friday from 8:00 AM to 7:00 PM. Outside those hours, you can leave a voicemail or reach us via live chat.', 'tags' => ['phone', 'support-hours']],\n    ['Q' => 'Can I place an order outside of business hours?', 'A' => 'Yes, our online store is available 24/7. Orders placed outside business hours are processed the next business day.', 'tags' => ['online', 'ordering']],\n    ['Q' => 'Do you have a 24/7 emergency contact?', 'A' => 'For urgent matters, our emergency support line is available 24/7 at 1-800-555-0199. This line is reserved for critical issues only.', 'tags' => ['emergency', 'contact']],\n  ],\n  'Refunds' => [\n    ['Q' => 'What is your refund policy?', 'A' => 'We offer a 30-day money-back guarantee on all purchases. If you are not satisfied for any reason, contact us within 30 days of your purchase date for a full refund.', 'tags' => ['refund', 'policy']],\n    ['Q' => 'How long does a refund take to process?', 'A' => 'Refunds are typically processed within 3–5 business days. Depending on your bank or payment provider, it may take an additional 2–3 days to appear in your account.', 'tags' => ['refund', 'processing-time']],\n    ['Q' => 'Can I exchange a product instead of getting a refund?', 'A' => 'Yes! We are happy to offer an exchange within 30 days of purchase. Simply bring the item (or contact us for online orders) and we will help you find a suitable replacement.', 'tags' => ['exchange', 'return']],\n    ['Q' => 'Are there any non-refundable items?', 'A' => 'Digital downloads, gift cards, and items marked as final sale are non-refundable. All other products are eligible under our standard refund policy.', 'tags' => ['non-refundable', 'policy']],\n    ['Q' => 'Do I need a receipt to request a refund?', 'A' => 'A receipt or order confirmation number is required to process a refund. If you have lost it, we can look up your order using the email address used at purchase.', 'tags' => ['receipt', 'return']],\n    ['Q' => 'What if I received a damaged item?', 'A' => 'We sincerely apologize for any damaged items. Please contact us within 7 days with a photo of the damage and your order number, and we will arrange a replacement or full refund immediately.', 'tags' => ['damaged', 'return']],\n  ],\n  'Support' => [\n    ['Q' => 'How do I contact customer support?', 'A' => 'You can reach our support team by phone, email at support@example.com, or through the live chat widget on our website. We aim to respond to all inquiries within 24 hours.', 'tags' => ['contact', 'support']],\n    ['Q' => 'Do you offer live chat support?', 'A' => 'Yes, live chat is available on our website Monday through Friday from 9:00 AM to 5:00 PM. Look for the chat icon in the bottom-right corner of any page.', 'tags' => ['live-chat', 'support']],\n    ['Q' => 'How do I submit a support ticket?', 'A' => 'Visit our support portal at support.example.com and click \"Submit a Request\". Fill in the form with your issue details and you will receive a confirmation email with your ticket number.', 'tags' => ['ticket', 'support']],\n    ['Q' => 'What information should I have ready when contacting support?', 'A' => 'Having your order number, the email used at purchase, and a brief description of your issue will help us resolve your request as quickly as possible.', 'tags' => ['support', 'tips']],\n    ['Q' => 'Do you offer support in multiple languages?', 'A' => 'Currently we offer support in English, French, and Spanish. Simply indicate your preferred language when you reach out and we will connect you with the right agent.', 'tags' => ['languages', 'support']],\n    ['Q' => 'Is there a self-service knowledge base available?', 'A' => 'Yes! Our knowledge base at help.example.com contains hundreds of articles, guides, and video tutorials to help you troubleshoot common issues on your own.', 'tags' => ['self-service', 'knowledge-base']],\n  ],\n  'Phone & Contact' => [\n    ['Q' => 'What is your main phone number?', 'A' => 'Our main customer service line is 1-800-555-0100. We are available Monday to Friday, 9:00 AM to 6:00 PM Eastern Time.', 'tags' => ['phone', 'contact']],\n    ['Q' => 'Do you have a toll-free number?', 'A' => 'Yes, 1-800-555-0100 is our toll-free number available to callers within North America at no charge. International callers can reach us at +1-555-010-0100.', 'tags' => ['toll-free', 'phone']],\n    ['Q' => 'Can I reach you by fax?', 'A' => 'Our fax number is 1-800-555-0101. Please include your name and contact information on the cover sheet so we can follow up with you promptly.', 'tags' => ['fax', 'contact']],\n    ['Q' => 'What is the best way to reach you quickly?', 'A' => 'For the fastest response, we recommend using our live chat during business hours. For non-urgent matters, email typically receives a reply within one business day.', 'tags' => ['contact', 'tips']],\n    ['Q' => 'Do you accept text messages?', 'A' => 'Yes! You can text us at 1-800-555-0102 during business hours. Please include your name and a brief description of your question so we can assist you efficiently.', 'tags' => ['sms', 'contact']],\n    ['Q' => 'How do I update my contact information on file?', 'A' => 'You can update your contact details by logging into your account and visiting the Profile Settings page, or by contacting our support team directly and providing your new information.', 'tags' => ['account', 'contact']],\n  ],\n  'Products & Services' => [\n    ['Q' => 'What products do you offer?', 'A' => 'We offer a wide range of products including software licenses, physical goods, and digital downloads. Browse our full catalogue at shop.example.com to see all available options.', 'tags' => ['products', 'catalogue']],\n    ['Q' => 'Do you offer free trials?', 'A' => 'Yes, we offer a 14-day free trial on all our software plans. No credit card is required to start your trial — simply sign up and explore all features at no cost.', 'tags' => ['free-trial', 'software']],\n    ['Q' => 'Can I upgrade or downgrade my plan?', 'A' => 'You can change your plan at any time from your account dashboard. Upgrades take effect immediately and are prorated; downgrades take effect at the start of the next billing cycle.', 'tags' => ['plans', 'billing']],\n    ['Q' => 'Do you offer discounts for non-profits or educational institutions?', 'A' => 'Yes, we offer a 30% discount for registered non-profits and educational institutions. Contact our sales team with proof of status to have the discount applied to your account.', 'tags' => ['discounts', 'non-profit']],\n    ['Q' => 'Is there a bulk or volume pricing option?', 'A' => 'We offer tiered volume pricing for orders of 10 units or more. Please contact our sales department at sales@example.com for a custom quote tailored to your needs.', 'tags' => ['bulk', 'pricing']],\n    ['Q' => 'How do I cancel my subscription?', 'A' => 'You can cancel your subscription at any time from the Billing section of your account dashboard. Your access will continue until the end of the current billing period with no additional charges.', 'tags' => ['cancel', 'subscription']],\n  ],\n];\n\nforeach ($categories as $cat_name => $faqs) {\n  $cat = wp_insert_term($cat_name, 'ufaq-category');\n  $cat_id = is_wp_error($cat) ? $cat->error_data['term_exists'] : $cat['term_id'];\n  foreach ($faqs as $faq) {\n    $post_id = wp_insert_post([\n      'post_title'   => $faq['Q'],\n      'post_content' => '<p>' . $faq['A'] . '</p>',\n      'post_status'  => 'publish',\n      'post_type'    => 'ufaq',\n    ]);\n    wp_set_post_terms($post_id, [$cat_id], 'ufaq-category');\n    $tag_ids = [];\n    foreach ($faq['tags'] as $tag_slug) {\n      $tag = wp_insert_term($tag_slug, 'ufaq-tag');\n      $tag_ids[] = is_wp_error($tag) ? $tag->error_data['term_exists'] : $tag['term_id'];\n    }\n    wp_set_post_terms($post_id, $tag_ids, 'ufaq-tag');\n  }\n}\n?>"
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once 'wordpress/wp-load.php';\n$image_url = 'https://images.unsplash.com/photo-1665789318391-6057c533005e?q=80&w=1632&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D';\n$image_block = '<!-- wp:image {\"sizeSlug\":\"full\",\"linkDestination\":\"none\",\"align\":\"full\"} -->\n<figure class=\"wp-block-image alignfull size-full\"><img src=\"' . $image_url . '\" alt=\"Frequently Asked Questions Banner\"/></figure>\n<!-- /wp:image -->';\n$text_content = '<!-- wp:group {\"style\":{\"spacing\":{\"padding\":{\"top\":\"2rem\",\"bottom\":\"2rem\",\"left\":\"2rem\",\"right\":\"2rem\"}}},\"layout\":{\"type\":\"constrained\"}} -->\n<div class=\"wp-block-group\" style=\"padding-top:2rem;padding-bottom:2rem;padding-left:2rem;padding-right:2rem\">\n<!-- wp:paragraph -->\n<p>Thank you for checking out our Ultimate FAQs plugin!</p>\n<!-- /wp:paragraph -->\n<!-- wp:paragraph -->\n<p>The [[ultimate-faqs]] shortcode is all you need to display the FAQs on your page — your customers can use it to view answers to common questions.</p>\n<!-- /wp:paragraph -->\n<!-- wp:paragraph -->\n<p>You can control exactly what gets displayed to your customers from within the plugin settings.</p>\n<!-- /wp:paragraph -->\n<!-- wp:paragraph -->\n<p><a href=\"wp-admin/edit.php?post_type=ufaq\" class=\"view-admin-faqs\">📋 View Admin FAQs Screen</a></p>\n<!-- /wp:paragraph -->\n<!-- wp:shortcode -->[ultimate-faqs]<!-- /wp:shortcode -->\n</div>\n<!-- /wp:group -->';\nwp_insert_post(array('post_title' => 'Frequently Asked Questions','post_content' => $image_block . \"\\n\" . $text_content,'post_status' => 'publish','post_type' => 'page'));\n?>"
    }
  ],
  "login": true
}
