grunion_esc_attr

The Jetpack by WordPress.com grunion esc attr function.

Description

grunion_esc_attr( $attr ); 

Parameters (1)

0. $attr
The attr.

Usage

  1. if ( !function_exists( 'grunion_esc_attr' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/contact-form/admin.php'; 
  3.  
  4. // The attr. 
  5. $attr = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = grunion_esc_attr($attr); 
  9.  

Defined (1)

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

/modules/contact-form/admin.php  
  1. function grunion_esc_attr( $attr ) { 
  2. $out = esc_attr( $attr ); 
  3. // we also have to entity-encode square brackets so they don't interfere with the shortcode parser 
  4. // FIXME: do this better - just stripping out square brackets for now since they mysteriously keep reappearing 
  5. $out = str_replace( '[', '', $out ); 
  6. $out = str_replace( ']', '', $out ); 
  7. return $out;