PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.0-dev4
Elementor Website Builder – more than just a page builder v4.0.0-dev4
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
elementor / core / page-assets / data-managers / font-icon-svg / e-icons.php

e-icons.php in Elementor Website Builder – more than just a page builder 4.0.0-dev4, at core/page-assets/data-managers/font-icon-svg/e-icons.php

47 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Core\Page_Assets\Data_Managers\Font_Icon_Svg;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7
8 /**
9 * E-Icons Svg.
10 *
11 * @since 3.5.0
12 */
13 class E_Icons extends Base {
14 const LIBRARY_CURRENT_VERSION = '5.13.0';
15
16 protected function get_config( $icon ) {
17 return [
18 'key' => $icon['value'],
19 'version' => self::LIBRARY_CURRENT_VERSION,
20 'file_path' => ELEMENTOR_ASSETS_PATH . 'lib/eicons/eicons.json',
21 'data' => [
22 'icon_data' => [
23 'name' => $icon['value'],
24 'library' => $icon['library'],
25 ],
26 ],
27 ];
28 }
29
30 protected function get_asset_content() {
31 $icon_data = $this->get_config_data( 'icon_data' );
32
33 $file_data = json_decode( $this->get_file_data( 'content', $icon_data['library'] ), true );
34
35 $icon_name = str_replace( 'eicon-', '', $icon_data['name'] );
36
37 $svg_data = $file_data[ $icon_name ];
38
39 return [
40 'width' => $svg_data['width'],
41 'height' => $svg_data['height'],
42 'path' => $svg_data['path'],
43 'key' => $this->get_key(),
44 ];
45 }
46 }
47