Skip to content

Commit

Permalink
Update PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Feb 21, 2023
1 parent 1594526 commit 0b4e818
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function gutenberg_examples_dynamic() {
register_block_type(
'gutenberg-examples/example-dynamic',
array(
'api_version' => 2,
'api_version' => 3,
'category' => 'widgets',
'attributes' => array(
'bgColor' => array( 'type' => 'string' ),
Expand Down Expand Up @@ -195,7 +195,7 @@ function gutenberg_examples_dynamic_block_supports() {
register_block_type(
'gutenberg-examples/example-dynamic-block-supports',
array(
'api_version' => 2,
'api_version' => 3,
'category' => 'widgets',
'supports' => array( 'color' => true ),
'render_callback' => 'gutenberg_examples_dynamic_block_supports_render_callback',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function gutenberg_examples_dynamic() {
);

register_block_type( 'gutenberg-examples/example-dynamic', array(
'api_version' => 2,
'api_version' => 3,
'editor_script' => 'gutenberg-examples-dynamic',
'render_callback' => 'gutenberg_examples_dynamic_render_callback'
) );
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/internationalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function myguten_block_init() {
);

register_block_type( 'myguten/simple', array(
'api_version' => 2,
'api_version' => 3,
'editor_script' => 'myguten-script',
) );
}
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/metabox.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function myguten_render_paragraph( $block_attributes, $content ) {
}

register_block_type( 'core/paragraph', array(
'api_version' => 2,
'api_version' => 3,
'render_callback' => 'myguten_render_paragraph',
) );
```
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/api/test/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ describe( 'blocks', () => {
const blockName = 'core/test-block-with-incompatible-keys';
unstable__bootstrapServerSideBlockDefinitions( {
[ blockName ]: {
api_version: 2,
api_version: 3,
provides_context: {
fontSize: 'fontSize',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/server-side-render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ If you pass `attributes` to `ServerSideRender`, the block must also be registere
register_block_type(
'core/archives',
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'showPostCounts' => array(
'type' => 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion phpunit/block-supports/border-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private function register_bordered_block_with_support( $block_name, $supports =
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'borderColor' => array(
'type' => 'string',
Expand Down
6 changes: 3 additions & 3 deletions phpunit/block-supports/colors-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function test_color_slugs_with_numbers_are_kebab_cased_properly() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'textColor' => array(
'type' => 'string',
Expand Down Expand Up @@ -69,7 +69,7 @@ public function test_color_with_skipped_serialization_block_supports() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -107,7 +107,7 @@ public function test_gradient_with_individual_skipped_serialization_block_suppor
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down
6 changes: 3 additions & 3 deletions phpunit/block-supports/dimensions-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function test_dimensions_style_is_applied() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -64,7 +64,7 @@ public function test_dimensions_with_skipped_serialization_block_supports() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -99,7 +99,7 @@ public function test_min_height_with_individual_skipped_serialization_block_supp
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down
2 changes: 1 addition & 1 deletion phpunit/block-supports/position-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function test_position_block_support( $theme_name, $block_name, $position
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down
6 changes: 3 additions & 3 deletions phpunit/block-supports/spacing-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function test_spacing_style_is_applied() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -73,7 +73,7 @@ public function test_spacing_with_skipped_serialization_block_supports() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -117,7 +117,7 @@ public function test_margin_with_individual_skipped_serialization_block_supports
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down
14 changes: 7 additions & 7 deletions phpunit/block-supports/typography-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function test_should_kebab_case_font_size_slug_with_numbers() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'fontSize' => array(
'type' => 'string',
Expand Down Expand Up @@ -112,7 +112,7 @@ public function test_should_generate_font_family_with_legacy_inline_styles_using
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -145,7 +145,7 @@ public function test_should_skip_serialization_for_typography_block_supports() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -191,7 +191,7 @@ public function test_should_skip_serialization_for_letter_spacing_block_supports
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -227,7 +227,7 @@ public function test_should_generate_css_var_for_font_family_with_legacy_inline_
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -260,7 +260,7 @@ public function test_should_generate_classname_for_font_family() {
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down Expand Up @@ -574,7 +574,7 @@ public function test_should_covert_font_sizes_to_fluid_values( $font_size_value,
register_block_type(
$this->test_block_name,
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'style' => array(
'type' => 'object',
Expand Down
2 changes: 1 addition & 1 deletion phpunit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function gutenberg_register_test_block_for_feature_selectors() {
WP_Block_Type_Registry::get_instance()->register(
'test/test',
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'textColor' => array(
'type' => 'string',
Expand Down
2 changes: 1 addition & 1 deletion phpunit/class-wp-theme-json-resolver-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public function test_get_merged_data_returns_origin( $origin, $core_palette, $co
register_block_type(
'my/block-with-styles',
array(
'api_version' => 2,
'api_version' => 3,
'attributes' => array(
'borderColor' => array(
'type' => 'string',
Expand Down

0 comments on commit 0b4e818

Please sign in to comment.