[wp-hackers] checking for user logged in a plugin

Chris McCoy chris at lod.com
Fri Apr 27 13:41:43 UTC 2012

Im doing this in a plugin

if(is_user_logged_in() && current_user_can('administrator')) {
        add_filter('stylesheet', 'admin_role_theme');
        add_filter('template', 'admin_role_theme');

But fires is_user_logged_in not defined, should I be firing this a diferent

It basically selects the theme for admin only so he can work on a different
design live.

More information about the wp-hackers mailing list