Lumina Theme Architecture

comments.php

File: inc/comments.php Theme: Shared Comments Engine

Purge empty Comments Template Part from DOM when comments are closed and empty.

Table of Contents

Functions

purge_empty_comments_template_part()  : string
Removes the Comments template part from rendered output if it contains no functional HTML tags.

Functions

purge_empty_comments_template_part()

Removes the Comments template part from rendered output if it contains no functional HTML tags.

purge_empty_comments_template_part(string $block_content, array<string, mixed> $block) : string
Parameters
$block_content : string

The block's rendered HTML.

$block : array<string, mixed>

The block instance data.

Return values
string —

Filtered block markup or empty string when no comment content exists.

On this page

Search results