Changeset 6337
- Timestamp:
- 03/02/2017 12:17:47 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/functions.php
r6320 r6337 384 384 } 385 385 386 // Link 387 $profile_url = bbp_get_user_profile_url( $user->ID ); 388 $profile_link = sprintf( '<a href="%1$s">@%2$s</a>', esc_url( $profile_url ), esc_html( $username ) ); 389 $no_followed = bbp_rel_nofollow( $profile_link ); 390 $pattern = "/(@{$username}\b)/"; 391 386 392 // Replace name in content 387 $content = preg_replace( '/(@' . $username . '\b)/', sprintf( '<a href="%1$s" rel="nofollow">@%2$s</a>', bbp_get_user_profile_url( $user->ID ), $username ), $content );393 $content = preg_replace( $pattern, $no_followed, $content ); 388 394 } 389 395
Note: See TracChangeset
for help on using the changeset viewer.