You are here

function _fullcalendar_date_all_day_field in FullCalendar 7.2

Provide a wrapper around the deprecated date_field_all_day().

See also

date_all_day_field()

date_field_all_day().

1 call to _fullcalendar_date_all_day_field()
_fullcalendar_process_dates in theme/theme.inc
Process the dates, format them, and determine if it is all day.

File

theme/theme.inc, line 349
Preprocess functions for FullCalendar.

Code

function _fullcalendar_date_all_day_field($field, $instance, $date1, $date2 = NULL) {

  // Try the old function first since it is more likely to be available.
  if (function_exists('date_field_all_day')) {
    return date_field_all_day($field, $instance, $date1, $date2);
  }

  // Now try the new function.
  if (function_exists('date_all_day_field')) {
    return date_all_day_field($field, $instance, $date1, $date2);
  }

  // This means the old function has been removed, and they haven't enabled the
  // new module yet. All day events will be displayed as not all day.
  watchdog('fullcalendar', 'All day events will not function correctly until the Date All Day module is enabled.', array(), WATCHDOG_NOTICE);
  return FALSE;
}