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:
<?php
$shortcodes_config['divider'] = array(
'no_preview' => true,
'options' => array(
'style' => array(
'name' => __('Border Style', 'inbound-pro' ),
'desc' => __('Select the style.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'none' => __('No Border', 'inbound-pro' ),
'dashed' => __('Dashed', 'inbound-pro' ),
'dotted' => __('Dotted', 'inbound-pro' ),
'double' => __('Double', 'inbound-pro' ),
'solid' => __('Solid', 'inbound-pro' )
),
'std' => 'none'
),
'color' => array(
'name' => __('Border Color', 'inbound-pro' ),
'desc' => __('Enter a hex color code.', 'inbound-pro' ),
'type' => 'text',
'std' => '#ebebea'
),
'margin_top' => array(
'name' => __('Top Margin', 'inbound-pro' ),
'desc' => __('Enter the top margin value.', 'inbound-pro' ),
'type' => 'text',
'std' => '0px'
),
'margin_bottom' => array(
'name' => __('Bottom Margin', 'inbound-pro' ),
'desc' => __('Enter the bottom margin value.', 'inbound-pro' ),
'type' => 'text',
'std' => '0px'
)
),
'shortcode' => '[divider style="{{style}}" color="{{color}}" margin_top="{{margin_top}}" margin_bottom="{{margin_bottom}}"]',
'popup_title' => 'Insert Divider Shortcode'
);
$freshbuilder_modules['divider'] = array(
'name' => __('Divider', 'inbound-pro' ),
'size' => 'one_full',
'options' => array(
'style' => array(
'name' => __('Border Style', 'inbound-pro' ),
'desc' => __('Select the style.', 'inbound-pro' ),'type' => 'select',
'options' => array(
'none' => __('No Border', 'inbound-pro' ),
'dashed' => __('Dashed', 'inbound-pro' ),
'dotted' => __('Dotted', 'inbound-pro' ),
'double' => __('Double', 'inbound-pro' ),
'solid' => __('Solid', 'inbound-pro' )
),
'std' => 'none',
'class' => '',
'is_content' => '0'
),
'color' => array(
'name' => __('Border Color', 'inbound-pro' ),
'desc' => __('Enter a hex color code.', 'inbound-pro' ),
'type' => 'text',
'std' => '#ebebea',
'class' => '',
'is_content' => '0'
),
'margin_top' => array(
'name' => __('Margin Top', 'inbound-pro' ),
'desc' => __('Enter the top margin value.', 'inbound-pro' ),
'type' => 'text',
'std' => '0px',
'class' => '',
'is_content' => '0'
),
'margin_bottom' => array(
'name' => __('Margin Bottom', 'inbound-pro' ),
'desc' => __('Enter the bottom margin value.', 'inbound-pro' ),
'type' => 'text',
'std' => '0px',
'class' => '',
'is_content' => '0'
)
)
);
add_shortcode('divider', 'inbound_shortcode_divider');
if (!function_exists('inbound_shortcode_divider')) {
function inbound_shortcode_divider( $atts, $content = null ) {
extract(shortcode_atts(array(
'style' => '',
'margin_top' => '',
'margin_bottom' => '',
'color' => '',
'class' => ''
), $atts));
$margin_top = ($margin_top) ? $margin_top : 0;
$margin_bottom = ($margin_bottom) ? $margin_bottom : 0;
$color = ($color) ? $color : '#eaeaea';
$class = ($class) ? " $class" : '';
return '<div class="divider '. $style . $class .'" style="margin-top:'. $margin_top .';margin-bottom:'. $margin_bottom .';border-color:'. $color .'"></div>';
}
}