示例#1
0
}
if ($visibility) {
    $wrap_classes[] = $visibility;
}
if ($css) {
    $wrap_classes[] = vc_shortcode_custom_css_class($css);
}
if ($el_class) {
    $wrap_classes[] = $this->getExtraClass($el_class);
}
if ('true' == $italic) {
    $wrap_classes[] = 'wpex-italic';
}
// Load custom font
if ($font_family) {
    wpex_enqueue_google_font($font_family);
}
// Add inline style
$heading_style_attr = vcex_inline_style(array('color' => $color, 'font_family' => $font_family, 'font_size' => $font_size, 'letter_spacing' => $letter_spacing, 'font_weight' => $font_weight, 'text_align' => $text_align, 'line_height' => $line_height, 'border_bottom_color' => $inner_bottom_border_color_main));
// Get link data
$link = vcex_build_link($link);
if ($link) {
    $link_html[] = 'href="' . $link['url'] . '"';
    $link_html[] = 'title="' . $link['title'] . '"';
    $link_html[] = 'target="' . $link['target'] . '"';
    $tag = 'a';
    if ('true' == $link_local_scroll) {
        $wrap_classes[] = 'local-scroll-link';
    }
}
// Responsive Text
    }
    if ('local' == $url_target) {
        $url_classes .= ' local-scroll-link';
    } elseif ('_blank' == $url_target) {
        $url_target = ' target="_blank"';
    } else {
        $url_target = '';
    }
    if ($url_rel) {
        $url_rel = ' rel="' . $url_rel . '"';
    }
}
// Heading style
if ($heading) {
    if ($heading_font_family) {
        wpex_enqueue_google_font($heading_font_family);
    }
    $heading_style = vcex_inline_style(array('font_family' => $heading_font_family, 'font_weight' => $heading_weight, 'color' => $heading_color, 'font_size' => $heading_size, 'letter_spacing' => $heading_letter_spacing, 'margin_bottom' => $heading_bottom_margin, 'text_transform' => $heading_transform));
}
// Load inline js for front end editor
if (!empty($inline_js)) {
    vcex_inline_js($inline_js);
}
// Open new wrapper for icon style 1
if ($css && in_array($style, array('one', 'seven'))) {
    ?>
	<?php 
    // Remove wrapper hover
    if (isset($wrapper_classes['wpex-data-hover'])) {
        unset($wrapper_classes['wpex-data-hover']);
    }
示例#3
0
// Get and extract shortcode attributes
extract(vc_map_get_attributes($this->getShortcode(), $atts));
// Taxonomy is required
if (!$taxonomy) {
    return;
}
// Sanitize data
$title_typo = vcex_parse_typography_param($title_typo);
$title_tag = !empty($title_typo['tag']) ? $title_typo['tag'] : 'h2';
$description_typo = vcex_parse_typography_param($description_typo);
// Load Google Font if needed
if (isset($title_typo['font_family'])) {
    wpex_enqueue_google_font($title_typo['font_family']);
}
if (isset($title_typo['description_typo'])) {
    wpex_enqueue_google_font($title_typo['description_typo']);
}
// Get terms
if ($parent_terms) {
    $terms = get_terms($taxonomy, array('parent' => 0));
} else {
    $terms = get_terms($taxonomy);
}
// Get term thumbnails
$term_data = wpex_get_term_data();
// Define post type based on the taxonomy
$taxonomy = get_taxonomy($taxonomy);
$post_type = $taxonomy->object_type[0];
// Grid classes
$grid_classes = array('vcex-terms-grid', 'wpex-row', 'clr');
if ('masonry' == $grid_style) {
示例#4
0
 /**
  * Loads Google fonts via wp_enqueue_style
  *
  * @since 1.6.0
  */
 public function load_fonts()
 {
     // Get fonts
     $fonts = $this->loop('fonts');
     // Loop through and enqueue fonts
     if (!empty($fonts) && is_array($fonts)) {
         foreach ($fonts as $font) {
             wpex_enqueue_google_font($font);
         }
     }
 }
    echo $after;
    ?>
</span><?php 
}
?>

	</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);