Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // A simple function to embed FontAwesome icons on the page
- // Simply outputs the appropriate <i> element and assumes you have already cinluded/linked
- //
- // Drafted by Calguy1000 in IRC
- // Place in /assets/plugins/function.fa.php
- // Use i param for shorthand
- // Use icon param for full/spaces
- // Examples:
- // {fa i=cube}
- // {fa icon="fa-cube fa-lg"}
- function smarty_function_fa($params, &$smarty) {
- $icon = get_parameter_value($params,'i');
- $icon = get_parameter_value($params,'icon',"fa-".$icon);
- return "<i class=\"fa {$icon}\"></i>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement