get_blog_permalink()WP 3.0.0

Gets the permalink for a post on another blog.

No Hooks.

Return

String. The post's permalink.

Usage

get_blog_permalink( $blog_id, $post_id );
$blog_id(int) (required)
ID of the source blog.
$post_id(int) (required)
ID of the desired post.

Changelog

Since 3.0.0 Introduced.
Since MU (3.0.0) 1.0

get_blog_permalink() code WP 6.5.2

function get_blog_permalink( $blog_id, $post_id ) {
	switch_to_blog( $blog_id );
	$link = get_permalink( $post_id );
	restore_current_blog();

	return $link;
}