unescape_invalid_shortcodes

Remove placeholders added by do_shortcodes_in_html_tags().

Description

(string) unescape_invalid_shortcodes( (string) $content ); 

Returns (string)

Content with placeholders removed.

Parameters (1)

0. $content (string)
Content to search for placeholders.

Usage

  1. if ( !function_exists( 'unescape_invalid_shortcodes' ) ) { 
  2. require_once ABSPATH . WPINC . '/shortcodes.php'; 
  3.  
  4. // Content to search for placeholders. 
  5. $content = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = unescape_invalid_shortcodes($content); 
  9.  

Defined (1)

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

/wp-includes/shortcodes.php  
  1. function unescape_invalid_shortcodes( $content ) { 
  2. // Clean up entire string, avoids re-parsing HTML. 
  3. $trans = array( '[' => '[', ']' => ']' ); 
  4. $content = strtr( $content, $trans ); 
  5.  
  6. return $content;