PHP code example of eighteen73 / block-theme-developer

1. Go to this page and download the library: Download eighteen73/block-theme-developer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eighteen73 / block-theme-developer example snippets


define( 'BLOCK_THEME_DEVELOPER_MODE', 'file' );


/**
 * Title: My Awesome Pattern
 * Slug: my-theme/my-awesome-pattern
 * Description: A simple paragraph pattern for greetings
 * Categories: hero, text
 * Keywords: greeting, hello
 * Viewport Width: 1200
 * Block Types: core/paragraph
 * Post Types: post, page
 * Template Types: author, 404
 * Inserter: true
 * Synced: true
 *
 * @package MyTheme
 */
json
{
  "id": 123,
  "name": "my-awesome-pattern",
  "title": "My Awesome Pattern",
  "content": "<!-- wp:paragraph --><p>Hello world.</p><!-- /wp:paragraph -->",
  "description": "A simple paragraph pattern for greetings",
  "categories": ["hero", "text"],
  "keywords": ["greeting", "hello"],
  "viewportWidth": 1200,
  "blockTypes": ["core/paragraph"],
  "postTypes": ["post", "page"],
  "templateTypes": ["author", "404"],
  "inserter": true,
  "lastUpdated": "2026-07-16 12:00:00",
  "created": "2026-07-16 10:00:00"
}