-
-
Save alinademi/153b4b13690c249957ba22b10b21b117 to your computer and use it in GitHub Desktop.
Remove all the default WordPress dashboard widgets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Remove Dashboard Meta Boxes | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: Removes the default dashboard widgets from the WordPress admin. | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: GPL2 | |
*/ | |
add_action( 'wp_dashboard_setup', 'pmg_rm_meta_boxes' ); | |
function pmg_rm_meta_boxes() | |
{ | |
/** | |
* Removes the "Right Now" widget that tells you post/comment counts | |
* and what theme you're using. | |
*/ | |
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); | |
/** | |
* Removes the recent comments widget | |
*/ | |
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); | |
/** | |
* Removes the incoming links widget. | |
*/ | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); | |
/** | |
* Removes the plugins widgets that displays the most popular, | |
* newest, and recently updated plugins | |
*/ | |
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); | |
/** | |
* Removes the quick press widget that allows you post right from the dashboard | |
*/ | |
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); | |
/** | |
* Removes the widget containing the list of recent drafts | |
*/ | |
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); | |
/** | |
* Removes the "WordPress Blog" widget | |
*/ | |
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); | |
/** | |
* Removes the "Other WordPress News" widget | |
*/ | |
remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment