PHPackages                             piotrpress/dynamic-block - 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. piotrpress/dynamic-block

ActiveWordpress-plugin

piotrpress/dynamic-block
========================

This WordPress plugin adds a dynamic block which renders an output of a selected php callback function added via a filter hook.

v0.3.0(7mo ago)1144GPL-3.0-or-laterPHPPHP &gt;=7.4

Since May 30Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/PiotrPress/wordpress-dynamic-block)[ Packagist](https://packagist.org/packages/piotrpress/dynamic-block)[ Docs](https://github.com/PiotrPress/wordpress-dynamic-block)[ RSS](/packages/piotrpress-dynamic-block/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

WordPress Dynamic Block
=======================

[](#wordpress-dynamic-block)

This WordPress plugin adds a [dynamic block](https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/creating-dynamic-blocks/) which renders an output of a selected php callback function added via a [filter hook](https://developer.wordpress.org/plugins/hooks/filters/).

[![Dynamic block in WordPress block editor view](screenshot-1.png)](screenshot-1.png)

Usage
-----

[](#usage)

Add callback functions via `piotrpress/dynamic_block/callbacks` filter:

```
add_filter( 'piotrpress/dynamic_block/callbacks', function( array $callbacks ) : array {
    $callbacks[ 'Current date' ] = fn( array $attributes ) : string => date( 'Y-m-d H:i:s' );
    return $callbacks;
} );
```

or if you would like to translate the label:

```
add_filter( 'piotrpress/dynamic_block/callbacks', function( array $callbacks ) : array {
    $callbacks[ 'current_date' ] = [
        'label' => __( 'Current date', 'textdomain' ),
        'value' => fn( array $attributes ) : string => date( 'Y-m-d H:i:s' );
    ];
    return $callbacks;
} );
```

Requirements
------------

[](#requirements)

PHP &gt;= `7.4` version.

License
-------

[](#license)

[GPL v3 or later](license.txt)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance64

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Every ~430 days

Total

3

Last Release

216d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10326736?v=4)[Piotr Niewiadomski](/maintainers/PiotrPress)[@PiotrPress](https://github.com/PiotrPress)

---

Top Contributors

[![PiotrPress](https://avatars.githubusercontent.com/u/10326736?v=4)](https://github.com/PiotrPress "PiotrPress (3 commits)")

---

Tags

wordpresswpblockblocksgutenbergdynamic blocksdynamic blockfsefull-site-editingphp-blockphp-blocks

### Embed Badge

![Health badge](/badges/piotrpress-dynamic-block/health.svg)

```
[![Health](https://phpackages.com/badges/piotrpress-dynamic-block/health.svg)](https://phpackages.com/packages/piotrpress-dynamic-block)
```

PHPackages © 2026

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