bb_code_trick_reverse

The BuddyPress bb code trick reverse function.

Description

bb_code_trick_reverse( $text ); 

Parameters (1)

0. $text
The text.

Usage

  1. if ( !function_exists( 'bb_code_trick_reverse' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-formatting.php'; 
  3.  
  4. // The text. 
  5. $text = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_code_trick_reverse($text); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-formatting.php  
  1. function bb_code_trick_reverse( $text ) { 
  2. $text = preg_replace_callback("!(<pre><code>|<code>)(.*?)(</code></pre>|</code>)!s", 'bb_decodeit', $text); 
  3. $text = str_replace(array('<p>', '<br />'), '', $text); 
  4. $text = str_replace('</p>', "\n", $text); 
  5. $text = str_replace('<coded_br />', '<br />', $text); 
  6. $text = str_replace('<coded_p>', '<p>', $text); 
  7. $text = str_replace('</coded_p>', '</p>', $text); 
  8. return $text;