Groups: When preparing the Group Members template loop, use the details of the group passed to the class rather than always using `$bp->groups->current_group`.

The global property is usually set to the currently-displayed group according to BP's URI parsing, but if the Group Members template loop is used outside a typical Groups context (such as in 3rd party plugin, or a unit test), then this variable isn't set. At worse, it'd use the wrong group's details to build the template loop.

Fixes #5420

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7978 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7978

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7979 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Exclude 'last_activity' and 'total_member_count' from the bp_groups item cache

These items are stored in groupmeta, and thus are cached independently.
Furthermore, including them in the group cache will require that cache to be
busted more frequently than necessary.

See #5407

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7980 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve inline docs for BP_Group_Member_Query

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7981 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7981

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7982 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix global variable clashes in bp_group_has_invites()

The use of extract( $r, EXTR_SKIP ) in bp_group_has_invites() was preventing
the 'group_id' parameter passed to the function from being set in the global
and from being passed to the template class. This made the function impossible
to use outside the group context.

Fixes #5427

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7983 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add unit test for bp_group_has_invites()

This test merely checks to see that the $invites_template global is populated
correcltly with invitation-related info after the loop is initialized. It will
be used to ensure backward compatibility after any potential changes related to

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7984 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Save a variable when parsing default arguments in bp_group_has_invites()

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7985 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
More specific assertions for bp_group_has_invites() template tests. See #5427

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7986 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7986

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7987 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Ensure that add_user_to_group() params get passed through in testcase.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7988 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Insert default values when updating last activity

This prevents errors on certain configs.

Fixes #5424

Props imath

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7989 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use stripslashes_deep() rather than wp_unslash() in bp-members-admin.php

The functions do the same thing, but wp_unslash() was not available prior to
WP 3.6.

See #5197

Props lenasterg

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7990 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Bump minimum WordPress requirement to 3.6

BuddyPress 2.0 introduces a number of features that require WP 3.6, including
some use of wp_unslash() and integration with the Heartbeat API.

See #5328, #5431 et al

Props DJPaul

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7991 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove WP 3.5.x from travis-ci testing matrix

BP 2.0 will require WP 3.6+

Also bumps WP 3.8.x tests to run against 3.8.1 rather than 3.8.0.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7992 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't use mysql_real_escape_string() in BP_User_Query

Fixes #5432

Props imath

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7993 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add object caching when fetching the active notice.

This commit:

- Introduces a new hook - 'messages_notice_before_delete' to do something before a notice is deleted
- Adds object caching to the BP_Messages_Notice::get_active() method
- Adds a cache invalidation function to bp-messages-cache.php
- Adds a unit test

Fixes #5419

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7994 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add phpDoc for BP_Messages_Thread class.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7995 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7995

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7996 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Properly set object cache for a new BP_Activity_Activity object.

This commit also renames the activity cache key and group to be
consistent with the groups component. (See r7956.)

See #5434.

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