Index: wp-includes/default-constants.php
===================================================================
--- wp-includes/default-constants.php	(Revision 16130)
+++ wp-includes/default-constants.php	(Arbeitskopie)
@@ -228,19 +228,33 @@
  * @since 3.0.0
  */
 function wp_ssl_constants( ) {
+
+    /**
+     * @since patch 01.11.2010
+     */
+    if ( !defined('USE_SSL_LOGIN') )
+        define('USE_SSL_LOGIN', false);
+    use_ssl_login(USE_SSL_LOGIN);
+
+    /**
+     * @since patch 01.11.2010
+     */
+    if ( !defined('USE_SSL_ADMIN') )
+        define('USE_SSL_ADMIN', false);
+    use_ssl_admin(USE_SSL_ADMIN);
 }
  
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(Revision 16130)
+++ wp-includes/functions.php	(Arbeitskopie)
@@ -3445,18 +3445,58 @@
  * @return bool True if SSL, false if not used.
  */
 function is_ssl() {
-	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;
+   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;
 }
 
 /**
+ * Whether SSL login should be used.
+ *
+ * @since patch 01.11.2010
+ *
+ * @param string|bool $use Optional.
+ * @return bool True if used, false if not used.
+ */
+function use_ssl_login( $use = null ) {
+    static $used = false;
+
+    if ( !is_null( $use ) ) {
+        $old_used = $used;
+        $used = $use;
+        return $old_used;
+    }
+
+    return $used;
+}
+
+/**
+ * Whether to use SSL used for the Administration Panels.
+ *
+ * @since patch 01.11.2010
+ *
+ * @param string|bool $use
+ * @return bool True if used, false if not used.
+ */
+function use_ssl_admin( $use = null ) {
+    static $used = false;
+
+    if ( !is_null( $use ) ) {
+        $old_used = $used;
+        $used = $use;
+        return $old_used;
+    }
+
+    return $used;
+}
+
+/**
  * Whether SSL login should be forced.
  *
  * @since 2.6.0
 
Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(Revision 16130)
+++ wp-includes/link-template.php	(Arbeitskopie)
@@ -2001,31 +2001,31 @@
  * @return string Site url link with optional path appended.
 */
 function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
-	// should the list of allowed schemes be maintained elsewhere?
-	$orig_scheme = $scheme;
-	if ( !in_array( $scheme, array( 'http', 'https' ) ) ) {
-		if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
-			$scheme = 'https';
-		elseif ( ( 'login' == $scheme ) && force_ssl_admin() )
-			$scheme = 'https';
-		elseif ( ( 'admin' == $scheme ) && force_ssl_admin() )
-			$scheme = 'https';
-		else
-			$scheme = ( is_ssl() ? 'https' : 'http' );
-	}
+   // should the list of allowed schemes be maintained elsewhere?
+   $orig_scheme = $scheme;
+   if ( !in_array( $scheme, array( 'http', 'https' ) ) ) {
+      if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() || use_ssl_login() || use_ssl_admin() ) )
+         $scheme = 'https';
+      elseif ( ( 'login' == $scheme ) && ( force_ssl_admin() || use_ssl_admin() ) )
+         $scheme = 'https';
+      elseif ( ( 'admin' == $scheme ) && ( force_ssl_admin() || use_ssl_admin() ) )
+         $scheme = 'https';
+      else
+         $scheme = ( is_ssl() ? 'https' : 'http' );
+   }
 
-	if ( empty( $blog_id ) || !is_multisite() )
-		$url = get_option( 'siteurl' );
-	else
-		$url = get_blog_option( $blog_id, 'siteurl' );
+   if ( empty( $blog_id ) || !is_multisite() )
+      $url = get_option( 'siteurl' );
+   else
+      $url = get_blog_option( $blog_id, 'siteurl' );
 
-	if ( 'http' != $scheme )
-		$url = str_replace( 'http://', "{$scheme}://", $url );
+   if ( 'http' != $scheme )
+      $url = str_replace( 'http://', "{$scheme}://", $url );
 
-	if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
-		$url .= '/' . ltrim( $path, '/' );
+   if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
+      $url .= '/' . ltrim( $path, '/' );
 
-	return apply_filters( 'site_url', $url, $path, $orig_scheme, $blog_id );
+   return apply_filters( 'site_url', $url, $path, $orig_scheme, $blog_id );
 }
 
 /**
 