{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "/ultimate-addons-live-preview/",
  "preferredVersions": { "php": "8.3", "wp": "6.8" },
  "phpExtensionBundles": [ "kitchen-sink" ],
  "features": { "networking": true },
  "steps": [
    {
      "step": "installPlugin",
      "pluginData": { "resource": "url", "url": "https://downloads.wordpress.org/plugin/elementor.4.2.4.zip" },
      "options": { "activate": true }
    },
    {
      "step": "installPlugin",
      "pluginData": { "resource": "url", "url": "https://downloads.wordpress.org/plugin/ultimate-addons-for-elementor.2.0.zip" },
      "options": { "activate": true }
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire '/wordpress/wp-load.php';\n$page = get_page_by_path( 'ultimate-addons-live-preview' );\n$page_id = $page ? $page->ID : 0;\n$widget = function( $id, $type, $settings ) { return array( 'id' => $id, 'elType' => 'widget', 'isInner' => false, 'settings' => $settings, 'elements' => array(), 'widgetType' => $type ); };\n$widgets = array(\n    $widget( 'uae-preview-heading', 'headingss', array( 'style' => 'theme1', 'title' => 'Ultimate Addons for Elementor', 'content' => '<p>Explore the legacy-compatible Elementor widget collection.</p>', 'title_alignment' => 'center', 'titleclr' => '#222222', 'linewidth' => '280', 'borderwidth' => '2', 'borderclr' => '#4f46e5' ) ),\n    $widget( 'uae-preview-info-box', 'infobox', array( 'info_opt' => 'show_icon', 'info_icon' => array( 'value' => 'fas fa-star', 'library' => 'fa-solid' ), 'info_title' => 'Familiar Elementor controls', 'content' => '<p>Text, icon, link, responsive and interactive controls remain available.</p>', 'link' => 'none', 'btn_link' => array( 'url' => '#', 'is_external' => false, 'nofollow' => false ), 'effect' => 'mega_info_box', 'shadow' => 'nones', 'rib_title' => '' ) ),\n    $widget( 'uae-preview-button', 'advanced-btn', array( 'style' => 'hvr-fade', 'alignment' => 'center', 'btn_text' => 'View Elementor', 'btn_link' => array( 'url' => 'https://elementor.com/', 'is_external' => true, 'nofollow' => true ), 'icon_position' => 'left', 'btn_icon' => array( 'value' => 'fas fa-arrow-right', 'library' => 'fa-solid' ) ) ),\n    $widget( 'uae-preview-accordion', 'uae-accordion', array( 'theme' => 'accordion_theme_0', 'active' => 'false', 'animate' => '350', 'event' => 'click', 'titleclr' => '#222222', 'icon' => array( 'value' => 'fas fa-plus', 'library' => 'fa-solid' ), 'activeicon' => array( 'value' => 'fas fa-minus', 'library' => 'fa-solid' ), 'list_items' => array( array( '_id' => 'preview-item-one', 'title' => 'What is included?', 'titlebg' => '#f7f7f7', 'borderclr' => '#dddddd', 'descbg' => '#ffffff', 'borderclr2' => '#dddddd', 'content' => '<p>Twenty-two registered widgets and responsive frontend behavior.</p>' ), array( '_id' => 'preview-item-two', 'title' => 'Try the editor', 'titlebg' => '#f7f7f7', 'borderclr' => '#dddddd', 'descbg' => '#ffffff', 'borderclr2' => '#dddddd', 'content' => '<p>Open this page in Elementor to inspect the preserved controls.</p>' ) ) ) ),\n    $widget( 'uae-preview-modal', 'modalpopup', array( 'modal_posi' => '60', 'modal_width' => '600', 'style' => 'hvr-fade', 'alignment' => 'center', 'btn_text' => 'Open feature preview', 'btn_text2' => 'Open feature preview', 'btn_icon' => array( 'value' => 'fas fa-play', 'library' => 'fa-solid' ), 'modal_text' => 'Interactive widget preview', 'title_size' => '18', 'title_align' => 'left', 'title_clr' => '#222222', 'title_bg' => '#ffffff', 'title_line' => '#dddddd', 'popup_bg' => '#ffffff', 'content_padding' => array( 'top' => '20', 'right' => '20', 'bottom' => '20', 'left' => '20', 'unit' => 'px', 'isLinked' => true ), 'content' => '<p>This modal demonstrates a key interactive widget.</p>' ) )\n);\n$columns = array();\nforeach ( $widgets as $index => $item ) { $columns[] = array( 'id' => 'uae-preview-column-' . $index, 'elType' => 'column', 'isInner' => false, 'settings' => array( '_column_size' => 100 ), 'elements' => array( $item ) ); }\n$data = wp_json_encode( array( array( 'id' => 'uae-preview-section', 'elType' => 'section', 'isInner' => false, 'settings' => array(), 'elements' => $columns ) ) );\nif ( ! $page_id ) { $page_id = wp_insert_post( array( 'post_title' => 'Ultimate Addons Live Preview', 'post_name' => 'ultimate-addons-live-preview', 'post_status' => 'publish', 'post_type' => 'page', 'post_content' => '' ) ); }\nif ( $page_id && ! is_wp_error( $page_id ) ) { update_post_meta( $page_id, '_elementor_edit_mode', 'builder' ); update_post_meta( $page_id, '_elementor_template_type', 'wp-page' ); update_post_meta( $page_id, '_elementor_data', $data ); update_post_meta( $page_id, '_elementor_version', defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : '4.2.4' ); update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $page_id ); echo 'UAE_PREVIEW_PAGE=' . $page_id . PHP_EOL; echo 'UAE_PREVIEW_WIDGETS=' . count( $widgets ) . PHP_EOL; } else { echo 'UAE_PREVIEW_PAGE_ERROR' . PHP_EOL; }\n"
    },
    { "step": "login", "username": "admin", "password": "password" }
  ]
}
