bbp_kses_allowed_tags

Custom allowed tags for forum topics and replies.

Description

(array) bbp_kses_allowed_tags(); 

Allows all users to post links, quotes, code, formatting, lists, and images

Returns (array)

Associative array of allowed tags and attributes


Usage

  1. if ( !function_exists( 'bbp_kses_allowed_tags' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/formatting.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_kses_allowed_tags(); 
  7.  

Defined (1)

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

/includes/common/formatting.php  
  1. function bbp_kses_allowed_tags() { 
  2. return apply_filters( 'bbp_kses_allowed_tags', array( 
  3.  
  4. // Links 
  5. 'a' => array( 
  6. 'href' => array(),  
  7. 'title' => array(),  
  8. 'rel' => array(),  
  9. 'target' => array() 
  10. ),  
  11.  
  12. // Quotes 
  13. 'blockquote' => array( 
  14. 'cite' => array() 
  15. ),  
  16.  
  17. // Code 
  18. 'code' => array(),  
  19. 'pre' => array(),  
  20.  
  21. // Formatting 
  22. 'em' => array(),  
  23. 'strong' => array(),  
  24. 'del' => array( 
  25. 'datetime' => true,  
  26. ),  
  27.  
  28. // Lists 
  29. 'ul' => array(),  
  30. 'ol' => array( 
  31. 'start' => true,  
  32. ),  
  33. 'li' => array(),  
  34.  
  35. // Images 
  36. 'img' => array( 
  37. 'src' => true,  
  38. 'border' => true,  
  39. 'alt' => true,  
  40. 'height' => true,  
  41. 'width' => true,  
  42. ) );