使用is_user_member_of_blog()
检查当前用户是否已分配到中的日志wp-admin/network/site-users.php
. 然后钩住template_redirect
并运行测试:
add_action( \'template_redirect\', function() {
if ( ! is_user_member_of_blog() )
die( \'Please ask the network administrator to get access to this blog.\' );
});