i want to remove screen options from wordpress admin panel and remove default dashboard items and add quick draft widget in dashboard for custom post type “gallery”.
2 Answers
You can remove the Screen Options with the ‘screen_options_show_screen’ filter.
function myplugin_disable_screen_options( $show_screen ) {
// Logic to allow admins to still access the menu
if ( current_user_can( 'manage_options' ) ) {
return $show_screen;
}
return false;
}
add_filter( 'screen_options_show_screen', 'myplugin_disable_screen_options' );