str_get_html

The rtMedia for WordPress, BuddyPress and bbPress str get html function.

Description

Parameters (7)

0. $str
The str.
1. $lowercase — Optional. (constant) => true
The lowercase.
2. $forcetagsclosed (constant)
The forcetagsclosed.
3. $target_charset — Optional. (constant) => DEFAULT_TARGET_CHARSET
The target charset.
4. $striprn (constant)
The striprn.
5. $defaultbrtext (constant)
The defaultbrtext.
6. $defaultspantext (constant)
The defaultspantext.

Usage

  1. if ( !function_exists( 'str_get_html' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'rtmedia-for-wordpress-buddypress-and-bbpress/lib/simple-html-dom/simple_html_dom.php'; 
  3.  
  4. // The str. 
  5. $str = null; 
  6.  
  7. // The lowercase. 
  8. $lowercase = true; 
  9.  
  10. // The forcetagsclosed. 
  11. $forcetagsclosed = null; 
  12.  
  13. // The target charset. 
  14. $target_charset = DEFAULT_TARGET_CHARSET; 
  15.  
  16. // The striprn. 
  17. $striprn = null; 
  18.  
  19. // The defaultbrtext. 
  20. $defaultbrtext = null; 
  21.  
  22. // The defaultspantext. 
  23. $defaultspantext = null; 
  24.  
  25. // NOTICE! Understand what this does before running. 
  26. $result = str_get_html($str, $lowercase, $forcetagsclosed, $target_charset, $striprn, $defaultbrtext, $defaultspantext); 
  27.  

Defined (1)

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

/lib/simple-html-dom/simple_html_dom.php  
  1. function str_get_html($str, $lowercase=true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT
  2. $dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText); 
  3. if (empty($str) || strlen($str) > MAX_FILE_SIZE
  4. $dom->clear(); 
  5. return false; 
  6. $dom->load($str, $lowercase, $stripRN); 
  7. return $dom;