bbp_rel_nofollow_callback( array $matches = array() )

Adds rel=nofollow to a link

Description

Parameters

$matches

(Optional)

Default value: array()

Return

(string) $text Link with rel=nofollow added

Source

File: bp-forums/common/formatting.php

function bbp_rel_nofollow_callback( $matches = array() ) {
	$text = $matches[1];
	$text = str_replace( array( ' rel="nofollow"', " rel='nofollow'" ), '', $text );
	return "<a $text rel=\"nofollow\">";
}

Changelog

Changelog
Version Description
bbPress (r4865) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.