-
@@ -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(); ?>