You are here

function mobile_codes_field_extra_fields in Mobile Codes 7.2

Implements hook_field_extra_fields().

File

includes/node.inc, line 58
Node module integration.

Code

function mobile_codes_field_extra_fields() {
  $extra = array();
  foreach (node_type_get_types() as $type) {
    $settings = variable_get("mobile_codes_{$type->type}", array());
    if (!empty($settings['enabled'])) {
      $extra['node'][$type->type] = array(
        'display' => array(
          'mobile_codes' => array(
            'label' => t('Mobile codes: Node URL'),
            'description' => t('The URL of this node as a Mobile code.'),
            'weight' => 0,
          ),
        ),
      );
    }
  }
  return $extra;
}