diff --git a/e107_core/shortcodes/single/glyph.php b/e107_core/shortcodes/single/glyph.php index 9455288c9..1a1cdbef4 100644 --- a/e107_core/shortcodes/single/glyph.php +++ b/e107_core/shortcodes/single/glyph.php @@ -1,7 +1,7 @@ 'regular', 'fab'=>'brands', 'fas'=>'solid']; + + $path = e_WEB.'lib/font-awesome/5/svgs/'; + $path .= $dirs[$cat].'/'; + $path .= str_replace('fa-','',$id).".svg"; + + if($ret = file_get_contents($path)) + { + $class = 'svg-inline--fa '; + $class .= $id; + $class .= ' fa-w-16'; + $class .= !empty($parm['fw']) ? ' fa-fw' : ''; + + return str_replace('var['class']; } + /** @experimental inline svg - subject to removal at any time */ + public function sc_xurl_icons_svg($parm=null) + { + $path = e_WEB.'lib/font-awesome/5/svgs/brands/'; + $path .= $this->var['id'].".svg"; + + if(!file_exists($path)) + { + return null; + } + + if($ret = file_get_contents($path)) + { + return $ret; + } + + } + // ------------------------------------------------ function sc_social_login($parm=null)