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:
<?php
$shortcodes_config['content_box'] = array(
'no_preview' => true,
'options' => array(
'color' => array(
'name' => __('Box Color', 'inbound-pro' ),
'desc' => __('Select the color.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'default' => __('Default', 'inbound-pro' ),
'blue' => __('Blue', 'inbound-pro' ),
'green' => __('Green', 'inbound-pro' ),
'red' => __('Red', 'inbound-pro' ),
'yellow' => __('Yellow', 'inbound-pro' )
),
'std' => ''
),
'content' => array(
'name' => __('Content', 'inbound-pro' ),
'desc' => __('Enter the content.', 'inbound-pro' ),
'type' => 'textarea',
'std' => ''
)
),
'shortcode' => '[content_box color="{{color}}"]{{content}}[/content_box]',
'popup_title' => 'Insert Content Box Shortcode'
);
$freshbuilder_modules['content_box'] = array(
'name' => __('Content Box', 'inbound-pro' ),
'size' => 'one_third',
'options' => array(
'color' => array(
'name' => __('Box Color', 'inbound-pro' ),
'desc' => __('Select the color.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'default' => __('Default', 'inbound-pro' ),
'blue' => __('Blue', 'inbound-pro' ),
'green' => __('Green', 'inbound-pro' ),
'red' => __('Red', 'inbound-pro' ),
'yellow' => __('Yellow', 'inbound-pro' )
),
'std' => '',
'class' => '',
'is_content' => 0
),
'content' => array(
'name' => __('Content', 'inbound-pro' ),
'desc' => __('Enter the content', 'inbound-pro' ),
'type' => 'textarea',
'std' => '',
'class' => '',
'is_content' => 1
)
)
);
add_shortcode('content_box', 'inbound_shortcode_content_box');
if (!function_exists('inbound_shortcode_content_box')) {
function inbound_shortcode_content_box( $atts, $content = null ) {
extract(shortcode_atts(array(
'color' => 'default'
), $atts));
return '<div class="content-box '.$color.'">'.do_shortcode($content).'</div>';
}
}