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:
<?php
$shortcodes_config['intro'] = array(
'no_preview' => true,
'options' => array(
'title' => array(
'name' => __('Title', 'inbound-pro' ),
'desc' => __('Enter the heading text.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'alignment' => array(
'name' => __('Text Alignment', 'inbound-pro' ),
'desc' => __('Enter text alignment.', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'align-center' => __('Align Center', 'inbound-pro' ),
'align-left' => __('Align Left', 'inbound-pro' ),
'align-right' => __('Align Right', 'inbound-pro' )
),
'std' => 'align-left',
),
'content' => array(
'name' => __('Content', 'inbound-pro' ),
'desc' => __('Enter the content', 'inbound-pro' ),
'type' => 'textarea',
'std' => ''
)
),
'shortcode' => '[intro title="{{title}}" alignment="{{alignment}}"]{{content}}[/intro]',
'popup_title' => 'Insert Intro Shortcode'
);
$freshbuilder_modules['intro'] = array(
'name' => __('Intro', '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
),
'alignment' => array(
'name' => __('Text Alignment', 'inbound-pro' ),
'desc' => __('The text alignment', 'inbound-pro' ),
'type' => 'select',
'options' => array(
'align-center' => __('Align Center', 'inbound-pro' ),
'align-left' => __('Align Left', 'inbound-pro' ),
'align-right' => __('Align Right', 'inbound-pro' )
),
'std' => 'align-left',
'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('intro', 'inbound_shortcode_intro');
function inbound_shortcode_intro( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => '',
'alignment' => ''
), $atts));
$out = '';
$out .= '<div class="intro clearfix '. $alignment .'">';
$out .= '<h1>'. $title .'</h1>';
$out .= '<div class="intro-content">'. do_shortcode($content) .'</div>';
$out .= '</div>';
return $out;
}