Refactor theme comments and descriptions to use a consistent hyphen format instead of an em dash. Update color palette values in theme settings and JSON configuration for improved aesthetics. Enhance contact section icons with Font Awesome for better visual representation. Add GitHub Copilot and contributor instructions for improved collaboration and development practices.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* OTS Theme — Custom Gutenberg Blocks (InnerBlocks Architecture)
|
||||
* OTS Theme - Custom Gutenberg Blocks (InnerBlocks Architecture)
|
||||
*
|
||||
* Blocks:
|
||||
* Standalone: hero, page-hero, cta-banner, intro-section, contact-section
|
||||
@@ -118,7 +118,7 @@ function oribi_card_icon_attributes() {
|
||||
*
|
||||
* Accepts either:
|
||||
* - iconType = 'fontawesome' + faIcon = 'fas fa-cloud' → <i class="fas fa-cloud"></i>
|
||||
* - iconType = 'emoji' + icon = '☁️' → ☁️ (escaped)
|
||||
* - iconType = 'emoji' + icon = 'text' -> text (escaped)
|
||||
*
|
||||
* Legacy: if $icon_or_attrs is a plain string it behaves like before.
|
||||
*
|
||||
@@ -233,7 +233,7 @@ add_action( 'enqueue_block_editor_assets', function () {
|
||||
/* ── Register all blocks ───────────────────────────────────────────────────── */
|
||||
add_action( 'init', function () {
|
||||
|
||||
/* Shared supports — exposes color pickers and font-size selector in the
|
||||
/* 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_supports = [
|
||||
@@ -618,7 +618,7 @@ add_action( 'init', function () {
|
||||
|
||||
/* ── ANIMATED HERO BLOCKS (OTS Signs) ─────────────────────────────────── */
|
||||
|
||||
/* Animated Hero — full homepage hero with particle background */
|
||||
/* Animated Hero - full homepage hero with particle background */
|
||||
register_block_type( 'oribi/hero-animated', [
|
||||
'attributes' => [
|
||||
'label' => [ 'type' => 'string', 'default' => '' ],
|
||||
@@ -640,7 +640,7 @@ add_action( 'init', function () {
|
||||
'render_callback' => 'oribi_render_hero_animated',
|
||||
] );
|
||||
|
||||
/* Animated Page Hero — inner pages with particle background */
|
||||
/* Animated Page Hero - inner pages with particle background */
|
||||
register_block_type( 'oribi/page-hero-animated', [
|
||||
'attributes' => [
|
||||
'label' => [ 'type' => 'string', 'default' => '' ],
|
||||
@@ -935,10 +935,10 @@ function oribi_render_contact_section( $a ) {
|
||||
<div class="contact-info">
|
||||
<h2><?php echo wp_kses_post( $a['heading'] ); ?></h2>
|
||||
<p class="lead"><?php echo wp_kses_post( $a['lead'] ); ?></p>
|
||||
<div class="contact-method"><div class="contact-method-icon">📧</div><div><div class="contact-method-label">Email Us</div><div class="contact-method-value"><a href="mailto:<?php echo esc_attr( $a['email'] ); ?>"><?php echo esc_html( $a['email'] ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon">🎫</div><div><div class="contact-method-label">Existing Customer Support</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['supportUrl'] ); ?>" target="_blank" rel="noopener">Open a Support Ticket</a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon">🌎</div><div><div class="contact-method-label">Client Portal</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['portalUrl'] ); ?>" target="_blank" rel="noopener"><?php echo esc_html( wp_parse_url( $a['portalUrl'], PHP_URL_HOST ) ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon">📍</div><div><div class="contact-method-label">Location</div><div class="contact-method-value"><?php echo esc_html( $a['location'] ); ?></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-envelope" aria-hidden="true"></i></div><div><div class="contact-method-label">Email Us</div><div class="contact-method-value"><a href="mailto:<?php echo esc_attr( $a['email'] ); ?>"><?php echo esc_html( $a['email'] ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-headset" aria-hidden="true"></i></div><div><div class="contact-method-label">Existing Customer Support</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['supportUrl'] ); ?>" target="_blank" rel="noopener">Open a Support Ticket</a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-globe" aria-hidden="true"></i></div><div><div class="contact-method-label">Client Portal</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['portalUrl'] ); ?>" target="_blank" rel="noopener"><?php echo esc_html( wp_parse_url( $a['portalUrl'], PHP_URL_HOST ) ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-map-marker-alt" aria-hidden="true"></i></div><div><div class="contact-method-label">Location</div><div class="contact-method-value"><?php echo esc_html( $a['location'] ); ?></div></div></div>
|
||||
</div>
|
||||
<div class="contact-form-wrap">
|
||||
<h3 style="margin-bottom:1.5rem;"><?php echo esc_html( $a['formHeading'] ); ?></h3>
|
||||
@@ -970,12 +970,12 @@ function oribi_render_contact_section( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Feature Section (parent — wraps child feature-card blocks) ────────────── */
|
||||
/* ── Feature Section (parent - wraps child feature-card blocks) ────────────── */
|
||||
function oribi_render_feature_section( $a, $content ) {
|
||||
return oribi_render_card_section( $a, $content, 'grid', 3 );
|
||||
}
|
||||
|
||||
/* ── Feature Card (child — renders one card) ───────────────────────────────── */
|
||||
/* ── 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'] ) . '"' : '';
|
||||
@@ -1241,7 +1241,7 @@ function oribi_render_link_card( $a ) {
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Pricing Section (parent — wraps child pricing-card blocks) ────────────── */
|
||||
/* ── Pricing Section (parent - wraps child pricing-card blocks) ────────────── */
|
||||
function oribi_render_pricing_section( $a, $content, $block ) {
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
$count = count( $block->inner_blocks );
|
||||
@@ -1261,7 +1261,7 @@ function oribi_render_pricing_section( $a, $content, $block ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Pricing Card (child — renders one pricing tier) ───────────────────────── */
|
||||
/* ── Pricing Card (child - renders one pricing tier) ───────────────────────── */
|
||||
function oribi_render_pricing_card( $a ) {
|
||||
$featured = ! empty( $a['featured'] );
|
||||
$img_id = ! empty( $a['imgId'] ) ? intval( $a['imgId'] ) : 0;
|
||||
@@ -1304,7 +1304,7 @@ function oribi_render_pricing_card( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Platform Section (parent — wraps child platform-row blocks) ───────────── */
|
||||
/* ── Platform Section (parent - wraps child platform-row blocks) ───────────── */
|
||||
function oribi_render_platform_section( $a, $content ) {
|
||||
ob_start(); ?>
|
||||
<section class="section">
|
||||
@@ -1320,7 +1320,7 @@ function oribi_render_platform_section( $a, $content ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Platform Row (child — renders one service row) ────────────────────────── */
|
||||
/* ── Platform Row (child - renders one service row) ────────────────────────── */
|
||||
function oribi_render_platform_row( $a ) {
|
||||
$rev = ! empty( $a['reversed'] ) ? ' reverse' : '';
|
||||
$img_id = ! empty( $a['imgId'] ) ? intval( $a['imgId'] ) : 0;
|
||||
@@ -1355,7 +1355,7 @@ function oribi_render_platform_row( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Trust Section (parent — wraps child trust-item blocks) ────────────────── */
|
||||
/* ── Trust Section (parent - wraps child trust-item blocks) ────────────────── */
|
||||
function oribi_render_trust_section( $a, $content ) {
|
||||
ob_start(); ?>
|
||||
<section class="section">
|
||||
@@ -1379,7 +1379,7 @@ function oribi_render_trust_section( $a, $content ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Trust Item (child — renders one heading + description pair) ────────────── */
|
||||
/* ── Trust Item (child - renders one heading + description pair) ────────────── */
|
||||
function oribi_render_trust_item( $a ) {
|
||||
ob_start(); ?>
|
||||
<div class="trust-item">
|
||||
@@ -1389,7 +1389,7 @@ function oribi_render_trust_item( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── FAQ Section (parent — wraps child faq-item blocks) ────────────────────── */
|
||||
/* ── FAQ Section (parent - wraps child faq-item blocks) ────────────────────── */
|
||||
function oribi_render_faq_section( $a, $content ) {
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
ob_start(); ?>
|
||||
@@ -1408,7 +1408,7 @@ function oribi_render_faq_section( $a, $content ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── FAQ Item (child — renders one accordion item) ─────────────────────────── */
|
||||
/* ── FAQ Item (child - renders one accordion item) ─────────────────────────── */
|
||||
function oribi_render_faq_item( $a ) {
|
||||
ob_start(); ?>
|
||||
<details class="faq-item">
|
||||
@@ -1418,7 +1418,7 @@ function oribi_render_faq_item( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Comparison Table (standalone — renders a feature matrix) ──────────────── */
|
||||
/* ── Comparison Table (standalone - renders a feature matrix) ──────────────── */
|
||||
function oribi_render_comparison_table( $a ) {
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
$cols = $a['columns'] ?? [];
|
||||
@@ -1455,7 +1455,7 @@ function oribi_render_comparison_table( $a ) {
|
||||
<?php foreach ( ( $row['values'] ?? [] ) as $val ) : ?>
|
||||
<td class="comparison-cell"><?php
|
||||
if ( $val === true ) echo '<span class="comparison-yes">✓</span>';
|
||||
elseif ( $val === false ) echo '<span class="comparison-no">—</span>';
|
||||
elseif ( $val === false ) echo '<span class="comparison-no">✗</span>';
|
||||
else echo wp_kses_post( $val );
|
||||
?></td>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user