I’ve been running BP 1.1 on my XAMP laptop server for a few weeks now. 1.1 has expanded admin controls, activity stream filters, and a completely revamped theme structure.

New callback format for your screen functions

Use this instead of bp_core_add_nav_item():

  1. bp_core_new_nav_item( array(‘name’ => __(‘name’, ‘text-domain’), ‘slug’ => $bp->component->slug, ‘screen_function’ => ‘my_screen_function’));

bp_core_new_nav_item() takes an array as its argument, otherwise it doesn’t work.

No avatars in database

This one really threw me for a loop. I was bringing a plugin up to 1.1 compatibility, and it mysteriously could not load avatar_thumb or avatar_full from the database. It turns out that they got rid of these columns in wp_bp_groups, and now use PHP filesystem functions to load urls directly from a folder.

Loading an avatar is actually much simpler now. For example, if you want to load a group avatar url, just call:

  1. bp_core_fetch_avatar( array(‘item_id’ => $group->id, ‘avatar_dir’ => ‘group-avatars’) );

I pulled this example from a db class that takes a BP_Groups_Group object as a paramter. Any way of getting a group id here works though. And the arbitrary 'avatar_dir' => 'group-avatars' selects the correct group avatar directory. It finds whatever folder you type in, but bp-core/bp-core-avatars.php throws on a fixed preceding path.

Leave a Reply