Update:
sorry i mist it somehow that you stated that you know about "remove_meta_box" function
anyway i did a little digging and i looked at the Adminimize plugin and saw how it works and basically it adds a css style="display none;" to that meta box according to the options you set in the options panel using a for each loop to run over all roles so you can do something like this:
function get_all_user_roles() {
global $wp_roles;
$user_roles = array();
if ( isset($wp_roles->roles) && is_array($wp_roles->roles) ) {
foreach ($wp_roles->roles as $role => $data) {
array_push($user_roles, $role);
//$data contains caps, maybe for later use..
}
}
return $user_roles;
}
// return string The name of the current role
function get_current_user_role() {
global $wp_roles;
$current_user = wp_get_current_user();
$roles = $current_user->roles;
$role = array_shift($roles);
return isset($wp_roles->role_names[$role]) ? translate_user_role($wp_roles->role_names[$role] ) : false;
}
//hook admin CSS
add_action('admin_print_styles', 'meta_box_css_hack');
//the magic happens here
function meta_box_css_hack(){
$user_roles = get_all_user_roles();
foreach ($user_roles as $role) {
//first we check if its curent user
if ($role = get_current_user_role()){
/* each role has it own option in the option database witch is an array that holds the name of the meta-boxes div id. */
$disabled_metaboxes_post_ = get_option('disable[$role]');
echo '<style type=text/css">';
$out = ''
foreach ($disabled_metaboxes_post_ as $meta_id)
{
$out .= '#'.$meta_id . ', ';
}
$out = substr($out,0,-2);
}
$out .= ' { display: none !important;} </style>';
echo $out;
break;
}
}
i hope this helps.