attribute_escape

Escaping for HTML attributes.

Description

(string) attribute_escape( (string) $text ); 

Returns (string)

Parameters (1)

0. $text (string)
The text.

Usage

  1. if ( !function_exists( 'attribute_escape' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The text. 
  5. $text = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = attribute_escape($text); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function attribute_escape( $text ) { 
  2. _deprecated_function( __FUNCTION__, '2.8', 'esc_attr()' ); 
  3. return esc_attr( $text );