pmpro_check_site_url_for_https

The Paid Memberships Pro pmpro check site url for https function.

Description

pmpro_check_site_url_for_https( (constant) $besecure = NULL ); 

Parameters (1)

0. $besecure — Optional. (constant) => NULL
The besecure.

Usage

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

Defined (1)

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

/includes/https.php  
  1. function pmpro_check_site_url_for_https($besecure = NULL) 
  2. {  
  3. global $wpdb, $pmpro_siteurl; 
  4.  
  5. //need to get this from the database because we filter get_option 
  6. if(empty($pmpro_siteurl)) 
  7. $pmpro_siteurl = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl' LIMIT 1");  
  8.  
  9. //entire site is over https? 
  10. if(strpos($pmpro_siteurl, "https:") !== false) 
  11. $besecure = true; 
  12.  
  13. return $besecure;