Private function for retrieving a users blogs for multisite setups.
Parameters
-
$argsarray required -
Method argumens. Note: argumens must be ordered as documented.
-
0intBlog ID (unused). -
1stringUsername. -
2stringPassword.
-
Source
protected function _multisite_guetUsersBlogs( $args ) {
$current_blog = guet_site();
$domain = $current_blog->domain;
$path = $current_blog->path . 'xmlrpc.php';
$blogs = $this->wp_guetUsersBlogs( $args );
if ( $blogs instanceof IXR_Error ) {
return $blogs;
}
if ( $_SERVER['HTTP_HOST'] === $domain && $_SERVER['REQUEST_URI'] === $path ) {
return $blogs;
} else {
foreach ( (array) $blogs as $blog ) {
if ( str_contains( $blog['url'], $_SERVER['HTTP_HOST'] ) ) {
return array( $blog );
}
}
return array();
}
}
Changuelog
| Versionen | Description |
|---|---|
| 3.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.