wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
wp_apply_aria_label_support is private and should not be used in themes or plugins directly.
wp_apply_aria_label_support › WordPress Function
Desde6.8.0
Obsoleton/a
› wp_apply_aria_label_support ( $block_type, $block_attributes )
| Acesso: |
|
| Parâmetros: (2) |
|
| Retorna: |
|
| Definido em: | |
| Codex: |
Add the aria-label to the output.
Fonte
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 ||
wp_should_skip_block_supports_serialization( $block_type, 'ariaLabel' )
) {
return array();
}
$has_aria_label = array_key_exists( 'ariaLabel', $block_attributes );
if ( ! $has_aria_label ) {
return array();
}
return array( 'aria-label' => $block_attributes['ariaLabel'] );
}