Originally published at: http://www.sitepoint.com/wordpress-dashboard-widgets-api/
The WordPress Dashboard Widgets API lets themes and plugins add, remove or re-position WordPress dashboard widgets. The WordPress Dashboard is the first thing we see when we log in to the WordPress administration screen. The WordPress Dashboard Widget API has been available from WordPress 2.7 onwards.
In this tutorial we’ll look at the different actions and functions that are provided by the API. And, how to add, remove and position dashboard widgets using this API.
Behind the Scene of WordPress Dashboard Widgets
Internally, WordPress dashboard widgets are WordPress meta boxes. The Dashboard Widget API uses the WordPress meta box API to add, remove and position dashboard widgets.
Adding a Dashboard Widget
We can add a widget to the WordPress dashboard using the
wp_add_dashboard_widget function. We need to wrap this function inside the