试试这个。。。这应该行得通。
<?php
add_action(\'init\', \'cloneRole\');
function cloneRole()
{
global $wp_roles;
if ( ! isset( $wp_roles ) )
$wp_roles = new WP_Roles();
$adm = $wp_roles->get_role(\'administrator\');
//Adding a \'new_role\' with all admin caps
$wp_roles->add_role(\'new_role\', \'My Custom Role\', $adm->capabilities);
}
?>
检查一下。