Hey Andy
-
What is the $doing_adminbar var for? I see a ref to it in the buddybar code setting it true/false and also it’s declared in bp_is_home() but that fn isn’t doing anything with it. I’m not seeing it used anywhere for anything.
Reason I ask is I have a plugin that adds a menu option to the buddybar (anybody sick of me calling it that yet? wardeh likes it Anyway, when the user clicks that menu option it goes out and triggers some stuff I want done. It does a form submit in js, comes back to the same fn and doesn’t display the menu option the second time. The second time into the fn I want to do a complete redisplay of the bar.
The stuff I’m doing in the background is adding that user to the current blog as a contributor or author. I want the buddybar to display them as an author and ‘my blogs’ to show this blog as part of their ‘my blogs’ list.
I’m using do_action(‘bp_core_admin_bar’) to get the bar refreshed. While I was looking for the right action to trigger, I find $doing_adminbar. Looks like you have plans for this global?
Do I just ignore it? What am I supposed to do with this thing while I’m in the middle of fooling around with the menu items in the bar? I stuff another menu item in and now I’m gonna remove it. Well, just not display it again on the return trip from form submit. Should I worry about this thing at all?
-
Ignore it, it was intended to stop problems with missing submenus in the admin bar when not viewing your profile. It will probably be removed before 1.0 final.
Thanks. I also realize that just doing do_action() on the menu doesn’t do what I intended. At 4am things kinda get hazy. I have to do a complete browser refresh to get the intended results. Oh well.
On another note, this js stuff is cool. I can do things that would have been ugly, painful or just plain impossible with it. I’m becoming dangerous now.
- The topic ‘Hey Andy’ is closed to new replies.