Errors generated by theme-check plugin and with the code

REQUIRED: plugin-activation.php. Themes should use add_theme_page() for adding admin pages. Line 335: add_submenu_page(

    $this->parent_menu_slug,                // Parent menu slug
    $this->strings['page_title'],           // Page title
    $this->strings['menu_title'],           // Menu title
    'edit_theme_options',                   // Capability
    $this->menu,                            // Menu slug
    array( &$this, 'install_plugins_page' ) // Callback

REQUIRED: innovative_panel_functions.php. Themes should use add_theme_page() for adding admin pages. Line 143: add_menu_page(theme_name.' Settings', theme_name ,'install_themes', 'panel' updated the list.

$icon = get_template_directory_uri().'/innovative_panel/images/ipanel-settings.png';
    add_menu_page(theme_name.' Settings', theme_name ,'install_themes', 'panel' , 'panel_options', $icon  );
    $theme_page = add_submenu_page('panel','Settings', theme_name.' Settings','install_themes', 'panel' , 'panel_options');
    add_submenu_page('panel',theme_name.' Documentation', 'Documentation','install_themes', 'docs' , 'redirect_docs');
    add_submenu_page('panel','Support', 'Support','install_themes', 'support' , 'innovative_get_support');

I get this error. Please help me to sort out this issue.

Can my theme be submitted for approval with these errors?

  • Where did these errors came from? Dec 17, 2013 at 13:36
  • Please post the source, not only the error message...
    – kaiser
    Dec 17, 2013 at 15:44
  • well! this error is in tgm-plugin's plugin-activiation.php file Dec 26, 2013 at 8:00
  • I am posting the full code where it gets error, its in two places Dec 26, 2013 at 8:05

1 Answer 1


Concerning your question:

Can my theme be submitted for approval with these errors?

I'm assuming you're asking whether your plugin, while throwing an error upon activation using TGM library, can still be submitted and accepted to official Wordpress repository. My answer would be, no, it cannot.

It seems like you made your plugin work once it has been previously installed, but activating it in its current state throws errors. People reviewing plugins will reject it, if they encounter errors upon just the installation and activation, and if you do it a couple of times in a row, your plugin might be permanently rejected from the repository. Therefore: test, test, test. For more information, please refer to Wordpress approval workflow

If you're new to creating Wordpress plugins, I would strongly advise that you follow some boilerplate, that will show you the best practices and allow you to create a quality plugin, with all the features like localization and multisite-support. My recommendation would be Wordpress Plugin Boilerplate

  • Thanks DiH for great information, hence i am new in this forum so i think i am not able to post the complete problem, actually its generating the error when i run theme check plugin for errors, and its just tgm-plugin library in which this code exists, infact where ever i have used add_submenu_page( aparrt from the tgm library it throws such error. please check the below code Dec 26, 2013 at 8:04
  • Guys please help me Dec 30, 2013 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.