[wp-xmlrpc] wp.getUsersBlogs method

Joseph Scott joseph at randomnetworks.com
Fri Jun 13 21:04:28 GMT 2008


On Jun 13, 2008, at 9:22 AM, Alexander Concha wrote:

> Hello,
>
> Joseph Scott escribió:
>> The wp.getUsersBlogs method has been added to -trunk:
>>     http://trac.wordpress.org/ticket/7130
>
> I'm not sure, but as far as I remember 'switch_to_blog' is not  
> available on WordPress, so the patch isn't quite correct.


Correct, switch_to_blog() is WPMU only function.  But we check to see  
if we are in WPMU or not at the top of the function:

function wp_getUsersBlogs( $args ) {
	// If this isn't on WPMU then just use blogger_getUsersBlogs
	if( !function_exists( 'is_site_admin' ) ) {
		array_unshift( $args, 1 );
		return $this->blogger_getUsersBlogs( $args );
	}


The is_site_admin() function is also WPMU specific, so if it doesn't  
exist we just use the blogger_getUsersBlogs function.

--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/






More information about the wp-xmlrpc mailing list