function signup_date_field in Signup 6
Same name and namespace in other branches
- 5.2 includes/date.inc \signup_date_field()
- 6.2 includes/date.inc \signup_date_field()
- 7 includes/date.inc \signup_date_field()
9 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.
- theme_signup_node_title in theme/
node.inc - _signup_date_admin_sql in includes/
date.inc - _signup_date_autoclose_sql in includes/
date.inc
File
- includes/
date.inc, line 50 - Code to support using CCK date fields for time-based signup functionality.
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;
}