Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Icon Shortcode Using Fontawesome by 3200creative
- // to use this shortcode use the following markup [fa-icon id="optional" type="arrow" size="24" color="#ff9900"]
- function icon_func( $atts ) {
- $a = shortcode_atts( array(
- 'type' => 'Add Icon Type',
- //ID is optional
- 'id' => '',
- 'size' => 'Add Size',
- 'color' => 'Add Color',
- ), $atts );
- return '<span id="'."{$a['id']}".'" style="font-size:'."{$a['size']}".'px; color:'."{$a['color']}".';"class="fa fa-'."{$a['type']}".'"></span>';
- }
- add_shortcode( 'fa-icon', 'icon_func' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement