You are here

function panels_init in Panels 7.3

Same name and namespace in other branches
  1. 6.3 panels.module \panels_init()
  2. 6.2 panels.module \panels_init()

Implements hook_init().

File

./panels.module, line 303
Core functionality for the Panels engine.

Code

function panels_init() {

  // Safety: go away if CTools is not at an appropriate version.
  if (!module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
    if (user_access('administer site configuration')) {
      drupal_set_message(t('Panels is enabled but CTools is out of date. All Panels modules are disabled until CTools is updated. See the status page for more information.'), 'error');
    }
    return;
  }
  ctools_add_css('panels', 'panels');
}