bp_activity_make_nofollow_filter_callback
Add rel=nofollow to a link.
Description
(string) bp_activity_make_nofollow_filter_callback( (array) $matches );
Returns (string)
$text Link with rel=nofollow added.
Parameters (1)
- 0. $matches (array)
- Items matched by preg_replace_callback(…) in
bp_activity_make_nofollow_filter(…)
.
Usage
if ( !function_exists( 'bp_activity_make_nofollow_filter_callback' ) ) { require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-filters.php'; } // Items matched by preg_replace_callback() in bp_activity_make_nofollow_filter(). $matches = array(); // NOTICE! Understand what this does before running. $result = bp_activity_make_nofollow_filter_callback($matches);
Defined (1)
The function is defined in the following location(s).
- /bp-activity/bp-activity-filters.php
- function bp_activity_make_nofollow_filter_callback( $matches ) {
- $text = $matches[1];
- $text = str_replace( array( ' rel="nofollow"', " rel='nofollow'"), '', $text );
- return "<a $text rel=\"nofollow\">";
- }