You are here

function addressfield_module_implements_alter in Address Field 7

Implements hook_module_implements_alter().

Moves the hook_token_info_alter() implementation to the bottom so it is invoked after all modules implementing the same hook.

File

./addressfield.module, line 43
Defines a field for attaching country-specific addresses to entities.

Code

function addressfield_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'token_info_alter') {

    // Make sure that the $implementations list is populated before altering it,
    // to work around a crash experienced by some people (#2181001).
    if (isset($implementations['addressfield'])) {
      $group = $implementations['addressfield'];
      unset($implementations['addressfield']);
      $implementations['addressfield'] = $group;
    }
  }
}