Changeset 2685
- Timestamp:
- 02/11/2010 05:31:30 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-filters.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-filters.php
r2675 r2685 53 53 add_filter( 'bp_get_activity_latest_update', 'stripslashes_deep' ); 54 54 add_filter( 'bp_get_activity_feed_item_description', 'stripslashes_deep' ); 55 56 add_filter( 'bp_get_activity_content', 'bp_activity_make_nofollow_filter' ); 57 add_filter( 'bp_get_activity_content_body', 'bp_activity_make_nofollow_filter' ); 58 add_filter( 'bp_get_activity_parent_content', 'bp_activity_make_nofollow_filter' ); 59 add_filter( 'bp_get_activity_latest_update', 'bp_activity_make_nofollow_filter' ); 60 add_filter( 'bp_get_activity_feed_item_description', 'bp_activity_make_nofollow_filter' ); 55 61 56 62 add_filter( 'bp_get_activity_parent_content', 'bp_create_excerpt' ); … … 114 120 add_filter( 'bp_activity_comment_content', 'bp_activity_at_name_filter' ); 115 121 122 function bp_activity_make_nofollow_filter( $text ) { 123 return preg_replace_callback( '|<a (.+?)>|i', 'bp_activity_make_nofollow_filter_callback', $text ); 124 } 125 function bp_activity_make_nofollow_filter_callback( $matches ) { 126 $text = $matches[1]; 127 $text = str_replace( array( ' rel="nofollow"', " rel='nofollow'"), '', $text ); 128 return "<a $text rel=\"nofollow\">"; 129 } 130 116 131 ?>
Note: See TracChangeset
for help on using the changeset viewer.