moved hook to dgwphp, does not work in extension + checked for inconsistency in  with is_object()