You are here

function webform_init in Webform 6.3

Implements hook_init().

File

./webform.module, line 469

Code

function webform_init() {

  // Use the administrative theme if set to use on content editing pages.
  // See system_init().
  if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(2) == 'webform' || arg(2) == 'webform-results')) {
    global $custom_theme;
    $custom_theme = variable_get('admin_theme', '0');
    drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', 'module');

    // Support for Admin module (1.x).
    if (function_exists('_admin_init_theme') && empty($custom_theme)) {
      _admin_init_theme();
    }
  }
}