Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // Icon Shortcode Using Fontawesome by 3200creative
  2. // to use this shortcode use the following markup [fa-icon id="optional" type="arrow" size="24" color="#ff9900"]
  3.  
  4. function icon_func( $atts ) {
  5. $a = shortcode_atts( array(
  6. 'type' => 'Add Icon Type',
  7. //ID is optional
  8. 'id' => '',
  9. 'size' => 'Add Size',
  10. 'color' => 'Add Color',
  11. ), $atts );
  12.  
  13. return '<span id="'."{$a['id']}".'" style="font-size:'."{$a['size']}".'px; color:'."{$a['color']}".';"class="fa fa-'."{$a['type']}".'"></span>';
  14. }
  15. add_shortcode( 'fa-icon', 'icon_func' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement