I'm trying to clone a user role in WordPress to give an editor role slightly more ability.
The following line causes the white screen of death:
Can anyone help to add this simple additional capability?
Full function listed below for reference.
$wp_roles = new WP_Roles();
$role_editor = $wp_roles->get_role('editor');
$role_owner = $wp_roles->add_role('owner', 'Site Owner', $role_editor->capabilities);