Add 'rpc' context to siteurl which obeys ADMIN and LOGIN forced SSL. see #10330 for 2.8.1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.8@11687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
617b650b27
commit
3d8c9363a0
|
@ -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';
|
||||
|
|
10
xmlrpc.php
10
xmlrpc.php
|
@ -39,11 +39,11 @@ header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
|
|||
<engineLink>http://wordpress.org/</engineLink>
|
||||
<homePageLink><?php bloginfo_rss('url') ?></homePageLink>
|
||||
<apis>
|
||||
<api name="WordPress" blogID="1" preferred="true" apiLink="<?php echo site_url('xmlrpc.php') ?>" />
|
||||
<api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php') ?>" />
|
||||
<api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php') ?>" />
|
||||
<api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php') ?>" />
|
||||
<api name="Atom" blogID="" preferred="false" apiLink="<?php echo apply_filters('atom_service_url', site_url('wp-app.php/service') ) ?>" />
|
||||
<api name="WordPress" blogID="1" preferred="true" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||
<api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||
<api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||
<api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url('xmlrpc.php', 'rpc') ?>" />
|
||||
<api name="Atom" blogID="" preferred="false" apiLink="<?php echo apply_filters('atom_service_url', site_url('wp-app.php/service', 'rpc') ) ?>" />
|
||||
</apis>
|
||||
</service>
|
||||
</rsd>
|
||||
|
|
Loading…
Reference in New Issue