PHPackages                             piotrpress/dynamic-format - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. piotrpress/dynamic-format

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

piotrpress/dynamic-format
=========================

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

v0.2.0(7mo ago)0143GPL-3.0-or-laterJavaScriptPHP &gt;=7.4

Since Jun 16Pushed 7mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

WordPress Dynamic Format
========================

[](#wordpress-dynamic-format)

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

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

Usage
-----

[](#usage)

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

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

or if you would like to translate the label:

```
add_filter( 'piotrpress/dynamic_format/callbacks', function( array $callbacks ) : array {
    $callbacks[ 'current_date' ] = [
        'label' => __( 'Current date', 'textdomain' ),
        'value' => fn( string $content ) : 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

31

—

LowBetter than 68% of packages

Maintenance63

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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 ~843 days

Total

2

Last Release

224d 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 (2 commits)")

---

Tags

wordpressformatwpblockblocksgutenbergdynamic blocksdynamic blockfsefull-site-editingphp-blockphp-blocksdynamic-formatformat-apiformatting-toolbar-api

### Embed Badge

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

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

###  Alternatives

[infinum/eightshift-libs

WordPress libs developed by Eightshift team to use in modern WordPress.

63118.9k3](/packages/infinum-eightshift-libs)

PHPackages © 2026

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