W3cubDocs

/WordPress

attribute_escape( string $text ): string

Escaping for HTML attributes.

Description

See also

Parameters

$textstringrequired

Return

string

Source

function attribute_escape( $text ) {
	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_attr()' );
	return esc_attr( $text );
}

Changelog

Version Description
2.8.0 Use esc_attr()
2.0.6 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/attribute_escape