'', 'subtitle' => false, 'short_text' => false, 'style' => 'style1', 'align' => 'center', 'animation' => 'none' ), $atts); extract($settings); list($animate_class, $animation_attr) = lvca_get_animation_atts($animation); $output = '
'; if ($style == 'style2' && !empty($subtitle)): $output .= '
' . esc_html($subtitle) . '
'; endif; $output .= '

' . wp_kses_post($heading) . '

'; if ($style != 'style3' && !empty($short_text)): $output .= '

' . wp_kses_post($short_text) . '

'; endif; $output .= '
'; return apply_filters('lvca_heading_output', $output, $content, $settings); } function map_vc_element() { if (function_exists("vc_map")) { //Register "container" content element. It will hold all your inner (child) content elements vc_map(array( "name" => __("Heading", "livemesh-vc-addons"), "base" => "lvca_heading", "content_element" => true, "show_settings_on_create" => true, "category" => __("Livemesh Addons", "livemesh-vc-addons"), 'description' => __('Create heading for a section.', 'livemesh-vc-addons'), "icon" => 'icon-lvca-heading', "params" => array( // add params same as with any other content element array( 'type' => 'textfield', 'param_name' => 'heading', "admin_label" => true, 'heading' => __('Title', 'livemesh-vc-addons'), 'description' => __('Title for the heading.', 'livemesh-vc-addons'), ), array( 'type' => 'textfield', 'param_name' => 'subtitle', 'heading' => __('Subheading or Subtitle', 'livemesh-vc-addons'), 'description' => __('A subtitle displayed above the title heading.', 'livemesh-vc-addons'), 'dependency' => array( 'element' => 'style', 'value' => 'style2', ), ), array( 'type' => 'textarea', 'param_name' => 'short_text', 'heading' => __('Short Text', 'livemesh-vc-addons'), 'description' => __('Short text generally displayed below the heading title.', 'livemesh-vc-addons'), 'dependency' => array( 'element' => 'style', 'value' => array('style1', 'style2'), ), ), array( "type" => "dropdown", "param_name" => "style", "heading" => __("Choose Style", "livemesh-vc-addons"), "description" => __("Choose the particular style of heading you need", "livemesh-vc-addons"), 'value' => array( __('Style 1', 'livemesh-vc-addons') => 'style1', __('Style 2', 'livemesh-vc-addons') => 'style2', __('Style 3', 'livemesh-vc-addons') => 'style3', ), 'std' => 'style1', 'group' => __('Settings', 'livemesh-vc-addons') ), array( "type" => "dropdown", "param_name" => "align", "heading" => __("Align", "livemesh-vc-addons"), "description" => __("Alignment of the heading", "livemesh-vc-addons"), 'value' => array( __('Center', 'livemesh-vc-addons') => 'center', __('Left', 'livemesh-vc-addons') => 'left', __('Right', 'livemesh-vc-addons') => 'right', ), 'std' => 'center', 'group' => __('Settings', 'livemesh-vc-addons') ), array( "type" => "dropdown", "param_name" => "animation", "heading" => __("Choose Animation Type", "livemesh-vc-addons"), 'value' => lvca_get_animation_options(), 'std' => 'none', 'group' => __('Settings', 'livemesh-vc-addons') ), ), )); } } } if (class_exists('WPBakeryShortCode')) { class WPBakeryShortCode_lvca_heading extends WPBakeryShortCode { } } // Initialize Element Class if (class_exists('LVCA_Heading')) { new LVCA_Heading(); }