New attributes in xprofile_filter_link_profile filter
-
Some users abuse and every comment they put the site URL, ok I know that I can disable this feature, but is needed. I my opinion the external links need to have rel=\”nofollow\” and target=\”_blank\” atributs.
Do it on your buddypress:
1) Comment # the line to disable autolink filter to search data .
#add_filter( 'bp_the_profile_field_value', 'xprofile_filter_link_profile_data', 2, 2 );
2) Find this code on line 55 bp-xprofile/bp-xprofile-filters.php (trunk 1280)
$new_values[] = \'<a href="\' . site_url( BP_MEMBERS_SLUG ) . \'/?s=\' . $value . \'">\' . $value . \'</a>\';
3) Replace using this.
$new_values[] = '<a rel="nofollow" href="' . site_url( BP_MEMBERS_SLUG ) . '/?s=' . $value . '" target="_blank" >' . $value . '</a>';
Enjoy it.
Will be great see this contribution in future trunks.
- The topic ‘New attributes in xprofile_filter_link_profile filter’ is closed to new replies.