I'm using Sidebar Generator in all my themes.
The plugin works perfectly normal from "plugins" directory, but I want to embed it somehow to my themes, so it won't display on Installed Plugins list.
I've just copied sidebar_generator.php (the whole code is luckily in one file) to mytheme/plugins and included it in functions.php
require_once (MY_PLUGINS . '/sidebar_generator.php');
Now, it worked for all other plugins, but not for this one! This way when I click on "Sidebars" it refreshes the actual page instead of loading plugin's admin_page.
Any ideas why is it happening and how to make it working?
I believe the problem lays here:
add_submenu_page('themes.php', 'Sidebars', 'Sidebars', 'manage_options', __FILE__, array('sidebar_generator','admin_page'));
Chaning FILE to something else helps, but I'm not sure how to point this submenu link at the actual plugins admin page.