To remove default dashboard items and add quick draft widget for custom post type

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’ );

How to change the label text in default setting pages?

You can modify the labels using gettext filter hook ex: add_filter( ‘gettext’, ‘theme_change_label_names’); function theme_change_label_names($translated_text){ if (is_admin()){ switch ( $translated_text ) { case ‘Site Title’ : $translated_text = __( ‘New Site Title label’, ‘theme_text_domain’ ); break; case ‘Tagline’ : $translated_text = __( ‘new Tagline label’, ‘theme_text_domain’ ); break; } } return $translated_text; }

Only allow administrators and editors to access wp-admin

You’re correct in that you should be checking for a capability. However, manage options is only given to administrators by default. You should check against a capability that both editors and administrators have such as delete_others_posts. function restrict_admin(){ //if not administrator, kill WordPress execution and provide a message if ( ! current_user_can( ‘delete_others_posts’ ) ) … Read more