Index: src/wp-includes/functions.php
===================================================================
--- src/wp-includes/functions.php	(revision 28704)
+++ src/wp-includes/functions.php	(working copy)
@@ -3360,21 +3360,29 @@
 }
 
 /**
- * Determine if SSL is used.
+ * Determine if SSL is used for either the current request or the provided URL.
  *
  * @since 2.6.0
  *
- * @return bool True if SSL, false if not used.
+ * @param string $url Optional.
+ * @return bool True if the $url param or current request is SSL, false if not used.
  */
-function is_ssl() {
+function is_ssl( $url = null ) {
+	if ( ! empty( $url ) ) {
+		return ( 'https' === @parse_url( $url, PHP_URL_SCHEME ) );
+	}
+
 	if ( isset($_SERVER['HTTPS']) ) {
-		if ( 'on' == strtolower($_SERVER['HTTPS']) )
+		if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) {
 			return true;
-		if ( '1' == $_SERVER['HTTPS'] )
+		}
+		if ( '1' == $_SERVER['HTTPS'] ) {
 			return true;
-	} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
+		}
+	} elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
 		return true;
 	}
+
 	return false;
 }
 
