You are here

function block_access_module_implements_alter in Block Access 7

Implementation of hook_module_implements_alter

We need this to change the order of when the hook_form_alters are called, so that block_access runs last. This is so that any other modules adding options to the form using a form_alter will run before ours and we'll be able to act on them. There is still the outstanding issue of how to resolve form alters that use the hook_form_FORM_ID_alter vs. hook_form_alter (see issue: http://drupal.org/node/765860#comment-5343140) but for now this will do. Another option could be to just increase the module weight on install...

The reason for this implementation was because node.module is adding content type specific visibility settings after block_access did it's magic.

File

./block_access.module, line 189

Code

function block_access_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'form_alter') {
    $group = $implementations['block_access'];
    unset($implementations['block_access']);
    $implementations['block_access'] = $group;
  }
}