#3645 closed defect (bug) (worksforme)
WP Admin Bar doesn't honour settings
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.5 |
Component: | Toolbar & Notifications | Keywords: | |
Cc: |
Description
In bp_core_load_admin_bar()
, BP doesn't check to see if a user is logged in before checks are done for the user's admin bar settings.
Also, when checking the user's admin bar settings, BP doesn't do an exact boolean check.
This caused the WP Admin Bar to not display for non-logged-in users even though "Hide admin bar for logged out users?" was set to "No".
Attachments (2)
Change History (17)
#2
@
13 years ago
Actually, I am having a hard time reproducing the issue. The WP admin bar isn't showing for non-logged-in users, regardless of my BP settings. Is there another settings somewhere that I'm missing?
#3
@
13 years ago
Forgot to say that I also set define( 'BP_USE_WP_ADMIN_BAR', true );
in bp-custom.php.
Re: "honour" - Forgot I was catering to a US crowd ;) At least Paul will be pleased!
#4
@
13 years ago
Forgot to say that I also set define( 'BP_USE_WP_ADMIN_BAR', true ); in bp-custom.php.
Same here. Logged-in users are not seeing the admin bar. WP 3.2.1, BP trunk r5233. In fact, it's just the opposite - setting "Hide admin bar for logged out users" to "No" doesn't change anything.
However, 3645.01.patch *does* fix this latter problem. On this basis, I'm going to assume that there's another setting somewhere that is different between my installation and r-a-y's which is causing my inability to reproduce the original problem, but that the patch works properly. Going to hold off on committing the change until I can get a sanity check on this from someone else.
#6
@
13 years ago
- Keywords needs-testing added; commit removed
After looking into this a little further, it looks like bp_get_admin_bar_pref() wasn't mirroring the WP equivalent of _get_admin_bar_pref() fully.
After mirroring the function and wrapping an is_user_logged_in()
check around the bp_get_admin_bar_pref() conditional block, this appears to work now.
Please give it a test.
---
Perhaps there's a reason why BP is using a wrapper function for _get_admin_bar_pref(). Is it something to do with the is_multisite() check? If so, remove that from the patch.
#7
@
13 years ago
- Keywords needs-refresh added
- Milestone changed from 1.5.2 to 1.5.3
r-a-y, sorry this ticket has languished. Can I ask you to refresh to current 1.5 branch and WP 3.3, as it's possible that a relevant piece of the WP toolbar api has changed?
#8
@
13 years ago
It should be noted that the original bp_get_admin_bar_pref() did correctly mirror _get_admin_bar_pref(). The function bp_get_admin_bar_pref() was based off WP 3.2 code which differed from WP 3.1 _get_admin_bar_pref().
#10
@
13 years ago
This might not be relevant any more since in WP 3.3, the WP Toolbar only offers you one option, whereas in WP 3.2, there were two -- 1) when viewing site and 2) in dashboard -- under "Users > My Profile".
#12
@
13 years ago
- Keywords reporter-feedback added
Just been testing this against 3.3.1 / 1.6-trunk. Can't see anything incorrect. Can someone else check and confirm if we can close this ticket?
#13
@
13 years ago
- Keywords reporter-feedback removed
This issue was only relevant in WP 3.2. Feel free to close.
Tempted to mark this ticket invalid just because you spelled it 'honour' ;)