diff --git a/templates/event.php b/templates/event.php index b51f97621..ad2e8a892 100644 --- a/templates/event.php +++ b/templates/event.php @@ -59,20 +59,18 @@ end()->is_in_the_past() ) : - if ( ( $attendee instanceof Attendee && $attendee->is_host() ) || current_user_can( 'manage_options' ) || $user->ID === $event->author_id() ) : - $_attendee = $attendee_repo->get_attendee( $event_id, $contributor->ID ); - if ( $_attendee instanceof Attendee ) : - echo '
ID" ) ) . '">'; - if ( $_attendee->is_host() ) : - echo ''; - else : - echo ''; - endif; - echo '
'; + if ( current_user_can( 'edit_translation_event' ) ) : + $_attendee = $attendee_repo->get_attendee( $event_id, $contributor->ID ); + if ( $_attendee instanceof Attendee ) : + echo '
ID" ) ) . '">'; + if ( $_attendee->is_host() ) : + echo ''; else : - echo '' . esc_html__( 'Not attending', 'gp-translation-events' ) . ''; + echo ''; endif; + echo '
'; + else : + echo '' . esc_html__( 'Not attending', 'gp-translation-events' ) . ''; endif; endif; ?> @@ -81,7 +79,7 @@ - end()->is_in_the_past() || ( ( $attendee instanceof Attendee && $attendee->is_host() ) || current_user_can( 'manage_options' ) || $user->ID === $event->author_id() ) ) ) : ?> +