#3294 closed defect (bug) (fixed)
WP Admin Bar - Master Ticket
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Toolbar & Notifications | Keywords: | |
Cc: |
Description (last modified by )
Using the WP admin bar in place of the BP BuddyBar is new in 1.3. Use this ticket to report all issues with it before the release of 1.3.
Attachments (3)
Change History (30)
#7
@
14 years ago
As per the discussion in #3302, the extended item admin bar options are being removed for BP 1.3. 3294.1.diff is a patch, for future reference, that puts these items into the WP admin bar.
#10
@
14 years ago
I've started on (4), the Notifications menu, and I'd like a bit of feedback on some tricky spots. See 3294.2.diff, which implements the Friends component's notifications into the WP Admin Bar.
- The old notification callback functions return an HTML link. This won't work with WP_Admin_Bar::add_menu(), which takes an 'href' param and builds the link itself (see WP_Admin_Bar::recursive_render()). Thus, the notification callback function friends_format_notifications(), and the helper function bp_members_get_notifications_for_user(), have to be modified to return structured data rather than an HTML string. In order to maintain backward compatibility with the BuddyBar, I achieved this by adding $format arguments.
- I reconfigured the logic in the callback function friends_format_notifications() so that it is a bit more efficient (and easy to look at). If everyone is happy with this refactoring, I'll go through and apply similar changes to all the notification callbacks. The changes are purely internal, and should be backward-compatible with plugins that use the old-style format notifications functions.
- I added just a little bit of backpat code in bp_members_get_notifications_for_user() that will try to deal with _format_notifications() functions that have not been converted to the new format (this will be relevant only for plugins that haven't been updated for 1.3). It's minimal, but will ensure that at least the text of the notification will be rendered in the dropdown. Again, this is only an issue for the WP Admin Bar; plugins will continue to work as expected for the BuddyBar.
- On a slightly more general note, what should we do if we want to add additional styles to the WP Admin Bar? Should we load a separate stylesheet, like we do with the BuddyBar? Or should we put it in the bp-default stylesheets? (I'm thinking little stuff, like the unread notification count, which should get a circle-style like WP's unread comment count)
Feedback welcome please!
#11
@
14 years ago
(In [4620]) Provides initial support for Notifications menu in WP Admin Bar. Refactors group and friendship notifications to return values compatible with the WP Admin Bar constructor. Modifies bp_core_get_notifications_for_user() in order to provide WP Admin Bar support in addition to BuddyBar backpat. References #3294
#14
@
14 years ago
Okay, I think Notifications support is all done. Please open tickets for anything you find missing.
And, actually, I think that everything else mentioned in the original ticket description is done too. JJJ, close?
#16
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I received a friendship_request_notification on testbp.org and it was not clearing when I clicked the link in the admin bar.
I had to add "/?new" at the end of the link to have it cleared.
I think in r4620 you accidentally removed the "/?new" part at the end of the link that should clear the friendship_request_notification in this file:
http://buddypress.trac.wordpress.org/browser/trunk/bp-friends/bp-friends-activity.php
#18
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Noticed the new Notifications menu has the same ID as Settings > Notifications, which results in two sets of them - one on the root, another in the users settings.
#20
@
14 years ago
- Resolution fixed deleted
- Severity set to normal
- Status changed from closed to reopened
Back again for single groups and users.
#21
@
14 years ago
Can you be more specific about what's back? I assume you mean the Edit Page button? I'm not able to reproduce.
#22
@
14 years ago
Never mind, I found the issue. It has to do with the way that bp_is_blog_page() works.
#24
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening this as I can't find a better ticket to apply this to. Apologies in advance if I missed something.
In BP 1.5.5 under WP 3.3.1 I see no "Edit Post" button in the WP Admin Bar regardless of context. The attached patch fixes the behaviour as it seems that bp_groups_admin_bar_version_check() removes the wp_admin_bar_edit_menu action globally, rather than under the circumstances that cause the "Edit Group" menu to appear.
#25
@
13 years ago
Thanks for the patch. I think the fix is probably a bit simpler. Since the remove_action()
you're referring to is located in the bp-groups-adminbar.php
file, we only need to worry about group contexts. And the Edit menu should be removed for *all* users when in that context. FWIW, this is already working properly in BP 1.6 trunk.
In the future, feel free to open new tickets for small issues like this, especially when the more general ticket has been resolved for a while.
[1. Moderation links are missing for current_item (cannot spam users or groups)] [done]