Files
Portfolio-2026/views/components/project-meta-row.php
T

29 lines
817 B
PHP

<?php
/**
* Project Meta Row Component
*
* Renders one row of the Repository Details table on the project detail
* page. Expects $label, $value, and $icon (optional decorative SVG) in
* scope.
*
* @package KsPortfolio
*/
namespace KsPortfolio;
if ( ! isset( $label ) || ! isset( $value ) ) {
return;
}
$row_label = (string) $label;
$row_value = (string) $value;
?>
<div class="meta-row">
<span class="meta-row__label">
<?php if ( isset( $icon ) && $icon ) : ?>
<span class="meta-row__icon" aria-hidden="true"><?php echo $icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- icon is hardcoded decorative SVG in callers. ?></span>
<?php endif; ?>
<?php echo esc_html( $row_label ); ?>
</span>
<span class="meta-row__value"><?php echo esc_html( $row_value ); ?></span>
</div>