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?

有帮助吗?

解决方案

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).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top