Block Editor: Expose api_version in the block type and the REST endpoint.

The new block editor included in 5.6 introduces an api_version property
that indicates which block API version the block is using. 
This commits makes this property available on the block type and the endpoint.

Props TimothyBlynJacobs, gziolo.
Fixes #51529.



git-svn-id: https://develop.svn.wordpress.org/trunk@49224 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella
2020-10-20 07:52:06 +00:00
parent af767035e7
commit 123a965c70
6 changed files with 22 additions and 1 deletions
+1
View File
@@ -207,6 +207,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
'supports' => 'supports',
'styles' => 'styles',
'example' => 'example',
'apiVersion' => 'api_version',
);
foreach ( $property_mappings as $key => $mapped_key ) {