"Advanced LightBox",
"category" => 'Advanced Elements',
"description" => "Create a nice gallary",
"base" => "awavc_lightbox_style",
"class" => "",
"icon" => "light_box_icon",
"params" => array(
array(
"type" => "dropdown",
"class" => "",
"heading" => __("Light Box Styles", "awavcl"),
"param_name" => "light_box_style",
"value" => array(
__("style 1","awavcl") => 'light_box_1',
__("style 2","awavcl") => 'light_box_2',
__("style 3","awavcl") => 'light_box_3',
),
"admin_label" => true,
),
array(
"type" => "dropdown",
"class" => "",
"heading" => __("Column", "awavcl"),
"param_name" => "column",
"value" => array(
__("1 Col","awavcl") => '12',
__("2 Col","awavcl") => '6',
__("3 Col","awavcl") => '4',
__("4 Col","awavcl") => '3',
__("6 Col","awavcl") => '2',
),
),
array(
"type" => "textfield",
"heading" => __("Give a Name", 'awavcl'),
"param_name" => "title",
"description" => __("", 'awavcl'),
"value" => __("Title", 'awavcl'),
),
array(
'type' => 'param_group',
'heading' => __( 'Gallary', 'awavcl' ),
'param_name' => 'gallary_content',
'params' => array(
array(
"type" => "attach_image",
"heading" => __("Image to Show", "awavcl"),
"param_name" => "image",
"value" => "",
"description" => __("", "awavcl"),
),
array(
"type" => "attach_image",
"heading" => __("Image to Open", "awavcl"),
"param_name" => "image_1",
"value" => "",
"description" => __("If you leave it blank Same Image will open", "awavcl"),
"dependency" => array( 'element' => "light_box_style", 'value' => array('light_box_2','light_box_3') ),
),
),
),
array(
'type' => 'prime_slider',
'heading' => __( 'Image Height', 'awavcl' ),
'param_name' => 'img_hite',
"value" => 300,
"min" => 5,
"max" => 800,
"step" => 1,
"unit" => "px",
"description" => __("Give a specfic Height to your image", "awavcl"),
"group" => __("Settings", 'awavcl'),
),
array(
"type" => "colorpicker",
"heading" => __("Overlay Color", 'awavcl'),
"param_name" => "bg_color",
"value" => "",
"group" => __("Colors", 'awavcl'),
),
)
));
function awavc_lightbox_style_shortcode($atts, $content = null) {
extract(shortcode_atts(array(
//'show_btnnnn' => 'Yes',
'light_box_style' => 'light_box_1',
'gallary_content' => '',
'title' => '',
'column' => '',
'img_hite' => '',
'bg_color' => '',
), $atts));
wp_register_style( 'awavcl.style-light', plugins_url( '/css/style-light.css', __FILE__) );
wp_enqueue_style( 'awavcl.style-light' );
if($light_box_style == 'light_box_1'){
wp_register_script('adv-main-light', plugins_url('/js/main.js', __FILE__), array('jquery'));
wp_enqueue_script('adv-main-light');
}
if($light_box_style == 'light_box_3'){
wp_register_script('adv-picbox-light', plugins_url('/js/adlb-light.js', __FILE__), array('jquery'));
wp_enqueue_script('adv-picbox-light');
}
//$image_url = wp_get_attachment_url( $image, 'full' );
//$image = aq_resize( $image_url, 296, 289, false ); //resize & crop the image
//var_dump($image);
$html = '';
if($light_box_style == 'light_box_1') {
$add_class = (rand(99,9999));
$html .= '