Regarding the features module: I am working with a module which was created by features. I see a lot of .inc files in the module, but see very few actually included. Does this make any sense? I know that they are all being used and are creating fields etc.

  • Creating fields only needs to happen once, that would probably explain why you don't see the files included - they've already been included the one time they were needed – Clive Aug 20 '13 at 15:58
  • Oh, and how does features know about these files to include them once? – user1015214 Aug 20 '13 at 16:05
  • Looks like the work is done in features_include() and features_include_defaults(), at the root of it it seems to be a simple file naming convention – Clive Aug 20 '13 at 17:25

Most include files exported by features are included on-demand by the modules that define that type of component. For instance, example.views_default.inc is included by the views module when loading default views. This is a common pattern in Drupal, not something that is specific to Features.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.