401 ) ); } return $result; } /** * Outputs an error message if a user attempts to access a site that they do not have * access to on multisite. * * @since 2.0.0 * @access public * @return void */ function members_ms_private_blog_die() { $blogs = get_blogs_of_user( get_current_user_id() ); $blogname = get_bloginfo( 'name' ); $message = __( 'You do not currently have access to the "%s" site. If you believe you should have access, please contact your network administrator.', 'members' ); if ( empty( $blogs ) ) wp_die( sprintf( $message, $blogname ), 403 ); $output = '

' . sprintf( $message, $blogname ) . '

'; $output .= sprintf( '

%s

', __( 'If you reached this page by accident and meant to visit one of your own sites, try one of the following links.', 'members' ) ); $output .= ''; wp_die( $output, 403 ); }