Closed (fixed)
Project:
Features Hide
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2016 at 14:16 UTC
Updated:
18 Mar 2016 at 19:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
john cook commentedI've created a patch that implements a hook, namely
hook_features_hide().The hook's documentation is in features_hide.api.php and I used the hook to get the default features to hide array.
Comment #3
john cook commentedComment #4
molenick commentedHello, thanks for this patch - I agree that this is a great enhancement for this project. I'll take some time to review this in the next week and if all is good, I'll merge it in.
Thanks!
Comment #5
molenick commentedThis looks pretty good, but I have one minor thing I'd like to change. With this patch, I'm able to add entries like so:
This is great, but I think it'd also be useful to allow developers to remove items from the list as well. To do that, I think we'd need to switch from module_invoke_all() to drupal_alter() to allow something like this:
That's the basic gist, the structure of the $hide_list might need working out a bit though.
Comment #6
john cook commentedI've added an alter hook,
hook_features_hide_alter()so that items added to the list can be removed if necessary.The hooks are run in the following order:
This allows all modules to have their addition done before the alter is run, otherwise if there were two modules (one added a feature and the other removed the same feature) whether the feature would be shown or not is undefined as then it comes down to the order the modules are loaded.
Comment #8
molenick commentedHi John,
Thanks again for for this contribution! I've gone ahead and committed your additions, the 7.x-1.x dev release and 7.x-1.1 (which should be up shortly) contain these.
Best,
Matt
Comment #9
molenick commented