[wp-trac] [WordPress Trac] #25803: wrong url for get_avatar

WordPress Trac noreply at wordpress.org
Sat Nov 2 07:47:19 UTC 2013


#25803: wrong url for get_avatar
--------------------------+------------------------------
 Reporter:  lite3         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by lite3):

 Replying to [comment:1 mauryaratan]:
 not here. in function get_avatar of wp-includes/pluggable.php.

 ===old code:===

 {{{
 // No avatar for pingbacks or trackbacks
 $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array(
 'comment' ) );
 if ( ! empty( $id_or_email->comment_type ) && ! in_array(
 $id_or_email->comment_type, (array) $allowed_comment_types ) )
         return false;

 if ( !empty($id_or_email->user_id) ) {
         $id = (int) $id_or_email->user_id;
         $user = get_userdata($id);
         if ( $user)
                 $email = $user->user_email;
 } elseif ( !empty($id_or_email->comment_author_email) ) {
         $email = $id_or_email->comment_author_email;
 }
 }}}

 ===new code:===

 {{{
 // No avatar for pingbacks or trackbacks
 $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array(
 'comment' ) );
 if ( ! empty( $id_or_email->comment_type ) && ! in_array(
 $id_or_email->comment_type, (array) $allowed_comment_types ) )
         return false;

 if ( !empty($id_or_email->user_id) ) {
         $id = (int) $id_or_email->user_id;
         $user = get_userdata($id);
         if ( $user)
                 $email = $user->user_email;
 }
 if ( $email === '' && !empty($id_or_email->comment_author_email) ) {
         $email = $id_or_email->comment_author_email;
 }
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25803#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list