daily pastebin goal
52%
SHARE
TWEET

CMSMS Plugin FontAwesome

stom66 Nov 14th, 2017 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top