{"id":178200,"date":"2023-06-20T08:35:37","date_gmt":"2023-06-20T08:35:37","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/interactive-code-block\/"},"modified":"2025-12-22T16:51:08","modified_gmt":"2025-12-22T16:51:08","slug":"interactive-code-block","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/interactive-code-block\/","author":5911429,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.2.19","stable_tag":"0.2.19","tested":"6.9.4","requires":"6.1","requires_php":"7.0","requires_plugins":null,"header_name":"WordPress Playground Block","header_author":"Dawid Urba\u0144ski, Adam Zieli\u0144ski","header_description":"An interactive code block you can edit and run in your browser.","assets_banners_color":"fdfdfb","last_updated":"2025-12-22 16:51:08","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":5,"author_block_rating":5,"active_installs":200,"downloads":14234,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":1,"sections":["description"],"tags":{"0.1.7":{"tag":"0.1.7","author":"zieladam","date":"2024-03-05 16:30:44"},"0.1.8":{"tag":"0.1.8","author":"zieladam","date":"2024-03-06 15:05:31"},"0.1.9":{"tag":"0.1.9","author":"zieladam","date":"2024-03-19 19:42:39"},"0.2.0":{"tag":"0.2.0","author":"zieladam","date":"2024-03-19 19:57:24"},"0.2.1":{"tag":"0.2.1","author":"zieladam","date":"2024-03-19 20:02:04"},"0.2.10":{"tag":"0.2.10","author":"zieladam","date":"2024-07-17 15:16:26"},"0.2.11":{"tag":"0.2.11","author":"zieladam","date":"2024-07-17 16:07:39"},"0.2.12":{"tag":"0.2.12","author":"zieladam","date":"2024-07-23 23:41:38"},"0.2.13":{"tag":"0.2.13","author":"zieladam","date":"2024-07-30 22:37:22"},"0.2.14":{"tag":"0.2.14","author":"zieladam","date":"2024-08-09 20:09:48"},"0.2.15":{"tag":"0.2.15","author":"zieladam","date":"2024-08-19 14:15:22"},"0.2.16":{"tag":"0.2.16","author":"zieladam","date":"2024-09-07 04:06:19"},"0.2.17":{"tag":"0.2.17","author":"zieladam","date":"2024-09-25 13:56:03"},"0.2.18":{"tag":"0.2.18","author":"zieladam","date":"2025-12-22 16:42:14"},"0.2.19":{"tag":"0.2.19","author":"zieladam","date":"2025-12-22 16:51:08"},"0.2.2":{"tag":"0.2.2","author":"zieladam","date":"2024-04-26 11:15:07"},"0.2.3":{"tag":"0.2.3","author":"zieladam","date":"2024-05-06 12:50:28"},"0.2.4":{"tag":"0.2.4","author":"zieladam","date":"2024-05-08 14:07:10"},"0.2.5":{"tag":"0.2.5","author":"berislav.grgicak","date":"2024-05-20 11:08:21"},"0.2.6":{"tag":"0.2.6","author":"zieladam","date":"2024-05-22 23:17:47"},"0.2.7":{"tag":"0.2.7","author":"zieladam","date":"2024-05-22 23:59:38"},"0.2.8":{"tag":"0.2.8","author":"zieladam","date":"2024-05-23 00:06:40"},"0.2.9":{"tag":"0.2.9","author":"zieladam","date":"2024-06-05 12:14:45"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2928574,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2928574,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3022411,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3022411,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3425521,"resolution":false,"location":"assets","locale":"","contents":"{\"landingPage\":\"\\\/wp-admin\\\/post.php?post=4&action=edit\",\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installTheme\",\"themeZipFile\":{\"resource\":\"wordpress.org\\\/themes\",\"slug\":\"adventurer\"}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"interactive-code-block\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php require '\\\/wordpress\\\/wp-load.php'; wp_insert_post(['post_title' => 'WordPress Playground block demo!','post_content' => '<!-- wp:wordpress-playground\\\/playground \\\/-->', 'post_status' => 'publish', 'post_type' => 'post',]);\"}]}"}},"all_blocks":{"wordpress-playground\/playground":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":2,"name":"wordpress-playground\/playground","title":"WordPress Playground","category":"widgets","icon":"wordpress","description":"Display demo in WordPress Playground","keywords":["playground","wordpress","wordpress playground","play","code"],"attributes":{"align":{"type":"string","default":"wide"},"codeEditor":{"type":"boolean","default":false},"codeEditorSideBySide":{"type":"boolean","default":true},"codeEditorReadOnly":{"type":"boolean","default":false},"codeEditorMultipleFiles":{"type":"boolean","default":true},"codeEditorTranspileJsx":{"type":"boolean","default":false},"codeEditorMode":{"type":"string","default":"plugin"},"codeEditorErrorLog":{"type":"boolean","default":false},"constants":{"type":"object","default":{"WP_DEBUG":true,"WP_SCRIPT_DEBUG":true}},"files":{"type":"array","default":[{"name":"index.php","contents":"<?php\n\/**\n * Plugin Name: My WordPress plugin\n *\/\n"}]},"logInUser":{"type":"boolean","default":true},"landingPageUrl":{"type":"string"},"createNewPost":{"type":"boolean","default":false},"createNewPostType":{"type":"string","default":"post"},"createNewPostTitle":{"type":"string","default":"New Post"},"createNewPostContent":{"type":"string"},"redirectToPost":{"type":"boolean","default":false},"redirectToPostType":{"type":"string","default":"front"},"configurationSource":{"type":"string","default":"block-attributes"},"blueprintUrl":{"type":"string"},"blueprint":{"type":"string"},"requireLivePreviewActivation":{"type":"boolean","default":true}},"supports":{"html":false,"align":["full","wide"],"alignWide":true,"__experimentalLayout":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"padding":true}}},"textdomain":"wordpress-playground-block","editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":["file:.\/style-index.css","wp-components"],"viewScript":["file:.\/view.js","react","react-dom","wp-components"],"render":"file:.\/render.php"}},"tagged_versions":["0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.2.10","0.2.11","0.2.12","0.2.13","0.2.14","0.2.15","0.2.16","0.2.17","0.2.18","0.2.19","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9"],"block_files":["\/tags\/0.2.19\/build\/index.js","\/tags\/0.2.19\/build\/index.css","\/tags\/0.2.19\/build\/style-index.css"],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[172757],"plugin_tags":[1220,1214,451,221145],"plugin_category":[],"plugin_contributors":[223767,77594,221146],"plugin_business_model":[],"class_list":["post-178200","plugin","type-plugin","status-publish","hentry","plugin_section-block","plugin_tags-block","plugin_tags-code","plugin_tags-interactive","plugin_tags-playground","plugin_contributors-dawidurbanski","plugin_contributors-wordpressdotorg","plugin_contributors-zieladam","plugin_committers-berislavgrgicak","plugin_committers-bpayton","plugin_committers-dawidurbanski","plugin_committers-zieladam"],"banners":{"banner":"https:\/\/ps.w.org\/interactive-code-block\/assets\/banner-772x250.jpg?rev=3022411","banner_2x":"https:\/\/ps.w.org\/interactive-code-block\/assets\/banner-1544x500.jpg?rev=3022411","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/interactive-code-block\/assets\/icon-128x128.png?rev=2928574","icon_2x":"https:\/\/ps.w.org\/interactive-code-block\/assets\/icon-256x256.png?rev=2928574","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This WordPress block embeds WordPress Playground in your posts and pages. You can also include an interactive code editor to demonstrate and teach your readers how WordPress plugins are built.<\/p>\n\n<h3>Usage<\/h3>\n\n<ul>\n<li>Navigate to any post or page editing screen in WordPress.<\/li>\n<li>Click the '+' button to add a new block and search for 'WordPress Playground Block'.<\/li>\n<li>Select the WordPress Playground Block from the list of available blocks.<\/li>\n<li>A new WordPress Playground Block will be inserted into your post or page. You can start typing PHP code directly into the block.<\/li>\n<li>Click the 'Run' button to execute the code and see the results in the output area below the code block.<\/li>\n<\/ul>\n\n<h3>All features<\/h3>\n\n<ul>\n<li>Embed WordPress Playground<\/li>\n<li>Log in automatically<\/li>\n<li>Specify landing page<\/li>\n<li>Create new post or page<\/li>\n<li>Redirect to newly created post or page<\/li>\n<li>Specify blueprint to apply on init<\/li>\n<li>Enable\/disable code editor<\/li>\n<li>Make code editor read-only<\/li>\n<li>Allow multiple files in code editor<\/li>\n<\/ul>\n\n<h3>Resources<\/h3>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/WordPress\/playground-tools\/tree\/trunk\/packages\/wordpress-playground-block\">Source code<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/interactive-code-block\/\">WordPress Plugins page<\/a><\/li>\n<li><a href=\"https:\/\/developer.wordpress.org\/playground\">WordPress Playground<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.github.io\/wordpress-playground\/\">WordPress Playground repository<\/a><\/li>\n<\/ul>\n\n<h3>Support<\/h3>\n\n<p>For any issues or questions about the WordPress Playground Block, please open a GitHub issue in the <a href=\"https:\/\/github.com\/WordPress\/playground-tools\">playground-tools<\/a> repository.<\/p>\n\n<p><strong>This is an early preview to gather feedback and apply polish. This plugin isn't yet a well-rounded and feature-complete solution.<\/strong><\/p>\n\n<h3>License<\/h3>\n\n<p>The WordPress Playground Block Plugin is licensed under the GNU General Public License v2.0. This is a free software license that allows you to use, modify, and distribute the software, provided you adhere to its terms and conditions.<\/p>","raw_excerpt":"This WordPress block embeds WordPress Playground in your posts and pages. An optional interactive code editor allows readers to learn and explore.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/178200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/users\/5911429"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=178200"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=178200"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=178200"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=178200"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=178200"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=178200"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=178200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}