{
  "landingPage": "/wp-admin/post.php?post=2&action=elementor",
  "preferredVersions": {
    "php": "8.0",
    "wp": "latest"
  },
  "phpExtensionBundles": [
    "kitchen-sink"
  ],
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginZipFile": {
        "resource": "wordpress.org/plugins",
        "slug": "elementor"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "installPlugin",
      "pluginZipFile": {
        "resource": "wordpress.org/plugins",
        "slug": "magic-copy-for-elementor"
      },
      "options": {
        "activate": true
      }
    },
    {
      "step": "runPHP",
      "code": "<?php\n// Playground runPHP may execute without WP loaded; load core functions first.\nif ( ! function_exists( 'get_post' ) ) {\n    require_once 'wordpress/wp-load.php';\n}\n\n$page_id = 2;\n$page = get_post( $page_id );\n\nif ( $page && 'page' === $page->post_type ) {\n    wp_update_post(\n        array(\n            'ID'          => $page_id,\n            'post_title'  => 'Magic Copy Demo Page',\n            'post_status' => 'publish',\n        )\n    );\n} else {\n    $page_id = wp_insert_post(\n        array(\n            'import_id'   => $page_id,\n            'post_type'   => 'page',\n            'post_title'  => 'Magic Copy Demo Page',\n            'post_status' => 'publish',\n        )\n    );\n}\n\n$elementor_data = array(\n    array(\n        'id'       => 'mc_demo_section',\n        'elType'   => 'section',\n        'settings' => array(\n            'layout'                  => 'full_width',\n            'content_width'           => 'boxed',\n            'background_background'   => 'classic',\n            'background_color'        => '#f6f4ee',\n            'padding'                 => array(\n                'unit' => 'px',\n                'top' => '80',\n                'right' => '20',\n                'bottom' => '80',\n                'left' => '20',\n                'isLinked' => false\n            ),\n        ),\n        'elements' => array(\n            array(\n                'id'       => 'mc_demo_column',\n                'elType'   => 'column',\n                'settings' => array(\n                    '_column_size' => 100,\n                ),\n                'elements' => array(\n                    array(\n                        'id'         => 'mc_demo_heading',\n                        'elType'     => 'widget',\n                        'widgetType' => 'heading',\n                        'settings'   => array(\n                            'title' => 'Magic Copy for Elementor',\n                            'size'  => 'xl',\n                        ),\n                        'elements'   => array(),\n                    ),\n                    array(\n                        'id'         => 'mc_demo_text',\n                        'elType'     => 'widget',\n                        'widgetType' => 'text-editor',\n                        'settings'   => array(\n                            'editor' => '<p>This preview opens with Elementor ready.</p><p>Enable <strong>Magic Copy</strong> on a widget from the Advanced tab, then view the page on the frontend and hover the element to see the copy button.</p>',\n                        ),\n                        'elements'   => array(),\n                    ),\n                    array(\n                        'id'         => 'mc_demo_button',\n                        'elType'     => 'widget',\n                        'widgetType' => 'button',\n                        'settings'   => array(\n                            'text' => 'Preview on Frontend',\n                            'link' => array(\n                                'url' => '/?page_id=' . $page_id,\n                                'is_external' => '',\n                                'nofollow' => '',\n                                'custom_attributes' => ''\n                            ),\n                            'align' => 'center',\n                            'size'  => 'md',\n                        ),\n                        'elements'   => array(),\n                    ),\n                ),\n            ),\n        ),\n    ),\n);\n\nupdate_post_meta( $page_id, '_elementor_edit_mode', 'builder' );\nupdate_post_meta( $page_id, '_elementor_template_type', 'wp-page' );\nupdate_post_meta( $page_id, '_elementor_version', '3.35.0' );\nupdate_post_meta( $page_id, '_elementor_data', wp_slash( wp_json_encode( $elementor_data ) ) );\n"
    }
  ]
}
