at path:
ROOT
/
wp-includes
/
block-supports
/
aria-label.php
run:
R
W
Run
align.php
1.67 KB
2023-08-10 16:48:19
R
W
Run
Delete
Rename
aria-label.php
1.57 KB
2025-04-16 02:33:33
R
W
Run
Delete
Rename
background.php
4.05 KB
2025-12-03 06:22:56
R
W
Run
Delete
Rename
block-style-variations.php
9.2 KB
2025-04-16 02:33:33
R
W
Run
Delete
Rename
block-visibility.php
854 By
2025-12-03 06:22:56
R
W
Run
Delete
Rename
border.php
6.27 KB
2023-09-29 10:20:30
R
W
Run
Delete
Rename
colors.php
5.81 KB
2023-09-29 10:20:30
R
W
Run
Delete
Rename
custom-classname.php
1.64 KB
2023-08-10 16:48:19
R
W
Run
Delete
Rename
dimensions.php
5.28 KB
2024-01-31 02:54:17
R
W
Run
Delete
Rename
duotone.php
2.67 KB
2024-09-04 11:48:32
R
W
Run
Delete
Rename
elements.php
8.46 KB
2024-09-04 11:48:32
R
W
Run
Delete
Rename
error_log
109.54 KB
2026-02-05 07:21:57
R
W
Run
Delete
Rename
generated-classname.php
1.7 KB
2023-08-10 16:48:19
R
W
Run
Delete
Rename
layout.php
39 KB
2025-12-03 06:22:56
R
W
Run
Delete
Rename
position.php
4.24 KB
2023-09-26 13:47:20
R
W
Run
Delete
Rename
settings.php
4.52 KB
2023-09-26 13:47:20
R
W
Run
Delete
Rename
shadow.php
2.04 KB
2024-09-04 11:48:32
R
W
Run
Delete
Rename
spacing.php
2.81 KB
2023-09-26 13:47:20
R
W
Run
Delete
Rename
typography.php
29.08 KB
2025-12-03 06:22:56
R
W
Run
Delete
Rename
utils.php
1011 By
2023-08-18 17:29:20
R
W
Run
Delete
Rename
error_log
up
📄
aria-label.php
Save
<?php /** * Aria label block support flag. * * @package WordPress * @since 6.8.0 */ /** * Registers the aria-label block attribute for block types that support it. * * @since 6.8.0 * @access private * * @param WP_Block_Type $block_type Block Type. */ function wp_register_aria_label_support( $block_type ) { $has_aria_label_support = block_has_support( $block_type, array( 'ariaLabel' ), false ); if ( ! $has_aria_label_support ) { return; } if ( ! $block_type->attributes ) { $block_type->attributes = array(); } if ( ! array_key_exists( 'ariaLabel', $block_type->attributes ) ) { $block_type->attributes['ariaLabel'] = array( 'type' => 'string', ); } } /** * Add the aria-label to the output. * * @since 6.8.0 * @access private * * @param WP_Block_Type $block_type Block Type. * @param array $block_attributes Block attributes. * * @return array Block aria-label. */ function wp_apply_aria_label_support( $block_type, $block_attributes ) { if ( ! $block_attributes ) { return array(); } $has_aria_label_support = block_has_support( $block_type, array( 'ariaLabel' ), false ); if ( ! $has_aria_label_support ) { return array(); } $has_aria_label = array_key_exists( 'ariaLabel', $block_attributes ); if ( ! $has_aria_label ) { return array(); } return array( 'aria-label' => $block_attributes['ariaLabel'] ); } // Register the block support. WP_Block_Supports::get_instance()->register( 'aria-label', array( 'register_attribute' => 'wp_register_aria_label_support', 'apply' => 'wp_apply_aria_label_support', ) );