Skip to content

Instantly share code, notes, and snippets.

@erikmd
Created November 5, 2016 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikmd/c4bf8e98b616a4e0ba1180b63406d07d to your computer and use it in GitHub Desktop.
Save erikmd/c4bf8e98b616a4e0ba1180b63406d07d to your computer and use it in GitHub Desktop.
Patch for HTTPS issue with events-manager/templates/forms/bookingform/login.php
--- a/events-manager/templates/forms/bookingform/login.php 2016-09-06 18:32:58.000000000 +0200
+++ b/events-manager/templates/forms/bookingform/login.php 2016-10-26 17:03:52.000000000 +0200
@@ -17,7 +17,7 @@
<?php do_action('login_form'); ?>
<input type="submit" name="wp-submit" id="em_wp-submit" value="<?php esc_html_e('Log In', 'events-manager'); ?>" tabindex="100" />
<input name="rememberme" type="checkbox" id="em_rememberme" value="forever" /> <label><?php esc_html_e( 'Remember Me','events-manager') ?></label>
- <input type="hidden" name="redirect_to" value="<?php echo esc_url($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>#em-booking" />
+ <input type="hidden" name="redirect_to" value="<?php echo esc_url(($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>#em-booking" />
<br />
<?php
//Signup Links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment