bp_activity_make_nofollow_filter( string $text )

Catch links in activity text so rel=nofollow can be added.

Description

Parameters

$text

(Required) Activity text.

Return

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

Source

File: bp-activity/bp-activity-filters.php

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

Changelog

Changelog
Version Description
BuddyPress 1.2.0 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.