Changeset 9708
- Timestamp:
- 04/07/2020 10:31:44 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r9663 r9708 48 48 remove_filter( 'bbp_get_topic_author_link', 'bbp_rel_nofollow' ); 49 49 remove_filter( 'bbp_get_reply_author_link', 'bbp_rel_nofollow' ); 50 51 // add ugc to links in topics and replies. These already have nofollow, this adds ugc as well 52 add_filter( 'bbp_get_reply_content', array( $this, 'add_rel_ugc' ), 80 ); 53 add_filter( 'bbp_get_topic_content', array( $this, 'add_rel_ugc' ), 80 ); 50 54 51 55 // oEmbed. … … 752 756 753 757 /** 758 * Add nofollow ugc to links in content, for post-save processing. Compare to wp_rel_ugc(). 759 */ 760 public function add_rel_ugc( $text ) { 761 $text = preg_replace_callback( 762 '|<a (.+?)>|i', 763 function( $matches ) { 764 return wp_rel_callback( $matches, 'nofollow ugc' ); 765 }, 766 $text 767 ); 768 return $text; 769 } 770 771 /** 754 772 * Adjust the login URL to point back to whatever part of the support forums we're 755 773 * currently looking at. This allows the redirect to come back to the same place
Note: See TracChangeset
for help on using the changeset viewer.