Adding a custom widget to the network dashboard
As discussed in the Creating a network-level plugin with admin pages recipe in Chapter 3, User Settings and Administration Pages, WordPress offers a very powerful mode called network mode that allows multiple websites to be served from a single installation of the platform. When creating a plugin, developers need to think about whether it would make sense for their plugin to offer a dashboard widget that would only be seen on the network administrator's dashboard instead of being seen on individual website dashboards, or whether their plugin's scope is really more relevant at each website's level.
Getting ready
You should have already followed the Adding a custom dashboard widget recipe to have a starting point for this recipe. Alternatively, you can get the resulting code (ch10/ch10-book-review-dashboard-widget/ch10-book-review-dashboard-widget-v1.php
) from the book's GitHub page and rename the file ch10-book...