admin.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. This file handles the admin area and functions.
  4. You can use this file to make changes to the
  5. dashboard. Updates to this page are coming soon.
  6. It's turned off by default, but you can call it
  7. via the functions file.
  8. Developed by: Eddie Machado
  9. URL: http://themble.com/bones/
  10. */
  11. /************* DASHBOARD WIDGETS *****************/
  12. // disable default dashboard widgets
  13. function disable_default_dashboard_widgets() {
  14. // remove_meta_box('dashboard_right_now', 'dashboard', 'core'); // Right Now Widget
  15. remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); // Comments Widget
  16. remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); // Incoming Links Widget
  17. remove_meta_box('dashboard_plugins', 'dashboard', 'core'); // Plugins Widget
  18. // remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); // Quick Press Widget
  19. remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); // Recent Drafts Widget
  20. remove_meta_box('dashboard_primary', 'dashboard', 'core'); //
  21. remove_meta_box('dashboard_secondary', 'dashboard', 'core'); //
  22. /* plugin dashboard boxes */
  23. remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Yoast's SEO Plugin Widget
  24. /*
  25. have more plugin widgets you'd like to remove?
  26. share them with us so we can get a list of
  27. the most commonly used. :D
  28. https://github.com/eddiemachado/bones/issues
  29. */
  30. }
  31. // removing the dashboard widgets
  32. add_action('admin_menu', 'disable_default_dashboard_widgets');