Alert: 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.
Description Description
Parameters Parameters
- $value
-
(array) (Required) An array of attributes.
Return Return
(array) The array of attributes with global attributes added.
Source Source
File: wp-includes/kses.php
return addslashes( wp_kses( stripslashes( $data ), 'strip' ) ); } /** * Adds all KSES input form content filters. * * All hooks have default priority. The `wp_filter_kses()` function is added to * the 'pre_comment_content' and 'title_save_pre' hooks. * * The `wp_filter_post_kses()` function is added to the 'content_save_pre', * 'excerpt_save_pre', and 'content_filtered_save_pre' hooks. * * @since 2.0.0 */ function kses_init_filters() { // Normal filtering add_filter( 'title_save_pre', 'wp_filter_kses' ); // Comment filtering if ( current_user_can( 'unfiltered_html' ) ) { add_filter( 'pre_comment_content', 'wp_filter_post_kses' ); } else { add_filter( 'pre_comment_content', 'wp_filter_kses' );
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Add support for data-* wildcard attributes. |
3.5.0 | Introduced. |