_register_block_bindings_post_data_source()

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Registers Post Data source in the block bindings registry.

Source

function _register_block_bindings_post_data_source() {
	register_block_bindings_source(
		'core/post-data',
		array(
			'label'              => _x( 'Post Data', 'block bindings source' ),
			'get_value_callback' => '_block_bindings_post_data_get_value',
			'uses_context'       => array( 'postId', 'postType' ), // Both are needed on the client side.
		)
	);
}

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.