WordPress at a glance
function is not described

_wp_add_global_attributes() WP 3.5.0

Helper function to add global attributes to a tag in the allowed html list.

  • Since 5.0.0 Add support for data-* wildcard attributes.

No Hooks.

Return

Array. The array of attributes with global attributes added.

Usage

_wp_add_global_attributes( $value );
$value(array) (required)
An array of attributes.

Code of wp add global attributes: wp-includes/kses.php VER 5.0.3

<?php
function _wp_add_global_attributes( $value ) {
	$global_attributes = array(
		'aria-describedby' => true,
		'aria-details' => true,
		'aria-label' => true,
		'aria-labelledby' => true,
		'aria-hidden' => true,
		'class' => true,
		'id' => true,
		'style' => true,
		'title' => true,
		'role' => true,
		'data-*' => true,
	);

	if ( true === $value )
		$value = array();

	if ( is_array( $value ) )
		return array_merge( $value, $global_attributes );

	return $value;
}