You can simply do it by checking url of your application in your hook:
$hook = false; if(strpos($_SERVER['REQUEST_URI'],"admin/")) $hook = true; if($hook) {
// do some hook stuff }