<?php
/*===============================
Shortocde tz-skill-item
===============================*/

function interiart_our_process($atts, $content=null) {
    $interiart_tz_number = $interiart_tz_name =  $interiart_tz_readmore_option = $interiart_tz_readmore_text =
    $interiart_tz_readmore_link = $interiart_tz_css_animation = $interiart_color_title ='';
    extract(shortcode_atts(array(
        'interiart_tz_number'                => '',
        'interiart_tz_name'                  => '',
        'interiart_tz_readmore_option'       => 'show',
        'interiart_tz_readmore_text'         => '',
        'interiart_tz_readmore_link'         => '',
        'interiart_tz_css_animation'         => '',
        'interiart_color_title'              => ''
    ),$atts));
    ob_start();


    $interiart_class = '';
    if($interiart_tz_css_animation != ''){
        wp_enqueue_script( 'waypoints' );
        $interiart_class .= ' wpb_animate_when_almost_visible wpb_' . $interiart_tz_css_animation;
    }
    ?>
    <div class="interiart-our-process <?php echo esc_attr($interiart_class); ?>">
        <?php
        if($interiart_tz_number != ''){
            ?>
            <span class="interiart-number-process"><?php echo esc_html($interiart_tz_number);?></span>
            <?php
        }
        ?>

        <?php
        if($interiart_tz_name != ''){
            ?>
            <h3 class="interiart-name-process" <?php if($interiart_color_title){?>style="color:<?php echo esc_attr($interiart_color_title);?>" <?php }?>>
                <?php echo esc_html($interiart_tz_name);?></h3>
            <?php
        }
        ?>
        <?php
        if($content != ''){
            ?>
            <p class="interiart-description-process">
                <?php echo balanceTags($content);?>
            </p>
            <?php
        }
        ?>

        <?php
        if($interiart_tz_readmore_option == 'show' && $interiart_tz_readmore_link != '' && $interiart_tz_readmore_text != ''){
            ?>
            <a class="interiart_readmore" <?php if($interiart_color_title){?>style="color:<?php echo esc_attr($interiart_color_title);?>" <?php }?>
               href="<?php echo esc_url($interiart_tz_readmore_link);?>"><?php echo esc_html($interiart_tz_readmore_text);?></a>
            <?php
        }
        ?>
    </div>
    <?php

    return ob_get_clean();
}
add_shortcode('interiart-our-process','interiart_our_process');
?>
