2013-01-25, 03:11:12
This might be a little cleaner than messing with register plugin.
of course you would have to use multiple actions
Same solution, of course we can edit core to possibly loop through the plugins hooks and find the matching action and use the pagetype from the hook name. Or add more arguments to the hook.
of course you would have to use multiple actions
PHP Code:
add_action('settings-sidebar','createSideMenu',array($plugin_id,'SideMenu','action1'));
add_action('header','settings_sidemenu');
function settings_sidemenu(){
GLOBAL $plugin_info,$plugin_id;
// if _GET['action1'];
$plugin_info[$plugin_id]['page_type'] = 'settings'; //override page_type before include_nav loads.
}
Same solution, of course we can edit core to possibly loop through the plugins hooks and find the matching action and use the pagetype from the hook name. Or add more arguments to the hook.