public/wordpress/wp-content/plugins/wp-courseware/includes/core/https.php
/**
	 * Force HTTPS on Template redirect.
	 *
	 * If we end up on a page ensure it has the correct http/https url.
	 *
	 * @since 4.3.0
	 */
Force HTTPS on Template redirect.
If we end up on a page ensure it has the correct http/https url.


Force HTTPS on Template redirect . If we end up on a page ensure it has the correct http / https url .
public function force_https_template_redirect() {
		if ( ! is_ssl() && ( wpcw_is_checkout() || wpcw_is_account_page() || apply_filters( 'wpcw_force_ssl_checkout', false ) ) ) {
			if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
				wp_safe_redirect( preg_replace( '|^http://|', 'https://', $_SERVER['REQUEST_URI'] ) );
				exit;
			} else {
				wp_safe_redirect( 'https://' . ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'] );
				exit;
			}
		}
	}
public function force_https_template_redirect ( ) { if ( ! is_ssl ( ) && ( wpcw_is_checkout ( ) || wpcw_is_account_page ( ) || apply_filters ( 'wpcw_force_ssl_checkout' , false ) ) ) { if ( 0 === strpos ( $ _SERVER [ 'REQUEST_URI' ] , 'http' ) ) { wp_safe_redirect ( preg_replace ( '|^http://|' , 'https://' , $ _SERVER [ 'REQUEST_URI' ] ) ) ; exit ; } else { wp_safe_redirect ( 'https://' . ( ! empty ( $ _SERVER [ 'HTTP_X_FORWARDED_HOST' ] ) ? $ _SERVER [ 'HTTP_X_FORWARDED_HOST' ] : $ _SERVER [ 'HTTP_HOST' ] ) . $ _SERVER [ 'REQUEST_URI' ] ) ; exit ; } } }
Force HTTPS on Template redirect.
Force HTTPS on Template redirect .