Un motore di ricerca WordPress per sviluppatori e autori di temi



get_blog_post ›

Da3.0.0
Deprecaton/a
get_blog_post ( $blog_id, $post_id )
Parametri: (2)
  • (int) $blog_id ID of the blog.
    Richiesto:
  • (int) $post_id ID of the post you're looking for.
    Richiesto:
Ritorna:
  • (WP_Post|null) WP_Post on success or null on failure
Definito a:
Codex:
ChangeLog:
  • MU

Get a blog post from any site on the network.



Sorgenti

function get_blog_post( $blog_id, $post_id ) {
	switch_to_blog( $blog_id );
	$post = get_post( $post_id );
	restore_current_blog();

	return $post;
}