{
    "$schema": "https://playground.wordpress.net/blueprint-schema.json",
    "landingPage": "/",
    "preferredVersions": {
        "php": "8.3",
        "wp": "latest"
    },
    "steps": [
        {
            "step": "login",
            "username": "admin",
            "password": "password"
        },
        {
            "step": "setSiteOptions",
            "options": {
                "permalink_structure": "/%postname%/",
                "blogname": "AI Translate Demo",
                "blogdescription": "Experience multilingual websites with AI-powered translation"
            }
        },
        {
            "step": "installPlugin",
            "pluginZipFile": {
                "resource": "wordpress.org/plugins",
                "slug": "ai-translate"
            },
            "options": {
                "activate": true
            }
        },
        {
            "step": "runPHP",
            "code": "<?php\nrequire_once '/wordpress/wp-load.php';\n\n// Create homepage\n$homepage_id = wp_insert_post(array(\n    'post_title' => 'Welcome to AI Translate',\n    'post_content' => '<h2>Experience Multilingual Websites</h2><p>AI Translate automatically translates your entire website using advanced artificial intelligence. This demo site showcases how the plugin translates pages, posts, titles, menus, and more in real-time.</p><h3>Key Features</h3><ul><li><strong>Smart AI Analysis</strong> – The AI analyzes your website to understand your brand and terminology</li><li><strong>Intelligent Caching</strong> – Fast performance with smart caching that updates automatically</li><li><strong>SEO-Friendly</strong> – Automatic hreflang tags and translated URL slugs</li><li><strong>25+ Languages</strong> – Support for all major world languages</li></ul><p>Use the language switcher in the bottom left corner to see translations in action!</p>',\n    'post_status' => 'publish',\n    'post_type' => 'page'\n));\n\n// Set as homepage\nif ($homepage_id) {\n    update_option('page_on_front', $homepage_id);\n    update_option('show_on_front', 'page');\n}\n\n// Create About page\n$about_id = wp_insert_post(array(\n    'post_title' => 'About Us',\n    'post_content' => '<h2>About Our Company</h2><p>We are a leading technology company specializing in multilingual website solutions. Our mission is to break down language barriers and make content accessible to everyone, everywhere.</p><h3>Our Services</h3><p>We provide AI-powered translation solutions that help businesses reach global audiences. Our technology automatically translates websites while maintaining SEO optimization and performance.</p>',\n    'post_status' => 'publish',\n    'post_type' => 'page'\n));\n\n// Create Services page\n$services_id = wp_insert_post(array(\n    'post_title' => 'Our Services',\n    'post_content' => '<h2>What We Offer</h2><ul><li><strong>Website Translation</strong> – Automatic translation of all your content</li><li><strong>SEO Optimization</strong> – Translated URLs and hreflang tags for better search rankings</li><li><strong>Smart Caching</strong> – Fast loading times with intelligent cache management</li><li><strong>Multi-language Support</strong> – Support for 25+ languages out of the box</li></ul>',\n    'post_status' => 'publish',\n    'post_type' => 'page'\n));\n\n// Create Contact page\n$contact_id = wp_insert_post(array(\n    'post_title' => 'Contact',\n    'post_content' => '<h2>Get in Touch</h2><p>Have questions about AI Translate? We would love to hear from you!</p><p><strong>Email:</strong> info@example.com<br><strong>Phone:</strong> +1 (555) 123-4567</p><p>Fill out the form below and we will get back to you as soon as possible.</p>',\n    'post_status' => 'publish',\n    'post_type' => 'page'\n));\n\n// Create a blog post\nwp_insert_post(array(\n    'post_title' => 'Why Multilingual Websites Matter',\n    'post_content' => '<p>In today\\'s global marketplace, reaching international audiences is crucial for business success. A multilingual website allows you to connect with customers in their native language, improving engagement and conversions.</p><h3>Benefits of Translation</h3><ul><li>Reach a wider audience</li><li>Improve user experience</li><li>Boost SEO rankings in multiple markets</li><li>Increase conversion rates</li></ul>',\n    'post_status' => 'publish',\n    'post_type' => 'post'\n));\n\n// Create a menu\n$menu_id = wp_create_nav_menu('Main Menu');\nif ($menu_id && !is_wp_error($menu_id)) {\n    if ($homepage_id) {\n        wp_update_nav_menu_item($menu_id, 0, array(\n            'menu-item-title' => 'Home',\n            'menu-item-object-id' => $homepage_id,\n            'menu-item-object' => 'page',\n            'menu-item-type' => 'post_type',\n            'menu-item-status' => 'publish'\n        ));\n    }\n    if ($about_id) {\n        wp_update_nav_menu_item($menu_id, 0, array(\n            'menu-item-title' => 'About Us',\n            'menu-item-object-id' => $about_id,\n            'menu-item-object' => 'page',\n            'menu-item-type' => 'post_type',\n            'menu-item-status' => 'publish'\n        ));\n    }\n    if ($services_id) {\n        wp_update_nav_menu_item($menu_id, 0, array(\n            'menu-item-title' => 'Services',\n            'menu-item-object-id' => $services_id,\n            'menu-item-object' => 'page',\n            'menu-item-type' => 'post_type',\n            'menu-item-status' => 'publish'\n        ));\n    }\n    if ($contact_id) {\n        wp_update_nav_menu_item($menu_id, 0, array(\n            'menu-item-title' => 'Contact',\n            'menu-item-object-id' => $contact_id,\n            'menu-item-object' => 'page',\n            'menu-item-type' => 'post_type',\n            'menu-item-status' => 'publish'\n        ));\n    }\n    \n    // Assign menu to primary location if available\n    $locations = get_theme_mod('nav_menu_locations');\n    if (!$locations) {\n        $locations = array();\n    }\n    $locations['primary'] = $menu_id;\n    set_theme_mod('nav_menu_locations', $locations);\n}\n\n?>"
        }
    ]
}

