Skip to content

Commit d64970a

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60778 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8b2ff11 commit d64970a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/block-bindings/post-data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function _register_block_bindings_post_data_source() {
6060
array(
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
);
6666
}

0 commit comments

Comments
 (0)