bp_forums_make_nofollow_filter

Add rel="nofollow" to bbPress content.

Description

(string) bp_forums_make_nofollow_filter( (string) $text ); 

Returns (string)

Modified post content.

Parameters (1)

0. $text (string)
Post content.

Usage

  1. if ( !function_exists( 'bp_forums_make_nofollow_filter' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bp-forums-filters.php'; 
  3.  
  4. // Post content. 
  5. $text = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_forums_make_nofollow_filter($text); 
  9.  

Defined (1)

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

/bp-forums/bp-forums-filters.php  
  1. function bp_forums_make_nofollow_filter( $text ) { 
  2. return preg_replace_callback( '|<a (.+?)>|i', 'bp_forums_make_nofollow_filter_callback', $text );