@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/portfolio/lh-governance-documents/>
  a sioc:Post ;
  dc:title "Hooks and filters" ;
  dcterms:identifier 148026 ;
  dc:modified "2026-09-21T16:11:52Z"^^xsd:dateTime ;
  dc:created "2026-09-21T16:11:52Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-governance-documents/hooks-and-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-governance-documents/">LH Governance Documents</a></li></ul>
<p class="wp-block-paragraph">Every hook name starts with the plugin namespace, <code>lh_governance_documents</code>, shown below as <code>{ns}</code>. All are filters unless marked as an action.</p>



<h2 class="wp-block-heading">Content model</h2>



<ul class="wp-block-list">
<li><code>{ns}_post_type_name</code>, <code>{ns}_taxonomy_name</code>, <code>{ns}_rewrite_slug</code>, <code>{ns}_post_type_args</code>, <code>{ns}_taxonomy_args</code></li>
<li><code>{ns}_default_types</code>: seeded type terms, slug to label.</li>
<li><code>{ns}_meta_prefix</code>, <code>{ns}_get_fields</code>: meta key prefix and field definitions.</li>
<li><code>{ns}_approval_bodies</code>, <code>{ns}_review_cycles</code> (slug to years).</li>
<li><code>{ns}_type_defaults</code>, <code>{ns}_default_owner_role</code>, <code>{ns}_fallback_review_cycle</code></li>
<li><code>{ns}_compute_next_review</code>: the derived next review date.</li>
</ul>



<h2 class="wp-block-heading">Review due and reminders</h2>



<ul class="wp-block-list">
<li><code>{ns}_review_due_lead_days</code> (30): how far ahead a review counts as due.</li>
<li><code>{ns}_overdue_reminder_interval_days</code> (30): repeat interval while overdue.</li>
<li><code>{ns}_reminder_statuses</code>, <code>{ns}_reminder_recipients</code>, <code>{ns}_notification_text</code></li>
<li><code>{ns}_component_name</code>, <code>{ns}_component_action</code>: the BuddyPress notification component and action.</li>
<li><code>{ns}_review_due_query_var</code>: the Review due view&#8217;s query var.</li>
<li><code>{ns}_daily_hook</code>, <code>{ns}_uses_action_scheduler</code></li>
</ul>



<h2 class="wp-block-heading">Display</h2>



<ul class="wp-block-list">
<li><code>{ns}_approval_body_labels</code>, <code>{ns}_review_cycle_labels</code></li>
<li><code>{ns}_document_rows</code>: rows shown by the details block.</li>
<li><code>{ns}_template_content</code>: markup of the single document block template.</li>
</ul>



<h2 class="wp-block-heading">Plugin</h2>



<ul class="wp-block-list">
<li><code>{ns}_init_plugin</code>: return false to stop the plugin loading.</li>
<li><code>lh_governance_documents_return_plugin_namespace</code>, <code>{ns}_return_plugin_text_domain</code>, <code>{ns}_plugin_name</code></li>
<li><code>{ns}_post_type_list_filters</code>: other plugins&#8217; post type lists this post type adds itself to.</li>
</ul>



<h2 class="wp-block-heading">Other plugins&#8217; hooks used</h2>



<ul class="wp-block-list">
<li><code>lh_lps_get_lockable_post_types</code> and LH MCP General Abilities&#8217; <code>_return_writable_post_types</code>: the post type adds itself to both.</li>
<li><code>bp_notifications_get_registered_components</code>, <code>bp_notifications_get_notifications_for_user</code>: the reminder notifications.</li>
</ul>



<h2 class="wp-block-heading">Scheduled job and stored state</h2>



<ul class="wp-block-list">
<li>Action <code>lh_governance_documents_daily</code>, once a day per site, runs the reminder check.</li>
<li>Option <code>{ns}_post_type_schema_version</code> records seeded terms and flushed rewrites; transient <code>{ns}_schedule_checked</code> limits the schedule check to hourly.</li>
<li>Post meta <code>_lh_governance_reminder_state</code> records the last reminder raised for a document.</li>
<li>No custom database tables.</li>
</ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Governance Documents
Every hook name starts with the plugin namespace, lh_governance_documents, shown below as {ns}. All are filters unless marked as an action.



Content model




{ns}_post_type_name, {ns}_taxonomy_name, {ns}_rewrite_slug, {ns}_post_type_args, {ns}_taxonomy_args
{ns}_default_types: seeded type terms, slug to label.
{ns}_meta_prefix, {ns}_get_fields: meta key prefix and field definitions.
{ns}_approval_bodies, {ns}_review_cycles (slug to years).
{ns}_type_defaults, {ns}_default_owner_role, {ns}_fallback_review_cycle
{ns}_compute_next_review: the derived next review date.




Review due and reminders




{ns}_review_due_lead_days (30): how far ahead a review counts as due.
{ns}_overdue_reminder_interval_days (30): repeat interval while overdue.
{ns}_reminder_statuses, {ns}_reminder_recipients, {ns}_notification_text
{ns}_component_name, {ns}_component_action: the BuddyPress notification component and action.
{ns}_review_due_query_var: the Review due view&#8217;s query var.
{ns}_daily_hook, {ns}_uses_action_scheduler




Display




{ns}_approval_body_labels, {ns}_review_cycle_labels
{ns}_document_rows: rows shown by the details block.
{ns}_template_content: markup of the single document block template.




Plugin




{ns}_init_plugin: return false to stop the plugin loading.
lh_governance_documents_return_plugin_namespace, {ns}_return_plugin_text_domain, {ns}_plugin_name
{ns}_post_type_list_filters: other plugins&#8217; post type lists this post type adds itself to.




Other plugins&#8217; hooks used




lh_lps_get_lockable_post_types and LH MCP General Abilities&#8217; _return_writable_post_types: the post type adds itself to both.
bp_notifications_get_registered_components, bp_notifications_get_notifications_for_user: the reminder notifications.




Scheduled job and stored state




Action lh_governance_documents_daily, once a day per site, runs the reminder check.
Option {ns}_post_type_schema_version records seeded terms and flushed rewrites; transient {ns}_schedule_checked limits the schedule check to hourly.
Post meta _lh_governance_reminder_state records the last reminder raised for a document.
No custom database tables.

""" ;
  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> .
