bbp_rel_nofollow( string $text = '' )

Catches links so rel=nofollow can be added (on output, not save)

Description

Parameters

$text

(Optional) Post text

Default value: ''

Return

(string) $text Text with rel=nofollow added to any links

Source

File: bp-forums/common/formatting.php

function bbp_rel_nofollow( $text = '' ) {
	return preg_replace_callback( '|<a (.+?)>|i', 'bbp_rel_nofollow_callback', $text );
}

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.