HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/backip-old-files/libraries/syw/fonts.php
<?php
/**
 * @copyright	Copyright (C) 2011 Simplify Your Web, Inc. All rights reserved.
 * @license		GNU General Public License version 3 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

class SYWFonts
{
	//protected static $iconfontLoaded = false;
	protected static $googlefontLoaded = array();

	/**
	 * Load the icon font if needed
	 * $debug deprecated
	 */
	static function loadIconFont($syw_font = true, $icomoon_font = false, $debug = false)
	{
// 		if (self::$iconfontLoaded) {
// 			return;
// 		}

		if ($syw_font) {
			$minified = (JDEBUG) ? '' : '-min';
    		//JFactory::getDocument()->addStyleSheet(JURI::base(true).'/media/syw/css/fonts-min.css');
            JHtml::_('stylesheet', 'syw/fonts' . $minified . '.css', array(), true);
		}

		if ($icomoon_font) {
			//JFactory::getDocument()->addStyleSheet(JURI::base(true).'/media/jui/css/icomoon.css');
            JHtml::_('stylesheet', 'jui/icomoon.css', array(), true);
		}

		//self::$iconfontLoaded = true;
	}

	/**
	 * Load the Google font if needed
	 * $font can be "Google Font" or Google+Font
	 *
	 */
	static function loadGoogleFont($font)
	{
		$safefont = str_replace(' ', '+', trim($font, '"')); // replace spaces by + and removes quotes

		if (isset(self::$googlefontLoaded[$safefont]) && self::$googlefontLoaded[$safefont]) {
			return;
		}

		JFactory::getDocument()->addStyleSheet('https://fonts.googleapis.com/css?family='.$safefont);

		self::$googlefontLoaded[$safefont] = true;
	}

}
?>