. */ function ccs_https_fixup() { $ccs_https_hit=0; if ( (!is_admin()) && (!preg_match('/wp-login/', $_SERVER['REQUEST_URI']) === true) ) { $ccs_https_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $ccs_https_slug = basename($_SERVER['REQUEST_URI']); $ccs_https_options = get_option('ccs_https_options'); if ($_SERVER['HTTPS'] == "on") { if (strripos($ccs_https_options['secureslugs'], $ccs_https_slug) === FALSE) { $ccs_https_protocol = "http://"; $ccs_https_hit = 1; } else { $ccs_https_hit = 0; } } else { if (strripos($ccs_https_options['secureslugs'], $ccs_https_slug) === FALSE) { $ccs_https_hit = 0; } else { $ccs_https_protocol = "https://"; $ccs_https_hit = 1; } } if ($ccs_https_hit == 1) { header("Location: $ccs_https_protocol$ccs_https_url"); exit; } } } function ccs_https_options_init(){ register_setting( 'ccs_https_options_group', 'ccs_https_options', 'ccs_https_options_validate' ); } function ccs_https_options_add_page() { add_options_page('CCS-HTTPS Options Page', 'CCS-HTTPS', 'manage_options', 'ccs_https_options', 'ccs_https_options_do_page'); } function ccs_https_options_do_page() { ?>

CCS-HTTPS Options

Comma separated list of pages that require HTTPS (SSL)
Please use the "slug" names only. The human readable (i.e. friendly) page names will not be recognized.