Ejemplo n.º 1
0
        if (in_array($link_tooltip, array('yes', 'true'))) {
            $link_classes .= ' tooltip-up';
        }
        // Display link
        if ($link) {
            ?>

				<a href="<?php 
            echo esc_url($link);
            ?>
" class="<?php 
            echo $link_classes;
            ?>
"<?php 
            echo vcex_html('title_attr', $link_title);
            echo vcex_html('target_attr', $link_target);
            ?>
>

			<?php 
        }
        ?>

		<?php 
    }
    ?>

			<?php 
    // Primary image
    wpex_post_thumbnail(array('attachment' => $primary_image, 'size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'class' => 'vcex-image-swap-primary', 'style' => $image_style));
    ?>
// Per style
if ($per) {
    $per_style = vcex_inline_style(array('display' => $per_display, 'font_size' => $per_size, 'color' => $per_color, 'font_weight' => $per_weight, 'text_transform' => $per_transform));
}
// Features Style
if ($content) {
    $features_style = vcex_inline_style(array('padding' => $features_padding, 'background' => $features_bg, 'border' => $features_border, 'color' => $font_color, 'font_size' => $font_size));
}
// Button URL & attributes
if ($button_url) {
    $button_url_temp = $button_url;
    $button_url = vcex_get_link_data('url', $button_url_temp);
    if ($button_url) {
        $button_title = vcex_get_link_data('title', $button_url_temp);
        $button_target = vcex_get_link_data('target', $button_url_temp);
        $button_target = vcex_html('target_attr', $button_target);
    }
}
// Button Icons, Classes & Style
if ($button_url || $custom_button) {
    // Button Wrap Style
    $button_wrap_style = vcex_inline_style(array('padding' => $button_wrap_padding, 'border' => $button_wrap_border, 'background' => $button_wrap_bg));
    // VCEX button styles
    if ($button_url) {
        // Get correct icon classes
        $button_icon_left = vcex_get_icon_class($atts, 'button_icon_left');
        $button_icon_right = vcex_get_icon_class($atts, 'button_icon_right');
        if ($button_icon_left || $button_icon_right) {
            vcex_enqueue_icon_font($icon_type);
        }
        // Button Classes
Ejemplo n.º 3
0
/**
 * Echos unique ID html for VC modules
 *
 * @since 2.0.0
 */
function vcex_unique_id($id)
{
    if (!$id) {
        return;
    }
    echo vcex_html('id_attr', $id);
}
    return;
}
// Deprecated Attributes
if (!empty($atts['class']) && empty($classes)) {
    $atts['classes'] = $atts['class'];
}
// Get and extract shortcode attributes
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
// Sanitize & declare vars
$content = !empty($content) ? $content : __('Button Text', 'wpex');
$inline_js = array();
$data_attr = array();
$url = $url ? esc_url($url) : '#';
$target_html = vcex_html('target_attr', $target);
$rel = vcex_html('rel_attr', $rel);
// Load custom font
if ($font_family) {
    wpex_enqueue_google_font($font_family);
}
// Button Classes
$button_classes = array('theme-button vcex-button');
if ($layout) {
    $button_classes[] = $layout;
}
if ($style) {
    $button_classes[] = $style;
}
if ($align) {
    $button_classes[] = 'align-' . $align;
}
            wpex_overlay('inside_link', $overlay_style, $atts);
            ?>
						</a><!-- .wpex-carousel-entry-img -->

					<?php 
        } elseif ('custom_link' == $thumbnail_link && $post->url) {
            ?>

						<a href="<?php 
            echo $post->url;
            ?>
" title="<?php 
            echo esc_attr($post->alt);
            ?>
" class="wpex-carousel-entry-img"<?php 
            echo vcex_html('target_attr', $custom_links_target);
            ?>
>
							<?php 
            echo $image_output;
            ?>
							<?php 
            // Inner link overlay html
            wpex_overlay('inside_link', $overlay_style, $atts);
            ?>
						</a>

					<?php 
        } else {
            echo $image_output;
        }
 // Sanitize & declare variables
 $inline_js = array('ilightbox');
 $is_isotope = false;
 $title = $title ? $title : 'true';
 $excerpt = $excerpt ? $excerpt : 'true';
 $read_more = $read_more ? $read_more : 'true';
 $entry_media = $entry_media ? $entry_media : 'true';
 $date = $date ? $date : 'true';
 $read_more_text = $read_more_text ? $read_more_text : __('read more', 'wpex');
 $filter = $filter ? $filter : 'false';
 $css_animation = $css_animation ? $this->getCSSAnimation($css_animation) : '';
 $css_animation = 'true' == $filter ? false : $css_animation;
 $equal_heights_grid = 'true' == $equal_heights_grid ? true : false;
 $equal_heights_grid = $equal_heights_grid && $columns > '1' ? true : false;
 $overlay_style = $overlay_style ? $overlay_style : 'none';
 $url_target = vcex_html('target_attr', $url_target);
 $center_filter = 'yes' == $center_filter ? ' center' : '';
 // Load lightbox script
 if ('lightbox' == $thumb_link) {
     vcex_enque_style('ilightbox');
 }
 // Enable Isotope?
 if ('true' == $filter || 'masonry' == $grid_style) {
     $is_isotope = true;
     $equal_heights_grid = false;
 }
 // No need for masonry if not enough columns and filter is disabled
 if ('true' != $filter && 'masonry' == $grid_style) {
     $post_count = count($wpex_query->posts);
     if ($post_count <= $columns) {
         $is_isotope = false;
Ejemplo n.º 7
0
        $link_classes = implode(' ', $link_classes);
        // Sanitize title attribute
        $title_attr = $menu_item->attr_title ? $menu_item->attr_title : $menu_item->title;
        ?>

				<a href="<?php 
        echo esc_url($menu_item->url);
        ?>
" title="<?php 
        echo esc_attr($title_attr);
        ?>
" class="<?php 
        echo $link_classes;
        ?>
"<?php 
        echo vcex_html('target_attr', $menu_item->target);
        echo $link_data;
        if ($menu_item->object_id == $post_id) {
            echo $active_style;
        }
        ?>
><?php 
        echo $menu_item->title;
        ?>
</a>

			<?php 
    }
    ?>

		<?php 
Ejemplo n.º 8
0
 * @subpackage VC Templates
 * @version 3.3.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Not needed in admin ever
if (is_admin()) {
    return;
}
// Get and extract shortcode attributes
extract(vc_map_get_attributes($this->getShortcode(), $atts));
// Sanitize variables
$button_target = vcex_html('target_attr', $button_target);
$button_rel = vcex_html('rel_attr', $button_rel);
// Add Classes
$wrap_classes = array('vcex-callout', 'clr');
if ($button_url) {
    $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);
Ejemplo n.º 9
0
	<?php 
// Open link tag
if ($url) {
    ?>

		<?php 
    // Inline sytle for the link
    $link_style = vcex_inline_style(array('color' => $font_color));
    ?>

		<a href="<?php 
    echo $url;
    ?>
"<?php 
    echo vcex_html('title_attr', $url_title);
    echo $url_target;
    echo $link_style;
    ?>
>

	<?php 
}
?>

	<?php 
// define inner output
$inner_output = '';
// Add icon if defined
if ($icon) {
    // Icon classes