28 lines
980 B
PHP
28 lines
980 B
PHP
<?php
|
|
/**
|
|
* Hero foundation — extensible, no hardcoded business copy beyond fallbacks.
|
|
*
|
|
* @package XShop
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
$title = $args['title'] ?? esc_html__('Welcome to XShop', 'xshop');
|
|
$text = $args['text'] ?? esc_html__('A fast, RTL-ready store foundation. Customize hero content via front-page.php or a child theme.', 'xshop');
|
|
$ctaLabel = $args['cta_label'] ?? '';
|
|
$ctaUrl = $args['cta_url'] ?? '';
|
|
?>
|
|
<section class="xshop-hero" aria-label="<?php esc_attr_e('Hero', 'xshop'); ?>">
|
|
<h1 class="xshop-hero__title"><?php echo esc_html($title); ?></h1>
|
|
<?php if ($text !== ''): ?>
|
|
<p class="xshop-hero__text"><?php echo esc_html($text); ?></p>
|
|
<?php endif; ?>
|
|
<?php if ($ctaLabel !== '' && $ctaUrl !== ''): ?>
|
|
<div class="xshop-hero__actions">
|
|
<a class="xshop-btn xshop-btn--primary" href="<?php echo esc_url($ctaUrl); ?>"><?php echo esc_html($ctaLabel); ?></a>
|
|
</div>
|
|
<?php endif; ?>
|
|
</section>
|