The code that uses this option is very simple and only checks for the subscriber role of the logged on user. And it uses a standard WP function for this. So, if the user you are using is a subscriber (WP role), then the bar is not shown. All other users should see the bar; also admins that are playing in the pool.
If this is not the case, then I can only think of a scenario that some (site) caching or other plugin is causing a problem.
the code:
public static function show_admin_bar( $content ) {
// normal users do not get the admin bar after log in
$no_show = current_user_can( 'subscriber' )
&& Football_Pool_Utils::get_fp_option( 'hide_admin_bar', 1 ) == 1;
return $no_show ? false : $content;
}
Nevermind, I think I found something. The codex mentions that checking for roles is only partly supported and may cause unreliable results. I haven’t touched this part in years, so maybe they changed this in the mean time.
What you can try, is to locate the above code and change it to:
public static function show_admin_bar( $content ) {
$show_bar = true;
if ( Football_Pool_Utils::get_fp_option( 'hide_admin_bar', 1 ) == 1 ) {
$show_bar = false;
// only admins get the admin bar after login when the hide admin bar option is set
if ( current_user_can( 'manage_options' ) ) $show_bar = true;
}
return $show_bar ? $content : false;
}
I will do some further testing and add a fix to a future release.
Please let me know if this fixes your problem 🙂
-
This reply was modified 6 years, 4 months ago by
AntoineH.
-
This reply was modified 6 years, 4 months ago by
AntoineH. Reason: hotfix