'title-'.rand(), 'class' => '', 'visibility' => '', 'text' => 'Lorem ipsum dolor sit amet...', 'tag_name' => 'h3', 'sub_text' => '', 'style' => 'normal', 'size' => '100', 'link' => '', 'link_text' => '', 'target' => '', 'margin_top' => '', 'margin_bottom' => '', 'letter_case' => '', 'color' => '', 'width' => '', 'icon' => '', ), $atts ) ); $classes = array('container', 'section-title-container'); if ( $class ) $classes[] = $class; if ( $visibility ) $classes[] = $visibility; $classes = implode(' ', $classes); $link_output = ''; if($link) $link_output = ''.$link_text.get_flatsome_icon('icon-angle-right').''; $small_text = ''; if($sub_text) $small_text = ''.$atts['sub_text'].''; if($icon) $icon = get_flatsome_icon($icon); // fix old if($style == 'bold_center') $style = 'bold-center'; $css_args = array( array( 'attribute' => 'margin-top', 'value' => $margin_top), array( 'attribute' => 'margin-bottom', 'value' => $margin_bottom), ); if($width) { $css_args[] = array( 'attribute' => 'max-width', 'value' => $width); } $css_args_title = array(); if($size !== '100'){ $css_args_title[] = array( 'attribute' => 'font-size', 'value' => $size, 'unit' => '%'); } if($color){ $css_args_title[] = array( 'attribute' => 'color', 'value' => $color); } return '
<'. $tag_name . ' class="section-title section-title-'.$style.'">'.$icon.$text.$small_text.''.$link_output.'
'; } add_shortcode('title', 'title_shortcode'); // [divider] function divider_shortcode( $atts, $content = null ){ extract( shortcode_atts( array( 'width' => '', 'height' => '', 'margin' => '', 'align' => '', 'color' => '', ), $atts ) ); $align_end =''; $align_start = ''; // Fallback if($width == 'full') $width = '100%'; $css_args = array( array( 'attribute' => 'margin-top', 'value' => $margin), array( 'attribute' => 'margin-bottom', 'value' => $margin), array( 'attribute' => 'max-width', 'value' => $width ), array( 'attribute' => 'height', 'value' => $height ), array( 'attribute' => 'background-color', 'value' => $color ), ); if($align === 'center'){ $align_start ='
'; $align_end = '
'; } if($align === 'right'){ $align_start ='
'; $align_end = '
'; } return $align_start.'
'.$align_end; } add_shortcode('divider', 'divider_shortcode');