{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"landingPage": "/",
	"preferredVersions": {
		"php": "8.2",
		"wp": "latest"
	},
	"steps": [
		{
			"step": "login",
			"username": "admin",
			"password": "password"
		},
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "wpwing-sticky-block"
			},
			"options": {
				"activate": true
			}
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $nav = '<!-- wp:wpwing/sticky-block {\"zIndex\":100,\"stickyBackground\":\"#ffffff\",\"stickyShadow\":\"sm\",\"fullWidthWhenSticky\":true} --><div data-top-space=\"0\" data-check-for-admin=\"true\" data-z-index=\"100\" data-scroll-direction=\"always\" data-sticky-bg=\"#ffffff\" data-sticky-shadow=\"sm\" data-full-width-when-sticky=\"true\" class=\"wp-block-wpwing-sticky-block\"><!-- wp:group {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"space-between\",\"flexWrap\":\"nowrap\"}} --><div class=\"wp-block-group\"><!-- wp:site-title /--><!-- wp:navigation {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"right\"}} --><!-- wp:page-list /--><!-- /wp:navigation --></div><!-- /wp:group --></div><!-- /wp:wpwing/sticky-block -->'; $cookie = '<!-- wp:wpwing/sticky-block {\"stickyPosition\":\"bottom\",\"fullWidthWhenSticky\":true,\"dismissible\":true,\"dismissExpiry\":30,\"stickyBackground\":\"#1e1e1e\",\"stickyTextColor\":\"#ffffff\"} --><div data-top-space=\"0\" data-check-for-admin=\"true\" data-z-index=\"1\" data-scroll-direction=\"always\" data-sticky-bg=\"#1e1e1e\" data-sticky-text-color=\"#ffffff\" data-full-width-when-sticky=\"true\" data-sticky-position=\"bottom\" data-bottom-space=\"0\" data-dismissible=\"true\" data-dismiss-expiry=\"30\" class=\"wp-block-wpwing-sticky-block\"><button type=\"button\" class=\"wpwing-sticky-dismiss wpwing-sticky-dismiss--right\" aria-label=\"Dismiss\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1 1l12 12M13 1L1 13\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\"></path></svg></button><!-- wp:group {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"space-between\",\"flexWrap\":\"wrap\"}} --><div class=\"wp-block-group\"><!-- wp:paragraph --><p>We use cookies to improve your experience on this site. By continuing to browse, you agree to our use of cookies.</p><!-- /wp:paragraph --><!-- wp:buttons --><div class=\"wp-block-buttons\"><!-- wp:button --><div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\">Accept</a></div><!-- /wp:button --></div><!-- /wp:buttons --></div><!-- /wp:group --></div><!-- /wp:wpwing/sticky-block -->'; $cta = '<!-- wp:wpwing/sticky-block {\"revealMode\":\"scroll\",\"scrollTriggerType\":\"percent\",\"scrollTriggerPercent\":30,\"stickyPosition\":\"bottom\",\"dismissible\":true,\"dismissExpiry\":7,\"stickyBorderRadius\":8,\"stickyShadow\":\"md\",\"stickyExtraClass\":\"wpwing-pattern-floating-cta\"} --><div data-reveal-mode=\"scroll\" data-scroll-trigger-type=\"percent\" data-scroll-trigger-percent=\"30\" data-top-space=\"0\" data-check-for-admin=\"true\" data-z-index=\"1\" data-scroll-direction=\"always\" data-sticky-shadow=\"md\" data-sticky-border-radius=\"8\" data-sticky-extra-class=\"wpwing-pattern-floating-cta\" data-sticky-position=\"bottom\" data-bottom-space=\"0\" data-dismissible=\"true\" data-dismiss-expiry=\"7\" class=\"wp-block-wpwing-sticky-block\"><button type=\"button\" class=\"wpwing-sticky-dismiss wpwing-sticky-dismiss--right\" aria-label=\"Dismiss\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M1 1l12 12M13 1L1 13\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\"></path></svg></button><!-- wp:buttons --><div class=\"wp-block-buttons\"><!-- wp:button --><div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\">Get Started</a></div><!-- /wp:button --></div><!-- /wp:buttons --></div><!-- /wp:wpwing/sticky-block -->'; $top = '<!-- wp:wpwing/sticky-block {\"revealMode\":\"scroll\",\"scrollTriggerType\":\"percent\",\"scrollTriggerPercent\":20,\"stickyPosition\":\"bottom\",\"hideBeforeSticky\":true,\"stickyBorderRadius\":999,\"stickyShadow\":\"sm\",\"stickyExtraClass\":\"wpwing-pattern-back-to-top\"} --><div data-reveal-mode=\"scroll\" data-scroll-trigger-type=\"percent\" data-scroll-trigger-percent=\"20\" data-top-space=\"0\" data-check-for-admin=\"true\" data-z-index=\"1\" data-scroll-direction=\"always\" data-sticky-shadow=\"sm\" data-sticky-border-radius=\"999\" data-sticky-extra-class=\"wpwing-pattern-back-to-top\" data-sticky-position=\"bottom\" data-bottom-space=\"0\" data-hide-before-sticky=\"true\" class=\"wp-block-wpwing-sticky-block\"><!-- wp:buttons {\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"}} --><div class=\"wp-block-buttons\"><!-- wp:button --><div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"#\">↑ Back to top</a></div><!-- /wp:button --></div><!-- /wp:buttons --></div><!-- /wp:wpwing/sticky-block -->'; $filler = '<!-- wp:heading --><h2>Welcome to the Sticky Block Playground Demo</h2><!-- /wp:heading --><!-- wp:paragraph --><p>This interactive demo showcases all four built-in presets in action without writing a single line of code:</p><!-- /wp:paragraph --><!-- wp:list --><ul><li><strong>Sticky Nav Bar:</strong> Fixed to the top when scrolling past, spans full width, with custom background and shadow.</li><li><strong>Cookie Notice Bar:</strong> Anchored to the viewport bottom, with dismiss button and 30-day expiry.</li><li><strong>Back to Top Button:</strong> Appears after scrolling past 20% of the page.</li><li><strong>Floating CTA:</strong> Corner-anchored button that reveals after scrolling 30% down the page.</li></ul><!-- /wp:list -->'; for ($i = 1; $i <= 10; $i++) { $filler .= '<!-- wp:heading --><h2>Section ' . $i . '</h2><!-- /wp:heading --><!-- wp:paragraph --><p>Keep scrolling down to see the Back to Top button appear at 20% scroll, followed by the corner Floating CTA at 30% scroll. The top navigation bar stays pinned smoothly to the top of the viewport.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><!-- /wp:paragraph -->'; } $post_id = wp_insert_post(array('post_title' => 'Sticky Block Demo', 'post_name' => 'sticky-block-demo', 'post_status' => 'publish', 'post_type' => 'page', 'post_content' => $nav . $filler . $cookie . $cta . $top)); update_option('show_on_front', 'page'); update_option('page_on_front', $post_id);"
		}
	]
}
