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: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167:
<?php
$shortcodes_config['callout'] = array(
'no_preview' => true,
'options' => array(
'title' => array(
'name' => __('Title', 'inbound-pro' ),
'desc' => __('Enter the heading text.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'subtitle' => array(
'name' => __('Sub Title', 'inbound-pro' ),
'desc' => __('Enter the sub title.', 'inbound-pro' ),
'type' => 'textarea',
'std' => ''
),
'button_color' => array(
'name' => __('Button Color', 'inbound-pro' ),
'desc' => __('Select the button color.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'default' => 'Default',
'black' => 'Black',
'blue' => 'Blue',
'brown' => 'Brown',
'green' => 'Green',
'orange' => 'Orange',
'pink' => 'Pink',
'purple' => 'Purple',
'red' => 'Red',
'silver' => 'Silver',
'yellow' => 'Yellow',
'white' => 'White'
),
'std' => 'default'
),
'button_label' => array(
'name' => __('Button Text Label', 'inbound-pro' ),
'desc' => __('Enter the button text label.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'button_icon' => array(
'name' => __('Button Icon', 'inbound-pro' ),
'desc' => __('Select an icon.', 'inbound-pro' ),
'type' => 'select',
'options' => $fontawesome,
'std' => 'none'
),
'link' => array(
'name' => __('Link', 'inbound-pro' ),
'desc' => __('Enter the button link destination URL.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
)
),
'shortcode' => '[callout title="{{title}}" subtitle="{{subtitle}}" button_label="{{button_label}}" button_icon="{{button_icon}}" link="{{link}}"]',
'popup_title' => 'Insert Call Out Shortcode'
);
$freshbuilder_modules['callout'] = array(
'name' => __('Call Out', 'inbound-pro' ),
'size' => 'one_full',
'options' => array(
'title' => array(
'name' => __('Title', 'inbound-pro' ),
'desc' => __('Enter the heading text.', 'inbound-pro' ),
'type' => 'text',
'class' => '',
'is_content' => '0'
),
'subtitle' => array(
'name' => __('Sub Title', 'inbound-pro' ),
'desc' => __('Enter the sub title.', 'inbound-pro' ),
'type' => 'textarea',
'class' => '',
'is_content' => '0'
),
'button_color' => array(
'name' => __('Button Color', 'inbound-pro' ),
'desc' => __('Select the button color.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'default' => 'Default',
'black' => 'Black',
'blue' => 'Blue',
'brown' => 'Brown',
'green' => 'Green',
'orange' => 'Orange',
'pink' => 'Pink',
'purple' => 'Purple',
'red' => 'Red',
'silver' => 'Silver',
'yellow' => 'Yellow',
'white' => 'White'
),
'std' => 'default',
'class' => '',
'is_content' => '0'
),
'button_label' => array(
'name' => __('Button Text Label', 'inbound-pro' ),
'desc' => __('Enter the button text label.', 'inbound-pro' ),
'type' => 'text',
'class' => '',
'is_content' => '0'
),
'button_icon' => array(
'name' => __('Button Icon', 'inbound-pro' ),
'desc' => __('Select an icon.', 'inbound-pro' ),
'type' => 'select',
'options' => $fontawesome,
'std' => 'none',
'class' => '',
'is_content' => '0'
),
'link' => array(
'name' => __('Link', 'inbound-pro' ),
'desc' => __('Enter the button link destination URL.', 'inbound-pro' ),
'type' => 'text',
'class' => '',
'is_content' => '0'
)
)
);
add_shortcode('callout', 'inbound_shortcode_callout');
if (!function_exists('inbound_shortcode_callout')) {
function inbound_shortcode_callout( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => '',
'subtitle' => '',
'button_color' => '',
'button_label' => '',
'button_icon' => '',
'link' => ''
), $atts));
$icon = ($button_icon) ? '<i class="icon-'. $button_icon .'"></i> ' : '';
$out = '';
$out .= '<div class="callout clearfix">';
$out .= '<div class="left">';
$out .= '<h2>'. $title .'</h2>';
$out .= '<div class="subtitle">'. $subtitle .'</div>';
$out .= '</div>';
if ($link ) :
$out .= '<div class="right">';
$out .= '<a class="button '. $button_color .'" href="'. $link .'">'. $icon . $button_label .'</a>';
$out .= '</div>';
endif;
$out .= '</div>';
return $out;
}
}