HEX
Server: LiteSpeed
System: Linux s1083.usc1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: keeloilc (1034)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/keeloilc/totalcomfort.pk/wp-content/themes/barberry/functions/custom-fonts.php
<?php

require_once BARBERRY_THEME_PATH . '/inc/fonts/class-tdl-add-custom-fonts.php';

/**
 * Create Instance
 */
function barberry_add_custom_fonts() {
	return Barberry_Add_Custom_Fonts::instance();
}
barberry_add_custom_fonts();

/**
 * Add custom fonts choice
 */
function barberry_add_custom_choice() {
	return array(
		'fonts' => apply_filters( 'barberry/kirki_font_choices', array() ),
	);
}


/**
 * Force Load all fonts variations (Kirki)
 */
add_action( 'after_setup_theme', 'barberry_font_add_all_variants', 100 );
function barberry_font_add_all_variants() {

	$force_load_all_fonts_variations = get_theme_mod( 'force_load_all_fonts_variations', false );

	if ( class_exists( 'Kirki_Fonts_Google' ) && $force_load_all_fonts_variations ) {
		Kirki_Fonts_Google::$force_load_all_variants = true;
	}

}