Okay
  Print

How to hide "Post Options" for author role?

Is there a way to remove the Post Options from the writer’s post editing screen? If you run a multi-author site and would prefer the author’s didn’t have access to this, just add some hooks to "functions.php":

function miptheme_add_role_to_admin_body($classes) {
    global $current_user;
    $user_role  = array_shift($current_user->roles);
    $classes    .= 'role-'. $user_role;
    return $classes;
}
add_filter('admin_body_class', 'miptheme_add_role_to_admin_body');


function miptheme_hide_post_options_for_author() {
   echo '<style type="text/css">
           body.role-author #redux-mp_weeklynews-metabox-post_options {
                   display: none;
           }
         </style>';
}
add_action('admin_head', 'miptheme_hide_post_options_for_author');

Best regards,
Daniel