示例#1
0
 /**
  * Returns escaped URL for featured image link
  * @return string
  * @since 1.3.5
  */
 function themify_get_featured_image_link($args = array())
 {
     $defaults = array('no_permalink' => false);
     $args = wp_parse_args($args, $defaults);
     extract($args, EXTR_SKIP);
     if (themify_get('external_link') != '') {
         $link = esc_url(themify_get('external_link'));
     } elseif (themify_get('lightbox_link') != '') {
         $link = esc_url(themify_get('lightbox_link'));
         if (themify_check('iframe_url')) {
             $link = themify_get_lightbox_iframe_link($link);
         }
         $link = $link . '" class="lightbox';
     } elseif (themify_check('link_url')) {
         $link = themify_get('link_url');
     } elseif ($args['no_permalink']) {
         $link = '';
     } else {
         $link = get_permalink();
         if (current_theme_supports('themify-post-in-lightbox')) {
             if (!is_single() && '' != themify_get('setting-open_inline')) {
                 $link = add_query_arg(array('post_in_lightbox' => 1), get_permalink()) . '" class="themify-lightbox';
             }
             if (themify_is_query_page()) {
                 if ('no' == themify_get('post_in_lightbox')) {
                     $link = get_permalink();
                 } else {
                     $link = add_query_arg(array('post_in_lightbox' => 1), get_permalink()) . '" class="themify-lightbox';
                 }
             }
         }
     }
     return apply_filters('themify_get_featured_image_link', $link);
 }
$animation_effect = $this->parse_animation_effect($animation_effect);
/* configure the chart size based on the option */
if ($circle_size_feature == 'large') {
    $chart_vars['size'] = 200;
} elseif ($circle_size_feature == 'small') {
    $chart_vars['size'] = 100;
}
$chart_class = $circle_percentage_feature == '' ? 'no-chart' : 'with-chart';
if ('' == $circle_percentage_feature) {
    $circle_percentage_feature = '0';
    $chart_vars['trackColor'] = 'rgba(0,0,0,0)';
    // transparent
}
if ('' != $link_feature) {
    if (in_array('lightbox', $param_feature)) {
        $link_feature = themify_get_lightbox_iframe_link($link_feature) . '" class="lightbox';
    } elseif (in_array('newtab', $param_feature)) {
        $link_feature = $link_feature . '" target="_blank';
    }
}
$container_class = implode(' ', apply_filters('themify_builder_module_classes', array('module', 'module-' . $mod_name, $module_ID, $chart_class, $layout_feature, 'size-' . $circle_size_feature, $css_feature, $animation_effect)));
?>
<!-- module feature -->
<div id="<?php 
echo $module_ID;
?>
" class="<?php 
echo esc_attr($container_class);
?>
">
示例#3
0
        if (isset($_wp_additional_image_sizes[$preset]) && $image_size_image != '') {
            $width_image = intval($_wp_additional_image_sizes[$preset]['width']);
            $height_image = intval($_wp_additional_image_sizes[$preset]['height']);
        } else {
            $width_image = $width_image != '' ? $width_image : get_option($preset . '_size_w');
            $height_image = $height_image != '' ? $height_image : get_option($preset . '_size_h');
        }
        $image = '<img src="' . esc_url($url_image) . '" alt="' . esc_attr($image_alt) . '" width="' . esc_attr($width_image) . '" height="' . esc_attr($height_image) . '">';
    } else {
        $image = themify_get_image($param_image_src);
    }
    // check whether link is image or url
    if (!empty($link_image)) {
        $check_img = $this->is_img_link($link_image);
        if (!$check_img && $lightbox) {
            $link_image = themify_get_lightbox_iframe_link($link_image);
        }
    }
    ?>
    <!-- module image -->
    <div id="<?php 
    echo esc_attr($module_ID);
    ?>
" class="<?php 
    echo esc_attr($container_class);
    ?>
">

        <?php 
    if ($mod_title_image != '') {
        ?>
示例#4
0
            <?php 
    }
    ?>

        </figure>

        <div class="module-feature-content">
            <?php 
    if ('' != $title_feature) {
        ?>
                <h3 class="module-feature-title">
                    <?php 
        if ('' != $link_feature) {
            ?>
                        <a href="<?php 
            echo esc_url('lightbox' == $link_type ? themify_get_lightbox_iframe_link($link_feature) : $link_feature);
            ?>
" <?php 
            if ('lightbox' == $link_type) {
                echo 'class="lightbox"';
            }
            if ('newtab' == $link_type) {
                echo 'target="_blank"';
            }
            ?>
>
                           <?php 
        }
        ?>

                        <?php 
                $image_h = intval($_wp_additional_image_sizes[$preset]['height']);
            } else {
                $image_w = $image_w != '' ? $image_w : get_option($preset . '_size_w');
                $image_h = $image_h != '' ? $image_h : get_option($preset . '_size_h');
            }
            $image = '<img src="' . esc_url($image_url) . '" alt="' . esc_attr($image_alt) . '" width="' . esc_attr($image_w) . '" height="' . esc_attr($image_h) . '">';
        } else {
            $image = themify_get_image($param_image_src);
        }
        ?>
				<?php 
        if (!empty($content['img_link_slider'])) {
            ?>
					<?php 
            if (isset($content['img_link_params']) && $content['img_link_params'] == 'lightbox') {
                $content['img_link_slider'] = themify_get_lightbox_iframe_link($content['img_link_slider']);
                $attr = ' class="lightbox"';
            } elseif (isset($content['img_link_params']) && $content['img_link_params'] == 'newtab') {
                $attr = ' target="_blank"';
            } else {
                $attr = '';
            }
            ?>
				<a href="<?php 
            echo esc_url($content['img_link_slider']);
            ?>
" alt="<?php 
            echo esc_attr($image_alt);
            ?>
"<?php 
            echo $attr;