Make WordPress Core

Changeset 60778


Ignore:
Timestamp:
09/17/2025 02:58:10 PM (7 hours ago)
Author:
cbravobernal
Message:

Block Bindings: Add postType to context for Post Data source

Adds a required postType context, which is used in the editor client side.

Props bernhard-reiter, cbravobernal.
Fixes #63994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-bindings/post-data.php

    r60539 r60778  
    6161            'label'              => _x( 'Post Data', 'block bindings source' ),
    6262            'get_value_callback' => '_block_bindings_post_data_get_value',
    63             'uses_context'       => array( 'postId' ),
     63            'uses_context'       => array( 'postId', 'postType' ), // Both are needed on the client side.
    6464        )
    6565    );
Note: See TracChangeset for help on using the changeset viewer.