Noscope is a bi-weekly journal serving up snacksized portions of pointless stuff since 2001. On a new linode server!
I also do freelance design and usability via dejligt.com

WordPress Trick: Hide Admin Panels From Specific User Roles

    16:35 on March 9, 2010 ,

When you’re building a WordPress website for a client, sometimes you’ll want to hide certain admin panels from specific user roles; do editors really need “custom fields”? Drop the following code into your functions.php file to hide the Custom Fields meta-box from editors.

function hide_meta_boxes() {
     remove_meta_box('postcustom','post','normal');
     remove_meta_box('postcustom','page','normal');
}

if (!current_user_can('manage_options')) {
	add_action('admin_init','hide_meta_boxes');
}

The remove_meta_box function takes three parameters. 1: the div ID of the box you want to hide, the context (post or page) and position (normal or advanced).