I have a hook file:
function load_admin_package(){
do_action('load_admin_package');
}
/*
* -----------------------------------
* Define hooks bellow
* -----------------------------------
*/
function load_admin(){
$package = new AisisCore_Loader_Package();
$package->load_package('AdminPanel', CORETHEME);
}
/*
* -----------------------------------
* Asign hooks bellow
* -----------------------------------
*/
add_action('load_admin_package', 'load_admin');
Very simple, very straight forward. This resides in the parent theme. this file is then required into the functions.php file.
In the child functions.php I do:
function remove_hooks(){
remove_action('load_admin_package', 'load_admin');
}
add_action('after_theme_setup', 'remove_hooks');
load_admin essentially loads the admin options page for the parent theme. However in the child theme I am removing it so it doesn't load. Problem? The remove_action() returns true, yet in the child theme admin I still have access to the admin options which should not exist...
What's going on?
after_setup_theme? – toscho♦ Mar 16 at 13:35