Skip to content

Commit f58525c

Browse files
committed
prep build 01/17
2 parents dcab323 + 7ae7564 commit f58525c

File tree

237 files changed

+1267
-563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+1267
-563
lines changed

docs/contributors/versions-in-wordpress.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ If anything looks incorrect here, please bring it up in #core-editor in [WordPre
66

77
| Gutenberg Versions | WordPress Version |
88
| ------------------ | ----------------- |
9+
| 16.2-16.7 | 6.4.2 |
910
| 16.2-16.7 | 6.4.1 |
1011
| 16.2-16.7 | 6.4 |
1112
| 15.2-16.1 | 6.3.1 |

docs/reference-guides/core-blocks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ Give special visual emphasis to a quote from your text. ([Source](https://github
694694

695695
- **Name:** core/pullquote
696696
- **Category:** text
697-
- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), typography (fontSize, lineHeight)
697+
- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight)
698698
- **Attributes:** citation, textAlign, value
699699

700700
## Query Loop

lib/block-supports/pattern.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
* @param WP_Block_Type $block_type Block Type.
1414
*/
1515
function gutenberg_register_pattern_support( $block_type ) {
16-
$pattern_support = 'core/paragraph' === $block_type->name ? true : false;
16+
global $block_bindings_allowed_blocks;
17+
$pattern_support = array_key_exists( $block_type->name, $block_bindings_allowed_blocks );
1718

1819
if ( $pattern_support ) {
1920
if ( ! $block_type->uses_context ) {

lib/block-supports/typography.php

+11-3
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,18 @@ function gutenberg_get_computed_fluid_typography_value( $args = array() ) {
401401
return null;
402402
}
403403

404-
// Build CSS rule.
405-
// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.
404+
// Calculates the linear factor denominator. If it's 0, we cannot calculate a fluid value.
405+
$linear_factor_denominator = $maximum_viewport_width['value'] - $minimum_viewport_width['value'];
406+
if ( empty( $linear_factor_denominator ) ) {
407+
return null;
408+
}
409+
410+
/*
411+
* Build CSS rule.
412+
* Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.
413+
*/
406414
$view_port_width_offset = round( $minimum_viewport_width['value'] / 100, 3 ) . $font_size_unit;
407-
$linear_factor = 100 * ( ( $maximum_font_size['value'] - $minimum_font_size['value'] ) / ( $maximum_viewport_width['value'] - $minimum_viewport_width['value'] ) );
415+
$linear_factor = 100 * ( ( $maximum_font_size['value'] - $minimum_font_size['value'] ) / ( $linear_factor_denominator ) );
408416
$linear_factor_scaled = round( $linear_factor * $scale_factor, 3 );
409417
$linear_factor_scaled = empty( $linear_factor_scaled ) ? 1 : $linear_factor_scaled;
410418
$fluid_target_font_size = implode( '', $minimum_font_size_rem ) . " + ((1vw - $view_port_width_offset) * $linear_factor_scaled)";

lib/compat/wordpress-6.5/blocks.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* Temporary compatibility shims for block APIs present in Gutenberg.
4+
*
5+
* @package gutenberg
6+
*/
7+
8+
/**
9+
* Shim for the `variation_callback` block type argument.
10+
*
11+
* @param array $args The block type arguments.
12+
* @return array The updated block type arguments.
13+
*/
14+
function gutenberg_register_block_type_args_shim( $args ) {
15+
if ( isset( $args['variation_callback'] ) && is_callable( $args['variation_callback'] ) ) {
16+
$args['variations'] = call_user_func( $args['variation_callback'] );
17+
unset( $args['variation_callback'] );
18+
}
19+
return $args;
20+
}
21+
22+
if ( ! method_exists( 'WP_Block_Type', 'get_variations' ) ) {
23+
add_filter( 'register_block_type_args', 'gutenberg_register_block_type_args_shim' );
24+
}

lib/load.php

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function gutenberg_is_experiment_enabled( $name ) {
101101
require __DIR__ . '/compat/wordpress-6.4/kses.php';
102102

103103
// WordPress 6.5 compat.
104+
require __DIR__ . '/compat/wordpress-6.5/blocks.php';
104105
require __DIR__ . '/compat/wordpress-6.5/block-patterns.php';
105106
require __DIR__ . '/compat/wordpress-6.5/class-wp-navigation-block-renderer.php';
106107
require __DIR__ . '/compat/wordpress-6.5/kses.php';

0 commit comments

Comments
 (0)