// HSTS
if (is_ssl()){
$time = esc_attr(get_option('security_headers_hsts_time'));
$subdomain = esc_attr(get_option('security_headers_hsts_subdomains'));
$preload = esc_attr(get_option('security_headers_hsts_preload'));
if ( ctype_digit($time) ) {
$subdomain_output = $subdomain > 0 ? "; includeSubDomains" : "";
$preload_output = $preload > 0 ? "; preload" : "";
header("Strict-Transport-Security: max-age=$time $subdomain_output $preload_output");
}
}
