Skip to content

Commit ec5a6a9

Browse files
committed
feat(blueprint): add WordPress Playground blueprint
Adds a WordPress Playground blueprint configuration and a "Test with WordPress Playground" badge to the README. This allows users to preview the plugin's iframe block functionality in a live environment with a pre-configured demo page.
1 parent dfce255 commit ec5a6a9

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
3+
"landingPage": "/blockparty-iframe-demo/",
4+
"preferredVersions": {
5+
"php": "8.1",
6+
"wp": "latest"
7+
},
8+
"steps": [
9+
{
10+
"step": "installPlugin",
11+
"pluginData": {
12+
"resource": "git:directory",
13+
"url": "https://github.com/BeAPI/blockparty-iframe",
14+
"ref": "1.1.1",
15+
"refType": "tag"
16+
},
17+
"options": {
18+
"activate": true,
19+
"targetFolderName": "blockparty-iframe"
20+
}
21+
},
22+
{
23+
"step": "login",
24+
"username": "admin",
25+
"password": "password"
26+
},
27+
{
28+
"step": "runPHP",
29+
"code": "<?php require_once 'wordpress/wp-load.php'; $page_content = '<!-- wp:blockparty/iframe {\"title\":\"Johannes Gutenberg — Wikipédia\",\"url\":\"https://en.wikipedia.org/wiki/Johannes_Gutenberg\",\"align\":\"wide\"} -->\n<div class=\"wp-block-blockparty-iframe alignwide\"><iframe title=\"Johannes Gutenberg — Wikipédia\" src=\"https://en.wikipedia.org/wiki/Johannes_Gutenberg\" loading=\"eager\"></iframe></div>\n<!-- /wp:blockparty/iframe -->'; $page_id = wp_insert_post( array( 'post_title' => 'Blockparty Iframe', 'post_name' => 'blockparty-iframe-demo', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page' ) ); echo 'Page created with ID: ' . $page_id; ?>"
30+
}
31+
]
32+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Blockparty — Iframe
22

3+
[![Test with WordPress Playground](https://img.shields.io/badge/Test%20with-WordPress%20Playground-0073aa?style=for-the-badge&logo=wordpress&logoColor=white)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/beapi/blockparty-iframe/refs/heads/main/.wordpress-org/blueprints/blueprint.json)
4+
35
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/gpl-2.0)
46
[![WordPress: 6.7+](https://img.shields.io/badge/WordPress-6.7+-green.svg)](https://wordpress.org/)
57
[![PHP: 8.1+](https://img.shields.io/badge/PHP-8.1+-purple.svg)](https://php.net/)

0 commit comments

Comments
 (0)