通过保持当前的主题函数来尝试这一点。PHP更改角色而不是作者
function add_theme_caps() {
// gets the author role
$role = get_role( \'author\' );
// This only works, because it accesses the class instance.
// would allow the author to edit others\' posts for current theme only
$role->add_cap( \'edit_posts\' );
}
add_action( \'admin_init\', \'add_theme_caps\');