Helping Organisations get organised!

Hooks & Filters

Actions/filters this plugin listens to

Hook Type Purpose
bp_parse_query action registers the BuddyPress member/group “Add Contact” link hooks
wp_dashboard_setup action adds the “Latest Vcards” dashboard widget
user_row_actions / ms_user_row_actions filter adds the “Add Contact” row action on the users list screen
lh_bg_reports_fields / lh_bg_reports_field_output filter adds a Vcard column to LH Buddypress Group Reports
bbp_theme_after_reply_author_admin_details action adds a Vcard link to bbPress reply author details
init / query_vars / wp_loaded / parse_request action, filter the CardDAV endpoint: rewrite rules, query vars, a one-off rules flush per site, and dispatch
user, user meta, xProfile, avatar and BuddyPress group hooks action record when each card last changed on each site (its REV): registration, joining or leaving a site, profile updates, tracked meta, xProfile data, avatars, group membership, and group renames or status changes
set_object_terms / deleted_term_relationships action a member blocked or unblocked through LH Buddypress Block Members leaves or rejoins the address book

Actions/filters this plugin fires (for other plugins to extend)

Hook Type Purpose
lh_vcard_add_data filter ($add, $user_id, $viewer_id) the main extension point – add or modify fields in the array that becomes the card. $viewer_id is the user the card is built for. lh-profile-page uses this to add phone, address and other fields.
lh_vcard_return_all_tracked_meta_fields filter user meta keys whose changes mark a card as changed (default: nickname, first_name, last_name, description). A plugin adding card data from its own meta should add its keys here.
lh_vcard_return_view_vcard_capability filter the capability needed to see vCard links and to use the CardDAV address book (default: publish_posts)
lh_vcard_signed_link_ttl filter how long a download link stays valid, in seconds (default: DAY_IN_SECONDS)
lh_vcard_return_photo_size filter photo size in pixels (default: 256)
lh_vcard_carddav_user_query_args filter get_users() arguments for the CardDAV address book (default: members of the current site); blocked members are always removed afterwards
lh_vcard_carddav_base_path filter the CardDAV path (default: carddav)
lh_vcard_block_taxonomy filter the user taxonomy whose blocked term removes a member from the address book (default: lh_bp_bms_block_status)
lh_vcard_tombstone_lifetime filter how long removals are remembered for sync, in seconds (default: 90 days, minimum one day)
lh_vcard_do_widget_user filter customise the HTML for one user’s row in the dashboard widget’s list

Endpoints

  • GET /wp-json/lh-vcard/v1/download – user_ids (comma-separated) and token query params. Publicly reachable; the signed token is the gate. See Architectural Notes.
  • /carddav/ – the CardDAV address book (WebDAV, not REST), with /.well-known/carddav redirecting to it. See CardDAV Address Book.

If you like this plugin please consider making a donation to further development