Making WordPress.org


Ignore:
Timestamp:
02/20/2023 02:50:11 PM (3 years ago)
Author:
amieiro
Message:

Translate: Sync gp-translation-helpers with GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/templates/discussions-dashboard.php

    r12275 r12405  
    104104        <th>Author</th>
    105105        <th>Submitted on</th>
     106        <th><?php echo esc_html( apply_filters( 'gp_involved_table_heading', __( 'Validators Involved' ) ) ); ?></th>
    106107    </tr>
    107108    </thead>
     
    119120            $project_name   = ( $parent_project ) ? $parent_project->name : $project->name;
    120121            $project_link   = gp_link_project_get( $project, esc_html( $project_name ) );
     122
     123            $comment_authors            = array_unique( array_column( $post_comments, 'comment_author_email' ) );
     124            $validator_emails           = GP_Notifications::get_validators_email_addresses( $project->path );
     125            $validators_involved_emails = array_intersect( $validator_emails, $comment_authors );
     126
     127            $validators_involved_emails = apply_filters( 'gp_validators_involved', $validators_involved_emails, $locale_slug, $original_id, $comment_authors );
     128
     129            $validator_involved_names = array_map(
     130                function( $validator ) {
     131                    $validator_user = get_user_by( 'email', $validator );
     132                    return '<a href="' . esc_url( gp_url_profile( $validator_user->user_nicename ) ) . '">' . esc_html( $validator_user->display_name ) . '</a>';
     133                },
     134                $validators_involved_emails
     135            );
    121136
    122137            $first_comment        = reset( $post_comments );
     
    201216                <td><?php echo get_comment_author_link( $first_comment ); ?></td>
    202217                <td><?php echo esc_html( $first_comment->comment_date ); ?></td>
     218                <td class="gtes-involved">
     219                    <?php
     220                        echo wp_kses(
     221                            implode( ', ', $validator_involved_names ),
     222                            array(
     223                                'a' => array(
     224                                    'href'  => array(),
     225                                    'class' => array(),
     226                                ),
     227                            )
     228                        );
     229                    ?>
     230            </td>
    203231            </tr>
    204232            <?php
Note: See TracChangeset for help on using the changeset viewer.