pmpro_admin_https_handler

The Paid Memberships Pro pmpro admin https handler function.

Description

pmpro_admin_https_handler(); 

Usage

  1. if ( !function_exists( 'pmpro_admin_https_handler' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/https.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = pmpro_admin_https_handler(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/https.php  
  1. function pmpro_admin_https_handler() 
  2. if(!empty($_SERVER['HTTPS'])) 
  3. if($_SERVER['HTTPS'] && strtolower($_SERVER['HTTPS']) != "off" && strtolower($_SERVER['HTTPS']) != "false" && is_admin()) 
  4. if(substr(get_option("siteurl"), 0, 5) == "http:" && !force_ssl_admin()) 
  5. //need to redirect to non https 
  6. wp_redirect("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
  7. exit;