Webform results admin theme


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // Added to support admin theme in webform results
  2. function webform_init() {
  3. // Support admin theme setting, based on system_init().
  4. // Only affect the menu path created by this module, and only if the node admin theme checkbox is set.
  5. if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(2) == 'webform-results' || arg(2) == 'submission')) {
  6. global $custom_theme;
  7. // Use the chosen theme ID, or the front-end theme if one hasn't been selected.
  8. $custom_theme = variable_get('admin_theme', '0');
  9. // From system.module, this css file is required in the admin view.
  10. drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
  11. }
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.