Current Path : /storage/v11800/affypharma/public_html/wp-content/plugins/elementor/core/page-assets/data-managers/font-icon-svg/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/affypharma/public_html/wp-content/plugins/elementor/core/page-assets/data-managers/font-icon-svg/manager.php |
<?php
namespace Elementor\Core\Page_Assets\Data_Managers\Font_Icon_Svg;
use Elementor\Core\Base\Base_Object;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Elementor Font Icon Svg Manager.
*
* @since 3.4.0
*/
class Manager extends Base_Object {
private static $data = [];
private static function get_data() {
if ( ! self::$data ) {
self::$data = [
'font-awesome' => [
'regex' => '/^fa-/',
'manager' => new Font_Awesome(),
],
'eicons' => [
'regex' => '/^eicons$/',
'manager' => new E_Icons(),
],
];
}
return self::$data;
}
public static function get_font_icon_svg_data( $icon ) {
$data = self::get_data();
$font_family = $icon['font_family'];
$font_family_manager = $data[ $font_family ]['manager'];
return $font_family_manager->get_asset_data( $icon );
}
public static function get_font_family( $icon_library ) {
foreach ( self::get_data() as $family => $data ) {
if ( preg_match( $data['regex'], $icon_library ) ) {
return $family;
}
}
return '';
}
}