{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"description": "Any Block Carousel - Official Demo",
	"steps": [
		{
			"step": "login",
			"username": "admin",
			"password": "password"
		},
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "url",
				"url": "https://native-blocks-carousel.weblazer.fr/playground/plugin.zip?v=1780655650"
			}
		},
		{
			"step": "installTheme",
			"themeData": {
				"resource": "url",
				"url": "https://native-blocks-carousel.weblazer.fr/playground/theme.zip?v=1780655650"
			}
		},
		{
			"step": "activatePlugin",
			"pluginPath": "native-blocks-carousel/any-block-carousel-slider.php"
		},
		{
			"step": "activateTheme",
			"themeFolderName": "native-blocks-carousel"
		},
		{
			"step": "runPHP",
			"code": "<?php \nrequire_once 'wp-load.php';\nwp_delete_post( 1, true ); // Hello World\nwp_delete_post( 2, true ); // Sample Page\n"
		},
		{
			"step": "importWxr",
			"file": {
				"resource": "url",
				"url": "https://native-blocks-carousel.weblazer.fr/playground/demo-home.xml?v=1780655650"
			}
		},
		{
			"step": "setSiteOptions",
			"options": {
				"blogname": "Any Block Carousel Slider",
				"show_on_front": "page",
				"page_on_front": "2",
				"permalink_structure": "/%postname%/"
			}
		},
		{
			"step": "runPHP",
			"code": "<?php \nrequire_once 'wp-load.php';\nrequire_once ABSPATH . 'wp-admin/includes/image.php';\nrequire_once ABSPATH . 'wp-admin/includes/file.php';\nrequire_once ABSPATH . 'wp-admin/includes/media.php';\nrequire_once ABSPATH . 'wp-admin/includes/post.php';\n\n// 1. Set Site Icon\n$icon_url = 'https://native-blocks-carousel.weblazer.fr/playground/site-icon.png';\n$tmp = download_url($icon_url);\nif (!is_wp_error($tmp)) {\n    $file_array = array('name' => 'site-icon.png', 'tmp_name' => $tmp);\n    $attachment_id = media_handle_sideload($file_array, 0);\n    if (!is_wp_error($attachment_id)) {\n        update_option('site_icon', $attachment_id);\n    }\n}\n\n// 2. Set Site Logo\n$logo_url = 'https://native-blocks-carousel.weblazer.fr/wp-content/uploads/icon.svg';\n$tmp_logo = download_url($logo_url);\nif (!is_wp_error($tmp_logo)) {\n    $file_array = array('name' => 'icon.svg', 'tmp_name' => $tmp_logo);\n    $attachment_id = media_handle_sideload($file_array, 0);\n    if (!is_wp_error($attachment_id)) {\n        update_option('site_logo', $attachment_id);\n    }\n}\n\n// 3. Flush Rewrite Rules\nflush_rewrite_rules(true);\n\n// 4. Reset Theme and Clean FSE Caches\nif (function_exists('wp_clean_theme_json_cache')) {\n    wp_clean_theme_json_cache();\n}\nif (class_exists('WP_Theme_JSON_Resolver')) {\n    WP_Theme_JSON_Resolver::clean_cached_data();\n}\nwp_clean_themes_cache();\n\n// Re-activate theme to force rebuild of all FSE styles and transients\n$current_theme = get_stylesheet();\nswitch_theme($current_theme);\n\n// Delete FSE and theme transients\nglobal $wpdb;\n$wpdb->query(\"DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_wp_core_block_css_files%'\");\n$wpdb->query(\"DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_global_styles%'\");\n$wpdb->query(\"DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_theme_json%'\");\n\n// 5. Ensure the imported Home page is set as the Front Page\n$home_page = get_page_by_path('sample-page');\nif (!$home_page) {\n    $pages = get_pages(array(\n        'meta_key' => '_wp_page_template',\n        'meta_value' => 'default',\n        'hierarchical' => 0\n    ));\n    foreach ($pages as $p) {\n        if (strtolower($p->post_title) === 'home' || $p->post_name === 'home' || strtolower($p->post_title) === 'accueil') {\n            $home_page = $p;\n            break;\n        }\n    }\n}\nif ($home_page) {\n    update_option('show_on_front', 'page');\n    update_option('page_on_front', $home_page->ID);\n}\n\nwp_cache_flush();\n"
		}
	],
	"landingPage": "/"
}