CodeIgniter Forums
A Simple Font Awesome Helper - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forum-11.html)
+--- Thread: A Simple Font Awesome Helper (/thread-64488.html)



A Simple Font Awesome Helper - BrendanRehman - 02-24-2016

I use this one a good deal... in my project.

https://github.com/IgnitedCoder/codeigniter-fontaweseome-helper

Super simple and easy to use... See Readme.

Enjoy,
Brendan


RE: A Simple Font Awesome Helper - Tecvid - 03-23-2016

i have made it even more simple, n no need to update Smile this will work even after font awesome will add new icons after update

PHP Code:
<?php
/**
 * Author: brendan@ignitedcoder.com
 * Date: 8/24/15
 * Hope this helps you, please at least leave my name in place
 * 
 * Modified by: kenan.recebli@gmail.com
 * Date: 5/3/16
 */
defined('BASEPATH') OR exit('No direct script access allowed');
if ( ! 
function_exists('fa_icon'))
{
    
/**
     * Icon
     *
     * Generates an Font-Awesome icon tag.
     *
     * @param    string icon
     * @param    string attributes
     * @return    string
     */
    
function fa_icon($icon ''$attributes '')
    {
        return 
'<i class="fa fa-'.$icon.' '.$attributes.'">'.'</i>';
    }