Let's say I've got a custom module with the following code:
/**
* Implements hook_hook_info().
*/
function mymodule_hook_info() {
$info = array();
$info['mymodule_item_info'] = array('group' => 'mymodule');
$info['mymodule_item_info_alter'] = array('group' => 'mymodule');
return $info;
}
/**
* Implements hook_features_api().
*/
function mymodule_features_api() {
return array(
'mymodule_item' => array(
'name' => 'My module items',
'feature_source' => TRUE,
'default_hook' => 'mymodule_item_info',
'alter_hook' => 'mymodule_item_info',
),
);
}
The first hook allows all implementations of hook_mymodule_item_info and hook_mymodule_item_alter() to be placed in modulename.group-value.inc and be automatically included via module_invoke and module_invoke_all, which is awesome. It would be nice if Features could automatically tell that since I've provided my default hook, that it should attempt to set default_file to FEATURES_DEFAULTS_CUSTOM, and default_filename to the group string.
Comments
Comment #1
dave reidComment #5
dave reidSorry about the unrelated comments, posted in wrong issue. I deleted them.
Comment #5.0
dave reidMissing starting PHP tag.