chore: complete M1.1 runtime QA and release packaging
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Section Heading — reusable for home sections.
|
||||
*
|
||||
* @package XShop
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$title = $args['title'] ?? '';
|
||||
if ($title === '') { return; }
|
||||
$linkLabel = $args['link_label'] ?? '';
|
||||
$linkUrl = $args['link_url'] ?? '';
|
||||
$tag = $args['tag'] ?? 'h2';
|
||||
$allowed = ['h2','h3','div'];
|
||||
if (!in_array($tag, $allowed, true)) { $tag = 'h2'; }
|
||||
?>
|
||||
<div class="xshop-section__header">
|
||||
<<?php echo esc_attr($tag); ?> class="xshop-section__title"><?php echo esc_html($title); ?></<?php echo esc_attr($tag); ?>>
|
||||
<?php if ($linkLabel !== '' && $linkUrl !== ''): ?>
|
||||
<a class="xshop-section__link" href="<?php echo esc_url($linkUrl); ?>"><?php echo esc_html($linkLabel); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user