=== Iyo Block Code Renderer for Scratch ===
Contributors: npmyj
Tags: scratch, education, code, block, coderdojo
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Visualize Scratch project code as block images in your posts and pages.

== Description ==

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](https://github.com/scratchblocks/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.

== Installation ==

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:

`<div class="scratchblocks">
when green flag clicked
say [Hello!]
</div>`

Note: Manually escape `<` and `>` characters (e.g. `&lt;` and `&gt;`) inside the block.

== Frequently Asked Questions ==

= Which languages are supported for block labels? =

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

= 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](https://github.com/kazweda/iyo-block-code-renderer-scratch/issues) 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.

== Changelog ==

= 1.1.7 =
* Add `Text Domain` and `Domain Path` headers and a `languages/` directory with a generated `.pot` file, enabling translation of the plugin listing via translate.wordpress.org.
* Add a FAQ entry about migrating from the pre-rename GitHub install to get automatic updates.

= 1.1.6 =
* Rename the plugin to "Iyo Block Code Renderer for Scratch" (and slug to iyo-block-code-renderer-scratch) to avoid implying affiliation with the Scratch trademark.
* Correct the Contributors field to the current WordPress.org username (npmyj).

= 1.1.5 =
* Explicitly load scratchblocks scripts in the footer ($in_footer = true), fixing Plugin Check's WordPress.WP.EnqueuedResourceParameters.NotInFooter warnings.
* Render the block-matching call via `wp_add_inline_script()` instead of a manual footer `<script>` tag.

= 1.1.4 =
* Add direct file access protection to the main plugin file, per Plugin Check's missing_direct_file_access_protection notice.

= 1.1.3 =
* Update "Tested up to" to WordPress 7.1, per Plugin Check's outdated_tested_upto_header notice.

= 1.1.2 =
* Update Author URI to the canonical non-www URL.
* Add a support/bug report link (GitHub issue tracker) to the FAQ.

= 1.1.1 =
* Align plugin header license declaration with GPLv2 or later and add License URI.

= 1.1.0 =
* Bundle the scratchblocks library (v3.7.1) with the plugin and load it from the plugin directory instead of an external CDN.
* Add readme.txt for WordPress.org plugin directory submission.

= 1.0.4 =
* Update scratchblocks to v3.7.1 (previously loaded from CDN).

= 1.0.3 =
* Maintenance update.

= 1.0.0 =
* Initial release.
