Similar to the plugin configuration pages, widgets can have one or more options to allow users to specify how some aspects of the component will behave. These options can be configured individually for each instance of a widget that is added to a website layout. To handle all of the logistics around multiple possible widget instances, WordPress actually takes care of most of the data handling and storage tasks.
This recipe shows how to add a new method to the book review widget class to display configuration options.
You should have already followed the Creating a new widget in WordPress recipe to have a starting point for this recipe. Alternatively, you can get the resulting code (
Chapter 10/ch10-book-review-widget/ch10-book-review-widget-v1.php) from the code bundle and rename the file as