[buddypress-trac] [BuddyPress] #4803: bp_core_load_admin_bar() is called too early (bp_loaded instead of bp_init)

buddypress-trac noreply at wordpress.org
Sun Apr 14 21:09:46 UTC 2013


#4803: bp_core_load_admin_bar() is called too early (bp_loaded instead of bp_init)
------------------------------------+------------------------------
 Reporter:  johnjamesjacoby         |       Owner:  johnjamesjacoby
     Type:  defect (bug)            |      Status:  reopened
 Priority:  normal                  |   Milestone:  1.7.1
Component:  Toolbar/BuddyBar        |     Version:  1.7
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------
Changes (by r-a-y):

 * keywords:  dev-feedback => dev-feedback has-patch
 * component:  Core => Toolbar/BuddyBar
 * milestone:  1.8 => 1.7.1


Comment:

 > Let's extract this functionality out and create a function specifically
 for this purpose, and hook it early onto init.

 In 01.patch, I:
 * Chose not to extract the functionality out of `bp_core_load_admin_bar()`
 because I feel we would be creating a new function that wouldn't be used
 outside this context.  Feel free to do whatever is best.
 * Moved the hook to `init` at priority 9.
 * I removed lines 71-77 in the existing code because it is unnecessary
 since `is_admin_bar_showing()` already does the same check in
 `wp_admin_bar_render()`.

 Unit tests forthcoming.

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


More information about the buddypress-trac mailing list