From 0420be8bd6f2d3c92f0c28d490173896bf47daaa Mon Sep 17 00:00:00 2001 From: Matt Batchelder Date: Sat, 21 Feb 2026 00:53:13 -0500 Subject: [PATCH] Enhance pricing card functionality by adding price and pricePer attributes for better clarity and user experience --- pages/features.php | 6 +++--- pages/pricing.php | 4 ++-- theme/blocks/editor.js | 13 +++++++++++++ theme/blocks/index.php | 8 ++++++++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/pages/features.php b/pages/features.php index ed9596a..65c94ff 100644 --- a/pages/features.php +++ b/pages/features.php @@ -13,16 +13,16 @@ - + - - + + diff --git a/pages/pricing.php b/pages/pricing.php index 4d6973f..21ec4ca 100644 --- a/pages/pricing.php +++ b/pages/pricing.php @@ -17,8 +17,8 @@ - - + + diff --git a/theme/blocks/editor.js b/theme/blocks/editor.js index caeca38..ec5f6ff 100644 --- a/theme/blocks/editor.js +++ b/theme/blocks/editor.js @@ -1067,6 +1067,8 @@ reg('oribi/pricing-card', { faIcon: { type: 'string', default: '' }, name: { type: 'string', default: '' }, tagline: { type: 'string', default: '' }, + price: { type: 'string', default: '' }, + pricePer: { type: 'string', default: '' }, features: { type: 'array', default: [] }, btnText: { type: 'string', default: 'Get Started' }, btnUrl: { type: 'string', default: '/contact' }, @@ -1122,6 +1124,17 @@ reg('oribi/pricing-card', { onChange: function(v){s({name:v});}, placeholder: 'Plan name...' }), el(RT, { tagName: 'p', className: 'pricing-tagline', value: a.tagline, onChange: function(v){s({tagline:v});}, placeholder: 'Tagline...' }), + a.price || a.pricePer ? el('div', { className: 'pricing-price' }, + el(RT, { tagName: 'div', className: 'pricing-amount', value: a.price || '', + onChange: function(v){s({price:v});}, placeholder: '$0' }), + el(RT, { tagName: 'div', className: 'pricing-per', value: a.pricePer || '', + onChange: function(v){s({pricePer:v});}, placeholder: 'per screen / month' }) + ) : el('div', { className: 'pricing-price' }, + el(RT, { tagName: 'div', className: 'pricing-amount', value: '', + onChange: function(v){s({price:v});}, placeholder: '$0' }), + el(RT, { tagName: 'div', className: 'pricing-per', value: '', + onChange: function(v){s({pricePer:v});}, placeholder: 'per screen / month' }) + ), el('ul', { className: 'pricing-features' }, features.map(function (f, fi) { return el('li', { key: fi, style: { display: 'flex', alignItems: 'center', gap: '4px' } }, diff --git a/theme/blocks/index.php b/theme/blocks/index.php index 26ffcd3..02f20ef 100644 --- a/theme/blocks/index.php +++ b/theme/blocks/index.php @@ -513,6 +513,8 @@ add_action( 'init', function () { 'faIcon' => [ 'type' => 'string', 'default' => '' ], 'name' => [ 'type' => 'string', 'default' => '' ], 'tagline' => [ 'type' => 'string', 'default' => '' ], + 'price' => [ 'type' => 'string', 'default' => '' ], + 'pricePer' => [ 'type' => 'string', 'default' => '' ], 'features' => [ 'type' => 'array', 'default' => [] ], 'btnText' => [ 'type' => 'string', 'default' => 'Get Started' ], 'btnUrl' => [ 'type' => 'string', 'default' => '/contact' ], @@ -1296,6 +1298,12 @@ function oribi_render_pricing_card( $a ) {

+ +
+
+
+
+