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.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

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.

Changelog

Since 3.5.0 Introduced.
Since 5.0.0 Add support for data-* wildcard attributes.

Code of _wp_add_global_attributes() WP 5.7.2

<?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;
}