diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index aee3a9b08..02d564dc3 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -3233,19 +3233,18 @@ class e_parser * Parse xxxxx.glyph file to bootstrap glyph format. * @param string $text * @param array of $parms + * @example $tp->toGlyph('fa-spinner', 'spin=1'); + * @example $tp->toGlyph('fa-spinner', array('spin'=>1)); + * @example $tp->toGlyph('fa-shield', array('rotate'=>90, 'size'=>'2x')); */ public function toGlyph($text, $space=" ") { - - if(!deftrue('BOOTSTRAP') || empty($text)) { return false; } - - - + if(is_array($space)) { $parm = $space; @@ -3281,8 +3280,10 @@ class e_parser $removePrefix = array('glyphicon-','icon-','fa-'); $id = str_replace($removePrefix, "", $cls); - - + + $spin = null; + $rotate = null; + // return print_r($fa4,true); if(deftrue('FONTAWESOME') && in_array($id ,$fa4)) // Contains FontAwesome 3 set also. @@ -3290,6 +3291,8 @@ class e_parser $prefix = 'fa fa-'; $size = (vartrue($parm['size'])) ? ' fa-'.$parm['size'] : ''; $tag = 'i'; + $spin = !empty($parm['spin']) ? ' fa-spin' : ''; + $rotate = !empty($parm['rotate']) ? ' fa-rotate-'.intval($parm['rotate']) : ''; } elseif(deftrue("BOOTSTRAP")) { @@ -3308,7 +3311,7 @@ class e_parser } - $text = "<".$tag." class='".$prefix.$id.$size."'>" ; + $text = "<".$tag." class='".$prefix.$id.$size.$spin.$rotate."'>" ; $text .= ($space !== false) ? $space : ""; return $text; diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php index 46fc290e2..74425c2b5 100644 --- a/e107_handlers/media_class.php +++ b/e107_handlers/media_class.php @@ -904,7 +904,7 @@ class e_media if($type == 'fa4') { $pattern = '/\.(fa-(?:\w+(?:-)?)+):before/'; - $subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css'); + $subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.css'); // print_a($subject); } elseif($type == 'fa3')