Allow site admins to visit the Request Membership page of a private group

Fixes #5357

Props imath

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8159 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Adapt core to allow BP Attachments to be into the list of optional components

So that next "feature as a plugin" Attachments can be activated just like the other BuddyPress components, we need to create two new hooks.

props johnjamesjacoby, boonebgorges, imath.

See #5429

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8160 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Pinking shears

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8161 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Only load the WordPress/Community Profile tabs in user-edit.php when appropriate

They should not be loaded outside the network admin when bp_core_do_network_admin()
is true.

Fixes #5464

Props imath

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8162 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
xProfile: adjust the `xprofile_sanitize_data_value_before_save` function to return the passed value instead of `null` if that value is `empty()`.

This is currently preventing numeric zeroes as being stored as a field value, which is required for ticket #5220.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8163 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't show the "Create a Group" button in the page title during the group creation process

Fixes #5469

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8164 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
xProfile: fix logic error in the `BP_XProfile_ProfileData` class' `populate()` method where the field's data wasn't being set correctly if it was already in cache.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8165 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Enforce null search_terms for members widgets

Without the explicity search_terms=false param, widgets could pick up
incorrectly on search params elsewhere on the page.

Fixes #5318

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8166 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Allow all notifications to be fetched by passing 'both' to is_new param of BP_Notifications_Notification::get()

Fixes #5315

Props rodrigorznd

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8167 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Groups: Add backward compatibility when fetching list of admins/mods.

In r8056, the change was made so a group does not fetch its extra data
like grabbing the list of group admins and mods by default.

However, if a group template loop was created with the 'populate_extras'
parameter set to false and either the bp_group_list_admins() and
bp_group_list_mods() functions were used in the loop, these functions
would not output the correct list.

To solve this, this commit manually fetches the group admins / mods if
the 'populate_extras' flag in the group template loop is set to false.

Fixes #5411

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8168 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Friends: Pass $item_id as an argument for notification format filters.

Props mpa4hu

See #5314

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8169 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Display a "resend email" link when an unactivated user tries to log in.

An unactivated user is a person who registers a new account, but has
not activated their account via email yet.

Previously, if an unactivated user tried to login, there was no option
for the user to resend the activation email.  This commit adds this
option.

Props r-a-y, imath

Fixes #4676

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8170 cdf35c40-ae34-48e0-9cc9-0c9da1808c22