_bb_encode_bad_empty

The BuddyPress bb encode bad empty function.

Description

_bb_encode_bad_empty( &$text, $key, $preg ); 

Parameters (3)

0. $text
The text.
1. $key
The key.
2. $preg
The preg.

Usage

  1. if ( !function_exists( '_bb_encode_bad_empty' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-formatting.php'; 
  3.  
  4. // The text. 
  5. $text = &$text; 
  6.  
  7. // The key. 
  8. $key = null; 
  9.  
  10. // The preg. 
  11. $preg = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = _bb_encode_bad_empty($text, $key, $preg); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-formatting.php  
  1. function _bb_encode_bad_empty(&$text, $key, $preg) { 
  2. if (strpos($text, '`') !== 0) 
  3. $text = preg_replace("|<($preg)\s*?/*?>|i", '<$1 />', $text);