Making WordPress.org


Ignore:
Timestamp:
01/31/2018 12:24:25 AM (9 years ago)
Author:
danielbachhuber
Message:

phpunit-test-reporter: Display reporter avatars in the test results

See ​https://github.com/WordPress/phpunit-test-reporter/pull/55

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/single-result.php

    r6263 r6480  
    1212$user = get_user_by( 'id', $report->post_author );
    1313if ( $user ) {
    14         $host = $user->display_name;
     14        $host = '';
     15        if ( ! empty( $user->user_url ) ) {
     16                $host .= '<a target="_blank" rel="nofollow" href="' . esc_url( $user->user_url ) . '">';
     17        }
     18        $host .= get_avatar( $user->ID, 18, '', '', array(
     19                'extra_attr' => 'style="vertical-align: middle;margin-right:5px;"',
     20        ) );
     21        if ( ! empty( $user->user_url ) ) {
     22                $host .= '</a>';
     23        }
     24        if ( ! empty( $user->user_url ) ) {
     25                $host .= '<a target="_blank" rel="nofollow" href="' . esc_url( $user->user_url ) . '">';
     26        }
     27        $host .= $user->display_name;
     28        if ( ! empty( $user->user_url ) ) {
     29                $host .= '</a>';
     30        }
    1531} ?>
    1632
    … …  
    3147        <tr>
    3248                <td><strong>Host</strong></td>
    33                 <td><?php echo esc_html( $host ); ?></td>
     49                <td><?php echo wp_kses_post( $host ); ?></td>
    3450        </tr>
    3551        <tr>
Note: See TracChangeset for help on using the changeset viewer.