Skip to content

Activity Data and Templates

How check-in data is stored, and what can be overridden.

A check-in is stored as a single BuddyPress activity meta entry, not as separate fields.

The meta key is bpchk_place_details, holding an array:

$place = bp_activity_get_meta( $activity_id, 'bpchk_place_details', true );
// array(
// 'place' => 'Central Park, New York, NY, USA',
// 'latitude' => 40.7812199,
// 'longitude' => -73.9665138,
// 'add_as_my_place' => 'yes',
// )

The plugin also appends an “-at [location]” link to the activity content and sets the activity type to activity_bpchk_chkins.

When a check-in is saved to the profile tab (add_as_my_place is yes), the plugin geocodes the coordinates and stores a richer record in the user meta key bpchk_fav_places, an array of entries:

$places = get_user_meta( $user_id, 'bpchk_fav_places', true );
// each entry:
// array(
// 'latitude', 'longitude', 'activity_id', 'place',
// 'country', 'province', 'city', 'street',
// 'postal_code', 'country_code', 'formatted_address', 'visit_date',
// )

The Check-ins profile tab reads bpchk_fav_places, not the activity meta.

  • Maps JavaScript API with the Places library, loaded on the activity form for autocomplete.
  • Geocoding API (maps/api/geocode/json) to turn coordinates into a formatted address when saving a place and when rendering the map.
  • Maps Embed API (maps/embed/v1/place) for the iframe shown under a check-in.

The Check-ins tab listing is rendered from:

public/templates/checkin/bp-checkins-activity.php

This file is included directly from the plugin, so copying it into a theme does not override it. To change how the tab renders, either point the bpchk_core_template_plugin filter at a different BuddyPress members template, or adjust the markup with CSS and JavaScript.

Verified selectors you can target:

Class or id Element
.bp-checkins, .bp-checkin-panel Location picker panel on the activity form
.checkins-icon, .bpchk-marker-container Map-pin icon that opens the panel
.checkin-loc The “-at [location]” link in activity content
.bpchk-place-map Embedded map container under a check-in
.bpchk-activity-checkins-section Wrapper of the profile Check-ins tab
.bpchk-activity-checkins-list Saved check-ins table wrapper
#bpchk-checkins-map Map on the Check-ins tab
.bpchk-checkins-address Location cell in the table
.bpchk-trash-checkin Per-row delete control