post_type );
$has_valid_token = $is_valid_slide && class_exists( 'HSSM_Notifications' ) && HSSM_Notifications::is_valid_confirm_token( $slide_id, $token );
$already_confirmed = $is_valid_slide && (bool) get_post_meta( $slide_id, '_hssm_live_confirmed', true );
$confirmed = $already_confirmed;
$error_message = '';
if ( $is_valid_slide && ! $has_valid_token ) {
$error_message = 'This confirmation link is invalid or expired.';
}
if ( $has_valid_token && ! $already_confirmed && isset( $_POST['confirm_live_action'] ) && 'confirm' === $_POST['confirm_live_action'] ) {
if ( isset( $_POST['hssm_live_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['hssm_live_nonce'] ) ), 'hssm_confirm_live_action' ) ) {
$notifications = new HSSM_Notifications();
$notifications->notify_all_confirmed_live( $slide_id );
$confirmed = (bool) get_post_meta( $slide_id, '_hssm_live_confirmed', true );
if ( ! $confirmed ) {
$error_message = 'Could not send the confirmation email. Please try again.';
}
} else {
$error_message = 'Security check failed. Please refresh and try again.';
}
}
$thumbnail = $is_valid_slide ? get_the_post_thumbnail_url( $slide_id, 'medium' ) : '';
?>
Invalid Slide
The slide you are trying to confirm could not be found.
Return Home
Thank you!
Notifications have been sent to the Editor and Creator confirming that "post_title ); ?>" is Live.
Return Home