From e60d88fe89714f12bdebc4b142c468800772adaf Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Fri, 26 Feb 2016 22:19:18 +0800 Subject: [PATCH] Fix show admin bar for non-logged in users --- core/um-actions-wpadmin.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/um-actions-wpadmin.php b/core/um-actions-wpadmin.php index d568b3dc..892c7914 100644 --- a/core/um-actions-wpadmin.php +++ b/core/um-actions-wpadmin.php @@ -101,10 +101,16 @@ ***/ function um_control_admin_bar( $content ){ - if ( um_user('can_not_see_adminbar') ) - return false; + if( is_user_logged_in() ){ + + if ( um_user('can_not_see_adminbar') ){ + return false; + } - return true; + return true; + } + + return $content; } add_filter( 'show_admin_bar' , 'um_control_admin_bar');