You are here

function node_recur_get_date_field_name in Node recur 7

Same name and namespace in other branches
  1. 7.2 node_recur.module \node_recur_get_date_field_name()

Determine a node type's recurring date field name

Parameters

$type: A node type

Return value

The node's date field name, otherwise NULL

5 calls to node_recur_get_date_field_name()
node_recur_form_alter in ./node_recur.module
Implements hook_form_alter().
node_recur_form_node_type_form_alter in ./node_recur.module
Implements hook_form_node_type_form_alter().
node_recur_get_node_date_field_value in ./node_recur.module
Determine the value of a node's recurring date field
node_recur_node_batch_create_node in ./node_recur.batch.inc
Create the recurring nodes
node_recur_node_recur_form_access in ./node_recur.module
Access handler for the node recur form

File

./node_recur.module, line 246

Code

function node_recur_get_date_field_name($type) {
  if ($field_name = variable_get("node_recur_date_field_node_type_{$type}", FALSE)) {

    // Check that the field still exists
    if (field_info_field($field_name)) {
      return $field_name;
    }
  }
  return NULL;
}