get_blog_permalink [ WordPress Function ]
get_blog_permalink ( $_blog_id, $post_id )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_permalink, get_post_permalink, get_sample_permalink, get_blog_option, get_blog_list
Get the permalink for a post on another blog.
Source
<?php
function get_blog_permalink( $_blog_id, $post_id ) {
$key = "{$_blog_id}-{$post_id}-blog_permalink";
$link = wp_cache_get( $key, 'site-options' );
if ( $link == false ) {
switch_to_blog( $_blog_id );
$link = get_permalink( $post_id );
restore_current_blog();
wp_cache_add( $key, $link, 'site-options', 360 );
}
return $link;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/get blog permalink « WordPress Codex
Description. Returns the permalink of a specific blog post. Parameters. $blog_id: (integer) (required) ID of the blog the specific post belongs to. Default: None ...
codex.wordpress.org - WordPress › Support » get_blog_permalink
I think get_blog_permalink() should consider the $wp_rewrite-> use_trailing_slashes realted to the blog I want get the post permalink else it will add or not a final ...
wordpress.org - Call to undefined function get_blog_permalink() (Buddypress)
Hi, I've got an error message on profile in Buddypress : Fatal error: Call to undefined function get_blog_permalink() in ...
premium.wpmudev.org - get_blog_permalink | A HitchHackers guide through WordPress
Feb 12, 2011 ... Source code. function get_blog_permalink( $_blog_id, $post_id ) { $key = "{$ _blog_id}-{$post_id}-blog_permalink";. 1216 ...
hitchhackerguide.com