Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Have you tried the correct action after_setup_theme? –  toscho Mar 16 '13 at 13:35
    
Also maybe not post in multiple places, stackoverflow.com/questions/15445686/… –  Wyck Mar 16 '13 at 16:28
    
i need answers right away hence the posting every where. I dont have time to wait –  TheWebs Mar 16 '13 at 17:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.