Advertisement
stom66

CMSMS Plugin FontAwesome

Nov 14th, 2017
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. // A simple function to embed FontAwesome icons on the page
  3. // Simply outputs the appropriate <i> element and assumes you have already cinluded/linked
  4. //
  5. // Drafted by Calguy1000 in IRC
  6. // Place in /assets/plugins/function.fa.php
  7. // Use i param for shorthand
  8. // Use icon param for full/spaces
  9. // Examples:
  10. // {fa i=cube}
  11. // {fa icon="fa-cube fa-lg"}
  12.  
  13. function smarty_function_fa($params, &$smarty) {
  14. $icon = get_parameter_value($params,'i');
  15. $icon = get_parameter_value($params,'icon',"fa-".$icon);
  16. return "<i class=\"fa {$icon}\"></i>";
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement