Skip to:
Content

bbPress.org

Changeset 6337


Ignore:
Timestamp:
03/02/2017 12:17:47 AM (8 years ago)
Author:
johnjamesjacoby
Message:

Use bbp_rel_nofollow() in deprecated bbp_mention_filter() for the sake of parity & coverage. See #3067.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/functions.php

    r6320 r6337  
    384384        }
    385385
     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
    386392        // 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 );
    388394    }
    389395
Note: See TracChangeset for help on using the changeset viewer.