Make BuddyPress' short description consistent throughout the project.

Fixes #5677

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9181 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Messages: Introduces meta table and related cache functions.

This commit alters the messages DB schema to add a meta table, which will
allow plugin developers to record information about a message.

The new message meta functions in bp-messages-functions.php mirrors those
in other BP components (activity, groups, etc.).

The DB version is also bumped to 9181.

See #3083.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9182 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Prefetch message meta when in a message loop.

This reduces overhead when querying for message meta in the context of a
bp_thread_has_messages() loop.

Also introduces an 'update_meta_cache' parameter to the bp_has_thread_messages()
stack, so the message meta cache prefetch can be disabled by developers.

See #3083.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9183 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Grab all message IDs before deleting a message thread.

In BP_Messages_Thread::delete(), we need to grab all message IDs before
a message thread is outright deleted.  This is done by using
$wpdb->get_col() instead of $wpdb->get_var().

This commit also:

* Deletes the message meta attached to the message (see #3083)
* Reinstates the 'messages_thread_deleted_hook' action that was improperly removed in r9165
* Adds $message_ids as an extra parameter to the 'bp_messages_thread_after_delete' action

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9184 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce 'bp_messages_thread_before_mark_delete' action.

This commit renames the 'bp_messages_thread_before_delete' action added in
r9165 to 'bp_messages_thread_before_mark_delete' and moves the
'bp_messages_thread_before_delete' hook where the message thread is
actually deleted.

The phpDoc for BP_Messages_Thread::delete() is also updated to accurately
outline what is happening in the class method.

See #5193.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9185 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add unit test cases for message meta.

See #3083.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9186 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix oEmbed in private messages.

oEmbed caching for private messages will be in the next commit.

See #5990.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9187 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Messages: Add oEmbed caching.

With the introduction of the messages meta table (#3083), we are now able
to cache oEmbed responses.  On subsequent fetches, we will now reference
the message cache instead of pinging the oEmbed provider.

This mirrors our functionality with BP's activity implementation of oEmbed.

See #5990.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9188 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Ensure site_options have been loaded in `bp_get_signup_allowed()`.

This function is sometimes run before `$bp->site_options` has been populated,
resulting in incorrect 'registration' values.

Fixes #6043.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9189 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove some run-on sentences, also some comma splices, they were kind of annoying, they made BuddyPress more annoying to use, this is much better, thanks for using BuddyPress.

Props tharsheblows.
Fixes #5878.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9190 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce `bp_sort_by_key()`.

A companion for `bp_alpha_sort_by_key()`, this function allows arrays of
objects or associative arrays to be sorted according to one of their keys/
properties - a kinda-sorta version of `wp_list_pluck()` for sorting. Supports
numeric as well as alphabetical sorts.

`bp_alpha_sort_by_key()` is converted to a wrapper of the new function.

Fixes #6047. See #5669.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9191 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
More precise error checking in `bp_sort_by_key()`.

In order to support sorting with a value of 0, we must use `isset()` to verify
the existence of a value.

See #6047.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9192 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Admin: remove duplicated save/new page buttons on the BP Settings > Pages screen.

Removing these buttons simplifies the UI for this screen. We can revisit the "Add Page" button in particular in the future.

Fixes #6044

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9193 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Post Type Activity Tracking feature

So far the tracking feature was requiring the Blogs component to be active. In 2.2 we are centralizing the majority of the tracking code into the Activity component. A new set of functions and hooks has been created to catch public post types supporting the feature 'buddypress-activity' and to automatically generate an activity when a new item is publicly published.

It's now possible to add this support to any public post type using one unique line of code, eg: {{{add_post_type_support( 'page', 'buddypress-activity' )}}}. In this case BuddyPress will use generic activity attributes.
Each activity attribute of the supported post type can be customized using a specific function (eg: set custom strings to describe the post type activity action).

When registering a post type in WordPress it's also possible to set the 'buddypress-activity' feature using the support parameter of the second argument of the register_post_type() function. Custom activity action strings can be defined within the labels parameter and activity attributes can be set using the new parameter 'bp_activity'.

When the Blogs component is active, the 'post' post type is automatically supporting the 'buddypress-activity' feature. The conditional logic (eg: blog_public option set to 1 ...) that occurs before a new activity is posted and the comments tracking remain unchanged.

props boonebgorges, DJPaul

Fixes #5669

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9194 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Do not fetch meta cache when getting a thread's total message count.

Also add defaults to the `BP_Messages_Thread_Template` constructor.

See #3083.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9195 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Groups: clear cookies used by group creation wizard after group is successfully created.

Fixes #5867, props r-a-y

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9196 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Members: when signing up a new user, use our `bp_update_user_meta` wrapper function to store the `activation_key` in usermeta.

Fixes #5884, props Clean-Cole

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9197 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
User Settings: fix PHP notice when changing your email address.

Fixes #5982, props slaFFik

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9198 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Build: revert r9150 ("have Travis-CI shallow clone the repo").

The idea was to reduce the amount of data Travis-CI had to download when it cloned the test prior to each test run.
However, there doesn't seem to be much evidence to suggest this helped speed up the running of the test suite in a meaningful way.

The problem with using depth 1 is that if we make multiple commits in quick succession before Travis-CI is able to
kick off a build for that commit, it will fail due to being unable to find the commit. This is because Travis-CI seems to check out a branch and then check out the exact commit. It's possible to get into a situation where the latest branch is newer than the commit Travis is trying to build against.

Thanks to https://github.com/Freeseer/freeseer/commit/84252a6afc1465265565dd72d17c0bc438ba0988 for figuring out the black magic behind these failures.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9199 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Members: when validating user signup, if `wp_insert_user` returns a `WP_Error` object, use it.

Prior to this change, we were replacing WP's helpful error message with a rather generic and unhelpful BP error message.
Fixes #6007, props Mamaduka

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