[buddypress-trac] [BuddyPress] #3560: "Hide admin bar for logged out users" not working using define('BP_USE_WP_ADMIN_BAR', true);

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Sep 7 15:36:59 UTC 2011


#3560: "Hide admin bar for logged out users" not working using
define('BP_USE_WP_ADMIN_BAR', true);
------------------------------+---------------------
 Reporter:  tsany             |       Owner:
     Type:  defect            |      Status:  closed
 Priority:  minor             |   Milestone:  1.5
Component:  Admin/Buddy Bars  |     Version:  1.5
 Severity:  minor             |  Resolution:  fixed
 Keywords:  has-patch         |
------------------------------+---------------------

Comment (by boonebgorges):

 I was going to implement a quick fix for the fact that we're not
 respecting the "when viewing site" checkbox in a user's profile, but it's
 turning out to be difficult. We are running bp_core_load_admin_bar() at
 bp_loaded, which runs at plugins_loaded, but appears to be run before the
 current user's preferences are being set.

 When I switched the function so that it ran at bp_init (ie init), it
 seemed to work - "when viewing site" preferences were being respected. But
 when I switched on the BuddyBar, I saw that WP was still loading its
 adminbar stylesheet, and injecting some confounded !important padding
 styles directly at wp_head. Clearly, show_admin_bar() does not like being
 set this late.

 So, there's something going on with BP that's making it override WP's
 native respect for the "when viewing site" setting. I'm not sure what it
 is, and to be honest it's not important enough for me to spend a lot more
 time looking at it at the moment :) If anyone else wants to have a look,
 please reopen the ticket with a patch.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3560#comment:8>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list