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.

Installs: 27

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

v0.1.0 2023-06-16 13:34 UTC

This package is auto-updated.

Last update: 2024-10-30 13:38:59 UTC


README

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

Usage

Add piotrpress/dynamic_format/callbacks filter.

Example

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

Screenshot

Dynamic format in WordPress block editor view

Requirements

PHP >= 7.4 version.

License

GPL v3 or later