Hide Appearance > Widgets menu when no sidebars are registered
|Reported by:||sabreuse||Owned by:||nacin|
If a theme doesn't register any sidebars, the Appearance > Widgets menu is still shown and widgets.php displays
No Sidebars Defined
The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.
This is bad UX -- we're offering a menu for a feature the user doesn't meaningfully have access to, and the Widgetizing Themes instructions offered in the link are really meant for theme designers. We should hide the menu when the feature isn't registered, as we do for Headers and Backgrounds.