Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/piotrpress/wordpress-dynamic-format/archive/refs/heads/master.zipOn Packagist as piotrpress/dynamic-format:
composer require piotrpress/dynamic-formatNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
This WordPress plugin adds a dynamic format which renders an output of a selected php callback function added via a filter hook.

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
PHP >= 7.4 version.