wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_blog_permalink › WordPress Function

Depuis
Dépréciéen/a
get_blog_permalink ( $blog_id, $post_id )
Paramètres: (2)
  • (int) $blog_id ID of the source blog.
    Requis: Oui
  • (int) $post_id ID of the desired post.
    Requis: Oui
Retourne:
  • (string) The post's permalink.
Défini(e) dans:
Codex:
Changelog:
  • MU

Gets the permalink for a post on another blog.



Source

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

	return $link;
}