template.php stop js on admin pages
You can use path_is_admin():

if (!path_is_admin(current_path())) {
  // Do something...
}


Or check the theme:

if ($GLOBALS['theme'] == 'some_theme') {
  // Do something...
}