I'm looking for something similar. As osynligstefan, im working with external files in the development of my first mu plugin. :)
Is there a way to set the current_blog for an external file, so the wp functions using global variables work as i expect for the blogi want?
for instance: my ajax plugin calls an external file that in some place call this wpfunction :
wp_set_post_categories( $postid, $post_category ) ; as the only possible parameters of this function are $postid and $post_category and as in the external files the global variable $current_blog is set to the first blog, [blog_id]=1, when calling this function will affect the post in the [blog_id]=1, and off course not the post in the blog from where i made the ajax call.
something like this would be amazing:
set_current_blog($blogid); (something similar to set_curent_user)or adding an extra parameter to most of functions
wp_set_post_categories( $postid, $post_category, $blogid ) ;
i did my search and research and played around with this function with no luck :(
any ideas out there? I need help.
note:sorry for my possible english language mistakes.