onetone_fix_shortcodes

The Onetone onetone fix shortcodes function.

Description

onetone_fix_shortcodes( $content ); 

Parameters (1)

0. $content
The content.

Usage

  1. if ( !function_exists( 'onetone_fix_shortcodes' ) ) { 
  2. require_once '/includes/theme-functions.php'; 
  3.  
  4. // The content. 
  5. $content = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = onetone_fix_shortcodes($content); 
  9.  

Defined (1)

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

/includes/theme-functions.php  
  1. function onetone_fix_shortcodes($content) {  
  2. $replace_tags_from_to = array ( 
  3. '<p>[' => '[',  
  4. ']</p>' => ']',  
  5. ']<br />' => ']',  
  6. ']<br>' => ']',  
  7. ']\r\n' => ']',  
  8. ']\n' => ']',  
  9. ']\r' => ']',  
  10. '\r\n[' => '[',  
  11. ); 
  12.  
  13. return strtr( $content, $replace_tags_from_to );