function add_custom_caps() {
global $wp_roles;
if ( ! isset( $wp_roles ) ) {
$wp_roles = new WP_Roles();
}
$role = get_role( \'subscriber\' );
foreach ($wp_roles->get_role(\'editor\')->capabilities as $key => $value){
$role->add_cap( $key );
}
}
add_action( \'admin_init\', \'add_custom_caps\');
它将克隆编辑器角色的所有功能,并将其添加到订阅服务器角色