• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
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>';
    }

Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.