Changeset 2288 for trunk/bp-forums/bp-forums-filters.php
- Timestamp:
- 01/10/2010 09:55:51 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-forums/bp-forums-filters.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-filters.php
r2198 r2288 5 5 add_filter( 'bp_forums_bbconfig_location', 'attribute_escape', 1 ); 6 6 7 add_filter( 'bp_get_the_topic_title', 'wp_filter_kses', 1 ); 8 add_filter( 'bp_get_the_topic_latest_post_excerpt', 'wp_filter_kses', 1 ); 9 add_filter( 'bp_get_the_topic_post_content', 'wp_filter_kses', 1 ); 10 11 add_filter( 'bp_get_the_topic_title', 'attribute_escape' ); 12 add_filter( 'bp_get_the_topic_post_content', 'attribute_escape' ); 7 add_filter( 'bp_get_the_topic_title', 'bp_forums_filter_kses', 1 ); 8 add_filter( 'bp_get_the_topic_latest_post_excerpt', 'bp_forums_filter_kses', 1 ); 9 add_filter( 'bp_get_the_topic_post_content', 'bp_forums_filter_kses', 1 ); 13 10 14 11 add_filter( 'bp_get_the_topic_title', 'wptexturize' ); … … 38 35 add_filter( 'bp_get_forum_topic_count', 'number_format' ); 39 36 40 function bp_forums_add_allowed_tags( $allowedtags ) { 41 $allowedtags['p'] = array(); 42 $allowedtags['br'] = array(); 37 function bp_forums_filter_kses( $content ) { 38 global $allowedtags; 43 39 44 return $allowedtags; 40 $forums_allowedtags = $allowedtags; 41 $forums_allowedtags['span'] = array(); 42 $forums_allowedtags['span']['class'] = array(); 43 $forums_allowedtags['div'] = array(); 44 $forums_allowedtags['div']['class'] = array(); 45 $forums_allowedtags['div']['id'] = array(); 46 $forums_allowedtags['a']['class'] = array(); 47 $forums_allowedtags['img'] = array(); 48 $forums_allowedtags['br'] = array(); 49 $forums_allowedtags['p'] = array(); 50 $forums_allowedtags['img']['src'] = array(); 51 $forums_allowedtags['img']['alt'] = array(); 52 $forums_allowedtags['img']['class'] = array(); 53 $forums_allowedtags['img']['width'] = array(); 54 $forums_allowedtags['img']['height'] = array(); 55 $forums_allowedtags['img']['class'] = array(); 56 $forums_allowedtags['img']['id'] = array(); 57 $forums_allowedtags['code'] = array(); 58 $forums_allowedtags['blockquote'] = array(); 59 60 $forums_allowedtags = apply_filters( 'bp_forums_allowed_tags', $forums_allowedtags ); 61 return wp_kses( $content, $forums_allowedtags ); 45 62 } 46 add_filter( 'edit_allowedtags', 'bp_forums_add_allowed_tags' );47 63 48 64 function bp_forums_filter_tag_link( $link, $tag, $page, $context ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)