예제 #1
0
    echo !empty($left_margin) ? 'margin-left:' . $left_margin . ';' : '';
    ?>
 <?php 
    echo !empty($right_margin) ? 'margin-right:' . $right_margin . ';' : '';
    ?>
">
			<?php 
    if (!empty($content['img_url_slider'])) {
        ?>
			<div class="slide-image">
				<?php 
        $image_url = isset($content['img_url_slider']) ? esc_url($content['img_url_slider']) : '';
        $image_w = $img_w_slider;
        $image_h = $img_h_slider;
        $image_title = isset($content['img_title_slider']) ? $content['img_title_slider'] : '';
        if ($alt_by_url = Themify_Builder_Model::get_alt_by_url($image_url)) {
            $image_alt = $alt_by_url;
        } else {
            $image_alt = $image_title;
        }
        $param_image_src = 'src=' . $image_url . '&w=' . $image_w . '&h=' . $image_h . '&alt=' . $image_alt . '&ignore=true';
        if ($this->is_img_php_disabled()) {
            // get image preset
            $preset = $image_size_slider != '' ? $image_size_slider : themify_get('setting-global_feature_size');
            if (isset($_wp_additional_image_sizes[$preset]) && $image_size_slider != '') {
                $image_w = intval($_wp_additional_image_sizes[$preset]['width']);
                $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');
            }