Don't run meta_value through esc_sql() in bp_blogs_update_blogmeta()

The necessary sanitization happens in $wpdb, and the esc_sql() re-adds slashes
that were removed by stripslashes(). Fixing this bug just in time to refactor
it out :)

See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7868 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add tests for blogmeta functions.

See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7869 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Migrate blogmeta functions to the WP metadata API

See #4551

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

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

See #5400

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7872 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Tests: xprofile factory create() methods should return IDs, not objects

This is more consistent with other components

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7873 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix typo in bp_activity_add_meta() tests

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7874 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce groups_add_groupmeta(). See #5400

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

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

See #5400

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

See #5400

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7878 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add support for $single param in _get_meta() functions

Unlike get_metadata(), we are defaulting to $single = true, for backward
compatibility.

See #5400

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7879 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Tests: create users with explicit last_activity time in get_value_byid() tests

This ensures that slow test suites don't create mismatches. (Looking at you,
Travis-CI)

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7881 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Tests: more reliable last_updated for profiledata tests

Requires a hackish filter because BP doesn't make this very extensible

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7882 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add delete_all support for all _delete_meta() functions

The delete_all parameter allows you to delete all meta items matching the
specified meta_key, regardless of the associated object.

Because our meta delete functions also support the deletion of all metadata
associated with an object (by leaving out the meta_key param), a decision had
to be made regarding the behavior when _delete_meta() is called with delete_all
= true and meta_key = false. The most logical (and least destructive) strategy
was deemed to be: force delete_all to false when meta_key is also false. This
ensures that you don't accidentally wipe out all metadata for a component.

See #5400

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7884 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add support for prev_value param to _update_meta() functions

This parameter, inherited from update_metadata(), allows you to limit your
updates only to rows where the meta_value matches your specified prev_value.

See #5400

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7886 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't test prev_value return value on WP < 3.7

There was a bug prior to WP 3.7 that caused update_metadata() to return true
even when the update failed due to a 'prev_value' parameter not being matched.
Since this is not really a functionality issue, but is more about error
reporting, it doesn't affect end-user functionality in BP, except insofar as
the function will return an unexpected value in those cases. Instead of coming
up with an arcane workaround for these old versions, we'll just skip the tests
for the time being.

See https://core.trac.wordpress.org/ticket/24933 for background on the WP issue

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