Linux 软件免费装

Iyo Block Code Renderer for Scratch

开发者 npmyj
更新时间 2026年11月26日 09:22
PHP版本: 7.4 及以上
WordPress版本: 7.2
版权: GPLv2 or later
版权网址: 版权信息

标签

block code education scratch coderdojo

下载

1.1.6 1.1.7

详情介绍:

Iyo Block Code Renderer for Scratch lets you write Scratch-style pseudocode in your WordPress content and renders it as images of Scratch blocks, using the scratchblocks library. This is useful for tutorials, coding classes (such as CoderDojo), and documentation that references Scratch code. Bundled library This plugin bundles the scratchblocks JavaScript library (MIT License, Copyright 2013–2026 Tim Radvan). See assets/js/scratchblocks/LICENSE for the full license text.

安装:

  1. Upload the plugin files to the /wp-content/plugins/iyo-block-code-renderer-scratch directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress.
  3. Add a scratchblocks class element to your content and write Scratch pseudocode inside it:
when green flag clicked say [Hello!] Note: Manually escape < and > characters (e.g. < and >) inside the block. Note: Use <code> (or <pre>), not <div>. WordPress's wptexturize filter can rewrite plain punctuation such as a hyphen surrounded by spaces (-) into a dash character before the page is sent to the browser, and it only leaves the contents of <pre>, <code>, <kbd>, <style>, <script>, and <tt> tags untouched. If the block is inside a <div>, an operator like - can be silently corrupted, which makes scratchblocks render it as an unrecognized block (shown in red) instead of the intended operator block.

常见问题:

Which languages are supported for block labels?

Currently English (en) and Japanese (ja) are enabled.

Why does an operator like "-" sometimes render in red instead of its normal color?

This usually means the character reaching the browser is not a plain ASCII hyphen. WordPress's wptexturize filter can rewrite a hyphen surrounded by spaces into a dash character, and it only skips this rewriting inside <pre>, <code>, <kbd>, <style>, <script>, and <tt> tags. Write your Scratch pseudocode inside a <code class="scratchblocks"> element (or a <pre class="scratchblocks"> element) rather than a <div> to avoid this.

Where does the rendering happen?

Rendering happens entirely in the visitor's browser via JavaScript; no server-side processing or external requests are made.

Where can I report bugs or request features?

Please use the GitHub issue tracker for bug reports and feature requests.

I installed this plugin manually from GitHub before it was renamed. Will it auto-update?

The plugin (and its slug) was renamed from iyo-scratch-blocks ("Iyo Scratch Blocks") to iyo-block-code-renderer-scratch ("Iyo Block Code Renderer for Scratch"). WordPress core's automatic-update mechanism matches plugins by slug, so a copy installed manually under the old slug will not be picked up as an update to this listing. If you installed the old version manually, deactivate and delete it, then install "Iyo Block Code Renderer for Scratch" fresh from the WordPress.org directory (or via the "Add Plugins" screen) to get automatic updates going forward.

更新日志:

1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.4 1.0.3 1.0.0