Make the _get_profile_stats() output markup more consistent and translator-friendly

- Apply <strong> tag in both plural and singular forms
- Don't include <strong> tag in gettext string

Fixes #5383

Props danbp

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

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7830 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve logic for marking at-mention notifications as read

In previous iterations, at-mention notifications were marked as read in the
following cases:

- when a user visited his own activity page
- when a user visited his own mention page
- when a user visited a single-activity permalink page

When the new notifications component was introduced in BP 1.9, the old
notification functions were swapped out one-for-one with the new correlates.
However, this introduced a bug where a logged-out user visiting one of the
pages listed above would mark at-mention items as read for *all* users (due to
the user_id field being null, and the user_id WHERE clause being excluded from
the UPDATE query).

We take this bug as an opportunity to narrow the circumstances in which
at-mention notifications are marked as read. The new system:

- When a user visits his own mention page, mark all his at-mention notifications
  as read
- When a user visits the permalink page of a single activity item in which he
  is mentioned, mark that specific at-mention notification as read

Fixes #5384

Props SlothLoveChunk for an initial patch

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

Precursor for migrating to WP meta API. See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7833 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Updates groupmeta unit tests to work with new WP API functions as well

The WP API has some additional caching requirements, so to make the tests work
for both the old and new functions, a few additional cache-clearings are
necessary.

See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7834 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Unit Tests: fix `test_get_value_byid_multipleusers_cached` and `test_get_all_for_user_cached` which referenced unset variables.

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

This is a simple function for grabbing the visibility level attached to a given
field by a specific user, sensitive to admin-provided defaults and override
settings.

See #4636

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7836 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In `bp_locate_template()` check for `WP_USE_THEMES` before calling `load_template()` to avoid warnings when running phpunit tests.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7837 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add `bp_locate_template` action to `bp_locate_template()` (syncing it with bbPress) to allow code execution immediately before a template is decided.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7838 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduce meta_tables param for BP_Component

This utility method is used to set up configuration for $wpdb integration
and use of the WordPress metadata API

Also includes restructuring of the global_tables set in BP_Component.

See #4551

Props johnjamesjacoby

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

See #4551

Props boonebgorges, johnjamesjacoby

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7841 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In bp_locate_template(), don't bail if DOING_AJAX

This is an amendment to r7837, which broke template loading during AJAX
operations (such as in the case of activity posting)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7842 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Modify bp_update_meta_cache() for new metadata cache schema

Now that we are using the WP metadata API, our cache keys have changed, and
the logic for priming meta caches must mirror these changes.

See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7843 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Bust group object cache when updating groupmeta

This is important because some group metadata gets stored with the group
object (like last activity)

See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7844 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix incorrect $wpdb->prepare() use in bp_update_meta_cache().

Fixes #5388

Props imath

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7845 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add 'active_format' parameter to bp_get_member_last_active()

This new param allows theme authors to specify whether they'd like the current
user's last activity string in the format "Active 5 minutes ago" vs the simpler
"5 minutes ago".

Fixes #5387

Props lenasterg

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7846 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove incorrect @uses documentation in bp_map_meta_caps()

Fixes #5386

Props tw2113

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

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