Skip to content

Commit 9ad5b9a

Browse files
authored
Merge pull request #13 from rtCamp/feat/wordpress-playground-support
Feature: WordPress Playground
2 parents a64ddab + 91c5cb5 commit 9ad5b9a

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

blueprint.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
3+
"preferredVersions": {
4+
"php": "8.2",
5+
"wp": "latest"
6+
},
7+
"landingPage": "/",
8+
"steps": [
9+
{
10+
"step": "installPlugin",
11+
"pluginData": {
12+
"resource": "url",
13+
"url": "https://github.com/rtCamp/core-carousel/releases/latest/download/core-carousel.zip"
14+
}
15+
},
16+
{
17+
"step": "login",
18+
"username": "admin",
19+
"password": "password"
20+
},
21+
{
22+
"step": "runPHP",
23+
"code": "<?php require_once 'wordpress/wp-load.php';\n\n$post_content = '<!-- wp:heading -->\\n<h2 class=\"wp-block-heading\">Core Carousel: A Composable System</h2>\\n<!-- /wp:heading -->\\n\\n<!-- wp:paragraph -->\\n<p>This demo showcases the <strong>Core Carousel</strong> system. Notice how the navigation controls and dots are separate blocks, allowing for total layout freedom.</p>\\n<!-- /wp:paragraph -->\\n\\n<!-- wp:core-carousel/carousel {\"loop\":true,\"autoplay\":true,\"autoplayDelay\":4000,\"slideGap\":20} -->\\n<div class=\"wp-block-core-carousel-carousel\">\\n <!-- wp:core-carousel/carousel-viewport -->\\n <div class=\"wp-block-core-carousel-carousel-viewport\">\\n <!-- wp:core-carousel/carousel-slide -->\\n <div class=\"wp-block-core-carousel-carousel-slide\">\\n <!-- wp:cover {\"url\":\"https://s.w.org/images/core/5.9/architecture.jpg\",\"dimRatio\":50,\"minHeight\":400,\"minHeightUnit\":\"px\",\"isDark\":true} -->\\n <div class=\"wp-block-cover is-light\" style=\"min-height:400px\"><img class=\"wp-block-cover__image-background\" src=\"https://s.w.org/images/core/5.9/architecture.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading {\"textAlign\":\"center\",\"level\":3} --><h3 class=\"wp-block-heading has-text-align-center\">Slide One</h3><!-- /wp:heading --></div></div>\\n <!-- /wp:cover -->\\n </div>\\n <!-- /wp:core-carousel/carousel-slide -->\\n\\n <!-- wp:core-carousel/carousel-slide -->\\n <div class=\"wp-block-core-carousel-carousel-slide\">\\n <!-- wp:cover {\"url\":\"https://s.w.org/images/core/5.9/puebla.jpg\",\"dimRatio\":50,\"minHeight\":400,\"minHeightUnit\":\"px\",\"isDark\":true} -->\\n <div class=\"wp-block-cover is-light\" style=\"min-height:400px\"><img class=\"wp-block-cover__image-background\" src=\"https://s.w.org/images/core/5.9/puebla.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading {\"textAlign\":\"center\",\"level\":3} --><h3 class=\"wp-block-heading has-text-align-center\">Slide Two</h3><!-- /wp:heading --></div></div>\\n <!-- /wp:cover -->\\n </div>\\n <!-- /wp:core-carousel/carousel-slide -->\\n\\n <!-- wp:core-carousel/carousel-slide -->\\n <div class=\"wp-block-core-carousel-carousel-slide\">\\n <!-- wp:cover {\"url\":\"https://s.w.org/images/core/5.9/victoria.jpg\",\"dimRatio\":50,\"minHeight\":400,\"minHeightUnit\":\"px\",\"isDark\":true} -->\\n <div class=\"wp-block-cover is-light\" style=\"min-height:400px\"><img class=\"wp-block-cover__image-background\" src=\"https://s.w.org/images/core/5.9/victoria.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading {\"textAlign\":\"center\",\"level\":3} --><h3 class=\"wp-block-heading has-text-align-center\">Slide Three</h3><!-- /wp:heading --></div></div>\\n <!-- /wp:cover -->\\n </div>\\n <!-- /wp:core-carousel/carousel-slide -->\\n </div>\\n <!-- /wp:core-carousel/carousel-viewport -->\\n\\n <!-- wp:spacer {\"height\":\"20px\"} -->\\n <div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\\n <!-- /wp:spacer -->\\n\n <!-- wp:group {\"layout\":{\"type\":\"flex\",\"flexWrap\":\"nowrap\",\"justifyContent\":\"space-between\"}} -->\\n <div class=\"wp-block-group\">\\n <!-- wp:core-carousel/carousel-dots /-->\\n <!-- wp:core-carousel/carousel-controls /-->\\n </div>\\n <!-- /wp:group -->\\n</div>\\n<!-- /wp:core-carousel/carousel -->';\n\n$post_id = wp_insert_post( array(\n 'post_title' => 'Core Carousel Interactive Demo',\n 'post_content' => $post_content,\n 'post_status' => 'publish',\n 'post_type' => 'page',\n) );\n\nupdate_option( 'show_on_front', 'page' );\nupdate_option( 'page_on_front', $post_id );"
24+
}
25+
]
26+
}

0 commit comments

Comments
 (0)