WordPress.org

Making WordPress.org

Changeset 1610


Ignore:
Timestamp:
05/21/2015 04:08:00 PM (5 years ago)
Author:
ocean90
Message:

WP.org P2 theme: Fix profile URLs for comment authors.

props SergeyBiryukov.
fixes #1041.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/functions.php

    r1215 r1610  
    1313}
    1414
    15 add_filter( 'get_comment_author_url', 'wporg_p2_comment_profile_urls' );
    16 function wporg_p2_comment_profile_urls( $url ) {
    17     $comment = $GLOBALS['comment'];
    18     if ( is_object( $comment ) && $comment->user_id != 0 ) {
     15add_filter( 'get_comment_author_url', 'wporg_p2_comment_profile_urls', 10, 3 );
     16function wporg_p2_comment_profile_urls( $url, $comment_ID, $comment ) {
     17    if ( $comment->user_id != 0 ) {
    1918        $user = new WP_User( $comment->user_id );
    2019        $nicename = $user->user_nicename;
Note: See TracChangeset for help on using the changeset viewer.