XML-RPC: Avoid loopback request in `blogger.getUsersBlogs`.
The `blogger.getUsersBlogs` endpoint does not currently work on Multisite environments which require HTTPS. This changes `wp_xmlrpc_server::_multisite_getUsersBlogs()` to call the method directly instead of relying on a new `IXR_Client` request, which only supports HTTP. Props dd32. Fixes #56492. Built from https://develop.svn.wordpress.org/trunk@54468 git-svn-id: http://core.svn.wordpress.org/trunk@54027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
52b8697b05
commit
8608cdcee8
|
@ -4859,12 +4859,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$domain = $current_blog->domain;
|
$domain = $current_blog->domain;
|
||||||
$path = $current_blog->path . 'xmlrpc.php';
|
$path = $current_blog->path . 'xmlrpc.php';
|
||||||
|
|
||||||
$rpc = new IXR_Client( set_url_scheme( "http://{$domain}{$path}" ) );
|
$blogs = $this->wp_getUsersBlogs( $args );
|
||||||
$rpc->query( 'wp.getUsersBlogs', $args[1], $args[2] );
|
if ( $blogs instanceof IXR_Error ) {
|
||||||
$blogs = $rpc->getResponse();
|
return $blogs;
|
||||||
|
|
||||||
if ( isset( $blogs['faultCode'] ) ) {
|
|
||||||
return new IXR_Error( $blogs['faultCode'], $blogs['faultString'] );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $_SERVER['HTTP_HOST'] == $domain && $_SERVER['REQUEST_URI'] == $path ) {
|
if ( $_SERVER['HTTP_HOST'] == $domain && $_SERVER['REQUEST_URI'] == $path ) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-beta3-54467';
|
$wp_version = '6.1-beta3-54468';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue