Make WordPress Core


Ignore:
Timestamp:
08/05/2025 01:52:44 PM (8 months ago)
Author:
Bernhard Reiter
Message:

Block Bindings: Add core/post-data source.

Add a new Block Bindings source, core/post-data, which exposes date and modified fields for now -- reflecting the publish date and the last modified date of the post, respectively. The source could be subsequently extended to include other fields associated with a post object, such as title, featured image, etc.

Props bernhard-reiter.
Closes #63741.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-bindings/register.php

    r57562 r60539  
    7373            $source_two_name         => new WP_Block_Bindings_Source( $source_two_name, $source_two_properties ),
    7474            $source_three_name       => new WP_Block_Bindings_Source( $source_three_name, $source_three_properties ),
     75            'core/post-data'         => get_block_bindings_source( 'core/post-data' ),
    7576            'core/post-meta'         => get_block_bindings_source( 'core/post-meta' ),
    7677            'core/pattern-overrides' => get_block_bindings_source( 'core/pattern-overrides' ),
Note: See TracChangeset for help on using the changeset viewer.