<?php
/* **********************************************************
 * RMS PRICING TABLE 
 * **********************************************************/
function rms_pricegroup($params, $content = null)
{
    extract( shortcode_atts( array(
    	'id' => rand(100,1000),
        'style' => 'normal'
    ), $params ) );
    
    $content = do_shortcode($content);
    
    if($style == 'normal'):
    $tg = '<div class="col-md-4"><div class="pricing-table"><ul>'.$content.'</ul></div></div>';
    else:
    $tg = '<div class="col-md-4"><div class="pricing-table pricing-highlighted"><ul>'.$content.'</ul></div></div>';  
    endif;

    return $tg;
    
}

function rms_priceheading($params2, $content = null)
{
    extract(shortcode_atts(array(
        'amount'     	=> '',
        'time'     		=> '',
        'title'      	=> ''
    ), $params2, 'rms-priceheading'));
    
    $content = do_shortcode($content);
    
        $rma = '
		<li>'.esc_attr($title).'</li>
		<li class="pricing-details">
			<span class="pricing-price">'.esc_attr($amount).'</span>
			<span class="pricing-time">'.esc_attr($time).'</span>
		</li>';
        
    return $rma; 
}


function rms_pricefull($params, $content = null)
{
    extract( shortcode_atts( array(
    	'id' => rand(100,1000),
        'style' => 'one_fourth'
    ), $params ) );
    
    $content = do_shortcode($content);
	
    $tfull = ''.$content.'';

    return $tfull;
    
}


function rms_pricedata($params3, $content = null)
{
    extract(shortcode_atts(array(
        'amount'     => '',
        'title'      => ''
    ), $params3));
    
    $rmt = '<li>'.$content.'</li>';
    
    return $rmt;
}

function rms_pricenone($params5, $content = null)
{
    extract(shortcode_atts(array(
        'rlink'      => ''
    ), $params5));
    
    $rmtxt = '<li><i class="fa fa-times"></i></li>';
    
    return $rmtxt;
}

function rms_pricemore($params4, $content = null)
{
    extract(shortcode_atts(array(
        'rlink'      => ''
    ), $params4));
    
    $rmtxt = '<li><a class="btn" href="'.$rlink.'">'.$content.'</a></li>';
    
    return $rmtxt;
}
add_shortcode('rms-pricgroup', 'rms_pricegroup');
add_shortcode('rms-priceheading', 'rms_priceheading');
add_shortcode('rms-pricefull', 'rms_pricefull');
add_shortcode('rms-pricedata', 'rms_pricedata');
add_shortcode('rms-pricenone', 'rms_pricenone');
add_shortcode('rms-pricemore', 'rms_pricemore');