| 1 |
<?php |
| 2 |
namespace Elementor\Core\Page_Assets\Data_Managers; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly. |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Elementor Font Icon Svg. |
| 10 |
* |
| 11 |
* @since 3.4.0 |
| 12 |
*/ |
| 13 |
class Font_Icon_Svg extends Base { |
| 14 |
protected $content_type = 'svg'; |
| 15 |
|
| 16 |
protected $assets_category = 'font-icon'; |
| 17 |
|
| 18 |
protected function get_asset_content() { |
| 19 |
$icon_data = $this->get_config_data( 'icon_data' ); |
| 20 |
|
| 21 |
$file_data = json_decode( $this->get_file_data( 'content', $icon_data['library'] ), true ); |
| 22 |
|
| 23 |
$icon_name = $icon_data['name']; |
| 24 |
|
| 25 |
$svg_data = $file_data['icons'][ $icon_name ]; |
| 26 |
|
| 27 |
return [ |
| 28 |
'width' => $svg_data[0], |
| 29 |
'height' => $svg_data[1], |
| 30 |
'path' => $svg_data[4], |
| 31 |
'key' => $this->get_key(), |
| 32 |
]; |
| 33 |
} |
| 34 |
} |
| 35 |
|