Posted by Mac Clemmens on February 8, 2010 at 3:40am
2 followers
Jump to:
| Project: | IE CSS Optimizer |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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
#1
Here'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);
}
}
#2
Except when you need to theme items that are only visible for anonymous users. :-\