HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpdeskera/wp-content/plugins/elementor/modules/atomic-widgets/styles/style-fonts.php
<?php

namespace Elementor\Modules\AtomicWidgets\Styles;

use Elementor\Core\Base\Document;
use Elementor\Core\Breakpoints\Breakpoint;
use Elementor\Core\Utils\Collection;
use Elementor\Modules\AtomicWidgets\Memo;
use Elementor\Modules\AtomicWidgets\Cache_Validity;
use Elementor\Plugin;

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

const FONTS_KEY_PREFIX = 'elementor_atomic_styles_fonts-';

class Style_Fonts {
	private string $style_key;

	public function __construct( string $style_key ) {
		$this->style_key = $style_key;
	}

	public static function make( string $style_key ) {
		return new static( $style_key );
	}

	public function add( string $font ) {
		$style_fonts = $this->get_fonts();

		if ( ! in_array( $font, $style_fonts, true ) ) {
			$style_fonts[] = $font;

			$this->update_fonts( $style_fonts );
		}
	}

	public function get(): array {
		return $this->get_fonts();
	}

	public function clear() {
		$this->update_fonts( [] );
	}

	private function get_fonts(): array {
		$style_fonts_key = $this->get_key();
		return get_option( $style_fonts_key, [] );
	}

	private function update_fonts( array $fonts ) {
		$style_fonts_key = $this->get_key();
		update_option( $style_fonts_key, $fonts );
	}

	private function get_key(): string {
		return FONTS_KEY_PREFIX . $this->style_key;
	}
}