} $caption_data = implode(' ', $caption_data); // Caption classes $caption_classes = array('wpex-slider-caption', 'sp-layer', 'sp-padding', 'clr'); if ($caption_visibility) { $caption_classes[] = $caption_visibility; } if ($caption_style) { $caption_classes[] = 'sp-' . $caption_style; } if ('true' == $caption_rounded) { $caption_classes[] = 'sp-rounded'; } $caption_classes = implode(' ', $caption_classes); // Caption style $caption_inline_style = vcex_inline_style(array('font_size' => $caption_font_size, 'padding' => $caption_padding)); } // Main Classes $wrap_classes = array('wpex-slider', 'slider-pro', 'vcex-image-slider', 'clr'); if ($classes) { $wrap_classes[] = $this->getExtraClass($classes); } if ($visibility) { $wrap_classes[] = $visibility; } if ('lightbox' == $thumbnail_link) { $wrap_classes[] = 'lightbox-group'; if ($lightbox_skin) { $wrap_data[] = 'data-skin="' . $lightbox_skin . '"'; vcex_enque_style('ilightbox', $lightbox_skin); }
$wrap_classes[] = 'wpex-hover-white-text'; } // Inline js if ($color_hover || $background_hover) { vcex_inline_js('data_hover'); } // Inner style $inner_style_attr = vcex_inline_style(array('border_color' => $inner_bottom_border_color)); // Icon output if ($icon = vcex_get_icon_class($atts, 'icon')) { // Enqueue needed icon font if ('fontawesome' != $icon_type) { vcex_enqueue_icon_font($icon_type); } // Icon style $icon_style_attr = vcex_inline_style(array('color' => $icon_color)); // Icon output $icon_output = '<div class="vcex-icon-wrap vcex-icon-position-' . $icon_position . '"' . $icon_style_attr . '><span class="' . $icon . '"></span></div>'; // Add icon to heading if ('left' == $icon_position) { $icon_left = $icon_output; } else { $icon_right = $icon_output; } } // Implode data $wrap_classes = implode(' ', $wrap_classes); $link_html = implode(' ', $link_html); $wrap_data = implode(' ', $wrap_data); // Generate heading $output = '<' . $tag . ' class="' . $wrap_classes . '"' . $link_html . $heading_style_attr . $wrap_data . '>';
<?php extract(shortcode_atts(array('title' => '', 'element_type' => 'div', 'title_align' => 'separator_align_center', 'el_class' => '', 'el_width' => '', 'font_size' => '', 'font_weight' => '', 'style' => 'one', 'margin_bottom' => '', 'span_background' => '', 'span_color' => '', 'border_color' => '', 'align' => 'align_center', 'el_width' => '', 'border_width' => '', 'color' => '', 'accent_color' => '', 'layout' => 'separator_with_text'), $atts)); /*-----------------------------------------------------------------------------------*/ /* - Modified Separator With Text /*-----------------------------------------------------------------------------------*/ if ('separator_with_text' == $layout) { // Define class $class = "vc_separator wpb_content_element"; // Add extra classes $el_class = $this->getExtraClass($el_class); // Main Style $main_style = vcex_inline_style(array('font_size' => $font_size, 'font_weight' => $font_weight, 'margin_bottom' => $margin_bottom)); // Span Style $span_style = vcex_inline_style(array('background' => $span_background, 'color' => $span_color, 'border_color' => $border_color)); // Add classes\ $class .= ' vc_text_separator'; $class .= ' vc_text_separator_' . $style; $class .= $this->getExtraClass($el_class); $class .= $title_align ? ' ' . $title_align : ''; $class .= $el_width ? ' vc_sep_width_' . $el_width : ' vc_sep_width_100'; //$class .= ( $color && 'custom' != $color ) ? ' vc_sep_color_' . $color : ''; $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts); ?> <<?php echo $element_type; ?> class="<?php echo $class; ?>
} // Item Margin if ('no-margins' == $style) { $items_margin = '0'; } // Items to scroll fallback for old setting if ('page' == $items_scroll) { $items_scroll = $items; } // Title design if ('yes' == $title) { $heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'text_transform' => $content_heading_transform, 'font_weight' => $content_heading_weight, 'font_size' => $content_heading_size, 'color' => $content_heading_color)); } // Content Design if ('yes' == $title || 'yes' == $caption) { $content_style = vcex_inline_style(array('background' => $content_background, 'padding' => $content_padding, 'margin' => $content_margin, 'border' => $content_border, 'font_size' => $content_font_size, 'color' => $content_color, 'text_align' => $content_alignment)); } // Main Classes $wrap_classes = array('wpex-carousel', 'wpex-carousel-images', 'clr', 'owl-carousel'); if ($style) { $wrap_classes[] = $style; } if ($classes) { $wrap_classes[] = $this->getExtraClass($classes); } $wrap_classes = implode(' ', $wrap_classes); ?> <div<?php echo vcex_html('id_attr', $unique_id); ?>
// Not needed in admin ever if (is_admin()) { return; } // Fallbacks (old atts) $link_title = isset($atts['link_title']) ? $atts['link_title'] : ''; $link_target = isset($atts['link_target']) ? $atts['link_target'] : ''; // Get and extract shortcode attributes extract(vc_map_get_attributes($this->getShortcode(), $atts)); // Primary and secondary imags required if (!$primary_image || !$secondary_image) { return; } // Add styles $wrapper_inline_style = vcex_inline_style(array('width' => $container_width)); $image_style = vcex_inline_style(array('border_radius' => $border_radius), false); // Add classes $wrapper_classes = array('vcex-image-swap', 'clr'); if ($classes) { $wrapper_classes[] = $this->getExtraClass($classes); } if ($css_animation) { $wrapper_classes[] = $this->getCSSAnimation($css_animation); } $wrapper_classes = implode(' ', $wrapper_classes); ?> <?php if ($primary_image && $secondary_image) { ?>
// Month Style if ('true' == $date) { $month_style = vcex_inline_style(array('background_color' => $month_background, 'color' => $month_color)); } // Readmore design and classes if ('true' == $read_more) { // Readmore text $read_more_text = $read_more_text ? $read_more_text : esc_html__('read more', 'total'); // Readmore classes $readmore_classes = wpex_get_button_classes($readmore_style, $readmore_style_color); if ($readmore_hover_color || $readmore_hover_background) { $readmore_classes .= ' wpex-data-hover'; } // Read more style $readmore_border_color = 'outline' == $readmore_style ? $readmore_color : ''; $readmore_style = vcex_inline_style(array('background' => $readmore_background, 'color' => $readmore_color, 'border_color' => $readmore_border_color, 'font_size' => $readmore_size, 'padding' => $readmore_padding, 'border_radius' => $readmore_border_radius, 'margin' => $readmore_margin)); // Readmore data $readmore_data = ''; if ($readmore_hover_color) { $readmore_data .= ' data-hover-color="' . $readmore_hover_color . '"'; } if ($readmore_hover_background) { $readmore_data .= ' data-hover-background="' . $readmore_hover_background . '"'; } } // Hover js if ($readmore_hover_color || $readmore_hover_background) { $inline_js[] = 'data_hover'; } // Load inline js if (!empty($inline_js)) {
} if ($overlay_style) { $media_classes[] = wpex_overlay_classes($overlay_style); } $media_classes = implode(' ', $media_classes); // Content Design $content_style = vcex_inline_style(array('color' => $content_color, 'text_align' => $content_alignment)); $content_css = $content_css ? vc_shortcode_custom_css_class($content_css) : ''; // Title design if ('true' == $title) { $heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'text_transform' => $content_heading_transform, 'font_size' => $content_heading_size, 'font_weight' => $content_heading_weight, 'line_height' => $content_heading_line_height)); $content_heading_color = vcex_inline_style(array('color' => $content_heading_color)); } // Date design if ('true' == $date) { $date_style = vcex_inline_style(array('color' => $date_color, 'font_size' => $date_font_size, 'margin' => $date_margin)); } // Sanitize carousel data to prevent errors $items = $items ? $items : 4; $items_scroll = $items_scroll ? $items_scroll : 1; $arrows = $arrows ? $arrows : 'true'; $dots = $dots ? $dots : 'false'; $auto_play = $auto_play ? $auto_play : 'false'; $infinite_loop = $infinite_loop ? $infinite_loop : 'true'; $timeout_duration = $timeout_duration ? $timeout_duration : 5000; $center = $center ? $center : 'false'; $items_margin = $items_margin ? absint($items_margin) : 15; $items_margin = 'no-margins' == $style ? 0 : $items_margin; $tablet_items = $tablet_items ? $tablet_items : 3; $mobile_landscape_items = $mobile_landscape_items ? $mobile_landscape_items : 2; $mobile_portrait_items = $mobile_portrait_items ? $mobile_portrait_items : 1;
$wrap_classes[] = 'with-button'; } if ($visibility) { $wrap_classes[] = $visibility; } if ($css_animation) { $wrap_classes[] = $this->getCSSAnimation($css_animation); } if ($classes) { $wrap_classes[] = $this->getExtraClass($classes); } $wrap_classes[] = vc_shortcode_custom_css_class($css); $wrap_classes = implode(' ', $wrap_classes); // Button style if ($button_url && $button_text) { $button_inline_style = vcex_inline_style(array('border_radius' => $button_border_radius)); } ?> <div class="<?php echo esc_attr($wrap_classes); ?> "<?php vcex_unique_id($unique_id); ?> > <?php // Display content if ($content) { ?>
} $media_classes = implode(' ', $media_classes); } // Content Design $content_style = vcex_inline_style(array('background' => $content_background, 'padding' => $content_padding, 'margin' => $content_margin, 'border' => $content_border, 'opacity' => $content_opacity, 'text_align' => $content_alignment)); // Title design if ('true' == $title) { $heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'font_size' => $content_heading_size, 'font_weight' => $content_heading_weight, 'text_transform' => $content_heading_transform, 'line_height' => $content_heading_line_height, 'color' => $content_heading_color)); } // Date design if ('true' == $date) { $date_style = vcex_inline_style(array('color' => $date_color, 'font_size' => $date_font_size)); } // Excerpt style if ('true' == $excerpt) { $excerpt_styling = vcex_inline_style(array('color' => $content_color, 'font_size' => $content_font_size)); } // Sanitize carousel data to prevent errors $items = $items ? $items : 4; $items_scroll = $items_scroll ? $items_scroll : 1; $arrows = $arrows ? $arrows : 'true'; $dots = $dots ? $dots : 'false'; $auto_play = $auto_play ? $auto_play : 'false'; $infinite_loop = $infinite_loop ? $infinite_loop : 'true'; $timeout_duration = $timeout_duration ? $timeout_duration : 5000; $center = $center ? $center : 'false'; $items_margin = $items_margin ? $items_margin : 15; $items_margin = 'no-margins' == $style ? 0 : $items_margin; $tablet_items = $tablet_items ? $tablet_items : 3; $mobile_landscape_items = $mobile_landscape_items ? $mobile_landscape_items : 2; $mobile_portrait_items = $mobile_portrait_items ? $mobile_portrait_items : 1;
?> > <?php } ?> <?php // define inner output $inner_output = ''; // Add icon if defined if ($icon) { // Icon classes $icon_wrap_classes = 'vcex-icon-wrap'; // Icon inline style $icon_style = vcex_inline_style(array('background' => $icon_background, 'width' => $icon_width, 'border_radius' => $icon_border_radius, 'height' => $icon_height, 'line_height' => wpex_sanitize_data($icon_height, 'px'), 'margin_right' => $margin_right, 'font_size' => $icon_size, 'color' => $color)); // Add icon to output $inner_output .= '<div class="' . $icon_wrap_classes . '"' . $icon_style . '><span class="' . $icon . '"></span></div>'; } // Add content to output if ($content) { $inner_output .= do_shortcode($content); } // Echo inner content (icon_content) echo $inner_output; // Close link tag if ($url) { echo '</a>'; } ?>
$lightbox_class = 'wpex-lightbox'; } // Hover Classes $hover_classes = array(); if ($img_filter) { $hover_classes[] = wpex_image_filter_class($img_filter); } if ($img_hover_style) { $hover_classes[] = wpex_image_hover_classes($img_hover_style); } $hover_classes = implode(' ', $hover_classes); // Title style & title related vars if ('yes' == $title) { $title_tag = $title_tag ? $title_tag : 'h2'; $title_type = $title_type ? $title_type : 'title'; $title_style = vcex_inline_style(array('font_size' => $title_size, 'color' => $title_color, 'text_transform' => $title_transform, 'line_height' => $title_line_height, 'margin' => $title_margin, 'font_weight' => $title_weight)); } // Load inline js for front-end editor if ($inline_js) { vcex_inline_js($inline_js); } ?> <?php // Open CSS div if ($css) { ?> <div class="vcex-image-grid-css-wrapper <?php echo vc_shortcode_custom_css_class($css); ?>
echo '</a>'; } ?> </<?php echo $heading_type; ?> > <?php } ?> <?php // Content if ($content) { $text_style = vcex_inline_style(array('font_size' => $content_font_size, 'color' => $content_color, 'font_weight' => $content_font_weight)); ?> <div class="vcex-teaser-text remove-last-p-margin clr"<?php echo $text_style; ?> > <?php echo do_shortcode(wpautop($content)); ?> </div><!-- .vcex-teaser-text --> <?php } ?>
// Icon style $icon_style = vcex_inline_style(array('font_size' => $icon_size, 'border_radius' => $icon_border_radius, 'color' => $icon_color, 'background' => $icon_bg, 'padding' => $icon_padding, 'height' => $icon_height, 'line_height' => wpex_sanitize_data($icon_height, 'px'), 'width' => $icon_width)); // Border style $vcex_inner_border_style = ''; if ('dotted' != $style) { $border_top_width = 'double' == $style ? $height : ''; $top_margin = $height ? $height / 2 : ''; $top_margin = $height && 'double' == $style ? ($height * 2 + 4) / 2 : $top_margin; $vcex_inner_border_style = vcex_inline_style(array('border_color' => $color, 'border_bottom_width' => $height, 'border_top_width' => $border_top_width, 'margin_top' => -$top_margin)); } // Reset vars if icon is defined so styles aren't duplicated in main wrapper $height = $color = ''; } // Main style $botttom_height = 'double' == $style ? $height : ''; $wrap_style = vcex_inline_style(array('height' => $dotted_height, 'width' => $width, 'margin_top' => $margin_top, 'margin_bottom' => $margin_bottom, 'border_top_width' => $height, 'border_bottom_width' => $botttom_height, 'border_color' => $color)); // Turn wrap classes into a string $wrap_classes = implode(' ', $wrap_classes); ?> <div class="<?php echo esc_attr($wrap_classes); ?> "<?php echo $wrap_style; ?> > <?php if ($icon) { ?> <div class="vcex-divider-icon">
$input_style = $submit_style = $submit_data = ''; // Wrapper classes $wrap_classes = 'vcex-newsletter-form clr'; if ($classes) { $wrap_classes .= $this->getExtraClass($classes); } if ($visibility) { $wrap_classes .= ' ' . $visibility; } if ($css_animation) { $wrap_classes .= $this->getCSSAnimation($css_animation); } // Input Style $input_style = vcex_inline_style(array('border' => $input_border, 'border_radius' => $input_border_radius, 'padding' => $input_padding, 'letter_spacing' => $input_letter_spacing, 'height' => $input_height, 'background' => $input_bg, 'color' => $input_color, 'font_size' => $input_font_size, 'font_weight' => $input_weight)); // Submit Style $submit_style = vcex_inline_style(array('height' => $submit_height, 'line_height' => $submit_height, 'margin_top' => $submit_height ? '-' . $submit_height / 2 : '', 'right' => $submit_position_right, 'border' => $submit_border, 'letter_spacing' => $submit_letter_spacing, 'padding' => $submit_padding, 'background' => $submit_bg, 'color' => $submit_color, 'font_size' => $submit_font_size, 'font_weight' => $submit_weight, 'border_radius' => $submit_border_radius)); // Submit classes $submit_classes = 'vcex-newsletter-form-button'; // Submit Data if ($submit_hover_bg) { $submit_data .= ' data-hover-background="' . $submit_hover_bg . '"'; $submit_classes .= ' wpex-data-hover'; } if ($submit_hover_color) { $submit_data .= ' data-hover-color="' . $submit_hover_color . '"'; } // Load inline js for data hover if ($submit_hover_bg || $submit_hover_color) { vcex_inline_js(array('data_hover')); } // Mailchimp
} ?> </div><!-- .vcex-milestone-number --> <?php if (!empty($caption)) { ?> <?php // Load custom font if ($caption_font_family) { wpex_enqueue_google_font($caption_font_family); } // Caption Style $caption_style = vcex_inline_style(array('font_family' => $caption_font_family, 'color' => $caption_color, 'font_size' => $caption_size, 'font_weight' => $caption_font)); ?> <?php if ($url && !$url_wrap) { ?> <a href="<?php echo esc_url($url); ?> " class="vcex-milestone-caption"<?php echo vcex_html('rel_attr', $url_rel); echo vcex_html('target_attr', $url_target); echo $caption_style; ?> ><?php
echo $url_classes; ?> "<?php echo $url_target; echo $url_rel; ?> > <?php } ?> <?php // Display Image Icon Alternative if ($image) { // Image style $image_style = vcex_inline_style(array('width' => $image_width, 'height' => $image_height)); $img_dims = ''; if ($image_width) { $img_dims .= 'width="' . intval($image_width) . '"'; } if ($image_height) { $img_dims .= 'width="' . intval($image_height) . '"'; } ?> <img src="<?php echo $image; ?> " alt="<?php echo esc_attr($heading); ?>
if ($align) { $wrap_classes .= ' text' . $align; } if ($visibility) { $wrap_classes .= ' ' . $visibility; } if ($css_animation) { $wrap_classes .= $this->getCSSAnimation($css_animation); } if ($classes) { $wrap_classes .= $this->getExtraClass($classes); } // Wrap style $wrap_style = vcex_inline_style(array('color' => $color, 'font_size' => $size, 'border_radius' => $border_radius)); // Link style $link_style = vcex_inline_style(array('width' => $width, 'height' => $height, 'line_height' => $height ? intval($height) . 'px' : '')); // Link Attributes $attributes = ''; if ($link_style) { $attributes .= $link_style; } if ('blank' == $link_target || '_blank' == $link_target) { $attributes .= ' target="_blank"'; } if ($hover_bg) { $attributes .= ' data-hover-background="' . $hover_bg . '"'; } if ($hover_color) { $attributes .= ' data-hover-color="' . $hover_color . '"'; } // Link Classes
$link_title = vcex_get_link_data('title', $link_url_temp, $link_title); $link_title = vcex_html('title_attr', $link_title); $link_target = vcex_get_link_data('target', $link_url_temp, $link_target); // Link wrap_classes $link_wrap_classes = array('vcex-icon-link'); // Local links if ('true' == $link_local_scroll || 'local' == $link_target) { $link_target = 'local'; $link_wrap_classes[] = 'local-scroll-link'; } else { $link_target = vcex_html('target_attr', $link_target); } } } // Add styling $icon_style = vcex_inline_style(array('font_size' => $custom_size, 'color' => $color, 'padding' => $padding, 'background_color' => $background, 'border_radius' => $border_radius, 'height' => $height, 'line_height' => wpex_sanitize_data($height, 'px'), 'width' => $width, 'border' => $border)); // Icon Classes $wrap_classes = array('vcex-icon', 'clr'); if ($style) { $wrap_classes[] = 'vcex-icon-' . $style; } if ($size) { $wrap_classes[] = 'vcex-icon-' . $size; } if ($float) { $wrap_classes[] = 'vcex-icon-float-' . $float; } if ($custom_size) { $wrap_classes[] = 'custom-size'; } if ($background) {
} // Image classes $media_classes = array('vcex-terms-grid-entry-image', 'wpex-clr'); if ('true' == $title_overlay) { $media_classes[] = 'vcex-has-overlay'; } if ($img_filter) { $media_classes[] = wpex_image_filter_class($img_filter); } if ($img_hover_style) { $media_classes[] = wpex_image_hover_classes($img_hover_style); } $media_classes = implode(' ', $media_classes); // Title style $title_style = vcex_inline_style($title_typo); $description_style = vcex_inline_style($description_typo); ?> <div class="<?php echo $grid_classes; ?> "> <?php // Start counter $counter = 0; // Loop through terms foreach ($terms as $term) { // Add to counter $counter++; ?>
<form method="get" class="vcex-searchbar-form" action="<?php echo esc_url(home_url('/')); ?> "<?php echo $input_style; ?> > <input type="search" class="<?php echo $input_classes; ?> " name="s" placeholder="<?php echo $placeholder; ?> "<?php echo vcex_inline_style(array('width' => $input_width)); ?> /> <?php if ($advanced_query) { // Sanitize $advanced_query = trim($advanced_query); $advanced_query = html_entity_decode($advanced_query); // Convert to array $advanced_query = parse_str($advanced_query, $advanced_query_array); // If array is valid loop through params if ($advanced_query_array) { ?> <?php
<?php // Display filter links if ('true' == $filter) { // Sanitize all text $all_text = $all_text ? $all_text : _x('All', 'Grid Filter All Button', 'wpex'); // Filter button classes $filter_button_classes = 'theme-button'; $filter_button_classes .= ' ' . $filter_button_style; if ($filter_button_color) { $filter_button_classes .= ' ' . $filter_button_color; } // Center filter links $center_filter = 'yes' == $center_filter ? ' center' : ''; // Filter font size $filter_style = vcex_inline_style(array('font_size' => $filter_font_size)); ?> <ul class="vcex-portfolio-filter vcex-filter-links wpex-clr<?php echo $center_filter; ?> "<?php echo $filter_style; ?> > <?php if ('true' == $filter_all_link) { ?> <li <?php
$readmore_classes = implode(' ', $readmore_classes); // Readmore style $readmore_style = vcex_inline_style(array('background' => $readmore_background, 'color' => $readmore_color, 'font_size' => $readmore_size, 'padding' => $readmore_padding, 'border_radius' => $readmore_border_radius, 'margin' => $readmore_margin)); // Readmore data $readmore_data = array(); if ($readmore_hover_color) { $readmore_data[] = 'data-hover-color="' . $readmore_hover_color . '"'; } if ($readmore_hover_background) { $readmore_data[] = 'data-hover-background="' . $readmore_hover_background . '"'; } $readmore_data = ' ' . implode(' ', $readmore_data); } // Date design if ('true' == $date) { $date_style = vcex_inline_style(array('color' => $date_color, 'font_size' => $date_font_size)); } // Data if ($is_isotope && 'true' == $filter) { if ('no_margins' != $grid_style && $masonry_layout_mode) { $wrap_data .= ' data-layout-mode="' . $masonry_layout_mode . '"'; } if ($filter_speed) { $wrap_data .= ' data-transition-duration="' . $filter_speed . '"'; } } if ('no_margins' == $grid_style && 'true' != $filter) { $wrap_data .= ' data-transition-duration="0.0"'; } // Static entry classes $static_entry_classes = array('vcex-post-type-entry', 'clr');
} if ($data_attr) { $button_classes[] = 'wpex-data-hover'; } $inline_js[] = 'data_hover'; } // Define button icon_classes $icon_left = vcex_get_icon_class($atts, 'icon_left'); $icon_right = vcex_get_icon_class($atts, 'icon_right'); // Icon left style if ($icon_left) { $icon_left_style = vcex_inline_style(array('margin_right' => $icon_left_padding)); } // Icon right style if ($icon_right) { $icon_right_style = vcex_inline_style(array('margin_left' => $icon_right_padding)); } // Load icon fonts if needed if ($icon_left || $icon_right) { vcex_enqueue_icon_font($icon_type); } // Load inline js vcex_inline_js($inline_js); // Turn arrays into strings $button_classes = implode(' ', $button_classes); $data_attr = implode(' ', $data_attr); // Open CSS wrapper if ($css_wrap) { echo '<div class="' . vc_shortcode_custom_css_class($css_wrap) . ' wpex-clr">'; } // Open wrapper for specific button styles
$wrap_classes = implode(' ', $wrap_classes); // Entry media classes $media_classes = array('wpex-carousel-entry-media', 'clr'); if ($img_hover_style) { $media_classes[] = wpex_image_hover_classes($img_hover_style); } if ($overlay_style) { $media_classes[] = wpex_overlay_classes($overlay_style); } $media_classes = implode(' ', $media_classes); // Content Design $content_style = vcex_inline_style(array('background' => $content_background, 'padding' => $content_padding, 'margin' => $content_margin, 'border' => $content_border, 'font_size' => $content_font_size, 'color' => $content_color, 'opacity' => $content_opacity, 'text_align' => $content_alignment)); // Title design $heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'text_transform' => $content_heading_transform, 'font_size' => $content_heading_size, 'font_weight' => $content_heading_weight, 'line_height' => $content_heading_line_height)); // Heading color $content_heading_color = vcex_inline_style(array('color' => $content_heading_color)); // Sanitize carousel data to prevent errors $items = $items ? $items : 4; $items_scroll = $items_scroll ? $items_scroll : 1; $arrows = $arrows ? $arrows : 'true'; $dots = $dots ? $dots : 'false'; $auto_play = $auto_play ? $auto_play : 'false'; $infinite_loop = $infinite_loop ? $infinite_loop : 'true'; $timeout_duration = $timeout_duration ? $timeout_duration : 5000; $center = $center ? $center : 'false'; $items_margin = $items_margin ? intval($items_margin) : 15; $items_margin = 'no-margins' == $style ? 0 : $items_margin; $tablet_items = $tablet_items ? $tablet_items : 3; $mobile_landscape_items = $mobile_landscape_items ? $mobile_landscape_items : 2; $mobile_portrait_items = $mobile_portrait_items ? $mobile_portrait_items : 1; $animation_speed = $animation_speed ? $animation_speed : 150;
} ?> <?php // Display Image Icon Alternative if ($image) { ?> <img src="<?php echo $image; ?> " alt="<?php echo esc_attr($heading); ?> " class="vcex-icon-box-image"<?php echo vcex_inline_style(array('width' => $image_width)); ?> /> <?php // Display Icon } elseif ($icon) { ?> <div class="<?php echo $icon_classes; ?> "<?php echo $icon_style; ?> >
?> > <div class="vcex-navbar-inner clr"> <?php // Get menu object $menu = wp_get_nav_menu_object($menu); // If menu isn't empty display items if (!empty($menu)) { // Load inline js vcex_inline_js(array('data_hover')); // Get menu items $menu_items = wp_get_nav_menu_items($menu->term_id); // Inline styles $reset_border = $hover_bg || $hover_color ? 'inherit' : ''; $active_style = vcex_inline_style(array('background' => $hover_bg, 'color' => $hover_color)); // Loop through menu items foreach ($menu_items as $menu_item) { // Link Classes $link_classes = array('vcex-navbar-link'); $link_classes[] = wpex_get_button_classes($button_style, $button_color); if ($button_color) { $link_classes[] = $button_color; } if ($button_layout) { $link_classes[] = $button_layout; } if ('true' == $local_scroll) { $link_classes[] = 'local-scroll'; } if ($css_class) {
$button_classes[] = 'wpex-data-hover'; $inline_js[] = 'data_hover'; } $button_classes = implode(' ', $button_classes); // Button Data attributes $button_data = array(); if ($button_hover_bg_color) { $button_data[] = 'data-hover-background="' . $button_hover_bg_color . '"'; } if ($button_hover_color) { $button_data[] = 'data-hover-color="' . $button_hover_color . '"'; } $button_data = implode(' ', $button_data); // Button Style $border_color = 'outline' == $button_style ? $button_color : ''; $button_style = vcex_inline_style(array('background' => $button_bg_color, 'color' => $button_color, 'letter_spacing' => $button_letter_spacing, 'font_size' => $button_size, 'padding' => $button_padding, 'border_radius' => $button_border_radius, 'font_weight' => $button_weight, 'border_color' => $border_color)); } } // Load inline js for the front-end composer if (!empty($inline_js)) { vcex_inline_js($inline_js); } ?> <div class="<?php echo $wrapper_classes; ?> "<?php vcex_unique_id($unique_id); ?> >
$wrapper_classes .= $this->getCSSAnimation($css_animation); } if ($classes) { $wrapper_classes .= $this->getExtraClass($classes); } // Set icon and enqueue font styles if ('true' == $show_icon) { $icon = vcex_get_icon_class($atts, 'icon'); if ($icon && 'fontawesome' != $icon_type) { vcex_enqueue_icon_font($icon_type); } } // Style $wrapper_style = vcex_inline_style(array('background' => $background, 'font_size' => $font_size, 'height_px' => $container_height, 'line_height_px' => $container_height)); $title_style = vcex_inline_style(array('background' => $color, 'padding_left' => $container_padding_left)); $bar_style = vcex_inline_style(array('background' => $color)); ?> <div class="<?php echo $wrapper_classes; ?> " data-percent="<?php echo intval($percentage); ?> %"<?php vcex_unique_id($unique_id); echo $wrapper_style; ?> > <div class="vcex-skillbar-title"<?php