Skip to content

Instantly share code, notes, and snippets.

@bootjp
Created January 6, 2015 14:10
Show Gist options
  • Save bootjp/58212dbe5ce3d7a01c26 to your computer and use it in GitHub Desktop.
Save bootjp/58212dbe5ce3d7a01c26 to your computer and use it in GitHub Desktop.
WordPress SSL対応
<?php
function is_ssl() {
return true; // ←これを追記して無理やり処理
if ( isset($_SERVER['HTTPS']) ) {
if ( 'on' == strtolower($_SERVER['HTTPS']) )
return true;
if ( '1' == $_SERVER['HTTPS'] )
return true;
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment