Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.217.99
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/themes/astra/assets/js/unminified/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/themes/astra/assets/js/unminified/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);

Youez - 2016 - github.com/yon3zu
LinuXploit