You are here

function fullcalendar_colors_preprocess_fullcalendar in FullCalendar 7.2

Implements hook_preprocess_fullcalendar().

Process FullCalendar Colors after the structure is built.

File

fullcalendar_colors/fullcalendar_colors.module, line 13
Provide integration with Colors module for FullCalendar.

Code

function fullcalendar_colors_preprocess_fullcalendar(&$variables) {

  // @todo Remove in 7.x-2.1.
  if (!function_exists('colors_include_api')) {
    return;
  }

  // @todo D8: Remove weight once http://drupal.org/node/1388546 is fixed.
  $variables['element']['#attached']['css'][colors_create_css('fullcalendar_colors')] = array(
    'weight' => 1,
  );
}