<?php

/*
 * Full Width
 */
if (!function_exists('xs_full_width')) {

    function xs_full_width($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
                        ), $atts));

        return '<div class="col-md-12  ' . $class . '"> ' . do_shortcode($content) . ' <div class="clear"></div></div> ';
    }

    add_shortcode('xs_full_width', 'xs_full_width');
}



/*
 * One Sixth Grid
 */

if (!function_exists('xs_one_sixth')) {

    function xs_one_sixth($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
                        ), $atts));

        return '<div class="col-md-2  ' . $class . '"> ' . do_shortcode($content) . ' <div class="clear"></div></div> ';
    }

    add_shortcode('xs_one_sixth', 'xs_one_sixth');
}

/*
 * One Half Grid
 */


if (!function_exists('xs_one_half')) {

    function xs_one_half($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
                        ), $atts));

        return '<div class="col-md-6  ' . $class . '"> ' . do_shortcode($content) . ' <div class="clear"></div></div> ';
    }

    add_shortcode('xs_one_half', 'xs_one_half');
}

/*
 * One third Grid
 */

if (!function_exists('xs_one_third')) {

    function xs_one_third($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
                        ), $atts));

        return '<div class="col-md-4  ' . $class . '"> ' . do_shortcode($content) . ' </div> ';
    }

    add_shortcode('xs_one_third', 'xs_one_third');
}




/*
 * One Fourth Grid
 */

if (!function_exists('xs_one_fourth')) {

    function xs_one_fourth($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
                        ), $atts));

        return '<div class="col-md-3  ' . $class . '"> ' . do_shortcode($content) . ' <div class="clear"></div></div> ';
    }

    add_shortcode('xs_one_fourth', 'xs_one_fourth');
}


/*
 * Two Third Grid
 */

if (!function_exists('xs_two_third')) {

    function xs_two_third($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
                        ), $atts));

        return '<div class="col-md-8  ' . $class . '"> ' . do_shortcode($content) . ' <div class="clear"></div></div> ';
    }

    add_shortcode('xs_two_third', 'xs_two_third');
}

/*
 * BUTTON
 */

if (!function_exists('xs_button')) {

    function xs_button($atts, $content = null) {

        extract(shortcode_atts(array(
            'class' => '',
            'link' => '',
            'postion' => '',
                        ), $atts));

        return '<p class="text-' . do_shortcode($postion) . '"><a href="' . do_shortcode($link) . '" title="' . do_shortcode($content) . '" class="btn btn-default">' . do_shortcode($content) . ' <i class="fa fa-angle-right"></i></a></p> ';
    }

    add_shortcode('xs_button', 'xs_button');
}



