<?php

class Intense_Tab extends Intense_Shortcode {

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

		global $intense_visions_options;

		$this->title = __( 'Tab', 'intense' );
		$this->category = __( 'Layout', 'intense' );
		$this->show_preview = true;
		$this->hidden = true;
		$this->parent = 'intense_tabs';
		$this->is_container = true;		
	}

	function shortcode( $atts, $content = null ) {
		global $intense_tab_array;

		if ( is_array( $atts ) ) {
			// pull the default tab attribute values and merge them with the attributes passed into the shortcode
			// then filter out the null values
			$atts = array_filter( array_merge( $this->get_shortcode_defaults( null, $atts ), $atts ) );			
		} else {
			//if nothing is passed, get the default tab attributes
			$atts = array_filter( $this->get_shortcode_defaults( null, $atts ) );		
		}

		$intense_tab_array[] = array_merge( array( 'content' => $content ), is_array( $atts ) ? $atts : array() );

		return '';
	}
}