Don't shrink whats-new box if focusing away from window

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7941 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce blog- and group-create button functions, and use to build directory headers in bp-legacy

The new functions bp_get_blog_create_button() and bp_get_group_create_button()
standardize the treatment of these buttons by using bp_get_button(). They also
make life easier for themers, who will not need to build the buttons from
scratch.

In this changeset we modify the way that bp-legacy loads these buttons into the
titles of the directory pages. Previously, it was done directly in BP's theme
compat layer, with the result that all template packs had to follow the
questionable practice of embedding a button inside of a header element. Now,
the directory title is a string, but is filtered; bp-legacy then chooses to
add a button by using the new create-button functions + the new filters.

Fixes #5144

Props hnla, r-a-y

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7942 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Sanity check before deleting old avatar files before cropping new ones

Previously, if a user uploaded a new avatar file that had a name format like
an existing BP avatar file, BP would accidentally wipe that file out before
cropping. This would result in a failed crop, because the just-uploaded image
would be gone. This changeset introduces a sanity check: only delete existing
avatar files if the filename for those files is not the same as the uploaded
file.

Fixes #5417

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7944 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Core: minor tweak to `@since` phpDoc for `bp_core_exclude_pages_from_nav_menu_admin()`.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7945 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix AJAX pagination when clicked page number is 1000 or more.

Previously, BP's javascript was converting the paginated element
content to a number with the Number() function.  This doesn't work
with comma-seperated number strings (eg. 1,000), which returned a NaN
value causing problems during the AJAX callback.

This commit changes the way the page number is parsed in BP's
javascript by grabbing the page number from the 'href' attribute.
Thereby, ensuring that AJAX pagination works for pages greater than
1000.

Fixes #5404

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7946 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add filters to bp_get_group_create_button() and bp_get_blog_create_button()

See #5144

Props rogercoathup

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7947 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce support for a 'type' sorting parameter in BP_Group_Member_Query

The 'type' parameter supports any of the arguments ('newest', 'active', etc)
supported by the parent class BP_User_Query. In addition, it's possible to
sort by type 'last_joined' and 'first_joined'.

This changeset also introduces the 'type' parameter through the
bp_group_has_members() function stack.

See #921

Props imath, boonebgorges

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7948 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Enable member sorting and pagination on group Members pages

Fixes #921

Props imath, boonebgorges

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7950 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add 'offset' parameter to bp_has_activities() function stack

This param allows plugins and themes to filter results to only those activity
items whose IDs are greater than the 'offset' parameter. See eg the "load
new items" integration with the Heartbeat API.

See #5328

Props imath, boonebgorges

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7951 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Automatically check for newly created items when viewing the Activity Stream.

Leveraging WP's Heartbeat API, this new functionality performs periodic checks
to see whether new activity items matching the current filter have been posted
since the page was originally loaded. If new items are found, a Load Newest
link is inserted into the top of the stream, which will insert the new items.

A filter is included, bp_activity_heartbeat_pulse, that allows site owners to
set a specific interval for these checks. The default value is 15 seconds, or
whatever your global Heartbeat interval is.

To disable the feature, there is a new setting "Automatically check for new
activity items when viewing the activity stream".

Fixes #5328

Props imath, boonebgorges

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7952 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Clarify syntax related to r7952.

Fixes #5328

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7954 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove redundant activity tests (copypasta from groups)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7955 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Overhaul the way that individual group objects are cached

The existing implementation was broken in a number of ways. Most critically,
user-specific data (like is_member) was being stored in the persistent object
cache without respect to user.

This refactor excludes the user-specific data from being cached along with the
group object. It also reworks the way that items are keyed in the cache, for
greater consistency with WordPress and the other BP components.

See #5407

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7957 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve docblock for BP_Activity_Activity::get_filter_sql()

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7958 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add missing bracket to inline documentation

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7959 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
First pass at Profile Settings for improved profile field visibility UX:

* Adds `/members/single/settings/profile.php` template to `bp-legacy` and `bp-default`.
* Introduces `bp-xprofile.settings.php` for Settings specific functionality going forward.
* Introduces actions & screens for handling output and saving of profile visibility data.
* Introduces `_is_` function for identifying the new component/action URL.
* See #5352. (still more @todo...)

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