@@ -220,14 +220,14 @@ function auto_sizes_calculate_better_sizes( int $id, $size, string $align, int $
220
220
return $ layout_width ;
221
221
}
222
222
223
- /**
224
- * Retrieves the layout width for an alignment defined in theme.json.
225
- *
226
- * @since n.e.x.t
227
- *
228
- * @param string $alignment The alignment value.
229
- * @return string The alignment width based.
230
- */
223
+ /**
224
+ * Retrieves the layout width for an alignment defined in theme.json.
225
+ *
226
+ * @since n.e.x.t
227
+ *
228
+ * @param string $alignment The alignment value.
229
+ * @return string The alignment width based.
230
+ */
231
231
function auto_sizes_get_layout_width ( string $ alignment ): string {
232
232
$ layout = auto_sizes_get_layout_settings ();
233
233
@@ -240,15 +240,15 @@ function auto_sizes_get_layout_width( string $alignment ): string {
240
240
return $ layout_widths [ $ alignment ] ?? '' ;
241
241
}
242
242
243
- /**
244
- * Filters the context keys that a block type uses.
245
- *
246
- * @since n.e.x.t
247
- *
248
- * @param string[] $uses_context Array of registered uses context for a block type.
249
- * @param WP_Block_Type $block_type The full block type object.
250
- * @return string[] The filtered context keys used by the block type.
251
- */
243
+ /**
244
+ * Filters the context keys that a block type uses.
245
+ *
246
+ * @since n.e.x.t
247
+ *
248
+ * @param string[] $uses_context Array of registered uses context for a block type.
249
+ * @param WP_Block_Type $block_type The full block type object.
250
+ * @return string[] The filtered context keys used by the block type.
251
+ */
252
252
function auto_sizes_filter_uses_context ( array $ uses_context , WP_Block_Type $ block_type ): array {
253
253
// The list of blocks that can consume outer layout context.
254
254
$ consumer_blocks = array (
@@ -263,15 +263,15 @@ function auto_sizes_filter_uses_context( array $uses_context, WP_Block_Type $blo
263
263
return $ uses_context ;
264
264
}
265
265
266
- /**
267
- * Modifies the block context during rendering to blocks.
268
- *
269
- * @since n.e.x.t
270
- *
271
- * @param array<string, mixed> $context Current block context.
272
- * @param array<string, mixed> $block The block being rendered.
273
- * @return array<string, mixed> Modified block context.
274
- */
266
+ /**
267
+ * Modifies the block context during rendering to blocks.
268
+ *
269
+ * @since n.e.x.t
270
+ *
271
+ * @param array<string, mixed> $context Current block context.
272
+ * @param array<string, mixed> $block The block being rendered.
273
+ * @return array<string, mixed> Modified block context.
274
+ */
275
275
function auto_sizes_filter_render_block_context ( array $ context , array $ block ): array {
276
276
// When no max alignment is set, the maximum is assumed to be 'full'.
277
277
$ context ['max_alignment ' ] = $ context ['max_alignment ' ] ?? 'full ' ;
@@ -296,13 +296,13 @@ function auto_sizes_filter_render_block_context( array $context, array $block ):
296
296
return $ context ;
297
297
}
298
298
299
- /**
300
- * Retrieves the layout settings defined in theme.json.
301
- *
302
- * @since n.e.x.t
303
- *
304
- * @return array<string, mixed> Associative array of layout settings.
305
- */
299
+ /**
300
+ * Retrieves the layout settings defined in theme.json.
301
+ *
302
+ * @since n.e.x.t
303
+ *
304
+ * @return array<string, mixed> Associative array of layout settings.
305
+ */
306
306
function auto_sizes_get_layout_settings (): array {
307
307
static $ layout = array ();
308
308
if ( count ( $ layout ) === 0 ) {
0 commit comments