run:R W Run
1.67 KB
2026-03-11 16:18:52
R W Run
1.57 KB
2026-03-11 16:18:52
R W Run
4.05 KB
2026-03-11 16:18:52
R W Run
9.2 KB
2026-03-11 16:18:52
R W Run
854 By
2026-03-11 16:18:52
R W Run
6.27 KB
2026-03-11 16:18:52
R W Run
5.81 KB
2026-03-11 16:18:52
R W Run
1.64 KB
2026-03-11 16:18:52
R W Run
5.28 KB
2026-03-11 16:18:52
R W Run
2.67 KB
2026-03-11 16:18:52
R W Run
8.46 KB
2026-03-11 16:18:52
R W Run
1.7 KB
2026-03-11 16:18:52
R W Run
39 KB
2026-03-11 16:18:52
R W Run
4.24 KB
2026-03-11 16:18:52
R W Run
4.52 KB
2026-03-11 16:18:52
R W Run
2.04 KB
2026-03-11 16:18:52
R W Run
2.81 KB
2026-03-11 16:18:52
R W Run
29.08 KB
2026-03-11 16:18:52
R W Run
1011 By
2026-03-11 16:18:52
R W Run
error_log
📄aria-label.php
1<?php
2/**
3 * Aria label block support flag.
4 *
5 * @package WordPress
6 * @since 6.8.0
7 */
8
9/**
10 * Registers the aria-label block attribute for block types that support it.
11 *
12 * @since 6.8.0
13 * @access private
14 *
15 * @param WP_Block_Type $block_type Block Type.
16 */
17function wp_register_aria_label_support( $block_type ) {
18 $has_aria_label_support = block_has_support( $block_type, array( 'ariaLabel' ), false );
19
20 if ( ! $has_aria_label_support ) {
21 return;
22 }
23
24 if ( ! $block_type->attributes ) {
25 $block_type->attributes = array();
26 }
27
28 if ( ! array_key_exists( 'ariaLabel', $block_type->attributes ) ) {
29 $block_type->attributes['ariaLabel'] = array(
30 'type' => 'string',
31 );
32 }
33}
34
35/**
36 * Add the aria-label to the output.
37 *
38 * @since 6.8.0
39 * @access private
40 *
41 * @param WP_Block_Type $block_type Block Type.
42 * @param array $block_attributes Block attributes.
43 *
44 * @return array Block aria-label.
45 */
46function wp_apply_aria_label_support( $block_type, $block_attributes ) {
47 if ( ! $block_attributes ) {
48 return array();
49 }
50
51 $has_aria_label_support = block_has_support( $block_type, array( 'ariaLabel' ), false );
52 if ( ! $has_aria_label_support ) {
53 return array();
54 }
55
56 $has_aria_label = array_key_exists( 'ariaLabel', $block_attributes );
57 if ( ! $has_aria_label ) {
58 return array();
59 }
60 return array( 'aria-label' => $block_attributes['ariaLabel'] );
61}
62
63// Register the block support.
64WP_Block_Supports::get_instance()->register(
65 'aria-label',
66 array(
67 'register_attribute' => 'wp_register_aria_label_support',
68 'apply' => 'wp_apply_aria_label_support',
69 )
70);
71
Ui Ux Design – Teachers Night Out

Get in Touch

© 2024 Teachers Night Out. All Rights Reserved.