bbp_rel_nofollow_callback

Adds rel=nofollow to a link.

Description

(string) bbp_rel_nofollow_callback( (array) $matches = array() ); 

Returns (string)

$text Link with rel=nofollow added

Parameters (1)

0. $matches — Optional. (array) => array()
The matches.

Usage

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

Defined (1)

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

/includes/common/formatting.php  
  1. function bbp_rel_nofollow_callback( $matches = array() ) { 
  2. $text = $matches[1]; 
  3. $text = str_replace( array( ' rel="nofollow"', " rel='nofollow'" ), '', $text ); 
  4. return "<a $text rel=\"nofollow\">";