<?php

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

class socity_New_Font_Add {
    
    public function __construct() {
		add_action( 'elementor/controls/controls_registered', [ $this, 'socity_modify_icons' ], 10, 1 );   
		add_action( 'elementor/editor/after_enqueue_styles', [ $this, 'socity_enqueue_extra_icons' ] );
		add_action( 'elementor/frontend/after_enqueue_styles', [ $this, 'socity_enqueue_extra_icons' ] );    
	}    
    
    public function socity_enqueue_extra_icons(){
        wp_enqueue_style( 'flaticon', get_theme_file_uri('/assets/css/flaticon.css'), array(), '1.0.1' );
    }
    
    public function socity_modify_icons($controls_registry){
        
    $new_add = array(
        "flaticon-map"      => "flaticon-map", 
        "flaticon-mail"     => "flaticon-mail", 
        "flaticon-call-answer" => "flaticon-call-answer", 
        "flaticon-chat"     => "flaticon-chat", 
        "flaticon-left-arrow"   => "flaticon-left-arrow", 
        "flaticon-right-arrow"  => "flaticon-right-arrow", 
        "flaticon-back" => "flaticon-back", 
        "flaticon-next" => "flaticon-next", 
        "flaticon-play-button"      => "flaticon-play-button", 
        "flaticon-play-button-1"    => "flaticon-play-button-1", 
        "flaticon-upload" => "flaticon-upload", 
        "flaticon-back-1" => "flaticon-back-1", 
        "flaticon-responsive"   => "flaticon-responsive", 
        "flaticon-add"          => "flaticon-add", 
        "flaticon-play-button-2"    => "flaticon-play-button-2", 
        "flaticon-android"          => "flaticon-android", 
        "flaticon-fire" => "flaticon-fire", 
        "flaticon-layers" => "flaticon-layers", 
        "flaticon-computer" => "flaticon-computer", 
        "flaticon-chip" => "flaticon-chip", 
        "flaticon-cogwheels" => "flaticon-cogwheels", 
        "flaticon-support" => "flaticon-support", 
        "flaticon-web" => "flaticon-web", 
        "flaticon-headset" => "flaticon-headset", 
        "flaticon-facebook" => "flaticon-facebook", 
        "flaticon-drop-of-liquid" => "flaticon-drop-of-liquid", 
        "flaticon-drop" => "flaticon-drop", 
        "flaticon-placeholder" => "flaticon-placeholder", 
        "flaticon-shield" => "flaticon-shield", 
        "flaticon-fountain-pen" => "flaticon-fountain-pen", 
        "flaticon-fountain-pen-1" => "flaticon-fountain-pen-1", 
        "flaticon-settings" => "flaticon-settings", 
        "flaticon-phone-call" => "flaticon-phone-call", 
        "flaticon-call" => "flaticon-call", 
        "flaticon-settings-1" => "flaticon-settings-1", 
        "flaticon-placeholder-1" => "flaticon-placeholder-1", 
        "flaticon-pen" => "flaticon-pen", 
        "flaticon-analytics" => "flaticon-analytics", 
        "flaticon-monitor" => "flaticon-monitor", 
        "flaticon-email" => "flaticon-email", 
        "flaticon-speech-bubble" => "flaticon-speech-bubble", 
        "flaticon-suitcase" => "flaticon-suitcase", 
        "flaticon-communications" => "flaticon-communications", 
        "flaticon-cash" => "flaticon-cash", 
        "flaticon-twitter" => "flaticon-twitter", 
        "flaticon-twitter-2" => "flaticon-twitter-2", 
        "flaticon-instagram-logo" => "flaticon-instagram-logo", 
        "flaticon-instagram-1" => "flaticon-instagram-1", 
        "flaticon-whatsapp-1" => "flaticon-whatsapp-1", 
        "flaticon-linkedin-2" => "flaticon-linkedin-2", 
        "flaticon-twitter-1" => "flaticon-twitter-1", 
        "flaticon-facebook-3" => "flaticon-facebook-3", 
        "flaticon-whatsapp-2" => "flaticon-whatsapp-2", 
        "flaticon-xiaomi" => "flaticon-xiaomi", 
        "flaticon-odnoklassniki" => "flaticon-odnoklassniki", 
        "flaticon-pinterest" => "flaticon-pinterest", 
        "flaticon-pinterest-1" => "flaticon-pinterest-1", 
        "flaticon-wifi" => "flaticon-wifi", 
        "flaticon-light-bulb" => "flaticon-light-bulb", 
        "flaticon-project-management" => "flaticon-project-management", 
        "flaticon-monitor-1" => "flaticon-monitor-1", 
        "flaticon-camera" => "flaticon-camera", 
        "flaticon-user" => "flaticon-user", 
        "flaticon-advertising" => "flaticon-advertising", 
        "flaticon-select" => "flaticon-select", 
        "flaticon-snowflake" => "flaticon-snowflake", 
        "flaticon-snowflake-1" => "flaticon-snowflake-1", 
        "flaticon-travel-agency" => "flaticon-travel-agency", 
        "flaticon-star" => "flaticon-star", 
        "flaticon-snow-globe" => "flaticon-snow-globe", 
        "flaticon-christmas-tree" => "flaticon-christmas-tree", 
        "flaticon-gift" => "flaticon-gift", 
        "flaticon-mortgage" => "flaticon-mortgage", 
        "flaticon-monitoring" => "flaticon-monitoring", 
        "flaticon-network-1" => "flaticon-network-1", 
        "flaticon-neural" => "flaticon-neural", 
        "flaticon-networking" => "flaticon-networking", 
        "flaticon-cloud-computing" => "flaticon-cloud-computing", 
        "flaticon-cloud-computing-1" => "flaticon-cloud-computing-1", 
        "flaticon-microchip" => "flaticon-microchip", 
        "flaticon-social-care" => "flaticon-social-care", 
        "flaticon-help" => "flaticon-help", 
        "flaticon-begging" => "flaticon-begging", 
        "flaticon-customer-service" => "flaticon-customer-service", 
        "flaticon-support-2" => "flaticon-support-2", 
        "flaticon-support-3" => "flaticon-support-3", 
        "flaticon-customer-service-1" => "flaticon-customer-service-1", 
        "flaticon-customer-support" => "flaticon-customer-support", 
        "flaticon-headphones" => "flaticon-headphones", 
        "flaticon-social-care-1" => "flaticon-social-care-1", 
        "flaticon-care" => "flaticon-care", 
        "flaticon-user-1" => "flaticon-user-1", 
        "flaticon-phone" => "flaticon-phone", 
        "flaticon-search" => "flaticon-search", 
        "flaticon-facebook-4" => "flaticon-facebook-4", 
        "flaticon-pin" => "flaticon-pin", 
        "flaticon-user-2" => "flaticon-user-2", 
        "flaticon-internet" => "flaticon-internet", 
        "flaticon-user-3" => "flaticon-user-3", 
        "flaticon-chat-1" => "flaticon-chat-1", 
        "flaticon-team" => "flaticon-team", 
        "flaticon-connection" => "flaticon-connection", 
        "flaticon-bar-chart" => "flaticon-bar-chart", 
        "flaticon-money" => "flaticon-money", 
        "flaticon-file" => "flaticon-file", 
        "flaticon-linkedin-3" => "flaticon-linkedin-3", 
        "flaticon-pinterest-2" => "flaticon-pinterest-2", 
        "flaticon-google-browser" => "flaticon-google-browser", 
        "flaticon-gmail-1" => "flaticon-gmail-1", 
        "flaticon-gmail-3" => "flaticon-gmail-3", 
        "flaticon-vimeo" => "flaticon-vimeo", 
        "flaticon-vimeo-2" => "flaticon-vimeo-2", 
        "flaticon-skype" => "flaticon-skype", 
        "flaticon-skype-1" => "flaticon-skype-1", 
        "flaticon-skype-2" => "flaticon-skype-2", 
        "flaticon-skype-3" => "flaticon-skype-3", 
        "flaticon-google-plus-logo" => "flaticon-google-plus-logo", 
        "flaticon-like" => "flaticon-like", 
        "flaticon-clock" => "flaticon-clock", 
        "flaticon-loupe" => "flaticon-loupe", 
        "flaticon-money-1" => "flaticon-money-1", 
        "flaticon-hand-shake" => "flaticon-hand-shake", 
        "flaticon-team-1" => "flaticon-team-1", 
        "flaticon-money-2" => "flaticon-money-2", 
        "flaticon-man" => "flaticon-man", 
        "flaticon-value" => "flaticon-value", 
        "flaticon-share" => "flaticon-share", 
        "flaticon-time" => "flaticon-time", 
        "flaticon-school" => "flaticon-school", 
        "flaticon-chart" => "flaticon-chart", 
        "flaticon-data" => "flaticon-data", 
        "flaticon-photo" => "flaticon-photo", 
        "flaticon-internet-1" => "flaticon-internet-1", 
        "flaticon-money-3" => "flaticon-money-3", 
        "flaticon-payment" => "flaticon-payment", 
        "flaticon-pin-1" => "flaticon-pin-1", 
        "flaticon-time-1" => "flaticon-time-1", 
        "flaticon-idea" => "flaticon-idea", 
        "flaticon-download" => "flaticon-download", 
        "flaticon-growth" => "flaticon-growth", 
        "flaticon-multimedia" => "flaticon-multimedia", 
        "flaticon-network-2" => "flaticon-network-2", 
        "flaticon-next-1" => "flaticon-next-1", 
        "flaticon-origami" => "flaticon-origami", 
        "flaticon-share-1" => "flaticon-share-1", 
        "flaticon-clock-1" => "flaticon-clock-1", 
        "flaticon-refresh" => "flaticon-refresh", 
        "flaticon-avatar" => "flaticon-avatar", 
        "flaticon-support-4" => "flaticon-support-4", 
        "flaticon-cursor" => "flaticon-cursor", 
        "flaticon-brain" => "flaticon-brain", 
        "flaticon-laptop" => "flaticon-laptop", 
        "flaticon-arrow" => "flaticon-arrow", 
        "flaticon-mortarboard" => "flaticon-mortarboard", 
        "flaticon-avatar-1" => "flaticon-avatar-1", 
        "flaticon-chat-2" => "flaticon-chat-2", 
        "flaticon-question" => "flaticon-question", 
        "flaticon-test" => "flaticon-test", 
        "flaticon-doctor" => "flaticon-doctor", 
        "flaticon-support-5" => "flaticon-support-5", 
        "flaticon-map-1" => "flaticon-map-1", 
        "flaticon-eye" => "flaticon-eye", 
        "flaticon-money-4" => "flaticon-money-4", 
        "flaticon-world" => "flaticon-world", 
        "flaticon-school-1" => "flaticon-school-1", 
        "flaticon-chat-3" => "flaticon-chat-3", 
        "flaticon-idea-1" => "flaticon-idea-1", 
        "flaticon-support-6" => "flaticon-support-6", 
        "flaticon-diamond" => "flaticon-diamond", 
        "flaticon-time-2" => "flaticon-time-2", 
        "flaticon-bag" => "flaticon-bag", 
        "flaticon-contract" => "flaticon-contract", 
        "flaticon-report" => "flaticon-report", 
        "flaticon-folder" => "flaticon-folder", 
        "flaticon-truck" => "flaticon-truck", 
        "flaticon-document" => "flaticon-document", 
        "flaticon-plane" => "flaticon-plane", 
        "flaticon-time-3" => "flaticon-time-3", 
        "flaticon-trash" => "flaticon-trash", 
        "flaticon-pin-2" => "flaticon-pin-2", 
        "flaticon-think" => "flaticon-think", 
        "flaticon-idea-2" => "flaticon-idea-2", 
        "flaticon-download-1" => "flaticon-download-1", 
        "flaticon-bell" => "flaticon-bell", 
        "flaticon-lock" => "flaticon-lock", 
        "flaticon-upload-1" => "flaticon-upload-1", 
        "flaticon-cinema" => "flaticon-cinema", 
        "flaticon-goal" => "flaticon-goal", 
        "flaticon-work" => "flaticon-work", 
        "flaticon-design" => "flaticon-design", 
        "flaticon-search-1" => "flaticon-search-1", 
        "flaticon-food" => "flaticon-food", 
        "flaticon-alert" => "flaticon-alert", 
        "flaticon-brain-1" => "flaticon-brain-1", 
        "flaticon-book" => "flaticon-book", 
        "flaticon-time-4" => "flaticon-time-4", 
        "flaticon-shield-1" => "flaticon-shield-1", 
        "flaticon-time-5" => "flaticon-time-5", 
        "flaticon-man-1" => "flaticon-man-1", 
        "flaticon-brain-2" => "flaticon-brain-2", 
        "flaticon-water" => "flaticon-water", 
        "flaticon-content" => "flaticon-content", 
        "flaticon-data-1" => "flaticon-data-1", 
        "flaticon-like-1" => "flaticon-like-1", 
        "flaticon-time-6" => "flaticon-time-6", 
        "flaticon-sign" => "flaticon-sign", 
        "flaticon-book-1" => "flaticon-book-1", 
        "flaticon-adjust" => "flaticon-adjust", 
        "flaticon-menu" => "flaticon-menu", 
        "flaticon-calendar" => "flaticon-calendar", 
        "flaticon-eye-1" => "flaticon-eye-1", 
        "flaticon-clock-2" => "flaticon-clock-2", 
        "flaticon-share-2" => "flaticon-share-2", 
        "flaticon-fingerprint" => "flaticon-fingerprint", 
        "flaticon-signal" => "flaticon-signal", 
        "flaticon-lock-1" => "flaticon-lock-1", 
        "flaticon-water-1" => "flaticon-water-1", 
        "flaticon-code" => "flaticon-code", 
        "flaticon-repeat" => "flaticon-repeat", 
        "flaticon-map-2" => "flaticon-map-2", 
        "flaticon-message" => "flaticon-message", 
        "flaticon-network-3" => "flaticon-network-3", 
        "flaticon-more" => "flaticon-more", 
        "flaticon-random" => "flaticon-random", 
        "flaticon-sign-1" => "flaticon-sign-1", 
        "flaticon-mail-1" => "flaticon-mail-1", 
        "flaticon-adjust-1" => "flaticon-adjust-1", 
);


    $icons = $controls_registry->get_control( 'icon' )->get_settings( 'options' );

    $controls_registry->get_control( 'icon' )->set_settings( 'options', array_merge( $icons, $new_add ) );
}
    
}
new socity_New_Font_Add();