You are here

function signup_date_field in Signup 5.2

Same name and namespace in other branches
  1. 6.2 includes/date.inc \signup_date_field()
  2. 6 includes/date.inc \signup_date_field()
  3. 7 includes/date.inc \signup_date_field()
12 calls to signup_date_field()
signup_content_type_fields in includes/date.inc
Returns a list of all cck fields that have been set for use in signups
signup_date_field_check_config in includes/date.inc
Check that the date and signup configuration for a node type makes sense.
_signup_date_admin_sql in includes/date.inc
_signup_date_autoclose_sql in includes/date.5x-2.inc
_signup_date_autoclose_sql in includes/date.5x-1.inc

... See full list

File

includes/date.inc, line 51
Shared code required for any site using CCK date fields, regardless of the version of date in use.

Code

function signup_date_field($content_type) {
  $field_name = variable_get('signup_date_field_' . $content_type, 0);
  if ($field_name === 0 || $field_name == '0') {

    // PHP is completely evil and 'none' == 0 is TRUE, hence the extra checks.
    return FALSE;
  }
  if ($field_name == 'none') {
    return 'none';
  }
  $field = content_fields($field_name, $content_type);
  if (empty($field)) {
    return array();
  }
  $field['database'] = content_database_info($field);
  return $field;
}