Domanda

I have a hook_form_alter in my module, but another module, workbench_access, also has a hook_form_alter which I need to be called before my hook_form_alter. How do I add weight to my hook_form_alter?

È stato utile?

Soluzione

You just need to set the weight column for your module in the system table to higher than that of the Workbench Access module.

See How to update a module's weight for the different ways to do this. Once you have, clear Drupal's caches and your module's hooks will be called after those of Workbench Access modules (and most likely a lot of other modules).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top