<?php

if(!function_exists('mascot_core_educacion_sc_video_popup_vc_map_modifier')) {
	/**
	 * Shortcodes vc_map modifier
	 */
	function mascot_core_educacion_sc_video_popup_vc_map_modifier( $shortcode_base ) {
		//vc_remove_param( $shortcode_base, "display_type" );
		//vc_add_param( $shortcode_base, $attributes );
		//vc_add_params( $shortcode_base, $attributes );
	}
}



if(!function_exists('mascot_core_educacion_sc_video_popup_render')) {
	/**
	 * Renders shortcodes HTML
	 */
	function mascot_core_educacion_sc_video_popup_render( $attr, $content = null ) {

		$args = array(
			'custom_css_class' => '',
			'design_style' => '',

			'title' => '',


			'style1_featured_image' => '',
			'style1_featured_image_size' => '',
			'style1_featured_play_btn' => '',

			'style2_play_btn' => '',
			'style2_pre_packaged_play_btn' => '',
			
			'popup_video_url' => '#',

			'css' => '',
		);
		$params = shortcode_atts($args, $attr);

		//classes
		$classes = array();
		$classes[] = $params['custom_css_class'];
		$classes[] = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $params['css'], ' ' ) );
		$params['classes'] = $classes;

		
		wp_enqueue_script( 'nivo-lightbox' );
		wp_enqueue_style( 'nivo-lightbox' );
		wp_enqueue_style( 'nivo-lightbox-theme' );
		//Produce HTML version by using the parameters (filename, variation, folder name, parameters, shortcode_ob_start)
		$html = educacion_mascot_get_shortcode_template_part( 'video-popup', $params['design_style'], 'video-popup/tpl', $params, true );
		
		return $html;
	}
}