PHPackages                             pramodjodhani/wp-block-framework - 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. [Framework](/categories/framework)
4. /
5. pramodjodhani/wp-block-framework

ActiveLibrary[Framework](/categories/framework)

pramodjodhani/wp-block-framework
================================

A PHP framework to create Gutenberg Blocks without JS.

1.0.0(3y ago)391MITJavaScript

Since Sep 18Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

WP Block Framework
==================

[](#wp-block-framework)

With WordPress Block Framework, you can create WordPress blocks only using PHP and without having to write a line of Javascript. Helpful for creating simple blocks and converting shortcodes to blocks. Think of it as pluggable version of ACF.

This repo is actually a working plugin which demonstrates how to implement block framework in your plugins. See block-framework-example.php for details.

How to use
==========

[](#how-to-use)

Step 1A - Installation (with composer)
--------------------------------------

[](#step-1a---installation-with-composer)

```
composer require pramodjodhani/wp-block-framework

```

Step 1B - Installation (manually)
---------------------------------

[](#step-1b---installation-manually)

Copy this whole repository to your theme or plugin. Then include the block-framework/class-block-framework.php file.

```
include "./wp-block-framework/block-framework/class-block-framework.php";

```

Step 2
------

[](#step-2)

Call `WP_Block_Framework::register_block_type()` just how you would call the WordPress function [register\_block\_type](https://developer.wordpress.org/reference/functions/register_block_type/).

```
WP_Block_Framework::register_block_type(
	'wpbf-example/team-member',
	array(
		'title'    => 'Team member',
		'icon'     => 'groups',
		'category' => 'widgets',
		'keywords' => array( __( 'team' ), __( 'member' ), __( 'crew' ) ),
	)
);

```

You only need to include `wpbf` parameter and `template` and `fields` argument inside it.

```
WP_Block_Framework::register_block_type(
	'wpbf-example/team-member',
	array(
		'title'    => 'Team member',
		'icon'     => 'groups',
		'category' => 'widgets',
		'keywords' => array( __( 'team' ), __( 'member' ), __( 'crew' ) ),
		'wpbf'     => array(
			'template' => dirname( __FILE__ ) . '/templates/team-member.php',
			'fields'   => array(
				array(
					'id'          => 'name',
					'type'        => 'text',
					'title'       => 'Name',
					'desc'        => 'Team Member name',
					'placeholder' => 'Name',
				),
				array(
					'id'          => 'position',
					'type'        => 'textarea',
					'title'       => 'Bio',
					'desc'        => 'Position in the company',
					'placeholder' => 'Ex. Head of marketing..',
				),
				array(
					'id'    => 'image',
					'type'  => 'image',
					'title' => 'Image',
					'desc'  => 'A nice Headshot.',
				),
			),
		),
	),
);

```

Step 3 Create the template
--------------------------

[](#step-3-create-the-template)

WPBF will load the `template` we mentioned in step 2 (/templates/team-member.php). Create this file within your theme/plugin.

The data is provided to the template in the form of the $attributes variable. $attribute is an array of associative values, and the field id can be used to retrieve the field values ex: `$attributes['name']`.

```

```

That's it 🕺

Here's the block in working:
============================

[](#heres-the-block-in-working)

[![Recording #259](https://user-images.githubusercontent.com/5794565/190054565-c1876651-66b3-4b6f-ac58-2c11430056f3.gif)](https://user-images.githubusercontent.com/5794565/190054565-c1876651-66b3-4b6f-ac58-2c11430056f3.gif)

Supported Field Types
=====================

[](#supported-field-types)

- textarea
- text
- Password
- date
- select
- toggle
- radio
- checkboxes
- file
- image
- color
- group (repeater field 🔁 )

Upcoming Features
=================

[](#upcoming-features)

- Support for block.json
- Conditional fields
- Improve UX

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c241127170fb246914fbfe53756ee04f60945cbd8c3a42cf46585e16c9a823b?d=identicon)[pramodjodhani](/maintainers/pramodjodhani)

---

Top Contributors

[![pramodjodhani](https://avatars.githubusercontent.com/u/5794565?v=4)](https://github.com/pramodjodhani "pramodjodhani (37 commits)")

### Embed Badge

![Health badge](/badges/pramodjodhani-wp-block-framework/health.svg)

```
[![Health](https://phpackages.com/badges/pramodjodhani-wp-block-framework/health.svg)](https://phpackages.com/packages/pramodjodhani-wp-block-framework)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M256](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
