SHARE
TWEET

Untitled

eventsmanager Jul 22nd, 2016 276 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. This snippet will force event pages to use SSL
  4. http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  5.  */
  6. function my_em_force_ssl( $template ){
  7.     if( !is_ssl() && em_is_event_page() ){
  8.         wp_redirect(str_replace('http:','https:', get_permalink()));
  9.         die();
  10.     }
  11.     return $template;
  12. }
  13. add_filter('template_redirect', 'my_em_force_ssl', 10 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top