1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * bp_core_link_comments_with_profiles() |
---|
5 | * |
---|
6 | * Links comments from loggend in users with thier |
---|
7 | * profiles |
---|
8 | * |
---|
9 | * @package BuddyPress Core |
---|
10 | * @global $comment WordPress comment global for the current comment. |
---|
11 | * @param url Current comment author url |
---|
12 | * @uses bp_core_get_user_domain() BuddyPress function to get the profile url for a user. |
---|
13 | */ |
---|
14 | function bp_core_link_comments_with_profiles( $url ) { |
---|
15 | global $comment; |
---|
16 | |
---|
17 | if( $comment->user_id != '0' ) |
---|
18 | $url = bp_core_get_user_domain( $comment->user_id ); |
---|
19 | |
---|
20 | return apply_filters( 'bp_core_link_comments_with_profiles', $url ); |
---|
21 | } |
---|
22 | |
---|
23 | add_filter( 'get_comment_author_url', 'bp_core_link_comments_with_profiles' ); |
---|
24 | |
---|
25 | ?> |
---|