This post is to discuss the use of add_menu_page and add_submenu_page usage for theme options.
When reviewing themes, the thoughts of usage are in several different camps at the moment and we’re looking for your opinions as well.
The first thought is that the dev and theme team want to strongly push developers to utilize as much of the consistency of the UI and API as possible which means when locating the options for a theme it should be found under the WP-ADMIN -> Appearance section of the menu.
Another thought is that if the theme itself is large enough to warrant using it’s own top level menu option, what would be the criterion of that, how much is enough? could those submenu pages inside the top level (add_menu_page) be necessary to be placed as a top level and not options tabs of some sort inside the theme options page itself.
What are the cons of using a top level?
- It could be using an menu anchor # that a plugin uses to display it’s menu on, so one or the other will disappear.
- It’s not conducive to the consistency that some people would like to see the wp-admin steer towards, the commonality of finding options in the appropriate places.
What are the pros of using a top level?
- Can be described to end users easier? (rough one)
- Can be used to attach theme-based plugins to, for example a plugin can create a top level submenu item *onto* that top level theme add_menu_page to keep everything nicely bundled together.
In my opinion a theme developer if they have theme options, it should indeed be found in the appearance -> section of the wp-admin; if that top level itself doesn’t have sub menu pages
- Looking for feedback, opinion’s and idea’s towards finalizing a recommendation, requirement for the theme review process.