Changeset 13541 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/events-header.php
- Timestamp:
- 04/16/2024 12:41:37 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/events-header.php
r13529 r13541 40 40 <span class="event-host"> 41 41 <?php 42 if ( 1 === count( $hosts ) ) : 43 esc_html_e( 'Host:', 'gp-translation-events' ); 42 if ( count( $hosts ) > 0 ) : 43 if ( 1 === count( $hosts ) ) : 44 esc_html_e( 'Host:', 'gp-translation-events' ); 45 else : 46 esc_html_e( 'Hosts:', 'gp-translation-events' ); 47 endif; 44 48 else : 45 esc_html_e( 'Hosts:', 'gp-translation-events' ); 49 esc_html_e( 'Created by:', 'gp-translation-events' ); 50 ?> 51 <a href="<?php echo esc_attr( get_author_posts_url( $user->ID ) ); ?>"><?php echo esc_html( get_the_author_meta( 'display_name', $user->ID ) ); ?></a> 52 <?php 46 53 endif; 47 54 ?> 48 55 <?php foreach ( $hosts as $host ) : ?> 49 <?php $user = get_userdata( $host->user_id() ); ?> 50 <a href="<?php echo esc_attr( get_author_posts_url( $user->ID ) ); ?>"><?php echo esc_html( get_the_author_meta( 'display_name', $user->ID ) ); ?></a> 56 <a href="<?php echo esc_attr( get_author_posts_url( $host->user_id() ) ); ?>"><?php echo esc_html( get_the_author_meta( 'display_name', $host->user_id() ) ); ?></a> 51 57 <?php if ( end( $hosts ) !== $host ) : ?> 52 58 , 59 <?php else : ?> 60 . 53 61 <?php endif; ?> 54 62 <?php endforeach; ?> 55 .</span>63 </span> 56 64 <?php $show_edit_button = ( ( $attendee instanceof Attendee && $attendee->is_host() ) || current_user_can( 'edit_post', $event->id() ) ) && $is_editable_event; ?> 57 65 <?php if ( $show_edit_button ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.