You are here

function date_is_repeat_field in Date 7

Same name and namespace in other branches
  1. 8 date_repeat_field/date_repeat_field.module \date_is_repeat_field()
  2. 6.2 date/date.module \date_is_repeat_field()
  3. 7.3 date_repeat_field/date_repeat_field.module \date_is_repeat_field()
  4. 7.2 date_repeat_field/date_repeat_field.module \date_is_repeat_field()
3 calls to date_is_repeat_field()
date_form_alter in ./date.module
Implements hook_form_alter(). Make sure date information gets updated.
_date_field_instance_settings_form in ./date_admin.inc
_date_field_settings_form in ./date_admin.inc

File

./date.module, line 105

Code

function date_is_repeat_field($field, $instance) {
  $repeat_widgets = array(
    'date_select_repeat',
    'date_text_repeat',
    'date_popup_repeat',
  );
  if (in_array($instance['widget']['type'], $repeat_widgets)) {
    return TRUE;
  }
  elseif (in_array($instance['widget']['type']['#value'], $repeat_widgets)) {
    return TRUE;
  }
  return FALSE;
}