<?php

$args = array(
    'tz_slide_image' => '',
    'tz_slide_title' => '',
    'tz_slide_description_type' => 'textarea',
    'tz_slide_description' => '',
    'tz_slide_option_readmore' => 'show',
    'tz_slide_readmore_text' => '',
    'tz_slide_readmore_link' => '',
);

extract(shortcode_atts($args, $atts));

$tz_img_id = preg_replace('/[^\d]/', '', $tz_slide_image);
$tz_width_img = '';
$tz_height_img = '';
$tz_images_info = wp_get_attachment_image_src($tz_img_id, $size = 'full');
if (isset($tz_images_info) && !empty($tz_images_info)) {
    $tz_url_img = $tz_images_info[0];
    $tz_width_img = $tz_images_info[1];
    $tz_height_img = $tz_images_info[2];
}

?>

<div class="tzView_Slide_Item">
    <div class="tzView_Slide_Image">
        <img class="" width="<?php echo esc_attr($tz_width_img); ?>" height="<?php echo esc_attr($tz_height_img); ?>"
             alt="<?php echo esc_attr($tz_slide_title); ?>" src="<?php echo esc_url($tz_url_img); ?>">
    </div>
    <div class="container">
        <div class="tzView_slide_Content">
            <div class="tz_wrap_content">
                <span class="tz_line_left">&nbsp;</span>
                <h3 class="tzView_slide_Content_title">
                    <?php echo force_balance_tags($tz_slide_title); ?>
                </h3>
                <p class="tzView_slide_Des">
                    <?php
                    if ($tz_slide_description_type == 'textarea') {
                        echo esc_html($tz_slide_description);
                    } else {
                        echo do_shortcode($content);
                    }

                    ?>
                </p>
                <span class="tz_line_right">&nbsp;</span>
            </div>

            <?php if ($tz_slide_option_readmore == 'show' && $tz_slide_readmore_text != '' && $tz_slide_readmore_link != ''): ?>
                <a href="<?php echo esc_url($tz_slide_readmore_link); ?>" class="tzViewslide_readmore" target="_blank"
                   title=""><?php echo esc_html($tz_slide_readmore_text); ?></a>
            <?php endif; ?>
        </div>
    </div>

</div>


