Add 'rpc' context to siteurl which obeys ADMIN and LOGIN forced SSL. see #10330

git-svn-id: http://svn.automattic.com/wordpress/trunk@11686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2009-07-04 02:48:22 +00:00
parent 8c62b0e1d6
commit 509df6442d
2 changed files with 6 additions and 6 deletions

View File

@@ -1693,7 +1693,7 @@ function site_url($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) && ( force_ssl_login() || force_ssl_admin() ) )
if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
$scheme = 'https';
elseif ( ('login' == $scheme) && ( force_ssl_admin() ) )
$scheme = 'https';