feat: Implement signup wizard and provisioning status scripts; enhance AJAX handling for signup initiation

This commit is contained in:
Matt Batchelder
2026-03-22 00:46:34 -04:00
parent 964b984a75
commit c263ff14a2
3 changed files with 59 additions and 8 deletions

View File

@@ -537,6 +537,7 @@ add_action('init', function () {
'btnUrl' => ['type' => 'string', 'default' => '/contact'],
'featured' => ['type' => 'boolean', 'default' => false],
'badge' => ['type' => 'string', 'default' => ''],
'track' => ['type' => 'string', 'default' => ''],
'imgId' => ['type' => 'number', 'default' => 0],
'imgUrl' => ['type' => 'string', 'default' => ''],
'imgAlt' => ['type' => 'string', 'default' => ''],
@@ -1424,6 +1425,7 @@ function oribi_render_pricing_section($a, $content, $block)
function oribi_render_pricing_card($a)
{
$featured = !empty($a['featured']);
$track = !empty($a['track']) ? $a['track'] : '';
$img_id = !empty($a['imgId']) ? intval($a['imgId']) : 0;
$img_url = !empty($a['imgUrl']) ? $a['imgUrl'] : '';
$img_alt = !empty($a['imgAlt']) ? $a['imgAlt'] : '';
@@ -1444,12 +1446,23 @@ function oribi_render_pricing_card($a)
}
}
// Track labels
$track_labels = [
'diy' => 'DIY',
'design' => 'Full Service',
];
$track_label = isset($track_labels[$track]) ? $track_labels[$track] : '';
ob_start(); ?>
<div class="pricing-card<?php echo $featured ? ' featured' : ''; ?>">
<div class="pricing-card<?php echo $featured ? ' featured' : ''; ?>"<?php echo $track ? ' data-track="' . esc_attr($track) . '"' : ''; ?>>
<?php if ($featured && !empty($a['badge'])): ?>
<span class="pricing-badge"><?php echo esc_html($a['badge']); ?></span>
<?php
endif; ?>
<?php if ($track_label): ?>
<span class="pricing-track-badge"><?php echo esc_html($track_label); ?></span>
<?php
endif; ?>
<?php if ($img_html): ?>
<div class="card-image-wrap" style="text-align:center;margin-bottom:1.25rem;"><?php echo $img_html; ?></div>
<?php