diff --git a/tools/av-fix-footer-headings.php b/tools/av-fix-footer-headings.php new file mode 100644 index 0000000..4664e74 --- /dev/null +++ b/tools/av-fix-footer-headings.php @@ -0,0 +1,101 @@ + ['raw' => 'var(--color-brand-gold)'], + 'font-size' => '0.75rem', + 'font-weight' => '600', + 'letter-spacing' => '0.1em', + 'text-transform' => 'uppercase', + 'line-height' => '1.4', + ]; + + foreach (['_bricks_page_content_2', '_bricks_page_footer_2'] as $key) { + $val = $wpdb->get_var($wpdb->prepare( + "SELECT meta_value FROM {$wpdb->postmeta} WHERE post_id=%d AND meta_key=%s LIMIT 1", + 46, $key + )); + if (! is_string($val) || $val === '') continue; + $is_json = ($val[0] === '['); + $elements = $is_json ? json_decode($val, true) : @unserialize($val); + if (! is_array($elements)) continue; + + $changed = 0; + foreach ($elements as $i => $el) { + $id = $el['id'] ?? ''; + + // 1. Footer column sub-titles : eyebrow style + if (in_array($id, ['ftrh2', 'ftrh3', 'ftrh4', 'ftrh5'], true)) { + $elements[$i]['settings']['_typography'] = $eyebrow_typography; + $elements[$i]['settings']['_margin'] = ['top' => '0', 'right' => '0', 'bottom' => '0.5rem', 'left' => '0']; + $changed++; + } + + // 2. Brand heading (ASTERION VR) — smaller so it doesn't dominate + if ($id === 'ftrbrnd') { + $elements[$i]['settings']['_typography'] = [ + 'color' => ['raw' => 'var(--color-text-on-dark)'], + 'font-size' => '1.125rem', + 'font-weight' => '600', + 'letter-spacing' => '0.08em', + 'line-height' => '1.4', + ]; + $elements[$i]['settings']['_margin'] = ['top' => '0', 'right' => '0', 'bottom' => '0.5rem', 'left' => '0']; + $changed++; + } + + // 3. Brand tagline : muted, smaller + if ($id === 'ftrtagln') { + $elements[$i]['settings']['_typography'] = [ + 'color' => ['raw' => 'var(--color-text-tertiary)'], + 'font-size' => '0.875rem', + 'line-height' => '1.55', + ]; + $changed++; + } + + // 4. Columns wrapper : align children to flex-start so column tops match + if ($id === 'ftrcols') { + $elements[$i]['settings']['_alignItems'] = 'flex-start'; + $elements[$i]['settings']['_columnGap'] = '3rem'; + $elements[$i]['settings']['_rowGap'] = '2.5rem'; + $changed++; + } + + // 5. Each column container : tight row gap between heading and content + if (in_array($id, ['ftrcol1', 'ftrcol2', 'ftrcol3', 'ftrcol4', 'ftrcol5'], true)) { + $elements[$i]['settings']['_rowGap'] = '0.5rem'; + $changed++; + } + } + + if ($changed > 0) { + $new = $is_json ? wp_json_encode($elements) : maybe_serialize($elements); + $wpdb->update($wpdb->postmeta, ['meta_value' => $new], + ['post_id' => 46, 'meta_key' => $key], ['%s'], ['%d', '%s']); + wp_cache_delete(46, 'post_meta'); + echo " $key : $changed element(s) patched\n"; + } + } + + echo "\nDONE. Reload any page → footer sub-titles now eyebrow-styled and aligned.\n"; + exit; +});