WordPress开发者和主题制作者的搜索引擎



get_blog_permalink ›

Since3.0.0
已弃用n/a
get_blog_permalink ( $blog_id, $post_id )
参数: (2)
  • (int) $blog_id ID of the source blog.
    Required: Yes
  • (int) $post_id ID of the desired post.
    Required: Yes
返回:
  • (string) The post's permalink
定义在:
文档:
Change Log:
  • MU

Get the permalink for a post on another blog.



源码

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

	return $link;
}