Make WordPress Core


Ignore:
Timestamp:
08/05/2025 01:52:44 PM (4 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/src/wp-includes/class-wp-block.php

    r60511 r60539  
    286286            'core/image'     => array( 'id', 'url', 'title', 'alt' ),
    287287            'core/button'    => array( 'url', 'text', 'linkTarget', 'rel' ),
     288            'core/post-date' => array( 'datetime' ),
    288289        );
    289290
Note: See TracChangeset for help on using the changeset viewer.