@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?post_type=lh-portfolio&#038;p=147188>
  a sioc:Post ;
  dc:title "Hooks & Filters" ;
  dcterms:identifier 147188 ;
  dc:modified "2026-10-13T00:02:53Z"^^xsd:dateTime ;
  dc:created "2026-09-09T16:13:06Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-vcard/hooks-filters/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<ul class=\"lh_portfolio-meta\"><li><strong>Part of:</strong> <a href=\"https://lhero.org/portfolio/lh-vcard/\">LH Vcard</a></li></ul><h2 class=\"wp-block-heading\">Actions/filters this plugin listens to</h2><figure class=\"wp-block-table\"><table><tbody><tr><th>Hook</th><th>Type</th><th>Purpose</th></tr><tr><td><code>bp_parse_query</code></td><td>action</td><td>registers the BuddyPress member/group &quot;Add Contact&quot; link hooks</td></tr><tr><td><code>wp_dashboard_setup</code></td><td>action</td><td>adds the &quot;Latest Vcards&quot; dashboard widget</td></tr><tr><td><code>user_row_actions</code> / <code>ms_user_row_actions</code></td><td>filter</td><td>adds the &quot;Add Contact&quot; row action on the users list screen</td></tr><tr><td><code>lh_bg_reports_fields</code> / <code>lh_bg_reports_field_output</code></td><td>filter</td><td>adds a Vcard column to LH Buddypress Group Reports</td></tr><tr><td><code>bbp_theme_after_reply_author_admin_details</code></td><td>action</td><td>adds a Vcard link to bbPress reply author details</td></tr><tr><td><code>init</code> / <code>query_vars</code> / <code>wp_loaded</code> / <code>parse_request</code></td><td>action, filter</td><td>the CardDAV endpoint: rewrite rules, query vars, a one-off rules flush per site, and dispatch</td></tr><tr><td>user, user meta, xProfile, avatar and BuddyPress group hooks</td><td>action</td><td>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</td></tr><tr><td><code>set_object_terms</code> / <code>deleted_term_relationships</code></td><td>action</td><td>a member blocked or unblocked through LH Buddypress Block Members leaves or rejoins the address book</td></tr></tbody></table></figure><h2 class=\"wp-block-heading\">Actions/filters this plugin fires (for other plugins to extend)</h2><figure class=\"wp-block-table\"><table><tbody><tr><th>Hook</th><th>Type</th><th>Purpose</th></tr><tr><td><code>lh_vcard_add_data</code></td><td>filter (<code>$add</code>, <code>$user_id</code>, <code>$viewer_id</code>)</td><td>the main extension point &#8211; add or modify fields in the array that becomes the card. <code>$viewer_id</code> is the user the card is built for. <code>lh-profile-page</code> uses this to add phone, address and other fields.</td></tr><tr><td><code>lh_vcard_return_all_tracked_meta_fields</code></td><td>filter</td><td>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.</td></tr><tr><td><code>lh_vcard_return_view_vcard_capability</code></td><td>filter</td><td>the capability needed to see vCard links and to use the CardDAV address book (default: <code>publish_posts</code>)</td></tr><tr><td><code>lh_vcard_signed_link_ttl</code></td><td>filter</td><td>how long a download link stays valid, in seconds (default: <code>DAY_IN_SECONDS</code>)</td></tr><tr><td><code>lh_vcard_return_photo_size</code></td><td>filter</td><td>photo size in pixels (default: 256)</td></tr><tr><td><code>lh_vcard_carddav_user_query_args</code></td><td>filter</td><td><code>get_users()</code> arguments for the CardDAV address book (default: members of the current site); blocked members are always removed afterwards</td></tr><tr><td><code>lh_vcard_carddav_base_path</code></td><td>filter</td><td>the CardDAV path (default: <code>carddav</code>)</td></tr><tr><td><code>lh_vcard_block_taxonomy</code></td><td>filter</td><td>the user taxonomy whose <code>blocked</code> term removes a member from the address book (default: <code>lh_bp_bms_block_status</code>)</td></tr><tr><td><code>lh_vcard_tombstone_lifetime</code></td><td>filter</td><td>how long removals are remembered for sync, in seconds (default: 90 days, minimum one day)</td></tr><tr><td><code>lh_vcard_do_widget_user</code></td><td>filter</td><td>customise the HTML for one user&#8217;s row in the dashboard widget&#8217;s list</td></tr></tbody></table></figure><h2 class=\"wp-block-heading\">Endpoints</h2><ul class=\"wp-block-list\"><li><code>GET /wp-json/lh-vcard/v1/download</code> &#8211; <code>user_ids</code> (comma-separated) and <code>token</code> query params. Publicly reachable; the signed token is the gate. See <a href=\"https://lhero.org/portfolio/lh-vcard/architectural-notes/\">Architectural Notes</a>.</li><li><code>/carddav/</code> &#8211; the CardDAV address book (WebDAV, not REST), with <code>/.well-known/carddav</code> redirecting to it. See <a href=\"https://lhero.org/portfolio/lh-vcard/carddav-address-book/\">CardDAV Address Book</a>.</li></ul>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH VcardActions/filters this plugin listens toHookTypePurposebp_parse_queryactionregisters the BuddyPress member/group &quot;Add Contact&quot; link hookswp_dashboard_setupactionadds the &quot;Latest Vcards&quot; dashboard widgetuser_row_actions / ms_user_row_actionsfilteradds the &quot;Add Contact&quot; row action on the users list screenlh_bg_reports_fields / lh_bg_reports_field_outputfilteradds a Vcard column to LH Buddypress Group Reportsbbp_theme_after_reply_author_admin_detailsactionadds a Vcard link to bbPress reply author detailsinit / query_vars / wp_loaded / parse_requestaction, filterthe CardDAV endpoint: rewrite rules, query vars, a one-off rules flush per site, and dispatchuser, user meta, xProfile, avatar and BuddyPress group hooksactionrecord 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 changesset_object_terms / deleted_term_relationshipsactiona member blocked or unblocked through LH Buddypress Block Members leaves or rejoins the address bookActions/filters this plugin fires (for other plugins to extend)HookTypePurposelh_vcard_add_datafilter ($add, $user_id, $viewer_id)the main extension point &#8211; 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_fieldsfilteruser 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_capabilityfilterthe capability needed to see vCard links and to use the CardDAV address book (default: publish_posts)lh_vcard_signed_link_ttlfilterhow long a download link stays valid, in seconds (default: DAY_IN_SECONDS)lh_vcard_return_photo_sizefilterphoto size in pixels (default: 256)lh_vcard_carddav_user_query_argsfilterget_users() arguments for the CardDAV address book (default: members of the current site); blocked members are always removed afterwardslh_vcard_carddav_base_pathfilterthe CardDAV path (default: carddav)lh_vcard_block_taxonomyfilterthe user taxonomy whose blocked term removes a member from the address book (default: lh_bp_bms_block_status)lh_vcard_tombstone_lifetimefilterhow long removals are remembered for sync, in seconds (default: 90 days, minimum one day)lh_vcard_do_widget_userfiltercustomise the HTML for one user&#8217;s row in the dashboard widget&#8217;s listEndpointsGET /wp-json/lh-vcard/v1/download &#8211; user_ids (comma-separated) and token query params. Publicly reachable; the signed token is the gate. See Architectural Notes./carddav/ &#8211; the CardDAV address book (WebDAV, not REST), with /.well-known/carddav redirecting to it. See CardDAV Address Book." ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
