Posted By

javifr on 10/29/10


Tagged

wordpress dashboard widgets admin custom


Versions (?)

Admin custom widget, and widget removal


 / Published in: PHP
 

  1. add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets_author');
  2.  
  3. function my_custom_dashboard_widgets_author() {
  4.  
  5. global $wp_meta_boxes;
  6.  
  7. unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
  8. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
  9. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
  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_incoming_links']);
  13. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
  14. unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
  15.  
  16. wp_add_dashboard_widget('custom_help_widget', 'Titulo de un magnifico widget', 'custom_dashboard_help');
  17. }
  18.  
  19. function custom_dashboard_help() {
  20. echo '<p>lorem ipsum dorem ponem</p>';
  21. }
  22.  

Report this snippet  

You need to login to post a comment.