new pricing

This commit is contained in:
Matt Batchelder
2026-05-12 14:48:37 -04:00
parent 6a883b24bf
commit c9f49d9d15
4 changed files with 93 additions and 1 deletions

View File

@@ -591,6 +591,43 @@
save: function () { return null; }
});
/* 5b. CTA INLINE ──────────────────────────────────────────────────────── */
reg('oribi/cta-inline', {
title: 'Oribi CTA Inline',
icon: 'minus',
category: 'oribi',
supports: { align: ['full'], html: false },
attributes: {
align: { type: 'string', default: 'full' },
heading: { type: 'string', default: '' },
text: { type: 'string', default: '' },
btnText: { type: 'string', default: '' },
btnUrl: { type: 'string', default: '' },
},
edit: function (props) {
var a = props.attributes, s = props.setAttributes;
return el(Frag, null,
el(IC, null,
el(PB, { title: 'Button' },
el(TC, { label: 'URL', value: a.btnUrl, onChange: function (v) { s({ btnUrl: v }); } })
)
),
el('section', { className: 'cta-inline' },
el('div', { className: 'container' },
el('div', { className: 'cta-inline__inner' },
el('div', { className: 'cta-inline__body' },
el(RT, { tagName: 'h2', className: 'cta-inline__heading', value: a.heading, onChange: function (v) { s({ heading: v }); }, placeholder: 'CTA heading...' }),
el(RT, { tagName: 'p', className: 'cta-inline__text', value: a.text, onChange: function (v) { s({ text: v }); }, placeholder: 'Supporting text...' })
),
el(RT, { tagName: 'span', className: 'btn btn-primary', value: a.btnText, onChange: function (v) { s({ btnText: v }); }, placeholder: 'Button text...' })
)
)
)
);
},
save: function () { return null; }
});
/* 6. INTRO SECTION ────────────────────────────────────────────────────── */
reg('oribi/intro-section', {
title: 'Oribi Intro Section',

View File

@@ -331,6 +331,17 @@ add_action('init', function () {
'render_callback' => 'oribi_render_cta_banner',
]);
register_block_type('oribi/cta-inline', [
'attributes' => [
'heading' => ['type' => 'string', 'default' => ''],
'text' => ['type' => 'string', 'default' => ''],
'btnText' => ['type' => 'string', 'default' => ''],
'btnUrl' => ['type' => 'string', 'default' => ''],
],
'supports' => $block_supports,
'render_callback' => 'oribi_render_cta_inline',
]);
register_block_type('oribi/intro-section', [
'attributes' => [
'variant' => ['type' => 'string', 'default' => 'normal'],
@@ -1004,6 +1015,26 @@ function oribi_render_cta_banner($a)
<?php return ob_get_clean();
}
/* ── CTA Inline ────────────────────────────────────────────────────────────── */
function oribi_render_cta_inline($a)
{
ob_start(); ?>
<section class="cta-inline">
<div class="container">
<div class="cta-inline__inner">
<div class="cta-inline__body">
<h2 class="cta-inline__heading"><?php echo wp_kses_post($a['heading']); ?></h2>
<?php if (!empty($a['text'])): ?>
<p class="cta-inline__text"><?php echo wp_kses_post($a['text']); ?></p>
<?php endif; ?>
</div>
<a href="<?php echo esc_url($a['btnUrl']); ?>" class="btn btn-primary"><?php echo esc_html($a['btnText']); ?></a>
</div>
</div>
</section>
<?php return ob_get_clean();
}
/* ── Intro Section ─────────────────────────────────────────────────────────── */
function oribi_render_intro_section($a)
{