Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. // Remove WordPress Welcome Widget
  2. remove_action('welcome_panel','wp_welcome_panel');
  3.  
  4. // Remove all WordPress Core Dashboard Widgets
  5. add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
  6. function remove_dashboard_widgets() {
  7. global $wp_meta_boxes;
  8.  
  9. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
  10. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
  11. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
  12. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
  13. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
  14. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
  15. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
  16. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
  17. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
  18. //unset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);
  19.  
  20. }
  21.  
  22. // Create another widget
  23. add_action('wp_dashboard_setup', 'dashboard_widget');
  24. function dashboard_widget() {
  25. global $wp_meta_boxes;
  26. wp_add_dashboard_widget('custom_help_widget', 'Suporte', 'suporte_dashboard');
  27. }
  28. // New Widget Content
  29. function suporte_dashboard() {
  30. printf('<h3>Encontrou algum problema?</h3><p>www.cada-um-com-seus-problemas.com</p>');
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement