Created
April 24, 2015 16:14
-
-
Save jeremyfelt/f8d8d36ebd022629b741 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://github.com/washingtonstateuniversity/WSUWP-Platform/blob/master/www/wp-content/sunrise.php#L111-L125 | |
// If a row was found, set it in cache for future lookups | |
if ( $current_blog ) { | |
// Start with the assumption that SSL is available for this domain. | |
$current_blog->ssl_enabled = true; | |
// We're looking for a base option name of foo.bar.com_ssl_disabled | |
$ssl_domain_check = $requested_domain . '_ssl_disabled'; | |
$non_ssl_domain = $wpdb->get_row( $wpdb->prepare( "SELECT option_id FROM {$wpdb->base_prefix}options WHERE option_name = %s", $ssl_domain_check ) ); | |
if ( is_object( $non_ssl_domain ) ) { | |
$current_blog->ssl_enabled = false; | |
} | |
wp_cache_add( $requested_domain . $requested_path, $current_blog, 'wsuwp:site', 60 * 60 * 12 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment