PHP 8.2.31
Preview: fonts.php Size: 1005 B
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/elementor/modules/variables/classes/fonts.php

<?php

namespace Elementor\Modules\Variables\Classes;

use Elementor\Modules\Variables\Services\Variables_Service;
use Elementor\Plugin;
use Elementor\Core\Files\CSS\Post as Post_CSS;
use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Fonts {
	private Variables_Service $service;

	public function __construct( Variables_Service $service ) {
		$this->service = $service;
	}

	public function append_to( Post_CSS $post_css ) {
		if ( ! Plugin::$instance->kits_manager->is_kit( $post_css->get_post_id() ) ) {
			return;
		}

		$list_of_variables = $this->service->get_variables_list();

		foreach ( $list_of_variables as $variable ) {
			if ( Font_Variable_Prop_Type::get_key() !== $variable['type'] ) {
				continue;
			}

			$font_family = sanitize_text_field( $variable['value'] ?? '' );

			if ( empty( $font_family ) ) {
				continue;
			}

			$post_css->add_font( $font_family );
		}

		return $this;
	}
}

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
1.74 KB lrw-r--r-- 2026-03-30 13:49:26
Edit Download
1005 B lrw-r--r-- 2025-12-22 17:25:58
Edit Download
16.76 KB lrw-r--r-- 2026-02-02 14:52:12
Edit Download
2.69 KB lrw-r--r-- 2026-05-20 16:19:28
Edit Download
2.96 KB lrw-r--r-- 2026-02-02 14:52:12
Edit Download
772 B lrw-r--r-- 2025-08-05 18:00:00
Edit Download
560 B lrw-r--r-- 2026-02-02 14:52:12
Edit Download
518 B lrw-r--r-- 2025-12-22 17:25:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).