Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

use add_theme_page instead of add_submenu_page #89

Closed
pdewouters opened this Issue · 5 comments

4 participants

@pdewouters

Hi

I was checking my theme with the theme check plugin and got this warning:
REQUIRED: class-tgm-plugin-activation.php. Themes should use add_theme_page() for adding admin pages.

it would be great if you could change that :)

@thomasgriffin

We did this on purpose. Using add_submenu_page allows users to specify where they want the menu to be placed, because add_theme_page isn't always the correct place (for example, using it with a Genesis child theme, you would want to place it under the Genesis menu instead). By default, the menu is placed under the Appearance tab, where theme pages would normally go.

If anyone from the theme review team gives you trouble with this, let me know and I'll speak with them. :-)

@pdewouters

got it. I suppose it's more plugin functionality than theme functionality

@thomasgriffin

Yes, it's both. The class can be used in themes or plugins, so it wouldn't make sense to force everyone to place their plugin menu under the Appearance tab. :-)

Closing the issue.

@unsalkorkmaz

Still getting that error from wordpress.org theme upload. Its automatically rejected theme.
I changed lines for my theme:
http://themes.trac.wordpress.org/browser/firmasite/1.1.13/functions/class-tgm-plugin-activation.php

@dovy

ThemeForest is now doing the same thing. Working with their team for a resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.