chore: complete M1.1 runtime QA and release packaging
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Promotional banner foundation — rendered via banner CPT later; static variant for M1.
|
||||
*
|
||||
* @package XShop
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$title = $args['title'] ?? '';
|
||||
$text = $args['text'] ?? '';
|
||||
$ctaLabel = $args['cta_label'] ?? '';
|
||||
$ctaUrl = $args['cta_url'] ?? '';
|
||||
if ($title === '' && $text === '') { return; }
|
||||
?>
|
||||
<section class="xshop-promo" aria-label="<?php esc_attr_e('Promotion', 'xshop'); ?>">
|
||||
<div>
|
||||
<?php if ($title !== ''): ?><h2 class="xshop-section__title" style="font-size:var(--xshop-text-xl);margin:0 0 var(--xshop-space-1)"><?php echo esc_html($title); ?></h2><?php endif; ?>
|
||||
<?php if ($text !== ''): ?><p style="margin:0;color:var(--xshop-muted)"><?php echo esc_html($text); ?></p><?php endif; ?>
|
||||
</div>
|
||||
<?php if ($ctaLabel !== '' && $ctaUrl !== ''): ?>
|
||||
<a class="xshop-btn xshop-btn--primary" href="<?php echo esc_url($ctaUrl); ?>"><?php echo esc_html($ctaLabel); ?></a>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
Reference in New Issue
Block a user