Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove styleVariations alias in favor of the supported styles property
  • Loading branch information
gziolo committed Jun 4, 2020
commit f38e74484b4d739054132adb9eaa87ef999089f8
2 changes: 0 additions & 2 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
'attributes' => 'attributes',
'supports' => 'supports',
'styles' => 'styles',
// Alias recommended in documentation to distinguish from assets.
'styleVariations' => 'styles',
);

foreach ( $property_mappings as $key => $mapped_key ) {
Expand Down
2 changes: 1 addition & 1 deletion phpunit/class-wp-rest-block-types-controller-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function test_get_item_invalid() {
'keywords' => 'invalid_keywords',
'parent' => 'invalid_parent',
'supports' => 'invalid_supports',
'styleVariations' => 'invalid_styles',
'styles' => 'invalid_styles',
'render_callback' => 'invalid_callback',
);
register_block_type( $block_type, $settings );
Expand Down
2 changes: 1 addition & 1 deletion phpunit/fixtures/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"align": true,
"lightBlockWrapper": true
},
"styleVariations": [
"styles": [
{
"name": "default",
"label": "Default",
Expand Down