Save a variable when parsing args in bp_core_new_subnav_item()

See #5720

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8539 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Some tests for bp_core_new_subnav_item().

See #5720

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8540 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Refactor all uses of like_escape() to use bp_esc_like()

WordPress 4.0 will deprecate like_escape(), due to a history of inconsistent
documentation and usage. Its replacement is a new method, $wpdb->esc_like(),
which will be available only in WP 4.0. For this reason, and because the
return value of $wpdb->esc_like() will not always be identical to that of
like_escape(), BP cannot do a straight swap of the old function for the new
one. Instead, we introduce a wrapper function that uses the core method if
available, and otherwise reproduces the logic of that method (for earlier
versions of WordPress).

Fixes #5701
slightly different syntax in some cases

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8541 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Avatars: fix PHP Notice when passing a `WP_User` object to `get_avatar`.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8542 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix copy-pasta inline doc reference in Groups component `setup_globals()`. Props boonebgorges.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8543 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Break redirect/display hook logic out of bp_core_new_subnav_item()

By moving some of the critical logic into bp_core_maybe_hook_new_subnav_screen_function(),
it becomes possible to write unit tests for it.

See #5720

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

See #5720

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8545 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Friends: Tweak bp_member_add_friend_button().

Due to changes in r8514, some code in this function is now redundant.
Therefore, this commit removes this code.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8546 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce BP_XProfile_Field_Type::display_filter(), and implement in BP_XProfile_Field_Type_Datebox.

The new display_filter() method makes it easy for field types to customize the
appearance of its values. In the case of Datebox fields, this means formatting
the MySQL- or UNIX-formatted date in the format of bp_format_time().

Fixes #5630

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8547 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In groups/template tests, cast time() to a variable before using to create data

This ensures that relative times don't get screwed up if tests take more than
one second.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8548 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove hard-coded image reference to `bp-default` in Messages autocomplete styling. See #2423.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8549 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove LESS support in `package.json` and `Gruntfile.js`, add `grunt-sass` and `grunt-jsvalidate` for future usage, and update `cssmin` and `uglify` to latest versions.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8550 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Setup `jsvalidate` task.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8551 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
More explicit group join dates so that automated tests for bp_group_is_user_banned() don't get fired out of order

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8552 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Core: change `bp_disable_profile_sync()`'s default value to false.

The default value is only used if the site is somehow missing the `bp-disable-profile-sync` option
in the database. The default value for the `bp-disable-profile-sync` option is false, so having the
function default to disabling profile sync if the option is missing is inconsistent.

Fixes #5725

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8553 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
xProfile: fix profile fields not rendering if their value is "0".

This was caused by a reliance on the `empty()` function in a few places, which was causing us to
not handle "0" (both as int and string) as a valid field value. In turn, this was causing the
profile field template loop to skip rendering the affected field.

Fixes #5731, props DJPaul and r-a-y.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8554 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Tests: stop manually resetting `$bp->avatar` between tests.

This causes tests to fail if those tests call `friends_add_friend()` inside `setUp()`
as the `$bp->avatar->show_avatars` property is unset. Instead, rather than manually
resetting the variable, we'll let `bp_core_set_avatar_globals()`, via `bp_setup_globals`
in `assertPreConditions()`, reset it correctly.

Fixes #5727

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