diff --git a/duoshuo/WordPress.php b/duoshuo/WordPress.php index ba523bc..c9e310e 100644 --- a/duoshuo/WordPress.php +++ b/duoshuo/WordPress.php @@ -605,17 +605,7 @@ public function appendScripts(){ duoshuoQuery.sso.login += '&redirect_to=' + encodeURIComponent(window.location.href); duoshuoQuery.sso.logout += '&redirect_to=' + encodeURIComponent(window.location.href); -isSSL()){ -?> - - - - + 1, ); ?> - + diff --git a/duoshuo/duoshuo.php b/duoshuo/duoshuo.php index 2f89126..a9ac721 100644 --- a/duoshuo/duoshuo.php +++ b/duoshuo/duoshuo.php @@ -9,6 +9,7 @@ */ define('DUOSHUO_PLUGIN_PATH', dirname(__FILE__)); +define('DUOSHUO_RES_PERFIX',(@$_SERVER['HTTPS'] == "on")?'https://':'http://'); if (version_compare(PHP_VERSION, '5.0.0', '<')){ if(is_admin()){ diff --git a/duoshuo/manage.php b/duoshuo/manage.php index 9500d5b..fdb7e0b 100644 --- a/duoshuo/manage.php +++ b/duoshuo/manage.php @@ -3,7 +3,7 @@ $params = array( 'jwt' => $this->jwt(), ); -$adminUrl = 'http://' . $this->shortName . '.' . self::DOMAIN.'/admin/?' . http_build_query($params, null, '&'); +$adminUrl = DUOSHUO_RES_PERFIX . $this->shortName . '.' . self::DOMAIN.'/admin/?' . http_build_query($params, null, '&'); ?>