devinsays/options-framework-theme

Version 1.7.1 fails official Theme-Check plugin test

Closed this issue · 2 comments

Hi Devin,

I've just updated my Theme to include version 1.7.1 of your Options Framework. One of the tests that theme developers should run, prior to submitting new versions, is to run the official Theme-Check plugin.

It produced the following error that I thought you should know about:

REQUIRED: inc/includes/class-options-framework-admin.php. Themes should use add_theme_page() for adding admin pages.

Line 34: add_action( 'admin_menu', array( $this, 'add_options_page' ) );
Line 99: function add_options_page() {

Basically, you have a function called add_options_page() in your Options_Framework_Admin class. It just so happens that this is the same name as a core WordPress function, add_options_page, and it seems to be confusing the two and producing the above error.

So that my theme would pass the Theme Check plugin, I've simply renamed your function to add_dashboard_options_page() (lines 34 & 99 above). Since it's only called in the one place, I don't see any issue this would cause and I would suggest that you might like to make the change yourself so that it doesn't cause issues with other people who are using it in their themes.

Cheers!
Anthony.

Hi Anthony. Thanks for the feedback. Should be a simple update.

This has been updated. Feel free to test:
7101de5