HEX
Server: LiteSpeed
System: Linux premium221.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: madepabj (2566)
PHP: 8.3.26
Disabled: NONE
Upload Files
File: //home/madepabj/hc-cosmetics.com/wp-content/plugins/dbea-shortcodes/shortcodes/sns_popup_video.php
<?php
// SNS Info Box
add_shortcode('sns_popup_video', 'dbea_popup_video_template');
add_action('vc_after_init', 'dbea_popup_video_settings');
function dbea_popup_video_template($atts, $content = null) {
    ob_start();
    if ($template = dbea_shortcode_template('sns_popup_video'))
        include $template;
    return ob_get_clean();
}
function dbea_popup_video_settings() {
	$extra_class = dbea_extra_class();
    vc_map( array(
		"name"  => esc_html__("SNS Popup Video", 'dbea-shortcodes'),
		"base" => "sns_popup_video",
		"show_settings_on_create" => true ,
		"is_container" => false ,
		"icon" => "vc_icon_snstheme",
		"class" => "vc_icon_snstheme",
		"content_element" => true ,
		"category" => esc_html__('DBea', 'dbea-shortcodes'),
		'description' => esc_html__( 'Popup video', 'dbea-shortcodes' ),
		"params" => array(
			array(
				"type" => "dropdown",
				"class" => "",
				"heading" => esc_html__("Select style",'dbea-shortcodes'),
				"param_name" => "style",
				"value" => array(
					esc_html__("Style1",'dbea-shortcodes') =>  '1',
					esc_html__("Style2",'dbea-shortcodes') => '2',
				),
				"admin_label" => true,
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Video link", 'dbea-shortcodes'),
				"param_name" => "video_link" ,
				"description" => esc_html__("You can use video url from Youtube, Vimeo", 'dbea-shortcodes'),
				"value" => "",
			),
			array(
		      "type" => "attach_image",
		      "heading" => esc_html__("Background image for video", 'dbea-shortcodes'),
		      "param_name" => "bg_image_video",
		    ),
		    array(
				"type" => "textfield",
				"heading" => esc_html__("Height for wrap", 'dbea-shortcodes'),
				"param_name" => "height_wrap" ,
				"value" => esc_html__("680px", 'dbea-shortcodes')
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Title", 'dbea-shortcodes'),
				"param_name" => "title",
				"value" => esc_html__("Your Title Here ...",'dbea-shortcodes'),
				"admin_label" => true 
			),
			array(
				"type" => "textfield",
				"heading" => esc_html__("Sub title", 'dbea-shortcodes'),
				"param_name" => "sub_title" ,
				"value" => esc_html__("Your sub title here ...",'dbea-shortcodes'),
				"description" => esc_html__("It's margin-top for title, example: 5px", 'dbea-shortcodes')
			),
			 array(
				'type' => 'vc_link',
				'heading' => esc_html__( 'Link to product', 'dbea-shortcodes' ),
				'param_name' => 'clink',
				//"admin_label" => true,
				'dependency' => array(
					'element' => 'style',
					'value' => array('2'),
				),
			),
			$extra_class,
			vc_map_add_css_animation(),
		)
	));
}