Return to Snippet

Revision: 25943
at April 14, 2010 11:24 by jepedo


Initial Code
// Added to support admin theme in webform results
function webform_init() {
  // Support admin theme setting, based on system_init().
  // Only affect the menu path created by this module, and only if the node admin theme checkbox is set.
  if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(2) == 'webform-results' || arg(2) == 'submission')) {
    global $custom_theme;
    // Use the chosen theme ID, or the front-end theme if one hasn't been selected.
    $custom_theme = variable_get('admin_theme', '0');
   // From system.module, this css file is required in the admin view.
    drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
  }
}

Initial URL

                                

Initial Description

                                

Initial Title
Webform results admin theme

Initial Tags
drupal

Initial Language
PHP