Discussion on menu locations for theme options.

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 UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. and APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. 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 pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party 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.

#menu-location, #theme-options