mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Support for HTML/CSS sprites in toIcon() method.
This commit is contained in:
@@ -3062,6 +3062,9 @@ class e_parser
|
|||||||
*/
|
*/
|
||||||
public function toGlyph($text, $space=" ")
|
public function toGlyph($text, $space=" ")
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!deftrue('BOOTSTRAP') || empty($text))
|
if(!deftrue('BOOTSTRAP') || empty($text))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -3223,6 +3226,11 @@ class e_parser
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(substr($icon,0,3) == '<i ') // if it's html (ie. css sprite) return the code.
|
||||||
|
{
|
||||||
|
return $icon;
|
||||||
|
}
|
||||||
|
|
||||||
$ext = pathinfo($icon, PATHINFO_EXTENSION);
|
$ext = pathinfo($icon, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
if(!$ext || $ext == 'glyph') // Bootstrap or Font-Awesome.
|
if(!$ext || $ext == 'glyph') // Bootstrap or Font-Awesome.
|
||||||
|
Reference in New Issue
Block a user