Skip to content

Commit

Permalink
Show notice for users not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
trymebytes committed Nov 22, 2024
1 parent 399896a commit 137c979
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,19 @@
<?php endif; ?>
</div>

<?php if ( ! $event->is_past() ) : ?>
<?php if ( $event->is_past() ) : ?>
<!-- wp:wporg/notice {"type":"alert"} -->
<div class="wp-block-wporg-notice is-alert-notice">
<div class="wp-block-wporg-notice__icon"></div>
<div class="wp-block-wporg-notice__content">
<p>
<?php echo esc_html__( 'This event has ended.', 'wporg-translate-events-2024' ); ?>
</p>
</div>
</div>
<!-- /wp:wporg/notice -->

<?php else : ?>
<!-- wp:wporg-translate-events-2024/event-attend-button
<?php
echo wp_json_encode(
Expand All @@ -38,24 +50,12 @@
);
?>

/-->
/-->
<?php endif; ?>

<?php
if ( is_user_logged_in() ) :
if ( $event->is_past() ) :
?>
<!-- wp:wporg/notice {"type":"alert"} -->
<div class="wp-block-wporg-notice is-alert-notice">
<div class="wp-block-wporg-notice__icon"></div>
<div class="wp-block-wporg-notice__content">
<p>
<?php echo esc_html__( 'This event has ended.', 'wporg-translate-events-2024' ); ?>
</p>
</div>
</div>
<!-- /wp:wporg/notice -->
<?php
if ( $user_is_attending ) :
?>
<!-- wp:wporg/notice {"type":"info", "style":{"spacing":{"margin":{"top":"var:preset|spacing|20"}}}} -->
Expand Down

0 comments on commit 137c979

Please sign in to comment.