<?php

defined('_JEXEC') or die('resticted aceess');

AddonParser::addAddon('sp_ob_testimonials', 'sp_ob_testimonials_addon');
AddonParser::addAddon('sp_ob_testimonials_item', 'sp_ob_testimonials_item_addon');

function sp_ob_testimonials_addon($atts, $content)
{

    $class = '';

    extract(spAddonAtts(array(
        "class" => '',
    ), $atts));
    ob_start();
    ?>
    <div class="ob_tesimonials">
        <div class="slider">
            <?php echo AddonParser::spDoAddon($content);?>
        </div>
    </div>
    <?php
    $html = ob_get_clean();
    return $html;
}

function sp_ob_testimonials_item_addon($atts)
{
    $image = $title = $subtitle = $contenthtml = '';
    extract(spAddonAtts(array(
        "image" => '',
        "title" => '',
        "subtitle" => '',
        "contenthtml" => '',
    ), $atts));
    ob_start();
    ?>
    <div class="item">
        <div class="inner">
            <i class="fa fa-quote-right" aria-hidden="true"></i>
            <div class="avata">
                <img src="<?php echo $image;?>" alt="">
            </div>
            <div class="content"><?php echo $contenthtml;?></div>
            <div class="title"><?php echo $title;?></div>
            <div class="sub_title"><?php echo $subtitle;?></div>
        </div>
    </div>
    <?php
    $html = ob_get_clean();
    return $html;
}