A few weeks ago we proposed a new requirement that allows theme authors to use the add_menu_page & add_submenu_page functions. We gathered all the feedback and revised the initial requirement, the final form is as follows:
Themes can add a page under the Appearance menu using add_theme_page. If they need to have sub-pages (like for example documentation, FAQs, donation link etc), then they are allowed to use add_menu_page and add_submenu_page, provided they follow these requirements:
- You can’t use
add_theme_pageandadd_menu_pageat the same time, choose one or the other. - You are allowed to create only one (1) main page using
add_menu_page. The recommended maximum number of sub-menu pages (add_submenu_page) is three (3). add_submenu_pagemust be used only on the page created usingadd_menu_page.- The
$position(priority) parameter must benullor only occupy the spot above the Appearance page (59). Check the code example on how to set the correct priority. - If you recommend plugins via TGMPA, you are required to use the
parent_slugconfiguration option (this should be the top-level page’s slug). - Core UI patterns must be used. You are not allowed to style the menu & submenu page links in any way. The admin color scheme must remain the same.
- Use only monochromatic icons. It must account for the admin color scheme.
- The title must be kept short and not include spam.
- Child themes are allowed to add one extra sub-page or remove the parent’s pages and add their own.
You can find the requirement & code examples under the Selling, credits, and links section.
Theme Check & the .org uploader have been updated to not block these functions.