我发现了一个涉及重定向用户的黑客解决方案:
if ((basename($_SERVER[\'SCRIPT_NAME\']) == \'edit.php\')) {
// your code here
$author = wp_get_current_user();
if(isset($author->roles[0])){
$current_role = $author->roles[0];
}else{
$current_role = \'no_role\';
}
if($current_role == \'ai1ec_event_assistant\' && ($_GET[\'post_type\']==\'\'&&$_GET[\'category_name\']==\'\')){
header("Location:/wp-admin/edit.php?category_name=events-list");
}
}