Welcome Guest, Not a member yet? Register   Sign In
A Simple Font Awesome Helper
#1

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

https://github.com/IgnitedCoder/codeigni...ome-helper

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

Enjoy,
Brendan
Reply
#2

(This post was last modified: 03-23-2016, 12:32 AM by Tecvid.)

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: [email protected]
 * Date: 8/24/15
 * Hope this helps you, please at least leave my name in place
 * 
 * Modified by: [email protected]
 * 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>';
    }

Reply




Theme © iAndrew 2016 - Forum software by © MyBB