@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-crm/>
  a sioc:Post ;
  dc:title "Enquiry page" ;
  dcterms:identifier 149871 ;
  dc:modified "2026-10-11T03:58:18Z"^^xsd:dateTime ;
  dc:created "2026-10-11T03:58:18Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-crm/enquiry-page/> ;
  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-crm/">LH Customer Relationship Management</a></li></ul>
<p class="wp-block-paragraph">Since 1.6.0 an enquiry&#8217;s page shows the enquirer&#8217;s details (avatar linked to their BuddyPress profile, the date the enquiry was created, a Vcard link and a Text link) with a block, not by adding them to the enquiry&#8217;s content. Before 1.6.0 a <code>the_content</code> filter prepended them, so they also appeared wherever the content was used: REST, feeds, the Markdown version of the page and MCP <code>get-post</code> results. The code is in <code>includes/lh-crm-enquiry-template-class.php</code> (<code>LH_Crm_enquiry_template_class</code>).</p>



<h2 class="wp-block-heading">Enquiry Details block</h2>



<p class="wp-block-paragraph"><code>lh-crm/enquiry-details</code> is a dynamic block in the Theme category that uses the <code>postId</code> and <code>postType</code> context. It renders nothing unless the post is an enquiry and the current user can view enquiries (<code>edit_others_posts</code>). The Vcard link only appears for users with LH Vcard&#8217;s view capability, since its signed URL can be redeemed by anyone holding it for 24 hours; the Text link appears when LH Profile Page holds a phone number for the enquirer. The output is a <code>div.lh_crm-enquiry-details</code>.</p>



<h2 class="wp-block-heading">Single enquiry template</h2>



<p class="wp-block-paragraph">The plugin registers <code>lh-crm//single-lh_crm_enquiry_post</code> with <code>register_block_template()</code> on every site, since any site can take enquiries: the theme&#8217;s header part, Post Title, Enquiry Details, Post Content, comments with the comment form, and the theme&#8217;s footer part, inside a constrained <code>main.lh_crm-enquiry</code> group. A theme&#8217;s own <code>single-lh_crm_enquiry_post</code> template, or a copy edited in the Site Editor, takes precedence over it. It is used by block and hybrid themes; classic themes never render block templates.</p>



<h2 class="wp-block-heading">Classic themes</h2>



<p class="wp-block-paragraph">On a classic theme, <code>LH_Crm_enquiry_post_type_class::add_relevant_info_to_enquiry()</code> still prepends the same details to the content, but only for the queried enquiry, only while the page body is being built (<code>in_body()</code>), only for users who can view enquiries, and only once. It skips any enquiry the block has already rendered for in the request (<code>mark_details_rendered()</code> and <code>is_details_rendered()</code>, the pattern lh-portfolio uses for its entry meta), so a template that contains the block never shows the details twice. Both paths build the details with <code>LH_Crm_enquiry_template_class::return_details_html()</code>. Feeds are not filtered.</p>



<p class="wp-block-paragraph">Marking the enquiry&#8217;s BuddyPress notification as read when staff view it is unchanged: it runs on <code>wp_footer</code>, which fires for block templates too.</p>



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



<figure class="wp-block-table"><table><thead><tr><th>Hook</th><th>Arguments</th><th>Effect</th></tr></thead><tbody><tr><td><code>lh_crm_return_enquiry_details_html</code></td><td><code>$html, $post</code></td><td>The details markup (without its wrapper) for both the block and the classic-theme filter. Return an empty string to show nothing.</td></tr><tr><td><code>lh_crm_return_enquiry_template_content</code></td><td><code>$content</code></td><td>The block markup of the Single enquiry template.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Method names in component classes</h2>



<p class="wp-block-paragraph">Every component class extends <code>LH_Crm_plugin</code>, so a component method with the same name as a main-class method overrides it. PHP 8 treats an override whose signature is incompatible (for example one with more required parameters) as a fatal error when the class is declared, which happens on every request. 1.6.0 shipped the block&#8217;s render callback as <code>render_block( $attributes, $content, $block )</code>, clashing with the contact form block&#8217;s <code>LH_Crm_plugin::render_block( $attributes )</code>, and took every site on the network down until the plugin was deactivated. 1.6.1 renamed the methods to <code>register_details_block()</code> and <code>render_details_block()</code>. Give component methods names of their own. <code>php -l</code> does not catch this, since it checks one file without its parent class.</p>



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



<ul class="wp-block-list"><li>1.5.20 set up the enquiry details, the contact form&#8217;s thank-you message and notification marking before a block template renders, so they worked on block-template pages.</li><li>1.6.0 moved the details into the Enquiry Details block and Single enquiry template, kept the content filter as the classic-theme fallback, removed <code>partials/enquiry-template.php</code> (which replaced the filtered content with the unfiltered post content), removed a stray <code>remove_filter()</code> call in that filter, and made <code>plugin_version()</code> read the Version header.</li><li>1.6.1 fixed the 1.6.0 fatal error described above.</li></ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Customer Relationship Management
Since 1.6.0 an enquiry&#8217;s page shows the enquirer&#8217;s details (avatar linked to their BuddyPress profile, the date the enquiry was created, a Vcard link and a Text link) with a block, not by adding them to the enquiry&#8217;s content. Before 1.6.0 a the_content filter prepended them, so they also appeared wherever the content was used: REST, feeds, the Markdown version of the page and MCP get-post results. The code is in includes/lh-crm-enquiry-template-class.php (LH_Crm_enquiry_template_class).



Enquiry Details block



lh-crm/enquiry-details is a dynamic block in the Theme category that uses the postId and postType context. It renders nothing unless the post is an enquiry and the current user can view enquiries (edit_others_posts). The Vcard link only appears for users with LH Vcard&#8217;s view capability, since its signed URL can be redeemed by anyone holding it for 24 hours; the Text link appears when LH Profile Page holds a phone number for the enquirer. The output is a div.lh_crm-enquiry-details.



Single enquiry template



The plugin registers lh-crm//single-lh_crm_enquiry_post with register_block_template() on every site, since any site can take enquiries: the theme&#8217;s header part, Post Title, Enquiry Details, Post Content, comments with the comment form, and the theme&#8217;s footer part, inside a constrained main.lh_crm-enquiry group. A theme&#8217;s own single-lh_crm_enquiry_post template, or a copy edited in the Site Editor, takes precedence over it. It is used by block and hybrid themes; classic themes never render block templates.



Classic themes



On a classic theme, LH_Crm_enquiry_post_type_class::add_relevant_info_to_enquiry() still prepends the same details to the content, but only for the queried enquiry, only while the page body is being built (in_body()), only for users who can view enquiries, and only once. It skips any enquiry the block has already rendered for in the request (mark_details_rendered() and is_details_rendered(), the pattern lh-portfolio uses for its entry meta), so a template that contains the block never shows the details twice. Both paths build the details with LH_Crm_enquiry_template_class::return_details_html(). Feeds are not filtered.



Marking the enquiry&#8217;s BuddyPress notification as read when staff view it is unchanged: it runs on wp_footer, which fires for block templates too.



Filters



HookArgumentsEffectlh_crm_return_enquiry_details_html$html, $postThe details markup (without its wrapper) for both the block and the classic-theme filter. Return an empty string to show nothing.lh_crm_return_enquiry_template_content$contentThe block markup of the Single enquiry template.



Method names in component classes



Every component class extends LH_Crm_plugin, so a component method with the same name as a main-class method overrides it. PHP 8 treats an override whose signature is incompatible (for example one with more required parameters) as a fatal error when the class is declared, which happens on every request. 1.6.0 shipped the block&#8217;s render callback as render_block( $attributes, $content, $block ), clashing with the contact form block&#8217;s LH_Crm_plugin::render_block( $attributes ), and took every site on the network down until the plugin was deactivated. 1.6.1 renamed the methods to register_details_block() and render_details_block(). Give component methods names of their own. php -l does not catch this, since it checks one file without its parent class.



History



1.5.20 set up the enquiry details, the contact form&#8217;s thank-you message and notification marking before a block template renders, so they worked on block-template pages.1.6.0 moved the details into the Enquiry Details block and Single enquiry template, kept the content filter as the classic-theme fallback, removed partials/enquiry-template.php (which replaced the filtered content with the unfiltered post content), removed a stray remove_filter() call in that filter, and made plugin_version() read the Version header.1.6.1 fixed the 1.6.0 fatal error described above.
""" ;
  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> .
