WordPress.org

Make WordPress Core

Ticket #11880: avatar-r12716.patch

File avatar-r12716.patch, 798 bytes (added by usermrpapa, 8 years ago)

patch to display avatar on custom comment type

  • wp-includes/pluggable.php

     
    15751575                if ( $user )
    15761576                        $email = $user->user_email;
    15771577        } elseif ( is_object($id_or_email) ) {
    1578                 if ( isset($id_or_email->comment_type) && '' != $id_or_email->comment_type && 'comment' != $id_or_email->comment_type )
     1578        if ( isset($id_or_email->comment_type)
     1579           && '' != $id_or_email->comment_type
     1580           && ! in_array( $id_or_email->comment_type,
     1581              apply_filters( 'get_avatar_comment_types', array( 'comment' ), $id_or_email->comment_type ) ) )
    15791582                        return false; // No avatar for pingbacks or trackbacks
    15801583
    15811584                if ( !empty($id_or_email->user_id) ) {