If a module is installed that uses a hook, can it be disabled (preferably in Admin), without actually deleting the hook (and all of the associated code)?
TIA
Malcolm
Can one disable a hook?
-
azpro
- Contributor
- Posts: 177
- Joined: Fri Nov 06, 2020 8:25 am
- Phoenix Version: v1.1.0.6
- Has thanked: 30 times
- Been thanked: 34 times
Re: Can one disable a hook?
Yes - Possible. With Phoenix nothing is impossible! But in admin you would need Core Code adjustments - which you probably don not want.
In the hook - you can add (in the hook)
I am not sure - but I think better comment out
In the hook - you can add (in the hook)
I am not sure whether it is preferable / desirable to comment out the rest of the hook. Maybe @ecartz or @burt can explain.class hook_admin_siteWide_hMenu {
public $version = '1.0.0';
// DO NOT USE THIS MENU
public function listen_injectBodyStart() {
// Optie B:
return false;
}
// rest of the hook - comment out
/*
public static function sort_box_links($a, $b) {
return strcasecmp($a['title'], $b['title']);
}
*/
}
I am not sure - but I think better comment out