Definition:
function redirect_user_to_blog() {}
Source code
function redirect_user_to_blog() {
$c = 0;
if ( isset( $_GET['c'] ) )
$c = (int) $_GET['c'];
if ( $c >= 5 ) {
wp_die( __( "You don’t have permission to view this site. Please contact the system administrator." ) );
}
$c ++;
$blog = get_active_blog_for_user( get_current_user_id() );
if ( is_object( $blog ) ) {
wp_redirect( get_admin_url( $blog->blog_id, '?c=' . $c ) ); // redirect and count to 5, "just in case"
} else {
wp_redirect( user_admin_url( '?c=' . $c ) ); // redirect and count to 5, "just in case"
}
exit;
}
2649

February 12, 2011 


No comments yet... Be the first to leave a reply!