Repository navigation
Custom Hook Block 2.1.0 adds optional interaction inside PHP-rendered editor previews. Select an opted-in component and turn on Interact to use buttons and Ajax. Escape returns to editing. Each preview owns its listeners and pending requests, with cleanup when settings or content change.
Developers enable this with interactive: true in PHP and a trusted editor initializer. Existing hooks, renderers and saved blocks retain their behavior. See the README and Code Snippets Ajax example.
Includes refreshed banner, icon and a real interactive editor screenshot. Download custom-hook-block-2.1.0.zip to install.
Validation: 109 PHP runtime/integration checks and 26 JavaScript lifecycle checks pass. Build and lint pass. Plugin Check found no errors in the exact ZIP fileset; all 23 packaged files match the release commit. Real post-editor Ajax, saved settings refresh, Escape and independent instances were checked.
Limitations: five Plugin Check runtime asset checks were unavailable in Studio; minimum WordPress/PHP versions have not been tested separately. A separate Site Editor interaction check was blocked by unavailable browser security verification. WordPress.org submission remains pending.
ZIP SHA256: 5b8f8d4f4f04ab36d72c99a64cc3046a20bf08f59a61a88db53b4c24f366c851.