Version Description
- Fixed: Security issue. (This vulnerability was discovered by Vishnupriya Ilango of Fortinet's FortiGuard Labs.)
Download this release
Release Info
Developer | 10web |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.5.46 |
Comparing to | |
See all releases |
Code changes from version 1.5.45 to 1.5.46
- admin/controllers/Albums.php +7 -7
- admin/controllers/Albumsgalleries.php +2 -2
- admin/controllers/Galleries.php +15 -16
- admin/controllers/Options.php +26 -27
- admin/controllers/Shortcode.php +8 -11
- admin/models/Albums.php +6 -4
- admin/models/Galleries.php +83 -76
- admin/models/Uninstall.php +2 -1
- admin/views/AdminView.php +1 -1
- admin/views/Albums.php +11 -11
- admin/views/Albumsgalleries.php +4 -4
- admin/views/Editimage.php +19 -19
- admin/views/Galleries.php +3 -3
- admin/views/Options.php +2 -2
- admin/views/Shortcode.php +13 -13
- banner_class.php +0 -512
- css/bwg_tables.css +5 -2
- filemanager/UploadHandler.php +16 -16
- filemanager/controller.php +41 -36
- filemanager/model.php +2 -2
- filemanager/view.php +12 -12
- framework/WDWLibrary.php +41 -24
- framework/WD_BWG_Theme.php +38 -0
- frontend/controllers/BWGControllerGalleryBox.php +8 -8
- frontend/controllers/controller.php +7 -8
- frontend/models/BWGModelGalleryBox.php +6 -4
- frontend/models/model.php +29 -29
- frontend/views/BWGViewAlbum_compact_preview.php +11 -7
- frontend/views/BWGViewAlbum_extended_preview.php +7 -5
- frontend/views/BWGViewGalleryBox.php +16 -16
- frontend/views/BWGViewImage_browser.php +1 -1
- frontend/views/BWGViewSlideshow.php +1 -1
- frontend/views/BWGViewThumbnails.php +1 -1
- frontend/views/view.php +23 -24
- js/bwg.js +1 -1
- js/bwg_embed.js +3 -3
- js/bwg_frontend.js +38 -29
- js/bwg_gallery_box.js +7 -11
- js/scripts.min.js +1 -1
- languages/bwg-da_DK.mo +0 -0
- languages/bwg-da_DK.po +2 -2
- photo-gallery.php +13 -48
- readme.txt +4 -1
- wd/README.md +1 -2
- wd/assets/css/deactivate_popup.css +84 -80
- wd/assets/css/notices.css +11 -2
- wd/assets/css/overview.css +444 -358
- wd/assets/css/subscribe.css +175 -143
- wd/assets/img/sp_calendar_main_plugin.png +0 -0
- wd/assets/js/deactivate_popup.js +54 -97
- wd/assets/js/overview.js +12 -11
- wd/assets/js/subsribe.js +1 -1
- wd/config.php +121 -128
- wd/includes/api.php +42 -74
- wd/includes/deactivate.php +105 -172
- wd/includes/notices.php +184 -188
- wd/includes/overview.php +54 -78
- wd/includes/subscribe.php +69 -124
- wd/start.php +33 -42
- wd/templates/display_deactivation_popup.php +24 -24
- wd/templates/display_overview.php +110 -110
- wd/templates/display_subscribe.php +49 -49
- wd/wd.php +117 -158
admin/controllers/Albums.php
CHANGED
@@ -67,13 +67,13 @@ class AlbumsController_bwg {
|
|
67 |
*/
|
68 |
public function execute() {
|
69 |
$task = WDWLibrary::get('task');
|
70 |
-
$id =
|
71 |
if ($task != 'display' && method_exists($this, $task)) {
|
72 |
if ($task != 'edit') {
|
73 |
check_admin_referer(BWG()->nonce, BWG()->nonce);
|
74 |
}
|
75 |
-
$action = WDWLibrary::get('bulk_action'
|
76 |
-
if ($action !=
|
77 |
$this->bulk_action($action);
|
78 |
}
|
79 |
else {
|
@@ -102,14 +102,14 @@ class AlbumsController_bwg {
|
|
102 |
$params['orderby'] = 'id';
|
103 |
}
|
104 |
$params['items_per_page'] = $this->items_per_page;
|
105 |
-
$page =
|
106 |
if ( $page < 0 ) {
|
107 |
$page = 1;
|
108 |
}
|
109 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
110 |
$params['paged'] = $page;
|
111 |
$params['page_num'] = $page_num;
|
112 |
-
$params['search'] = WDWLibrary::get('s'
|
113 |
|
114 |
$params['total'] = $this->model->total($params);
|
115 |
$params['rows'] = $this->model->get_rows_data($params);
|
@@ -136,8 +136,8 @@ class AlbumsController_bwg {
|
|
136 |
$successfully_updated = 0;
|
137 |
$url_arg = array('page' => $this->page, 'task' => 'display');
|
138 |
|
139 |
-
$check = WDWLibrary::get('check'
|
140 |
-
$all = WDWLibrary::get('check_all_items'
|
141 |
$all = ($all == 'on' ? TRUE : FALSE);
|
142 |
|
143 |
if (method_exists($this, $task)) {
|
67 |
*/
|
68 |
public function execute() {
|
69 |
$task = WDWLibrary::get('task');
|
70 |
+
$id = WDWLibrary::get('current_id', 0, 'intval');
|
71 |
if ($task != 'display' && method_exists($this, $task)) {
|
72 |
if ($task != 'edit') {
|
73 |
check_admin_referer(BWG()->nonce, BWG()->nonce);
|
74 |
}
|
75 |
+
$action = WDWLibrary::get('bulk_action');
|
76 |
+
if ($action != '') {
|
77 |
$this->bulk_action($action);
|
78 |
}
|
79 |
else {
|
102 |
$params['orderby'] = 'id';
|
103 |
}
|
104 |
$params['items_per_page'] = $this->items_per_page;
|
105 |
+
$page = WDWLibrary::get('paged', 1, 'intval');
|
106 |
if ( $page < 0 ) {
|
107 |
$page = 1;
|
108 |
}
|
109 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
110 |
$params['paged'] = $page;
|
111 |
$params['page_num'] = $page_num;
|
112 |
+
$params['search'] = WDWLibrary::get('s');
|
113 |
|
114 |
$params['total'] = $this->model->total($params);
|
115 |
$params['rows'] = $this->model->get_rows_data($params);
|
136 |
$successfully_updated = 0;
|
137 |
$url_arg = array('page' => $this->page, 'task' => 'display');
|
138 |
|
139 |
+
$check = WDWLibrary::get('check');
|
140 |
+
$all = WDWLibrary::get('check_all_items');
|
141 |
$all = ($all == 'on' ? TRUE : FALSE);
|
142 |
|
143 |
if (method_exists($this, $task)) {
|
admin/controllers/Albumsgalleries.php
CHANGED
@@ -58,10 +58,10 @@ class AlbumsgalleriesController_bwg {
|
|
58 |
$params['orderby'] = 'is_album';
|
59 |
}
|
60 |
$params['items_per_page'] = $this->items_per_page;
|
61 |
-
$page =
|
62 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
63 |
$params['page_num'] = $page_num;
|
64 |
-
$params['search'] = WDWLibrary::get('s'
|
65 |
|
66 |
$params['rows'] = $this->model->get_rows_data($params);
|
67 |
$params['total'] = $this->model->total($params);
|
58 |
$params['orderby'] = 'is_album';
|
59 |
}
|
60 |
$params['items_per_page'] = $this->items_per_page;
|
61 |
+
$page = WDWLibrary::get('paged', 1, 'intval');
|
62 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
63 |
$params['page_num'] = $page_num;
|
64 |
+
$params['search'] = WDWLibrary::get('s');
|
65 |
|
66 |
$params['rows'] = $this->model->get_rows_data($params);
|
67 |
$params['total'] = $this->model->total($params);
|
admin/controllers/Galleries.php
CHANGED
@@ -61,17 +61,17 @@ class GalleriesController_bwg {
|
|
61 |
*/
|
62 |
public function execute() {
|
63 |
$task = WDWLibrary::get('task');
|
64 |
-
$id =
|
65 |
if ( $task != 'display' && method_exists($this, $task) ) {
|
66 |
if ( $task != 'edit' ) {
|
67 |
check_admin_referer(BWG()->nonce, BWG()->nonce);
|
68 |
}
|
69 |
-
$action = WDWLibrary::get('bulk_action', -1);
|
70 |
-
$image_action = WDWLibrary::get('image_bulk_action', -1);
|
71 |
-
if ( $action != -1 ) {
|
72 |
$this->bulk_action($action);
|
73 |
}
|
74 |
-
elseif ( $image_action != -1 ) {
|
75 |
$this->image_bulk_action($image_action);
|
76 |
}
|
77 |
else {
|
@@ -100,14 +100,14 @@ class GalleriesController_bwg {
|
|
100 |
$params['orderby'] = 'order';
|
101 |
}
|
102 |
$params['items_per_page'] = $this->items_per_page;
|
103 |
-
$page =
|
104 |
if ( $page < 0 ) {
|
105 |
$page = 1;
|
106 |
}
|
107 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
108 |
$params['paged'] = $page;
|
109 |
$params['page_num'] = $page_num;
|
110 |
-
$params['search'] = WDWLibrary::get('s'
|
111 |
|
112 |
$params['total'] = $this->model->total($params);
|
113 |
$params['rows'] = $this->model->get_rows_data($params);
|
@@ -141,8 +141,8 @@ class GalleriesController_bwg {
|
|
141 |
$message = 0;
|
142 |
$successfully_updated = 0;
|
143 |
$url_arg = array('page' => $this->page,'task' => 'display');
|
144 |
-
$check = WDWLibrary::get('check'
|
145 |
-
$all = WDWLibrary::get('check_all_items'
|
146 |
$all = ($all == 'on' ? TRUE : FALSE);
|
147 |
|
148 |
if ( method_exists($this, $task) ) {
|
@@ -168,7 +168,7 @@ class GalleriesController_bwg {
|
|
168 |
}
|
169 |
}
|
170 |
|
171 |
-
|
172 |
}
|
173 |
|
174 |
/**
|
@@ -327,13 +327,13 @@ class GalleriesController_bwg {
|
|
327 |
$params['order'] = $order_by[1];
|
328 |
$params['orderby'] = $order_by[0];
|
329 |
$params['items_per_page'] = $this->items_per_page;
|
330 |
-
$page =
|
331 |
if ( $page < 0 ) {
|
332 |
$page = 1;
|
333 |
}
|
334 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
335 |
$params['page_num'] = $page_num;
|
336 |
-
$params['search'] = WDWLibrary::get('s'
|
337 |
$params['message'] = $message;
|
338 |
$params['total'] = $this->model->image_total($id, $params);
|
339 |
$params['rows'] = $this->model->get_image_rows_data($id, $params);
|
@@ -357,13 +357,12 @@ class GalleriesController_bwg {
|
|
357 |
*/
|
358 |
public function save( $id = 0, $all = FALSE ) {
|
359 |
$data = $this->model->save();
|
360 |
-
|
361 |
$message = array('gallery_message' => $data['saved'], 'image_message' => '');
|
362 |
|
363 |
-
$ajax_task = WDWLibrary::get('ajax_task'
|
364 |
if ( $ajax_task !== '' ) {
|
365 |
if ( method_exists($this->model, $ajax_task) ) {
|
366 |
-
$image_id = WDWLibrary::get('image_current_id', 0);
|
367 |
$message['image_message'] = $this->model->$ajax_task($image_id, $data['id'], $all);
|
368 |
}
|
369 |
}
|
@@ -385,7 +384,7 @@ class GalleriesController_bwg {
|
|
385 |
|
386 |
public function check_pricelist() {
|
387 |
global $wpdb;
|
388 |
-
$gallery_id =
|
389 |
$not_set_items = array();
|
390 |
if ( $gallery_id ) {
|
391 |
$rows = $wpdb->get_results('SELECT T_IMAGES.thumb_url, T_PRICELISTS.item_longest_dimension, T_IMAGES.id FROM ' . $wpdb->prefix . 'bwg_image AS T_IMAGES LEFT JOIN ( SELECT MAX(item_longest_dimension) AS item_longest_dimension, pricelist_id FROM ' . $wpdb->prefix . 'wdpg_ecommerce_pricelist_items AS T_PRICELIST_ITEMS LEFT JOIN ' . $wpdb->prefix . 'wdpg_ecommerce_pricelists AS T_PRICELISTS ON T_PRICELIST_ITEMS.pricelist_id = T_PRICELISTS.id WHERE T_PRICELISTS.sections LIKE "%downloads%" GROUP BY pricelist_id) AS T_PRICELISTS ON T_IMAGES.pricelist_id = T_PRICELISTS.pricelist_id WHERE T_IMAGES.gallery_id="' . $gallery_id . '"');
|
61 |
*/
|
62 |
public function execute() {
|
63 |
$task = WDWLibrary::get('task');
|
64 |
+
$id = WDWLibrary::get('current_id', 0, 'intval');
|
65 |
if ( $task != 'display' && method_exists($this, $task) ) {
|
66 |
if ( $task != 'edit' ) {
|
67 |
check_admin_referer(BWG()->nonce, BWG()->nonce);
|
68 |
}
|
69 |
+
$action = WDWLibrary::get('bulk_action', '-1');
|
70 |
+
$image_action = WDWLibrary::get('image_bulk_action', '-1');
|
71 |
+
if ( $action != '-1' ) {
|
72 |
$this->bulk_action($action);
|
73 |
}
|
74 |
+
elseif ( $image_action != '-1' ) {
|
75 |
$this->image_bulk_action($image_action);
|
76 |
}
|
77 |
else {
|
100 |
$params['orderby'] = 'order';
|
101 |
}
|
102 |
$params['items_per_page'] = $this->items_per_page;
|
103 |
+
$page = WDWLibrary::get('paged', 1, 'intval');
|
104 |
if ( $page < 0 ) {
|
105 |
$page = 1;
|
106 |
}
|
107 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
108 |
$params['paged'] = $page;
|
109 |
$params['page_num'] = $page_num;
|
110 |
+
$params['search'] = WDWLibrary::get('s');
|
111 |
|
112 |
$params['total'] = $this->model->total($params);
|
113 |
$params['rows'] = $this->model->get_rows_data($params);
|
141 |
$message = 0;
|
142 |
$successfully_updated = 0;
|
143 |
$url_arg = array('page' => $this->page,'task' => 'display');
|
144 |
+
$check = WDWLibrary::get('check');
|
145 |
+
$all = WDWLibrary::get('check_all_items');
|
146 |
$all = ($all == 'on' ? TRUE : FALSE);
|
147 |
|
148 |
if ( method_exists($this, $task) ) {
|
168 |
}
|
169 |
}
|
170 |
|
171 |
+
WDWLibrary::redirect(add_query_arg($url_arg, admin_url('admin.php')));
|
172 |
}
|
173 |
|
174 |
/**
|
327 |
$params['order'] = $order_by[1];
|
328 |
$params['orderby'] = $order_by[0];
|
329 |
$params['items_per_page'] = $this->items_per_page;
|
330 |
+
$page = WDWLibrary::get('paged', 1, 'intval');
|
331 |
if ( $page < 0 ) {
|
332 |
$page = 1;
|
333 |
}
|
334 |
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
335 |
$params['page_num'] = $page_num;
|
336 |
+
$params['search'] = WDWLibrary::get('s');
|
337 |
$params['message'] = $message;
|
338 |
$params['total'] = $this->model->image_total($id, $params);
|
339 |
$params['rows'] = $this->model->get_image_rows_data($id, $params);
|
357 |
*/
|
358 |
public function save( $id = 0, $all = FALSE ) {
|
359 |
$data = $this->model->save();
|
|
|
360 |
$message = array('gallery_message' => $data['saved'], 'image_message' => '');
|
361 |
|
362 |
+
$ajax_task = WDWLibrary::get('ajax_task');
|
363 |
if ( $ajax_task !== '' ) {
|
364 |
if ( method_exists($this->model, $ajax_task) ) {
|
365 |
+
$image_id = WDWLibrary::get('image_current_id', 0, 'intval');
|
366 |
$message['image_message'] = $this->model->$ajax_task($image_id, $data['id'], $all);
|
367 |
}
|
368 |
}
|
384 |
|
385 |
public function check_pricelist() {
|
386 |
global $wpdb;
|
387 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
388 |
$not_set_items = array();
|
389 |
if ( $gallery_id ) {
|
390 |
$rows = $wpdb->get_results('SELECT T_IMAGES.thumb_url, T_PRICELISTS.item_longest_dimension, T_IMAGES.id FROM ' . $wpdb->prefix . 'bwg_image AS T_IMAGES LEFT JOIN ( SELECT MAX(item_longest_dimension) AS item_longest_dimension, pricelist_id FROM ' . $wpdb->prefix . 'wdpg_ecommerce_pricelist_items AS T_PRICELIST_ITEMS LEFT JOIN ' . $wpdb->prefix . 'wdpg_ecommerce_pricelists AS T_PRICELISTS ON T_PRICELIST_ITEMS.pricelist_id = T_PRICELISTS.id WHERE T_PRICELISTS.sections LIKE "%downloads%" GROUP BY pricelist_id) AS T_PRICELISTS ON T_IMAGES.pricelist_id = T_PRICELISTS.pricelist_id WHERE T_IMAGES.gallery_id="' . $gallery_id . '"');
|
admin/controllers/Options.php
CHANGED
@@ -8,11 +8,11 @@ class OptionsController_bwg {
|
|
8 |
public function __construct() {
|
9 |
$this->model = new OptionsModel_bwg();
|
10 |
$this->view = new OptionsView_bwg();
|
11 |
-
$this->page = WDWLibrary::get('page'
|
12 |
}
|
13 |
|
14 |
public function execute() {
|
15 |
-
$task = WDWLibrary::get('task'
|
16 |
if($task != ''){
|
17 |
check_admin_referer(BWG()->nonce, BWG()->nonce);
|
18 |
}
|
@@ -47,8 +47,8 @@ class OptionsController_bwg {
|
|
47 |
);
|
48 |
$params['page_title'] = __('Edit options', BWG()->prefix);
|
49 |
$params['active_tab'] = WDWLibrary::get('active_tab', 0, 'intval');
|
50 |
-
$params['gallery_type'] = WDWLibrary::get('gallery_type', 'thumbnails'
|
51 |
-
$params['album_type'] = WDWLibrary::get('album_type', 'album_compact_preview'
|
52 |
$params['gallery_types_name'] = array(
|
53 |
'thumbnails' => __('Thumbnails', BWG()->prefix),
|
54 |
'thumbnails_masonry' => __('Masonry', BWG()->prefix),
|
@@ -80,7 +80,7 @@ class OptionsController_bwg {
|
|
80 |
public function display($params = array()) {
|
81 |
$row = new WD_BWG_Options();
|
82 |
// Set Instagram access token.
|
83 |
-
$instagram_access_token = WDWLibrary::get('access_token'
|
84 |
if ( $instagram_access_token ) {
|
85 |
ob_end_clean();
|
86 |
$success = $this->model->set_instagram_access_token($instagram_access_token);
|
@@ -151,12 +151,12 @@ class OptionsController_bwg {
|
|
151 |
|
152 |
public function save_db() {
|
153 |
$row = new WD_BWG_Options();
|
154 |
-
if ( WDWLibrary::get('old_images_directory'
|
155 |
-
$row->old_images_directory = WDWLibrary::get('old_images_directory'
|
156 |
}
|
157 |
|
158 |
-
if ( WDWLibrary::get('images_directory'
|
159 |
-
$row->images_directory = WDWLibrary::get('images_directory'
|
160 |
if (!is_dir(ABSPATH . $row->images_directory) || (is_dir(ABSPATH . $row->images_directory . '/photo-gallery') && $row->old_images_directory && $row->old_images_directory != $row->images_directory)) {
|
161 |
if (!is_dir(ABSPATH . $row->images_directory)) {
|
162 |
echo WDWLibrary::message_id(0, __('Uploads directory doesn\'t exist. Old value is restored.', BWG()->prefix), 'error');
|
@@ -179,18 +179,18 @@ class OptionsController_bwg {
|
|
179 |
|
180 |
foreach ($row as $name => $value) {
|
181 |
if ($name == 'autoupdate_interval') {
|
182 |
-
$autoupdate_interval_hour = WDWLibrary::get('autoupdate_interval_hour',
|
183 |
-
$autoupdate_interval_min = WDWLibrary::get('autoupdate_interval_min','', 'intval');
|
184 |
$autoupdate_interval = ($autoupdate_interval_hour != '' && $autoupdate_interval_min != '' ? ($autoupdate_interval_hour * 60 + $autoupdate_interval_min) : null);
|
185 |
/*minimum autoupdate interval is 1 min*/
|
186 |
$row->autoupdate_interval = isset($autoupdate_interval) && $autoupdate_interval >= 1 ? $autoupdate_interval : 30;
|
187 |
}
|
188 |
else if ( $name != 'images_directory' ) {
|
189 |
-
$row->$name = WDWLibrary::get($name, $row->$name
|
190 |
}
|
191 |
}
|
192 |
$save = update_option('wd_bwg_options', json_encode($row), 'no');
|
193 |
-
if ( WDWLibrary::get('recreate'
|
194 |
$this->resize_image_thumb();
|
195 |
echo WDWLibrary::message_id(0, __('All thumbnails are successfully recreated.', BWG()->prefix));
|
196 |
}
|
@@ -221,28 +221,27 @@ class OptionsController_bwg {
|
|
221 |
}
|
222 |
|
223 |
public function image_set_watermark($params = array()) {
|
224 |
-
|
225 |
-
|
226 |
/* Update options only first time of the loop */
|
227 |
if ( $limitstart == 0 ) {
|
228 |
$update_options = array(
|
229 |
-
'built_in_watermark_type' => WDWLibrary::get('built_in_watermark_type'
|
230 |
-
'built_in_watermark_position' => WDWLibrary::get('built_in_watermark_position'
|
231 |
);
|
232 |
if ( $update_options['built_in_watermark_type'] == 'text' ){
|
233 |
-
$update_options['built_in_watermark_text'] = WDWLibrary::get('built_in_watermark_text'
|
234 |
-
$update_options['built_in_watermark_font_size'] = WDWLibrary::get('built_in_watermark_font_size',
|
235 |
-
$update_options['built_in_watermark_font'] = WDWLibrary::get('built_in_watermark_font'
|
236 |
-
$update_options['built_in_watermark_color'] = WDWLibrary::get('built_in_watermark_color'
|
237 |
}
|
238 |
else {
|
239 |
-
$update_options['built_in_watermark_size'] = WDWLibrary::get('built_in_watermark_size',
|
240 |
$update_options['built_in_watermark_url'] = WDWLibrary::get('built_in_watermark_url', '', 'esc_url');
|
241 |
}
|
242 |
$this->model->update_options_by_key( $update_options );
|
243 |
}
|
244 |
|
245 |
-
|
246 |
if ( ini_get('allow_url_fopen') == 0 ) {
|
247 |
$error = true;
|
248 |
$message = WDWLibrary::message_id(0, __('http:// wrapper is disabled in the server configuration by allow_url_fopen=0.', $this->prefix), 'error');
|
@@ -263,15 +262,15 @@ class OptionsController_bwg {
|
|
263 |
}
|
264 |
|
265 |
public function image_recover_all($params = array()) {
|
266 |
-
$limitstart = WDWLibrary::get('limitstart',
|
267 |
WDWLibrary::bwg_image_recover_all(0, $limitstart);
|
268 |
}
|
269 |
|
270 |
public function resize_image_thumb($params = array()) {
|
271 |
global $wpdb;
|
272 |
-
$max_width = WDWLibrary::get('img_option_width',
|
273 |
-
$max_height = WDWLibrary::get('img_option_height',
|
274 |
-
$limitstart = WDWLibrary::get('limitstart',
|
275 |
|
276 |
/* Update options only first time of the loop */
|
277 |
if ( $limitstart == 0 ) {
|
8 |
public function __construct() {
|
9 |
$this->model = new OptionsModel_bwg();
|
10 |
$this->view = new OptionsView_bwg();
|
11 |
+
$this->page = WDWLibrary::get('page');
|
12 |
}
|
13 |
|
14 |
public function execute() {
|
15 |
+
$task = WDWLibrary::get('task');
|
16 |
if($task != ''){
|
17 |
check_admin_referer(BWG()->nonce, BWG()->nonce);
|
18 |
}
|
47 |
);
|
48 |
$params['page_title'] = __('Edit options', BWG()->prefix);
|
49 |
$params['active_tab'] = WDWLibrary::get('active_tab', 0, 'intval');
|
50 |
+
$params['gallery_type'] = WDWLibrary::get('gallery_type', 'thumbnails');
|
51 |
+
$params['album_type'] = WDWLibrary::get('album_type', 'album_compact_preview');
|
52 |
$params['gallery_types_name'] = array(
|
53 |
'thumbnails' => __('Thumbnails', BWG()->prefix),
|
54 |
'thumbnails_masonry' => __('Masonry', BWG()->prefix),
|
80 |
public function display($params = array()) {
|
81 |
$row = new WD_BWG_Options();
|
82 |
// Set Instagram access token.
|
83 |
+
$instagram_access_token = WDWLibrary::get('access_token');
|
84 |
if ( $instagram_access_token ) {
|
85 |
ob_end_clean();
|
86 |
$success = $this->model->set_instagram_access_token($instagram_access_token);
|
151 |
|
152 |
public function save_db() {
|
153 |
$row = new WD_BWG_Options();
|
154 |
+
if ( WDWLibrary::get('old_images_directory') ) {
|
155 |
+
$row->old_images_directory = WDWLibrary::get('old_images_directory');
|
156 |
}
|
157 |
|
158 |
+
if ( WDWLibrary::get('images_directory') ) {
|
159 |
+
$row->images_directory = WDWLibrary::get('images_directory');
|
160 |
if (!is_dir(ABSPATH . $row->images_directory) || (is_dir(ABSPATH . $row->images_directory . '/photo-gallery') && $row->old_images_directory && $row->old_images_directory != $row->images_directory)) {
|
161 |
if (!is_dir(ABSPATH . $row->images_directory)) {
|
162 |
echo WDWLibrary::message_id(0, __('Uploads directory doesn\'t exist. Old value is restored.', BWG()->prefix), 'error');
|
179 |
|
180 |
foreach ($row as $name => $value) {
|
181 |
if ($name == 'autoupdate_interval') {
|
182 |
+
$autoupdate_interval_hour = WDWLibrary::get('autoupdate_interval_hour', 1, 'intval');
|
183 |
+
$autoupdate_interval_min = WDWLibrary::get('autoupdate_interval_min', '', 'intval');
|
184 |
$autoupdate_interval = ($autoupdate_interval_hour != '' && $autoupdate_interval_min != '' ? ($autoupdate_interval_hour * 60 + $autoupdate_interval_min) : null);
|
185 |
/*minimum autoupdate interval is 1 min*/
|
186 |
$row->autoupdate_interval = isset($autoupdate_interval) && $autoupdate_interval >= 1 ? $autoupdate_interval : 30;
|
187 |
}
|
188 |
else if ( $name != 'images_directory' ) {
|
189 |
+
$row->$name = WDWLibrary::get($name, $row->$name);
|
190 |
}
|
191 |
}
|
192 |
$save = update_option('wd_bwg_options', json_encode($row), 'no');
|
193 |
+
if ( WDWLibrary::get('recreate') == "resize_image_thumb" ) {
|
194 |
$this->resize_image_thumb();
|
195 |
echo WDWLibrary::message_id(0, __('All thumbnails are successfully recreated.', BWG()->prefix));
|
196 |
}
|
221 |
}
|
222 |
|
223 |
public function image_set_watermark($params = array()) {
|
224 |
+
$limitstart = WDWLibrary::get('limitstart', 0, 'intval');
|
|
|
225 |
/* Update options only first time of the loop */
|
226 |
if ( $limitstart == 0 ) {
|
227 |
$update_options = array(
|
228 |
+
'built_in_watermark_type' => WDWLibrary::get('built_in_watermark_type'),
|
229 |
+
'built_in_watermark_position' => WDWLibrary::get('built_in_watermark_position')
|
230 |
);
|
231 |
if ( $update_options['built_in_watermark_type'] == 'text' ){
|
232 |
+
$update_options['built_in_watermark_text'] = WDWLibrary::get('built_in_watermark_text');
|
233 |
+
$update_options['built_in_watermark_font_size'] = WDWLibrary::get('built_in_watermark_font_size', 20, 'intval');
|
234 |
+
$update_options['built_in_watermark_font'] = WDWLibrary::get('built_in_watermark_font');
|
235 |
+
$update_options['built_in_watermark_color'] = WDWLibrary::get('built_in_watermark_color');
|
236 |
}
|
237 |
else {
|
238 |
+
$update_options['built_in_watermark_size'] = WDWLibrary::get('built_in_watermark_size', 20, 'intval');
|
239 |
$update_options['built_in_watermark_url'] = WDWLibrary::get('built_in_watermark_url', '', 'esc_url');
|
240 |
}
|
241 |
$this->model->update_options_by_key( $update_options );
|
242 |
}
|
243 |
|
244 |
+
$error = false;
|
245 |
if ( ini_get('allow_url_fopen') == 0 ) {
|
246 |
$error = true;
|
247 |
$message = WDWLibrary::message_id(0, __('http:// wrapper is disabled in the server configuration by allow_url_fopen=0.', $this->prefix), 'error');
|
262 |
}
|
263 |
|
264 |
public function image_recover_all($params = array()) {
|
265 |
+
$limitstart = WDWLibrary::get('limitstart', 0, 'intval');
|
266 |
WDWLibrary::bwg_image_recover_all(0, $limitstart);
|
267 |
}
|
268 |
|
269 |
public function resize_image_thumb($params = array()) {
|
270 |
global $wpdb;
|
271 |
+
$max_width = WDWLibrary::get('img_option_width', 500, 'intval');
|
272 |
+
$max_height = WDWLibrary::get('img_option_height', 500, 'intval');
|
273 |
+
$limitstart = WDWLibrary::get('limitstart', 0, 'intval');
|
274 |
|
275 |
/* Update options only first time of the loop */
|
276 |
if ( $limitstart == 0 ) {
|
admin/controllers/Shortcode.php
CHANGED
@@ -6,7 +6,7 @@ class ShortcodeController_bwg {
|
|
6 |
$this->model = new ShortcodeModel_bwg();
|
7 |
$this->view = new ShortcodeView_bwg();
|
8 |
$this->page = WDWLibrary::get('page');
|
9 |
-
$this->from_menu = (
|
10 |
}
|
11 |
|
12 |
public function execute() {
|
@@ -24,9 +24,9 @@ class ShortcodeController_bwg {
|
|
24 |
|
25 |
public function display() {
|
26 |
$params = array();
|
27 |
-
$params['gutenberg_callback'] = WDWLibrary::get('callback'
|
28 |
-
$params['gutenberg_id'] = WDWLibrary::get('edit', 0);
|
29 |
-
$params['elementor_callback'] = WDWLibrary::get('elementor_callback', 0);
|
30 |
$params['from_menu'] = $this->from_menu;
|
31 |
$params['gallery_rows'] = WDWLibrary::get_galleries();
|
32 |
$params['album_rows'] = WDWLibrary::get_gallery_groups();
|
@@ -56,15 +56,12 @@ class ShortcodeController_bwg {
|
|
56 |
|
57 |
public function save() {
|
58 |
global $wpdb;
|
59 |
-
$tagtext = (
|
60 |
-
|
61 |
if ($tagtext) {
|
62 |
/* clear tags */
|
63 |
-
$tagtext = " ".
|
64 |
-
|
65 |
-
$
|
66 |
-
|
67 |
-
$insert = ((isset($_POST['bwg_insert'])) ? (int) esc_html(stripslashes($_POST['bwg_insert'])) : 0);
|
68 |
if (!$insert) {
|
69 |
$wpdb->update($wpdb->prefix . 'bwg_shortcode', array(
|
70 |
'tagtext' => $tagtext
|
6 |
$this->model = new ShortcodeModel_bwg();
|
7 |
$this->view = new ShortcodeView_bwg();
|
8 |
$this->page = WDWLibrary::get('page');
|
9 |
+
$this->from_menu = ($this->page == 'shortcode_' . BWG()->prefix) ? TRUE : FALSE;
|
10 |
}
|
11 |
|
12 |
public function execute() {
|
24 |
|
25 |
public function display() {
|
26 |
$params = array();
|
27 |
+
$params['gutenberg_callback'] = WDWLibrary::get('callback');
|
28 |
+
$params['gutenberg_id'] = WDWLibrary::get('edit', 0, 'intval');
|
29 |
+
$params['elementor_callback'] = WDWLibrary::get('elementor_callback', 0, 'intval');
|
30 |
$params['from_menu'] = $this->from_menu;
|
31 |
$params['gallery_rows'] = WDWLibrary::get_galleries();
|
32 |
$params['album_rows'] = WDWLibrary::get_gallery_groups();
|
56 |
|
57 |
public function save() {
|
58 |
global $wpdb;
|
59 |
+
$tagtext = WDWLibrary::get('tagtext');
|
|
|
60 |
if ($tagtext) {
|
61 |
/* clear tags */
|
62 |
+
$tagtext = " " . $tagtext;
|
63 |
+
$id = WDWLibrary::get('currrent_id', 0, 'intval');
|
64 |
+
$insert = WDWLibrary::get('bwg_insert', 0, 'intval');
|
|
|
|
|
65 |
if (!$insert) {
|
66 |
$wpdb->update($wpdb->prefix . 'bwg_shortcode', array(
|
67 |
'tagtext' => $tagtext
|
admin/models/Albums.php
CHANGED
@@ -269,6 +269,8 @@ class AlbumsModel_bwg {
|
|
269 |
}
|
270 |
$user_data = get_userdata($row->author);
|
271 |
$row->author = ($user_data != FALSE ? $user_data->display_name : '');
|
|
|
|
|
272 |
|
273 |
return $row;
|
274 |
}
|
@@ -288,11 +290,11 @@ class AlbumsModel_bwg {
|
|
288 |
$slug = WDWLibrary::get('slug');
|
289 |
$slug = $this->create_unique_slug((empty($slug) ? $name : $slug), $id);
|
290 |
$old_slug = WDWLibrary::get('old_slug');
|
291 |
-
$published = WDWLibrary::get('published', 0);
|
292 |
-
$preview_image = WDWLibrary::get('preview_image');
|
293 |
-
$description = WDWLibrary::get('description', '',
|
294 |
$albumgallery_ids = WDWLibrary::get('albumgallery_ids');
|
295 |
-
$modified_date = WDWLibrary::get('modified_date', time());
|
296 |
$data = array(
|
297 |
'name' => $name,
|
298 |
'slug' => $slug,
|
269 |
}
|
270 |
$user_data = get_userdata($row->author);
|
271 |
$row->author = ($user_data != FALSE ? $user_data->display_name : '');
|
272 |
+
$row->name = stripslashes(esc_html($row->name));
|
273 |
+
$row->description = stripslashes(esc_html($row->description));
|
274 |
|
275 |
return $row;
|
276 |
}
|
290 |
$slug = WDWLibrary::get('slug');
|
291 |
$slug = $this->create_unique_slug((empty($slug) ? $name : $slug), $id);
|
292 |
$old_slug = WDWLibrary::get('old_slug');
|
293 |
+
$published = WDWLibrary::get('published', 0, 'intval');
|
294 |
+
$preview_image = WDWLibrary::get('preview_image', '', 'esc_url_raw');
|
295 |
+
$description = strip_tags(htmlspecialchars_decode(WDWLibrary::get('description', '', 'wp_filter_post_kses')),"<b>,<p>,<a>,<strong>,<span>");
|
296 |
$albumgallery_ids = WDWLibrary::get('albumgallery_ids');
|
297 |
+
$modified_date = WDWLibrary::get('modified_date', time(),'intval');
|
298 |
$data = array(
|
299 |
'name' => $name,
|
300 |
'slug' => $slug,
|
admin/models/Galleries.php
CHANGED
@@ -231,18 +231,23 @@ class GalleriesModel_bwg {
|
|
231 |
$rows['template']->not_set_items = 0;
|
232 |
$rows['template']->modified_date = '';
|
233 |
|
234 |
-
foreach ( $rows as $value ) {
|
235 |
$value->tags = $this->get_tag_rows_data($value->id);
|
236 |
$value->pure_image_url = $value->image_url;
|
237 |
$value->pure_thumb_url = $value->thumb_url;
|
238 |
$value->image_url = WDWLibrary::image_url_version($value->image_url, $value->modified_date);
|
239 |
$value->thumb_url = WDWLibrary::image_url_version($value->thumb_url, $value->modified_date);
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
241 |
}
|
242 |
else {
|
243 |
$rows = $wpdb->get_var($query);
|
244 |
}
|
245 |
-
|
246 |
return $rows;
|
247 |
}
|
248 |
|
@@ -344,12 +349,12 @@ class GalleriesModel_bwg {
|
|
344 |
*/
|
345 |
public function save_db() {
|
346 |
global $wpdb;
|
347 |
-
$id =
|
348 |
-
$name = $this->bwg_get_unique_name(WDWLibrary::get('name'
|
349 |
$slug = WDWLibrary::get('slug');
|
350 |
$slug = $this->bwg_get_unique_slug((empty($slug) ? $name : $slug), $id);
|
351 |
-
$old_slug = WDWLibrary::get('old_slug'
|
352 |
-
$preview_image = WDWLibrary::get('preview_image'
|
353 |
$random_preview_image = '';
|
354 |
if ( $preview_image == '' ) {
|
355 |
if ( $id != 0 ) {
|
@@ -378,18 +383,18 @@ class GalleriesModel_bwg {
|
|
378 |
$data = array(
|
379 |
'name' => $name,
|
380 |
'slug' => $slug,
|
381 |
-
'description' => WDWLibrary::get('description', '', FALSE),
|
382 |
'page_link' => '',
|
383 |
'preview_image' => $preview_image,
|
384 |
'random_preview_image' => $random_preview_image,
|
385 |
'order' => 0,
|
386 |
'author' => get_current_user_id(),
|
387 |
-
'published' =>
|
388 |
-
'gallery_type' => WDWLibrary::get('gallery_type'
|
389 |
-
'gallery_source' => WDWLibrary::get('gallery_source'
|
390 |
-
'autogallery_image_number' =>
|
391 |
-
'update_flag' => WDWLibrary::get('update_flag'
|
392 |
-
'modified_date' => WDWLibrary::get('modified_date', time() )
|
393 |
);
|
394 |
if ( $id == 0 ) {
|
395 |
$saved = $wpdb->insert($wpdb->prefix . 'bwg_gallery', $data);
|
@@ -429,36 +434,37 @@ class GalleriesModel_bwg {
|
|
429 |
*/
|
430 |
public function save_image_db( $gallery_id = 0, $image_action = '' ) {
|
431 |
global $wpdb;
|
432 |
-
$image_ids = WDWLibrary::get('ids_string'
|
433 |
$image_id_array = explode(',', $image_ids);
|
434 |
$save = TRUE;
|
435 |
$author = get_current_user_id();
|
436 |
$all = WDWLibrary::get('check_all_items', FALSE);
|
437 |
-
$limit = WDWLibrary::get('limit', 0);
|
438 |
$image_message = '';
|
439 |
-
$checked_items_count = WDWLibrary::get('checked_items_count', 0);
|
440 |
foreach ( $image_id_array as $image_id ) {
|
441 |
if ( $image_id ) {
|
442 |
-
$filename = WDWLibrary::get('input_filename_' . $image_id
|
443 |
$image_url = WDWLibrary::get('image_url_' . $image_id, '');
|
444 |
if ( !WDWLibrary::check_external_link($image_url) && !file_exists(html_entity_decode(BWG()->upload_dir . $image_url, ENT_COMPAT | ENT_QUOTES)) ) {
|
445 |
continue;
|
446 |
}
|
447 |
-
$thumb_url = WDWLibrary::get('thumb_url_' . $image_id, '');
|
448 |
$description = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_description_' . $image_id, '', 'wp_filter_post_kses'));
|
|
|
449 |
$alt = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_alt_text_' . $image_id, '', 'wp_filter_post_kses'));
|
450 |
$alt = preg_replace("/<a[^>]*>|<\/a>/", '', $alt);
|
451 |
-
$
|
452 |
-
$
|
453 |
-
$
|
454 |
-
$
|
455 |
-
$
|
|
|
456 |
if( ($resolution_thumb == '' || $resolution_thumb == 'x') && $thumb_url != '' ) {
|
457 |
$resolution_thumb = WDWLibrary::get_thumb_size( $thumb_url );
|
458 |
}
|
459 |
-
$order =
|
460 |
-
$redirect_url = WDWLibrary::get('redirect_url_' . $image_id, '');
|
461 |
-
$tags_ids = WDWLibrary::get('tags_' . $image_id
|
462 |
$data = array(
|
463 |
'gallery_id' => $gallery_id,
|
464 |
'slug' => WDWLibrary::spider_replace4byte($alt),
|
@@ -473,6 +479,7 @@ class GalleriesModel_bwg {
|
|
473 |
'order' => $order,
|
474 |
);
|
475 |
$temp_image_id = $image_id;
|
|
|
476 |
if ( strpos($image_id, 'pr_') !== FALSE ) {
|
477 |
if ( !WDWLibrary::check_external_link($image_url) ) {
|
478 |
$image_url = wp_normalize_path($image_url);
|
@@ -495,14 +502,11 @@ class GalleriesModel_bwg {
|
|
495 |
);
|
496 |
|
497 |
$save = $wpdb->insert($wpdb->prefix . 'bwg_image', $data);
|
498 |
-
$
|
499 |
-
if ( isset($_POST['image_current_id']) && (esc_html($_POST['image_current_id']) == $image_id) ) {
|
500 |
-
$_POST['image_current_id'] = $new_image_id;
|
501 |
-
}
|
502 |
-
$image_id = $new_image_id;
|
503 |
}
|
504 |
else {
|
505 |
-
|
|
|
506 |
unset($data['resolution_thumb']);
|
507 |
}
|
508 |
$save = $wpdb->update($wpdb->prefix . 'bwg_image', $data, array( 'id' => $image_id ));
|
@@ -547,6 +551,7 @@ class GalleriesModel_bwg {
|
|
547 |
}
|
548 |
}
|
549 |
}
|
|
|
550 |
if ( !$all
|
551 |
&& $image_action
|
552 |
&& method_exists($this, $image_action)
|
@@ -555,6 +560,7 @@ class GalleriesModel_bwg {
|
|
555 |
}
|
556 |
}
|
557 |
}
|
|
|
558 |
if ( !in_array($image_message, WDWLibrary::error_message_ids()) && $image_action && $checked_items_count ) {
|
559 |
$actions = WDWLibrary::image_actions();
|
560 |
$image_message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $checked_items_count, BWG()->prefix), $checked_items_count, $actions[$image_action]['bulk_action']);
|
@@ -647,11 +653,11 @@ class GalleriesModel_bwg {
|
|
647 |
public function image_delete( $id, $gallery_id = 0, $all = FALSE ) {
|
648 |
global $wpdb;
|
649 |
if ( $gallery_id == 0 ) {
|
650 |
-
$gallery_id =
|
651 |
}
|
652 |
$where = 'WHERE gallery_id=' . $gallery_id;
|
653 |
$where .= ($all ? '' : ' AND id=' . $id);
|
654 |
-
$search = WDWLibrary::get('s'
|
655 |
if ( $search ) {
|
656 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
657 |
}
|
@@ -704,11 +710,11 @@ class GalleriesModel_bwg {
|
|
704 |
public function image_publish( $id, $gallery_id = 0, $all = FALSE ) {
|
705 |
global $wpdb;
|
706 |
if ( $gallery_id == 0 ) {
|
707 |
-
$gallery_id =
|
708 |
}
|
709 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
710 |
$where .= ($all ? '' : ' AND id=' . $id);
|
711 |
-
$search = WDWLibrary::get('s'
|
712 |
if ( $search ) {
|
713 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
714 |
}
|
@@ -733,11 +739,11 @@ class GalleriesModel_bwg {
|
|
733 |
public function image_unpublish( $id, $gallery_id = 0, $all = FALSE ) {
|
734 |
global $wpdb;
|
735 |
if ( $gallery_id == 0 ) {
|
736 |
-
$gallery_id =
|
737 |
}
|
738 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
739 |
$where .= ($all ? '' : ' AND id=' . $id);
|
740 |
-
$search = WDWLibrary::get('s'
|
741 |
if ( $search ) {
|
742 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
743 |
}
|
@@ -762,9 +768,9 @@ class GalleriesModel_bwg {
|
|
762 |
public function image_reset( $id, $gallery_id = 0, $all = FALSE ) {
|
763 |
if ( $all ) {
|
764 |
if ( $gallery_id == 0 ) {
|
765 |
-
$gallery_id =
|
766 |
}
|
767 |
-
$limit = WDWLibrary::get('limit', 0);
|
768 |
WDWLibrary::bwg_image_recover_all($gallery_id, $limit);
|
769 |
}
|
770 |
else {
|
@@ -801,9 +807,9 @@ class GalleriesModel_bwg {
|
|
801 |
}
|
802 |
else {
|
803 |
if ( $gallery_id == 0 ) {
|
804 |
-
$gallery_id =
|
805 |
}
|
806 |
-
$limit = WDWLibrary::get('limit', 0);
|
807 |
$message_id = WDWLibrary::bwg_image_set_watermark($gallery_id, ($all ? 0 : $id), $limit);
|
808 |
}
|
809 |
}
|
@@ -851,10 +857,10 @@ class GalleriesModel_bwg {
|
|
851 |
global $wpdb;
|
852 |
$image_id = ($all ? 0 : $id);
|
853 |
if ( $gallery_id == 0 ) {
|
854 |
-
$gallery_id =
|
855 |
}
|
856 |
$where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ($image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
|
857 |
-
$search = WDWLibrary::get('s'
|
858 |
if ( $search ) {
|
859 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
860 |
}
|
@@ -949,11 +955,11 @@ class GalleriesModel_bwg {
|
|
949 |
$image_id = ($all ? 0 : $id);
|
950 |
global $wpdb;
|
951 |
if ( $gallery_id == 0 ) {
|
952 |
-
$gallery_id =
|
953 |
}
|
954 |
$where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ( $image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
|
955 |
$img_ids = $wpdb->get_results( 'SELECT id, thumb_url FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where );
|
956 |
-
$search = WDWLibrary::get('s'
|
957 |
if ( $search ) {
|
958 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
959 |
}
|
@@ -986,13 +992,13 @@ class GalleriesModel_bwg {
|
|
986 |
$image_id = ($all ? 0 : $id);
|
987 |
global $wpdb;
|
988 |
if ( $gallery_id == 0 ) {
|
989 |
-
$gallery_id =
|
990 |
}
|
991 |
-
$image_width =
|
992 |
-
$image_height =
|
993 |
-
|
994 |
$where .= ($all ? '' : ' AND id=' . $id);
|
995 |
-
$search = WDWLibrary::get('s'
|
996 |
if ( $search ) {
|
997 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
998 |
}
|
@@ -1023,17 +1029,17 @@ class GalleriesModel_bwg {
|
|
1023 |
*/
|
1024 |
public function image_edit($id, $gallery_id = 0, $all = FALSE) {
|
1025 |
if ( $gallery_id == 0 ) {
|
1026 |
-
$gallery_id =
|
1027 |
}
|
1028 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1029 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1030 |
-
$search = WDWLibrary::get('s'
|
1031 |
if ( $search ) {
|
1032 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1033 |
}
|
1034 |
-
$title = WDWLibrary::get('title'
|
1035 |
-
$desc = WDWLibrary::get('desc'
|
1036 |
-
$redirecturl = WDWLibrary::get('redirecturl', '');
|
1037 |
global $wpdb;
|
1038 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1039 |
'alt' => $title,
|
@@ -1059,15 +1065,15 @@ class GalleriesModel_bwg {
|
|
1059 |
*/
|
1060 |
public function image_edit_alt( $id, $gallery_id = 0, $all = FALSE ) {
|
1061 |
if ( $gallery_id == 0 ) {
|
1062 |
-
$gallery_id =
|
1063 |
}
|
1064 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1065 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1066 |
-
$search = WDWLibrary::get('s'
|
1067 |
if ( $search ) {
|
1068 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1069 |
}
|
1070 |
-
$title = WDWLibrary::get('title'
|
1071 |
global $wpdb;
|
1072 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1073 |
'alt' => $title
|
@@ -1091,15 +1097,15 @@ class GalleriesModel_bwg {
|
|
1091 |
*/
|
1092 |
public function image_edit_description( $id, $gallery_id = 0, $all = FALSE ) {
|
1093 |
if ( $gallery_id == 0 ) {
|
1094 |
-
$gallery_id =
|
1095 |
}
|
1096 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1097 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1098 |
-
$search = WDWLibrary::get('s'
|
1099 |
if ( $search ) {
|
1100 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1101 |
}
|
1102 |
-
$desc = WDWLibrary::get('desc'
|
1103 |
global $wpdb;
|
1104 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1105 |
'description' => $desc,
|
@@ -1123,15 +1129,15 @@ class GalleriesModel_bwg {
|
|
1123 |
*/
|
1124 |
public function image_edit_redirect( $id, $gallery_id = 0, $all = FALSE ) {
|
1125 |
if ( $gallery_id == 0 ) {
|
1126 |
-
$gallery_id =
|
1127 |
}
|
1128 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1129 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1130 |
-
$search = WDWLibrary::get('s'
|
1131 |
if ( $search ) {
|
1132 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1133 |
}
|
1134 |
-
$redirecturl = WDWLibrary::get('redirecturl', '');
|
1135 |
global $wpdb;
|
1136 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1137 |
'redirect_url' => $redirecturl,
|
@@ -1146,15 +1152,15 @@ class GalleriesModel_bwg {
|
|
1146 |
|
1147 |
public function image_add_tag($id, $gallery_id = 0, $all = FALSE) {
|
1148 |
if ( $gallery_id == 0 ) {
|
1149 |
-
$gallery_id =
|
1150 |
}
|
1151 |
-
$tag_ids = WDWLibrary::get('added_tags_id'
|
1152 |
-
$tag_act = WDWLibrary::get('added_tags_act'
|
1153 |
$tag_ids_array = explode(',', $tag_ids);
|
1154 |
global $wpdb;
|
1155 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1156 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1157 |
-
$search = WDWLibrary::get('s'
|
1158 |
if ( $search ) {
|
1159 |
$where .= ' AND (`alt` LIKE "%' . trim($search) . '%"';
|
1160 |
$where .= ' OR `filename` LIKE "%' . trim($search) . '%"';
|
@@ -1195,23 +1201,24 @@ class GalleriesModel_bwg {
|
|
1195 |
|
1196 |
public function set_image_pricelist($id, $gallery_id = 0, $all = FALSE) {
|
1197 |
global $wpdb;
|
1198 |
-
$pricelist_id =
|
1199 |
$item_longest_dimension = $wpdb->get_var('SELECT MAX(item_longest_dimension) AS item_longest_dimension FROM ' . $wpdb->prefix . 'wdpg_ecommerce_pricelist_items AS T_PRICELIST_ITEMS LEFT JOIN ' . $wpdb->prefix . 'wdpg_ecommerce_pricelists AS T_PRICELISTS ON T_PRICELIST_ITEMS.pricelist_id = T_PRICELISTS.id WHERE T_PRICELIST_ITEMS.pricelist_id="' . $pricelist_id . '" AND T_PRICELISTS.sections LIKE "%downloads%"');
|
1200 |
$not_set_items = array();
|
1201 |
if ($pricelist_id) {
|
1202 |
$image_id = ($all ? 0 : $id);
|
1203 |
if ( $gallery_id == 0 ) {
|
1204 |
-
$gallery_id =
|
1205 |
}
|
1206 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1207 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1208 |
-
$search = WDWLibrary::get('s'
|
1209 |
if ( $search ) {
|
1210 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1211 |
}
|
1212 |
$image_ids_col = $wpdb->get_col('SELECT id FROM `' . $wpdb->prefix . 'bwg_image`' . $where);
|
1213 |
foreach ($image_ids_col as $image_id) {
|
1214 |
-
$
|
|
|
1215 |
WDWLibrary::repair_image_original($file_path);
|
1216 |
list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
|
1217 |
if ($item_longest_dimension > $img_width && $img_width) {
|
@@ -1228,7 +1235,7 @@ class GalleriesModel_bwg {
|
|
1228 |
|
1229 |
public function remove_image_pricelist() {
|
1230 |
global $wpdb;
|
1231 |
-
$image_id =
|
1232 |
if ( $image_id ) {
|
1233 |
$wpdb->update($wpdb->prefix . 'bwg_image', array( 'pricelist_id' => 0 ), array( 'id' => $image_id ));
|
1234 |
}
|
@@ -1237,11 +1244,11 @@ class GalleriesModel_bwg {
|
|
1237 |
public function remove_pricelist_all($id, $gallery_id = 0, $all = FALSE) {
|
1238 |
global $wpdb;
|
1239 |
if ( $gallery_id == 0 ) {
|
1240 |
-
$gallery_id =
|
1241 |
}
|
1242 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1243 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1244 |
-
$search = WDWLibrary::get('s'
|
1245 |
if ( $search ) {
|
1246 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1247 |
}
|
231 |
$rows['template']->not_set_items = 0;
|
232 |
$rows['template']->modified_date = '';
|
233 |
|
234 |
+
foreach ( $rows as $key => $value ) {
|
235 |
$value->tags = $this->get_tag_rows_data($value->id);
|
236 |
$value->pure_image_url = $value->image_url;
|
237 |
$value->pure_thumb_url = $value->thumb_url;
|
238 |
$value->image_url = WDWLibrary::image_url_version($value->image_url, $value->modified_date);
|
239 |
$value->thumb_url = WDWLibrary::image_url_version($value->thumb_url, $value->modified_date);
|
240 |
+
if ( $key != 'template') {
|
241 |
+
$value->pure_image_url = esc_url($value->pure_image_url);
|
242 |
+
$value->pure_thumb_url = esc_url($value->pure_thumb_url);
|
243 |
+
$value->image_url = esc_url($value->image_url);
|
244 |
+
$value->thumb_url = esc_url($value->thumb_url);
|
245 |
+
}
|
246 |
}
|
247 |
}
|
248 |
else {
|
249 |
$rows = $wpdb->get_var($query);
|
250 |
}
|
|
|
251 |
return $rows;
|
252 |
}
|
253 |
|
349 |
*/
|
350 |
public function save_db() {
|
351 |
global $wpdb;
|
352 |
+
$id = WDWLibrary::get('current_id', 0, 'intval', 'POST');
|
353 |
+
$name = $this->bwg_get_unique_name(WDWLibrary::get('name'), $id);
|
354 |
$slug = WDWLibrary::get('slug');
|
355 |
$slug = $this->bwg_get_unique_slug((empty($slug) ? $name : $slug), $id);
|
356 |
+
$old_slug = WDWLibrary::get('old_slug');
|
357 |
+
$preview_image = WDWLibrary::get('preview_image');
|
358 |
$random_preview_image = '';
|
359 |
if ( $preview_image == '' ) {
|
360 |
if ( $id != 0 ) {
|
383 |
$data = array(
|
384 |
'name' => $name,
|
385 |
'slug' => $slug,
|
386 |
+
'description' => strip_tags(htmlspecialchars_decode(WDWLibrary::get('description', '', FALSE)),"<b>,<p>,<a>,<strong>,<span>"),
|
387 |
'page_link' => '',
|
388 |
'preview_image' => $preview_image,
|
389 |
'random_preview_image' => $random_preview_image,
|
390 |
'order' => 0,
|
391 |
'author' => get_current_user_id(),
|
392 |
+
'published' => WDWLibrary::get('published', 1, 'intval'),
|
393 |
+
'gallery_type' => WDWLibrary::get('gallery_type'),
|
394 |
+
'gallery_source' => WDWLibrary::get('gallery_source'),
|
395 |
+
'autogallery_image_number' => WDWLibrary::get('autogallery_image_number', 12, 'intval'),
|
396 |
+
'update_flag' => WDWLibrary::get('update_flag'),
|
397 |
+
'modified_date' => WDWLibrary::get('modified_date', time(), 'intval')
|
398 |
);
|
399 |
if ( $id == 0 ) {
|
400 |
$saved = $wpdb->insert($wpdb->prefix . 'bwg_gallery', $data);
|
434 |
*/
|
435 |
public function save_image_db( $gallery_id = 0, $image_action = '' ) {
|
436 |
global $wpdb;
|
437 |
+
$image_ids = WDWLibrary::get('ids_string');
|
438 |
$image_id_array = explode(',', $image_ids);
|
439 |
$save = TRUE;
|
440 |
$author = get_current_user_id();
|
441 |
$all = WDWLibrary::get('check_all_items', FALSE);
|
|
|
442 |
$image_message = '';
|
443 |
+
$checked_items_count = WDWLibrary::get('checked_items_count', 0, 'intval');
|
444 |
foreach ( $image_id_array as $image_id ) {
|
445 |
if ( $image_id ) {
|
446 |
+
$filename = WDWLibrary::get('input_filename_' . $image_id);
|
447 |
$image_url = WDWLibrary::get('image_url_' . $image_id, '');
|
448 |
if ( !WDWLibrary::check_external_link($image_url) && !file_exists(html_entity_decode(BWG()->upload_dir . $image_url, ENT_COMPAT | ENT_QUOTES)) ) {
|
449 |
continue;
|
450 |
}
|
451 |
+
$thumb_url = WDWLibrary::get('thumb_url_' . $image_id, '', 'esc_url_raw');
|
452 |
$description = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_description_' . $image_id, '', 'wp_filter_post_kses'));
|
453 |
+
$description = strip_tags(htmlspecialchars_decode($description),"<b>,<p>,<a>,<strong>,<span>");
|
454 |
$alt = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_alt_text_' . $image_id, '', 'wp_filter_post_kses'));
|
455 |
$alt = preg_replace("/<a[^>]*>|<\/a>/", '', $alt);
|
456 |
+
$alt = strip_tags(htmlspecialchars_decode($alt),"<b>,<p>,<a>,<strong>,<span>");
|
457 |
+
$date = WDWLibrary::get('input_date_modified_' . $image_id, date('Ymd'));
|
458 |
+
$size = WDWLibrary::get('input_size_' . $image_id);
|
459 |
+
$filetype = WDWLibrary::get('input_filetype_' . $image_id);
|
460 |
+
$resolution = WDWLibrary::get('input_resolution_' . $image_id);
|
461 |
+
$resolution_thumb = WDWLibrary::get('input_resolution_thumb_' . $image_id);
|
462 |
if( ($resolution_thumb == '' || $resolution_thumb == 'x') && $thumb_url != '' ) {
|
463 |
$resolution_thumb = WDWLibrary::get_thumb_size( $thumb_url );
|
464 |
}
|
465 |
+
$order = WDWLibrary::get('order_input_' . $image_id, 0, 'intval');
|
466 |
+
$redirect_url = WDWLibrary::get('redirect_url_' . $image_id, '', 'esc_url_raw');
|
467 |
+
$tags_ids = WDWLibrary::get('tags_' . $image_id);
|
468 |
$data = array(
|
469 |
'gallery_id' => $gallery_id,
|
470 |
'slug' => WDWLibrary::spider_replace4byte($alt),
|
479 |
'order' => $order,
|
480 |
);
|
481 |
$temp_image_id = $image_id;
|
482 |
+
|
483 |
if ( strpos($image_id, 'pr_') !== FALSE ) {
|
484 |
if ( !WDWLibrary::check_external_link($image_url) ) {
|
485 |
$image_url = wp_normalize_path($image_url);
|
502 |
);
|
503 |
|
504 |
$save = $wpdb->insert($wpdb->prefix . 'bwg_image', $data);
|
505 |
+
$image_id = $wpdb->insert_id;
|
|
|
|
|
|
|
|
|
506 |
}
|
507 |
else {
|
508 |
+
|
509 |
+
if( WDWLibrary::get('ajax_task') == 'image_rotate_right' || WDWLibrary::get('ajax_task') == 'image_rotate_left' || $data['resolution_thumb'] == '' ) {
|
510 |
unset($data['resolution_thumb']);
|
511 |
}
|
512 |
$save = $wpdb->update($wpdb->prefix . 'bwg_image', $data, array( 'id' => $image_id ));
|
551 |
}
|
552 |
}
|
553 |
}
|
554 |
+
|
555 |
if ( !$all
|
556 |
&& $image_action
|
557 |
&& method_exists($this, $image_action)
|
560 |
}
|
561 |
}
|
562 |
}
|
563 |
+
|
564 |
if ( !in_array($image_message, WDWLibrary::error_message_ids()) && $image_action && $checked_items_count ) {
|
565 |
$actions = WDWLibrary::image_actions();
|
566 |
$image_message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $checked_items_count, BWG()->prefix), $checked_items_count, $actions[$image_action]['bulk_action']);
|
653 |
public function image_delete( $id, $gallery_id = 0, $all = FALSE ) {
|
654 |
global $wpdb;
|
655 |
if ( $gallery_id == 0 ) {
|
656 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
657 |
}
|
658 |
$where = 'WHERE gallery_id=' . $gallery_id;
|
659 |
$where .= ($all ? '' : ' AND id=' . $id);
|
660 |
+
$search = WDWLibrary::get('s');
|
661 |
if ( $search ) {
|
662 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
663 |
}
|
710 |
public function image_publish( $id, $gallery_id = 0, $all = FALSE ) {
|
711 |
global $wpdb;
|
712 |
if ( $gallery_id == 0 ) {
|
713 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
714 |
}
|
715 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
716 |
$where .= ($all ? '' : ' AND id=' . $id);
|
717 |
+
$search = WDWLibrary::get('s');
|
718 |
if ( $search ) {
|
719 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
720 |
}
|
739 |
public function image_unpublish( $id, $gallery_id = 0, $all = FALSE ) {
|
740 |
global $wpdb;
|
741 |
if ( $gallery_id == 0 ) {
|
742 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
743 |
}
|
744 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
745 |
$where .= ($all ? '' : ' AND id=' . $id);
|
746 |
+
$search = WDWLibrary::get('s');
|
747 |
if ( $search ) {
|
748 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
749 |
}
|
768 |
public function image_reset( $id, $gallery_id = 0, $all = FALSE ) {
|
769 |
if ( $all ) {
|
770 |
if ( $gallery_id == 0 ) {
|
771 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
772 |
}
|
773 |
+
$limit = WDWLibrary::get('limit', 0, 'intval');
|
774 |
WDWLibrary::bwg_image_recover_all($gallery_id, $limit);
|
775 |
}
|
776 |
else {
|
807 |
}
|
808 |
else {
|
809 |
if ( $gallery_id == 0 ) {
|
810 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
811 |
}
|
812 |
+
$limit = WDWLibrary::get('limit', 0, 'intval');
|
813 |
$message_id = WDWLibrary::bwg_image_set_watermark($gallery_id, ($all ? 0 : $id), $limit);
|
814 |
}
|
815 |
}
|
857 |
global $wpdb;
|
858 |
$image_id = ($all ? 0 : $id);
|
859 |
if ( $gallery_id == 0 ) {
|
860 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
861 |
}
|
862 |
$where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ($image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
|
863 |
+
$search = WDWLibrary::get('s');
|
864 |
if ( $search ) {
|
865 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
866 |
}
|
955 |
$image_id = ($all ? 0 : $id);
|
956 |
global $wpdb;
|
957 |
if ( $gallery_id == 0 ) {
|
958 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
959 |
}
|
960 |
$where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ( $image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
|
961 |
$img_ids = $wpdb->get_results( 'SELECT id, thumb_url FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where );
|
962 |
+
$search = WDWLibrary::get('s');
|
963 |
if ( $search ) {
|
964 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
965 |
}
|
992 |
$image_id = ($all ? 0 : $id);
|
993 |
global $wpdb;
|
994 |
if ( $gallery_id == 0 ) {
|
995 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
996 |
}
|
997 |
+
$image_width = WDWLibrary::get('image_width', 1600, 'intval');
|
998 |
+
$image_height = WDWLibrary::get('image_height', 1200, 'intval');
|
999 |
+
$where = ' gallery_id=' . $gallery_id;
|
1000 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1001 |
+
$search = WDWLibrary::get('s');
|
1002 |
if ( $search ) {
|
1003 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1004 |
}
|
1029 |
*/
|
1030 |
public function image_edit($id, $gallery_id = 0, $all = FALSE) {
|
1031 |
if ( $gallery_id == 0 ) {
|
1032 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1033 |
}
|
1034 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1035 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1036 |
+
$search = WDWLibrary::get('s');
|
1037 |
if ( $search ) {
|
1038 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1039 |
}
|
1040 |
+
$title = WDWLibrary::get('title');
|
1041 |
+
$desc = WDWLibrary::get('desc');
|
1042 |
+
$redirecturl = WDWLibrary::get('redirecturl', '', 'esc_url_raw');
|
1043 |
global $wpdb;
|
1044 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1045 |
'alt' => $title,
|
1065 |
*/
|
1066 |
public function image_edit_alt( $id, $gallery_id = 0, $all = FALSE ) {
|
1067 |
if ( $gallery_id == 0 ) {
|
1068 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1069 |
}
|
1070 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1071 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1072 |
+
$search = WDWLibrary::get('s');
|
1073 |
if ( $search ) {
|
1074 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1075 |
}
|
1076 |
+
$title = WDWLibrary::get('title');
|
1077 |
global $wpdb;
|
1078 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1079 |
'alt' => $title
|
1097 |
*/
|
1098 |
public function image_edit_description( $id, $gallery_id = 0, $all = FALSE ) {
|
1099 |
if ( $gallery_id == 0 ) {
|
1100 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1101 |
}
|
1102 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1103 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1104 |
+
$search = WDWLibrary::get('s');
|
1105 |
if ( $search ) {
|
1106 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1107 |
}
|
1108 |
+
$desc = WDWLibrary::get('desc');
|
1109 |
global $wpdb;
|
1110 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1111 |
'description' => $desc,
|
1129 |
*/
|
1130 |
public function image_edit_redirect( $id, $gallery_id = 0, $all = FALSE ) {
|
1131 |
if ( $gallery_id == 0 ) {
|
1132 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1133 |
}
|
1134 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1135 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1136 |
+
$search = WDWLibrary::get('s');
|
1137 |
if ( $search ) {
|
1138 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1139 |
}
|
1140 |
+
$redirecturl = WDWLibrary::get('redirecturl', '', 'esc_url_raw');
|
1141 |
global $wpdb;
|
1142 |
$wpdb->update($wpdb->prefix . 'bwg_image', array(
|
1143 |
'redirect_url' => $redirecturl,
|
1152 |
|
1153 |
public function image_add_tag($id, $gallery_id = 0, $all = FALSE) {
|
1154 |
if ( $gallery_id == 0 ) {
|
1155 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1156 |
}
|
1157 |
+
$tag_ids = WDWLibrary::get('added_tags_id');
|
1158 |
+
$tag_act = WDWLibrary::get('added_tags_act');
|
1159 |
$tag_ids_array = explode(',', $tag_ids);
|
1160 |
global $wpdb;
|
1161 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1162 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1163 |
+
$search = WDWLibrary::get('s');
|
1164 |
if ( $search ) {
|
1165 |
$where .= ' AND (`alt` LIKE "%' . trim($search) . '%"';
|
1166 |
$where .= ' OR `filename` LIKE "%' . trim($search) . '%"';
|
1201 |
|
1202 |
public function set_image_pricelist($id, $gallery_id = 0, $all = FALSE) {
|
1203 |
global $wpdb;
|
1204 |
+
$pricelist_id = WDWLibrary::get('image_pricelist_id', 0, 'intval');
|
1205 |
$item_longest_dimension = $wpdb->get_var('SELECT MAX(item_longest_dimension) AS item_longest_dimension FROM ' . $wpdb->prefix . 'wdpg_ecommerce_pricelist_items AS T_PRICELIST_ITEMS LEFT JOIN ' . $wpdb->prefix . 'wdpg_ecommerce_pricelists AS T_PRICELISTS ON T_PRICELIST_ITEMS.pricelist_id = T_PRICELISTS.id WHERE T_PRICELIST_ITEMS.pricelist_id="' . $pricelist_id . '" AND T_PRICELISTS.sections LIKE "%downloads%"');
|
1206 |
$not_set_items = array();
|
1207 |
if ($pricelist_id) {
|
1208 |
$image_id = ($all ? 0 : $id);
|
1209 |
if ( $gallery_id == 0 ) {
|
1210 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1211 |
}
|
1212 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1213 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1214 |
+
$search = WDWLibrary::get('s');
|
1215 |
if ( $search ) {
|
1216 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1217 |
}
|
1218 |
$image_ids_col = $wpdb->get_col('SELECT id FROM `' . $wpdb->prefix . 'bwg_image`' . $where);
|
1219 |
foreach ($image_ids_col as $image_id) {
|
1220 |
+
$thumb_url_image_id = WDWLibrary::get('thumb_url_' . $image_id, '', 'esc_url_raw');
|
1221 |
+
$file_path = str_replace("thumb", ".original", htmlspecialchars_decode(BWG()->upload_dir . $thumb_url_image_id, ENT_COMPAT | ENT_QUOTES));
|
1222 |
WDWLibrary::repair_image_original($file_path);
|
1223 |
list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
|
1224 |
if ($item_longest_dimension > $img_width && $img_width) {
|
1235 |
|
1236 |
public function remove_image_pricelist() {
|
1237 |
global $wpdb;
|
1238 |
+
$image_id = WDWLibrary::get('remove_pricelist', 0, 'intval');
|
1239 |
if ( $image_id ) {
|
1240 |
$wpdb->update($wpdb->prefix . 'bwg_image', array( 'pricelist_id' => 0 ), array( 'id' => $image_id ));
|
1241 |
}
|
1244 |
public function remove_pricelist_all($id, $gallery_id = 0, $all = FALSE) {
|
1245 |
global $wpdb;
|
1246 |
if ( $gallery_id == 0 ) {
|
1247 |
+
$gallery_id = WDWLibrary::get('current_id', 0, 'intval');
|
1248 |
}
|
1249 |
$where = ' WHERE gallery_id=' . $gallery_id;
|
1250 |
$where .= ($all ? '' : ' AND id=' . $id);
|
1251 |
+
$search = WDWLibrary::get('s');
|
1252 |
if ( $search ) {
|
1253 |
$where .= ' AND `filename` LIKE "%' . $search . '%"';
|
1254 |
}
|
admin/models/Uninstall.php
CHANGED
@@ -8,7 +8,8 @@ class UninstallModel_bwg {
|
|
8 |
* Delete images folder.
|
9 |
*/
|
10 |
public function delete_folder() {
|
11 |
-
|
|
|
12 |
function delfiles($del_file) {
|
13 |
if (is_dir($del_file)) {
|
14 |
$del_folder = scandir($del_file);
|
8 |
* Delete images folder.
|
9 |
*/
|
10 |
public function delete_folder() {
|
11 |
+
$delete_files = WDWLibrary::get('bwg_delete_files');
|
12 |
+
if ( !empty($delete_files) ) {
|
13 |
function delfiles($del_file) {
|
14 |
if (is_dir($del_file)) {
|
15 |
$del_folder = scandir($del_file);
|
admin/views/AdminView.php
CHANGED
@@ -185,7 +185,7 @@ class AdminView_bwg {
|
|
185 |
* @return string
|
186 |
*/
|
187 |
protected function search( $params = array() ) {
|
188 |
-
$search = WDWLibrary::get('s', '');
|
189 |
ob_start();
|
190 |
?>
|
191 |
<p class="search-box">
|
185 |
* @return string
|
186 |
*/
|
187 |
protected function search( $params = array() ) {
|
188 |
+
$search = WDWLibrary::get('s', '', 'esc_attr');
|
189 |
ob_start();
|
190 |
?>
|
191 |
<p class="search-box">
|
admin/views/Albums.php
CHANGED
@@ -98,9 +98,9 @@ class AlbumsView_bwg extends AdminView_bwg {
|
|
98 |
<strong class="has-media-icon">
|
99 |
<a href="<?php echo $edit_url; ?>">
|
100 |
<span class="media-icon image-icon">
|
101 |
-
<img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
|
102 |
</span>
|
103 |
-
<?php echo $row->name; ?>
|
104 |
</a>
|
105 |
<?php if ( !$row->published ) { ?>
|
106 |
— <span class="post-state"><?php _e('Unpublished', BWG()->prefix); ?></span>
|
@@ -111,7 +111,7 @@ class AlbumsView_bwg extends AdminView_bwg {
|
|
111 |
<span><a href="<?php echo $publish_url; ?>"><?php echo ($row->published ? __('Unpublish', BWG()->prefix) : __('Publish', BWG()->prefix)); ?></a> |</span>
|
112 |
<span><a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', BWG()->prefix); ?></a> |</span>
|
113 |
<span class="trash"><a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', BWG()->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', BWG()->prefix); ?></a> |</span>
|
114 |
-
<span><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e('Preview', BWG()->prefix); ?></a></span>
|
115 |
</div>
|
116 |
<button class="toggle-row" type="button">
|
117 |
<span class="screen-reader-text"><?php _e('Show more details', BWG()->prefix); ?></span>
|
@@ -172,7 +172,7 @@ class AlbumsView_bwg extends AdminView_bwg {
|
|
172 |
<div class="bwg-page-header">
|
173 |
<div class="wd-page-title wd-header">
|
174 |
<h1 class="wp-heading-inline"><?php _e('Gallery Group Title', BWG()->prefix); ?></h1>
|
175 |
-
<input type="text" id="name" name="name" value="<?php echo !empty($row->name) ? $row->name : ''; ?>">
|
176 |
<div class="bwg-page-actions">
|
177 |
<?php
|
178 |
if ( $params['shortcode_id'] ) {
|
@@ -208,9 +208,9 @@ class AlbumsView_bwg extends AdminView_bwg {
|
|
208 |
<a href="<?php echo $params['add_preview_image_action']; ?>" id="button_preview_image" class="button wd-preview-image-btn thickbox thickbox-preview <?php echo ($row->preview_image == '') ? 'bwg_not-preview-image' : '' ?>" title="<?php _e('Add Preview Image', BWG()->prefix); ?>" onclick="return false;" style="<?php echo !empty($row->preview_image)?'display:none;':'' ?>">
|
209 |
<span class="dashicons dashicons-camera"></span><?php _e('Add', BWG()->prefix); ?>
|
210 |
</a>
|
211 |
-
<img id="img_preview_image" src="<?php echo $row->preview_image ? (BWG()->upload_url . $row->preview_image) : ''; ?>" style="<?php echo empty($row->preview_image)?'display:none;':'' ?>"/>
|
212 |
<span id="delete_preview_image" class="spider_delete_img dashicons dashicons-no-alt" onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')" style="<?php echo empty($row->preview_image)?'display:none;':'' ?>"></span>
|
213 |
-
<input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>"/>
|
214 |
<p class="description"><?php _e('Add a preview image, which will be displayed as the cover image of the gallery group when it is published in a parent gallery group.', BWG()->prefix); ?></p>
|
215 |
</div>
|
216 |
</div>
|
@@ -239,18 +239,18 @@ class AlbumsView_bwg extends AdminView_bwg {
|
|
239 |
<div class="inside">
|
240 |
<div class="wd-group">
|
241 |
<label class="wd-label"><?php _e('Author', BWG()->prefix); ?></label>
|
242 |
-
<span><?php echo $row->author; ?></span>
|
243 |
</div>
|
244 |
<div class="wd-group">
|
245 |
<label class="wd-label" for="slug"><?php _e('Slug', BWG()->prefix); ?></label>
|
246 |
-
<input type="text" id="slug" name="slug" value="<?php echo $row->slug; ?>">
|
247 |
-
<input type="hidden" id="old_slug" name="old_slug" value="<?php echo $row->slug; ?>">
|
248 |
</div>
|
249 |
<div class="wd-group">
|
250 |
<label class="wd-label" for="description"><?php _e('Description', BWG()->prefix); ?> </label>
|
251 |
<?php
|
252 |
if ( user_can_richedit() && $enable_wp_editor ) {
|
253 |
-
wp_editor($row->description, 'description', array(
|
254 |
'teeny' => TRUE,
|
255 |
'textarea_name' => 'description',
|
256 |
'media_buttons' => FALSE,
|
@@ -259,7 +259,7 @@ class AlbumsView_bwg extends AdminView_bwg {
|
|
259 |
}
|
260 |
else {
|
261 |
?>
|
262 |
-
<textarea cols="36" rows="5" id="description" name="description" class="wd-resize-vertical"><?php echo $row->description; ?></textarea>
|
263 |
<?php
|
264 |
}
|
265 |
?>
|
98 |
<strong class="has-media-icon">
|
99 |
<a href="<?php echo $edit_url; ?>">
|
100 |
<span class="media-icon image-icon">
|
101 |
+
<img class="preview-image" title="<?php echo esc_attr( $row->name ); ?>" src="<?php echo esc_url( $preview_image ); ?>" width="60" height="60" />
|
102 |
</span>
|
103 |
+
<?php echo esc_html( $row->name ); ?>
|
104 |
</a>
|
105 |
<?php if ( !$row->published ) { ?>
|
106 |
— <span class="post-state"><?php _e('Unpublished', BWG()->prefix); ?></span>
|
111 |
<span><a href="<?php echo $publish_url; ?>"><?php echo ($row->published ? __('Unpublish', BWG()->prefix) : __('Publish', BWG()->prefix)); ?></a> |</span>
|
112 |
<span><a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', BWG()->prefix); ?></a> |</span>
|
113 |
<span class="trash"><a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', BWG()->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', BWG()->prefix); ?></a> |</span>
|
114 |
+
<span><a href="<?php echo esc_url( $preview_url ); ?>" target="_blank"><?php _e('Preview', BWG()->prefix); ?></a></span>
|
115 |
</div>
|
116 |
<button class="toggle-row" type="button">
|
117 |
<span class="screen-reader-text"><?php _e('Show more details', BWG()->prefix); ?></span>
|
172 |
<div class="bwg-page-header">
|
173 |
<div class="wd-page-title wd-header">
|
174 |
<h1 class="wp-heading-inline"><?php _e('Gallery Group Title', BWG()->prefix); ?></h1>
|
175 |
+
<input type="text" id="name" name="name" value="<?php echo !empty($row->name) ? esc_attr( $row->name ) : ''; ?>">
|
176 |
<div class="bwg-page-actions">
|
177 |
<?php
|
178 |
if ( $params['shortcode_id'] ) {
|
208 |
<a href="<?php echo $params['add_preview_image_action']; ?>" id="button_preview_image" class="button wd-preview-image-btn thickbox thickbox-preview <?php echo ($row->preview_image == '') ? 'bwg_not-preview-image' : '' ?>" title="<?php _e('Add Preview Image', BWG()->prefix); ?>" onclick="return false;" style="<?php echo !empty($row->preview_image)?'display:none;':'' ?>">
|
209 |
<span class="dashicons dashicons-camera"></span><?php _e('Add', BWG()->prefix); ?>
|
210 |
</a>
|
211 |
+
<img id="img_preview_image" src="<?php echo $row->preview_image ? (BWG()->upload_url . esc_url( $row->preview_image )) : ''; ?>" style="<?php echo empty($row->preview_image)?'display:none;':'' ?>"/>
|
212 |
<span id="delete_preview_image" class="spider_delete_img dashicons dashicons-no-alt" onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')" style="<?php echo empty($row->preview_image)?'display:none;':'' ?>"></span>
|
213 |
+
<input type="hidden" id="preview_image" name="preview_image" value="<?php echo esc_url( $row->preview_image ); ?>"/>
|
214 |
<p class="description"><?php _e('Add a preview image, which will be displayed as the cover image of the gallery group when it is published in a parent gallery group.', BWG()->prefix); ?></p>
|
215 |
</div>
|
216 |
</div>
|
239 |
<div class="inside">
|
240 |
<div class="wd-group">
|
241 |
<label class="wd-label"><?php _e('Author', BWG()->prefix); ?></label>
|
242 |
+
<span><?php echo esc_html( $row->author ); ?></span>
|
243 |
</div>
|
244 |
<div class="wd-group">
|
245 |
<label class="wd-label" for="slug"><?php _e('Slug', BWG()->prefix); ?></label>
|
246 |
+
<input type="text" id="slug" name="slug" value="<?php echo esc_attr( $row->slug ); ?>">
|
247 |
+
<input type="hidden" id="old_slug" name="old_slug" value="<?php echo esc_attr( $row->slug ); ?>">
|
248 |
</div>
|
249 |
<div class="wd-group">
|
250 |
<label class="wd-label" for="description"><?php _e('Description', BWG()->prefix); ?> </label>
|
251 |
<?php
|
252 |
if ( user_can_richedit() && $enable_wp_editor ) {
|
253 |
+
wp_editor(esc_html( $row->description ), 'description', array(
|
254 |
'teeny' => TRUE,
|
255 |
'textarea_name' => 'description',
|
256 |
'media_buttons' => FALSE,
|
259 |
}
|
260 |
else {
|
261 |
?>
|
262 |
+
<textarea cols="36" rows="5" id="description" name="description" class="wd-resize-vertical"><?php echo esc_html( $row->description ); ?></textarea>
|
263 |
<?php
|
264 |
}
|
265 |
?>
|
admin/views/Albumsgalleries.php
CHANGED
@@ -97,15 +97,15 @@ class AlbumsgalleriesView_bwg extends AdminView_bwg {
|
|
97 |
?>
|
98 |
<tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
|
99 |
<th class="table_small_col check-column">
|
100 |
-
<input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" data-id="<?php echo $row->id; ?>" data-is-album="<?php echo htmlspecialchars(addslashes($row->is_album)); ?>" data-preview-image="<?php echo
|
101 |
</th>
|
102 |
<td class="column-primary column-title" data-colname="<?php _e('Title', BWG()->prefix); ?>">
|
103 |
<strong class="has-media-icon">
|
104 |
-
<a class="wd-pointer" onclick="window.parent.bwg_add_album_gallery('<?php echo $row->id; ?>', '<?php echo
|
105 |
<span class="media-icon image-icon">
|
106 |
-
<img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
|
107 |
</span>
|
108 |
-
<?php echo $row->name?>
|
109 |
</a>
|
110 |
<?php if ( !$row->published ) { ?>
|
111 |
— <span class="post-state"><?php _e('Unpublished', BWG()->prefix); ?></span>
|
97 |
?>
|
98 |
<tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
|
99 |
<th class="table_small_col check-column">
|
100 |
+
<input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" data-id="<?php echo $row->id; ?>" data-is-album="<?php echo htmlspecialchars(addslashes($row->is_album)); ?>" data-preview-image="<?php echo esc_url( $preview_image ); ?>" data-name="<?php echo esc_attr( $row->name ); ?>" data-status="<?php echo !$row->published ? 'dashicons-hidden' : 'bwg-hidden'; ?>" />
|
101 |
</th>
|
102 |
<td class="column-primary column-title" data-colname="<?php _e('Title', BWG()->prefix); ?>">
|
103 |
<strong class="has-media-icon">
|
104 |
+
<a class="wd-pointer" onclick="window.parent.bwg_add_album_gallery('<?php echo $row->id; ?>', '<?php echo $row->is_album; ?>', '<?php echo esc_url( $preview_image ); ?>', '<?php echo esc_attr( $row->name ); ?>','<?php echo !$row->published ? 'dashicons-hidden' : 'bwg-hidden' ?>')" id="a_<?php echo $iterator; ?>">
|
105 |
<span class="media-icon image-icon">
|
106 |
+
<img class="preview-image" title="<?php echo esc_attr( $row->name ); ?>" src="<?php echo esc_url( $preview_image ); ?>" width="60" height="60" />
|
107 |
</span>
|
108 |
+
<?php echo esc_html( $row->name ); ?>
|
109 |
</a>
|
110 |
<?php if ( !$row->published ) { ?>
|
111 |
— <span class="post-state"><?php _e('Unpublished', BWG()->prefix); ?></span>
|
admin/views/Editimage.php
CHANGED
@@ -6,13 +6,13 @@ class EditimageView_bwg {
|
|
6 |
|
7 |
public function display() {
|
8 |
wp_print_scripts('jquery');
|
9 |
-
$popup_width =
|
10 |
$image_width = $popup_width - 40;
|
11 |
-
$popup_height =
|
12 |
$image_height = $popup_height - 40;
|
13 |
|
14 |
-
$instagram_post_width =
|
15 |
-
$instagram_post_height =
|
16 |
$modified_date = WDWLibrary::get('modified_date', '');
|
17 |
$FeedbackSocialProofHeight = 176;
|
18 |
if ( $instagram_post_width ) {
|
@@ -96,11 +96,11 @@ class EditimageView_bwg {
|
|
96 |
}
|
97 |
|
98 |
public function thumb_display() {
|
99 |
-
$popup_width = (
|
100 |
$image_width = $popup_width - 40;
|
101 |
-
$popup_height = (
|
102 |
$image_height = $popup_height - 40;
|
103 |
-
$image_id = (
|
104 |
$modified_date = WDWLibrary::get('modified_date', '');
|
105 |
?>
|
106 |
<div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
|
@@ -439,8 +439,8 @@ class EditimageView_bwg {
|
|
439 |
$image_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
440 |
if ( !$image_data ) {
|
441 |
$image_data = new stdClass();
|
442 |
-
$image_data->image_url = (
|
443 |
-
$image_data->thumb_url = (
|
444 |
}
|
445 |
$filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
|
446 |
$thumb_filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
@@ -452,19 +452,19 @@ class EditimageView_bwg {
|
|
452 |
}
|
453 |
|
454 |
public function rotate($image_data = array()) {
|
455 |
-
$popup_width = (
|
456 |
$image_width = $popup_width - 40;
|
457 |
-
$popup_height = (
|
458 |
$image_height = $popup_height - 70;
|
459 |
-
$image_id = (
|
460 |
-
$edit_type = (
|
461 |
-
$brightness_val = (
|
462 |
-
$contrast_val = (
|
463 |
$image_data = new stdClass();
|
464 |
$modified_date = time();
|
465 |
-
if (
|
466 |
-
$image_data->image_url = (
|
467 |
-
$image_data->thumb_url = (
|
468 |
$filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
|
469 |
$thumb_filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
470 |
$form_action = add_query_arg(array(
|
@@ -774,7 +774,7 @@ class EditimageView_bwg {
|
|
774 |
}
|
775 |
elseif ( $edit_type == 'recover' ) {
|
776 |
global $wpdb;
|
777 |
-
$id = (
|
778 |
$thumb_width = BWG()->options->thumb_width;
|
779 |
$thumb_height = BWG()->options->thumb_height;
|
780 |
$this->recover_image($id, $thumb_width, $thumb_height);
|
6 |
|
7 |
public function display() {
|
8 |
wp_print_scripts('jquery');
|
9 |
+
$popup_width = WDWLibrary::get('width', 650, 'intval');
|
10 |
$image_width = $popup_width - 40;
|
11 |
+
$popup_height = WDWLibrary::get('height', 500, 'intval');
|
12 |
$image_height = $popup_height - 40;
|
13 |
|
14 |
+
$instagram_post_width = WDWLibrary::get('instagram_post_width', $image_width, 'intval');
|
15 |
+
$instagram_post_height = WDWLibrary::get('instagram_post_height', $image_height, 'intval');
|
16 |
$modified_date = WDWLibrary::get('modified_date', '');
|
17 |
$FeedbackSocialProofHeight = 176;
|
18 |
if ( $instagram_post_width ) {
|
96 |
}
|
97 |
|
98 |
public function thumb_display() {
|
99 |
+
$popup_width = WDWLibrary::get('width', 1000, 'intval') - 30;
|
100 |
$image_width = $popup_width - 40;
|
101 |
+
$popup_height = WDWLibrary::get('width', 600, 'intval') - 50;
|
102 |
$image_height = $popup_height - 40;
|
103 |
+
$image_id = WDWLibrary::get('image_id', 0, 'intval');
|
104 |
$modified_date = WDWLibrary::get('modified_date', '');
|
105 |
?>
|
106 |
<div style="display:table; width:100%; height:<?php echo $popup_height; ?>px;">
|
439 |
$image_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
440 |
if ( !$image_data ) {
|
441 |
$image_data = new stdClass();
|
442 |
+
$image_data->image_url = WDWLibrary::get('image_url', '', 'esc_url_raw');
|
443 |
+
$image_data->thumb_url = WDWLibrary::get('thumb_url', '', 'esc_url_raw');
|
444 |
}
|
445 |
$filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
|
446 |
$thumb_filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
452 |
}
|
453 |
|
454 |
public function rotate($image_data = array()) {
|
455 |
+
$popup_width = WDWLibrary::get('width', 650, 'intval') - 30;
|
456 |
$image_width = $popup_width - 40;
|
457 |
+
$popup_height = WDWLibrary::get('height', 500, 'intval') - 55;
|
458 |
$image_height = $popup_height - 70;
|
459 |
+
$image_id = WDWLibrary::get('image_id', 0, 'intval');
|
460 |
+
$edit_type = WDWLibrary::get('edit_type');
|
461 |
+
$brightness_val = WDWLibrary::get('brightness_val', 0, 'intval');
|
462 |
+
$contrast_val = WDWLibrary::get('contrast_val', 0, 'intval');
|
463 |
$image_data = new stdClass();
|
464 |
$modified_date = time();
|
465 |
+
if ( !empty(WDWLibrary::get('image_url')) ) {
|
466 |
+
$image_data->image_url = WDWLibrary::get('image_url', '', 'esc_url_raw');
|
467 |
+
$image_data->thumb_url = WDWLibrary::get('thumb_url', '', 'esc_url_raw');
|
468 |
$filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
|
469 |
$thumb_filename = htmlspecialchars_decode(BWG()->upload_dir . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
470 |
$form_action = add_query_arg(array(
|
774 |
}
|
775 |
elseif ( $edit_type == 'recover' ) {
|
776 |
global $wpdb;
|
777 |
+
$id = WDWLibrary::get('image_id', 0, 'intval');
|
778 |
$thumb_width = BWG()->options->thumb_width;
|
779 |
$thumb_height = BWG()->options->thumb_height;
|
780 |
$this->recover_image($id, $thumb_width, $thumb_height);
|
admin/views/Galleries.php
CHANGED
@@ -386,9 +386,9 @@ class GalleriesView_bwg extends AdminView_bwg {
|
|
386 |
}
|
387 |
|
388 |
public function image_display( $params = array() ) {
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
$ids_string = '';
|
393 |
?>
|
394 |
<div class="buttons_div_left">
|
386 |
}
|
387 |
|
388 |
public function image_display( $params = array() ) {
|
389 |
+
if( $params['row'] ) {
|
390 |
+
$is_google_photos = ($params['row']->gallery_type == 'google_photos') ? TRUE : FALSE;
|
391 |
+
}
|
392 |
$ids_string = '';
|
393 |
?>
|
394 |
<div class="buttons_div_left">
|
admin/views/Options.php
CHANGED
@@ -9,7 +9,7 @@ class OptionsView_bwg extends AdminView_bwg {
|
|
9 |
wp_admin_css('thickbox');
|
10 |
wp_enqueue_style(BWG()->prefix . '_tables');
|
11 |
wp_enqueue_script(BWG()->prefix . '_jscolor');
|
12 |
-
if ( WDWLibrary::get('bwg_start_tour'
|
13 |
update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
|
14 |
WDWLibrary::spider_redirect('admin.php?page=options_bwg');
|
15 |
}
|
@@ -1045,7 +1045,7 @@ class OptionsView_bwg extends AdminView_bwg {
|
|
1045 |
bwg_pagination_description(jQuery('#album_masonry_enable_page_<?php echo $row->album_masonry_enable_page; ?>'));
|
1046 |
bwg_pagination_description(jQuery('#album_extended_enable_page_<?php echo $row->album_extended_enable_page; ?>'));
|
1047 |
});
|
1048 |
-
<?php if ( WDWLibrary::get('instagram_token'
|
1049 |
jQuery(window).load(function() {
|
1050 |
var advanced_tab_index = 4;
|
1051 |
jQuery( ".bwg_tabs" ).tabs({ active: advanced_tab_index });
|
9 |
wp_admin_css('thickbox');
|
10 |
wp_enqueue_style(BWG()->prefix . '_tables');
|
11 |
wp_enqueue_script(BWG()->prefix . '_jscolor');
|
12 |
+
if ( WDWLibrary::get('bwg_start_tour') ) {
|
13 |
update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
|
14 |
WDWLibrary::spider_redirect('admin.php?page=options_bwg');
|
15 |
}
|
1045 |
bwg_pagination_description(jQuery('#album_masonry_enable_page_<?php echo $row->album_masonry_enable_page; ?>'));
|
1046 |
bwg_pagination_description(jQuery('#album_extended_enable_page_<?php echo $row->album_extended_enable_page; ?>'));
|
1047 |
});
|
1048 |
+
<?php if ( WDWLibrary::get('instagram_token') || WDWLibrary::get('code') ) { ?>
|
1049 |
jQuery(window).load(function() {
|
1050 |
var advanced_tab_index = 4;
|
1051 |
jQuery( ".bwg_tabs" ).tabs({ active: advanced_tab_index });
|
admin/views/Shortcode.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
class ShortcodeView_bwg extends AdminView_bwg {
|
|
|
4 |
public function display( $params = array() ) {
|
5 |
$from_menu = $params['from_menu'];
|
6 |
if ( !$from_menu ) {
|
@@ -50,7 +51,8 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
50 |
<input type="hidden" id="currrent_id" name="currrent_id" value="" />
|
51 |
<input type="hidden" id="title" name="title" value="" />
|
52 |
<input type="hidden" id="bwg_insert" name="bwg_insert" value="" />
|
53 |
-
|
|
|
54 |
<div class="bwg_tabs meta-box-sortables">
|
55 |
<ul class="bwg-tabs">
|
56 |
<li class="tabs">
|
@@ -438,9 +440,9 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
438 |
else {
|
439 |
$tagtext = '';
|
440 |
$tagfunction = '';
|
441 |
-
|
442 |
-
|
443 |
-
$title = (
|
444 |
$tagtext = '[Best_Wordpress_Gallery id="' . $currrent_id . '"' . $title . ']';
|
445 |
$tagfunction = "<?php echo if( function_exists('photo_gallery') ) { photo_gallery(" . $currrent_id . "); } ?>";
|
446 |
}
|
@@ -1777,7 +1779,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
1777 |
tagtext += ' show_tag_box="' + jQuery("input[name=masonry_show_tag_box]:checked").val() + '"';
|
1778 |
tagtext += ' showthumbs_name="' + jQuery("input[name=masonry_show_gallery_title]:checked").val() + '"';
|
1779 |
tagtext += ' image_title="' + jQuery("input[name=masonry_image_title]:checked").val() + '"';
|
1780 |
-
|
1781 |
tagtext += ' play_icon="' + jQuery("input[name=masonry_play_icon]:checked").val() + '"';
|
1782 |
tagtext += ' gallery_download="' + jQuery("input[name=masonry_gallery_download]:checked").val() + '"';
|
1783 |
tagtext += ' ecommerce_icon="' + jQuery("input[name=masonry_ecommerce_icon_show_hover]:checked").val() + '"';
|
@@ -1841,7 +1843,6 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
1841 |
title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1842 |
tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
|
1843 |
tagtext += ' tag="' + jQuery("#tag").val() + '"';
|
1844 |
-
|
1845 |
tagtext += ' image_browser_width="' + jQuery("#image_browser_width").val() + '"';
|
1846 |
tagtext += ' image_browser_title_enable="' + jQuery("input[name=image_browser_title_enable]:checked").val() + '"';
|
1847 |
tagtext += ' image_browser_description_enable="' + jQuery("input[name=image_browser_description_enable]:checked").val() + '"';
|
@@ -1902,7 +1903,6 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
1902 |
case 'album_compact_preview': {
|
1903 |
title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1904 |
tagtext += ' album_id="' + jQuery("#album").val() + '"';
|
1905 |
-
|
1906 |
tagtext += ' compuct_album_column_number="' + jQuery("#album_column_number").val() + '"';
|
1907 |
tagtext += ' compuct_album_thumb_width="' + jQuery("#album_thumb_width").val() + '"';
|
1908 |
tagtext += ' compuct_album_thumb_height="' + jQuery("#album_thumb_height").val() + '"';
|
@@ -1914,7 +1914,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
1914 |
tagtext += ' compuct_album_images_per_page="' + jQuery("#album_images_per_page").val() + '"';
|
1915 |
tagtext += ' all_album_sort_by="' + jQuery("#compact_album_sort_by").val() + '"';
|
1916 |
tagtext += ' all_album_order_by="' + jQuery("#compact_album_order_by").val() + '"';
|
1917 |
-
|
1918 |
tagtext += ' order_by="' + jQuery("#album_order_by").val() + '"';
|
1919 |
tagtext += ' show_search_box="' + jQuery("input[name=album_show_search_box]:checked").val() + '"';
|
1920 |
tagtext += ' placeholder="' + jQuery("#album_placeholder").val() + '"';
|
@@ -1944,9 +1944,9 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
1944 |
tagtext += ' masonry_album_enable_page="' + jQuery("input[name=album_masonry_enable_page]:checked").val() + '"';
|
1945 |
tagtext += ' masonry_albums_per_page="' + jQuery("#albums_masonry_per_page").val() + '"';
|
1946 |
tagtext += ' masonry_album_images_per_page="' + jQuery("#album_masonry_images_per_page").val() + '"';
|
1947 |
-
|
1948 |
tagtext += ' all_album_order_by="' + jQuery("#masonry_album_order_by").val() + '"';
|
1949 |
-
|
1950 |
tagtext += ' order_by="' + jQuery("#album_masonry_order_by").val() + '"';
|
1951 |
tagtext += ' show_search_box="' + jQuery("input[name=album_masonry_show_search_box]:checked").val() + '"';
|
1952 |
tagtext += ' placeholder="' + jQuery("#album_masonry_placeholder").val() + '"';
|
@@ -1983,7 +1983,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
1983 |
tagtext += ' show_sort_images="' + jQuery("input[name=album_extended_show_sort_images]:checked").val() + '"';
|
1984 |
tagtext += ' show_tag_box="' + jQuery("input[name=album_extended_show_tag_box]:checked").val() + '"';
|
1985 |
tagtext += ' show_album_name="' + jQuery("input[name=show_album_extended_name]:checked").val() + '"';
|
1986 |
-
|
1987 |
tagtext += ' show_gallery_description="' + jQuery("input[name=album_extended_show_gallery_description]:checked").val() + '"';
|
1988 |
tagtext += ' extended_album_view_type="' + jQuery('#album_extended_view_type option:selected').val() + '"';
|
1989 |
tagtext += ' extended_album_image_title="' + jQuery("input[name=album_extended_image_title_show_hover]:checked").val() + '"';
|
@@ -2118,8 +2118,8 @@ class ShortcodeView_bwg extends AdminView_bwg {
|
|
2118 |
<?php
|
2119 |
if ( $params['gutenberg_callback'] ) {
|
2120 |
?>
|
2121 |
-
|
2122 |
-
|
2123 |
return;
|
2124 |
<?php
|
2125 |
}
|
1 |
<?php
|
2 |
|
3 |
class ShortcodeView_bwg extends AdminView_bwg {
|
4 |
+
|
5 |
public function display( $params = array() ) {
|
6 |
$from_menu = $params['from_menu'];
|
7 |
if ( !$from_menu ) {
|
51 |
<input type="hidden" id="currrent_id" name="currrent_id" value="" />
|
52 |
<input type="hidden" id="title" name="title" value="" />
|
53 |
<input type="hidden" id="bwg_insert" name="bwg_insert" value="" />
|
54 |
+
|
55 |
+
<div class="<?php echo (isset($_GET['callback']) && $_GET['callback'] == 'wdg_cb_tw/bwg') ? 'bwg_tw-container' : '' ?>">
|
56 |
<div class="bwg_tabs meta-box-sortables">
|
57 |
<ul class="bwg-tabs">
|
58 |
<li class="tabs">
|
440 |
else {
|
441 |
$tagtext = '';
|
442 |
$tagfunction = '';
|
443 |
+
$currrent_id = WDWLibrary::get('currrent_id', 0, 'intval');
|
444 |
+
if ( $currrent_id ) {
|
445 |
+
$title = WDWLibrary::get('title');
|
446 |
$tagtext = '[Best_Wordpress_Gallery id="' . $currrent_id . '"' . $title . ']';
|
447 |
$tagfunction = "<?php echo if( function_exists('photo_gallery') ) { photo_gallery(" . $currrent_id . "); } ?>";
|
448 |
}
|
1779 |
tagtext += ' show_tag_box="' + jQuery("input[name=masonry_show_tag_box]:checked").val() + '"';
|
1780 |
tagtext += ' showthumbs_name="' + jQuery("input[name=masonry_show_gallery_title]:checked").val() + '"';
|
1781 |
tagtext += ' image_title="' + jQuery("input[name=masonry_image_title]:checked").val() + '"';
|
1782 |
+
tagtext += ' show_gallery_description="' + jQuery("input[name=masonry_show_gallery_description]:checked").val() + '"';
|
1783 |
tagtext += ' play_icon="' + jQuery("input[name=masonry_play_icon]:checked").val() + '"';
|
1784 |
tagtext += ' gallery_download="' + jQuery("input[name=masonry_gallery_download]:checked").val() + '"';
|
1785 |
tagtext += ' ecommerce_icon="' + jQuery("input[name=masonry_ecommerce_icon_show_hover]:checked").val() + '"';
|
1843 |
title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1844 |
tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
|
1845 |
tagtext += ' tag="' + jQuery("#tag").val() + '"';
|
|
|
1846 |
tagtext += ' image_browser_width="' + jQuery("#image_browser_width").val() + '"';
|
1847 |
tagtext += ' image_browser_title_enable="' + jQuery("input[name=image_browser_title_enable]:checked").val() + '"';
|
1848 |
tagtext += ' image_browser_description_enable="' + jQuery("input[name=image_browser_description_enable]:checked").val() + '"';
|
1903 |
case 'album_compact_preview': {
|
1904 |
title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1905 |
tagtext += ' album_id="' + jQuery("#album").val() + '"';
|
|
|
1906 |
tagtext += ' compuct_album_column_number="' + jQuery("#album_column_number").val() + '"';
|
1907 |
tagtext += ' compuct_album_thumb_width="' + jQuery("#album_thumb_width").val() + '"';
|
1908 |
tagtext += ' compuct_album_thumb_height="' + jQuery("#album_thumb_height").val() + '"';
|
1914 |
tagtext += ' compuct_album_images_per_page="' + jQuery("#album_images_per_page").val() + '"';
|
1915 |
tagtext += ' all_album_sort_by="' + jQuery("#compact_album_sort_by").val() + '"';
|
1916 |
tagtext += ' all_album_order_by="' + jQuery("#compact_album_order_by").val() + '"';
|
1917 |
+
tagtext += ' sort_by="' + jQuery("#album_sort_by").val() + '"';
|
1918 |
tagtext += ' order_by="' + jQuery("#album_order_by").val() + '"';
|
1919 |
tagtext += ' show_search_box="' + jQuery("input[name=album_show_search_box]:checked").val() + '"';
|
1920 |
tagtext += ' placeholder="' + jQuery("#album_placeholder").val() + '"';
|
1944 |
tagtext += ' masonry_album_enable_page="' + jQuery("input[name=album_masonry_enable_page]:checked").val() + '"';
|
1945 |
tagtext += ' masonry_albums_per_page="' + jQuery("#albums_masonry_per_page").val() + '"';
|
1946 |
tagtext += ' masonry_album_images_per_page="' + jQuery("#album_masonry_images_per_page").val() + '"';
|
1947 |
+
tagtext += ' all_album_sort_by="' + jQuery("#masonry_album_sort_by").val() + '"';
|
1948 |
tagtext += ' all_album_order_by="' + jQuery("#masonry_album_order_by").val() + '"';
|
1949 |
+
tagtext += ' sort_by="' + jQuery("#album_masonry_sort_by").val() + '"';
|
1950 |
tagtext += ' order_by="' + jQuery("#album_masonry_order_by").val() + '"';
|
1951 |
tagtext += ' show_search_box="' + jQuery("input[name=album_masonry_show_search_box]:checked").val() + '"';
|
1952 |
tagtext += ' placeholder="' + jQuery("#album_masonry_placeholder").val() + '"';
|
1983 |
tagtext += ' show_sort_images="' + jQuery("input[name=album_extended_show_sort_images]:checked").val() + '"';
|
1984 |
tagtext += ' show_tag_box="' + jQuery("input[name=album_extended_show_tag_box]:checked").val() + '"';
|
1985 |
tagtext += ' show_album_name="' + jQuery("input[name=show_album_extended_name]:checked").val() + '"';
|
1986 |
+
tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
|
1987 |
tagtext += ' show_gallery_description="' + jQuery("input[name=album_extended_show_gallery_description]:checked").val() + '"';
|
1988 |
tagtext += ' extended_album_view_type="' + jQuery('#album_extended_view_type option:selected').val() + '"';
|
1989 |
tagtext += ' extended_album_image_title="' + jQuery("input[name=album_extended_image_title_show_hover]:checked").val() + '"';
|
2118 |
<?php
|
2119 |
if ( $params['gutenberg_callback'] ) {
|
2120 |
?>
|
2121 |
+
window.parent.window.jQuery(".edit-post-layout__content").css({"z-index":"0","overflow":"auto"});
|
2122 |
+
window.parent['<?php echo $params['gutenberg_callback']; ?>'](content, shortcode_id);
|
2123 |
return;
|
2124 |
<?php
|
2125 |
}
|
banner_class.php
DELETED
@@ -1,512 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class TWBanner {
|
4 |
-
public $menu_postfix = ''; // To display on only current plugin pages.
|
5 |
-
public $prefix = ''; // Current plugin prefix.
|
6 |
-
public $logo = ''; // Current plugin logo relative URL.
|
7 |
-
public $plugin_slug = ''; // Current plugin slug.
|
8 |
-
public $plugin_url = ''; // Current plugin URL.
|
9 |
-
public $plugin_id = ''; // Current plugin id.
|
10 |
-
public $text = ''; // Banner text.
|
11 |
-
public $slug = ''; // Plugin slug to be installed.
|
12 |
-
public $mu_plugin_slug = ''; // Must use plugin slug.
|
13 |
-
public $base_php = ''; // Plugin base php filename to be installed.
|
14 |
-
public $page_url = ''; // Redirect to URL after activating the plugin.
|
15 |
-
public $status_install = 0; // Is plugin installed.
|
16 |
-
public $status_active = 0; // Is plugin active.
|
17 |
-
|
18 |
-
/**
|
19 |
-
* TW_Banner_Class constructor.
|
20 |
-
*
|
21 |
-
* @param $opt_banner_param
|
22 |
-
*/
|
23 |
-
public function __construct( $opt_banner_param ) {
|
24 |
-
$this->menu_postfix = $opt_banner_param["menu_postfix"];
|
25 |
-
$this->prefix = $opt_banner_param["prefix"];
|
26 |
-
$this->logo = $opt_banner_param["logo"];
|
27 |
-
$this->plugin_slug = $opt_banner_param['plugin_slug'];
|
28 |
-
$this->plugin_url = $opt_banner_param["plugin_url"];
|
29 |
-
$this->plugin_id = $opt_banner_param['plugin_id'];
|
30 |
-
$this->text = $opt_banner_param['text'];
|
31 |
-
$this->slug = $opt_banner_param['slug'];
|
32 |
-
$this->mu_plugin_slug = $opt_banner_param['mu_plugin_slug'];
|
33 |
-
$this->base_php = $opt_banner_param['base_php'];
|
34 |
-
$this->page_url = $opt_banner_param['page_url'];
|
35 |
-
$this->init();
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Add actions.
|
40 |
-
*/
|
41 |
-
public function init() {
|
42 |
-
add_action('wp_ajax_wd_tenweb_dismiss', array( $this, 'dismiss' ));
|
43 |
-
add_action('wp_ajax_tenweb_status', array( $this, 'change_status' ));
|
44 |
-
|
45 |
-
// Check the page to show banner.
|
46 |
-
if ( ( !isset($_GET['page']) || ( preg_match("/^$this->menu_postfix/", esc_html( $_GET['page'] )) === 0 && preg_match("/$this->menu_postfix$/", esc_html( $_GET['page'] )) === 0 )) || ( isset($_GET['task']) && !strpos(esc_html($_GET['task']), 'edit') === TRUE && !(strpos(esc_html($_GET['task']), 'display') > -1)) ) {
|
47 |
-
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
|
51 |
-
if ( $this->is_plugin_mu($this->mu_plugin_slug) ) {
|
52 |
-
$this->status_install = 1;
|
53 |
-
$this->status_active = 1;
|
54 |
-
}
|
55 |
-
else {
|
56 |
-
$this->upgrade_install_status();
|
57 |
-
}
|
58 |
-
if ( !$this->status_active ) {
|
59 |
-
add_action('admin_notices', array( $this, 'tenweb_install_notice' ));
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Check plugin install status.
|
65 |
-
*/
|
66 |
-
public function upgrade_install_status() {
|
67 |
-
if ( !function_exists('is_plugin_active') ) {
|
68 |
-
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
69 |
-
}
|
70 |
-
if ( $this->is_plugin_installed($this->slug) ) {
|
71 |
-
$this->status_install = 1;
|
72 |
-
if ( is_plugin_active($this->slug . '/' . $this->base_php) ) {
|
73 |
-
$this->status_active = 1;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Save status.
|
80 |
-
*/
|
81 |
-
public function dismiss() {
|
82 |
-
update_option('tenweb_notice_status', '1', 'no');
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Plugin install/activate status.
|
87 |
-
*
|
88 |
-
* @return string
|
89 |
-
*/
|
90 |
-
public function tenweb_install_notice() {
|
91 |
-
// Remove old notice.
|
92 |
-
if ( get_option('tenweb_notice_status') !== FALSE ) {
|
93 |
-
update_option('tenweb_notice_status', '1', 'no');
|
94 |
-
}
|
95 |
-
$meta_value = get_option('tenweb_notice_status');
|
96 |
-
if ( $meta_value === '' || $meta_value === FALSE ) {
|
97 |
-
ob_start();
|
98 |
-
$dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
|
99 |
-
$verify_url = add_query_arg(array( 'action' => 'tenweb_status' ), admin_url('admin-ajax.php'));
|
100 |
-
?>
|
101 |
-
<style>
|
102 |
-
.hide {
|
103 |
-
display: none !important;
|
104 |
-
}
|
105 |
-
#verifyUrl {
|
106 |
-
display: none;
|
107 |
-
}
|
108 |
-
#loading {
|
109 |
-
position: absolute;
|
110 |
-
right: 20px;
|
111 |
-
top: 50%;
|
112 |
-
transform: translateY(-50%);
|
113 |
-
margin: 0px;
|
114 |
-
background: url("<?php echo $this->plugin_url . '/images/spinner.gif'; ?>") no-repeat;
|
115 |
-
background-size: 20px 20px;
|
116 |
-
filter: alpha(opacity=70);
|
117 |
-
}
|
118 |
-
#wd_tenweb_logo_notice {
|
119 |
-
height: 32px;
|
120 |
-
float: left;
|
121 |
-
}
|
122 |
-
.error_install,
|
123 |
-
.error_activate {
|
124 |
-
color: red;
|
125 |
-
font-size: 10px;
|
126 |
-
}
|
127 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
128 |
-
display: none;
|
129 |
-
flex-wrap: wrap;
|
130 |
-
background: #fff;
|
131 |
-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
|
132 |
-
position: relative;
|
133 |
-
margin-left: 0px;
|
134 |
-
padding: 5px 0;
|
135 |
-
overflow: hidden;
|
136 |
-
border-left: 4px solid #0073AA;
|
137 |
-
font-family: Open Sans, sans-serif;
|
138 |
-
height: 40px;
|
139 |
-
min-height: 40px;
|
140 |
-
box-sizing: initial;
|
141 |
-
}
|
142 |
-
.v2_logo {
|
143 |
-
display: flex;
|
144 |
-
flex-direction: column;
|
145 |
-
justify-content: center;
|
146 |
-
height: inherit;
|
147 |
-
}
|
148 |
-
#v2_tenweb_notice_cont {
|
149 |
-
height: 50px;
|
150 |
-
padding: 0px;
|
151 |
-
}
|
152 |
-
.v2_content {
|
153 |
-
flex-grow: 1;
|
154 |
-
height: inherit;
|
155 |
-
margin-left: 25px;
|
156 |
-
}
|
157 |
-
.v2_content p {
|
158 |
-
margin: 0px;
|
159 |
-
padding: 0px;
|
160 |
-
}
|
161 |
-
.v2_content p > span {
|
162 |
-
font-size: 16px;
|
163 |
-
color: #333B46;
|
164 |
-
font-weight: 600;
|
165 |
-
line-height: 40px;
|
166 |
-
margin: 0;
|
167 |
-
}
|
168 |
-
#wd_tenweb_logo_notice {
|
169 |
-
margin-left: 25px;
|
170 |
-
height: 30px;
|
171 |
-
line-height: 100%;
|
172 |
-
}
|
173 |
-
.v2_button {
|
174 |
-
display: flex;
|
175 |
-
margin-right: 30px;
|
176 |
-
flex-direction: column;
|
177 |
-
justify-content: center;
|
178 |
-
}
|
179 |
-
.v2_button #install_now, #activate_now {
|
180 |
-
width: 112px;
|
181 |
-
height: 32px;
|
182 |
-
line-height: 30px;
|
183 |
-
font-size: 14px;
|
184 |
-
text-align: center;
|
185 |
-
padding: 0;
|
186 |
-
}
|
187 |
-
#v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
|
188 |
-
top: 3px;
|
189 |
-
right: 3px;
|
190 |
-
padding: 0px;
|
191 |
-
}
|
192 |
-
.v2_button .button {
|
193 |
-
position: relative;
|
194 |
-
}
|
195 |
-
.v2_button .button #loading {
|
196 |
-
position: absolute;
|
197 |
-
right: 10px;
|
198 |
-
top: 50%;
|
199 |
-
transform: translateY(-50%);
|
200 |
-
margin: 0px;
|
201 |
-
background-size: 12px 12px;
|
202 |
-
filter: alpha(opacity=70);
|
203 |
-
width: 12px;
|
204 |
-
height: 12px;
|
205 |
-
}
|
206 |
-
@media only screen and (max-width: 1200px) and (min-width: 821px) {
|
207 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
208 |
-
height: 50px;
|
209 |
-
min-height: 50px;
|
210 |
-
}
|
211 |
-
#v2_tenweb_notice_cont {
|
212 |
-
height: 60px;
|
213 |
-
}
|
214 |
-
.v2_content {
|
215 |
-
margin-left: 25px;
|
216 |
-
}
|
217 |
-
.v2_content p {
|
218 |
-
font-size: 14px;
|
219 |
-
color: #333B46;
|
220 |
-
font-weight: 600;
|
221 |
-
line-height: 20px;
|
222 |
-
margin-top: 5px;
|
223 |
-
}
|
224 |
-
.v2_content p span {
|
225 |
-
display: block;
|
226 |
-
}
|
227 |
-
#wd_tenweb_logo_notice {
|
228 |
-
margin-left: 25px;
|
229 |
-
height: 30px;
|
230 |
-
line-height: 100%;
|
231 |
-
}
|
232 |
-
.v2_button {
|
233 |
-
display: flex;
|
234 |
-
margin-right: 30px;
|
235 |
-
flex-direction: column;
|
236 |
-
justify-content: center;
|
237 |
-
}
|
238 |
-
.v2_button #install_now {
|
239 |
-
width: 112px;
|
240 |
-
height: 32px;
|
241 |
-
line-height: 30px;
|
242 |
-
font-size: 14px;
|
243 |
-
text-align: center;
|
244 |
-
padding: 0;
|
245 |
-
}
|
246 |
-
#v2_tenweb_notice_cont .wd_tenweb_notice_dissmiss.notice-dismiss {
|
247 |
-
top: 3px;
|
248 |
-
right: 3px;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
@media only screen and (max-width: 820px) and (min-width: 781px) {
|
252 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
253 |
-
height: 50px;
|
254 |
-
min-height: 50px;
|
255 |
-
}
|
256 |
-
#v2_tenweb_notice_cont {
|
257 |
-
height: 60px;
|
258 |
-
}
|
259 |
-
.v2_content {
|
260 |
-
margin-left: 25px;
|
261 |
-
}
|
262 |
-
.v2_content p {
|
263 |
-
font-size: 13px;
|
264 |
-
color: #333B46;
|
265 |
-
font-weight: 600;
|
266 |
-
line-height: 20px;
|
267 |
-
margin-top: 5px;
|
268 |
-
}
|
269 |
-
.v2_content p span {
|
270 |
-
display: block;
|
271 |
-
}
|
272 |
-
}
|
273 |
-
@media only screen and (max-width: 780px) {
|
274 |
-
#wpbody-content #v2_tenweb_notice_cont {
|
275 |
-
height: auto;
|
276 |
-
min-height: auto;
|
277 |
-
}
|
278 |
-
#v2_tenweb_notice_cont {
|
279 |
-
height: auto;
|
280 |
-
padding: 5px;
|
281 |
-
}
|
282 |
-
.v2_logo {
|
283 |
-
display: block;
|
284 |
-
height: auto;
|
285 |
-
width: 100%;
|
286 |
-
margin-top: 5px;
|
287 |
-
}
|
288 |
-
.v2_content {
|
289 |
-
display: block;
|
290 |
-
margin-left: 9px;
|
291 |
-
margin-top: 10px;
|
292 |
-
width: calc(100% - 10px);
|
293 |
-
}
|
294 |
-
.v2_content p {
|
295 |
-
line-height: unset;
|
296 |
-
font-size: 15px;
|
297 |
-
line-height: 25px;
|
298 |
-
}
|
299 |
-
.v2_content p span {
|
300 |
-
display: block;
|
301 |
-
}
|
302 |
-
#wd_tenweb_logo_notice {
|
303 |
-
margin-left: 9px;
|
304 |
-
}
|
305 |
-
.v2_button {
|
306 |
-
margin-left: 9px;
|
307 |
-
margin-top: 10px;
|
308 |
-
margin-bottom: 5px;
|
309 |
-
}
|
310 |
-
}
|
311 |
-
</style>
|
312 |
-
<script type="text/javascript">
|
313 |
-
jQuery(document).ready(function () {
|
314 |
-
jQuery('#v2_tenweb_notice_cont').css('display', 'flex');
|
315 |
-
});
|
316 |
-
</script>
|
317 |
-
<div id="v2_tenweb_notice_cont" class="notice wd-notice">
|
318 |
-
<div class="v2_logo">
|
319 |
-
<img id="wd_tenweb_logo_notice" src="<?php echo $this->plugin_url . $this->logo; ?>" />
|
320 |
-
</div>
|
321 |
-
<div class="v2_content">
|
322 |
-
<p>
|
323 |
-
<?php echo $this->text ?>
|
324 |
-
</p>
|
325 |
-
</div>
|
326 |
-
<div class="v2_button">
|
327 |
-
<?php $this->tw_install_button(2); ?>
|
328 |
-
</div>
|
329 |
-
<button type="button" class="wd_tenweb_notice_dissmiss notice-dismiss" onclick="jQuery('#v2_tenweb_notice_cont').attr('style', 'display: none !important;'); jQuery.post('<?php echo $dismiss_url; ?>');">
|
330 |
-
<span class="screen-reader-text"></span></button>
|
331 |
-
<div id="verifyUrl" data-url="<?php echo $verify_url; ?>"></div>
|
332 |
-
</div>
|
333 |
-
<?php
|
334 |
-
echo ob_get_clean();
|
335 |
-
}
|
336 |
-
}
|
337 |
-
|
338 |
-
/**
|
339 |
-
* Change status.
|
340 |
-
*/
|
341 |
-
public function change_status() {
|
342 |
-
$this->upgrade_install_status();
|
343 |
-
if ( $this->status_install ) {
|
344 |
-
$old_opt_array = array();
|
345 |
-
$new_opt_array = array( $this->plugin_slug => $this->plugin_id );
|
346 |
-
$key = 'tenweb_manager_installed';
|
347 |
-
$option = get_option($key);
|
348 |
-
if ( !empty($option) ) {
|
349 |
-
$old_opt_array = (array) json_decode($option);
|
350 |
-
}
|
351 |
-
$array_installed = array_merge($new_opt_array, $old_opt_array);
|
352 |
-
update_option($key, json_encode($array_installed));
|
353 |
-
}
|
354 |
-
$jsondata = array( 'status_install' => $this->status_install, 'status_active' => $this->status_active );
|
355 |
-
echo json_encode($jsondata);
|
356 |
-
exit;
|
357 |
-
}
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Install/activate button.
|
361 |
-
*
|
362 |
-
* @param $v
|
363 |
-
*/
|
364 |
-
public function tw_install_button( $v ) {
|
365 |
-
$prefix = $this->prefix;
|
366 |
-
$install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $this->slug), 'install-plugin_' . $this->slug));
|
367 |
-
$activation_url = $this->na_action_link($this->slug . '/' . $this->base_php, 'activate');
|
368 |
-
$tenweb_url = $this->page_url;
|
369 |
-
$dismiss_url = add_query_arg(array( 'action' => 'wd_tenweb_dismiss' ), admin_url('admin-ajax.php'));
|
370 |
-
$activate = $this->status_install && !$this->status_active ? TRUE : FALSE;
|
371 |
-
?>
|
372 |
-
<a class="button<?php echo($v == 2 ? ' button-primary' : ''); ?> tenweb_activaion"
|
373 |
-
id="<?php echo $activate ? 'activate_now' : 'install_now'; ?>"
|
374 |
-
data-activation="<?php _e("Activation", $prefix); ?>"
|
375 |
-
data-tenweb-url="<?php echo $tenweb_url; ?>"
|
376 |
-
data-install-url="<?php echo $install_url; ?>"
|
377 |
-
data-activate-url="<?php echo $activation_url; ?>">
|
378 |
-
<span class="tenweb_activaion_text"><?php echo $activate ? __("Activate", $prefix) : __("Install", $prefix); ?></span>
|
379 |
-
<span class="spinner" id="loading"></span>
|
380 |
-
</a>
|
381 |
-
<span class="hide <?php echo $activate ? 'error_activate' : 'error_install tenweb_active'; ?> ">
|
382 |
-
<?php echo $activate ? __("Activation failed, please try again.", $prefix) : __("Installation failed, please try again.", $prefix); ?>
|
383 |
-
</span>
|
384 |
-
<script>
|
385 |
-
var url = jQuery(".tenweb_activaion").attr("data-install-url");
|
386 |
-
var activate_url = jQuery(".tenweb_activaion").attr("data-activate-url");
|
387 |
-
|
388 |
-
function install_tenweb_plugin() {
|
389 |
-
jQuery("#loading").addClass('is-active');
|
390 |
-
jQuery(this).prop('disable', true);
|
391 |
-
jQuery.ajax({
|
392 |
-
method: "POST",
|
393 |
-
url: url,
|
394 |
-
}).done(function () {
|
395 |
-
/* Check if plugin installed.*/
|
396 |
-
jQuery.ajax({
|
397 |
-
type: 'POST',
|
398 |
-
dataType: 'json',
|
399 |
-
url: jQuery("#verifyUrl").attr('data-url'),
|
400 |
-
error: function () {
|
401 |
-
jQuery("#loading").removeClass('is-active');
|
402 |
-
jQuery(".error_install").show();
|
403 |
-
},
|
404 |
-
success: function (response) {
|
405 |
-
if (response.status_install == 1) {
|
406 |
-
jQuery('#install_now .tenweb_activaion_text').text(jQuery("#install_now").data("activation"));
|
407 |
-
activate_tenweb_plugin();
|
408 |
-
}
|
409 |
-
else {
|
410 |
-
jQuery("#loading").removeClass('is-active');
|
411 |
-
jQuery(".error_install").removeClass('hide');
|
412 |
-
}
|
413 |
-
}
|
414 |
-
});
|
415 |
-
}).fail(function () {
|
416 |
-
jQuery("#loading").removeClass('is-active');
|
417 |
-
jQuery(".error_install").removeClass('hide');
|
418 |
-
});
|
419 |
-
}
|
420 |
-
|
421 |
-
function activate_tenweb_plugin() {
|
422 |
-
jQuery("#activate_now #loading").addClass('is-active');
|
423 |
-
jQuery.ajax({
|
424 |
-
method: "POST",
|
425 |
-
url: activate_url,
|
426 |
-
}).done(function () {
|
427 |
-
jQuery("#loading").removeClass('is-active');
|
428 |
-
var data_tenweb_url = '';
|
429 |
-
/* Check if plugin installed.*/
|
430 |
-
jQuery.ajax({
|
431 |
-
type: 'POST',
|
432 |
-
dataType: 'json',
|
433 |
-
url: jQuery("#verifyUrl").attr('data-url'),
|
434 |
-
error: function () {
|
435 |
-
jQuery("#loading").removeClass('is-active');
|
436 |
-
jQuery(".error_activate").removeClass('hide');
|
437 |
-
},
|
438 |
-
success: function (response) {
|
439 |
-
if (response.status_active == 1) {
|
440 |
-
//jQuery('#install_now').addClass('hide');
|
441 |
-
data_tenweb_url = jQuery('.tenweb_activaion').attr('data-tenweb-url');
|
442 |
-
jQuery.post('<?php echo $dismiss_url; ?>');
|
443 |
-
}
|
444 |
-
else {
|
445 |
-
jQuery("#loading").removeClass('is-active');
|
446 |
-
jQuery(".error_activate").removeClass('hide');
|
447 |
-
}
|
448 |
-
},
|
449 |
-
complete: function () {
|
450 |
-
if (data_tenweb_url != '') {
|
451 |
-
window.location.href = data_tenweb_url;
|
452 |
-
}
|
453 |
-
}
|
454 |
-
});
|
455 |
-
}).fail(function () {
|
456 |
-
jQuery("#loading").removeClass('is-active');
|
457 |
-
});
|
458 |
-
}
|
459 |
-
|
460 |
-
jQuery("#install_now").on("click", function () {
|
461 |
-
install_tenweb_plugin();
|
462 |
-
});
|
463 |
-
jQuery("#activate_now").on("click", function () {
|
464 |
-
activate_tenweb_plugin();
|
465 |
-
});
|
466 |
-
</script>
|
467 |
-
<?php
|
468 |
-
}
|
469 |
-
|
470 |
-
/**
|
471 |
-
* Check if plugin is installed.
|
472 |
-
*
|
473 |
-
* @param $plugin_slug
|
474 |
-
*
|
475 |
-
* @return bool
|
476 |
-
*/
|
477 |
-
public function is_plugin_installed( $plugin_slug ) {
|
478 |
-
if ( is_dir(WP_PLUGIN_DIR . '/' . $plugin_slug) ) {
|
479 |
-
return TRUE;
|
480 |
-
}
|
481 |
-
|
482 |
-
return FALSE;
|
483 |
-
}
|
484 |
-
|
485 |
-
/**
|
486 |
-
* Check if plugin is must used.
|
487 |
-
*
|
488 |
-
* @param $plugin_slug
|
489 |
-
*
|
490 |
-
* @return bool
|
491 |
-
*/
|
492 |
-
public function is_plugin_mu( $plugin_slug ) {
|
493 |
-
if ( $plugin_slug != '' ) {
|
494 |
-
if ( is_dir(WPMU_PLUGIN_DIR . '/' . $plugin_slug) ) {
|
495 |
-
return TRUE;
|
496 |
-
}
|
497 |
-
}
|
498 |
-
|
499 |
-
return FALSE;
|
500 |
-
}
|
501 |
-
|
502 |
-
public function na_action_link( $plugin, $action = 'activate' ) {
|
503 |
-
if ( strpos($plugin, '/') ) {
|
504 |
-
$plugin = str_replace('\/', '%2F', $plugin);
|
505 |
-
}
|
506 |
-
$url = sprintf(admin_url('plugins.php?action=' . $action . '&plugin=%s&plugin_status=all&paged=1&s'), $plugin);
|
507 |
-
$_REQUEST['plugin'] = $plugin;
|
508 |
-
$url = wp_nonce_url($url, $action . '-plugin_' . $plugin);
|
509 |
-
|
510 |
-
return $url;
|
511 |
-
}
|
512 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/bwg_tables.css
CHANGED
@@ -731,7 +731,7 @@
|
|
731 |
.widefat .check-column {
|
732 |
text-align: center;
|
733 |
vertical-align:top;
|
734 |
-
padding:8px 0 !important;
|
735 |
}
|
736 |
|
737 |
.select_all_album {
|
@@ -1942,7 +1942,9 @@ li.tabs {
|
|
1942 |
.wd-box-content select,
|
1943 |
.wd-box-content textarea,
|
1944 |
.wd-block-content {
|
1945 |
-
background: #fff
|
|
|
|
|
1946 |
border: 1px solid #ddd;
|
1947 |
border-radius: 4px;
|
1948 |
box-shadow: none;
|
@@ -2259,6 +2261,7 @@ li.tabs {
|
|
2259 |
width: 100px;
|
2260 |
}
|
2261 |
#search_in_options_container{
|
|
|
2262 |
margin-bottom: 0;
|
2263 |
display: flex;
|
2264 |
flex-direction: row;
|
731 |
.widefat .check-column {
|
732 |
text-align: center;
|
733 |
vertical-align:top;
|
734 |
+
padding: 8px 0 0 10px !important;
|
735 |
}
|
736 |
|
737 |
.select_all_album {
|
1942 |
.wd-box-content select,
|
1943 |
.wd-box-content textarea,
|
1944 |
.wd-block-content {
|
1945 |
+
background-color: #fff;
|
1946 |
+
background-repeat: no-repeat;
|
1947 |
+
background-attachment: scroll;
|
1948 |
border: 1px solid #ddd;
|
1949 |
border-radius: 4px;
|
1950 |
box-shadow: none;
|
2261 |
width: 100px;
|
2262 |
}
|
2263 |
#search_in_options_container{
|
2264 |
+
height: 35px;
|
2265 |
margin-bottom: 0;
|
2266 |
display: flex;
|
2267 |
flex-direction: row;
|
filemanager/UploadHandler.php
CHANGED
@@ -21,7 +21,7 @@ else {
|
|
21 |
require_once(BWG()->plugin_dir . '/filemanager/controller.php');
|
22 |
$controller = new FilemanagerController();
|
23 |
$upload_handler = new bwg_UploadHandler(array(
|
24 |
-
'upload_dir' => $controller->uploads_dir . (isset($_GET['dir']) ? str_replace('\\', '', (
|
25 |
'upload_url' => $controller->uploads_url,
|
26 |
'accept_file_types' => '/\.(gif|jpe?g|png|svg|aac|m4a|f4a|oga|ogg|mp3|zip)$/i',
|
27 |
));
|
@@ -91,8 +91,8 @@ class bwg_UploadHandler {
|
|
91 |
// The maximum number of files for the upload directory:
|
92 |
'max_number_of_files' => NULL,
|
93 |
// Image resolution restrictions:
|
94 |
-
'max_width' => (isset($_POST['upload_img_width']) ? (
|
95 |
-
'max_height' => (isset($_POST['upload_img_height']) ? (
|
96 |
'min_width' => 1,
|
97 |
'min_height' => 1,
|
98 |
// Set the following option to false to enable resumable uploads:
|
@@ -117,8 +117,8 @@ class bwg_UploadHandler {
|
|
117 |
'jpeg_quality' => BWG()->options->jpeg_quality,
|
118 |
),
|
119 |
'thumb' => array(
|
120 |
-
'max_width' => ((isset($_POST['upload_thumb_width']) && (
|
121 |
-
'max_height' => ((isset($_POST['upload_thumb_height']) && (
|
122 |
'jpeg_quality' => BWG()->options->jpeg_quality,
|
123 |
),
|
124 |
),
|
@@ -182,7 +182,7 @@ class bwg_UploadHandler {
|
|
182 |
protected function get_upload_path( $file_name = NULL, $version = NULL ) {
|
183 |
$file_name = $file_name ? $file_name : '';
|
184 |
$version_path = empty($version) ? '' : $version . '/';
|
185 |
-
$media_library_folder = (isset($_REQUEST['import']) &&
|
186 |
|
187 |
return $this->options['upload_dir'] . $media_library_folder . $this->get_user_path() . $version_path . $file_name;
|
188 |
}
|
@@ -818,7 +818,7 @@ class bwg_UploadHandler {
|
|
818 |
protected function generate_response( $content, $print_response = TRUE ) {
|
819 |
if ( $print_response ) {
|
820 |
$json = json_encode($content);
|
821 |
-
$redirect = isset($_REQUEST['redirect']) ?
|
822 |
if ( $redirect ) {
|
823 |
$this->header('Location: ' . sprintf($redirect, rawurlencode($json)));
|
824 |
|
@@ -838,11 +838,11 @@ class bwg_UploadHandler {
|
|
838 |
}
|
839 |
|
840 |
protected function get_version_param() {
|
841 |
-
return isset($_GET['version']) ? basename(stripslashes(
|
842 |
}
|
843 |
|
844 |
protected function get_file_name_param() {
|
845 |
-
return isset($_GET['file']) ? basename(stripslashes(
|
846 |
}
|
847 |
|
848 |
protected function get_file_type( $file_path ) {
|
@@ -920,8 +920,8 @@ class bwg_UploadHandler {
|
|
920 |
}
|
921 |
|
922 |
public function get( $print_response = TRUE ) {
|
923 |
-
if ( isset($_GET['import']) &&
|
924 |
-
$file_names = json_decode(isset($_REQUEST['file_namesML']) ? stripslashes(
|
925 |
$files = array();
|
926 |
foreach ( $file_names as $index => $value ) {
|
927 |
$file_name_array = explode('/', $value);
|
@@ -951,10 +951,10 @@ class bwg_UploadHandler {
|
|
951 |
|
952 |
public function post( $print_response = TRUE ) {
|
953 |
global $wpdb;
|
954 |
-
$path = isset($_REQUEST['dir']) ? str_replace('\\', '', (
|
955 |
-
if ( isset($_REQUEST['import']) &&
|
956 |
$files = array();
|
957 |
-
$file_names = json_decode(isset($_REQUEST['file_namesML']) ? stripslashes(
|
958 |
if ( !empty($file_names) ) {
|
959 |
// Create IMPORTED_FROM_MEDIA_LIBRAY folder.
|
960 |
if ( !is_dir($this->get_upload_path()) ) {
|
@@ -980,7 +980,7 @@ class bwg_UploadHandler {
|
|
980 |
|
981 |
return;
|
982 |
}
|
983 |
-
if ( isset($_REQUEST['_method']) &&
|
984 |
return $this->delete($print_response);
|
985 |
}
|
986 |
$upload = isset($_FILES[$this->options['param_name']]) ? $_FILES[$this->options['param_name']] : NULL;
|
@@ -1116,4 +1116,4 @@ class bwg_UploadHandler {
|
|
1116 |
}
|
1117 |
}
|
1118 |
|
1119 |
-
die();
|
21 |
require_once(BWG()->plugin_dir . '/filemanager/controller.php');
|
22 |
$controller = new FilemanagerController();
|
23 |
$upload_handler = new bwg_UploadHandler(array(
|
24 |
+
'upload_dir' => $controller->uploads_dir . (isset($_GET['dir']) ? str_replace('\\', '', (WDWLibrary::get('dir','','sanitize_text_field','GET'))) : '/'),
|
25 |
'upload_url' => $controller->uploads_url,
|
26 |
'accept_file_types' => '/\.(gif|jpe?g|png|svg|aac|m4a|f4a|oga|ogg|mp3|zip)$/i',
|
27 |
));
|
91 |
// The maximum number of files for the upload directory:
|
92 |
'max_number_of_files' => NULL,
|
93 |
// Image resolution restrictions:
|
94 |
+
'max_width' => (isset($_POST['upload_img_width']) ? WDWLibrary::get('upload_img_width','','intval','POST') : BWG()->options->upload_img_width),
|
95 |
+
'max_height' => (isset($_POST['upload_img_height']) ? WDWLibrary::get('upload_img_height','','intval','POST') : BWG()->options->upload_img_height),
|
96 |
'min_width' => 1,
|
97 |
'min_height' => 1,
|
98 |
// Set the following option to false to enable resumable uploads:
|
117 |
'jpeg_quality' => BWG()->options->jpeg_quality,
|
118 |
),
|
119 |
'thumb' => array(
|
120 |
+
'max_width' => ((isset($_POST['upload_thumb_width']) && WDWLibrary::get('upload_thumb_width',0,'intval','POST')) ? WDWLibrary::get('upload_thumb_width',0,'intval','POST') : BWG()->options->upload_thumb_width),
|
121 |
+
'max_height' => ((isset($_POST['upload_thumb_height']) && WDWLibrary::get('upload_thumb_height',0,'intval','POST')) ? WDWLibrary::get('upload_thumb_height',0,'intval','POST') : BWG()->options->upload_thumb_height),
|
122 |
'jpeg_quality' => BWG()->options->jpeg_quality,
|
123 |
),
|
124 |
),
|
182 |
protected function get_upload_path( $file_name = NULL, $version = NULL ) {
|
183 |
$file_name = $file_name ? $file_name : '';
|
184 |
$version_path = empty($version) ? '' : $version . '/';
|
185 |
+
$media_library_folder = (isset($_REQUEST['import']) && WDWLibrary::get('import',0,'intval','REQUEST') == 1) ? $this->options['media_library_folder'] : '';
|
186 |
|
187 |
return $this->options['upload_dir'] . $media_library_folder . $this->get_user_path() . $version_path . $file_name;
|
188 |
}
|
818 |
protected function generate_response( $content, $print_response = TRUE ) {
|
819 |
if ( $print_response ) {
|
820 |
$json = json_encode($content);
|
821 |
+
$redirect = isset($_REQUEST['redirect']) ? WDWLibrary::get('redirect','','sanitize_text_field','REQUEST') : NULL;
|
822 |
if ( $redirect ) {
|
823 |
$this->header('Location: ' . sprintf($redirect, rawurlencode($json)));
|
824 |
|
838 |
}
|
839 |
|
840 |
protected function get_version_param() {
|
841 |
+
return isset($_GET['version']) ? basename(stripslashes(WDWLibrary::get('version','','sanitize_text_field','GET'))) : NULL;
|
842 |
}
|
843 |
|
844 |
protected function get_file_name_param() {
|
845 |
+
return isset($_GET['file']) ? basename(stripslashes(WDWLibrary::get('file','','sanitize_text_field','GET'))) : NULL;
|
846 |
}
|
847 |
|
848 |
protected function get_file_type( $file_path ) {
|
920 |
}
|
921 |
|
922 |
public function get( $print_response = TRUE ) {
|
923 |
+
if ( isset($_GET['import']) && WDWLibrary::get('import',0,'intval','GET') == 1 ) {
|
924 |
+
$file_names = json_decode(isset($_REQUEST['file_namesML']) ? stripslashes(WDWLibrary::get('file_namesML','','sanitize_text_field','REQUEST')) : '');
|
925 |
$files = array();
|
926 |
foreach ( $file_names as $index => $value ) {
|
927 |
$file_name_array = explode('/', $value);
|
951 |
|
952 |
public function post( $print_response = TRUE ) {
|
953 |
global $wpdb;
|
954 |
+
$path = isset($_REQUEST['dir']) ? str_replace('\\', '', (WDWLibrary::get('dir','','sanitize_text_field','REQUEST'))) . '/' : '/';
|
955 |
+
if ( isset($_REQUEST['import']) && WDWLibrary::get('import',0,'intval','REQUEST') == 1 ) {
|
956 |
$files = array();
|
957 |
+
$file_names = json_decode(isset($_REQUEST['file_namesML']) ? stripslashes(WDWLibrary::get('file_namesML','','sanitize_text_field','REQUEST')) : array());
|
958 |
if ( !empty($file_names) ) {
|
959 |
// Create IMPORTED_FROM_MEDIA_LIBRAY folder.
|
960 |
if ( !is_dir($this->get_upload_path()) ) {
|
980 |
|
981 |
return;
|
982 |
}
|
983 |
+
if ( isset($_REQUEST['_method']) && WDWLibrary::get('_method','','sanitize_text_field','REQUEST') === 'DELETE' ) {
|
984 |
return $this->delete($print_response);
|
985 |
}
|
986 |
$upload = isset($_FILES[$this->options['param_name']]) ? $_FILES[$this->options['param_name']] : NULL;
|
1116 |
}
|
1117 |
}
|
1118 |
|
1119 |
+
die();
|
filemanager/controller.php
CHANGED
@@ -23,7 +23,7 @@ class FilemanagerController {
|
|
23 |
}
|
24 |
|
25 |
public function execute() {
|
26 |
-
$task = isset($_REQUEST['task']) ? stripslashes(
|
27 |
if (method_exists($this, $task)) {
|
28 |
$this->$task();
|
29 |
}
|
@@ -153,14 +153,15 @@ class FilemanagerController {
|
|
153 |
}
|
154 |
|
155 |
public function make_dir() {
|
|
|
156 |
global $wpdb;
|
157 |
-
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '',
|
158 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
159 |
$input_dir = $this->esc_dir($input_dir);
|
160 |
|
161 |
$cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
|
162 |
|
163 |
-
$new_dir_path_name = isset($_REQUEST['new_dir_name']) ? stripslashes(
|
164 |
|
165 |
// Do not sanitize folder name, if it contents mime types in name
|
166 |
$mime_types = wp_get_mime_types();
|
@@ -197,8 +198,8 @@ class FilemanagerController {
|
|
197 |
'bwg_width' => '850',
|
198 |
'bwg_height' => '550',
|
199 |
'task' => 'display',
|
200 |
-
'extensions' =>
|
201 |
-
'callback' =>
|
202 |
'dir' => $input_dir,
|
203 |
'TB_iframe' => '1',
|
204 |
);
|
@@ -211,8 +212,8 @@ class FilemanagerController {
|
|
211 |
public function parsing_items() {
|
212 |
$dir = $this->model->get_from_session('dir', '');
|
213 |
$dir = ($dir == '' || $dir == '/') ? '/' : $dir .'/';
|
214 |
-
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '',
|
215 |
-
$valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(
|
216 |
$parsing = $this->model->files_parsing_db(array(
|
217 |
'refresh' => true,
|
218 |
'dir' => BWG()->upload_dir . $dir,
|
@@ -226,8 +227,8 @@ class FilemanagerController {
|
|
226 |
'width' => '850',
|
227 |
'height' => '550',
|
228 |
'task' => 'display',
|
229 |
-
'extensions' =>
|
230 |
-
'callback' =>
|
231 |
'dir' => $input_dir,
|
232 |
'TB_iframe' => '1',
|
233 |
);
|
@@ -239,18 +240,19 @@ class FilemanagerController {
|
|
239 |
|
240 |
public function rename_item() {
|
241 |
global $wpdb;
|
242 |
-
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '',
|
243 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
244 |
$input_dir = $this->esc_dir($input_dir);
|
245 |
|
246 |
$cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
|
247 |
|
248 |
-
$file_names = explode('**#**', (isset($_REQUEST['file_names']) ? stripslashes(
|
|
|
249 |
$file_name = $file_names[0];
|
250 |
$file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
|
251 |
$file_name = str_replace('../', '', $file_name);
|
252 |
|
253 |
-
$file_new_name = (isset($_REQUEST['file_new_name']) ? stripslashes(
|
254 |
$file_new_name = htmlspecialchars_decode($file_new_name, ENT_COMPAT | ENT_QUOTES);
|
255 |
$file_new_name = $this->esc_dir($file_new_name);
|
256 |
|
@@ -338,8 +340,8 @@ class FilemanagerController {
|
|
338 |
'bwg_width' => '850',
|
339 |
'bwg_height' => '550',
|
340 |
'task' => 'display',
|
341 |
-
'extensions' =>
|
342 |
-
'callback' =>
|
343 |
'dir' => $input_dir,
|
344 |
'TB_iframe' => '1',
|
345 |
);
|
@@ -351,13 +353,13 @@ class FilemanagerController {
|
|
351 |
|
352 |
public function remove_items() {
|
353 |
global $wpdb;
|
354 |
-
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', (
|
355 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
356 |
$input_dir = $this->esc_dir($input_dir);
|
357 |
|
358 |
$cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
|
359 |
|
360 |
-
$file_names = explode('**#**', (isset($_REQUEST['file_names']) ? stripslashes(
|
361 |
$path = $input_dir .'/';
|
362 |
$msg = '';
|
363 |
$file_path_tbl = $wpdb->prefix . 'bwg_file_paths';
|
@@ -399,8 +401,8 @@ class FilemanagerController {
|
|
399 |
'bwg_width' => '850',
|
400 |
'bwg_height' => '550',
|
401 |
'task' => 'show_file_manager',
|
402 |
-
'extensions' =>
|
403 |
-
'callback' =>
|
404 |
'dir' => $input_dir,
|
405 |
'TB_iframe' => '1',
|
406 |
);
|
@@ -412,30 +414,31 @@ class FilemanagerController {
|
|
412 |
|
413 |
public function paste_items() {
|
414 |
global $wpdb;
|
415 |
-
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', (
|
416 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
417 |
$input_dir = $this->esc_dir($input_dir);
|
418 |
|
|
|
419 |
$msg = '';
|
420 |
$flag = TRUE;
|
421 |
|
422 |
-
$file_names = explode('**#**', (isset($_REQUEST['clipboard_files']) ? stripslashes(
|
423 |
-
$src_dir = (isset($_REQUEST['clipboard_src']) ? stripslashes(
|
424 |
$relative_source_dir = $src_dir;
|
425 |
$src_dir = $src_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $src_dir;
|
426 |
$src_dir = htmlspecialchars_decode($src_dir, ENT_COMPAT | ENT_QUOTES);
|
427 |
$src_dir = $this->esc_dir($src_dir);
|
428 |
|
429 |
-
$dest_dir = (isset($_REQUEST['clipboard_dest']) ? stripslashes(
|
430 |
$dest_dir = $dest_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $dest_dir;
|
431 |
$dest_dir = htmlspecialchars_decode($dest_dir, ENT_COMPAT | ENT_QUOTES);
|
432 |
$dest_dir = $this->esc_dir($dest_dir);
|
433 |
|
434 |
-
$path_old = (isset($_REQUEST['clipboard_src']) ? stripslashes(
|
435 |
-
$path_new = (isset($_REQUEST['clipboard_dest']) ? stripslashes(
|
436 |
$file_path_tbl = $wpdb->prefix . 'bwg_file_paths';
|
437 |
|
438 |
-
switch ((isset($_REQUEST['clipboard_task']) ? stripslashes(
|
439 |
case 'copy': {
|
440 |
foreach ($file_names as $file_name) {
|
441 |
$file = $wpdb->get_row( 'SELECT * FROM `' . $file_path_tbl . '` WHERE `path` ="' . $path_old . '" AND `name`="' . $file_name . '"', 'ARRAY_A' );
|
@@ -494,7 +497,7 @@ class FilemanagerController {
|
|
494 |
}
|
495 |
else {
|
496 |
$path_where = '/'. $file_name .'/';
|
497 |
-
$path_file = (isset($_REQUEST['clipboard_dest']) ? stripslashes(
|
498 |
|
499 |
$file['path'] = $path_file;
|
500 |
$file['name'] = !empty($new_file_title) ? $new_file_title : $file['name'];
|
@@ -589,11 +592,12 @@ class FilemanagerController {
|
|
589 |
'bwg_width' => '850',
|
590 |
'bwg_height' => '550',
|
591 |
'task' => 'show_file_manager',
|
592 |
-
'extensions' =>
|
593 |
-
'callback' =>
|
594 |
'dir' => $input_dir,
|
595 |
'TB_iframe' => '1',
|
596 |
);
|
|
|
597 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' );
|
598 |
$query_url = add_query_arg($args, $query_url);
|
599 |
header('Location: ' . $query_url);
|
@@ -603,16 +607,17 @@ class FilemanagerController {
|
|
603 |
public function import_items() {
|
604 |
$args = array(
|
605 |
'action' => 'bwg_UploadHandler',
|
606 |
-
'importer_thumb_width' =>
|
607 |
-
'importer_thumb_height' =>
|
608 |
-
'callback' =>
|
609 |
-
'file_namesML' =>
|
610 |
-
'importer_img_width' =>
|
611 |
-
'importer_img_height' =>
|
612 |
'import' => 'true',
|
613 |
-
'redir' =>
|
614 |
-
'dir' =>
|
615 |
);
|
|
|
616 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'bwg_UploadHandler', 'bwg_nonce' );
|
617 |
$query_url = add_query_arg($args, $query_url);
|
618 |
header('Location: ' . $query_url);
|
23 |
}
|
24 |
|
25 |
public function execute() {
|
26 |
+
$task = isset($_REQUEST['task']) ? stripslashes(WDWLibrary::get('task','','sanitize_text_field','REQUEST')) : 'display';
|
27 |
if (method_exists($this, $task)) {
|
28 |
$this->$task();
|
29 |
}
|
153 |
}
|
154 |
|
155 |
public function make_dir() {
|
156 |
+
|
157 |
global $wpdb;
|
158 |
+
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', WDWLibrary::get('dir','','sanitize_text_field','REQUEST')) : '');
|
159 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
160 |
$input_dir = $this->esc_dir($input_dir);
|
161 |
|
162 |
$cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
|
163 |
|
164 |
+
$new_dir_path_name = isset($_REQUEST['new_dir_name']) ? stripslashes(WDWLibrary::get('new_dir_name','','sanitize_text_field','REQUEST')) : '';
|
165 |
|
166 |
// Do not sanitize folder name, if it contents mime types in name
|
167 |
$mime_types = wp_get_mime_types();
|
198 |
'bwg_width' => '850',
|
199 |
'bwg_height' => '550',
|
200 |
'task' => 'display',
|
201 |
+
'extensions' => WDWLibrary::get('extensions'),
|
202 |
+
'callback' => WDWLibrary::get('callback'),
|
203 |
'dir' => $input_dir,
|
204 |
'TB_iframe' => '1',
|
205 |
);
|
212 |
public function parsing_items() {
|
213 |
$dir = $this->model->get_from_session('dir', '');
|
214 |
$dir = ($dir == '' || $dir == '/') ? '/' : $dir .'/';
|
215 |
+
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', WDWLibrary::get('dir','','sanitize_text_field','REQUEST')) : '');
|
216 |
+
$valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(WDWLibrary::get('extensions','','sanitize_text_field','REQUEST')) : '*');
|
217 |
$parsing = $this->model->files_parsing_db(array(
|
218 |
'refresh' => true,
|
219 |
'dir' => BWG()->upload_dir . $dir,
|
227 |
'width' => '850',
|
228 |
'height' => '550',
|
229 |
'task' => 'display',
|
230 |
+
'extensions' => WDWLibrary::get('extensions'),
|
231 |
+
'callback' => WDWLibrary::get('callback'),
|
232 |
'dir' => $input_dir,
|
233 |
'TB_iframe' => '1',
|
234 |
);
|
240 |
|
241 |
public function rename_item() {
|
242 |
global $wpdb;
|
243 |
+
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', WDWLibrary::get('dir','','sanitize_text_field','REQUEST')) : '');
|
244 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
245 |
$input_dir = $this->esc_dir($input_dir);
|
246 |
|
247 |
$cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
|
248 |
|
249 |
+
$file_names = explode('**#**', (isset($_REQUEST['file_names']) ? stripslashes(WDWLibrary::get('file_names','','sanitize_text_field','REQUEST')) : ''));
|
250 |
+
|
251 |
$file_name = $file_names[0];
|
252 |
$file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
|
253 |
$file_name = str_replace('../', '', $file_name);
|
254 |
|
255 |
+
$file_new_name = (isset($_REQUEST['file_new_name']) ? stripslashes(WDWLibrary::get('file_new_name','','sanitize_text_field','REQUEST')) : '');
|
256 |
$file_new_name = htmlspecialchars_decode($file_new_name, ENT_COMPAT | ENT_QUOTES);
|
257 |
$file_new_name = $this->esc_dir($file_new_name);
|
258 |
|
340 |
'bwg_width' => '850',
|
341 |
'bwg_height' => '550',
|
342 |
'task' => 'display',
|
343 |
+
'extensions' => WDWLibrary::get('extensions'),
|
344 |
+
'callback' => WDWLibrary::get('callback'),
|
345 |
'dir' => $input_dir,
|
346 |
'TB_iframe' => '1',
|
347 |
);
|
353 |
|
354 |
public function remove_items() {
|
355 |
global $wpdb;
|
356 |
+
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', (WDWLibrary::get('dir','','sanitize_text_field','REQUEST'))) : '');
|
357 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
358 |
$input_dir = $this->esc_dir($input_dir);
|
359 |
|
360 |
$cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
|
361 |
|
362 |
+
$file_names = explode('**#**', (isset($_REQUEST['file_names']) ? stripslashes(WDWLibrary::get('file_names','','sanitize_text_field','REQUEST')) : ''));
|
363 |
$path = $input_dir .'/';
|
364 |
$msg = '';
|
365 |
$file_path_tbl = $wpdb->prefix . 'bwg_file_paths';
|
401 |
'bwg_width' => '850',
|
402 |
'bwg_height' => '550',
|
403 |
'task' => 'show_file_manager',
|
404 |
+
'extensions' => WDWLibrary::get('extensions'),
|
405 |
+
'callback' => WDWLibrary::get('callback'),
|
406 |
'dir' => $input_dir,
|
407 |
'TB_iframe' => '1',
|
408 |
);
|
414 |
|
415 |
public function paste_items() {
|
416 |
global $wpdb;
|
417 |
+
$input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', (WDWLibrary::get('dir','','sanitize_text_field','REQUEST'))) : '');
|
418 |
$input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
|
419 |
$input_dir = $this->esc_dir($input_dir);
|
420 |
|
421 |
+
|
422 |
$msg = '';
|
423 |
$flag = TRUE;
|
424 |
|
425 |
+
$file_names = explode('**#**', (isset($_REQUEST['clipboard_files']) ? stripslashes(WDWLibrary::get('clipboard_files','','sanitize_text_field','REQUEST')) : ''));
|
426 |
+
$src_dir = (isset($_REQUEST['clipboard_src']) ? stripslashes(WDWLibrary::get('clipboard_src','','sanitize_text_field','REQUEST')) : '');
|
427 |
$relative_source_dir = $src_dir;
|
428 |
$src_dir = $src_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $src_dir;
|
429 |
$src_dir = htmlspecialchars_decode($src_dir, ENT_COMPAT | ENT_QUOTES);
|
430 |
$src_dir = $this->esc_dir($src_dir);
|
431 |
|
432 |
+
$dest_dir = (isset($_REQUEST['clipboard_dest']) ? stripslashes(WDWLibrary::get('clipboard_dest','','sanitize_text_field','REQUEST')) : '');
|
433 |
$dest_dir = $dest_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $dest_dir;
|
434 |
$dest_dir = htmlspecialchars_decode($dest_dir, ENT_COMPAT | ENT_QUOTES);
|
435 |
$dest_dir = $this->esc_dir($dest_dir);
|
436 |
|
437 |
+
$path_old = (isset($_REQUEST['clipboard_src']) ? stripslashes(WDWLibrary::get('clipboard_src','','sanitize_text_field','REQUEST')) .'/' : '/');
|
438 |
+
$path_new = (isset($_REQUEST['clipboard_dest']) ? stripslashes(WDWLibrary::get('clipboard_dest','','sanitize_text_field','REQUEST')) .'/' : '/');
|
439 |
$file_path_tbl = $wpdb->prefix . 'bwg_file_paths';
|
440 |
|
441 |
+
switch ((isset($_REQUEST['clipboard_task']) ? stripslashes(WDWLibrary::get('clipboard_task','','sanitize_text_field','REQUEST')) : '')) {
|
442 |
case 'copy': {
|
443 |
foreach ($file_names as $file_name) {
|
444 |
$file = $wpdb->get_row( 'SELECT * FROM `' . $file_path_tbl . '` WHERE `path` ="' . $path_old . '" AND `name`="' . $file_name . '"', 'ARRAY_A' );
|
497 |
}
|
498 |
else {
|
499 |
$path_where = '/'. $file_name .'/';
|
500 |
+
$path_file = (isset($_REQUEST['clipboard_dest']) ? stripslashes(WDWLibrary::get('clipboard_dest','','sanitize_text_field','REQUEST')) .'/' : '');
|
501 |
|
502 |
$file['path'] = $path_file;
|
503 |
$file['name'] = !empty($new_file_title) ? $new_file_title : $file['name'];
|
592 |
'bwg_width' => '850',
|
593 |
'bwg_height' => '550',
|
594 |
'task' => 'show_file_manager',
|
595 |
+
'extensions' => WDWLibrary::get('extensions','','sanitize_text_field','REQUEST'),
|
596 |
+
'callback' => WDWLibrary::get('callback','','sanitize_text_field','REQUEST'),
|
597 |
'dir' => $input_dir,
|
598 |
'TB_iframe' => '1',
|
599 |
);
|
600 |
+
|
601 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' );
|
602 |
$query_url = add_query_arg($args, $query_url);
|
603 |
header('Location: ' . $query_url);
|
607 |
public function import_items() {
|
608 |
$args = array(
|
609 |
'action' => 'bwg_UploadHandler',
|
610 |
+
'importer_thumb_width' => WDWLibrary::get('importer_thumb_width','','intval','REQUEST'),
|
611 |
+
'importer_thumb_height' => WDWLibrary::get('importer_thumb_height','','intval','REQUEST'),
|
612 |
+
'callback' => WDWLibrary::get('callback','','sanitize_text_field','REQUEST'),
|
613 |
+
'file_namesML' => WDWLibrary::get('file_namesML','','sanitize_text_field','REQUEST'),
|
614 |
+
'importer_img_width' => WDWLibrary::get('importer_img_width','','intval','REQUEST'),
|
615 |
+
'importer_img_height' => WDWLibrary::get('importer_img_height','','intval','REQUEST'),
|
616 |
'import' => 'true',
|
617 |
+
'redir' => WDWLibrary::get('dir','','sanitize_text_field','REQUEST'),
|
618 |
+
'dir' => WDWLibrary::get('dir','','sanitize_text_field','REQUEST') . '/',
|
619 |
);
|
620 |
+
|
621 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'bwg_UploadHandler', 'bwg_nonce' );
|
622 |
$query_url = add_query_arg($args, $query_url);
|
623 |
header('Location: ' . $query_url);
|
filemanager/model.php
CHANGED
@@ -275,7 +275,7 @@ class FilemanagerModel {
|
|
275 |
*/
|
276 |
public function get_from_session( $key, $default ) {
|
277 |
if (isset($_REQUEST[$key])) {
|
278 |
-
$_REQUEST[$key] = stripslashes($
|
279 |
}
|
280 |
else {
|
281 |
$_REQUEST[$key] = stripslashes($default);
|
@@ -283,4 +283,4 @@ class FilemanagerModel {
|
|
283 |
|
284 |
return esc_html(stripslashes($_REQUEST[$key]));
|
285 |
}
|
286 |
-
}
|
275 |
*/
|
276 |
public function get_from_session( $key, $default ) {
|
277 |
if (isset($_REQUEST[$key])) {
|
278 |
+
$_REQUEST[$key] = stripslashes(WDWLibrary::get($key,'','sanitize_text_field','REQUEST'));
|
279 |
}
|
280 |
else {
|
281 |
$_REQUEST[$key] = stripslashes($default);
|
283 |
|
284 |
return esc_html(stripslashes($_REQUEST[$key]));
|
285 |
}
|
286 |
+
}
|
filemanager/view.php
CHANGED
@@ -34,14 +34,14 @@ class FilemanagerView {
|
|
34 |
$clipboard_dest = $session['clipboard_dest'];
|
35 |
$items_view = $session['items_view'];
|
36 |
$page_per = $params['page_per'];
|
37 |
-
|
38 |
-
|
39 |
|
40 |
-
if (isset($_GET['filemanager_msg']) &&
|
41 |
?>
|
42 |
<div id="file_manager_message" style="height:40px;">
|
43 |
<div style="background-color: #FFEBE8; border: 1px solid #CC0000; margin: 5px 15px 2px; padding: 5px 10px;">
|
44 |
-
<strong style="font-size:14px"><?php echo
|
45 |
</div>
|
46 |
</div>
|
47 |
<?php
|
@@ -74,9 +74,9 @@ class FilemanagerView {
|
|
74 |
var messageEnterNewName = "<?php echo __('Enter new name', BWG()->prefix); ?>";
|
75 |
var messageFilesUploadComplete = "<?php echo __('Processing uploaded files...', BWG()->prefix); ?>";
|
76 |
var root = "<?php echo addslashes($this->controller->get_uploads_dir()); ?>";
|
77 |
-
var dir = "<?php echo (isset($_REQUEST['dir']) ?
|
78 |
-
var dirUrl = "<?php echo $this->controller->get_uploads_url() . (isset($_REQUEST['dir']) ?
|
79 |
-
var callback = "<?php echo (isset($_REQUEST['callback']) ?
|
80 |
var sortBy = "<?php echo $sort_by; ?>";
|
81 |
var sortOrder = "<?php echo $sort_order; ?>";
|
82 |
var page_per = "<?php echo $page_per; ?>";
|
@@ -210,7 +210,7 @@ class FilemanagerView {
|
|
210 |
</span>
|
211 |
</span>
|
212 |
<?php
|
213 |
-
$add_image_btn = (isset($_REQUEST['callback']) &&
|
214 |
?>
|
215 |
<a id="add_selectid_img" title="<?php echo $add_image_btn; ?>" class="button button-primary button-large" onclick="window.parent.bwg_create_loading_block(); onBtnOpenClick(event, this);">
|
216 |
<div id="bwg_img_add"><?php echo $add_image_btn; ?></div>
|
@@ -246,7 +246,7 @@ class FilemanagerView {
|
|
246 |
<div class="bwg-select-file-text"><?php _e('Drag files here', BWG()->prefix); ?><br><?php _e('or', BWG()->prefix); ?><br><span class="button"><?php _e('Select Files', BWG()->prefix); ?></span></div>
|
247 |
<?php
|
248 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'bwg_UploadHandler', 'bwg_nonce' );
|
249 |
-
$query_url = add_query_arg(array('action' => 'bwg_UploadHandler', 'dir' => (isset($_REQUEST['dir']) ?
|
250 |
?>
|
251 |
<input id="jQueryUploader" type="file" name="files[]"
|
252 |
data-url="<?php echo $query_url; ?>"
|
@@ -268,12 +268,12 @@ class FilemanagerView {
|
|
268 |
</div>
|
269 |
</div>
|
270 |
<input type="hidden" name="task" value="" />
|
271 |
-
<input type="hidden" name="extensions" value="<?php echo (isset($_REQUEST['extensions']) ?
|
272 |
-
<input type="hidden" name="callback" value="<?php echo (isset($_REQUEST['callback']) ?
|
273 |
<input type="hidden" name="sort_by" value="<?php echo $sort_by; ?>" />
|
274 |
<input type="hidden" name="sort_order" value="<?php echo $sort_order; ?>" />
|
275 |
<input type="hidden" name="items_view" value="<?php echo $items_view; ?>" />
|
276 |
-
<input type="hidden" name="dir" value="<?php echo (isset($_REQUEST['dir']) ? str_replace('\\', '', (
|
277 |
<input type="hidden" name="file_names" value="" />
|
278 |
<input type="hidden" name="file_namesML" value="" />
|
279 |
<input type="hidden" name="file_new_name" value="" />
|
34 |
$clipboard_dest = $session['clipboard_dest'];
|
35 |
$items_view = $session['items_view'];
|
36 |
$page_per = $params['page_per'];
|
37 |
+
$ajax_pagination_url = $params["ajax_pagination_url"];
|
38 |
+
$ajax_get_all_select_url = $params["ajax_get_all_select_url"];
|
39 |
|
40 |
+
if (isset($_GET['filemanager_msg']) && WDWLibrary::get('filemanager_msg','','sanitize_text_field','GET') != '') {
|
41 |
?>
|
42 |
<div id="file_manager_message" style="height:40px;">
|
43 |
<div style="background-color: #FFEBE8; border: 1px solid #CC0000; margin: 5px 15px 2px; padding: 5px 10px;">
|
44 |
+
<strong style="font-size:14px"><?php echo stripslashes(WDWLibrary::get('filemanager_msg','','sanitize_text_field','GET')); ?></strong>
|
45 |
</div>
|
46 |
</div>
|
47 |
<?php
|
74 |
var messageEnterNewName = "<?php echo __('Enter new name', BWG()->prefix); ?>";
|
75 |
var messageFilesUploadComplete = "<?php echo __('Processing uploaded files...', BWG()->prefix); ?>";
|
76 |
var root = "<?php echo addslashes($this->controller->get_uploads_dir()); ?>";
|
77 |
+
var dir = "<?php echo (isset($_REQUEST['dir']) ? WDWLibrary::get('dir','','sanitize_text_field','REQUEST') : ''); ?>";
|
78 |
+
var dirUrl = "<?php echo $this->controller->get_uploads_url() . (isset($_REQUEST['dir']) ? WDWLibrary::get('dir','','sanitize_text_field','REQUEST') . '/' : ''); ?>";
|
79 |
+
var callback = "<?php echo (isset($_REQUEST['callback']) ? WDWLibrary::get('callback','','sanitize_text_field','REQUEST') : ''); ?>";
|
80 |
var sortBy = "<?php echo $sort_by; ?>";
|
81 |
var sortOrder = "<?php echo $sort_order; ?>";
|
82 |
var page_per = "<?php echo $page_per; ?>";
|
210 |
</span>
|
211 |
</span>
|
212 |
<?php
|
213 |
+
$add_image_btn = (isset($_REQUEST['callback']) && WDWLibrary::get('callback','','sanitize_text_field','REQUEST') == 'bwg_add_image') ? __('Add selected images to gallery', BWG()->prefix) : __('Add', BWG()->prefix);
|
214 |
?>
|
215 |
<a id="add_selectid_img" title="<?php echo $add_image_btn; ?>" class="button button-primary button-large" onclick="window.parent.bwg_create_loading_block(); onBtnOpenClick(event, this);">
|
216 |
<div id="bwg_img_add"><?php echo $add_image_btn; ?></div>
|
246 |
<div class="bwg-select-file-text"><?php _e('Drag files here', BWG()->prefix); ?><br><?php _e('or', BWG()->prefix); ?><br><span class="button"><?php _e('Select Files', BWG()->prefix); ?></span></div>
|
247 |
<?php
|
248 |
$query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'bwg_UploadHandler', 'bwg_nonce' );
|
249 |
+
$query_url = add_query_arg(array('action' => 'bwg_UploadHandler', 'dir' => (isset($_REQUEST['dir']) ? WDWLibrary::get('dir','','sanitize_text_field','REQUEST') : '') . '/'), $query_url);
|
250 |
?>
|
251 |
<input id="jQueryUploader" type="file" name="files[]"
|
252 |
data-url="<?php echo $query_url; ?>"
|
268 |
</div>
|
269 |
</div>
|
270 |
<input type="hidden" name="task" value="" />
|
271 |
+
<input type="hidden" name="extensions" value="<?php echo (isset($_REQUEST['extensions']) ? WDWLibrary::get('extensions','','sanitize_text_field','REQUEST') : '*'); ?>" />
|
272 |
+
<input type="hidden" name="callback" value="<?php echo (isset($_REQUEST['callback']) ? WDWLibrary::get('callback','','sanitize_text_field','REQUEST') : ''); ?>" />
|
273 |
<input type="hidden" name="sort_by" value="<?php echo $sort_by; ?>" />
|
274 |
<input type="hidden" name="sort_order" value="<?php echo $sort_order; ?>" />
|
275 |
<input type="hidden" name="items_view" value="<?php echo $items_view; ?>" />
|
276 |
+
<input type="hidden" name="dir" value="<?php echo (isset($_REQUEST['dir']) ? str_replace('\\', '', (WDWLibrary::get('dir','','sanitize_text_field','REQUEST'))) : ''); ?>" />
|
277 |
<input type="hidden" name="file_names" value="" />
|
278 |
<input type="hidden" name="file_namesML" value="" />
|
279 |
<input type="hidden" name="file_new_name" value="" />
|
framework/WDWLibrary.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
class WDWLibrary {
|
|
|
4 |
public static $shortcode_ids = array();
|
5 |
|
6 |
public static $thumb_dimansions;
|
@@ -14,19 +15,37 @@ class WDWLibrary {
|
|
14 |
*
|
15 |
* @return string|array
|
16 |
*/
|
17 |
-
public static function get($key, $default_value = '', $callback = '
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
-
|
25 |
-
$
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
-
|
28 |
-
|
|
|
29 |
}
|
|
|
30 |
if (is_array($value)) {
|
31 |
// $callback should be third parameter of the validate_data function, so there is need to add unused second parameter to validate_data function.
|
32 |
array_walk_recursive($value, array('self', 'validate_data'), $callback);
|
@@ -489,8 +508,8 @@ class WDWLibrary {
|
|
489 |
</span>
|
490 |
</div>
|
491 |
<?php if (!$pager) { ?>
|
492 |
-
<input type="hidden" id="page_number" name="page_number" value="<?php echo (
|
493 |
-
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo (
|
494 |
<?php
|
495 |
}
|
496 |
}
|
@@ -638,8 +657,8 @@ class WDWLibrary {
|
|
638 |
</span>
|
639 |
</div>
|
640 |
<?php if (!$pager) { ?>
|
641 |
-
<input type="hidden" id="page_number" name="page_number" value="<?php echo (
|
642 |
-
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo (
|
643 |
<?php
|
644 |
}
|
645 |
}
|
@@ -1228,11 +1247,12 @@ class WDWLibrary {
|
|
1228 |
$items_in_page = $images_per_page;
|
1229 |
$limit = 0;
|
1230 |
WDWLibrary::bwg_session_start();
|
1231 |
-
|
1232 |
-
|
|
|
1233 |
$items_in_page = $load_more_image_count;
|
1234 |
}
|
1235 |
-
$limit = ((
|
1236 |
$bwg_random_seed = isset($_SESSION['bwg_random_seed_' . $bwg]) ? $_SESSION['bwg_random_seed_' . $bwg] : '';
|
1237 |
}
|
1238 |
else {
|
@@ -1247,7 +1267,7 @@ class WDWLibrary {
|
|
1247 |
$join = $tag ? 'LEFT JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id' : '';
|
1248 |
if ( self::get($tag_input_name) ) {
|
1249 |
$join .= ' LEFT JOIN (SELECT GROUP_CONCAT(tag_id SEPARATOR ",") AS tags_combined, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag' . ($gallery_id ? ' WHERE gallery_id="' . $gallery_id . '"' : '') . ' GROUP BY image_id) AS tags ON image.id=tags.image_id';
|
1250 |
-
$where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", $
|
1251 |
}
|
1252 |
$join .= ' LEFT JOIN '. $wpdb->prefix .'bwg_gallery as gallery ON gallery.id = image.gallery_id';
|
1253 |
$where .= ' AND gallery.published = 1 ';
|
@@ -1255,10 +1275,7 @@ class WDWLibrary {
|
|
1255 |
$rows = $wpdb->get_results('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . str_replace('RAND()', 'RAND(' . $bwg_random_seed . ')', $sort_by) . ' ' . $sort_direction . ' ' . $limit_str);
|
1256 |
$total = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where);
|
1257 |
$page_nav['total'] = $total;
|
1258 |
-
$page_nav['limit'] = 1;
|
1259 |
-
if ( isset($_REQUEST['page_number_' . $bwg]) && $_REQUEST['page_number_' . $bwg] ) {
|
1260 |
-
$page_nav['limit'] = (int) $_REQUEST['page_number_' . $bwg];
|
1261 |
-
}
|
1262 |
$images = array();
|
1263 |
if ( !empty($rows) ) {
|
1264 |
foreach ( $rows as $row ) {
|
@@ -2546,8 +2563,8 @@ class WDWLibrary {
|
|
2546 |
* @return string Top bar html.
|
2547 |
*/
|
2548 |
public static function topbar() {
|
2549 |
-
$page =
|
2550 |
-
$taxonomy =
|
2551 |
$user_guide_link = 'https://help.10web.io/hc/en-us/articles/';
|
2552 |
$show_content = true;
|
2553 |
$show_guide_link = true;
|
1 |
<?php
|
2 |
|
3 |
class WDWLibrary {
|
4 |
+
|
5 |
public static $shortcode_ids = array();
|
6 |
|
7 |
public static $thumb_dimansions;
|
15 |
*
|
16 |
* @return string|array
|
17 |
*/
|
18 |
+
public static function get($key, $default_value = '', $callback = 'sanitize_text_field', $type = 'DEFAULT') {
|
19 |
+
switch ($type) {
|
20 |
+
case 'REQUEST' :
|
21 |
+
if (isset($_REQUEST[$key])) {
|
22 |
+
$value = $_REQUEST[$key];
|
23 |
+
}
|
24 |
+
break;
|
25 |
+
case 'DEFAULT' :
|
26 |
+
case 'POST' :
|
27 |
+
if (isset($_POST[$key])) {
|
28 |
+
$value = $_POST[$key];
|
29 |
+
}
|
30 |
+
if ( 'POST' === $type ) break;
|
31 |
+
case 'GET' :
|
32 |
+
if (isset($_GET[$key])) {
|
33 |
+
$value = $_GET[$key];
|
34 |
+
}
|
35 |
+
break;
|
36 |
}
|
37 |
+
if ( !isset($value) ) {
|
38 |
+
if( $default_value === NULL ) {
|
39 |
+
return NULL;
|
40 |
+
} else {
|
41 |
+
$value = $default_value;
|
42 |
+
}
|
43 |
}
|
44 |
+
|
45 |
+
if( is_bool($value) ) {
|
46 |
+
return $value;
|
47 |
}
|
48 |
+
|
49 |
if (is_array($value)) {
|
50 |
// $callback should be third parameter of the validate_data function, so there is need to add unused second parameter to validate_data function.
|
51 |
array_walk_recursive($value, array('self', 'validate_data'), $callback);
|
508 |
</span>
|
509 |
</div>
|
510 |
<?php if (!$pager) { ?>
|
511 |
+
<input type="hidden" id="page_number" name="page_number" value="<?php echo self::get('page_number', 1, 'intval'); ?>" />
|
512 |
+
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo self::get('search_or_not'); ?>"/>
|
513 |
<?php
|
514 |
}
|
515 |
}
|
657 |
</span>
|
658 |
</div>
|
659 |
<?php if (!$pager) { ?>
|
660 |
+
<input type="hidden" id="page_number" name="page_number" value="<?php echo self::get('page_number', 1, 'intval'); ?>" />
|
661 |
+
<input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo self::get('search_or_not'); ?>"/>
|
662 |
<?php
|
663 |
}
|
664 |
}
|
1247 |
$items_in_page = $images_per_page;
|
1248 |
$limit = 0;
|
1249 |
WDWLibrary::bwg_session_start();
|
1250 |
+
$page_number = self::get('page_number_' . $bwg, 0, 'intval');
|
1251 |
+
if ( !empty($page_number) ) {
|
1252 |
+
if ( $page_number > 1 ) {
|
1253 |
$items_in_page = $load_more_image_count;
|
1254 |
}
|
1255 |
+
$limit = ( ($page_number - 2) * $items_in_page ) + $images_per_page;
|
1256 |
$bwg_random_seed = isset($_SESSION['bwg_random_seed_' . $bwg]) ? $_SESSION['bwg_random_seed_' . $bwg] : '';
|
1257 |
}
|
1258 |
else {
|
1267 |
$join = $tag ? 'LEFT JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id' : '';
|
1268 |
if ( self::get($tag_input_name) ) {
|
1269 |
$join .= ' LEFT JOIN (SELECT GROUP_CONCAT(tag_id SEPARATOR ",") AS tags_combined, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag' . ($gallery_id ? ' WHERE gallery_id="' . $gallery_id . '"' : '') . ' GROUP BY image_id) AS tags ON image.id=tags.image_id';
|
1270 |
+
$where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode("|", self::get($tag_input_name) ) . ')," ';
|
1271 |
}
|
1272 |
$join .= ' LEFT JOIN '. $wpdb->prefix .'bwg_gallery as gallery ON gallery.id = image.gallery_id';
|
1273 |
$where .= ' AND gallery.published = 1 ';
|
1275 |
$rows = $wpdb->get_results('SELECT image.* FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where . ' ORDER BY ' . str_replace('RAND()', 'RAND(' . $bwg_random_seed . ')', $sort_by) . ' ' . $sort_direction . ' ' . $limit_str);
|
1276 |
$total = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where);
|
1277 |
$page_nav['total'] = $total;
|
1278 |
+
$page_nav['limit'] = self::get('page_number_' . $bwg, 1, 'intval');
|
|
|
|
|
|
|
1279 |
$images = array();
|
1280 |
if ( !empty($rows) ) {
|
1281 |
foreach ( $rows as $row ) {
|
2563 |
* @return string Top bar html.
|
2564 |
*/
|
2565 |
public static function topbar() {
|
2566 |
+
$page = self::get('page');
|
2567 |
+
$taxonomy = self::get('taxonomy');
|
2568 |
$user_guide_link = 'https://help.10web.io/hc/en-us/articles/';
|
2569 |
$show_content = true;
|
2570 |
$show_guide_link = true;
|
framework/WD_BWG_Theme.php
CHANGED
@@ -1086,4 +1086,42 @@ class WD_BWG_Theme {
|
|
1086 |
}
|
1087 |
}
|
1088 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
}
|
1086 |
}
|
1087 |
}
|
1088 |
}
|
1089 |
+
|
1090 |
+
/* get theme font style google or default */
|
1091 |
+
public static function font_style($name) {
|
1092 |
+
$input_names = [
|
1093 |
+
'thumb_gal_title_font_style' => 'thumb_gal_title_google_fonts',
|
1094 |
+
'thumb_title_font_style' => 'thumb_title_google_fonts',
|
1095 |
+
'thumb_description_font_style' => 'thumb_description_google_fonts',
|
1096 |
+
'album_compact_back_font_style' => 'album_compact_back_google_fonts',
|
1097 |
+
'album_compact_gal_title_font_style' => 'album_compact_gal_title_google_fonts',
|
1098 |
+
'album_compact_title_font_style' => 'album_compact_title_google_fonts',
|
1099 |
+
'album_extended_back_font_style' => 'album_extended_back_google_fonts',
|
1100 |
+
'album_extended_desc_font_style' => 'album_extended_desc_google_fonts',
|
1101 |
+
'album_extended_gal_title_font_style' => 'album_extended_gal_title_google_fonts',
|
1102 |
+
'album_extended_title_font_style' => 'album_extended_title_google_fonts',
|
1103 |
+
'album_masonry_back_font_style' => 'album_masonry_back_google_fonts',
|
1104 |
+
'album_masonry_gal_title_font_style' => 'album_masonry_gal_title_google_fonts',
|
1105 |
+
'album_masonry_title_font_style' => 'album_masonry_title_google_fonts',
|
1106 |
+
'blog_style_img_font_family' => 'blog_style_img_google_fonts',
|
1107 |
+
'blog_style_gal_title_font_style' => 'blog_style_gal_title_google_fonts',
|
1108 |
+
'image_browser_gal_title_font_style' => 'image_browser_gal_title_google_fonts',
|
1109 |
+
'image_browser_img_font_family' => 'image_browser_img_google_fonts',
|
1110 |
+
'lightbox_description_font_style' => 'lightbox_description_google_fonts',
|
1111 |
+
'lightbox_comment_font_style' => 'lightbox_comment_google_fonts',
|
1112 |
+
'lightbox_hit_font_style' => 'lightbox_hit_google_fonts',
|
1113 |
+
'lightbox_title_font_style' => 'lightbox_title_google_fonts',
|
1114 |
+
'masonry_description_font_style' => 'masonry_description_google_fonts',
|
1115 |
+
'masonry_thumb_gal_title_font_style' => 'masonry_thumb_gal_title_google_fonts',
|
1116 |
+
'masonry_thumb_title_font_style' => 'masonry_thumb_title_google_fonts',
|
1117 |
+
'mosaic_thumb_gal_title_font_style' => 'mosaic_thumb_gal_title_google_fonts',
|
1118 |
+
'mosaic_thumb_title_font_style' => 'mosaic_thumb_title_google_fonts',
|
1119 |
+
'page_nav_font_style' => 'page_nav_google_fonts',
|
1120 |
+
'slideshow_description_font' => 'slideshow_description_google_fonts',
|
1121 |
+
'slideshow_title_font' => 'slideshow_title_google_fonts'
|
1122 |
+
];
|
1123 |
+
if ( array_key_exists( $name, $input_names ) ) {
|
1124 |
+
return $input_names[ $name ];
|
1125 |
+
}
|
1126 |
+
}
|
1127 |
}
|
frontend/controllers/BWGControllerGalleryBox.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
class BWGControllerGalleryBox {
|
3 |
public function execute() {
|
4 |
-
$ajax_task = (
|
5 |
if (method_exists($this, $ajax_task)) {
|
6 |
$this->$ajax_task();
|
7 |
}
|
@@ -22,8 +22,8 @@ class BWGControllerGalleryBox {
|
|
22 |
|
23 |
public function save_rate() {
|
24 |
global $wpdb;
|
25 |
-
$image_id = (
|
26 |
-
$rate = (
|
27 |
$ip = BWG()->options->save_ip ? $_SERVER['REMOTE_ADDR'] : '';
|
28 |
if ( !$ip || !$wpdb->get_var($wpdb->prepare('SELECT `image_id` FROM `' . $wpdb->prefix . 'bwg_image_rate` WHERE `ip`="%s" AND `image_id`="%d"', $ip, $image_id)) ) {
|
29 |
$wpdb->insert($wpdb->prefix . 'bwg_image_rate', array(
|
@@ -48,7 +48,7 @@ class BWGControllerGalleryBox {
|
|
48 |
|
49 |
public function save_hit_count() {
|
50 |
global $wpdb;
|
51 |
-
$image_id = (
|
52 |
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET hit_count = hit_count + 1 WHERE id="%d"', $image_id));
|
53 |
}
|
54 |
|
@@ -61,7 +61,7 @@ class BWGControllerGalleryBox {
|
|
61 |
$json = array();
|
62 |
$error_messages = array();
|
63 |
// get post data.
|
64 |
-
$image_id = WDWLibrary::get('comment_image_id',
|
65 |
$name = trim(WDWLibrary::get('comment_name', ''));
|
66 |
$email = WDWLibrary::get('comment_email', '');
|
67 |
$comment = trim(WDWLibrary::get('comment_text', ''));
|
@@ -89,7 +89,7 @@ class BWGControllerGalleryBox {
|
|
89 |
}
|
90 |
if ( WDWLibrary::get('popup_enable_captcha') ) {
|
91 |
WDWLibrary::bwg_session_start();
|
92 |
-
$captcha = WDWLibrary::get('comment_captcha'
|
93 |
$session_captcha = (isset($_SESSION['bwg_captcha_code']) ? esc_html(stripslashes($_SESSION['bwg_captcha_code'])) : '');
|
94 |
if ( empty($captcha) ) {
|
95 |
$error = true;
|
@@ -160,8 +160,8 @@ class BWGControllerGalleryBox {
|
|
160 |
global $wpdb;
|
161 |
$error = false;
|
162 |
$json = array();
|
163 |
-
$id_image = (
|
164 |
-
$id_comment = (
|
165 |
if ( $id_image && $id_comment ) {
|
166 |
$delete = $wpdb->query($wpdb->prepare('DELETE FROM `' . $wpdb->prefix . 'bwg_image_comment` WHERE `id` = "%d"', $id_comment));
|
167 |
$update = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `comment_count` = (CASE WHEN comment_count <= 0 THEN 0 ELSE `comment_count`-1 END) WHERE `id`="%d"', $id_image));
|
1 |
<?php
|
2 |
class BWGControllerGalleryBox {
|
3 |
public function execute() {
|
4 |
+
$ajax_task = WDWLibrary::get('ajax_task');
|
5 |
if (method_exists($this, $ajax_task)) {
|
6 |
$this->$ajax_task();
|
7 |
}
|
22 |
|
23 |
public function save_rate() {
|
24 |
global $wpdb;
|
25 |
+
$image_id = WDWLibrary::get('image_id', 0, 'intval');
|
26 |
+
$rate = WDWLibrary::get('rate');
|
27 |
$ip = BWG()->options->save_ip ? $_SERVER['REMOTE_ADDR'] : '';
|
28 |
if ( !$ip || !$wpdb->get_var($wpdb->prepare('SELECT `image_id` FROM `' . $wpdb->prefix . 'bwg_image_rate` WHERE `ip`="%s" AND `image_id`="%d"', $ip, $image_id)) ) {
|
29 |
$wpdb->insert($wpdb->prefix . 'bwg_image_rate', array(
|
48 |
|
49 |
public function save_hit_count() {
|
50 |
global $wpdb;
|
51 |
+
$image_id = WDWLibrary::get('image_id', 0, 'intval');
|
52 |
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET hit_count = hit_count + 1 WHERE id="%d"', $image_id));
|
53 |
}
|
54 |
|
61 |
$json = array();
|
62 |
$error_messages = array();
|
63 |
// get post data.
|
64 |
+
$image_id = WDWLibrary::get('comment_image_id', 0);
|
65 |
$name = trim(WDWLibrary::get('comment_name', ''));
|
66 |
$email = WDWLibrary::get('comment_email', '');
|
67 |
$comment = trim(WDWLibrary::get('comment_text', ''));
|
89 |
}
|
90 |
if ( WDWLibrary::get('popup_enable_captcha') ) {
|
91 |
WDWLibrary::bwg_session_start();
|
92 |
+
$captcha = WDWLibrary::get('comment_captcha');
|
93 |
$session_captcha = (isset($_SESSION['bwg_captcha_code']) ? esc_html(stripslashes($_SESSION['bwg_captcha_code'])) : '');
|
94 |
if ( empty($captcha) ) {
|
95 |
$error = true;
|
160 |
global $wpdb;
|
161 |
$error = false;
|
162 |
$json = array();
|
163 |
+
$id_image = WDWLibrary::get('id_image', 0, 'intval');
|
164 |
+
$id_comment = WDWLibrary::get('id_comment', 0, 'intval');
|
165 |
if ( $id_image && $id_comment ) {
|
166 |
$delete = $wpdb->query($wpdb->prepare('DELETE FROM `' . $wpdb->prefix . 'bwg_image_comment` WHERE `id` = "%d"', $id_comment));
|
167 |
$update = $wpdb->query($wpdb->prepare('UPDATE `' . $wpdb->prefix . 'bwg_image` SET `comment_count` = (CASE WHEN comment_count <= 0 THEN 0 ELSE `comment_count`-1 END) WHERE `id`="%d"', $id_image));
|
frontend/controllers/controller.php
CHANGED
@@ -25,9 +25,8 @@ class BWGControllerSite {
|
|
25 |
if (!isset($params['type'])) {
|
26 |
$params['type'] = '';
|
27 |
}
|
28 |
-
|
29 |
-
if (
|
30 |
-
$sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
|
31 |
if ($sort_by == 'random') {
|
32 |
$params['sort_by'] = 'RAND()';
|
33 |
} else {
|
@@ -38,14 +37,14 @@ class BWGControllerSite {
|
|
38 |
}
|
39 |
|
40 |
if ( strpos($params['gallery_type'], 'album') !== FALSE ) { //Album views (compact/masonry/extended).
|
41 |
-
|
42 |
$params['view_type'] = 'album';
|
43 |
-
|
44 |
// Type in album view (album or gallery).
|
45 |
-
$
|
46 |
-
|
|
|
47 |
// Album or gallery id.
|
48 |
-
$params['album_gallery_id'] = (
|
49 |
$params['cur_alb_gal_id'] = $params['album_gallery_id'];
|
50 |
|
51 |
if (isset($params['compuct_album_image_thumb_width'])) { // Compact album view.
|
25 |
if (!isset($params['type'])) {
|
26 |
$params['type'] = '';
|
27 |
}
|
28 |
+
$sort_by = WDWLibrary::get('sortImagesByValue_' . $bwg);
|
29 |
+
if ( !empty($sort_by) ) {
|
|
|
30 |
if ($sort_by == 'random') {
|
31 |
$params['sort_by'] = 'RAND()';
|
32 |
} else {
|
37 |
}
|
38 |
|
39 |
if ( strpos($params['gallery_type'], 'album') !== FALSE ) { //Album views (compact/masonry/extended).
|
40 |
+
// View type.
|
41 |
$params['view_type'] = 'album';
|
|
|
42 |
// Type in album view (album or gallery).
|
43 |
+
$album_view_type = !empty($params['type']) ? $params['type'] : $params['view_type'];
|
44 |
+
// Album or gallery in album.
|
45 |
+
$params['album_view_type'] = WDWLibrary::get('type_' . $bwg, $album_view_type);
|
46 |
// Album or gallery id.
|
47 |
+
$params['album_gallery_id'] = WDWLibrary::get('album_gallery_id_' . $bwg, $params['album_id'], 'intval');
|
48 |
$params['cur_alb_gal_id'] = $params['album_gallery_id'];
|
49 |
|
50 |
if (isset($params['compuct_album_image_thumb_width'])) { // Compact album view.
|
frontend/models/BWGModelGalleryBox.php
CHANGED
@@ -106,11 +106,13 @@ class BWGModelGalleryBox {
|
|
106 |
if ( !empty($rows) ) {
|
107 |
foreach ( $rows as $row ) {
|
108 |
$row->alt = esc_html($row->alt);
|
109 |
-
$row->
|
110 |
-
$row->
|
|
|
|
|
111 |
if ( strpos($row->filetype, 'EMBED') === FALSE ) {
|
112 |
-
$row->image_url = WDWLibrary::image_url_version($row->image_url, $row->modified_date);
|
113 |
-
$row->thumb_url = WDWLibrary::image_url_version($row->thumb_url, $row->modified_date);
|
114 |
}
|
115 |
$images[] = $row;
|
116 |
}
|
106 |
if ( !empty($rows) ) {
|
107 |
foreach ( $rows as $row ) {
|
108 |
$row->alt = esc_html($row->alt);
|
109 |
+
$row->filename = esc_html($row->filename);
|
110 |
+
$row->description = esc_html($row->description);
|
111 |
+
$row->pure_image_url = urlencode($row->image_url);
|
112 |
+
$row->pure_thumb_url = urlencode($row->thumb_url);
|
113 |
if ( strpos($row->filetype, 'EMBED') === FALSE ) {
|
114 |
+
$row->image_url = WDWLibrary::image_url_version(urlencode($row->image_url), $row->modified_date);
|
115 |
+
$row->thumb_url = WDWLibrary::image_url_version(urlencode($row->thumb_url), $row->modified_date);
|
116 |
}
|
117 |
$images[] = $row;
|
118 |
}
|
frontend/models/model.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
class BWGModelSite {
|
|
|
3 |
public function get_theme_row_data($id = 0) {
|
4 |
global $wpdb;
|
5 |
if (!$id) {
|
@@ -71,18 +72,12 @@ class BWGModelSite {
|
|
71 |
global $wpdb;
|
72 |
$gallery_id = (int) $gallery_id;
|
73 |
$tag = (int) $tag;
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$get_search = WDWLibrary::get('bwg_search_' . $bwg);
|
79 |
-
$get_sort_by = WDWLibrary::get('sort_by_' . $bwg);
|
80 |
-
$get_filter_teg = WDWLibrary::get('filter_tag_' . $bwg);
|
81 |
-
$bwg_search = ((isset($get_search) && esc_html($get_search) != '') ? trim(esc_html($get_search)) : '');
|
82 |
-
$sort_by = ((isset($get_sort_by) && esc_html($get_sort_by) != '') ? trim(esc_html($get_sort_by)) : '');
|
83 |
-
$filter_teg = ((isset($get_filter_teg) && esc_html($get_filter_teg) != '') ? trim(esc_html($get_filter_teg)) : '');
|
84 |
if ( !empty($filter_teg) ) {
|
85 |
-
$filter_teg_arr = explode(',', $filter_teg);
|
86 |
$_REQUEST[$tag_input_name] = $filter_teg_arr;
|
87 |
}
|
88 |
}
|
@@ -116,11 +111,12 @@ class BWGModelSite {
|
|
116 |
$items_in_page = $images_per_page;
|
117 |
$limit = 0;
|
118 |
WDWLibrary::bwg_session_start();
|
119 |
-
|
120 |
-
|
|
|
121 |
$items_in_page = $load_more_image_count;
|
122 |
}
|
123 |
-
$limit = ((
|
124 |
$bwg_random_seed = isset($_SESSION['bwg_random_seed_' . $bwg]) ? $_SESSION['bwg_random_seed_' . $bwg] : '';
|
125 |
}
|
126 |
else {
|
@@ -133,7 +129,8 @@ class BWGModelSite {
|
|
133 |
}
|
134 |
$where .= ($gallery_id ? ' AND image.gallery_id = "' . $gallery_id . '" ' : '') . ($tag ? ' AND tag.tag_id = "' . $tag . '" ' : '');
|
135 |
$join = $tag ? 'LEFT JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id' : '';
|
136 |
-
|
|
|
137 |
if ( !BWG()->options->tags_filter_and_or ) {
|
138 |
// To find images which have at least one from tags filtered by.
|
139 |
$compare_sign = "|";
|
@@ -141,11 +138,11 @@ class BWGModelSite {
|
|
141 |
else {
|
142 |
// To find images which have all tags filtered by.
|
143 |
// For this case there is need to sort tags by ascending to compare with comma.
|
144 |
-
sort($
|
145 |
$compare_sign = ",";
|
146 |
}
|
147 |
$join .= ' LEFT JOIN (SELECT GROUP_CONCAT(tag_id order by tag_id SEPARATOR ",") AS tags_combined, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag' . ($gallery_id ? ' WHERE gallery_id="' . $gallery_id . '"' : '') . ' GROUP BY image_id) AS tags ON image.id=tags.image_id';
|
148 |
-
$where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode($compare_sign, $
|
149 |
}
|
150 |
$join .= ' LEFT JOIN '. $wpdb->prefix .'bwg_gallery as gallery ON gallery.id = image.gallery_id';
|
151 |
$where .= ' AND gallery.published = 1 ';
|
@@ -154,8 +151,8 @@ class BWGModelSite {
|
|
154 |
$total = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where);
|
155 |
$page_nav['total'] = $total;
|
156 |
$page_nav['limit'] = 1;
|
157 |
-
if (
|
158 |
-
$page_nav['limit'] = (int) $
|
159 |
}
|
160 |
$images = array();
|
161 |
$thumb_urls = array();
|
@@ -206,8 +203,8 @@ class BWGModelSite {
|
|
206 |
if( $sort_by == 'random' || $sort_by == 'RAND()' ) {
|
207 |
$order_by = 'ORDER BY RAND()';
|
208 |
}
|
209 |
-
$search_value = !empty($_REQUEST['bwg_search_' . $bwg]) ? trim( esc_html($_REQUEST['bwg_search_' . $bwg]) ) : '';
|
210 |
$search_where = '';
|
|
|
211 |
if ( !empty($search_value) ) {
|
212 |
$search_keys = explode(' ', $search_value);
|
213 |
$alt_search = '(';
|
@@ -223,17 +220,18 @@ class BWGModelSite {
|
|
223 |
$search_where = ' AND (' . $alt_search . ' OR ' . $description_search . ')';
|
224 |
}
|
225 |
$limit = 0;
|
226 |
-
|
227 |
-
|
|
|
228 |
}
|
229 |
$limit_str = '';
|
230 |
if ( $albums_per_page ) {
|
231 |
$limit_str = 'LIMIT ' . $limit . ',' . $albums_per_page;
|
232 |
}
|
233 |
-
if (
|
234 |
-
if (
|
235 |
if ( $albums_per_page ) {
|
236 |
-
$limit = $albums_per_page * $
|
237 |
$limit_str = 'LIMIT 0,' . $limit;
|
238 |
}
|
239 |
}
|
@@ -311,10 +309,12 @@ class BWGModelSite {
|
|
311 |
$row->description = wpautop($row->description);
|
312 |
}
|
313 |
}
|
314 |
-
|
315 |
-
$page_nav[
|
316 |
-
|
317 |
-
|
|
|
|
|
318 |
}
|
319 |
|
320 |
return array( 'rows' => $rows, 'page_nav' => $page_nav );
|
1 |
<?php
|
2 |
class BWGModelSite {
|
3 |
+
|
4 |
public function get_theme_row_data($id = 0) {
|
5 |
global $wpdb;
|
6 |
if (!$id) {
|
72 |
global $wpdb;
|
73 |
$gallery_id = (int) $gallery_id;
|
74 |
$tag = (int) $tag;
|
75 |
+
$bwg_search = trim( WDWLibrary::get('bwg_search_' . $bwg) );
|
76 |
+
if ( BWG()->options->front_ajax == "1" ) {
|
77 |
+
$sort_by = trim( WDWLibrary::get('sort_by_' . $bwg) );
|
78 |
+
$filter_teg = trim( WDWLibrary::get('filter_tag_' . $bwg) );
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
if ( !empty($filter_teg) ) {
|
80 |
+
$filter_teg_arr = explode(',', trim($filter_teg));
|
81 |
$_REQUEST[$tag_input_name] = $filter_teg_arr;
|
82 |
}
|
83 |
}
|
111 |
$items_in_page = $images_per_page;
|
112 |
$limit = 0;
|
113 |
WDWLibrary::bwg_session_start();
|
114 |
+
$page_number = WDWLibrary::get('page_number_' . $bwg, 0, 'intval');
|
115 |
+
if ( $page_number ) {
|
116 |
+
if ( $page_number > 1 ) {
|
117 |
$items_in_page = $load_more_image_count;
|
118 |
}
|
119 |
+
$limit = ( ($page_number - 2) * $items_in_page ) + $images_per_page;
|
120 |
$bwg_random_seed = isset($_SESSION['bwg_random_seed_' . $bwg]) ? $_SESSION['bwg_random_seed_' . $bwg] : '';
|
121 |
}
|
122 |
else {
|
129 |
}
|
130 |
$where .= ($gallery_id ? ' AND image.gallery_id = "' . $gallery_id . '" ' : '') . ($tag ? ' AND tag.tag_id = "' . $tag . '" ' : '');
|
131 |
$join = $tag ? 'LEFT JOIN ' . $wpdb->prefix . 'bwg_image_tag as tag ON image.id=tag.image_id' : '';
|
132 |
+
|
133 |
+
if ( !empty(WDWLibrary::get($tag_input_name)) ) {
|
134 |
if ( !BWG()->options->tags_filter_and_or ) {
|
135 |
// To find images which have at least one from tags filtered by.
|
136 |
$compare_sign = "|";
|
138 |
else {
|
139 |
// To find images which have all tags filtered by.
|
140 |
// For this case there is need to sort tags by ascending to compare with comma.
|
141 |
+
sort(WDWLibrary::get($tag_input_name));
|
142 |
$compare_sign = ",";
|
143 |
}
|
144 |
$join .= ' LEFT JOIN (SELECT GROUP_CONCAT(tag_id order by tag_id SEPARATOR ",") AS tags_combined, image_id FROM ' . $wpdb->prefix . 'bwg_image_tag' . ($gallery_id ? ' WHERE gallery_id="' . $gallery_id . '"' : '') . ' GROUP BY image_id) AS tags ON image.id=tags.image_id';
|
145 |
+
$where .= ' AND CONCAT(",", tags.tags_combined, ",") REGEXP ",(' . implode($compare_sign, WDWLibrary::get($tag_input_name)) . ')," ';
|
146 |
}
|
147 |
$join .= ' LEFT JOIN '. $wpdb->prefix .'bwg_gallery as gallery ON gallery.id = image.gallery_id';
|
148 |
$where .= ' AND gallery.published = 1 ';
|
151 |
$total = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'bwg_image as image ' . $join . ' WHERE image.published=1 ' . $where);
|
152 |
$page_nav['total'] = $total;
|
153 |
$page_nav['limit'] = 1;
|
154 |
+
if ( $page_number ) {
|
155 |
+
$page_nav['limit'] = (int) $page_number;
|
156 |
}
|
157 |
$images = array();
|
158 |
$thumb_urls = array();
|
203 |
if( $sort_by == 'random' || $sort_by == 'RAND()' ) {
|
204 |
$order_by = 'ORDER BY RAND()';
|
205 |
}
|
|
|
206 |
$search_where = '';
|
207 |
+
$search_value = trim( WDWLibrary::get('bwg_search_' . $bwg) );
|
208 |
if ( !empty($search_value) ) {
|
209 |
$search_keys = explode(' ', $search_value);
|
210 |
$alt_search = '(';
|
220 |
$search_where = ' AND (' . $alt_search . ' OR ' . $description_search . ')';
|
221 |
}
|
222 |
$limit = 0;
|
223 |
+
$page_number = WDWLibrary::get('page_number_' . $bwg, 0, 'intval');
|
224 |
+
if ( $page_number ) {
|
225 |
+
$limit = ( (int) $page_number - 1) * $albums_per_page;
|
226 |
}
|
227 |
$limit_str = '';
|
228 |
if ( $albums_per_page ) {
|
229 |
$limit_str = 'LIMIT ' . $limit . ',' . $albums_per_page;
|
230 |
}
|
231 |
+
if ( WDWLibrary::get('action_' . $bwg) == 'back' && ($pagination_type == 2 || $pagination_type == 3) ) {
|
232 |
+
if ( $page_number ) {
|
233 |
if ( $albums_per_page ) {
|
234 |
+
$limit = $albums_per_page * $page_number;
|
235 |
$limit_str = 'LIMIT 0,' . $limit;
|
236 |
}
|
237 |
}
|
309 |
$row->description = wpautop($row->description);
|
310 |
}
|
311 |
}
|
312 |
+
|
313 |
+
$page_nav['limit'] = 1;
|
314 |
+
$page_nav['total'] = $total;
|
315 |
+
$page_number = WDWLibrary::get('page_number_' . $bwg, 0, 'intval');
|
316 |
+
if ( $page_number ) {
|
317 |
+
$page_nav[ 'limit' ] = (int) $page_number;
|
318 |
}
|
319 |
|
320 |
return array( 'rows' => $rows, 'page_nav' => $page_nav );
|
frontend/views/BWGViewAlbum_compact_preview.php
CHANGED
@@ -27,13 +27,17 @@ class BWGViewAlbum_compact_preview extends BWGViewSite {
|
|
27 |
require_once BWG()->plugin_dir . '/frontend/views/BWGView' . $gallery_type . '.php';
|
28 |
$view_class = 'BWGView' . $gallery_type;
|
29 |
$this->gallery_view = new $view_class();
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
$params['breadcrumb_arr'] = json_decode($breadcrumb);
|
38 |
|
39 |
/* Set theme parameters for Gallery/Gallery group title/description.*/
|
27 |
require_once BWG()->plugin_dir . '/frontend/views/BWGView' . $gallery_type . '.php';
|
28 |
$view_class = 'BWGView' . $gallery_type;
|
29 |
$this->gallery_view = new $view_class();
|
30 |
+
$theme_row = $params['theme_row'];
|
31 |
+
|
32 |
+
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
33 |
+
$breadcrumb_arr = array(
|
34 |
+
0 => array(
|
35 |
+
'id' => $params['album_gallery_id'],
|
36 |
+
'page' => WDWLibrary::get('page_number_' . $bwg, 1, 'intval')
|
37 |
+
)
|
38 |
+
);
|
39 |
+
$breadcrumb = WDWLibrary::get('bwg_album_breadcrumb_' . $bwg);
|
40 |
+
$breadcrumb = !empty($breadcrumb) ? $breadcrumb : json_encode($breadcrumb_arr);
|
41 |
$params['breadcrumb_arr'] = json_decode($breadcrumb);
|
42 |
|
43 |
/* Set theme parameters for Gallery/Gallery group title/description.*/
|
frontend/views/BWGViewAlbum_extended_preview.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
|
4 |
private $gallery_view = FALSE;
|
5 |
|
6 |
public function display( $params = array(), $bwg = 0 ) {
|
@@ -32,14 +33,15 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
32 |
$this->gallery_view = new $view_class();
|
33 |
|
34 |
$theme_row = $params['theme_row'];
|
35 |
-
|
36 |
$breadcrumb_arr = array(
|
37 |
0 => array(
|
38 |
'id' => $params['album_gallery_id'],
|
39 |
-
'page' =>
|
40 |
-
)
|
41 |
);
|
42 |
-
|
|
|
|
|
43 |
$params['breadcrumb_arr'] = json_decode($breadcrumb);
|
44 |
|
45 |
/* Set theme parameters for Gallery/Gallery group title/description.*/
|
@@ -135,7 +137,7 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
|
|
135 |
if ( $row->name ) {
|
136 |
?>
|
137 |
<a class="bwg-album bwg_album_<?php echo $bwg; ?>"
|
138 |
-
<?php echo ( ($enable_seo || $enable_dynamic_url) ? "href='" . esc_url($href) . "'" : ""); ?>
|
139 |
data-bwg="<?php echo $bwg; ?>"
|
140 |
data-container_id="<?php echo $params['container_id']; ?>"
|
141 |
data-alb_gal_id="<?php echo(($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
|
1 |
<?php
|
2 |
|
3 |
class BWGViewAlbum_extended_preview extends BWGViewSite {
|
4 |
+
|
5 |
private $gallery_view = FALSE;
|
6 |
|
7 |
public function display( $params = array(), $bwg = 0 ) {
|
33 |
$this->gallery_view = new $view_class();
|
34 |
|
35 |
$theme_row = $params['theme_row'];
|
|
|
36 |
$breadcrumb_arr = array(
|
37 |
0 => array(
|
38 |
'id' => $params['album_gallery_id'],
|
39 |
+
'page' => WDWLibrary::get('page_number_' . $bwg, 1, 'intval')
|
40 |
+
)
|
41 |
);
|
42 |
+
|
43 |
+
$breadcrumb = WDWLibrary::get('bwg_album_breadcrumb_' . $bwg);
|
44 |
+
$breadcrumb = !empty($breadcrumb) ? $breadcrumb : json_encode($breadcrumb_arr);
|
45 |
$params['breadcrumb_arr'] = json_decode($breadcrumb);
|
46 |
|
47 |
/* Set theme parameters for Gallery/Gallery group title/description.*/
|
137 |
if ( $row->name ) {
|
138 |
?>
|
139 |
<a class="bwg-album bwg_album_<?php echo $bwg; ?>"
|
140 |
+
<?php echo ( ($enable_seo || $enable_dynamic_url) ? "href='" . esc_url($href) . "'" : "" ); ?>
|
141 |
data-bwg="<?php echo $bwg; ?>"
|
142 |
data-container_id="<?php echo $params['container_id']; ?>"
|
143 |
data-alb_gal_id="<?php echo(($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
|
frontend/views/BWGViewGalleryBox.php
CHANGED
@@ -10,14 +10,14 @@ class BWGViewGalleryBox {
|
|
10 |
public function display() {
|
11 |
require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php');
|
12 |
|
13 |
-
$bwg = (
|
14 |
-
$current_url =
|
15 |
-
$theme_id =
|
16 |
$current_image_id = WDWLibrary::esc_script('get', 'image_id', 0, 'int');
|
17 |
$gallery_id = WDWLibrary::esc_script('get', 'gallery_id', 0, 'int');
|
18 |
-
$tag = (
|
19 |
|
20 |
-
$shortcode_id = (
|
21 |
global $wpdb;
|
22 |
$shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $shortcode_id));
|
23 |
$data = array();
|
@@ -76,8 +76,7 @@ class BWGViewGalleryBox {
|
|
76 |
}
|
77 |
}
|
78 |
$image_rows = $this->model->get_image_rows_data($gallery_id, $bwg, $params['sort_by'], $params['order_by'], $tag);
|
79 |
-
|
80 |
-
$image_id = (isset($_POST['image_id']) ? (int) $_POST['image_id'] : $current_image_id);
|
81 |
$pricelist_id = 0;
|
82 |
if ( function_exists('BWGEC') && $params['popup_enable_ecommerce'] == 1 ) {
|
83 |
$image_pricelist = $this->model->get_image_pricelist($image_id);
|
@@ -583,6 +582,7 @@ class BWGViewGalleryBox {
|
|
583 |
$has_embed = FALSE;
|
584 |
$data = array();
|
585 |
foreach ($image_rows as $key => $image_row) {
|
|
|
586 |
if ($image_row->id == $image_id) {
|
587 |
$current_avg_rating = $image_row->avg_rating;
|
588 |
$current_rate = $image_row->rate;
|
@@ -716,7 +716,7 @@ class BWGViewGalleryBox {
|
|
716 |
<img <?php if( $is_embed || $resolution_thumb ) { ?>
|
717 |
style="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;" <?php } ?>
|
718 |
class="bwg_filmstrip_thumbnail_img bwg-hidden"
|
719 |
-
data-url="<?php echo ($is_embed ? "" : BWG()->upload_url) . $image_row->thumb_url; ?>"
|
720 |
src=""
|
721 |
onclick='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")' ontouchend='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")'
|
722 |
image_id="<?php echo $image_row->id; ?>"
|
@@ -827,7 +827,7 @@ class BWGViewGalleryBox {
|
|
827 |
}
|
828 |
if ($params['popup_enable_fullsize_image']) {
|
829 |
?>
|
830 |
-
<a id="bwg_fullsize_image" href="<?php echo !$is_embed ? BWG()->upload_url . $current_image_url : $current_image_url; ?>" target="_blank">
|
831 |
<i title="<?php echo __('Open image in original size.', BWG()->prefix); ?>" class="bwg-icon-sign-out bwg_ctrl_btn"></i>
|
832 |
</a>
|
833 |
<?php
|
@@ -836,9 +836,9 @@ class BWGViewGalleryBox {
|
|
836 |
$style = 'none';
|
837 |
$current_image_arr = explode('/', $current_image_url);
|
838 |
if ( !$is_embed ) {
|
839 |
-
$download_dir = BWG()->upload_dir . str_replace('/thumb/', '/.original/', $current_thumb_url);
|
840 |
WDWLibrary::repair_image_original($download_dir);
|
841 |
-
$download_href = BWG()->upload_url . str_replace('/thumb/', '/.original/', $current_thumb_url);
|
842 |
$style = 'inline-block';
|
843 |
}
|
844 |
?>
|
@@ -923,7 +923,7 @@ class BWGViewGalleryBox {
|
|
923 |
<?php
|
924 |
if (!$is_embed) {
|
925 |
?>
|
926 |
-
<img class="bwg_popup_image bwg_popup_watermark" src="<?php echo BWG()->upload_url . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>" />
|
927 |
<?php
|
928 |
}
|
929 |
else { /*$is_embed*/ ?>
|
@@ -977,8 +977,8 @@ class BWGViewGalleryBox {
|
|
977 |
</div>
|
978 |
</div>
|
979 |
<?php if ( $params['popup_enable_comment'] ) {
|
980 |
-
$bwg_name = (
|
981 |
-
$bwg_email = (
|
982 |
?>
|
983 |
<div class="bwg_comment_wrap bwg_popup_sidebar_wrap">
|
984 |
<div class="bwg_comment_container bwg_popup_sidebar_container bwg_close">
|
@@ -1028,7 +1028,7 @@ class BWGViewGalleryBox {
|
|
1028 |
onclick="comment_check_privacy_policy()"
|
1029 |
ontouchend="comment_check_privacy_policy()"
|
1030 |
type="checkbox"
|
1031 |
-
value="1" <?php echo (
|
1032 |
<?php
|
1033 |
$privacy_policy_text = __('I consent collecting this data and processing it according to %s of this website.', BWG()->prefix);
|
1034 |
$privacy_policy_link = ' <a href="' . WDWLibrary::get_privacy_policy_url() . '" target="_blank">' . __('Privacy Policy', BWG()->prefix) . '</a>';
|
@@ -1352,7 +1352,7 @@ class BWGViewGalleryBox {
|
|
1352 |
);
|
1353 |
$gallery_box_data = json_encode( $bwg_gallery_box_params );
|
1354 |
?>
|
1355 |
-
<script>var gallery_box_data = JSON.parse(
|
1356 |
<?php
|
1357 |
die();
|
1358 |
}
|
10 |
public function display() {
|
11 |
require_once(BWG()->plugin_dir . '/framework/WDWLibraryEmbed.php');
|
12 |
|
13 |
+
$bwg = WDWLibrary::get('current_view', 0, 'intval');
|
14 |
+
$current_url = WDWLibrary::get('current_url', '', 'esc_url');
|
15 |
+
$theme_id = WDWLibrary::get('theme_id', 0, 'intval');
|
16 |
$current_image_id = WDWLibrary::esc_script('get', 'image_id', 0, 'int');
|
17 |
$gallery_id = WDWLibrary::esc_script('get', 'gallery_id', 0, 'int');
|
18 |
+
$tag = WDWLibrary::get('tag', 0, 'intval');
|
19 |
|
20 |
+
$shortcode_id = WDWLibrary::get('shortcode_id', 0, 'intval');
|
21 |
global $wpdb;
|
22 |
$shortcode = $wpdb->get_var($wpdb->prepare("SELECT tagtext FROM " . $wpdb->prefix . "bwg_shortcode WHERE id='%d'", $shortcode_id));
|
23 |
$data = array();
|
76 |
}
|
77 |
}
|
78 |
$image_rows = $this->model->get_image_rows_data($gallery_id, $bwg, $params['sort_by'], $params['order_by'], $tag);
|
79 |
+
$image_id = WDWLibrary::get('image_id', $current_image_id, 'intval');
|
|
|
80 |
$pricelist_id = 0;
|
81 |
if ( function_exists('BWGEC') && $params['popup_enable_ecommerce'] == 1 ) {
|
82 |
$image_pricelist = $this->model->get_image_pricelist($image_id);
|
582 |
$has_embed = FALSE;
|
583 |
$data = array();
|
584 |
foreach ($image_rows as $key => $image_row) {
|
585 |
+
|
586 |
if ($image_row->id == $image_id) {
|
587 |
$current_avg_rating = $image_row->avg_rating;
|
588 |
$current_rate = $image_row->rate;
|
716 |
<img <?php if( $is_embed || $resolution_thumb ) { ?>
|
717 |
style="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;" <?php } ?>
|
718 |
class="bwg_filmstrip_thumbnail_img bwg-hidden"
|
719 |
+
data-url="<?php echo ($is_embed ? "" : BWG()->upload_url) . urldecode($image_row->thumb_url); ?>"
|
720 |
src=""
|
721 |
onclick='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")' ontouchend='bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()), "<?php echo $key; ?>")'
|
722 |
image_id="<?php echo $image_row->id; ?>"
|
827 |
}
|
828 |
if ($params['popup_enable_fullsize_image']) {
|
829 |
?>
|
830 |
+
<a id="bwg_fullsize_image" href="<?php echo !$is_embed ? BWG()->upload_url . urldecode($current_image_url) : urldecode($current_image_url); ?>" target="_blank">
|
831 |
<i title="<?php echo __('Open image in original size.', BWG()->prefix); ?>" class="bwg-icon-sign-out bwg_ctrl_btn"></i>
|
832 |
</a>
|
833 |
<?php
|
836 |
$style = 'none';
|
837 |
$current_image_arr = explode('/', $current_image_url);
|
838 |
if ( !$is_embed ) {
|
839 |
+
$download_dir = BWG()->upload_dir . str_replace('/thumb/', '/.original/', urldecode($current_thumb_url));
|
840 |
WDWLibrary::repair_image_original($download_dir);
|
841 |
+
$download_href = BWG()->upload_url . str_replace('/thumb/', '/.original/', urldecode($current_thumb_url));
|
842 |
$style = 'inline-block';
|
843 |
}
|
844 |
?>
|
923 |
<?php
|
924 |
if (!$is_embed) {
|
925 |
?>
|
926 |
+
<img class="bwg_popup_image bwg_popup_watermark" src="<?php echo BWG()->upload_url . urldecode($image_row->image_url); ?>" alt="<?php echo $image_row->alt; ?>" />
|
927 |
<?php
|
928 |
}
|
929 |
else { /*$is_embed*/ ?>
|
977 |
</div>
|
978 |
</div>
|
979 |
<?php if ( $params['popup_enable_comment'] ) {
|
980 |
+
$bwg_name = WDWLibrary::get('bwg_name');
|
981 |
+
$bwg_email = WDWLibrary::get('bwg_email');
|
982 |
?>
|
983 |
<div class="bwg_comment_wrap bwg_popup_sidebar_wrap">
|
984 |
<div class="bwg_comment_container bwg_popup_sidebar_container bwg_close">
|
1028 |
onclick="comment_check_privacy_policy()"
|
1029 |
ontouchend="comment_check_privacy_policy()"
|
1030 |
type="checkbox"
|
1031 |
+
value="1" <?php echo (!empty(WDWLibrary::get('bwg_comment_privacy_policy')) ? 'checked' : ''); ?> />
|
1032 |
<?php
|
1033 |
$privacy_policy_text = __('I consent collecting this data and processing it according to %s of this website.', BWG()->prefix);
|
1034 |
$privacy_policy_link = ' <a href="' . WDWLibrary::get_privacy_policy_url() . '" target="_blank">' . __('Privacy Policy', BWG()->prefix) . '</a>';
|
1352 |
);
|
1353 |
$gallery_box_data = json_encode( $bwg_gallery_box_params );
|
1354 |
?>
|
1355 |
+
<script>var gallery_box_data = JSON.parse('<?php echo $gallery_box_data; ?>');</script>
|
1356 |
<?php
|
1357 |
die();
|
1358 |
}
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -81,7 +81,7 @@ class BWGViewImage_browser extends BWGViewSite {
|
|
81 |
<div class="image_browser_images_<?php echo $bwg; ?>">
|
82 |
<?php
|
83 |
foreach ( $images as $image_row ) {
|
84 |
-
$params['image_id'] = (
|
85 |
$is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
86 |
$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));
|
87 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
81 |
<div class="image_browser_images_<?php echo $bwg; ?>">
|
82 |
<?php
|
83 |
foreach ( $images as $image_row ) {
|
84 |
+
$params['image_id'] = WDWLibrary::get('image_id', $image_row->id, 'intval');
|
85 |
$is_embed = preg_match('/EMBED/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
86 |
$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));
|
87 |
$is_embed_instagram_post = preg_match('/INSTAGRAM_POST/', $image_row->filetype) == 1 ? TRUE : FALSE;
|
frontend/views/BWGViewSlideshow.php
CHANGED
@@ -130,7 +130,7 @@ public function display($params = array(), $bwg = 0) {
|
|
130 |
}
|
131 |
$data[$bwg][$key]["id"] = $image_row->id;
|
132 |
$data[$bwg][$key]["alt"] = htmlspecialchars(str_replace(array( "\r\n", "\n", "\r" ), esc_html('<br />'), esc_html($image_row->alt)), ENT_COMPAT | ENT_QUOTES);
|
133 |
-
$data[$bwg][$key]["description"] =
|
134 |
$data[$bwg][$key]["filetype"] = $image_row->filetype;
|
135 |
$data[$bwg][$key]["filename"] = $image_row->filename;
|
136 |
$data[$bwg][$key]["image_url"] = htmlspecialchars($image_row->image_url, ENT_COMPAT | ENT_QUOTES);
|
130 |
}
|
131 |
$data[$bwg][$key]["id"] = $image_row->id;
|
132 |
$data[$bwg][$key]["alt"] = htmlspecialchars(str_replace(array( "\r\n", "\n", "\r" ), esc_html('<br />'), esc_html($image_row->alt)), ENT_COMPAT | ENT_QUOTES);
|
133 |
+
$data[$bwg][$key]["description"] = htmlspecialchars(str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), esc_html($image_row->description)), ENT_QUOTES);
|
134 |
$data[$bwg][$key]["filetype"] = $image_row->filetype;
|
135 |
$data[$bwg][$key]["filename"] = $image_row->filename;
|
136 |
$data[$bwg][$key]["image_url"] = htmlspecialchars($image_row->image_url, ENT_COMPAT | ENT_QUOTES);
|
frontend/views/BWGViewThumbnails.php
CHANGED
@@ -97,7 +97,7 @@ class BWGViewThumbnails extends BWGViewSite {
|
|
97 |
<?php if ( function_exists('BWGEC') && $params['ecommerce_icon'] == 'show' ) { echo $ecommerce_icon; } ?>
|
98 |
<?php if ( $params['image_title'] == 'show' && $theme_row->thumb_title_pos == 'bottom' ) { echo $title; } ?>
|
99 |
<?php
|
100 |
-
if ( $params['show_thumb_description'] ) { echo $description; } ?>
|
101 |
</a>
|
102 |
</div>
|
103 |
<?php
|
97 |
<?php if ( function_exists('BWGEC') && $params['ecommerce_icon'] == 'show' ) { echo $ecommerce_icon; } ?>
|
98 |
<?php if ( $params['image_title'] == 'show' && $theme_row->thumb_title_pos == 'bottom' ) { echo $title; } ?>
|
99 |
<?php
|
100 |
+
if ( isset($params['show_thumb_description']) && $params['show_thumb_description'] ) { echo $description; } ?>
|
101 |
</a>
|
102 |
</div>
|
103 |
<?php
|
frontend/views/view.php
CHANGED
@@ -334,18 +334,15 @@ class BWGViewSite {
|
|
334 |
$images_count = count(($params['album_view_type'] != 'album' ? $params['image_rows']['images'] : $params['album_gallery_rows']['rows']));
|
335 |
$search_box_width = $params['search_box_width'];
|
336 |
$placeholder = $params['placeholder'];
|
337 |
-
|
338 |
-
|
339 |
if ( $type == 'album' ) {
|
340 |
-
$bwg_search = (
|
341 |
-
} else {
|
342 |
-
$bwg_search = ( (isset($_POST['bwg_search_' . $current_view]) && esc_html($_POST['bwg_search_' . $current_view]) != '') ? esc_html($_POST['bwg_search_' . $current_view]) : '');
|
343 |
}
|
344 |
if ( BWG()->options->front_ajax == "1" ) {
|
345 |
-
$
|
346 |
-
$bwg_search = ((isset($get_search) && esc_html($get_search) != '') ? esc_html($get_search) : '');
|
347 |
}
|
348 |
-
$album_gallery_id =
|
349 |
ob_start();
|
350 |
?>
|
351 |
#bwg_search_container_1_<?php echo $current_view; ?> {
|
@@ -401,11 +398,10 @@ class BWGViewSite {
|
|
401 |
$cur_gal_id = $params['container_id'];
|
402 |
$sort_by = $params['sort_by'];
|
403 |
$search_box_width = $params['search_box_width'];
|
404 |
-
$type = (
|
405 |
-
$album_gallery_id = (
|
406 |
if ( BWG()->options->front_ajax == "1" ) {
|
407 |
-
$
|
408 |
-
$sort_by = ((isset($get_sort_by) && esc_html($get_sort_by) != '') ? esc_html($get_sort_by) : '');
|
409 |
}
|
410 |
ob_start();
|
411 |
?>
|
@@ -447,23 +443,25 @@ class BWGViewSite {
|
|
447 |
$current_view = $bwg;
|
448 |
$cur_gal_id = $params['container_id'];
|
449 |
$tags_rows = $params['tags_rows'];
|
450 |
-
$type = (
|
451 |
-
$bwg_search_tags = (
|
452 |
-
$get_filter_teg = WDWLibrary::get(
|
453 |
if ( BWG()->options->front_ajax == "1" && isset($get_filter_teg) && !empty($get_filter_teg) ) {
|
454 |
$filter_teg_arr = explode(',', $get_filter_teg);
|
455 |
$bwg_search_tags = $filter_teg_arr;
|
456 |
}
|
457 |
-
$album_gallery_id = (
|
458 |
?>
|
459 |
<div class="search_tags_container">
|
460 |
<select class="search_tags" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" multiple="multiple">
|
461 |
<?php
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
|
|
|
|
467 |
}
|
468 |
?>
|
469 |
</select>
|
@@ -603,8 +601,8 @@ class BWGViewSite {
|
|
603 |
}
|
604 |
$limit = $page_number > 1 ? $items_per_page['load_more_image_count'] : $items_per_page['images_per_page'];
|
605 |
$limit = $limit ? $limit : 1;
|
606 |
-
$type = (
|
607 |
-
$album_gallery_id = (
|
608 |
if ( $count_items ) {
|
609 |
if ( $count_items % $limit ) {
|
610 |
$items_county = ($count_items - $count_items % $limit) / $limit + 1;
|
@@ -706,8 +704,9 @@ class BWGViewSite {
|
|
706 |
<?php
|
707 |
}
|
708 |
}
|
|
|
709 |
?>
|
710 |
-
<input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo
|
711 |
<script type="text/javascript">
|
712 |
function spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
|
713 |
if (typeof load_more == "undefined") {
|
334 |
$images_count = count(($params['album_view_type'] != 'album' ? $params['image_rows']['images'] : $params['album_gallery_rows']['rows']));
|
335 |
$search_box_width = $params['search_box_width'];
|
336 |
$placeholder = $params['placeholder'];
|
337 |
+
$bwg_search = WDWLibrary::get('bwg_search_' . $current_view);
|
338 |
+
$type = WDWLibrary::get('type_' . $current_view, 'album');
|
339 |
if ( $type == 'album' ) {
|
340 |
+
$bwg_search = WDWLibrary::get('bwg_album_search_' . $current_view);
|
|
|
|
|
341 |
}
|
342 |
if ( BWG()->options->front_ajax == "1" ) {
|
343 |
+
$bwg_search = WDWLibrary::get('bwg_search_' . $current_view);
|
|
|
344 |
}
|
345 |
+
$album_gallery_id = WDWLibrary::get('album_gallery_id_' . $current_view, $params['album_gallery_id'], 'intval');
|
346 |
ob_start();
|
347 |
?>
|
348 |
#bwg_search_container_1_<?php echo $current_view; ?> {
|
398 |
$cur_gal_id = $params['container_id'];
|
399 |
$sort_by = $params['sort_by'];
|
400 |
$search_box_width = $params['search_box_width'];
|
401 |
+
$type = WDWLibrary::get('type_' . $current_view, 'album');
|
402 |
+
$album_gallery_id = WDWLibrary::get('album_gallery_id_' . $current_view, 0, 'intval');
|
403 |
if ( BWG()->options->front_ajax == "1" ) {
|
404 |
+
$sort_by = WDWLibrary::get('sort_by_'. $bwg);
|
|
|
405 |
}
|
406 |
ob_start();
|
407 |
?>
|
443 |
$current_view = $bwg;
|
444 |
$cur_gal_id = $params['container_id'];
|
445 |
$tags_rows = $params['tags_rows'];
|
446 |
+
$type = WDWLibrary::get('type_' . $current_view, 'album');
|
447 |
+
$bwg_search_tags = WDWLibrary::get('bwg_tag_id_' . $cur_gal_id, array());
|
448 |
+
$get_filter_teg = WDWLibrary::get('filter_tag_' . $bwg);
|
449 |
if ( BWG()->options->front_ajax == "1" && isset($get_filter_teg) && !empty($get_filter_teg) ) {
|
450 |
$filter_teg_arr = explode(',', $get_filter_teg);
|
451 |
$bwg_search_tags = $filter_teg_arr;
|
452 |
}
|
453 |
+
$album_gallery_id = WDWLibrary::get('album_gallery_id_' . $current_view, 0, 'intval');
|
454 |
?>
|
455 |
<div class="search_tags_container">
|
456 |
<select class="search_tags" id="bwg_tag_id_<?php echo $cur_gal_id; ?>" multiple="multiple">
|
457 |
<?php
|
458 |
+
if( !empty($tags_rows) ) {
|
459 |
+
foreach ( $tags_rows as $tags_row ) {
|
460 |
+
$selected = ( !empty($bwg_search_tags) && in_array($tags_row->term_id ? $tags_row->term_id : '', $bwg_search_tags)) ? 'selected="selected"' : '';
|
461 |
+
?>
|
462 |
+
<option value="<?php echo $tags_row->term_id ?>" <?php echo $selected; ?>><?php echo $tags_row->name ?></option>
|
463 |
+
<?php
|
464 |
+
}
|
465 |
}
|
466 |
?>
|
467 |
</select>
|
601 |
}
|
602 |
$limit = $page_number > 1 ? $items_per_page['load_more_image_count'] : $items_per_page['images_per_page'];
|
603 |
$limit = $limit ? $limit : 1;
|
604 |
+
$type = WDWLibrary::get('type_' . $current_view, $type);
|
605 |
+
$album_gallery_id = WDWLibrary::get('album_gallery_id_' . $current_view, $cur_alb_gal_id);
|
606 |
if ( $count_items ) {
|
607 |
if ( $count_items % $limit ) {
|
608 |
$items_county = ($count_items - $count_items % $limit) / $limit + 1;
|
704 |
<?php
|
705 |
}
|
706 |
}
|
707 |
+
$page_number = WDWLibrary::get('page_number_' . $current_view, 1, 'intval');
|
708 |
?>
|
709 |
+
<input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo $page_number; ?>" />
|
710 |
<script type="text/javascript">
|
711 |
function spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
|
712 |
if (typeof load_more == "undefined") {
|
js/bwg.js
CHANGED
@@ -862,7 +862,7 @@ function bwg_add_tag(image_id, tagIds, titles) {
|
|
862 |
tag_ids = tag_ids + tagIds[i] + ',';
|
863 |
var html = jQuery("#" + image_id + "_tag_temptagid").clone().html();
|
864 |
/* Remove white spaces from keywords to set as id and remove prefix.*/
|
865 |
-
var id = tagIds[i].replace(/\s+/g, '_').replace('bwg_', '').replace(/&/g, "").replace(/&/g, "").replace(/@/g, "").replace(/'/g, "39").replace(/"/g, "34").replace(/!/g, "");
|
866 |
html = html.replace(/temptagid/g, id)
|
867 |
.replace(/temptagname/g, titles[i]);
|
868 |
jQuery("#tags_div_" + image_id).append("<div class='tag_div' id='" + image_id + "_tag_" + id + "'>");
|
862 |
tag_ids = tag_ids + tagIds[i] + ',';
|
863 |
var html = jQuery("#" + image_id + "_tag_temptagid").clone().html();
|
864 |
/* Remove white spaces from keywords to set as id and remove prefix.*/
|
865 |
+
var id = tagIds[i].replace(/\s+/g, '_').replace('bwg_', '').replace(/\//g, "").replace(/&/g, "").replace(/&/g, "").replace(/@/g, "").replace(/'/g, "39").replace(/"/g, "34").replace(/!/g, "");
|
866 |
html = html.replace(/temptagid/g, id)
|
867 |
.replace(/temptagname/g, titles[i]);
|
868 |
jQuery("#tags_div_" + image_id).append("<div class='tag_div' id='" + image_id + "_tag_" + id + "'>");
|
js/bwg_embed.js
CHANGED
@@ -16,7 +16,7 @@ function spider_display_embed(embed_type, file_url, embed_id, attrs) {
|
|
16 |
for (attr in attrs) {
|
17 |
if(!(/src/i).test(attr)){
|
18 |
if(attr != '' && attrs[attr] != ''){
|
19 |
-
oembed_youtube_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
20 |
}
|
21 |
}
|
22 |
}
|
@@ -27,12 +27,12 @@ function spider_display_embed(embed_type, file_url, embed_id, attrs) {
|
|
27 |
case 'EMBED_OEMBED_VIMEO_VIDEO':
|
28 |
var oembed_vimeo_html ='<iframe ';
|
29 |
if(embed_id!=''){
|
30 |
-
oembed_vimeo_html += ' src="' + '//player.vimeo.com/video/'+embed_id + '?enablejsapi=1"';
|
31 |
}
|
32 |
for (attr in attrs) {
|
33 |
if(!(/src/i).test(attr)){
|
34 |
if(attr != '' && attrs[attr] != ''){
|
35 |
-
oembed_vimeo_html += ' '+ attr + '="'+ attrs[attr] + '"';
|
36 |
}
|
37 |
}
|
38 |
}
|
16 |
for (attr in attrs) {
|
17 |
if(!(/src/i).test(attr)){
|
18 |
if(attr != '' && attrs[attr] != ''){
|
19 |
+
oembed_youtube_html += ' '+ attr + '="' + attrs[attr] + '"';
|
20 |
}
|
21 |
}
|
22 |
}
|
27 |
case 'EMBED_OEMBED_VIMEO_VIDEO':
|
28 |
var oembed_vimeo_html ='<iframe ';
|
29 |
if(embed_id!=''){
|
30 |
+
oembed_vimeo_html += ' src="' + '//player.vimeo.com/video/' + embed_id + '?enablejsapi=1"';
|
31 |
}
|
32 |
for (attr in attrs) {
|
33 |
if(!(/src/i).test(attr)){
|
34 |
if(attr != '' && attrs[attr] != ''){
|
35 |
+
oembed_vimeo_html += ' '+ attr + '="' + attrs[attr] + '"';
|
36 |
}
|
37 |
}
|
38 |
}
|
js/bwg_frontend.js
CHANGED
@@ -258,11 +258,15 @@ function bwg_carousel_ready() {
|
|
258 |
bwg_params_carousel[bwg]['bwg_currentlyMoving'] = false;
|
259 |
bwg_params_carousel[bwg]['data'] = [];
|
260 |
|
261 |
-
jQuery("#spider_carousel_left-ico_" + bwg).on("click", function () {
|
262 |
bwg_params_carousel[bwg]['carousel'].prev();
|
|
|
|
|
263 |
});
|
264 |
-
jQuery("#spider_carousel_right-ico_" + bwg).on("click", function () {
|
265 |
bwg_params_carousel[bwg]['carousel'].next();
|
|
|
|
|
266 |
});
|
267 |
if ( parseInt(bwg_params_carousel[bwg]['carousel_enable_autoplay']) ) {
|
268 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("title", bwg_objectsL10n.pause);
|
@@ -274,14 +278,12 @@ function bwg_carousel_ready() {
|
|
274 |
/*play*/
|
275 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("title", bwg_objectsL10n.pause);
|
276 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("class", "bwg-icon-pause bwg_ctrl_btn_" + bwg + " bwg_carousel_play_pause_" + bwg + "");
|
277 |
-
bwg_params_carousel[bwg]['bwg_currentlyMoving'] = false;
|
278 |
bwg_params_carousel[bwg]['carousel'].start();
|
279 |
}
|
280 |
else {
|
281 |
/* Pause.*/
|
282 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("title", bwg_objectsL10n.play);
|
283 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("class", "bwg-icon-play bwg_ctrl_btn_" + bwg + " bwg_carousel_play_pause_" + bwg + "");
|
284 |
-
bwg_params_carousel[bwg]['bwg_currentlyMoving'] = true;
|
285 |
bwg_params_carousel[bwg]['carousel'].pause();
|
286 |
}
|
287 |
event.stopPropagation();
|
@@ -327,7 +329,12 @@ function bwg_carousel_onload() {
|
|
327 |
}
|
328 |
|
329 |
function bwg_carousel_params(bwg) {
|
330 |
-
var
|
|
|
|
|
|
|
|
|
|
|
331 |
var par = 1;
|
332 |
if ( parent_width < bwg_params_carousel[bwg]['carousel_r_width'] ) {
|
333 |
par = parent_width / bwg_params_carousel[bwg]['carousel_r_width'];
|
@@ -373,25 +380,27 @@ function bwg_carousel_params(bwg) {
|
|
373 |
jQuery(".bwg_carousel-container" + bwg).css({width: parent_width, height: bwg_params_carousel[bwg]['image_height'] * par });
|
374 |
jQuery(".bwg_video_hide" + bwg).css({width: bwg_params_carousel[bwg]['image_width'] * par, height: bwg_params_carousel[bwg]['image_height'] * par });
|
375 |
|
376 |
-
bwg_params_carousel[bwg]['carousel']
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
|
|
|
|
395 |
}
|
396 |
|
397 |
function bwg_carousel_watermark(bwg) {
|
@@ -2410,7 +2419,7 @@ function bwg_change_image_slideshow(current_key, key, data, from_effect, bwg) {
|
|
2410 |
innhtml += '<img style="max-height: ' + cur_height + 'px !important; max-width: ' + cur_width + 'px !important; display:inline-block;" ';
|
2411 |
innhtml += ' class="bwg_slide bwg_slideshow_image_'+bwg+'" ';
|
2412 |
innhtml += ' id="bwg_slideshow_image_' + bwg + '" ';
|
2413 |
-
innhtml += ' src="' + bwg_params[bwg]['upload_url'] + jQuery("<span style=\'display: block;\' />").html(data[key]["image_url"]).text() + '" alt="' + data[key]["alt"] + '" image_id="' + data[key]["id"] + '" /></a>';
|
2414 |
} else { /*is_embed*/
|
2415 |
innhtml += '<span style="height: ' + cur_height + 'px; width: ' + cur_width + 'px;" class="bwg_popup_embed bwg_popup_watermark">';
|
2416 |
if (is_embed_instagram_video ) {
|
@@ -2427,9 +2436,9 @@ function bwg_change_image_slideshow(current_key, key, data, from_effect, bwg) {
|
|
2427 |
post_width = cur_width;
|
2428 |
post_height = post_width + 88;
|
2429 |
}
|
2430 |
-
innhtml += spider_display_embed(data[key]['filetype'], data[key]['image_url'], data[key]['filename'], {class:"bwg_embed_frame", 'data-width': data[key]['image_width'], 'data-height': data[key]['image_height'], frameborder: "0", allowfullscreen: "allowfullscreen", style: "width:" + post_width + "px; height:" + post_height + "px; vertical-align:middle; display:inline-block; position:relative;"});
|
2431 |
} else {
|
2432 |
-
innhtml += spider_display_embed(data[key]['filetype'], data[key]['image_url'], data[key]['filename'], {class:"bwg_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;" });
|
2433 |
}
|
2434 |
innhtml += "</span>";
|
2435 |
}
|
@@ -2468,7 +2477,7 @@ function bwg_preload_images_slideshow( key, bwg ) {
|
|
2468 |
var is_embed = data[index]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
2469 |
if (typeof data[index] != "undefined") {
|
2470 |
if (!is_embed) {
|
2471 |
-
jQuery("<img/>").attr("src", bwg_params[bwg]['upload_url'] + jQuery('<span style="display: block;" />').html(data[index]["image_url"]).text());
|
2472 |
}
|
2473 |
}
|
2474 |
}
|
@@ -2477,7 +2486,7 @@ function bwg_preload_images_slideshow( key, bwg ) {
|
|
2477 |
var is_embed = data[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
2478 |
if (typeof data[i] != "undefined") {
|
2479 |
if (!is_embed) {
|
2480 |
-
jQuery("<img/>").attr("src", bwg_params[bwg]['upload_url'] + jQuery('<span style="display: block;" />').html(data[i]["image_url"]).text());
|
2481 |
}
|
2482 |
}
|
2483 |
}
|
258 |
bwg_params_carousel[bwg]['bwg_currentlyMoving'] = false;
|
259 |
bwg_params_carousel[bwg]['data'] = [];
|
260 |
|
261 |
+
jQuery("#spider_carousel_left-ico_" + bwg).on("click", function (event) {
|
262 |
bwg_params_carousel[bwg]['carousel'].prev();
|
263 |
+
event.stopPropagation();
|
264 |
+
event.stopImmediatePropagation();
|
265 |
});
|
266 |
+
jQuery("#spider_carousel_right-ico_" + bwg).on("click", function (event) {
|
267 |
bwg_params_carousel[bwg]['carousel'].next();
|
268 |
+
event.stopPropagation();
|
269 |
+
event.stopImmediatePropagation();
|
270 |
});
|
271 |
if ( parseInt(bwg_params_carousel[bwg]['carousel_enable_autoplay']) ) {
|
272 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("title", bwg_objectsL10n.pause);
|
278 |
/*play*/
|
279 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("title", bwg_objectsL10n.pause);
|
280 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("class", "bwg-icon-pause bwg_ctrl_btn_" + bwg + " bwg_carousel_play_pause_" + bwg + "");
|
|
|
281 |
bwg_params_carousel[bwg]['carousel'].start();
|
282 |
}
|
283 |
else {
|
284 |
/* Pause.*/
|
285 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("title", bwg_objectsL10n.play);
|
286 |
jQuery(".bwg_carousel_play_pause_" + bwg).attr("class", "bwg-icon-play bwg_ctrl_btn_" + bwg + " bwg_carousel_play_pause_" + bwg + "");
|
|
|
287 |
bwg_params_carousel[bwg]['carousel'].pause();
|
288 |
}
|
289 |
event.stopPropagation();
|
329 |
}
|
330 |
|
331 |
function bwg_carousel_params(bwg) {
|
332 |
+
var parentt = jQuery("#bwg_container1_" + bwg).parent();
|
333 |
+
/* Trick to set parent's width to elementor tab. */
|
334 |
+
if (parentt.hasClass('elementor-tab-content')) {
|
335 |
+
parentt.width(parentt.closest('.elementor-widget-wrap').width());
|
336 |
+
}
|
337 |
+
var parent_width = parentt.width();
|
338 |
var par = 1;
|
339 |
if ( parent_width < bwg_params_carousel[bwg]['carousel_r_width'] ) {
|
340 |
par = parent_width / bwg_params_carousel[bwg]['carousel_r_width'];
|
380 |
jQuery(".bwg_carousel-container" + bwg).css({width: parent_width, height: bwg_params_carousel[bwg]['image_height'] * par });
|
381 |
jQuery(".bwg_video_hide" + bwg).css({width: bwg_params_carousel[bwg]['image_width'] * par, height: bwg_params_carousel[bwg]['image_height'] * par });
|
382 |
|
383 |
+
if ( !bwg_params_carousel[bwg]['carousel'] ) {
|
384 |
+
bwg_params_carousel[bwg]['carousel'] = jQuery("#bwg_carousel" + bwg).featureCarousel({
|
385 |
+
containerWidth: parent_width * par,
|
386 |
+
containerHeight: bwg_params_carousel[bwg]['image_height'] * par,
|
387 |
+
fit_containerWidth: bwg_params_carousel[bwg]['carousel_fit_containerWidth'],
|
388 |
+
largeFeatureWidth: bwg_params_carousel[bwg]['image_width'] * par,
|
389 |
+
largeFeatureHeight: bwg_params_carousel[bwg]['image_height'] * par,
|
390 |
+
smallFeaturePar: bwg_params_carousel[bwg]['carousel_image_par'],
|
391 |
+
currentlyMoving: false,
|
392 |
+
startingFeature: bwg_params_carousel[bwg]['bwg_currentCenterNum'],
|
393 |
+
featuresArray: [],
|
394 |
+
timeoutVar: null,
|
395 |
+
rotationsRemaining: 0,
|
396 |
+
autoPlay: bwg_params_carousel[bwg]['car_inter'] * 1000,
|
397 |
+
interval: bwg_params_carousel[bwg]['carousel_interval'] * 1000,
|
398 |
+
imagecount: bwg_params_carousel[bwg]['carousel_image_column_number'],
|
399 |
+
bwg_number: bwg,
|
400 |
+
enable_image_title: bwg_params_carousel[bwg]['enable_image_title'],
|
401 |
+
borderWidth: 0
|
402 |
+
});
|
403 |
+
}
|
404 |
}
|
405 |
|
406 |
function bwg_carousel_watermark(bwg) {
|
2419 |
innhtml += '<img style="max-height: ' + cur_height + 'px !important; max-width: ' + cur_width + 'px !important; display:inline-block;" ';
|
2420 |
innhtml += ' class="bwg_slide bwg_slideshow_image_'+bwg+'" ';
|
2421 |
innhtml += ' id="bwg_slideshow_image_' + bwg + '" ';
|
2422 |
+
innhtml += ' src="' + bwg_params[bwg]['upload_url'] + jQuery("<span style=\'display: block;\' />").html(decodeURIComponent(data[key]["image_url"])).text() + '" alt="' + data[key]["alt"] + '" image_id="' + data[key]["id"] + '" /></a>';
|
2423 |
} else { /*is_embed*/
|
2424 |
innhtml += '<span style="height: ' + cur_height + 'px; width: ' + cur_width + 'px;" class="bwg_popup_embed bwg_popup_watermark">';
|
2425 |
if (is_embed_instagram_video ) {
|
2436 |
post_width = cur_width;
|
2437 |
post_height = post_width + 88;
|
2438 |
}
|
2439 |
+
innhtml += spider_display_embed(data[key]['filetype'], decodeURIComponent(data[key]['image_url']), data[key]['filename'], {class:"bwg_embed_frame", 'data-width': data[key]['image_width'], 'data-height': data[key]['image_height'], frameborder: "0", allowfullscreen: "allowfullscreen", style: "width:" + post_width + "px; height:" + post_height + "px; vertical-align:middle; display:inline-block; position:relative;"});
|
2440 |
} else {
|
2441 |
+
innhtml += spider_display_embed(data[key]['filetype'], decodeURIComponent(data[key]['image_url']), data[key]['filename'], {class:"bwg_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;" });
|
2442 |
}
|
2443 |
innhtml += "</span>";
|
2444 |
}
|
2477 |
var is_embed = data[index]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
2478 |
if (typeof data[index] != "undefined") {
|
2479 |
if (!is_embed) {
|
2480 |
+
jQuery("<img/>").attr("src", bwg_params[bwg]['upload_url'] + jQuery('<span style="display: block;" />').html(decodeURIComponent(data[index]["image_url"])).text());
|
2481 |
}
|
2482 |
}
|
2483 |
}
|
2486 |
var is_embed = data[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
2487 |
if (typeof data[i] != "undefined") {
|
2488 |
if (!is_embed) {
|
2489 |
+
jQuery("<img/>").attr("src", bwg_params[bwg]['upload_url'] + jQuery('<span style="display: block;" />').html(decodeURIComponent(data[i]["image_url"])).text());
|
2490 |
}
|
2491 |
}
|
2492 |
}
|
js/bwg_gallery_box.js
CHANGED
@@ -1209,10 +1209,6 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1209 |
else if (bwg_current_key == key) {
|
1210 |
return;
|
1211 |
}
|
1212 |
-
/*
|
1213 |
-
jQuery("#spider_popup_left").hover().css({"display": "inline"});
|
1214 |
-
jQuery("#spider_popup_right").hover().css({"display": "inline"});
|
1215 |
-
*/
|
1216 |
|
1217 |
jQuery(".bwg_image_count").html(data[key]["number"]);
|
1218 |
/* Set filmstrip initial position.*/
|
@@ -1284,7 +1280,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1284 |
if ( !is_embed ) {
|
1285 |
jQuery(".bwg-loading").removeClass("bwg-hidden");
|
1286 |
jQuery("#bwg_download").removeClass("bwg-hidden");
|
1287 |
-
innhtml += '<img style="max-height: ' + cur_height + 'px; max-width: ' + cur_width + 'px;" class="bwg_popup_image bwg_popup_watermark" src="' + gallery_box_data['site_url'] + jQuery('<span />').html(data[key]["image_url"]).text() + '" alt="' + data[key]["alt"] + '" />';
|
1288 |
}
|
1289 |
else { /*is_embed*/
|
1290 |
/* hide download button if image source is embed */
|
@@ -1304,7 +1300,7 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1304 |
innhtml += spider_display_embed(data[key]['filetype'], data[key]['image_url'], data[key]['filename'], { class:"bwg_embed_frame", 'data-width': data[key]['image_width'], 'data-height': data[key]['image_height'], frameborder: "0", allowfullscreen: "allowfullscreen", style: "width:" + post_width + "px; height:" + post_height + "px; vertical-align:middle; display:inline-block; position:relative;"});
|
1305 |
}
|
1306 |
else {
|
1307 |
-
innhtml += spider_display_embed(data[key]['filetype'],data[key]['image_url'], data[key]['filename'], { class:"bwg_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style: "display:" + ( is_ifrem ? 'block' : 'table-cell' ) + "; width:inherit; height:inherit; vertical-align:middle;" });
|
1308 |
}
|
1309 |
innhtml += "</span>";
|
1310 |
}
|
@@ -1328,13 +1324,13 @@ function bwg_change_image_lightbox(current_key, key, data, from_effect) {
|
|
1328 |
jQuery(this).attr('src', '');
|
1329 |
});
|
1330 |
if ( !is_embed ) {
|
1331 |
-
jQuery("#bwg_fullsize_image").attr("href", gallery_box_data['site_url'] + data[key]['image_url']);
|
1332 |
-
jQuery("#bwg_download").attr("href", gallery_box_data['site_url'] + data[key]['thumb_url'].replace('/thumb/', '/.original/'));
|
1333 |
}
|
1334 |
else {
|
1335 |
-
jQuery("#bwg_fullsize_image").attr("href", data[key]['image_url']);
|
1336 |
}
|
1337 |
-
var image_arr = data[key]['image_url'].split("/");
|
1338 |
jQuery("#bwg_download").attr("download", image_arr[image_arr.length - 1].replace(/\?bwg=(\d+)$/, ""));
|
1339 |
/* Change image social networks urls.*/
|
1340 |
var bwg_share_url = encodeURIComponent(gallery_box_data['bwg_share_url']) + "=" + data[key]['id'] + encodeURIComponent('#bwg'+gallery_box_data['gallery_id']+'/') + data[key]['id'];
|
@@ -1424,7 +1420,7 @@ function bwg_preload_images_lightbox( key ) {
|
|
1424 |
if ( typeof data[index] != "undefined" ) {
|
1425 |
var is_embed = data[index]['filetype'].indexOf( "EMBED_" ) > -1 ? true : false;
|
1426 |
if ( !is_embed ) {
|
1427 |
-
jQuery( "<img/>" ).attr( "src", gallery_box_data['site_url'] + jQuery( '<span />' ).html(
|
1428 |
}
|
1429 |
}
|
1430 |
sign *= -1;
|
1209 |
else if (bwg_current_key == key) {
|
1210 |
return;
|
1211 |
}
|
|
|
|
|
|
|
|
|
1212 |
|
1213 |
jQuery(".bwg_image_count").html(data[key]["number"]);
|
1214 |
/* Set filmstrip initial position.*/
|
1280 |
if ( !is_embed ) {
|
1281 |
jQuery(".bwg-loading").removeClass("bwg-hidden");
|
1282 |
jQuery("#bwg_download").removeClass("bwg-hidden");
|
1283 |
+
innhtml += '<img style="max-height: ' + cur_height + 'px; max-width: ' + cur_width + 'px;" class="bwg_popup_image bwg_popup_watermark" src="' + gallery_box_data['site_url'] + jQuery('<span />').html(decodeURIComponent(data[key]["image_url"])).text() + '" alt="' + data[key]["alt"] + '" />';
|
1284 |
}
|
1285 |
else { /*is_embed*/
|
1286 |
/* hide download button if image source is embed */
|
1300 |
innhtml += spider_display_embed(data[key]['filetype'], data[key]['image_url'], data[key]['filename'], { class:"bwg_embed_frame", 'data-width': data[key]['image_width'], 'data-height': data[key]['image_height'], frameborder: "0", allowfullscreen: "allowfullscreen", style: "width:" + post_width + "px; height:" + post_height + "px; vertical-align:middle; display:inline-block; position:relative;"});
|
1301 |
}
|
1302 |
else {
|
1303 |
+
innhtml += spider_display_embed(data[key]['filetype'], data[key]['image_url'], data[key]['filename'], { class:"bwg_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style: "display:" + ( is_ifrem ? 'block' : 'table-cell' ) + "; width:inherit; height:inherit; vertical-align:middle;" });
|
1304 |
}
|
1305 |
innhtml += "</span>";
|
1306 |
}
|
1324 |
jQuery(this).attr('src', '');
|
1325 |
});
|
1326 |
if ( !is_embed ) {
|
1327 |
+
jQuery("#bwg_fullsize_image").attr("href", gallery_box_data['site_url'] + decodeURIComponent(data[key]['image_url']));
|
1328 |
+
jQuery("#bwg_download").attr("href", gallery_box_data['site_url'] + decodeURIComponent(data[key]['thumb_url']).replace('/thumb/', '/.original/'));
|
1329 |
}
|
1330 |
else {
|
1331 |
+
jQuery("#bwg_fullsize_image").attr("href", decodeURIComponent(data[key]['image_url']));
|
1332 |
}
|
1333 |
+
var image_arr = decodeURIComponent(data[key]['image_url']).split("/");
|
1334 |
jQuery("#bwg_download").attr("download", image_arr[image_arr.length - 1].replace(/\?bwg=(\d+)$/, ""));
|
1335 |
/* Change image social networks urls.*/
|
1336 |
var bwg_share_url = encodeURIComponent(gallery_box_data['bwg_share_url']) + "=" + data[key]['id'] + encodeURIComponent('#bwg'+gallery_box_data['gallery_id']+'/') + data[key]['id'];
|
1420 |
if ( typeof data[index] != "undefined" ) {
|
1421 |
var is_embed = data[index]['filetype'].indexOf( "EMBED_" ) > -1 ? true : false;
|
1422 |
if ( !is_embed ) {
|
1423 |
+
jQuery( "<img/>" ).attr( "src", gallery_box_data['site_url'] + jQuery( '<span />' ).html(decodeURIComponent(data[index]["image_url"])).text() );
|
1424 |
}
|
1425 |
}
|
1426 |
sign *= -1;
|
js/scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(document).ready(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.is_pro&&1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||(39===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):37===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):27===e.keyCode?spider_destroypopup(1e3):32===e.keyCode&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;if(1==gallery_box_data.is_pro){1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id))}1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().left&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause, .bwg_popup_image").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,i,a,r,_,s,o){e=e.replace(/&/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_hasalreadyreceivedpopup(_)||spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+i+"px; height:"+a+"px; margin-top:-"+a/2+"px; margin-left: -"+i/2+'px; ">'+e+"</div>").hide().appendTo("body");gallery_box_ready(),spider_showpopup(_,s,t,r,o)},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),spider_receivedpopup(e,t))}function bwg_first_image_load(e,t){e.show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function spider_receivedpopup(e,t){var i=new Date;i.setDate(i.getDate()+t),document.cookie=e+"=true;expires="+i.toUTCString()+";path=/"}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();bwg_objectsL10n.is_pro&&location.replace("#"),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i){var e={};return e.image_id=jQuery("#"+i+" input[name='image_id']").val(),e.rate=jQuery("#"+i+" input[name='score']").val(),e.ajax_task=jQuery("#rate_ajax_task").val(),jQuery.ajax({type:"POST",url:jQuery("#"+i).attr("action"),data:e,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=jQuery("#bwg_tag_id_"+_).val();s=s||0;var o=1==i?"&open_ecommerce=1":"",l=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";l=l||"",void 0!==a&&(r+="&gallery_id="+a);var n="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(n="&open_comment=1"),spider_createpopup(r+"&bwg_random_seed="+jQuery("#bwg_random_seed_"+_).val()+"&image_id="+e+"&filter_tag="+s+o+n+"&filter_search_name="+l+g,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,bwg_objectsL10n.is_pro&&(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id)),jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("<span />").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("<span />").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1<r[a].filetype.indexOf("EMBED_"),g=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),n=-1<r[a].filetype.indexOf("INSTAGRAM_VIDEO"),w=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),b=jQuery(s).height(),u=jQuery(s).width(),d='<span class="bwg_popup_image_spun1" style="display: '+(l?"block":"table")+'; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:'+(l?"block":"table-cell")+'; vertical-align: middle;text-align: center;height: 100%;">';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),d+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(w?"block":"table")+'; table-layout: fixed; height: 100%;">'+(n?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),g){var h=0,m=0;b<u+88?h=(m=b)-88:m=(h=u)+88,d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":r[a].image_width,"data-height":r[a].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+h+"px; height:"+m+"px; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(w?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});d+="</span>"}else jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden"),d+='<img style="max-height: '+b+"px; max-width: "+u+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(r[a].image_url).text()+'" alt="'+r[a].alt+'" />';function p(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",r[a].image_url):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+r[a].image_url),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+r[a].thumb_url.replace("/thumb/","/.original/")));var e=r[a].image_url.split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].image_url));i=i.replace(/%252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/share?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),0==r[a].comment_count?jQuery("#bwg_added_comments").hide():(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&bwg_move_filmstrip(),bwg_resize_instagram_post()}if(d+="</span></span>",jQuery(o).html(d),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:u,maxHeight:b,height:"auto"}),l)p();else jQuery(o).find("img").one("load",function(){p()}).each(function(){this.complete&&jQuery(this).load()})}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(t[o].image_url).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data[e]&&0!=gallery_box_data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),window.innerHeight>gallery_box_data.image_height-2*gallery_box_data.lightbox_close_btn_top&&jQuery(window).width()>=gallery_box_data.image_width-2*gallery_box_data.lightbox_close_btn_right&&1!=gallery_box_data.open_with_fullscreen?jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"):jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<jQuery(window).height()&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen");var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)&&jQuery("#bwg_star").raty({score:function(){return jQuery(this).attr("data-score")},starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,readOnly:function(){return!!e},noRatedMsg:"Not rated yet.",click:function(t,e){jQuery("#bwg_star").hide(),jQuery("#bwg_rated").show(),spider_set_input_value("rate_ajax_task","save_rate"),jQuery.when(spider_rate_ajax_save("bwg_rate_form")).then(function(){gallery_box_data.data[a].rate=t,++gallery_box_data.data[a].rate_count;var e=parseFloat(jQuery("#bwg_star").attr("data-score"));gallery_box_data.data[a].avg_rating=e?((e+t)/2).toFixed(1):t.toFixed(1),bwg_rating(gallery_box_data.data[a].rate,gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating,gallery_box_data.current_image_key)})},starHalf:"bwg-icon-"+lightbox_rate_icon+("star"==lightbox_rate_icon?"-half":"")+"-o",starOff:"bwg-icon-"+lightbox_rate_icon+"-o",starOn:"bwg-icon-"+lightbox_rate_icon,cancelOff:"bwg-icon-minus-square-o",cancelOn:"bwg-icon-minus-square-o",cancel:!1,cancelHint:"Cancel your rating.",hints:[r,r,r,r,r],alreadyRatedMsg:parseFloat(i).toFixed(1)+"\nYou have already rated.\nVotes: "+t})}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var g=o-parseFloat(s+_);else g=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(g)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=i&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=i&&(l+='<img src="//instagram.com/p/'+i+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=" >",""!=i&&(l+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+i+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var g="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(g+=" "+attr+'="'+a[attr]+'"');g+=" >",""!=i&&(g+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=g+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var n="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(n+=" "+attr+'="'+a[attr]+'"');n+=" >",""!=i&&(n+='<iframe src="//www.facebook.com/video/embed?video_id='+t+'&enablejsapi=1&wmode=transparent" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=n+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var w="<iframe ";for(attr in""!=i&&(w+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');r+=w+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var b="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=b+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(u+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=u+="</div>";break;default:var d={content:""};jQuery(document).trigger("bwg_display_embed",[d,e,t,i,a]),r=d.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(ajax_url,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=jQuery.parseJSON(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+jQuery.parseJSON(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_main_ready(){1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(jQuery(this).data("bwg"))}),bwg_document_ready(),jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}),bwg_slideshow_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_image_browser_ready()}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)})})}function bwg_blog_style_onload(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg");jQuery("#bwg_blog_style_"+bwg);jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){if(jQuery(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").length){jQuery(".fluid-width-video-wrapper").removeAttr("style");var t=jQuery(this).parents(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").contents();jQuery(this).parents(".fluid-width-video-wrapper").replaceWith(t)}jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(){jQuery(".bwg_blog_style").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e);var t=!1;jQuery(this).find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(e,jQuery(this).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(jQuery(this).attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1});var i=window.location.hash.substring(1);i&&"-1"!=i.indexOf("bwg")&&(bwg_hash_array=i.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))})}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_slideshow_blur(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_ready(){jQuery(".bwg-carousel").each(function(){var t=jQuery(this).data("bwg");bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],jQuery("#spider_carousel_left-ico_"+t).on("click",function(){bwg_params_carousel[t].carousel.prev()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(){bwg_params_carousel[t].carousel.next()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].bwg_currentlyMoving=!0,bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_carousel_params(e),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start()})}function bwg_carousel_onload(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_params_carousel[e]=jQuery(this).data("params"),bwg_carousel_watermark(e),bwg_carousel_params(e),bwg_container_loaded(e)})}function bwg_carousel_params(t){var e=jQuery("#bwg_container1_"+t).parent().width(),i=1;e<bwg_params_carousel[t].carousel_r_width?i=e/bwg_params_carousel[t].carousel_r_width:e=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*i),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:e*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*i}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel-container"+t).css({width:e,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:e*i,containerHeight:bwg_params_carousel[t].image_height*i,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*i,largeFeatureHeight:bwg_params_carousel[t].image_height*i,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:i*bwg_params_carousel[e].carousel_play_pause_btn_size/a}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(){jQuery(".bwg_slideshow").each(function(){var i=jQuery(this).data("bwg");if(jQuery("#bwg_slideshow_image_container_"+i).length){bwg_params[i]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+i).attr("data-params")),bwg_params[i].event_stack=[],bwg_container_loaded(i);var e=bwg_params[i].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+i).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i)?(parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i))%e.length:e.length-1,e,"",i),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+i).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),parseInt(jQuery("#bwg_current_image_key_"+i).val())+bwg_iterator(i)%e.length,e,"",i),!1});var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(i),jQuery(".bwg_slideshow_watermark_"+i).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+i).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+i).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(i)},500),"horizontal"==bwg_params[i].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+i).height(jQuery(".bwg_slideshow_image_wrap_"+i).height()-bwg_params[i].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+i).width(jQuery(".bwg_slideshow_image_wrap_"+i).width()-bwg_params[i].slideshow_filmstrip_width);var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_slideshow_filmstrip_"+i).bind(a,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+i).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+i).trigger("click"),!1}),jQuery(".bwg_slideshow_filmstrip_right_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500))}),jQuery(".bwg_slideshow_filmstrip_left_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500))}),"width"==bwg_params[i].width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).width(),i):bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).height(),i),jQuery("#bwg_slideshow_play_pause_"+i).off(t).on(t,function(){jQuery(".bwg_ctrl_btn_"+i).hasClass("bwg-icon-play")?(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).play()):(window.clearInterval(window["bwg_playInterval"+i]),jQuery(".bwg_slideshow_play_pause_"+i).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-play bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).pause())}),0!=bwg_params[i].enable_slideshow_autoplay&&(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&jQuery("#bwg_audio_"+i).length&&document.getElementById("bwg_audio_"+i).play()),bwg_params[i].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),i),jQuery(".bwg_slideshow_image_"+i).removeAttr("width"),jQuery(".bwg_slideshow_image_"+i).removeAttr("height")}})}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e),jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery(".image_browser_images_conteiner_"+e).attr("data-params")),setTimeout(function(){bwg_image_browser(e)},3))})}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden")}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),g=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+g)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t=jQuery(e);if(t.find(".bwg-empty-item").remove(),"horizontal"==t.data("masonry-type")){var a=t.data("thumbnail-height"),r=t.data("max-count"),_=[];for(i=0;i<r;i++)_.push(0);t.find(".bwg-item").each(function(){var e=_.indexOf(Math.min.apply(Math,_));jQuery(this).css({height:a,order:e+1}),_[e]+=jQuery(this)[0].getBoundingClientRect().width});var s=Math.max.apply(Math,_);for(t.width(s),i=0;i<r;i++)_[i]<s&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:a,order:i+1,width:s-_[i]}))}else{t.removeAttr("style");s=t.width();var o=t.data("thumbnail-width"),l=(r=t.data("max-count"),parseInt(s/o)+("0"==t.data("resizable-thumbnails")?0:1));r<l&&(l=r);var g=t.find(".bwg-item").length;g<l&&(l=g);var n,w,b=100/l,u=[];for(i=0;i<l;i++)u.push(0);t.find(".bwg-item").each(function(){var e=u.indexOf(Math.min.apply(Math,u));if(jQuery(this).css({width:b+"%",order:e+1}),0<jQuery(this).find("img").attr("data-width").length&&0<jQuery(this).find("img").attr("data-height").length){w=jQuery(this).find("img").data("width")/jQuery(this).find("img").data("height"),n=jQuery(this).width()/w;var t=+(jQuery(this).find("a>.bwg-title1").height()+jQuery(this).find("a>.bwg-masonry-thumb-description").height());jQuery(this).height(n+t)}u[e]+=jQuery(this)[0].getBoundingClientRect().height});var d=Math.max.apply(Math,u);for(i=0;i<l;i++)u[i]<d&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:b+"%",order:i+1,height:d-u[i]}));t.outerWidth(l*o),t.height(d)}bwg_container_loaded(t.data("bwg"))}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,r=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var _=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*_;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*_;else s=_;else s=_;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),t=t*s/i,c.eq(e).height(s),c.eq(e).width(t)});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*r,g=0,n=[];n[0]=0;var w=[],b=w[0]=0;c.each(function(e){row_cum_width2=b+c.eq(e).width()+2*r,row_cum_width2-o<0?(b=row_cum_width2,n[e]=g,w[g]++):e!==c.length-1?Math.abs(b-o)>Math.abs(row_cum_width2-o)||Math.abs(b-o)<=Math.abs(row_cum_width2-o)&&0==w[g]?e!==c.length-2?(b=row_cum_width2,n[e]=g,w[g]++,w[++g]=0,b=0):(b=row_cum_width2,n[e]=g,w[g]++):(w[++g]=1,n[e]=g,b=row_cum_width2-b):(b=row_cum_width2,n[e]=g,w[g]++)});for(var u=[],d=[],h=0;h<=g;h++)u[h]=1,d[h]=l;for(h=0;h<=g;h++)b=0,c.each(function(e){n[e]==h&&(b+=c.eq(e).width())}),u[h]=z=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(S=[])[0]=0;var m=[],p=[];m[0]=0,p[0]=0;for(h=1;h<=g;h++)m[h]=m[0],p[h]=p[h-1]+d[h-1];c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[n[e]]),c.eq(e).height(i*u[n[e]]),c.eq(e).parent().css({top:p[n[e]],left:m[n[e]]}),m[n[e]]+=t*u[n[e]]+2*r,S[n[e]]=e}),jQuery("#"+i).height(p[g]+d[g]-p[0])}else{var c,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0<jQuery(".header-content-with_tab").length)f=jQuery(".header-content-with_tab").width()/4-10}else f=y;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),c.eq(e).height(i*f/t),c.eq(e).width(f)});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var j=f+2*r<o?f:o-2*r,Q=Math.floor(o/(j+2*r)),v=[];v[0]=0;for(var x=[],k=[],z=0;z<Q;z++)k[z]=0,x[z]=0;c.each(function(e){for(var t=0,i=k[0],a=0;a<Q;a++)i>k[a]&&(i=k[a],t=a);v[e]=t,x[t]++,B=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:B,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var C=0,I=[],E=0,O=0;for(z=0;z<Q;z++)C+=j,I[z]=0,c.each(function(e){v[e]==z&&(I[z]+=c.eq(e).height())}),0!=I[z]&&(E+=j/I[z],O+=j*x[z]*2*r/I[z]);var M=0;0!=E&&(M=(C+O)/E);for(z=0;z<Q;z++)0!=I[z]&&(u[z]=(M-2*x[z]*r)/I[z]);var S,T=[];T[0]=0;for(z=1;z<=Q;z++)T[z]=T[z-1]+j*u[z-1]+2*r;var B=[];for(z=0;z<Q;z++)B[z]=0;(S=[])[0]=0,c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[v[e]]),c.eq(e).height(i*u[v[e]]),c.eq(e).parent().css({top:B[v[e]],left:T[v[e]]}),B[v[e]]+=i*u[v[e]]+2*r,S[v[e]]=e}),jQuery("#"+i).width(T[Q]).height(B[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(bwg,t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(r,e,_){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+r).width(),t=jQuery(this).children(".bwg_mosaic_thumb_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(e);var i=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(),a=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:_+.5*t-.5*a<0?_:_+.5*t-.5*a,left:_+.5*e-.5*i,opacity:1,"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:0,left:-1e4,opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(".bwg-album").off("click").on("click",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1").on("click",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t="",i=jQuery(e).parent().parent(),a=i.find(".current_view").val(),r=i.find(".form_id").val(),_=i.find(".cur_gal_id").val(),s=i.find(".album_gallery_id").val(),o=i.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){t=t+jQuery(e).text()+","}),""==(t=t.slice(0,-1))&&(t=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",t),jQuery(e).parent().find(".CaptionCont .placeholder").html(t),jQuery("#bwg_tag_id_"+a).val(jQuery("#bwg_tag_id_"+_).val()),bwg_select_tag(a,r,_,s,o,!1)}function bwg_document_ready(){bwg_add_lightbox(),jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this);e.data("right-click-protection")&&bwg_disable_right_click(e),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var t=e.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&t.length)for(var i=0;i<t[0].length;i++)void 0===t[0][i].attributes.selected&&(t[0][i].selected=!1);t.length&&(t.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),t.off("change").on("change",function(){bwg_filter_by_tag(this)}));var a=e.find(".bwg_order");a.length&&a.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))})}),jQuery(".search_tags").on("sumo:opened",function(){0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var e=window.location.hash.substring(1);if(e&&"-1"!=e.indexOf("bwg")){bwg_hash_array=e.replace("bwg","").split("/");var t=jQuery(".bwg_container");t&&bwg_gallery_box(bwg_hash_array[1],t,!1,bwg_hash_array[0])}bwg_blog_style_ready(),bwg_image_browser_ready(),bwg_resize_search_line()}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return 13!=(t.which||t.keyCode)||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,g,n){if("1"!=bwg_objectsL10n.front_ajax||!0===g){jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),"function"==typeof bwg_scroll_load_action&&jQuery(window).off("scroll",bwg_scroll_load_action),jQuery(".bwg_thumbnail .search_tags").off("sumo:closed");var w=jQuery("#"+t).data("ajax-url"),b=0;if(void 0===g)g=!1;var u=jQuery("#page_number_"+i).val(),d=jQuery("#bwg_search_input_"+i).val(),h={},m=jQuery("#bwg_album_breadcrumb_"+i).val();if(m&&!0!==g){var p=JSON.parse(m);if("back"==r){p.splice(-1,1);var c=p.slice(-1)[0];r=c.id,u=c.page,h["action_"+i]="back"}else"numeric"===g||s?(p.splice(-1,1),p.push({id:r,page:u,search:d})):(p.push({id:r,page:1}),u=1);h["bwg_album_breadcrumb_"+i]=JSON.stringify(p)}if(h.gallery_type=jQuery("#"+t).data("gallery-type"),h.gallery_id=jQuery("#"+t).data("gallery-id"),h.tag=jQuery("#"+t).data("tag"),h.album_id=jQuery("#"+t).data("album-id"),h.theme_id=jQuery("#"+t).data("theme-id"),h.shortcode_id=jQuery("#"+t).data("shortcode-id"),h.bwg=i,h.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(u=1),void 0===o||""==o)o="";if(void 0===n||""==n)n="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(h["page_number_"+i]=u,h["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),h["album_gallery_id_"+i]=r,h["type_"+i]=_,h["title_"+i]=o,h["description_"+i]=n,h["sortImagesByValue_"+i]=l,0<jQuery("#bwg_search_input_"+i).length&&(h["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==h["bwg_album_breadcrumb_"+i]){var y=jQuery.parseJSON(h["bwg_album_breadcrumb_"+i]);jQuery.each(y,function(e,t){h["bwg_search_"+i]="",r==t.id&&(h["bwg_search_"+i]=t.search)})}return h["bwg_tag_id_"+a]=jQuery("#bwg_tag_id_"+a).val(),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),jQuery.ajax({type:"POST",url:w,data:h,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,b=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===g?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e)},complete:function(){jQuery("div[id^='bwg_container1_'] img").each(function(){null!=jQuery(this).attr("data-lazy-src")&&""!=jQuery(this).attr("data-lazy-src")?jQuery(this).attr("src",jQuery(this).attr("data-lazy-src")):null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),jQuery(".blog_style_image_buttons_conteiner_"+i).find(jQuery(".bwg_blog_style_img_"+i)).on("load",function(){jQuery(".bwg_blog_style_img_"+i).closest(jQuery(".blog_style_image_buttons_conteiner_"+i)).show()}),jQuery("#bwg_tags_id_"+a).val(jQuery("#bwg_tag_id_"+a).val()),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_mosaic_ajax(i,b),bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_16x9_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_instapost_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),jQuery("#bwg_embed_frame_16x9_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery("#bwg_embed_frame_16x9_"+i).height(.5625*jQuery("#bwg_embed_frame_16x9_"+i).width()),jQuery("#bwg_embed_frame_instapost_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery(".bwg_embed_frame_instapost_"+i).height((jQuery(".bwg_embed_frame_instapost_"+i).width()-16)*jQuery(".bwg_embed_frame_instapost_"+i).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+i).attr("data-width")+96),jQuery("#bwg_search_input_"+i).val(h["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();var e=jQuery("#bwg_container2_"+i+" .cur_gal_id").val();jQuery("#bwg_tag_id_"+i).val(jQuery("#bwg_tag_id_"+e).val())}}),!1}if("back"!==r){var f=jQuery("#bwg_search_input_"+i).val(),j=window.location.href,Q="",v=jQuery("#bwg_tag_id_"+i).val();if(""!==window.location.hash&&(j=j.replace("#","")),""!==f&&void 0!==f?!1!==(Q=bwg_add_url_parameter(Q=bwg_remove_url_parameter("page_number_"+i,j),"bwg_search_"+i,f))&&(j=Q):!1!==(Q=bwg_remove_url_parameter("bwg_search_"+i,j))&&(j=Q),void 0!==l&&""!==l&&!1!==(Q=bwg_add_url_parameter(j,"sort_by_"+i,l))&&(j=Q),null!=v&&0<v.length){var x="",k=v.split(",");jQuery.each(k,function(e){var t=",";e===k.length-1&&(t=""),x+=k[e]+t}),""!==x&&!1!==(Q=bwg_add_url_parameter(j,"filter_tag_"+i,x))&&(j=Q)}else!1!==(Q=bwg_remove_url_parameter("filter_tag_"+i,Q))&&(j=Q);window.location.href=j}else window.history.back()}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery("#bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,g,n){var w,b=!1,u="";if(void 0!==n&&""!==n){b=!0,bwg_params[n].bwg_trans_in_progress=!0,u="_"+n,w=bwg_params[n].bwg_transition_duration;bwg_params[n].event_stack}else w=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(n))return bwg_fallback(o,l,g,n);if(!bwg_testBrowser_cssTransforms3d(n))return bwg_fallback3d(o,l,g,n);function d(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+u).removeAttr("style"),jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),jQuery(".bwg_image_info").show(),jQuery(o).html(""),b){bwg_change_watermark_container(n),bwg_params[n].bwg_trans_in_progress=!1;var e=bwg_params[n].data,t=bwg_params[n].event_stack}else{e="";gallery_box_data.bwg_trans_in_progress=!1;t=gallery_box_data.event_stack}if(void 0!==t&&0<t.length){var i=t[0].split("-");t.shift(),bwg_change_image(i[0],i[1],e,!0,n)}bwg_change_watermark_container()}b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+n).removeClass("bwg_slideshow_thumb_active_"+n).addClass("bwg_slideshow_thumb_deactive_"+n),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[n].bwg_current_key+"_"+n).removeClass("bwg_slideshow_thumb_deactive_"+n).addClass("bwg_slideshow_thumb_active_"+n),jQuery(".bwg_slideshow_dots_"+n).removeClass("bwg_slideshow_dots_active_"+n).addClass("bwg_slideshow_dots_deactive_"+n),jQuery("#bwg_dots_"+bwg_params[n].bwg_current_key+"_"+n).removeClass("bwg_slideshow_dots_deactive_"+n).addClass("bwg_slideshow_dots_active_"+n),jQuery(".bwg_slide_bg_"+n).css("perspective",1e3)):(gallery_box_data.bwg_trans_in_progress=!0,jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_slide_bg").css("perspective",1e3)),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(l).css({opacity:1,backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".bwg_slider"+u).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+u).css({transition:"all "+w+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+u).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(d)),0==w&&d()}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var g=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)g=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,g=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,g=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<g+o&&(o=0),0<g+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:g+o},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:g+s},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}})}function bwg_filmstrip_arrows(e){var t=void 0!==e&&""!==e?"_"+e:"",i=void 0!==e&&""!==e?"_slideshow":"";if("width"==(void 0!==e&&""!==e?bwg_params[e].width_or_heigh:gallery_box_data.width_or_height))var a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).width(),r=jQuery(".bwg"+i+"_filmstrip"+t).width();else a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).height(),r=jQuery(".bwg"+i+"_filmstrip"+t).height();a<r?(jQuery(".bwg"+i+"_filmstrip_left"+t).hide(),jQuery(".bwg"+i+"_filmstrip_right"+t).hide()):(jQuery(".bwg"+i+"_filmstrip_left"+t).show(),jQuery(".bwg"+i+"_filmstrip_right"+t).show())}function bwg_move_filmstrip(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",g=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,n=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==g?(t=jQuery(".bwg"+l+"_filmstrip"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip"+o).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerHeight(!0)),s="left"==n?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==g?jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+o).position().top,r="outerWidth"==g?jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top)+t),i<t||(a<Math.abs(_)?"left"==n?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):s<r&&("left"==n?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}})))}function bwg_move_dots(e){var t=jQuery(".bwg_slideshow_dots_active_"+e).position().left,i=jQuery(".bwg_slideshow_dots_active_"+e).position().left+jQuery(".bwg_slideshow_dots_active_"+e).outerWidth(!0),a=jQuery(".bwg_slideshow_dots_container_"+e).outerWidth(!0),r=jQuery(".bwg_slideshow_dots_thumbnails_"+e).outerWidth(!1),_=jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left,s=Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left)+a;r<a||(t<Math.abs(_)?jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-t},{duration:500,complete:function(){}}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500,complete:function(){}}))}function bwg_testBrowser_cssTransitions(e){return bwg_testDom("Transition",e)}function bwg_testBrowser_cssTransforms3d(e){return bwg_testDom("Perspective",e)}function bwg_testDom(e,t){for(var i=["","Webkit","Moz","ms","O","Khtml"],a=i.length;a--;)if(void 0!==document.body.style[i[a]+e])return!0;return!1}function bwg_fallback(e,t,i,a){bwg_fade(e,t,i,a)}function bwg_fallback3d(e,t,i,a){bwg_sliceV(e,t,i,a)}function bwg_none(e,t,i,a){var r=void 0!==a&&""!==a?"_"+a:"";if(jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),void 0!==a&&""!==a){var _=bwg_params[a].bwg_current_key;bwg_change_watermark_container(a),jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).removeClass("bwg_slideshow_thumb_active"+r).addClass("bwg_slideshow_thumb_deactive"+r),jQuery("#bwg_filmstrip_thumbnail_"+_+r).removeClass("bwg_slideshow_thumb_deactive"+r).addClass("bwg_slideshow_thumb_active"+r),jQuery(".bwg_slideshow_dots"+r).removeClass("bwg_slideshow_dots_active"+r).addClass("bwg_slideshow_dots_deactive"+r),jQuery("#bwg_dots_"+_+r).removeClass("bwg_slideshow_dots_deactive"+r).addClass("bwg_slideshow_dots_active"+r)}else jQuery(".bwg_image_info").show(),gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),bwg_change_watermark_container()}function bwg_iterator(e){var t=1;return void 0!==e&&""!==e&&void 0!==bwg_params[e]&&1==bwg_params[e].enable_slideshow_shuffle&&(t=Math.floor((bwg_params[e].data.length-1)*Math.random()+1)),t}function bwg_change_image_slideshow(e,t,i,a,r){i=bwg_params[r].data;if(jQuery("#bwg_slideshow_image_container_"+r).find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#image_id_"+r+"_"+i[e].id).find(".bwg_fb_video").each(function(){jQuery(this).attr("src",jQuery(this).attr("src"))}),i[t]){if(jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-pause")&&bwg_play(bwg_params[r].data,r),a||(jQuery("#bwg_current_image_key_"+r).val(t),"-1"==e?e=jQuery(".bwg_slideshow_thumb_active_"+r).children("img").attr("image_key"):"-2"==e&&(e=jQuery(".bwg_slideshow_dots_active_"+r).attr("image_key"))),bwg_params[r].bwg_trans_in_progress)return void bwg_params[r].event_stack.push(e+"-"+t);var _="right";if(t<e)_="left";else if(e==t)return;jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),"width"==bwg_params[r].width_or_height?bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).width()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width):bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).height()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width),e=t,bwg_params[r].bwg_current_key=e,jQuery("#bwg_slideshow_image_"+r).attr("image_id",i[t].id),jQuery(".bwg_slideshow_title_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1<i[t].filetype.indexOf("EMBED_"),g=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),n=-1<i[t].filetype.indexOf("INSTAGRAM_VIDEO"),w=jQuery(s).height(),b=jQuery(s).width(),u='<span class="bwg_slideshow_image_spun1_'+r+'" style="display: '+(l?"block":"table")+' ;width: inherit; height: inherit;"><span class="bwg_slideshow_image_spun2_'+r+'" style="display: '+(l?"block":"table-cell")+'; vertical-align: middle; text-align: center; ">';if(l){if(u+='<span style="height: '+w+"px; width: "+b+'px;" class="bwg_popup_embed bwg_popup_watermark">',n&&(u+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),g){var d=0,h=0;w<b+88?d=(h=w)-88:h=(d=b)+88,u+=spider_display_embed(i[t].filetype,i[t].image_url,i[t].filename,{class:"bwg_embed_frame","data-width":i[t].image_width,"data-height":i[t].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+d+"px; height:"+h+"px; vertical-align:middle; display:inline-block; position:relative;"})}else u+=spider_display_embed(i[t].filetype,i[t].image_url,i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});u+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var m="";"open_lightbox"==bwg_params[r].thumb_click_action?m+=' class="bwg_lightbox" data-image-id="'+i[t].id+'"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(m+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),u+="<a "+m+">"}u+='<img style="max-height: '+w+"px !important; max-width: "+b+'px !important; display:inline-block;" ',u+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',u+=' id="bwg_slideshow_image_'+r+'" ',u+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(i[t].image_url).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}u+="</span></span>",jQuery(o).html(u),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),0<bwg_params[r].enable_slideshow_filmstrip?bwg_move_filmstrip(r):bwg_move_dots(r),i[t].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+r).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+r).css({display:""})}bwg_add_lightbox()}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(i[_].image_url).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(i[r].image_url).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=jQuery(".bwg_slideshow_image_wrap_"+e).parent().width(),i=bwg_params[e].data;if(t>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var a="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,r="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:a}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:r}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" : hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size})}else jQuery(".bwg_slideshow_image_wrap_"+e).css({width:t}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(t*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:"width: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(t*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e),"horizontal"==bwg_params[e].filmstrip_direction?(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({width:t}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:t-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:t}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:t*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:t*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:t*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:t*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});i[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){var t=jQuery(".bwg_slideshow_embed_"+e).width(),i=jQuery(".bwg_slideshow_embed_").height();jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+96)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=jQuery(".bwg_image_container").width(),i=jQuery(".bwg_image_container").height();jQuery(".inner_instagram_iframe_bwg_embed_frame").each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+176)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-176)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96)),e.css({top:.5*(i-e.height())})}),bwg_change_watermark_container()}}function bwg_play(t,i){if(void 0!==i&&""!==i)t=bwg_params[i].data;void 0!==i&&""!==i?(window.clearInterval(window["bwg_playInterval"+i]),window["bwg_playInterval"+i]=setInterval(function(){var e=1;1==bwg_params[i].enable_slideshow_shuffle&&(e=Math.floor((t.length-1)*Math.random()+1)),bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),(parseInt(jQuery("#bwg_current_image_key_"+i).val())+e)%t.length,t,"",i)},1e3*bwg_params[i].slideshow_interval)):(window.clearInterval(gallery_box_data.bwg_playInterval),gallery_box_data.bwg_playInterval=setInterval(function(){jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")||(void 0===t||void 0!==t[parseInt(jQuery("#bwg_current_image_key").val())+1]?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):1==gallery_box_data.enable_loop&&bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0))},1e3*gallery_box_data.slideshow_interval))}function bwg_image_browser(e){if(jQuery("#bwg_embed_frame_16x9_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery("#bwg_embed_frame_16x9_"+e).height(.5625*jQuery("#bwg_embed_frame_16x9_"+e).width()),jQuery("#bwg_embed_frame_instapost_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").length){var t=jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").contents();jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").replaceWith(t)}jQuery(".bwg_embed_frame_instapost_"+e).height((jQuery(".bwg_embed_frame_instapost_"+e).width()-16)*jQuery(".bwg_embed_frame_instapost_"+e).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+e).attr("data-width")+96);var i=jQuery(".image_browser_images_"+e).width();i<=108?jQuery(".paging-input_"+e).css("display","none"):(i<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):i<=580?(jQuery(".paging-input_"+e).css("display","inline"),jQuery(".tablenav-pages_"+e+" a").css("font-size","13px"),jQuery(".paging-input_"+e).css("margin","0% 7% 0% 7%")):(jQuery(".tablenav-pages_"+e+" a").css("font-size","15px"),jQuery(".paging-input_"+e).css("margin","0% 14% 0% 14%"),jQuery(".paging-input_"+e).css("display","inline")),jQuery(".tablenav-pages_"+e+" .next-page").css("margin","0% 0% 0% 0%"),jQuery(".tablenav-pages_"+e+" .prev-page").css("margin","0% 0% 0% 0%"))}function bwg_disable_right_click(e){e.bind("contextmenu",function(){return!1}),e.css("webkitTouchCallout","none")}jQuery(document).ready(function(){bwg_main_ready(),jQuery(".bwg_container").each(function(){var e=!1;if(0<jQuery(this).find(".wd_error").length&&(e=!0),!e){var t=0;jQuery(this).on("visibility",function(){var e=jQuery(this);setInterval(function(){e.is(":hidden")?1==t&&(t=0,bwg_slideshow_blur()):0==t&&(t=1,bwg_main_ready(),bwg_slideshow_focus())},300)}).trigger("visibility")}})}),jQuery(window).on("resize",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
|
1 |
+
var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(document).ready(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.is_pro&&1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||(39===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):37===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):27===e.keyCode?spider_destroypopup(1e3):32===e.keyCode&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;if(1==gallery_box_data.is_pro){1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id))}1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3})},500))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().left&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear"):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})},500)}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause, .bwg_popup_image").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,i,a,r,_,s,o){e=e.replace(/&/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_hasalreadyreceivedpopup(_)||spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+i+"px; height:"+a+"px; margin-top:-"+a/2+"px; margin-left: -"+i/2+'px; ">'+e+"</div>").hide().appendTo("body");gallery_box_ready(),spider_showpopup(_,s,t,r,o)},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),spider_receivedpopup(e,t))}function bwg_first_image_load(e,t){e.show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function spider_receivedpopup(e,t){var i=new Date;i.setDate(i.getDate()+t),document.cookie=e+"=true;expires="+i.toUTCString()+";path=/"}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();bwg_objectsL10n.is_pro&&location.replace("#"),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i){var e={};return e.image_id=jQuery("#"+i+" input[name='image_id']").val(),e.rate=jQuery("#"+i+" input[name='score']").val(),e.ajax_task=jQuery("#rate_ajax_task").val(),jQuery.ajax({type:"POST",url:jQuery("#"+i).attr("action"),data:e,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=jQuery("#bwg_tag_id_"+_).val();s=s||0;var o=1==i?"&open_ecommerce=1":"",l=jQuery("#bwg_search_input_"+_).val(),n=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";l=l||"",void 0!==a&&(r+="&gallery_id="+a);var g="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(g="&open_comment=1"),spider_createpopup(r+"&bwg_random_seed="+jQuery("#bwg_random_seed_"+_).val()+"&image_id="+e+"&filter_tag="+s+o+g+"&filter_search_name="+l+n,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,bwg_objectsL10n.is_pro&&(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id)),jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("<span />").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("<span />").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1<r[a].filetype.indexOf("EMBED_"),n=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),g=-1<r[a].filetype.indexOf("INSTAGRAM_VIDEO"),w=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),b=jQuery(s).height(),u=jQuery(s).width(),d='<span class="bwg_popup_image_spun1" style="display: '+(l?"block":"table")+'; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:'+(l?"block":"table-cell")+'; vertical-align: middle;text-align: center;height: 100%;">';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),d+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(w?"block":"table")+'; table-layout: fixed; height: 100%;">'+(g?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),n){var h=0,m=0;b<u+88?h=(m=b)-88:m=(h=u)+88,d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":r[a].image_width,"data-height":r[a].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+h+"px; height:"+m+"px; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(w?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});d+="</span>"}else jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden"),d+='<img style="max-height: '+b+"px; max-width: "+u+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />';function p(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_id+"/")+r[a].id;if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].image_url));i=i.replace(/%252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/share?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),0==r[a].comment_count?jQuery("#bwg_added_comments").hide():(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&bwg_move_filmstrip(),bwg_resize_instagram_post()}if(d+="</span></span>",jQuery(o).html(d),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:u,maxHeight:b,height:"auto"}),l)p();else jQuery(o).find("img").one("load",function(){p()}).each(function(){this.complete&&jQuery(this).load()})}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data[e]&&0!=gallery_box_data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),window.innerHeight>gallery_box_data.image_height-2*gallery_box_data.lightbox_close_btn_top&&jQuery(window).width()>=gallery_box_data.image_width-2*gallery_box_data.lightbox_close_btn_right&&1!=gallery_box_data.open_with_fullscreen?jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"):jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<jQuery(window).height()&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen");var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)&&jQuery("#bwg_star").raty({score:function(){return jQuery(this).attr("data-score")},starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,readOnly:function(){return!!e},noRatedMsg:"Not rated yet.",click:function(t,e){jQuery("#bwg_star").hide(),jQuery("#bwg_rated").show(),spider_set_input_value("rate_ajax_task","save_rate"),jQuery.when(spider_rate_ajax_save("bwg_rate_form")).then(function(){gallery_box_data.data[a].rate=t,++gallery_box_data.data[a].rate_count;var e=parseFloat(jQuery("#bwg_star").attr("data-score"));gallery_box_data.data[a].avg_rating=e?((e+t)/2).toFixed(1):t.toFixed(1),bwg_rating(gallery_box_data.data[a].rate,gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating,gallery_box_data.current_image_key)})},starHalf:"bwg-icon-"+lightbox_rate_icon+("star"==lightbox_rate_icon?"-half":"")+"-o",starOff:"bwg-icon-"+lightbox_rate_icon+"-o",starOn:"bwg-icon-"+lightbox_rate_icon,cancelOff:"bwg-icon-minus-square-o",cancelOn:"bwg-icon-minus-square-o",cancel:!1,cancelHint:"Cancel your rating.",hints:[r,r,r,r,r],alreadyRatedMsg:parseFloat(i).toFixed(1)+"\nYou have already rated.\nVotes: "+t})}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=i&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=i&&(l+='<img src="//instagram.com/p/'+i+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=" >",""!=i&&(l+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+i+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var n="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(n+=" "+attr+'="'+a[attr]+'"');n+=" >",""!=i&&(n+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=n+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var g="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(g+=" "+attr+'="'+a[attr]+'"');g+=" >",""!=i&&(g+='<iframe src="//www.facebook.com/video/embed?video_id='+t+'&enablejsapi=1&wmode=transparent" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=g+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var w="<iframe ";for(attr in""!=i&&(w+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');r+=w+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var b="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=b+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(u+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=u+="</div>";break;default:var d={content:""};jQuery(document).trigger("bwg_display_embed",[d,e,t,i,a]),r=d.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(ajax_url,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=jQuery.parseJSON(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+jQuery.parseJSON(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_main_ready(){1==bwg_objectsL10n.lazy_load&&jQuery(function(){jQuery("img.bwg_lazyload").lazy({onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}),jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(jQuery(this).data("bwg"))}),bwg_document_ready(),jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}),bwg_slideshow_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_image_browser_ready()}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)})})}function bwg_blog_style_onload(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg");jQuery("#bwg_blog_style_"+bwg);jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){if(jQuery(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").length){jQuery(".fluid-width-video-wrapper").removeAttr("style");var t=jQuery(this).parents(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").contents();jQuery(this).parents(".fluid-width-video-wrapper").replaceWith(t)}jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(){jQuery(".bwg_blog_style").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e);var t=!1;jQuery(this).find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(e,jQuery(this).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(jQuery(this).attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1});var i=window.location.hash.substring(1);i&&"-1"!=i.indexOf("bwg")&&(bwg_hash_array=i.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))})}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_slideshow_blur(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_ready(){jQuery(".bwg-carousel").each(function(){var t=jQuery(this).data("bwg");bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_carousel_params(e),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start()})}function bwg_carousel_onload(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_params_carousel[e]=jQuery(this).data("params"),bwg_carousel_watermark(e),bwg_carousel_params(e),bwg_container_loaded(e)})}function bwg_carousel_params(t){var e=jQuery("#bwg_container1_"+t).parent();e.hasClass("elementor-tab-content")&&e.width(e.closest(".elementor-widget-wrap").width());var i=e.width(),a=1;i<bwg_params_carousel[t].carousel_r_width?a=i/bwg_params_carousel[t].carousel_r_width:i=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*a),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*a),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*a,height:bwg_params_carousel[t].image_height*a}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:i*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*a}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*a,height:bwg_params_carousel[t].image_height*a}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*a,height:bwg_params_carousel[t].image_height*a}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*a,height:bwg_params_carousel[t].image_height*a}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*a,height:bwg_params_carousel[t].image_height*a}),jQuery(".bwg_carousel-container"+t).css({width:i,height:bwg_params_carousel[t].image_height*a}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*a,height:bwg_params_carousel[t].image_height*a}),bwg_params_carousel[t].carousel||(bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:i*a,containerHeight:bwg_params_carousel[t].image_height*a,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*a,largeFeatureHeight:bwg_params_carousel[t].image_height*a,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0}))}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:i*bwg_params_carousel[e].carousel_play_pause_btn_size/a}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(){jQuery(".bwg_slideshow").each(function(){var i=jQuery(this).data("bwg");if(jQuery("#bwg_slideshow_image_container_"+i).length){bwg_params[i]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+i).attr("data-params")),bwg_params[i].event_stack=[],bwg_container_loaded(i);var e=bwg_params[i].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+i).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i)?(parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i))%e.length:e.length-1,e,"",i),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+i).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),parseInt(jQuery("#bwg_current_image_key_"+i).val())+bwg_iterator(i)%e.length,e,"",i),!1});var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(i),jQuery(".bwg_slideshow_watermark_"+i).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+i).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+i).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(i)},500),"horizontal"==bwg_params[i].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+i).height(jQuery(".bwg_slideshow_image_wrap_"+i).height()-bwg_params[i].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+i).width(jQuery(".bwg_slideshow_image_wrap_"+i).width()-bwg_params[i].slideshow_filmstrip_width);var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_slideshow_filmstrip_"+i).bind(a,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+i).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+i).trigger("click"),!1}),jQuery(".bwg_slideshow_filmstrip_right_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3})},500))}),jQuery(".bwg_slideshow_filmstrip_left_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3})},500))}),"width"==bwg_params[i].width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).width(),i):bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).height(),i),jQuery("#bwg_slideshow_play_pause_"+i).off(t).on(t,function(){jQuery(".bwg_ctrl_btn_"+i).hasClass("bwg-icon-play")?(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).play()):(window.clearInterval(window["bwg_playInterval"+i]),jQuery(".bwg_slideshow_play_pause_"+i).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-play bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).pause())}),0!=bwg_params[i].enable_slideshow_autoplay&&(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&jQuery("#bwg_audio_"+i).length&&document.getElementById("bwg_audio_"+i).play()),bwg_params[i].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),i),jQuery(".bwg_slideshow_image_"+i).removeAttr("width"),jQuery(".bwg_slideshow_image_"+i).removeAttr("height")}})}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e),jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery(".image_browser_images_conteiner_"+e).attr("data-params")),setTimeout(function(){bwg_image_browser(e)},3))})}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden")}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t=jQuery(e);if(t.find(".bwg-empty-item").remove(),"horizontal"==t.data("masonry-type")){var a=t.data("thumbnail-height"),r=t.data("max-count"),_=[];for(i=0;i<r;i++)_.push(0);t.find(".bwg-item").each(function(){var e=_.indexOf(Math.min.apply(Math,_));jQuery(this).css({height:a,order:e+1}),_[e]+=jQuery(this)[0].getBoundingClientRect().width});var s=Math.max.apply(Math,_);for(t.width(s),i=0;i<r;i++)_[i]<s&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:a,order:i+1,width:s-_[i]}))}else{t.removeAttr("style");s=t.width();var o=t.data("thumbnail-width"),l=(r=t.data("max-count"),parseInt(s/o)+("0"==t.data("resizable-thumbnails")?0:1));r<l&&(l=r);var n=t.find(".bwg-item").length;n<l&&(l=n);var g,w,b=100/l,u=[];for(i=0;i<l;i++)u.push(0);t.find(".bwg-item").each(function(){var e=u.indexOf(Math.min.apply(Math,u));if(jQuery(this).css({width:b+"%",order:e+1}),0<jQuery(this).find("img").attr("data-width").length&&0<jQuery(this).find("img").attr("data-height").length){w=jQuery(this).find("img").data("width")/jQuery(this).find("img").data("height"),g=jQuery(this).width()/w;var t=+(jQuery(this).find("a>.bwg-title1").height()+jQuery(this).find("a>.bwg-masonry-thumb-description").height());jQuery(this).height(g+t)}u[e]+=jQuery(this)[0].getBoundingClientRect().height});var d=Math.max.apply(Math,u);for(i=0;i<l;i++)u[i]<d&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:b+"%",order:i+1,height:d-u[i]}));t.outerWidth(l*o),t.height(d)}bwg_container_loaded(t.data("bwg"))}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,r=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var _=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*_;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*_;else s=_;else s=_;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),t=t*s/i,c.eq(e).height(s),c.eq(e).width(t)});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*r,n=0,g=[];g[0]=0;var w=[],b=w[0]=0;c.each(function(e){row_cum_width2=b+c.eq(e).width()+2*r,row_cum_width2-o<0?(b=row_cum_width2,g[e]=n,w[n]++):e!==c.length-1?Math.abs(b-o)>Math.abs(row_cum_width2-o)||Math.abs(b-o)<=Math.abs(row_cum_width2-o)&&0==w[n]?e!==c.length-2?(b=row_cum_width2,g[e]=n,w[n]++,w[++n]=0,b=0):(b=row_cum_width2,g[e]=n,w[n]++):(w[++n]=1,g[e]=n,b=row_cum_width2-b):(b=row_cum_width2,g[e]=n,w[n]++)});for(var u=[],d=[],h=0;h<=n;h++)u[h]=1,d[h]=l;for(h=0;h<=n;h++)b=0,c.each(function(e){g[e]==h&&(b+=c.eq(e).width())}),u[h]=z=(o-2*w[h]*r)/b,d[h]=(l-2*r)*u[h]+2*r;(S=[])[0]=0;var m=[],p=[];m[0]=0,p[0]=0;for(h=1;h<=n;h++)m[h]=m[0],p[h]=p[h-1]+d[h-1];c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[g[e]]),c.eq(e).height(i*u[g[e]]),c.eq(e).parent().css({top:p[g[e]],left:m[g[e]]}),m[g[e]]+=t*u[g[e]]+2*r,S[g[e]]=e}),jQuery("#"+i).height(p[n]+d[n]-p[0])}else{var c,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0<jQuery(".header-content-with_tab").length)f=jQuery(".header-content-with_tab").width()/4-10}else f=y;(c=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=c.get(e).naturalWidth,i=c.get(e).naturalHeight),c.eq(e).height(i*f/t),c.eq(e).width(f)});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var j=f+2*r<o?f:o-2*r,Q=Math.floor(o/(j+2*r)),v=[];v[0]=0;for(var x=[],k=[],z=0;z<Q;z++)k[z]=0,x[z]=0;c.each(function(e){for(var t=0,i=k[0],a=0;a<Q;a++)i>k[a]&&(i=k[a],t=a);v[e]=t,x[t]++,B=i,T=0+t*(j+2*r),c.eq(e).parent().css({top:B,left:T}),k[t]+=c.eq(e).height()+2*r}),(u=[])[0]=1;var C=0,I=[],E=0,O=0;for(z=0;z<Q;z++)C+=j,I[z]=0,c.each(function(e){v[e]==z&&(I[z]+=c.eq(e).height())}),0!=I[z]&&(E+=j/I[z],O+=j*x[z]*2*r/I[z]);var M=0;0!=E&&(M=(C+O)/E);for(z=0;z<Q;z++)0!=I[z]&&(u[z]=(M-2*x[z]*r)/I[z]);var S,T=[];T[0]=0;for(z=1;z<=Q;z++)T[z]=T[z-1]+j*u[z-1]+2*r;var B=[];for(z=0;z<Q;z++)B[z]=0;(S=[])[0]=0,c.each(function(e){var t=c.eq(e).width(),i=c.eq(e).height();c.eq(e).width(t*u[v[e]]),c.eq(e).height(i*u[v[e]]),c.eq(e).parent().css({top:B[v[e]],left:T[v[e]]}),B[v[e]]+=i*u[v[e]]+2*r,S[v[e]]=e}),jQuery("#"+i).width(T[Q]).height(B[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(bwg,t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(r,e,_){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+r).width(),t=jQuery(this).children(".bwg_mosaic_thumb_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(e);var i=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(),a=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:_+.5*t-.5*a<0?_:_+.5*t-.5*a,left:_+.5*e-.5*i,opacity:1,"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:0,left:-1e4,opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(".bwg-album").off("click").on("click",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1").on("click",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t="",i=jQuery(e).parent().parent(),a=i.find(".current_view").val(),r=i.find(".form_id").val(),_=i.find(".cur_gal_id").val(),s=i.find(".album_gallery_id").val(),o=i.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){t=t+jQuery(e).text()+","}),""==(t=t.slice(0,-1))&&(t=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",t),jQuery(e).parent().find(".CaptionCont .placeholder").html(t),jQuery("#bwg_tag_id_"+a).val(jQuery("#bwg_tag_id_"+_).val()),bwg_select_tag(a,r,_,s,o,!1)}function bwg_document_ready(){bwg_add_lightbox(),jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this);e.data("right-click-protection")&&bwg_disable_right_click(e),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var t=e.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&t.length)for(var i=0;i<t[0].length;i++)void 0===t[0][i].attributes.selected&&(t[0][i].selected=!1);t.length&&(t.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),t.off("change").on("change",function(){bwg_filter_by_tag(this)}));var a=e.find(".bwg_order");a.length&&a.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))})}),jQuery(".search_tags").on("sumo:opened",function(){0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var e=window.location.hash.substring(1);if(e&&"-1"!=e.indexOf("bwg")){bwg_hash_array=e.replace("bwg","").split("/");var t=jQuery(".bwg_container");t&&bwg_gallery_box(bwg_hash_array[1],t,!1,bwg_hash_array[0])}bwg_blog_style_ready(),bwg_image_browser_ready(),bwg_resize_search_line()}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return 13!=(t.which||t.keyCode)||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,n,g){if("1"!=bwg_objectsL10n.front_ajax||!0===n){jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),"function"==typeof bwg_scroll_load_action&&jQuery(window).off("scroll",bwg_scroll_load_action),jQuery(".bwg_thumbnail .search_tags").off("sumo:closed");var w=jQuery("#"+t).data("ajax-url"),b=0;if(void 0===n)n=!1;var u=jQuery("#page_number_"+i).val(),d=jQuery("#bwg_search_input_"+i).val(),h={},m=jQuery("#bwg_album_breadcrumb_"+i).val();if(m&&!0!==n){var p=JSON.parse(m);if("back"==r){p.splice(-1,1);var c=p.slice(-1)[0];r=c.id,u=c.page,h["action_"+i]="back"}else"numeric"===n||s?(p.splice(-1,1),p.push({id:r,page:u,search:d})):(p.push({id:r,page:1}),u=1);h["bwg_album_breadcrumb_"+i]=JSON.stringify(p)}if(h.gallery_type=jQuery("#"+t).data("gallery-type"),h.gallery_id=jQuery("#"+t).data("gallery-id"),h.tag=jQuery("#"+t).data("tag"),h.album_id=jQuery("#"+t).data("album-id"),h.theme_id=jQuery("#"+t).data("theme-id"),h.shortcode_id=jQuery("#"+t).data("shortcode-id"),h.bwg=i,h.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(u=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(h["page_number_"+i]=u,h["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),h["album_gallery_id_"+i]=r,h["type_"+i]=_,h["title_"+i]=o,h["description_"+i]=g,h["sortImagesByValue_"+i]=l,0<jQuery("#bwg_search_input_"+i).length&&(h["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==h["bwg_album_breadcrumb_"+i]){var y=jQuery.parseJSON(h["bwg_album_breadcrumb_"+i]);jQuery.each(y,function(e,t){h["bwg_search_"+i]="",r==t.id&&(h["bwg_search_"+i]=t.search)})}return h["bwg_tag_id_"+a]=jQuery("#bwg_tag_id_"+a).val(),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()}),jQuery.ajax({type:"POST",url:w,data:h,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,b=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e)},complete:function(){jQuery("div[id^='bwg_container1_'] img").each(function(){null!=jQuery(this).attr("data-lazy-src")&&""!=jQuery(this).attr("data-lazy-src")?jQuery(this).attr("src",jQuery(this).attr("data-lazy-src")):null!=jQuery(this).attr("data-original")&&""!=jQuery(this).attr("data-original")&&jQuery(this).attr("src",jQuery(this).attr("data-original"))}),jQuery(".blog_style_image_buttons_conteiner_"+i).find(jQuery(".bwg_blog_style_img_"+i)).on("load",function(){jQuery(".bwg_blog_style_img_"+i).closest(jQuery(".blog_style_image_buttons_conteiner_"+i)).show()}),jQuery("#bwg_tags_id_"+a).val(jQuery("#bwg_tag_id_"+a).val()),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_mosaic_ajax(i,b),bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_16x9_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_instapost_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),jQuery("#bwg_embed_frame_16x9_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery("#bwg_embed_frame_16x9_"+i).height(.5625*jQuery("#bwg_embed_frame_16x9_"+i).width()),jQuery("#bwg_embed_frame_instapost_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery(".bwg_embed_frame_instapost_"+i).height((jQuery(".bwg_embed_frame_instapost_"+i).width()-16)*jQuery(".bwg_embed_frame_instapost_"+i).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+i).attr("data-width")+96),jQuery("#bwg_search_input_"+i).val(h["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();var e=jQuery("#bwg_container2_"+i+" .cur_gal_id").val();jQuery("#bwg_tag_id_"+i).val(jQuery("#bwg_tag_id_"+e).val())}}),!1}if("back"!==r){var f=jQuery("#bwg_search_input_"+i).val(),j=window.location.href,Q="",v=jQuery("#bwg_tag_id_"+i).val();if(""!==window.location.hash&&(j=j.replace("#","")),""!==f&&void 0!==f?!1!==(Q=bwg_add_url_parameter(Q=bwg_remove_url_parameter("page_number_"+i,j),"bwg_search_"+i,f))&&(j=Q):!1!==(Q=bwg_remove_url_parameter("bwg_search_"+i,j))&&(j=Q),void 0!==l&&""!==l&&!1!==(Q=bwg_add_url_parameter(j,"sort_by_"+i,l))&&(j=Q),null!=v&&0<v.length){var x="",k=v.split(",");jQuery.each(k,function(e){var t=",";e===k.length-1&&(t=""),x+=k[e]+t}),""!==x&&!1!==(Q=bwg_add_url_parameter(j,"filter_tag_"+i,x))&&(j=Q)}else!1!==(Q=bwg_remove_url_parameter("filter_tag_"+i,Q))&&(j=Q);window.location.href=j}else window.history.back()}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery("#bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,n,g){var w,b=!1,u="";if(void 0!==g&&""!==g){b=!0,bwg_params[g].bwg_trans_in_progress=!0,u="_"+g,w=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else w=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(g))return bwg_fallback(o,l,n,g);if(!bwg_testBrowser_cssTransforms3d(g))return bwg_fallback3d(o,l,n,g);function d(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+u).removeAttr("style"),jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),jQuery(".bwg_image_info").show(),jQuery(o).html(""),b){bwg_change_watermark_container(g),bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].data,t=bwg_params[g].event_stack}else{e="";gallery_box_data.bwg_trans_in_progress=!1;t=gallery_box_data.event_stack}if(void 0!==t&&0<t.length){var i=t[0].split("-");t.shift(),bwg_change_image(i[0],i[1],e,!0,g)}bwg_change_watermark_container()}b?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g),jQuery(".bwg_slide_bg_"+g).css("perspective",1e3)):(gallery_box_data.bwg_trans_in_progress=!0,jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_slide_bg").css("perspective",1e3)),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(l).css({opacity:1,backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".bwg_slider"+u).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+u).css({transition:"all "+w+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+u).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(d)),0==w&&d()}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+o&&(o=0),0<n+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+o},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+s},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}})}function bwg_filmstrip_arrows(e){var t=void 0!==e&&""!==e?"_"+e:"",i=void 0!==e&&""!==e?"_slideshow":"";if("width"==(void 0!==e&&""!==e?bwg_params[e].width_or_heigh:gallery_box_data.width_or_height))var a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).width(),r=jQuery(".bwg"+i+"_filmstrip"+t).width();else a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).height(),r=jQuery(".bwg"+i+"_filmstrip"+t).height();a<r?(jQuery(".bwg"+i+"_filmstrip_left"+t).hide(),jQuery(".bwg"+i+"_filmstrip_right"+t).hide()):(jQuery(".bwg"+i+"_filmstrip_left"+t).show(),jQuery(".bwg"+i+"_filmstrip_right"+t).show())}function bwg_move_filmstrip(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==n?(t=jQuery(".bwg"+l+"_filmstrip"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip"+o).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerHeight(!0)),s="left"==g?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+o).position().top,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top)+t),i<t||(a<Math.abs(_)?"left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}})))}function bwg_move_dots(e){var t=jQuery(".bwg_slideshow_dots_active_"+e).position().left,i=jQuery(".bwg_slideshow_dots_active_"+e).position().left+jQuery(".bwg_slideshow_dots_active_"+e).outerWidth(!0),a=jQuery(".bwg_slideshow_dots_container_"+e).outerWidth(!0),r=jQuery(".bwg_slideshow_dots_thumbnails_"+e).outerWidth(!1),_=jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left,s=Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left)+a;r<a||(t<Math.abs(_)?jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-t},{duration:500,complete:function(){}}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500,complete:function(){}}))}function bwg_testBrowser_cssTransitions(e){return bwg_testDom("Transition",e)}function bwg_testBrowser_cssTransforms3d(e){return bwg_testDom("Perspective",e)}function bwg_testDom(e,t){for(var i=["","Webkit","Moz","ms","O","Khtml"],a=i.length;a--;)if(void 0!==document.body.style[i[a]+e])return!0;return!1}function bwg_fallback(e,t,i,a){bwg_fade(e,t,i,a)}function bwg_fallback3d(e,t,i,a){bwg_sliceV(e,t,i,a)}function bwg_none(e,t,i,a){var r=void 0!==a&&""!==a?"_"+a:"";if(jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),void 0!==a&&""!==a){var _=bwg_params[a].bwg_current_key;bwg_change_watermark_container(a),jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).removeClass("bwg_slideshow_thumb_active"+r).addClass("bwg_slideshow_thumb_deactive"+r),jQuery("#bwg_filmstrip_thumbnail_"+_+r).removeClass("bwg_slideshow_thumb_deactive"+r).addClass("bwg_slideshow_thumb_active"+r),jQuery(".bwg_slideshow_dots"+r).removeClass("bwg_slideshow_dots_active"+r).addClass("bwg_slideshow_dots_deactive"+r),jQuery("#bwg_dots_"+_+r).removeClass("bwg_slideshow_dots_deactive"+r).addClass("bwg_slideshow_dots_active"+r)}else jQuery(".bwg_image_info").show(),gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),bwg_change_watermark_container()}function bwg_iterator(e){var t=1;return void 0!==e&&""!==e&&void 0!==bwg_params[e]&&1==bwg_params[e].enable_slideshow_shuffle&&(t=Math.floor((bwg_params[e].data.length-1)*Math.random()+1)),t}function bwg_change_image_slideshow(e,t,i,a,r){i=bwg_params[r].data;if(jQuery("#bwg_slideshow_image_container_"+r).find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#image_id_"+r+"_"+i[e].id).find(".bwg_fb_video").each(function(){jQuery(this).attr("src",jQuery(this).attr("src"))}),i[t]){if(jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-pause")&&bwg_play(bwg_params[r].data,r),a||(jQuery("#bwg_current_image_key_"+r).val(t),"-1"==e?e=jQuery(".bwg_slideshow_thumb_active_"+r).children("img").attr("image_key"):"-2"==e&&(e=jQuery(".bwg_slideshow_dots_active_"+r).attr("image_key"))),bwg_params[r].bwg_trans_in_progress)return void bwg_params[r].event_stack.push(e+"-"+t);var _="right";if(t<e)_="left";else if(e==t)return;jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),"width"==bwg_params[r].width_or_height?bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).width()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width):bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).height()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width),e=t,bwg_params[r].bwg_current_key=e,jQuery("#bwg_slideshow_image_"+r).attr("image_id",i[t].id),jQuery(".bwg_slideshow_title_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1<i[t].filetype.indexOf("EMBED_"),n=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),g=-1<i[t].filetype.indexOf("INSTAGRAM_VIDEO"),w=jQuery(s).height(),b=jQuery(s).width(),u='<span class="bwg_slideshow_image_spun1_'+r+'" style="display: '+(l?"block":"table")+' ;width: inherit; height: inherit;"><span class="bwg_slideshow_image_spun2_'+r+'" style="display: '+(l?"block":"table-cell")+'; vertical-align: middle; text-align: center; ">';if(l){if(u+='<span style="height: '+w+"px; width: "+b+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(u+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var d=0,h=0;w<b+88?d=(h=w)-88:h=(d=b)+88,u+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame","data-width":i[t].image_width,"data-height":i[t].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+d+"px; height:"+h+"px; vertical-align:middle; display:inline-block; position:relative;"})}else u+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});u+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var m="";"open_lightbox"==bwg_params[r].thumb_click_action?m+=' class="bwg_lightbox" data-image-id="'+i[t].id+'"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(m+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),u+="<a "+m+">"}u+='<img style="max-height: '+w+"px !important; max-width: "+b+'px !important; display:inline-block;" ',u+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',u+=' id="bwg_slideshow_image_'+r+'" ',u+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}u+="</span></span>",jQuery(o).html(u),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),0<bwg_params[r].enable_slideshow_filmstrip?bwg_move_filmstrip(r):bwg_move_dots(r),i[t].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+r).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+r).css({display:""})}bwg_add_lightbox()}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=jQuery(".bwg_slideshow_image_wrap_"+e).parent().width(),i=bwg_params[e].data;if(t>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var a="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,r="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:a}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:r}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" : hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size})}else jQuery(".bwg_slideshow_image_wrap_"+e).css({width:t}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(t*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:"width: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(t*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e),"horizontal"==bwg_params[e].filmstrip_direction?(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({width:t}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:t-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:t}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:t*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:t*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:t*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:t*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});i[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){var t=jQuery(".bwg_slideshow_embed_"+e).width(),i=jQuery(".bwg_slideshow_embed_").height();jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+96)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=jQuery(".bwg_image_container").width(),i=jQuery(".bwg_image_container").height();jQuery(".inner_instagram_iframe_bwg_embed_frame").each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+176)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-176)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96)),e.css({top:.5*(i-e.height())})}),bwg_change_watermark_container()}}function bwg_play(t,i){if(void 0!==i&&""!==i)t=bwg_params[i].data;void 0!==i&&""!==i?(window.clearInterval(window["bwg_playInterval"+i]),window["bwg_playInterval"+i]=setInterval(function(){var e=1;1==bwg_params[i].enable_slideshow_shuffle&&(e=Math.floor((t.length-1)*Math.random()+1)),bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),(parseInt(jQuery("#bwg_current_image_key_"+i).val())+e)%t.length,t,"",i)},1e3*bwg_params[i].slideshow_interval)):(window.clearInterval(gallery_box_data.bwg_playInterval),gallery_box_data.bwg_playInterval=setInterval(function(){jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")||(void 0===t||void 0!==t[parseInt(jQuery("#bwg_current_image_key").val())+1]?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):1==gallery_box_data.enable_loop&&bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0))},1e3*gallery_box_data.slideshow_interval))}function bwg_image_browser(e){if(jQuery("#bwg_embed_frame_16x9_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery("#bwg_embed_frame_16x9_"+e).height(.5625*jQuery("#bwg_embed_frame_16x9_"+e).width()),jQuery("#bwg_embed_frame_instapost_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").length){var t=jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").contents();jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").replaceWith(t)}jQuery(".bwg_embed_frame_instapost_"+e).height((jQuery(".bwg_embed_frame_instapost_"+e).width()-16)*jQuery(".bwg_embed_frame_instapost_"+e).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+e).attr("data-width")+96);var i=jQuery(".image_browser_images_"+e).width();i<=108?jQuery(".paging-input_"+e).css("display","none"):(i<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):i<=580?(jQuery(".paging-input_"+e).css("display","inline"),jQuery(".tablenav-pages_"+e+" a").css("font-size","13px"),jQuery(".paging-input_"+e).css("margin","0% 7% 0% 7%")):(jQuery(".tablenav-pages_"+e+" a").css("font-size","15px"),jQuery(".paging-input_"+e).css("margin","0% 14% 0% 14%"),jQuery(".paging-input_"+e).css("display","inline")),jQuery(".tablenav-pages_"+e+" .next-page").css("margin","0% 0% 0% 0%"),jQuery(".tablenav-pages_"+e+" .prev-page").css("margin","0% 0% 0% 0%"))}function bwg_disable_right_click(e){e.bind("contextmenu",function(){return!1}),e.css("webkitTouchCallout","none")}jQuery(document).ready(function(){bwg_main_ready(),jQuery(".bwg_container").each(function(){var e=!1;if(0<jQuery(this).find(".wd_error").length&&(e=!0),!e){var t=0;jQuery(this).on("visibility",function(){var e=jQuery(this);setInterval(function(){e.is(":hidden")?1==t&&(t=0,bwg_slideshow_blur()):0==t&&(t=1,bwg_main_ready(),bwg_slideshow_focus())},300)}).trigger("visibility")}})}),jQuery(window).on("resize",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
|
languages/bwg-da_DK.mo
CHANGED
Binary file
|
languages/bwg-da_DK.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: bwg\n"
|
4 |
"POT-Creation-Date: 2019-11-06 12:39+0400\n"
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: da\n"
|
@@ -5886,7 +5886,7 @@ msgstr "Der er ingen billeder matcher din søgning."
|
|
5886 |
|
5887 |
#: photo-gallery.php:1410
|
5888 |
msgid "Select Tag"
|
5889 |
-
msgstr ""
|
5890 |
|
5891 |
#: photo-gallery.php:1411
|
5892 |
#, fuzzy
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: bwg\n"
|
4 |
"POT-Creation-Date: 2019-11-06 12:39+0400\n"
|
5 |
+
"PO-Revision-Date: 2020-01-30 14:43+0400\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: da\n"
|
5886 |
|
5887 |
#: photo-gallery.php:1410
|
5888 |
msgid "Select Tag"
|
5889 |
+
msgstr "Vælg varegruppe"
|
5890 |
|
5891 |
#: photo-gallery.php:1411
|
5892 |
#, fuzzy
|
photo-gallery.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Photo Gallery
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/?utm_source=photo_gallery&utm_medium=free_plugin
|
5 |
* 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.
|
6 |
-
* Version: 1.5.
|
7 |
* Author: Photo Gallery Team
|
8 |
* Author URI: https://10web.io/plugins/?utm_source=photo_gallery&utm_medium=free_plugin
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -86,8 +86,8 @@ final class BWG {
|
|
86 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
87 |
$this->front_url = $this->plugin_url;
|
88 |
$this->main_file = plugin_basename(__FILE__);
|
89 |
-
$this->plugin_version = '1.5.
|
90 |
-
$this->db_version = '1.5.
|
91 |
$this->prefix = 'bwg';
|
92 |
$this->nicename = __('Photo Gallery', $this->prefix);
|
93 |
|
@@ -391,7 +391,7 @@ final class BWG {
|
|
391 |
*/
|
392 |
public function admin_notices() {
|
393 |
// Show this notice only on Photo Gallery pages.
|
394 |
-
if ( isset( $_GET[
|
395 |
/**
|
396 |
* possible values are 'editor_missing', 'editor_missing_dismissed', 'recreate_dismissed', false
|
397 |
*/
|
@@ -452,11 +452,8 @@ final class BWG {
|
|
452 |
*/
|
453 |
public function admin_menu() {
|
454 |
$permissions = $this->is_pro ? $this->options->permissions : 'manage_options';
|
455 |
-
$parent_slug =
|
456 |
-
|
457 |
-
add_menu_page($this->nicename, $this->nicename, $permissions, 'galleries_' . $this->prefix, array($this , 'admin_pages'), $this->plugin_url . '/images/icons/icon.png');
|
458 |
-
$parent_slug = 'galleries_' . $this->prefix;
|
459 |
-
}
|
460 |
|
461 |
$galleries_page = add_submenu_page($parent_slug, __('Add Galleries/Images', $this->prefix), __('Add Galleries/Images', $this->prefix), $permissions, 'galleries_' . $this->prefix, array($this , 'admin_pages'));
|
462 |
add_action('load-' . $galleries_page, array($this, 'galleries_per_page_option'));
|
@@ -770,12 +767,12 @@ final class BWG {
|
|
770 |
|
771 |
// TODO: move
|
772 |
public function bwg_captcha() {
|
773 |
-
if (
|
774 |
-
$i = (
|
775 |
-
$r2 = (
|
776 |
-
$rrr = (
|
777 |
$randNum = 0 + $r2 + $rrr;
|
778 |
-
$digit = (
|
779 |
$cap_width = $digit * 10 + 15;
|
780 |
$cap_height = 26;
|
781 |
$cap_length_min = $digit;
|
@@ -1365,7 +1362,7 @@ final class BWG {
|
|
1365 |
);
|
1366 |
if ( $this->is_pro ) {
|
1367 |
wp_register_script($this->prefix . '_raty', BWG()->front_url . '/js/jquery.raty.min.js', $required_scripts, '2.5.2', $in_footer);
|
1368 |
-
wp_register_script($this->prefix . '_featureCarousel', BWG()->plugin_url . '/js/jquery.featureCarousel.
|
1369 |
// 3D Tag Cloud.
|
1370 |
wp_register_script($this->prefix . '_3DEngine', BWG()->front_url . '/js/3DEngine/3DEngine.min.js', $required_scripts, '1.0.0', $in_footer);
|
1371 |
|
@@ -1689,7 +1686,7 @@ final class BWG {
|
|
1689 |
"plugin_menu_title" => $this->nicename,
|
1690 |
"plugin_menu_icon" => BWG()->plugin_url . '/images/icons/icon.png',
|
1691 |
"deactivate" => !$this->is_pro,
|
1692 |
-
"subscribe" =>
|
1693 |
"custom_post" => '',
|
1694 |
"menu_position" => null,
|
1695 |
"display_overview" => false,
|
@@ -1978,35 +1975,3 @@ function BWG() {
|
|
1978 |
}
|
1979 |
|
1980 |
BWG();
|
1981 |
-
|
1982 |
-
/**
|
1983 |
-
* Display gallery with function.
|
1984 |
-
*
|
1985 |
-
* @param $id Shortcode id.
|
1986 |
-
*/
|
1987 |
-
function photo_gallery( $id ) {
|
1988 |
-
echo BWG()->shortcode(array('id' => $id));
|
1989 |
-
}
|
1990 |
-
|
1991 |
-
/**
|
1992 |
-
* Show 10Web plugin's install/activate banner.
|
1993 |
-
*/
|
1994 |
-
if ( !class_exists ( 'TWBanner' ) ) {
|
1995 |
-
require_once( BWG()->plugin_dir . '/banner_class.php' );
|
1996 |
-
}
|
1997 |
-
if ( !BWG()->is_pro ) {
|
1998 |
-
$tw_banner_params = array(
|
1999 |
-
'menu_postfix' => '_' . BWG()->prefix, // To display on only current plugin pages.
|
2000 |
-
'prefix' => BWG()->prefix, // Current plugin prefix.
|
2001 |
-
'logo' => '/images/tw-gb/photo-gallery.svg', // Current plugin logo relative URL.
|
2002 |
-
'plugin_slug' => 'photo-gallery', // Current plugin slug.
|
2003 |
-
'plugin_url' => BWG()->plugin_url, // Current plugin URL.
|
2004 |
-
'plugin_id' => 101, // Current plugin id.
|
2005 |
-
'text' => sprintf(__("%s Photo Gallery advises:%s %sCheck your website’s performance, optimize images and improve the speed in just minutes.%s", BWG()->prefix), '<span>', '</span>', '<span>', '</span>'), // Banner text.
|
2006 |
-
'slug' => '10web-manager', // Plugin slug to be installed.
|
2007 |
-
'mu_plugin_slug' => '10web-manager', // Must use plugin slug.
|
2008 |
-
'base_php' => '10web-manager.php', // Plugin base php filename to be installed.
|
2009 |
-
'page_url' => admin_url('admin.php?page=tenweb_menu'), // Redirect to URL after activating the plugin.
|
2010 |
-
);
|
2011 |
-
// new TWBanner($tw_banner_params);
|
2012 |
-
}
|
3 |
* Plugin Name: Photo Gallery
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/?utm_source=photo_gallery&utm_medium=free_plugin
|
5 |
* 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.
|
6 |
+
* Version: 1.5.46
|
7 |
* Author: Photo Gallery Team
|
8 |
* Author URI: https://10web.io/plugins/?utm_source=photo_gallery&utm_medium=free_plugin
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
86 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
87 |
$this->front_url = $this->plugin_url;
|
88 |
$this->main_file = plugin_basename(__FILE__);
|
89 |
+
$this->plugin_version = '1.5.46';
|
90 |
+
$this->db_version = '1.5.46';
|
91 |
$this->prefix = 'bwg';
|
92 |
$this->nicename = __('Photo Gallery', $this->prefix);
|
93 |
|
391 |
*/
|
392 |
public function admin_notices() {
|
393 |
// Show this notice only on Photo Gallery pages.
|
394 |
+
if ( isset( $_GET['page'] ) && strpos( esc_html( $_GET['page'] ), '_bwg' ) !== FALSE ) {
|
395 |
/**
|
396 |
* possible values are 'editor_missing', 'editor_missing_dismissed', 'recreate_dismissed', false
|
397 |
*/
|
452 |
*/
|
453 |
public function admin_menu() {
|
454 |
$permissions = $this->is_pro ? $this->options->permissions : 'manage_options';
|
455 |
+
$parent_slug = 'galleries_' . $this->prefix;
|
456 |
+
add_menu_page($this->nicename, $this->nicename, $permissions, 'galleries_' . $this->prefix, array($this , 'admin_pages'), $this->plugin_url . '/images/icons/icon.png');
|
|
|
|
|
|
|
457 |
|
458 |
$galleries_page = add_submenu_page($parent_slug, __('Add Galleries/Images', $this->prefix), __('Add Galleries/Images', $this->prefix), $permissions, 'galleries_' . $this->prefix, array($this , 'admin_pages'));
|
459 |
add_action('load-' . $galleries_page, array($this, 'galleries_per_page_option'));
|
767 |
|
768 |
// TODO: move
|
769 |
public function bwg_captcha() {
|
770 |
+
if ( WDWLibrary::get('action') == 'bwg_captcha') {
|
771 |
+
$i = WDWLibrary::get('i');
|
772 |
+
$r2 = WDWLibrary::get('r2', 0, 'intval');
|
773 |
+
$rrr = WDWLibrary::get('rrr', 0, 'intval');
|
774 |
$randNum = 0 + $r2 + $rrr;
|
775 |
+
$digit = WDWLibrary::get('digit', 0, 'intval');
|
776 |
$cap_width = $digit * 10 + 15;
|
777 |
$cap_height = 26;
|
778 |
$cap_length_min = $digit;
|
1362 |
);
|
1363 |
if ( $this->is_pro ) {
|
1364 |
wp_register_script($this->prefix . '_raty', BWG()->front_url . '/js/jquery.raty.min.js', $required_scripts, '2.5.2', $in_footer);
|
1365 |
+
wp_register_script($this->prefix . '_featureCarousel', BWG()->plugin_url . '/js/jquery.featureCarousel.js', $required_scripts, $version, $in_footer);
|
1366 |
// 3D Tag Cloud.
|
1367 |
wp_register_script($this->prefix . '_3DEngine', BWG()->front_url . '/js/3DEngine/3DEngine.min.js', $required_scripts, '1.0.0', $in_footer);
|
1368 |
|
1686 |
"plugin_menu_title" => $this->nicename,
|
1687 |
"plugin_menu_icon" => BWG()->plugin_url . '/images/icons/icon.png',
|
1688 |
"deactivate" => !$this->is_pro,
|
1689 |
+
"subscribe" => false,
|
1690 |
"custom_post" => '',
|
1691 |
"menu_position" => null,
|
1692 |
"display_overview" => false,
|
1975 |
}
|
1976 |
|
1977 |
BWG();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,wdsupport,photogallerysupport,10web
|
|
3 |
Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 1.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -282,6 +282,9 @@ Choose whether to display random or the first/last specific number of images.
|
|
282 |
|
283 |
== Changelog ==
|
284 |
|
|
|
|
|
|
|
285 |
= 1.5.45 =
|
286 |
* Fixed: Slideshow and carousel view description.
|
287 |
|
3 |
Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 1.5.46
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
282 |
|
283 |
== Changelog ==
|
284 |
|
285 |
+
= 1.5.46 =
|
286 |
+
* Fixed: Security issue. (This vulnerability was discovered by Vishnupriya Ilango of Fortinet's FortiGuard Labs.)
|
287 |
+
|
288 |
= 1.5.45 =
|
289 |
* Fixed: Slideshow and carousel view description.
|
290 |
|
wd/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
Version: 1.
|
2 |
-
|
3 |
|
4 |
|
5 |
Usage:
|
1 |
+
Version: 1.1.1
|
|
|
2 |
|
3 |
|
4 |
Usage:
|
wd/assets/css/deactivate_popup.css
CHANGED
@@ -1,103 +1,107 @@
|
|
1 |
-
.tenweb-opacity{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
}
|
12 |
|
13 |
-
.tenweb-deactivate-popup{
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
background: rgba(221, 221, 221, 0.14);
|
34 |
}
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
}
|
39 |
-
|
40 |
-
|
|
|
41 |
}
|
42 |
-
|
43 |
-
|
|
|
44 |
}
|
45 |
-
|
46 |
-
.tenweb-btns{
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
}
|
51 |
|
52 |
-
.additional_details_wrap{
|
53 |
-
|
54 |
}
|
55 |
|
56 |
-
.tenweb-additional-active{
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
}
|
61 |
-
|
62 |
-
|
|
|
63 |
}
|
64 |
|
65 |
-
.tenweb-popup-active2{
|
66 |
-
|
67 |
}
|
68 |
|
69 |
-
.tenweb-popup-active4{
|
70 |
-
|
71 |
}
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
80 |
}
|
81 |
|
82 |
-
.tenweb-deactivate-popup-opacity .tenweb-img-loader{
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
}
|
91 |
|
92 |
-
.tenweb-deactivate-popup-close-btn{
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
}
|
1 |
+
.tenweb-opacity {
|
2 |
+
position: fixed;
|
3 |
+
top: 0px;
|
4 |
+
bottom: 0px;
|
5 |
+
left: 0px;
|
6 |
+
right: 0px;
|
7 |
+
z-index: 9999;
|
8 |
+
background: #000;
|
9 |
+
opacity: 0.5;
|
10 |
+
display: none;
|
11 |
}
|
12 |
|
13 |
+
.tenweb-deactivate-popup {
|
14 |
+
position: fixed;
|
15 |
+
top: 0px;
|
16 |
+
bottom: 0px;
|
17 |
+
left: 0px;
|
18 |
+
right: 0px;
|
19 |
+
background: #FFF;
|
20 |
+
z-index: 999999;
|
21 |
+
width: 600px;
|
22 |
+
height: 281px;
|
23 |
+
margin: auto;
|
24 |
+
display: none;
|
25 |
+
box-sizing: border-box;
|
26 |
}
|
27 |
|
28 |
+
.tenweb-deactivate-popup-header {
|
29 |
+
border-bottom: 1px solid #CCC;
|
30 |
+
padding: 18px 40px;
|
31 |
+
font-size: 16px;
|
32 |
+
background: rgba(221, 221, 221, 0.14);
|
|
|
33 |
}
|
34 |
+
|
35 |
+
.tenweb-deactivate-popup-body {
|
36 |
+
padding: 20px 40px;
|
37 |
+
border-bottom: 1px solid #CCC;
|
38 |
}
|
39 |
+
|
40 |
+
.tenweb-deactivate-popup-body input[type=text] {
|
41 |
+
width: 220px;
|
42 |
}
|
43 |
+
|
44 |
+
.tenweb-deactivate-popup-body textarea {
|
45 |
+
width: 100%;
|
46 |
}
|
47 |
+
|
48 |
+
.tenweb-btns {
|
49 |
+
position: absolute;
|
50 |
+
bottom: 19px;
|
51 |
+
right: 19px
|
52 |
}
|
53 |
|
54 |
+
.additional_details_wrap {
|
55 |
+
margin-top: 20px;
|
56 |
}
|
57 |
|
58 |
+
.tenweb-additional-active {
|
59 |
+
background: rgba(204, 204, 204, 0.18);
|
60 |
+
padding: 15px;
|
61 |
+
margin: 14px 0px 5px;
|
62 |
}
|
63 |
+
|
64 |
+
.tenweb-popup-active1 {
|
65 |
+
height: 583px !important;
|
66 |
}
|
67 |
|
68 |
+
.tenweb-popup-active2 {
|
69 |
+
height: 426px !important
|
70 |
}
|
71 |
|
72 |
+
.tenweb-popup-active4 {
|
73 |
+
height: 340px !important
|
74 |
}
|
75 |
+
|
76 |
+
.tenweb-deactivate-popup-opacity {
|
77 |
+
width: 100%;
|
78 |
+
height: 100%;
|
79 |
+
background: #D9D9D9;
|
80 |
+
opacity: 0.3;
|
81 |
+
z-index: 45;
|
82 |
+
position: absolute;
|
83 |
+
display: none;
|
84 |
}
|
85 |
|
86 |
+
.tenweb-deactivate-popup-opacity .tenweb-img-loader {
|
87 |
+
position: absolute;
|
88 |
+
top: 0;
|
89 |
+
left: 0;
|
90 |
+
right: 0;
|
91 |
+
bottom: 0;
|
92 |
+
margin: auto;
|
93 |
+
z-index: 63;
|
94 |
}
|
95 |
|
96 |
+
.tenweb-deactivate-popup-close-btn {
|
97 |
+
background-image: url(img/close.svg);
|
98 |
+
background-repeat: no-repeat;
|
99 |
+
background-size: 16px;
|
100 |
+
display: inline-block;
|
101 |
+
width: 16px;
|
102 |
+
height: 16px;
|
103 |
+
position: absolute;
|
104 |
+
top: 7px;
|
105 |
+
right: 8px;
|
106 |
+
cursor: pointer;
|
107 |
}
|
wd/assets/css/notices.css
CHANGED
@@ -1,14 +1,16 @@
|
|
1 |
.wd-admin-notice {
|
2 |
-
background: #
|
3 |
border: 4px;
|
4 |
display: block;
|
5 |
min-height: 68px;
|
6 |
padding: 10px 40px 10px 125px;
|
7 |
position: relative;
|
8 |
}
|
|
|
9 |
.wd-admin-notice a {
|
10 |
color: #10738B;
|
11 |
}
|
|
|
12 |
.wd-notice-logo {
|
13 |
clear: both;
|
14 |
content: "";
|
@@ -22,38 +24,45 @@
|
|
22 |
bottom: 0;
|
23 |
left: 5px;
|
24 |
}
|
|
|
25 |
.wd-admin-notice > .dashicons {
|
26 |
color: #424242;
|
27 |
position: absolute;
|
28 |
right: 20px;
|
29 |
top: 40%;
|
30 |
}
|
|
|
31 |
.wd-notice-title {
|
32 |
font-size: 24px;
|
33 |
margin: 0;
|
34 |
}
|
|
|
35 |
.wd-notice-body {
|
36 |
font-weight: normal;
|
37 |
margin: 5px 0;
|
38 |
}
|
|
|
39 |
.wd-notice-body:after {
|
40 |
clear: both;
|
41 |
content: "";
|
42 |
display: block;
|
43 |
}
|
|
|
44 |
.wd-notice-body li {
|
45 |
float: left;
|
46 |
margin-right: 20px;
|
47 |
}
|
|
|
48 |
.wd-notice-body .dashicons {
|
49 |
font-size: 17px;
|
50 |
}
|
|
|
51 |
.wd-blue {
|
52 |
color: #10738B;
|
53 |
}
|
54 |
|
55 |
.admin-notice-promo {
|
56 |
-
background: #
|
57 |
border-top: 4px;
|
58 |
display: block;
|
59 |
min-height: 68px;
|
1 |
.wd-admin-notice {
|
2 |
+
background: #FFF;
|
3 |
border: 4px;
|
4 |
display: block;
|
5 |
min-height: 68px;
|
6 |
padding: 10px 40px 10px 125px;
|
7 |
position: relative;
|
8 |
}
|
9 |
+
|
10 |
.wd-admin-notice a {
|
11 |
color: #10738B;
|
12 |
}
|
13 |
+
|
14 |
.wd-notice-logo {
|
15 |
clear: both;
|
16 |
content: "";
|
24 |
bottom: 0;
|
25 |
left: 5px;
|
26 |
}
|
27 |
+
|
28 |
.wd-admin-notice > .dashicons {
|
29 |
color: #424242;
|
30 |
position: absolute;
|
31 |
right: 20px;
|
32 |
top: 40%;
|
33 |
}
|
34 |
+
|
35 |
.wd-notice-title {
|
36 |
font-size: 24px;
|
37 |
margin: 0;
|
38 |
}
|
39 |
+
|
40 |
.wd-notice-body {
|
41 |
font-weight: normal;
|
42 |
margin: 5px 0;
|
43 |
}
|
44 |
+
|
45 |
.wd-notice-body:after {
|
46 |
clear: both;
|
47 |
content: "";
|
48 |
display: block;
|
49 |
}
|
50 |
+
|
51 |
.wd-notice-body li {
|
52 |
float: left;
|
53 |
margin-right: 20px;
|
54 |
}
|
55 |
+
|
56 |
.wd-notice-body .dashicons {
|
57 |
font-size: 17px;
|
58 |
}
|
59 |
+
|
60 |
.wd-blue {
|
61 |
color: #10738B;
|
62 |
}
|
63 |
|
64 |
.admin-notice-promo {
|
65 |
+
background: #FFF;
|
66 |
border-top: 4px;
|
67 |
display: block;
|
68 |
min-height: 68px;
|
wd/assets/css/overview.css
CHANGED
@@ -1,472 +1,558 @@
|
|
1 |
#wpfooter {
|
2 |
-
|
3 |
}
|
4 |
-
|
5 |
-
|
|
|
6 |
}
|
|
|
7 |
#wpbody-content {
|
8 |
-
|
9 |
}
|
10 |
|
11 |
-
.tenweb_overview .tenweb_header{
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
}
|
|
|
16 |
.tenweb_overview .tenweb_footer.without_demo,
|
17 |
-
.tenweb_overview .tenweb_how_it_works{
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
}
|
|
|
22 |
.tenweb_overview {
|
23 |
-
|
24 |
}
|
|
|
25 |
.tenweb_overview .tenweb_plugin_features,
|
26 |
-
.tenweb_overview .tenweb_footer{
|
27 |
-
|
28 |
}
|
|
|
29 |
.tenweb_overview .tenweb_plugin_features *,
|
30 |
-
.tenweb_overview .tenweb_footer *{
|
31 |
-
|
32 |
}
|
33 |
-
|
34 |
-
|
|
|
35 |
}
|
|
|
36 |
.tenweb_overview .tenweb_footer.without_demo *,
|
37 |
.tenweb_overview .tenweb_how_it_works *,
|
38 |
-
.tenweb_overview .tenweb_header *{
|
39 |
-
|
40 |
}
|
|
|
41 |
.tenweb_overview h2 {
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
}
|
|
|
49 |
h3.more_features {
|
50 |
-
|
51 |
-
|
52 |
}
|
|
|
53 |
img.plugin_logo {
|
54 |
-
|
55 |
}
|
56 |
|
57 |
.tenweb_overview .and {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
}
|
|
|
63 |
.tenweb_overview .and.circle {
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
}
|
|
|
74 |
.tenweb_plugin_features .container {
|
75 |
-
|
76 |
}
|
|
|
77 |
.tenweb_overview a.more {
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
}
|
|
|
85 |
.tenweb_overview a.more:not(.blue) {
|
86 |
-
|
87 |
}
|
|
|
88 |
.tenweb_overview a.more.blue {
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
.tenweb_overview .container{
|
97 |
-
width:1190px;
|
98 |
-
max-width:100%;
|
99 |
-
margin:0 auto;
|
100 |
-
text-align:center;
|
101 |
-
box-sizing: border-box;
|
102 |
-
-webkit-box-sizing: border-box;
|
103 |
-
-moz-box-sizing: border-box;
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
.plan_features.tenweb_clear {
|
106 |
-
|
107 |
}
|
|
|
108 |
.tenweb_overview .plan_feature {
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
}
|
|
|
113 |
.tenweb_overview .plan_feature h3 {
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
}
|
|
|
118 |
.tenweb_overview .plan_feature p {
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
}
|
|
|
127 |
.tenweb_overview .plan_feature .logo {
|
128 |
-
|
129 |
-
|
130 |
}
|
|
|
131 |
.tenweb_overview .plan_feature.image_optimizer .logo {
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
}
|
|
|
138 |
.tenweb_overview .plan_feature.pro_plugins .logo {
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
}
|
|
|
144 |
.tenweb_overview .plan_feature.dashboard .logo {
|
145 |
-
|
146 |
-
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
}
|
|
|
152 |
.tenweb_overview .plan_feature.pro_themes .logo {
|
153 |
-
|
154 |
-
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
}
|
|
|
160 |
.tenweb_overview .plan_feature.seo .logo {
|
161 |
-
|
162 |
-
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
}
|
|
|
168 |
.tenweb_overview .plan_feature.security .logo {
|
169 |
-
|
170 |
-
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
}
|
|
|
176 |
.tenweb_overview .plan_feature.backup .logo {
|
177 |
-
|
178 |
-
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
}
|
|
|
184 |
.tenweb_overview .plan_feature.hosting .logo {
|
185 |
-
|
186 |
-
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
}
|
|
|
192 |
.tenweb_overview a.button {
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
}
|
|
|
206 |
.tenweb_overview a.button.transparent {
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
}
|
|
|
213 |
.tenweb_overview a.button:hover {
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
}
|
|
|
218 |
.tenweb_overview .tenweb_header .container_top a.button {
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
}
|
|
|
223 |
.tenweb_overview .tenweb_logo {
|
224 |
-
|
225 |
-
|
226 |
}
|
|
|
227 |
.tenweb_overview .tenweb_logo a div {
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
}
|
|
|
234 |
.tenweb_overview .tenweb_header_right {
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
}
|
239 |
|
240 |
.tenweb_overview .inline-block.header_text {
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
}
|
|
|
251 |
.tenweb_overview .tenweb_header_divider {
|
252 |
-
|
253 |
-
|
254 |
}
|
|
|
255 |
.tenweb_overview .container_top {
|
256 |
-
|
257 |
}
|
|
|
258 |
.tenweb_overview .container_bottom {
|
259 |
-
|
260 |
}
|
|
|
261 |
.tenweb_overview .plugin_features.tenweb_clear {
|
262 |
-
|
263 |
}
|
264 |
-
|
265 |
-
|
|
|
266 |
}
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
}
|
273 |
|
274 |
.plugin_features .plugin_feature h3 {
|
275 |
-
|
276 |
-
|
277 |
}
|
|
|
278 |
.plugin_features .plugin_feature p {
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
}
|
|
|
288 |
.tenweb_how_it_works a.button {
|
289 |
-
|
290 |
}
|
291 |
-
|
292 |
-
|
293 |
-
|
|
|
294 |
}
|
|
|
295 |
.tenweb_footer {
|
296 |
-
|
297 |
}
|
298 |
|
299 |
.tenweb_footer p {
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
}
|
|
|
304 |
.tenweb_footer h2 {
|
305 |
-
|
306 |
}
|
|
|
307 |
.tenweb_overview img.plugin_logo {
|
308 |
-
|
309 |
-
}
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
.
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
}
|
1 |
#wpfooter {
|
2 |
+
display: none;
|
3 |
}
|
4 |
+
|
5 |
+
#wpbody-content > div:not(.tenweb_overview) {
|
6 |
+
display: none;
|
7 |
}
|
8 |
+
|
9 |
#wpbody-content {
|
10 |
+
padding-bottom: 0;
|
11 |
}
|
12 |
|
13 |
+
.tenweb_overview .tenweb_header {
|
14 |
+
background: url(../img/slide-1366.jpg);
|
15 |
+
background-size: cover;
|
16 |
+
background-repeat: no-repeat;
|
17 |
}
|
18 |
+
|
19 |
.tenweb_overview .tenweb_footer.without_demo,
|
20 |
+
.tenweb_overview .tenweb_how_it_works {
|
21 |
+
background: url(../img/how_it_works.png);
|
22 |
+
background-size: cover;
|
23 |
+
background-repeat: no-repeat;
|
24 |
}
|
25 |
+
|
26 |
.tenweb_overview {
|
27 |
+
margin-left: -20px;
|
28 |
}
|
29 |
+
|
30 |
.tenweb_overview .tenweb_plugin_features,
|
31 |
+
.tenweb_overview .tenweb_footer {
|
32 |
+
background: #FFFFFF;
|
33 |
}
|
34 |
+
|
35 |
.tenweb_overview .tenweb_plugin_features *,
|
36 |
+
.tenweb_overview .tenweb_footer * {
|
37 |
+
color: #2C3144;
|
38 |
}
|
39 |
+
|
40 |
+
.tenweb_overview .tenweb_how_it_works .container {
|
41 |
+
padding: 60px 0 52px;
|
42 |
}
|
43 |
+
|
44 |
.tenweb_overview .tenweb_footer.without_demo *,
|
45 |
.tenweb_overview .tenweb_how_it_works *,
|
46 |
+
.tenweb_overview .tenweb_header * {
|
47 |
+
color: #FFF;
|
48 |
}
|
49 |
+
|
50 |
.tenweb_overview h2 {
|
51 |
+
text-transform: uppercase;
|
52 |
+
font-size: 24px;
|
53 |
+
letter-spacing: 1px;
|
54 |
+
margin: 0;
|
55 |
+
padding: 0 0 20px;
|
56 |
+
line-height: 1.4em;
|
57 |
}
|
58 |
+
|
59 |
h3.more_features {
|
60 |
+
font-size: 21px;
|
61 |
+
text-transform: uppercase;
|
62 |
}
|
63 |
+
|
64 |
img.plugin_logo {
|
65 |
+
margin-bottom: 18px;
|
66 |
}
|
67 |
|
68 |
.tenweb_overview .and {
|
69 |
+
font-size: 50px;
|
70 |
+
margin: 17px 14px 19px;
|
71 |
+
line-height: 1;
|
72 |
+
font-weight: lighter;
|
73 |
}
|
74 |
+
|
75 |
.tenweb_overview .and.circle {
|
76 |
+
font-size: 50px;
|
77 |
+
margin: 15px 14px;
|
78 |
+
line-height: 1.3;
|
79 |
+
font-weight: lighter;
|
80 |
+
display: inline-block;
|
81 |
+
width: 70px;
|
82 |
+
height: 70px;
|
83 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, .2);
|
84 |
+
border-radius: 35px;
|
85 |
}
|
86 |
+
|
87 |
.tenweb_plugin_features .container {
|
88 |
+
padding: 30px 0;
|
89 |
}
|
90 |
+
|
91 |
.tenweb_overview a.more {
|
92 |
+
text-transform: uppercase;
|
93 |
+
letter-spacing: 1px;
|
94 |
+
font-size: 16px;
|
95 |
+
line-height: 1;
|
96 |
+
display: inline-block;
|
97 |
+
text-decoration: none;
|
98 |
}
|
99 |
+
|
100 |
.tenweb_overview a.more:not(.blue) {
|
101 |
+
margin-top: 23px;
|
102 |
}
|
103 |
+
|
104 |
.tenweb_overview a.more.blue {
|
105 |
+
color: #397CF1;
|
106 |
+
}
|
107 |
+
|
108 |
+
.tenweb_clear:after {
|
109 |
+
content: "";
|
110 |
+
display: table;
|
111 |
+
clear: both;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
+
|
114 |
+
.tenweb_overview .container {
|
115 |
+
width: 1190px;
|
116 |
+
max-width: 100%;
|
117 |
+
margin: 0 auto;
|
118 |
+
text-align: center;
|
119 |
+
box-sizing: border-box;
|
120 |
+
-webkit-box-sizing: border-box;
|
121 |
+
-moz-box-sizing: border-box;
|
122 |
+
}
|
123 |
+
|
124 |
.plan_features.tenweb_clear {
|
125 |
+
font-size: 0;
|
126 |
}
|
127 |
+
|
128 |
.tenweb_overview .plan_feature {
|
129 |
+
width: 24%;
|
130 |
+
display: inline-block;
|
131 |
+
margin: 0 .5% 30px;
|
132 |
}
|
133 |
+
|
134 |
.tenweb_overview .plan_feature h3 {
|
135 |
+
font-size: 17px;
|
136 |
+
text-transform: uppercase;
|
137 |
+
margin: 18px 0;
|
138 |
}
|
139 |
+
|
140 |
.tenweb_overview .plan_feature p {
|
141 |
+
font-size: 15px;
|
142 |
+
overflow: hidden;
|
143 |
+
display: -webkit-box;
|
144 |
+
-webkit-line-clamp: 3;
|
145 |
+
-webkit-box-orient: vertical;
|
146 |
+
text-overflow: ellipsis;
|
147 |
+
line-height: 1.4em;
|
148 |
}
|
149 |
+
|
150 |
.tenweb_overview .plan_feature .logo {
|
151 |
+
background: url(../img/header.svg);
|
152 |
+
margin: 0 auto;
|
153 |
}
|
154 |
+
|
155 |
.tenweb_overview .plan_feature.image_optimizer .logo {
|
156 |
+
background-size: 191px;
|
157 |
+
background-position: 0px -55px;
|
158 |
+
width: 68px;
|
159 |
+
height: 51px;
|
160 |
+
margin: 0 auto 35px;
|
161 |
}
|
162 |
+
|
163 |
.tenweb_overview .plan_feature.pro_plugins .logo {
|
164 |
+
background-size: 194px;
|
165 |
+
background-position: 0px -118px;
|
166 |
+
width: 55px;
|
167 |
+
height: 68px;
|
168 |
}
|
169 |
+
|
170 |
.tenweb_overview .plan_feature.dashboard .logo {
|
171 |
+
background-size: 195px;
|
172 |
+
background-position: 0px -196px;
|
173 |
|
174 |
+
width: 68px;
|
175 |
+
height: 56px;
|
176 |
+
margin: 0 auto 30px;
|
177 |
}
|
178 |
+
|
179 |
.tenweb_overview .plan_feature.pro_themes .logo {
|
180 |
+
background-size: 190px;
|
181 |
+
background-position: 0px -254px;
|
182 |
|
183 |
+
width: 57px;
|
184 |
+
height: 58px;
|
185 |
+
margin: 0 auto 28px;
|
186 |
}
|
187 |
+
|
188 |
.tenweb_overview .plan_feature.seo .logo {
|
189 |
+
background-size: 200px;
|
190 |
+
background-position: 0px -338px;
|
191 |
|
192 |
+
width: 61px;
|
193 |
+
height: 63px;
|
194 |
+
margin: 0 auto 23px;
|
195 |
}
|
196 |
+
|
197 |
.tenweb_overview .plan_feature.security .logo {
|
198 |
+
background-size: 194px;
|
199 |
+
background-position: 0px -398px;
|
200 |
|
201 |
+
width: 55px;
|
202 |
+
height: 62px;
|
203 |
+
margin: 0 auto 24px;
|
204 |
}
|
205 |
+
|
206 |
.tenweb_overview .plan_feature.backup .logo {
|
207 |
+
background-size: 250px;
|
208 |
+
background-position: 0px -602px;
|
209 |
|
210 |
+
width: 100px;
|
211 |
+
height: 60px;
|
212 |
+
margin: 0 auto 26px;
|
213 |
}
|
214 |
+
|
215 |
.tenweb_overview .plan_feature.hosting .logo {
|
216 |
+
background-size: 196px;
|
217 |
+
background-position: 0px -527px;
|
218 |
|
219 |
+
width: 64px;
|
220 |
+
height: 64px;
|
221 |
+
margin: 0 auto 22px;
|
222 |
}
|
223 |
+
|
224 |
.tenweb_overview a.button {
|
225 |
+
background: #367BF2;
|
226 |
+
color: #FFFFFF;
|
227 |
+
text-transform: uppercase;
|
228 |
+
letter-spacing: 1px;
|
229 |
+
font-size: 16px;
|
230 |
+
padding: 16px 30px;
|
231 |
+
line-height: 1;
|
232 |
+
border-radius: 2px;
|
233 |
+
display: inline-block;
|
234 |
+
border: 0 !important;
|
235 |
+
box-shadow: none;
|
236 |
+
height: auto;
|
237 |
}
|
238 |
+
|
239 |
.tenweb_overview a.button.transparent {
|
240 |
+
background: transparent !important;
|
241 |
+
color: #FFFFFF;
|
242 |
+
border: 1px solid #FFFFFF !important;
|
243 |
+
width: 160px;
|
244 |
+
margin: 0 5px;
|
245 |
}
|
246 |
+
|
247 |
.tenweb_overview a.button:hover {
|
248 |
+
background: #367BF2;
|
249 |
+
color: #FFFFFF;
|
250 |
+
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
|
251 |
}
|
252 |
+
|
253 |
.tenweb_overview .tenweb_header .container_top a.button {
|
254 |
+
font-size: 18px;
|
255 |
+
padding: 13px 30px;
|
256 |
+
display: table-cell;
|
257 |
}
|
258 |
+
|
259 |
.tenweb_overview .tenweb_logo {
|
260 |
+
float: left;
|
261 |
+
width: 197px;
|
262 |
}
|
263 |
+
|
264 |
.tenweb_overview .tenweb_logo a div {
|
265 |
+
background: url(../img/header.svg);
|
266 |
+
height: 53px;
|
267 |
+
background-size: 196px;
|
268 |
+
background-position: 0 0;
|
269 |
+
background-repeat: no-repeat;
|
270 |
}
|
271 |
+
|
272 |
.tenweb_overview .tenweb_header_right {
|
273 |
+
float: right;
|
274 |
+
text-align: right;
|
275 |
+
display: table;
|
276 |
}
|
277 |
|
278 |
.tenweb_overview .inline-block.header_text {
|
279 |
+
text-transform: uppercase;
|
280 |
+
font-size: 15px;
|
281 |
+
line-height: 1.5;
|
282 |
+
padding-right: 10px;
|
283 |
+
letter-spacing: 0;
|
284 |
+
margin-top: 2px;
|
285 |
+
width: calc(100% - 180px);
|
286 |
+
display: table-cell;
|
287 |
+
vertical-align: middle;
|
288 |
}
|
289 |
+
|
290 |
.tenweb_overview .tenweb_header_divider {
|
291 |
+
height: 18px;
|
292 |
+
background: #FFF;
|
293 |
}
|
294 |
+
|
295 |
.tenweb_overview .container_top {
|
296 |
+
padding: 24px 15px;
|
297 |
}
|
298 |
+
|
299 |
.tenweb_overview .container_bottom {
|
300 |
+
padding: 50px 0 40px;
|
301 |
}
|
302 |
+
|
303 |
.tenweb_overview .plugin_features.tenweb_clear {
|
304 |
+
margin-top: 40px;
|
305 |
}
|
306 |
+
|
307 |
+
.plugin_features .plugin_feature_logo {
|
308 |
+
height: 54px;
|
309 |
}
|
310 |
+
|
311 |
+
.plugin_features .plugin_feature {
|
312 |
+
width: 31%;
|
313 |
+
margin: 0 1% 20px;
|
314 |
+
display: inline-block;
|
315 |
}
|
316 |
|
317 |
.plugin_features .plugin_feature h3 {
|
318 |
+
font-size: 18px;
|
319 |
+
text-transform: uppercase;
|
320 |
}
|
321 |
+
|
322 |
.plugin_features .plugin_feature p {
|
323 |
+
font-size: 15px;
|
324 |
+
overflow: hidden;
|
325 |
+
display: -webkit-box;
|
326 |
+
-webkit-line-clamp: 3;
|
327 |
+
-webkit-box-orient: vertical;
|
328 |
+
text-overflow: ellipsis;
|
329 |
+
line-height: 1.4em;
|
330 |
+
min-height: 63px;
|
331 |
}
|
332 |
+
|
333 |
.tenweb_how_it_works a.button {
|
334 |
+
margin-top: 12px;
|
335 |
}
|
336 |
+
|
337 |
+
.plugin_features .plugin_feature img {
|
338 |
+
width: 54px;
|
339 |
+
max-height: 100%;
|
340 |
}
|
341 |
+
|
342 |
.tenweb_footer {
|
343 |
+
padding: 70px 0 80px;
|
344 |
}
|
345 |
|
346 |
.tenweb_footer p {
|
347 |
+
font-size: 22px;
|
348 |
+
font-weight: lighter;
|
349 |
+
margin: 8px 0 20px;
|
350 |
}
|
351 |
+
|
352 |
.tenweb_footer h2 {
|
353 |
+
font-size: 31px;
|
354 |
}
|
355 |
+
|
356 |
.tenweb_overview img.plugin_logo {
|
357 |
+
width: 100px;
|
358 |
+
}
|
359 |
+
|
360 |
+
@media only screen and (min-width: 1620px) {
|
361 |
+
.plugin_features .plugin_feature p {
|
362 |
+
font-size: 17px;
|
363 |
+
}
|
364 |
+
|
365 |
+
.tenweb_overview img.plugin_logo {
|
366 |
+
width: 130px;
|
367 |
+
}
|
368 |
+
|
369 |
+
.tenweb_overview .container {
|
370 |
+
width: 1600px;
|
371 |
+
}
|
372 |
+
|
373 |
+
.tenweb_overview .inline-block.header_text {
|
374 |
+
font-size: 19px;
|
375 |
+
line-height: 1.2;
|
376 |
+
padding-right: 18px;
|
377 |
+
letter-spacing: .8px;
|
378 |
+
width: calc(100% - 193px);
|
379 |
+
margin-top: 0;
|
380 |
+
}
|
381 |
+
|
382 |
+
.tenweb_overview h2 {
|
383 |
+
font-size: 28px;
|
384 |
+
padding: 10px 0 20px;
|
385 |
+
}
|
386 |
+
|
387 |
+
.tenweb_overview .and {
|
388 |
+
font-size: 60px;
|
389 |
+
margin: 18px 14px;
|
390 |
+
}
|
391 |
+
|
392 |
+
.tenweb_overview .and.circle {
|
393 |
+
font-size: 60px;
|
394 |
+
margin: 20px 14px;
|
395 |
+
line-height: 1.4;
|
396 |
+
width: 90px;
|
397 |
+
height: 90px;
|
398 |
+
border-radius: 45px;
|
399 |
+
}
|
400 |
+
|
401 |
+
.tenweb_overview .plan_feature {
|
402 |
+
width: 23%;
|
403 |
+
display: inline-block;
|
404 |
+
margin: 0 1% 40px;
|
405 |
+
}
|
406 |
+
|
407 |
+
.tenweb_overview .plan_feature h3 {
|
408 |
+
font-size: 20px;
|
409 |
+
}
|
410 |
+
|
411 |
+
.tenweb_overview .plan_feature p {
|
412 |
+
height: 72px;
|
413 |
+
font-size: 16px;
|
414 |
+
}
|
415 |
+
|
416 |
+
.plugin_features .plugin_feature p {
|
417 |
+
font-size: 18px;
|
418 |
+
height: 75px;
|
419 |
+
}
|
420 |
+
|
421 |
+
.plugin_features .plugin_feature h3 {
|
422 |
+
font-size: 20px;
|
423 |
+
}
|
424 |
+
|
425 |
+
.tenweb_footer h2 {
|
426 |
+
font-size: 37px;
|
427 |
+
}
|
428 |
+
|
429 |
+
.tenweb_footer p {
|
430 |
+
font-size: 24px;
|
431 |
+
}
|
432 |
+
|
433 |
+
.tenweb_overview .container_top {
|
434 |
+
padding: 29px 0;
|
435 |
+
}
|
436 |
+
}
|
437 |
+
|
438 |
+
@media only screen and (max-width: 1320px) {
|
439 |
+
.plugin_features .plugin_feature,
|
440 |
+
.tenweb_overview .plan_feature {
|
441 |
+
width: 46%;
|
442 |
+
display: inline-block;
|
443 |
+
margin: 0 1.5% 10px;
|
444 |
+
}
|
445 |
+
|
446 |
+
.tenweb_footer h2 {
|
447 |
+
font-size: 26px;
|
448 |
+
}
|
449 |
+
|
450 |
+
.tenweb_footer p {
|
451 |
+
font-size: 20px;
|
452 |
+
line-height: 1.4em;
|
453 |
+
}
|
454 |
+
|
455 |
+
.tenweb_overview .container {
|
456 |
+
width: 99%;
|
457 |
+
}
|
458 |
+
|
459 |
+
.tenweb_overview .inline-block.header_text {
|
460 |
+
text-transform: uppercase;
|
461 |
+
font-size: 13px;
|
462 |
+
}
|
463 |
+
}
|
464 |
+
|
465 |
+
@media only screen and (max-width: 1200px) {
|
466 |
+
|
467 |
+
.tenweb_overview .tenweb_header_right {
|
468 |
+
float: right;
|
469 |
+
text-align: right;
|
470 |
+
display: table;
|
471 |
+
width: calc(100% - 267px);
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
@media only screen and (max-width: 840px) {
|
476 |
+
.tenweb_overview .inline-block.header_text {
|
477 |
+
display: block;
|
478 |
+
padding-right: 0;
|
479 |
+
margin-top: 10px;
|
480 |
+
width: 100%;
|
481 |
+
clear: both;
|
482 |
+
}
|
483 |
+
|
484 |
+
.tenweb_overview .tenweb_header .container_top a.button {
|
485 |
+
display: inline-block;
|
486 |
+
}
|
487 |
+
|
488 |
+
.tenweb_overview .tenweb_logo a div {
|
489 |
+
height: 37px;
|
490 |
+
background-size: 145px;
|
491 |
+
background-position: 0 0px;
|
492 |
+
}
|
493 |
+
|
494 |
+
.tenweb_overview .tenweb_logo {
|
495 |
+
float: left;
|
496 |
+
width: 150px;
|
497 |
+
}
|
498 |
+
|
499 |
+
.tenweb_overview {
|
500 |
+
margin-left: -10px;
|
501 |
+
}
|
502 |
+
|
503 |
+
.plugin_features .plugin_feature,
|
504 |
+
.tenweb_overview .plan_feature {
|
505 |
+
width: 88%;
|
506 |
+
margin: 0 auto 10px;
|
507 |
+
float: none;
|
508 |
+
}
|
509 |
+
|
510 |
+
.tenweb_overview .plan_feature p,
|
511 |
+
.plugin_features .plugin_feature p {
|
512 |
+
overflow: visible;
|
513 |
+
-webkit-line-clamp: none;
|
514 |
+
height: auto;
|
515 |
+
}
|
516 |
+
|
517 |
+
.tenweb_footer h2 {
|
518 |
+
font-size: 23px;
|
519 |
+
}
|
520 |
+
|
521 |
+
.tenweb_footer p {
|
522 |
+
font-size: 18px;
|
523 |
+
line-height: 1.4em;
|
524 |
+
}
|
525 |
+
|
526 |
+
.tenweb_overview .plugin_features.tenweb_clear {
|
527 |
+
margin-top: 20px;
|
528 |
+
}
|
529 |
+
|
530 |
+
.tenweb_footer {
|
531 |
+
padding: 50px 0 60px;
|
532 |
+
}
|
533 |
+
|
534 |
+
.tenweb_overview .tenweb_logo {
|
535 |
+
float: none;
|
536 |
+
width: 150px;
|
537 |
+
margin: 0 auto 10px;
|
538 |
+
}
|
539 |
+
|
540 |
+
.tenweb_overview .tenweb_header_right {
|
541 |
+
float: none;
|
542 |
+
width: 100%;
|
543 |
+
text-align: center;
|
544 |
+
}
|
545 |
+
|
546 |
+
.tenweb_overview .tenweb_header_right a.button {
|
547 |
+
float: none;
|
548 |
+
}
|
549 |
+
|
550 |
+
.tenweb_overview .inline-block.header_text {
|
551 |
+
float: none;
|
552 |
+
margin-top: 10px;
|
553 |
+
}
|
554 |
+
|
555 |
+
.tenweb_overview h2 {
|
556 |
+
font-size: 21px;
|
557 |
+
}
|
558 |
}
|
wd/assets/css/subscribe.css
CHANGED
@@ -1,210 +1,242 @@
|
|
1 |
#wpfooter {
|
2 |
-
|
3 |
}
|
4 |
-
|
5 |
-
|
|
|
6 |
}
|
|
|
7 |
#wpbody-content {
|
8 |
-
|
9 |
}
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
clear:both;
|
16 |
}
|
|
|
17 |
.tenweb_subscribe a.button {
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
}
|
|
|
31 |
.tenweb_subscribe a:focus {
|
32 |
-
|
33 |
}
|
|
|
34 |
.tenweb_subscribe a.button:active,
|
35 |
.tenweb_subscribe a.button:hover {
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
}
|
40 |
|
41 |
.tenweb_subscribe a.more {
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
.wd_loader{
|
53 |
-
vertical-align: top;
|
54 |
-
width: 30px;
|
55 |
-
margin-top: 11px;
|
56 |
-
display: none;
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
.tenweb_subscribe {
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
}
|
|
|
69 |
.tenweb_subscribe .texts h2 {
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
}
|
|
|
74 |
.tenweb_subscribe .texts h5 {
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
}
|
|
|
80 |
.tenweb_subscribe .texts p {
|
81 |
-
|
82 |
}
|
|
|
83 |
.tenweb_subscribe .texts .hi_there {
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
}
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
93 |
}
|
|
|
94 |
.tenweb_subscribe .permissions {
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
}
|
|
|
101 |
.tenweb_subscribe .permissions:after {
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
}
|
|
|
112 |
.tenweb_subscribe .permissions.active:after {
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
}
|
|
|
119 |
.tenweb_subscribe .list_item {
|
120 |
-
width: 31%;
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
}
|
129 |
-
.tenweb_subscribe .list{
|
130 |
-
display:none;
|
131 |
}
|
|
|
|
|
|
|
|
|
|
|
132 |
.tenweb_subscribe .list_item:last-child {
|
133 |
-
|
134 |
}
|
|
|
135 |
.tenweb_subscribe .list.tenweb_clear {
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
|
|
140 |
.tenweb_subscribe .list_text_wrap {
|
141 |
-
|
142 |
-
|
143 |
}
|
|
|
144 |
.tenweb_subscribe .list_logo {
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
}
|
|
|
150 |
.tenweb_subscribe .user_info .list_logo {
|
151 |
-
|
152 |
}
|
|
|
153 |
.tenweb_subscribe .wp_info .list_logo {
|
154 |
-
|
155 |
}
|
|
|
156 |
.tenweb_subscribe .plugins_info .list_logo {
|
157 |
-
|
158 |
}
|
|
|
159 |
.tenweb_subscribe-footer * {
|
160 |
-
|
161 |
}
|
|
|
162 |
.tenweb_footer-menu a {
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
}
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
171 |
}
|
|
|
172 |
ul.tenweb_footer-menu.tenweb_clear {
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
}
|
178 |
|
179 |
.tenweb_subscribe-top-footer {
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
}
|
184 |
-
@media only screen and (min-width: 1620px){
|
185 |
-
.tenweb_subscribe-top-footer {
|
186 |
-
margin-top: 130px;
|
187 |
-
}
|
188 |
-
.tenweb_subscribe {
|
189 |
-
padding: 150px 20px 0;
|
190 |
-
}
|
191 |
-
}
|
192 |
-
@media only screen and (max-width: 768px){
|
193 |
-
.tenweb_subscribe {
|
194 |
-
width: calc(100% - 10px);
|
195 |
-
padding: 60px 20px 0;
|
196 |
-
}
|
197 |
-
.tenweb_subscribe-top-footer {
|
198 |
-
margin-top: 60px;
|
199 |
}
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
width: 100%;
|
202 |
float: none;
|
203 |
margin-right: 0;
|
204 |
padding: 20px 10px;
|
205 |
margin-bottom: 10px;
|
206 |
-
}
|
207 |
-
|
|
|
208 |
margin: 0 auto 15px;
|
209 |
-
}
|
210 |
}
|
1 |
#wpfooter {
|
2 |
+
display: none;
|
3 |
}
|
4 |
+
|
5 |
+
#wpbody-content > div:not(.tenweb_subscribe) {
|
6 |
+
display: none;
|
7 |
}
|
8 |
+
|
9 |
#wpbody-content {
|
10 |
+
padding-bottom: 0;
|
11 |
}
|
12 |
|
13 |
+
.tenweb_clear:after {
|
14 |
+
content: "";
|
15 |
+
display: table;
|
16 |
+
clear: both;
|
|
|
17 |
}
|
18 |
+
|
19 |
.tenweb_subscribe a.button {
|
20 |
+
background: #367BF2;
|
21 |
+
color: #FFFFFF;
|
22 |
+
text-transform: uppercase;
|
23 |
+
letter-spacing: 1px;
|
24 |
+
font-size: 16px;
|
25 |
+
padding: 16px 30px;
|
26 |
+
line-height: 1;
|
27 |
+
border-radius: 2px;
|
28 |
+
display: inline-block;
|
29 |
+
border: 0 !important;
|
30 |
+
box-shadow: none;
|
31 |
+
height: auto;
|
32 |
}
|
33 |
+
|
34 |
.tenweb_subscribe a:focus {
|
35 |
+
box-shadow: none;
|
36 |
}
|
37 |
+
|
38 |
.tenweb_subscribe a.button:active,
|
39 |
.tenweb_subscribe a.button:hover {
|
40 |
+
background: #367BF2;
|
41 |
+
color: #FFFFFF;
|
42 |
+
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
|
43 |
}
|
44 |
|
45 |
.tenweb_subscribe a.more {
|
46 |
+
text-transform: uppercase;
|
47 |
+
letter-spacing: 1px;
|
48 |
+
font-size: 14px;
|
49 |
+
line-height: 1;
|
50 |
+
display: block;
|
51 |
+
text-decoration: none;
|
52 |
+
color: #4E4E4E;
|
53 |
+
margin-top: 9px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
+
|
56 |
+
.wd_loader {
|
57 |
+
vertical-align: top;
|
58 |
+
width: 30px;
|
59 |
+
margin-top: 11px;
|
60 |
+
display: none;
|
61 |
+
}
|
62 |
+
|
63 |
.tenweb_subscribe {
|
64 |
+
background: #FFFFFF;
|
65 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
66 |
+
width: calc(100% - 20px);
|
67 |
+
padding: 105px 20px 0;
|
68 |
+
margin: 20px 0 0 0;
|
69 |
+
box-sizing: border-box;
|
70 |
+
-webkit-box-sizing: border-box;
|
71 |
+
-moz-box-sizing: border-box;
|
72 |
+
text-align: center;
|
73 |
}
|
74 |
+
|
75 |
.tenweb_subscribe .texts h2 {
|
76 |
+
font-size: 28px;
|
77 |
+
text-transform: uppercase;
|
78 |
+
margin: 26px 0 16px;
|
79 |
}
|
80 |
+
|
81 |
.tenweb_subscribe .texts h5 {
|
82 |
+
font-size: 18px;
|
83 |
+
text-transform: uppercase;
|
84 |
+
margin: 6px 0;
|
85 |
+
line-height: 1.4em;
|
86 |
}
|
87 |
+
|
88 |
.tenweb_subscribe .texts p {
|
89 |
+
font-size: 16px;
|
90 |
}
|
91 |
+
|
92 |
.tenweb_subscribe .texts .hi_there {
|
93 |
+
width: 66px;
|
94 |
+
height: 103px;
|
95 |
+
background: url(../img/allow-and-continue.png) no-repeat;
|
96 |
+
margin: 0 auto;
|
97 |
}
|
98 |
+
|
99 |
+
.tenweb_subscribe-content {
|
100 |
+
width: 960px;
|
101 |
+
max-width: 100%;
|
102 |
+
margin: 0 auto;
|
103 |
}
|
104 |
+
|
105 |
.tenweb_subscribe .permissions {
|
106 |
+
font-size: 16px;
|
107 |
+
cursor: pointer;
|
108 |
+
margin: 10px 0 30px;
|
109 |
+
position: relative;
|
110 |
+
display: inline-block;
|
111 |
}
|
112 |
+
|
113 |
.tenweb_subscribe .permissions:after {
|
114 |
+
content: "";
|
115 |
+
position: absolute;
|
116 |
+
width: 13px;
|
117 |
+
height: 13px;
|
118 |
+
background: url(../img/allow-and-continue.png) no-repeat;
|
119 |
+
background-position: 1px -237px;
|
120 |
+
right: -19px;
|
121 |
+
top: 2px;
|
122 |
+
transition: transform .2s;
|
123 |
}
|
124 |
+
|
125 |
.tenweb_subscribe .permissions.active:after {
|
126 |
+
content: "";
|
127 |
+
transform: rotateZ(-180deg);
|
128 |
+
-webkit-transform: rotateZ(-180deg);
|
129 |
+
-moz-transform: rotateZ(-180deg);
|
130 |
+
top: 3px;
|
131 |
}
|
132 |
+
|
133 |
.tenweb_subscribe .list_item {
|
134 |
+
width: 31%;
|
135 |
+
float: left;
|
136 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
137 |
+
margin-right: 3%;
|
138 |
+
padding: 20px 0;
|
139 |
+
box-sizing: border-box;
|
140 |
+
-webkit-box-sizing: border-box;
|
141 |
+
-moz-box-sizing: border-box;
|
|
|
|
|
|
|
142 |
}
|
143 |
+
|
144 |
+
.tenweb_subscribe .list {
|
145 |
+
display: none;
|
146 |
+
}
|
147 |
+
|
148 |
.tenweb_subscribe .list_item:last-child {
|
149 |
+
margin-right: 0;
|
150 |
}
|
151 |
+
|
152 |
.tenweb_subscribe .list.tenweb_clear {
|
153 |
+
max-width: 100%;
|
154 |
+
width: 580px;
|
155 |
+
margin: 0 auto 28px;
|
156 |
}
|
157 |
+
|
158 |
.tenweb_subscribe .list_text_wrap {
|
159 |
+
font-size: 12px;
|
160 |
+
font-weight: bold;
|
161 |
}
|
162 |
+
|
163 |
.tenweb_subscribe .list_logo {
|
164 |
+
width: 36px;
|
165 |
+
height: 33px;
|
166 |
+
background: url(../img/allow-and-continue.png) no-repeat;
|
167 |
+
margin: 0 auto 20px;
|
168 |
}
|
169 |
+
|
170 |
.tenweb_subscribe .user_info .list_logo {
|
171 |
+
background-position: 3px -110px;
|
172 |
}
|
173 |
+
|
174 |
.tenweb_subscribe .wp_info .list_logo {
|
175 |
+
background-position: 2px -153px;
|
176 |
}
|
177 |
+
|
178 |
.tenweb_subscribe .plugins_info .list_logo {
|
179 |
+
background-position: 6px -196px;
|
180 |
}
|
181 |
+
|
182 |
.tenweb_subscribe-footer * {
|
183 |
+
color: #AFAFAF;
|
184 |
}
|
185 |
+
|
186 |
.tenweb_footer-menu a {
|
187 |
+
font-size: 12px;
|
188 |
+
text-transform: uppercase;
|
189 |
+
letter-spacing: 1px;
|
190 |
+
text-decoration: none;
|
191 |
}
|
192 |
+
|
193 |
+
.tenweb_footer-menu li {
|
194 |
+
display: inline-block;
|
195 |
+
margin: 0 10px;
|
196 |
}
|
197 |
+
|
198 |
ul.tenweb_footer-menu.tenweb_clear {
|
199 |
+
padding: 18px 0 15px;
|
200 |
+
line-height: 1;
|
201 |
+
border-top: 1px solid #ECECEC;
|
202 |
+
margin: 16px 0 0;
|
203 |
}
|
204 |
|
205 |
.tenweb_subscribe-top-footer {
|
206 |
+
font-size: 13px;
|
207 |
+
color: #AFAFAF;
|
208 |
+
margin-top: 112px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
+
|
211 |
+
@media only screen and (min-width: 1620px) {
|
212 |
+
.tenweb_subscribe-top-footer {
|
213 |
+
margin-top: 130px;
|
214 |
+
}
|
215 |
+
|
216 |
+
.tenweb_subscribe {
|
217 |
+
padding: 150px 20px 0;
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
@media only screen and (max-width: 768px) {
|
222 |
+
.tenweb_subscribe {
|
223 |
+
width: calc(100% - 10px);
|
224 |
+
padding: 60px 20px 0;
|
225 |
+
}
|
226 |
+
|
227 |
+
.tenweb_subscribe-top-footer {
|
228 |
+
margin-top: 60px;
|
229 |
+
}
|
230 |
+
|
231 |
+
.tenweb_subscribe .list_item {
|
232 |
width: 100%;
|
233 |
float: none;
|
234 |
margin-right: 0;
|
235 |
padding: 20px 10px;
|
236 |
margin-bottom: 10px;
|
237 |
+
}
|
238 |
+
|
239 |
+
.tenweb_subscribe .list.tenweb_clear {
|
240 |
margin: 0 auto 15px;
|
241 |
+
}
|
242 |
}
|
wd/assets/img/sp_calendar_main_plugin.png
ADDED
Binary file
|
wd/assets/js/deactivate_popup.js
CHANGED
@@ -1,139 +1,96 @@
|
|
1 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
2 |
-
// Events //
|
3 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Constants //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Variables //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
var deactivated = false;
|
11 |
var additionalInfo = "";
|
12 |
var btnVal = 3;
|
13 |
|
14 |
-
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
|
18 |
-
|
19 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
-
// Public Methods //
|
21 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
-
function tenwebReady( prefix ) {
|
23 |
-
|
24 |
var agree_with_pp = false;
|
25 |
reset_popup();
|
26 |
-
jQuery(
|
27 |
agree_with_pp = false;
|
28 |
-
if (
|
29 |
-
jQuery(
|
30 |
}
|
31 |
-
jQuery(
|
32 |
-
jQuery(
|
33 |
-
if (
|
34 |
btnVal = 2;
|
35 |
}
|
36 |
-
|
37 |
return false;
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
jQuery(
|
44 |
-
jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).removeClass( "tenweb-popup-active1 tenweb-popup-active2 tenweb-popup-active4" );
|
45 |
-
if ( jQuery( this ).val() == "reason_plugin_is_hard_to_use_technical_problems" ) {
|
46 |
-
|
47 |
additionalInfo = '<div class="tenweb-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
|
48 |
'<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
|
49 |
'<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>' +
|
50 |
'<br><div><button class="button button-primary ' + disabled_class + ' tenweb-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
|
51 |
-
jQuery(
|
52 |
-
jQuery(
|
53 |
-
|
54 |
}
|
55 |
-
else if (
|
56 |
additionalInfo = '<div class="tenweb-additional-active">' +
|
57 |
'<div><strong>We believe our premium version will fit your needs.</strong></div>' +
|
58 |
'<div><a href="' + window[prefix + "WDDeactivateVars"].plugin_wd_url + '" target="_blank">Try with 30 day money back guarantee.</a></div>';
|
59 |
-
|
60 |
-
jQuery(
|
61 |
-
jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).addClass( "tenweb-popup-active2" );
|
62 |
}
|
63 |
else {
|
64 |
-
jQuery(
|
65 |
}
|
66 |
-
|
67 |
-
var checked = ( agree_with_pp === true ) ? "checked" : "";
|
68 |
var agree_checkbox =
|
69 |
"<div style='margin-top: 5px;'>" +
|
70 |
"<input type='checkbox' " + checked + " name='" + prefix + "_agree_with_pp" + "' id='" + prefix + "_agree_with_pp" + "'/>" +
|
71 |
"By submitting this form your email and website URL will be sent to 10Web. Click the checkbox if you consent to usage of mentioned data by 10Web in accordance with our <a target='_blank' href='https://10web.io/privacy-policy/'>Privacy Policy</a>." +
|
72 |
"</div>";
|
73 |
-
jQuery(
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
jQuery( "#tenweb-" + prefix + "-submit-and-deactivate" ).show();
|
80 |
}
|
81 |
else {
|
82 |
-
jQuery(
|
83 |
}
|
84 |
-
}
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
jQuery( ".tenweb-" + prefix + "-deactivate" ).removeClass( 'button-primary-disabled' );
|
89 |
agree_with_pp = true;
|
90 |
-
}
|
91 |
-
|
|
|
92 |
agree_with_pp = false;
|
93 |
}
|
94 |
-
}
|
95 |
-
|
96 |
-
|
97 |
-
var
|
98 |
-
|
99 |
-
|
100 |
-
if ( data_val !== 1 && ( checkbox.length === 0 || checkbox.prop( 'checked' ) === false ) ) {
|
101 |
return false;
|
102 |
}
|
103 |
-
|
104 |
-
jQuery(
|
105 |
-
|
106 |
-
jQuery(
|
107 |
-
jQuery(
|
108 |
-
jQuery( "#" + prefix + "_deactivate_form" ).submit();
|
109 |
}
|
110 |
return false;
|
111 |
-
}
|
112 |
-
|
113 |
-
|
114 |
-
jQuery(
|
115 |
-
jQuery( ".tenweb-" + prefix + "-deactivate-popup" ).hide();
|
116 |
reset_popup();
|
117 |
-
|
118 |
return false;
|
119 |
-
}
|
120 |
|
121 |
function reset_popup() {
|
122 |
-
jQuery(
|
123 |
-
jQuery(
|
124 |
-
|
125 |
-
jQuery( "
|
126 |
-
jQuery( '#' + prefix + '_deactivate_form input[name="' + prefix + '_reasons' + '"]' ).prop( 'checked', false );
|
127 |
}
|
128 |
-
|
129 |
-
}
|
130 |
-
|
131 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
132 |
-
// Getters & Setters //
|
133 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
134 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
135 |
-
// Private Methods //
|
136 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
137 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
138 |
-
// Listeners //
|
139 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
var deactivated = false;
|
2 |
var additionalInfo = "";
|
3 |
var btnVal = 3;
|
4 |
|
5 |
+
function tenwebReady(prefix) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
var agree_with_pp = false;
|
7 |
reset_popup();
|
8 |
+
jQuery(document).on("click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function () {
|
9 |
agree_with_pp = false;
|
10 |
+
if (!jQuery('#tenweb-' + prefix + '-submit-and-deactivate').hasClass('button-primary-disabled')) {
|
11 |
+
jQuery('#tenweb-' + prefix + '-submit-and-deactivate').addClass('button-primary-disabled')
|
12 |
}
|
13 |
+
jQuery(".tenweb-" + prefix + "-opacity").show();
|
14 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").show();
|
15 |
+
if (jQuery(this).attr("data-uninstall") == "1") {
|
16 |
btnVal = 2;
|
17 |
}
|
|
|
18 |
return false;
|
19 |
+
});
|
20 |
+
jQuery(document).on("change", "[name=" + prefix + "_reasons]", function () {
|
21 |
+
var disabled_class = (agree_with_pp === false) ? "button-primary-disabled" : "";
|
22 |
+
jQuery("." + prefix + "_additional_details_wrap").html("");
|
23 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").removeClass("tenweb-popup-active1 tenweb-popup-active2 tenweb-popup-active4");
|
24 |
+
if (jQuery(this).val() == "reason_plugin_is_hard_to_use_technical_problems") {
|
|
|
|
|
|
|
25 |
additionalInfo = '<div class="tenweb-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
|
26 |
'<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
|
27 |
'<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>' +
|
28 |
'<br><div><button class="button button-primary ' + disabled_class + ' tenweb-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
|
29 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
30 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").addClass("tenweb-popup-active1");
|
|
|
31 |
}
|
32 |
+
else if (jQuery(this).val() == "reason_free_version_limited") {
|
33 |
additionalInfo = '<div class="tenweb-additional-active">' +
|
34 |
'<div><strong>We believe our premium version will fit your needs.</strong></div>' +
|
35 |
'<div><a href="' + window[prefix + "WDDeactivateVars"].plugin_wd_url + '" target="_blank">Try with 30 day money back guarantee.</a></div>';
|
36 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
37 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").addClass("tenweb-popup-active2");
|
|
|
38 |
}
|
39 |
else {
|
40 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").addClass("tenweb-popup-active4");
|
41 |
}
|
42 |
+
var checked = (agree_with_pp === true) ? "checked" : "";
|
|
|
43 |
var agree_checkbox =
|
44 |
"<div style='margin-top: 5px;'>" +
|
45 |
"<input type='checkbox' " + checked + " name='" + prefix + "_agree_with_pp" + "' id='" + prefix + "_agree_with_pp" + "'/>" +
|
46 |
"By submitting this form your email and website URL will be sent to 10Web. Click the checkbox if you consent to usage of mentioned data by 10Web in accordance with our <a target='_blank' href='https://10web.io/privacy-policy/'>Privacy Policy</a>." +
|
47 |
"</div>";
|
48 |
+
jQuery("." + prefix + "_additional_details_wrap").prepend(agree_checkbox);
|
49 |
+
jQuery("#tenweb-" + prefix + "-submit-and-deactivate").show();
|
50 |
+
});
|
51 |
+
jQuery(document).on("keyup", "[name=" + prefix + "_additional_details]", function () {
|
52 |
+
if (jQuery(this).val().trim() || jQuery("[name=" + prefix + "_reasons]:checked").length > 0) {
|
53 |
+
jQuery("#tenweb-" + prefix + "-submit-and-deactivate").show();
|
|
|
54 |
}
|
55 |
else {
|
56 |
+
jQuery("#tenweb-" + prefix + "-submit-and-deactivate").hide();
|
57 |
}
|
58 |
+
});
|
59 |
+
jQuery(document).on("change", "[name=" + prefix + "_agree_with_pp]", function () {
|
60 |
+
if (jQuery(this).prop('checked')) {
|
61 |
+
jQuery(".tenweb-" + prefix + "-deactivate").removeClass('button-primary-disabled');
|
|
|
62 |
agree_with_pp = true;
|
63 |
+
}
|
64 |
+
else {
|
65 |
+
jQuery(".tenweb-" + prefix + "-deactivate").addClass('button-primary-disabled');
|
66 |
agree_with_pp = false;
|
67 |
}
|
68 |
+
});
|
69 |
+
jQuery(document).on("click", ".tenweb-" + prefix + "-deactivate", function (e) {
|
70 |
+
var data_val = jQuery(this).data('val');
|
71 |
+
var checkbox = jQuery("#" + prefix + "_agree_with_pp");
|
72 |
+
if (data_val !== 1 && (checkbox.length === 0 || checkbox.prop('checked') === false)) {
|
|
|
|
|
73 |
return false;
|
74 |
}
|
75 |
+
jQuery(".tenweb-deactivate-popup-opacity-" + prefix).show();
|
76 |
+
if (jQuery(this).hasClass("tenweb-clicked") == false) {
|
77 |
+
jQuery(this).addClass("tenweb-clicked");
|
78 |
+
jQuery("[name=" + prefix + "_submit_and_deactivate]").val(jQuery(this).attr("data-val"));
|
79 |
+
jQuery("#" + prefix + "_deactivate_form").submit();
|
|
|
80 |
}
|
81 |
return false;
|
82 |
+
});
|
83 |
+
jQuery(document).on("click", ".tenweb-" + prefix + "-cancel, .tenweb-opacity, .tenweb-deactivate-popup-close-btn", function () {
|
84 |
+
jQuery(".tenweb-" + prefix + "-opacity").hide();
|
85 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").hide();
|
|
|
86 |
reset_popup();
|
|
|
87 |
return false;
|
88 |
+
});
|
89 |
|
90 |
function reset_popup() {
|
91 |
+
jQuery("." + prefix + "_additional_details_wrap").html("");
|
92 |
+
jQuery(".tenweb-" + prefix + "-deactivate-popup").removeClass("tenweb-popup-active1 tenweb-popup-active2 tenweb-popup-active4");
|
93 |
+
jQuery("#tenweb-" + prefix + "-submit-and-deactivate").hide();
|
94 |
+
jQuery('#' + prefix + '_deactivate_form input[name="' + prefix + '_reasons' + '"]').prop('checked', false);
|
|
|
95 |
}
|
96 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wd/assets/js/overview.js
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
jQuery(window).resize(function () {
|
2 |
-
|
3 |
});
|
4 |
jQuery(document).ready(function () {
|
5 |
-
|
6 |
});
|
7 |
|
8 |
-
function tenWebOverviewResize(){
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
}
|
|
1 |
jQuery(window).resize(function () {
|
2 |
+
tenWebOverviewResize();
|
3 |
});
|
4 |
jQuery(document).ready(function () {
|
5 |
+
tenWebOverviewResize();
|
6 |
});
|
7 |
|
8 |
+
function tenWebOverviewResize() {
|
9 |
+
if (jQuery(".tenweb_header_right").length) {
|
10 |
+
if (matchMedia('only screen and (max-width: 840px)').matches) {
|
11 |
+
jQuery(".tenweb_header_right").after(jQuery(".tenweb_header_right .header_text"));
|
12 |
+
}
|
13 |
+
else {
|
14 |
+
jQuery(".tenweb_header_right .button").before(jQuery(".tenweb_overview .inline-block.header_text"));
|
15 |
+
}
|
16 |
+
}
|
17 |
+
}
|
wd/assets/js/subsribe.js
CHANGED
@@ -6,7 +6,7 @@ jQuery(document).on("ready", function () {
|
|
6 |
});
|
7 |
jQuery(".allow_and_continue, .skip").on("click", function () {
|
8 |
var url = jQuery(this).attr("href");
|
9 |
-
if (
|
10 |
jQuery(".allow_and_continue, .skip").css("opacity", "0.5");
|
11 |
jQuery(".allow_and_continue, .skip").attr("disabled", "disabled");
|
12 |
jQuery(".allow_and_continue, .skip").removeAttr("href");
|
6 |
});
|
7 |
jQuery(".allow_and_continue, .skip").on("click", function () {
|
8 |
var url = jQuery(this).attr("href");
|
9 |
+
if (url) {
|
10 |
jQuery(".allow_and_continue, .skip").css("opacity", "0.5");
|
11 |
jQuery(".allow_and_continue, .skip").attr("disabled", "disabled");
|
12 |
jQuery(".allow_and_continue, .skip").removeAttr("href");
|
wd/config.php
CHANGED
@@ -1,133 +1,126 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
class TenWebNewLibConfig {
|
7 |
-
public static $instance;
|
8 |
-
|
9 |
-
public $prefix = null;
|
10 |
-
public $plugin_id = null;
|
11 |
-
public $wd_plugin_id = null;
|
12 |
-
public $plugin_title = null;
|
13 |
-
public $plugin_wordpress_slug = null;
|
14 |
-
public $plugin_dir = null;
|
15 |
-
public $plugin_main_file = null;
|
16 |
-
public $description = null;
|
17 |
-
public $plugin_features = null;
|
18 |
-
public $video_youtube_id = null;
|
19 |
-
public $plugin_wd_url = null;
|
20 |
-
public $plugin_wd_demo_link = null;
|
21 |
-
public $plugin_wd_addons_link = null;
|
22 |
-
public $plugin_wizard_link = null;
|
23 |
-
public $after_subscribe = null;
|
24 |
-
public $plugin_menu_title = null;
|
25 |
-
public $plugin_menu_icon = null;
|
26 |
-
public $wd_dir = null;
|
27 |
-
public $wd_dir_includes = null;
|
28 |
-
public $wd_dir_templates = null;
|
29 |
-
public $wd_dir_assets = null;
|
30 |
-
public $wd_url_css = null;
|
31 |
-
public $wd_url_js = null;
|
32 |
-
public $wd_url_img = null;
|
33 |
-
public $deactivate = null;
|
34 |
-
public $subscribe = null;
|
35 |
-
public $custom_post = null;
|
36 |
-
public $menu_capability = null;
|
37 |
-
public $menu_position = null;
|
38 |
-
public $overview_welcome_image = null;
|
39 |
-
public $display_overview = true;
|
40 |
-
|
41 |
-
public function set_options( $options ){
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
}
|
77 |
-
if(isset( $options["plugin_wd_demo_link"] )) {
|
78 |
-
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
79 |
-
}
|
80 |
-
if(isset( $options["plugin_wd_demo_link"] )) {
|
81 |
-
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
82 |
-
}
|
83 |
-
if(isset( $options["plugin_wd_docs_link"] )) {
|
84 |
-
$this->plugin_wd_docs_link = $options["plugin_wd_docs_link"];
|
85 |
-
}
|
86 |
-
if(isset( $options["plugin_wizard_link"] )) {
|
87 |
-
$this->plugin_wizard_link = $options["plugin_wizard_link"];
|
88 |
-
}
|
89 |
-
if(isset( $options["after_subscribe"] )) {
|
90 |
-
$this->after_subscribe = $options["after_subscribe"];
|
91 |
-
}
|
92 |
-
if(isset( $options["plugin_menu_title"] )) {
|
93 |
-
$this->plugin_menu_title = $options["plugin_menu_title"];
|
94 |
-
}
|
95 |
-
if(isset( $options["plugin_menu_icon"] )) {
|
96 |
-
$this->plugin_menu_icon = $options["plugin_menu_icon"];
|
97 |
-
}
|
98 |
-
if(isset( $options["deactivate"] )) {
|
99 |
-
$this->deactivate = $options["deactivate"];
|
100 |
-
}
|
101 |
-
if(isset( $options["subscribe"] )) {
|
102 |
-
$this->subscribe = $options["subscribe"];
|
103 |
-
}
|
104 |
-
if(isset( $options["custom_post"] )) {
|
105 |
-
$this->custom_post = $options["custom_post"];
|
106 |
-
}
|
107 |
-
if(isset( $options["menu_capability"] )) {
|
108 |
-
$this->menu_capability = $options["menu_capability"];
|
109 |
-
}
|
110 |
-
if(isset( $options["menu_position"] )) {
|
111 |
-
$this->menu_position = $options["menu_position"];
|
112 |
-
}
|
113 |
-
if(isset( $options["overview_welcome_image"] )) {
|
114 |
-
$this->overview_welcome_image = $options["overview_welcome_image"];
|
115 |
-
}
|
116 |
-
if(isset( $options["display_overview"] )) {
|
117 |
-
$this->display_overview = $options["display_overview"];
|
118 |
-
}
|
119 |
-
// directories
|
120 |
-
$this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
|
121 |
-
$this->wd_dir_includes = $this->wd_dir . '/includes';
|
122 |
-
$this->wd_dir_templates = $this->wd_dir . '/templates';
|
123 |
-
$this->wd_dir_assets = $this->wd_dir . '/assets';
|
124 |
-
$this->wd_url_css = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/css';
|
125 |
-
$this->wd_url_js = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/js';
|
126 |
-
$this->wd_url_img = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/img';
|
127 |
-
}
|
128 |
|
|
|
129 |
|
|
|
|
|
130 |
}
|
131 |
-
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
class TenWebNewLibConfig {
|
7 |
+
public static $instance;
|
8 |
+
public $prefix = NULL;
|
9 |
+
public $plugin_id = NULL;
|
10 |
+
public $wd_plugin_id = NULL;
|
11 |
+
public $plugin_title = NULL;
|
12 |
+
public $plugin_wordpress_slug = NULL;
|
13 |
+
public $plugin_dir = NULL;
|
14 |
+
public $plugin_main_file = NULL;
|
15 |
+
public $description = NULL;
|
16 |
+
public $plugin_features = NULL;
|
17 |
+
public $video_youtube_id = NULL;
|
18 |
+
public $plugin_wd_url = NULL;
|
19 |
+
public $plugin_wd_demo_link = NULL;
|
20 |
+
public $plugin_wd_addons_link = NULL;
|
21 |
+
public $plugin_wizard_link = NULL;
|
22 |
+
public $after_subscribe = NULL;
|
23 |
+
public $plugin_menu_title = NULL;
|
24 |
+
public $plugin_menu_icon = NULL;
|
25 |
+
public $wd_dir = NULL;
|
26 |
+
public $wd_dir_includes = NULL;
|
27 |
+
public $wd_dir_templates = NULL;
|
28 |
+
public $wd_dir_assets = NULL;
|
29 |
+
public $wd_url_css = NULL;
|
30 |
+
public $wd_url_js = NULL;
|
31 |
+
public $wd_url_img = NULL;
|
32 |
+
public $deactivate = NULL;
|
33 |
+
public $subscribe = NULL;
|
34 |
+
public $custom_post = NULL;
|
35 |
+
public $menu_capability = NULL;
|
36 |
+
public $menu_position = NULL;
|
37 |
+
public $overview_welcome_image = NULL;
|
38 |
+
public $display_overview = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
public function set_options( $options ) {
|
41 |
|
42 |
+
if ( isset($options["prefix"]) ) {
|
43 |
+
$this->prefix = $options["prefix"];
|
44 |
}
|
45 |
+
if ( isset($options["plugin_id"]) ) {
|
46 |
+
$this->plugin_id = $options["plugin_id"];
|
47 |
+
}
|
48 |
+
if ( isset($options["wd_plugin_id"]) ) {
|
49 |
+
$this->wd_plugin_id = $options["wd_plugin_id"];
|
50 |
+
}
|
51 |
+
if ( isset($options["plugin_title"]) ) {
|
52 |
+
$this->plugin_title = $options["plugin_title"];
|
53 |
+
}
|
54 |
+
if ( isset($options["plugin_wordpress_slug"]) ) {
|
55 |
+
$this->plugin_wordpress_slug = $options["plugin_wordpress_slug"];
|
56 |
+
}
|
57 |
+
if ( isset($options["plugin_dir"]) ) {
|
58 |
+
$this->plugin_dir = $options["plugin_dir"];
|
59 |
+
}
|
60 |
+
if ( isset($options["plugin_main_file"]) ) {
|
61 |
+
$this->plugin_main_file = $options["plugin_main_file"];
|
62 |
+
}
|
63 |
+
if ( isset($options["description"]) ) {
|
64 |
+
$this->description = $options["description"];
|
65 |
+
}
|
66 |
+
if ( isset($options["plugin_features"]) ) {
|
67 |
+
$this->plugin_features = $options["plugin_features"];
|
68 |
+
}
|
69 |
+
if ( isset($options["video_youtube_id"]) ) {
|
70 |
+
$this->video_youtube_id = $options["video_youtube_id"];
|
71 |
+
}
|
72 |
+
if ( isset($options["plugin_wd_url"]) ) {
|
73 |
+
$this->plugin_wd_url = $options["plugin_wd_url"];
|
74 |
+
}
|
75 |
+
if ( isset($options["plugin_wd_demo_link"]) ) {
|
76 |
+
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
77 |
+
}
|
78 |
+
if ( isset($options["plugin_wd_demo_link"]) ) {
|
79 |
+
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
80 |
+
}
|
81 |
+
if ( isset($options["plugin_wd_docs_link"]) ) {
|
82 |
+
$this->plugin_wd_docs_link = $options["plugin_wd_docs_link"];
|
83 |
+
}
|
84 |
+
if ( isset($options["plugin_wizard_link"]) ) {
|
85 |
+
$this->plugin_wizard_link = $options["plugin_wizard_link"];
|
86 |
+
}
|
87 |
+
if ( isset($options["after_subscribe"]) ) {
|
88 |
+
$this->after_subscribe = $options["after_subscribe"];
|
89 |
+
}
|
90 |
+
if ( isset($options["plugin_menu_title"]) ) {
|
91 |
+
$this->plugin_menu_title = $options["plugin_menu_title"];
|
92 |
+
}
|
93 |
+
if ( isset($options["plugin_menu_icon"]) ) {
|
94 |
+
$this->plugin_menu_icon = $options["plugin_menu_icon"];
|
95 |
+
}
|
96 |
+
if ( isset($options["deactivate"]) ) {
|
97 |
+
$this->deactivate = $options["deactivate"];
|
98 |
+
}
|
99 |
+
if ( isset($options["subscribe"]) ) {
|
100 |
+
$this->subscribe = $options["subscribe"];
|
101 |
+
}
|
102 |
+
if ( isset($options["custom_post"]) ) {
|
103 |
+
$this->custom_post = $options["custom_post"];
|
104 |
+
}
|
105 |
+
if ( isset($options["menu_capability"]) ) {
|
106 |
+
$this->menu_capability = $options["menu_capability"];
|
107 |
+
}
|
108 |
+
if ( isset($options["menu_position"]) ) {
|
109 |
+
$this->menu_position = $options["menu_position"];
|
110 |
+
}
|
111 |
+
if ( isset($options["overview_welcome_image"]) ) {
|
112 |
+
$this->overview_welcome_image = $options["overview_welcome_image"];
|
113 |
+
}
|
114 |
+
if ( isset($options["display_overview"]) ) {
|
115 |
+
$this->display_overview = $options["display_overview"];
|
116 |
+
}
|
117 |
+
// directories
|
118 |
+
$this->wd_dir = dirname($this->plugin_main_file) . '/wd';
|
119 |
+
$this->wd_dir_includes = $this->wd_dir . '/includes';
|
120 |
+
$this->wd_dir_templates = $this->wd_dir . '/templates';
|
121 |
+
$this->wd_dir_assets = $this->wd_dir . '/assets';
|
122 |
+
$this->wd_url_css = plugins_url(plugin_basename($this->wd_dir)) . '/assets/css';
|
123 |
+
$this->wd_url_js = plugins_url(plugin_basename($this->wd_dir)) . '/assets/js';
|
124 |
+
$this->wd_url_img = plugins_url(plugin_basename($this->wd_dir)) . '/assets/img';
|
125 |
+
}
|
126 |
+
}
|
wd/includes/api.php
CHANGED
@@ -1,81 +1,49 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Constants //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Variables //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
-
public function __construct( $config = array() ) {
|
25 |
-
$this->config = $config;
|
26 |
-
$this->userhash = $this->get_userhash();
|
27 |
-
}
|
28 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
// Public Methods //
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
$remote_data_path = TEN_WEB_NEW_LIB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
|
35 |
-
$request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
|
36 |
-
|
37 |
-
if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
|
38 |
-
return json_decode($request['body'], true);
|
39 |
-
}
|
40 |
-
return false;
|
41 |
-
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
$response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
|
57 |
-
|
58 |
-
$response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
|
59 |
-
|
60 |
-
if(is_array($response_body)){
|
61 |
-
$hash = $response_body["body"]["hash"];
|
62 |
-
}
|
63 |
-
else{
|
64 |
-
$hash = null;
|
65 |
-
}
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
72 |
-
// Getters & Setters //
|
73 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
74 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
-
// Private Methods //
|
76 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
77 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
78 |
-
// Listeners //
|
79 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
80 |
-
|
81 |
-
}
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class TenWebNewLibApi {
|
7 |
+
public $config;
|
8 |
+
public $userhash = array();
|
9 |
|
10 |
+
public function __construct( $config = array() ) {
|
11 |
+
$this->config = $config;
|
12 |
+
$this->userhash = $this->get_userhash();
|
13 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
public function get_remote_data( $id ) {
|
16 |
+
$remote_data_path = TEN_WEB_NEW_LIB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
|
17 |
+
$request = wp_remote_get((str_replace('_id_', $id, $remote_data_path)));
|
18 |
+
if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
|
19 |
+
return json_decode($request['body'], TRUE);
|
20 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
return FALSE;
|
23 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
public function get_userhash() {
|
26 |
+
$wd_options = $this->config;
|
27 |
+
$userhash = 'nohash';
|
28 |
+
if ( file_exists($wd_options->plugin_dir . '/.keep') && is_readable($wd_options->plugin_dir . '/.keep') ) {
|
29 |
+
$f = fopen($wd_options->plugin_dir . '/.keep', 'r');
|
30 |
+
$userhash = fgets($f);
|
31 |
+
fclose($f);
|
32 |
+
}
|
33 |
|
34 |
+
return $userhash;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function get_hash() {
|
38 |
+
$response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
|
39 |
+
$response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], TRUE) : NULL;
|
40 |
+
if ( is_array($response_body) ) {
|
41 |
+
$hash = $response_body["body"]["hash"];
|
42 |
+
}
|
43 |
+
else {
|
44 |
+
$hash = NULL;
|
45 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
+
return $hash;
|
48 |
+
}
|
49 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wd/includes/deactivate.php
CHANGED
@@ -1,178 +1,111 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
-
class TenWebNewLibDeactivate
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
),
|
85 |
-
admin_url('plugins.php')
|
86 |
-
);
|
87 |
-
|
88 |
-
require($wd_options->wd_dir_templates . '/display_deactivation_popup.php');
|
89 |
-
}
|
90 |
-
|
91 |
-
|
92 |
-
public function scripts()
|
93 |
-
{
|
94 |
-
$wd_options = $this->config;
|
95 |
-
wp_enqueue_style('tenweb-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version"));
|
96 |
-
wp_enqueue_script('tenweb-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version"));
|
97 |
-
|
98 |
$admin_data = wp_get_current_user();
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
-
|
109 |
-
public function submit_and_deactivate()
|
110 |
-
{
|
111 |
-
$wd_options = $this->config;
|
112 |
-
if (isset($_POST[$wd_options->prefix . "_submit_and_deactivate"])) {
|
113 |
-
|
114 |
-
if ($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3) {
|
115 |
-
//$api = new TenWebLibApi( $wd_options );
|
116 |
-
|
117 |
-
$data = array();
|
118 |
-
|
119 |
-
$data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
|
120 |
-
$data["site_url"] = site_url();
|
121 |
-
$data["product_id"] = $wd_options->plugin_id;
|
122 |
-
|
123 |
-
$data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
|
124 |
-
$admin_data = wp_get_current_user();
|
125 |
-
$data["email"] = isset($_POST[$wd_options->prefix . "_email"]) ? $_POST[$wd_options->prefix . "_email"] : $admin_data->data->user_email;
|
126 |
-
$user_first_name = get_user_meta($admin_data->ID, "first_name", true);
|
127 |
-
$user_last_name = get_user_meta($admin_data->ID, "last_name", true);
|
128 |
-
|
129 |
-
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
130 |
-
|
131 |
-
$response = wp_remote_post(TEN_WEB_NEW_LIB_DEACTIVATION_URL, array(
|
132 |
-
'method' => 'POST',
|
133 |
-
'timeout' => 45,
|
134 |
-
'redirection' => 5,
|
135 |
-
'httpversion' => '1.0',
|
136 |
-
'blocking' => true,
|
137 |
-
'headers' => array("Accept" => "application/x.10webcore.v1+json"),
|
138 |
-
'body' => $data,
|
139 |
-
'cookies' => array()
|
140 |
-
)
|
141 |
-
);
|
142 |
-
|
143 |
-
$response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
|
144 |
-
/*if (is_array($response_body) && $response_body["body"]["msg"] == "Access") {
|
145 |
-
|
146 |
-
}*/
|
147 |
-
|
148 |
-
}
|
149 |
-
if ($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 1) {
|
150 |
-
$deactivate_url =
|
151 |
-
add_query_arg(
|
152 |
-
array(
|
153 |
-
'action' => 'deactivate',
|
154 |
-
'plugin' => plugin_basename($wd_options->plugin_main_file),
|
155 |
-
'_wpnonce' => wp_create_nonce('deactivate-plugin_' . plugin_basename($wd_options->plugin_main_file))
|
156 |
-
),
|
157 |
-
admin_url('plugins.php')
|
158 |
-
);
|
159 |
-
echo '<script>window.location.href="' . $deactivate_url . '";</script>';
|
160 |
-
}
|
161 |
-
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
166 |
-
// Getters & Setters //
|
167 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
168 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
169 |
-
// Private Methods //
|
170 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
171 |
-
|
172 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
173 |
-
// Listeners //
|
174 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
175 |
-
|
176 |
}
|
177 |
-
|
178 |
-
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
}
|
5 |
|
6 |
+
class TenWebNewLibDeactivate {
|
7 |
+
public $deactivate_reasons = array();
|
8 |
+
public $config;
|
9 |
+
// Reason IDs
|
10 |
+
const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
|
11 |
+
const REASON_FREE_VERSION_IS_LIMITED = "reason_free_version_limited";
|
12 |
+
const REASON_PRO_EXPENSIVE = "reason_premium_expensive";
|
13 |
+
const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
|
14 |
+
const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
|
15 |
+
|
16 |
+
public function __construct( $config = array() ) {
|
17 |
+
$this->config = $config;
|
18 |
+
$wd_options = $this->config;
|
19 |
+
$this->deactivate_reasons = array(
|
20 |
+
1 => array(
|
21 |
+
'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
|
22 |
+
'text' => __('Technical problems / hard to use', $wd_options->prefix),
|
23 |
+
),
|
24 |
+
2 => array(
|
25 |
+
'id' => self::REASON_FREE_VERSION_IS_LIMITED,
|
26 |
+
'text' => __('Free version is limited', $wd_options->prefix),
|
27 |
+
),
|
28 |
+
3 => array(
|
29 |
+
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
30 |
+
'text' => __('Upgrading to paid version', $wd_options->prefix),
|
31 |
+
),
|
32 |
+
4 => array(
|
33 |
+
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
34 |
+
'text' => __('Temporary deactivation', $wd_options->prefix),
|
35 |
+
),
|
36 |
+
);
|
37 |
+
add_action('admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ));
|
38 |
+
add_action('admin_init', array( $this, 'submit_and_deactivate' ));
|
39 |
+
// Just enqueue styles/scripts and they will be in the footer.
|
40 |
+
$this->scripts();
|
41 |
+
}
|
42 |
+
|
43 |
+
public function add_deactivation_feedback_dialog_box() {
|
44 |
+
$deactivate_reasons = $this->deactivate_reasons;
|
45 |
+
$wd_options = $this->config;
|
46 |
+
?>
|
47 |
+
<script>
|
48 |
+
jQuery(document).ready(function () {
|
49 |
+
tenwebReady("<?php echo $wd_options->prefix; ?>");
|
50 |
+
});
|
51 |
+
</script>
|
52 |
+
<?php
|
53 |
+
$deactivate_url = add_query_arg(array(
|
54 |
+
'action' => 'deactivate',
|
55 |
+
'plugin' => plugin_basename($wd_options->plugin_main_file),
|
56 |
+
'_wpnonce' => wp_create_nonce('deactivate-plugin_' . plugin_basename($wd_options->plugin_main_file)),
|
57 |
+
), admin_url('plugins.php'));
|
58 |
+
require($wd_options->wd_dir_templates . '/display_deactivation_popup.php');
|
59 |
+
}
|
60 |
+
|
61 |
+
public function scripts() {
|
62 |
+
$wd_options = $this->config;
|
63 |
+
wp_enqueue_style('tenweb-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version"));
|
64 |
+
wp_enqueue_script('tenweb-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version"));
|
65 |
+
$admin_data = wp_get_current_user();
|
66 |
+
wp_localize_script('tenweb-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars', array(
|
67 |
+
"prefix" => $wd_options->prefix,
|
68 |
+
"deactivate_class" => $wd_options->prefix . '_deactivate_link',
|
69 |
+
"email" => $admin_data->data->user_email,
|
70 |
+
"plugin_wd_url" => $wd_options->plugin_wd_url,
|
71 |
+
));
|
72 |
+
}
|
73 |
+
|
74 |
+
public function submit_and_deactivate() {
|
75 |
+
$wd_options = $this->config;
|
76 |
+
if ( isset($_POST[$wd_options->prefix . "_submit_and_deactivate"]) ) {
|
77 |
+
|
78 |
+
if ( $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3 ) {
|
79 |
+
$data = array();
|
80 |
+
$data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? sanitize_text_field($_POST[$wd_options->prefix . "_reasons"]) : "";
|
81 |
+
$data["site_url"] = site_url();
|
82 |
+
$data["product_id"] = $wd_options->plugin_id;
|
83 |
+
$data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? sanitize_text_field($_POST[$wd_options->prefix . "_additional_details"]) : "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
$admin_data = wp_get_current_user();
|
85 |
+
$data["email"] = isset($_POST[$wd_options->prefix . "_email"]) ? sanitize_email($_POST[$wd_options->prefix . "_email"]) : $admin_data->data->user_email;
|
86 |
+
$user_first_name = get_user_meta($admin_data->ID, "first_name", TRUE);
|
87 |
+
$user_last_name = get_user_meta($admin_data->ID, "last_name", TRUE);
|
88 |
+
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
89 |
+
$response = wp_remote_post(TEN_WEB_NEW_LIB_DEACTIVATION_URL, array(
|
90 |
+
'method' => 'POST',
|
91 |
+
'timeout' => 45,
|
92 |
+
'redirection' => 5,
|
93 |
+
'httpversion' => '1.0',
|
94 |
+
'blocking' => TRUE,
|
95 |
+
'headers' => array( "Accept" => "application/x.10webcore.v1+json" ),
|
96 |
+
'body' => $data,
|
97 |
+
'cookies' => array(),
|
98 |
+
));
|
99 |
+
$response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], TRUE) : NULL;
|
100 |
+
}
|
101 |
+
if ( $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 1 ) {
|
102 |
+
$deactivate_url = add_query_arg(array(
|
103 |
+
'action' => 'deactivate',
|
104 |
+
'plugin' => plugin_basename($wd_options->plugin_main_file),
|
105 |
+
'_wpnonce' => wp_create_nonce('deactivate-plugin_' . plugin_basename($wd_options->plugin_main_file)),
|
106 |
+
), admin_url('plugins.php'));
|
107 |
+
echo '<script>window.location.href="' . $deactivate_url . '";</script>';
|
108 |
+
}
|
109 |
}
|
110 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
|
|
|
wd/includes/notices.php
CHANGED
@@ -1,223 +1,219 @@
|
|
1 |
<?php
|
2 |
-
if ( !defined(
|
3 |
-
|
4 |
}
|
5 |
|
6 |
class TenWebNewLibNotices {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
public $config;
|
11 |
-
public $notice_spam = 0;
|
12 |
-
public $notice_spam_max = 2;
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
|
21 |
-
add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
|
22 |
}
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
}
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
$
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
$current_date = current_time( "n/j/Y" );
|
61 |
-
$start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
|
62 |
-
$start = date( "n/j/Y", strtotime( $start ) );
|
63 |
-
$date_array = explode( '/', $start );
|
64 |
-
$interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
|
65 |
-
|
66 |
-
$date_array[1] += $interval;
|
67 |
-
$start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
68 |
-
|
69 |
-
// This is the main notices storage option
|
70 |
-
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
71 |
-
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
72 |
-
if ( !array_key_exists( $slug, $admin_notices_option ) ) {
|
73 |
-
$admin_notices_option[$slug]['start'] = $start;
|
74 |
-
$admin_notices_option[$slug]['int'] = $interval;
|
75 |
-
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
76 |
-
}
|
77 |
-
|
78 |
-
// Sanity check to ensure we have accurate information
|
79 |
-
// New date information will not overwrite old date information
|
80 |
-
$admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
|
81 |
-
$admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
|
82 |
-
$admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
|
83 |
-
$admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
|
84 |
-
$admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
|
85 |
-
$admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
|
86 |
-
$output_css = false;
|
87 |
-
|
88 |
-
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
89 |
-
if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
|
90 |
-
|
91 |
-
// Get remaining query string
|
92 |
-
$query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
|
93 |
-
if ( strpos($slug, 'promo' ) === FALSE ) {
|
94 |
-
// Admin notice display output
|
95 |
-
echo '<div class="update-nag wd-admin-notice">
|
96 |
<div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
|
97 |
<p class="wd-notice-title">' . $admin_display_title . '</p>
|
98 |
<p class="wd-notice-body">' . $admin_display_msg . '</p>
|
99 |
<ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
|
100 |
<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
|
101 |
</div>';
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
' . $admin_display_link . '
|
108 |
</ul>';
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
}
|
115 |
-
if ( $output_css ) {
|
116 |
-
wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
|
117 |
-
}
|
118 |
-
}
|
119 |
}
|
120 |
-
|
121 |
-
|
122 |
-
// Spam protection check
|
123 |
-
public function anti_notice_spam() {
|
124 |
-
if ( $this->notice_spam >= $this->notice_spam_max ) {
|
125 |
-
return true;
|
126 |
}
|
127 |
-
|
128 |
}
|
|
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
|
135 |
-
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
136 |
-
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
|
137 |
-
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
138 |
-
$query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
|
139 |
-
wp_redirect( $query_str );
|
140 |
-
exit;
|
141 |
-
}
|
142 |
}
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
159 |
-
$query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
|
160 |
-
wp_redirect( $query_str );
|
161 |
-
exit;
|
162 |
-
}
|
163 |
}
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
}
|
184 |
-
return false;
|
185 |
-
}
|
186 |
}
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
192 |
}
|
193 |
-
|
194 |
-
|
|
|
|
|
195 |
}
|
196 |
-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
-
|
200 |
-
public function special_parameters($admin_notices) {
|
201 |
-
// Intentionally left blank
|
202 |
}
|
|
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
|
215 |
<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
|
216 |
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
}
|
223 |
}
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
}
|
5 |
|
6 |
class TenWebNewLibNotices {
|
7 |
+
protected $promo_link = '';
|
8 |
+
public $config;
|
9 |
+
public $notice_spam = 0;
|
10 |
+
public $notice_spam_max = 2;
|
11 |
+
|
12 |
+
// Basic actions to run
|
13 |
+
public function __construct( $config = array() ) {
|
14 |
+
$this->config = $config;
|
15 |
+
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
16 |
+
add_action('admin_init', array( $this, 'admin_notice_ignore' ));
|
17 |
+
// Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
|
18 |
+
add_action('admin_init', array( $this, 'admin_notice_temp_ignore' ));
|
19 |
+
add_action('admin_notices', array( $this, 'wd_admin_notices' ));
|
20 |
+
}
|
21 |
+
|
22 |
+
// Checks to ensure notices aren't disabled and the user has the correct permissions.
|
23 |
+
public function wd_admin_notice() {
|
24 |
+
$wd_options = $this->config;
|
25 |
+
$settings = get_option($wd_options->prefix . '_admin_notice');
|
26 |
+
if ( !isset($settings['disable_admin_notices']) || (isset($settings['disable_admin_notices']) && $settings['disable_admin_notices'] == 0) ) {
|
27 |
+
if ( current_user_can('manage_options') ) {
|
28 |
+
return TRUE;
|
29 |
+
}
|
30 |
+
}
|
31 |
|
32 |
+
return FALSE;
|
33 |
+
}
|
|
|
|
|
|
|
34 |
|
35 |
+
// Primary notice function that can be called from an outside function sending necessary variables
|
36 |
+
public function admin_notice( $admin_notices ) {
|
37 |
+
$wd_options = $this->config;
|
38 |
+
// Check options
|
39 |
+
if ( !$this->wd_admin_notice() ) {
|
40 |
+
return FALSE;
|
|
|
|
|
41 |
}
|
42 |
+
foreach ( $admin_notices as $slug => $admin_notice ) {
|
43 |
+
// Call for spam protection
|
44 |
+
if ( $this->anti_notice_spam() ) {
|
45 |
+
return FALSE;
|
46 |
+
}
|
47 |
+
// Check for proper page to display on
|
48 |
+
if ( isset($admin_notices[$slug]['pages']) && is_array($admin_notices[$slug]['pages']) ) {
|
49 |
+
if ( !$this->admin_notice_pages($admin_notices[$slug]['pages']) ) {
|
50 |
+
return FALSE;
|
51 |
}
|
52 |
+
}
|
53 |
+
// Check for required fields
|
54 |
+
if ( !$this->required_fields($admin_notices[$slug]) ) {
|
55 |
+
|
56 |
+
// Get the current date then set start date to either passed value or current date value and add interval
|
57 |
+
$current_date = current_time("n/j/Y");
|
58 |
+
$start = (isset($admin_notices[$slug]['start']) ? $admin_notices[$slug]['start'] : $current_date);
|
59 |
+
$start = date("n/j/Y", strtotime($start));
|
60 |
+
$date_array = explode('/', $start);
|
61 |
+
$interval = (isset($admin_notices[$slug]['int']) ? $admin_notices[$slug]['int'] : 0);
|
62 |
+
$date_array[1] += $interval;
|
63 |
+
$start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
|
64 |
+
// This is the main notices storage option
|
65 |
+
$admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
|
66 |
+
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
67 |
+
if ( !array_key_exists($slug, $admin_notices_option) ) {
|
68 |
+
$admin_notices_option[$slug]['start'] = $start;
|
69 |
+
$admin_notices_option[$slug]['int'] = $interval;
|
70 |
+
update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
|
71 |
}
|
72 |
+
// Sanity check to ensure we have accurate information
|
73 |
+
// New date information will not overwrite old date information
|
74 |
+
$admin_display_check = (isset($admin_notices_option[$slug]['dismissed']) ? $admin_notices_option[$slug]['dismissed'] : 0);
|
75 |
+
$admin_display_start = (isset($admin_notices_option[$slug]['start']) ? $admin_notices_option[$slug]['start'] : $start);
|
76 |
+
$admin_display_interval = (isset($admin_notices_option[$slug]['int']) ? $admin_notices_option[$slug]['int'] : $interval);
|
77 |
+
$admin_display_msg = (isset($admin_notices[$slug]['msg']) ? $admin_notices[$slug]['msg'] : '');
|
78 |
+
$admin_display_title = (isset($admin_notices[$slug]['title']) ? $admin_notices[$slug]['title'] : '');
|
79 |
+
$admin_display_link = (isset($admin_notices[$slug]['link']) ? $admin_notices[$slug]['link'] : '');
|
80 |
+
$output_css = FALSE;
|
81 |
+
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
82 |
+
if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date) ) {
|
83 |
+
|
84 |
+
// Get remaining query string
|
85 |
+
$query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg($wd_options->prefix . '_admin_notice_ignore', $slug)));
|
86 |
+
if ( strpos($slug, 'promo') === FALSE ) {
|
87 |
+
// Admin notice display output
|
88 |
+
echo '<div class="update-nag wd-admin-notice">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
<div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
|
90 |
<p class="wd-notice-title">' . $admin_display_title . '</p>
|
91 |
<p class="wd-notice-body">' . $admin_display_msg . '</p>
|
92 |
<ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
|
93 |
<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
|
94 |
</div>';
|
95 |
+
}
|
96 |
+
else {
|
97 |
+
echo '<div class="admin-notice-promo">';
|
98 |
+
echo $admin_display_msg;
|
99 |
+
echo '<ul class="notice-body-promo blue">
|
100 |
' . $admin_display_link . '
|
101 |
</ul>';
|
102 |
+
echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
|
103 |
+
echo '</div>';
|
104 |
+
}
|
105 |
+
$this->notice_spam += 1;
|
106 |
+
$output_css = TRUE;
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
+
if ( $output_css ) {
|
109 |
+
wp_enqueue_style($wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version"));
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
+
}
|
112 |
}
|
113 |
+
}
|
114 |
|
115 |
+
// Spam protection check
|
116 |
+
public function anti_notice_spam() {
|
117 |
+
if ( $this->notice_spam >= $this->notice_spam_max ) {
|
118 |
+
return TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
|
121 |
+
return FALSE;
|
122 |
+
}
|
123 |
+
|
124 |
+
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
125 |
+
public function admin_notice_ignore() {
|
126 |
+
$wd_options = $this->config;
|
127 |
+
// If user clicks to ignore the notice, update the option to not show it again
|
128 |
+
if ( isset($_GET[$wd_options->prefix . '_admin_notice_ignore']) ) {
|
129 |
+
$admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
|
130 |
+
$admin_notices_option[sanitize_text_field($_GET[$wd_options->prefix . '_admin_notice_ignore'])]['dismissed'] = 1;
|
131 |
+
update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
|
132 |
+
$query_str = remove_query_arg($wd_options->prefix . '_admin_notice_ignore');
|
133 |
+
wp_redirect($query_str);
|
134 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
+
}
|
137 |
+
|
138 |
+
// Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
|
139 |
+
public function admin_notice_temp_ignore() {
|
140 |
+
$wd_options = $this->config;
|
141 |
+
// If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
|
142 |
+
if ( isset($_GET[$wd_options->prefix . '_admin_notice_temp_ignore']) ) {
|
143 |
+
$admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
|
144 |
+
$current_date = current_time("n/j/Y");
|
145 |
+
$date_array = explode('/', $current_date);
|
146 |
+
$interval = (isset($_GET['wd_int']) ? intval($_GET['wd_int']) : 14);
|
147 |
+
$date_array[1] += $interval;
|
148 |
+
$new_start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
|
149 |
+
$admin_notices_option[sanitize_text_field($_GET[$wd_options->prefix . '_admin_notice_temp_ignore'])]['start'] = $new_start;
|
150 |
+
$admin_notices_option[sanitize_text_field($_GET[$wd_options->prefix . '_admin_notice_temp_ignore'])]['dismissed'] = 0;
|
151 |
+
update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
|
152 |
+
$query_str = remove_query_arg(array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ));
|
153 |
+
wp_redirect($query_str);
|
154 |
+
exit;
|
|
|
|
|
|
|
155 |
}
|
156 |
+
}
|
157 |
+
|
158 |
+
public function admin_notice_pages( $pages ) {
|
159 |
+
$wd_options = $this->config;
|
160 |
+
foreach ( $pages as $key => $page ) {
|
161 |
+
if ( is_array($page) ) {
|
162 |
+
if ( isset($_GET['page']) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
|
163 |
+
return TRUE;
|
164 |
}
|
165 |
+
}
|
166 |
+
else {
|
167 |
+
if ( $page == 'all' ) {
|
168 |
+
return TRUE;
|
169 |
}
|
170 |
+
if ( get_current_screen()->id === $page ) {
|
171 |
+
return TRUE;
|
172 |
+
}
|
173 |
+
if ( isset($_GET['page']) && $_GET['page'] == $page ) {
|
174 |
+
return TRUE;
|
175 |
+
}
|
176 |
+
}
|
177 |
|
178 |
+
return FALSE;
|
|
|
|
|
179 |
}
|
180 |
+
}
|
181 |
|
182 |
+
// Required fields check
|
183 |
+
public function required_fields( $fields ) {
|
184 |
+
if ( !isset($fields['msg']) || (isset($fields['msg']) && empty($fields['msg'])) ) {
|
185 |
+
return TRUE;
|
186 |
+
}
|
187 |
+
if ( !isset($fields['title']) || (isset($fields['title']) && empty($fields['title'])) ) {
|
188 |
+
return TRUE;
|
189 |
+
}
|
190 |
|
191 |
+
return FALSE;
|
192 |
+
}
|
193 |
+
|
194 |
+
// Special parameters function that is to be used in any extension of this class
|
195 |
+
public function special_parameters( $admin_notices ) {
|
196 |
+
// Intentionally left blank
|
197 |
+
}
|
198 |
+
|
199 |
+
public function wd_admin_notices() {
|
200 |
+
$wd_options = $this->config;
|
201 |
+
$two_week_review_ignore = add_query_arg(array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ));
|
202 |
+
$two_week_review_temp = add_query_arg(array(
|
203 |
+
$wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review',
|
204 |
+
'int' => 14,
|
205 |
+
));
|
206 |
+
$promo_close = add_query_arg(array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ));
|
207 |
+
$notices['two_week_review'] = array(
|
208 |
+
'title' => __('Leave A Review?', $wd_options->prefix),
|
209 |
+
'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
|
210 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
|
211 |
<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
|
212 |
<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
|
213 |
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
|
214 |
+
'later_link' => $two_week_review_temp,
|
215 |
+
'int' => 14,
|
216 |
+
);
|
217 |
+
$this->admin_notice($notices);
|
218 |
+
}
|
|
|
219 |
}
|
wd/includes/overview.php
CHANGED
@@ -1,84 +1,60 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
// Constants //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Variables //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public $config ;
|
17 |
-
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Constructor & Destructor //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function __construct( $config = array() ) {
|
22 |
-
$this->config = $config;
|
23 |
-
$wd_options = $this->config;
|
24 |
-
}
|
25 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
-
// Public Methods //
|
27 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
-
public function display_overview_page(){
|
29 |
-
$wd_options = $this->config;
|
30 |
-
$start_using_url = "";
|
31 |
-
if(!empty($this->config->custom_post)) {
|
32 |
-
if (strpos($this->config->custom_post, 'post_type', 0) !== false) {
|
33 |
-
$start_using_url = admin_url($this->config->custom_post);
|
34 |
-
} else {
|
35 |
-
$start_using_url = menu_page_url($this->config->custom_post, false);
|
36 |
-
}
|
37 |
-
}
|
38 |
-
require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
|
39 |
-
}
|
40 |
-
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
-
// Private Methods //
|
59 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
60 |
-
private function remote_get($plugin_wp_slug){
|
61 |
-
$request = wp_remote_get(" http://api.wordpress.org/plugins/info/1.0/" . $plugin_wp_slug);
|
62 |
-
$data = array();
|
63 |
-
if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {
|
64 |
-
$body = unserialize($request['body']);
|
65 |
-
$data["downloaded"] = $body->downloaded;
|
66 |
-
$ratings = $body->ratings;
|
67 |
-
if( $ratings[5] == 0 && $ratings[4] == 0 && $ratings[3] == 0 && $ratings[2] == 0 && $ratings[1] == 0){
|
68 |
-
$data["rating"] = 100;
|
69 |
-
}
|
70 |
-
else{
|
71 |
-
$data["rating"] = round( ( ( $ratings[5] * 5 + $ratings[4] * 4 + $ratings[3] * 3 + $ratings[2] * 2 + $ratings[1] * 1 ) / $body->num_ratings ) , 1 );
|
72 |
-
|
73 |
-
$data["rating"] = round( ( $data["rating"] / 5 ) * 100 );
|
74 |
-
}
|
75 |
-
return $data;
|
76 |
-
}
|
77 |
-
return false;
|
78 |
-
|
79 |
-
}
|
80 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
81 |
-
// Listeners //
|
82 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
83 |
-
|
84 |
-
}
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class TenWebNewLibOverview {
|
7 |
+
public $config;
|
8 |
+
|
9 |
+
public function __construct( $config = array() ) {
|
10 |
+
$this->config = $config;
|
11 |
+
$wd_options = $this->config;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function display_overview_page() {
|
15 |
+
$wd_options = $this->config;
|
16 |
+
$start_using_url = "";
|
17 |
+
if ( !empty($this->config->custom_post) ) {
|
18 |
+
if ( strpos($this->config->custom_post, 'post_type', 0) !== FALSE ) {
|
19 |
+
$start_using_url = admin_url($this->config->custom_post);
|
20 |
+
}
|
21 |
+
else {
|
22 |
+
$start_using_url = menu_page_url($this->config->custom_post, FALSE);
|
23 |
+
}
|
24 |
}
|
25 |
+
require_once($wd_options->wd_dir_templates . "/display_overview.php");
|
26 |
+
}
|
27 |
|
28 |
+
public function overview_styles() {
|
29 |
+
$wd_options = $this->config;
|
30 |
+
$version = get_option($wd_options->prefix . "_version");
|
31 |
+
wp_enqueue_style($wd_options->prefix . '_overview_css', $wd_options->wd_url_css . '/overview.css', array(), $version);
|
32 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
+
public function overview_scripts() {
|
35 |
+
$wd_options = $this->config;
|
36 |
+
$version = get_option($wd_options->prefix . "_version");
|
37 |
+
wp_enqueue_script($wd_options->prefix . '_overview_js', $wd_options->wd_url_js . '/overview.js', array(), $version);
|
38 |
+
}
|
39 |
|
40 |
+
private function remote_get( $plugin_wp_slug ) {
|
41 |
+
$request = wp_remote_get(" http://api.wordpress.org/plugins/info/1.0/" . $plugin_wp_slug);
|
42 |
+
$data = array();
|
43 |
+
if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
|
44 |
+
$body = unserialize($request['body']);
|
45 |
+
$data["downloaded"] = $body->downloaded;
|
46 |
+
$ratings = $body->ratings;
|
47 |
+
if ( $ratings[5] == 0 && $ratings[4] == 0 && $ratings[3] == 0 && $ratings[2] == 0 && $ratings[1] == 0 ) {
|
48 |
+
$data["rating"] = 100;
|
49 |
+
}
|
50 |
+
else {
|
51 |
+
$data["rating"] = round((($ratings[5] * 5 + $ratings[4] * 4 + $ratings[3] * 3 + $ratings[2] * 2 + $ratings[1] * 1) / $body->num_ratings), 1);
|
52 |
+
$data["rating"] = round(($data["rating"] / 5) * 100);
|
53 |
+
}
|
54 |
+
|
55 |
+
return $data;
|
56 |
+
}
|
57 |
|
58 |
+
return FALSE;
|
59 |
+
}
|
60 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wd/includes/subscribe.php
CHANGED
@@ -1,130 +1,75 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
-
class TenWebNewLibSubscribe
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
"Name" => $data["Name"],
|
63 |
-
"PluginURI" => $data["PluginURI"],
|
64 |
-
"Author" => $data["Author"],
|
65 |
-
"AuthorURI" => $data["AuthorURI"]
|
66 |
-
);
|
67 |
-
$all_plugins[$slug] = $plugin;
|
68 |
-
}*/
|
69 |
-
|
70 |
-
$data = array();
|
71 |
-
$data["wp_site_url"] = site_url();
|
72 |
-
|
73 |
-
$admin_data = wp_get_current_user();
|
74 |
-
|
75 |
-
$user_first_name = get_user_meta($admin_data->ID, "first_name", true);
|
76 |
-
$user_last_name = get_user_meta($admin_data->ID, "last_name", true);
|
77 |
-
|
78 |
-
$name = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
79 |
-
$data["name"] = isset($_GET[$wd_options->prefix . "_user_name"]) ? $_GET[$wd_options->prefix . "_user_name"] : $name;
|
80 |
-
|
81 |
-
$data["email"] = isset($_GET[$wd_options->prefix . "_user_email"]) ? $_GET[$wd_options->prefix . "_user_email"] : $admin_data->data->user_email;
|
82 |
-
/*$data["wp_version"] = get_bloginfo('version');*/
|
83 |
-
$data["product_id"] = $wd_options->plugin_id;
|
84 |
-
/*$data["all_plugins"] = json_encode($all_plugins);*/
|
85 |
-
|
86 |
-
|
87 |
-
$response = wp_remote_post(TEN_WEB_NEW_LIB_SUBSCRIBE_URL, array(
|
88 |
-
'method' => 'POST',
|
89 |
-
'timeout' => 45,
|
90 |
-
'redirection' => 5,
|
91 |
-
'httpversion' => '1.0',
|
92 |
-
'blocking' => true,
|
93 |
-
'headers' => array("Accept" => "application/x.10webcore.v1+json"),
|
94 |
-
'body' => $data,
|
95 |
-
'cookies' => array()
|
96 |
-
)
|
97 |
-
);
|
98 |
-
|
99 |
-
$response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
|
100 |
-
|
101 |
-
if (is_array($response_body) && $response_body["status"] == "ok") {
|
102 |
-
if (get_option($wd_options->prefix . "_subscribe_email") !== false) {
|
103 |
-
update_option($wd_options->prefix . "_subscribe_email", $data["email"]);
|
104 |
-
} else {
|
105 |
-
add_option($wd_options->prefix . "_subscribe_email", $data["email"], '', 'no');
|
106 |
-
}
|
107 |
-
}
|
108 |
-
|
109 |
-
}
|
110 |
-
if (get_option($wd_options->prefix . "_subscribe_done") != 1) {
|
111 |
-
update_option($wd_options->prefix . "_subscribe_done", 1);
|
112 |
-
} else {
|
113 |
-
add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
|
114 |
-
}
|
115 |
-
if ($_GET[$wd_options->prefix . "_sub_action"] == "skip") {
|
116 |
-
wp_safe_redirect($wd_options->after_subscribe);
|
117 |
-
}
|
118 |
}
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
-
|
122 |
-
// Getters & Setters //
|
123 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
124 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
125 |
-
// Private Methods //
|
126 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
127 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
128 |
-
// Listeners //
|
129 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
130 |
}
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
}
|
5 |
|
6 |
+
class TenWebNewLibSubscribe {
|
7 |
+
public $config;
|
8 |
+
|
9 |
+
public function __construct( $config = array() ) {
|
10 |
+
$this->config = $config;
|
11 |
+
add_action('admin_init', array( $this, 'after_subscribe' ));
|
12 |
+
}
|
13 |
+
|
14 |
+
public function subscribe_scripts() {
|
15 |
+
$wd_options = $this->config;
|
16 |
+
wp_register_script('subscribe_js', $wd_options->wd_url_js . '/subsribe.js');
|
17 |
+
wp_enqueue_script('subscribe_js');
|
18 |
+
}
|
19 |
+
|
20 |
+
public function subscribe_styles() {
|
21 |
+
$wd_options = $this->config;
|
22 |
+
wp_enqueue_style($wd_options->prefix . 'subscribe', $wd_options->wd_url_css . '/subscribe.css');
|
23 |
+
}
|
24 |
+
|
25 |
+
public function subscribe_display_page() {
|
26 |
+
$wd_options = $this->config;
|
27 |
+
require_once($wd_options->plugin_dir . '/admin/views/LibSubscribe.php');
|
28 |
+
}
|
29 |
+
|
30 |
+
public function after_subscribe() {
|
31 |
+
$wd_options = $this->config;
|
32 |
+
if ( isset($_GET[$wd_options->prefix . "_sub_action"]) ) {
|
33 |
+
|
34 |
+
if ( $_GET[$wd_options->prefix . "_sub_action"] == "allow" ) {
|
35 |
+
$data = array();
|
36 |
+
$data["wp_site_url"] = site_url();
|
37 |
+
$admin_data = wp_get_current_user();
|
38 |
+
$user_first_name = get_user_meta($admin_data->ID, "first_name", TRUE);
|
39 |
+
$user_last_name = get_user_meta($admin_data->ID, "last_name", TRUE);
|
40 |
+
$name = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
41 |
+
$data["name"] = isset($_GET[$wd_options->prefix . "_user_name"]) ? sanitize_text_field($_GET[$wd_options->prefix . "_user_name"]) : $name;
|
42 |
+
$data["email"] = isset($_GET[$wd_options->prefix . "_user_email"]) ? sanitize_email($_GET[$wd_options->prefix . "_user_email"]) : $admin_data->data->user_email;
|
43 |
+
$data["product_id"] = $wd_options->plugin_id;
|
44 |
+
$response = wp_remote_post(TEN_WEB_NEW_LIB_SUBSCRIBE_URL, array(
|
45 |
+
'method' => 'POST',
|
46 |
+
'timeout' => 45,
|
47 |
+
'redirection' => 5,
|
48 |
+
'httpversion' => '1.0',
|
49 |
+
'blocking' => TRUE,
|
50 |
+
'headers' => array( "Accept" => "application/x.10webcore.v1+json" ),
|
51 |
+
'body' => $data,
|
52 |
+
'cookies' => array(),
|
53 |
+
));
|
54 |
+
$response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], TRUE) : NULL;
|
55 |
+
if ( is_array($response_body) && $response_body["status"] == "ok" ) {
|
56 |
+
if ( get_option($wd_options->prefix . "_subscribe_email") !== FALSE ) {
|
57 |
+
update_option($wd_options->prefix . "_subscribe_email", sanitize_email($data["email"]));
|
58 |
+
}
|
59 |
+
else {
|
60 |
+
add_option($wd_options->prefix . "_subscribe_email", sanitize_email( $data["email"]), '', 'no');
|
61 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
+
}
|
64 |
+
if ( get_option($wd_options->prefix . "_subscribe_done") != 1 ) {
|
65 |
+
update_option($wd_options->prefix . "_subscribe_done", 1);
|
66 |
+
}
|
67 |
+
else {
|
68 |
+
add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
|
69 |
+
}
|
70 |
+
if ( $_GET[$wd_options->prefix . "_sub_action"] == "skip" ) {
|
71 |
+
wp_safe_redirect($wd_options->after_subscribe);
|
72 |
+
}
|
73 |
}
|
74 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
wd/start.php
CHANGED
@@ -1,43 +1,34 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
* wd_plugin_id;
|
15 |
-
* plugin_title;
|
16 |
-
* plugin_dir;
|
17 |
-
* plugin_main_file;
|
18 |
-
* description;
|
19 |
-
* plugin_features;
|
20 |
-
* video_youtube_id;
|
21 |
-
* plugin_wd_url;
|
22 |
-
* plugin_wd_demo_link;
|
23 |
-
* plugin_wd_addons_link;
|
24 |
-
* plugin_wizard_link;
|
25 |
-
* after_subscribe;
|
26 |
-
* plugin_menu_title;
|
27 |
-
* plugin_menu_icon;
|
28 |
-
* custom_post;
|
29 |
-
*/
|
30 |
-
|
31 |
-
function ten_web_new_lib_init( $options ) {
|
32 |
-
|
33 |
-
// load files
|
34 |
-
require_once dirname( __FILE__ ) . '/wd.php';
|
35 |
-
|
36 |
-
$wd = new TenWebLibNew();
|
37 |
-
$wd->wd_init( $options );
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
1 |
+
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
define('TEN_WEB_NEW_LIB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata');
|
6 |
+
define('TEN_WEB_NEW_LIB_SUBSCRIBE_URL', 'https://core.10web.io/api/wp-subscribe');
|
7 |
+
define('TEN_WEB_NEW_LIB_DEACTIVATION_URL', 'https://core.10web.io/api/deactivation_reasons');
|
8 |
+
require_once dirname(__FILE__) . '/config.php';
|
9 |
+
/**
|
10 |
+
* @param options for Plugin details.
|
11 |
+
* prefix;
|
12 |
+
* wd_plugin_id;
|
13 |
+
* plugin_title;
|
14 |
+
* plugin_dir;
|
15 |
+
* plugin_main_file;
|
16 |
+
* description;
|
17 |
+
* plugin_features;
|
18 |
+
* video_youtube_id;
|
19 |
+
* plugin_wd_url;
|
20 |
+
* plugin_wd_demo_link;
|
21 |
+
* plugin_wd_addons_link;
|
22 |
+
* plugin_wizard_link;
|
23 |
+
* after_subscribe;
|
24 |
+
* plugin_menu_title;
|
25 |
+
* plugin_menu_icon;
|
26 |
+
* custom_post;
|
27 |
+
*/
|
28 |
+
function ten_web_new_lib_init( $options ) {
|
29 |
|
30 |
+
// load files
|
31 |
+
require_once dirname(__FILE__) . '/wd.php';
|
32 |
+
$wd = new TenWebLibNew();
|
33 |
+
$wd->wd_init($options);
|
34 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wd/templates/display_deactivation_popup.php
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
<div class="tenweb-opacity tenweb-<?php echo $wd_options->prefix; ?>-opacity"></div>
|
2 |
<div class="tenweb-deactivate-popup tenweb-<?php echo $wd_options->prefix; ?>-deactivate-popup">
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
</div>
|
1 |
<div class="tenweb-opacity tenweb-<?php echo $wd_options->prefix; ?>-opacity"></div>
|
2 |
<div class="tenweb-deactivate-popup tenweb-<?php echo $wd_options->prefix; ?>-deactivate-popup">
|
3 |
+
<div class="tenweb-deactivate-popup-opacity tenweb-deactivate-popup-opacity-<?php echo $wd_options->prefix; ?>">
|
4 |
+
<img src="<?php echo $wd_options->wd_url_img . '/spinner.gif'; ?>" class="tenweb-img-loader">
|
5 |
+
</div>
|
6 |
+
<form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
|
7 |
+
<div class="tenweb-deactivate-popup-header">
|
8 |
+
<?php _e("Please let us know why you are deactivating. Your answer will help us to provide you support or sometimes offer discounts. (Optional)", $wd_options->prefix); ?>:
|
9 |
+
<span class="tenweb-deactivate-popup-close-btn"></span>
|
10 |
+
</div>
|
11 |
|
12 |
+
<div class="tenweb-deactivate-popup-body">
|
13 |
+
<?php foreach ( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
|
14 |
+
<div class="tenweb-<?php echo $wd_options->prefix; ?>-reasons">
|
15 |
+
<input type="radio" value="<?php echo $deactivate_reason["id"]; ?>" id="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>" name="<?php echo $wd_options->prefix; ?>_reasons">
|
16 |
+
<label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"]; ?></label>
|
17 |
+
</div>
|
18 |
+
<?php } ?>
|
19 |
+
<div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
|
20 |
+
</div>
|
21 |
+
<div class="tenweb-btns">
|
22 |
+
<a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-secondary button-close" id="tenweb-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e("Skip and Deactivate", $wd_options->prefix); ?></a>
|
23 |
+
<a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-primary-disabled button-close tenweb-<?php echo $wd_options->prefix; ?>-deactivate" id="tenweb-<?php echo $wd_options->prefix; ?>-submit-and-deactivate"><?php _e("Submit and Deactivate", $wd_options->prefix); ?></a>
|
24 |
+
</div>
|
25 |
+
<input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="">
|
26 |
+
<?php wp_nonce_field($wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
|
27 |
+
</form>
|
28 |
</div>
|
wd/templates/display_overview.php
CHANGED
@@ -1,124 +1,124 @@
|
|
1 |
<div class="tenweb_overview">
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</div>
|
16 |
-
<div class="
|
|
|
|
|
|
|
17 |
</div>
|
18 |
-
<div class="
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
<div class="and"> & </div>
|
23 |
-
</div>
|
24 |
-
<div class="plan_features tenweb_clear">
|
25 |
-
<div class="plan_feature pro_plugins">
|
26 |
-
<div class="logo"></div>
|
27 |
-
<h3><?php _e("60+ pro plugins/Extensions", $wd_options->prefix); ?></h3>
|
28 |
-
<p><?php _e("Access 60+ plugins and extensions, including key plugins, such as gallery, form, slider, social plugins and more.", $wd_options->prefix); ?></p>
|
29 |
-
</div>
|
30 |
-
<div class="plan_feature dashboard">
|
31 |
-
<div class="logo"></div>
|
32 |
-
<h3><?php _e("Unified dashboard", $wd_options->prefix); ?></h3>
|
33 |
-
<p><?php _e("Manage your WordPress websites all in one place within a single dashboard. No need to switch between sites.", $wd_options->prefix); ?></p>
|
34 |
-
</div>
|
35 |
-
<div class="plan_feature pro_themes">
|
36 |
-
<div class="logo"></div>
|
37 |
-
<h3><?php _e("Premium WordPress themes", $wd_options->prefix); ?></h3>
|
38 |
-
<p><?php _e("Professionally designed, responsive themes for your website. Build fully-functional, elegant websites effortlessly.", $wd_options->prefix); ?></p>
|
39 |
-
</div>
|
40 |
-
<?php if ($wd_options->plugin_wordpress_slug != "backup-wd") { ?>
|
41 |
-
<div class="plan_feature backup">
|
42 |
-
<div class="logo"></div>
|
43 |
-
<h3><?php _e("Backup", $wd_options->prefix); ?></h3>
|
44 |
-
<p><?php _e("10Web cloud storage space. Easily and securely backup your website in our storage.", $wd_options->prefix); ?></p>
|
45 |
-
</div>
|
46 |
-
<?php } ?>
|
47 |
-
<?php if ($wd_options->plugin_wordpress_slug != "seo-by-10web") { ?>
|
48 |
-
<div class="plan_feature seo">
|
49 |
-
<div class="logo"></div>
|
50 |
-
<h3><?php _e("SEO", $wd_options->prefix); ?></h3>
|
51 |
-
<p><?php _e("Improve search rankings of your WordPress site with a comprehensive search engine optimization solution.", $wd_options->prefix); ?></p>
|
52 |
-
</div>
|
53 |
-
<?php } ?>
|
54 |
-
<div class="plan_feature security">
|
55 |
-
<div class="logo"></div>
|
56 |
-
<h3><?php _e("Security", $wd_options->prefix); ?></h3>
|
57 |
-
<p><?php _e("Protect your WordPress site from security issues and threats with a powerful security service coming soon to 10Web.", $wd_options->prefix); ?></p>
|
58 |
-
</div>
|
59 |
-
<?php if ($wd_options->plugin_wordpress_slug != "image-optimizer-wd") { ?>
|
60 |
-
<div class="plan_feature image_optimizer">
|
61 |
-
<div class="logo"></div>
|
62 |
-
<h3><?php _e("Image optimization", $wd_options->prefix); ?></h3>
|
63 |
-
<p><?php _e("Automatically resize and compress all images on your website to save space and improve site speed.", $wd_options->prefix); ?></p>
|
64 |
-
</div>
|
65 |
-
<?php } ?>
|
66 |
-
<div class="plan_feature hosting">
|
67 |
-
<div class="logo"></div>
|
68 |
-
<h3><?php _e("Hosting", $wd_options->prefix); ?></h3>
|
69 |
-
<p><?php _e("We’ll soon be offering affordable hosting solution with WordPress-friendly features and great customer support.", $wd_options->prefix); ?></p>
|
70 |
-
</div>
|
71 |
-
</div>
|
72 |
-
<a href="https://my.10web.io/checkout/" target="_blank"
|
73 |
-
class="button"><?php _e("Get free for 14 days", $wd_options->prefix); ?></a>
|
74 |
-
<div><a href="https://10web.io/" target="_blank"
|
75 |
-
class="more white"><?php _e("Learn More", $wd_options->prefix); ?></a></div>
|
76 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
</div>
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
<?php } ?>
|
92 |
-
</div>
|
93 |
-
<div class="and circle"> & </div>
|
94 |
-
<h3 class="more_features"><?php _e("More great features of the plugin", $wd_options->prefix); ?></h3>
|
95 |
-
<a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"
|
96 |
-
class="more blue"><?php _e("Learn More", $wd_options->prefix); ?></a>
|
97 |
</div>
|
|
|
98 |
</div>
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<a href="<?php echo $wd_options->plugin_wd_demo_link; ?>" target="_blank"
|
107 |
class="button transparent"><?php _e("Demo", $wd_options->prefix); ?></a>
|
108 |
-
|
109 |
-
|
110 |
<a href="<?php echo $wd_options->plugin_wd_docs_link; ?>" target="_blank"
|
111 |
class="button transparent"><?php _e("User Guide", $wd_options->prefix); ?></a>
|
112 |
-
|
113 |
-
</div>
|
114 |
</div>
|
115 |
-
<?php } ?>
|
116 |
-
<div class="tenweb_footer <?php echo trim($wd_options->plugin_wd_demo_link) == "" ? "without_demo" : ""; ?>">
|
117 |
-
<div class="container">
|
118 |
-
<h2><?php echo $wd_options->description; ?></h2>
|
119 |
-
<p><?php echo sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title); ?></p>
|
120 |
-
<a href="https://my.10web.io/checkout/" target="_blank"
|
121 |
-
class="button"><?php _e("Get free for 14 days", $wd_options->prefix); ?></a>
|
122 |
-
</div>
|
123 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
</div>
|
1 |
<div class="tenweb_overview">
|
2 |
+
<div class="tenweb_header">
|
3 |
+
<div class="container tenweb_clear container_top">
|
4 |
+
<div class="tenweb_logo">
|
5 |
+
<a href="https://10web.io/" target="_blank">
|
6 |
+
<div></div>
|
7 |
+
</a>
|
8 |
+
</div>
|
9 |
+
<div class="tenweb_header_right tenweb_clear">
|
10 |
+
<div class="inline-block header_text"><?php echo sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title); ?>
|
11 |
+
</div>
|
12 |
+
<a href="https://my.10web.io/checkout/" target="_blank"
|
13 |
+
class="button"><?php _e("Try Free", $wd_options->prefix); ?></a>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
<div class="tenweb_header_divider">
|
17 |
+
</div>
|
18 |
+
<div class="container container_bottom">
|
19 |
+
<div class="plugin_info">
|
20 |
+
<img src="<?php echo $wd_options->overview_welcome_image; ?>" class="plugin_logo">
|
21 |
+
<h2><?php _e("Premium ", $wd_options->prefix); ?><?php echo $wd_options->plugin_title; ?></h2>
|
22 |
+
<div class="and"> &</div>
|
23 |
+
</div>
|
24 |
+
<div class="plan_features tenweb_clear">
|
25 |
+
<div class="plan_feature pro_plugins">
|
26 |
+
<div class="logo"></div>
|
27 |
+
<h3><?php _e("60+ pro plugins/Extensions", $wd_options->prefix); ?></h3>
|
28 |
+
<p><?php _e("Access 60+ plugins and extensions, including key plugins, such as gallery, form, slider, social plugins and more.", $wd_options->prefix); ?></p>
|
29 |
</div>
|
30 |
+
<div class="plan_feature dashboard">
|
31 |
+
<div class="logo"></div>
|
32 |
+
<h3><?php _e("Unified dashboard", $wd_options->prefix); ?></h3>
|
33 |
+
<p><?php _e("Manage your WordPress websites all in one place within a single dashboard. No need to switch between sites.", $wd_options->prefix); ?></p>
|
34 |
</div>
|
35 |
+
<div class="plan_feature pro_themes">
|
36 |
+
<div class="logo"></div>
|
37 |
+
<h3><?php _e("Premium WordPress themes", $wd_options->prefix); ?></h3>
|
38 |
+
<p><?php _e("Professionally designed, responsive themes for your website. Build fully-functional, elegant websites effortlessly.", $wd_options->prefix); ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
</div>
|
40 |
+
<?php if ( $wd_options->plugin_wordpress_slug != "backup-wd" ) { ?>
|
41 |
+
<div class="plan_feature backup">
|
42 |
+
<div class="logo"></div>
|
43 |
+
<h3><?php _e("Backup", $wd_options->prefix); ?></h3>
|
44 |
+
<p><?php _e("10Web cloud storage space. Easily and securely backup your website in our storage.", $wd_options->prefix); ?></p>
|
45 |
+
</div>
|
46 |
+
<?php } ?>
|
47 |
+
<?php if ( $wd_options->plugin_wordpress_slug != "seo-by-10web" ) { ?>
|
48 |
+
<div class="plan_feature seo">
|
49 |
+
<div class="logo"></div>
|
50 |
+
<h3><?php _e("SEO", $wd_options->prefix); ?></h3>
|
51 |
+
<p><?php _e("Improve search rankings of your WordPress site with a comprehensive search engine optimization solution.", $wd_options->prefix); ?></p>
|
52 |
+
</div>
|
53 |
+
<?php } ?>
|
54 |
+
<div class="plan_feature security">
|
55 |
+
<div class="logo"></div>
|
56 |
+
<h3><?php _e("Security", $wd_options->prefix); ?></h3>
|
57 |
+
<p><?php _e("Protect your WordPress site from security issues and threats with a powerful security service coming soon to 10Web.", $wd_options->prefix); ?></p>
|
58 |
+
</div>
|
59 |
+
<?php if ( $wd_options->plugin_wordpress_slug != "image-optimizer-wd" ) { ?>
|
60 |
+
<div class="plan_feature image_optimizer">
|
61 |
+
<div class="logo"></div>
|
62 |
+
<h3><?php _e("Image optimization", $wd_options->prefix); ?></h3>
|
63 |
+
<p><?php _e("Automatically resize and compress all images on your website to save space and improve site speed.", $wd_options->prefix); ?></p>
|
64 |
+
</div>
|
65 |
+
<?php } ?>
|
66 |
+
<div class="plan_feature hosting">
|
67 |
+
<div class="logo"></div>
|
68 |
+
<h3><?php _e("Hosting", $wd_options->prefix); ?></h3>
|
69 |
+
<p><?php _e("We’ll soon be offering affordable hosting solution with WordPress-friendly features and great customer support.", $wd_options->prefix); ?></p>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
<a href="https://my.10web.io/checkout/" target="_blank"
|
73 |
+
class="button"><?php _e("Get free for 14 days", $wd_options->prefix); ?></a>
|
74 |
+
<div><a href="https://10web.io/" target="_blank"
|
75 |
+
class="more white"><?php _e("Learn More", $wd_options->prefix); ?></a></div>
|
76 |
</div>
|
77 |
+
</div>
|
78 |
+
<?php if ( count($wd_options->plugin_features) ) { ?>
|
79 |
+
<div class="tenweb_plugin_features">
|
80 |
+
<div class="container">
|
81 |
+
<h2><?php _e("Premium ", $wd_options->prefix); ?><?php echo $wd_options->plugin_title; ?><?php _e(" features you get!", $wd_options->prefix); ?></h2>
|
82 |
+
<div class="plugin_features tenweb_clear">
|
83 |
+
<?php foreach ( $wd_options->plugin_features as $features ) { ?>
|
84 |
+
<div class="plugin_feature">
|
85 |
+
<div class="plugin_feature_logo">
|
86 |
+
<img src="<?php echo $features['logo']; ?>">
|
87 |
+
</div>
|
88 |
+
<h3><?php echo $features['title']; ?></h3>
|
89 |
+
<p><?php echo $features['description']; ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
</div>
|
91 |
+
<?php } ?>
|
92 |
</div>
|
93 |
+
<div class="and circle"> &</div>
|
94 |
+
<h3 class="more_features"><?php _e("More great features of the plugin", $wd_options->prefix); ?></h3>
|
95 |
+
<a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"
|
96 |
+
class="more blue"><?php _e("Learn More", $wd_options->prefix); ?></a>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
<?php }
|
100 |
+
if ( trim($wd_options->plugin_wd_demo_link) != "" || trim($wd_options->plugin_wd_docs_link) != "" ) { ?>
|
101 |
+
<div class="tenweb_how_it_works">
|
102 |
+
<div class="container">
|
103 |
+
<h2><?php _e("Checkout how it works", $wd_options->prefix); ?></h2>
|
104 |
+
<?php
|
105 |
+
if ( trim($wd_options->plugin_wd_demo_link) != "" ) { ?>
|
106 |
<a href="<?php echo $wd_options->plugin_wd_demo_link; ?>" target="_blank"
|
107 |
class="button transparent"><?php _e("Demo", $wd_options->prefix); ?></a>
|
108 |
+
<?php }
|
109 |
+
if ( trim($wd_options->plugin_wd_docs_link) != "" ) { ?>
|
110 |
<a href="<?php echo $wd_options->plugin_wd_docs_link; ?>" target="_blank"
|
111 |
class="button transparent"><?php _e("User Guide", $wd_options->prefix); ?></a>
|
112 |
+
<?php } ?>
|
|
|
113 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
</div>
|
115 |
+
<?php } ?>
|
116 |
+
<div class="tenweb_footer <?php echo trim($wd_options->plugin_wd_demo_link) == "" ? "without_demo" : ""; ?>">
|
117 |
+
<div class="container">
|
118 |
+
<h2><?php echo $wd_options->description; ?></h2>
|
119 |
+
<p><?php echo sprintf(__("Get Premium %s and Other Solutions Essential for Your WordPress Site.", $wd_options->prefix), $wd_options->plugin_title); ?></p>
|
120 |
+
<a href="https://my.10web.io/checkout/" target="_blank"
|
121 |
+
class="button"><?php _e("Get free for 14 days", $wd_options->prefix); ?></a>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
</div>
|
wd/templates/display_subscribe.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
</div>
|
11 |
-
<div class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></div>
|
12 |
-
<div class="list tenweb_clear">
|
13 |
-
<div class="list_item user_info">
|
14 |
-
<div class="list_logo"></div>
|
15 |
-
<div class="list_text_wrap"> <?php _e( "Your name & Email address", $wd_options->prefix ); ?></div>
|
16 |
-
</div>
|
17 |
-
<div class="list_item wp_info">
|
18 |
-
<div class="list_logo"></div>
|
19 |
-
<div class="list_text_wrap"> <?php _e( "Site URL, Wordpress version", $wd_options->prefix ); ?></div>
|
20 |
-
</div>
|
21 |
-
<div class="list_item plugins_info">
|
22 |
-
<div class="list_logo"></div>
|
23 |
-
<div class="list_text_wrap"> <?php _e( "List of plugins", $wd_options->prefix ); ?></div>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
<div class="btns">
|
27 |
-
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow" ;?>" class="allow_and_continue button"><?php _e( "Allow & Continue", $wd_options->prefix ); ?></a>
|
28 |
-
<img src="<?php echo $wd_options->wd_url_img . '/loader.gif';?>" class="wd_loader">
|
29 |
-
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip" ;?>" class="skip more" ><?php _e( "Skip", $wd_options->prefix ); ?></a>
|
30 |
-
</div>
|
31 |
-
</div>
|
32 |
-
<div class="tenweb_subscribe-top-footer">
|
33 |
-
<?php _e( "We will not sell, share, or distribute your personal information to third parties.", $wd_options->prefix ); ?>
|
34 |
-
</div>
|
35 |
-
<div class="tenweb_subscribe-footer">
|
36 |
-
<ul class="tenweb_footer-menu tenweb_clear">
|
37 |
-
<li>
|
38 |
-
<a href="https://10web.io/privacy-policy/" target="_blank">
|
39 |
-
<?php _e( "Privacy Policy", $wd_options->prefix ); ?>
|
40 |
-
</a>
|
41 |
-
</li>
|
42 |
-
<li>| </li>
|
43 |
-
<li>
|
44 |
-
<a href="https://10web.io/terms-of-services/" target="_blank">
|
45 |
-
<?php _e( "Terms of Use", $wd_options->prefix ); ?>
|
46 |
-
</a>
|
47 |
-
</li>
|
48 |
-
</ul>
|
49 |
-
</div>
|
50 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="tenweb_subscribe">
|
2 |
+
<div class="tenweb_subscribe-content">
|
3 |
+
<div class="texts">
|
4 |
+
<div class="hi_there"></div>
|
5 |
+
<h2><?php _e("Hi there!", $wd_options->prefix); ?></h2>
|
6 |
+
<h5><?php _e("Allow 10Web to collect some usage data", $wd_options->prefix); ?></h5>
|
7 |
+
<p>
|
8 |
+
<?php echo sprintf(__("This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix), $wd_options->plugin_title); ?>
|
9 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
</div>
|
11 |
+
<div class="permissions"><?php _e("What data is being collected?", $wd_options->prefix); ?></div>
|
12 |
+
<div class="list tenweb_clear">
|
13 |
+
<div class="list_item user_info">
|
14 |
+
<div class="list_logo"></div>
|
15 |
+
<div class="list_text_wrap"> <?php _e("Your name & Email address", $wd_options->prefix); ?></div>
|
16 |
+
</div>
|
17 |
+
<div class="list_item wp_info">
|
18 |
+
<div class="list_logo"></div>
|
19 |
+
<div class="list_text_wrap"> <?php _e("Site URL, Wordpress version", $wd_options->prefix); ?></div>
|
20 |
+
</div>
|
21 |
+
<div class="list_item plugins_info">
|
22 |
+
<div class="list_logo"></div>
|
23 |
+
<div class="list_text_wrap"> <?php _e("List of plugins", $wd_options->prefix); ?></div>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
<div class="btns">
|
27 |
+
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=allow"; ?>" class="allow_and_continue button"><?php _e("Allow & Continue", $wd_options->prefix); ?></a>
|
28 |
+
<img src="<?php echo $wd_options->wd_url_img . '/loader.gif'; ?>" class="wd_loader">
|
29 |
+
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip"; ?>" class="skip more"><?php _e("Skip", $wd_options->prefix); ?></a>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<div class="tenweb_subscribe-top-footer">
|
33 |
+
<?php _e("We will not sell, share, or distribute your personal information to third parties.", $wd_options->prefix); ?>
|
34 |
+
</div>
|
35 |
+
<div class="tenweb_subscribe-footer">
|
36 |
+
<ul class="tenweb_footer-menu tenweb_clear">
|
37 |
+
<li>
|
38 |
+
<a href="https://10web.io/privacy-policy/" target="_blank">
|
39 |
+
<?php _e("Privacy Policy", $wd_options->prefix); ?>
|
40 |
+
</a>
|
41 |
+
</li>
|
42 |
+
<li>|</li>
|
43 |
+
<li>
|
44 |
+
<a href="https://10web.io/terms-of-services/" target="_blank">
|
45 |
+
<?php _e("Terms of Use", $wd_options->prefix); ?>
|
46 |
+
</a>
|
47 |
+
</li>
|
48 |
+
</ul>
|
49 |
+
</div>
|
50 |
+
</div>
|
wd/wd.php
CHANGED
@@ -1,161 +1,120 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Constants //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Variables //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public static $instance;
|
17 |
-
public $overview_instance;
|
18 |
-
public $subscribe_instance;
|
19 |
-
public $config;
|
20 |
-
private $version = "1.1.1";
|
21 |
-
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Constructor & Destructor //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function __construct() {
|
26 |
-
// Add menu for Overview page
|
27 |
-
add_action( 'admin_menu', array( $this, 'wd_overview_menu_page' ), 10 );
|
28 |
-
|
29 |
-
}
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
-
// Public Methods //
|
32 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
-
|
34 |
-
// Init plugin data
|
35 |
-
public function wd_init( $options ) {
|
36 |
-
|
37 |
-
if(!is_array($options)){
|
38 |
-
return false;
|
39 |
-
}
|
40 |
-
$config = new TenWebNewLibConfig();
|
41 |
-
$config->set_options( $options );
|
42 |
-
$this->config = $config;
|
43 |
-
if( !class_exists("TenWebNewLibApi") ){
|
44 |
-
$this->wd_includes();
|
45 |
-
}
|
46 |
-
|
47 |
-
$this->init_classes();
|
48 |
-
$this->register_hooks();
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
// Create overview menu page
|
53 |
-
public function wd_overview_menu_page() {
|
54 |
-
$wd_options = $this->config;
|
55 |
-
|
56 |
-
$capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
|
57 |
-
if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
|
58 |
-
$parent_slug = $wd_options->custom_post;
|
59 |
-
}
|
60 |
-
else{
|
61 |
-
|
62 |
-
$subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
|
63 |
-
|
64 |
-
$subscribe_instance = new TenWebNewLibSubscribe($this->config);
|
65 |
-
$this->subscribe_instance = $subscribe_instance;
|
66 |
-
add_action( 'admin_print_styles-' . $subscribe_page, array( $subscribe_instance, 'subscribe_styles' ) );
|
67 |
-
add_action( 'admin_print_scripts-' . $subscribe_page, array( $subscribe_instance, 'subscribe_scripts' ) );
|
68 |
-
|
69 |
-
$parent_slug = null;
|
70 |
-
}
|
71 |
-
if ($wd_options->display_overview) {
|
72 |
-
$title = __( 'Premium', $wd_options->prefix );
|
73 |
-
if ( FALSE && !get_transient( $wd_options->prefix . '_overview_visited' ) ) {
|
74 |
-
$title .= ' <span class="update-plugins count-2" > <span class="plugin-count">1</span></span>';
|
75 |
-
}
|
76 |
-
$overview_page = add_submenu_page( $parent_slug, __( 'Premium', $wd_options->prefix ), '<span style="color:#4481ea;">' . $title . '</span>', $capability, 'overview_' . $wd_options->prefix, array( $this, 'display_overview_page' ) );
|
77 |
-
|
78 |
-
|
79 |
-
$overview_instance = new TenWebNewLibOverview( $this->config );
|
80 |
-
$this->overview_instance = $overview_instance;
|
81 |
-
add_action( 'admin_print_styles-' . $overview_page, array( $overview_instance, 'overview_styles' ) );
|
82 |
-
add_action( 'admin_print_scripts-' . $overview_page, array( $overview_instance, 'overview_scripts' ) );
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
public function display_subscribew_page(){
|
87 |
-
$this->subscribe_instance->subscribe_display_page();
|
88 |
-
}
|
89 |
-
|
90 |
-
// Display overview page
|
91 |
-
public function display_overview_page() {
|
92 |
-
$this->overview_instance->display_overview_page();
|
93 |
-
}
|
94 |
-
|
95 |
-
|
96 |
-
// Includs
|
97 |
-
public function wd_includes(){
|
98 |
-
$wd_options = $this->config;
|
99 |
-
|
100 |
-
require_once $wd_options->wd_dir_includes . '/deactivate.php' ;
|
101 |
-
// notices
|
102 |
-
require_once $wd_options->wd_dir_includes . '/api.php';
|
103 |
-
require_once $wd_options->wd_dir_includes . '/notices.php';
|
104 |
-
require_once $wd_options->wd_dir_includes . "/overview.php";
|
105 |
-
require_once $wd_options->wd_dir_includes . "/subscribe.php";
|
106 |
-
|
107 |
-
}
|
108 |
-
public function init_classes(){
|
109 |
-
$wd_options = $this->config;
|
110 |
-
|
111 |
-
$current_url = $_SERVER['REQUEST_URI'];
|
112 |
-
if( $wd_options->deactivate === true ){
|
113 |
-
if(strpos( $current_url, "plugins.php" ) !== false ){
|
114 |
-
new TenWebNewLibDeactivate( $this->config );
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
new TenWebNewLibNotices( $this->config );
|
119 |
-
|
120 |
-
}
|
121 |
-
|
122 |
-
public function register_hooks(){
|
123 |
-
$wd_options = $this->config;
|
124 |
-
if( $wd_options->deactivate === true ){
|
125 |
-
add_filter( 'plugin_action_links_' . plugin_basename( $wd_options->plugin_main_file ), array( $this, 'change_deactivation_link' ) );
|
126 |
-
}
|
127 |
-
|
128 |
-
}
|
129 |
-
|
130 |
-
|
131 |
-
public function change_deactivation_link ( $links ) {
|
132 |
-
$wd_options = $this->config;
|
133 |
-
$deactivate_url =
|
134 |
-
add_query_arg(
|
135 |
-
array(
|
136 |
-
'action' => 'deactivate',
|
137 |
-
'plugin' => plugin_basename( $wd_options->plugin_main_file ),
|
138 |
-
'_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
|
139 |
-
),
|
140 |
-
admin_url( 'plugins.php' )
|
141 |
-
);
|
142 |
-
|
143 |
-
$links["deactivate"] = '<a href="'.$deactivate_url.'" class="' . $wd_options->prefix . '_deactivate_link">Deactivate</a>';
|
144 |
-
return $links;
|
145 |
-
}
|
146 |
-
|
147 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
148 |
-
// Getters & Setters //
|
149 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
150 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
151 |
-
// Private Methods //
|
152 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
153 |
-
|
154 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
155 |
-
// Listeners //
|
156 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
157 |
-
|
158 |
}
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
class TenWebLibNew {
|
7 |
+
public static $instance;
|
8 |
+
public $overview_instance;
|
9 |
+
public $subscribe_instance;
|
10 |
+
public $config;
|
11 |
+
private $version = "1.1.1";
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
// Add menu for Overview page
|
15 |
+
add_action('admin_menu', array( $this, 'wd_overview_menu_page' ), 10);
|
16 |
+
}
|
17 |
+
|
18 |
+
public function wd_init( $options ) {
|
19 |
+
|
20 |
+
if ( !is_array($options) ) {
|
21 |
+
return FALSE;
|
22 |
}
|
23 |
+
$config = new TenWebNewLibConfig();
|
24 |
+
$config->set_options($options);
|
25 |
+
$this->config = $config;
|
26 |
+
if ( !class_exists("TenWebNewLibApi") ) {
|
27 |
+
$this->wd_includes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
+
$this->init_classes();
|
30 |
+
$this->register_hooks();
|
31 |
+
}
|
32 |
+
|
33 |
+
// Create overview menu page
|
34 |
+
public function wd_overview_menu_page() {
|
35 |
+
$wd_options = $this->config;
|
36 |
+
$capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
|
37 |
+
if ( get_option($wd_options->prefix . "_subscribe_done") == 1 || $wd_options->subscribe === FALSE ) {
|
38 |
+
$parent_slug = $wd_options->custom_post;
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
|
42 |
+
$subscribe_page = add_menu_page($wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe', array(
|
43 |
+
$this,
|
44 |
+
'display_subscribew_page',
|
45 |
+
), $wd_options->plugin_menu_icon, $wd_options->menu_position);
|
46 |
+
$subscribe_instance = new TenWebNewLibSubscribe($this->config);
|
47 |
+
$this->subscribe_instance = $subscribe_instance;
|
48 |
+
add_action('admin_print_styles-' . $subscribe_page, array( $subscribe_instance, 'subscribe_styles' ));
|
49 |
+
add_action('admin_print_scripts-' . $subscribe_page, array( $subscribe_instance, 'subscribe_scripts' ));
|
50 |
+
$parent_slug = NULL;
|
51 |
+
}
|
52 |
+
if ( $wd_options->display_overview ) {
|
53 |
+
$title = __('Premium', $wd_options->prefix);
|
54 |
+
if ( FALSE && !get_transient($wd_options->prefix . '_overview_visited') ) {
|
55 |
+
$title .= ' <span class="update-plugins count-2" > <span class="plugin-count">1</span></span>';
|
56 |
+
}
|
57 |
+
$overview_page = add_submenu_page($parent_slug, __('Premium', $wd_options->prefix), '<span style="color:#4481ea;">' . $title . '</span>', $capability, 'overview_' . $wd_options->prefix, array(
|
58 |
+
$this,
|
59 |
+
'display_overview_page',
|
60 |
+
));
|
61 |
+
$overview_instance = new TenWebNewLibOverview($this->config);
|
62 |
+
$this->overview_instance = $overview_instance;
|
63 |
+
add_action('admin_print_styles-' . $overview_page, array( $overview_instance, 'overview_styles' ));
|
64 |
+
add_action('admin_print_scripts-' . $overview_page, array( $overview_instance, 'overview_scripts' ));
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
public function display_subscribew_page() {
|
69 |
+
$this->subscribe_instance->subscribe_display_page();
|
70 |
+
}
|
71 |
+
|
72 |
+
// Display overview page
|
73 |
+
public function display_overview_page() {
|
74 |
+
$this->overview_instance->display_overview_page();
|
75 |
+
}
|
76 |
+
|
77 |
+
// Includs
|
78 |
+
public function wd_includes() {
|
79 |
+
$wd_options = $this->config;
|
80 |
+
require_once $wd_options->wd_dir_includes . '/deactivate.php';
|
81 |
+
// notices
|
82 |
+
require_once $wd_options->wd_dir_includes . '/api.php';
|
83 |
+
require_once $wd_options->wd_dir_includes . '/notices.php';
|
84 |
+
require_once $wd_options->wd_dir_includes . "/overview.php";
|
85 |
+
require_once $wd_options->wd_dir_includes . "/subscribe.php";
|
86 |
+
}
|
87 |
+
|
88 |
+
public function init_classes() {
|
89 |
+
$wd_options = $this->config;
|
90 |
+
$current_url = $_SERVER['REQUEST_URI'];
|
91 |
+
if ( $wd_options->deactivate === TRUE ) {
|
92 |
+
if ( strpos($current_url, "plugins.php") !== FALSE ) {
|
93 |
+
new TenWebNewLibDeactivate($this->config);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
new TenWebNewLibNotices($this->config);
|
97 |
+
}
|
98 |
+
|
99 |
+
public function register_hooks() {
|
100 |
+
$wd_options = $this->config;
|
101 |
+
if ( $wd_options->deactivate === TRUE ) {
|
102 |
+
add_filter('plugin_action_links_' . plugin_basename($wd_options->plugin_main_file), array(
|
103 |
+
$this,
|
104 |
+
'change_deactivation_link',
|
105 |
+
));
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
public function change_deactivation_link( $links ) {
|
110 |
+
$wd_options = $this->config;
|
111 |
+
$deactivate_url = add_query_arg(array(
|
112 |
+
'action' => 'deactivate',
|
113 |
+
'plugin' => plugin_basename($wd_options->plugin_main_file),
|
114 |
+
'_wpnonce' => wp_create_nonce('deactivate-plugin_' . plugin_basename($wd_options->plugin_main_file)),
|
115 |
+
), admin_url('plugins.php'));
|
116 |
+
$links["deactivate"] = '<a href="' . $deactivate_url . '" class="' . $wd_options->prefix . '_deactivate_link">Deactivate</a>';
|
117 |
+
|
118 |
+
return $links;
|
119 |
+
}
|
120 |
+
}
|