1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59:
<?php
$shortcodes_config['icon'] = array(
'options' => array(
'icon' => array(
'name' => __('Icon', 'inbound-pro' ),
'desc' => __('Select the icon.', 'inbound-pro' ),
'type' => 'select',
'options' => $fontawesome,
'std' => 'none'
),
'size' => array(
'name' => __('Size', 'inbound-pro' ),
'desc' => __('Select the icon size.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'normal' => __('Normal Size', 'inbound-pro' ),
'large' => __('Large Size', 'inbound-pro' ),
'2x' => __('2x Size', 'inbound-pro' ),
'3x' => __('3x Size', 'inbound-pro' ),
'4x' => __('4x Size', 'inbound-pro' )
),
'std' => 'normal'
),
'style' => array(
'name' => __('Style', 'inbound-pro' ),
'desc' => __('Select the icon style.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'normal' => __('Normal', 'inbound-pro' ),
'muted' => __('Muted', 'inbound-pro' ),
'border' => __('Border', 'inbound-pro' ),
'spin' => __('Spin', 'inbound-pro' )
),
'std' => 'normal'
),
),
'shortcode' => '[icon icon="{{icon}}" size="{{size}}" style="{{style}}"]',
'popup_title' => 'Insert Icon Shortcode'
);
add_shortcode('icon', 'inbound_shortcode_icon');
function inbound_shortcode_icon( $atts, $content = null ) {
extract(shortcode_atts(array(
'icon' => '',
'size' => '',
'style' => ''
), $atts));
return '<i class="icon-'. $icon .' icon-'. $size .' icon-'. $style .'"></i>';
}