Regarding the return, I meant an array of arrays/objects or attachment/post ids
I seemed to have found it, it returns an array of attachment objects. Here it is for anyone whoever needs it as well:
Here is the function I created:
global $wpdb;
if(!is_numeric($blog_id)) {
$blog_id = web_get_blog_id($blog_id);
}
$wpdb->set_blog_id($blog_id, 1);
$args = array(
'post_type' => 'attachment',
'post_mime_tyupe' => 'image'
);
if( !$attachments = get_children($args) ) {
return false;
} else {
return $attachments;
}
Thanks for sharing – I’ve tried your function. What is the function web_get_blog_id()? WordPress complains it doesn’t exist.
Using WordPress 2.8