Title: WordPress Playground 区块
Author: WordPress.org
Published: <strong>2023 年 6 月 20 日</strong>
Last modified: 2025 年 12 月 22 日

---

搜索插件

![](https://ps.w.org/interactive-code-block/assets/banner-772x250.jpg?rev=3022411)

![](https://ps.w.org/interactive-code-block/assets/icon-256x256.png?rev=2928574)

# WordPress Playground 区块

 作者：[WordPress.org](https://profiles.wordpress.org/wordpressdotorg/)

[下载](https://downloads.wordpress.org/plugin/interactive-code-block.0.2.19.zip)

[实时预览](https://cn.wordpress.org/plugins/interactive-code-block/?preview=1)

 * [详情](https://cn.wordpress.org/plugins/interactive-code-block/#description)
 * [评价](https://cn.wordpress.org/plugins/interactive-code-block/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/interactive-code-block/#developers)

 [支持](https://wordpress.org/support/plugin/interactive-code-block/)

## 描述

该 WordPress 区块可将 WordPress Playground 嵌入到您的文章和页面中。您还可以加入一个
交互式代码编辑器，向读者演示和教授 WordPress 插件是如何构建的。

### 用法

 * 导航到 WordPress 中的任何文章或页面编辑界面。
 * Click the ‘+’ button to add a new block and search for ‘WordPress Playground 
   Block’.
 * Select the WordPress Playground Block from the list of available blocks.
 * 一个新的 WordPress Playground 代码块将被插入到您的帖子或页面中。您可以直接在区块
   中输入 PHP 代码。
 * 单击“运行”按钮执行代码，并在代码块下方的输出区域查看结果。

### 所有功能

 * 嵌入 WordPress Playground
 * 自动登录
 * 指定着陆页面
 * 创建新文章或页面
 * 重定向到新建的帖子或页面
 * 指定要在启动时应用的蓝图
 * 启用/禁用代码编辑器
 * 将代码编辑器设为只读
 * 允许在代码编辑器中使用多个文件

### 资源

 * [源码](https://github.com/WordPress/playground-tools/tree/trunk/packages/wordpress-playground-block)
 * [WordPress 插件页面](https://wordpress.org/plugins/interactive-code-block/)
 * [WordPress Playground](https://developer.wordpress.org/playground)
 * [WordPress Playground 知识库](https://wordpress.github.io/wordpress-playground/)

### 支持

有关 WordPress Playground 区块的任何问题或疑问，请在 [playground-tools](https://github.com/WordPress/playground-tools)
存储库中打开一个 GitHub issue。

**这是一个早期预览版，旨在收集反馈并进行改进。该插件还不是一个功能全面的解决方案。**

### 许可协议

WordPress Playground 区块插件采用 GNU General Public License v2.0 许可。这是一种
自由软件许可，只要遵守其条款和条件，就可以使用、修改和发布该软件。

## 区块

该插件提供了 1 个区块.

 *   WordPress Playground Display demo in WordPress Playground

## 评价

![](https://secure.gravatar.com/avatar/ba300a63f85ca4db6b0881a2262e1d026c37ecef7e7e35c06b765ca2168bafc3?
s=60&d=retro&r=g)

### 󠀁[It’s so great!](https://wordpress.org/support/topic/its-so-great-2/)󠁿

 [风屿Wind](https://profiles.wordpress.org/hhjmk8/) 2024 年 3 月 30 日

I’m already using this block in my website, it’s so great!

![](https://secure.gravatar.com/avatar/f6352e6291c969d7a2f2c3344e2492df5e4f1699e52699cb30d9df8a194d7120?
s=60&d=retro&r=g)

### 󠀁[I Love it](https://wordpress.org/support/topic/i-love-it-949/)󠁿

 [Benjamin Hagh Parast](https://profiles.wordpress.org/haghs/) 2024 年 1 月 12 日

It’s really helpful!

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/interactive-code-block/reviews/)

## 贡献者及开发者

「WordPress Playground 区块」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ WordPress.org ](https://profiles.wordpress.org/wordpressdotorg/)
 *   [ Dawid Urbanski ](https://profiles.wordpress.org/dawidurbanski/)
 *   [ Adam Zieliński ](https://profiles.wordpress.org/zieladam/)

「WordPress Playground 区块」插件已被翻译至 7 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/interactive-code-block/contributors)
为本插件所做的贡献。

[帮助将「WordPress Playground 区块」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/interactive-code-block)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/interactive-code-block/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/interactive-code-block/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/interactive-code-block/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/interactive-code-block/)。

## 额外信息

 *  版本 **0.2.19**
 *  最后更新：**6 月前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 6.1 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [Chinese (China)](https://cn.wordpress.org/plugins/interactive-code-block/) 、
   [Chinese (Taiwan)](https://tw.wordpress.org/plugins/interactive-code-block/) 、
   [English (US)](https://wordpress.org/plugins/interactive-code-block/) 、 [German](https://de.wordpress.org/plugins/interactive-code-block/)、
   [Portuguese (Brazil)](https://br.wordpress.org/plugins/interactive-code-block/)、
   [Portuguese (Portugal)](https://pt.wordpress.org/plugins/interactive-code-block/)、
   [Swedish](https://sv.wordpress.org/plugins/interactive-code-block/) 和 [Vietnamese](https://vi.wordpress.org/plugins/interactive-code-block/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/interactive-code-block)
 * 标签
 * [block](https://cn.wordpress.org/plugins/tags/block/)[code](https://cn.wordpress.org/plugins/tags/code/)
   [interactive](https://cn.wordpress.org/plugins/tags/interactive/)[playground](https://cn.wordpress.org/plugins/tags/playground/)
 *  [高级视图](https://cn.wordpress.org/plugins/interactive-code-block/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/interactive-code-block/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/interactive-code-block/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/interactive-code-block/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/interactive-code-block/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/interactive-code-block/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/interactive-code-block/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/interactive-code-block/reviews/)

## 贡献者

 *   [ WordPress.org ](https://profiles.wordpress.org/wordpressdotorg/)
 *   [ Dawid Urbanski ](https://profiles.wordpress.org/dawidurbanski/)
 *   [ Adam Zieliński ](https://profiles.wordpress.org/zieladam/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/interactive-code-block/)