PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
integrations
<?php /** * Add Adobe Fonts to Elementor * * @package Sydney */ if ( !class_exists( 'Sydney_Elementor_Adobe_Fonts' ) ) : /** * Sydney_MaxMegaMenu */ Class Sydney_Elementor_Adobe_Fonts { /** * Instance */ private static $instance; /** * Font base. */ private static $font_base = 'custom-typekit-fonts'; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self; } return self::$instance; } /** * Constructor */ public function __construct() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) ); add_filter( 'elementor/fonts/groups', array( $this, 'elementor_group' ) ); add_filter( 'elementor/fonts/additional_fonts', array( $this, 'add_elementor_fonts' ) ); } /** * Add Adobe Fonts group to Elementor */ public function elementor_group( $font_groups ) { $new_group[ self::$font_base ] = __( 'Typekit Fonts', 'sydney' ); $font_groups = $new_group + $font_groups; return $font_groups; } /** * Add Adobe Fonts to Elementor */ public function add_elementor_fonts( $fonts ) { $kit_list = get_option( 'sydney_adobe_fonts_kits' ); $custom_fonts = array(); if ( ! empty( $kit_list ) ) { foreach ( $kit_list as $kit_id => $project ) { foreach( $project[ 'families' ] as $family ) { $font_slug = isset( $family['name'] ) ? $family['name'] : ''; $font_css = isset( $family['css_name'][0] ) ? $family['css_name'][0] : $font_slug; $custom_fonts[ $font_css ] = self::$font_base; } } } return array_merge( $fonts, $custom_fonts ); } /** * Enqueue Adobe Fonts */ public function enqueue() { $kits = get_option( 'sydney_adobe_fonts_kits', array() ); foreach ( $kits as $kit_id => $kit_data ) { if ( $kit_data['enable'] == false ) { continue; } wp_enqueue_style( 'sydney-typekit-' . $kit_id, 'https://use.typekit.com/' . $kit_id . '.css', array(), null ); } } } /** * Initialize class */ Sydney_Elementor_Adobe_Fonts::get_instance(); endif;
[+]
..
[+]
elementor
[+]
learndash
[+]
learnpress
[+]
lifter
[+]
wpml
[-] class-sydney-amp.php
[edit]
[-] class-sydney-elementor-adobe-fonts.php
[edit]
[-] class-sydney-maxmegamenu.php
[edit]
[-] mailchimp.php
[edit]
[-] .htaccess.disabled
[edit]