Adding a custom dashboard widget
Content widgets are used by website administrators to easily add content to their front-facing websites. WordPress contains another type of widget that plugin developers can use to enhance the administrator experience. Dashboard widgets are sections that appear on the front page of a website's administration area. These sections can offer any kind of functionality, from simple information displays indicating how much data is stored in a plugin to forms that allow website administrators to quickly perform configuration tasks.
You should have already followed the Updating the page title to include custom post data using plugin filters recipe in Chapter 4, The Power of Custom Post Types, to have a starting point for this recipe. Alternatively, you can get the resulting code (
/ch4-book-reviews/ch4-book-reviews-v12.php) from the code bundle and activate the Chapter 4 - Book Reviews plugin.
How to do it...
Follow these steps...