{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"preferredVersions": {
		"php": "8.0",
		"wp": "latest"
	},
	"features": {
		"networking": true
	},
	"steps": [
		{
			"step": "login",
			"username": "admin"
		},
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "inline-context"
			},
			"options": {
				"activate": true
			}
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/themes/twentytwentyfour/functions.php",
			"data": "<?php\n// Enable block editor for demo content\nadd_filter( 'use_block_editor_for_post', '__return_true' );\n"
		},
		{
			"step": "runPHP",
			"code": "<?php\nrequire_once 'wordpress/wp-load.php';\n\n// Create a demo post with inline context examples\n$post_content = '\n<!-- wp:paragraph -->\n<p>The <a class=\"wp-inline-context\" data-inline-context=\"<p>A <strong>blockchain</strong> is a distributed ledger technology that maintains a secure and decentralized record of transactions.</p>\" data-anchor-id=\"context-note-1732800000000-abc\" href=\"#context-note-1732800000000-abc\" role=\"button\" aria-expanded=\"false\">blockchain</a> is revolutionizing digital transactions.</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Scientists have discovered that <a class=\"wp-inline-context\" data-inline-context=\"<p>Photosynthesis is the process by which plants convert light energy into chemical energy, producing oxygen as a byproduct.</p>\" data-anchor-id=\"context-note-1732800000001-def\" href=\"#context-note-1732800000001-def\" role=\"button\" aria-expanded=\"false\">photosynthesis</a> plays a crucial role in maintaining Earth\\'s atmosphere.</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>The concept of <a class=\"wp-inline-context\" data-inline-context=\"<p><strong>Machine learning</strong> is a subset of artificial intelligence that enables computers to learn from data without being explicitly programmed. It uses algorithms to identify patterns and make predictions.</p>\" data-anchor-id=\"context-note-1732800000002-ghi\" href=\"#context-note-1732800000002-ghi\" role=\"button\" aria-expanded=\"false\">machine learning</a> has transformed modern technology.</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 class=\"wp-block-heading\">Getting Started</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Click any underlined term above to reveal its context note. Click again to hide it. You can also use the block editor to add your own inline context notes!</p>\n<!-- /wp:paragraph -->\n';\n\n$demo_post = array(\n    'post_title'    => 'Welcome to Inline Context Demo',\n    'post_content'  => $post_content,\n    'post_status'   => 'publish',\n    'post_author'   => 1,\n    'post_type'     => 'post',\n);\n\n$post_id = wp_insert_post( $demo_post );\n\nif ( $post_id ) {\n    echo 'Demo post created successfully with ID: ' . $post_id;\n} else {\n    echo 'Failed to create demo post';\n}\n?>"
		},
		{
			"step": "runPHP",
			"code": "<?php\nrequire_once 'wordpress/wp-load.php';\n\n// Create demo categories for inline context\n$categories = array(\n    array(\n        'name' => 'Technology',\n        'slug' => 'technology',\n        'meta' => array(\n            'icon_closed' => 'dashicons-laptop',\n            'icon_open' => 'dashicons-laptop',\n            'color' => '#0073aa'\n        )\n    ),\n    array(\n        'name' => 'Science',\n        'slug' => 'science',\n        'meta' => array(\n            'icon_closed' => 'dashicons-lightbulb',\n            'icon_open' => 'dashicons-lightbulb',\n            'color' => '#00a32a'\n        )\n    ),\n    array(\n        'name' => 'Definition',\n        'slug' => 'definition',\n        'meta' => array(\n            'icon_closed' => 'dashicons-book',\n            'icon_open' => 'dashicons-book',\n            'color' => '#826eb4'\n        )\n    )\n);\n\nforeach ( $categories as $cat ) {\n    $term = wp_insert_term( $cat['name'], 'inline_context_category', array( 'slug' => $cat['slug'] ) );\n    if ( ! is_wp_error( $term ) ) {\n        foreach ( $cat['meta'] as $key => $value ) {\n            update_term_meta( $term['term_id'], $key, $value );\n        }\n    }\n}\n\necho 'Demo categories created successfully';\n?>"
		},
		{
			"step": "setSiteOptions",
			"options": {
				"blogname": "Inline Context Demo",
				"blogdescription": "Try the Inline Context plugin on WordPress Playground"
			}
		}
	]
}
