Widgets have been present in WordPress from the early days of the platform. They allow users to easily populate sidebars or other areas of their website theme with blocks of content that are provided by WordPress itself (post or page data), or by any plugins that have been installed (for example, bug tracking system information). Looking at a WordPress installation, the default set of widgets include the Archives widget, which lists monthly post archives, and the Recent Comments widget, which provides an easy way to display visitor comments stored on your WordPress website.
Following its open design, WordPress provides functions that allow plugin developers to create new widgets that users will be able to add to their page design. This chapter shows how to use the widget class to create a custom widget. It also covers the second type of widget, the dashboard widget...