2
  1. What are the files in which core hooks are implemented in a contributed module?

  2. Are they declared in .inc files? If so, what are the naming conventions for those include files containing core hooks?

1 Answer 1

1
  1. The convention is to park all core hook implementations in .module.
  2. .inc files are used to break off different groups of code like custom class definitions & administration form handlers. Some have their own naming convention for contrib hook implementations (e.g. .views.inc, .rules.inc, etc.).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.