@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-09-11T16:03:41Z"^^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>Type:</strong> Doc-section</li><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-vcard/">LH Vcard</a></li></ul><h2>Actions/filters this plugin listens to</h2>
<table>
<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 &#8220;Add Contact&#8221; link hooks</td>
</tr>
<tr>
<td><code>wp_dashboard_setup</code></td>
<td>action</td>
<td>adds the &#8220;Latest Vcards&#8221; dashboard widget</td>
</tr>
<tr>
<td><code>user_row_actions</code> / <code>ms_user_row_actions</code></td>
<td>filter</td>
<td>adds the &#8220;Add Contact&#8221; 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>updated_user_meta</code> / <code>added_user_meta</code></td>
<td>action</td>
<td>tracks when a user&#8217;s vCard-relevant fields last changed, for the dashboard widget&#8217;s &#8220;latest&#8221; ordering</td>
</tr>
</table>
<h2>Actions/filters this plugin fires (for other plugins to extend)</h2>
<table>
<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>)</td>
<td>the main extension point &#8211; add or modify fields in the array that becomes the exported vCard. <code>lh-profile-page</code> uses this to add phone number data.</td>
</tr>
<tr>
<td><code>lh_vcard_return_all_tracked_meta_fields</code></td>
<td>filter</td>
<td>which usermeta keys count as &#8220;vCard-relevant&#8221; for the dashboard widget&#8217;s recently-updated tracking (default: nickname, first_name, last_name, description)</td>
</tr>
<tr>
<td><code>lh_vcard_return_view_vcard_capability</code></td>
<td>filter</td>
<td>the WordPress capability required to see/generate a vCard link on any UI screen (default: <code>publish_posts</code>)</td>
</tr>
<tr>
<td><code>lh_vcard_signed_link_ttl</code></td>
<td>filter</td>
<td>how long a generated download link stays valid, in seconds (default: <code>DAY_IN_SECONDS</code>)</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>
</table>
<h2>REST route</h2>
<p><code>GET /wp-json/lh-vcard/v1/download</code> &#8211; <code>user_ids</code> (comma-separated) and <code>token</code> query params. Publicly reachable (<code>permission_callback</code> is <code>__return_true</code>) &#8211; the signed token is the actual gate, not a login check. See <a href="https://lhero.org/portfolio/lh-vcard/architectural-notes/">Architectural Notes</a> for the reasoning.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Type: Doc-sectionPart of: LH VcardActions/filters this plugin listens to


Hook
Type
Purpose


bp_parse_query
action
registers the BuddyPress member/group &#8220;Add Contact&#8221; link hooks


wp_dashboard_setup
action
adds the &#8220;Latest Vcards&#8221; dashboard widget


user_row_actions / ms_user_row_actions
filter
adds the &#8220;Add Contact&#8221; 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


updated_user_meta / added_user_meta
action
tracks when a user&#8217;s vCard-relevant fields last changed, for the dashboard widget&#8217;s &#8220;latest&#8221; ordering


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


Hook
Type
Purpose


lh_vcard_add_data
filter ($add, $user_id)
the main extension point &#8211; add or modify fields in the array that becomes the exported vCard. lh-profile-page uses this to add phone number data.


lh_vcard_return_all_tracked_meta_fields
filter
which usermeta keys count as &#8220;vCard-relevant&#8221; for the dashboard widget&#8217;s recently-updated tracking (default: nickname, first_name, last_name, description)


lh_vcard_return_view_vcard_capability
filter
the WordPress capability required to see/generate a vCard link on any UI screen (default: publish_posts)


lh_vcard_signed_link_ttl
filter
how long a generated download link stays valid, in seconds (default: DAY_IN_SECONDS)


lh_vcard_do_widget_user
filter
customise the HTML for one user&#8217;s row in the dashboard widget&#8217;s list


REST route
GET /wp-json/lh-vcard/v1/download &#8211; user_ids (comma-separated) and token query params. Publicly reachable (permission_callback is __return_true) &#8211; the signed token is the actual gate, not a login check. See Architectural Notes for the reasoning.
""" ;
  sioc:topic <https://lhero.org/lh_portfolio-type/doc-section/>, <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/lh_portfolio-type/doc-section/> rdfs:seeAlso <https://lhero.org/lh_portfolio-type/doc-section/?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> .
