Version Description
New: Bottom pagination in admin views. New: Improve SEO. New: Autohide option for slideshow and lightbox navigation buttons. New: Read image meta data. Fixed: Slideshow bullets centering. Fixed: Admin-ajax url for frontend. Fixed: Upload images to .original not resized. Fixed: Order by filename.
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.2.18 |
Comparing to | |
See all releases |
Code changes from version 1.2.17 to 1.2.18
- admin/controllers/BWGControllerAlbums_bwg.php +5 -0
- admin/controllers/BWGControllerBWGShortcode.php +3 -1
- admin/controllers/BWGControllerGalleries_bwg.php +3 -2
- admin/controllers/BWGControllerOptions_bwg.php +18 -4
- admin/controllers/BWGControllerTags_bwg.php +11 -0
- admin/controllers/BWGControllerThemes_bwg.php +181 -1
- admin/models/BWGModelGalleries_bwg.php +4 -0
- admin/models/BWGModelOptions_bwg.php +8 -3
- admin/views/BWGViewAddAlbumsGalleries.php +8 -2
- admin/views/BWGViewAddTags.php +7 -1
- admin/views/BWGViewAlbums_bwg.php +22 -12
- admin/views/BWGViewBWGShortcode.php +6 -6
- admin/views/BWGViewEditThumb.php +7 -5
- admin/views/BWGViewGalleries_bwg.php +16 -6
- admin/views/BWGViewOptions_bwg.php +41 -11
- admin/views/BWGViewTags_bwg.php +7 -2
- admin/views/BWGViewThemes_bwg.php +10 -4
- admin/views/BWGViewWidget.php +12 -11
- admin/views/BWGViewWidgetSlideshow.php +2 -2
- css/bwg_frontend.css +8 -1
- css/bwg_tables.css +2 -3
- filemanager/UploadHandler.php +10 -7
- filemanager/model.php +7 -10
- filemanager/view.php +5 -1
- framework/WDWLibrary.php +94 -64
- framework/WDWLibraryEmbed.php +0 -4
- frontend/models/BWGModelAlbum_compact_preview.php +8 -8
- frontend/models/BWGModelAlbum_extended_preview.php +8 -8
- frontend/models/BWGModelGalleryBox.php +3 -3
- frontend/models/BWGModelImage_browser.php +6 -6
- frontend/models/BWGModelSlideshow.php +2 -2
- frontend/models/BWGModelThumbnails.php +6 -6
- frontend/views/BWGViewAlbum_compact_preview.php +95 -103
- frontend/views/BWGViewAlbum_extended_preview.php +70 -84
- frontend/views/BWGViewGalleryBox.php +20 -1
- frontend/views/BWGViewImage_browser.php +23 -9
- frontend/views/BWGViewSlideshow.php +46 -43
- frontend/views/BWGViewThumbnails.php +69 -62
- images/thumbnails_masonry.jpg +0 -0
- js/3DEngine/3DEngine.js +0 -198
- js/3DEngine/Sphere.js +0 -18
- js/bwg.js +15 -23
- js/bwg_embed.js +1 -1
- js/bwg_frontend.js +15 -10
- js/bwg_shortcode.js +3 -3
- photo-gallery.php +54 -34
- readme.txt +12 -1
- update/bwg_update.php +14 -2
admin/controllers/BWGControllerAlbums_bwg.php
CHANGED
@@ -21,11 +21,15 @@ class BWGControllerAlbums_bwg {
|
|
21 |
public function execute() {
|
22 |
$task = WDWLibrary::get('task');
|
23 |
$id = WDWLibrary::get('current_id', 0);
|
|
|
|
|
24 |
if($task != ''){
|
25 |
if(!WDWLibrary::verify_nonce('albums_bwg')){
|
26 |
die('Sorry, your nonce did not verify.');
|
27 |
}
|
28 |
}
|
|
|
|
|
29 |
$message = WDWLibrary::get('message');
|
30 |
echo WDWLibrary::message_id($message);
|
31 |
if (method_exists($this, $task)) {
|
@@ -350,6 +354,7 @@ class BWGControllerAlbums_bwg {
|
|
350 |
public function save_order($flag = TRUE) {
|
351 |
global $wpdb;
|
352 |
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
|
|
353 |
if ($album_ids_col) {
|
354 |
foreach ($album_ids_col as $album_id) {
|
355 |
if (isset($_POST['order_input_' . $album_id])) {
|
21 |
public function execute() {
|
22 |
$task = WDWLibrary::get('task');
|
23 |
$id = WDWLibrary::get('current_id', 0);
|
24 |
+
|
25 |
+
|
26 |
if($task != ''){
|
27 |
if(!WDWLibrary::verify_nonce('albums_bwg')){
|
28 |
die('Sorry, your nonce did not verify.');
|
29 |
}
|
30 |
}
|
31 |
+
|
32 |
+
|
33 |
$message = WDWLibrary::get('message');
|
34 |
echo WDWLibrary::message_id($message);
|
35 |
if (method_exists($this, $task)) {
|
354 |
public function save_order($flag = TRUE) {
|
355 |
global $wpdb;
|
356 |
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
357 |
+
$message = 0;
|
358 |
if ($album_ids_col) {
|
359 |
foreach ($album_ids_col as $album_id) {
|
360 |
if (isset($_POST['order_input_' . $album_id])) {
|
admin/controllers/BWGControllerBWGShortcode.php
CHANGED
@@ -20,7 +20,7 @@ class BWGControllerBWGShortcode {
|
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
$task = WDWLibrary::get('task');
|
23 |
-
|
24 |
$from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
|
25 |
|
26 |
if($task != '' && $from_menu){
|
@@ -28,6 +28,8 @@ class BWGControllerBWGShortcode {
|
|
28 |
die('Sorry, your nonce did not verify.');
|
29 |
}
|
30 |
}
|
|
|
|
|
31 |
if (method_exists($this, $task)) {
|
32 |
$this->$task();
|
33 |
}
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
$task = WDWLibrary::get('task');
|
23 |
+
|
24 |
$from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
|
25 |
|
26 |
if($task != '' && $from_menu){
|
28 |
die('Sorry, your nonce did not verify.');
|
29 |
}
|
30 |
}
|
31 |
+
|
32 |
+
|
33 |
if (method_exists($this, $task)) {
|
34 |
$this->$task();
|
35 |
}
|
admin/controllers/BWGControllerGalleries_bwg.php
CHANGED
@@ -27,6 +27,7 @@ class BWGControllerGalleries_bwg {
|
|
27 |
die('Sorry, your nonce did not verify.');
|
28 |
}
|
29 |
}
|
|
|
30 |
if (method_exists($this, $task)) {
|
31 |
$this->$task($id);
|
32 |
}
|
@@ -794,7 +795,7 @@ class BWGControllerGalleries_bwg {
|
|
794 |
$i = 0;
|
795 |
$random_preview_image = '';
|
796 |
while (isset($_POST['thumb_url_pr_' . $i]) && isset($_POST["input_filetype_pr_" . $i])) {
|
797 |
-
/*if ($_POST["input_filetype_pr_" . $i] == "JPG" || $_POST["input_filetype_pr_" . $i] == "PNG" || $_POST["input_filetype_pr_" . $i] == "GIF")*/ {
|
798 |
$random_preview_image = esc_html(stripslashes($_POST['thumb_url_pr_' . $i]));
|
799 |
break;
|
800 |
}
|
@@ -802,6 +803,7 @@ class BWGControllerGalleries_bwg {
|
|
802 |
}
|
803 |
}
|
804 |
}
|
|
|
805 |
$published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
|
806 |
if ($id != 0) {
|
807 |
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array(
|
@@ -825,7 +827,6 @@ class BWGControllerGalleries_bwg {
|
|
825 |
'author' => get_current_user_id(),
|
826 |
'published' => $published,
|
827 |
), array(
|
828 |
-
'%s',
|
829 |
'%s',
|
830 |
'%s',
|
831 |
'%s',
|
27 |
die('Sorry, your nonce did not verify.');
|
28 |
}
|
29 |
}
|
30 |
+
|
31 |
if (method_exists($this, $task)) {
|
32 |
$this->$task($id);
|
33 |
}
|
795 |
$i = 0;
|
796 |
$random_preview_image = '';
|
797 |
while (isset($_POST['thumb_url_pr_' . $i]) && isset($_POST["input_filetype_pr_" . $i])) {
|
798 |
+
/*if ($_POST["input_filetype_pr_" . $i] == "JPG" || $_POST["input_filetype_pr_" . $i] == "PNG" || $_POST["input_filetype_pr_" . $i] == "GIF")*/ {
|
799 |
$random_preview_image = esc_html(stripslashes($_POST['thumb_url_pr_' . $i]));
|
800 |
break;
|
801 |
}
|
803 |
}
|
804 |
}
|
805 |
}
|
806 |
+
|
807 |
$published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
|
808 |
if ($id != 0) {
|
809 |
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array(
|
827 |
'author' => get_current_user_id(),
|
828 |
'published' => $published,
|
829 |
), array(
|
|
|
830 |
'%s',
|
831 |
'%s',
|
832 |
'%s',
|
admin/controllers/BWGControllerOptions_bwg.php
CHANGED
@@ -21,13 +21,14 @@ class BWGControllerOptions_bwg {
|
|
21 |
public function execute() {
|
22 |
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
$id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
24 |
-
|
25 |
if($task != ''){
|
26 |
if(!WDWLibrary::verify_nonce('options_bwg')){
|
27 |
die('Sorry, your nonce did not verify.');
|
28 |
}
|
29 |
}
|
30 |
|
|
|
31 |
if (method_exists($this, $task)) {
|
32 |
$this->$task($id);
|
33 |
}
|
@@ -102,7 +103,7 @@ class BWGControllerOptions_bwg {
|
|
102 |
$thumb_height = (isset($_POST['thumb_height']) ? esc_html(stripslashes($_POST['thumb_height'])) : 90);
|
103 |
$upload_thumb_width = (isset($_POST['upload_thumb_width']) ? esc_html(stripslashes($_POST['upload_thumb_width'])) : 300);
|
104 |
$upload_thumb_height = (isset($_POST['upload_thumb_height']) ? esc_html(stripslashes($_POST['upload_thumb_height'])) : 300);
|
105 |
-
|
106 |
$upload_img_height = (isset($_POST['upload_img_height']) ? esc_html(stripslashes($_POST['upload_img_height'])) : 1200);
|
107 |
$image_enable_page = (isset($_POST['image_enable_page']) ? esc_html(stripslashes($_POST['image_enable_page'])) : 1);
|
108 |
$image_title_show_hover = (isset($_POST['image_title_show_hover']) ? esc_html(stripslashes($_POST['image_title_show_hover'])) : 'none');
|
@@ -194,6 +195,10 @@ class BWGControllerOptions_bwg {
|
|
194 |
$comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
|
195 |
$popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
|
196 |
$enable_ML_import = (isset($_POST['enable_ML_import']) ? esc_html(stripslashes($_POST['enable_ML_import'])) : 0);
|
|
|
|
|
|
|
|
|
197 |
$showthumbs_name = (isset($_POST['thumb_name']) ? esc_html(stripslashes($_POST['thumb_name'])) : 1);
|
198 |
$show_album_name = (isset($_POST['show_album_name_enable']) ? esc_html(stripslashes($_POST['show_album_name_enable'])) : 1);
|
199 |
$show_image_counts = (isset($_POST['show_image_counts']) ? esc_html(stripslashes($_POST['show_image_counts'])) : 0);
|
@@ -201,7 +206,10 @@ class BWGControllerOptions_bwg {
|
|
201 |
$show_masonry_thumb_description = (isset($_POST['show_masonry_thumb_description']) ? esc_html(stripslashes($_POST['show_masonry_thumb_description'])) : 0);
|
202 |
$popup_info_full_width = (isset($_POST['popup_info_full_width']) ? esc_html(stripslashes($_POST['popup_info_full_width'])) : 0);
|
203 |
$show_sort_images = (isset($_POST['show_sort_images']) ? esc_html(stripslashes($_POST['show_sort_images'])) : 0);
|
204 |
-
|
|
|
|
|
|
|
205 |
|
206 |
$save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
|
207 |
'images_directory' => $images_directory,
|
@@ -307,6 +315,8 @@ class BWGControllerOptions_bwg {
|
|
307 |
'comment_moderation' => $comment_moderation,
|
308 |
'popup_hit_counter' => $popup_hit_counter,
|
309 |
'enable_ML_import' => $enable_ML_import,
|
|
|
|
|
310 |
'showthumbs_name' => $showthumbs_name,
|
311 |
'show_album_name' => $show_album_name,
|
312 |
'show_image_counts' => $show_image_counts,
|
@@ -314,7 +324,10 @@ class BWGControllerOptions_bwg {
|
|
314 |
'show_masonry_thumb_description' => $show_masonry_thumb_description,
|
315 |
'popup_info_full_width' => $popup_info_full_width,
|
316 |
'show_sort_images' => $show_sort_images,
|
317 |
-
'
|
|
|
|
|
|
|
318 |
), array('id' => 1));
|
319 |
|
320 |
if ($save !== FALSE) {
|
@@ -325,6 +338,7 @@ class BWGControllerOptions_bwg {
|
|
325 |
mkdir(ABSPATH . $images_directory . '/photo-gallery', 0777);
|
326 |
}
|
327 |
echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
|
|
|
328 |
}
|
329 |
else {
|
330 |
echo WDWLibrary::message('Error. Please install plugin again.', 'error');
|
21 |
public function execute() {
|
22 |
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
$id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
24 |
+
|
25 |
if($task != ''){
|
26 |
if(!WDWLibrary::verify_nonce('options_bwg')){
|
27 |
die('Sorry, your nonce did not verify.');
|
28 |
}
|
29 |
}
|
30 |
|
31 |
+
|
32 |
if (method_exists($this, $task)) {
|
33 |
$this->$task($id);
|
34 |
}
|
103 |
$thumb_height = (isset($_POST['thumb_height']) ? esc_html(stripslashes($_POST['thumb_height'])) : 90);
|
104 |
$upload_thumb_width = (isset($_POST['upload_thumb_width']) ? esc_html(stripslashes($_POST['upload_thumb_width'])) : 300);
|
105 |
$upload_thumb_height = (isset($_POST['upload_thumb_height']) ? esc_html(stripslashes($_POST['upload_thumb_height'])) : 300);
|
106 |
+
$upload_img_width = (isset($_POST['upload_img_width']) ? esc_html(stripslashes($_POST['upload_img_width'])) : 1200);
|
107 |
$upload_img_height = (isset($_POST['upload_img_height']) ? esc_html(stripslashes($_POST['upload_img_height'])) : 1200);
|
108 |
$image_enable_page = (isset($_POST['image_enable_page']) ? esc_html(stripslashes($_POST['image_enable_page'])) : 1);
|
109 |
$image_title_show_hover = (isset($_POST['image_title_show_hover']) ? esc_html(stripslashes($_POST['image_title_show_hover'])) : 'none');
|
195 |
$comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
|
196 |
$popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
|
197 |
$enable_ML_import = (isset($_POST['enable_ML_import']) ? esc_html(stripslashes($_POST['enable_ML_import'])) : 0);
|
198 |
+
$autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : 30);
|
199 |
+
/*minimum autoupdate interval is 1 min*/
|
200 |
+
$autoupdate_interval = ($autoupdate_interval >= 1 ? $autoupdate_interval : 1 );
|
201 |
+
$instagram_client_id = (isset($_POST['instagram_client_id']) ? esc_html(stripslashes($_POST['instagram_client_id'])) : '');
|
202 |
$showthumbs_name = (isset($_POST['thumb_name']) ? esc_html(stripslashes($_POST['thumb_name'])) : 1);
|
203 |
$show_album_name = (isset($_POST['show_album_name_enable']) ? esc_html(stripslashes($_POST['show_album_name_enable'])) : 1);
|
204 |
$show_image_counts = (isset($_POST['show_image_counts']) ? esc_html(stripslashes($_POST['show_image_counts'])) : 0);
|
206 |
$show_masonry_thumb_description = (isset($_POST['show_masonry_thumb_description']) ? esc_html(stripslashes($_POST['show_masonry_thumb_description'])) : 0);
|
207 |
$popup_info_full_width = (isset($_POST['popup_info_full_width']) ? esc_html(stripslashes($_POST['popup_info_full_width'])) : 0);
|
208 |
$show_sort_images = (isset($_POST['show_sort_images']) ? esc_html(stripslashes($_POST['show_sort_images'])) : 0);
|
209 |
+
$enable_seo = (isset($_POST['enable_seo']) ? esc_html(stripslashes($_POST['enable_seo'])) : 1);
|
210 |
+
$autohide_lightbox_navigation = (isset($_POST['autohide_lightbox_navigation']) ? esc_html(stripslashes($_POST['autohide_lightbox_navigation'])) : 1);
|
211 |
+
$autohide_slideshow_navigation = (isset($_POST['autohide_slideshow_navigation']) ? esc_html(stripslashes($_POST['autohide_slideshow_navigation'])) : 1);
|
212 |
+
$read_metadata = (isset($_POST['read_metadata']) ? esc_html(stripslashes($_POST['read_metadata'])) : 0);
|
213 |
|
214 |
$save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
|
215 |
'images_directory' => $images_directory,
|
315 |
'comment_moderation' => $comment_moderation,
|
316 |
'popup_hit_counter' => $popup_hit_counter,
|
317 |
'enable_ML_import' => $enable_ML_import,
|
318 |
+
'autoupdate_interval' => $autoupdate_interval,
|
319 |
+
'instagram_client_id' => $instagram_client_id,
|
320 |
'showthumbs_name' => $showthumbs_name,
|
321 |
'show_album_name' => $show_album_name,
|
322 |
'show_image_counts' => $show_image_counts,
|
324 |
'show_masonry_thumb_description' => $show_masonry_thumb_description,
|
325 |
'popup_info_full_width' => $popup_info_full_width,
|
326 |
'show_sort_images' => $show_sort_images,
|
327 |
+
'enable_seo' => $enable_seo,
|
328 |
+
'autohide_lightbox_navigation' => $autohide_lightbox_navigation,
|
329 |
+
'autohide_slideshow_navigation' => $autohide_slideshow_navigation,
|
330 |
+
'read_metadata' => $read_metadata,
|
331 |
), array('id' => 1));
|
332 |
|
333 |
if ($save !== FALSE) {
|
338 |
mkdir(ABSPATH . $images_directory . '/photo-gallery', 0777);
|
339 |
}
|
340 |
echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
|
341 |
+
|
342 |
}
|
343 |
else {
|
344 |
echo WDWLibrary::message('Error. Please install plugin again.', 'error');
|
admin/controllers/BWGControllerTags_bwg.php
CHANGED
@@ -28,6 +28,7 @@ class BWGControllerTags_bwg {
|
|
28 |
}
|
29 |
}
|
30 |
|
|
|
31 |
$message = WDWLibrary::get('message');
|
32 |
echo WDWLibrary::message_id($message);
|
33 |
if (method_exists($this, $task)) {
|
@@ -136,6 +137,7 @@ class BWGControllerTags_bwg {
|
|
136 |
'name' => $name,
|
137 |
'slug' => $slug
|
138 |
));
|
|
|
139 |
/*update data in corresponding posts*/
|
140 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
141 |
$posts = $wpdb->get_results($query2, OBJECT);
|
@@ -146,6 +148,7 @@ class BWGControllerTags_bwg {
|
|
146 |
wp_update_post( $tag_post );
|
147 |
}
|
148 |
}
|
|
|
149 |
if (isset($save->errors)) {
|
150 |
echo 'The slug must be unique.';
|
151 |
}
|
@@ -198,6 +201,7 @@ class BWGControllerTags_bwg {
|
|
198 |
else {
|
199 |
$flag = TRUE;
|
200 |
}
|
|
|
201 |
/*update data in corresponding posts*/
|
202 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
203 |
$posts = $wpdb->get_results($query2, OBJECT);
|
@@ -208,6 +212,7 @@ class BWGControllerTags_bwg {
|
|
208 |
wp_update_post( $tag_post );
|
209 |
}
|
210 |
}
|
|
|
211 |
}
|
212 |
}
|
213 |
if ($flag) {
|
@@ -217,6 +222,7 @@ class BWGControllerTags_bwg {
|
|
217 |
$message = '';
|
218 |
}
|
219 |
$page = WDWLibrary::get('page');
|
|
|
220 |
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
221 |
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
222 |
WDWLibrary::spider_redirect($query_url);
|
@@ -227,6 +233,7 @@ class BWGControllerTags_bwg {
|
|
227 |
wp_delete_term($id, 'bwg_tag');
|
228 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id);
|
229 |
$flag = $wpdb->query($query);
|
|
|
230 |
/*delete corresponding posts and their meta*/
|
231 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
232 |
$posts = $wpdb->get_results($query2, OBJECT);
|
@@ -236,6 +243,8 @@ class BWGControllerTags_bwg {
|
|
236 |
wp_delete_post( $post->ID, true );
|
237 |
}
|
238 |
}
|
|
|
|
|
239 |
if ($flag !== FALSE) {
|
240 |
$message = 3;
|
241 |
}
|
@@ -259,6 +268,7 @@ class BWGControllerTags_bwg {
|
|
259 |
$flag = TRUE;
|
260 |
}
|
261 |
}
|
|
|
262 |
/*delete corresponding posts and their meta*/
|
263 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
264 |
$posts = $wpdb->get_results($query2, OBJECT);
|
@@ -268,6 +278,7 @@ class BWGControllerTags_bwg {
|
|
268 |
wp_delete_post( $post->ID, true );
|
269 |
}
|
270 |
}
|
|
|
271 |
if ($flag) {
|
272 |
$message = 5;
|
273 |
}
|
28 |
}
|
29 |
}
|
30 |
|
31 |
+
|
32 |
$message = WDWLibrary::get('message');
|
33 |
echo WDWLibrary::message_id($message);
|
34 |
if (method_exists($this, $task)) {
|
137 |
'name' => $name,
|
138 |
'slug' => $slug
|
139 |
));
|
140 |
+
|
141 |
/*update data in corresponding posts*/
|
142 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
143 |
$posts = $wpdb->get_results($query2, OBJECT);
|
148 |
wp_update_post( $tag_post );
|
149 |
}
|
150 |
}
|
151 |
+
|
152 |
if (isset($save->errors)) {
|
153 |
echo 'The slug must be unique.';
|
154 |
}
|
201 |
else {
|
202 |
$flag = TRUE;
|
203 |
}
|
204 |
+
|
205 |
/*update data in corresponding posts*/
|
206 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
207 |
$posts = $wpdb->get_results($query2, OBJECT);
|
212 |
wp_update_post( $tag_post );
|
213 |
}
|
214 |
}
|
215 |
+
|
216 |
}
|
217 |
}
|
218 |
if ($flag) {
|
222 |
$message = '';
|
223 |
}
|
224 |
$page = WDWLibrary::get('page');
|
225 |
+
|
226 |
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
227 |
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
228 |
WDWLibrary::spider_redirect($query_url);
|
233 |
wp_delete_term($id, 'bwg_tag');
|
234 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id);
|
235 |
$flag = $wpdb->query($query);
|
236 |
+
|
237 |
/*delete corresponding posts and their meta*/
|
238 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
239 |
$posts = $wpdb->get_results($query2, OBJECT);
|
243 |
wp_delete_post( $post->ID, true );
|
244 |
}
|
245 |
}
|
246 |
+
|
247 |
+
|
248 |
if ($flag !== FALSE) {
|
249 |
$message = 3;
|
250 |
}
|
268 |
$flag = TRUE;
|
269 |
}
|
270 |
}
|
271 |
+
|
272 |
/*delete corresponding posts and their meta*/
|
273 |
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
274 |
$posts = $wpdb->get_results($query2, OBJECT);
|
278 |
wp_delete_post( $post->ID, true );
|
279 |
}
|
280 |
}
|
281 |
+
|
282 |
if ($flag) {
|
283 |
$message = 5;
|
284 |
}
|
admin/controllers/BWGControllerThemes_bwg.php
CHANGED
@@ -21,6 +21,7 @@ class BWGControllerThemes_bwg {
|
|
21 |
public function execute() {
|
22 |
$task = WDWLibrary::get('task');
|
23 |
$id = WDWLibrary::get('current_id', 0);
|
|
|
24 |
|
25 |
if($task != ''){
|
26 |
if(!WDWLibrary::verify_nonce('themes_bwg')){
|
@@ -28,7 +29,6 @@ class BWGControllerThemes_bwg {
|
|
28 |
}
|
29 |
}
|
30 |
|
31 |
-
$message = WDWLibrary::get('message');
|
32 |
echo WDWLibrary::message_id($message);
|
33 |
if (method_exists($this, $task)) {
|
34 |
$this->$task($id);
|
@@ -362,6 +362,34 @@ class BWGControllerThemes_bwg {
|
|
362 |
$album_extended_desc_more_color = (isset($_POST['album_extended_desc_more_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_more_color'])) : '000000');
|
363 |
$album_extended_desc_more_size = (isset($_POST['album_extended_desc_more_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_more_size'])) : 12);
|
364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
$slideshow_cont_bg_color = (isset($_POST['slideshow_cont_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_cont_bg_color'])) : 'FFFFFF');
|
366 |
$slideshow_close_btn_transparent = (isset($_POST['slideshow_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_close_btn_transparent'])) : 80);
|
367 |
$slideshow_rl_btn_bg_color = (isset($_POST['slideshow_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_bg_color'])) : 'FFFFFF');
|
@@ -425,6 +453,23 @@ class BWGControllerThemes_bwg {
|
|
425 |
$masonry_thumb_hover_effect_value = (isset($_POST['masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect_value'])) : '1.3');
|
426 |
$masonry_thumb_transition = (isset($_POST['masonry_thumb_transition']) ? esc_html(stripslashes( $_POST['masonry_thumb_transition'])) : 0);
|
427 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
$lightbox_info_pos = (isset($_POST['lightbox_info_pos']) ? esc_html(stripslashes( $_POST['lightbox_info_pos'])) : 'top');
|
429 |
$lightbox_info_align = (isset($_POST['lightbox_info_align']) ? esc_html(stripslashes( $_POST['lightbox_info_align'])) : 'right');
|
430 |
$lightbox_info_bg_color = (isset($_POST['lightbox_info_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_color'])) : '000000');
|
@@ -798,6 +843,23 @@ class BWGControllerThemes_bwg {
|
|
798 |
'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
|
799 |
'masonry_thumb_transition' => $masonry_thumb_transition,
|
800 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
801 |
'lightbox_info_pos' => $lightbox_info_pos,
|
802 |
'lightbox_info_align' => $lightbox_info_align,
|
803 |
'lightbox_info_bg_color' => $lightbox_info_bg_color,
|
@@ -844,6 +906,34 @@ class BWGControllerThemes_bwg {
|
|
844 |
'masonry_description_color' => $masonry_description_color,
|
845 |
'masonry_description_font_style' => $masonry_description_font_style,
|
846 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
'default_theme' => $default_theme,
|
848 |
), array('id' => $id));
|
849 |
}
|
@@ -1171,6 +1261,23 @@ class BWGControllerThemes_bwg {
|
|
1171 |
'masonry_thumb_hover_effect' => $masonry_thumb_hover_effect,
|
1172 |
'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
|
1173 |
'masonry_thumb_transition' => $masonry_thumb_transition,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1174 |
'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
|
1175 |
|
1176 |
'lightbox_info_pos' => $lightbox_info_pos,
|
@@ -1219,6 +1326,34 @@ class BWGControllerThemes_bwg {
|
|
1219 |
'masonry_description_color' => $masonry_description_color,
|
1220 |
'masonry_description_font_style' => $masonry_description_font_style,
|
1221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1222 |
'default_theme' => $default_theme,
|
1223 |
), array(
|
1224 |
'%s',
|
@@ -1549,7 +1684,24 @@ class BWGControllerThemes_bwg {
|
|
1549 |
'%s',
|
1550 |
'%d',
|
1551 |
'%d',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1552 |
|
|
|
1553 |
'%s',
|
1554 |
'%s',
|
1555 |
'%s',
|
@@ -1592,6 +1744,34 @@ class BWGControllerThemes_bwg {
|
|
1592 |
'%s',
|
1593 |
'%s',
|
1594 |
'%d',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1595 |
'%d',
|
1596 |
'%s',
|
1597 |
'%s',
|
21 |
public function execute() {
|
22 |
$task = WDWLibrary::get('task');
|
23 |
$id = WDWLibrary::get('current_id', 0);
|
24 |
+
$message = WDWLibrary::get('message');
|
25 |
|
26 |
if($task != ''){
|
27 |
if(!WDWLibrary::verify_nonce('themes_bwg')){
|
29 |
}
|
30 |
}
|
31 |
|
|
|
32 |
echo WDWLibrary::message_id($message);
|
33 |
if (method_exists($this, $task)) {
|
34 |
$this->$task($id);
|
362 |
$album_extended_desc_more_color = (isset($_POST['album_extended_desc_more_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_more_color'])) : '000000');
|
363 |
$album_extended_desc_more_size = (isset($_POST['album_extended_desc_more_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_more_size'])) : 12);
|
364 |
|
365 |
+
$album_masonry_title_margin = (isset($_POST['album_masonry_title_margin']) ? esc_html(stripslashes( $_POST['album_masonry_title_margin'])) : '');
|
366 |
+
$album_masonry_title_font_style = (isset($_POST['album_masonry_title_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_style'])) : 'inherit');
|
367 |
+
$album_masonry_thumb_title_pos = (isset($_POST['album_masonry_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_title_pos'])) :'bottom');
|
368 |
+
$album_masonry_title_font_color = (isset($_POST['album_masonry_title_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_color'])) : 'CCCCCC');
|
369 |
+
$album_masonry_title_shadow = (isset($_POST['album_masonry_title_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_title_shadow'])) : '');
|
370 |
+
$album_masonry_title_font_size = (isset($_POST['album_masonry_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_title_font_size'])) : 12);
|
371 |
+
$album_masonry_title_font_weight = (isset($_POST['album_masonry_title_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_weight'])) : 'normal');
|
372 |
+
$album_masonry_thumb_margin = (isset($_POST['album_masonry_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_margin'])) : 0);
|
373 |
+
$album_masonry_back_padding = (isset($_POST['album_masonry_back_padding']) ? esc_html(stripslashes( $_POST['album_masonry_back_padding'])) : '');
|
374 |
+
$album_masonry_thumb_padding = (isset($_POST['album_masonry_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_padding'])) : 0);
|
375 |
+
$album_masonry_thumb_border_radius = (isset($_POST['album_masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_radius'])) :'');
|
376 |
+
$album_masonry_thumb_border_width = (isset($_POST['album_masonry_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_border_width'])) : 1);
|
377 |
+
$album_masonry_back_font_color = (isset($_POST['album_masonry_back_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_color'])) : '000000');
|
378 |
+
$album_masonry_thumb_bg_transparent = (isset($_POST['album_masonry_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_bg_transparent'])) : 0);
|
379 |
+
$album_masonry_thumb_box_shadow = (isset($_POST['album_masonry_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_box_shadow'])) : '');
|
380 |
+
$album_masonry_thumb_transition = (isset($_POST['album_masonry_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transition'])) : 1);
|
381 |
+
$album_masonry_thumb_border_style = (isset($_POST['album_masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_style'])) : 'solid');
|
382 |
+
$album_masonry_thumb_border_color = (isset($_POST['album_masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_color'])) : '000000');
|
383 |
+
$album_masonry_thumb_bg_color = (isset($_POST['album_masonry_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_bg_color'])) : 'FFFFFF');
|
384 |
+
$album_masonry_back_font_weight = (isset($_POST['album_masonry_back_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_weight'])) : 'normal');
|
385 |
+
$album_masonry_back_font_size = (isset($_POST['album_masonry_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_back_font_size'])) : 12);
|
386 |
+
$album_masonry_back_font_style = (isset($_POST['album_masonry_back_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_style'])) : 'inherit');
|
387 |
+
$album_masonry_thumbs_bg_color = (isset($_POST['album_masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumbs_bg_color'])) : 'FFFFFF');
|
388 |
+
$album_masonry_thumb_align = (isset($_POST['album_masonry_thumb_align']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_align'])) : 'center');
|
389 |
+
$album_masonry_thumb_hover_effect = (isset($_POST['album_masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect'])) :'skew');
|
390 |
+
$album_masonry_thumb_transparent = (isset($_POST['album_masonry_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transparent'])) : 80);
|
391 |
+
$album_masonry_thumb_hover_effect_value = (isset($_POST['album_masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect_value'])) : '35deg');
|
392 |
+
|
393 |
$slideshow_cont_bg_color = (isset($_POST['slideshow_cont_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_cont_bg_color'])) : 'FFFFFF');
|
394 |
$slideshow_close_btn_transparent = (isset($_POST['slideshow_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_close_btn_transparent'])) : 80);
|
395 |
$slideshow_rl_btn_bg_color = (isset($_POST['slideshow_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_bg_color'])) : 'FFFFFF');
|
453 |
$masonry_thumb_hover_effect_value = (isset($_POST['masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect_value'])) : '1.3');
|
454 |
$masonry_thumb_transition = (isset($_POST['masonry_thumb_transition']) ? esc_html(stripslashes( $_POST['masonry_thumb_transition'])) : 0);
|
455 |
|
456 |
+
$mosaic_thumb_padding = (isset($_POST['mosaic_thumb_padding']) ? esc_html(stripslashes( $_POST['mosaic_thumb_padding'])) : 4);
|
457 |
+
$mosaic_thumb_border_radius = (isset($_POST['mosaic_thumb_border_radius']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_radius'])) : '2px');
|
458 |
+
$mosaic_thumb_border_width = (isset($_POST['mosaic_thumb_border_width']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_width'])) : 1);
|
459 |
+
$mosaic_thumb_border_style = (isset($_POST['mosaic_thumb_border_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_style'])) : 'solid');
|
460 |
+
$mosaic_thumb_border_color = (isset($_POST['mosaic_thumb_border_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_color'])) : 'CCCCCC');
|
461 |
+
$mosaic_thumbs_bg_color = (isset($_POST['mosaic_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['mosaic_thumbs_bg_color'])) : 'FFFFFF');
|
462 |
+
$mosaic_thumb_bg_transparent = (isset($_POST['mosaic_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_bg_transparent'])) : 0);
|
463 |
+
$mosaic_thumb_transparent = (isset($_POST['mosaic_thumb_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transparent'])) : 100);
|
464 |
+
$mosaic_thumb_align = (isset($_POST['mosaic_thumb_align']) ? esc_html(stripslashes( $_POST['mosaic_thumb_align'])) : 'left');
|
465 |
+
$mosaic_thumb_hover_effect = (isset($_POST['mosaic_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect'])) : 'scale');
|
466 |
+
$mosaic_thumb_hover_effect_value = (isset($_POST['mosaic_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect_value'])) : '1.3');
|
467 |
+
$mosaic_thumb_title_margin = (isset($_POST['mosaic_thumb_title_margin']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_margin'])) : '');
|
468 |
+
$mosaic_thumb_title_font_style = (isset($_POST['mosaic_thumb_title_font_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_style'])) : 'inherit');
|
469 |
+
$mosaic_thumb_title_font_color = (isset($_POST['mosaic_thumb_title_font_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_color'])) : 'CCCCCC');
|
470 |
+
$mosaic_thumb_title_shadow = (isset($_POST['mosaic_thumb_title_shadow']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_shadow'])) : '');
|
471 |
+
$mosaic_thumb_title_font_size = (isset($_POST['mosaic_thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['mosaic_thumb_title_font_size'])) : 12);
|
472 |
+
$mosaic_thumb_title_font_weight = (isset($_POST['mosaic_thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_weight'])) : 'normal');
|
473 |
$lightbox_info_pos = (isset($_POST['lightbox_info_pos']) ? esc_html(stripslashes( $_POST['lightbox_info_pos'])) : 'top');
|
474 |
$lightbox_info_align = (isset($_POST['lightbox_info_align']) ? esc_html(stripslashes( $_POST['lightbox_info_align'])) : 'right');
|
475 |
$lightbox_info_bg_color = (isset($_POST['lightbox_info_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_color'])) : '000000');
|
843 |
'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
|
844 |
'masonry_thumb_transition' => $masonry_thumb_transition,
|
845 |
|
846 |
+
'mosaic_thumb_padding' => $mosaic_thumb_padding,
|
847 |
+
'mosaic_thumb_border_radius' => $mosaic_thumb_border_radius,
|
848 |
+
'mosaic_thumb_border_width' => $mosaic_thumb_border_width,
|
849 |
+
'mosaic_thumb_border_style' => $mosaic_thumb_border_style,
|
850 |
+
'mosaic_thumb_border_color' => $mosaic_thumb_border_color,
|
851 |
+
'mosaic_thumbs_bg_color' => $mosaic_thumbs_bg_color,
|
852 |
+
'mosaic_thumb_bg_transparent' => $mosaic_thumb_bg_transparent,
|
853 |
+
'mosaic_thumb_transparent' => $mosaic_thumb_transparent,
|
854 |
+
'mosaic_thumb_align' => $mosaic_thumb_align,
|
855 |
+
'mosaic_thumb_hover_effect' => $mosaic_thumb_hover_effect,
|
856 |
+
'mosaic_thumb_hover_effect_value' => $mosaic_thumb_hover_effect_value,
|
857 |
+
'mosaic_thumb_title_margin' => $mosaic_thumb_title_margin,
|
858 |
+
'mosaic_thumb_title_font_style' => $mosaic_thumb_title_font_style,
|
859 |
+
'mosaic_thumb_title_font_color' => $mosaic_thumb_title_font_color,
|
860 |
+
'mosaic_thumb_title_shadow' => $mosaic_thumb_title_shadow,
|
861 |
+
'mosaic_thumb_title_font_size' => $mosaic_thumb_title_font_size,
|
862 |
+
'mosaic_thumb_title_font_weight' => $mosaic_thumb_title_font_weight,
|
863 |
'lightbox_info_pos' => $lightbox_info_pos,
|
864 |
'lightbox_info_align' => $lightbox_info_align,
|
865 |
'lightbox_info_bg_color' => $lightbox_info_bg_color,
|
906 |
'masonry_description_color' => $masonry_description_color,
|
907 |
'masonry_description_font_style' => $masonry_description_font_style,
|
908 |
|
909 |
+
'album_masonry_back_font_color' => $album_masonry_back_font_color,
|
910 |
+
'album_masonry_back_font_style' => $album_masonry_back_font_style,
|
911 |
+
'album_masonry_back_font_size' => $album_masonry_back_font_size,
|
912 |
+
'album_masonry_back_font_weight' => $album_masonry_back_font_weight,
|
913 |
+
'album_masonry_back_padding' => $album_masonry_back_padding,
|
914 |
+
'album_masonry_title_font_color' => $album_masonry_title_font_color,
|
915 |
+
'album_masonry_title_font_style' => $album_masonry_title_font_style,
|
916 |
+
'album_masonry_thumb_title_pos' => $album_masonry_thumb_title_pos,
|
917 |
+
'album_masonry_title_font_size' => $album_masonry_title_font_size,
|
918 |
+
'album_masonry_title_font_weight' => $album_masonry_title_font_weight,
|
919 |
+
'album_masonry_title_margin' => $album_masonry_title_margin,
|
920 |
+
'album_masonry_title_shadow' => $album_masonry_title_shadow,
|
921 |
+
'album_masonry_thumb_margin' => $album_masonry_thumb_margin,
|
922 |
+
'album_masonry_thumb_padding' => $album_masonry_thumb_padding,
|
923 |
+
'album_masonry_thumb_border_radius' => $album_masonry_thumb_border_radius,
|
924 |
+
'album_masonry_thumb_border_width' => $album_masonry_thumb_border_width,
|
925 |
+
'album_masonry_thumb_border_style' => $album_masonry_thumb_border_style,
|
926 |
+
'album_masonry_thumb_border_color' => $album_masonry_thumb_border_color,
|
927 |
+
'album_masonry_thumb_bg_color' => $album_masonry_thumb_bg_color,
|
928 |
+
'album_masonry_thumbs_bg_color' => $album_masonry_thumbs_bg_color,
|
929 |
+
'album_masonry_thumb_bg_transparent' => $album_masonry_thumb_bg_transparent,
|
930 |
+
'album_masonry_thumb_box_shadow' => $album_masonry_thumb_box_shadow,
|
931 |
+
'album_masonry_thumb_transparent' => $album_masonry_thumb_transparent,
|
932 |
+
'album_masonry_thumb_align' => $album_masonry_thumb_align,
|
933 |
+
'album_masonry_thumb_hover_effect' => $album_masonry_thumb_hover_effect,
|
934 |
+
'album_masonry_thumb_hover_effect_value' => $album_masonry_thumb_hover_effect_value,
|
935 |
+
'album_masonry_thumb_transition' => $album_masonry_thumb_transition,
|
936 |
+
|
937 |
'default_theme' => $default_theme,
|
938 |
), array('id' => $id));
|
939 |
}
|
1261 |
'masonry_thumb_hover_effect' => $masonry_thumb_hover_effect,
|
1262 |
'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
|
1263 |
'masonry_thumb_transition' => $masonry_thumb_transition,
|
1264 |
+
'mosaic_thumb_padding' => $mosaic_thumb_padding,
|
1265 |
+
'mosaic_thumb_border_radius' => $mosaic_thumb_border_radius,
|
1266 |
+
'mosaic_thumb_border_width' => $mosaic_thumb_border_width,
|
1267 |
+
'mosaic_thumb_border_style' => $mosaic_thumb_border_style,
|
1268 |
+
'mosaic_thumb_border_color' => $mosaic_thumb_border_color,
|
1269 |
+
'mosaic_thumbs_bg_color' => $mosaic_thumbs_bg_color,
|
1270 |
+
'mosaic_thumb_bg_transparent' => $mosaic_thumb_bg_transparent,
|
1271 |
+
'mosaic_thumb_transparent' => $mosaic_thumb_transparent,
|
1272 |
+
'mosaic_thumb_align' => $mosaic_thumb_align,
|
1273 |
+
'mosaic_thumb_hover_effect' => $mosaic_thumb_hover_effect,
|
1274 |
+
'mosaic_thumb_hover_effect_value' => $mosaic_thumb_hover_effect_value,
|
1275 |
+
'mosaic_thumb_title_margin' => $mosaic_thumb_title_margin,
|
1276 |
+
'mosaic_thumb_title_font_style' => $mosaic_thumb_title_font_style,
|
1277 |
+
'mosaic_thumb_title_font_color' => $mosaic_thumb_title_font_color,
|
1278 |
+
'mosaic_thumb_title_shadow' => $mosaic_thumb_title_shadow,
|
1279 |
+
'mosaic_thumb_title_font_size' => $mosaic_thumb_title_font_size,
|
1280 |
+
'mosaic_thumb_title_font_weight' => $mosaic_thumb_title_font_weight,
|
1281 |
'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
|
1282 |
|
1283 |
'lightbox_info_pos' => $lightbox_info_pos,
|
1326 |
'masonry_description_color' => $masonry_description_color,
|
1327 |
'masonry_description_font_style' => $masonry_description_font_style,
|
1328 |
|
1329 |
+
'album_masonry_back_font_color' => $album_masonry_back_font_color,
|
1330 |
+
'album_masonry_back_font_style' => $album_masonry_back_font_style,
|
1331 |
+
'album_masonry_back_font_size' => $album_masonry_back_font_size,
|
1332 |
+
'album_masonry_back_font_weight' => $album_masonry_back_font_weight,
|
1333 |
+
'album_masonry_back_padding' => $album_masonry_back_padding,
|
1334 |
+
'album_masonry_title_font_color' => $album_masonry_title_font_color,
|
1335 |
+
'album_masonry_title_font_style' => $album_masonry_title_font_style,
|
1336 |
+
'album_masonry_thumb_title_pos' => $album_masonry_thumb_title_pos,
|
1337 |
+
'album_masonry_title_font_size' => $album_masonry_title_font_size,
|
1338 |
+
'album_masonry_title_font_weight' => $album_masonry_title_font_weight,
|
1339 |
+
'album_masonry_title_margin' => $album_masonry_title_margin,
|
1340 |
+
'album_masonry_title_shadow' => $album_masonry_title_shadow,
|
1341 |
+
'album_masonry_thumb_margin' => $album_masonry_thumb_margin,
|
1342 |
+
'album_masonry_thumb_padding' => $album_masonry_thumb_padding,
|
1343 |
+
'album_masonry_thumb_border_radius' => $album_masonry_thumb_border_radius,
|
1344 |
+
'album_masonry_thumb_border_width' => $album_masonry_thumb_border_width,
|
1345 |
+
'album_masonry_thumb_border_style' => $album_masonry_thumb_border_style,
|
1346 |
+
'album_masonry_thumb_border_color' => $album_masonry_thumb_border_color,
|
1347 |
+
'album_masonry_thumb_bg_color' => $album_masonry_thumb_bg_color,
|
1348 |
+
'album_masonry_thumbs_bg_color' => $album_masonry_thumbs_bg_color,
|
1349 |
+
'album_masonry_thumb_bg_transparent' => $album_masonry_thumb_bg_transparent,
|
1350 |
+
'album_masonry_thumb_box_shadow' => $album_masonry_thumb_box_shadow,
|
1351 |
+
'album_masonry_thumb_transparent' => $album_masonry_thumb_transparent,
|
1352 |
+
'album_masonry_thumb_align' => $album_masonry_thumb_align,
|
1353 |
+
'album_masonry_thumb_hover_effect' => $album_masonry_thumb_hover_effect,
|
1354 |
+
'album_masonry_thumb_hover_effect_value' => $album_masonry_thumb_hover_effect_value,
|
1355 |
+
'album_masonry_thumb_transition' => $album_masonry_thumb_transition,
|
1356 |
+
|
1357 |
'default_theme' => $default_theme,
|
1358 |
), array(
|
1359 |
'%s',
|
1684 |
'%s',
|
1685 |
'%d',
|
1686 |
'%d',
|
1687 |
+
'%s',
|
1688 |
+
'%d',
|
1689 |
+
'%s',
|
1690 |
+
'%s',
|
1691 |
+
'%s',
|
1692 |
+
'%d',
|
1693 |
+
'%d',
|
1694 |
+
'%s',
|
1695 |
+
'%s',
|
1696 |
+
'%s',
|
1697 |
+
'%s',
|
1698 |
+
'%s',
|
1699 |
+
'%s',
|
1700 |
+
'%s',
|
1701 |
+
'%d',
|
1702 |
+
'%s',
|
1703 |
|
1704 |
+
'%d',
|
1705 |
'%s',
|
1706 |
'%s',
|
1707 |
'%s',
|
1744 |
'%s',
|
1745 |
'%s',
|
1746 |
'%d',
|
1747 |
+
|
1748 |
+
'%s',
|
1749 |
+
'%s',
|
1750 |
+
'%d',
|
1751 |
+
'%s',
|
1752 |
+
'%s',
|
1753 |
+
'%s',
|
1754 |
+
'%s',
|
1755 |
+
'%s',
|
1756 |
+
'%d',
|
1757 |
+
'%s',
|
1758 |
+
'%s',
|
1759 |
+
'%s',
|
1760 |
+
'%d',
|
1761 |
+
'%d',
|
1762 |
+
'%s',
|
1763 |
+
'%d',
|
1764 |
+
'%s',
|
1765 |
+
'%s',
|
1766 |
+
'%s',
|
1767 |
+
'%s',
|
1768 |
+
'%d',
|
1769 |
+
'%s',
|
1770 |
+
'%d',
|
1771 |
+
'%s',
|
1772 |
+
'%s',
|
1773 |
+
'%s',
|
1774 |
+
'%d',
|
1775 |
'%d',
|
1776 |
'%s',
|
1777 |
'%s',
|
admin/models/BWGModelGalleries_bwg.php
CHANGED
@@ -103,6 +103,10 @@ class BWGModelGalleries_bwg {
|
|
103 |
$row->author = get_current_user_id();
|
104 |
$row->images_count = 0;
|
105 |
$row->published = 1;
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
return $row;
|
108 |
}
|
103 |
$row->author = get_current_user_id();
|
104 |
$row->images_count = 0;
|
105 |
$row->published = 1;
|
106 |
+
$row->gallery_type = '';
|
107 |
+
$row->gallery_source = '';
|
108 |
+
$row->autogallery_image_number = 12;
|
109 |
+
$row->update_flag = '';
|
110 |
}
|
111 |
return $row;
|
112 |
}
|
admin/models/BWGModelOptions_bwg.php
CHANGED
@@ -39,7 +39,7 @@ class BWGModelOptions_bwg {
|
|
39 |
$row->thumb_height = 90;
|
40 |
$row->upload_thumb_width = 300;
|
41 |
$row->upload_thumb_height = 300;
|
42 |
-
|
43 |
$row->upload_img_height = 1200;
|
44 |
$row->image_enable_page = 1;
|
45 |
$row->image_title_show_hover = 'none';
|
@@ -73,7 +73,7 @@ class BWGModelOptions_bwg {
|
|
73 |
$row->slideshow_filmstrip_height = 90;
|
74 |
$row->slideshow_enable_title = 0;
|
75 |
$row->slideshow_title_position = 'top-right';
|
76 |
-
|
77 |
$row->slideshow_enable_description = 0;
|
78 |
$row->slideshow_description_position = 'bottom-right';
|
79 |
$row->slideshow_enable_music = 0;
|
@@ -139,6 +139,8 @@ class BWGModelOptions_bwg {
|
|
139 |
$row->comment_moderation = 0;
|
140 |
$row->popup_hit_counter = 0;
|
141 |
$row->enable_ML_import = 0;
|
|
|
|
|
142 |
$row->showthumbs_name = 0;
|
143 |
$row->show_album_name = 0;
|
144 |
$row->show_image_counts = 0;
|
@@ -146,7 +148,10 @@ class BWGModelOptions_bwg {
|
|
146 |
$row->show_masonry_thumb_description = 0;
|
147 |
$row->popup_info_full_width = 0;
|
148 |
$row->show_sort_images = 0;
|
149 |
-
|
|
|
|
|
|
|
150 |
}
|
151 |
return $row;
|
152 |
}
|
39 |
$row->thumb_height = 90;
|
40 |
$row->upload_thumb_width = 300;
|
41 |
$row->upload_thumb_height = 300;
|
42 |
+
$row->upload_img_width = 1200;
|
43 |
$row->upload_img_height = 1200;
|
44 |
$row->image_enable_page = 1;
|
45 |
$row->image_title_show_hover = 'none';
|
73 |
$row->slideshow_filmstrip_height = 90;
|
74 |
$row->slideshow_enable_title = 0;
|
75 |
$row->slideshow_title_position = 'top-right';
|
76 |
+
$row->slideshow_title_full_width = 0;
|
77 |
$row->slideshow_enable_description = 0;
|
78 |
$row->slideshow_description_position = 'bottom-right';
|
79 |
$row->slideshow_enable_music = 0;
|
139 |
$row->comment_moderation = 0;
|
140 |
$row->popup_hit_counter = 0;
|
141 |
$row->enable_ML_import = 0;
|
142 |
+
$row->autoupdate_interval = 30;
|
143 |
+
$row->instagram_client_id = '';
|
144 |
$row->showthumbs_name = 0;
|
145 |
$row->show_album_name = 0;
|
146 |
$row->show_image_counts = 0;
|
148 |
$row->show_masonry_thumb_description = 0;
|
149 |
$row->popup_info_full_width = 0;
|
150 |
$row->show_sort_images = 0;
|
151 |
+
$row->enable_seo = 1;
|
152 |
+
$row->autohide_lightbox_navigation = 1;
|
153 |
+
$row->autohide_slideshow_navigation = 1;
|
154 |
+
$row->read_metadata = 0;
|
155 |
}
|
156 |
return $row;
|
157 |
}
|
admin/views/BWGViewAddAlbumsGalleries.php
CHANGED
@@ -31,6 +31,7 @@ class BWGViewAddAlbumsGalleries {
|
|
31 |
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
32 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
$per_page = $this->model->per_page();
|
|
|
34 |
wp_print_scripts('jquery');
|
35 |
?>
|
36 |
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
|
@@ -40,7 +41,7 @@ class BWGViewAddAlbumsGalleries {
|
|
40 |
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="spider_audio_player_tables-css" rel="stylesheet">
|
41 |
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
|
42 |
<form class="wrap wp-core-ui" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
|
43 |
-
<?php wp_nonce_field( 'addAlbumsGalleries', 'bwg_nonce' ); ?>
|
44 |
<h2 style="width:200px;float:left">Albums/Galleries</h2>
|
45 |
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
|
46 |
<img src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
|
@@ -48,7 +49,7 @@ class BWGViewAddAlbumsGalleries {
|
|
48 |
<div class="tablenav top">
|
49 |
<?php
|
50 |
WDWLibrary::search('Name', $search_value, 'albums_galleries_form');
|
51 |
-
WDWLibrary::html_page_nav($page_nav['total']
|
52 |
?>
|
53 |
</div>
|
54 |
<table class="wp-list-table widefat fixed pages">
|
@@ -101,6 +102,11 @@ class BWGViewAddAlbumsGalleries {
|
|
101 |
?>
|
102 |
</tbody>
|
103 |
</table>
|
|
|
|
|
|
|
|
|
|
|
104 |
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
105 |
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
106 |
<input id="album_id" name="album_id" type="hidden" value="<?php echo $album_id; ?>" />
|
31 |
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
32 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
$per_page = $this->model->per_page();
|
34 |
+
$pager = 0;
|
35 |
wp_print_scripts('jquery');
|
36 |
?>
|
37 |
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
|
41 |
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="spider_audio_player_tables-css" rel="stylesheet">
|
42 |
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
|
43 |
<form class="wrap wp-core-ui" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
|
44 |
+
<?php wp_nonce_field( 'addAlbumsGalleries', 'bwg_nonce' ); ?>
|
45 |
<h2 style="width:200px;float:left">Albums/Galleries</h2>
|
46 |
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
|
47 |
<img src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
|
49 |
<div class="tablenav top">
|
50 |
<?php
|
51 |
WDWLibrary::search('Name', $search_value, 'albums_galleries_form');
|
52 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
|
53 |
?>
|
54 |
</div>
|
55 |
<table class="wp-list-table widefat fixed pages">
|
102 |
?>
|
103 |
</tbody>
|
104 |
</table>
|
105 |
+
<div class="tablenav bottom">
|
106 |
+
<?php
|
107 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
|
108 |
+
?>
|
109 |
+
</div>
|
110 |
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
111 |
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
112 |
<input id="album_id" name="album_id" type="hidden" value="<?php echo $album_id; ?>" />
|
admin/views/BWGViewAddTags.php
CHANGED
@@ -31,6 +31,7 @@ class BWGViewAddTags {
|
|
31 |
$image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : ((isset($_POST['image_id'])) ? esc_html($_POST['image_id']) : '0'));
|
32 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
$per_page = $this->model->per_page();
|
|
|
34 |
wp_print_scripts('jquery');
|
35 |
?>
|
36 |
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,dashicons,buttons,wp-auth-check" rel="stylesheet">
|
@@ -48,7 +49,7 @@ class BWGViewAddTags {
|
|
48 |
<div class="tablenav top">
|
49 |
<?php
|
50 |
WDWLibrary::search('Name', $search_value, 'tags_form');
|
51 |
-
WDWLibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'tags_form', $per_page);
|
52 |
?>
|
53 |
</div>
|
54 |
<table class="wp-list-table widefat fixed pages">
|
@@ -93,6 +94,11 @@ class BWGViewAddTags {
|
|
93 |
?>
|
94 |
</tbody>
|
95 |
</table>
|
|
|
|
|
|
|
|
|
|
|
96 |
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
97 |
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
98 |
<input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
31 |
$image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : ((isset($_POST['image_id'])) ? esc_html($_POST['image_id']) : '0'));
|
32 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
$per_page = $this->model->per_page();
|
34 |
+
$pager = 0;
|
35 |
wp_print_scripts('jquery');
|
36 |
?>
|
37 |
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,dashicons,buttons,wp-auth-check" rel="stylesheet">
|
49 |
<div class="tablenav top">
|
50 |
<?php
|
51 |
WDWLibrary::search('Name', $search_value, 'tags_form');
|
52 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
53 |
?>
|
54 |
</div>
|
55 |
<table class="wp-list-table widefat fixed pages">
|
94 |
?>
|
95 |
</tbody>
|
96 |
</table>
|
97 |
+
<div class="tablenav bottom">
|
98 |
+
<?php
|
99 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
100 |
+
?>
|
101 |
+
</div>
|
102 |
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
103 |
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
104 |
<input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
admin/views/BWGViewAlbums_bwg.php
CHANGED
@@ -33,6 +33,7 @@ class BWGViewAlbums_bwg {
|
|
33 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
$ids_string = '';
|
35 |
$per_page = $this->model->per_page();
|
|
|
36 |
?>
|
37 |
<div style="clear: both; float: left; width: 99%;">
|
38 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
@@ -45,8 +46,8 @@ class BWGViewAlbums_bwg {
|
|
45 |
</a>
|
46 |
</div>
|
47 |
</div>
|
48 |
-
<form class="wrap" id="albums_form" method="post" action="admin.php?page=albums_bwg" style="float: left; width:
|
49 |
-
|
50 |
<span class="album-icon"></span>
|
51 |
<h2>
|
52 |
Albums
|
@@ -72,7 +73,7 @@ class BWGViewAlbums_bwg {
|
|
72 |
<div class="tablenav top">
|
73 |
<?php
|
74 |
WDWLibrary::search('Name', $search_value, 'albums_form');
|
75 |
-
WDWLibrary::html_page_nav($page_nav['total']
|
76 |
?>
|
77 |
</div>
|
78 |
<table class="wp-list-table widefat fixed pages">
|
@@ -173,6 +174,11 @@ class BWGViewAlbums_bwg {
|
|
173 |
?>
|
174 |
</tbody>
|
175 |
</table>
|
|
|
|
|
|
|
|
|
|
|
176 |
<input id="task" name="task" type="hidden" value="" />
|
177 |
<input id="current_id" name="current_id" type="hidden" value="" />
|
178 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
@@ -257,7 +263,7 @@ class BWGViewAlbums_bwg {
|
|
257 |
tb_remove();
|
258 |
}
|
259 |
</script>
|
260 |
-
<form class="wrap" method="post" action="admin.php?page=albums_bwg" style="float: left; width:
|
261 |
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
262 |
<span class="album-icon"></span>
|
263 |
<h2><?php echo $page_title; ?></h2>
|
@@ -311,12 +317,14 @@ class BWGViewAlbums_bwg {
|
|
311 |
<tr>
|
312 |
<td class="spider_label"><label for="url">Preview image: </label></td>
|
313 |
<td>
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
320 |
id="button_preview_image"
|
321 |
class="button-primary thickbox thickbox-preview"
|
322 |
title="Add Preview Image"
|
@@ -335,11 +343,13 @@ class BWGViewAlbums_bwg {
|
|
335 |
<tr>
|
336 |
<td class="spider_label"><label for="content-add_media">Albums And Galleries: </label></td>
|
337 |
<td>
|
338 |
-
|
339 |
$query_url = add_query_arg(array('action' => 'addAlbumsGalleries', 'album_id' => $id, 'width' => '700', 'height' => '550', 'bwg_items_per_page'=>$per_page ), admin_url('admin-ajax.php'));
|
340 |
$query_url = wp_nonce_url( $query_url, 'addAlbumsGalleries', 'bwg_nonce' );
|
341 |
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
|
342 |
-
|
|
|
|
|
343 |
<a href="<?php echo $query_url; ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
|
344 |
Add Albums/Galleries
|
345 |
</a>
|
33 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
$ids_string = '';
|
35 |
$per_page = $this->model->per_page();
|
36 |
+
$pager = 0;
|
37 |
?>
|
38 |
<div style="clear: both; float: left; width: 99%;">
|
39 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
46 |
</a>
|
47 |
</div>
|
48 |
</div>
|
49 |
+
<form class="wrap" id="albums_form" method="post" action="admin.php?page=albums_bwg" style="float: left; width:99%;">
|
50 |
+
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
51 |
<span class="album-icon"></span>
|
52 |
<h2>
|
53 |
Albums
|
73 |
<div class="tablenav top">
|
74 |
<?php
|
75 |
WDWLibrary::search('Name', $search_value, 'albums_form');
|
76 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
|
77 |
?>
|
78 |
</div>
|
79 |
<table class="wp-list-table widefat fixed pages">
|
174 |
?>
|
175 |
</tbody>
|
176 |
</table>
|
177 |
+
<div class="tablenav bottom">
|
178 |
+
<?php
|
179 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
|
180 |
+
?>
|
181 |
+
</div>
|
182 |
<input id="task" name="task" type="hidden" value="" />
|
183 |
<input id="current_id" name="current_id" type="hidden" value="" />
|
184 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
263 |
tb_remove();
|
264 |
}
|
265 |
</script>
|
266 |
+
<form class="wrap" method="post" action="admin.php?page=albums_bwg" style="float: left; width:99%;">
|
267 |
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
268 |
<span class="album-icon"></span>
|
269 |
<h2><?php echo $page_title; ?></h2>
|
317 |
<tr>
|
318 |
<td class="spider_label"><label for="url">Preview image: </label></td>
|
319 |
<td>
|
320 |
+
<?php
|
321 |
+
$query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_preview_image'), admin_url('admin-ajax.php'));
|
322 |
+
$query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
|
323 |
+
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
|
324 |
+
|
325 |
+
|
326 |
+
?>
|
327 |
+
<a href="<?php echo $query_url; ?>"
|
328 |
id="button_preview_image"
|
329 |
class="button-primary thickbox thickbox-preview"
|
330 |
title="Add Preview Image"
|
343 |
<tr>
|
344 |
<td class="spider_label"><label for="content-add_media">Albums And Galleries: </label></td>
|
345 |
<td>
|
346 |
+
<?php
|
347 |
$query_url = add_query_arg(array('action' => 'addAlbumsGalleries', 'album_id' => $id, 'width' => '700', 'height' => '550', 'bwg_items_per_page'=>$per_page ), admin_url('admin-ajax.php'));
|
348 |
$query_url = wp_nonce_url( $query_url, 'addAlbumsGalleries', 'bwg_nonce' );
|
349 |
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
|
350 |
+
|
351 |
+
|
352 |
+
?>
|
353 |
<a href="<?php echo $query_url; ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
|
354 |
Add Albums/Galleries
|
355 |
</a>
|
admin/views/BWGViewBWGShortcode.php
CHANGED
@@ -227,6 +227,11 @@ class BWGViewBWGShortcode {
|
|
227 |
</td>
|
228 |
</tr>
|
229 |
|
|
|
|
|
|
|
|
|
|
|
230 |
<tr id="tr_show_sort_images">
|
231 |
<td class="spider_label"><label>Show "Order by" dropdown list: </label></td>
|
232 |
<td>
|
@@ -234,11 +239,6 @@ class BWGViewBWGShortcode {
|
|
234 |
<input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0">No</label>
|
235 |
</td>
|
236 |
</tr>
|
237 |
-
|
238 |
-
<tr id="tr_search_box_width">
|
239 |
-
<td class="spider_label"><label for="search_box_width">Search box width: </label></td>
|
240 |
-
<td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $option_row->search_box_width; ?>" class="spider_int_input" /> px</td>
|
241 |
-
</tr>
|
242 |
|
243 |
<!--Thumbnails, Masonry viewies-->
|
244 |
<tr id="tr_masonry_hor_ver">
|
@@ -1018,7 +1018,7 @@ class BWGViewBWGShortcode {
|
|
1018 |
<?php
|
1019 |
foreach ($shortcodes as $shortcode) {
|
1020 |
?>
|
1021 |
-
shortcodes[<?php echo $shortcode->id; ?>] = '<?php echo $shortcode->tagtext; ?>';
|
1022 |
<?php
|
1023 |
}
|
1024 |
?>
|
227 |
</td>
|
228 |
</tr>
|
229 |
|
230 |
+
<tr id="tr_search_box_width">
|
231 |
+
<td class="spider_label"><label for="search_box_width">Search box width: </label></td>
|
232 |
+
<td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $option_row->search_box_width; ?>" class="spider_int_input" /> px</td>
|
233 |
+
</tr>
|
234 |
+
|
235 |
<tr id="tr_show_sort_images">
|
236 |
<td class="spider_label"><label>Show "Order by" dropdown list: </label></td>
|
237 |
<td>
|
239 |
<input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0">No</label>
|
240 |
</td>
|
241 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
242 |
|
243 |
<!--Thumbnails, Masonry viewies-->
|
244 |
<tr id="tr_masonry_hor_ver">
|
1018 |
<?php
|
1019 |
foreach ($shortcodes as $shortcode) {
|
1020 |
?>
|
1021 |
+
shortcodes[<?php echo $shortcode->id; ?>] = '<?php echo addslashes($shortcode->tagtext); ?>';
|
1022 |
<?php
|
1023 |
}
|
1024 |
?>
|
admin/views/BWGViewEditThumb.php
CHANGED
@@ -32,26 +32,28 @@ class BWGViewEditThumb {
|
|
32 |
?>
|
33 |
<div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
|
34 |
<div id='bwg_container_for_media_1' style="display:table-cell; text-align:center; vertical-align:middle;">
|
35 |
-
<img id="image_display" src="" style="max-width:<?php echo $image_width; ?>px; max-height:<?php echo $image_height; ?>px;"/>
|
36 |
</div>
|
37 |
</div>
|
38 |
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_embed.js?ver='.wd_bwg_version(); ?>"></script>
|
39 |
<script>
|
40 |
var file_type = window.parent.document.getElementById("input_filetype_<?php echo $image_id; ?>").value;
|
|
|
41 |
var is_embed = file_type.indexOf("EMBED_") > -1 ? true : false;
|
42 |
var is_instagram_post = file_type.indexOf("INSTAGRAM_POST") > -1 ? true : false;
|
43 |
-
if (!is_embed) {
|
44 |
var image_url = "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + window.parent.document.getElementById("image_url_<?php echo $image_id; ?>").value;
|
45 |
window.document.getElementById("image_display").src = image_url + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
|
46 |
}
|
47 |
else if(is_embed){
|
48 |
var embed_id = window.parent.document.getElementById("input_filename_<?php echo $image_id; ?>").value;
|
49 |
window.document.getElementById("image_display").setAttribute('style', 'display: none;');
|
|
|
50 |
if(!is_instagram_post){
|
51 |
-
window.document.getElementById("bwg_container_for_media_1").innerHTML = spider_display_embed(file_type, embed_id, {
|
52 |
}
|
53 |
else{
|
54 |
-
window.document.getElementById("bwg_container_for_media_1").innerHTML = spider_display_embed(file_type, embed_id, {
|
55 |
}
|
56 |
}
|
57 |
</script>
|
@@ -550,7 +552,7 @@ class BWGViewEditThumb {
|
|
550 |
window.parent.document.getElementById("image_thumb_<?php echo $image_id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
|
551 |
</script>
|
552 |
<form method="post" id="rotate_image" action="<?php echo $form_action; ?>">
|
553 |
-
|
554 |
<div style="text-align:center; width:inherit; height:<?php echo $popup_height; ?>px;">
|
555 |
<div style="height:40px;">
|
556 |
<img title="Flip Both" class="spider_rotate" onclick="spider_rotate('both', 'rotate_image')" src="<?php echo WD_BWG_URL . '/images/flip_both.png'; ?>"/>
|
32 |
?>
|
33 |
<div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
|
34 |
<div id='bwg_container_for_media_1' style="display:table-cell; text-align:center; vertical-align:middle;">
|
35 |
+
<img id="image_display" src="" style="max-width:<?php echo $image_width; ?>px; max-height:<?php echo $image_height; ?>px;"/>
|
36 |
</div>
|
37 |
</div>
|
38 |
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_embed.js?ver='.wd_bwg_version(); ?>"></script>
|
39 |
<script>
|
40 |
var file_type = window.parent.document.getElementById("input_filetype_<?php echo $image_id; ?>").value;
|
41 |
+
|
42 |
var is_embed = file_type.indexOf("EMBED_") > -1 ? true : false;
|
43 |
var is_instagram_post = file_type.indexOf("INSTAGRAM_POST") > -1 ? true : false;
|
44 |
+
if (!is_embed) {
|
45 |
var image_url = "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + window.parent.document.getElementById("image_url_<?php echo $image_id; ?>").value;
|
46 |
window.document.getElementById("image_display").src = image_url + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
|
47 |
}
|
48 |
else if(is_embed){
|
49 |
var embed_id = window.parent.document.getElementById("input_filename_<?php echo $image_id; ?>").value;
|
50 |
window.document.getElementById("image_display").setAttribute('style', 'display: none;');
|
51 |
+
|
52 |
if(!is_instagram_post){
|
53 |
+
window.document.getElementById("bwg_container_for_media_1").innerHTML = spider_display_embed(file_type, embed_id, {class:"embed_display", width:"<?php echo $image_width; ?>", height:"<?php echo $image_height; ?>", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:<?php echo $image_width; ?>px; height:<?php echo $image_height; ?>px; vertical-align:middle; text-align: center; margin: 0 auto;" });
|
54 |
}
|
55 |
else{
|
56 |
+
window.document.getElementById("bwg_container_for_media_1").innerHTML = spider_display_embed(file_type, embed_id, {class:"embed_display", width:"<?php echo $image_height -88; ?>", height:"<?php echo $image_height; ?>", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:<?php echo $image_height -88 ; ?>px; height:<?php echo $image_height; ?>px; vertical-align:middle; text-align: center; margin: 0 auto;" });
|
57 |
}
|
58 |
}
|
59 |
</script>
|
552 |
window.parent.document.getElementById("image_thumb_<?php echo $image_id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
|
553 |
</script>
|
554 |
<form method="post" id="rotate_image" action="<?php echo $form_action; ?>">
|
555 |
+
<?php wp_nonce_field( 'editThumb', 'bwg_nonce' ); ?>
|
556 |
<div style="text-align:center; width:inherit; height:<?php echo $popup_height; ?>px;">
|
557 |
<div style="height:40px;">
|
558 |
<img title="Flip Both" class="spider_rotate" onclick="spider_rotate('both', 'rotate_image')" src="<?php echo WD_BWG_URL . '/images/flip_both.png'; ?>"/>
|
admin/views/BWGViewGalleries_bwg.php
CHANGED
@@ -33,6 +33,7 @@ class BWGViewGalleries_bwg {
|
|
33 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
$ids_string = '';
|
35 |
$per_page = $this->model->per_page();
|
|
|
36 |
?>
|
37 |
<div style="clear: both; float: left; width: 99%;">
|
38 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
@@ -72,7 +73,7 @@ class BWGViewGalleries_bwg {
|
|
72 |
<div class="tablenav top">
|
73 |
<?php
|
74 |
WDWLibrary::search('Name', $search_value, 'galleries_form');
|
75 |
-
WDWLibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page);
|
76 |
?>
|
77 |
</div>
|
78 |
<table class="wp-list-table widefat fixed pages">
|
@@ -186,6 +187,11 @@ class BWGViewGalleries_bwg {
|
|
186 |
?>
|
187 |
</tbody>
|
188 |
</table>
|
|
|
|
|
|
|
|
|
|
|
189 |
<input id="task" name="task" type="hidden" value="" />
|
190 |
<input id="current_id" name="current_id" type="hidden" value="" />
|
191 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
@@ -446,7 +452,7 @@ class BWGViewGalleries_bwg {
|
|
446 |
if (is_embed && !is_direct_url) {
|
447 |
textarea_desc.innerHTML = files[i]['description'];
|
448 |
}
|
449 |
-
else if (<?php echo $option_row->
|
450 |
textarea_desc.innerHTML = files[i]['credit'] ? 'Author: ' + files[i]['credit'] + '\n' : '';
|
451 |
textarea_desc.innerHTML += ((files[i]['aperture'] != 0 && files[i]['aperture'] != '') ? 'Aperture: ' + files[i]['aperture'] + '\n' : '');
|
452 |
textarea_desc.innerHTML += ((files[i]['camera'] != 0 && files[i]['camera'] != '') ? 'Camera: ' + files[i]['camera'] + '\n' : '');
|
@@ -502,8 +508,7 @@ class BWGViewGalleries_bwg {
|
|
502 |
a_publish.appendChild(img_publish);
|
503 |
// Delete TD.
|
504 |
var td_delete = document.createElement('td');
|
505 |
-
td_delete.setAttribute('class', "table_big_col");
|
506 |
-
td_delete.setAttribute('class', "spider_delete_button");
|
507 |
tr.appendChild(td_delete);
|
508 |
var a_delete = document.createElement('a');
|
509 |
a_delete.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_delete');spider_set_input_value('image_current_id', '" + bwg_j + "');spider_ajax_save('galleries_form');");
|
@@ -689,7 +694,7 @@ class BWGViewGalleries_bwg {
|
|
689 |
$ids_string = '';
|
690 |
$per_page = $this->model->per_page();
|
691 |
$gallery_row = $this->model->get_row_data($id);
|
692 |
-
|
693 |
?>
|
694 |
<div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table should be saved.</p></strong></div>
|
695 |
<div class="buttons_div_left">
|
@@ -813,7 +818,7 @@ class BWGViewGalleries_bwg {
|
|
813 |
<div class="tablenav top">
|
814 |
<?php
|
815 |
WDWLibrary::ajax_search('Filename', $search_value, 'galleries_form');
|
816 |
-
WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page);
|
817 |
?>
|
818 |
</div>
|
819 |
|
@@ -985,6 +990,11 @@ class BWGViewGalleries_bwg {
|
|
985 |
<input id="added_tags_select_all" name="added_tags_select_all" type="hidden" value="" />
|
986 |
</tbody>
|
987 |
</table>
|
|
|
|
|
|
|
|
|
|
|
988 |
<script>
|
989 |
window.onload = spider_show_hide_weights;
|
990 |
</script>
|
33 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
$ids_string = '';
|
35 |
$per_page = $this->model->per_page();
|
36 |
+
$pager = 0;
|
37 |
?>
|
38 |
<div style="clear: both; float: left; width: 99%;">
|
39 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
73 |
<div class="tablenav top">
|
74 |
<?php
|
75 |
WDWLibrary::search('Name', $search_value, 'galleries_form');
|
76 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page);
|
77 |
?>
|
78 |
</div>
|
79 |
<table class="wp-list-table widefat fixed pages">
|
187 |
?>
|
188 |
</tbody>
|
189 |
</table>
|
190 |
+
<div class="tablenav bottom">
|
191 |
+
<?php
|
192 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page);
|
193 |
+
?>
|
194 |
+
</div>
|
195 |
<input id="task" name="task" type="hidden" value="" />
|
196 |
<input id="current_id" name="current_id" type="hidden" value="" />
|
197 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
452 |
if (is_embed && !is_direct_url) {
|
453 |
textarea_desc.innerHTML = files[i]['description'];
|
454 |
}
|
455 |
+
else if (<?php echo $option_row->read_metadata; ?>) {
|
456 |
textarea_desc.innerHTML = files[i]['credit'] ? 'Author: ' + files[i]['credit'] + '\n' : '';
|
457 |
textarea_desc.innerHTML += ((files[i]['aperture'] != 0 && files[i]['aperture'] != '') ? 'Aperture: ' + files[i]['aperture'] + '\n' : '');
|
458 |
textarea_desc.innerHTML += ((files[i]['camera'] != 0 && files[i]['camera'] != '') ? 'Camera: ' + files[i]['camera'] + '\n' : '');
|
508 |
a_publish.appendChild(img_publish);
|
509 |
// Delete TD.
|
510 |
var td_delete = document.createElement('td');
|
511 |
+
td_delete.setAttribute('class', "table_big_col spider_delete_button");
|
|
|
512 |
tr.appendChild(td_delete);
|
513 |
var a_delete = document.createElement('a');
|
514 |
a_delete.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_delete');spider_set_input_value('image_current_id', '" + bwg_j + "');spider_ajax_save('galleries_form');");
|
694 |
$ids_string = '';
|
695 |
$per_page = $this->model->per_page();
|
696 |
$gallery_row = $this->model->get_row_data($id);
|
697 |
+
$pager = 0;
|
698 |
?>
|
699 |
<div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table should be saved.</p></strong></div>
|
700 |
<div class="buttons_div_left">
|
818 |
<div class="tablenav top">
|
819 |
<?php
|
820 |
WDWLibrary::ajax_search('Filename', $search_value, 'galleries_form');
|
821 |
+
WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page, $pager++);
|
822 |
?>
|
823 |
</div>
|
824 |
|
990 |
<input id="added_tags_select_all" name="added_tags_select_all" type="hidden" value="" />
|
991 |
</tbody>
|
992 |
</table>
|
993 |
+
<div class="tablenav bottom">
|
994 |
+
<?php
|
995 |
+
WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page, $pager++);
|
996 |
+
?>
|
997 |
+
</div>
|
998 |
<script>
|
999 |
window.onload = spider_show_hide_weights;
|
1000 |
</script>
|
admin/views/BWGViewOptions_bwg.php
CHANGED
@@ -187,23 +187,23 @@ class BWGViewOptions_bwg {
|
|
187 |
<div class="spider_description"></div>
|
188 |
</td>
|
189 |
</tr>
|
190 |
-
<tr>
|
191 |
<td class="spider_label_options">
|
192 |
-
<label
|
193 |
</td>
|
194 |
<td>
|
195 |
-
<input type="
|
196 |
-
<
|
197 |
-
<div class="spider_description"></div>
|
198 |
</td>
|
199 |
</tr>
|
200 |
-
<tr
|
201 |
<td class="spider_label_options">
|
202 |
-
<label
|
203 |
</td>
|
204 |
<td>
|
205 |
-
<input type="
|
206 |
-
<
|
|
|
207 |
</td>
|
208 |
</tr>
|
209 |
<tr>
|
@@ -236,12 +236,22 @@ class BWGViewOptions_bwg {
|
|
236 |
</td>
|
237 |
</tr>
|
238 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
<td class="spider_label_options">
|
240 |
<label>Meta auto-fill:</label>
|
241 |
</td>
|
242 |
<td>
|
243 |
-
<input type="radio" name="
|
244 |
-
<input type="radio" name="
|
245 |
<div class="spider_description">Enabling this option the meta description of the image will be automatically filled in image description field.</div>
|
246 |
</td>
|
247 |
</tr>
|
@@ -646,6 +656,16 @@ class BWGViewOptions_bwg {
|
|
646 |
<div class="spider_description spider_free_version">This option is disabled in free version.</div>
|
647 |
</td>
|
648 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
649 |
<tr>
|
650 |
<td class="spider_label_options">
|
651 |
<label>Enable control buttons:</label>
|
@@ -1026,6 +1046,16 @@ class BWGViewOptions_bwg {
|
|
1026 |
<div class="spider_description"></div>
|
1027 |
</td>
|
1028 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1029 |
<tr>
|
1030 |
<td class="spider_label_options">
|
1031 |
<label>Enable control buttons: </label>
|
187 |
<div class="spider_description"></div>
|
188 |
</td>
|
189 |
</tr>
|
190 |
+
<tr id="tr_search_box_width">
|
191 |
<td class="spider_label_options">
|
192 |
+
<label for="search_box_width">Search box width: </label>
|
193 |
</td>
|
194 |
<td>
|
195 |
+
<input type="text" name="search_box_width" id="search_box_width" value="<?php echo $row->search_box_width; ?>" class="spider_int_input" /> px
|
196 |
+
<div class="spider_description"></div>
|
|
|
197 |
</td>
|
198 |
</tr>
|
199 |
+
<tr>
|
200 |
<td class="spider_label_options">
|
201 |
+
<label>Show "Order by" dropdown list:</label>
|
202 |
</td>
|
203 |
<td>
|
204 |
+
<input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($row->show_sort_images) echo 'checked="checked"'; ?> /><label for="show_sort_images_1">Yes</label>
|
205 |
+
<input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$row->show_sort_images) echo 'checked="checked"'; ?> /><label for="show_sort_images_0">No</label>
|
206 |
+
<div class="spider_description"></div>
|
207 |
</td>
|
208 |
</tr>
|
209 |
<tr>
|
236 |
</td>
|
237 |
</tr>
|
238 |
<tr>
|
239 |
+
<td class="spider_label_options">
|
240 |
+
<label>Enable href attribute:</label>
|
241 |
+
</td>
|
242 |
+
<td>
|
243 |
+
<input type="radio" name="enable_seo" id="enable_seo_1" value="1" <?php if ($row->enable_seo) echo 'checked="checked"'; ?> /><label for="enable_seo_1">Yes</label>
|
244 |
+
<input type="radio" name="enable_seo" id="enable_seo_0" value="0" <?php if (!$row->enable_seo) echo 'checked="checked"'; ?> /><label for="enable_seo_0">No</label>
|
245 |
+
<div class="spider_description">Disable this option only if it conflicts with your theme.</div>
|
246 |
+
</td>
|
247 |
+
</tr>
|
248 |
+
<tr>
|
249 |
<td class="spider_label_options">
|
250 |
<label>Meta auto-fill:</label>
|
251 |
</td>
|
252 |
<td>
|
253 |
+
<input type="radio" name="read_metadata" id="read_metadata_1" value="1" <?php if ($row->read_metadata) echo 'checked="checked"'; ?> /><label for="read_metadata_1">Yes</label>
|
254 |
+
<input type="radio" name="read_metadata" id="read_metadata_0" value="0" <?php if (!$row->read_metadata) echo 'checked="checked"'; ?> /><label for="read_metadata_0">No</label>
|
255 |
<div class="spider_description">Enabling this option the meta description of the image will be automatically filled in image description field.</div>
|
256 |
</td>
|
257 |
</tr>
|
656 |
<div class="spider_description spider_free_version">This option is disabled in free version.</div>
|
657 |
</td>
|
658 |
</tr>
|
659 |
+
<tr>
|
660 |
+
<td class="spider_label_options">
|
661 |
+
<label> Show Next / Previous buttons:</label>
|
662 |
+
</td>
|
663 |
+
<td>
|
664 |
+
<input type="radio" name="autohide_lightbox_navigation" id="autohide_lightbox_navigation_1" value="1" <?php if ($row->autohide_lightbox_navigation ) echo 'checked="checked"'; ?> /><label for="autohide_lightbox_navigation_1">On hover</label>
|
665 |
+
<input type="radio" name="autohide_lightbox_navigation" id="autohide_lightbox_navigation_0" value="0" <?php if (!$row->autohide_lightbox_navigation ) echo 'checked="checked"'; ?> /><label for="autohide_lightbox_navigation_0">Always</label>
|
666 |
+
<div class="spider_description"></div>
|
667 |
+
</td>
|
668 |
+
</tr>
|
669 |
<tr>
|
670 |
<td class="spider_label_options">
|
671 |
<label>Enable control buttons:</label>
|
1046 |
<div class="spider_description"></div>
|
1047 |
</td>
|
1048 |
</tr>
|
1049 |
+
<tr>
|
1050 |
+
<td class="spider_label_options">
|
1051 |
+
<label> Show Next / Previous buttons:</label>
|
1052 |
+
</td>
|
1053 |
+
<td>
|
1054 |
+
<input type="radio" name="autohide_slideshow_navigation" id="autohide_slideshow_navigation_1" value="1" <?php if ($row->autohide_slideshow_navigation) echo 'checked="checked"'; ?> /><label for="autohide_slideshow_navigation_1">On hover</label>
|
1055 |
+
<input type="radio" name="autohide_slideshow_navigation" id="autohide_slideshow_navigation_0" value="0" <?php if (!$row->autohide_slideshow_navigation) echo 'checked="checked"'; ?> /><label for="autohide_slideshow_navigation_0">Always</label>
|
1056 |
+
<div class="spider_description"></div>
|
1057 |
+
</td>
|
1058 |
+
</tr>
|
1059 |
<tr>
|
1060 |
<td class="spider_label_options">
|
1061 |
<label>Enable control buttons: </label>
|
admin/views/BWGViewTags_bwg.php
CHANGED
@@ -31,7 +31,7 @@ class BWGViewTags_bwg {
|
|
31 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
32 |
$ids_string = '';
|
33 |
$per_page = $this->model->per_page();
|
34 |
-
|
35 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), '', 'bwg_nonce' );
|
36 |
$query_url = add_query_arg(array('action' => ''), $query_url);
|
37 |
?>
|
@@ -69,7 +69,7 @@ class BWGViewTags_bwg {
|
|
69 |
<div class="tablenav top">
|
70 |
<?php
|
71 |
WDWLibrary::search('Name', $search_value, 'tags_form');
|
72 |
-
WDWLibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'tags_form', $per_page);
|
73 |
?>
|
74 |
</div>
|
75 |
<table class="wp-list-table widefat fixed pages">
|
@@ -170,6 +170,11 @@ class BWGViewTags_bwg {
|
|
170 |
?>
|
171 |
</tbody>
|
172 |
</table>
|
|
|
|
|
|
|
|
|
|
|
173 |
<input id="task" name="task" type="hidden" value="" />
|
174 |
<input id="current_id" name="current_id" type="hidden" value="" />
|
175 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
31 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
32 |
$ids_string = '';
|
33 |
$per_page = $this->model->per_page();
|
34 |
+
$pager = 0;
|
35 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), '', 'bwg_nonce' );
|
36 |
$query_url = add_query_arg(array('action' => ''), $query_url);
|
37 |
?>
|
69 |
<div class="tablenav top">
|
70 |
<?php
|
71 |
WDWLibrary::search('Name', $search_value, 'tags_form');
|
72 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
73 |
?>
|
74 |
</div>
|
75 |
<table class="wp-list-table widefat fixed pages">
|
170 |
?>
|
171 |
</tbody>
|
172 |
</table>
|
173 |
+
<div class="tablenav bottom">
|
174 |
+
<?php
|
175 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
176 |
+
?>
|
177 |
+
</div>
|
178 |
<input id="task" name="task" type="hidden" value="" />
|
179 |
<input id="current_id" name="current_id" type="hidden" value="" />
|
180 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
admin/views/BWGViewThemes_bwg.php
CHANGED
@@ -32,6 +32,7 @@ class BWGViewThemes_bwg {
|
|
32 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
$ids_string = '';
|
34 |
$per_page = $this->model->per_page();
|
|
|
35 |
?>
|
36 |
<div style="clear: both; float: left; width: 99%;">
|
37 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
@@ -88,7 +89,7 @@ class BWGViewThemes_bwg {
|
|
88 |
<div class="tablenav top">
|
89 |
<?php
|
90 |
WDWLibrary::search('Title', $search_value, 'themes_form');
|
91 |
-
WDWLibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'themes_form', $per_page);
|
92 |
?>
|
93 |
</div>
|
94 |
<table class="wp-list-table widefat fixed pages">
|
@@ -173,6 +174,11 @@ class BWGViewThemes_bwg {
|
|
173 |
?>
|
174 |
</tbody>
|
175 |
</table>
|
|
|
|
|
|
|
|
|
|
|
176 |
<input id="task" name="task" type="hidden" value=""/>
|
177 |
<input id="current_id" name="current_id" type="hidden" value=""/>
|
178 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
|
@@ -239,7 +245,7 @@ class BWGViewThemes_bwg {
|
|
239 |
'square' => 'Square',
|
240 |
);
|
241 |
?>
|
242 |
-
|
243 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
244 |
This section allows you to add/edit theme.
|
245 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
|
@@ -646,7 +652,7 @@ class BWGViewThemes_bwg {
|
|
646 |
</table>
|
647 |
</fieldset>
|
648 |
</fieldset>
|
649 |
-
|
650 |
<fieldset class="spider_type_fieldset" id="Slideshow">
|
651 |
<fieldset class="spider_child_fieldset" id="Slideshow_1">
|
652 |
<table style="clear:both;">
|
@@ -2211,7 +2217,7 @@ class BWGViewThemes_bwg {
|
|
2211 |
<input type="text" name="blog_style_share_buttons_bg_color" id="blog_style_share_buttons_bg_color" value="<?php echo $row->blog_style_share_buttons_bg_color; ?>" class="color"/>
|
2212 |
</td>
|
2213 |
</tr>
|
2214 |
-
|
2215 |
<td class="spider_label"><label for="blog_style_share_buttons_bg_transparent">Buttons and title background transparency: </label></td>
|
2216 |
<td>
|
2217 |
<input type="text" name="blog_style_share_buttons_bg_transparent" id="blog_style_share_buttons_bg_transparent" value="<?php echo $row->blog_style_share_buttons_bg_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
32 |
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
$ids_string = '';
|
34 |
$per_page = $this->model->per_page();
|
35 |
+
$pager = 0;
|
36 |
?>
|
37 |
<div style="clear: both; float: left; width: 99%;">
|
38 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
89 |
<div class="tablenav top">
|
90 |
<?php
|
91 |
WDWLibrary::search('Title', $search_value, 'themes_form');
|
92 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'themes_form', $per_page);
|
93 |
?>
|
94 |
</div>
|
95 |
<table class="wp-list-table widefat fixed pages">
|
174 |
?>
|
175 |
</tbody>
|
176 |
</table>
|
177 |
+
<div class="tablenav bottom">
|
178 |
+
<?php
|
179 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'themes_form', $per_page);
|
180 |
+
?>
|
181 |
+
</div>
|
182 |
<input id="task" name="task" type="hidden" value=""/>
|
183 |
<input id="current_id" name="current_id" type="hidden" value=""/>
|
184 |
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
|
245 |
'square' => 'Square',
|
246 |
);
|
247 |
?>
|
248 |
+
<div style="clear: both; float: left; width: 99%;">
|
249 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
250 |
This section allows you to add/edit theme.
|
251 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
|
652 |
</table>
|
653 |
</fieldset>
|
654 |
</fieldset>
|
655 |
+
|
656 |
<fieldset class="spider_type_fieldset" id="Slideshow">
|
657 |
<fieldset class="spider_child_fieldset" id="Slideshow_1">
|
658 |
<table style="clear:both;">
|
2217 |
<input type="text" name="blog_style_share_buttons_bg_color" id="blog_style_share_buttons_bg_color" value="<?php echo $row->blog_style_share_buttons_bg_color; ?>" class="color"/>
|
2218 |
</td>
|
2219 |
</tr>
|
2220 |
+
<tr>
|
2221 |
<td class="spider_label"><label for="blog_style_share_buttons_bg_transparent">Buttons and title background transparency: </label></td>
|
2222 |
<td>
|
2223 |
<input type="text" name="blog_style_share_buttons_bg_transparent" id="blog_style_share_buttons_bg_transparent" value="<?php echo $row->blog_style_share_buttons_bg_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
admin/views/BWGViewWidget.php
CHANGED
@@ -70,17 +70,18 @@ class BWGViewWidget {
|
|
70 |
|
71 |
// Widget Control Panel.
|
72 |
function form($instance, $id_title, $name_title, $id_type, $name_type, $id_show, $name_show, $id_gallery_id, $name_gallery_id, $id_album_id, $name_album_id, $id_count, $name_count, $id_width, $name_width, $id_height, $name_height, $id_theme_id, $name_theme_id) {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
84 |
$instance = wp_parse_args((array) $instance, $defaults);
|
85 |
$gallery_rows = $this->model->get_gallery_rows_data();
|
86 |
$album_rows = $this->model->get_album_rows_data();
|
70 |
|
71 |
// Widget Control Panel.
|
72 |
function form($instance, $id_title, $name_title, $id_type, $name_type, $id_show, $name_show, $id_gallery_id, $name_gallery_id, $id_album_id, $name_album_id, $id_count, $name_count, $id_width, $name_width, $id_height, $name_height, $id_theme_id, $name_theme_id) {
|
73 |
+
$defaults = array(
|
74 |
+
'title' => 'Photo Gallery',
|
75 |
+
'type' => 'gallery',
|
76 |
+
'gallery_id' => 0,
|
77 |
+
'album_id' => 0,
|
78 |
+
'show' => 'random',
|
79 |
+
'count' => 4,
|
80 |
+
'width' => 100,
|
81 |
+
'height' => 100,
|
82 |
+
'theme_id' => 0,
|
83 |
+
);
|
84 |
+
|
85 |
$instance = wp_parse_args((array) $instance, $defaults);
|
86 |
$gallery_rows = $this->model->get_gallery_rows_data();
|
87 |
$album_rows = $this->model->get_album_rows_data();
|
admin/views/BWGViewWidgetSlideshow.php
CHANGED
@@ -42,7 +42,7 @@ class BWGViewWidgetSlideshow {
|
|
42 |
echo $before_title . $title . $after_title;
|
43 |
}
|
44 |
// Widget output.
|
45 |
-
|
46 |
$controller_class = 'BWGControllerSlideshow';
|
47 |
$controller = new $controller_class();
|
48 |
global $bwg;
|
@@ -51,7 +51,7 @@ class BWGViewWidgetSlideshow {
|
|
51 |
'gallery_type' => 'slideshow',
|
52 |
'gallery_id' => $gallery_id,
|
53 |
'width' => $width,
|
54 |
-
'height' => $height,
|
55 |
'effect' => $effect,
|
56 |
'interval' => $interval,
|
57 |
'shuffle' => $shuffle,
|
42 |
echo $before_title . $title . $after_title;
|
43 |
}
|
44 |
// Widget output.
|
45 |
+
require_once(WD_BWG_DIR . '/frontend/controllers/BWGControllerSlideshow.php');
|
46 |
$controller_class = 'BWGControllerSlideshow';
|
47 |
$controller = new $controller_class();
|
48 |
global $bwg;
|
51 |
'gallery_type' => 'slideshow',
|
52 |
'gallery_id' => $gallery_id,
|
53 |
'width' => $width,
|
54 |
+
'height' => $height,
|
55 |
'effect' => $effect,
|
56 |
'interval' => $interval,
|
57 |
'shuffle' => $shuffle,
|
css/bwg_frontend.css
CHANGED
@@ -3,6 +3,14 @@ div[id^="bwg_container"] p {
|
|
3 |
margin: 0 !important;
|
4 |
}
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
.spider_popup_loading,
|
7 |
.footer-list-block .bwp_gallery .spider_popup_loading,
|
8 |
.footer-list-block .bwp_gallery_tags .spider_popup_loading {
|
@@ -102,7 +110,6 @@ div[id^="bwg_container"] p {
|
|
102 |
box-sizing: border-box;
|
103 |
cursor: pointer;
|
104 |
display: table;
|
105 |
-
left: -9999px;
|
106 |
line-height: 0;
|
107 |
margin-top: -15px;
|
108 |
position: absolute;
|
3 |
margin: 0 !important;
|
4 |
}
|
5 |
|
6 |
+
div[id^="bwg_container"] a {
|
7 |
+
border: none;
|
8 |
+
outline: none;
|
9 |
+
font-size: 0;
|
10 |
+
cursor: pointer;
|
11 |
+
text-decoration: none;
|
12 |
+
}
|
13 |
+
|
14 |
.spider_popup_loading,
|
15 |
.footer-list-block .bwp_gallery .spider_popup_loading,
|
16 |
.footer-list-block .bwp_gallery_tags .spider_popup_loading {
|
110 |
box-sizing: border-box;
|
111 |
cursor: pointer;
|
112 |
display: table;
|
|
|
113 |
line-height: 0;
|
114 |
margin-top: -15px;
|
115 |
position: absolute;
|
css/bwg_tables.css
CHANGED
@@ -295,8 +295,8 @@
|
|
295 |
}
|
296 |
|
297 |
.spider_label_galleries {
|
298 |
-
|
299 |
-
|
300 |
}
|
301 |
|
302 |
.spider_fieldset .spider_label {
|
@@ -503,7 +503,6 @@
|
|
503 |
.spider_order {
|
504 |
display: none;
|
505 |
}
|
506 |
-
|
507 |
#add_embed_help {
|
508 |
height: 200px;
|
509 |
width: 672px;
|
295 |
}
|
296 |
|
297 |
.spider_label_galleries {
|
298 |
+
font-weight: bold;
|
299 |
+
width: 180px;
|
300 |
}
|
301 |
|
302 |
.spider_fieldset .spider_label {
|
503 |
.spider_order {
|
504 |
display: none;
|
505 |
}
|
|
|
506 |
#add_embed_help {
|
507 |
height: 200px;
|
508 |
width: 672px;
|
filemanager/UploadHandler.php
CHANGED
@@ -104,13 +104,7 @@ class UploadHandler {
|
|
104 |
'image_versions' => array(
|
105 |
// Uncomment the following version to restrict the size of
|
106 |
// uploaded images:
|
107 |
-
|
108 |
-
'' => array(
|
109 |
-
'max_width' => 1920,
|
110 |
-
'max_height' => 1200,
|
111 |
-
'jpeg_quality' => 95
|
112 |
-
),
|
113 |
-
*/
|
114 |
// Uncomment the following to create medium sized images:
|
115 |
/*
|
116 |
'medium' => array(
|
@@ -120,10 +114,17 @@ class UploadHandler {
|
|
120 |
),
|
121 |
*/
|
122 |
'.original' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
'max_width' => $this->options['max_width'],
|
124 |
'max_height' => $this->options['max_height'],
|
125 |
'jpeg_quality' => 100
|
126 |
),
|
|
|
127 |
'thumb' => array(
|
128 |
'max_width' => ((isset($_REQUEST['file_namesML']) && esc_html($_REQUEST['file_namesML'])) ? (isset($_REQUEST['importer_thumb_width']) ? (int) $_REQUEST['importer_thumb_width'] : 300) : ((isset($_POST['upload_thumb_width']) && (int) $_POST['upload_thumb_width']) ? (int) $_POST['upload_thumb_width'] : 300)),
|
129 |
'max_height' => ((isset($_REQUEST['file_namesML']) && esc_html($_REQUEST['file_namesML'])) ? (isset($_REQUEST['importer_thumb_height']) ? (int) $_REQUEST['importer_thumb_height'] : 300) : ((isset($_POST['upload_thumb_height']) && (int) $_POST['upload_thumb_height']) ? (int) $_POST['upload_thumb_height'] : 300)),
|
@@ -131,6 +132,8 @@ class UploadHandler {
|
|
131 |
),
|
132 |
)
|
133 |
);
|
|
|
|
|
134 |
if ($options) {
|
135 |
$this->options = array_merge($this->options, $options);
|
136 |
}
|
104 |
'image_versions' => array(
|
105 |
// Uncomment the following version to restrict the size of
|
106 |
// uploaded images:
|
107 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
// Uncomment the following to create medium sized images:
|
109 |
/*
|
110 |
'medium' => array(
|
114 |
),
|
115 |
*/
|
116 |
'.original' => array(
|
117 |
+
'max_width' => NULL,
|
118 |
+
'max_height' => NULL,
|
119 |
+
'jpeg_quality' => 100
|
120 |
+
),
|
121 |
+
|
122 |
+
'' => array(
|
123 |
'max_width' => $this->options['max_width'],
|
124 |
'max_height' => $this->options['max_height'],
|
125 |
'jpeg_quality' => 100
|
126 |
),
|
127 |
+
|
128 |
'thumb' => array(
|
129 |
'max_width' => ((isset($_REQUEST['file_namesML']) && esc_html($_REQUEST['file_namesML'])) ? (isset($_REQUEST['importer_thumb_width']) ? (int) $_REQUEST['importer_thumb_width'] : 300) : ((isset($_POST['upload_thumb_width']) && (int) $_POST['upload_thumb_width']) ? (int) $_POST['upload_thumb_width'] : 300)),
|
130 |
'max_height' => ((isset($_REQUEST['file_namesML']) && esc_html($_REQUEST['file_namesML'])) ? (isset($_REQUEST['importer_thumb_height']) ? (int) $_REQUEST['importer_thumb_height'] : 300) : ((isset($_POST['upload_thumb_height']) && (int) $_POST['upload_thumb_height']) ? (int) $_POST['upload_thumb_height'] : 300)),
|
132 |
),
|
133 |
)
|
134 |
);
|
135 |
+
$this->options['max_width'] = NULL;
|
136 |
+
$this->options['max_height'] = NULL;
|
137 |
if ($options) {
|
138 |
$this->options = array_merge($this->options, $options);
|
139 |
}
|
filemanager/model.php
CHANGED
@@ -155,14 +155,13 @@ class FilemanagerModel {
|
|
155 |
$image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_name, ENT_COMPAT | ENT_QUOTES));
|
156 |
$file['resolution'] = $this->is_img($file['type']) ? $image_info[0] . ' x ' . $image_info[1] . ' px' : '';
|
157 |
$exif = $this->bwg_wp_read_image_metadata( $parent_dir . '/.original/' . $file_name );
|
158 |
-
$file['credit'] = $exif['credit'];
|
159 |
$file['aperture'] = $exif['aperture'];
|
160 |
$file['camera'] = $exif['camera'];
|
161 |
$file['caption'] = $exif['caption'];
|
162 |
$file['iso'] = $exif['iso'];
|
163 |
$file['orientation'] = $exif['orientation'];
|
164 |
$file['copyright'] = $exif['copyright'];
|
165 |
-
|
166 |
$files[] = $file;
|
167 |
}
|
168 |
}
|
@@ -219,7 +218,7 @@ class FilemanagerModel {
|
|
219 |
$file['date_modified'] = date('d F Y, H:i', filemtime($parent_dir . '/' . $file_meta['file']));
|
220 |
// $image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_meta['file'], ENT_COMPAT | ENT_QUOTES));
|
221 |
$file['resolution'] = $this->is_img($file['type']) ? $file_meta['width'] . ' x ' . $file_meta['height'] . ' px' : '';
|
222 |
-
$exif = $this->bwg_wp_read_image_metadata($parent_dir . '/.original/' . $file_name);
|
223 |
$file['credit'] = $exif['credit'];
|
224 |
$file['aperture'] = $exif['aperture'];
|
225 |
$file['camera'] = $exif['camera'];
|
@@ -227,14 +226,12 @@ class FilemanagerModel {
|
|
227 |
$file['iso'] = $exif['iso'];
|
228 |
$file['orientation'] = $exif['orientation'];
|
229 |
$file['copyright'] = $exif['copyright'];
|
230 |
-
|
231 |
$files[] = $file;
|
232 |
}
|
233 |
}
|
234 |
return $files;
|
235 |
}
|
236 |
|
237 |
-
|
238 |
private function bwg_wp_read_image_metadata( $file ) {
|
239 |
if (!file_exists($file)) {
|
240 |
return false;
|
@@ -252,13 +249,13 @@ class FilemanagerModel {
|
|
252 |
'shutter_speed' => 0,
|
253 |
'title' => '',
|
254 |
'orientation' => 0,
|
255 |
-
);
|
256 |
if ( is_callable( 'iptcparse' ) ) {
|
257 |
getimagesize( $file, $info );
|
258 |
if ( ! empty( $info['APP13'] ) ) {
|
259 |
-
$iptc = iptcparse( $info['APP13'] );
|
260 |
if ( ! empty( $iptc['2#105'][0] ) ) {
|
261 |
-
$meta['title'] = trim( $iptc['2#105'][0] );
|
262 |
} elseif ( ! empty( $iptc['2#005'][0] ) ) {
|
263 |
$meta['title'] = trim( $iptc['2#005'][0] );
|
264 |
}
|
@@ -267,7 +264,7 @@ class FilemanagerModel {
|
|
267 |
if ( empty( $meta['title'] ) ) {
|
268 |
mbstring_binary_safe_encoding();
|
269 |
$caption_length = strlen( $caption );
|
270 |
-
reset_mbstring_encoding();
|
271 |
if ( $caption_length < 80 ) {
|
272 |
$meta['title'] = $caption;
|
273 |
} else {
|
@@ -300,7 +297,7 @@ class FilemanagerModel {
|
|
300 |
mbstring_binary_safe_encoding();
|
301 |
$description_length = strlen( $exif['ImageDescription'] );
|
302 |
reset_mbstring_encoding();
|
303 |
-
if ( empty( $meta['title'] ) && $description_length < 80 ) {
|
304 |
$meta['title'] = trim( $exif['ImageDescription'] );
|
305 |
if ( empty( $meta['caption'] ) && ! empty( $exif['COMPUTED']['UserComment'] ) && trim( $exif['COMPUTED']['UserComment'] ) != $meta['title'] ) {
|
306 |
$meta['caption'] = trim( $exif['COMPUTED']['UserComment'] );
|
155 |
$image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_name, ENT_COMPAT | ENT_QUOTES));
|
156 |
$file['resolution'] = $this->is_img($file['type']) ? $image_info[0] . ' x ' . $image_info[1] . ' px' : '';
|
157 |
$exif = $this->bwg_wp_read_image_metadata( $parent_dir . '/.original/' . $file_name );
|
158 |
+
$file['credit'] = $exif['credit'];
|
159 |
$file['aperture'] = $exif['aperture'];
|
160 |
$file['camera'] = $exif['camera'];
|
161 |
$file['caption'] = $exif['caption'];
|
162 |
$file['iso'] = $exif['iso'];
|
163 |
$file['orientation'] = $exif['orientation'];
|
164 |
$file['copyright'] = $exif['copyright'];
|
|
|
165 |
$files[] = $file;
|
166 |
}
|
167 |
}
|
218 |
$file['date_modified'] = date('d F Y, H:i', filemtime($parent_dir . '/' . $file_meta['file']));
|
219 |
// $image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_meta['file'], ENT_COMPAT | ENT_QUOTES));
|
220 |
$file['resolution'] = $this->is_img($file['type']) ? $file_meta['width'] . ' x ' . $file_meta['height'] . ' px' : '';
|
221 |
+
$exif = $this->bwg_wp_read_image_metadata($parent_dir . '/.original/' . $file_name);
|
222 |
$file['credit'] = $exif['credit'];
|
223 |
$file['aperture'] = $exif['aperture'];
|
224 |
$file['camera'] = $exif['camera'];
|
226 |
$file['iso'] = $exif['iso'];
|
227 |
$file['orientation'] = $exif['orientation'];
|
228 |
$file['copyright'] = $exif['copyright'];
|
|
|
229 |
$files[] = $file;
|
230 |
}
|
231 |
}
|
232 |
return $files;
|
233 |
}
|
234 |
|
|
|
235 |
private function bwg_wp_read_image_metadata( $file ) {
|
236 |
if (!file_exists($file)) {
|
237 |
return false;
|
249 |
'shutter_speed' => 0,
|
250 |
'title' => '',
|
251 |
'orientation' => 0,
|
252 |
+
);
|
253 |
if ( is_callable( 'iptcparse' ) ) {
|
254 |
getimagesize( $file, $info );
|
255 |
if ( ! empty( $info['APP13'] ) ) {
|
256 |
+
$iptc = iptcparse( $info['APP13'] );
|
257 |
if ( ! empty( $iptc['2#105'][0] ) ) {
|
258 |
+
$meta['title'] = trim( $iptc['2#105'][0] );
|
259 |
} elseif ( ! empty( $iptc['2#005'][0] ) ) {
|
260 |
$meta['title'] = trim( $iptc['2#005'][0] );
|
261 |
}
|
264 |
if ( empty( $meta['title'] ) ) {
|
265 |
mbstring_binary_safe_encoding();
|
266 |
$caption_length = strlen( $caption );
|
267 |
+
reset_mbstring_encoding();
|
268 |
if ( $caption_length < 80 ) {
|
269 |
$meta['title'] = $caption;
|
270 |
} else {
|
297 |
mbstring_binary_safe_encoding();
|
298 |
$description_length = strlen( $exif['ImageDescription'] );
|
299 |
reset_mbstring_encoding();
|
300 |
+
if ( empty( $meta['title'] ) && $description_length < 80 ) {
|
301 |
$meta['title'] = trim( $exif['ImageDescription'] );
|
302 |
if ( empty( $meta['caption'] ) && ! empty( $exif['COMPUTED']['UserComment'] ) && trim( $exif['COMPUTED']['UserComment'] ) != $meta['title'] ) {
|
303 |
$meta['caption'] = trim( $exif['COMPUTED']['UserComment'] );
|
filemanager/view.php
CHANGED
@@ -95,7 +95,7 @@ class FilemanagerView {
|
|
95 |
?>
|
96 |
|
97 |
<form id="adminForm" name="adminForm" action="" method="post">
|
98 |
-
|
99 |
<div id="wrapper">
|
100 |
<div id="opacity_div" style="background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
|
101 |
<div id="loading_div" style="text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
|
@@ -372,7 +372,11 @@ class FilemanagerView {
|
|
372 |
<?php
|
373 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'bwg_UploadHandler', 'bwg_nonce' );
|
374 |
$query_url = add_query_arg(array('action' => 'bwg_UploadHandler', 'dir' => $this->controller->get_uploads_dir() . '/' . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '') . '/'), $query_url);
|
|
|
|
|
375 |
?>
|
|
|
|
|
376 |
<input id="jQueryUploader" type="file" name="files[]"
|
377 |
data-url="<?php echo $query_url; ?>"
|
378 |
multiple>
|
95 |
?>
|
96 |
|
97 |
<form id="adminForm" name="adminForm" action="" method="post">
|
98 |
+
<?php wp_nonce_field( '', 'bwg_nonce' ); ?>
|
99 |
<div id="wrapper">
|
100 |
<div id="opacity_div" style="background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
|
101 |
<div id="loading_div" style="text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
|
372 |
<?php
|
373 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'bwg_UploadHandler', 'bwg_nonce' );
|
374 |
$query_url = add_query_arg(array('action' => 'bwg_UploadHandler', 'dir' => $this->controller->get_uploads_dir() . '/' . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '') . '/'), $query_url);
|
375 |
+
|
376 |
+
|
377 |
?>
|
378 |
+
|
379 |
+
|
380 |
<input id="jQueryUploader" type="file" name="files[]"
|
381 |
data-url="<?php echo $query_url; ?>"
|
382 |
multiple>
|
framework/WDWLibrary.php
CHANGED
@@ -171,10 +171,18 @@ class WDWLibrary {
|
|
171 |
}
|
172 |
document.getElementById("<?php echo $form_id; ?>").submit();
|
173 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
</script>
|
175 |
<div class="alignleft actions" style="">
|
176 |
<label for="search_value" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
177 |
-
<input type="text" id="search_value" name="search_value" class="spider_search_value" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
|
178 |
</div>
|
179 |
<div class="alignleft actions">
|
180 |
<input type="button" value="Search" onclick="spider_search()" class="button-secondary action">
|
@@ -210,7 +218,7 @@ class WDWLibrary {
|
|
210 |
<?php
|
211 |
}
|
212 |
|
213 |
-
public static function html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20) {
|
214 |
$limit = $items_per_page;
|
215 |
if ($count_items) {
|
216 |
if ($count_items % $limit) {
|
@@ -223,6 +231,7 @@ class WDWLibrary {
|
|
223 |
else {
|
224 |
$items_county = 1;
|
225 |
}
|
|
|
226 |
?>
|
227 |
<script type="text/javascript">
|
228 |
var items_county = <?php echo $items_county; ?>;
|
@@ -255,20 +264,21 @@ class WDWLibrary {
|
|
255 |
}
|
256 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
257 |
}
|
258 |
-
function check_enter_key(e) {
|
259 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
260 |
if (key_code == 13) { /*Enter keycode*/
|
261 |
-
if (jQuery(
|
262 |
document.getElementById('page_number').value = items_county;
|
263 |
}
|
264 |
else {
|
265 |
-
document.getElementById('page_number').value = jQuery(
|
266 |
}
|
267 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
268 |
}
|
269 |
return true;
|
270 |
}
|
271 |
</script>
|
|
|
272 |
<div class="tablenav-pages">
|
273 |
<span class="displaying-num">
|
274 |
<?php
|
@@ -301,7 +311,7 @@ class WDWLibrary {
|
|
301 |
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:spider_page(<?php echo $page_number; ?>,-1);">‹</a>
|
302 |
<span class="paging-input">
|
303 |
<span class="total-pages">
|
304 |
-
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
305 |
</span> of
|
306 |
<span class="total-pages">
|
307 |
<?php echo $items_county; ?>
|
@@ -314,11 +324,12 @@ class WDWLibrary {
|
|
314 |
?>
|
315 |
</span>
|
316 |
</div>
|
317 |
-
|
|
|
318 |
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
|
319 |
<?php
|
|
|
320 |
}
|
321 |
-
|
322 |
public static function ajax_search($search_by, $search_value, $form_id) {
|
323 |
?>
|
324 |
<div class="alignleft actions" style="clear:both;">
|
@@ -326,31 +337,26 @@ class WDWLibrary {
|
|
326 |
function spider_search() {
|
327 |
document.getElementById("page_number").value = "1";
|
328 |
document.getElementById("search_or_not").value = "search";
|
329 |
-
jQuery("#ajax_task").val("search");
|
330 |
spider_ajax_save('<?php echo $form_id; ?>');
|
331 |
}
|
332 |
function spider_reset() {
|
333 |
if (document.getElementById("search_value")) {
|
334 |
document.getElementById("search_value").value = "";
|
335 |
}
|
336 |
-
jQuery("#ajax_task").val("search");
|
337 |
spider_ajax_save('<?php echo $form_id; ?>');
|
338 |
-
}
|
339 |
-
function
|
340 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
341 |
if (key_code == 13) { /*Enter keycode*/
|
342 |
-
|
343 |
-
document.getElementById("search_or_not").value = "search";
|
344 |
-
jQuery("#ajax_task").val("search");
|
345 |
-
spider_ajax_save('<?php echo $form_id; ?>');
|
346 |
return false;
|
347 |
}
|
348 |
-
return true;
|
349 |
}
|
350 |
</script>
|
351 |
<div class="alignleft actions" style="">
|
352 |
<label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
353 |
-
<input type="text" id="search_value" name="search_value" class="spider_search_value" value="<?php echo esc_html($search_value); ?>"
|
354 |
</div>
|
355 |
<div class="alignleft actions">
|
356 |
<input type="button" value="Search" onclick="spider_search()" class="button-secondary action">
|
@@ -360,7 +366,7 @@ class WDWLibrary {
|
|
360 |
<?php
|
361 |
}
|
362 |
|
363 |
-
public static function ajax_html_page_nav($count_items, $page_number, $form_id,
|
364 |
$limit = $items_per_page;
|
365 |
|
366 |
if ($count_items) {
|
@@ -374,6 +380,7 @@ class WDWLibrary {
|
|
374 |
else {
|
375 |
$items_county = 1;
|
376 |
}
|
|
|
377 |
?>
|
378 |
<script type="text/javascript">
|
379 |
var items_county = <?php echo $items_county; ?>;
|
@@ -406,14 +413,14 @@ class WDWLibrary {
|
|
406 |
}
|
407 |
spider_ajax_save('<?php echo $form_id; ?>');
|
408 |
}
|
409 |
-
function check_enter_key(e) {
|
410 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
411 |
if (key_code == 13) { /*Enter keycode*/
|
412 |
-
if (jQuery(
|
413 |
document.getElementById('page_number').value = items_county;
|
414 |
}
|
415 |
else {
|
416 |
-
document.getElementById('page_number').value = jQuery(
|
417 |
}
|
418 |
spider_ajax_save('<?php echo $form_id; ?>');
|
419 |
return false;
|
@@ -421,6 +428,7 @@ class WDWLibrary {
|
|
421 |
return true;
|
422 |
}
|
423 |
</script>
|
|
|
424 |
<div id="tablenav-pages" class="tablenav-pages">
|
425 |
<span class="displaying-num">
|
426 |
<?php
|
@@ -453,7 +461,7 @@ class WDWLibrary {
|
|
453 |
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" onclick="spider_page(<?php echo $page_number; ?>,-1)">‹</a>
|
454 |
<span class="paging-input">
|
455 |
<span class="total-pages">
|
456 |
-
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
|
457 |
</span> of
|
458 |
<span class="total-pages">
|
459 |
<?php echo $items_county; ?>
|
@@ -466,12 +474,14 @@ class WDWLibrary {
|
|
466 |
?>
|
467 |
</span>
|
468 |
</div>
|
|
|
469 |
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
470 |
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
|
471 |
<?php
|
|
|
472 |
}
|
473 |
|
474 |
-
public static function ajax_html_frontend_page_nav($theme_row, $count_items, $page_number, $form_id, $limit = 20, $current_view, $id, $cur_alb_gal_id = 0, $type = 'album') {
|
475 |
$type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : $type);
|
476 |
$album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : $cur_alb_gal_id);
|
477 |
if ($count_items) {
|
@@ -485,42 +495,10 @@ class WDWLibrary {
|
|
485 |
else {
|
486 |
$items_county = 1;
|
487 |
}
|
|
|
|
|
|
|
488 |
?>
|
489 |
-
<script type="text/javascript">
|
490 |
-
function spider_page_<?php echo $current_view; ?>(cur, x, y) {
|
491 |
-
if (jQuery(cur).hasClass('disabled')) {
|
492 |
-
return false;
|
493 |
-
}
|
494 |
-
var items_county_<?php echo $current_view; ?> = <?php echo $items_county; ?>;
|
495 |
-
switch (y) {
|
496 |
-
case 1:
|
497 |
-
if (x >= items_county_<?php echo $current_view; ?>) {
|
498 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
499 |
-
}
|
500 |
-
else {
|
501 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = x + 1;
|
502 |
-
}
|
503 |
-
break;
|
504 |
-
case 2:
|
505 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
506 |
-
break;
|
507 |
-
case -1:
|
508 |
-
if (x == 1) {
|
509 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
510 |
-
}
|
511 |
-
else {
|
512 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = x - 1;
|
513 |
-
}
|
514 |
-
break;
|
515 |
-
case -2:
|
516 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
517 |
-
break;
|
518 |
-
default:
|
519 |
-
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
520 |
-
}
|
521 |
-
spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0);
|
522 |
-
}
|
523 |
-
</script>
|
524 |
<div class="tablenav-pages_<?php echo $current_view; ?>">
|
525 |
<?php
|
526 |
if ($theme_row->page_nav_number) {
|
@@ -559,16 +537,67 @@ class WDWLibrary {
|
|
559 |
}
|
560 |
?>
|
561 |
<span class="pagination-links_<?php echo $current_view; ?>">
|
562 |
-
<a class="<?php echo $first_page; ?>" title="<?php echo __('Go to the first page', 'bwg'); ?>"
|
563 |
-
<a class="<?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', 'bwg'); ?>"
|
564 |
<span class="paging-input_<?php echo $current_view; ?>">
|
565 |
<span class="total-pages_<?php echo $current_view; ?>"><?php echo $page_number; ?></span> <?php echo __('of', 'bwg'); ?> <span class="total-pages_<?php echo $current_view; ?>">
|
566 |
<?php echo $items_county; ?>
|
567 |
</span>
|
568 |
</span>
|
569 |
-
<a class="<?php echo $next_page ?>" title="<?php echo __('Go to the next page', 'bwg'); ?>"
|
570 |
-
<a class="<?php echo $last_page ?>" title="<?php echo __('Go to the last page', 'bwg'); ?>"
|
571 |
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
<?php
|
573 |
}
|
574 |
?>
|
@@ -736,7 +765,7 @@ class WDWLibrary {
|
|
736 |
exit();
|
737 |
}
|
738 |
|
739 |
-
|
740 |
* If string argument passed, put it into delimiters for AJAX response to separate from other data.
|
741 |
*/
|
742 |
|
@@ -761,6 +790,7 @@ class WDWLibrary {
|
|
761 |
}
|
762 |
return $nonce_verified;
|
763 |
}
|
|
|
764 |
////////////////////////////////////////////////////////////////////////////////////////
|
765 |
// Private Methods //
|
766 |
////////////////////////////////////////////////////////////////////////////////////////
|
171 |
}
|
172 |
document.getElementById("<?php echo $form_id; ?>").submit();
|
173 |
}
|
174 |
+
function check_search_key(e, that) {
|
175 |
+
var key_code = (e.keyCode ? e.keyCode : e.which);
|
176 |
+
if (key_code == 13) { /*Enter keycode*/
|
177 |
+
spider_search();
|
178 |
+
return false;
|
179 |
+
}
|
180 |
+
return true;
|
181 |
+
}
|
182 |
</script>
|
183 |
<div class="alignleft actions" style="">
|
184 |
<label for="search_value" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
185 |
+
<input type="text" id="search_value" name="search_value" class="spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
|
186 |
</div>
|
187 |
<div class="alignleft actions">
|
188 |
<input type="button" value="Search" onclick="spider_search()" class="button-secondary action">
|
218 |
<?php
|
219 |
}
|
220 |
|
221 |
+
public static function html_page_nav($count_items, $pager, $page_number, $form_id, $items_per_page = 20) {
|
222 |
$limit = $items_per_page;
|
223 |
if ($count_items) {
|
224 |
if ($count_items % $limit) {
|
231 |
else {
|
232 |
$items_county = 1;
|
233 |
}
|
234 |
+
if (!$pager) {
|
235 |
?>
|
236 |
<script type="text/javascript">
|
237 |
var items_county = <?php echo $items_county; ?>;
|
264 |
}
|
265 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
266 |
}
|
267 |
+
function check_enter_key(e, that) {
|
268 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
269 |
if (key_code == 13) { /*Enter keycode*/
|
270 |
+
if (jQuery(that).val() >= items_county) {
|
271 |
document.getElementById('page_number').value = items_county;
|
272 |
}
|
273 |
else {
|
274 |
+
document.getElementById('page_number').value = jQuery(that).val();
|
275 |
}
|
276 |
document.getElementById('<?php echo $form_id; ?>').submit();
|
277 |
}
|
278 |
return true;
|
279 |
}
|
280 |
</script>
|
281 |
+
<?php } ?>
|
282 |
<div class="tablenav-pages">
|
283 |
<span class="displaying-num">
|
284 |
<?php
|
311 |
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:spider_page(<?php echo $page_number; ?>,-1);">‹</a>
|
312 |
<span class="paging-input">
|
313 |
<span class="total-pages">
|
314 |
+
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event, this)" title="Go to the page" type="text" size="1" />
|
315 |
</span> of
|
316 |
<span class="total-pages">
|
317 |
<?php echo $items_county; ?>
|
324 |
?>
|
325 |
</span>
|
326 |
</div>
|
327 |
+
<?php if (!$pager) { ?>
|
328 |
+
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
329 |
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
|
330 |
<?php
|
331 |
+
}
|
332 |
}
|
|
|
333 |
public static function ajax_search($search_by, $search_value, $form_id) {
|
334 |
?>
|
335 |
<div class="alignleft actions" style="clear:both;">
|
337 |
function spider_search() {
|
338 |
document.getElementById("page_number").value = "1";
|
339 |
document.getElementById("search_or_not").value = "search";
|
|
|
340 |
spider_ajax_save('<?php echo $form_id; ?>');
|
341 |
}
|
342 |
function spider_reset() {
|
343 |
if (document.getElementById("search_value")) {
|
344 |
document.getElementById("search_value").value = "";
|
345 |
}
|
|
|
346 |
spider_ajax_save('<?php echo $form_id; ?>');
|
347 |
+
}
|
348 |
+
function check_search_key(e, that) {
|
349 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
350 |
if (key_code == 13) { /*Enter keycode*/
|
351 |
+
spider_search();
|
|
|
|
|
|
|
352 |
return false;
|
353 |
}
|
354 |
+
return true;
|
355 |
}
|
356 |
</script>
|
357 |
<div class="alignleft actions" style="">
|
358 |
<label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo $search_by; ?>:</label>
|
359 |
+
<input type="text" id="search_value" name="search_value" class="spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
|
360 |
</div>
|
361 |
<div class="alignleft actions">
|
362 |
<input type="button" value="Search" onclick="spider_search()" class="button-secondary action">
|
366 |
<?php
|
367 |
}
|
368 |
|
369 |
+
public static function ajax_html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20, $pager = 0) {
|
370 |
$limit = $items_per_page;
|
371 |
|
372 |
if ($count_items) {
|
380 |
else {
|
381 |
$items_county = 1;
|
382 |
}
|
383 |
+
if (!$pager) {
|
384 |
?>
|
385 |
<script type="text/javascript">
|
386 |
var items_county = <?php echo $items_county; ?>;
|
413 |
}
|
414 |
spider_ajax_save('<?php echo $form_id; ?>');
|
415 |
}
|
416 |
+
function check_enter_key(e, that) {
|
417 |
var key_code = (e.keyCode ? e.keyCode : e.which);
|
418 |
if (key_code == 13) { /*Enter keycode*/
|
419 |
+
if (jQuery(that).val() >= items_county) {
|
420 |
document.getElementById('page_number').value = items_county;
|
421 |
}
|
422 |
else {
|
423 |
+
document.getElementById('page_number').value = jQuery(that).val();
|
424 |
}
|
425 |
spider_ajax_save('<?php echo $form_id; ?>');
|
426 |
return false;
|
428 |
return true;
|
429 |
}
|
430 |
</script>
|
431 |
+
<?php } ?>
|
432 |
<div id="tablenav-pages" class="tablenav-pages">
|
433 |
<span class="displaying-num">
|
434 |
<?php
|
461 |
<a class="<?php echo $prev_page; ?>" title="Go to the previous page" onclick="spider_page(<?php echo $page_number; ?>,-1)">‹</a>
|
462 |
<span class="paging-input">
|
463 |
<span class="total-pages">
|
464 |
+
<input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event, this)" title="Go to the page" type="text" size="1" />
|
465 |
</span> of
|
466 |
<span class="total-pages">
|
467 |
<?php echo $items_county; ?>
|
474 |
?>
|
475 |
</span>
|
476 |
</div>
|
477 |
+
<?php if (!$pager) { ?>
|
478 |
<input type="hidden" id="page_number" name="page_number" value="<?php echo ((isset($_POST['page_number'])) ? (int) $_POST['page_number'] : 1); ?>" />
|
479 |
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo ((isset($_POST['search_or_not'])) ? esc_html($_POST['search_or_not']) : ''); ?>"/>
|
480 |
<?php
|
481 |
+
}
|
482 |
}
|
483 |
|
484 |
+
public static function ajax_html_frontend_page_nav($theme_row, $count_items, $page_number, $form_id, $limit = 20, $current_view, $id, $cur_alb_gal_id = 0, $type = 'album', $enable_seo = false) {
|
485 |
$type = (isset($_POST['type_' . $current_view]) ? esc_html($_POST['type_' . $current_view]) : $type);
|
486 |
$album_gallery_id = (isset($_POST['album_gallery_id_' . $current_view]) ? esc_html($_POST['album_gallery_id_' . $current_view]) : $cur_alb_gal_id);
|
487 |
if ($count_items) {
|
495 |
else {
|
496 |
$items_county = 1;
|
497 |
}
|
498 |
+
if ($page_number > $items_county) {
|
499 |
+
return;
|
500 |
+
}
|
501 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
<div class="tablenav-pages_<?php echo $current_view; ?>">
|
503 |
<?php
|
504 |
if ($theme_row->page_nav_number) {
|
537 |
}
|
538 |
?>
|
539 |
<span class="pagination-links_<?php echo $current_view; ?>">
|
540 |
+
<a class="<?php echo $first_page; ?>" title="<?php echo __('Go to the first page', 'bwg'); ?>"><?php echo $first_button; ?></a>
|
541 |
+
<a class="<?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', 'bwg'); ?>" <?php echo $page_number > 1 && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number - 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $previous_button; ?></a>
|
542 |
<span class="paging-input_<?php echo $current_view; ?>">
|
543 |
<span class="total-pages_<?php echo $current_view; ?>"><?php echo $page_number; ?></span> <?php echo __('of', 'bwg'); ?> <span class="total-pages_<?php echo $current_view; ?>">
|
544 |
<?php echo $items_county; ?>
|
545 |
</span>
|
546 |
</span>
|
547 |
+
<a class="<?php echo $next_page ?>" title="<?php echo __('Go to the next page', 'bwg'); ?>" <?php echo $page_number + 1 <= $items_county && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number + 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $next_button; ?></a>
|
548 |
+
<a class="<?php echo $last_page ?>" title="<?php echo __('Go to the last page', 'bwg'); ?>"><?php echo $last_button; ?></a>
|
549 |
</span>
|
550 |
+
<script type="text/javascript">
|
551 |
+
function spider_page_<?php echo $current_view; ?>(cur, x, y) {
|
552 |
+
if (jQuery(cur).hasClass('disabled')) {
|
553 |
+
return false;
|
554 |
+
}
|
555 |
+
var items_county_<?php echo $current_view; ?> = <?php echo $items_county; ?>;
|
556 |
+
switch (y) {
|
557 |
+
case 1:
|
558 |
+
if (x >= items_county_<?php echo $current_view; ?>) {
|
559 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
560 |
+
}
|
561 |
+
else {
|
562 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = x + 1;
|
563 |
+
}
|
564 |
+
break;
|
565 |
+
case 2:
|
566 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
|
567 |
+
break;
|
568 |
+
case -1:
|
569 |
+
if (x == 1) {
|
570 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
571 |
+
}
|
572 |
+
else {
|
573 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = x - 1;
|
574 |
+
}
|
575 |
+
break;
|
576 |
+
case -2:
|
577 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
578 |
+
break;
|
579 |
+
default:
|
580 |
+
document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
|
581 |
+
}
|
582 |
+
spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0);
|
583 |
+
}
|
584 |
+
jQuery(document).ready(function() {
|
585 |
+
jQuery('.<?php echo $first_page; ?>').on('click', function() {
|
586 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2);
|
587 |
+
});
|
588 |
+
jQuery('.<?php echo $prev_page; ?>').on('click', function() {
|
589 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1);
|
590 |
+
return false;
|
591 |
+
});
|
592 |
+
jQuery('.<?php echo $next_page; ?>').on('click', function() {
|
593 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1);
|
594 |
+
return false;
|
595 |
+
});
|
596 |
+
jQuery('.<?php echo $last_page; ?>').on('click', function() {
|
597 |
+
spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2);
|
598 |
+
});
|
599 |
+
});
|
600 |
+
</script>
|
601 |
<?php
|
602 |
}
|
603 |
?>
|
765 |
exit();
|
766 |
}
|
767 |
|
768 |
+
/**
|
769 |
* If string argument passed, put it into delimiters for AJAX response to separate from other data.
|
770 |
*/
|
771 |
|
790 |
}
|
791 |
return $nonce_verified;
|
792 |
}
|
793 |
+
|
794 |
////////////////////////////////////////////////////////////////////////////////////////
|
795 |
// Private Methods //
|
796 |
////////////////////////////////////////////////////////////////////////////////////////
|
framework/WDWLibraryEmbed.php
CHANGED
@@ -501,10 +501,6 @@ class WDWLibraryEmbed {
|
|
501 |
echo $html_to_insert;
|
502 |
|
503 |
}
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
////////////////////////////////////////////////////////////////////////////////////////
|
509 |
// Private Methods //
|
510 |
////////////////////////////////////////////////////////////////////////////////////////
|
501 |
echo $html_to_insert;
|
502 |
|
503 |
}
|
|
|
|
|
|
|
|
|
504 |
////////////////////////////////////////////////////////////////////////////////////////
|
505 |
// Private Methods //
|
506 |
////////////////////////////////////////////////////////////////////////////////////////
|
frontend/models/BWGModelAlbum_compact_preview.php
CHANGED
@@ -31,8 +31,8 @@ class BWGModelAlbum_compact_preview {
|
|
31 |
|
32 |
public function get_alb_gals_row($id, $albums_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
|
33 |
global $wpdb;
|
34 |
-
if (isset($
|
35 |
-
$limit = ((int) $
|
36 |
}
|
37 |
else {
|
38 |
$limit = 0;
|
@@ -67,8 +67,8 @@ class BWGModelAlbum_compact_preview {
|
|
67 |
|
68 |
public function get_image_rows_data($id, $images_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
|
69 |
global $wpdb;
|
70 |
-
if (isset($
|
71 |
-
$limit = ((int) $
|
72 |
}
|
73 |
else {
|
74 |
$limit = 0;
|
@@ -101,8 +101,8 @@ class BWGModelAlbum_compact_preview {
|
|
101 |
}
|
102 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
103 |
$page_nav['total'] = $total;
|
104 |
-
if (isset($
|
105 |
-
$limit = ((int) $
|
106 |
}
|
107 |
else {
|
108 |
$limit = 0;
|
@@ -117,8 +117,8 @@ class BWGModelAlbum_compact_preview {
|
|
117 |
global $wpdb;
|
118 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
|
119 |
$page_nav['total'] = $total;
|
120 |
-
if (isset($
|
121 |
-
$limit = ((int) $
|
122 |
}
|
123 |
else {
|
124 |
$limit = 0;
|
31 |
|
32 |
public function get_alb_gals_row($id, $albums_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
|
33 |
global $wpdb;
|
34 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
35 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $albums_per_page;
|
36 |
}
|
37 |
else {
|
38 |
$limit = 0;
|
67 |
|
68 |
public function get_image_rows_data($id, $images_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
|
69 |
global $wpdb;
|
70 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
71 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
72 |
}
|
73 |
else {
|
74 |
$limit = 0;
|
101 |
}
|
102 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
103 |
$page_nav['total'] = $total;
|
104 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
105 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
106 |
}
|
107 |
else {
|
108 |
$limit = 0;
|
117 |
global $wpdb;
|
118 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
|
119 |
$page_nav['total'] = $total;
|
120 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
121 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $albums_per_page;
|
122 |
}
|
123 |
else {
|
124 |
$limit = 0;
|
frontend/models/BWGModelAlbum_extended_preview.php
CHANGED
@@ -26,8 +26,8 @@ class BWGModelAlbum_extended_preview {
|
|
26 |
|
27 |
public function get_alb_gals_row($id, $albums_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
|
28 |
global $wpdb;
|
29 |
-
if (isset($
|
30 |
-
$limit = ((int) $
|
31 |
}
|
32 |
else {
|
33 |
$limit = 0;
|
@@ -63,8 +63,8 @@ class BWGModelAlbum_extended_preview {
|
|
63 |
else {
|
64 |
$where = '';
|
65 |
}
|
66 |
-
if (isset($
|
67 |
-
$limit = ((int) $
|
68 |
}
|
69 |
else {
|
70 |
$limit = 0;
|
@@ -90,8 +90,8 @@ class BWGModelAlbum_extended_preview {
|
|
90 |
}
|
91 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
92 |
$page_nav['total'] = $total;
|
93 |
-
if (isset($
|
94 |
-
$limit = ((int) $
|
95 |
}
|
96 |
else {
|
97 |
$limit = 0;
|
@@ -106,8 +106,8 @@ class BWGModelAlbum_extended_preview {
|
|
106 |
global $wpdb;
|
107 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
|
108 |
$page_nav['total'] = $total;
|
109 |
-
if (isset($
|
110 |
-
$limit = ((int) $
|
111 |
}
|
112 |
else {
|
113 |
$limit = 0;
|
26 |
|
27 |
public function get_alb_gals_row($id, $albums_per_page, $sort_by, $bwg, $sort_direction = ' ASC ') {
|
28 |
global $wpdb;
|
29 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
30 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $albums_per_page;
|
31 |
}
|
32 |
else {
|
33 |
$limit = 0;
|
63 |
else {
|
64 |
$where = '';
|
65 |
}
|
66 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
67 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
68 |
}
|
69 |
else {
|
70 |
$limit = 0;
|
90 |
}
|
91 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
92 |
$page_nav['total'] = $total;
|
93 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
94 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
95 |
}
|
96 |
else {
|
97 |
$limit = 0;
|
106 |
global $wpdb;
|
107 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id));
|
108 |
$page_nav['total'] = $total;
|
109 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
110 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $albums_per_page;
|
111 |
}
|
112 |
else {
|
113 |
$limit = 0;
|
frontend/models/BWGModelGalleryBox.php
CHANGED
@@ -43,14 +43,14 @@ class BWGModelGalleryBox {
|
|
43 |
|
44 |
public function get_image_rows_data($gallery_id, $sort_by, $order_by = 'asc') {
|
45 |
global $wpdb;
|
46 |
-
if ($sort_by == 'size' || $sort_by == 'resolution'
|
47 |
$sort_by = ' CAST(t1.' . $sort_by . ' AS SIGNED) ';
|
48 |
}
|
49 |
-
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
|
50 |
$sort_by = 't1.`order`';
|
51 |
}
|
52 |
if (preg_replace('/\s+/', '', $order_by) != 'asc') {
|
53 |
-
$order_by = 'desc';
|
54 |
}
|
55 |
$row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id WHERE t1.published=1 AND t1.gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
|
56 |
return $row;
|
43 |
|
44 |
public function get_image_rows_data($gallery_id, $sort_by, $order_by = 'asc') {
|
45 |
global $wpdb;
|
46 |
+
if ($sort_by == 'size' || $sort_by == 'resolution') {
|
47 |
$sort_by = ' CAST(t1.' . $sort_by . ' AS SIGNED) ';
|
48 |
}
|
49 |
+
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
|
50 |
$sort_by = 't1.`order`';
|
51 |
}
|
52 |
if (preg_replace('/\s+/', '', $order_by) != 'asc') {
|
53 |
+
$order_by = 'desc';
|
54 |
}
|
55 |
$row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM ' . $wpdb->prefix . 'bwg_image as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id WHERE t1.published=1 AND t1.gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $_SERVER['REMOTE_ADDR'], $gallery_id));
|
56 |
return $row;
|
frontend/models/BWGModelImage_browser.php
CHANGED
@@ -39,14 +39,14 @@ class BWGModelImage_browser {
|
|
39 |
else {
|
40 |
$where = '';
|
41 |
}
|
42 |
-
if ($sort_by == 'size' || $sort_by == 'resolution'
|
43 |
$sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
|
44 |
}
|
45 |
-
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
|
46 |
$sort_by = '`order`';
|
47 |
}
|
48 |
-
if (isset($
|
49 |
-
$limit = ((int) $
|
50 |
}
|
51 |
else {
|
52 |
$limit = 0;
|
@@ -78,8 +78,8 @@ class BWGModelImage_browser {
|
|
78 |
}
|
79 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
80 |
$page_nav['total'] = $total;
|
81 |
-
if (isset($
|
82 |
-
$limit = ((int) $
|
83 |
}
|
84 |
else {
|
85 |
$limit = 0;
|
39 |
else {
|
40 |
$where = '';
|
41 |
}
|
42 |
+
if ($sort_by == 'size' || $sort_by == 'resolution') {
|
43 |
$sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
|
44 |
}
|
45 |
+
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
|
46 |
$sort_by = '`order`';
|
47 |
}
|
48 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
49 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
50 |
}
|
51 |
else {
|
52 |
$limit = 0;
|
78 |
}
|
79 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
80 |
$page_nav['total'] = $total;
|
81 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
82 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
83 |
}
|
84 |
else {
|
85 |
$limit = 0;
|
frontend/models/BWGModelSlideshow.php
CHANGED
@@ -37,10 +37,10 @@ class BWGModelSlideshow {
|
|
37 |
|
38 |
public function get_image_rows_data($id, $sort_by, $order_by = 'asc', $bwg) {
|
39 |
global $wpdb;
|
40 |
-
if ($sort_by == 'size' || $sort_by == 'resolution'
|
41 |
$sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
|
42 |
}
|
43 |
-
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype')) {
|
44 |
$sort_by = '`order`';
|
45 |
}
|
46 |
$row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $id));
|
37 |
|
38 |
public function get_image_rows_data($id, $sort_by, $order_by = 'asc', $bwg) {
|
39 |
global $wpdb;
|
40 |
+
if ($sort_by == 'size' || $sort_by == 'resolution') {
|
41 |
$sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
|
42 |
}
|
43 |
+
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'filename')) {
|
44 |
$sort_by = '`order`';
|
45 |
}
|
46 |
$row = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 AND gallery_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by, $id));
|
frontend/models/BWGModelThumbnails.php
CHANGED
@@ -54,14 +54,14 @@ class BWGModelThumbnails {
|
|
54 |
$where = '';
|
55 |
}
|
56 |
}
|
57 |
-
if ($sort_by == 'size' || $sort_by == 'resolution'
|
58 |
$sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
|
59 |
}
|
60 |
-
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'RAND()')) {
|
61 |
$sort_by = '`order`';
|
62 |
}
|
63 |
-
if (isset($
|
64 |
-
$limit = ((int) $
|
65 |
}
|
66 |
else {
|
67 |
$limit = 0;
|
@@ -107,8 +107,8 @@ class BWGModelThumbnails {
|
|
107 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
108 |
}
|
109 |
$page_nav['total'] = $total;
|
110 |
-
if (isset($
|
111 |
-
$limit = ((int) $
|
112 |
}
|
113 |
else {
|
114 |
$limit = 0;
|
54 |
$where = '';
|
55 |
}
|
56 |
}
|
57 |
+
if ($sort_by == 'size' || $sort_by == 'resolution') {
|
58 |
$sort_by = ' CAST(' . $sort_by . ' AS SIGNED) ';
|
59 |
}
|
60 |
+
elseif (($sort_by != 'alt') && ($sort_by != 'date') && ($sort_by != 'filetype') && ($sort_by != 'RAND()') && ($sort_by != 'filename')) {
|
61 |
$sort_by = '`order`';
|
62 |
}
|
63 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
64 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
65 |
}
|
66 |
else {
|
67 |
$limit = 0;
|
107 |
$total = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image WHERE published=1 ' . $where . ' AND gallery_id="%d"', $id));
|
108 |
}
|
109 |
$page_nav['total'] = $total;
|
110 |
+
if (isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg]) {
|
111 |
+
$limit = ((int) $_REQUEST['page_number_' . $bwg] - 1) * $images_per_page;
|
112 |
}
|
113 |
else {
|
114 |
$limit = 0;
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -36,7 +36,7 @@ class BWGViewAlbum_compact_preview {
|
|
36 |
}
|
37 |
else {
|
38 |
$album_view_type = $params['compuct_album_view_type'];
|
39 |
-
}
|
40 |
if (!isset($params['popup_fullscreen'])) {
|
41 |
$params['popup_fullscreen'] = 0;
|
42 |
}
|
@@ -87,7 +87,7 @@ class BWGViewAlbum_compact_preview {
|
|
87 |
$params['show_album_name'] = $options_row->show_album_name;
|
88 |
}
|
89 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
90 |
-
$type = (isset($
|
91 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
92 |
$sort_direction = ' ' . $params['order_by'] . ' ';
|
93 |
|
@@ -145,7 +145,7 @@ class BWGViewAlbum_compact_preview {
|
|
145 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
146 |
return;
|
147 |
}
|
148 |
-
$album_gallery_id = (isset($
|
149 |
$album_row_data = $this->model->get_album_row_data($album_gallery_id);
|
150 |
|
151 |
if (!$album_gallery_id || ($type == 'album' && !$album_row_data)) {
|
@@ -206,16 +206,64 @@ class BWGViewAlbum_compact_preview {
|
|
206 |
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->album_compact_thumb_align . '; width:100%;';
|
207 |
}
|
208 |
|
209 |
-
$bwg_previous_album_id = (isset($
|
210 |
-
$bwg_previous_album_page_number = (isset($
|
211 |
|
212 |
$rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
|
213 |
$rgb_album_compact_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_compact_thumbs_bg_color);
|
214 |
$rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
?>
|
217 |
-
<style>
|
218 |
-
/*Album thumbs styles.*/
|
219 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
|
220 |
display: inline-block;
|
221 |
text-align: center;
|
@@ -270,12 +318,6 @@ class BWGViewAlbum_compact_preview {
|
|
270 |
text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
|
271 |
max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
|
272 |
}
|
273 |
-
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> .bwg_link {
|
274 |
-
border: none;
|
275 |
-
cursor: pointer;
|
276 |
-
text-decoration: none;
|
277 |
-
font-size: 0;
|
278 |
-
}
|
279 |
<?php
|
280 |
if ($params['compuct_album_title'] == 'show') { /* Show album/gallery title at the bottom.*/
|
281 |
?>
|
@@ -330,12 +372,6 @@ class BWGViewAlbum_compact_preview {
|
|
330 |
text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
|
331 |
max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
|
332 |
}
|
333 |
-
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumbnails_<?php echo $bwg; ?> .bwg_link {
|
334 |
-
border: none;
|
335 |
-
cursor: pointer;
|
336 |
-
text-decoration: none;
|
337 |
-
font-size: 0;
|
338 |
-
}
|
339 |
/*Image thumbs styles.*/
|
340 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
|
341 |
background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
|
@@ -382,12 +418,6 @@ class BWGViewAlbum_compact_preview {
|
|
382 |
max-width: <?php echo $params['compuct_album_image_column_number'] * ($params['compuct_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
|
383 |
text-align: <?php echo $theme_row->thumb_align; ?>;
|
384 |
}
|
385 |
-
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> .bwg_link {
|
386 |
-
border: none;
|
387 |
-
cursor: pointer;
|
388 |
-
text-decoration: none;
|
389 |
-
font-size: 0;
|
390 |
-
}
|
391 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
|
392 |
display: inline-block;
|
393 |
text-align: center;
|
@@ -531,7 +561,6 @@ class BWGViewAlbum_compact_preview {
|
|
531 |
<?php
|
532 |
$album_row = $this->model->get_album_row_data($album_gallery_id);
|
533 |
?>
|
534 |
-
|
535 |
<div id="bwg_container1_<?php echo $bwg; ?>">
|
536 |
<div id="bwg_container2_<?php echo $bwg; ?>">
|
537 |
<form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
|
@@ -555,24 +584,24 @@ class BWGViewAlbum_compact_preview {
|
|
555 |
</div>
|
556 |
<?php
|
557 |
if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
558 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type);
|
559 |
}
|
560 |
if ($bwg_previous_album_id) {
|
561 |
?>
|
562 |
-
<a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back')"><?php echo __('Back', 'bwg'); ?></a>
|
563 |
<?php
|
564 |
}
|
565 |
if ($options_row->show_album_name) {
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
}
|
577 |
?>
|
578 |
<div id="<?php echo $album_gallery_div_id; ?>" class="<?php echo $album_gallery_div_class; ?>" >
|
@@ -612,6 +641,7 @@ class BWGViewAlbum_compact_preview {
|
|
612 |
$title = $gallery_row->name;
|
613 |
$permalink = $gallery_row->permalink;
|
614 |
}
|
|
|
615 |
$local_preview_image = true;
|
616 |
$parsed_prev_url = parse_url($preview_image, PHP_URL_SCHEME);
|
617 |
|
@@ -633,7 +663,6 @@ class BWGViewAlbum_compact_preview {
|
|
633 |
$preview_path = $preview_image;
|
634 |
}
|
635 |
}
|
636 |
-
|
637 |
if($local_preview_image){
|
638 |
list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode($preview_path, ENT_COMPAT | ENT_QUOTES));
|
639 |
$scale = max($params['compuct_album_thumb_width'] / $image_thumb_width, $params['compuct_album_thumb_height'] / $image_thumb_height);
|
@@ -648,10 +677,10 @@ class BWGViewAlbum_compact_preview {
|
|
648 |
$thumb_left = 0;
|
649 |
$thumb_top = 0;
|
650 |
}
|
|
|
651 |
if ($type != 'gallery') {
|
652 |
?>
|
653 |
-
<a
|
654 |
-
<?php echo ($from !== "widget" ? (" onclick=\"spider_frontend_ajax('gal_front_form_" . $bwg . "', '" . $bwg . "', 'bwg_album_compact_" . $bwg . "', '" . $album_galallery_row->alb_gal_id . "', '" . $album_gallery_id . "', '" . $def_type . "', '', '" . htmlspecialchars(addslashes($title)) . "', 'default'); return false;\"") : ('onclick="window.location='."'" . $permalink ."'" .'"')); ?>>
|
655 |
<span class="bwg_album_thumb_<?php echo $bwg; ?>">
|
656 |
<?php
|
657 |
if ($params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
|
@@ -710,66 +739,15 @@ class BWGViewAlbum_compact_preview {
|
|
710 |
<?php
|
711 |
}
|
712 |
}
|
|
|
713 |
foreach ($image_rows as $image_row) {
|
714 |
-
$params_array = array(
|
715 |
-
'action' => 'GalleryBox',
|
716 |
-
'current_view' => $bwg,
|
717 |
-
'image_id' => (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id),
|
718 |
-
'gallery_id' => $album_gallery_id,
|
719 |
-
'theme_id' => $params['theme_id'],
|
720 |
-
'thumb_width' => $params['compuct_album_image_thumb_width'],
|
721 |
-
'thumb_height' => $params['compuct_album_image_thumb_height'],
|
722 |
-
'open_with_fullscreen' => $params['popup_fullscreen'],
|
723 |
-
'open_with_autoplay' => $params['popup_autoplay'],
|
724 |
-
'image_width' => $params['popup_width'],
|
725 |
-
'image_height' => $params['popup_height'],
|
726 |
-
'image_effect' => $params['popup_effect'],
|
727 |
-
'wd_sor' => $params['sort_by'],
|
728 |
-
'wd_ord' => $params['order_by'],
|
729 |
-
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
730 |
-
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
731 |
-
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
732 |
-
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
733 |
-
'popup_enable_info' => $params['popup_enable_info'],
|
734 |
-
'popup_info_always_show' => $params['popup_info_always_show'],
|
735 |
-
'popup_info_full_width' => $params['popup_info_full_width'],
|
736 |
-
'popup_hit_counter' => $params['popup_hit_counter'],
|
737 |
-
'popup_enable_rate' => $params['popup_enable_rate'],
|
738 |
-
'slideshow_interval' => $params['popup_interval'],
|
739 |
-
'enable_comment_social' => $params['popup_enable_comment'],
|
740 |
-
'enable_image_facebook' => $params['popup_enable_facebook'],
|
741 |
-
'enable_image_twitter' => $params['popup_enable_twitter'],
|
742 |
-
'enable_image_google' => $params['popup_enable_google'],
|
743 |
-
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
744 |
-
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
745 |
-
'watermark_type' => $params['watermark_type'],
|
746 |
-
'current_url' => $current_url
|
747 |
-
);
|
748 |
-
if ($params['watermark_type'] != 'none') {
|
749 |
-
$params_array['watermark_link'] = $params['watermark_link'];
|
750 |
-
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
751 |
-
$params_array['watermark_position'] = $params['watermark_position'];
|
752 |
-
}
|
753 |
-
if ($params['watermark_type'] == 'text') {
|
754 |
-
$params_array['watermark_text'] = $params['watermark_text'];
|
755 |
-
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
756 |
-
$params_array['watermark_font'] = $params['watermark_font'];
|
757 |
-
$params_array['watermark_color'] = $params['watermark_color'];
|
758 |
-
}
|
759 |
-
elseif ($params['watermark_type'] == 'image') {
|
760 |
-
$params_array['watermark_url'] = $params['watermark_url'];
|
761 |
-
$params_array['watermark_width'] = $params['watermark_width'];
|
762 |
-
$params_array['watermark_height'] = $params['watermark_height'];
|
763 |
-
}
|
764 |
-
|
765 |
-
$is_video = $image_row->filetype == "YOUTUBE" || $image_row->filetype == "VIMEO";
|
766 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
767 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
|
768 |
if (!$is_embed) {
|
769 |
list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
770 |
}
|
771 |
else {
|
772 |
-
|
773 |
$resolution_arr = explode(" ",$image_row->resolution);
|
774 |
$resolution_w = intval($resolution_arr[0]);
|
775 |
$resolution_h = intval($resolution_arr[2]);
|
@@ -786,17 +764,18 @@ class BWGViewAlbum_compact_preview {
|
|
786 |
else{
|
787 |
$image_thumb_width = $params['compuct_album_image_thumb_width'];
|
788 |
$image_thumb_height = $params['compuct_album_image_thumb_height'];
|
789 |
-
}
|
|
|
|
|
790 |
}
|
791 |
$scale = max($params['compuct_album_image_thumb_width'] / $image_thumb_width, $params['compuct_album_image_thumb_height'] / $image_thumb_height);
|
792 |
$image_thumb_width *= $scale;
|
793 |
$image_thumb_height *= $scale;
|
794 |
$thumb_left = ($params['compuct_album_image_thumb_width'] - $image_thumb_width) / 2;
|
795 |
$thumb_top = ($params['compuct_album_image_thumb_height'] - $image_thumb_height) / 2;
|
796 |
-
|
797 |
-
<a class="bwg_link" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? ('href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' ) : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '"' : '')); ?>
|
798 |
-
<?php echo ($params['thumb_click_action'] == 'open_lightbox' ? ( ' onclick="spider_createpopup(\'' . addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))) . '\', ' . $bwg . ', ' . $params['popup_width'] . ', ' . $params['popup_height'] . ', 1, \'testpopup\', 5); return false;"') : ($image_row->redirect_url ? ($params['thumb_link_target'] ? (' onclick="window.open('."'".$image_row->redirect_url."',"."'".'_blank'."'".')"' ) : ('onclick="window.location='."'" . $image_row->redirect_url ."'" .'"') ) : '')) ?>>
|
799 |
|
|
|
800 |
<span class="bwg_standart_thumb_<?php echo $bwg; ?>">
|
801 |
<?php
|
802 |
if ($params['compuct_album_image_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
|
@@ -845,14 +824,14 @@ class BWGViewAlbum_compact_preview {
|
|
845 |
?>
|
846 |
</span>
|
847 |
</a>
|
848 |
-
|
849 |
-
|
850 |
}
|
851 |
?>
|
852 |
-
</div>
|
853 |
<?php
|
854 |
if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
855 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type);
|
856 |
}
|
857 |
?>
|
858 |
</div>
|
@@ -861,7 +840,20 @@ class BWGViewAlbum_compact_preview {
|
|
861 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
862 |
</div>
|
863 |
</div>
|
864 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
<?php
|
866 |
if ($from_shortcode) {
|
867 |
return;
|
36 |
}
|
37 |
else {
|
38 |
$album_view_type = $params['compuct_album_view_type'];
|
39 |
+
}
|
40 |
if (!isset($params['popup_fullscreen'])) {
|
41 |
$params['popup_fullscreen'] = 0;
|
42 |
}
|
87 |
$params['show_album_name'] = $options_row->show_album_name;
|
88 |
}
|
89 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
90 |
+
$type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album'));
|
91 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
92 |
$sort_direction = ' ' . $params['order_by'] . ' ';
|
93 |
|
145 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
146 |
return;
|
147 |
}
|
148 |
+
$album_gallery_id = (isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
149 |
$album_row_data = $this->model->get_album_row_data($album_gallery_id);
|
150 |
|
151 |
if (!$album_gallery_id || ($type == 'album' && !$album_row_data)) {
|
206 |
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->album_compact_thumb_align . '; width:100%;';
|
207 |
}
|
208 |
|
209 |
+
$bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : 0);
|
210 |
+
$bwg_previous_album_page_number = (isset($_REQUEST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_page_number_' . $bwg]) : 0);
|
211 |
|
212 |
$rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
|
213 |
$rgb_album_compact_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_compact_thumbs_bg_color);
|
214 |
$rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
|
215 |
|
216 |
+
$params_array = array(
|
217 |
+
'action' => 'GalleryBox',
|
218 |
+
'current_view' => $bwg,
|
219 |
+
'theme_id' => $params['theme_id'],
|
220 |
+
'thumb_width' => $params['compuct_album_image_thumb_width'],
|
221 |
+
'thumb_height' => $params['compuct_album_image_thumb_height'],
|
222 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
223 |
+
'open_with_autoplay' => $params['popup_autoplay'],
|
224 |
+
'image_width' => $params['popup_width'],
|
225 |
+
'image_height' => $params['popup_height'],
|
226 |
+
'image_effect' => $params['popup_effect'],
|
227 |
+
'wd_sor' => $params['sort_by'],
|
228 |
+
'wd_ord' => $params['order_by'],
|
229 |
+
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
230 |
+
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
231 |
+
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
232 |
+
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
233 |
+
'popup_enable_info' => $params['popup_enable_info'],
|
234 |
+
'popup_info_always_show' => $params['popup_info_always_show'],
|
235 |
+
'popup_info_full_width' => $params['popup_info_full_width'],
|
236 |
+
'popup_hit_counter' => $params['popup_hit_counter'],
|
237 |
+
'popup_enable_rate' => $params['popup_enable_rate'],
|
238 |
+
'slideshow_interval' => $params['popup_interval'],
|
239 |
+
'enable_comment_social' => $params['popup_enable_comment'],
|
240 |
+
'enable_image_facebook' => $params['popup_enable_facebook'],
|
241 |
+
'enable_image_twitter' => $params['popup_enable_twitter'],
|
242 |
+
'enable_image_google' => $params['popup_enable_google'],
|
243 |
+
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
244 |
+
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
245 |
+
'watermark_type' => $params['watermark_type'],
|
246 |
+
'current_url' => $current_url
|
247 |
+
);
|
248 |
+
if ($params['watermark_type'] != 'none') {
|
249 |
+
$params_array['watermark_link'] = $params['watermark_link'];
|
250 |
+
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
251 |
+
$params_array['watermark_position'] = $params['watermark_position'];
|
252 |
+
}
|
253 |
+
if ($params['watermark_type'] == 'text') {
|
254 |
+
$params_array['watermark_text'] = $params['watermark_text'];
|
255 |
+
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
256 |
+
$params_array['watermark_font'] = $params['watermark_font'];
|
257 |
+
$params_array['watermark_color'] = $params['watermark_color'];
|
258 |
+
}
|
259 |
+
elseif ($params['watermark_type'] == 'image') {
|
260 |
+
$params_array['watermark_url'] = $params['watermark_url'];
|
261 |
+
$params_array['watermark_width'] = $params['watermark_width'];
|
262 |
+
$params_array['watermark_height'] = $params['watermark_height'];
|
263 |
+
}
|
264 |
+
$params_array_hash = $params_array;
|
265 |
?>
|
266 |
+
<style>
|
|
|
267 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
|
268 |
display: inline-block;
|
269 |
text-align: center;
|
318 |
text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
|
319 |
max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
|
320 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
<?php
|
322 |
if ($params['compuct_album_title'] == 'show') { /* Show album/gallery title at the bottom.*/
|
323 |
?>
|
372 |
text-align: <?php echo $theme_row->album_compact_thumb_align; ?>;
|
373 |
max-width: <?php echo $items_col_num * ($params['compuct_album_thumb_width'] + 2 * (2 + $theme_row->album_compact_thumb_margin + $theme_row->album_compact_thumb_padding + $theme_row->album_compact_thumb_border_width)); ?>px;
|
374 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
/*Image thumbs styles.*/
|
376 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_spun1_<?php echo $bwg; ?> {
|
377 |
background-color: #<?php echo $theme_row->thumb_bg_color; ?>;
|
418 |
max-width: <?php echo $params['compuct_album_image_column_number'] * ($params['compuct_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
|
419 |
text-align: <?php echo $theme_row->thumb_align; ?>;
|
420 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
|
422 |
display: inline-block;
|
423 |
text-align: center;
|
561 |
<?php
|
562 |
$album_row = $this->model->get_album_row_data($album_gallery_id);
|
563 |
?>
|
|
|
564 |
<div id="bwg_container1_<?php echo $bwg; ?>">
|
565 |
<div id="bwg_container2_<?php echo $bwg; ?>">
|
566 |
<form id="gal_front_form_<?php echo $bwg; ?>" method="post" action="#">
|
584 |
</div>
|
585 |
<?php
|
586 |
if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
587 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo);
|
588 |
}
|
589 |
if ($bwg_previous_album_id) {
|
590 |
?>
|
591 |
+
<a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back', '', 'album')"><?php echo __('Back', 'bwg'); ?></a>
|
592 |
<?php
|
593 |
}
|
594 |
if ($options_row->show_album_name) {
|
595 |
+
if ($type == 'gallery') {
|
596 |
+
?>
|
597 |
+
<div class="bwg_back_<?php echo $bwg; ?>" ><?php echo isset($_POST['title_' . $bwg]) ? esc_html($_POST['title_' . $bwg]) : ''; ?></div>
|
598 |
+
<?php
|
599 |
+
}
|
600 |
+
else {
|
601 |
+
?>
|
602 |
+
<div class="bwg_back_<?php echo $bwg; ?>"><?php echo $album_row->name; ?></div>
|
603 |
+
<?php
|
604 |
+
}
|
605 |
}
|
606 |
?>
|
607 |
<div id="<?php echo $album_gallery_div_id; ?>" class="<?php echo $album_gallery_div_class; ?>" >
|
641 |
$title = $gallery_row->name;
|
642 |
$permalink = $gallery_row->permalink;
|
643 |
}
|
644 |
+
|
645 |
$local_preview_image = true;
|
646 |
$parsed_prev_url = parse_url($preview_image, PHP_URL_SCHEME);
|
647 |
|
663 |
$preview_path = $preview_image;
|
664 |
}
|
665 |
}
|
|
|
666 |
if($local_preview_image){
|
667 |
list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode($preview_path, ENT_COMPAT | ENT_QUOTES));
|
668 |
$scale = max($params['compuct_album_thumb_width'] / $image_thumb_width, $params['compuct_album_thumb_height'] / $image_thumb_height);
|
677 |
$thumb_left = 0;
|
678 |
$thumb_top = 0;
|
679 |
}
|
680 |
+
|
681 |
if ($type != 'gallery') {
|
682 |
?>
|
683 |
+
<a <?php echo ($from !== "widget" ? ($options_row->enable_seo ? "href='" . add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI']) . "'" : "") . " onclick=\"spider_frontend_ajax('gal_front_form_" . $bwg . "', '" . $bwg . "', 'bwg_album_compact_" . $bwg . "', '" . $album_galallery_row->alb_gal_id . "', '" . $album_gallery_id . "', '" . $def_type . "', '', '" . htmlspecialchars(addslashes($title)) . "', 'default'); return false;\"" : "href='" . $permalink . "'") ?>>
|
|
|
684 |
<span class="bwg_album_thumb_<?php echo $bwg; ?>">
|
685 |
<?php
|
686 |
if ($params['compuct_album_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
|
739 |
<?php
|
740 |
}
|
741 |
}
|
742 |
+
|
743 |
foreach ($image_rows as $image_row) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
745 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
|
746 |
if (!$is_embed) {
|
747 |
list($image_thumb_width, $image_thumb_height) = getimagesize(htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_row->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
748 |
}
|
749 |
else {
|
750 |
+
if($image_row->resolution != ''){
|
751 |
$resolution_arr = explode(" ",$image_row->resolution);
|
752 |
$resolution_w = intval($resolution_arr[0]);
|
753 |
$resolution_h = intval($resolution_arr[2]);
|
764 |
else{
|
765 |
$image_thumb_width = $params['compuct_album_image_thumb_width'];
|
766 |
$image_thumb_height = $params['compuct_album_image_thumb_height'];
|
767 |
+
}
|
768 |
+
|
769 |
+
|
770 |
}
|
771 |
$scale = max($params['compuct_album_image_thumb_width'] / $image_thumb_width, $params['compuct_album_image_thumb_height'] / $image_thumb_height);
|
772 |
$image_thumb_width *= $scale;
|
773 |
$image_thumb_height *= $scale;
|
774 |
$thumb_left = ($params['compuct_album_image_thumb_width'] - $image_thumb_width) / 2;
|
775 |
$thumb_top = ($params['compuct_album_image_thumb_height'] - $image_thumb_height) / 2;
|
776 |
+
?>
|
|
|
|
|
777 |
|
778 |
+
<a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($options_row->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-gallery-id="' . $album_gallery_id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
779 |
<span class="bwg_standart_thumb_<?php echo $bwg; ?>">
|
780 |
<?php
|
781 |
if ($params['compuct_album_image_title'] == 'show' && $theme_row->album_compact_thumb_title_pos == 'top') {
|
824 |
?>
|
825 |
</span>
|
826 |
</a>
|
827 |
+
<?php
|
828 |
+
}
|
829 |
}
|
830 |
?>
|
831 |
+
</div>
|
832 |
<?php
|
833 |
if ($params['compuct_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
834 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo);
|
835 |
}
|
836 |
?>
|
837 |
</div>
|
840 |
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
841 |
</div>
|
842 |
</div>
|
843 |
+
<script>
|
844 |
+
function bwg_gallery_box_<?php echo $bwg; ?>(gallery_id, image_id) {
|
845 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, home_url('wp-admin/admin-ajax.php'))); ?>&gallery_id=' + gallery_id + '&image_id=' + image_id, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5);
|
846 |
+
}
|
847 |
+
function bwg_document_ready_<?php echo $bwg; ?>() {
|
848 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
849 |
+
bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-gallery-id"), jQuery(this).attr("data-image-id"));
|
850 |
+
return false;
|
851 |
+
});
|
852 |
+
}
|
853 |
+
jQuery(document).ready(function () {
|
854 |
+
bwg_document_ready_<?php echo $bwg; ?>();
|
855 |
+
});
|
856 |
+
</script>
|
857 |
<?php
|
858 |
if ($from_shortcode) {
|
859 |
return;
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -90,9 +90,9 @@ class BWGViewAlbum_extended_preview {
|
|
90 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
91 |
return;
|
92 |
}
|
93 |
-
$type = (isset($
|
94 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
95 |
-
$album_gallery_id = (isset($
|
96 |
if (!$album_gallery_id || ($type == 'album' && !$this->model->get_album_row_data($album_gallery_id))) {
|
97 |
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
98 |
return;
|
@@ -151,13 +151,61 @@ class BWGViewAlbum_extended_preview {
|
|
151 |
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->album_extended_thumb_align . '; width:100%;';
|
152 |
}
|
153 |
|
154 |
-
$bwg_previous_album_id = (isset($
|
155 |
-
$bwg_previous_album_page_number = (isset($
|
156 |
|
157 |
$rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
|
158 |
$rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
|
159 |
$rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
|
160 |
$rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
?>
|
162 |
<style>
|
163 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
|
@@ -173,11 +221,6 @@ class BWGViewAlbum_extended_preview {
|
|
173 |
text-align: <?php echo $theme_row->album_extended_thumb_align; ?>;
|
174 |
max-width: inherit;
|
175 |
}
|
176 |
-
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> .bwg_link {
|
177 |
-
border: none;
|
178 |
-
cursor: pointer;
|
179 |
-
text-decoration: none;
|
180 |
-
}
|
181 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_div_<?php echo $bwg; ?> {
|
182 |
display: table;
|
183 |
width: 100%;
|
@@ -352,12 +395,6 @@ class BWGViewAlbum_extended_preview {
|
|
352 |
max-width: <?php echo $params['extended_album_image_column_number'] * ($params['extended_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
|
353 |
text-align: <?php echo $theme_row->thumb_align; ?>;
|
354 |
}
|
355 |
-
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> .bwg_link {
|
356 |
-
border: none;
|
357 |
-
cursor: pointer;
|
358 |
-
text-decoration: none;
|
359 |
-
font-size: 0;
|
360 |
-
}
|
361 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
|
362 |
display: inline-block;
|
363 |
text-align: center;
|
@@ -522,11 +559,11 @@ class BWGViewAlbum_extended_preview {
|
|
522 |
</div>
|
523 |
<?php
|
524 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
525 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type);
|
526 |
}
|
527 |
if ($bwg_previous_album_id) {
|
528 |
?>
|
529 |
-
<a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back')"><?php echo __('Back', 'bwg'); ?></a>
|
530 |
<?php
|
531 |
}
|
532 |
?>
|
@@ -606,8 +643,7 @@ class BWGViewAlbum_extended_preview {
|
|
606 |
?>
|
607 |
<div class="bwg_album_extended_div_<?php echo $bwg; ?>">
|
608 |
<div class="bwg_album_extended_thumb_div_<?php echo $bwg; ?>">
|
609 |
-
<a
|
610 |
-
<?php echo (" onclick=\"spider_frontend_ajax('gal_front_form_" . $bwg . "', '" . $bwg . "', 'bwg_album_extended_" . $bwg . "', '" . $album_galallery_row->alb_gal_id . "', '" . $album_gallery_id . "', '" . $def_type . "', '', '" . htmlspecialchars(addslashes($title)) . "', 'default'); return false;\""); ?>>
|
611 |
<span class="bwg_album_thumb_<?php echo $bwg; ?>" style="height:inherit;">
|
612 |
<span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
|
613 |
<span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
|
@@ -659,17 +695,6 @@ class BWGViewAlbum_extended_preview {
|
|
659 |
<?php
|
660 |
}
|
661 |
}
|
662 |
-
?>
|
663 |
-
<div class='bwg_seo_links' style="display:none;">
|
664 |
-
<?php /*for SEO*/
|
665 |
-
foreach ($album_galleries_row as $album_galallery_row) {
|
666 |
-
?>
|
667 |
-
<a > </a>
|
668 |
-
<?php
|
669 |
-
}
|
670 |
-
?>
|
671 |
-
</div>
|
672 |
-
<?php
|
673 |
}
|
674 |
elseif ($type == 'gallery') {
|
675 |
if ($options_row->show_album_name) {
|
@@ -689,57 +714,7 @@ class BWGViewAlbum_extended_preview {
|
|
689 |
<?php
|
690 |
}
|
691 |
}
|
692 |
-
foreach ($image_rows as $image_row) {
|
693 |
-
$params_array = array(
|
694 |
-
'action' => 'GalleryBox',
|
695 |
-
'current_view' => $bwg,
|
696 |
-
'image_id' => (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id),
|
697 |
-
'gallery_id' => $album_gallery_id,
|
698 |
-
'theme_id' => $params['theme_id'],
|
699 |
-
'thumb_width' => $params['extended_album_image_thumb_width'],
|
700 |
-
'thumb_height' => $params['extended_album_image_thumb_height'],
|
701 |
-
'open_with_fullscreen' => $params['popup_fullscreen'],
|
702 |
-
'open_with_autoplay' => $params['popup_autoplay'],
|
703 |
-
'image_width' => $params['popup_width'],
|
704 |
-
'image_height' => $params['popup_height'],
|
705 |
-
'image_effect' => $params['popup_effect'],
|
706 |
-
'wd_sor' => $params['sort_by'],
|
707 |
-
'wd_ord' => $params['order_by'],
|
708 |
-
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
709 |
-
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
710 |
-
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
711 |
-
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
712 |
-
'popup_enable_info' => $params['popup_enable_info'],
|
713 |
-
'popup_info_always_show' => $params['popup_info_always_show'],
|
714 |
-
'popup_info_full_width' => $params['popup_info_full_width'],
|
715 |
-
'popup_hit_counter' => $params['popup_hit_counter'],
|
716 |
-
'popup_enable_rate' => $params['popup_enable_rate'],
|
717 |
-
'slideshow_interval' => $params['popup_interval'],
|
718 |
-
'enable_comment_social' => $params['popup_enable_comment'],
|
719 |
-
'enable_image_facebook' => $params['popup_enable_facebook'],
|
720 |
-
'enable_image_twitter' => $params['popup_enable_twitter'],
|
721 |
-
'enable_image_google' => $params['popup_enable_google'],
|
722 |
-
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
723 |
-
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
724 |
-
'watermark_type' => $params['watermark_type'],
|
725 |
-
'current_url' => $current_url
|
726 |
-
);
|
727 |
-
if ($params['watermark_type'] != 'none') {
|
728 |
-
$params_array['watermark_link'] = $params['watermark_link'];
|
729 |
-
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
730 |
-
$params_array['watermark_position'] = $params['watermark_position'];
|
731 |
-
}
|
732 |
-
if ($params['watermark_type'] == 'text') {
|
733 |
-
$params_array['watermark_text'] = $params['watermark_text'];
|
734 |
-
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
735 |
-
$params_array['watermark_font'] = $params['watermark_font'];
|
736 |
-
$params_array['watermark_color'] = $params['watermark_color'];
|
737 |
-
}
|
738 |
-
elseif ($params['watermark_type'] == 'image') {
|
739 |
-
$params_array['watermark_url'] = $params['watermark_url'];
|
740 |
-
$params_array['watermark_width'] = $params['watermark_width'];
|
741 |
-
$params_array['watermark_height'] = $params['watermark_height'];
|
742 |
-
}
|
743 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
744 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
|
745 |
if (!$is_embed) {
|
@@ -771,8 +746,7 @@ class BWGViewAlbum_extended_preview {
|
|
771 |
$thumb_left = ($params['extended_album_image_thumb_width'] - $image_thumb_width) / 2;
|
772 |
$thumb_top = ($params['extended_album_image_thumb_height'] - $image_thumb_height) / 2;
|
773 |
?>
|
774 |
-
<a
|
775 |
-
<?php echo ($params['thumb_click_action'] == 'open_lightbox' ? ( ' onclick="spider_createpopup(\'' . addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))) . '\', ' . $bwg . ', ' . $params['popup_width'] . ', ' . $params['popup_height'] . ', 1, \'testpopup\', 5); return false;"') : ($image_row->redirect_url ? ($params['thumb_link_target'] ? (' onclick="window.open('."'".$image_row->redirect_url."',"."'".'_blank'."'".')"' ) : ('onclick="window.location='."'" . $image_row->redirect_url ."'" .'"') ) : '')) ?>>
|
776 |
<span class="bwg_standart_thumb_<?php echo $bwg; ?>">
|
777 |
<span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
|
778 |
<span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
|
@@ -831,7 +805,7 @@ class BWGViewAlbum_extended_preview {
|
|
831 |
</div>
|
832 |
<?php
|
833 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
834 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type);
|
835 |
}
|
836 |
?>
|
837 |
</div>
|
@@ -841,6 +815,18 @@ class BWGViewAlbum_extended_preview {
|
|
841 |
</div>
|
842 |
</div>
|
843 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
</script>
|
845 |
<?php
|
846 |
if ($from_shortcode) {
|
90 |
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
91 |
return;
|
92 |
}
|
93 |
+
$type = (isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : 'album');
|
94 |
$bwg_search = ((isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '') ? esc_html($_POST['bwg_search_' . $bwg]) : '');
|
95 |
+
$album_gallery_id = (isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id']);
|
96 |
if (!$album_gallery_id || ($type == 'album' && !$this->model->get_album_row_data($album_gallery_id))) {
|
97 |
echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
|
98 |
return;
|
151 |
$form_child_div_style = 'background-color:rgba(0, 0, 0, 0); position:relative; text-align:' . $theme_row->album_extended_thumb_align . '; width:100%;';
|
152 |
}
|
153 |
|
154 |
+
$bwg_previous_album_id = (isset($_REQUEST['bwg_previous_album_id_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_id_' . $bwg]) : 0);
|
155 |
+
$bwg_previous_album_page_number = (isset($_REQUEST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_REQUEST['bwg_previous_album_page_number_' . $bwg]) : 0);
|
156 |
|
157 |
$rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
|
158 |
$rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
|
159 |
$rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
|
160 |
$rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
|
161 |
+
$params_array = array(
|
162 |
+
'action' => 'GalleryBox',
|
163 |
+
'current_view' => $bwg,
|
164 |
+
'theme_id' => $params['theme_id'],
|
165 |
+
'thumb_width' => $params['extended_album_image_thumb_width'],
|
166 |
+
'thumb_height' => $params['extended_album_image_thumb_height'],
|
167 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
168 |
+
'open_with_autoplay' => $params['popup_autoplay'],
|
169 |
+
'image_width' => $params['popup_width'],
|
170 |
+
'image_height' => $params['popup_height'],
|
171 |
+
'image_effect' => $params['popup_effect'],
|
172 |
+
'wd_sor' => $params['sort_by'],
|
173 |
+
'wd_ord' => $params['order_by'],
|
174 |
+
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
175 |
+
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
176 |
+
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
177 |
+
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
178 |
+
'popup_enable_info' => $params['popup_enable_info'],
|
179 |
+
'popup_info_always_show' => $params['popup_info_always_show'],
|
180 |
+
'popup_info_full_width' => $params['popup_info_full_width'],
|
181 |
+
'popup_hit_counter' => $params['popup_hit_counter'],
|
182 |
+
'popup_enable_rate' => $params['popup_enable_rate'],
|
183 |
+
'slideshow_interval' => $params['popup_interval'],
|
184 |
+
'enable_comment_social' => $params['popup_enable_comment'],
|
185 |
+
'enable_image_facebook' => $params['popup_enable_facebook'],
|
186 |
+
'enable_image_twitter' => $params['popup_enable_twitter'],
|
187 |
+
'enable_image_google' => $params['popup_enable_google'],
|
188 |
+
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
189 |
+
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
190 |
+
'watermark_type' => $params['watermark_type'],
|
191 |
+
'current_url' => $current_url
|
192 |
+
);
|
193 |
+
if ($params['watermark_type'] != 'none') {
|
194 |
+
$params_array['watermark_link'] = $params['watermark_link'];
|
195 |
+
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
196 |
+
$params_array['watermark_position'] = $params['watermark_position'];
|
197 |
+
}
|
198 |
+
if ($params['watermark_type'] == 'text') {
|
199 |
+
$params_array['watermark_text'] = $params['watermark_text'];
|
200 |
+
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
201 |
+
$params_array['watermark_font'] = $params['watermark_font'];
|
202 |
+
$params_array['watermark_color'] = $params['watermark_color'];
|
203 |
+
}
|
204 |
+
elseif ($params['watermark_type'] == 'image') {
|
205 |
+
$params_array['watermark_url'] = $params['watermark_url'];
|
206 |
+
$params_array['watermark_width'] = $params['watermark_width'];
|
207 |
+
$params_array['watermark_height'] = $params['watermark_height'];
|
208 |
+
}
|
209 |
?>
|
210 |
<style>
|
211 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
|
221 |
text-align: <?php echo $theme_row->album_extended_thumb_align; ?>;
|
222 |
max-width: inherit;
|
223 |
}
|
|
|
|
|
|
|
|
|
|
|
224 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_div_<?php echo $bwg; ?> {
|
225 |
display: table;
|
226 |
width: 100%;
|
395 |
max-width: <?php echo $params['extended_album_image_column_number'] * ($params['extended_album_image_thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
|
396 |
text-align: <?php echo $theme_row->thumb_align; ?>;
|
397 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
|
399 |
display: inline-block;
|
400 |
text-align: center;
|
559 |
</div>
|
560 |
<?php
|
561 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'top') && $page_nav['total']) {
|
562 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo);
|
563 |
}
|
564 |
if ($bwg_previous_album_id) {
|
565 |
?>
|
566 |
+
<a class="bwg_back_<?php echo $bwg; ?>" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', '<?php echo $album_gallery_div_id; ?>', 'back', '', 'album')"><?php echo __('Back', 'bwg'); ?></a>
|
567 |
<?php
|
568 |
}
|
569 |
?>
|
643 |
?>
|
644 |
<div class="bwg_album_extended_div_<?php echo $bwg; ?>">
|
645 |
<div class="bwg_album_extended_thumb_div_<?php echo $bwg; ?>">
|
646 |
+
<a <?php echo ($options_row->enable_seo ? 'href="' . add_query_arg(array("type_" . $bwg => $def_type, "album_gallery_id_" . $bwg => $album_galallery_row->alb_gal_id, "bwg_previous_album_id_" . $bwg => $album_gallery_id . ',' . $bwg_previous_album_id , "bwg_previous_album_page_number_" . $bwg => (isset($_REQUEST['page_number_' . $bwg]) ? esc_html($_REQUEST['page_number_' . $bwg]) : 0) . ',' . $bwg_previous_album_page_number), $_SERVER['REQUEST_URI']) . '"' : ''); ?> style="font-size: 0;" onclick="spider_frontend_ajax('gal_front_form_<?php echo $bwg; ?>', '<?php echo $bwg; ?>', 'bwg_album_extended_<?php echo $bwg; ?>', '<?php echo $album_galallery_row->alb_gal_id; ?>', '<?php echo $album_gallery_id; ?>', '<?php echo $def_type; ?>', '', '<?php echo htmlspecialchars(addslashes($title)); ?>', 'default'); return false;">
|
|
|
647 |
<span class="bwg_album_thumb_<?php echo $bwg; ?>" style="height:inherit;">
|
648 |
<span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
|
649 |
<span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
|
695 |
<?php
|
696 |
}
|
697 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
698 |
}
|
699 |
elseif ($type == 'gallery') {
|
700 |
if ($options_row->show_album_name) {
|
714 |
<?php
|
715 |
}
|
716 |
}
|
717 |
+
foreach ($image_rows as $image_row) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
719 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
|
720 |
if (!$is_embed) {
|
746 |
$thumb_left = ($params['extended_album_image_thumb_width'] - $image_thumb_width) / 2;
|
747 |
$thumb_top = ($params['extended_album_image_thumb_height'] - $image_thumb_height) / 2;
|
748 |
?>
|
749 |
+
<a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($options_row->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '" data-gallery-id="' . $album_gallery_id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
|
|
750 |
<span class="bwg_standart_thumb_<?php echo $bwg; ?>">
|
751 |
<span class="bwg_standart_thumb_spun1_<?php echo $bwg; ?>">
|
752 |
<span class="bwg_standart_thumb_spun2_<?php echo $bwg; ?>">
|
805 |
</div>
|
806 |
<?php
|
807 |
if ($params['extended_album_enable_page'] && $items_per_page && ($theme_row->page_nav_position == 'bottom') && $page_nav['total']) {
|
808 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $items_per_page, $bwg, $album_gallery_div_id, $params['album_id'], $type, $options_row->enable_seo);
|
809 |
}
|
810 |
?>
|
811 |
</div>
|
815 |
</div>
|
816 |
</div>
|
817 |
<script>
|
818 |
+
function bwg_gallery_box_<?php echo $bwg; ?>(gallery_id, image_id) {
|
819 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, home_url('wp-admin/admin-ajax.php'))); ?>&gallery_id=' + gallery_id + '&image_id=' + image_id, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5);
|
820 |
+
}
|
821 |
+
function bwg_document_ready_<?php echo $bwg; ?>() {
|
822 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
823 |
+
bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-gallery-id"), jQuery(this).attr("data-image-id"));
|
824 |
+
return false;
|
825 |
+
});
|
826 |
+
}
|
827 |
+
jQuery(document).ready(function () {
|
828 |
+
bwg_document_ready_<?php echo $bwg; ?>();
|
829 |
+
});
|
830 |
</script>
|
831 |
<?php
|
832 |
if ($from_shortcode) {
|
frontend/views/BWGViewGalleryBox.php
CHANGED
@@ -139,7 +139,7 @@ class BWGViewGalleryBox {
|
|
139 |
$params_array['watermark_width'] = $watermark_width;
|
140 |
$params_array['watermark_height'] = $watermark_height;
|
141 |
}
|
142 |
-
$popup_url = add_query_arg(array($params_array),
|
143 |
$filmstrip_thumb_margin = $theme_row->lightbox_filmstrip_thumb_margin;
|
144 |
$margins_split = explode(" ", $filmstrip_thumb_margin);
|
145 |
$filmstrip_thumb_margin_right = 0;
|
@@ -306,6 +306,24 @@ class BWGViewGalleryBox {
|
|
306 |
opacity: <?php echo number_format($theme_row->lightbox_rl_btn_transparent / 100, 2, ".", ""); ?>;
|
307 |
filter: Alpha(opacity=<?php echo $theme_row->lightbox_rl_btn_transparent; ?>);
|
308 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
.bwg_ctrl_btn:hover,
|
310 |
.bwg_toggle_btn:hover,
|
311 |
.spider_popup_close:hover,
|
@@ -675,6 +693,7 @@ class BWGViewGalleryBox {
|
|
675 |
width: 100%;
|
676 |
<?php } else { ?>
|
677 |
margin: <?php echo $theme_row->lightbox_info_margin; ?>;
|
|
|
678 |
<?php } ?>
|
679 |
padding: <?php echo $theme_row->lightbox_info_padding; ?>;
|
680 |
<?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') ? 'top: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
|
139 |
$params_array['watermark_width'] = $watermark_width;
|
140 |
$params_array['watermark_height'] = $watermark_height;
|
141 |
}
|
142 |
+
$popup_url = add_query_arg(array($params_array), home_url('wp-admin/admin-ajax.php'));
|
143 |
$filmstrip_thumb_margin = $theme_row->lightbox_filmstrip_thumb_margin;
|
144 |
$margins_split = explode(" ", $filmstrip_thumb_margin);
|
145 |
$filmstrip_thumb_margin_right = 0;
|
306 |
opacity: <?php echo number_format($theme_row->lightbox_rl_btn_transparent / 100, 2, ".", ""); ?>;
|
307 |
filter: Alpha(opacity=<?php echo $theme_row->lightbox_rl_btn_transparent; ?>);
|
308 |
}
|
309 |
+
<?php
|
310 |
+
if($option_row->autohide_lightbox_navigation){?>
|
311 |
+
#spider_popup_left-ico{
|
312 |
+
left: -9999px;
|
313 |
+
}
|
314 |
+
#spider_popup_right-ico{
|
315 |
+
left: -9999px;
|
316 |
+
}
|
317 |
+
<?php }
|
318 |
+
else { ?>
|
319 |
+
#spider_popup_left-ico {
|
320 |
+
left: 20px;
|
321 |
+
}
|
322 |
+
#spider_popup_right-ico {
|
323 |
+
left: auto;
|
324 |
+
right: 20px;
|
325 |
+
}
|
326 |
+
<?php } ?>
|
327 |
.bwg_ctrl_btn:hover,
|
328 |
.bwg_toggle_btn:hover,
|
329 |
.spider_popup_close:hover,
|
693 |
width: 100%;
|
694 |
<?php } else { ?>
|
695 |
margin: <?php echo $theme_row->lightbox_info_margin; ?>;
|
696 |
+
width: 33%;
|
697 |
<?php } ?>
|
698 |
padding: <?php echo $theme_row->lightbox_info_padding; ?>;
|
699 |
<?php echo ((!$enable_image_filmstrip || $theme_row->lightbox_filmstrip_pos != 'top') && $theme_row->lightbox_ctrl_btn_pos == 'top' && $theme_row->lightbox_info_pos == 'top') ? 'top: ' . ($theme_row->lightbox_ctrl_btn_height + 2 * $theme_row->lightbox_ctrl_btn_margin_top) . 'px;' : '' ?>
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -168,7 +168,7 @@ class BWGViewImage_browser {
|
|
168 |
$watermark_div = 'class="bwg_image_browser_watermark_' . $bwg . '"';
|
169 |
$params_array['watermark_font'] = '';
|
170 |
$params_array['watermark_color'] = '';
|
171 |
-
|
172 |
}
|
173 |
?>
|
174 |
<style>
|
@@ -266,7 +266,8 @@ class BWGViewImage_browser {
|
|
266 |
border-radius: <?php echo $theme_row->image_browser_image_description_border_radius; ?>;
|
267 |
border-width: <?php echo $theme_row->image_browser_image_description_border_width; ?>px;
|
268 |
}
|
269 |
-
|
|
|
270 |
font-size: 10px !important;
|
271 |
}
|
272 |
}
|
@@ -457,11 +458,10 @@ class BWGViewImage_browser {
|
|
457 |
<div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
|
458 |
<?php
|
459 |
if ( $theme_row->page_nav_position == 'top') {
|
460 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg,1, $bwg, 'bwg_standart_thumbnails_' . $bwg);
|
461 |
}
|
462 |
foreach ($image_rows as $image_row) {
|
463 |
$params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
|
464 |
-
$popup_url = add_query_arg(array($params_array), admin_url('admin-ajax.php'));
|
465 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
466 |
$is_embed_16x9 = ((preg_match('/EMBED/',$image_row->filetype)==1 ? true :false) && (preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false) && !(preg_match('/INSTAGRAM/',$image_row->filetype)==1 ? true :false));
|
467 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
|
@@ -498,7 +498,7 @@ class BWGViewImage_browser {
|
|
498 |
}
|
499 |
if (!$is_embed) {
|
500 |
?>
|
501 |
-
<a
|
502 |
<img class="bwg_image_browser_img_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
|
503 |
</a>
|
504 |
<?php
|
@@ -513,24 +513,25 @@ class BWGViewImage_browser {
|
|
513 |
}
|
514 |
else{/*for instagram image, video and flickr enable lightbox onclick*/
|
515 |
?>
|
516 |
-
<a
|
517 |
<?php
|
518 |
WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_".$bwg,'width'=>$params['image_browser_width'], 'height'=>'auto', 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
|
519 |
?>
|
520 |
</a>
|
521 |
|
522 |
<?php
|
523 |
-
}
|
524 |
}
|
525 |
?>
|
526 |
<script>
|
527 |
-
jQuery(window).load(function() {
|
528 |
/*setTimeout(function() {*/
|
529 |
|
530 |
jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
|
531 |
jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width() * 0.5625);
|
532 |
jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
|
533 |
jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width() +88);
|
|
|
534 |
if (jQuery('.image_browser_images_<?php echo $bwg; ?>').width() <= 108) {
|
535 |
jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
|
536 |
}
|
@@ -558,6 +559,7 @@ class BWGViewImage_browser {
|
|
558 |
}
|
559 |
}/*, 3*/);
|
560 |
jQuery(window).resize(function() {
|
|
|
561 |
jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width() * 0.5625);
|
562 |
jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width() +88);
|
563 |
|
@@ -605,7 +607,7 @@ class BWGViewImage_browser {
|
|
605 |
<?php
|
606 |
}
|
607 |
if ( $theme_row->page_nav_position == 'bottom') {
|
608 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, 1, $bwg, 'bwg_standart_thumbnails_' . $bwg);
|
609 |
}
|
610 |
?>
|
611 |
</div>
|
@@ -628,6 +630,18 @@ class BWGViewImage_browser {
|
|
628 |
}
|
629 |
?>
|
630 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
</script>
|
632 |
<?php
|
633 |
if ($from_shortcode) {
|
168 |
$watermark_div = 'class="bwg_image_browser_watermark_' . $bwg . '"';
|
169 |
$params_array['watermark_font'] = '';
|
170 |
$params_array['watermark_color'] = '';
|
171 |
+
$params_array['watermark_font_size'] = '';
|
172 |
}
|
173 |
?>
|
174 |
<style>
|
266 |
border-radius: <?php echo $theme_row->image_browser_image_description_border_radius; ?>;
|
267 |
border-width: <?php echo $theme_row->image_browser_image_description_border_width; ?>px;
|
268 |
}
|
269 |
+
|
270 |
+
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .tablenav-pages_<?php echo $bwg; ?> a {
|
271 |
font-size: 10px !important;
|
272 |
}
|
273 |
}
|
458 |
<div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
|
459 |
<?php
|
460 |
if ( $theme_row->page_nav_position == 'top') {
|
461 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg,1, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
|
462 |
}
|
463 |
foreach ($image_rows as $image_row) {
|
464 |
$params_array['image_id'] = (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id);
|
|
|
465 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
466 |
$is_embed_16x9 = ((preg_match('/EMBED/',$image_row->filetype)==1 ? true :false) && (preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false) && !(preg_match('/INSTAGRAM/',$image_row->filetype)==1 ? true :false));
|
467 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$image_row->filetype)==1 ? true :false;
|
498 |
}
|
499 |
if (!$is_embed) {
|
500 |
?>
|
501 |
+
<a style="position:relative;" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
502 |
<img class="bwg_image_browser_img_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
|
503 |
</a>
|
504 |
<?php
|
513 |
}
|
514 |
else{/*for instagram image, video and flickr enable lightbox onclick*/
|
515 |
?>
|
516 |
+
<a style="position:relative;" <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '" data-image-id="' . $image_row->id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
517 |
<?php
|
518 |
WDWLibraryEmbed::display_embed($image_row->filetype, $image_row->filename, array('id'=>"bwg_embed_frame_".$bwg,'width'=>$params['image_browser_width'], 'height'=>'auto', 'frameborder'=>"0", 'allowfullscreen'=>"allowfullscreen", 'style'=>"position: relative; margin:0;"));
|
519 |
?>
|
520 |
</a>
|
521 |
|
522 |
<?php
|
523 |
+
}
|
524 |
}
|
525 |
?>
|
526 |
<script>
|
527 |
+
jQuery(window).load(function() {
|
528 |
/*setTimeout(function() {*/
|
529 |
|
530 |
jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
|
531 |
jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width() * 0.5625);
|
532 |
jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').parent().width());
|
533 |
jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width() +88);
|
534 |
+
|
535 |
if (jQuery('.image_browser_images_<?php echo $bwg; ?>').width() <= 108) {
|
536 |
jQuery('.paging-input_<?php echo $bwg; ?>').css('display', 'none');
|
537 |
}
|
559 |
}
|
560 |
}/*, 3*/);
|
561 |
jQuery(window).resize(function() {
|
562 |
+
|
563 |
jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_16x9_<?php echo $bwg; ?>').width() * 0.5625);
|
564 |
jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').height(jQuery('#bwg_embed_frame_instapost_<?php echo $bwg; ?>').width() +88);
|
565 |
|
607 |
<?php
|
608 |
}
|
609 |
if ( $theme_row->page_nav_position == 'bottom') {
|
610 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, 1, $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $option_row->enable_seo);
|
611 |
}
|
612 |
?>
|
613 |
</div>
|
630 |
}
|
631 |
?>
|
632 |
});
|
633 |
+
function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
|
634 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, home_url('wp-admin/admin-ajax.php'))); ?>&image_id=' + image_id, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5);
|
635 |
+
}
|
636 |
+
function bwg_document_ready_<?php echo $bwg; ?>() {
|
637 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
638 |
+
bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-image-id"));
|
639 |
+
return false;
|
640 |
+
});
|
641 |
+
}
|
642 |
+
jQuery(document).ready(function () {
|
643 |
+
bwg_document_ready_<?php echo $bwg; ?>();
|
644 |
+
});
|
645 |
</script>
|
646 |
<?php
|
647 |
if ($from_shortcode) {
|
frontend/views/BWGViewSlideshow.php
CHANGED
@@ -25,11 +25,12 @@ class BWGViewSlideshow {
|
|
25 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
26 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
27 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
|
|
28 |
global $WD_BWG_UPLOAD_DIR;
|
29 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
30 |
$options_row = $this->model->get_options_row_data();
|
31 |
if (!isset($params['order_by'])) {
|
32 |
-
$order_by = 'asc';
|
33 |
}
|
34 |
else {
|
35 |
$order_by = $params['order_by'];
|
@@ -40,6 +41,11 @@ class BWGViewSlideshow {
|
|
40 |
$image_right_click = $options_row->image_right_click;
|
41 |
if (!$from) {
|
42 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
|
|
|
|
|
|
|
|
|
|
43 |
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
44 |
$sort_by = (isset($params['sort_by']) ? esc_html($params['sort_by']) : 'order');
|
45 |
$slideshow_effect = (isset($params['slideshow_effect']) ? esc_html($params['slideshow_effect']) : 'fade');
|
@@ -47,17 +53,8 @@ class BWGViewSlideshow {
|
|
47 |
$enable_slideshow_shuffle = (isset($params['enable_slideshow_shuffle']) ? esc_html($params['enable_slideshow_shuffle']) : 0);
|
48 |
$enable_slideshow_ctrl = (isset($params['enable_slideshow_ctrl']) ? esc_html($params['enable_slideshow_ctrl']) : 0);
|
49 |
$enable_slideshow_filmstrip = FALSE;
|
50 |
-
|
51 |
-
|
52 |
-
$thumb_height = $options_row->thumb_height;
|
53 |
-
$slideshow_filmstrip_height = (isset($params['slideshow_filmstrip_height']) ? esc_html($params['slideshow_filmstrip_height']) : '50');
|
54 |
-
$thumb_ratio = $thumb_width / $thumb_height;
|
55 |
-
$slideshow_filmstrip_width = round($thumb_ratio * $slideshow_filmstrip_height);
|
56 |
-
}
|
57 |
-
else {
|
58 |
-
$slideshow_filmstrip_height = 0;
|
59 |
-
$slideshow_filmstrip_width = 0;
|
60 |
-
}
|
61 |
|
62 |
$enable_image_title = (isset($params['slideshow_enable_title']) ? esc_html($params['slideshow_enable_title']) : 0);
|
63 |
$slideshow_title_position = explode('-', (isset($params['slideshow_title_position']) ? esc_html($params['slideshow_title_position']) : 'bottom-right'));
|
@@ -84,6 +81,11 @@ class BWGViewSlideshow {
|
|
84 |
}
|
85 |
else {
|
86 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 0);
|
|
|
|
|
|
|
|
|
|
|
87 |
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
88 |
$sort_by = 'order';
|
89 |
$slideshow_effect = (isset($params['effect']) ? esc_html($params['effect']) : 'fade');
|
@@ -91,17 +93,8 @@ class BWGViewSlideshow {
|
|
91 |
$enable_slideshow_shuffle = (isset($params['shuffle']) ? esc_html($params['shuffle']) : 0);
|
92 |
$enable_slideshow_ctrl = $options_row->slideshow_enable_ctrl;
|
93 |
$enable_slideshow_filmstrip = FALSE;
|
94 |
-
|
95 |
-
|
96 |
-
$thumb_height = $options_row->thumb_height;
|
97 |
-
$slideshow_filmstrip_height = $options_row->slideshow_filmstrip_height;
|
98 |
-
$thumb_ratio = $thumb_width / $thumb_height;
|
99 |
-
$slideshow_filmstrip_width = round($thumb_ratio * $slideshow_filmstrip_height);
|
100 |
-
}
|
101 |
-
else {
|
102 |
-
$slideshow_filmstrip_height = 0;
|
103 |
-
$slideshow_filmstrip_width = 0;
|
104 |
-
}
|
105 |
|
106 |
$enable_image_title = $options_row->slideshow_enable_title;
|
107 |
$slideshow_title_position = explode('-', $options_row->slideshow_title_position);
|
@@ -126,12 +119,6 @@ class BWGViewSlideshow {
|
|
126 |
$watermark_width = $options_row->watermark_width;
|
127 |
$watermark_height = $options_row->watermark_height;
|
128 |
}
|
129 |
-
|
130 |
-
$theme_row = $this->model->get_theme_row_data($theme_id);
|
131 |
-
if (!$theme_row) {
|
132 |
-
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
133 |
-
return;
|
134 |
-
}
|
135 |
$gallery_row = $this->model->get_gallery_row_data($gallery_id);
|
136 |
if (!$gallery_row) {
|
137 |
echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
|
@@ -145,10 +132,11 @@ class BWGViewSlideshow {
|
|
145 |
$play_pause_button_display = 'undefined';
|
146 |
$filmstrip_thumb_margin = $theme_row->slideshow_filmstrip_thumb_margin;
|
147 |
$margins_split = explode(" ", $filmstrip_thumb_margin);
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
152 |
}
|
153 |
else {
|
154 |
$filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
|
@@ -158,7 +146,7 @@ class BWGViewSlideshow {
|
|
158 |
$filmstrip_thumb_margin_right = (int) $margins_split[0];
|
159 |
$filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
|
160 |
}
|
161 |
-
$filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
|
162 |
?>
|
163 |
<style>
|
164 |
#bwg_container1_<?php echo $bwg; ?> {
|
@@ -301,7 +289,6 @@ class BWGViewSlideshow {
|
|
301 |
box-sizing: content-box;
|
302 |
cursor: pointer;
|
303 |
display: table;
|
304 |
-
left: -9999px;
|
305 |
line-height: 0;
|
306 |
margin-top: -15px;
|
307 |
position: absolute;
|
@@ -315,6 +302,25 @@ class BWGViewSlideshow {
|
|
315 |
color: #<?php echo $theme_row->slideshow_close_rl_btn_hover_color; ?>;
|
316 |
cursor: pointer;
|
317 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_container_<?php echo $bwg; ?> {
|
319 |
display: table;
|
320 |
position: absolute;
|
@@ -575,7 +581,7 @@ class BWGViewSlideshow {
|
|
575 |
overflow: hidden;
|
576 |
position: relative;
|
577 |
height: <?php echo ($theme_row->slideshow_dots_height + $theme_row->slideshow_dots_margin * 2); ?>px;
|
578 |
-
width: <?php echo ($theme_row->slideshow_dots_width + $theme_row->slideshow_dots_margin * 2
|
579 |
}
|
580 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_active_<?php echo $bwg; ?> {
|
581 |
background: #<?php echo $theme_row->slideshow_dots_active_background_color; ?>;
|
@@ -650,6 +656,7 @@ class BWGViewSlideshow {
|
|
650 |
<div class="bwg_slider_<?php echo $bwg; ?>">
|
651 |
<?php
|
652 |
foreach ($image_rows as $key => $image_row) {
|
|
|
653 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
654 |
$is_embed_video = ($is_embed && preg_match('/_VIDEO/',$image_row->filetype)==1) ? true :false;
|
655 |
if ($image_row->id == $current_image_id) {
|
@@ -664,9 +671,8 @@ class BWGViewSlideshow {
|
|
664 |
<img id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
665 |
<?php
|
666 |
}
|
667 |
-
|
668 |
else{ /*$is_embed*/?>
|
669 |
-
|
670 |
<?php
|
671 |
if($is_embed_instagram_post){
|
672 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
@@ -684,7 +690,6 @@ class BWGViewSlideshow {
|
|
684 |
}
|
685 |
?>
|
686 |
</span>
|
687 |
-
|
688 |
<?php
|
689 |
}
|
690 |
?>
|
@@ -705,9 +710,8 @@ class BWGViewSlideshow {
|
|
705 |
<img id="bwg_slideshow_image_second_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
706 |
<?php
|
707 |
}
|
708 |
-
|
709 |
else { /*$is_embed*/ ?>
|
710 |
-
|
711 |
<?php
|
712 |
if($is_embed_instagram_post){
|
713 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
@@ -726,7 +730,6 @@ class BWGViewSlideshow {
|
|
726 |
?>
|
727 |
</span>
|
728 |
<?php
|
729 |
-
|
730 |
}
|
731 |
?>
|
732 |
</span>
|
@@ -895,7 +898,7 @@ class BWGViewSlideshow {
|
|
895 |
var image_left = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left;
|
896 |
var image_right = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left + jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").outerWidth(true);
|
897 |
var bwg_dots_width = jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").outerWidth(true);
|
898 |
-
var bwg_dots_thumbnails_width = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").outerWidth(
|
899 |
var long_filmstrip_cont_left = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left;
|
900 |
var long_filmstrip_cont_right = Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left) + bwg_dots_width;
|
901 |
if (bwg_dots_width > bwg_dots_thumbnails_width) {
|
25 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
26 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
27 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
28 |
+
|
29 |
global $WD_BWG_UPLOAD_DIR;
|
30 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
31 |
$options_row = $this->model->get_options_row_data();
|
32 |
if (!isset($params['order_by'])) {
|
33 |
+
$order_by = 'asc';
|
34 |
}
|
35 |
else {
|
36 |
$order_by = $params['order_by'];
|
41 |
$image_right_click = $options_row->image_right_click;
|
42 |
if (!$from) {
|
43 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
44 |
+
$theme_row = $this->model->get_theme_row_data($theme_id);
|
45 |
+
if (!$theme_row) {
|
46 |
+
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
47 |
+
return;
|
48 |
+
}
|
49 |
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
50 |
$sort_by = (isset($params['sort_by']) ? esc_html($params['sort_by']) : 'order');
|
51 |
$slideshow_effect = (isset($params['slideshow_effect']) ? esc_html($params['slideshow_effect']) : 'fade');
|
53 |
$enable_slideshow_shuffle = (isset($params['enable_slideshow_shuffle']) ? esc_html($params['enable_slideshow_shuffle']) : 0);
|
54 |
$enable_slideshow_ctrl = (isset($params['enable_slideshow_ctrl']) ? esc_html($params['enable_slideshow_ctrl']) : 0);
|
55 |
$enable_slideshow_filmstrip = FALSE;
|
56 |
+
$slideshow_filmstrip_height = 0;
|
57 |
+
$slideshow_filmstrip_width = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
$enable_image_title = (isset($params['slideshow_enable_title']) ? esc_html($params['slideshow_enable_title']) : 0);
|
60 |
$slideshow_title_position = explode('-', (isset($params['slideshow_title_position']) ? esc_html($params['slideshow_title_position']) : 'bottom-right'));
|
81 |
}
|
82 |
else {
|
83 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 0);
|
84 |
+
$theme_row = $this->model->get_theme_row_data($theme_id);
|
85 |
+
if (!$theme_row) {
|
86 |
+
echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
|
87 |
+
return;
|
88 |
+
}
|
89 |
$gallery_id = (isset($params['gallery_id']) ? esc_html($params['gallery_id']) : 0);
|
90 |
$sort_by = 'order';
|
91 |
$slideshow_effect = (isset($params['effect']) ? esc_html($params['effect']) : 'fade');
|
93 |
$enable_slideshow_shuffle = (isset($params['shuffle']) ? esc_html($params['shuffle']) : 0);
|
94 |
$enable_slideshow_ctrl = $options_row->slideshow_enable_ctrl;
|
95 |
$enable_slideshow_filmstrip = FALSE;
|
96 |
+
$slideshow_filmstrip_height = 0;
|
97 |
+
$slideshow_filmstrip_width = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
$enable_image_title = $options_row->slideshow_enable_title;
|
100 |
$slideshow_title_position = explode('-', $options_row->slideshow_title_position);
|
119 |
$watermark_width = $options_row->watermark_width;
|
120 |
$watermark_height = $options_row->watermark_height;
|
121 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
$gallery_row = $this->model->get_gallery_row_data($gallery_id);
|
123 |
if (!$gallery_row) {
|
124 |
echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
|
132 |
$play_pause_button_display = 'undefined';
|
133 |
$filmstrip_thumb_margin = $theme_row->slideshow_filmstrip_thumb_margin;
|
134 |
$margins_split = explode(" ", $filmstrip_thumb_margin);
|
135 |
+
$temp_iterator = 1;
|
136 |
+
if (isset($margins_split[$temp_iterator])) {
|
137 |
+
$filmstrip_thumb_margin_right = (int) $margins_split[$temp_iterator];
|
138 |
+
if (isset($margins_split[$temp_iterator + 2])) {
|
139 |
+
$filmstrip_thumb_margin_left = (int) $margins_split[$temp_iterator + 2];
|
140 |
}
|
141 |
else {
|
142 |
$filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
|
146 |
$filmstrip_thumb_margin_right = (int) $margins_split[0];
|
147 |
$filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
|
148 |
}
|
149 |
+
$filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
|
150 |
?>
|
151 |
<style>
|
152 |
#bwg_container1_<?php echo $bwg; ?> {
|
289 |
box-sizing: content-box;
|
290 |
cursor: pointer;
|
291 |
display: table;
|
|
|
292 |
line-height: 0;
|
293 |
margin-top: -15px;
|
294 |
position: absolute;
|
302 |
color: #<?php echo $theme_row->slideshow_close_rl_btn_hover_color; ?>;
|
303 |
cursor: pointer;
|
304 |
}
|
305 |
+
<?php
|
306 |
+
if($options_row->autohide_slideshow_navigation){?>
|
307 |
+
#spider_slideshow_left-ico_<?php echo $bwg; ?>{
|
308 |
+
left: -9999px;
|
309 |
+
}
|
310 |
+
#spider_slideshow_right-ico_<?php echo $bwg; ?>{
|
311 |
+
left: -9999px;
|
312 |
+
}
|
313 |
+
|
314 |
+
<?php }
|
315 |
+
else{ ?>
|
316 |
+
#spider_slideshow_left-ico_<?php echo $bwg; ?>{
|
317 |
+
left: 20px;
|
318 |
+
}
|
319 |
+
#spider_slideshow_right-ico_<?php echo $bwg; ?>{
|
320 |
+
left: auto;
|
321 |
+
right: 20px;
|
322 |
+
}
|
323 |
+
<?php } ?>
|
324 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_image_container_<?php echo $bwg; ?> {
|
325 |
display: table;
|
326 |
position: absolute;
|
581 |
overflow: hidden;
|
582 |
position: relative;
|
583 |
height: <?php echo ($theme_row->slideshow_dots_height + $theme_row->slideshow_dots_margin * 2); ?>px;
|
584 |
+
width: <?php echo ($theme_row->slideshow_dots_width + $theme_row->slideshow_dots_margin * 2) * count($image_rows); ?>px;
|
585 |
}
|
586 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_slideshow_dots_active_<?php echo $bwg; ?> {
|
587 |
background: #<?php echo $theme_row->slideshow_dots_active_background_color; ?>;
|
656 |
<div class="bwg_slider_<?php echo $bwg; ?>">
|
657 |
<?php
|
658 |
foreach ($image_rows as $key => $image_row) {
|
659 |
+
|
660 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
661 |
$is_embed_video = ($is_embed && preg_match('/_VIDEO/',$image_row->filetype)==1) ? true :false;
|
662 |
if ($image_row->id == $current_image_id) {
|
671 |
<img id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
672 |
<?php
|
673 |
}
|
|
|
674 |
else{ /*$is_embed*/?>
|
675 |
+
<span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
|
676 |
<?php
|
677 |
if($is_embed_instagram_post){
|
678 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
690 |
}
|
691 |
?>
|
692 |
</span>
|
|
|
693 |
<?php
|
694 |
}
|
695 |
?>
|
710 |
<img id="bwg_slideshow_image_second_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
711 |
<?php
|
712 |
}
|
|
|
713 |
else { /*$is_embed*/ ?>
|
714 |
+
<span id="bwg_slideshow_image_second_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>">
|
715 |
<?php
|
716 |
if($is_embed_instagram_post){
|
717 |
$post_width = $image_width - ($filmstrip_direction == 'vertical' ? $slideshow_filmstrip_width : 0);
|
730 |
?>
|
731 |
</span>
|
732 |
<?php
|
|
|
733 |
}
|
734 |
?>
|
735 |
</span>
|
898 |
var image_left = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left;
|
899 |
var image_right = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").position().left + jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").outerWidth(true);
|
900 |
var bwg_dots_width = jQuery(".bwg_slideshow_dots_container_<?php echo $bwg; ?>").outerWidth(true);
|
901 |
+
var bwg_dots_thumbnails_width = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").outerWidth(false);
|
902 |
var long_filmstrip_cont_left = jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left;
|
903 |
var long_filmstrip_cont_right = Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_<?php echo $bwg; ?>").position().left) + bwg_dots_width;
|
904 |
if (bwg_dots_width > bwg_dots_thumbnails_width) {
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -219,12 +219,6 @@ class BWGViewThumbnails {
|
|
219 |
max-width: <?php echo $params['image_column_number'] * ($params['thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
|
220 |
text-align: <?php echo $theme_row->thumb_align; ?>;
|
221 |
}
|
222 |
-
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumbnails_<?php echo $bwg; ?> .bwg_link {
|
223 |
-
font-size: 0;
|
224 |
-
border: none;
|
225 |
-
cursor: pointer;
|
226 |
-
text-decoration: none;
|
227 |
-
}
|
228 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
|
229 |
display: inline-block;
|
230 |
text-align: center;
|
@@ -349,7 +343,7 @@ class BWGViewThumbnails {
|
|
349 |
opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
|
350 |
filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
|
351 |
}
|
352 |
-
.bwg_play_icon_spun_<?php echo $bwg; ?>
|
353 |
width: inherit;
|
354 |
height: inherit;
|
355 |
display: table;
|
@@ -389,63 +383,12 @@ class BWGViewThumbnails {
|
|
389 |
</div>
|
390 |
<?php
|
391 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
|
392 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg);
|
393 |
}
|
394 |
?>
|
395 |
<div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
|
396 |
<?php
|
397 |
foreach ($image_rows as $image_row) {
|
398 |
-
$params_array = array(
|
399 |
-
'tag_id' => (isset($params['type']) ? $params['gallery_id'] : 0),
|
400 |
-
'action' => 'GalleryBox',
|
401 |
-
'current_view' => $bwg,
|
402 |
-
'image_id' => (isset($_POST['image_id']) ? esc_html($_POST['image_id']) : $image_row->id),
|
403 |
-
'gallery_id' => $params['gallery_id'],
|
404 |
-
'theme_id' => $params['theme_id'],
|
405 |
-
'thumb_width' => $params['thumb_width'],
|
406 |
-
'thumb_height' => $params['thumb_height'],
|
407 |
-
'open_with_fullscreen' => $params['popup_fullscreen'],
|
408 |
-
'open_with_autoplay' => $params['popup_autoplay'],
|
409 |
-
'image_width' => $params['popup_width'],
|
410 |
-
'image_height' => $params['popup_height'],
|
411 |
-
'image_effect' => $params['popup_effect'],
|
412 |
-
'wd_sor' => (isset($params['type']) ? 'date' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
|
413 |
-
'wd_ord' => $sort_direction,
|
414 |
-
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
415 |
-
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
416 |
-
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
417 |
-
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
418 |
-
'popup_enable_info' => $params['popup_enable_info'],
|
419 |
-
'popup_info_always_show' => $params['popup_info_always_show'],
|
420 |
-
'popup_info_full_width' => $params['popup_info_full_width'],
|
421 |
-
'popup_hit_counter' => $params['popup_hit_counter'],
|
422 |
-
'popup_enable_rate' => $params['popup_enable_rate'],
|
423 |
-
'slideshow_interval' => $params['popup_interval'],
|
424 |
-
'enable_comment_social' => $params['popup_enable_comment'],
|
425 |
-
'enable_image_facebook' => $params['popup_enable_facebook'],
|
426 |
-
'enable_image_twitter' => $params['popup_enable_twitter'],
|
427 |
-
'enable_image_google' => $params['popup_enable_google'],
|
428 |
-
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
429 |
-
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
430 |
-
'watermark_type' => $params['watermark_type'],
|
431 |
-
'current_url' => $current_url
|
432 |
-
);
|
433 |
-
if ($params['watermark_type'] != 'none') {
|
434 |
-
$params_array['watermark_link'] = $params['watermark_link'];
|
435 |
-
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
436 |
-
$params_array['watermark_position'] = $params['watermark_position'];
|
437 |
-
}
|
438 |
-
if ($params['watermark_type'] == 'text') {
|
439 |
-
$params_array['watermark_text'] = $params['watermark_text'];
|
440 |
-
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
441 |
-
$params_array['watermark_font'] = $params['watermark_font'];
|
442 |
-
$params_array['watermark_color'] = $params['watermark_color'];
|
443 |
-
}
|
444 |
-
elseif ($params['watermark_type'] == 'image') {
|
445 |
-
$params_array['watermark_url'] = $params['watermark_url'];
|
446 |
-
$params_array['watermark_width'] = $params['watermark_width'];
|
447 |
-
$params_array['watermark_height'] = $params['watermark_height'];
|
448 |
-
}
|
449 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
450 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
|
451 |
if (!$is_embed) {
|
@@ -478,7 +421,7 @@ class BWGViewThumbnails {
|
|
478 |
$thumb_left = ($params['thumb_width'] - $image_thumb_width) / 2;
|
479 |
$thumb_top = ($params['thumb_height'] - $image_thumb_height) / 2;
|
480 |
?>
|
481 |
-
<a
|
482 |
<span class="bwg_standart_thumb_<?php echo $bwg; ?>">
|
483 |
<?php
|
484 |
if ($params['image_title'] == 'show' and $theme_row->thumb_title_pos == 'top') {
|
@@ -511,7 +454,7 @@ class BWGViewThumbnails {
|
|
511 |
<?php
|
512 |
}
|
513 |
?>
|
514 |
-
|
515 |
</span>
|
516 |
</span>
|
517 |
<?php
|
@@ -533,7 +476,7 @@ class BWGViewThumbnails {
|
|
533 |
</div>
|
534 |
<?php
|
535 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
|
536 |
-
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg);
|
537 |
}
|
538 |
?>
|
539 |
</div>
|
@@ -543,6 +486,70 @@ class BWGViewThumbnails {
|
|
543 |
</div>
|
544 |
</div>
|
545 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
</script>
|
547 |
<?php
|
548 |
if ($from_shortcode) {
|
219 |
max-width: <?php echo $params['image_column_number'] * ($params['thumb_width'] + 2 * (2 + $theme_row->thumb_margin + $theme_row->thumb_padding + $theme_row->thumb_border_width)); ?>px;
|
220 |
text-align: <?php echo $theme_row->thumb_align; ?>;
|
221 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_standart_thumb_<?php echo $bwg; ?> {
|
223 |
display: inline-block;
|
224 |
text-align: center;
|
343 |
opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
|
344 |
filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
|
345 |
}
|
346 |
+
.bwg_play_icon_spun_<?php echo $bwg; ?> {
|
347 |
width: inherit;
|
348 |
height: inherit;
|
349 |
display: table;
|
383 |
</div>
|
384 |
<?php
|
385 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'top')) {
|
386 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo);
|
387 |
}
|
388 |
?>
|
389 |
<div id="bwg_standart_thumbnails_<?php echo $bwg; ?>" class="bwg_standart_thumbnails_<?php echo $bwg; ?>">
|
390 |
<?php
|
391 |
foreach ($image_rows as $image_row) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
$is_embed = preg_match('/EMBED/',$image_row->filetype)==1 ? true :false;
|
393 |
$is_embed_video = preg_match('/VIDEO/',$image_row->filetype)==1 ? true :false;
|
394 |
if (!$is_embed) {
|
421 |
$thumb_left = ($params['thumb_width'] - $image_thumb_width) / 2;
|
422 |
$thumb_top = ($params['thumb_height'] - $image_thumb_height) / 2;
|
423 |
?>
|
424 |
+
<a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($options_row->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '"') : ($image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
425 |
<span class="bwg_standart_thumb_<?php echo $bwg; ?>">
|
426 |
<?php
|
427 |
if ($params['image_title'] == 'show' and $theme_row->thumb_title_pos == 'top') {
|
454 |
<?php
|
455 |
}
|
456 |
?>
|
457 |
+
<img class="bwg_standart_thumb_img_<?php echo $bwg; ?>" style="max-height: none !important; max-width: none !important; padding: 0 !important; width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;" id="<?php echo $image_row->id; ?>" src="<?php echo ($is_embed ? "" : site_url() . '/' . $WD_BWG_UPLOAD_DIR) . $image_row->thumb_url; ?>" alt="<?php echo $image_row->alt; ?>" />
|
458 |
</span>
|
459 |
</span>
|
460 |
<?php
|
476 |
</div>
|
477 |
<?php
|
478 |
if ($params['image_enable_page'] && $params['images_per_page'] && ($theme_row->page_nav_position == 'bottom')) {
|
479 |
+
WDWLibrary::ajax_html_frontend_page_nav($theme_row, $page_nav['total'], $page_nav['limit'], 'gal_front_form_' . $bwg, $params['images_per_page'], $bwg, 'bwg_standart_thumbnails_' . $bwg, 0, 'album', $options_row->enable_seo);
|
480 |
}
|
481 |
?>
|
482 |
</div>
|
486 |
</div>
|
487 |
</div>
|
488 |
<script>
|
489 |
+
<?php
|
490 |
+
$params_array = array(
|
491 |
+
'tag_id' => (isset($params['type']) ? $params['gallery_id'] : 0),
|
492 |
+
'action' => 'GalleryBox',
|
493 |
+
'current_view' => $bwg,
|
494 |
+
'gallery_id' => $params['gallery_id'],
|
495 |
+
'theme_id' => $params['theme_id'],
|
496 |
+
'thumb_width' => $params['thumb_width'],
|
497 |
+
'thumb_height' => $params['thumb_height'],
|
498 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
499 |
+
'open_with_autoplay' => $params['popup_autoplay'],
|
500 |
+
'image_width' => $params['popup_width'],
|
501 |
+
'image_height' => $params['popup_height'],
|
502 |
+
'image_effect' => $params['popup_effect'],
|
503 |
+
'wd_sor' => (isset($params['type']) ? 'date' : (($params['sort_by'] == 'RAND()') ? 'order' : $params['sort_by'])),
|
504 |
+
'wd_ord' => $sort_direction,
|
505 |
+
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
506 |
+
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
507 |
+
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
508 |
+
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
509 |
+
'popup_enable_info' => $params['popup_enable_info'],
|
510 |
+
'popup_info_always_show' => $params['popup_info_always_show'],
|
511 |
+
'popup_info_full_width' => $params['popup_info_full_width'],
|
512 |
+
'popup_hit_counter' => $params['popup_hit_counter'],
|
513 |
+
'popup_enable_rate' => $params['popup_enable_rate'],
|
514 |
+
'slideshow_interval' => $params['popup_interval'],
|
515 |
+
'enable_comment_social' => $params['popup_enable_comment'],
|
516 |
+
'enable_image_facebook' => $params['popup_enable_facebook'],
|
517 |
+
'enable_image_twitter' => $params['popup_enable_twitter'],
|
518 |
+
'enable_image_google' => $params['popup_enable_google'],
|
519 |
+
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
520 |
+
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
521 |
+
'watermark_type' => $params['watermark_type'],
|
522 |
+
'current_url' => urlencode($current_url)
|
523 |
+
);
|
524 |
+
if ($params['watermark_type'] != 'none') {
|
525 |
+
$params_array['watermark_link'] = $params['watermark_link'];
|
526 |
+
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
527 |
+
$params_array['watermark_position'] = $params['watermark_position'];
|
528 |
+
}
|
529 |
+
if ($params['watermark_type'] == 'text') {
|
530 |
+
$params_array['watermark_text'] = $params['watermark_text'];
|
531 |
+
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
532 |
+
$params_array['watermark_font'] = $params['watermark_font'];
|
533 |
+
$params_array['watermark_color'] = $params['watermark_color'];
|
534 |
+
}
|
535 |
+
elseif ($params['watermark_type'] == 'image') {
|
536 |
+
$params_array['watermark_url'] = $params['watermark_url'];
|
537 |
+
$params_array['watermark_width'] = $params['watermark_width'];
|
538 |
+
$params_array['watermark_height'] = $params['watermark_height'];
|
539 |
+
}
|
540 |
+
?>
|
541 |
+
function bwg_gallery_box_<?php echo $bwg; ?>(image_id) {
|
542 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, home_url('wp-admin/admin-ajax.php'))); ?>&image_id=' + image_id, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5);
|
543 |
+
}
|
544 |
+
function bwg_document_ready_<?php echo $bwg; ?>() {
|
545 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
546 |
+
bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-image-id"));
|
547 |
+
return false;
|
548 |
+
});
|
549 |
+
}
|
550 |
+
jQuery(document).ready(function () {
|
551 |
+
bwg_document_ready_<?php echo $bwg; ?>();
|
552 |
+
});
|
553 |
</script>
|
554 |
<?php
|
555 |
if ($from_shortcode) {
|
images/thumbnails_masonry.jpg
CHANGED
Binary file
|
js/3DEngine/3DEngine.js
DELETED
@@ -1,198 +0,0 @@
|
|
1 |
-
|
2 |
-
/*
|
3 |
-
* DisplayObject3D ----------------------------------------------
|
4 |
-
*/
|
5 |
-
var DisplayObject3D = function(){
|
6 |
-
return this;
|
7 |
-
};
|
8 |
-
|
9 |
-
DisplayObject3D.prototype._x = 0;
|
10 |
-
DisplayObject3D.prototype._y = 0;
|
11 |
-
|
12 |
-
//Create 3d Points
|
13 |
-
DisplayObject3D.prototype.make3DPoint = function(x,y,z) {
|
14 |
-
var point = {};
|
15 |
-
point.x = x;
|
16 |
-
point.y = y;
|
17 |
-
point.z = z;
|
18 |
-
return point;
|
19 |
-
};
|
20 |
-
|
21 |
-
//Create 2d Points
|
22 |
-
DisplayObject3D.prototype.make2DPoint = function(x, y, depth, scaleFactor){
|
23 |
-
var point = {};
|
24 |
-
point.x = x;
|
25 |
-
point.y = y;
|
26 |
-
point.depth = depth;
|
27 |
-
point.scaleFactor = scaleFactor;
|
28 |
-
return point;
|
29 |
-
};
|
30 |
-
|
31 |
-
DisplayObject3D.prototype.container = undefined;
|
32 |
-
DisplayObject3D.prototype.pointsArray = [];
|
33 |
-
|
34 |
-
DisplayObject3D.prototype.init = function (container){
|
35 |
-
|
36 |
-
this.container = container;
|
37 |
-
this.containerId = this.container.attr("id");
|
38 |
-
|
39 |
-
//if there isn't a ul than it creates a list of +'s
|
40 |
-
if (container.has("ul").length === 0){
|
41 |
-
for (i=0; i < this.pointsArray.length; i++){
|
42 |
-
this.container.append('<b id="tags_cloud_item'+i+'">+</b>');
|
43 |
-
}
|
44 |
-
}
|
45 |
-
};
|
46 |
-
|
47 |
-
/*
|
48 |
-
* DisplayObject3D End ----------------------------------------------
|
49 |
-
*/
|
50 |
-
|
51 |
-
|
52 |
-
/*
|
53 |
-
* Camera3D ----------------------------------------------
|
54 |
-
*/
|
55 |
-
var Camera3D = function (){};
|
56 |
-
|
57 |
-
Camera3D.prototype.x = 0;
|
58 |
-
Camera3D.prototype.y = 0;
|
59 |
-
Camera3D.prototype.z = 500;
|
60 |
-
Camera3D.prototype.focalLength = 1000;
|
61 |
-
|
62 |
-
Camera3D.prototype.scaleRatio = function(item){
|
63 |
-
return this.focalLength / (this.focalLength + item.z - this.z);
|
64 |
-
};
|
65 |
-
|
66 |
-
Camera3D.prototype.init = function (x, y, z, focalLength){
|
67 |
-
this.x = x;
|
68 |
-
this.y = y;
|
69 |
-
this.z = z;
|
70 |
-
this.focalLength = focalLength;
|
71 |
-
};
|
72 |
-
|
73 |
-
|
74 |
-
/*
|
75 |
-
* Camera3D End ----------------------------------------------
|
76 |
-
*/
|
77 |
-
|
78 |
-
|
79 |
-
/*
|
80 |
-
* Object3D ----------------------------------------------
|
81 |
-
*/
|
82 |
-
var Object3D = function (container){
|
83 |
-
this.container = container;
|
84 |
-
};
|
85 |
-
|
86 |
-
Object3D.prototype.objects = [];
|
87 |
-
|
88 |
-
Object3D.prototype.addChild = function (object3D){
|
89 |
-
this.objects.push(object3D);
|
90 |
-
object3D.init(this.container);
|
91 |
-
return object3D;
|
92 |
-
};
|
93 |
-
|
94 |
-
/*
|
95 |
-
* Object3D End ----------------------------------------------
|
96 |
-
*/
|
97 |
-
|
98 |
-
|
99 |
-
/*
|
100 |
-
* Scene3D ----------------------------------------------
|
101 |
-
*/
|
102 |
-
|
103 |
-
var Scene3D = function (){};
|
104 |
-
|
105 |
-
Scene3D.prototype.sceneItems = [];
|
106 |
-
Scene3D.prototype.addToScene = function (object){
|
107 |
-
this.sceneItems.push(object);
|
108 |
-
};
|
109 |
-
|
110 |
-
Scene3D.prototype.Transform3DPointsTo2DPoints = function(points, axisRotations, camera){
|
111 |
-
var TransformedPointsArray = [];
|
112 |
-
var sx = Math.sin(axisRotations.x);
|
113 |
-
var cx = Math.cos(axisRotations.x);
|
114 |
-
var sy = Math.sin(axisRotations.y);
|
115 |
-
var cy = Math.cos(axisRotations.y);
|
116 |
-
var sz = Math.sin(axisRotations.z);
|
117 |
-
var cz = Math.cos(axisRotations.z);
|
118 |
-
var x,y,z, xy,xz, yx,yz, zx,zy, scaleFactor;
|
119 |
-
|
120 |
-
var i = points.length;
|
121 |
-
|
122 |
-
while (i--){
|
123 |
-
x = points[i].x;
|
124 |
-
y = points[i].y;
|
125 |
-
z = points[i].z;
|
126 |
-
|
127 |
-
// rotation around x
|
128 |
-
xy = cx * y - sx * z;
|
129 |
-
xz = sx * y + cx * z;
|
130 |
-
// rotation around y
|
131 |
-
yz = cy * xz - sy * x;
|
132 |
-
yx = sy * xz + cy * x;
|
133 |
-
// rotation around z
|
134 |
-
zx = cz * yx - sz * xy;
|
135 |
-
zy = sz * yx + cz * xy;
|
136 |
-
|
137 |
-
scaleFactor = camera.focalLength / (camera.focalLength + yz);
|
138 |
-
x = zx * scaleFactor;
|
139 |
-
y = zy * scaleFactor;
|
140 |
-
z = yz;
|
141 |
-
|
142 |
-
var displayObject = new DisplayObject3D();
|
143 |
-
TransformedPointsArray[i] = displayObject.make2DPoint(x, y, -z, scaleFactor);
|
144 |
-
}
|
145 |
-
|
146 |
-
return TransformedPointsArray;
|
147 |
-
};
|
148 |
-
|
149 |
-
Scene3D.prototype.renderCamera = function (camera){
|
150 |
-
|
151 |
-
for(var i = 0 ; i < this.sceneItems.length; i++){
|
152 |
-
|
153 |
-
var obj = this.sceneItems[i].objects[0];
|
154 |
-
|
155 |
-
var screenPoints = this.Transform3DPointsTo2DPoints(obj.pointsArray, axisRotation, camera);
|
156 |
-
|
157 |
-
var hasList = (document.getElementById(obj.containerId).getElementsByTagName("ul").length > 0);
|
158 |
-
|
159 |
-
for (k=0; k < obj.pointsArray.length; k++){
|
160 |
-
var currItem = null;
|
161 |
-
|
162 |
-
if (hasList){
|
163 |
-
currItem = document.getElementById(obj.containerId).getElementsByTagName("ul")[0].getElementsByTagName("li")[k];
|
164 |
-
}else{
|
165 |
-
currItem = document.getElementById(obj.containerId).getElementsByTagName("*")[k];
|
166 |
-
}
|
167 |
-
|
168 |
-
if(currItem){
|
169 |
-
|
170 |
-
currItem._x = screenPoints[k].x;
|
171 |
-
currItem._y = screenPoints[k].y;
|
172 |
-
currItem.scale = screenPoints[k].scaleFactor;
|
173 |
-
|
174 |
-
currItem.style.position = "absolute";
|
175 |
-
currItem.style.top = (currItem._y + jQuery("#" + obj.containerId).height() * 0.4)+'px';
|
176 |
-
currItem.style.left = (currItem._x + jQuery("#" + obj.containerId).width() * 0.4)+'px';
|
177 |
-
currItem.style.fontSize = 100 * currItem.scale + '%';
|
178 |
-
|
179 |
-
jQuery(currItem).css({opacity:(currItem.scale-.5)});
|
180 |
-
|
181 |
-
curChild = jQuery(currItem).find("#imgg");
|
182 |
-
if (curChild) {
|
183 |
-
jQuery(currItem).css("zIndex", Math.round(currItem.scale * 100));
|
184 |
-
curChild.css({maxWidth:(currItem.scale*50)});
|
185 |
-
curChild.css({maxHeight:(currItem.scale*50)});
|
186 |
-
}
|
187 |
-
}
|
188 |
-
}
|
189 |
-
}
|
190 |
-
};
|
191 |
-
|
192 |
-
/*
|
193 |
-
* Scene3D End ----------------------------------------------
|
194 |
-
*/
|
195 |
-
|
196 |
-
|
197 |
-
//Center for rotation
|
198 |
-
var axisRotation = new DisplayObject3D().make3DPoint(0,0,0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/3DEngine/Sphere.js
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
var Sphere = function (radius, sides, numOfItems){
|
2 |
-
|
3 |
-
for (var j = sides ; j > 0; j--){
|
4 |
-
for (var i = numOfItems / sides ; i > 0; i--)
|
5 |
-
{
|
6 |
-
var angle = i * Math.PI / (numOfItems / sides + 1);
|
7 |
-
var angleB = j * Math.PI * 2 / (sides);
|
8 |
-
|
9 |
-
var x = Math.sin(angleB) * Math.sin(angle) * radius;
|
10 |
-
var y = Math.cos(angleB) * Math.sin(angle) * radius;
|
11 |
-
var z = Math.cos(angle) * radius;
|
12 |
-
|
13 |
-
this.pointsArray.push(this.make3DPoint(x,y,z));
|
14 |
-
}
|
15 |
-
};
|
16 |
-
};
|
17 |
-
|
18 |
-
Sphere.prototype = new DisplayObject3D();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/bwg.js
CHANGED
@@ -7,7 +7,7 @@ function edit_tag(m) {
|
|
7 |
jQuery("#td_id_" + m).attr('class', 'table_big_col');
|
8 |
}
|
9 |
|
10 |
-
function save_tag(tag_id) {
|
11 |
var tagname=jQuery('input[name=tagname'+tag_id+']').val();
|
12 |
var slug = jQuery('input[name=slug'+tag_id+']').val();
|
13 |
var datas = "tagname="+tagname+"&"+"slug="+slug+"&"+"tag_id="+tag_id;
|
@@ -75,6 +75,7 @@ function spider_ajax_save(form_id, tr_group) {
|
|
75 |
var bwg_nonce = jQuery("#bwg_nonce").val();
|
76 |
var name = jQuery("#name").val();
|
77 |
var slug = jQuery("#slug").val();
|
|
|
78 |
if ((typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden() && tinyMCE.activeEditor.getContent) {
|
79 |
var description = tinyMCE.activeEditor.getContent();
|
80 |
}
|
@@ -105,6 +106,7 @@ function spider_ajax_save(form_id, tr_group) {
|
|
105 |
post_data["bwg_nonce"] = bwg_nonce;
|
106 |
post_data["name"] = name;
|
107 |
post_data["slug"] = slug;
|
|
|
108 |
post_data["description"] = description;
|
109 |
post_data["preview_image"] = preview_image;
|
110 |
post_data["published"] = published;
|
@@ -167,8 +169,10 @@ function spider_ajax_save(form_id, tr_group) {
|
|
167 |
else {
|
168 |
var str = jQuery(data).find('#images_table').html();
|
169 |
jQuery('#images_table').html(str);
|
170 |
-
var str = jQuery(data).find('.tablenav').html();
|
171 |
-
jQuery('.tablenav').html(str);
|
|
|
|
|
172 |
jQuery("#show_hide_weights").val("Hide order column");
|
173 |
spider_show_hide_weights();
|
174 |
spider_run_checkbox();
|
@@ -224,6 +228,7 @@ function spider_ajax_save(form_id, tr_group) {
|
|
224 |
else if (ajax_task == 'search') {
|
225 |
jQuery('#message_div').html("");
|
226 |
jQuery('#message_div').hide();
|
|
|
227 |
}
|
228 |
else {
|
229 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Saved.</p></strong>");
|
@@ -932,17 +937,15 @@ function bwg_gallery_type() {
|
|
932 |
return response;
|
933 |
}
|
934 |
|
935 |
-
|
936 |
/*returns false if user cancels or impossible to do.*/
|
937 |
/*
|
938 |
-
|
939 |
-
|
940 |
function bwg_change_gallery_type(type_to_set, warning_type) {
|
941 |
|
942 |
warning_type = (typeof warning_type === "undefined") ? "default" : warning_type;
|
943 |
-
|
944 |
-
if(type_to_set == 'instagram'){
|
945 |
|
|
|
946 |
jQuery('#gallery_type').val('instagram');
|
947 |
jQuery('#tr_instagram_post_gallery').show();
|
948 |
jQuery('#tr_gallery_source').show();
|
@@ -958,11 +961,8 @@ function bwg_change_gallery_type(type_to_set, warning_type) {
|
|
958 |
jQuery('#content-add_media').hide();
|
959 |
jQuery('#show_add_embed').hide();
|
960 |
jQuery('#show_bulk_embed').hide();
|
961 |
-
|
962 |
}
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
else{
|
967 |
|
968 |
var ids_string = jQuery("#ids_string").val();
|
@@ -984,15 +984,12 @@ function bwg_change_gallery_type(type_to_set, warning_type) {
|
|
984 |
jQuery('#gallery_type').val('instagram');
|
985 |
return false;
|
986 |
}
|
987 |
-
|
988 |
-
|
989 |
-
}
|
990 |
|
991 |
jQuery('#gallery_type').val('');
|
992 |
jQuery('#tr_instagram_post_gallery').hide();
|
993 |
jQuery('#tr_gallery_source').hide();
|
994 |
-
|
995 |
-
|
996 |
jQuery('#tr_update_flag').hide();
|
997 |
jQuery('#tr_autogallery_image_number').hide();
|
998 |
jQuery('#tr_instagram_gallery_add_button').hide();
|
@@ -1010,8 +1007,6 @@ function bwg_change_gallery_type(type_to_set, warning_type) {
|
|
1010 |
return true;
|
1011 |
}
|
1012 |
|
1013 |
-
|
1014 |
-
|
1015 |
function bwg_is_instagram_gallery() {
|
1016 |
|
1017 |
var value = jQuery('#gallery_type').val();
|
@@ -1031,7 +1026,6 @@ function bwg_is_instagram_gallery() {
|
|
1031 |
* @return true if empty, false if not empty
|
1032 |
*/
|
1033 |
|
1034 |
-
|
1035 |
function bwg_convert_seconds(seconds) {
|
1036 |
var sec_num = parseInt(seconds, 10);
|
1037 |
var hours = Math.floor(sec_num / 3600);
|
@@ -1122,6 +1116,4 @@ function bwg_get_embed_info(input_id) {
|
|
1122 |
});
|
1123 |
return 'ok';
|
1124 |
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
|
7 |
jQuery("#td_id_" + m).attr('class', 'table_big_col');
|
8 |
}
|
9 |
|
10 |
+
function save_tag(tag_id) {
|
11 |
var tagname=jQuery('input[name=tagname'+tag_id+']').val();
|
12 |
var slug = jQuery('input[name=slug'+tag_id+']').val();
|
13 |
var datas = "tagname="+tagname+"&"+"slug="+slug+"&"+"tag_id="+tag_id;
|
75 |
var bwg_nonce = jQuery("#bwg_nonce").val();
|
76 |
var name = jQuery("#name").val();
|
77 |
var slug = jQuery("#slug").val();
|
78 |
+
|
79 |
if ((typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden() && tinyMCE.activeEditor.getContent) {
|
80 |
var description = tinyMCE.activeEditor.getContent();
|
81 |
}
|
106 |
post_data["bwg_nonce"] = bwg_nonce;
|
107 |
post_data["name"] = name;
|
108 |
post_data["slug"] = slug;
|
109 |
+
|
110 |
post_data["description"] = description;
|
111 |
post_data["preview_image"] = preview_image;
|
112 |
post_data["published"] = published;
|
169 |
else {
|
170 |
var str = jQuery(data).find('#images_table').html();
|
171 |
jQuery('#images_table').html(str);
|
172 |
+
var str = jQuery(data).find('.tablenav.top').html();
|
173 |
+
jQuery('.tablenav.top').html(str);
|
174 |
+
var str = jQuery(data).find('.tablenav.bottom').html();
|
175 |
+
jQuery('.tablenav.bottom').html(str);
|
176 |
jQuery("#show_hide_weights").val("Hide order column");
|
177 |
spider_show_hide_weights();
|
178 |
spider_run_checkbox();
|
228 |
else if (ajax_task == 'search') {
|
229 |
jQuery('#message_div').html("");
|
230 |
jQuery('#message_div').hide();
|
231 |
+
|
232 |
}
|
233 |
else {
|
234 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Saved.</p></strong>");
|
937 |
return response;
|
938 |
}
|
939 |
|
|
|
940 |
/*returns false if user cancels or impossible to do.*/
|
941 |
/*
|
942 |
+
type_to_set:'' or 'instagram'
|
943 |
+
*/
|
944 |
function bwg_change_gallery_type(type_to_set, warning_type) {
|
945 |
|
946 |
warning_type = (typeof warning_type === "undefined") ? "default" : warning_type;
|
|
|
|
|
947 |
|
948 |
+
if(type_to_set == 'instagram'){
|
949 |
jQuery('#gallery_type').val('instagram');
|
950 |
jQuery('#tr_instagram_post_gallery').show();
|
951 |
jQuery('#tr_gallery_source').show();
|
961 |
jQuery('#content-add_media').hide();
|
962 |
jQuery('#show_add_embed').hide();
|
963 |
jQuery('#show_bulk_embed').hide();
|
964 |
+
|
965 |
}
|
|
|
|
|
|
|
966 |
else{
|
967 |
|
968 |
var ids_string = jQuery("#ids_string").val();
|
984 |
jQuery('#gallery_type').val('instagram');
|
985 |
return false;
|
986 |
}
|
987 |
+
}
|
|
|
|
|
988 |
|
989 |
jQuery('#gallery_type').val('');
|
990 |
jQuery('#tr_instagram_post_gallery').hide();
|
991 |
jQuery('#tr_gallery_source').hide();
|
992 |
+
|
|
|
993 |
jQuery('#tr_update_flag').hide();
|
994 |
jQuery('#tr_autogallery_image_number').hide();
|
995 |
jQuery('#tr_instagram_gallery_add_button').hide();
|
1007 |
return true;
|
1008 |
}
|
1009 |
|
|
|
|
|
1010 |
function bwg_is_instagram_gallery() {
|
1011 |
|
1012 |
var value = jQuery('#gallery_type').val();
|
1026 |
* @return true if empty, false if not empty
|
1027 |
*/
|
1028 |
|
|
|
1029 |
function bwg_convert_seconds(seconds) {
|
1030 |
var sec_num = parseInt(seconds, 10);
|
1031 |
var hours = Math.floor(sec_num / 3600);
|
1116 |
});
|
1117 |
return 'ok';
|
1118 |
|
1119 |
+
}
|
|
|
|
js/bwg_embed.js
CHANGED
@@ -135,7 +135,7 @@ function spider_display_embed(embed_type, embed_id, attrs){
|
|
135 |
break;
|
136 |
case 'EMBED_OEMBED_INSTAGRAM_POST':
|
137 |
var oembed_instagram_html ='<div ';
|
138 |
-
var id = '';
|
139 |
for (attr in attrs) {
|
140 |
if(!(/src/i).test(attr)){
|
141 |
if(attr != '' && attrs[attr] != ''){
|
135 |
break;
|
136 |
case 'EMBED_OEMBED_INSTAGRAM_POST':
|
137 |
var oembed_instagram_html ='<div ';
|
138 |
+
var id = '';
|
139 |
for (attr in attrs) {
|
140 |
if(!(/src/i).test(attr)){
|
141 |
if(attr != '' && attrs[attr] != ''){
|
js/bwg_frontend.js
CHANGED
@@ -59,7 +59,10 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
59 |
jQuery("#ajax_loading_" + current_view).css('display', 'none');
|
60 |
// window.scroll(0, spider_get_pos(document.getElementById(form_id)));
|
61 |
jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
|
|
|
|
|
62 |
/* For masonry view.*/
|
|
|
63 |
var cccount_masonry = 0;
|
64 |
var tot_cccount_masonry = jQuery(".bwg_masonry_thumb_spun_" + current_view + " img").length;
|
65 |
jQuery(".bwg_masonry_thumb_spun_" + current_view + " img").on("load", function() {
|
@@ -72,16 +75,18 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
72 |
jQuery(this).height(100);
|
73 |
jQuery(this).width(100);
|
74 |
if (++cccount_masonry == tot_cccount_masonry) {
|
|
|
75 |
window["bwg_masonry_" + current_view]();
|
|
|
76 |
}
|
77 |
});
|
|
|
78 |
|
79 |
/* For Blog style view.*/
|
80 |
jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_16x9_" + current_view).each(function (e) {
|
81 |
jQuery(this).width(jQuery(this).parent().width());
|
82 |
jQuery(this).height(jQuery(this).width() * 0.5625);
|
83 |
});
|
84 |
-
|
85 |
jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_instapost_" + current_view).each(function (e) {
|
86 |
jQuery(this).width(jQuery(this).parent().width());
|
87 |
jQuery(this).height(jQuery(this).width() +88);
|
@@ -111,15 +116,15 @@ function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_a
|
|
111 |
}
|
112 |
});
|
113 |
jQuery(".bwg_mosaic_thumb_spun_" + current_view + " img").error(function() {
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
|
124 |
});
|
125 |
// if (event.preventDefault) {
|
59 |
jQuery("#ajax_loading_" + current_view).css('display', 'none');
|
60 |
// window.scroll(0, spider_get_pos(document.getElementById(form_id)));
|
61 |
jQuery("html, body").animate({scrollTop: jQuery('#' + form_id).offset().top - 150}, 500);
|
62 |
+
/* For all*/
|
63 |
+
window["bwg_document_ready_" + current_view]();
|
64 |
/* For masonry view.*/
|
65 |
+
/*
|
66 |
var cccount_masonry = 0;
|
67 |
var tot_cccount_masonry = jQuery(".bwg_masonry_thumb_spun_" + current_view + " img").length;
|
68 |
jQuery(".bwg_masonry_thumb_spun_" + current_view + " img").on("load", function() {
|
75 |
jQuery(this).height(100);
|
76 |
jQuery(this).width(100);
|
77 |
if (++cccount_masonry == tot_cccount_masonry) {
|
78 |
+
|
79 |
window["bwg_masonry_" + current_view]();
|
80 |
+
|
81 |
}
|
82 |
});
|
83 |
+
*/
|
84 |
|
85 |
/* For Blog style view.*/
|
86 |
jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_16x9_" + current_view).each(function (e) {
|
87 |
jQuery(this).width(jQuery(this).parent().width());
|
88 |
jQuery(this).height(jQuery(this).width() * 0.5625);
|
89 |
});
|
|
|
90 |
jQuery(".blog_style_images_conteiner_" + current_view + " .bwg_embed_frame_instapost_" + current_view).each(function (e) {
|
91 |
jQuery(this).width(jQuery(this).parent().width());
|
92 |
jQuery(this).height(jQuery(this).width() +88);
|
116 |
}
|
117 |
});
|
118 |
jQuery(".bwg_mosaic_thumb_spun_" + current_view + " img").error(function() {
|
119 |
+
|
120 |
+
jQuery(this).height(100);
|
121 |
+
jQuery(this).width(100);
|
122 |
+
if (++cccount_mosaic == tot_cccount_mosaic) {
|
123 |
+
|
124 |
+
window["bwg_mosaic_" + current_view]("load");
|
125 |
+
|
126 |
+
}
|
127 |
+
});*/
|
128 |
|
129 |
});
|
130 |
// if (event.preventDefault) {
|
js/bwg_shortcode.js
CHANGED
@@ -535,9 +535,9 @@ function bwg_gallery_type(gallery_type) {
|
|
535 |
jQuery("#bwg_pro_version").html('Extended Album');
|
536 |
jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/extended-album-view/");
|
537 |
break;
|
538 |
-
|
539 |
}
|
540 |
-
|
|
|
541 |
jQuery("#tr_album").css('display', '');
|
542 |
jQuery("#tr_sort_by").css('display', '');
|
543 |
jQuery("#tr_order_by").css('display', '');
|
@@ -553,7 +553,7 @@ function bwg_gallery_type(gallery_type) {
|
|
553 |
//bwg_change_masonry_album_view_type();
|
554 |
bwg_show_search_box();
|
555 |
break;
|
556 |
-
}
|
557 |
|
558 |
case 'blog_style': {
|
559 |
jQuery("#tr_gallery").css('display', '');
|
535 |
jQuery("#bwg_pro_version").html('Extended Album');
|
536 |
jQuery("#bwg_pro_version_link").attr("href", "http://wpdemo.web-dorado.com/extended-album-view/");
|
537 |
break;
|
|
|
538 |
}
|
539 |
+
|
540 |
+
case 'album_masonry_preview': {
|
541 |
jQuery("#tr_album").css('display', '');
|
542 |
jQuery("#tr_sort_by").css('display', '');
|
543 |
jQuery("#tr_order_by").css('display', '');
|
553 |
//bwg_change_masonry_album_view_type();
|
554 |
bwg_show_search_box();
|
555 |
break;
|
556 |
+
}
|
557 |
|
558 |
case 'blog_style': {
|
559 |
jQuery("#tr_gallery").css('display', '');
|
photo-gallery.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
-
* Version: 1.2.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -12,6 +12,7 @@
|
|
12 |
|
13 |
define('WD_BWG_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
14 |
define('WD_BWG_URL', plugins_url(plugin_basename(dirname(__FILE__))));
|
|
|
15 |
define('WD_BWG_PRO', false);
|
16 |
|
17 |
global $wpdb;
|
@@ -25,46 +26,46 @@ else {
|
|
25 |
|
26 |
// Plugin menu.
|
27 |
function bwg_options_panel() {
|
28 |
-
$galleries_page = add_menu_page('Photo Gallery', 'Photo Gallery', 'manage_options', 'galleries_bwg', '
|
29 |
|
30 |
-
$galleries_page = add_submenu_page('galleries_bwg', 'Add Galleries/Images', 'Add Galleries/Images', 'manage_options', 'galleries_bwg', '
|
31 |
add_action('admin_print_styles-' . $galleries_page, 'bwg_styles');
|
32 |
add_action('admin_print_scripts-' . $galleries_page, 'bwg_scripts');
|
33 |
add_action('load-' . $galleries_page, 'bwg_add_galleries_per_page_option');
|
34 |
|
35 |
-
$albums_page = add_submenu_page('galleries_bwg', 'Albums', 'Albums', 'manage_options', 'albums_bwg', '
|
36 |
add_action('admin_print_styles-' . $albums_page, 'bwg_styles');
|
37 |
add_action('admin_print_scripts-' . $albums_page, 'bwg_scripts');
|
38 |
add_action('load-' . $albums_page, 'bwg_add_albums_per_page_option');
|
39 |
|
40 |
-
$tags_page = add_submenu_page('galleries_bwg', 'Tags', 'Tags', 'manage_options', 'tags_bwg', '
|
41 |
add_action('admin_print_styles-' . $tags_page, 'bwg_styles');
|
42 |
add_action('admin_print_scripts-' . $tags_page, 'bwg_scripts');
|
43 |
add_action('load-' . $tags_page, 'bwg_add_tags_per_page_option');
|
44 |
|
45 |
-
$options_page = add_submenu_page('galleries_bwg', 'Options', 'Options', 'manage_options', 'options_bwg', '
|
46 |
add_action('admin_print_styles-' . $options_page, 'bwg_styles');
|
47 |
add_action('admin_print_scripts-' . $options_page, 'bwg_options_scripts');
|
48 |
|
49 |
-
$themes_page = add_submenu_page('galleries_bwg', 'Themes', 'Themes', 'manage_options', 'themes_bwg', '
|
50 |
add_action('admin_print_styles-' . $themes_page, 'bwg_styles');
|
51 |
add_action('admin_print_scripts-' . $themes_page, 'bwg_options_scripts');
|
52 |
add_action('load-' . $themes_page, 'bwg_add_themes_per_page_option');
|
53 |
|
54 |
-
add_submenu_page('galleries_bwg', 'Generate Shortcode', 'Generate Shortcode', 'manage_options', 'BWGShortcode', '
|
55 |
-
|
56 |
-
$licensing_plugins_page = add_submenu_page('galleries_bwg', 'Licensing', 'Licensing', 'manage_options', 'licensing_bwg', '
|
57 |
add_action('admin_print_styles-' . $licensing_plugins_page, 'bwg_licensing_styles');
|
58 |
|
59 |
add_submenu_page('galleries_bwg', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_bwg', 'bwg_featured');
|
60 |
|
61 |
-
$uninstall_page = add_submenu_page('galleries_bwg', 'Uninstall', 'Uninstall', 'manage_options', 'uninstall_bwg', '
|
62 |
add_action('admin_print_styles-' . $uninstall_page, 'bwg_styles');
|
63 |
add_action('admin_print_scripts-' . $uninstall_page, 'bwg_options_scripts');
|
64 |
}
|
65 |
add_action('admin_menu', 'bwg_options_panel');
|
66 |
|
67 |
-
function
|
68 |
global $wpdb;
|
69 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
70 |
$page = WDWLibrary::get('page');
|
@@ -120,7 +121,7 @@ add_action('wp_ajax_nopriv_bwg_captcha', 'bwg_captcha');
|
|
120 |
function bwg_UploadHandler() {
|
121 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
122 |
if(!WDWLibrary::verify_nonce('bwg_UploadHandler')){
|
123 |
-
|
124 |
}
|
125 |
require_once(WD_BWG_DIR . '/filemanager/UploadHandler.php');
|
126 |
}
|
@@ -138,6 +139,7 @@ function bwg_filemanager_ajax() {
|
|
138 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
139 |
$page = WDWLibrary::get('action');
|
140 |
if (($page != '') && (($page == 'addImages') || ($page == 'addMusic'))) {
|
|
|
141 |
if(!WDWLibrary::verify_nonce($page)){
|
142 |
die('Sorry, your nonce did not verify.');
|
143 |
}
|
@@ -147,8 +149,6 @@ function bwg_filemanager_ajax() {
|
|
147 |
$controller->execute();
|
148 |
}
|
149 |
}
|
150 |
-
|
151 |
-
|
152 |
function bwg_add_embed_ajax() {
|
153 |
if (function_exists('current_user_can')) {
|
154 |
if (!current_user_can('manage_options')) {
|
@@ -163,6 +163,7 @@ function bwg_add_embed_ajax() {
|
|
163 |
if(!WDWLibrary::verify_nonce('')){
|
164 |
die(WDWLibrary::delimit_wd_output(json_encode(array("error", "Sorry, your nonce did not verify."))));
|
165 |
}
|
|
|
166 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
167 |
$embed_action = WDWLibrary::get('action');
|
168 |
|
@@ -188,7 +189,7 @@ function bwg_edit_tag() {
|
|
188 |
}
|
189 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
190 |
if(!WDWLibrary::verify_nonce('')){
|
191 |
-
|
192 |
}
|
193 |
require_once(WD_BWG_DIR . '/admin/controllers/BWGControllerTags_bwg.php');
|
194 |
$controller_class = 'BWGControllerTags_bwg';
|
@@ -209,7 +210,6 @@ function bwg_ajax() {
|
|
209 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
210 |
$page = WDWLibrary::get('action');
|
211 |
if ($page != '' && (($page == 'BWGShortcode') || ($page == 'addAlbumsGalleries') || ($page == 'editThumb') || ($page == 'addTags'))) {
|
212 |
-
|
213 |
if(!WDWLibrary::verify_nonce($page) && ($page != 'BWGShortcode') ){
|
214 |
die('Sorry, your nonce did not verify.');
|
215 |
}
|
@@ -221,7 +221,7 @@ function bwg_ajax() {
|
|
221 |
}
|
222 |
}
|
223 |
|
224 |
-
function
|
225 |
register_taxonomy('bwg_tag', 'post', array(
|
226 |
'public' => TRUE,
|
227 |
'show_ui' => FALSE,
|
@@ -232,7 +232,7 @@ function create_taxonomy() {
|
|
232 |
'query_var' => TRUE,
|
233 |
'rewrite' => TRUE));
|
234 |
}
|
235 |
-
add_action('init', '
|
236 |
|
237 |
function bwg_shortcode($params) {
|
238 |
if (isset($params['id'])) {
|
@@ -246,6 +246,9 @@ function bwg_shortcode($params) {
|
|
246 |
$params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
|
247 |
}
|
248 |
}
|
|
|
|
|
|
|
249 |
}
|
250 |
shortcode_atts(array(
|
251 |
'gallery_type' => 'thumbnails',
|
@@ -281,6 +284,7 @@ function bwg_shortcode($params) {
|
|
281 |
break;
|
282 |
|
283 |
}
|
|
|
284 |
case 'slideshow': {
|
285 |
shortcode_atts(array(
|
286 |
'gallery_id' => 1,
|
@@ -367,6 +371,7 @@ function bwg_shortcode($params) {
|
|
367 |
break;
|
368 |
|
369 |
}
|
|
|
370 |
default: {
|
371 |
die();
|
372 |
}
|
@@ -437,7 +442,8 @@ function bwg_shortcode($params) {
|
|
437 |
}
|
438 |
ob_start();
|
439 |
bwg_front_end($params);
|
440 |
-
return str_replace(array("\r\n", "\n", "\r"), '', ob_get_clean());
|
|
|
441 |
}
|
442 |
add_shortcode('Best_Wordpress_Gallery', 'bwg_shortcode');
|
443 |
|
@@ -691,9 +697,13 @@ function bwg_activate() {
|
|
691 |
`slideshow_title_full_width` tinyint(1) NOT NULL,
|
692 |
`popup_info_full_width` tinyint(1) NOT NULL,
|
693 |
`show_sort_images` tinyint(1) NOT NULL,
|
694 |
-
`description_tb` tinyint(1) NOT NULL,
|
695 |
`autoupdate_interval` int(4) NOT NULL,
|
696 |
`instagram_client_id` varchar(40) NOT NULL,
|
|
|
|
|
|
|
|
|
|
|
697 |
PRIMARY KEY (`id`)
|
698 |
) DEFAULT CHARSET=utf8;";
|
699 |
$wpdb->query($bwg_option);
|
@@ -1276,6 +1286,10 @@ function bwg_activate() {
|
|
1276 |
'autoupdate_interval' => 30,
|
1277 |
'instagram_client_id' => '',
|
1278 |
'description_tb' => 0,
|
|
|
|
|
|
|
|
|
1279 |
), array(
|
1280 |
'%d',
|
1281 |
'%s',
|
@@ -1398,8 +1412,13 @@ function bwg_activate() {
|
|
1398 |
'%d',
|
1399 |
'%d',
|
1400 |
'%d',
|
|
|
1401 |
'%s',
|
1402 |
'%d',
|
|
|
|
|
|
|
|
|
1403 |
));
|
1404 |
}
|
1405 |
$exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
|
@@ -3097,7 +3116,7 @@ function bwg_activate() {
|
|
3097 |
));
|
3098 |
}
|
3099 |
$version = get_option("wd_bwg_version");
|
3100 |
-
$new_version = '1.2.
|
3101 |
if ($version && version_compare($version, $new_version, '<')) {
|
3102 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3103 |
bwg_update($version);
|
@@ -3115,7 +3134,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
|
|
3115 |
|
3116 |
function bwg_update_hook() {
|
3117 |
$version = get_option("wd_bwg_version");
|
3118 |
-
$new_version = '1.2.
|
3119 |
if ($version && version_compare($version, $new_version, '<')) {
|
3120 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3121 |
bwg_update($version);
|
@@ -3136,6 +3155,7 @@ function bwg_styles() {
|
|
3136 |
function bwg_scripts() {
|
3137 |
wp_enqueue_script('thickbox');
|
3138 |
wp_enqueue_script('bwg_admin', WD_BWG_URL . '/js/bwg.js', array(), wd_bwg_version());
|
|
|
3139 |
global $wp_scripts;
|
3140 |
if (isset($wp_scripts->registered['jquery'])) {
|
3141 |
$jquery = $wp_scripts->registered['jquery'];
|
@@ -3235,11 +3255,11 @@ function bwg_set_option_rates($status, $option, $value) {
|
|
3235 |
if ( 'bwg_rates_per_page' == $option ) return $value;
|
3236 |
return $status;
|
3237 |
}
|
3238 |
-
|
3239 |
function bwg_licensing_styles() {
|
3240 |
wp_enqueue_style('bwg_licensing', WD_BWG_URL . '/css/bwg_licensing.css');
|
3241 |
}
|
3242 |
|
|
|
3243 |
function bwg_options_scripts() {
|
3244 |
wp_enqueue_script('thickbox');
|
3245 |
wp_enqueue_script('bwg_admin', WD_BWG_URL . '/js/bwg.js', array(), wd_bwg_version());
|
@@ -3256,7 +3276,7 @@ function bwg_options_scripts() {
|
|
3256 |
}
|
3257 |
|
3258 |
function bwg_front_end_scripts() {
|
3259 |
-
|
3260 |
global $wp_scripts;
|
3261 |
if (isset($wp_scripts->registered['jquery'])) {
|
3262 |
$jquery = $wp_scripts->registered['jquery'];
|
@@ -3266,18 +3286,18 @@ function bwg_front_end_scripts() {
|
|
3266 |
}
|
3267 |
}
|
3268 |
wp_enqueue_script('jquery');
|
3269 |
-
/*wp_enqueue_style('jquery-ui',
|
3270 |
|
3271 |
-
wp_enqueue_script('bwg_frontend',
|
3272 |
-
wp_enqueue_style('bwg_frontend',
|
3273 |
|
3274 |
// Styles/Scripts for popup.
|
3275 |
-
wp_enqueue_style('bwg_font-awesome',
|
3276 |
-
wp_enqueue_script('bwg_jquery_mobile',
|
3277 |
-
wp_enqueue_script('bwg_mCustomScrollbar',
|
3278 |
-
wp_enqueue_style('bwg_mCustomScrollbar',
|
3279 |
-
wp_enqueue_script('jquery-fullscreen',
|
3280 |
-
wp_enqueue_script('bwg_gallery_box',
|
3281 |
wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array(
|
3282 |
'bwg_field_required' => __('field is required.', 'bwg'),
|
3283 |
'bwg_mail_validation' => __('This is not a valid email address.', 'bwg'),
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
+
* Version: 1.2.18
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
13 |
define('WD_BWG_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
|
14 |
define('WD_BWG_URL', plugins_url(plugin_basename(dirname(__FILE__))));
|
15 |
+
define('WD_BWG_FRONT_URL', home_url("wp-content/plugins/" . plugin_basename(dirname(__FILE__))));
|
16 |
define('WD_BWG_PRO', false);
|
17 |
|
18 |
global $wpdb;
|
26 |
|
27 |
// Plugin menu.
|
28 |
function bwg_options_panel() {
|
29 |
+
$galleries_page = add_menu_page('Photo Gallery', 'Photo Gallery', 'manage_options', 'galleries_bwg', 'bwg_gallery', WD_BWG_URL . '/images/best-wordpress-gallery.png');
|
30 |
|
31 |
+
$galleries_page = add_submenu_page('galleries_bwg', 'Add Galleries/Images', 'Add Galleries/Images', 'manage_options', 'galleries_bwg', 'bwg_gallery');
|
32 |
add_action('admin_print_styles-' . $galleries_page, 'bwg_styles');
|
33 |
add_action('admin_print_scripts-' . $galleries_page, 'bwg_scripts');
|
34 |
add_action('load-' . $galleries_page, 'bwg_add_galleries_per_page_option');
|
35 |
|
36 |
+
$albums_page = add_submenu_page('galleries_bwg', 'Albums', 'Albums', 'manage_options', 'albums_bwg', 'bwg_gallery');
|
37 |
add_action('admin_print_styles-' . $albums_page, 'bwg_styles');
|
38 |
add_action('admin_print_scripts-' . $albums_page, 'bwg_scripts');
|
39 |
add_action('load-' . $albums_page, 'bwg_add_albums_per_page_option');
|
40 |
|
41 |
+
$tags_page = add_submenu_page('galleries_bwg', 'Tags', 'Tags', 'manage_options', 'tags_bwg', 'bwg_gallery');
|
42 |
add_action('admin_print_styles-' . $tags_page, 'bwg_styles');
|
43 |
add_action('admin_print_scripts-' . $tags_page, 'bwg_scripts');
|
44 |
add_action('load-' . $tags_page, 'bwg_add_tags_per_page_option');
|
45 |
|
46 |
+
$options_page = add_submenu_page('galleries_bwg', 'Options', 'Options', 'manage_options', 'options_bwg', 'bwg_gallery');
|
47 |
add_action('admin_print_styles-' . $options_page, 'bwg_styles');
|
48 |
add_action('admin_print_scripts-' . $options_page, 'bwg_options_scripts');
|
49 |
|
50 |
+
$themes_page = add_submenu_page('galleries_bwg', 'Themes', 'Themes', 'manage_options', 'themes_bwg', 'bwg_gallery');
|
51 |
add_action('admin_print_styles-' . $themes_page, 'bwg_styles');
|
52 |
add_action('admin_print_scripts-' . $themes_page, 'bwg_options_scripts');
|
53 |
add_action('load-' . $themes_page, 'bwg_add_themes_per_page_option');
|
54 |
|
55 |
+
add_submenu_page('galleries_bwg', 'Generate Shortcode', 'Generate Shortcode', 'manage_options', 'BWGShortcode', 'bwg_gallery');
|
56 |
+
|
57 |
+
$licensing_plugins_page = add_submenu_page('galleries_bwg', 'Licensing', 'Licensing', 'manage_options', 'licensing_bwg', 'bwg_gallery');
|
58 |
add_action('admin_print_styles-' . $licensing_plugins_page, 'bwg_licensing_styles');
|
59 |
|
60 |
add_submenu_page('galleries_bwg', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_bwg', 'bwg_featured');
|
61 |
|
62 |
+
$uninstall_page = add_submenu_page('galleries_bwg', 'Uninstall', 'Uninstall', 'manage_options', 'uninstall_bwg', 'bwg_gallery');
|
63 |
add_action('admin_print_styles-' . $uninstall_page, 'bwg_styles');
|
64 |
add_action('admin_print_scripts-' . $uninstall_page, 'bwg_options_scripts');
|
65 |
}
|
66 |
add_action('admin_menu', 'bwg_options_panel');
|
67 |
|
68 |
+
function bwg_gallery() {
|
69 |
global $wpdb;
|
70 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
71 |
$page = WDWLibrary::get('page');
|
121 |
function bwg_UploadHandler() {
|
122 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
123 |
if(!WDWLibrary::verify_nonce('bwg_UploadHandler')){
|
124 |
+
die('Sorry, your nonce did not verify.');
|
125 |
}
|
126 |
require_once(WD_BWG_DIR . '/filemanager/UploadHandler.php');
|
127 |
}
|
139 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
140 |
$page = WDWLibrary::get('action');
|
141 |
if (($page != '') && (($page == 'addImages') || ($page == 'addMusic'))) {
|
142 |
+
|
143 |
if(!WDWLibrary::verify_nonce($page)){
|
144 |
die('Sorry, your nonce did not verify.');
|
145 |
}
|
149 |
$controller->execute();
|
150 |
}
|
151 |
}
|
|
|
|
|
152 |
function bwg_add_embed_ajax() {
|
153 |
if (function_exists('current_user_can')) {
|
154 |
if (!current_user_can('manage_options')) {
|
163 |
if(!WDWLibrary::verify_nonce('')){
|
164 |
die(WDWLibrary::delimit_wd_output(json_encode(array("error", "Sorry, your nonce did not verify."))));
|
165 |
}
|
166 |
+
|
167 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
168 |
$embed_action = WDWLibrary::get('action');
|
169 |
|
189 |
}
|
190 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
191 |
if(!WDWLibrary::verify_nonce('')){
|
192 |
+
die('Sorry, your nonce did not verify.');
|
193 |
}
|
194 |
require_once(WD_BWG_DIR . '/admin/controllers/BWGControllerTags_bwg.php');
|
195 |
$controller_class = 'BWGControllerTags_bwg';
|
210 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
211 |
$page = WDWLibrary::get('action');
|
212 |
if ($page != '' && (($page == 'BWGShortcode') || ($page == 'addAlbumsGalleries') || ($page == 'editThumb') || ($page == 'addTags'))) {
|
|
|
213 |
if(!WDWLibrary::verify_nonce($page) && ($page != 'BWGShortcode') ){
|
214 |
die('Sorry, your nonce did not verify.');
|
215 |
}
|
221 |
}
|
222 |
}
|
223 |
|
224 |
+
function bwg_create_taxonomy() {
|
225 |
register_taxonomy('bwg_tag', 'post', array(
|
226 |
'public' => TRUE,
|
227 |
'show_ui' => FALSE,
|
232 |
'query_var' => TRUE,
|
233 |
'rewrite' => TRUE));
|
234 |
}
|
235 |
+
add_action('init', 'bwg_create_taxonomy', 0);
|
236 |
|
237 |
function bwg_shortcode($params) {
|
238 |
if (isset($params['id'])) {
|
246 |
$params[str_replace(' ', '', $shortcode_elem[0])] = $shortcode_elem[1];
|
247 |
}
|
248 |
}
|
249 |
+
else {
|
250 |
+
die();
|
251 |
+
}
|
252 |
}
|
253 |
shortcode_atts(array(
|
254 |
'gallery_type' => 'thumbnails',
|
284 |
break;
|
285 |
|
286 |
}
|
287 |
+
|
288 |
case 'slideshow': {
|
289 |
shortcode_atts(array(
|
290 |
'gallery_id' => 1,
|
371 |
break;
|
372 |
|
373 |
}
|
374 |
+
|
375 |
default: {
|
376 |
die();
|
377 |
}
|
442 |
}
|
443 |
ob_start();
|
444 |
bwg_front_end($params);
|
445 |
+
// return str_replace(array("\r\n", "\n", "\r"), '', ob_get_clean());
|
446 |
+
return ob_get_clean();
|
447 |
}
|
448 |
add_shortcode('Best_Wordpress_Gallery', 'bwg_shortcode');
|
449 |
|
697 |
`slideshow_title_full_width` tinyint(1) NOT NULL,
|
698 |
`popup_info_full_width` tinyint(1) NOT NULL,
|
699 |
`show_sort_images` tinyint(1) NOT NULL,
|
|
|
700 |
`autoupdate_interval` int(4) NOT NULL,
|
701 |
`instagram_client_id` varchar(40) NOT NULL,
|
702 |
+
`description_tb` tinyint(1) NOT NULL,
|
703 |
+
`enable_seo` tinyint(1) NOT NULL,
|
704 |
+
`autohide_lightbox_navigation` tinyint(1) NOT NULL,
|
705 |
+
`autohide_slideshow_navigation` tinyint(1) NOT NULL,
|
706 |
+
`read_metadata` tinyint(1) NOT NULL,
|
707 |
PRIMARY KEY (`id`)
|
708 |
) DEFAULT CHARSET=utf8;";
|
709 |
$wpdb->query($bwg_option);
|
1286 |
'autoupdate_interval' => 30,
|
1287 |
'instagram_client_id' => '',
|
1288 |
'description_tb' => 0,
|
1289 |
+
'enable_seo' => 1,
|
1290 |
+
'autohide_lightbox_navigation' => 1,
|
1291 |
+
'autohide_slideshow_navigation' => 1,
|
1292 |
+
'read_metadata' => 1,
|
1293 |
), array(
|
1294 |
'%d',
|
1295 |
'%s',
|
1412 |
'%d',
|
1413 |
'%d',
|
1414 |
'%d',
|
1415 |
+
'%d',
|
1416 |
'%s',
|
1417 |
'%d',
|
1418 |
+
'%d',
|
1419 |
+
'%d',
|
1420 |
+
'%d',
|
1421 |
+
'%d',
|
1422 |
));
|
1423 |
}
|
1424 |
$exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
|
3116 |
));
|
3117 |
}
|
3118 |
$version = get_option("wd_bwg_version");
|
3119 |
+
$new_version = '1.2.18';
|
3120 |
if ($version && version_compare($version, $new_version, '<')) {
|
3121 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3122 |
bwg_update($version);
|
3134 |
|
3135 |
function bwg_update_hook() {
|
3136 |
$version = get_option("wd_bwg_version");
|
3137 |
+
$new_version = '1.2.18';
|
3138 |
if ($version && version_compare($version, $new_version, '<')) {
|
3139 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
3140 |
bwg_update($version);
|
3155 |
function bwg_scripts() {
|
3156 |
wp_enqueue_script('thickbox');
|
3157 |
wp_enqueue_script('bwg_admin', WD_BWG_URL . '/js/bwg.js', array(), wd_bwg_version());
|
3158 |
+
|
3159 |
global $wp_scripts;
|
3160 |
if (isset($wp_scripts->registered['jquery'])) {
|
3161 |
$jquery = $wp_scripts->registered['jquery'];
|
3255 |
if ( 'bwg_rates_per_page' == $option ) return $value;
|
3256 |
return $status;
|
3257 |
}
|
|
|
3258 |
function bwg_licensing_styles() {
|
3259 |
wp_enqueue_style('bwg_licensing', WD_BWG_URL . '/css/bwg_licensing.css');
|
3260 |
}
|
3261 |
|
3262 |
+
|
3263 |
function bwg_options_scripts() {
|
3264 |
wp_enqueue_script('thickbox');
|
3265 |
wp_enqueue_script('bwg_admin', WD_BWG_URL . '/js/bwg.js', array(), wd_bwg_version());
|
3276 |
}
|
3277 |
|
3278 |
function bwg_front_end_scripts() {
|
3279 |
+
$version = wd_bwg_version();
|
3280 |
global $wp_scripts;
|
3281 |
if (isset($wp_scripts->registered['jquery'])) {
|
3282 |
$jquery = $wp_scripts->registered['jquery'];
|
3286 |
}
|
3287 |
}
|
3288 |
wp_enqueue_script('jquery');
|
3289 |
+
/*wp_enqueue_style('jquery-ui', WD_BWG_FRONT_URL . '/css/jquery-ui-1.10.3.custom.css', array(), $version);*/
|
3290 |
|
3291 |
+
wp_enqueue_script('bwg_frontend', WD_BWG_FRONT_URL . '/js/bwg_frontend.js', array(), $version);
|
3292 |
+
wp_enqueue_style('bwg_frontend', WD_BWG_FRONT_URL . '/css/bwg_frontend.css', array(), $version);
|
3293 |
|
3294 |
// Styles/Scripts for popup.
|
3295 |
+
wp_enqueue_style('bwg_font-awesome', WD_BWG_FRONT_URL . '/css/font-awesome/font-awesome.css', array(), '4.2.0');
|
3296 |
+
wp_enqueue_script('bwg_jquery_mobile', WD_BWG_FRONT_URL . '/js/jquery.mobile.js', array(), $version);
|
3297 |
+
wp_enqueue_script('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/js/jquery.mCustomScrollbar.concat.min.js', array(), $version);
|
3298 |
+
wp_enqueue_style('bwg_mCustomScrollbar', WD_BWG_FRONT_URL . '/css/jquery.mCustomScrollbar.css', array(), $version);
|
3299 |
+
wp_enqueue_script('jquery-fullscreen', WD_BWG_FRONT_URL . '/js/jquery.fullscreen-0.4.1.js', array(), '0.4.1');
|
3300 |
+
wp_enqueue_script('bwg_gallery_box', WD_BWG_FRONT_URL . '/js/bwg_gallery_box.js', array(), $version);
|
3301 |
wp_localize_script('bwg_gallery_box', 'bwg_objectL10n', array(
|
3302 |
'bwg_field_required' => __('field is required.', 'bwg'),
|
3303 |
'bwg_mail_validation' => __('This is not a valid email address.', 'bwg'),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
|
4 |
Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -205,6 +205,17 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
|
|
205 |
|
206 |
|
207 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
= 1.2.17 =
|
209 |
Edit licensing page
|
210 |
|
4 |
Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 1.2.18
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
205 |
|
206 |
|
207 |
== Changelog ==
|
208 |
+
|
209 |
+
= 1.2.18 =
|
210 |
+
New: Bottom pagination in admin views.
|
211 |
+
New: Improve SEO.
|
212 |
+
New: Autohide option for slideshow and lightbox navigation buttons.
|
213 |
+
New: Read image meta data.
|
214 |
+
Fixed: Slideshow bullets centering.
|
215 |
+
Fixed: Admin-ajax url for frontend.
|
216 |
+
Fixed: Upload images to .original not resized.
|
217 |
+
Fixed: Order by filename.
|
218 |
+
|
219 |
= 1.2.17 =
|
220 |
Edit licensing page
|
221 |
|
update/bwg_update.php
CHANGED
@@ -220,7 +220,8 @@ function bwg_update($version) {
|
|
220 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `mosaic_thumb_title_font_style` varchar(16) NOT NULL DEFAULT 'segoe ui'");
|
221 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `mosaic_thumb_title_font_color` varchar(8) NOT NULL DEFAULT 'CCCCCC'");
|
222 |
}
|
223 |
-
|
|
|
224 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `autoupdate_interval` int(4) NOT NULL DEFAULT 30");
|
225 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `instagram_client_id` varchar(40) NOT NULL DEFAULT ''");
|
226 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `gallery_type` varchar(32) NOT NULL DEFAULT ''");
|
@@ -228,10 +229,21 @@ function bwg_update($version) {
|
|
228 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `update_flag` varchar(32) NOT NULL DEFAULT ''");
|
229 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `autogallery_image_number` int(4) NOT NULL DEFAULT 12");
|
230 |
/*auto-filling image meta description*/
|
231 |
-
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `description_tb` tinyint(1) NOT NULL DEFAULT
|
|
|
232 |
/*convert old videos with "YOUTUBE" and "VIMEO" videos to new EMBED format*/
|
233 |
$wpdb->update($wpdb->prefix . 'bwg_image', array('filetype' => 'EMBED_OEMBED_YOUTUBE_VIDEO', 'size' => '', 'resolution' => '480 x 360 px' ), array('filetype' => 'YOUTUBE'));
|
234 |
$wpdb->update($wpdb->prefix . 'bwg_image', array('filetype' => 'EMBED_OEMBED_VIMEO_VIDEO', 'size' => '', 'resolution' => '480 x 360 px' ), array('filetype' => 'VIMEO'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
return;
|
237 |
}
|
220 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `mosaic_thumb_title_font_style` varchar(16) NOT NULL DEFAULT 'segoe ui'");
|
221 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `mosaic_thumb_title_font_color` varchar(8) NOT NULL DEFAULT 'CCCCCC'");
|
222 |
}
|
223 |
+
if (version_compare($version, '1.2.16') == -1) {
|
224 |
+
// Add Embeds and instagram galleries.
|
225 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `autoupdate_interval` int(4) NOT NULL DEFAULT 30");
|
226 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `instagram_client_id` varchar(40) NOT NULL DEFAULT ''");
|
227 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `gallery_type` varchar(32) NOT NULL DEFAULT ''");
|
229 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `update_flag` varchar(32) NOT NULL DEFAULT ''");
|
230 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `autogallery_image_number` int(4) NOT NULL DEFAULT 12");
|
231 |
/*auto-filling image meta description*/
|
232 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `description_tb` tinyint(1) NOT NULL DEFAULT 1");
|
233 |
+
|
234 |
/*convert old videos with "YOUTUBE" and "VIMEO" videos to new EMBED format*/
|
235 |
$wpdb->update($wpdb->prefix . 'bwg_image', array('filetype' => 'EMBED_OEMBED_YOUTUBE_VIDEO', 'size' => '', 'resolution' => '480 x 360 px' ), array('filetype' => 'YOUTUBE'));
|
236 |
$wpdb->update($wpdb->prefix . 'bwg_image', array('filetype' => 'EMBED_OEMBED_VIMEO_VIDEO', 'size' => '', 'resolution' => '480 x 360 px' ), array('filetype' => 'VIMEO'));
|
237 |
+
}
|
238 |
+
|
239 |
+
if (version_compare($version, '1.2.18') == -1) {
|
240 |
+
// Add load all images on frontend.
|
241 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `enable_seo` tinyint(1) NOT NULL DEFAULT 1");
|
242 |
+
// Navigation buttons autohide option
|
243 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `autohide_lightbox_navigation` tinyint(1) NOT NULL DEFAULT 1");
|
244 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `autohide_slideshow_navigation` tinyint(1) NOT NULL DEFAULT 1");
|
245 |
+
// Load image metadata.
|
246 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option CHANGE `description_tb` `read_metadata` tinyint(1) NOT NULL DEFAULT 1");
|
247 |
}
|
248 |
return;
|
249 |
}
|