Making WordPress.org

Changeset 3168


Ignore:
Timestamp:
05/18/2016 11:28:01 AM (10 years ago)
Author:
ocean90
Message:

Trac Notifications: Use get_avatar() in wporg_trac_notifications::ticket_notes().

Prevents broken gravatars for users with a space in their login.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php

    r2141 r3168  
    356356        }
    357357
    358         $gravatar_url = 'https://wordpress.org/grav-redirect.php?user=' . esc_attr( $ticket['reporter'] );
    359 
    360358        echo '<p class="ticket-note note-new-reporter">';
    361         printf( '<img width="36" height="36" src="%1$s&amp;s=36" srcset="%1$s&amp;s=72 2x" /> ', $gravatar_url );
     359        echo get_avatar( get_user_by( 'login', $ticket['reporter'] )->user_email, 36 );
    362360        echo '<span class="note">' . $output . '</span>';
    363361        echo '<span class="dashicons dashicons-welcome-learn-more"></span>';
     
    535533}
    536534$wporg_trac_notifications = new wporg_trac_notifications;
    537 
Note: See TracChangeset for help on using the changeset viewer.