How to Remove Dashboard widgets in WordPress

This is a quick way to remove dashboard widgets in WordPress. These are some of the widgets I hide on one of my WordPress installations by adding these lines to the theme functions.php file. To hide other widgets, view the source code for the Dashboard and search for their label value.

add_action('admin_init', 'rw_remove_dashboard_widgets');
function rw_remove_dashboard_widgets() {
 //remove_meta_box('dashboard_right_now', 'dashboard', 'normal');   // right now
 remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // recent comments
 remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');  // incoming links
 remove_meta_box('dashboard_plugins', 'dashboard', 'normal');   // plugins
 remove_meta_box('dashboard_quick_press', 'dashboard', 'normal');  // quick press
 remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal');  // recent drafts
 remove_meta_box('gbworld_dashboard_widget', 'dashboard', 'normal'); // your blog-activity
 remove_meta_box('blogplay_db_widget', 'dashboard', 'normal'); // blogplay.com widget
 remove_meta_box('dashboard_primary', 'dashboard', 'normal');   // wordpress blog
 remove_meta_box('dashboard_secondary', 'dashboard', 'normal');   // other wordpress news
 remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); //yoast widget