Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 707 Bytes

File metadata and controls

20 lines (13 loc) · 707 Bytes

Example PHP Block

Demonstrates PHP-only block registration in WordPress 7.0+ using autoRegister.

Blocks

  • Hello Pattern (basic-block/) - Simple block with custom attributes and CSS
  • Store Products Preview (woo-block/) - WooCommerce products with cart status via Store API

Claude Code Skill

This plugin includes a /php-block skill for Claude Code that teaches best practices for PHP-only block development:

  • Block structure and registration pattern
  • How to properly load CSS and JavaScript
  • Why JavaScript only works on frontend (not in editor)
  • Attribute types and auto-generated controls
  • Block supports

Run /php-block in Claude Code when working on PHP-only blocks.