<?php

class Intense_Emphasis extends Intense_Shortcode {

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

		global $intense_visions_options;

		$this->title = __( 'Emphasis', 'intense' );
		$this->description = __( 'Add an emphasis paragraph or span to your posts and pages. The emphasis shortcode adds a colored paragraph or span which can be useful for making a paragraph stand out. Often this is used to highlight the first or last paragraph of text. It is also useful in the middle of text if you want to draw attention to a paragraph.', 'intense' );
		$this->category = __( 'Typography', 'intense' );
		$this->show_preview = true;
		$this->preview_content = __( "Emphasis Paragraph", 'intense' );
		$this->vc_map_content = 'textfield';		
	}

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

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

		return "<" . ( isset( $tag ) ? "$tag" : 'p' ) . $id . $class . " style='color: " . $color . ";'>" . do_shortcode( $content ) . "</" . ( isset( $tag ) ? "$tag" : 'p' ) . ">";
	}
}
