<file_sep><?php
/**
 * Author: <EMAIL>
 * Date: 8/24/15
 * Hope this helps you, please at least leave my name in place
 * 
 * Update 2017-05-03
 * by <NAME> 
 * https://github.com/maruisd
 * 
 * Thanks to avenirer, for putting me on this path.
 * 
 * Load it
 * $this->load->helper('fonticons');
 * or 
 * autoload['helper'] = array('fonticons');
 * 
 * use it in view
 * echo fa_icon('','align-left');
 * echo gl_icon('','align-left');
 * 
 * Location: /application/helpers
 * 
 */
defined('BASEPATH') OR exit('No direct script access allowed');

if ( ! function_exists('fa_icon'))
{
   function fa_icon($icon_color='', $icon = '', $attributes = '')
        {
        if(!$icon_color)
            {
            $icon_color ='black';
            }
            return '<span style="color:'.$icon_color.'" class="fa fa-'.$icon.' '.$attributes.' aria-hidden="true">'.'</span>';
        }
}
if ( ! function_exists('gl_icon'))
{
    function gl_icon($icon_color='', $icon = '', $attributes = '')
        {
        if(!$icon_color)
            {
            $icon_color ='black';
            }
            return '<span style="color:'.$icon_color.'" class="glyphicon glyphicon-'.$icon.' '.$attributes.'" aria-hidden="true">'.'</span>';
        }
}
<file_sep># ci-fonticons_helper
A simple codeigniter helper for Font-aweseome and Glyphicons

<p>
//Load it<br>
$this->load->helper('fonticons');<br>
</p>
<p>
//use it<br>
echo fa_icon('color','align-left');<br>
echo gl_icon('color','align-left');
</p>
<p>
//or<br>
echo fa_icon('color','align-left','fa-2x');<br>
If you use Font Awesome, then you can use the fa-2x sizing to change the size of the icon:<br>
echo gl_icon('color','align-left','fa-2x');
</p>
