Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Being able to fully optimize for all users except user 1 would be extremely useful for theming. It would allow the superuser the ability to see changes as they're made, and he/she could then flush the cache to push those changes out to the other users.
Comments
Comment #1
Mac Clemmens CreditAttribution: Mac Clemmens commentedHere's a possible approach:
function ie_css_optimizer_preprocess_page(&$vars, $hook) {
global $user;
$preprocess_css = variable_get('preprocess_css', 0);
if ($preprocess_css == 'theme' || $preprocess_css == 'module' || $user->uid == 1) {
module_load_include('inc', 'ie_css_optimizer', 'ie_css_optimizer.pages');
_ie_css_optimizer_preprocess_page($vars, $hook);
}
}
Comment #2
JohnAlbinExcept when you need to theme items that are only visible for anonymous users. :-\