Add custom css to administrative theme

Public
</> CopyGet raw version
php
  1. function mymodule_preprocess_html(&$variables) {
  2. // Add conditional stylesheets for admin pages on admin theme.
  3. if (arg(0)=="admin") {
  4. // reference your current admin theme
  5. $theme_path = drupal_get_path('theme', 'seven');
  6. // reference your own stylesheet
  7. drupal_add_css(drupal_get_path('module', 'mymodule') . '/css/mymodule.css', array('weight' => CSS_THEME));
  8. }
  9. }

Comments