Skip to content

Commit

Permalink
Coding standard fixed (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Mar 4, 2022
1 parent 37b4af4 commit b0cbcb1
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions plugins/events-manager/placeholders/bookingform.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,34 +43,32 @@
<?php
$em_booking = $em_event->get_bookings()->has_booking();
}

$cancel_url = esc_attr(
add_query_arg(
array(
'cancel' => true,
'cancel_nonce' => wp_create_nonce( 'cancel_booking' ),
),
esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) )
)
);
?>

<?php if ( is_object( $em_booking ) ) : ?>
<a class="em-bookings-cancel events-single__cancel btn btn--submit btn--dark" href="
<?php
echo esc_attr(
add_query_arg(
array(
'cancel' => true,
'cancel_nonce' => wp_create_nonce( 'cancel_booking' ),
),
esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) )
)
);
?>
" onclick="if( !confirm('<?php print esc_attr__( 'Are you sure you dont want to attend this event?', 'community-portal' ); ?>') ){ return false; }">
<a class="em-bookings-cancel events-single__cancel btn btn--submit btn--dark" href="<?php echo $cancel_url; // phpcs:ignore ?>" onclick="if( !confirm('<?php print esc_attr__( 'Are you sure you dont want to attend this event?', 'community-portal' ); ?>') ){ return false; }">
<?php esc_html_e( 'I won\'t attend', 'community-portal' ); ?>
</a>
<?php else : ?>
<form
class="em-booking-form"
name='booking-form'
method='post'
action='<?php echo esc_url_raw( remove_query_arg( 'cancel', apply_filters( 'em_booking_form_action_url', '' ) ) ); ?>'
action='<?php echo apply_filters( 'em_booking_form_action_url', '' ); // phpcs:ignore ?>#em-booking'
>
<input type='hidden' name='action' value='booking_add'/>
<input type='hidden' name='event_id' value='<?php echo esc_attr( $em_event->get_bookings()->event_id ); ?>'/>
<?php wp_nonce_field( 'booking_add' ); ?>
<input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce( 'booking_add' ); // phpcs:ignore ?>'/>
<?php
$count = 0;
foreach ( $em_tickets as $ticket ) {
Expand Down

0 comments on commit b0cbcb1

Please sign in to comment.