image_right_click; if (!$from) { $theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1); $theme_row = WDWLibrary::get_theme_row_data($theme_id); if (!$theme_row) { echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error'); return; } $gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0); $sort_by = (isset($params['sort_by']) ? esc_html($params['sort_by']) : 'order'); $slideshow_effect = (isset($params['slideshow_effect']) ? esc_html($params['slideshow_effect']) : 'fade'); $enable_slideshow_autoplay = (isset($params['enable_slideshow_autoplay']) ? esc_html($params['enable_slideshow_autoplay']) : 0); $enable_slideshow_shuffle = (isset($params['enable_slideshow_shuffle']) ? esc_html($params['enable_slideshow_shuffle']) : 0); $enable_slideshow_ctrl = (isset($params['enable_slideshow_ctrl']) ? esc_html($params['enable_slideshow_ctrl']) : 0); $enable_slideshow_filmstrip = FALSE; $slideshow_filmstrip_height = 0; $slideshow_filmstrip_width = 0; $enable_image_title = (isset($params['slideshow_enable_title']) ? esc_html($params['slideshow_enable_title']) : 0); $slideshow_title_position = explode('-', (isset($params['slideshow_title_position']) ? esc_html($params['slideshow_title_position']) : 'bottom-right')); $enable_image_description = (isset($params['slideshow_enable_description']) ? esc_html($params['slideshow_enable_description']) : 0); $slideshow_description_position = explode('-', (isset($params['slideshow_description_position']) ? esc_html($params['slideshow_description_position']) : 'bottom-right')); $enable_slideshow_music = (isset($params['enable_slideshow_music']) ? esc_html($params['enable_slideshow_music']) : 0); $slideshow_music_url = (isset($params['slideshow_music_url']) ? esc_html($params['slideshow_music_url']) : ''); $image_width = (isset($params['slideshow_width']) ? esc_html($params['slideshow_width']) : '800'); $image_height = (isset($params['slideshow_height']) ? esc_html($params['slideshow_height']) : '600'); $slideshow_interval = (isset($params['slideshow_interval']) ? esc_html($params['slideshow_interval']) : 5); $watermark_type = (isset($params['watermark_type']) ? esc_html($params['watermark_type']) : 'none'); $watermark_text = (isset($params['watermark_text']) ? esc_html($params['watermark_text']) : ''); $watermark_font_size = (isset($params['watermark_font_size']) ? esc_html($params['watermark_font_size']) : 12); $watermark_font = (isset($params['watermark_font']) ? esc_html($params['watermark_font']) : 'Arial'); $watermark_color = (isset($params['watermark_color']) ? esc_html($params['watermark_color']) : 'FFFFFF'); $watermark_opacity = (isset($params['watermark_opacity']) ? esc_html($params['watermark_opacity']) : 30); $watermark_position = explode('-', (isset($params['watermark_position']) ? esc_html($params['watermark_position']) : 'bottom-right')); $watermark_link = (isset($params['watermark_link']) ? esc_html($params['watermark_link']) : ''); $watermark_url = (isset($params['watermark_url']) ? esc_html($params['watermark_url']) : ''); $watermark_width = (isset($params['watermark_width']) ? esc_html($params['watermark_width']) : 90); $watermark_height = (isset($params['watermark_height']) ? esc_html($params['watermark_height']) : 90); $slideshow_effect_duration = (isset($params['slideshow_effect_duration']) ? esc_html($params['slideshow_effect_duration']) : 1); } else { $theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 0); $theme_row = WDWLibrary::get_theme_row_data($theme_id); if (!$theme_row) { echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'wd_error'); return; } $gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0); $sort_by = 'order'; $slideshow_effect = (isset($params['effect']) ? esc_html($params['effect']) : 'fade'); $enable_slideshow_autoplay = (isset($params['enable_autoplay']) ? esc_html($params['enable_autoplay']) : $options_row->slideshow_enable_autoplay); $enable_slideshow_shuffle = (isset($params['shuffle']) ? esc_html($params['shuffle']) : 0); $enable_slideshow_ctrl = (isset($params['enable_ctrl_btn']) ? esc_html($params['enable_ctrl_btn']) : $options_row->slideshow_enable_ctrl); $enable_slideshow_filmstrip = FALSE; $slideshow_filmstrip_height = 0; $slideshow_filmstrip_width = 0; $enable_image_title = $options_row->slideshow_enable_title; $slideshow_title_position = explode('-', $options_row->slideshow_title_position); $enable_image_description = $options_row->slideshow_enable_description; $slideshow_description_position = explode('-', $options_row->slideshow_description_position); $enable_slideshow_music = $options_row->slideshow_enable_music; $slideshow_music_url = $options_row->slideshow_audio_url; $slideshow_effect_duration = isset($options_row->slideshow_effect_duration) ? $options_row->slideshow_effect_duration : 1; $image_width = (isset($params['width']) ? esc_html($params['width']) : '800'); $image_height = (isset($params['height']) ? esc_html($params['height']) : '600'); $slideshow_interval = (isset($params['interval']) ? esc_html($params['interval']) : 5); $watermark_type = $options_row->watermark_type; $watermark_text = $options_row->watermark_text; $watermark_font_size = $options_row->watermark_font_size; $watermark_font = $options_row->watermark_font; $watermark_color = $options_row->watermark_color; $watermark_opacity = $options_row->watermark_opacity; $watermark_position = explode('-', $options_row->watermark_position); $watermark_link = urlencode($options_row->watermark_link); $watermark_url = urlencode($options_row->watermark_url); $watermark_width = $options_row->watermark_width; $watermark_height = $options_row->watermark_height; } $gallery_row = WDWLibrary::get_gallery_row_data($gallery_id); if (!$gallery_row && $params["tag"] == 0) { echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'wd_error'); return; } $image_rows = WDWLibrary::get_image_rows_data($gallery_id, $bwg, 'slideshow', '', $params['tag'], '', '', $sort_by, $order_by); $image_rows = $image_rows['images']; $images_count = count($image_rows); if (!$images_count) { if ($params['tag']) { echo WDWLibrary::message(__('There are no images.', 'bwg'), 'wd_error'); } else { echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'wd_error'); } } $current_image_id = ($image_rows ? $image_rows[0]->id : 0); $play_pause_button_display = 'undefined'; $filmstrip_thumb_margin = $theme_row->slideshow_filmstrip_thumb_margin; $margins_split = explode(" ", $filmstrip_thumb_margin); $temp_iterator = 1; if (isset($margins_split[$temp_iterator])) { $filmstrip_thumb_margin_right = (int) $margins_split[$temp_iterator]; if (isset($margins_split[$temp_iterator + 2])) { $filmstrip_thumb_margin_left = (int) $margins_split[$temp_iterator + 2]; } else { $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right; } } elseif (isset($margins_split[0])) { $filmstrip_thumb_margin_right = (int) $margins_split[0]; $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right; } $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left; ?>
$image_row) { if ($image_row->id == $current_image_id) { $current_pos = $key * ($slideshow_filmstrip_width + 2); $current_key = $key; } ?>
$image_row) { $is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false; $is_embed_video = ($is_embed && preg_match('/_VIDEO/',$image_row->filetype)==1) ? true :false; $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false; if ($image_row->id == $current_image_id) { $current_key = $key; ?> <?php echo $image_row->alt; ?> resolution); if (is_array($image_resolution)) { $instagram_post_width = $image_resolution[0]; $instagram_post_height = explode(' ', $image_resolution[1]); $instagram_post_height = $instagram_post_height[0]; } WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class' => "bwg_embed_frame_" . $bwg, 'data-width' => $instagram_post_width, 'data-height' => $instagram_post_height, 'frameborder' => "0", 'style' => "width:" . $post_width . "px; height:" . $post_height . "px; vertical-align:middle; display:inline-block; position:relative;")); } else{ WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"bwg_embed_frame_".$bwg, 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;")); } ?> <?php echo $image_row->alt; ?> resolution); if (is_array($image_resolution)) { $instagram_post_width = $image_resolution[0]; $instagram_post_height = explode(' ', $image_resolution[1]); $instagram_post_height = $instagram_post_height[0]; } WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"bwg_embed_frame_".$bwg, 'data-width' => $instagram_post_width, 'data-height' => $instagram_post_height, 'frameborder'=>"0", 'style'=>"width:".$post_width."px; height:".$post_height."px; vertical-align:middle; display:inline-block; position:relative;")); } else{ WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('class'=>"bwg_embed_frame_".$bwg, 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"width:inherit; height:inherit; vertical-align:middle; display:table-cell;")); } ?>
'), $current_image_description)); ?>