This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_wp_add_global_attributes( array $value )
Helper function to add global attributes to a tag in the allowed html list.
Parameters
- $value
-
(Required) An array of attributes.
Return
(array) The array of attributes with global attributes added.
Source
File: wp-includes/kses.php
function _wp_add_global_attributes( $value ) {
$global_attributes = array(
'class' => true,
'id' => true,
'style' => true,
'title' => true,
'role' => true,
);
if ( true === $value )
$value = array();
if ( is_array( $value ) )
return array_merge( $value, $global_attributes );
return $value;
}
Changelog
Version | Description |
---|---|
WP-3.5.0 | Introduced. |