<?php

class Intense_Lead extends Intense_Shortcode {

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

		global $intense_visions_options;

		$this->title = __( 'Lead', 'intense' );
		$this->description = __( 'The lead shortcode shows a paragraph used to lead out articles. Lead (lede) paragraphs stand out and are used to give your reader the main idea of your post. Use the lead to grab the attention of your reader.
			<br><br>
			To give the lead paragraph more emphasis, you can also change the color.', 'intense' );
		$this->category = __( 'Typography', 'intense' );
		$this->show_preview = true;
		$this->preview_content = __( "Lead Paragraph", 'intense' );
		$this->vc_map_content = 'textarea';
	}

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

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

		if ( !empty( $font_color ) ) {			
			$style = "color: " . $font_color . ";";
		}

		return "<p" . $id . " class='intense lead" . ( !empty( $class ) ? ' ' . $class : '' ) . "' style='$style'>" . do_shortcode( $content ) . "</p>";
	}
}
