<?php

class Intense_Definitions extends Intense_Shortcode {

	function __construct() {
        parent::__construct();

		global $intense_visions_options;

		$this->title = __( 'Definitions', 'intense' );
		$this->description = __( 'The definitions shortcode adds a list of terms and definitions vertically or horizontally.', 'intense' );
		$this->category = __( 'Typography', 'intense' );
		$this->show_preview = true;
		$this->is_container = true;		
	}

	function shortcode( $atts, $content = null ) {
		global $intense_visions_options;
		extract( shortcode_atts( $this->get_shortcode_defaults( null, $atts ), $atts ) );

        $id = ( !empty ( $id ) ) ? ' id="' . $id . '"' : '';

        $css = "";
        $extra_class = ( $horizontal ? " dl-horizontal" : "" ) . ( !empty( $class ) ? ' ' . $class : '' ) . ( is_rtl() ? " rtl" : "" );

        if ( isset( $atts['get_css'] ) && $atts['get_css'] ) {
            return array(
                'css' => $css,
                'base_classes' => 'intense',
                'extra_classes' => $extra_class
            );
        }

		return "<dl" . $id . " class='intense" . $extra_class . "'>" . do_shortcode( $content ) . "</dl>";
	}
}



