WordPress.org

Making WordPress.org

Changeset 10291


Ignore:
Timestamp:
09/28/2020 03:08:38 AM (5 months ago)
Author:
dd32
Message:

Plugin Directory: Release Confirmations: Link the committer to their profile.

See #5352.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-release-confirmation.php

    r10219 r10291  
    136136
    137137        foreach ( $releases as $data ) {
     138            if ( ! is_array( $data['committer'] ) ) {
     139                $data['committer'] = (array) $data['committer'];
     140            }
     141            foreach ( $data['committer'] as $i => $login ) {
     142                $data['committer'][ $i ] = sprintf(
     143                    '<a href="%s">%s</a>',
     144                    'https://profiles.wordpress.org/' . get_user_by( 'login', $login )->user_nicename,
     145                    esc_html( $login )
     146                );
     147            }
     148
    138149            printf(
    139150                '<tr>
     
    155166                esc_attr( gmdate( 'Y-m-d H:i:s', $data['date'] ) ),
    156167                esc_html( sprintf( __( '%s ago', 'wporg-plugins' ), human_time_diff( $data['date'] ) ) ),
    157                 esc_html( implode( ', ', (array) $data['committer'] ) ),
     168                implode( ', ', $data['committer'] ),
    158169                self::get_approval_text( $plugin, $data ),
    159170                self::get_actions( $plugin, $data )
Note: See TracChangeset for help on using the changeset viewer.