icons.php
33 lines
| 1 | <?php |
| 2 | namespace ElementsKit_Lite\Modules\ElementsKit_Icon_Pack; |
| 3 | |
| 4 | defined( 'ABSPATH' ) || exit; |
| 5 | |
| 6 | class Icons { |
| 7 | |
| 8 | public function __construct() { |
| 9 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend' ) ); |
| 10 | |
| 11 | add_filter( 'elementor/icons_manager/additional_tabs', array( $this, 'add_font' ) ); |
| 12 | } |
| 13 | |
| 14 | public function enqueue_frontend() { |
| 15 | wp_enqueue_style( 'elementor-icons-ekiticons', Init::get_url() . 'assets/css/ekiticons.css', array(), \ElementsKit_Lite::version() ); |
| 16 | } |
| 17 | |
| 18 | public function add_font( $font ) { |
| 19 | $font_new['ekiticons'] = array( |
| 20 | 'name' => 'ekiticons', |
| 21 | 'label' => esc_html__( 'ElementsKit Icon Pack', 'elementskit-lite' ), |
| 22 | 'url' => Init::get_url() . 'assets/css/ekiticons.css', |
| 23 | 'prefix' => 'icon-', |
| 24 | 'displayPrefix' => 'icon', |
| 25 | 'labelIcon' => 'icon icon-ekit', |
| 26 | 'ver' => \ElementsKit_Lite::version(), |
| 27 | 'fetchJson' => Init::get_url() . 'assets/js/ekiticons.json', |
| 28 | 'native' => true, |
| 29 | ); |
| 30 | return array_merge( $font, $font_new ); |
| 31 | } |
| 32 | } |
| 33 |