From 2246235d35e1a4babd7d28cd9d3d39ecbe0331cd Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Thu, 18 Apr 2024 17:13:13 +0100 Subject: [PATCH] Remove unneeded checks We already checke it above, and the start of the attendees section. --- templates/event.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/templates/event.php b/templates/event.php index ad2e8a892..c487022f6 100644 --- a/templates/event.php +++ b/templates/event.php @@ -96,19 +96,15 @@ 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, $_user->ID ); - if ( $_attendee instanceof Attendee ) : - echo '
ID" ) ) . '">'; - if ( $_attendee->is_host() ) : - echo ''; - else : - echo ''; - endif; - echo '
'; - endif; + $_attendee = $attendee_repo->get_attendee( $event_id, $_user->ID ); + if ( $_attendee instanceof Attendee ) : + echo '
ID" ) ) . '">'; + if ( $_attendee->is_host() ) : + echo ''; + else : + echo ''; endif; + echo '
'; endif; ?>