get_blog_post( int $blog_id, int $post_id )
Get a blog post from any site on the network.
Parameters
- $blog_id
-
(int) (Required) ID of the blog.
- $post_id
-
(int) (Required) ID of the post you're looking for.
Return
Source
File: wp-includes/ms-functions.php
function get_blog_post( $blog_id, $post_id ) {
switch_to_blog( $blog_id );
$post = get_post( $post_id );
restore_current_blog();
return $post;
}
Changelog
Version | Description |
---|---|
WP-MU | Introduced. (3.0.0) |