Posted By

laurentzziu on 11/09/10


Tagged

wordpress dashboard widget


Versions (?)

Custom Admin Dashboard Widget


 / Published in: PHP
 

  1. function example_dashboard_widget_function() {
  2. // Display whatever it is you want to show
  3. echo "Hello World, I'm a great Dashboard Widget";
  4. }
  5.  
  6. // Create the function use in the action hook
  7. function example_add_dashboard_widgets() {
  8. wp_add_dashboard_widget('example_dashboard_widget', 'Example Dashboard Widget', 'example_dashboard_widget_function');
  9. }
  10. // Hoook into the 'wp_dashboard_setup' action to register our other functions
  11. add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );

Report this snippet  

You need to login to post a comment.