From 414e91b2cb7fda1c7aa97c3ad4a6ec24db98a5c3 Mon Sep 17 00:00:00 2001 From: Matt Batchelder Date: Mon, 23 Feb 2026 06:57:08 -0500 Subject: [PATCH] Refactor code structure for improved readability and maintainability --- pages/solutions.php | 5 +- theme/assets/css/main.css | 210 ++++ theme/blocks/index.php | 2127 ++++++++++++++++++++----------------- 3 files changed, 1383 insertions(+), 959 deletions(-) diff --git a/pages/solutions.php b/pages/solutions.php index 89145b8..17e075d 100644 --- a/pages/solutions.php +++ b/pages/solutions.php @@ -9,7 +9,7 @@ return <<<'ORIBI_SYNC_CONTENT' - + @@ -35,5 +35,4 @@ return <<<'ORIBI_SYNC_CONTENT' - -ORIBI_SYNC_CONTENT; +ORIBI_SYNC_CONTENT; \ No newline at end of file diff --git a/theme/assets/css/main.css b/theme/assets/css/main.css index 99675a6..c37cde1 100644 --- a/theme/assets/css/main.css +++ b/theme/assets/css/main.css @@ -5873,3 +5873,213 @@ p:last-child { margin-bottom: 0; } display: block; filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.18)); } + +/* ═══════════════════════════════════════════════════════════════ + HOSPITALITY SIGN ANIMATION (.platform-visual.has-hospitality) + Rotating display: Breakfast -> Lunch -> Dinner (9s cycle) + ═══════════════════════════════════════════════════════════════ */ + +.platform-visual.has-hospitality { + background: none !important; + border: none !important; + border-radius: 0; + aspect-ratio: unset; + padding: 0; + overflow: visible; + box-shadow: none; + font-size: inherit; +} + +.hosp-stage { + width: 100%; + max-width: 520px; + margin: 0 auto; +} + +.hosp-tv { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; +} + +.hosp-tv__body { + width: 100%; + background: #111; + border: 5px solid #1a1a1a; + border-radius: 8px 8px 4px 4px; + outline: 2px solid #000; + padding: 4px; + position: relative; + box-shadow: + 0 14px 48px rgba(0,0,0,0.6), + inset 0 1px 0 rgba(255,255,255,0.06); +} + +.hosp-tv__screen { + width: 100%; + aspect-ratio: 16/9; + background: #0a0a0a; + border-radius: 2px; + overflow: hidden; + position: relative; +} + +.hosp-tv__feet { + display: flex; + justify-content: space-between; + width: 60%; + max-width: 300px; +} + +.hosp-tv__foot { + width: 12px; + height: 8px; + background: #111; + border: 1px solid #000; + border-radius: 0 0 4px 4px; +} + +/* POS Sync Indicator */ +.hosp-pos { + position: absolute; + top: 12px; + right: 12px; + display: flex; + align-items: center; + gap: 6px; + background: rgba(0,0,0,0.5); + padding: 4px 8px; + border-radius: 40px; + z-index: 10; + border: 1px solid rgba(255,255,255,0.1); + backdrop-filter: blur(4px); +} + +.hosp-pos__dot { + width: 6px; + height: 6px; + background: #4ade80; + border-radius: 50%; + box-shadow: 0 0 8px #4ade80; + animation: hosp-pos-pulse 2s ease-in-out infinite; +} + +.hosp-pos__txt { + font-size: 9px; + color: #fff; + font-weight: 500; + letter-spacing: 0.3px; +} + +/* Menu Slides */ +.hosp-slides { + position: relative; + width: 100%; + height: 100%; +} + +.hosp-slide { + position: absolute; + inset: 0; + opacity: 0; + animation: hosp-slide-fade 9s infinite; + display: flex; + flex-direction: column; +} + +.hosp-slide--breakfast { animation-delay: 0s; } +.hosp-slide--lunch { animation-delay: 3s; } +.hosp-slide--dinner { animation-delay: 6s; } + +.hosp-menu { + padding: 24px 32px; + height: 100%; + display: flex; + flex-direction: column; + background: linear-gradient(135deg, rgba(20,20,25,1) 0%, rgba(30,30,40,1) 100%); + color: #fff; +} + +.hosp-menu__hd { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; +} + +.hosp-menu__badge { + font-size: 10px; + text-transform: uppercase; + letter-spacing: 1px; + background: var(--color-primary); + padding: 2px 8px; + border-radius: 4px; + font-weight: 700; +} + +.hosp-menu__time { + font-size: 11px; + color: rgba(255,255,255,0.5); + font-family: monospace; +} + +.hosp-menu__title { + font-size: 24px; + font-weight: 800; + margin-bottom: 20px; + color: #fff; +} + +.hosp-menu__items { + display: flex; + flex-direction: column; + gap: 16px; +} + +.hosp-menu__item { + display: flex; + justify-content: space-between; + align-items: flex-start; + border-bottom: 1px solid rgba(255,255,255,0.05); + padding-bottom: 8px; +} + +.hosp-menu__name { + font-size: 15px; + font-weight: 600; + color: #fff; + margin-bottom: 2px; +} + +.hosp-menu__desc { + font-size: 12px; + color: rgba(255,255,255,0.4); +} + +.hosp-menu__price { + font-size: 16px; + font-weight: 700; + color: var(--color-primary); +} + +/* Keyframes */ +@keyframes hosp-pos-pulse { + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.4; transform: scale(0.8); } +} + +@keyframes hosp-slide-fade { + 0%, 2% { opacity: 0; transform: translateY(10px); } + 5%, 30% { opacity: 1; transform: translateY(0); } + 33%, 100% { opacity: 0; transform: translateY(-10px); } +} + +@media (max-width: 640px) { + .hosp-menu { padding: 16px 20px; } + .hosp-menu__title { font-size: 18px; margin-bottom: 12px; } + .hosp-menu__item { gap: 12px; } + .hosp-menu__name { font-size: 13px; } + .hosp-menu__desc { display: none; } + .hosp-menu__price { font-size: 14px; } +} diff --git a/theme/blocks/index.php b/theme/blocks/index.php index 216a297..ed32825 100644 --- a/theme/blocks/index.php +++ b/theme/blocks/index.php @@ -20,25 +20,27 @@ * Child blocks are dynamic (save → null, own render_callback). */ -if ( ! defined( 'ABSPATH' ) ) exit; +if (!defined('ABSPATH')) + exit; /* ══════════════════════════════════════════════════════════════════════════════ - SHARED HELPERS - ══════════════════════════════════════════════════════════════════════════════ */ + SHARED HELPERS + ══════════════════════════════════════════════════════════════════════════════ */ /** * Shared image attributes for all card blocks. * Spread into each card's 'attributes' array. */ -function oribi_card_image_attributes() { +function oribi_card_image_attributes() +{ return [ - 'imgId' => [ 'type' => 'number', 'default' => 0 ], - 'imgUrl' => [ 'type' => 'string', 'default' => '' ], - 'imgAlt' => [ 'type' => 'string', 'default' => '' ], - 'imgWidth' => [ 'type' => 'number', 'default' => 80 ], - 'imgHeight' => [ 'type' => 'number', 'default' => 0 ], - 'imgFit' => [ 'type' => 'string', 'default' => 'contain' ], - 'imgPosition' => [ 'type' => 'string', 'default' => 'top' ], + 'imgId' => ['type' => 'number', 'default' => 0], + 'imgUrl' => ['type' => 'string', 'default' => ''], + 'imgAlt' => ['type' => 'string', 'default' => ''], + 'imgWidth' => ['type' => 'number', 'default' => 80], + 'imgHeight' => ['type' => 'number', 'default' => 0], + 'imgFit' => ['type' => 'string', 'default' => 'contain'], + 'imgPosition' => ['type' => 'string', 'default' => 'top'], ]; } @@ -48,22 +50,23 @@ function oribi_card_image_attributes() { * @param array $a Block attributes (must include imgId, imgUrl, etc.) * @return array [ 'html' => string, 'position' => string, 'card_class' => string ] */ -function oribi_card_image_html( $a ) { - $img_id = ! empty( $a['imgId'] ) ? intval( $a['imgId'] ) : 0; - $img_url = ! empty( $a['imgUrl'] ) ? $a['imgUrl'] : ''; - $img_alt = ! empty( $a['imgAlt'] ) ? $a['imgAlt'] : ''; - $img_w = ! empty( $a['imgWidth'] ) ? intval( $a['imgWidth'] ) : 80; - $img_h = ! empty( $a['imgHeight'] ) ? intval( $a['imgHeight'] ) : 0; - $img_fit = ! empty( $a['imgFit'] ) ? $a['imgFit'] : 'contain'; - $img_pos = ! empty( $a['imgPosition'] ) ? $a['imgPosition'] : 'top'; +function oribi_card_image_html($a) +{ + $img_id = !empty($a['imgId']) ? intval($a['imgId']) : 0; + $img_url = !empty($a['imgUrl']) ? $a['imgUrl'] : ''; + $img_alt = !empty($a['imgAlt']) ? $a['imgAlt'] : ''; + $img_w = !empty($a['imgWidth']) ? intval($a['imgWidth']) : 80; + $img_h = !empty($a['imgHeight']) ? intval($a['imgHeight']) : 0; + $img_fit = !empty($a['imgFit']) ? $a['imgFit'] : 'contain'; + $img_pos = !empty($a['imgPosition']) ? $a['imgPosition'] : 'top'; $result = [ - 'html' => '', - 'position' => $img_pos, + 'html' => '', + 'position' => $img_pos, 'card_class' => '', ]; - if ( ! $img_url ) { + if (!$img_url) { return $result; } @@ -71,29 +74,32 @@ function oribi_card_image_html( $a ) { // Build inline style for dimensions $styles = []; - if ( $img_pos !== 'background' ) { - if ( $img_w > 0 ) $styles[] = 'width:' . $img_w . 'px'; + if ($img_pos !== 'background') { + if ($img_w > 0) + $styles[] = 'width:' . $img_w . 'px'; $styles[] = 'max-width:100%'; - if ( $img_h > 0 ) { + if ($img_h > 0) { $styles[] = 'height:' . $img_h . 'px'; - } else { + } + else { $styles[] = 'height:auto'; } } - $style_str = implode( ';', $styles ); + $style_str = implode(';', $styles); - $fit_class = 'oribi-card-img oribi-card-img--' . ( $img_pos === 'background' ? 'cover' : esc_attr( $img_fit ) ); + $fit_class = 'oribi-card-img oribi-card-img--' . ($img_pos === 'background' ? 'cover' : esc_attr($img_fit)); - if ( $img_id ) { - $result['html'] = wp_get_attachment_image( $img_id, 'large', false, [ + if ($img_id) { + $result['html'] = wp_get_attachment_image($img_id, 'large', false, [ 'class' => $fit_class, 'style' => $style_str, - 'alt' => $img_alt, - ] ); - } else { - $result['html'] = '' . esc_attr( $img_alt )
-                        . ''; + 'alt' => $img_alt, + ]); + } + else { + $result['html'] = '' . esc_attr($img_alt)
+            . ''; } // Wrap in container @@ -105,11 +111,12 @@ function oribi_card_image_html( $a ) { /** * Shared icon attributes added to every card block that supports an icon. */ -function oribi_card_icon_attributes() { +function oribi_card_icon_attributes() +{ return [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], ]; } @@ -125,42 +132,47 @@ function oribi_card_icon_attributes() { * @param array|string $icon_or_attrs Block attributes array, or legacy icon string. * @return string Rendered HTML. */ -function oribi_render_icon( $icon_or_attrs ) { +function oribi_render_icon($icon_or_attrs) +{ // Legacy string call - if ( is_string( $icon_or_attrs ) ) { + if (is_string($icon_or_attrs)) { $icon = $icon_or_attrs; - if ( empty( $icon ) ) return ''; - if ( preg_match( '/^fa[srldb]\s+fa-/', $icon ) ) { - return ''; + if (empty($icon)) + return ''; + if (preg_match('/^fa[srldb]\s+fa-/', $icon)) { + return ''; } - return wp_kses_post( $icon ); + return wp_kses_post($icon); } // Array (block attributes) - $a = $icon_or_attrs; - $iconType = ! empty( $a['iconType'] ) ? $a['iconType'] : 'emoji'; + $a = $icon_or_attrs; + $iconType = !empty($a['iconType']) ? $a['iconType'] : 'emoji'; - if ( $iconType === 'fontawesome' ) { - $fa = ! empty( $a['faIcon'] ) ? trim( $a['faIcon'] ) : ''; - if ( empty( $fa ) ) return ''; - return ''; + if ($iconType === 'fontawesome') { + $fa = !empty($a['faIcon']) ? trim($a['faIcon']) : ''; + if (empty($fa)) + return ''; + return ''; } // emoji / text - $icon = ! empty( $a['icon'] ) ? $a['icon'] : ''; - if ( empty( $icon ) ) return ''; - return wp_kses_post( $icon ); + $icon = !empty($a['icon']) ? $a['icon'] : ''; + if (empty($icon)) + return ''; + return wp_kses_post($icon); } /** * Return true when the given block attributes specify a non-empty icon. */ -function oribi_has_icon( $a ) { - $iconType = ! empty( $a['iconType'] ) ? $a['iconType'] : 'emoji'; - if ( $iconType === 'fontawesome' ) { - return ! empty( $a['faIcon'] ); +function oribi_has_icon($a) +{ + $iconType = !empty($a['iconType']) ? $a['iconType'] : 'emoji'; + if ($iconType === 'fontawesome') { + return !empty($a['faIcon']); } - return ! empty( $a['icon'] ); + return !empty($a['icon']); } /** @@ -172,19 +184,22 @@ function oribi_has_icon( $a ) { * @param int $default_cols Default column count if not set in attributes. * @return string Rendered HTML. */ -function oribi_render_card_section( $a, $content, $grid_class = 'grid', $default_cols = 3 ) { - $cls = ( ! empty( $a['variant'] ) && $a['variant'] === 'alt' ) ? 'section section-alt' : 'section'; - $cols = ! empty( $a['columns'] ) ? intval( $a['columns'] ) : $default_cols; +function oribi_render_card_section($a, $content, $grid_class = 'grid', $default_cols = 3) +{ + $cls = (!empty($a['variant']) && $a['variant'] === 'alt') ? 'section section-alt' : 'section'; + $cols = !empty($a['columns']) ? intval($a['columns']) : $default_cols; $grid = $grid_class . '-' . $cols; ob_start(); ?> -
+
- -

-

+ +

+

-
+
@@ -195,502 +210,505 @@ function oribi_render_card_section( $a, $content, $grid_class = 'grid', $default /** * Standard section attributes shared by all card section wrappers. */ -function oribi_card_section_attributes( $default_cols = 3 ) { +function oribi_card_section_attributes($default_cols = 3) +{ return [ - 'variant' => [ 'type' => 'string', 'default' => 'normal' ], - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'lead' => [ 'type' => 'string', 'default' => '' ], - 'columns' => [ 'type' => 'number', 'default' => $default_cols ], + 'variant' => ['type' => 'string', 'default' => 'normal'], + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'lead' => ['type' => 'string', 'default' => ''], + 'columns' => ['type' => 'number', 'default' => $default_cols], ]; } /* ── Block category ────────────────────────────────────────────────────────── */ -add_filter( 'block_categories_all', function ( $cats ) { - array_unshift( $cats, [ 'slug' => 'oribi', 'title' => 'OTS Theme' ] ); +add_filter('block_categories_all', function ($cats) { + array_unshift($cats, ['slug' => 'oribi', 'title' => 'OTS Theme']); return $cats; -} ); +}); /* ── Enqueue editor assets ─────────────────────────────────────────────────── */ -add_action( 'enqueue_block_editor_assets', function () { +add_action('enqueue_block_editor_assets', function () { $dir = get_template_directory(); $uri = get_template_directory_uri(); wp_enqueue_script( 'oribi-blocks', $uri . '/blocks/editor.js', - [ 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n' ], - filemtime( $dir . '/blocks/editor.js' ), + ['wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n'], + filemtime($dir . '/blocks/editor.js'), true ); wp_enqueue_style( 'oribi-blocks-editor', $uri . '/blocks/editor.css', - [ 'wp-edit-blocks' ], - filemtime( $dir . '/blocks/editor.css' ) + ['wp-edit-blocks'], + filemtime($dir . '/blocks/editor.css') ); -} ); +}); /* ── Register all blocks ───────────────────────────────────────────────────── */ -add_action( 'init', function () { +add_action('init', function () { /* Shared supports - exposes color pickers and font-size selector in the - block inspector for every Oribi block. Individual blocks can override - these by merging their own array if needed. */ + block inspector for every Oribi block. Individual blocks can override + these by merging their own array if needed. */ $block_supports = [ - 'color' => [ - 'text' => true, + 'color' => [ + 'text' => true, 'background' => true, - 'link' => true, + 'link' => true, ], 'typography' => [ - 'fontSize' => true, + 'fontSize' => true, 'lineHeight' => true, ], - 'spacing' => [ + 'spacing' => [ 'padding' => true, - 'margin' => true, + 'margin' => true, ], ]; /* ── TEMPLATE-PART HELPER BLOCKS ──────────────────────────────────────── */ - register_block_type( 'oribi/site-header', [ + register_block_type('oribi/site-header', [ 'render_callback' => 'oribi_render_site_header', - ] ); + ]); - register_block_type( 'oribi/site-footer', [ + register_block_type('oribi/site-footer', [ 'render_callback' => 'oribi_render_site_footer', - ] ); + ]); /* ── STANDALONE BLOCKS ─────────────────────────────────────────────────── */ - register_block_type( 'oribi/hero', [ - 'attributes' => [ - 'label' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'highlightWord' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'primaryBtnText' => [ 'type' => 'string', 'default' => 'Get in Touch' ], - 'primaryBtnUrl' => [ 'type' => 'string', 'default' => '/contact' ], - 'secondaryBtnText' => [ 'type' => 'string', 'default' => '' ], - 'secondaryBtnUrl' => [ 'type' => 'string', 'default' => '' ], - 'stat1Value' => [ 'type' => 'string', 'default' => '' ], - 'stat1Label' => [ 'type' => 'string', 'default' => '' ], - 'stat2Value' => [ 'type' => 'string', 'default' => '' ], - 'stat2Label' => [ 'type' => 'string', 'default' => '' ], - 'svcLaptop1' => [ 'type' => 'string', 'default' => 'Data Backup' ], - 'svcLaptop2' => [ 'type' => 'string', 'default' => 'Endpoint Security' ], - 'svcLaptop3' => [ 'type' => 'string', 'default' => 'Patch Management' ], - 'svcCloud1' => [ 'type' => 'string', 'default' => 'Email Protection' ], - 'svcCloud2' => [ 'type' => 'string', 'default' => 'License Management' ], - 'svcCloud3' => [ 'type' => 'string', 'default' => 'Cloud Backup' ], - 'svcDesktop1' => [ 'type' => 'string', 'default' => 'Network Monitoring' ], - 'svcDesktop2' => [ 'type' => 'string', 'default' => 'Threat Detection' ], - 'svcDesktop3' => [ 'type' => 'string', 'default' => 'Cloud Management' ], - 'svcPhone1' => [ 'type' => 'string', 'default' => 'Mobile Security' ], - 'svcPhone2' => [ 'type' => 'string', 'default' => 'Data Encryption' ], + register_block_type('oribi/hero', [ + 'attributes' => [ + 'label' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'highlightWord' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'primaryBtnText' => ['type' => 'string', 'default' => 'Get in Touch'], + 'primaryBtnUrl' => ['type' => 'string', 'default' => '/contact'], + 'secondaryBtnText' => ['type' => 'string', 'default' => ''], + 'secondaryBtnUrl' => ['type' => 'string', 'default' => ''], + 'stat1Value' => ['type' => 'string', 'default' => ''], + 'stat1Label' => ['type' => 'string', 'default' => ''], + 'stat2Value' => ['type' => 'string', 'default' => ''], + 'stat2Label' => ['type' => 'string', 'default' => ''], + 'svcLaptop1' => ['type' => 'string', 'default' => 'Data Backup'], + 'svcLaptop2' => ['type' => 'string', 'default' => 'Endpoint Security'], + 'svcLaptop3' => ['type' => 'string', 'default' => 'Patch Management'], + 'svcCloud1' => ['type' => 'string', 'default' => 'Email Protection'], + 'svcCloud2' => ['type' => 'string', 'default' => 'License Management'], + 'svcCloud3' => ['type' => 'string', 'default' => 'Cloud Backup'], + 'svcDesktop1' => ['type' => 'string', 'default' => 'Network Monitoring'], + 'svcDesktop2' => ['type' => 'string', 'default' => 'Threat Detection'], + 'svcDesktop3' => ['type' => 'string', 'default' => 'Cloud Management'], + 'svcPhone1' => ['type' => 'string', 'default' => 'Mobile Security'], + 'svcPhone2' => ['type' => 'string', 'default' => 'Data Encryption'], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_hero', - ] ); + ]); - register_block_type( 'oribi/page-hero', [ - 'attributes' => [ - 'label' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/page-hero', [ + 'attributes' => [ + 'label' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_page_hero', - ] ); + ]); - register_block_type( 'oribi/cta-banner', [ - 'attributes' => [ - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'text' => [ 'type' => 'string', 'default' => '' ], - 'btnText' => [ 'type' => 'string', 'default' => '' ], - 'btnUrl' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/cta-banner', [ + 'attributes' => [ + 'heading' => ['type' => 'string', 'default' => ''], + 'text' => ['type' => 'string', 'default' => ''], + 'btnText' => ['type' => 'string', 'default' => ''], + 'btnUrl' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_cta_banner', - ] ); + ]); - register_block_type( 'oribi/intro-section', [ - 'attributes' => [ - 'variant' => [ 'type' => 'string', 'default' => 'normal' ], - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'visual' => [ 'type' => 'string', 'default' => '' ], - 'reversed' => [ 'type' => 'boolean', 'default' => false ], - 'imgId' => [ 'type' => 'number', 'default' => 0 ], - 'imgUrl' => [ 'type' => 'string', 'default' => '' ], - 'imgAlt' => [ 'type' => 'string', 'default' => '' ], - 'imgWidth' => [ 'type' => 'number', 'default' => 280 ], + register_block_type('oribi/intro-section', [ + 'attributes' => [ + 'variant' => ['type' => 'string', 'default' => 'normal'], + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'visual' => ['type' => 'string', 'default' => ''], + 'reversed' => ['type' => 'boolean', 'default' => false], + 'imgId' => ['type' => 'number', 'default' => 0], + 'imgUrl' => ['type' => 'string', 'default' => ''], + 'imgAlt' => ['type' => 'string', 'default' => ''], + 'imgWidth' => ['type' => 'number', 'default' => 280], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_intro_section', - ] ); + ]); - register_block_type( 'oribi/contact-section', [ - 'attributes' => [ - 'heading' => [ 'type' => 'string', 'default' => "Let's Talk" ], - 'lead' => [ 'type' => 'string', 'default' => '' ], - 'email' => [ 'type' => 'string', 'default' => 'solutions@oribi-tech.com' ], - 'supportUrl' => [ 'type' => 'string', 'default' => 'https://portal.oribi-tech.com/helpdesk/technical-support-1' ], - 'portalUrl' => [ 'type' => 'string', 'default' => 'https://portal.oribi-tech.com/' ], - 'location' => [ 'type' => 'string', 'default' => 'Saratoga Springs, Upstate New York' ], - 'formHeading' => [ 'type' => 'string', 'default' => 'Want to Learn More?' ], + register_block_type('oribi/contact-section', [ + 'attributes' => [ + 'heading' => ['type' => 'string', 'default' => "Let's Talk"], + 'lead' => ['type' => 'string', 'default' => ''], + 'email' => ['type' => 'string', 'default' => 'solutions@oribi-tech.com'], + 'supportUrl' => ['type' => 'string', 'default' => 'https://portal.oribi-tech.com/helpdesk/technical-support-1'], + 'portalUrl' => ['type' => 'string', 'default' => 'https://portal.oribi-tech.com/'], + 'location' => ['type' => 'string', 'default' => 'Saratoga Springs, Upstate New York'], + 'formHeading' => ['type' => 'string', 'default' => 'Want to Learn More?'], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_contact_section', - ] ); + ]); /* ── PARENT / CHILD PAIRS ──────────────────────────────────────────────── */ /* Feature Section (parent) */ - register_block_type( 'oribi/feature-section', [ - 'attributes' => oribi_card_section_attributes( 3 ), - 'supports' => $block_supports, + register_block_type('oribi/feature-section', [ + 'attributes' => oribi_card_section_attributes(3), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_feature_section', - ] ); + ]); /* Feature Card (child) */ - register_block_type( 'oribi/feature-card', [ - 'attributes' => array_merge( - [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'url' => [ 'type' => 'string', 'default' => '' ], - 'centered' => [ 'type' => 'boolean', 'default' => false ], - ], - oribi_card_image_attributes() - ), - 'supports' => $block_supports, + register_block_type('oribi/feature-card', [ + 'attributes' => array_merge( + [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'url' => ['type' => 'string', 'default' => ''], + 'centered' => ['type' => 'boolean', 'default' => false], + ], + oribi_card_image_attributes() + ), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_feature_card', - ] ); + ]); /* Value Section (parent) */ - register_block_type( 'oribi/value-section', [ - 'attributes' => oribi_card_section_attributes( 3 ), - 'supports' => $block_supports, + register_block_type('oribi/value-section', [ + 'attributes' => oribi_card_section_attributes(3), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_value_section', - ] ); + ]); /* Value Card (child) */ - register_block_type( 'oribi/value-card', [ - 'attributes' => array_merge( - [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - ], - oribi_card_image_attributes() - ), - 'supports' => $block_supports, + register_block_type('oribi/value-card', [ + 'attributes' => array_merge( + [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + ], + oribi_card_image_attributes() + ), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_value_card', - ] ); + ]); /* Addon Section (parent) */ - register_block_type( 'oribi/addon-section', [ - 'attributes' => oribi_card_section_attributes( 3 ), - 'supports' => $block_supports, + register_block_type('oribi/addon-section', [ + 'attributes' => oribi_card_section_attributes(3), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_addon_section', - ] ); + ]); /* Addon Card (child) */ - register_block_type( 'oribi/addon-card', [ - 'attributes' => array_merge( - [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'tag' => [ 'type' => 'string', 'default' => '' ], - ], - oribi_card_image_attributes() - ), - 'supports' => $block_supports, + register_block_type('oribi/addon-card', [ + 'attributes' => array_merge( + [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'tag' => ['type' => 'string', 'default' => ''], + ], + oribi_card_image_attributes() + ), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_addon_card', - ] ); + ]); /* Image Section (parent) */ - register_block_type( 'oribi/image-section', [ - 'attributes' => oribi_card_section_attributes( 3 ), - 'supports' => $block_supports, + register_block_type('oribi/image-section', [ + 'attributes' => oribi_card_section_attributes(3), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_image_section', - ] ); + ]); /* Image Card (child) */ - register_block_type( 'oribi/image-card', [ - 'attributes' => array_merge( - [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'url' => [ 'type' => 'string', 'default' => '' ], - ], - oribi_card_image_attributes() - ), - 'supports' => $block_supports, + register_block_type('oribi/image-card', [ + 'attributes' => array_merge( + [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'url' => ['type' => 'string', 'default' => ''], + ], + oribi_card_image_attributes() + ), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_image_card', - ] ); + ]); /* Stat Section (parent) */ - register_block_type( 'oribi/stat-section', [ - 'attributes' => oribi_card_section_attributes( 3 ), - 'supports' => $block_supports, + register_block_type('oribi/stat-section', [ + 'attributes' => oribi_card_section_attributes(3), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_stat_section', - ] ); + ]); /* Stat Card (child) */ - register_block_type( 'oribi/stat-card', [ - 'attributes' => array_merge( - [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], - 'value' => [ 'type' => 'string', 'default' => '' ], - 'label' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - ], - oribi_card_image_attributes() - ), - 'supports' => $block_supports, + register_block_type('oribi/stat-card', [ + 'attributes' => array_merge( + [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], + 'value' => ['type' => 'string', 'default' => ''], + 'label' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + ], + oribi_card_image_attributes() + ), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_stat_card', - ] ); + ]); /* Link Section (parent) */ - register_block_type( 'oribi/link-section', [ - 'attributes' => oribi_card_section_attributes( 3 ), - 'supports' => $block_supports, + register_block_type('oribi/link-section', [ + 'attributes' => oribi_card_section_attributes(3), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_link_section', - ] ); + ]); /* Link Card (child) */ - register_block_type( 'oribi/link-card', [ - 'attributes' => array_merge( - [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - 'faIcon' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'linkText' => [ 'type' => 'string', 'default' => '' ], - 'linkUrl' => [ 'type' => 'string', 'default' => '' ], - ], - oribi_card_image_attributes() - ), - 'supports' => $block_supports, + register_block_type('oribi/link-card', [ + 'attributes' => array_merge( + [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + 'faIcon' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'linkText' => ['type' => 'string', 'default' => ''], + 'linkUrl' => ['type' => 'string', 'default' => ''], + ], + oribi_card_image_attributes() + ), + 'supports' => $block_supports, 'render_callback' => 'oribi_render_link_card', - ] ); + ]); /* Pricing Section (parent) */ - register_block_type( 'oribi/pricing-section', [ - 'attributes' => [ - 'variant' => [ 'type' => 'string', 'default' => 'normal' ], - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'lead' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/pricing-section', [ + 'attributes' => [ + 'variant' => ['type' => 'string', 'default' => 'normal'], + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'lead' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_pricing_section', - ] ); + ]); /* Pricing Card (child) */ - register_block_type( 'oribi/pricing-card', [ - 'attributes' => [ - 'icon' => [ 'type' => 'string', 'default' => '' ], - 'iconType' => [ 'type' => 'string', 'default' => 'emoji' ], - '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' ], - 'featured' => [ 'type' => 'boolean', 'default' => false ], - 'badge' => [ 'type' => 'string', 'default' => '' ], - 'imgId' => [ 'type' => 'number', 'default' => 0 ], - 'imgUrl' => [ 'type' => 'string', 'default' => '' ], - 'imgAlt' => [ 'type' => 'string', 'default' => '' ], - 'imgWidth' => [ 'type' => 'number', 'default' => 80 ], + register_block_type('oribi/pricing-card', [ + 'attributes' => [ + 'icon' => ['type' => 'string', 'default' => ''], + 'iconType' => ['type' => 'string', 'default' => 'emoji'], + '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'], + 'featured' => ['type' => 'boolean', 'default' => false], + 'badge' => ['type' => 'string', 'default' => ''], + 'imgId' => ['type' => 'number', 'default' => 0], + 'imgUrl' => ['type' => 'string', 'default' => ''], + 'imgAlt' => ['type' => 'string', 'default' => ''], + 'imgWidth' => ['type' => 'number', 'default' => 80], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_pricing_card', - ] ); + ]); /* Platform Section (parent) */ - register_block_type( 'oribi/platform-section', [ - 'attributes' => [ - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'lead' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/platform-section', [ + 'attributes' => [ + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'lead' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_platform_section', - ] ); + ]); /* Platform Row (child) */ - register_block_type( 'oribi/platform-row', [ - 'attributes' => [ - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'btnText' => [ 'type' => 'string', 'default' => 'Learn More' ], - 'btnUrl' => [ 'type' => 'string', 'default' => '' ], - 'visual' => [ 'type' => 'string', 'default' => '' ], - 'reversed' => [ 'type' => 'boolean', 'default' => false ], - 'imgId' => [ 'type' => 'number', 'default' => 0 ], - 'imgUrl' => [ 'type' => 'string', 'default' => '' ], - 'imgAlt' => [ 'type' => 'string', 'default' => '' ], - 'imgWidth' => [ 'type' => 'number', 'default' => 300 ], - 'isDashboard' => [ 'type' => 'boolean', 'default' => false ], - 'deviceAnim' => [ 'type' => 'boolean', 'default' => false ], - 'tvStick' => [ 'type' => 'boolean', 'default' => false ], - 'cameraAnim' => [ 'type' => 'boolean', 'default' => false ], - 'neverGoesDark'=> [ 'type' => 'boolean', 'default' => false ], - 'brandedAnim' => [ 'type' => 'boolean', 'default' => false ], - 'galleryIds' => [ 'type' => 'array', 'default' => [], 'items' => [ 'type' => 'number' ] ], + register_block_type('oribi/platform-row', [ + 'attributes' => [ + 'heading' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'btnText' => ['type' => 'string', 'default' => 'Learn More'], + 'btnUrl' => ['type' => 'string', 'default' => ''], + 'visual' => ['type' => 'string', 'default' => ''], + 'reversed' => ['type' => 'boolean', 'default' => false], + 'imgId' => ['type' => 'number', 'default' => 0], + 'imgUrl' => ['type' => 'string', 'default' => ''], + 'imgAlt' => ['type' => 'string', 'default' => ''], + 'imgWidth' => ['type' => 'number', 'default' => 300], + 'isDashboard' => ['type' => 'boolean', 'default' => false], + 'deviceAnim' => ['type' => 'boolean', 'default' => false], + 'tvStick' => ['type' => 'boolean', 'default' => false], + 'cameraAnim' => ['type' => 'boolean', 'default' => false], + 'neverGoesDark' => ['type' => 'boolean', 'default' => false], + 'brandedAnim' => ['type' => 'boolean', 'default' => false], + 'galleryIds' => ['type' => 'array', 'default' => [], 'items' => ['type' => 'number']], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_platform_row', - ] ); + ]); /* FAQ Section (parent) */ - register_block_type( 'oribi/faq-section', [ - 'attributes' => [ - 'variant' => [ 'type' => 'string', 'default' => 'normal' ], - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'lead' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/faq-section', [ + 'attributes' => [ + 'variant' => ['type' => 'string', 'default' => 'normal'], + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'lead' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_faq_section', - ] ); + ]); /* FAQ Item (child) */ - register_block_type( 'oribi/faq-item', [ - 'attributes' => [ - 'question' => [ 'type' => 'string', 'default' => '' ], - 'answer' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/faq-item', [ + 'attributes' => [ + 'question' => ['type' => 'string', 'default' => ''], + 'answer' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_faq_item', - ] ); + ]); /* Comparison Table */ - register_block_type( 'oribi/comparison-table', [ - 'attributes' => [ - 'variant' => [ 'type' => 'string', 'default' => 'normal' ], - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'lead' => [ 'type' => 'string', 'default' => '' ], - 'columns' => [ 'type' => 'array', 'default' => [] ], - 'rows' => [ 'type' => 'array', 'default' => [] ], + register_block_type('oribi/comparison-table', [ + 'attributes' => [ + 'variant' => ['type' => 'string', 'default' => 'normal'], + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'lead' => ['type' => 'string', 'default' => ''], + 'columns' => ['type' => 'array', 'default' => []], + 'rows' => ['type' => 'array', 'default' => []], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_comparison_table', - ] ); + ]); /* Trust Section (parent) */ - register_block_type( 'oribi/trust-section', [ - 'attributes' => [ - 'label' => [ 'type' => 'string', 'default' => '' ], - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'lead' => [ 'type' => 'string', 'default' => '' ], - 'btnText' => [ 'type' => 'string', 'default' => '' ], - 'btnUrl' => [ 'type' => 'string', 'default' => '' ], - 'btnSub' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/trust-section', [ + 'attributes' => [ + 'label' => ['type' => 'string', 'default' => ''], + 'heading' => ['type' => 'string', 'default' => ''], + 'lead' => ['type' => 'string', 'default' => ''], + 'btnText' => ['type' => 'string', 'default' => ''], + 'btnUrl' => ['type' => 'string', 'default' => ''], + 'btnSub' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_trust_section', - ] ); + ]); /* Trust Item (child) */ - register_block_type( 'oribi/trust-item', [ - 'attributes' => [ - 'heading' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/trust-item', [ + 'attributes' => [ + 'heading' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_trust_item', - ] ); + ]); /* ── ANIMATED HERO BLOCKS (OTS Signs) ─────────────────────────────────── */ /* Animated Hero - full homepage hero with particle background */ - register_block_type( 'oribi/hero-animated', [ - 'attributes' => [ - 'label' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'highlightWord' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], - 'primaryBtnText' => [ 'type' => 'string', 'default' => 'Get Started' ], - 'primaryBtnUrl' => [ 'type' => 'string', 'default' => '/contact' ], - 'secondaryBtnText' => [ 'type' => 'string', 'default' => '' ], - 'secondaryBtnUrl' => [ 'type' => 'string', 'default' => '' ], - 'stat1Value' => [ 'type' => 'string', 'default' => '' ], - 'stat1Label' => [ 'type' => 'string', 'default' => '' ], - 'stat2Value' => [ 'type' => 'string', 'default' => '' ], - 'stat2Label' => [ 'type' => 'string', 'default' => '' ], - 'stat3Value' => [ 'type' => 'string', 'default' => '' ], - 'stat3Label' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/hero-animated', [ + 'attributes' => [ + 'label' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'highlightWord' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], + 'primaryBtnText' => ['type' => 'string', 'default' => 'Get Started'], + 'primaryBtnUrl' => ['type' => 'string', 'default' => '/contact'], + 'secondaryBtnText' => ['type' => 'string', 'default' => ''], + 'secondaryBtnUrl' => ['type' => 'string', 'default' => ''], + 'stat1Value' => ['type' => 'string', 'default' => ''], + 'stat1Label' => ['type' => 'string', 'default' => ''], + 'stat2Value' => ['type' => 'string', 'default' => ''], + 'stat2Label' => ['type' => 'string', 'default' => ''], + 'stat3Value' => ['type' => 'string', 'default' => ''], + 'stat3Label' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_hero_animated', - ] ); + ]); /* Animated Page Hero - inner pages with particle background */ - register_block_type( 'oribi/page-hero-animated', [ - 'attributes' => [ - 'label' => [ 'type' => 'string', 'default' => '' ], - 'title' => [ 'type' => 'string', 'default' => '' ], - 'description' => [ 'type' => 'string', 'default' => '' ], + register_block_type('oribi/page-hero-animated', [ + 'attributes' => [ + 'label' => ['type' => 'string', 'default' => ''], + 'title' => ['type' => 'string', 'default' => ''], + 'description' => ['type' => 'string', 'default' => ''], ], - 'supports' => $block_supports, + 'supports' => $block_supports, 'render_callback' => 'oribi_render_page_hero_animated', - ] ); + ]); -} ); +}); /* ══════════════════════════════════════════════════════════════════════════════ - RENDER CALLBACKS - ══════════════════════════════════════════════════════════════════════════════ */ + RENDER CALLBACKS + ══════════════════════════════════════════════════════════════════════════════ */ /* ── Site Header ───────────────────────────────────────────────────────────── */ -function oribi_render_site_header() { +function oribi_render_site_header() +{ $has_logo = has_custom_logo(); ob_start(); ?> @@ -698,33 +716,37 @@ function oribi_render_site_header() { } /** Fallback menu when no WP menu is assigned. */ -function oribi_fallback_menu() { +function oribi_fallback_menu() +{ echo ''; } /* ── Site Footer ───────────────────────────────────────────────────────────── */ -function oribi_render_site_footer() { - $year = gmdate( 'Y' ); +function oribi_render_site_footer() +{ + $year = gmdate('Y'); ob_start(); ?> - + ' . esc_html( $word ) . '', - wp_kses_post( $text ) + esc_html($word), + '' . esc_html($word) . '', + wp_kses_post($text) ); } /* ── Hero ──────────────────────────────────────────────────────────────────── */ -function oribi_render_hero( $a ) { +function oribi_render_hero($a) +{ ob_start(); - ?> +?>
- -

-

+ +

+

- - - - + + + +
-
-
+
+
@@ -828,9 +854,9 @@ function oribi_render_hero( $a ) {
    -
  • -
  • -
  • +
  • +
  • +
@@ -845,9 +871,9 @@ function oribi_render_hero( $a ) {
    -
  • -
  • -
  • +
  • +
  • +
@@ -868,9 +894,9 @@ function oribi_render_hero( $a ) {
    -
  • -
  • -
  • +
  • +
  • +
@@ -887,8 +913,8 @@ function oribi_render_hero( $a ) {
    -
  • -
  • +
  • +
@@ -900,48 +926,53 @@ function oribi_render_hero( $a ) { } /* ── Page Hero ─────────────────────────────────────────────────────────────── */ -function oribi_render_page_hero( $a ) { +function oribi_render_page_hero($a) +{ ob_start(); ?>
- -

-

+ +

+

-

-

- +

+

+
-
+
> > - -

-

+ +

+

-
>
+
>
@@ -949,21 +980,22 @@ function oribi_render_intro_section( $a ) { } /* ── Contact Section ───────────────────────────────────────────────────────── */ -function oribi_render_contact_section( $a ) { +function oribi_render_contact_section($a) +{ ob_start(); ?>
-

-

-
Email Us
-
Existing Customer Support
-
Client Portal
-
Location
+

+

+
Email Us
+
Existing Customer Support
+
Client Portal
+
Location
-

+

@@ -994,289 +1026,347 @@ function oribi_render_contact_section( $a ) { } /* ── Feature Section (parent - wraps child feature-card blocks) ────────────── */ -function oribi_render_feature_section( $a, $content ) { - return oribi_render_card_section( $a, $content, 'grid', 3 ); +function oribi_render_feature_section($a, $content) +{ + return oribi_render_card_section($a, $content, 'grid', 3); } /* ── Feature Card (child - renders one card) ───────────────────────────────── */ -function oribi_render_feature_card( $a ) { - $tag = ! empty( $a['url'] ) ? 'a' : 'div'; - $href = ! empty( $a['url'] ) ? ' href="' . esc_url( $a['url'] ) . '"' : ''; - $link_cls = ! empty( $a['url'] ) ? ' feature-card-link' : ''; - $center = ! empty( $a['centered'] ); - $img = oribi_card_image_html( $a ); - $img_cls = $img['card_class'] ? ' ' . $img['card_class'] : ''; +function oribi_render_feature_card($a) +{ + $tag = !empty($a['url']) ? 'a' : 'div'; + $href = !empty($a['url']) ? ' href="' . esc_url($a['url']) . '"' : ''; + $link_cls = !empty($a['url']) ? ' feature-card-link' : ''; + $center = !empty($a['centered']); + $img = oribi_card_image_html($a); + $img_cls = $img['card_class'] ? ' ' . $img['card_class'] : ''; ob_start(); - if ( $img['html'] && $img['position'] === 'left' ) : ?> -< class="oribi-card"> + if ($img['html'] && $img['position'] === 'left'): ?> +< class="oribi-card">
-

-

+

+

> - -< class="oribi-card"> + +< class="oribi-card">
-
>
-

-

+
>
+

+

> - -< class="oribi-card"> - + +< class="oribi-card"> + - - -
>
- -

-

+ + +
>
+ +

+

> - -
+ if ($img['html'] && $img['position'] === 'background'): ?> +
-
-

-

+
+

+

- -
+ +
-

-

+

+

- -
- - -
- -

-

+ +
+ + +
+ +

+

- -
+ if ($img['html'] && $img['position'] === 'left'): ?> +
- -

-

+ +

+

- -
+ +
-
- -

-

+
+ +

+

- -
- - -
- - -

-

+ +
+ + +
+ + +

+

- -< class="oribi-card image-card"> + if ($img['html'] && $img['position'] === 'left'): ?> +< class="oribi-card image-card">
-

-

+

+

> - -< class="oribi-card image-card"> + +< class="oribi-card image-card">
-
-

-

+
+

+

> - -< class="oribi-card image-card"> - - -
- + +< class="oribi-card image-card"> + + +
+
-

-

+

+

> - -
+ if ($img['html'] && $img['position'] === 'background'): ?> +
-
-
-
-

+
+
+
+

- -
+ +
-
-
-

+
+
+

- -
- -
-
-
-

+ +
+ +
+
+
+

-' - . esc_html( $a['linkText'] ?? 'Learn More' ) . ''; + if (!empty($a['linkUrl'])) { + $cta = '' + . esc_html($a['linkText'] ?? 'Learn More') . ''; } ob_start(); - if ( $img['html'] && $img['position'] === 'left' ) : ?> -'; - $visual_cls = 'platform-visual has-dashboard'; - } elseif ( $img_url ) { + $visual_cls = 'platform-visual has-dashboard'; + } + elseif ($img_url) { $img_style = 'width:' . $img_w . 'px;max-width:100%;height:auto;border-radius:var(--radius-sm);object-fit:contain;display:block;margin-inline:auto;'; - if ( $img_id ) { - $visual_html = wp_get_attachment_image( $img_id, 'full', false, [ 'style' => $img_style, 'alt' => $img_alt ] ); - } else { - $visual_html = '' . esc_attr( $img_alt ) . ''; + if ($img_id) { + $visual_html = wp_get_attachment_image($img_id, 'full', false, ['style' => $img_style, 'alt' => $img_alt]); + } + else { + $visual_html = '' . esc_attr($img_alt) . ''; } $visual_cls = 'platform-visual has-img'; - } elseif ( ! empty( $a['deviceAnim'] ) ) { + } + elseif (!empty($a['deviceAnim'])) { $da_screen = '
'; - $da = '