bb_pre_sanitize_with_dashes_utf8

The BuddyPress bb pre sanitize with dashes utf8 function.

Description

bb_pre_sanitize_with_dashes_utf8( $text, (string) $_text = '', (int) $length = 0 ); 

Parameters (3)

0. $text
The text.
1. $text (string)
The text.
2. $length — Optional. (int)
The length.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-formatting.php  
  1. function bb_pre_sanitize_with_dashes_utf8( $text, $_text = '', $length = 0 ) { 
  2. $text = remove_accents($text); 
  3.  
  4. if ( seems_utf8( $text ) ) { 
  5. if ( function_exists('mb_strtolower') ) 
  6. $text = mb_strtolower($text, 'UTF-8'); 
  7. $text = utf8_uri_encode( $text, $length ); 
  8.  
  9. return $text;