You are here

function empty_fields_get_empty_field_callbacks in Empty fields 7

Get all the empty field callbacks via hook_empty_field_callbacks().

3 calls to empty_fields_get_empty_field_callbacks()
empty_fields_field_attach_view_alter in ./empty_fields.module
Implements hook_field_attach_view_alter().
empty_fields_field_formatter_settings_form_alter in ./empty_fields.module
Implements hook_field_formatter_settings_form_alter().
empty_fields_field_formatter_settings_summary_alter in ./empty_fields.module
Implements hook_field_formatter_settings_summary_alter().

File

./empty_fields.module, line 254
Contains the implementation for the empty_fields module.

Code

function empty_fields_get_empty_field_callbacks($callback = NULL) {
  $info =& drupal_static(__FUNCTION__);
  if (!isset($info)) {
    $cid = "empty_fields:" . $GLOBALS['language']->language;
    if ($cache = cache_get($cid)) {
      $info = $cache->data;
    }
    else {
      $info = module_invoke_all('empty_field_callbacks');
      drupal_alter('empty_field_callbacks', $info);
      cache_set($cid, $info);
    }
  }
  if (isset($callback)) {
    return isset($info[$callback]) ? $info[$callback] : NULL;
  }
  return $info;
}