PHPackages                             hametuha/wp-block-creator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hametuha/wp-block-creator

ActiveLibrary

hametuha/wp-block-creator
=========================

Gutenberg Block Creator for WordPress themes.

1.3.0(2y ago)510.0k↓100%GPL-3.0-or-laterPHPPHP &gt;=7.2

Since Jul 17Pushed 2y agoCompare

[ Source](https://github.com/hametuha/wp-block-creator)[ Packagist](https://packagist.org/packages/hametuha/wp-block-creator)[ RSS](/packages/hametuha-wp-block-creator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (9)Versions (7)Used By (0)

WP Block Creator
================

[](#wp-block-creator)

Gutenberg Block Creator for themes.

[![CI/CD for PHP Library](https://github.com/hametuha/wp-block-creator/actions/workflows/wordpress.yml/badge.svg)](https://github.com/hametuha/wp-block-creator/actions/workflows/wordpress.yml)

Installation
------------

[](#installation)

```
composer require hametuha/wp-block-creator
```

How to Use
----------

[](#how-to-use)

Suppose your theme:

- Use \[wp-enqueue-manager\] ready headers.
- Your theme's PHP is ready for [PSR-0](https://www.php-fig.org/psr/psr-0/).
- Every block inherits `Hametuha\WpBlockCreator\Patter\AbstractBlock`.
- Directory structure is like below.

```
your-theme
├src/YourTeam/YourTheme/Blocks
│├ExampleBlock.php
│└AnotherBlock.php
└dist
　├css/blocks
　│├example-block.css
　│└another-block.css
　└js/blocks
　　├example-block.js
　　└another-block.js

```

Then, call static method in your `functions.php`.

```
