Photo Gallery by WD – Responsive Photo Gallery - Version 1.4.0

Version Description

  • Improved: User interface admin pages.
  • Changed: Thumbnail view and lightbox default styles.
  • Improved: Filemanager.
  • Fixed: Big thumbnail responsiveness.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.4.0
Comparing to
See all releases

Code changes from version 1.3.69 to 1.4.0

Files changed (61) hide show
  1. addons/addons.php +18 -23
  2. admin/controllers/AddTags.php +72 -0
  3. admin/controllers/Albums.php +328 -0
  4. admin/controllers/Albumsgalleries.php +71 -0
  5. admin/controllers/BWGControllerAlbums_bwg.php +0 -398
  6. admin/controllers/BWGControllerBWGShortcode.php +0 -52
  7. admin/controllers/BWGControllerEditThumb.php +0 -45
  8. admin/controllers/BWGControllerGalleries_bwg.php +0 -939
  9. admin/controllers/BWGControllerLicensing_bwg.php +0 -57
  10. admin/controllers/BWGControllerOptions_bwg.php +0 -193
  11. admin/controllers/BWGControllerTags_bwg.php +0 -278
  12. admin/controllers/BWGControllerThemes_bwg.php +0 -1102
  13. admin/controllers/BWGControllerUninstall_bwg.php +0 -50
  14. admin/controllers/BWGControllerWidget.php +0 -45
  15. admin/controllers/BWGControllerWidgetSlideshow.php +0 -44
  16. admin/controllers/BWGControllerWidgetTags.php +0 -47
  17. admin/controllers/Editimage.php +33 -0
  18. admin/controllers/Galleries.php +494 -0
  19. admin/controllers/Licensing.php +26 -0
  20. admin/controllers/Options.php +271 -0
  21. admin/controllers/Shortcode.php +96 -0
  22. admin/controllers/Themes.php +353 -0
  23. admin/controllers/Uninstall.php +91 -0
  24. admin/controllers/Widget.php +90 -0
  25. admin/controllers/WidgetSlideshow.php +108 -0
  26. admin/controllers/WidgetTags.php +93 -0
  27. admin/models/AddTags.php +62 -0
  28. admin/models/Albums.php +461 -0
  29. admin/models/Albumsgalleries.php +43 -0
  30. admin/models/BWGModelAddAlbumsGalleries.php +0 -71
  31. admin/models/BWGModelAddTags.php +0 -46
  32. admin/models/BWGModelAlbums_bwg.php +0 -123
  33. admin/models/BWGModelEditThumb.php +0 -36
  34. admin/models/BWGModelGalleries_bwg.php +0 -171
  35. admin/models/BWGModelOptions_bwg.php +0 -4
  36. admin/models/BWGModelTags_bwg.php +0 -85
  37. admin/models/BWGModelThemes_bwg.php +0 -585
  38. admin/models/BWGModelUninstall_bwg.php +0 -54
  39. admin/models/BWGModelWidget.php +0 -52
  40. admin/models/BWGModelWidgetTags.php +0 -52
  41. admin/models/Editimage.php +13 -0
  42. admin/models/Galleries.php +1060 -0
  43. admin/models/{BWGModelLicensing_bwg.php → Licensing.php} +0 -0
  44. admin/models/Options.php +20 -0
  45. admin/models/{BWGModelBWGShortcode.php → Shortcode.php} +2 -3
  46. admin/models/Themes.php +727 -0
  47. admin/models/Uninstall.php +79 -0
  48. admin/models/Widget.php +36 -0
  49. admin/views/AddTags.php +118 -0
  50. admin/views/AdminView.php +341 -0
  51. admin/views/Albums.php +377 -0
  52. admin/views/Albumsgalleries.php +150 -0
  53. admin/views/BWGViewAddAlbumsGalleries.php +0 -135
  54. admin/views/BWGViewAddTags.php +0 -99
  55. admin/views/BWGViewAlbums_bwg.php +0 -380
  56. admin/views/BWGViewBWGShortcode.php +0 -2131
  57. admin/views/BWGViewGalleries_bwg.php +0 -1041
  58. admin/views/BWGViewLicensing_bwg.php +0 -110
  59. admin/views/BWGViewOptions_bwg.php +0 -1817
  60. admin/views/BWGViewTags_bwg.php +0 -168
  61. admin/views/BWGViewThemes_bwg.php +0 -1155
addons/addons.php CHANGED
@@ -1,46 +1,41 @@
1
  <?php
2
  function bwg_addons_display() {
 
3
  $addons = array(
4
  'photo-gallery-ecomerce' => array(
5
- 'name' => __('Photo Gallery Ecommerce', 'bwg'),
6
  'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/gallery-ecommerce.html',
7
- 'description' => __('Using Photo Gallery Ecommerce you can sell images included in galleries either as digital downloads or products/prints via Paypal or Stripe.', 'bwg'),
8
  'icon' => '',
9
- 'image' => WD_BWG_URL . '/addons/images/ecommerce.png',
10
- ),
11
  'photo-gallery-facebook' => array(
12
- 'name' => __('Photo Gallery Facebook', 'bwg'),
13
  'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/facebook.html',
14
- 'description' => __('Photo Gallery Facebook is an add-on, which helps to display Facebook photos and videos within Photo Gallery plugin. You can create Facebook-only galleries, embed individual images and videos or include Facebook albums within mixed type albums.', 'bwg'),
15
  'icon' => '',
16
- 'image' => WD_BWG_URL . '/addons/images/facebook.png',
17
  ),
18
  'ngitopg' => array(
19
- 'name' => __('NextGen Gallery Import to Photo Gallery', 'bwg'),
20
  'url' => 'https://wordpress.org/plugins/import-to-photo-gallery-from-nextgen-gallery/',
21
- 'description' => __('This addon integrates NextGen with Photo Gallery allowing to import images and related data from NextGen to use with Photo Gallery', 'bwg'),
22
  'icon' => '',
23
- 'image' => WD_BWG_URL . '/addons/images/nextgen_gallery.png',
24
  ),
25
  'photo-gallery-export' => array(
26
- 'name' => __('Photo Gallery Export / Import', 'bwg'),
27
  'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/export-import.html',
28
- 'description' => __('Photo Gallery Export/Import helps to move created galleries and albums from one site to another. This way you can save the gallery/album options and manual modifications.', 'bwg'),
29
  'icon' => '',
30
- 'image' => WD_BWG_URL . '/addons/images/import_export.png',
31
- ),
32
  );
33
  ?>
34
  <div class="wrap">
35
  <div id="settings">
36
  <div id="settings-content" >
37
- <h2 id="add_on_title"><?php _e('Photo Gallery Add-ons', 'bwg'); ?></h2>
38
- <div>
39
- <p>
40
- <span style="color: #ba281e; font-size: 20px;"><?php _e('Attention', 'bwg'); ?>:</span>
41
- <?php _e('Add-ons are supported by premium version of Photo Gallery', 'bwg'); ?>
42
- </p>
43
- </div>
44
  <?php
45
  if ($addons) {
46
  foreach ($addons as $name => $addon) {
@@ -73,13 +68,13 @@ function bwg_addons_display() {
73
  <?php
74
  if ($addon['url'] !== '#') {
75
  ?>
76
- <a href="<?php echo $addon['url']; ?>" target="_blank" class="addon"><span><?php _e('GET THIS ADD ON', 'bwg'); ?></span></a>
77
  <?php
78
  }
79
  else {
80
  ?>
81
  <div class="ecwd_coming_soon">
82
- <img src="<?php echo WD_BWG_URL . '/addons/images/coming_soon.png'; ?>" />
83
  </div>
84
  <?php
85
  }
1
  <?php
2
  function bwg_addons_display() {
3
+ wp_enqueue_style(BWG()->prefix . '_addons');
4
  $addons = array(
5
  'photo-gallery-ecomerce' => array(
6
+ 'name' => __('Photo Gallery Ecommerce', BWG()->prefix),
7
  'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/gallery-ecommerce.html',
8
+ 'description' => __('Using Photo Gallery Ecommerce you can sell images included in galleries either as digital downloads or products/prints via Paypal or Stripe.', BWG()->prefix),
9
  'icon' => '',
10
+ 'image' => BWG()->plugin_url . '/addons/images/ecommerce.png',
11
+ ),
12
  'photo-gallery-facebook' => array(
13
+ 'name' => __('Photo Gallery Facebook', BWG()->prefix),
14
  'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/facebook.html',
15
+ 'description' => __('Photo Gallery Facebook is an add-on, which helps to display Facebook photos and videos within Photo Gallery plugin. You can create Facebook-only galleries, embed individual images and videos or include Facebook albums within mixed type albums.', BWG()->prefix),
16
  'icon' => '',
17
+ 'image' => BWG()->plugin_url . '/addons/images/facebook.png',
18
  ),
19
  'ngitopg' => array(
20
+ 'name' => __('NextGen Gallery Import to Photo Gallery', BWG()->prefix),
21
  'url' => 'https://wordpress.org/plugins/import-to-photo-gallery-from-nextgen-gallery/',
22
+ 'description' => __('This addon integrates NextGen with Photo Gallery allowing to import images and related data from NextGen to use with Photo Gallery', BWG()->prefix),
23
  'icon' => '',
24
+ 'image' => BWG()->plugin_url . '/addons/images/nextgen_gallery.png',
25
  ),
26
  'photo-gallery-export' => array(
27
+ 'name' => __('Photo Gallery Export / Import', BWG()->prefix),
28
  'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/export-import.html',
29
+ 'description' => __('Photo Gallery Export/Import helps to move created galleries and gallery groups from one site to another. This way you can save the gallery/album options and manual modifications.', BWG()->prefix),
30
  'icon' => '',
31
+ 'image' => BWG()->plugin_url . '/addons/images/import_export.png',
32
+ ),
33
  );
34
  ?>
35
  <div class="wrap">
36
  <div id="settings">
37
  <div id="settings-content" >
38
+ <h2 id="add_on_title"><?php _e('Photo Gallery Add-ons', BWG()->prefix); ?></h2>
 
 
 
 
 
 
39
  <?php
40
  if ($addons) {
41
  foreach ($addons as $name => $addon) {
68
  <?php
69
  if ($addon['url'] !== '#') {
70
  ?>
71
+ <a href="<?php echo $addon['url']; ?>" target="_blank" class="addon"><span><?php _e('GET THIS ADD ON', BWG()->prefix); ?></span></a>
72
  <?php
73
  }
74
  else {
75
  ?>
76
  <div class="ecwd_coming_soon">
77
+ <img src="<?php echo BWG()->plugin_url . '/addons/images/coming_soon.png'; ?>" />
78
  </div>
79
  <?php
80
  }
admin/controllers/AddTags.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AddTagsController_bwg
5
+ */
6
+ class AddTagsController_bwg {
7
+ /**
8
+ * @var $model
9
+ */
10
+ private $model;
11
+ /**
12
+ * @var $view
13
+ */
14
+ private $view;
15
+ /**
16
+ * @var string $page
17
+ */
18
+ private $page;
19
+ /**
20
+ * @var int $items_per_page
21
+ */
22
+ private $items_per_page = 20;
23
+
24
+ public function __construct() {
25
+ $this->model = new AddTagsModel_bwg();
26
+ $this->view = new AddTagsView_bwg();
27
+ $this->page = WDWLibrary::get('page');
28
+ }
29
+
30
+ /**
31
+ * Execute.
32
+ */
33
+ public function execute() {
34
+ $task = WDWLibrary::get('task');
35
+ if ( method_exists($this, $task) ) {
36
+ if ( $task != 'display' ) {
37
+ check_admin_referer(BWG()->nonce, BWG()->nonce);
38
+ }
39
+ $this->$task();
40
+ }
41
+ else {
42
+ $this->display();
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Display.
48
+ */
49
+ public function display() {
50
+ // Set params for view.
51
+ $params = array();
52
+ $params['page'] = $this->page;
53
+ $params['page_title'] = __('Tags', BWG()->prefix);
54
+ $params['order'] = WDWLibrary::get('order', 'asc');
55
+ $params['orderby'] = WDWLibrary::get('orderby', 'name');
56
+ // To prevent SQL injections.
57
+ $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
58
+ if ( !in_array($params['orderby'], array( 'name', 'slug' )) ) {
59
+ $params['orderby'] = 'id';
60
+ }
61
+ $params['items_per_page'] = $this->items_per_page;
62
+ $page = (int) WDWLibrary::get('paged', 1);
63
+ $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
64
+ $params['page_num'] = $page_num;
65
+ $params['search'] = WDWLibrary::get('s', '');
66
+
67
+ $params['total'] = $this->model->total($params);
68
+ $params['rows'] = $this->model->get_rows_data($params);
69
+
70
+ $this->view->display($params);
71
+ }
72
+ }
admin/controllers/Albums.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AlbumsController_bwg
5
+ */
6
+ class AlbumsController_bwg {
7
+ /**
8
+ * @var $model
9
+ */
10
+ private $model;
11
+ /**
12
+ * @var $view
13
+ */
14
+ private $view;
15
+ /**
16
+ * @var string $page
17
+ */
18
+ private $page;
19
+ /**
20
+ * @var string $bulk_action_name
21
+ */
22
+ private $bulk_action_name;
23
+ /**
24
+ * @var int $items_per_page
25
+ */
26
+ private $items_per_page = 20;
27
+ /**
28
+ * @var array $actions
29
+ */
30
+ private $actions = array();
31
+
32
+ public function __construct() {
33
+ $this->model = new AlbumsModel_bwg();
34
+ $this->view = new AlbumsView_bwg();
35
+ $this->page = WDWLibrary::get('page');
36
+ $this->actions = array(
37
+ 'publish' => array(
38
+ 'title' => __('Publish', BWG()->prefix),
39
+ $this->bulk_action_name => __('published', BWG()->prefix),
40
+ ),
41
+ 'unpublish' => array(
42
+ 'title' => __('Unpublish', BWG()->prefix),
43
+ $this->bulk_action_name => __('unpublished', BWG()->prefix),
44
+ ),
45
+ 'duplicate' => array(
46
+ 'title' => __('Duplicate', BWG()->prefix),
47
+ $this->bulk_action_name => __('duplicate', BWG()->prefix),
48
+ ),
49
+ 'delete' => array(
50
+ 'title' => __('Delete', BWG()->prefix),
51
+ $this->bulk_action_name => __('deleted', BWG()->prefix),
52
+ ),
53
+ );
54
+ $user = get_current_user_id();
55
+ $screen = get_current_screen();
56
+ $option = $screen->get_option('per_page', 'option');
57
+ $this->items_per_page = get_user_meta($user, $option, TRUE);
58
+ if (empty ($this->items_per_page) || $this->items_per_page < 1) {
59
+ $this->items_per_page = $screen->get_option('per_page', 'default');
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Execute.
65
+ */
66
+ public function execute() {
67
+ $task = WDWLibrary::get('task');
68
+ $id = (int)WDWLibrary::get('current_id', 0);
69
+ if (method_exists($this, $task)) {
70
+ if ($task != 'edit' && $task != 'display') {
71
+ check_admin_referer(BWG()->nonce, BWG()->nonce);
72
+ }
73
+ $action = WDWLibrary::get('bulk_action', -1);
74
+ if ($action != -1) {
75
+ $this->bulk_action($action);
76
+ }
77
+ else {
78
+ $this->$task($id);
79
+ }
80
+ }
81
+ else {
82
+ $this->display();
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Display.
88
+ */
89
+ public function display() {
90
+ // Set params for view.
91
+ $params = array();
92
+ $params['page'] = $this->page;
93
+ $params['page_title'] = __('Gallery Groups', BWG()->prefix);
94
+ $params['actions'] = $this->actions;
95
+ $params['order'] = WDWLibrary::get('order', 'asc');
96
+ $params['orderby'] = WDWLibrary::get('orderby', 'name');
97
+ // To prevent SQL injections.
98
+ $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
99
+ if (!in_array($params['orderby'], array('name', 'author'))) {
100
+ $params['orderby'] = 'id';
101
+ }
102
+ $params['items_per_page'] = $this->items_per_page;
103
+ $page = (int)WDWLibrary::get('paged', 1);
104
+ $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
105
+ $params['page_num'] = $page_num;
106
+ $params['search'] = WDWLibrary::get('s', '');
107
+
108
+ $params['total'] = $this->model->total($params);
109
+ $params['rows'] = $this->model->get_rows_data($params);
110
+
111
+ $url_arg = array();
112
+ $page_url = add_query_arg(array(
113
+ 'page' => $this->page,
114
+ BWG()->nonce => wp_create_nonce(BWG()->nonce),
115
+ ), admin_url('admin.php'));
116
+
117
+ $page_url = add_query_arg($url_arg, $page_url);
118
+ $params['page_url'] = $page_url;
119
+
120
+ $this->view->display($params);
121
+ }
122
+
123
+ /**
124
+ * Bulk actions.
125
+ *
126
+ * @param $task
127
+ */
128
+ public function bulk_action($task) {
129
+ $message = 0;
130
+ $successfully_updated = 0;
131
+ $url_arg = array('page' => $this->page, 'task' => 'display');
132
+
133
+ $check = WDWLibrary::get('check', '');
134
+ $all = WDWLibrary::get('check_all_items', '');
135
+ $all = ($all == 'on' ? TRUE : FALSE);
136
+
137
+ if (method_exists($this, $task)) {
138
+ if ($all) {
139
+ $message = $this->$task(0, TRUE, TRUE);
140
+ $url_arg['message'] = $message;
141
+ }
142
+ else {
143
+ if ($check) {
144
+ foreach ($check as $form_id => $item) {
145
+ $message = $this->$task($form_id, TRUE);
146
+ if ($message != 2) {
147
+ // Increase successfully updated items count, if action doesn't failed.
148
+ $successfully_updated++;
149
+ }
150
+ }
151
+ }
152
+ if ($successfully_updated) {
153
+ $bulk_action = $this->bulk_action_name;
154
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, BWG()->prefix), $successfully_updated, $this->actions[$task][$bulk_action]);
155
+ }
156
+ $key = ($message === 2 ? 'message' : 'msg');
157
+ $url_arg[$key] = $message;
158
+ }
159
+ }
160
+
161
+ WDWLibrary::redirect(add_query_arg($url_arg, admin_url('admin.php')));
162
+ }
163
+
164
+ /**
165
+ * Add/Edit.
166
+ *
167
+ * @param int $id
168
+ */
169
+ public function edit( $id = 0 ) {
170
+ $row = $this->model->get_row_data($id);
171
+ if ($id && empty($row->slug)) {
172
+ WDWLibrary::redirect(add_query_arg(array(
173
+ 'page' => $this->page,
174
+ 'task' => 'display',
175
+ ), admin_url('admin.php')));
176
+ }
177
+ // Set params for view.
178
+ $params = array();
179
+ $params['id'] = $id;
180
+ $params['row'] = $row;
181
+ $params['form_action'] = add_query_arg(array(
182
+ 'page' => $this->page,
183
+ 'current_id' => $id,
184
+ BWG()->nonce => wp_create_nonce($this->page),
185
+ ), admin_url('admin.php'));
186
+ $params['add_albums_galleries_action'] = add_query_arg(array(
187
+ 'action' => 'albumsgalleries_' . BWG()->prefix,
188
+ 'album_id' => $id,
189
+ 'width' => '785',
190
+ 'height' => '550',
191
+ BWG()->nonce => wp_create_nonce('albumsgalleries_' . BWG()->prefix),
192
+ 'TB_iframe' => '1'
193
+ ), admin_url('admin-ajax.php'));
194
+
195
+ $params['add_preview_image_action'] = add_query_arg(array(
196
+ 'action' => 'addImages',
197
+ 'width' => '800',
198
+ 'height' => '550',
199
+ 'extensions' => 'jpg,jpeg,png,gif',
200
+ 'callback' => 'bwg_add_preview_image',
201
+ BWG()->nonce => wp_create_nonce('addImages'),
202
+ 'TB_iframe' => '1',
203
+ ), admin_url('admin-ajax.php'));
204
+ $params['preview_action'] = WDWLibrary::get_custom_post_permalink(array(
205
+ 'slug' => $row->slug,
206
+ 'post_type' => 'album',
207
+ ));
208
+ $params['shortcode_id'] = WDWLibrary::get_shortcode_id(array('slug' => $row->slug, 'post_type' => 'album'));
209
+ $params['albums_galleries'] = $this->model->get_albums_galleries_data($id);
210
+
211
+ $this->view->edit($params);
212
+ }
213
+
214
+ /**
215
+ * Save.
216
+ *
217
+ * @param int $id
218
+ */
219
+ public function save( $id ) {
220
+ $save = $this->model->save($id);
221
+ WDWLibrary::redirect(add_query_arg(array(
222
+ 'page' => $this->page,
223
+ 'task' => 'edit',
224
+ 'current_id' => $save['current_id'],
225
+ 'message' => $save['message_id'],
226
+ ), admin_url('admin.php')));
227
+ }
228
+
229
+ /**
230
+ * Delete form by id.
231
+ *
232
+ * @param $id
233
+ * @param bool $bulk
234
+ * @param bool $all
235
+ *
236
+ * @return int
237
+ */
238
+ public function delete( $id, $bulk = FALSE, $all = FALSE ) {
239
+ $message = $this->model->delete($id, $all);
240
+ if ($bulk) {
241
+ return $message;
242
+ }
243
+ WDWLibrary::redirect(add_query_arg(array(
244
+ 'page' => $this->page,
245
+ 'task' => 'display',
246
+ 'message' => $message,
247
+ ), admin_url('admin.php')));
248
+ }
249
+
250
+ /**
251
+ * Publish.
252
+ *
253
+ * @param $id
254
+ * @param bool $bulk
255
+ * @param bool $all
256
+ *
257
+ * @return int
258
+ */
259
+ public function publish( $id, $bulk = FALSE, $all = FALSE ) {
260
+ global $wpdb;
261
+ $where = ($all ? '' : ' WHERE id=' . $id);
262
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_album` SET published=1' . $where);
263
+ $message = 2;
264
+ if ($updated) {
265
+ $message = 9;
266
+ }
267
+ if ($bulk) {
268
+ return $message;
269
+ }
270
+ else {
271
+ WDWLibrary::redirect(add_query_arg(array(
272
+ 'page' => $this->page,
273
+ 'task' => 'display',
274
+ 'message' => $message,
275
+ ), admin_url('admin.php')));
276
+ }
277
+ }
278
+
279
+ /**
280
+ * Unpublish.
281
+ *
282
+ * @param $id
283
+ * @param bool $bulk
284
+ * @param bool $all
285
+ *
286
+ * @return int
287
+ */
288
+ public function unpublish( $id, $bulk = FALSE, $all = FALSE ) {
289
+ global $wpdb;
290
+ $where = ($all ? '' : ' WHERE id=' . $id);
291
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_album` SET published=0' . $where);
292
+ $message = 2;
293
+ if ($updated) {
294
+ $message = 10;
295
+ }
296
+ if ($bulk) {
297
+ return $message;
298
+ }
299
+ else {
300
+ WDWLibrary::redirect(add_query_arg(array(
301
+ 'page' => $this->page,
302
+ 'task' => 'display',
303
+ 'message' => $message,
304
+ ), admin_url('admin.php')));
305
+ }
306
+ }
307
+
308
+ /**
309
+ * Duplicate by id.
310
+ *
311
+ * @param $id
312
+ * @param bool $bulk
313
+ * @param bool $all
314
+ *
315
+ * @return int
316
+ */
317
+ public function duplicate( $id, $bulk = FALSE, $all = FALSE ) {
318
+ $message_id = $this->model->duplicate($id, $all);
319
+ if ($bulk) {
320
+ return $message_id;
321
+ }
322
+ WDWLibrary::redirect(add_query_arg(array(
323
+ 'page' => $this->page,
324
+ 'task' => 'display',
325
+ 'message' => $message_id,
326
+ ), admin_url('admin.php')));
327
+ }
328
+ }
admin/controllers/Albumsgalleries.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AlbumsgalleriesController_bwg
5
+ */
6
+ class AlbumsgalleriesController_bwg {
7
+ /**
8
+ * @var $model
9
+ */
10
+ private $model;
11
+ /**
12
+ * @var $view
13
+ */
14
+ private $view;
15
+ /**
16
+ * @var string $page
17
+ */
18
+ private $page;
19
+ /**
20
+ * @var int $items_per_page
21
+ */
22
+ private $items_per_page = 20;
23
+
24
+ public function __construct() {
25
+ $this->model = new AlbumsgalleriesModel_bwg();
26
+ $this->view = new AlbumsgalleriesView_bwg();
27
+ }
28
+
29
+ /**
30
+ * Execute.
31
+ */
32
+ public function execute() {
33
+ $task = WDWLibrary::get('task');
34
+ if ( method_exists($this, $task) ) {
35
+ if ( $task != 'edit' && $task != 'display' ) {
36
+ check_admin_referer(BWG()->nonce, BWG()->nonce);
37
+ }
38
+ $this->$task();
39
+ }
40
+ else {
41
+ $this->display();
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Display.
47
+ */
48
+ public function display() {
49
+ $params = array();
50
+ $params['page_title'] = __('Galleries / Gallery groups', BWG()->prefix);
51
+ $params['page_url'] = $this->page;
52
+ $params['album_id'] = WDWLibrary::get('album_id', 0);
53
+ $params['order'] = WDWLibrary::get('order', 'asc');
54
+ $params['orderby'] = WDWLibrary::get('orderby', 'is_album');
55
+ // To prevent SQL injections.
56
+ $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
57
+ if ( !in_array($params['orderby'], array( 'name', 'slug' )) ) {
58
+ $params['orderby'] = 'is_album';
59
+ }
60
+ $params['items_per_page'] = $this->items_per_page;
61
+ $page = (int) WDWLibrary::get('paged', 1);
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);
68
+
69
+ $this->view->display($params);
70
+ }
71
+ }
admin/controllers/BWGControllerAlbums_bwg.php DELETED
@@ -1,398 +0,0 @@
1
- <?php
2
- class BWGControllerAlbums_bwg {
3
- public function __construct() {}
4
-
5
- public function execute() {
6
- $task = WDWLibrary::get('task');
7
- $id = WDWLibrary::get('current_id', 0);
8
- if ( $task != '' ) {
9
- if ( !WDWLibrary::verify_nonce('albums_bwg') ) {
10
- die('Sorry, your nonce did not verify.');
11
- }
12
- }
13
-
14
- $message = WDWLibrary::get('message');
15
- echo WDWLibrary::message_id($message);
16
- if (method_exists($this, $task)) {
17
- $this->$task($id);
18
- }
19
- else {
20
- $this->display();
21
- }
22
- }
23
-
24
- public function display() {
25
- require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
26
- $model = new BWGModelAlbums_bwg();
27
-
28
- require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
29
- $view = new BWGViewAlbums_bwg($model);
30
- $view->display();
31
- }
32
-
33
- public function add() {
34
- require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
35
- $model = new BWGModelAlbums_bwg();
36
-
37
- require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
38
- $view = new BWGViewAlbums_bwg($model);
39
- $view->edit(0);
40
- }
41
-
42
- public function edit() {
43
- require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
44
- $model = new BWGModelAlbums_bwg();
45
-
46
- require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
47
- $view = new BWGViewAlbums_bwg($model);
48
- $id = WDWLibrary::get('current_id', 0);
49
- $view->edit($id);
50
- }
51
-
52
- public function save() {
53
- $message = $this->save_db();
54
- $page = WDWLibrary::get('page');
55
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
56
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
57
- WDWLibrary::spider_redirect($query_url);
58
- }
59
-
60
- public function apply() {
61
- $message = $this->save_db();
62
- global $wpdb;
63
- $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
64
- $current_id = WDWLibrary::get('current_id', $id);
65
- $page = WDWLibrary::get('page');
66
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
67
- $query_url = add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message),$query_url);
68
- WDWLibrary::spider_redirect($query_url);
69
- }
70
-
71
- // Return random image from gallery or album for album preview.
72
- public function get_image_for_album($album_id) {
73
- global $wpdb;
74
- $preview_image = '';
75
- $gallery_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=0 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
76
- if ($gallery_row) {
77
- $preview_image = (($gallery_row->preview_image) ? $gallery_row->preview_image : $gallery_row->random_preview_image);
78
- }
79
- if (!$preview_image) {
80
- $album_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_album as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=1 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
81
- if ($album_row) {
82
- $preview_image = (($album_row->preview_image) ? $album_row->preview_image : $album_row->random_preview_image);
83
- }
84
- }
85
- return $preview_image;
86
- }
87
-
88
- public function bwg_get_unique_slug($slug, $id) {
89
- global $wpdb;
90
- $slug = sanitize_title($slug);
91
- if ($id != 0) {
92
- $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s AND id != %d", $slug, $id);
93
- }
94
- else {
95
- $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $slug);
96
- }
97
- if ($wpdb->get_var($query)) {
98
- $num = 2;
99
- do {
100
- $alt_slug = $slug . "-$num";
101
- $num++;
102
- $slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $alt_slug));
103
- } while ($slug_check);
104
- $slug = $alt_slug;
105
- }
106
- return $slug;
107
- }
108
-
109
- public function bwg_get_unique_name($name, $id) {
110
- global $wpdb;
111
- if ($id != 0) {
112
- $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s AND id != %d", $name, $id);
113
- }
114
- else {
115
- $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s", $name);
116
- }
117
- if ($wpdb->get_var($query)) {
118
- $num = 2;
119
- do {
120
- $alt_name = $name . "-$num";
121
- $num++;
122
- $slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s", $alt_name));
123
- } while ($slug_check);
124
- $name = $alt_name;
125
- }
126
- return $name;
127
- }
128
-
129
- public function save_db() {
130
- global $wpdb;
131
- $id = (int) WDWLibrary::get('current_id', 0);
132
- $name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
133
- $name = $this->bwg_get_unique_name($name, $id);
134
- $slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
135
- $slug = $this->bwg_get_unique_slug($slug, $id);
136
- $old_slug = WDWLibrary::get('old_slug');
137
- $description = (isset($_POST['description']) ? stripslashes($_POST['description']) : '');
138
- $preview_image = ((isset($_POST['preview_image']) && esc_html(stripslashes($_POST['preview_image'])) != '') ? esc_html(stripslashes($_POST['preview_image'])) : '');
139
- $author = get_current_user_id();
140
- $published = ((isset($_POST['published']) && esc_html(stripslashes($_POST['published'])) != '') ? esc_html(stripslashes($_POST['published'])) : '');
141
- $albums_galleries = (isset($_POST['albums_galleries']) ? esc_html(stripslashes($_POST['albums_galleries'])) : '');
142
- if ($id != 0) {
143
- $save = $wpdb->update($wpdb->prefix . 'bwg_album', array(
144
- 'name' => $name,
145
- 'slug' => $slug,
146
- 'description' => $description,
147
- 'preview_image' => $preview_image,
148
- 'published' => $published), array('id' => $id));
149
- }
150
- else {
151
- $save = $wpdb->insert($wpdb->prefix . 'bwg_album', array(
152
- 'name' => $name,
153
- 'slug' => $slug,
154
- 'description' => $description,
155
- 'preview_image' => $preview_image,
156
- 'random_preview_image' => '',
157
- 'order' => ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_album')) + 1,
158
- 'author' => $author,
159
- 'published' => $published
160
- ), array(
161
- '%s',
162
- '%s',
163
- '%s',
164
- '%s',
165
- '%s',
166
- '%d',
167
- '%d',
168
- '%d'
169
- ));
170
- $id = $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
171
- }
172
- // Create custom post (type is album).
173
- $custom_post_params = array(
174
- 'id' => $id,
175
- 'title' => $name,
176
- 'slug' => $slug,
177
- 'old_slug' => $old_slug,
178
- 'type' => array(
179
- 'post_type' => 'album',
180
- 'mode' => '',
181
- ),
182
- );
183
- WDWLibrary::bwg_create_custom_post($custom_post_params);
184
-
185
- $this->save_alb_gal($id, $albums_galleries);
186
- // Set random image.
187
- $random_preview_image = (($preview_image == '') ? $this->get_image_for_album($id) : '');
188
- $wpdb->update($wpdb->prefix . 'bwg_album', array('random_preview_image' => $random_preview_image), array('id' => $id));
189
- if ($save !== FALSE) {
190
- return 1;
191
- }
192
- else {
193
- return 2;
194
- }
195
- }
196
-
197
- public function save_alb_gal($id, $alb_gal_str) {
198
- global $wpdb;
199
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id);
200
- $wpdb->query($query);
201
- $alb_gals = explode(",", $alb_gal_str);
202
- for ($i = 0; $i < count($alb_gals); $i++) {
203
- $params = explode(":", $alb_gals[$i]);
204
- if (count($params) == 3) {
205
- $save = $wpdb->insert($wpdb->prefix . 'bwg_album_gallery', array(
206
- 'album_id' => $id,
207
- 'is_album' => $params[1],
208
- 'alb_gal_id' => $params[2],
209
- 'order' => $i+1
210
- ), array(
211
- '%d',
212
- '%d',
213
- '%d',
214
- '%d'
215
- ));
216
- }
217
- }
218
- }
219
-
220
- public function delete ($id) {
221
- global $wpdb;
222
- $message = 2;
223
- $row = $wpdb->get_row( $wpdb->prepare('SELECT id, slug FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $id) );
224
- if ( !empty($row) ) {
225
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $id);
226
- $query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $id, $id);
227
- if ($wpdb->query($query)) {
228
- $wpdb->query($query_gal);
229
- // Remove custom post (type by bwg_album).
230
- WDWLibrary::bwg_remove_custom_post( array( 'slug' => $row->slug, 'post_type' => 'bwg_album') );
231
- $message = 3;
232
- }
233
- }
234
- $page = WDWLibrary::get('page');
235
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
236
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
237
- WDWLibrary::spider_redirect($query_url);
238
- }
239
-
240
- public function delete_all() {
241
- $message_id = 6;
242
- $albumids = array();
243
- if ( !empty($_POST['ids_string']) ) {
244
- $ids = explode(',', $_POST['ids_string']);
245
- foreach ($ids as $id) {
246
- $keypost = 'check_' . $id;
247
- if ( !empty($_POST[$keypost]) ) {
248
- $albumids[] = $id;
249
- }
250
- }
251
- }
252
- if ( !empty($albumids) ) {
253
- global $wpdb;
254
- $albums = $wpdb->get_results('SELECT `id`, `slug` FROM ' . $wpdb->prefix . 'bwg_album WHERE `id` IN (' . implode(',', $albumids). ')');
255
- if ( !empty($albums) ) {
256
- $delete = false;
257
- foreach( $albums as $album ) {
258
- $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $album->id) );
259
- $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $album->id, $album->id) );
260
- // Remove custom post (type by bwg_album).
261
- WDWLibrary::bwg_remove_custom_post( array( 'slug' => $album->slug, 'post_type' => 'bwg_album') );
262
- $delete = true;
263
- }
264
- if ( $delete ) {
265
- $message_id = 5;
266
- }
267
- }
268
- }
269
- $page = WDWLibrary::get('page');
270
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
271
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message_id), $query_url);
272
- WDWLibrary::spider_redirect($query_url);
273
- }
274
-
275
- public function publish($id) {
276
- global $wpdb;
277
- $save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $id));
278
- if ($save !== FALSE) {
279
- $message = 9;
280
- }
281
- else {
282
- $message = 2;
283
- }
284
- $page = WDWLibrary::get('page');
285
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
286
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
287
- WDWLibrary::spider_redirect($query_url);
288
- }
289
-
290
- public function publish_all() {
291
- global $wpdb;
292
- $flag = FALSE;
293
- if (isset($_POST['check_all_items'])) {
294
- $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_album SET published=1');
295
- $flag = TRUE;
296
- }
297
- else {
298
- $alum_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
299
- foreach ($alum_ids_col as $album_id) {
300
- if (isset($_POST['check_' . $album_id])) {
301
- $flag = TRUE;
302
- $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $album_id));
303
- }
304
- }
305
- }
306
- if ($flag) {
307
- $message = 10;
308
- }
309
- else {
310
- $message = 6;
311
- }
312
- $page = WDWLibrary::get('page');
313
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
314
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
315
- WDWLibrary::spider_redirect($query_url);
316
- }
317
-
318
- public function unpublish($id) {
319
- global $wpdb;
320
- $save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $id));
321
- if ($save !== FALSE) {
322
- $message = 11;
323
- }
324
- else {
325
- $message = 2;
326
- }
327
- $page = WDWLibrary::get('page');
328
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
329
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
330
- WDWLibrary::spider_redirect($query_url);
331
- }
332
-
333
- public function unpublish_all() {
334
- global $wpdb;
335
- $flag = FALSE;
336
- if (isset($_POST['check_all_items'])) {
337
- $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_album SET published=0');
338
- $flag = TRUE;
339
- }
340
- else {
341
- $album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
342
- foreach ($album_ids_col as $album_id) {
343
- if (isset($_POST['check_' . $album_id])) {
344
- $flag = TRUE;
345
- $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $album_id));
346
- }
347
- }
348
- }
349
- if ($flag) {
350
- $message = 12;
351
- }
352
- else {
353
- $message = 6;
354
- }
355
- $page = WDWLibrary::get('page');
356
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
357
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
358
- WDWLibrary::spider_redirect($query_url);
359
- }
360
-
361
- public function save_order($flag = TRUE) {
362
- global $wpdb;
363
- $album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
364
- $message = 0;
365
- if ($album_ids_col) {
366
- foreach ($album_ids_col as $album_id) {
367
- if (isset($_POST['order_input_' . $album_id])) {
368
- $order_values[$album_id] = (int) $_POST['order_input_' . $album_id];
369
- }
370
- else {
371
- $order_values[$album_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_album WHERE `id`="%d"', $album_id));
372
- }
373
- }
374
- asort($order_values);
375
- $i = 1;
376
- foreach ($order_values as $key => $order_value) {
377
- $wpdb->update($wpdb->prefix . 'bwg_album', array('order' => $i), array('id' => $key));
378
- $i++;
379
- }
380
- if ($flag) {
381
- $message = 13;
382
- }
383
- }
384
- $page = WDWLibrary::get('page');
385
- $query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
386
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
387
- WDWLibrary::spider_redirect($query_url);
388
- }
389
- ////////////////////////////////////////////////////////////////////////////////////////
390
- // Getters & Setters //
391
- ////////////////////////////////////////////////////////////////////////////////////////
392
- ////////////////////////////////////////////////////////////////////////////////////////
393
- // Private Methods //
394
- ////////////////////////////////////////////////////////////////////////////////////////
395
- ////////////////////////////////////////////////////////////////////////////////////////
396
- // Listeners //
397
- ////////////////////////////////////////////////////////////////////////////////////////
398
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerBWGShortcode.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerBWGShortcode {
4
- public function __construct() {
5
- }
6
-
7
- public function execute() {
8
- $task = WDWLibrary::get('task');
9
- $from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
10
- if ( $task != '' && $from_menu ) {
11
- if ( !WDWLibrary::verify_nonce('BWGShortcode') ) {
12
- die('Sorry, your nonce did not verify.');
13
- }
14
- }
15
- if ( method_exists($this, $task) ) {
16
- $this->$task();
17
- }
18
- $this->display();
19
- }
20
-
21
- public function display() {
22
- require_once WD_BWG_DIR . "/admin/models/BWGModelBWGShortcode.php";
23
- $model = new BWGModelBWGShortcode();
24
-
25
- require_once WD_BWG_DIR . "/admin/views/BWGViewBWGShortcode.php";
26
- $view = new BWGViewBWGShortcode($model);
27
- $view->display();
28
- }
29
-
30
- public function save() {
31
- global $wpdb;
32
- $tagtext = ((isset($_POST['tagtext'])) ? stripslashes($_POST['tagtext']) : '');
33
- if ($tagtext) {
34
- $id = ((isset($_POST['currrent_id'])) ? (int) esc_html(stripslashes($_POST['currrent_id'])) : 0);
35
- $insert = ((isset($_POST['bwg_insert'])) ? (int) esc_html(stripslashes($_POST['bwg_insert'])) : 0);
36
- if (!$insert) {
37
- $wpdb->update($wpdb->prefix . 'bwg_shortcode', array(
38
- 'tagtext' => $tagtext
39
- ), array('id' => $id));
40
- }
41
- else {
42
- $wpdb->insert($wpdb->prefix . 'bwg_shortcode', array(
43
- 'id' => $id,
44
- 'tagtext' => $tagtext
45
- ), array(
46
- '%d',
47
- '%s'
48
- ));
49
- }
50
- }
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerEditThumb.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerEditThumb {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $type = (isset($_GET['type']) ? esc_html($_GET['type']) : 'display');
23
- $edit_type = (isset($_GET['edit_type']) ? esc_html($_GET['edit_type']) : '');
24
- $image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : 0);
25
- $this->display($type);
26
- }
27
-
28
- public function display($type) {
29
- require_once WD_BWG_DIR . "/admin/models/BWGModelEditThumb.php";
30
- $model = new BWGModelEditThumb();
31
- require_once WD_BWG_DIR . "/admin/views/BWGViewEditThumb.php";
32
- $view = new BWGViewEditThumb($model);
33
- $view->$type();
34
- }
35
-
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- // Getters & Setters //
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- // Private Methods //
41
- ////////////////////////////////////////////////////////////////////////////////////////
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
- // Listeners //
44
- ////////////////////////////////////////////////////////////////////////////////////////
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerGalleries_bwg.php DELETED
@@ -1,939 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerGalleries_bwg {
4
- public function execute() {
5
- $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
6
- $id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
7
- if ($task != '') {
8
- if (!WDWLibrary::verify_nonce('galleries_bwg')) {
9
- die('Sorry, your nonce did not verify.');
10
- }
11
- }
12
-
13
- if (method_exists($this, $task)) {
14
- $this->$task($id);
15
- }
16
- else {
17
- $this->display();
18
- }
19
- }
20
-
21
- public function display() {
22
- require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
23
- $model = new BWGModelGalleries_bwg();
24
-
25
- require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
26
- $view = new BWGViewGalleries_bwg($model);
27
- $this->delete_unknown_images();
28
- $view->display();
29
- }
30
-
31
- public function add() {
32
- require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
33
- $model = new BWGModelGalleries_bwg();
34
-
35
- require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
36
- $view = new BWGViewGalleries_bwg($model);
37
- $view->edit(0);
38
- }
39
-
40
- public function edit() {
41
- require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
42
- $model = new BWGModelGalleries_bwg();
43
-
44
- require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
45
- $view = new BWGViewGalleries_bwg($model);
46
- $id = ((isset($_POST['current_id']) && esc_html(stripslashes($_POST['current_id'])) != '') ? esc_html(stripslashes($_POST['current_id'])) : 0);
47
- $view->edit($id);
48
- }
49
-
50
- public function save_order_images($gallery_id) {
51
- global $wpdb;
52
- $imageids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE `gallery_id`="%d"', $gallery_id));
53
- if ($imageids_col) {
54
- foreach ($imageids_col as $imageid) {
55
- if (isset($_POST['order_input_' . $imageid])) {
56
- $order_values[$imageid] = (int) $_POST['order_input_' . $imageid];
57
- }
58
- else {
59
- $order_values[$imageid] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_image WHERE `id`="%d"', $imageid));
60
- }
61
- }
62
- asort($order_values);
63
- $i = 1;
64
- foreach ($order_values as $key => $order_value) {
65
- $wpdb->update($wpdb->prefix . 'bwg_image', array('order' => $i), array('id' => $key));
66
- $i++;
67
- }
68
- }
69
- }
70
-
71
- public function ajax_search() {
72
- if (isset($_POST['ajax_task'])) {
73
- // Save gallery on "apply" and "save".
74
- $this->save_db();
75
- global $wpdb;
76
- if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
77
- // If gallery saved first time (insert in db).
78
- $_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
79
- }
80
- }
81
- $this->save_image_db();
82
- if (isset($_POST['check_all_items'])) {
83
- $tag_ids = (isset($_POST['added_tags_select_all']) ? esc_html(stripslashes($_POST['added_tags_select_all'])) : '');
84
- if ($tag_ids != '') {
85
- $this->save_tags_if_select_all($tag_ids);
86
- }
87
- }
88
- $this->save_order_images($_POST['current_id']);
89
- if (isset($_POST['ajax_task']) && esc_html($_POST['ajax_task']) != '') {
90
- $ajax_task = esc_html($_POST['ajax_task']);
91
- if (method_exists($this, $ajax_task)) {
92
- $this->$ajax_task();
93
- }
94
- }
95
- $this->edit();
96
- }
97
-
98
- public function save_tags_if_select_all($tag_ids) {
99
- global $wpdb;
100
- $gal_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
101
- $image_ids = (isset($_POST['ids_string']) ? esc_html(stripslashes($_POST['ids_string'])) : '');
102
- $current_page_image_ids = explode(',', $image_ids);
103
- $tag_ids_array = explode(',', $tag_ids);
104
- $query_image = $wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gal_id);
105
- $image_id_array = $wpdb->get_results($query_image);
106
- foreach ($image_id_array as $image_id) {
107
- $flag = FALSE;
108
- foreach ($current_page_image_ids as $current_page_image_id) {
109
- if ($current_page_image_id == $image_id->id) {
110
- $flag = TRUE;
111
- }
112
- }
113
- if ($flag) {
114
- continue;
115
- }
116
- foreach ($tag_ids_array as $tag_id) {
117
- if ($tag_id) {
118
- $exist_tag = $wpdb->get_var($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d" AND image_id="%d" AND gallery_id="%d"', $tag_id,$image_id->id, $gal_id));
119
- if ($exist_tag == NULL) {
120
- $save = $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
121
- 'tag_id' => $tag_id,
122
- 'image_id' => $image_id->id,
123
- 'gallery_id' => $gal_id,
124
- ), array(
125
- '%d',
126
- '%d',
127
- '%d',
128
- ));
129
- // Increase tag count in term_taxonomy table.
130
- $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
131
- }
132
- }
133
- }
134
- }
135
- }
136
-
137
- public function recover() {
138
- $id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
139
- global $wd_bwg_options;
140
- $thumb_width = $wd_bwg_options->upload_thumb_width;
141
- $width = $wd_bwg_options->upload_img_width;
142
- WDWLibrary::recover_image($id, $thumb_width, $width, 'gallery_page');
143
- }
144
-
145
- public function image_recover_all() {
146
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
147
- WDWLibrary::bwg_image_recover_all($gallery_id);
148
- }
149
-
150
- public function image_publish() {
151
- $id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
152
- global $wpdb;
153
- $save = $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 1), array('id' => $id));
154
- }
155
-
156
- public function image_publish_all() {
157
- global $wpdb;
158
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
159
- if (isset($_POST['check_all_items'])) {
160
- $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET published=1 WHERE gallery_id="%d"', $gallery_id));
161
- }
162
- else {
163
- $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
164
- foreach ($image_ids_col as $image_id) {
165
- if (isset($_POST['check_' . $image_id])) {
166
- $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 1), array('id' => $image_id));
167
- }
168
- }
169
- }
170
- }
171
-
172
- public function image_unpublish() {
173
- $id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
174
- global $wpdb;
175
- $save = $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 0), array('id' => $id));
176
- }
177
-
178
- public function image_unpublish_all() {
179
- global $wpdb;
180
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
181
- if (isset($_POST['check_all_items'])) {
182
- $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET published=0 WHERE gallery_id="%d"', $gallery_id));
183
- }
184
- else {
185
- $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
186
- foreach ($image_ids_col as $image_id) {
187
- if (isset($_POST['check_' . $image_id])) {
188
- $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 0), array('id' => $image_id));
189
- }
190
- }
191
- }
192
- }
193
-
194
- public function image_delete() {
195
- $id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
196
- global $wpdb;
197
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
198
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_comment WHERE image_id="%d"', $id));
199
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $id));
200
- $tag_ids = $wpdb->get_col($wpdb->prepare('SELECT tag_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $id));
201
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $id));
202
- // Increase tag count in term_taxonomy table.
203
- if ($tag_ids) {
204
- foreach ($tag_ids as $tag_id) {
205
- $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
206
- }
207
- }
208
- }
209
-
210
- public function image_delete_all() {
211
- global $wpdb;
212
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
213
- $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
214
- foreach ($image_ids_col as $image_id) {
215
- if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
216
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $image_id));
217
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_comment WHERE image_id="%d"', $image_id));
218
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $image_id));
219
- $tag_ids = $wpdb->get_col($wpdb->prepare('SELECT tag_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $image_id));
220
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $image_id));
221
- // Increase tag count in term_taxonomy table.
222
- if ($tag_ids) {
223
- foreach ($tag_ids as $tag_id) {
224
- $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
225
- }
226
- }
227
- }
228
- }
229
- }
230
-
231
- public function image_set_watermark() {
232
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
233
- WDWLibrary::bwg_image_set_watermark($gallery_id);
234
- }
235
-
236
- public function image_resize() {
237
- global $wpdb;
238
- global $WD_BWG_UPLOAD_DIR;
239
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
240
- $image_width = ((isset($_POST['image_width'])) ? esc_html(stripslashes($_POST['image_width'])) : 1600);
241
- $image_height = ((isset($_POST['image_height'])) ? esc_html(stripslashes($_POST['image_height'])) : 1200);
242
- $images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
243
- foreach ($images as $image) {
244
- if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
245
- $this->bwg_scaled_image(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $image_width, $image_height);
246
- }
247
- }
248
- }
249
-
250
- function bwg_scaled_image($file_path, $max_width = 0, $max_height = 0, $crop = FALSE) {
251
- $file_path = htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES);
252
- global $wd_bwg_options;
253
- if (!function_exists('getimagesize')) {
254
- error_log('Function not found: getimagesize');
255
- return FALSE;
256
- }
257
- list($img_width, $img_height, $type) = @getimagesize($file_path);
258
- if (!$img_width || !$img_height) {
259
- return FALSE;
260
- }
261
- $scale = min(
262
- $max_width / $img_width,
263
- $max_height / $img_height
264
- );
265
- @ini_set('memory_limit', '-1');
266
- if (($scale >= 1) || (($max_width === 0) && ($max_height === 0))) {
267
- // if ($file_path !== $new_file_path) {
268
- // return copy($file_path, $new_file_path);
269
- // }
270
- return TRUE;
271
- }
272
-
273
- if (!function_exists('imagecreatetruecolor')) {
274
- error_log('Function not found: imagecreatetruecolor');
275
- return FALSE;
276
- }
277
- if (!$crop) {
278
- $new_width = $img_width * $scale;
279
- $new_height = $img_height * $scale;
280
- $dst_x = 0;
281
- $dst_y = 0;
282
- $new_img = @imagecreatetruecolor($new_width, $new_height);
283
- }
284
- else {
285
- if (($img_width / $img_height) >= ($max_width / $max_height)) {
286
- $new_width = $img_width / ($img_height / $max_height);
287
- $new_height = $max_height;
288
- }
289
- else {
290
- $new_width = $max_width;
291
- $new_height = $img_height / ($img_width / $max_width);
292
- }
293
- $dst_x = 0 - ($new_width - $max_width) / 2;
294
- $dst_y = 0 - ($new_height - $max_height) / 2;
295
- $new_img = @imagecreatetruecolor($max_width, $max_height);
296
- }
297
- switch ($type) {
298
- case 2:
299
- $src_img = @imagecreatefromjpeg($file_path);
300
- $write_image = 'imagejpeg';
301
- $image_quality = $wd_bwg_options->jpeg_quality;
302
- break;
303
- case 1:
304
- @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
305
- $src_img = @imagecreatefromgif($file_path);
306
- $write_image = 'imagegif';
307
- $image_quality = NULL;
308
- break;
309
- case 3:
310
- @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
311
- @imagealphablending($new_img, FALSE);
312
- @imagesavealpha($new_img, TRUE);
313
- $src_img = @imagecreatefrompng($file_path);
314
- $write_image = 'imagepng';
315
- $image_quality = $wd_bwg_options->png_quality;
316
- break;
317
- default:
318
- $src_img = NULL;
319
- }
320
- $success = $src_img && @imagecopyresampled(
321
- $new_img,
322
- $src_img,
323
- $dst_x,
324
- $dst_y,
325
- 0,
326
- 0,
327
- $new_width,
328
- $new_height,
329
- $img_width,
330
- $img_height
331
- ) && $write_image($new_img, $file_path, $image_quality);
332
- // Free up memory (imagedestroy does not delete files):
333
- @imagedestroy($src_img);
334
- @imagedestroy($new_img);
335
- @ini_restore('memory_limit');
336
- return $success;
337
- }
338
-
339
- public function save_image_db() {
340
- global $wpdb;
341
- $gal_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
342
- $image_ids = (isset($_POST['ids_string']) ? esc_html(stripslashes($_POST['ids_string'])) : '');
343
- $image_id_array = explode(',', $image_ids);
344
- if (isset($_POST['check_all_items']) && isset($_POST['bulk_edit']) && $_POST['bulk_edit'] == 1) {
345
- $title = ((isset($_POST['title'])) ? esc_html(stripslashes($_POST['title'])) : '');
346
- $desc = ((isset($_POST['desc'])) ? esc_html(stripslashes($_POST['desc'])) : '');
347
- $redirecturl = ((isset($_POST['redirecturl'])) ? esc_html(stripslashes($_POST['redirecturl'])) : '');
348
- $wpdb->update($wpdb->prefix . 'bwg_image', array(
349
- 'description' => $desc,
350
- 'alt' => $title,
351
- 'redirect_url' => $redirecturl), array('gallery_id' => $gal_id));
352
- }
353
- foreach ($image_id_array as $image_id) {
354
- if ($image_id) {
355
- $filename = ((isset($_POST['input_filename_' . $image_id])) ? esc_html(stripslashes($_POST['input_filename_' . $image_id])) : '');
356
- $image_url = ((isset($_POST['image_url_' . $image_id])) ? esc_html(stripslashes($_POST['image_url_' . $image_id])) : '');
357
- $thumb_url = ((isset($_POST['thumb_url_' . $image_id])) ? esc_html(stripslashes($_POST['thumb_url_' . $image_id])) : '');
358
- $description = ((isset($_POST['image_description_' . $image_id])) ? esc_html((stripslashes($_POST['image_description_' . $image_id]))) : '');
359
- $alt = ((isset($_POST['image_alt_text_' . $image_id])) ? esc_html(stripslashes($_POST['image_alt_text_' . $image_id])) : '');
360
- $date = ((isset($_POST['input_date_modified_' . $image_id])) ? esc_html(stripslashes($_POST['input_date_modified_' . $image_id])) : '');
361
- $size = ((isset($_POST['input_size_' . $image_id])) ? esc_html(stripslashes($_POST['input_size_' . $image_id])) : '');
362
- $filetype = ((isset($_POST['input_filetype_' . $image_id])) ? esc_html(stripslashes($_POST['input_filetype_' . $image_id])) : '');
363
- $resolution = ((isset($_POST['input_resolution_' . $image_id])) ? esc_html(stripslashes($_POST['input_resolution_' . $image_id])) : '');
364
- $order = ((isset($_POST['order_input_' . $image_id])) ? esc_html(stripslashes($_POST['order_input_' . $image_id])) : '');
365
- $redirect_url = ((isset($_POST['redirect_url_' . $image_id])) ? esc_html(stripslashes($_POST['redirect_url_' . $image_id])) : '');
366
- $author = get_current_user_id();
367
- $tags_ids = ((isset($_POST['tags_' . $image_id])) ? esc_html(stripslashes($_POST['tags_' . $image_id])) : '');
368
- if (strpos($image_id, 'pr_') !== FALSE) {
369
- $save = $wpdb->insert($wpdb->prefix . 'bwg_image', array(
370
- 'gallery_id' => $gal_id,
371
- 'slug' => WDWLibrary::spider_replace4byte($alt),
372
- 'filename' => $filename,
373
- 'image_url' => $image_url,
374
- 'thumb_url' => $thumb_url,
375
- 'description' => WDWLibrary::spider_replace4byte($description),
376
- 'alt' => WDWLibrary::spider_replace4byte($alt),
377
- 'date' => $date,
378
- 'size' => $size,
379
- 'filetype' => $filetype,
380
- 'resolution' => $resolution,
381
- 'author' => $author,
382
- 'order' => $order,
383
- 'published' => 1,
384
- 'comment_count' => 0,
385
- 'avg_rating' => 0,
386
- 'rate_count' => 0,
387
- 'hit_count' => 0,
388
- 'redirect_url' => $redirect_url,
389
- ), array(
390
- '%d',
391
- '%s',
392
- '%s',
393
- '%s',
394
- '%s',
395
- '%s',
396
- '%s',
397
- '%s',
398
- '%s',
399
- '%s',
400
- '%s',
401
- '%d',
402
- '%d',
403
- '%d',
404
- '%d',
405
- '%d',
406
- '%d',
407
- '%d',
408
- '%s',
409
- ));
410
- $new_image_id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_image');
411
- if (isset($_POST['check_' . $image_id])) {
412
- $_POST['check_' . $new_image_id] = 'on';
413
- }
414
- if (isset($_POST['image_current_id']) && (esc_html($_POST['image_current_id']) == $image_id)) {
415
- $_POST['image_current_id'] = $new_image_id;
416
- }
417
- $image_id = $new_image_id;
418
- }
419
- else {
420
- // Don't update image and thumbnail URLs.
421
- $save = $wpdb->update($wpdb->prefix . 'bwg_image', array(
422
- 'gallery_id' => $gal_id,
423
- 'slug' => WDWLibrary::spider_replace4byte($alt),
424
- 'description' => WDWLibrary::spider_replace4byte($description),
425
- 'alt' => WDWLibrary::spider_replace4byte($alt),
426
- 'date' => $date,
427
- 'size' => $size,
428
- 'filetype' => $filetype,
429
- 'resolution' => $resolution,
430
- 'order' => $order,
431
- 'redirect_url' => $redirect_url), array('id' => $image_id));
432
- }
433
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d" AND gallery_id="%d"', $image_id, $gal_id));
434
- if ($save !== FALSE) {
435
- $tag_id_array = explode(',', $tags_ids);
436
- foreach ($tag_id_array as $tag_id) {
437
- if ($tag_id) {
438
- if (strpos($tag_id, 'pr_') !== FALSE) {
439
- $tag_id = substr($tag_id, 3);
440
- }
441
- $save = $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
442
- 'tag_id' => $tag_id,
443
- 'image_id' => $image_id,
444
- 'gallery_id' => $gal_id,
445
- ), array(
446
- '%d',
447
- '%d',
448
- '%d',
449
- ));
450
- // Increase tag count in term_taxonomy table.
451
- $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
452
- }
453
- }
454
- }
455
- }
456
- }
457
- }
458
-
459
- public function save() {
460
- echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'wd_updated');
461
- $this->display();
462
- }
463
-
464
- public function delete_unknown_images() {
465
- global $wpdb;
466
- $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id=0');
467
- }
468
-
469
- public function bwg_get_unique_slug($slug, $id) {
470
- global $wpdb;
471
- $slug = sanitize_title($slug);
472
- if ($id != 0) {
473
- $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s AND id != %d", $slug, $id);
474
- }
475
- else {
476
- $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $slug);
477
- }
478
- if ($wpdb->get_var($query)) {
479
- $num = 2;
480
- do {
481
- $alt_slug = $slug . "-$num";
482
- $num++;
483
- $slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $alt_slug));
484
- } while ($slug_check);
485
- $slug = $alt_slug;
486
- }
487
- return $slug;
488
- }
489
-
490
- public function bwg_get_unique_name($name, $id) {
491
- global $wpdb;
492
- if ($id != 0) {
493
- $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s AND id != %d", $name, $id);
494
- }
495
- else {
496
- $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $name);
497
- }
498
- if ($wpdb->get_var($query)) {
499
- $num = 2;
500
- do {
501
- $alt_name = $name . "-$num";
502
- $num++;
503
- $slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $alt_name));
504
- } while ($slug_check);
505
- $name = $alt_name;
506
- }
507
- return $name;
508
- }
509
-
510
- public function save_db() {
511
- global $wpdb;
512
- global $WD_BWG_UPLOAD_DIR;
513
- $id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
514
- $name = ((isset($_POST['name']) && esc_html(stripslashes($_POST['name'])) != '') ? esc_html(stripslashes($_POST['name'])) : 'Gallery');
515
- $name = $this->bwg_get_unique_name($name, $id);
516
- $slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
517
- $slug = $this->bwg_get_unique_slug($slug, $id);
518
- $old_slug = WDWLibrary::get('old_slug');
519
- $description = (isset($_POST['description']) ? stripslashes($_POST['description']) : '');
520
- $preview_image = (isset($_POST['preview_image']) ? esc_html(stripslashes($_POST['preview_image'])) : '');
521
- $random_preview_image = '';
522
- if ($preview_image == '') {
523
- if ($id != 0) {
524
- $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
525
- if ($random_preview_image == '' || !file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $random_preview_image)) {
526
- $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
527
- }
528
- }
529
- else {
530
- $i = 0;
531
- $random_preview_image = '';
532
- while (isset($_POST['thumb_url_pr_' . $i]) && isset($_POST["input_filetype_pr_" . $i])) {
533
- /*if ($_POST["input_filetype_pr_" . $i] == "JPG" || $_POST["input_filetype_pr_" . $i] == "PNG" || $_POST["input_filetype_pr_" . $i] == "GIF")*/ {
534
- $random_preview_image = esc_html(stripslashes($_POST['thumb_url_pr_' . $i]));
535
- break;
536
- }
537
- $i++;
538
- }
539
- }
540
- }
541
-
542
- $gallery_type = ((isset($_POST['gallery_type']) && esc_html(stripslashes($_POST['gallery_type'])) != '') ? esc_html(stripslashes($_POST['gallery_type'])) : '');
543
- $gallery_source = ((isset($_POST['gallery_source']) && esc_html(stripslashes($_POST['gallery_source'])) != '') ? esc_html(stripslashes($_POST['gallery_source'])) : '');
544
- $update_flag = ((isset($_POST['update_flag']) && esc_html(stripslashes($_POST['update_flag'])) != '') ? esc_html(stripslashes($_POST['update_flag'])) : '');
545
- $autogallery_image_number = (isset($_POST['autogallery_image_number']) ? (int) $_POST['autogallery_image_number'] : 12);
546
- $published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
547
- if ($id != 0) {
548
- $data = array(
549
- 'name' => $name,
550
- 'slug' => $slug,
551
- 'description' => $description,
552
- 'random_preview_image' => $random_preview_image,
553
- 'gallery_type' => $gallery_type,
554
- 'gallery_source' => $gallery_source,
555
- 'autogallery_image_number' => $autogallery_image_number,
556
- 'update_flag' => $update_flag,
557
- 'published' => $published
558
- );
559
- // To prevent saving preview image wrong URL after moving the image.
560
- if ( file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $preview_image) ) {
561
- $data['preview_image'] = $preview_image;
562
- }
563
- $save = $wpdb->update($wpdb->prefix . 'bwg_gallery', $data, array('id' => $id));
564
- }
565
- else {
566
- $save = $wpdb->insert($wpdb->prefix . 'bwg_gallery', array(
567
- 'name' => $name,
568
- 'slug' => $slug,
569
- 'description' => $description,
570
- 'page_link' => '',
571
- 'preview_image' => $preview_image,
572
- 'random_preview_image' => $random_preview_image,
573
- 'order' => ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_gallery')) + 1,
574
- 'author' => get_current_user_id(),
575
- 'gallery_type' => $gallery_type,
576
- 'gallery_source' => $gallery_source,
577
- 'autogallery_image_number' => $autogallery_image_number,
578
- 'update_flag' => $update_flag,
579
- 'published' => $published,
580
- ), array(
581
- '%s',
582
- '%s',
583
- '%s',
584
- '%s',
585
- '%s',
586
- '%s',
587
- '%d',
588
- '%d',
589
- '%s',
590
- '%s',
591
- '%d',
592
- '%s',
593
- '%d',
594
- ));
595
- $id = $wpdb->insert_id;
596
- }
597
- // Create custom post (type is gallery).
598
- $custom_post_params = array(
599
- 'id' => $id,
600
- 'title' => $name,
601
- 'slug' => $slug,
602
- 'old_slug' => $old_slug,
603
- 'type' => array(
604
- 'post_type' => 'gallery',
605
- 'mode' => '',
606
- ),
607
- );
608
- WDWLibrary::bwg_create_custom_post($custom_post_params);
609
- if ( $save !== FALSE ) {
610
- echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'wd_updated');
611
- }
612
- else {
613
- echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'wd_error');
614
- }
615
- }
616
-
617
- public function save_order($flag = TRUE) {
618
- global $wpdb;
619
- $gallery_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
620
- if ($gallery_ids_col) {
621
- foreach ($gallery_ids_col as $gallery_id) {
622
- if (isset($_POST['order_input_' . $gallery_id])) {
623
- $order_values[$gallery_id] = (int) $_POST['order_input_' . $gallery_id];
624
- }
625
- else {
626
- $order_values[$gallery_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_gallery WHERE `id`="%d"', $gallery_id));
627
- }
628
- }
629
- asort($order_values);
630
- $i = 1;
631
- foreach ($order_values as $key => $order_value) {
632
- $wpdb->update($wpdb->prefix . 'bwg_gallery', array('order' => $i), array('id' => $key));
633
- $i++;
634
- }
635
- if ($flag) {
636
- echo WDWLibrary::message(__('Ordering Succesfully Saved.', 'bwg_back'), 'wd_updated');
637
- }
638
- }
639
- $this->display();
640
- }
641
-
642
- public function delete($id) {
643
- global $wpdb;
644
- $row = $wpdb->get_row( $wpdb->prepare('SELECT id, slug FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $id) );
645
- if ( !empty($row) ) {
646
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $id);
647
- $query_image = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $id);
648
- $query_album_gallery = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE alb_gal_id="%d" AND is_album="%d"', $id, 0);
649
- if ($wpdb->query($query)) {
650
- $wpdb->query($query_image);
651
- $wpdb->query($query_album_gallery);
652
- // Remove custom post (type by bwg_gallery).
653
- WDWLibrary::bwg_remove_custom_post( array( 'slug' => $row->slug, 'post_type' => 'bwg_gallery') );
654
- echo WDWLibrary::message(__('Item Succesfully Deleted.', 'bwg_back'), 'wd_updated');
655
- }
656
- else {
657
- // TODO change message.
658
- echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'wd_error');
659
- }
660
- }
661
- $this->display();
662
- }
663
-
664
- public function delete_all() {
665
- $message = WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'wd_error');
666
- $galleryids = array();
667
- if ( !empty($_POST['ids_string']) ){
668
- $ids = explode(',', $_POST['ids_string']);
669
- foreach ($ids as $id) {
670
- $keypost = 'check_' . $id;
671
- if ( !empty($_POST[$keypost]) ) {
672
- $galleryids[] = $id;
673
- }
674
- }
675
- }
676
- if ( !empty($galleryids) ) {
677
- global $wpdb;
678
- $gallerys = $wpdb->get_results('SELECT `id`, `slug` FROM ' . $wpdb->prefix . 'bwg_gallery WHERE `id` IN (' . implode(',', $galleryids). ')');
679
- if ( !empty($gallerys) ) {
680
- $delete = false;
681
- foreach( $gallerys as $gallery ) {
682
- $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $gallery->id) );
683
- $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery->id) );
684
- $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE alb_gal_id="%d" AND is_album="%d"', $gallery->id, 0) );
685
- // Remove custom post (type by bwg_gallery).
686
- WDWLibrary::bwg_remove_custom_post( array( 'slug' => $gallery->slug, 'post_type' => 'bwg_gallery') );
687
- $delete = true;
688
- }
689
- if ( $delete ) {
690
- $message = WDWLibrary::message(__('Items Succesfully Deleted.', 'bwg_back'), 'wd_updated');
691
- }
692
- }
693
- }
694
- echo $message;
695
- $this->display();
696
- }
697
-
698
- public function publish($id) {
699
- global $wpdb;
700
- $save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 1), array('id' => $id));
701
- if ($save !== FALSE) {
702
- echo WDWLibrary::message(__('Item Succesfully Published.', 'bwg_back'), 'wd_updated');
703
- }
704
- else {
705
- echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'wd_error');
706
- }
707
- $this->display();
708
- }
709
-
710
- public function publish_all() {
711
- global $wpdb;
712
- $flag = FALSE;
713
- if (isset($_POST['check_all_items'])) {
714
- $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET published=1');
715
- $flag = TRUE;
716
- }
717
- else {
718
- $gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
719
- foreach ($gal_ids_col as $gal_id) {
720
- if (isset($_POST['check_' . $gal_id])) {
721
- $flag = TRUE;
722
- $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 1), array('id' => $gal_id));
723
- }
724
- }
725
- }
726
- if ($flag) {
727
- echo WDWLibrary::message(__('Items Succesfully Published.', 'bwg_back'), 'wd_updated');
728
- }
729
- else {
730
- echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'wd_error');
731
- }
732
- $this->display();
733
- }
734
-
735
- public function unpublish($id) {
736
- global $wpdb;
737
- $save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 0), array('id' => $id));
738
- if ($save !== FALSE) {
739
- echo WDWLibrary::message(__('Item Succesfully Unpublished.', 'bwg_back'), 'wd_updated');
740
- }
741
- else {
742
- echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'wd_error');
743
- }
744
- $this->display();
745
- }
746
-
747
- public function unpublish_all() {
748
- global $wpdb;
749
- $flag = FALSE;
750
- if (isset($_POST['check_all_items'])) {
751
- $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET published=0');
752
- $flag = TRUE;
753
- }
754
- else {
755
- $gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
756
- foreach ($gal_ids_col as $gal_id) {
757
- if (isset($_POST['check_' . $gal_id])) {
758
- $flag = TRUE;
759
- $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 0), array('id' => $gal_id));
760
- }
761
- }
762
- }
763
- if ($flag) {
764
- echo WDWLibrary::message(__('Items Succesfully Unpublished.', 'bwg_back'), 'wd_updated');
765
- }
766
- else {
767
- echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'wd_error');
768
- }
769
- $this->display();
770
- }
771
- public function resize_image_thumb() {
772
- global $WD_BWG_UPLOAD_DIR;
773
- global $wpdb;
774
- $flag = FALSE;
775
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
776
- $img_ids = $wpdb->get_results($wpdb->prepare('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
777
- global $wd_bwg_options;
778
- foreach ($img_ids as $img_id) {
779
- if (isset($_POST['check_' . $img_id->id]) || isset($_POST['check_all_items'])) {
780
- $flag = TRUE;
781
- $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
782
- $new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
783
- list($img_width, $img_height, $type) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
784
- if (!$img_width || !$img_height) {
785
- continue;
786
- }
787
- $max_width = $wd_bwg_options->upload_thumb_width;
788
- $max_height = $wd_bwg_options->upload_thumb_height;
789
- $scale = min(
790
- $max_width / $img_width,
791
- $max_height / $img_height
792
- );
793
- @ini_set('memory_limit', '-1');
794
- if (!function_exists('imagecreatetruecolor')) {
795
- error_log('Function not found: imagecreatetruecolor');
796
- return FALSE;
797
- }
798
- $new_width = $img_width * $scale;
799
- $new_height = $img_height * $scale;
800
- $dst_x = 0;
801
- $dst_y = 0;
802
- $new_img = @imagecreatetruecolor($new_width, $new_height);
803
- switch ($type) {
804
- case 2:
805
- $src_img = @imagecreatefromjpeg($file_path);
806
- $write_image = 'imagejpeg';
807
- $image_quality = $wd_bwg_options->jpeg_quality;
808
- break;
809
- case 1:
810
- @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
811
- $src_img = @imagecreatefromgif($file_path);
812
- $write_image = 'imagegif';
813
- $image_quality = null;
814
- break;
815
- case 3:
816
- @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
817
- @imagealphablending($new_img, false);
818
- @imagesavealpha($new_img, true);
819
- $src_img = @imagecreatefrompng($file_path);
820
- $write_image = 'imagepng';
821
- $image_quality = $wd_bwg_options->png_quality;
822
- break;
823
- default:
824
- $src_img = null;
825
- break;
826
- }
827
- $success = $src_img && @imagecopyresampled(
828
- $new_img,
829
- $src_img,
830
- $dst_x,
831
- $dst_y,
832
- 0,
833
- 0,
834
- $new_width,
835
- $new_height,
836
- $img_width,
837
- $img_height
838
- ) && $write_image($new_img, $new_file_path, $image_quality);
839
- // Free up memory (imagedestroy does not delete files):
840
- @imagedestroy($src_img);
841
- @imagedestroy($new_img);
842
- @ini_restore('memory_limit');
843
- }
844
- }
845
- if ($flag == false) {
846
- echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'wd_error');
847
- }
848
- else {
849
- echo WDWLibrary::message(__('Thumb Succesfully Resized', 'bwg_back'), 'wd_updated');
850
- }
851
- }
852
-
853
- public function rotate_left() {
854
- $this->rotate(90);
855
- }
856
-
857
- public function rotate_right() {
858
- $this->rotate(270);
859
- }
860
-
861
- public function rotate($edit_type) {
862
- global $WD_BWG_UPLOAD_DIR;
863
- global $wpdb;
864
- global $wd_bwg_options;
865
- $flag = FALSE;
866
- $gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
867
- $images_data = $wpdb->get_results($wpdb->prepare('SELECT id, image_url, thumb_url FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
868
- @ini_set('memory_limit', '-1');
869
- foreach ($images_data as $image_data) {
870
- if (isset($_POST['check_' . $image_data->id]) || isset($_POST['check_all_items'])) {
871
- $flag = TRUE;
872
- $image_data->image_url = stripcslashes($image_data->image_url);
873
- $filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
874
- $thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
875
- list($width_rotate, $height_rotate, $type_rotate) = getimagesize($filename);
876
- if ($edit_type == '270' || $edit_type == '90') {
877
- if ($type_rotate == 2) {
878
- $source = imagecreatefromjpeg($filename);
879
- $thumb_source = imagecreatefromjpeg($thumb_filename);
880
- $rotate = imagerotate($source, $edit_type, 0);
881
- $thumb_rotate = imagerotate($thumb_source, $edit_type, 0);
882
- imagejpeg($thumb_rotate, $thumb_filename, $wd_bwg_options->jpeg_quality);
883
- imagejpeg($rotate, $filename, $wd_bwg_options->jpeg_quality);
884
- imagedestroy($source);
885
- imagedestroy($rotate);
886
- imagedestroy($thumb_source);
887
- imagedestroy($thumb_rotate);
888
- }
889
- elseif ($type_rotate == 3) {
890
- $source = imagecreatefrompng($filename);
891
- $thumb_source = imagecreatefrompng($thumb_filename);
892
- imagealphablending($source, FALSE);
893
- imagealphablending($thumb_source, FALSE);
894
- imagesavealpha($source, TRUE);
895
- imagesavealpha($thumb_source, TRUE);
896
- $rotate = imagerotate($source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
897
- $thumb_rotate = imagerotate($thumb_source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
898
- imagealphablending($rotate, FALSE);
899
- imagealphablending($thumb_rotate, FALSE);
900
- imagesavealpha($rotate, TRUE);
901
- imagesavealpha($thumb_rotate, TRUE);
902
- imagepng($rotate, $filename, $wd_bwg_options->png_quality);
903
- imagepng($thumb_rotate, $thumb_filename, $wd_bwg_options->png_quality);
904
- imagedestroy($source);
905
- imagedestroy($rotate);
906
- imagedestroy($thumb_source);
907
- imagedestroy($thumb_rotate);
908
- }
909
- elseif ($type_rotate == 1) {
910
- $source = imagecreatefromgif($filename);
911
- $thumb_source = imagecreatefromgif($thumb_filename);
912
- imagealphablending($source, FALSE);
913
- imagealphablending($thumb_source, FALSE);
914
- imagesavealpha($source, TRUE);
915
- imagesavealpha($thumb_source, TRUE);
916
- $rotate = imagerotate($source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
917
- $thumb_rotate = imagerotate($thumb_source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
918
- imagealphablending($rotate, FALSE);
919
- imagealphablending($thumb_rotate, FALSE);
920
- imagesavealpha($rotate, TRUE);
921
- imagesavealpha($thumb_rotate, TRUE);
922
- imagegif($rotate, $filename);
923
- imagegif($thumb_rotate, $thumb_filename);
924
- imagedestroy($source);
925
- imagedestroy($rotate);
926
- imagedestroy($thumb_source);
927
- imagedestroy($thumb_rotate);
928
- }
929
- }
930
- }
931
- }
932
- if ($flag == false) {
933
- echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'wd_error');
934
- }
935
- else {
936
- echo WDWLibrary::message(__('Items successfully rotated.', 'bwg_back'), 'wd_updated');
937
- }
938
- }
939
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerLicensing_bwg.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerLicensing_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
23
-
24
- if($task != ''){
25
- if(!WDWLibrary::verify_nonce('licensing_bwg')){
26
- die('Sorry, your nonce did not verify.');
27
- }
28
- }
29
-
30
-
31
- if (method_exists($this, $task)) {
32
- $this->$task($id);
33
- }
34
- else {
35
- $this->display();
36
- }
37
- }
38
-
39
- public function display() {
40
- require_once WD_BWG_DIR . "/admin/models/BWGModelLicensing_bwg.php";
41
- $model = new BWGModelLicensing_bwg();
42
-
43
- require_once WD_BWG_DIR . "/admin/views/BWGViewLicensing_bwg.php";
44
- $view = new BWGViewLicensing_bwg($model);
45
- $view->display();
46
- }
47
-
48
- ////////////////////////////////////////////////////////////////////////////////////////
49
- // Getters & Setters //
50
- ////////////////////////////////////////////////////////////////////////////////////////
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- // Private Methods //
53
- ////////////////////////////////////////////////////////////////////////////////////////
54
- ////////////////////////////////////////////////////////////////////////////////////////
55
- // Listeners //
56
- ////////////////////////////////////////////////////////////////////////////////////////
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerOptions_bwg.php DELETED
@@ -1,193 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerOptions_bwg {
4
-
5
- public function execute() {
6
- $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
7
-
8
- if($task != ''){
9
- if(!WDWLibrary::verify_nonce('options_bwg')){
10
- die('Sorry, your nonce did not verify.');
11
- }
12
- }
13
-
14
- if (method_exists($this, $task)) {
15
- $this->$task();
16
- }
17
- else {
18
- $this->display();
19
- }
20
- }
21
-
22
- public function display() {
23
- require_once WD_BWG_DIR . "/admin/models/BWGModelOptions_bwg.php";
24
- $model = new BWGModelOptions_bwg();
25
-
26
- require_once WD_BWG_DIR . "/admin/views/BWGViewOptions_bwg.php";
27
- $view = new BWGViewOptions_bwg($model);
28
- $view->display();
29
- }
30
-
31
- public function reset() {
32
- require_once WD_BWG_DIR . "/admin/models/BWGModelOptions_bwg.php";
33
- $model = new BWGModelOptions_bwg();
34
-
35
- require_once WD_BWG_DIR . "/admin/views/BWGViewOptions_bwg.php";
36
- $view = new BWGViewOptions_bwg($model);
37
- echo WDWLibrary::message('Changes must be saved.', 'wd_error');
38
- $view->display(true);
39
- }
40
-
41
- public function save() {
42
- $this->save_db();
43
- $this->display();
44
- }
45
-
46
- public function save_db() {
47
- $row = new WD_BWG_Options();
48
- if (isset($_POST['old_images_directory'])) {
49
- $row->old_images_directory = esc_html(stripslashes($_POST['old_images_directory']));
50
- }
51
- if (isset($_POST['images_directory'])) {
52
- $row->images_directory = esc_html(stripslashes($_POST['images_directory']));
53
- 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)) {
54
- if (!is_dir(ABSPATH . $row->images_directory)) {
55
- echo WDWLibrary::message('Uploads directory doesn\'t exist. Old value is restored.', 'wd_error');
56
- }
57
- else {
58
- echo WDWLibrary::message('Warning: "photo-gallery" folder already exists in uploads directory. Old value is restored.', 'wd_error');
59
- }
60
- if ($row->old_images_directory) {
61
- $row->images_directory = $row->old_images_directory;
62
- }
63
- else {
64
- $upload_dir = wp_upload_dir();
65
- if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
66
- mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
67
- }
68
- $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
69
- }
70
- }
71
- }
72
- else {
73
- $upload_dir = wp_upload_dir();
74
- if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
75
- mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
76
- }
77
- $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
78
- }
79
-
80
- foreach ($row as $name => $value) {
81
- if ($name == 'autoupdate_interval') {
82
- $autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : null);
83
- /*minimum autoupdate interval is 1 min*/
84
- $row->autoupdate_interval = isset($autoupdate_interval) && $autoupdate_interval >= 1 ? $autoupdate_interval : 1;
85
- }
86
- else if ($name != 'images_directory' && isset($_POST[$name])) {
87
- $row->$name = esc_html(stripslashes($_POST[$name]));
88
- }
89
- }
90
-
91
- $save = update_option('wd_bwg_options', json_encode($row), 'no');
92
-
93
- if (isset($_POST['watermark']) && $_POST['watermark'] == "image_set_watermark") {
94
- $this->image_set_watermark();
95
- }
96
-
97
- if ($save) {
98
- if ($row->old_images_directory && $row->old_images_directory != $row->images_directory) {
99
- rename(ABSPATH . $row->old_images_directory . '/photo-gallery', ABSPATH . $row->images_directory . '/photo-gallery');
100
- }
101
- if (!is_dir(ABSPATH . $row->images_directory . '/photo-gallery')) {
102
- mkdir(ABSPATH . $row->images_directory . '/photo-gallery', 0777);
103
- }
104
- if (isset($_POST['recreate']) && $_POST['recreate'] == "resize_image_thumb") {
105
- $this->resize_image_thumb();
106
- echo WDWLibrary::message(__('All thumbnails are successfully recreated.', 'bwg_back'), 'wd_updated');
107
- }
108
- else {
109
- echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'wd_updated');
110
- }
111
- }
112
- }
113
-
114
- public function image_set_watermark() {
115
- WDWLibrary::bwg_image_set_watermark(0);
116
- }
117
-
118
- public function image_recover_all() {
119
- WDWLibrary::bwg_image_recover_all(0);
120
- $this->display();
121
- }
122
-
123
- public function resize_image_thumb() {
124
- global $WD_BWG_UPLOAD_DIR;
125
- global $wpdb;
126
- global $wd_bwg_options;
127
- $img_ids = $wpdb->get_results('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image');
128
- foreach ($img_ids as $img_id) {
129
- $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
130
- $new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
131
- list($img_width, $img_height, $type) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
132
- if (!$img_width || !$img_height) {
133
- continue;
134
- }
135
- $max_width = $wd_bwg_options->upload_thumb_width;
136
- $max_height = $wd_bwg_options->upload_thumb_height;
137
- $scale = min(
138
- $max_width / $img_width,
139
- $max_height / $img_height
140
- );
141
- @ini_set('memory_limit', '-1');
142
- if (!function_exists('imagecreatetruecolor')) {
143
- error_log('Function not found: imagecreatetruecolor');
144
- return FALSE;
145
- }
146
- $new_width = $img_width * $scale;
147
- $new_height = $img_height * $scale;
148
- $dst_x = 0;
149
- $dst_y = 0;
150
- $new_img = @imagecreatetruecolor($new_width, $new_height);
151
- switch ($type) {
152
- case 2:
153
- $src_img = @imagecreatefromjpeg($file_path);
154
- $write_image = 'imagejpeg';
155
- $image_quality = $wd_bwg_options->jpeg_quality;
156
- break;
157
- case 1:
158
- @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
159
- $src_img = @imagecreatefromgif($file_path);
160
- $write_image = 'imagegif';
161
- $image_quality = null;
162
- break;
163
- case 3:
164
- @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
165
- @imagealphablending($new_img, false);
166
- @imagesavealpha($new_img, true);
167
- $src_img = @imagecreatefrompng($file_path);
168
- $write_image = 'imagepng';
169
- $image_quality = $wd_bwg_options->png_quality;
170
- break;
171
- default:
172
- $src_img = null;
173
- break;
174
- }
175
- $success = $src_img && @imagecopyresampled(
176
- $new_img,
177
- $src_img,
178
- $dst_x,
179
- $dst_y,
180
- 0,
181
- 0,
182
- $new_width,
183
- $new_height,
184
- $img_width,
185
- $img_height
186
- ) && $write_image($new_img, $new_file_path, $image_quality);
187
- // Free up memory (imagedestroy does not delete files):
188
- @imagedestroy($src_img);
189
- @imagedestroy($new_img);
190
- @ini_restore('memory_limit');
191
- }
192
- }
193
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerTags_bwg.php DELETED
@@ -1,278 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerTags_bwg {
4
- public function __construct() {
5
- }
6
-
7
- public function execute() {
8
- $task = WDWLibrary::get('task');
9
- $id = WDWLibrary::get('current_id', 0);
10
- if ( $task != '' ) {
11
- if ( !WDWLibrary::verify_nonce('tags_bwg') ) {
12
- die('Sorry, your nonce did not verify.');
13
- }
14
- }
15
- $message = WDWLibrary::get('message');
16
- echo WDWLibrary::message_id($message);
17
- if ( method_exists($this, $task) ) {
18
- $this->$task($id);
19
- }
20
- else {
21
- $this->display();
22
- }
23
- }
24
-
25
- public function display() {
26
- require_once WD_BWG_DIR . "/admin/models/BWGModelTags_bwg.php";
27
- $model = new BWGModelTags_bwg();
28
-
29
- require_once WD_BWG_DIR . "/admin/views/BWGViewTags_bwg.php";
30
- $view = new BWGViewTags_bwg($model);
31
- $view->display();
32
- }
33
-
34
- public function save() {
35
- $message = $this->save_tag();
36
- $page = WDWLibrary::get('page');
37
- $query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
38
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
39
- WDWLibrary::spider_redirect($query_url);
40
- }
41
-
42
- public function bwg_get_unique_slug($slug, $id) {
43
- global $wpdb;
44
- $slug = sanitize_title($slug);
45
- if ($id != 0) {
46
- $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s AND term_id != %d", $slug, $id);
47
- }
48
- else {
49
- $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s", $slug);
50
- }
51
- if ($wpdb->get_var($query)) {
52
- $num = 2;
53
- do {
54
- $alt_slug = $slug . "-$num";
55
- $num++;
56
- $slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s", $alt_slug));
57
- } while ($slug_check);
58
- $slug = $alt_slug;
59
- }
60
- return $slug;
61
- }
62
-
63
- public function bwg_get_unique_name($name, $id) {
64
- /*global $wpdb;
65
- if ($id != 0) {
66
- $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s AND term_id != %d", $name, $id);
67
- }
68
- else {
69
- $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s", $name);
70
- }
71
- if ($wpdb->get_var($query)) {
72
- $num = 2;
73
- do {
74
- $alt_name = $name . "-$num";
75
- $num++;
76
- $slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s", $alt_name));
77
- } while ($slug_check);
78
- $name = $alt_name;
79
- }*/
80
- return $name;
81
- }
82
-
83
- public function save_tag() {
84
- $message_id = 15;
85
- $name = ((isset($_POST['tagname'])) ? esc_html(stripslashes($_POST['tagname'])) : '');
86
- $slug = ((isset($_POST['slug']) && (esc_html($_POST['slug']) != '')) ? esc_html(stripslashes($_POST['slug'])) : $name);
87
- $slug = $this->bwg_get_unique_slug($slug, 0);
88
- $slug = sanitize_title($slug);
89
- if ( $name ) {
90
- $save = wp_insert_term($name, 'bwg_tag', array(
91
- 'description' => '',
92
- 'slug' => $slug,
93
- 'parent' => 0
94
- )
95
- );
96
- // Create custom post (type is tag).
97
- $custom_post_params = array(
98
- 'id' => $save['term_id'],
99
- 'title' => $name,
100
- 'slug' => $slug,
101
- 'type' => array(
102
- 'post_type' => 'tag',
103
- 'mode' => '',
104
- ),
105
- );
106
- WDWLibrary::bwg_create_custom_post($custom_post_params);
107
- $message_id = 1;
108
- if ( isset($save->errors) ) {
109
- $message_id = 14;
110
- }
111
- }
112
-
113
- return $message_id;
114
- }
115
-
116
- function edit_tag() {
117
- global $wpdb;
118
- $flag = FALSE;
119
- $id = ((isset($_REQUEST['tag_id'])) ? esc_html(stripslashes($_REQUEST['tag_id'])) : '');
120
- $query = $wpdb->prepare("SELECT count FROM " . $wpdb->prefix . "term_taxonomy WHERE term_id=%d", $id);
121
- $count = $wpdb->get_var($query);
122
- $name = ((isset($_REQUEST['tagname'])) ? esc_html(stripslashes($_REQUEST['tagname'])) : '');
123
- $name = $this->bwg_get_unique_name($name, $id);
124
- if ( $name ) {
125
- $slug = ((isset($_REQUEST['slug']) && (esc_html($_REQUEST['slug']) != '')) ? esc_html(stripslashes($_REQUEST['slug'])) : $name);
126
- $slug = $this->bwg_get_unique_slug($slug, $id);
127
- $save = wp_update_term($id, 'bwg_tag', array(
128
- 'name' => $name,
129
- 'slug' => $slug,
130
- ));
131
-
132
- // Create custom post (type is tag).
133
- $custom_post_params = array(
134
- 'id' => $id,
135
- 'title' => $name,
136
- 'slug' => $slug,
137
- 'old_slug' => !empty($_POST['old_slug']) ? $_POST['old_slug'] : '',
138
- 'type' => array(
139
- 'post_type' => 'tag',
140
- 'mode' => '',
141
- ),
142
- );
143
- WDWLibrary::bwg_create_custom_post($custom_post_params);
144
- if ( isset($save->errors) ) {
145
- echo 'The slug must be unique.';
146
- }
147
- else {
148
- $flag = TRUE;
149
- }
150
- }
151
- if ( $flag ) {
152
- echo $name . '.' . $slug . '.' . $count;
153
- }
154
- die();
155
- }
156
-
157
- public function edit_tags() {
158
- global $wpdb;
159
- $message_id = '';
160
- $flag = FALSE;
161
- $rows = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
162
- $terms = array();
163
- foreach ($rows as $row) {
164
- $id = $row->term_id;
165
- $name = ((isset($_POST['tagname' . $row->term_id])) ? esc_html(stripslashes($_POST['tagname' . $id])) : '');
166
- $name = $this->bwg_get_unique_name($name, $id);
167
- if ($name) {
168
- $old_slug = ((isset($_POST['old_slug' . $row->term_id]) && (esc_html($_POST['old_slug' . $id]) != '')) ? esc_html(stripslashes($_POST['old_slug' . $id])) : '');
169
- $slug = ((isset($_POST['slug' . $row->term_id]) && (esc_html($_POST['slug' . $id]) != '')) ? esc_html(stripslashes($_POST['slug' . $id])) : $name);
170
- $terms[] = array('id' => $id, 'name' => $name, 'slug' => $slug, 'old_slug' => $old_slug);
171
- $slug = $this->bwg_get_unique_slug($slug, $id);
172
- $save = wp_update_term($id, 'bwg_tag', array('name' => $name, 'slug' => $slug));
173
- if (isset($save->errors)) {
174
- $message_id = 16;
175
- }
176
- else {
177
- $flag = TRUE;
178
- }
179
- }
180
- }
181
-
182
- $name = ((isset($_POST['tagname'])) ? esc_html(stripslashes($_POST['tagname'])) : '');
183
- $name = $this->bwg_get_unique_name($name, 0);
184
- $slug = ((isset($_POST['slug']) && (esc_html($_POST['slug']) != '')) ? esc_html(stripslashes($_POST['slug'])) : $name);
185
- $slug = $this->bwg_get_unique_slug($slug, 0);
186
- if ($name) {
187
- $save = wp_insert_term($name, 'bwg_tag', array(
188
- 'description'=> '',
189
- 'slug' => $slug,
190
- 'parent' => 0)
191
- );
192
- $term = array('id' => $save['term_id'], 'name' => $name, 'old_slug' => '', 'slug' => $slug);
193
- $terms[count($terms)] = $term;
194
- $message_id = 1;
195
- if (isset($save->errors)) {
196
- $message_id = 15;
197
- }
198
- }
199
- if ($flag) {
200
- $message_id = 1;
201
- }
202
- // Create custom post (type is tag).
203
- if ( !empty($terms) ) {
204
- foreach($terms as $term){
205
- $custom_post_params = array(
206
- 'id' => $term['id'],
207
- 'title' => $term['name'],
208
- 'slug' => $term['slug'],
209
- 'old_slug' => $term['old_slug'],
210
- 'type' => array(
211
- 'post_type' => 'tag',
212
- 'mode' => '',
213
- ),
214
- );
215
- WDWLibrary::bwg_create_custom_post($custom_post_params);
216
- }
217
- }
218
- $page = WDWLibrary::get('page');
219
- $query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
220
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message_id), $query_url);
221
- WDWLibrary::spider_redirect($query_url);
222
- }
223
-
224
- public function delete($id) {
225
- global $wpdb;
226
- $message = 2;
227
- $row = $wpdb->get_row( $wpdb->prepare('SELECT term_id, slug FROM ' . $wpdb->prefix . 'terms WHERE term_id="%d"', $id) );
228
- if ( !empty($row) ) {
229
- wp_delete_term($id, 'bwg_tag');
230
- $flag = $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id) );
231
- if ($flag !== FALSE) {
232
- // Remove custom post (type by bwg_album).
233
- WDWLibrary::bwg_remove_custom_post( array( 'slug' => $row->slug, 'post_type' => 'bwg_tag') );
234
- $message = 3;
235
- }
236
- }
237
- $page = WDWLibrary::get('page');
238
- $query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
239
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
240
- WDWLibrary::spider_redirect($query_url);
241
- }
242
-
243
- public function delete_all() {
244
- $message_id = 6;
245
- $termids = array();
246
- if ( !empty($_POST['ids_string']) ){
247
- $ids = explode(',', $_POST['ids_string']);
248
- foreach ($ids as $id) {
249
- $keypost = 'check_' . $id;
250
- if ( !empty($_POST[$keypost]) ) {
251
- $termids[] = $id;
252
- }
253
- }
254
- }
255
-
256
- if ( !empty($termids) ){
257
- global $wpdb;
258
- $terms = $wpdb->get_results('SELECT `term_id` AS `id`, `slug` FROM ' . $wpdb->prefix . 'terms WHERE `term_id` IN (' . implode(',', $termids). ')');
259
- if ( !empty($terms) ) {
260
- $delete = false;
261
- foreach( $terms as $term ) {
262
- wp_delete_term($term->id, 'bwg_tag');
263
- $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $term->id) );
264
- // Remove custom post (type by bwg_tag).
265
- WDWLibrary::bwg_remove_custom_post( array( 'slug' => $term->slug, 'post_type' => 'bwg_tag') );
266
- $delete = true;
267
- }
268
- if ( $delete ) {
269
- $message_id = 5;
270
- }
271
- }
272
- }
273
- $page = WDWLibrary::get('page');
274
- $query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
275
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message_id), $query_url);
276
- WDWLibrary::spider_redirect($query_url);
277
- }
278
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerThemes_bwg.php DELETED
@@ -1,1102 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerThemes_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = WDWLibrary::get('task');
23
- $id = WDWLibrary::get('current_id', 0);
24
- $message = WDWLibrary::get('message');
25
-
26
- if($task != ''){
27
- if(!WDWLibrary::verify_nonce('themes_bwg')){
28
- die('Sorry, your nonce did not verify.');
29
- }
30
- }
31
-
32
- echo WDWLibrary::message_id($message);
33
- if (method_exists($this, $task)) {
34
- $this->$task($id);
35
- }
36
- else {
37
- $this->display();
38
- }
39
- }
40
-
41
- public function display() {
42
- require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
43
- $model = new BWGModelThemes_bwg();
44
-
45
- require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
46
- $view = new BWGViewThemes_bwg($model);
47
- $view->display();
48
- }
49
-
50
- public function add() {
51
- require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
52
- $model = new BWGModelThemes_bwg();
53
-
54
- require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
55
- $view = new BWGViewThemes_bwg($model);
56
- $view->edit(0, false);
57
- }
58
-
59
- public function edit() {
60
- require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
61
- $model = new BWGModelThemes_bwg();
62
-
63
- require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
64
- $view = new BWGViewThemes_bwg($model);
65
- $id = WDWLibrary::get('current_id', 0);
66
- $view->edit($id, false);
67
- }
68
-
69
- public function reset() {
70
- require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
71
- $model = new BWGModelThemes_bwg();
72
-
73
- require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
74
- $view = new BWGViewThemes_bwg($model);
75
- $id = WDWLibrary::get('current_id', 0);
76
- echo WDWLibrary::message('Changes must be saved.', 'wd_error');
77
- $view->edit($id, TRUE);
78
- }
79
-
80
- public function save() {
81
- $message = $this->save_db();
82
- $page = WDWLibrary::get('page');
83
- $query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
84
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
85
- WDWLibrary::spider_redirect($query_url);
86
- }
87
-
88
- public function apply() {
89
- $message = $this->save_db();
90
- global $wpdb;
91
- $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_theme');
92
- $current_id = WDWLibrary::get('current_id', $id);
93
- $page = WDWLibrary::get('page');
94
- $current_type = WDWLibrary::get('current_type', 'Thumbnail');
95
- $query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
96
- $query_url = add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message, 'current_type' => $current_type), $query_url);
97
- WDWLibrary::spider_redirect($query_url);
98
- }
99
-
100
- public function save_db() {
101
- global $wpdb;
102
- $id = (int) WDWLibrary::get('current_id', 0);
103
- $name = (isset($_POST['name']) ? esc_html(stripslashes( $_POST['name'])) : 'exaple');
104
- $thumb_margin = (isset($_POST['thumb_margin']) ? esc_html(stripslashes( $_POST['thumb_margin'])) : '');
105
- $thumb_padding = (isset($_POST['thumb_padding']) ? esc_html(stripslashes( $_POST['thumb_padding'])) : '');
106
- $thumb_border_radius = (isset($_POST['thumb_border_radius']) ? esc_html(stripslashes( $_POST['thumb_border_radius'])) :'');
107
- $thumb_border_width = (isset($_POST['thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['thumb_border_width'])) : 1);
108
- $thumb_border_style = (isset($_POST['thumb_border_style']) ? esc_html(stripslashes( $_POST['thumb_border_style'])) : 'solid');
109
- $thumb_border_color = (isset($_POST['thumb_border_color']) ? esc_html(stripslashes( $_POST['thumb_border_color'])) : '000000');
110
- $thumb_bg_color = (isset($_POST['thumb_bg_color']) ? esc_html(stripslashes( $_POST['thumb_bg_color'])) : 'FFFFFF');
111
- $thumbs_bg_color = (isset($_POST['thumbs_bg_color']) ? esc_html(stripslashes( $_POST['thumbs_bg_color'])) : 'FFFFFF');
112
- $thumb_bg_transparent = (isset($_POST['thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['thumb_bg_transparent'])) :0);
113
- $thumb_box_shadow = (isset($_POST['thumb_box_shadow']) ? esc_html(stripslashes( $_POST['thumb_box_shadow'])) : '');
114
- $thumb_transparent = (isset($_POST['thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['thumb_transparent'])) : 0);
115
- $thumb_align = (isset($_POST['thumb_align']) ? esc_html(stripslashes( $_POST['thumb_align'])) : '');
116
- $thumb_hover_effect = (isset($_POST['thumb_hover_effect']) ? esc_html(stripslashes( $_POST['thumb_hover_effect'])) : '');
117
- $thumb_hover_effect_value = (isset($_POST['thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['thumb_hover_effect_value'])) : '');
118
- $thumb_transition = (isset($_POST['thumb_transition']) ? (int) esc_html(stripslashes( $_POST['thumb_transition'])) : 0);
119
- $thumb_title_margin = (isset($_POST['thumb_title_margin']) ? esc_html(stripslashes( $_POST['thumb_title_margin'])) : '');
120
- $thumb_title_font_style = (isset($_POST['thumb_title_font_style']) ? esc_html(stripslashes( $_POST['thumb_title_font_style'])) : 'inherit');
121
- $thumb_title_pos = (isset($_POST['thumb_title_pos']) ? esc_html(stripslashes( $_POST['thumb_title_pos'])) :'bottom');
122
- $thumb_title_font_color = (isset($_POST['thumb_title_font_color']) ? esc_html(stripslashes( $_POST['thumb_title_font_color'])) : 'CCCCCC');
123
- $thumb_title_shadow = (isset($_POST['thumb_title_shadow']) ? esc_html(stripslashes( $_POST['thumb_title_shadow'])) : '');
124
- $thumb_title_font_size = (isset($_POST['thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['thumb_title_font_size'])) : 12);
125
- $thumb_title_font_weight = (isset($_POST['thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['thumb_title_font_weight'])) : 'normal');
126
-
127
- $page_nav_position = (isset($_POST['page_nav_position']) ? esc_html(stripslashes( $_POST['page_nav_position'])) : 'top');
128
- $page_nav_align = (isset($_POST['page_nav_align']) ? esc_html(stripslashes( $_POST['page_nav_align'])) : 'center');
129
- $page_nav_number = (isset($_POST['page_nav_number']) ? (int) esc_html(stripslashes( $_POST['page_nav_number'])) : 1);
130
- $page_nav_font_size = (isset($_POST['page_nav_font_size']) ? (int) esc_html(stripslashes( $_POST['page_nav_font_size'])) : 13);
131
- $page_nav_font_style = (isset($_POST['page_nav_font_style']) ? esc_html(stripslashes( $_POST['page_nav_font_style'])) : 'solid');
132
- $page_nav_font_color = (isset($_POST['page_nav_font_color']) ? esc_html(stripslashes( $_POST['page_nav_font_color'])) : '000000');
133
- $page_nav_font_weight = (isset($_POST['page_nav_font_weight']) ? esc_html(stripslashes( $_POST['page_nav_font_weight'])) : '');
134
- $page_nav_border_width = (isset($_POST['page_nav_border_width']) ? (int) esc_html(stripslashes( $_POST['page_nav_border_width'])) : 1);
135
- $page_nav_border_style = (isset($_POST['page_nav_border_style']) ? esc_html(stripslashes( $_POST['page_nav_border_style'])) : 'solid');
136
- $page_nav_border_color = (isset($_POST['page_nav_border_color']) ? esc_html(stripslashes( $_POST['page_nav_border_color'])) : '');
137
- $page_nav_border_radius = (isset($_POST['page_nav_border_radius']) ? esc_html(stripslashes( $_POST['page_nav_border_radius'])) : '');
138
- $page_nav_margin = (isset($_POST['page_nav_margin']) ? esc_html(stripslashes( $_POST['page_nav_margin'])) : '');
139
- $page_nav_padding = (isset($_POST['page_nav_padding']) ? esc_html(stripslashes( $_POST['page_nav_padding'])) : '');
140
- $page_nav_button_bg_color = (isset($_POST['page_nav_button_bg_color']) ? esc_html(stripslashes( $_POST['page_nav_button_bg_color'])) : 'FFFFFF');
141
- $page_nav_button_bg_transparent = (isset($_POST['page_nav_button_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_bg_transparent'])) : 0);
142
- $page_nav_box_shadow = (isset($_POST['page_nav_box_shadow']) ? esc_html(stripslashes( $_POST['page_nav_box_shadow'])) : '');
143
- $page_nav_button_transition = (isset($_POST['page_nav_button_transition']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_transition'])) : 0);
144
- $page_nav_button_text = (isset($_POST['page_nav_button_text']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_text'])) : 0);
145
- $lightbox_ctrl_btn_pos = (isset($_POST['lightbox_ctrl_btn_pos']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_pos'])) :'top');
146
- $lightbox_ctrl_btn_align = (isset($_POST['lightbox_ctrl_btn_align']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_align'])) : 'left');
147
- $lightbox_ctrl_btn_height = (isset($_POST['lightbox_ctrl_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_height'])) : 1);
148
- $lightbox_ctrl_btn_margin_top = (isset($_POST['lightbox_ctrl_btn_margin_top']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_margin_top'])) : 1);
149
- $lightbox_ctrl_btn_margin_left = (isset($_POST['lightbox_ctrl_btn_margin_left']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_margin_left'])) : 0);
150
- $lightbox_ctrl_btn_transparent = (isset($_POST['lightbox_ctrl_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_transparent'])) : 0);
151
- $lightbox_ctrl_btn_color = (isset($_POST['lightbox_ctrl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_color'])) : '000000');
152
- $lightbox_toggle_btn_height = (isset($_POST['lightbox_toggle_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_toggle_btn_height'])) : 1);
153
- $lightbox_toggle_btn_width = (isset($_POST['lightbox_toggle_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_toggle_btn_width'])) : 1);
154
- $lightbox_ctrl_cont_bg_color = (isset($_POST['lightbox_ctrl_cont_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_cont_bg_color'])) : '000000');
155
- $lightbox_ctrl_cont_border_radius = (isset($_POST['lightbox_ctrl_cont_border_radius']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_cont_border_radius'])) : 1);
156
- $lightbox_ctrl_cont_transparent = (isset($_POST['lightbox_ctrl_cont_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_cont_transparent'])) : 1);
157
- $lightbox_close_btn_bg_color = (isset($_POST['lightbox_close_btn_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_bg_color'])) : '000000');
158
- $lightbox_close_btn_border_radius = (isset($_POST['lightbox_close_btn_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_radius'])) : '16px');
159
- $lightbox_close_btn_border_width = (isset($_POST['lightbox_close_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_border_width'])) : 1);
160
- $lightbox_close_btn_border_style = (isset($_POST['lightbox_close_btn_border_style']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_style'])) : 'solid');
161
- $lightbox_close_btn_border_color = (isset($_POST['lightbox_close_btn_border_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_color'])) : '000000');
162
- $lightbox_close_btn_box_shadow = (isset($_POST['lightbox_close_btn_box_shadow']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_box_shadow'])) : '');
163
- $lightbox_close_btn_color = (isset($_POST['lightbox_close_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_color'])) : '000000');
164
- $lightbox_close_btn_size = (isset($_POST['lightbox_close_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_size'])) : 1);
165
- $lightbox_close_btn_width = (isset($_POST['lightbox_close_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_width'])) : 1);
166
- $lightbox_close_btn_height = (isset($_POST['lightbox_close_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_height'])) : 1);
167
- $lightbox_close_btn_top = (isset($_POST['lightbox_close_btn_top']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_top'])) : '');
168
- $lightbox_close_btn_right = (isset($_POST['lightbox_close_btn_right']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_right'])) : '');
169
- $lightbox_close_btn_full_color = (isset($_POST['lightbox_close_btn_full_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_full_color'])) : '000000');
170
- $lightbox_close_btn_transparent = (isset($_POST['lightbox_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_transparent'])) : 1);
171
- $lightbox_rl_btn_bg_color = (isset($_POST['lightbox_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_bg_color'])) : '000000');
172
- $lightbox_rl_btn_transparent = (isset($_POST['lightbox_rl_btn_transparent']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_transparent'])) : 100);
173
- $lightbox_rl_btn_border_radius = (isset($_POST['lightbox_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_radius'])) : '');
174
- $lightbox_rl_btn_border_width = (isset($_POST['lightbox_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_border_width'])) : 1);
175
- $lightbox_rl_btn_border_style = (isset($_POST['lightbox_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_style'])) : 'solid');
176
- $lightbox_rl_btn_border_color = (isset($_POST['lightbox_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_color'])) : '000000');
177
- $lightbox_rl_btn_box_shadow = (isset($_POST['lightbox_rl_btn_box_shadow']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_box_shadow'])) : '');
178
- $lightbox_rl_btn_color = (isset($_POST['lightbox_rl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_color'])) : '000000');
179
- $lightbox_rl_btn_height = (isset($_POST['lightbox_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_height'])) : 1);
180
- $lightbox_rl_btn_width = (isset($_POST['lightbox_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_width'])) : 1);
181
- $lightbox_rl_btn_size = (isset($_POST['lightbox_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_size'])) : 1);
182
- $lightbox_close_rl_btn_hover_color = (isset($_POST['lightbox_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['lightbox_close_rl_btn_hover_color'])) : '000000');
183
- $lightbox_comment_pos = (isset($_POST['lightbox_comment_pos']) ? esc_html(stripslashes( $_POST['lightbox_comment_pos'])) : 'left');
184
- $lightbox_comment_width = (isset($_POST['lightbox_comment_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_width'])) : 1);
185
- $lightbox_comment_bg_color = (isset($_POST['lightbox_comment_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_bg_color'])) : '000000');
186
- $lightbox_comment_font_color = (isset($_POST['lightbox_comment_font_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_font_color'])) : '000000');
187
- $lightbox_comment_font_style = (isset($_POST['lightbox_comment_font_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_font_style'])) : '');
188
- $lightbox_comment_font_size = (isset($_POST['lightbox_comment_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_font_size'])) : 1 );
189
- $lightbox_comment_button_bg_color = (isset($_POST['lightbox_comment_button_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_bg_color'])) : '000000');
190
- $lightbox_comment_button_border_color = (isset($_POST['lightbox_comment_button_border_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_color'])) : '000000');
191
- $lightbox_comment_button_border_width = (isset($_POST['lightbox_comment_button_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_button_border_width'])) : 1);
192
- $lightbox_comment_button_border_style = (isset($_POST['lightbox_comment_button_border_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_style'])) : 'solid');
193
- $lightbox_comment_button_border_radius = (isset($_POST['lightbox_comment_button_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_radius'])) : '');
194
- $lightbox_comment_button_padding = (isset($_POST['lightbox_comment_button_padding']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_padding'])) : '');
195
- $lightbox_comment_input_bg_color = (isset($_POST['lightbox_comment_input_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_bg_color'])) : '000000');
196
- $lightbox_comment_input_border_color = (isset($_POST['lightbox_comment_input_border_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_color'])) : '000000');
197
- $lightbox_comment_input_border_width = (isset($_POST['lightbox_comment_input_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_input_border_width'])) : 1);
198
- $lightbox_comment_input_border_style = (isset($_POST['lightbox_comment_input_border_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_style'])) : 'solid');
199
- $lightbox_comment_input_border_radius = (isset($_POST['lightbox_comment_input_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_radius'])) : '');
200
- $lightbox_comment_input_padding = (isset($_POST['lightbox_comment_input_padding']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_padding'])) : '');
201
- $lightbox_comment_separator_width = (isset($_POST['lightbox_comment_separator_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_separator_width'])) : 1);
202
- $lightbox_comment_separator_style = (isset($_POST['lightbox_comment_separator_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_separator_style'])) : 'solid');
203
- $lightbox_comment_separator_color = (isset($_POST['lightbox_comment_separator_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_separator_color'])) : '000000');
204
- $lightbox_comment_author_font_size = (isset($_POST['lightbox_comment_author_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_author_font_size'])) : 1);
205
- $lightbox_comment_date_font_size = (isset($_POST['lightbox_comment_date_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_date_font_size'])) : 1);
206
- $lightbox_comment_body_font_size = (isset($_POST['lightbox_comment_body_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_body_font_size'])) : 1);
207
- $lightbox_comment_share_button_color = (isset($_POST['lightbox_comment_share_button_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_share_button_color'])) : '000000');
208
- $lightbox_filmstrip_rl_bg_color = (isset($_POST['lightbox_filmstrip_rl_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_bg_color'])) : '000000');
209
- $lightbox_filmstrip_rl_btn_size = (isset($_POST['lightbox_filmstrip_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_btn_size'])) : 1);
210
- $lightbox_filmstrip_rl_btn_color = (isset($_POST['lightbox_filmstrip_rl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_btn_color'])) : '000000');
211
- $lightbox_filmstrip_thumb_margin = (isset($_POST['lightbox_filmstrip_thumb_margin']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_margin'])) : '');
212
- $lightbox_filmstrip_thumb_border_width = (isset($_POST['lightbox_filmstrip_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_width'])) : 1);
213
- $lightbox_filmstrip_thumb_border_style = (isset($_POST['lightbox_filmstrip_thumb_border_style']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_style'])) : 'solid');
214
- $lightbox_filmstrip_thumb_border_color = (isset($_POST['lightbox_filmstrip_thumb_border_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_color'])) : '000000');
215
- $lightbox_filmstrip_thumb_border_radius = (isset($_POST['lightbox_filmstrip_thumb_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_radius'])) : '');
216
- $lightbox_filmstrip_thumb_deactive_transparent = (isset($_POST['lightbox_filmstrip_thumb_deactive_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_deactive_transparent'])) : 1);
217
- $lightbox_filmstrip_pos = (isset($_POST['lightbox_filmstrip_pos']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_pos'])) : 'top');
218
- $lightbox_filmstrip_thumb_active_border_width = (isset($_POST['lightbox_filmstrip_thumb_active_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_active_border_width'])) : 1);
219
- $lightbox_filmstrip_thumb_active_border_color = (isset($_POST['lightbox_filmstrip_thumb_active_border_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_active_border_color'])) : '000000');
220
- $lightbox_overlay_bg_transparent = (isset($_POST['lightbox_overlay_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_overlay_bg_transparent'])) : 80);
221
- $lightbox_bg_color = (isset($_POST['lightbox_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_bg_color'])) : '000000');
222
- $lightbox_overlay_bg_color = (isset($_POST['lightbox_overlay_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_overlay_bg_color'])) : '000000');
223
- $lightbox_rl_btn_style = (isset($_POST['lightbox_rl_btn_style']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_style'])) : 'fa-chevron');
224
- $lightbox_bg_transparent = (isset($_POST['lightbox_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_bg_transparent'])) : 100);
225
-
226
- $blog_style_margin = (isset($_POST['blog_style_margin']) ? esc_html(stripslashes( $_POST['blog_style_margin'])) : '');
227
- $blog_style_padding = (isset($_POST['blog_style_padding']) ? esc_html(stripslashes( $_POST['blog_style_padding'])) : '');
228
- $blog_style_border_radius = (isset($_POST['blog_style_border_radius']) ? esc_html(stripslashes( $_POST['blog_style_border_radius'])) :'');
229
- $blog_style_border_width = (isset($_POST['blog_style_border_width']) ? (int) esc_html(stripslashes( $_POST['blog_style_border_width'])) : 1);
230
- $blog_style_border_style = (isset($_POST['blog_style_border_style']) ? esc_html(stripslashes( $_POST['blog_style_border_style'])) : 'solid');
231
- $blog_style_border_color = (isset($_POST['blog_style_border_color']) ? esc_html(stripslashes( $_POST['blog_style_border_color'])) : '000000');
232
- $blog_style_bg_color = (isset($_POST['blog_style_bg_color']) ? esc_html(stripslashes( $_POST['blog_style_bg_color'])) : 'FFFFFF');
233
- $blog_style_box_shadow = (isset($_POST['blog_style_box_shadow']) ? esc_html(stripslashes( $_POST['blog_style_box_shadow'])) : '');
234
- $blog_style_transparent = (isset($_POST['blog_style_transparent']) ? (int) esc_html(stripslashes( $_POST['blog_style_transparent'])) : 0);
235
- $blog_style_align = (isset($_POST['blog_style_align']) ? esc_html(stripslashes( $_POST['blog_style_align'])) : '');
236
- $blog_style_share_buttons_margin = (isset($_POST['blog_style_share_buttons_margin']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_margin'])) : '');
237
- $blog_style_share_buttons_border_radius = (isset($_POST['blog_style_share_buttons_border_radius']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_radius'])) :'');
238
- $blog_style_share_buttons_border_width = (isset($_POST['blog_style_share_buttons_border_width']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_border_width'])) : 1);
239
- $blog_style_share_buttons_border_style = (isset($_POST['blog_style_share_buttons_border_style']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_style'])) : 'solid');
240
- $blog_style_share_buttons_border_color = (isset($_POST['blog_style_share_buttons_border_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_color'])) : '000000');
241
- $blog_style_share_buttons_bg_color = (isset($_POST['blog_style_share_buttons_bg_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_bg_color'])) : 'FFFFFF');
242
- $blog_style_share_buttons_align = (isset($_POST['blog_style_share_buttons_align']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_align'])) : '');
243
- $blog_style_img_font_size = (isset($_POST['blog_style_img_font_size']) ? (int) esc_html(stripslashes( $_POST['blog_style_img_font_size'])) : 1);
244
- $blog_style_img_font_family = (isset($_POST['blog_style_img_font_family']) ? esc_html(stripslashes( $_POST['blog_style_img_font_family'])) : 'segoe ui');
245
- $blog_style_img_font_color = (isset($_POST['blog_style_img_font_color']) ? esc_html(stripslashes( $_POST['blog_style_img_font_color'])) : '000000');
246
- $blog_style_share_buttons_font_size = (isset($_POST['blog_style_share_buttons_font_size']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_font_size'])) : 20);
247
- $blog_style_share_buttons_color = (isset($_POST['blog_style_share_buttons_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_color'])) : 'C7C3C3');
248
- $blog_style_share_buttons_bg_transparent = (isset($_POST['blog_style_share_buttons_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_bg_transparent'])) : 0);
249
-
250
- $image_browser_margin = (isset($_POST['image_browser_margin']) ? esc_html(stripslashes( $_POST['image_browser_margin'])) : '');
251
- $image_browser_padding = (isset($_POST['image_browser_padding']) ? esc_html(stripslashes( $_POST['image_browser_padding'])) : '');
252
- $image_browser_border_radius = (isset($_POST['image_browser_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_border_radius'])) :'');
253
- $image_browser_border_width = (isset($_POST['image_browser_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_border_width'])) : 1);
254
- $image_browser_border_style = (isset($_POST['image_browser_border_style']) ? esc_html(stripslashes( $_POST['image_browser_border_style'])) : 'solid');
255
- $image_browser_border_color = (isset($_POST['image_browser_border_color']) ? esc_html(stripslashes( $_POST['image_browser_border_color'])) : '000000');
256
- $image_browser_bg_color = (isset($_POST['image_browser_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_bg_color'])) : 'FFFFFF');
257
- $image_browser_box_shadow = (isset($_POST['image_browser_box_shadow']) ? esc_html(stripslashes( $_POST['image_browser_box_shadow'])) : '');
258
- $image_browser_transparent = (isset($_POST['image_browser_transparent']) ? (int) esc_html(stripslashes( $_POST['image_browser_transparent'])) : 0);
259
- $image_browser_align = (isset($_POST['image_browser_align']) ? esc_html(stripslashes( $_POST['image_browser_align'])) : '');
260
- $image_browser_image_description_margin = (isset($_POST['image_browser_image_description_margin']) ? esc_html(stripslashes( $_POST['image_browser_image_description_margin'])) : '');
261
- $image_browser_image_description_padding = (isset($_POST['image_browser_image_description_padding']) ? esc_html(stripslashes( $_POST['image_browser_image_description_padding'])) : '');
262
- $image_browser_image_description_border_radius = (isset($_POST['image_browser_image_description_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_radius'])) :'');
263
- $image_browser_image_description_border_width = (isset($_POST['image_browser_image_description_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_image_description_border_width'])) : 1);
264
- $image_browser_image_description_border_style = (isset($_POST['image_browser_image_description_border_style']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_style'])) : 'solid');
265
- $image_browser_image_description_border_color = (isset($_POST['image_browser_image_description_border_color']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_color'])) : '000000');
266
- $image_browser_image_description_bg_color = (isset($_POST['image_browser_image_description_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_image_description_bg_color'])) : 'FFFFFF');
267
- $image_browser_image_description_align = (isset($_POST['image_browser_image_description_align']) ? esc_html(stripslashes( $_POST['image_browser_image_description_align'])) : '');
268
- $image_browser_img_font_size = (isset($_POST['image_browser_img_font_size']) ? (int) esc_html(stripslashes( $_POST['image_browser_img_font_size'])) : 1);
269
- $image_browser_img_font_family = (isset($_POST['image_browser_img_font_family']) ? esc_html(stripslashes( $_POST['image_browser_img_font_family'])) : 'segoe ui');
270
- $image_browser_img_font_color = (isset($_POST['image_browser_img_font_color']) ? esc_html(stripslashes( $_POST['image_browser_img_font_color'])) : '000000');
271
- $image_browser_full_padding = (isset($_POST['image_browser_full_padding']) ? esc_html(stripslashes( $_POST['image_browser_full_padding'])) : '');
272
- $image_browser_full_border_radius = (isset($_POST['image_browser_full_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_full_border_radius'])) :'');
273
- $image_browser_full_border_width = (isset($_POST['image_browser_full_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_full_border_width'])) : 1);
274
- $image_browser_full_border_style = (isset($_POST['image_browser_full_border_style']) ? esc_html(stripslashes( $_POST['image_browser_full_border_style'])) : 'solid');
275
- $image_browser_full_border_color = (isset($_POST['image_browser_full_border_color']) ? esc_html(stripslashes( $_POST['image_browser_full_border_color'])) : '000000');
276
- $image_browser_full_bg_color = (isset($_POST['image_browser_full_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_full_bg_color'])) : 'FFFFFF');
277
- $image_browser_full_transparent = (isset($_POST['image_browser_full_transparent']) ? (int) esc_html(stripslashes( $_POST['image_browser_full_transparent'])) : 0);
278
- $image_browser_image_title_align = (isset($_POST['image_browser_image_title_align']) ? esc_html(stripslashes( $_POST['image_browser_image_title_align'])) : 'top');
279
-
280
- $album_compact_title_margin = (isset($_POST['album_compact_title_margin']) ? esc_html(stripslashes( $_POST['album_compact_title_margin'])) : '');
281
- $album_compact_title_font_style = (isset($_POST['album_compact_title_font_style']) ? esc_html(stripslashes( $_POST['album_compact_title_font_style'])) : 'inherit');
282
- $album_compact_thumb_title_pos = (isset($_POST['album_compact_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_compact_thumb_title_pos'])) :'bottom');
283
- $album_compact_title_font_color = (isset($_POST['album_compact_title_font_color']) ? esc_html(stripslashes( $_POST['album_compact_title_font_color'])) : 'CCCCCC');
284
- $album_compact_title_shadow = (isset($_POST['album_compact_title_shadow']) ? esc_html(stripslashes( $_POST['album_compact_title_shadow'])) : '');
285
- $album_compact_title_font_size = (isset($_POST['album_compact_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_title_font_size'])) : 12);
286
- $album_compact_title_font_weight = (isset($_POST['album_compact_title_font_weight']) ? esc_html(stripslashes( $_POST['album_compact_title_font_weight'])) : 'normal');
287
- $album_compact_thumb_margin = (isset($_POST['album_compact_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_margin'])) : 0);
288
- $album_compact_back_padding = (isset($_POST['album_compact_back_padding']) ? esc_html(stripslashes( $_POST['album_compact_back_padding'])) : '');
289
- $album_compact_thumb_padding = (isset($_POST['album_compact_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_padding'])) : 0);
290
- $album_compact_thumb_border_radius = (isset($_POST['album_compact_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_radius'])) :'');
291
- $album_compact_thumb_border_width = (isset($_POST['album_compact_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_border_width'])) : 1);
292
- $album_compact_back_font_color = (isset($_POST['album_compact_back_font_color']) ? esc_html(stripslashes( $_POST['album_compact_back_font_color'])) : '000000');
293
- $album_compact_thumb_bg_transparent = (isset($_POST['album_compact_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_bg_transparent'])) : 0);
294
- $album_compact_thumb_box_shadow = (isset($_POST['album_compact_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_compact_thumb_box_shadow'])) : '');
295
- $album_compact_thumb_transition = (isset($_POST['album_compact_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_transition'])) : 1);
296
- $album_compact_thumb_border_style = (isset($_POST['album_compact_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_style'])) : 'solid');
297
- $album_compact_thumb_border_color = (isset($_POST['album_compact_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_color'])) : '000000');
298
- $album_compact_thumb_bg_color = (isset($_POST['album_compact_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_compact_thumb_bg_color'])) : 'FFFFFF');
299
- $album_compact_back_font_weight = (isset($_POST['album_compact_back_font_weight']) ? esc_html(stripslashes( $_POST['album_compact_back_font_weight'])) : 'normal');
300
- $album_compact_back_font_size = (isset($_POST['album_compact_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_back_font_size'])) : 12);
301
- $album_compact_back_font_style = (isset($_POST['album_compact_back_font_style']) ? esc_html(stripslashes( $_POST['album_compact_back_font_style'])) : 'inherit');
302
- $album_compact_thumbs_bg_color = (isset($_POST['album_compact_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_compact_thumbs_bg_color'])) : 'FFFFFF');
303
- $album_compact_thumb_align = (isset($_POST['album_compact_thumb_align']) ? esc_html(stripslashes( $_POST['album_compact_thumb_align'])) : 'center');
304
- $album_compact_thumb_hover_effect = (isset($_POST['album_compact_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_compact_thumb_hover_effect'])) :'skew');
305
- $album_compact_thumb_transparent = (isset($_POST['album_compact_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_transparent'])) : 80);
306
- $album_compact_thumb_hover_effect_value = (isset($_POST['album_compact_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_compact_thumb_hover_effect_value'])) : '35deg');
307
- $album_extended_thumb_margin = (isset($_POST['album_extended_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_margin'])) : 0);
308
- $album_extended_thumb_padding = (isset($_POST['album_extended_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_padding'])) : 0);
309
- $album_extended_thumb_border_radius = (isset($_POST['album_extended_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_radius'])) : '');
310
- $album_extended_thumb_border_width = (isset($_POST['album_extended_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_border_width'])) :1);
311
- $album_extended_thumb_border_style = (isset($_POST['album_extended_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_style'])) :'solid');
312
- $album_extended_thumb_border_color = (isset($_POST['album_extended_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_color'])) : '000000');
313
- $album_extended_thumb_bg_color = (isset($_POST['album_extended_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_bg_color'])) : 'FFFFFF');
314
- $album_extended_thumbs_bg_color = (isset($_POST['album_extended_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumbs_bg_color'])) : 'FFFFFF');
315
- $album_extended_thumb_bg_transparent = (isset($_POST['album_extended_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_bg_transparent'])) : 80);
316
- $album_extended_thumb_box_shadow = (isset($_POST['album_extended_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_extended_thumb_box_shadow'])) : '');
317
- $album_extended_thumb_transparent = (isset($_POST['album_extended_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_transparent'])) : 80);
318
- $album_extended_thumb_align = (isset($_POST['album_extended_thumb_align']) ? esc_html(stripslashes( $_POST['album_extended_thumb_align'])) : 'center');
319
- $album_extended_thumb_hover_effect = (isset($_POST['album_extended_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_extended_thumb_hover_effect'])) : '');
320
- $album_extended_thumb_hover_effect_value = (isset($_POST['album_extended_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_extended_thumb_hover_effect_value'])) : '32deg');
321
- $album_extended_thumb_transition = (isset($_POST['album_extended_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_transition'])) : 0);
322
- $album_extended_back_font_color = (isset($_POST['album_extended_back_font_color']) ? esc_html(stripslashes( $_POST['album_extended_back_font_color'])) : '000000');
323
- $album_extended_back_font_style = (isset($_POST['album_extended_back_font_style']) ? esc_html(stripslashes( $_POST['album_extended_back_font_style'])) : 'inherit');
324
- $album_extended_back_font_size = (isset($_POST['album_extended_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_back_font_size'])) : 12);
325
- $album_extended_back_font_weight = (isset($_POST['album_extended_back_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_back_font_weight'])) : 'normal');
326
- $album_extended_back_padding = (isset($_POST['album_extended_back_padding']) ? esc_html(stripslashes( $_POST['album_extended_back_padding'])) : '');
327
- $album_extended_div_bg_color = (isset($_POST['album_extended_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_div_bg_color'])) : 'FFFFFF');
328
- $album_extended_div_bg_transparent = (isset($_POST['album_extended_div_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_bg_transparent'])) : 80);
329
- $album_extended_div_border_radius = (isset($_POST['album_extended_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_div_border_radius'])) : '');
330
- $album_extended_div_margin = (isset($_POST['album_extended_div_margin']) ? esc_html(stripslashes( $_POST['album_extended_div_margin'])) : '');
331
- $album_extended_div_padding = (isset($_POST['album_extended_div_padding']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_padding'])) : 0);
332
- $album_extended_div_separator_width = (isset($_POST['album_extended_div_separator_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_separator_width'])) : 1);
333
- $album_extended_div_separator_style = (isset($_POST['album_extended_div_separator_style']) ? esc_html(stripslashes( $_POST['album_extended_div_separator_style'])) : 'solid');
334
- $album_extended_div_separator_color = (isset($_POST['album_extended_div_separator_color']) ? esc_html(stripslashes( $_POST['album_extended_div_separator_color'])) : '000000');
335
- $album_extended_thumb_div_bg_color = (isset($_POST['album_extended_thumb_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_bg_color'])) : 'FFFFFF');
336
- $album_extended_thumb_div_border_radius = (isset($_POST['album_extended_thumb_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_radius'])) : '');
337
- $album_extended_thumb_div_border_width = (isset($_POST['album_extended_thumb_div_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_div_border_width'])) : 1);
338
- $album_extended_thumb_div_border_style = (isset($_POST['album_extended_thumb_div_border_style']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_style'])) : 'solid');
339
- $album_extended_thumb_div_border_color = (isset($_POST['album_extended_thumb_div_border_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_color'])) : '000000');
340
- $album_extended_thumb_div_padding = (isset($_POST['album_extended_thumb_div_padding']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_padding'])) : '');
341
- $album_extended_text_div_bg_color = (isset($_POST['album_extended_text_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_text_div_bg_color'])) : 'FFFFFF');
342
- $album_extended_text_div_border_radius = (isset($_POST['album_extended_text_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_radius'])) : '');
343
- $album_extended_text_div_border_width = (isset($_POST['album_extended_text_div_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_text_div_border_width'])) : 1);
344
- $album_extended_text_div_border_style = (isset($_POST['album_extended_text_div_border_style']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_style'])) : 'solid');
345
- $album_extended_text_div_border_color = (isset($_POST['album_extended_text_div_border_color']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_color'])) : '000000');
346
- $album_extended_text_div_padding = (isset($_POST['album_extended_text_div_padding']) ? esc_html(stripslashes( $_POST['album_extended_text_div_padding'])) : '');
347
- $album_extended_title_span_border_width = (isset($_POST['album_extended_title_span_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_span_border_width'])) : 1);
348
- $album_extended_title_span_border_style = (isset($_POST['album_extended_title_span_border_style']) ? esc_html(stripslashes( $_POST['album_extended_title_span_border_style'])) : 'solid');
349
- $album_extended_title_span_border_color = (isset($_POST['album_extended_title_span_border_color']) ? esc_html(stripslashes( $_POST['album_extended_title_span_border_color'])) : '000000');
350
- $album_extended_title_font_color = (isset($_POST['album_extended_title_font_color']) ? esc_html(stripslashes( $_POST['album_extended_title_font_color'])) : '000000');
351
- $album_extended_title_font_style = (isset($_POST['album_extended_title_font_style']) ? esc_html(stripslashes( $_POST['album_extended_title_font_style'])) : 'inherit');
352
- $album_extended_title_font_size = (isset($_POST['album_extended_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_font_size'])) : 12);
353
- $album_extended_title_font_weight = (isset($_POST['album_extended_title_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_title_font_weight'])) : 'normal');
354
- $album_extended_title_margin_bottom = (isset($_POST['album_extended_title_margin_bottom']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_margin_bottom'])) : 0);
355
- $album_extended_title_padding = (isset($_POST['album_extended_title_padding']) ? esc_html(stripslashes( $_POST['album_extended_title_padding'])) : '');
356
- $album_extended_desc_span_border_width = (isset($_POST['album_extended_desc_span_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_span_border_width'])) : 1);
357
- $album_extended_desc_span_border_style = (isset($_POST['album_extended_desc_span_border_style']) ? esc_html(stripslashes( $_POST['album_extended_desc_span_border_style'])) : 'solid');
358
- $album_extended_desc_span_border_color = (isset($_POST['album_extended_desc_span_border_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_span_border_color'])) : '000000');
359
- $album_extended_desc_font_color = (isset($_POST['album_extended_desc_font_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_color'])) : '000000');
360
- $album_extended_desc_font_style = (isset($_POST['album_extended_desc_font_style']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_style'])) : 'inherit');
361
- $album_extended_desc_font_size = (isset($_POST['album_extended_desc_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_font_size'])) : 12);
362
- $album_extended_desc_font_weight = (isset($_POST['album_extended_desc_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_weight'])) : 'normal');
363
- $album_extended_desc_padding = (isset($_POST['album_extended_desc_padding']) ? esc_html(stripslashes( $_POST['album_extended_desc_padding'])) : '');
364
- $album_extended_desc_more_color = (isset($_POST['album_extended_desc_more_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_more_color'])) : '000000');
365
- $album_extended_desc_more_size = (isset($_POST['album_extended_desc_more_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_more_size'])) : 12);
366
-
367
- $album_masonry_title_margin = (isset($_POST['album_masonry_title_margin']) ? esc_html(stripslashes( $_POST['album_masonry_title_margin'])) : '');
368
- $album_masonry_title_font_style = (isset($_POST['album_masonry_title_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_style'])) : 'inherit');
369
- $album_masonry_thumb_title_pos = (isset($_POST['album_masonry_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_title_pos'])) :'bottom');
370
- $album_masonry_title_font_color = (isset($_POST['album_masonry_title_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_color'])) : 'CCCCCC');
371
- $album_masonry_title_shadow = (isset($_POST['album_masonry_title_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_title_shadow'])) : '');
372
- $album_masonry_title_font_size = (isset($_POST['album_masonry_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_title_font_size'])) : 12);
373
- $album_masonry_title_font_weight = (isset($_POST['album_masonry_title_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_weight'])) : 'normal');
374
- $album_masonry_thumb_margin = (isset($_POST['album_masonry_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_margin'])) : 0);
375
- $album_masonry_back_padding = (isset($_POST['album_masonry_back_padding']) ? esc_html(stripslashes( $_POST['album_masonry_back_padding'])) : '');
376
- $album_masonry_thumb_padding = (isset($_POST['album_masonry_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_padding'])) : 0);
377
- $album_masonry_thumb_border_radius = (isset($_POST['album_masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_radius'])) :'');
378
- $album_masonry_thumb_border_width = (isset($_POST['album_masonry_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_border_width'])) : 1);
379
- $album_masonry_back_font_color = (isset($_POST['album_masonry_back_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_color'])) : '000000');
380
- $album_masonry_thumb_bg_transparent = (isset($_POST['album_masonry_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_bg_transparent'])) : 0);
381
- $album_masonry_thumb_box_shadow = (isset($_POST['album_masonry_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_box_shadow'])) : '');
382
- $album_masonry_thumb_transition = (isset($_POST['album_masonry_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transition'])) : 1);
383
- $album_masonry_thumb_border_style = (isset($_POST['album_masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_style'])) : 'solid');
384
- $album_masonry_thumb_border_color = (isset($_POST['album_masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_color'])) : '000000');
385
- $album_masonry_thumb_bg_color = (isset($_POST['album_masonry_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_bg_color'])) : 'FFFFFF');
386
- $album_masonry_back_font_weight = (isset($_POST['album_masonry_back_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_weight'])) : 'normal');
387
- $album_masonry_back_font_size = (isset($_POST['album_masonry_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_back_font_size'])) : 12);
388
- $album_masonry_back_font_style = (isset($_POST['album_masonry_back_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_style'])) : 'inherit');
389
- $album_masonry_thumbs_bg_color = (isset($_POST['album_masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumbs_bg_color'])) : 'FFFFFF');
390
- $album_masonry_thumb_align = (isset($_POST['album_masonry_thumb_align']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_align'])) : 'center');
391
- $album_masonry_thumb_hover_effect = (isset($_POST['album_masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect'])) :'skew');
392
- $album_masonry_thumb_transparent = (isset($_POST['album_masonry_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transparent'])) : 80);
393
- $album_masonry_thumb_hover_effect_value = (isset($_POST['album_masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect_value'])) : '35deg');
394
-
395
- $slideshow_cont_bg_color = (isset($_POST['slideshow_cont_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_cont_bg_color'])) : 'FFFFFF');
396
- $slideshow_close_btn_transparent = (isset($_POST['slideshow_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_close_btn_transparent'])) : 80);
397
- $slideshow_rl_btn_bg_color = (isset($_POST['slideshow_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_bg_color'])) : 'FFFFFF');
398
- $slideshow_rl_btn_border_radius = (isset($_POST['slideshow_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_radius'])) : '');
399
- $slideshow_rl_btn_border_width = (isset($_POST['slideshow_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_border_width'])) : 1);
400
- $slideshow_rl_btn_border_style = (isset($_POST['slideshow_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_style'])) : 'solid');
401
- $slideshow_rl_btn_border_color = (isset($_POST['slideshow_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_color'])) : '000000');
402
- $slideshow_rl_btn_box_shadow = (isset($_POST['slideshow_rl_btn_box_shadow']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_box_shadow'])) : '');
403
- $slideshow_rl_btn_color = (isset($_POST['slideshow_rl_btn_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_color'])) : '000000');
404
- $slideshow_rl_btn_height = (isset($_POST['slideshow_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_height'])) : 10);
405
- $slideshow_rl_btn_size = (isset($_POST['slideshow_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_size'])) : 13);
406
- $slideshow_rl_btn_width = (isset($_POST['slideshow_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_width'])) : 30);
407
- $slideshow_close_rl_btn_hover_color = (isset($_POST['slideshow_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['slideshow_close_rl_btn_hover_color'])) : 'FFFFFF');
408
- $slideshow_filmstrip_pos = (isset($_POST['slideshow_filmstrip_pos']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_pos'])) : 'top');
409
- $slideshow_filmstrip_thumb_border_width = (isset($_POST['slideshow_filmstrip_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_width'])) : 1);
410
- $slideshow_filmstrip_thumb_border_style = (isset($_POST['slideshow_filmstrip_thumb_border_style']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_style'])) : 'solid');
411
- $slideshow_filmstrip_thumb_border_color = (isset($_POST['slideshow_filmstrip_thumb_border_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_color'])) : '000000');
412
- $slideshow_filmstrip_thumb_border_radius = (isset($_POST['slideshow_filmstrip_thumb_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_radius'])) : '');
413
- $slideshow_filmstrip_thumb_margin = (isset($_POST['slideshow_filmstrip_thumb_margin']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_margin'])) : '');
414
- $slideshow_filmstrip_thumb_active_border_width = (isset($_POST['slideshow_filmstrip_thumb_active_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_active_border_width'])) : 1);
415
- $slideshow_filmstrip_thumb_active_border_color = (isset($_POST['slideshow_filmstrip_thumb_active_border_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_active_border_color'])) : '000000');
416
- $slideshow_filmstrip_thumb_deactive_transparent = (isset($_POST['slideshow_filmstrip_thumb_deactive_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_deactive_transparent'])) : 80);
417
- $slideshow_filmstrip_rl_bg_color = (isset($_POST['slideshow_filmstrip_rl_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_bg_color'])) : 'FFFFFF');
418
- $slideshow_filmstrip_rl_btn_color = (isset($_POST['slideshow_filmstrip_rl_btn_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_btn_color'])) : 'FFFFFF');
419
- $slideshow_filmstrip_rl_btn_size = (isset($_POST['slideshow_filmstrip_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_btn_size'])) : 15);
420
- $slideshow_title_font_size = (isset($_POST['slideshow_title_font_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_title_font_size'])) : 15);
421
- $slideshow_title_font = (isset($_POST['slideshow_title_font']) ? esc_html(stripslashes( $_POST['slideshow_title_font'])) : 'segoe ui');
422
- $slideshow_title_color = (isset($_POST['slideshow_title_color']) ? esc_html(stripslashes( $_POST['slideshow_title_color'])) : '000000');
423
- $slideshow_title_opacity = (isset($_POST['slideshow_title_opacity']) ? (int) esc_html(stripslashes( $_POST['slideshow_title_opacity'])) : 80);
424
- $slideshow_title_border_radius = (isset($_POST['slideshow_title_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_title_border_radius'])) : '');
425
- $slideshow_title_background_color = (isset($_POST['slideshow_title_background_color']) ? esc_html(stripslashes( $_POST['slideshow_title_background_color'])) : 'FFFFFF');
426
- $slideshow_title_padding = (isset($_POST['slideshow_title_padding']) ? esc_html(stripslashes( $_POST['slideshow_title_padding'])) : '');
427
- $slideshow_description_font_size = (isset($_POST['slideshow_description_font_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_description_font_size'])) : 15);
428
- $slideshow_description_font = (isset($_POST['slideshow_description_font']) ? esc_html(stripslashes( $_POST['slideshow_description_font'])) : 'segoe ui');
429
- $slideshow_description_color = (isset($_POST['slideshow_description_color']) ? esc_html(stripslashes( $_POST['slideshow_description_color'])) : '000000');
430
- $slideshow_description_opacity = (isset($_POST['slideshow_description_opacity']) ? (int) esc_html(stripslashes( $_POST['slideshow_description_opacity'])) : 80);
431
- $slideshow_description_border_radius = (isset($_POST['slideshow_description_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_description_border_radius'])) : '');
432
- $slideshow_description_background_color = (isset($_POST['slideshow_description_background_color']) ? esc_html(stripslashes( $_POST['slideshow_description_background_color'])) : 'FFFFFF');
433
- $slideshow_description_padding = (isset($_POST['slideshow_description_padding']) ? esc_html(stripslashes( $_POST['slideshow_description_padding'])) : '');
434
- $slideshow_dots_width = (isset($_POST['slideshow_dots_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_width'])) : 5);
435
- $slideshow_dots_height = (isset($_POST['slideshow_dots_height']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_height'])) : 5);
436
- $slideshow_dots_border_radius = (isset($_POST['slideshow_dots_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_dots_border_radius'])) : '');
437
- $slideshow_dots_background_color = (isset($_POST['slideshow_dots_background_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_background_color'])) : 'FFFFFF');
438
- $slideshow_dots_margin = (isset($_POST['slideshow_dots_margin']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_margin'])) : 0);
439
- $slideshow_dots_active_background_color = (isset($_POST['slideshow_dots_active_background_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_active_background_color'])) : 'FFFFFF');
440
- $slideshow_dots_active_border_width = (isset($_POST['slideshow_dots_active_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_active_border_width'])) : 1);
441
- $slideshow_dots_active_border_color = (isset($_POST['slideshow_dots_active_border_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_active_border_color'])) : '000000');
442
- $slideshow_play_pause_btn_size = (isset($_POST['slideshow_play_pause_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_play_pause_btn_size'])) : 15);
443
- $slideshow_rl_btn_style = (isset($_POST['slideshow_rl_btn_style']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_style'])) : 'fa-chevron');
444
-
445
- $masonry_thumb_padding = (isset($_POST['masonry_thumb_padding']) ? esc_html(stripslashes( $_POST['masonry_thumb_padding'])) : 4);
446
- $masonry_thumb_border_radius = (isset($_POST['masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_radius'])) : '2px');
447
- $masonry_thumb_border_width = (isset($_POST['masonry_thumb_border_width']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_width'])) : 1);
448
- $masonry_thumb_border_style = (isset($_POST['masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_style'])) : 'solid');
449
- $masonry_thumb_border_color = (isset($_POST['masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_color'])) : 'CCCCCC');
450
- $masonry_thumbs_bg_color = (isset($_POST['masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['masonry_thumbs_bg_color'])) : 'FFFFFF');
451
- $masonry_thumb_bg_transparent = (isset($_POST['masonry_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['masonry_thumb_bg_transparent'])) : 0);
452
- $masonry_thumb_transparent = (isset($_POST['masonry_thumb_transparent']) ? esc_html(stripslashes( $_POST['masonry_thumb_transparent'])) : 100);
453
- $masonry_thumb_align = (isset($_POST['masonry_thumb_align']) ? esc_html(stripslashes( $_POST['masonry_thumb_align'])) : 'left');
454
- $masonry_thumb_hover_effect = (isset($_POST['masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect'])) : 'scale');
455
- $masonry_thumb_hover_effect_value = (isset($_POST['masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect_value'])) : '1.3');
456
- $masonry_thumb_transition = (isset($_POST['masonry_thumb_transition']) ? esc_html(stripslashes( $_POST['masonry_thumb_transition'])) : 0);
457
-
458
- $mosaic_thumb_padding = (isset($_POST['mosaic_thumb_padding']) ? esc_html(stripslashes( $_POST['mosaic_thumb_padding'])) : 4);
459
- $mosaic_thumb_border_radius = (isset($_POST['mosaic_thumb_border_radius']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_radius'])) : '2px');
460
- $mosaic_thumb_border_width = (isset($_POST['mosaic_thumb_border_width']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_width'])) : 1);
461
- $mosaic_thumb_border_style = (isset($_POST['mosaic_thumb_border_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_style'])) : 'solid');
462
- $mosaic_thumb_border_color = (isset($_POST['mosaic_thumb_border_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_color'])) : 'CCCCCC');
463
- $mosaic_thumbs_bg_color = (isset($_POST['mosaic_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['mosaic_thumbs_bg_color'])) : 'FFFFFF');
464
- $mosaic_thumb_bg_transparent = (isset($_POST['mosaic_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_bg_transparent'])) : 0);
465
- $mosaic_thumb_transparent = (isset($_POST['mosaic_thumb_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transparent'])) : 100);
466
- $mosaic_thumb_align = (isset($_POST['mosaic_thumb_align']) ? esc_html(stripslashes( $_POST['mosaic_thumb_align'])) : 'left');
467
- $mosaic_thumb_hover_effect = (isset($_POST['mosaic_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect'])) : 'scale');
468
- $mosaic_thumb_hover_effect_value = (isset($_POST['mosaic_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect_value'])) : '1.3');
469
- $mosaic_thumb_title_margin = (isset($_POST['mosaic_thumb_title_margin']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_margin'])) : '');
470
- $mosaic_thumb_title_font_style = (isset($_POST['mosaic_thumb_title_font_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_style'])) : 'inherit');
471
- $mosaic_thumb_title_font_color = (isset($_POST['mosaic_thumb_title_font_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_color'])) : 'CCCCCC');
472
- $mosaic_thumb_title_shadow = (isset($_POST['mosaic_thumb_title_shadow']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_shadow'])) : '');
473
- $mosaic_thumb_title_font_size = (isset($_POST['mosaic_thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['mosaic_thumb_title_font_size'])) : 12);
474
- $mosaic_thumb_title_font_weight = (isset($_POST['mosaic_thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_weight'])) : 'normal');
475
- $lightbox_info_pos = (isset($_POST['lightbox_info_pos']) ? esc_html(stripslashes( $_POST['lightbox_info_pos'])) : 'top');
476
- $lightbox_info_align = (isset($_POST['lightbox_info_align']) ? esc_html(stripslashes( $_POST['lightbox_info_align'])) : 'right');
477
- $lightbox_info_bg_color = (isset($_POST['lightbox_info_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_color'])) : '000000');
478
- $lightbox_info_bg_transparent = (isset($_POST['lightbox_info_bg_transparent']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_transparent'])) : 70);
479
- $lightbox_info_border_width = (isset($_POST['lightbox_info_border_width']) ? esc_html(stripslashes( $_POST['lightbox_info_border_width'])) : 1);
480
- $lightbox_info_border_style = (isset($_POST['lightbox_info_border_style']) ? esc_html(stripslashes( $_POST['lightbox_info_border_style'])) : 'none');
481
- $lightbox_info_border_color = (isset($_POST['lightbox_info_border_color']) ? esc_html(stripslashes( $_POST['lightbox_info_border_color'])) : '000000');
482
- $lightbox_info_border_radius = (isset($_POST['lightbox_info_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_info_border_radius'])) : 5);
483
- $lightbox_info_padding = (isset($_POST['lightbox_info_padding']) ? esc_html(stripslashes( $_POST['lightbox_info_padding'])) : '5px');
484
- $lightbox_info_margin = (isset($_POST['lightbox_info_margin']) ? esc_html(stripslashes( $_POST['lightbox_info_margin'])) : '15px');
485
- $lightbox_title_color = (isset($_POST['lightbox_title_color']) ? esc_html(stripslashes( $_POST['lightbox_title_color'])) : 'FFFFFF');
486
- $lightbox_title_font_style = (isset($_POST['lightbox_title_font_style']) ? esc_html(stripslashes( $_POST['lightbox_title_font_style'])) : 'segoe ui');
487
- $lightbox_title_font_weight = (isset($_POST['lightbox_title_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_title_font_weight'])) : 'bold');
488
- $lightbox_title_font_size = (isset($_POST['lightbox_title_font_size']) ? esc_html(stripslashes( $_POST['lightbox_title_font_size'])) : 18);
489
- $lightbox_description_color = (isset($_POST['lightbox_description_color']) ? esc_html(stripslashes( $_POST['lightbox_description_color'])) : 'FFFFFF');
490
- $lightbox_description_font_style = (isset($_POST['lightbox_description_font_style']) ? esc_html(stripslashes( $_POST['lightbox_description_font_style'])) : 'segoe ui');
491
- $lightbox_description_font_weight = (isset($_POST['lightbox_description_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_description_font_weight'])) : 'normal');
492
- $lightbox_description_font_size = (isset($_POST['lightbox_description_font_size']) ? esc_html(stripslashes( $_POST['lightbox_description_font_size'])) : 14);
493
- $lightbox_rate_pos = (isset($_POST['lightbox_rate_pos']) ? esc_html(stripslashes( $_POST['lightbox_rate_pos'])) : 'bottom');
494
- $lightbox_rate_align = (isset($_POST['lightbox_rate_align']) ? esc_html(stripslashes( $_POST['lightbox_rate_align'])) : 'right');
495
- $lightbox_rate_icon = (isset($_POST['lightbox_rate_icon']) ? esc_html(stripslashes( $_POST['lightbox_rate_icon'])) : 'star');
496
- $lightbox_rate_color = (isset($_POST['lightbox_rate_color']) ? esc_html(stripslashes( $_POST['lightbox_rate_color'])) : 'F9D062');
497
- $lightbox_rate_size = (isset($_POST['lightbox_rate_size']) ? esc_html(stripslashes( $_POST['lightbox_rate_size'])) : 20);
498
- $lightbox_rate_stars_count = (isset($_POST['lightbox_rate_stars_count']) ? esc_html(stripslashes( $_POST['lightbox_rate_stars_count'])) : 5);
499
- $lightbox_rate_padding = (isset($_POST['lightbox_rate_padding']) ? esc_html(stripslashes( $_POST['lightbox_rate_padding'])) : '15px');
500
- $lightbox_rate_hover_color = (isset($_POST['lightbox_rate_hover_color']) ? esc_html(stripslashes( $_POST['lightbox_rate_hover_color'])) : 'F7B50E');
501
-
502
- $lightbox_hit_pos = (isset($_POST['lightbox_hit_pos']) ? esc_html(stripslashes( $_POST['lightbox_hit_pos'])) : 'bottom');
503
- $lightbox_hit_align = (isset($_POST['lightbox_hit_align']) ? esc_html(stripslashes( $_POST['lightbox_hit_align'])) : 'left');
504
- $lightbox_hit_bg_color = (isset($_POST['lightbox_hit_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_bg_color'])) : '000000');
505
- $lightbox_hit_bg_transparent = (isset($_POST['lightbox_hit_bg_transparent']) ? esc_html(stripslashes( $_POST['lightbox_hit_bg_transparent'])) : 70);
506
- $lightbox_hit_border_width = (isset($_POST['lightbox_hit_border_width']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_width'])) : 1);
507
- $lightbox_hit_border_style = (isset($_POST['lightbox_hit_border_style']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_style'])) : 'none');
508
- $lightbox_hit_border_color = (isset($_POST['lightbox_hit_border_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_color'])) : '000000');
509
- $lightbox_hit_border_radius = (isset($_POST['lightbox_hit_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_radius'])) : 5);
510
- $lightbox_hit_padding = (isset($_POST['lightbox_hit_padding']) ? esc_html(stripslashes( $_POST['lightbox_hit_padding'])) : '5px');
511
- $lightbox_hit_margin = (isset($_POST['lightbox_hit_margin']) ? esc_html(stripslashes( $_POST['lightbox_hit_margin'])) : '0 5px');
512
- $lightbox_hit_color = (isset($_POST['lightbox_hit_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_color'])) : 'FFFFFF');
513
- $lightbox_hit_font_style = (isset($_POST['lightbox_hit_font_style']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_style'])) : 'segoe ui');
514
- $lightbox_hit_font_weight = (isset($_POST['lightbox_hit_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_weight'])) : 'normal');
515
- $lightbox_hit_font_size = (isset($_POST['lightbox_hit_font_size']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_size'])) : 14);
516
- $masonry_description_font_size = (isset($_POST['masonry_description_font_size']) ? (int) esc_html(stripslashes( $_POST['masonry_description_font_size'])) : 12);
517
- $masonry_description_color = (isset($_POST['masonry_description_color']) ? esc_html(stripslashes( $_POST['masonry_description_color'])) : 'CCCCCC');
518
- $masonry_description_font_style = (isset($_POST['masonry_description_font_style']) ? esc_html(stripslashes( $_POST['masonry_description_font_style'])) : 'segoe ui');
519
- //carousel
520
- $carousel_cont_bg_color = (isset($_POST['carousel_cont_bg_color']) ? esc_html(stripslashes( $_POST['carousel_cont_bg_color'])) : 'FFFFFF');
521
- $carousel_cont_btn_transparent = (isset($_POST['carousel_cont_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['carousel_cont_btn_transparent'])) : 0);
522
- $carousel_close_btn_transparent = (isset($_POST['carousel_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['carousel_close_btn_transparent'])) : 80);
523
- $carousel_rl_btn_bg_color = (isset($_POST['carousel_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_bg_color'])) : 'CCCCCC');
524
- $carousel_rl_btn_border_radius = (isset($_POST['carousel_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_radius'])) : '');
525
- $carousel_rl_btn_border_width = (isset($_POST['carousel_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_border_width'])) : 1);
526
- $carousel_rl_btn_border_style = (isset($_POST['carousel_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_style'])) : 'solid');
527
- $carousel_rl_btn_border_color = (isset($_POST['carousel_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_color'])) : '000000');
528
- $carousel_rl_btn_color = (isset($_POST['carousel_rl_btn_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_color'])) : 'FFFFFF');
529
- $carousel_rl_btn_height = (isset($_POST['carousel_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_height'])) : 10);
530
- $carousel_rl_btn_size = (isset($_POST['carousel_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_size'])) : 20);
531
- $carousel_play_pause_btn_size = (isset($_POST['carousel_play_pause_btn_size']) ? (int) esc_html(stripslashes( $_POST['carousel_play_pause_btn_size'])) : 20);
532
- $carousel_rl_btn_width = (isset($_POST['carousel_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_width'])) : 30);
533
- $carousel_close_rl_btn_hover_color = (isset($_POST['carousel_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['carousel_close_rl_btn_hover_color'])) : 'FFFFFF');
534
- $carousel_rl_btn_style = (isset($_POST['carousel_rl_btn_style']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_style'])) : 'fa-chevron');
535
- $carousel_mergin_bottom = (isset($_POST['carousel_mergin_bottom']) ? esc_html(stripslashes( $_POST['carousel_mergin_bottom'])) : '1');
536
- $carousel_font_family = (isset($_POST['carousel_font_family']) ? esc_html(stripslashes( $_POST['carousel_font_family'])) : 'segoe ui');
537
- $carousel_feature_border_width = (isset($_POST['carousel_feature_border_width']) ? (int) esc_html(stripslashes( $_POST['carousel_feature_border_width'])) : 2);
538
- $carousel_feature_border_style = (isset($_POST['carousel_feature_border_style']) ? esc_html(stripslashes( $_POST['carousel_feature_border_style'])) : 'solid');
539
- $carousel_feature_border_color = (isset($_POST['carousel_feature_border_color']) ? esc_html(stripslashes( $_POST['carousel_feature_border_color'])) : '5D204F');
540
- $carousel_caption_background_color = (isset($_POST['carousel_caption_background_color']) ? esc_html(stripslashes( $_POST['carousel_caption_background_color'])) : '000000');
541
- $carousel_caption_bottom = (isset($_POST['carousel_caption_bottom']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_bottom'])) : 0);
542
- $carousel_caption_p_mergin = (isset($_POST['carousel_caption_p_mergin']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_mergin'])) : 0);
543
- $carousel_caption_p_pedding = (isset($_POST['carousel_caption_p_pedding']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_pedding'])) : 5);
544
- $carousel_caption_p_font_weight = (isset($_POST['carousel_caption_p_font_weight']) ? esc_html(stripslashes( $_POST['carousel_caption_p_font_weight'])) : 'bold');
545
- $carousel_caption_p_font_size = (isset($_POST['carousel_caption_p_font_size']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_font_size'])) : 14);
546
- $carousel_caption_p_color = (isset($_POST['carousel_caption_p_color']) ? esc_html(stripslashes( $_POST['carousel_caption_p_color'])) : '000000');
547
- $carousel_title_opacity = (isset($_POST['carousel_title_opacity']) ? (int) esc_html(stripslashes( $_POST['carousel_title_opacity'])) : 100);
548
- $carousel_title_border_radius = (isset($_POST['carousel_title_border_radius']) ? esc_html(stripslashes( $_POST['carousel_title_border_radius'])) : '5px');
549
- $mosaic_thumb_transition = (isset($_POST['mosaic_thumb_transition']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transition'])) : 1);
550
-
551
- $default_theme = (isset($_POST['default_theme']) ? esc_html(stripslashes( $_POST['default_theme'])) : 0);
552
-
553
- $save_as_copy = (isset($_POST['save_as_copy']) ? esc_html(stripslashes( $_POST['save_as_copy'])) : 0);
554
-
555
- $themes = array(
556
- 'thumb_margin' => $thumb_margin,
557
- 'thumb_padding' => $thumb_padding,
558
- 'thumb_border_radius' => $thumb_border_radius,
559
- 'thumb_border_width' => $thumb_border_width,
560
- 'thumb_border_style' => $thumb_border_style,
561
- 'thumb_border_color' => $thumb_border_color,
562
- 'thumb_bg_color' => $thumb_bg_color,
563
- 'thumbs_bg_color' => $thumbs_bg_color,
564
- 'thumb_bg_transparent' => $thumb_bg_transparent,
565
- 'thumb_box_shadow' => $thumb_box_shadow,
566
- 'thumb_transparent' => $thumb_transparent,
567
- 'thumb_align' => $thumb_align,
568
- 'thumb_hover_effect' => $thumb_hover_effect,
569
- 'thumb_hover_effect_value' => $thumb_hover_effect_value,
570
- 'thumb_transition' => $thumb_transition,
571
- 'thumb_title_margin' => $thumb_title_margin,
572
- 'thumb_title_font_style' => $thumb_title_font_style,
573
- 'thumb_title_pos' => $thumb_title_pos,
574
- 'thumb_title_font_color' => $thumb_title_font_color,
575
- 'thumb_title_shadow' => $thumb_title_shadow,
576
- 'thumb_title_font_size' => $thumb_title_font_size,
577
- 'thumb_title_font_weight' => $thumb_title_font_weight,
578
-
579
- 'page_nav_position' => $page_nav_position,
580
- 'page_nav_align' => $page_nav_align,
581
- 'page_nav_number' => $page_nav_number,
582
- 'page_nav_font_size' => $page_nav_font_size,
583
- 'page_nav_font_style' => $page_nav_font_style,
584
- 'page_nav_font_color' => $page_nav_font_color,
585
- 'page_nav_font_weight' => $page_nav_font_weight,
586
- 'page_nav_border_width' => $page_nav_border_width,
587
- 'page_nav_border_style'=> $page_nav_border_style,
588
- 'page_nav_border_color' => $page_nav_border_color,
589
- 'page_nav_border_radius' => $page_nav_border_radius,
590
- 'page_nav_margin' => $page_nav_margin,
591
- 'page_nav_padding' => $page_nav_padding,
592
- 'page_nav_button_bg_color' => $page_nav_button_bg_color,
593
- 'page_nav_button_bg_transparent' => $page_nav_button_bg_transparent,
594
- 'page_nav_box_shadow' => $page_nav_box_shadow,
595
- 'page_nav_button_transition' => $page_nav_button_transition,
596
- 'page_nav_button_text' => $page_nav_button_text,
597
- 'lightbox_ctrl_btn_pos' => $lightbox_ctrl_btn_pos,
598
- 'lightbox_ctrl_btn_align' => $lightbox_ctrl_btn_align,
599
- 'lightbox_ctrl_btn_height' => $lightbox_ctrl_btn_height,
600
- 'lightbox_ctrl_btn_margin_top' => $lightbox_ctrl_btn_margin_top,
601
- 'lightbox_ctrl_btn_margin_left' => $lightbox_ctrl_btn_margin_left,
602
- 'lightbox_ctrl_btn_transparent' => $lightbox_ctrl_btn_transparent,
603
- 'lightbox_ctrl_btn_color' => $lightbox_ctrl_btn_color,
604
- 'lightbox_toggle_btn_height' => $lightbox_toggle_btn_height,
605
- 'lightbox_toggle_btn_width' => $lightbox_toggle_btn_width,
606
- 'lightbox_ctrl_cont_bg_color' => $lightbox_ctrl_cont_bg_color,
607
- 'lightbox_ctrl_cont_border_radius' => $lightbox_ctrl_cont_border_radius,
608
- 'lightbox_ctrl_cont_transparent' => $lightbox_ctrl_cont_transparent,
609
- 'lightbox_close_btn_bg_color' => $lightbox_close_btn_bg_color,
610
- 'lightbox_close_btn_border_radius' => $lightbox_close_btn_border_radius,
611
- 'lightbox_close_btn_border_width' => $lightbox_close_btn_border_width,
612
- 'lightbox_close_btn_border_style' => $lightbox_close_btn_border_style,
613
- 'lightbox_close_btn_border_color' => $lightbox_close_btn_border_color,
614
- 'lightbox_close_btn_box_shadow' => $lightbox_close_btn_box_shadow,
615
- 'lightbox_close_btn_color' => $lightbox_close_btn_color,
616
- 'lightbox_close_btn_size' => $lightbox_close_btn_size,
617
- 'lightbox_close_btn_width' => $lightbox_close_btn_width,
618
- 'lightbox_close_btn_height' => $lightbox_close_btn_height,
619
- 'lightbox_close_btn_top' => $lightbox_close_btn_top,
620
- 'lightbox_close_btn_right' => $lightbox_close_btn_right,
621
- 'lightbox_close_btn_full_color' => $lightbox_close_btn_full_color,
622
- 'lightbox_close_btn_transparent' => $lightbox_close_btn_transparent,
623
- 'lightbox_rl_btn_bg_color' => $lightbox_rl_btn_bg_color,
624
- 'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
625
- 'lightbox_rl_btn_border_radius' => $lightbox_rl_btn_border_radius,
626
- 'lightbox_rl_btn_border_width' => $lightbox_rl_btn_border_width,
627
- 'lightbox_rl_btn_border_style' => $lightbox_rl_btn_border_style,
628
- 'lightbox_rl_btn_border_color' => $lightbox_rl_btn_border_color,
629
- 'lightbox_rl_btn_box_shadow' => $lightbox_rl_btn_box_shadow,
630
- 'lightbox_rl_btn_color' => $lightbox_rl_btn_color,
631
- 'lightbox_rl_btn_height' => $lightbox_rl_btn_height,
632
- 'lightbox_rl_btn_width' => $lightbox_rl_btn_width,
633
- 'lightbox_rl_btn_size' => $lightbox_rl_btn_size,
634
- 'lightbox_close_rl_btn_hover_color' => $lightbox_close_rl_btn_hover_color,
635
- 'lightbox_comment_pos' => $lightbox_comment_pos,
636
- 'lightbox_comment_width' => $lightbox_comment_width,
637
- 'lightbox_comment_bg_color' => $lightbox_comment_bg_color,
638
- 'lightbox_comment_font_color' => $lightbox_comment_font_color,
639
- 'lightbox_comment_font_style' => $lightbox_comment_font_style,
640
- 'lightbox_comment_font_size' => $lightbox_comment_font_size,
641
- 'lightbox_comment_button_bg_color' => $lightbox_comment_button_bg_color,
642
- 'lightbox_comment_button_border_color' => $lightbox_comment_button_border_color,
643
- 'lightbox_comment_button_border_width' => $lightbox_comment_button_border_width,
644
- 'lightbox_comment_button_border_style' => $lightbox_comment_button_border_style,
645
- 'lightbox_comment_button_border_radius' => $lightbox_comment_button_border_radius,
646
- 'lightbox_comment_button_padding' => $lightbox_comment_button_padding,
647
- 'lightbox_comment_input_bg_color' => $lightbox_comment_input_bg_color,
648
- 'lightbox_comment_input_border_color' => $lightbox_comment_input_border_color,
649
- 'lightbox_comment_input_border_width' => $lightbox_comment_input_border_width,
650
- 'lightbox_comment_input_border_style' => $lightbox_comment_input_border_style,
651
- 'lightbox_comment_input_border_radius' => $lightbox_comment_input_border_radius,
652
- 'lightbox_comment_input_padding' => $lightbox_comment_input_padding,
653
- 'lightbox_comment_separator_width' => $lightbox_comment_separator_width,
654
- 'lightbox_comment_separator_style' => $lightbox_comment_separator_style,
655
- 'lightbox_comment_separator_color' => $lightbox_comment_separator_color,
656
- 'lightbox_comment_author_font_size' => $lightbox_comment_author_font_size,
657
- 'lightbox_comment_date_font_size' => $lightbox_comment_date_font_size,
658
- 'lightbox_comment_body_font_size' => $lightbox_comment_body_font_size,
659
- 'lightbox_comment_share_button_color' => $lightbox_comment_share_button_color,
660
- 'lightbox_filmstrip_rl_bg_color' => $lightbox_filmstrip_rl_bg_color,
661
- 'lightbox_filmstrip_rl_btn_size' => $lightbox_filmstrip_rl_btn_size,
662
- 'lightbox_filmstrip_rl_btn_color' => $lightbox_filmstrip_rl_btn_color,
663
- 'lightbox_filmstrip_thumb_margin' => $lightbox_filmstrip_thumb_margin,
664
- 'lightbox_filmstrip_thumb_border_width' => $lightbox_filmstrip_thumb_border_width,
665
- 'lightbox_filmstrip_thumb_border_style' => $lightbox_filmstrip_thumb_border_style,
666
- 'lightbox_filmstrip_thumb_border_color' => $lightbox_filmstrip_thumb_border_color,
667
- 'lightbox_filmstrip_thumb_border_radius' => $lightbox_filmstrip_thumb_border_radius,
668
- 'lightbox_filmstrip_thumb_deactive_transparent' => $lightbox_filmstrip_thumb_deactive_transparent,
669
- 'lightbox_filmstrip_pos' => $lightbox_filmstrip_pos,
670
- 'lightbox_filmstrip_thumb_active_border_width' => $lightbox_filmstrip_thumb_active_border_width,
671
- 'lightbox_filmstrip_thumb_active_border_color' => $lightbox_filmstrip_thumb_active_border_color,
672
- 'lightbox_overlay_bg_transparent' => $lightbox_overlay_bg_transparent,
673
- 'lightbox_bg_color' => $lightbox_bg_color,
674
- 'lightbox_overlay_bg_color' => $lightbox_overlay_bg_color,
675
- 'lightbox_rl_btn_style' => $lightbox_rl_btn_style,
676
- 'lightbox_bg_transparent' => $lightbox_bg_transparent,
677
-
678
- 'blog_style_margin' => $blog_style_margin,
679
- 'blog_style_padding' => $blog_style_padding,
680
- 'blog_style_border_radius' => $blog_style_border_radius,
681
- 'blog_style_border_width' => $blog_style_border_width,
682
- 'blog_style_border_style' => $blog_style_border_style,
683
- 'blog_style_border_color' => $blog_style_border_color,
684
- 'blog_style_bg_color' => $blog_style_bg_color,
685
- 'blog_style_transparent' => $blog_style_transparent,
686
- 'blog_style_box_shadow' => $blog_style_box_shadow,
687
- 'blog_style_align' => $blog_style_align,
688
- 'blog_style_share_buttons_margin' => $blog_style_share_buttons_margin,
689
- 'blog_style_share_buttons_border_radius' => $blog_style_share_buttons_border_radius,
690
- 'blog_style_share_buttons_border_width' => $blog_style_share_buttons_border_width,
691
- 'blog_style_share_buttons_border_style' => $blog_style_share_buttons_border_style,
692
- 'blog_style_share_buttons_border_color' => $blog_style_share_buttons_border_color,
693
- 'blog_style_share_buttons_bg_color' => $blog_style_share_buttons_bg_color,
694
- 'blog_style_share_buttons_align' => $blog_style_share_buttons_align,
695
- 'blog_style_img_font_size' => $blog_style_img_font_size,
696
- 'blog_style_img_font_family' => $blog_style_img_font_family,
697
- 'blog_style_img_font_color' => $blog_style_img_font_color,
698
- 'blog_style_share_buttons_font_size' => $blog_style_share_buttons_font_size,
699
- 'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
700
- 'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
701
-
702
- 'image_browser_margin' => $image_browser_margin,
703
- 'image_browser_padding' => $image_browser_padding,
704
- 'image_browser_border_radius'=> $image_browser_border_radius,
705
- 'image_browser_border_width' => $image_browser_border_width,
706
- 'image_browser_border_style' => $image_browser_border_style,
707
- 'image_browser_border_color' => $image_browser_border_color,
708
- 'image_browser_bg_color' => $image_browser_bg_color,
709
- 'image_browser_box_shadow' => $image_browser_box_shadow,
710
- 'image_browser_transparent' => $image_browser_transparent,
711
- 'image_browser_align' => $image_browser_align,
712
- 'image_browser_image_description_margin' => $image_browser_image_description_margin,
713
- 'image_browser_image_description_padding' => $image_browser_image_description_padding,
714
- 'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius,
715
- 'image_browser_image_description_border_width' => $image_browser_image_description_border_width,
716
- 'image_browser_image_description_border_style' => $image_browser_image_description_border_style,
717
- 'image_browser_image_description_border_color' => $image_browser_image_description_border_color,
718
- 'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color,
719
- 'image_browser_image_description_align' => $image_browser_image_description_align,
720
- 'image_browser_img_font_size' => $image_browser_img_font_size,
721
- 'image_browser_img_font_family' => $image_browser_img_font_family,
722
- 'image_browser_img_font_color' => $image_browser_img_font_color,
723
- 'image_browser_full_padding' => $image_browser_full_padding,
724
- 'image_browser_full_border_radius' => $image_browser_full_border_radius,
725
- 'image_browser_full_border_width' => $image_browser_full_border_width,
726
- 'image_browser_full_border_style' => $image_browser_full_border_style,
727
- 'image_browser_full_border_color' => $image_browser_full_border_color,
728
- 'image_browser_full_bg_color' => $image_browser_full_bg_color,
729
- 'image_browser_full_transparent' => $image_browser_full_transparent,
730
- 'image_browser_image_title_align' => $image_browser_image_title_align,
731
- 'album_compact_title_margin' => $album_compact_title_margin,
732
- 'album_compact_thumb_margin' => $album_compact_thumb_margin,
733
- 'album_compact_back_padding' => $album_compact_back_padding,
734
- 'album_compact_thumb_padding' => $album_compact_thumb_padding,
735
- 'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius,
736
- 'album_compact_thumb_border_width' => $album_compact_thumb_border_width,
737
- 'album_compact_title_font_style' => $album_compact_title_font_style,
738
- 'album_compact_back_font_color' => $album_compact_back_font_color,
739
- 'album_compact_title_font_color' => $album_compact_title_font_color,
740
- 'album_compact_title_shadow' => $album_compact_title_shadow,
741
- 'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent,
742
- 'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow,
743
- 'album_compact_thumb_transition' => $album_compact_thumb_transition,
744
- 'album_compact_thumb_border_style' => $album_compact_thumb_border_style,
745
- 'album_compact_thumb_border_color' => $album_compact_thumb_border_color,
746
- 'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color,
747
- 'album_compact_back_font_weight' => $album_compact_back_font_weight,
748
- 'album_compact_back_font_size' => $album_compact_back_font_size,
749
- 'album_compact_back_font_style' => $album_compact_back_font_style,
750
- 'album_compact_thumb_title_pos' => $album_compact_thumb_title_pos,
751
- 'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color,
752
- 'album_compact_title_font_size' => $album_compact_title_font_size,
753
- 'album_compact_title_font_weight' => $album_compact_title_font_weight,
754
- 'album_compact_thumb_align' => $album_compact_thumb_align,
755
- 'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect,
756
- 'album_compact_thumb_transparent' => $album_compact_thumb_transparent,
757
- 'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value,
758
- 'album_extended_thumb_margin' => $album_extended_thumb_margin,
759
- 'album_extended_thumb_padding' => $album_extended_thumb_padding,
760
- 'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius,
761
- 'album_extended_thumb_border_width' => $album_extended_thumb_border_width,
762
- 'album_extended_thumb_border_style' => $album_extended_thumb_border_style,
763
- 'album_extended_thumb_border_color' => $album_extended_thumb_border_color,
764
- 'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color,
765
- 'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color,
766
- 'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent,
767
- 'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow,
768
- 'album_extended_thumb_transparent' => $album_extended_thumb_transparent,
769
- 'album_extended_thumb_align' => $album_extended_thumb_align,
770
- 'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect,
771
- 'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value,
772
- 'album_extended_thumb_transition' => $album_extended_thumb_transition,
773
- 'album_extended_back_font_color' => $album_extended_back_font_color,
774
- 'album_extended_back_font_style' => $album_extended_back_font_style,
775
- 'album_extended_back_font_size' => $album_extended_back_font_size,
776
- 'album_extended_back_font_weight' => $album_extended_back_font_weight,
777
- 'album_extended_back_padding' => $album_extended_back_padding,
778
- 'album_extended_div_bg_color' => $album_extended_div_bg_color,
779
- 'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent,
780
- 'album_extended_div_border_radius' => $album_extended_div_border_radius,
781
- 'album_extended_div_margin' => $album_extended_div_margin,
782
- 'album_extended_div_padding' => $album_extended_div_padding,
783
- 'album_extended_div_separator_width' => $album_extended_div_separator_width,
784
- 'album_extended_div_separator_style' => $album_extended_div_separator_style,
785
- 'album_extended_div_separator_color' => $album_extended_div_separator_color,
786
- 'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color,
787
- 'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius,
788
- 'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width,
789
- 'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style,
790
- 'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color,
791
- 'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding,
792
- 'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color,
793
- 'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius,
794
- 'album_extended_text_div_border_width' => $album_extended_text_div_border_width,
795
- 'album_extended_text_div_border_style' => $album_extended_text_div_border_style,
796
- 'album_extended_text_div_border_color' => $album_extended_text_div_border_color,
797
- 'album_extended_text_div_padding' => $album_extended_text_div_padding,
798
- 'album_extended_title_span_border_width' => $album_extended_title_span_border_width,
799
- 'album_extended_title_span_border_style' => $album_extended_title_span_border_style,
800
- 'album_extended_title_span_border_color' => $album_extended_title_span_border_color,
801
- 'album_extended_title_font_color' => $album_extended_title_font_color,
802
- 'album_extended_title_font_style' => $album_extended_title_font_style,
803
- 'album_extended_title_font_size' => $album_extended_title_font_size,
804
- 'album_extended_title_font_weight' => $album_extended_title_font_weight,
805
- 'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom,
806
- 'album_extended_title_padding' => $album_extended_title_padding,
807
- 'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width,
808
- 'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style,
809
- 'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color,
810
- 'album_extended_desc_font_color' => $album_extended_desc_font_color,
811
- 'album_extended_desc_font_style' => $album_extended_desc_font_style,
812
- 'album_extended_desc_font_size' => $album_extended_desc_font_size,
813
- 'album_extended_desc_font_weight' => $album_extended_desc_font_weight,
814
- 'album_extended_desc_padding' => $album_extended_desc_padding,
815
- 'album_extended_desc_more_color' => $album_extended_desc_more_color,
816
- 'album_extended_desc_more_size' => $album_extended_desc_more_size,
817
-
818
- 'slideshow_cont_bg_color' => $slideshow_cont_bg_color,
819
- 'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent,
820
- 'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color,
821
- 'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius,
822
- 'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width,
823
- 'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style,
824
- 'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color,
825
- 'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow,
826
- 'slideshow_rl_btn_color' => $slideshow_rl_btn_color,
827
- 'slideshow_rl_btn_height' => $slideshow_rl_btn_height,
828
- 'slideshow_rl_btn_size' => $slideshow_rl_btn_size,
829
- 'slideshow_rl_btn_width' => $slideshow_rl_btn_width,
830
- 'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color,
831
- 'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos,
832
- 'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width,
833
- 'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style,
834
- 'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color,
835
- 'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius,
836
- 'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin,
837
- 'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width,
838
- 'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color,
839
- 'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent,
840
- 'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color,
841
- 'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color,
842
- 'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size,
843
- 'slideshow_title_font_size' => $slideshow_title_font_size,
844
- 'slideshow_title_font' => $slideshow_title_font,
845
- 'slideshow_title_color' => $slideshow_title_color,
846
- 'slideshow_title_opacity' => $slideshow_title_opacity,
847
- 'slideshow_title_border_radius' => $slideshow_title_border_radius,
848
- 'slideshow_title_background_color' => $slideshow_title_background_color,
849
- 'slideshow_title_padding' => $slideshow_title_padding,
850
- 'slideshow_description_font_size' => $slideshow_description_font_size,
851
- 'slideshow_description_font' => $slideshow_description_font,
852
- 'slideshow_description_color' => $slideshow_description_color,
853
- 'slideshow_description_opacity' => $slideshow_description_opacity,
854
- 'slideshow_description_border_radius' => $slideshow_description_border_radius,
855
- 'slideshow_description_background_color' => $slideshow_description_background_color,
856
- 'slideshow_description_padding' => $slideshow_description_padding,
857
- 'slideshow_dots_width' => $slideshow_dots_width,
858
- 'slideshow_dots_height' => $slideshow_dots_height,
859
- 'slideshow_dots_border_radius' => $slideshow_dots_border_radius,
860
- 'slideshow_dots_background_color' => $slideshow_dots_background_color,
861
- 'slideshow_dots_margin' => $slideshow_dots_margin,
862
- 'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color,
863
- 'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width,
864
- 'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color,
865
- 'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size,
866
- 'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
867
-
868
- 'masonry_thumb_padding' => $masonry_thumb_padding,
869
- 'masonry_thumb_border_radius' => $masonry_thumb_border_radius,
870
- 'masonry_thumb_border_width' => $masonry_thumb_border_width,
871
- 'masonry_thumb_border_style' => $masonry_thumb_border_style,
872
- 'masonry_thumb_border_color' => $masonry_thumb_border_color,
873
- 'masonry_thumbs_bg_color' => $masonry_thumbs_bg_color,
874
- 'masonry_thumb_bg_transparent' => $masonry_thumb_bg_transparent,
875
- 'masonry_thumb_transparent' => $masonry_thumb_transparent,
876
- 'masonry_thumb_align' => $masonry_thumb_align,
877
- 'masonry_thumb_hover_effect' => $masonry_thumb_hover_effect,
878
- 'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
879
- 'masonry_thumb_transition' => $masonry_thumb_transition,
880
-
881
- 'mosaic_thumb_padding' => $mosaic_thumb_padding,
882
- 'mosaic_thumb_border_radius' => $mosaic_thumb_border_radius,
883
- 'mosaic_thumb_border_width' => $mosaic_thumb_border_width,
884
- 'mosaic_thumb_border_style' => $mosaic_thumb_border_style,
885
- 'mosaic_thumb_border_color' => $mosaic_thumb_border_color,
886
- 'mosaic_thumbs_bg_color' => $mosaic_thumbs_bg_color,
887
- 'mosaic_thumb_bg_transparent' => $mosaic_thumb_bg_transparent,
888
- 'mosaic_thumb_transparent' => $mosaic_thumb_transparent,
889
- 'mosaic_thumb_align' => $mosaic_thumb_align,
890
- 'mosaic_thumb_hover_effect' => $mosaic_thumb_hover_effect,
891
- 'mosaic_thumb_hover_effect_value' => $mosaic_thumb_hover_effect_value,
892
- 'mosaic_thumb_title_margin' => $mosaic_thumb_title_margin,
893
- 'mosaic_thumb_title_font_style' => $mosaic_thumb_title_font_style,
894
- 'mosaic_thumb_title_font_color' => $mosaic_thumb_title_font_color,
895
- 'mosaic_thumb_title_shadow' => $mosaic_thumb_title_shadow,
896
- 'mosaic_thumb_title_font_size' => $mosaic_thumb_title_font_size,
897
- 'mosaic_thumb_title_font_weight' => $mosaic_thumb_title_font_weight,
898
- 'lightbox_info_pos' => $lightbox_info_pos,
899
- 'lightbox_info_align' => $lightbox_info_align,
900
- 'lightbox_info_bg_color' => $lightbox_info_bg_color,
901
- 'lightbox_info_bg_transparent' => $lightbox_info_bg_transparent,
902
- 'lightbox_info_border_width' => $lightbox_info_border_width,
903
- 'lightbox_info_border_style' => $lightbox_info_border_style,
904
- 'lightbox_info_border_color' => $lightbox_info_border_color,
905
- 'lightbox_info_border_radius' => $lightbox_info_border_radius,
906
- 'lightbox_info_padding' => $lightbox_info_padding,
907
- 'lightbox_info_margin' => $lightbox_info_margin,
908
- 'lightbox_title_color' => $lightbox_title_color,
909
- 'lightbox_title_font_style' => $lightbox_title_font_style,
910
- 'lightbox_title_font_weight' => $lightbox_title_font_weight,
911
- 'lightbox_title_font_size' => $lightbox_title_font_size,
912
- 'lightbox_description_color' => $lightbox_description_color,
913
- 'lightbox_description_font_style' => $lightbox_description_font_style,
914
- 'lightbox_description_font_weight' => $lightbox_description_font_weight,
915
- 'lightbox_description_font_size' => $lightbox_description_font_size,
916
-
917
- 'lightbox_rate_pos' => $lightbox_rate_pos,
918
- 'lightbox_rate_align' => $lightbox_rate_align,
919
- 'lightbox_rate_icon' => $lightbox_rate_icon,
920
- 'lightbox_rate_color' => $lightbox_rate_color,
921
- 'lightbox_rate_size' => $lightbox_rate_size,
922
- 'lightbox_rate_stars_count' => $lightbox_rate_stars_count,
923
- 'lightbox_rate_padding' => $lightbox_rate_padding,
924
- 'lightbox_rate_hover_color' => $lightbox_rate_hover_color,
925
-
926
- 'lightbox_hit_pos' => $lightbox_hit_pos,
927
- 'lightbox_hit_align' => $lightbox_hit_align,
928
- 'lightbox_hit_bg_color' => $lightbox_hit_bg_color,
929
- 'lightbox_hit_bg_transparent' => $lightbox_hit_bg_transparent,
930
- 'lightbox_hit_border_width' => $lightbox_hit_border_width,
931
- 'lightbox_hit_border_style' => $lightbox_hit_border_style,
932
- 'lightbox_hit_border_color' => $lightbox_hit_border_color,
933
- 'lightbox_hit_border_radius' => $lightbox_hit_border_radius,
934
- 'lightbox_hit_padding' => $lightbox_hit_padding,
935
- 'lightbox_hit_margin' => $lightbox_hit_margin,
936
- 'lightbox_hit_color' => $lightbox_hit_color,
937
- 'lightbox_hit_font_style' => $lightbox_hit_font_style,
938
- 'lightbox_hit_font_weight' => $lightbox_hit_font_weight,
939
- 'lightbox_hit_font_size' => $lightbox_hit_font_size,
940
- 'masonry_description_font_size' => $masonry_description_font_size,
941
- 'masonry_description_color' => $masonry_description_color,
942
- 'masonry_description_font_style' => $masonry_description_font_style,
943
-
944
- 'album_masonry_back_font_color' => $album_masonry_back_font_color,
945
- 'album_masonry_back_font_style' => $album_masonry_back_font_style,
946
- 'album_masonry_back_font_size' => $album_masonry_back_font_size,
947
- 'album_masonry_back_font_weight' => $album_masonry_back_font_weight,
948
- 'album_masonry_back_padding' => $album_masonry_back_padding,
949
- 'album_masonry_title_font_color' => $album_masonry_title_font_color,
950
- 'album_masonry_title_font_style' => $album_masonry_title_font_style,
951
- 'album_masonry_thumb_title_pos' => $album_masonry_thumb_title_pos,
952
- 'album_masonry_title_font_size' => $album_masonry_title_font_size,
953
- 'album_masonry_title_font_weight' => $album_masonry_title_font_weight,
954
- 'album_masonry_title_margin' => $album_masonry_title_margin,
955
- 'album_masonry_title_shadow' => $album_masonry_title_shadow,
956
- 'album_masonry_thumb_margin' => $album_masonry_thumb_margin,
957
- 'album_masonry_thumb_padding' => $album_masonry_thumb_padding,
958
- 'album_masonry_thumb_border_radius' => $album_masonry_thumb_border_radius,
959
- 'album_masonry_thumb_border_width' => $album_masonry_thumb_border_width,
960
- 'album_masonry_thumb_border_style' => $album_masonry_thumb_border_style,
961
- 'album_masonry_thumb_border_color' => $album_masonry_thumb_border_color,
962
- 'album_masonry_thumb_bg_color' => $album_masonry_thumb_bg_color,
963
- 'album_masonry_thumbs_bg_color' => $album_masonry_thumbs_bg_color,
964
- 'album_masonry_thumb_bg_transparent' => $album_masonry_thumb_bg_transparent,
965
- 'album_masonry_thumb_box_shadow' => $album_masonry_thumb_box_shadow,
966
- 'album_masonry_thumb_transparent' => $album_masonry_thumb_transparent,
967
- 'album_masonry_thumb_align' => $album_masonry_thumb_align,
968
- 'album_masonry_thumb_hover_effect' => $album_masonry_thumb_hover_effect,
969
- 'album_masonry_thumb_hover_effect_value' => $album_masonry_thumb_hover_effect_value,
970
- 'album_masonry_thumb_transition' => $album_masonry_thumb_transition,
971
-
972
- 'carousel_cont_bg_color' => $carousel_cont_bg_color,
973
- 'carousel_cont_btn_transparent' => $carousel_cont_btn_transparent,
974
- 'carousel_close_btn_transparent' => $carousel_close_btn_transparent,
975
- 'carousel_rl_btn_bg_color' => $carousel_rl_btn_bg_color,
976
- 'carousel_rl_btn_border_radius' => $carousel_rl_btn_border_radius,
977
- 'carousel_rl_btn_border_width' => $carousel_rl_btn_border_width,
978
- 'carousel_rl_btn_border_style' => $carousel_rl_btn_border_style,
979
- 'carousel_rl_btn_border_color' => $carousel_rl_btn_border_color,
980
- 'carousel_rl_btn_color' => $carousel_rl_btn_color,
981
- 'carousel_rl_btn_height' => $carousel_rl_btn_height,
982
- 'carousel_rl_btn_size' => $carousel_rl_btn_size,
983
- 'carousel_play_pause_btn_size' => $carousel_play_pause_btn_size,
984
- 'carousel_rl_btn_width' => $carousel_rl_btn_width,
985
- 'carousel_close_rl_btn_hover_color' => $carousel_close_rl_btn_hover_color,
986
- 'carousel_rl_btn_style' => $carousel_rl_btn_style,
987
- 'carousel_mergin_bottom' => $carousel_mergin_bottom,
988
- 'carousel_font_family' => $carousel_font_family,
989
- 'carousel_feature_border_width' => $carousel_feature_border_width,
990
- 'carousel_feature_border_style' => $carousel_feature_border_style,
991
- 'carousel_feature_border_color' => $carousel_feature_border_color,
992
- 'carousel_caption_background_color' => $carousel_caption_background_color,
993
- 'carousel_caption_bottom' => $carousel_caption_bottom,
994
- 'carousel_caption_p_mergin' => $carousel_caption_p_mergin,
995
- 'carousel_caption_p_pedding' => $carousel_caption_p_pedding,
996
- 'carousel_caption_p_font_weight' => $carousel_caption_p_font_weight,
997
- 'carousel_caption_p_font_size' => $carousel_caption_p_font_size,
998
- 'carousel_caption_p_color' => $carousel_caption_p_color,
999
- 'carousel_title_opacity' => $carousel_title_opacity,
1000
- 'carousel_title_border_radius' => $carousel_title_border_radius,
1001
- 'mosaic_thumb_transition' => $mosaic_thumb_transition,
1002
- );
1003
- $themes = json_encode($themes);
1004
-
1005
- if ($id == 0 || $save_as_copy == 1) {
1006
- $save = $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
1007
- 'name' => $name,
1008
- 'options' => $themes,
1009
- 'default_theme' => 0,
1010
- ));
1011
- }
1012
- else {
1013
- $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array(
1014
- 'name' => $name,
1015
- 'options' => $themes,
1016
- ), array('id' => $id));
1017
- }
1018
- if ($save !== FALSE) {
1019
- return 1;
1020
- }
1021
- else {
1022
- return 2;
1023
- }
1024
- }
1025
-
1026
- public function delete($id) {
1027
- global $wpdb;
1028
- $isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $id);
1029
- if ($isDefault) {
1030
- echo WDWLibrary::message("You can't delete default theme", 'wd_error');
1031
- }
1032
- else {
1033
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id);
1034
- if ($wpdb->query($query)) {
1035
- echo WDWLibrary::message('Item Succesfully Deleted.', 'wd_updated');
1036
- $message = 3;
1037
- }
1038
- else {
1039
- $message = 2;
1040
- }
1041
- }
1042
- $page = WDWLibrary::get('page');
1043
- $query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
1044
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
1045
- WDWLibrary::spider_redirect($query_url);
1046
- }
1047
-
1048
- public function delete_all() {
1049
- global $wpdb;
1050
- $flag = FALSE;
1051
- $isDefault = FALSE;
1052
- $tag_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_theme');
1053
- foreach ($tag_ids_col as $tag_id) {
1054
- if (isset($_POST['check_' . $tag_id])) {
1055
- $isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $tag_id);
1056
- if ($isDefault) {
1057
- $message = 4;
1058
- }
1059
- else {
1060
- $flag = TRUE;
1061
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $tag_id);
1062
- $wpdb->query($query);
1063
- }
1064
- }
1065
- }
1066
- if ($flag) {
1067
- $message = 5;
1068
- }
1069
- else {
1070
- $message = 6;
1071
- }
1072
- $page = WDWLibrary::get('page');
1073
- $query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
1074
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
1075
- WDWLibrary::spider_redirect($query_url);
1076
- }
1077
-
1078
- public function setdefault($id) {
1079
- global $wpdb;
1080
- $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 0), array('default_theme' => 1));
1081
- $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 1), array('id' => $id));
1082
- if ($save !== FALSE) {
1083
- $message = 7;
1084
- }
1085
- else {
1086
- $message = 2;
1087
- }
1088
- $page = WDWLibrary::get('page');
1089
- $query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
1090
- $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
1091
- WDWLibrary::spider_redirect($query_url);
1092
- }
1093
- ////////////////////////////////////////////////////////////////////////////////////////
1094
- // Getters & Setters //
1095
- ////////////////////////////////////////////////////////////////////////////////////////
1096
- ////////////////////////////////////////////////////////////////////////////////////////
1097
- // Private Methods //
1098
- ////////////////////////////////////////////////////////////////////////////////////////
1099
- ////////////////////////////////////////////////////////////////////////////////////////
1100
- // Listeners //
1101
- ////////////////////////////////////////////////////////////////////////////////////////
1102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerUninstall_bwg.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerUninstall_bwg {
4
-
5
- public function __construct() {
6
- global $bwg_options;
7
- if (!class_exists("DoradoWebConfig")) {
8
- include_once(WD_BWG_DIR . "/wd/config.php");
9
- }
10
- $config = new DoradoWebConfig();
11
- $config->set_options($bwg_options);
12
- $deactivate_reasons = new DoradoWebDeactivate($config);
13
- $deactivate_reasons->submit_and_deactivate();
14
- }
15
-
16
- public function execute() {
17
- $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
18
-
19
- if($task != ''){
20
- if(!WDWLibrary::verify_nonce('uninstall_bwg')){
21
- die('Sorry, your nonce did not verify.');
22
- }
23
- }
24
-
25
- if (method_exists($this, $task)) {
26
- $this->$task();
27
- }
28
- else {
29
- $this->display();
30
- }
31
- }
32
-
33
- public function display() {
34
- require_once WD_BWG_DIR . "/admin/models/BWGModelUninstall_bwg.php";
35
- $model = new BWGModelUninstall_bwg();
36
-
37
- require_once WD_BWG_DIR . "/admin/views/BWGViewUninstall_bwg.php";
38
- $view = new BWGViewUninstall_bwg($model);
39
- $view->display();
40
- }
41
-
42
- public function uninstall() {
43
- require_once WD_BWG_DIR . "/admin/models/BWGModelUninstall_bwg.php";
44
- $model = new BWGModelUninstall_bwg();
45
-
46
- require_once WD_BWG_DIR . "/admin/views/BWGViewUninstall_bwg.php";
47
- $view = new BWGViewUninstall_bwg($model);
48
- $view->uninstall();
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerWidget.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerWidget extends WP_Widget {
4
-
5
- private $view;
6
- private $model;
7
-
8
- public function __construct() {
9
- $widget_ops = array(
10
- 'classname' => 'bwp_gallery',
11
- 'description' => 'Add Photo Gallery albums or galleries to Your widget area.'
12
- );
13
- // Widget Control Settings.
14
- $control_ops = array('id_base' => 'bwp_gallery');
15
- // Create the widget.
16
- parent::__construct('bwp_gallery', 'Photo Gallery Widget', $widget_ops, $control_ops);
17
- require_once WD_BWG_DIR . "/admin/models/BWGModelWidget.php";
18
- $this->model = new BWGModelWidget();
19
-
20
- require_once WD_BWG_DIR . "/admin/views/BWGViewWidget.php";
21
- $this->view = new BWGViewWidget($this->model);
22
- }
23
-
24
- public function widget($args, $instance) {
25
- $this->view->widget($args, $instance);
26
- }
27
-
28
- public function form( $instance ) {
29
- $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show'), parent::get_field_name('show'), parent::get_field_id('gallery_id'), parent::get_field_name('gallery_id'), parent::get_field_id('album_id'), parent::get_field_name('album_id'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
30
- }
31
-
32
- // Update Settings.
33
- public function update($new_instance, $old_instance) {
34
- $instance['title'] = strip_tags($new_instance['title']);
35
- $instance['type'] = $new_instance['type'];
36
- $instance['gallery_id'] = $new_instance['gallery_id'];
37
- $instance['album_id'] = $new_instance['album_id'];
38
- $instance['show'] = $new_instance['show'];
39
- $instance['count'] = $new_instance['count'];
40
- $instance['width'] = $new_instance['width'];
41
- $instance['height'] = $new_instance['height'];
42
- $instance['theme_id'] = $new_instance['theme_id'];
43
- return $instance;
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerWidgetSlideshow.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerWidgetSlideshow extends WP_Widget {
4
- private $view;
5
- private $model;
6
-
7
- public function __construct() {
8
- $widget_ops = array(
9
- 'classname' => 'bwp_gallery_slideshow',
10
- 'description' => 'Add Photo Gallery slideshow to Your widget area.'
11
- );
12
- // Widget Control Settings.
13
- $control_ops = array('id_base' => 'bwp_gallery_slideshow');
14
- // Create the widget.
15
- parent::__construct('bwp_gallery_slideshow', 'Photo Gallery Slideshow', $widget_ops, $control_ops);
16
- require_once WD_BWG_DIR . "/admin/models/BWGModelWidgetSlideshow.php";
17
- $this->model = new BWGModelWidgetSlideshow();
18
- require_once WD_BWG_DIR . "/admin/views/BWGViewWidgetSlideshow.php";
19
- $this->view = new BWGViewWidgetSlideshow($this->model);
20
- }
21
-
22
- public function widget($args, $instance) {
23
- $this->view->widget($args, $instance);
24
- }
25
-
26
- public function form( $instance ) {
27
- $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('gallery_id'), parent::get_field_name('gallery_id'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('effect'), parent::get_field_name('effect'), parent::get_field_id('interval'), parent::get_field_name('interval'), parent::get_field_id('shuffle'), parent::get_field_name('shuffle'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'), parent::get_field_id('enable_ctrl_btn'), parent::get_field_name('enable_ctrl_btn'), parent::get_field_id('enable_autoplay'), parent::get_field_name('enable_autoplay'));
28
- }
29
-
30
- // Update Settings.
31
- public function update($new_instance, $old_instance) {
32
- $instance['title'] = strip_tags($new_instance['title']);
33
- $instance['gallery_id'] = $new_instance['gallery_id'];
34
- $instance['width'] = $new_instance['width'];
35
- $instance['height'] = $new_instance['height'];
36
- $instance['effect'] = $new_instance['effect'];
37
- $instance['interval'] = $new_instance['interval'];
38
- $instance['shuffle'] = $new_instance['shuffle'];
39
- $instance['theme_id'] = $new_instance['theme_id'];
40
- $instance['enable_ctrl_btn'] = $new_instance['enable_ctrl_btn'];
41
- $instance['enable_autoplay'] = $new_instance['enable_autoplay'];
42
- return $instance;
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/BWGControllerWidgetTags.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
-
3
- class BWGControllerWidgetTags extends WP_Widget {
4
-
5
- private $view;
6
- private $model;
7
-
8
- public function __construct() {
9
- $widget_ops = array(
10
- 'classname' => 'bwp_gallery_tags',
11
- 'description' => 'Add Photo Gallery Tags dynamic cloud to Your widget area.'
12
- );
13
- // Widget Control Settings.
14
- $control_ops = array('id_base' => 'bwp_gallery_tags');
15
- // Create the widget.
16
- parent::__construct('bwp_gallery_tags', 'Photo Gallery Tags Cloud', $widget_ops, $control_ops);
17
- require_once WD_BWG_DIR . "/admin/models/BWGModelWidgetTags.php";
18
- $this->model = new BWGModelWidgetTags();
19
-
20
- require_once WD_BWG_DIR . "/admin/views/BWGViewWidgetTags.php";
21
- $this->view = new BWGViewWidgetTags($this->model);
22
- }
23
-
24
- public function widget($args, $instance) {
25
- $this->view->widget($args, $instance);
26
- }
27
-
28
- public function form( $instance ) {
29
- $this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show_name'), parent::get_field_name('show_name'), parent::get_field_id('open_option'), parent::get_field_name('open_option'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('background_transparent'), parent::get_field_name('background_transparent'), parent::get_field_id('background_color'), parent::get_field_name('background_color'), parent::get_field_id('text_color'), parent::get_field_name('text_color'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
30
- }
31
-
32
- // Update Settings.
33
- public function update($new_instance, $old_instance) {
34
- $instance['title'] = strip_tags($new_instance['title']);
35
- $instance['type'] = $new_instance['type'];
36
- $instance['show_name'] = $new_instance['show_name'];
37
- $instance['open_option'] = $new_instance['open_option'];
38
- $instance['count'] = $new_instance['count'];
39
- $instance['width'] = $new_instance['width'];
40
- $instance['height'] = $new_instance['height'];
41
- $instance['background_transparent'] = $new_instance['background_transparent'];
42
- $instance['background_color'] = $new_instance['background_color'];
43
- $instance['text_color'] = $new_instance['text_color'];
44
- $instance['theme_id'] = $new_instance['theme_id'];
45
- return $instance;
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/Editimage.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class EditimageController_bwg
5
+ */
6
+ class EditimageController_bwg {
7
+ /**
8
+ * @var $model
9
+ */
10
+ private $model;
11
+ /**
12
+ * @var $view
13
+ */
14
+ private $view;
15
+
16
+ public function __construct() {
17
+ $this->model = new EditimageModel_bwg();
18
+ $this->view = new EditimageView_bwg();
19
+ }
20
+
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ $image_data = array();
27
+ $type = WDWLibrary::get('type', 'display');
28
+ if ( $type == 'crop' || $type == 'rotate' ) {
29
+ $image_data = $this->model->get_image_data();
30
+ }
31
+ $this->view->$type($image_data);
32
+ }
33
+ }
admin/controllers/Galleries.php ADDED
@@ -0,0 +1,494 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class GalleriesController_bwg {
4
+ /**
5
+ * @var $model
6
+ */
7
+ private $model;
8
+ /**
9
+ * @var $view
10
+ */
11
+ private $view;
12
+ /**
13
+ * @var string $page
14
+ */
15
+ private $page;
16
+ /**
17
+ * @var int $items_per_page
18
+ */
19
+ private $items_per_page = 20;
20
+ /**
21
+ * @var array $actions
22
+ */
23
+ private $actions = array();
24
+ private $image_actions = array();
25
+
26
+ public function __construct() {
27
+ // Allowed upload mime_types.
28
+ add_filter('upload_mimes', array(BWG(), 'allowed_upload_mime_types'), 10, 2);
29
+ $this->model = new GalleriesModel_bwg();
30
+ $this->view = new GalleriesView_bwg();
31
+ $this->page = WDWLibrary::get('page');
32
+
33
+ $this->actions = array(
34
+ 'publish' => array(
35
+ 'title' => __('Publish', BWG()->prefix),
36
+ 'bulk_action' => __('published', BWG()->prefix),
37
+ ),
38
+ 'unpublish' => array(
39
+ 'title' => __('Unpublish', BWG()->prefix),
40
+ 'bulk_action' => __('unpublished', BWG()->prefix),
41
+ ),
42
+ 'delete' => array(
43
+ 'title' => __('Delete', BWG()->prefix),
44
+ 'bulk_action' => __('deleted', BWG()->prefix),
45
+ ),
46
+ );
47
+
48
+ $this->image_actions = array(
49
+ 'image_resize' => array(
50
+ 'title' => __('Resize', BWG()->prefix),
51
+ 'bulk_action' => __('resized', BWG()->prefix),
52
+ ),
53
+ 'image_recreate_thumbnail' => array(
54
+ 'title' => __('Recreate thumbnail', BWG()->prefix),
55
+ 'bulk_action' => __('recreated', BWG()->prefix),
56
+ ),
57
+ 'image_rotate_left' => array(
58
+ 'title' => __('Rotate left', BWG()->prefix),
59
+ 'bulk_action' => __('rotated left', BWG()->prefix),
60
+ ),
61
+ 'image_rotate_right' => array(
62
+ 'title' => __('Rotate right', BWG()->prefix),
63
+ 'bulk_action' => __('rotated right', BWG()->prefix),
64
+ ),
65
+ 'image_set_watermark' => array(
66
+ 'title' => __('Set watermark', BWG()->prefix),
67
+ 'bulk_action' => __('edited', BWG()->prefix),
68
+ ),
69
+ 'image_reset' => array(
70
+ 'title' => __('Reset', BWG()->prefix),
71
+ 'bulk_action' => __('reset', BWG()->prefix),
72
+ ),
73
+ 'image_edit' => array(
74
+ 'title' => __('Edit info', BWG()->prefix),
75
+ 'bulk_action' => __('edited', BWG()->prefix),
76
+ ),
77
+ 'image_add_tag' => array(
78
+ 'title' => __('Add tag', BWG()->prefix),
79
+ 'bulk_action' => __('edited', BWG()->prefix),
80
+ ),
81
+ 'image_publish' => array(
82
+ 'title' => __('Publish', BWG()->prefix),
83
+ 'bulk_action' => __('published', BWG()->prefix),
84
+ ),
85
+ 'image_unpublish' => array(
86
+ 'title' => __('Unpublish', BWG()->prefix),
87
+ 'bulk_action' => __('unpublished', BWG()->prefix),
88
+ ),
89
+ 'image_delete' => array(
90
+ 'title' => __('Delete', BWG()->prefix),
91
+ 'bulk_action' => __('deleted', BWG()->prefix),
92
+ ),
93
+ );
94
+ if ( function_exists('BWGEC') ) {
95
+ $this->image_actions['set_image_pricelist'] = array(
96
+ 'title' => __('Add pricelist', BWG()->prefix),
97
+ 'bulk_action' => __('edited', BWG()->prefix),
98
+ );
99
+ $this->image_actions['remove_pricelist_all'] = array(
100
+ 'title' => __('Remove pricelist', BWG()->prefix),
101
+ 'bulk_action' => __('edited', BWG()->prefix),
102
+ );
103
+ }
104
+
105
+ $user = get_current_user_id();
106
+ $screen = get_current_screen();
107
+ $option = $screen->get_option('per_page', 'option');
108
+ $this->items_per_page = get_user_meta($user, $option, TRUE);
109
+
110
+ if ( empty ($this->items_per_page) || $this->items_per_page < 1 ) {
111
+ $this->items_per_page = $screen->get_option('per_page', 'default');
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Execute.
117
+ */
118
+ public function execute() {
119
+ $task = WDWLibrary::get('task');
120
+ $id = (int) WDWLibrary::get('current_id', 0);
121
+ if ( method_exists($this, $task) ) {
122
+ if ( $task != 'edit' && $task != 'display' ) {
123
+ check_admin_referer(BWG()->nonce, BWG()->nonce);
124
+ }
125
+ $action = WDWLibrary::get('bulk_action', -1);
126
+ $image_action = WDWLibrary::get('image_bulk_action', -1);
127
+ if ( $action != -1 ) {
128
+ $this->bulk_action($action);
129
+ }
130
+ elseif ( $image_action != -1 ) {
131
+ $this->image_bulk_action($image_action);
132
+ }
133
+ else {
134
+ $this->$task($id);
135
+ }
136
+ }
137
+ else {
138
+ $this->display();
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Display.
144
+ */
145
+ public function display() {
146
+ // Set params for view.
147
+ $params = array();
148
+ $params['page'] = $this->page;
149
+ $params['page_title'] = __('Galleries', BWG()->prefix);
150
+ $params['actions'] = $this->actions;
151
+ $params['order'] = WDWLibrary::get('order', 'asc');
152
+ $params['orderby'] = WDWLibrary::get('orderby', 'name');
153
+ // To prevent SQL injections.
154
+ $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
155
+ if ( !in_array($params['orderby'], array( 'name', 'author' )) ) {
156
+ $params['orderby'] = 'id';
157
+ }
158
+ $params['items_per_page'] = $this->items_per_page;
159
+ $page = (int) WDWLibrary::get('paged', 1);
160
+ $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
161
+ $params['page_num'] = $page_num;
162
+ $params['search'] = WDWLibrary::get('s', '');
163
+
164
+ $params['total'] = $this->model->total($params);
165
+ $params['rows'] = $this->model->get_rows_data($params);
166
+
167
+ $url_arg = array();
168
+ $page_url = add_query_arg(array(
169
+ 'page' => $this->page,
170
+ BWG()->nonce => wp_create_nonce(BWG()->nonce),
171
+ ), admin_url('admin.php'));
172
+
173
+ $page_url = add_query_arg($url_arg, $page_url);
174
+ $params['page_url'] = $page_url;
175
+
176
+ // Delete images without gallery.
177
+ $this->model->delete_unknown_images();
178
+
179
+ $this->view->display($params);
180
+ }
181
+
182
+ /**
183
+ * Bulk actions.
184
+ *
185
+ * @param $task
186
+ */
187
+ public function bulk_action($task) {
188
+ $message = 0;
189
+ $successfully_updated = 0;
190
+ $url_arg = array('page' => $this->page,'task' => 'display');
191
+
192
+ $check = WDWLibrary::get('check', '');
193
+ $all = WDWLibrary::get('check_all_items', '');
194
+ $all = ($all == 'on' ? TRUE : FALSE);
195
+
196
+ if ( method_exists($this, $task) ) {
197
+ if ( $all ) {
198
+ $message = $this->$task(0, TRUE, TRUE);
199
+ $url_arg['message'] = $message;
200
+ }
201
+ else {
202
+ if ( $check ) {
203
+ foreach ( $check as $form_id => $item ) {
204
+ $message = $this->$task($form_id, TRUE);
205
+ if ( $message != 2 ) {
206
+ // Increase successfully updated items count, if action doesn't failed.
207
+ $successfully_updated++;
208
+ }
209
+ }
210
+ }
211
+ if ( $successfully_updated ) {
212
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, BWG()->prefix), $successfully_updated, $this->actions[$task]['bulk_action']);
213
+ }
214
+ $key = ($message === 2 ? 'message' : 'msg');
215
+ $url_arg[$key] = $message;
216
+ }
217
+ }
218
+
219
+ WDWLibrary::redirect(add_query_arg($url_arg, admin_url('admin.php')));
220
+ }
221
+
222
+ /**
223
+ * Delete.
224
+ *
225
+ * @param $id
226
+ * @param bool $bulk
227
+ * @param bool $all
228
+ *
229
+ * @return int
230
+ */
231
+ public function delete( $id, $bulk = FALSE, $all = FALSE ) {
232
+ $message = $this->model->delete($id, $all);
233
+
234
+ if ( $bulk ) {
235
+ return $message;
236
+ }
237
+
238
+ WDWLibrary::redirect(add_query_arg(array(
239
+ 'page' => $this->page,
240
+ 'task' => 'display',
241
+ 'message' => $message,
242
+ ), admin_url('admin.php')));
243
+ }
244
+
245
+ /**
246
+ * Publish.
247
+ *
248
+ * @param $id
249
+ * @param bool $bulk
250
+ * @param bool $all
251
+ *
252
+ * @return int
253
+ */
254
+ public function publish( $id, $bulk = FALSE, $all = FALSE ) {
255
+ global $wpdb;
256
+ $where = ($all ? '' : ' WHERE id=' . $id);
257
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_gallery` SET published=1' . $where);
258
+
259
+ if ( $updated !== FALSE ) {
260
+ $message = 9;
261
+ }
262
+ else {
263
+ $message = 2;
264
+ }
265
+
266
+ if ( $bulk ) {
267
+ return $message;
268
+ }
269
+ else {
270
+ WDWLibrary::redirect(add_query_arg(array(
271
+ 'page' => $this->page,
272
+ 'task' => 'display',
273
+ 'message' => $message,
274
+ ), admin_url('admin.php')));
275
+ }
276
+ }
277
+
278
+ /**
279
+ * Unpublish.
280
+ *
281
+ * @param $id
282
+ * @param bool $bulk
283
+ * @param bool $all
284
+ *
285
+ * @return int
286
+ */
287
+ public function unpublish( $id, $bulk = FALSE, $all = FALSE ) {
288
+ global $wpdb;
289
+ $where = ($all ? '' : ' WHERE id=' . $id);
290
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_gallery` SET published=0' . $where);
291
+
292
+ if ( $updated !== FALSE ) {
293
+ $message = 10;
294
+ }
295
+ else {
296
+ $message = 2;
297
+ }
298
+
299
+ if ( $bulk ) {
300
+ return $message;
301
+ }
302
+ else {
303
+ WDWLibrary::redirect(add_query_arg(array(
304
+ 'page' => $this->page,
305
+ 'task' => 'display',
306
+ 'message' => $message,
307
+ ), admin_url('admin.php')));
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Add/Edit.
313
+ *
314
+ * @param int $id
315
+ * @param array $message
316
+ */
317
+ public function edit( $id = 0, $message = array() ) {
318
+ $row = $this->model->get_row_data($id);
319
+ if ( $id && empty($row->slug) ) {
320
+ WDWLibrary::redirect(add_query_arg(array(
321
+ 'page' => $this->page,
322
+ 'task' => 'display',
323
+ ), admin_url('admin.php')));
324
+ }
325
+ // Set params for view.
326
+ $params = array();
327
+ $params['id'] = $id;
328
+ $params['row'] = $row;
329
+ $params['form_action'] = add_query_arg(array(
330
+ 'page' => $this->page,
331
+ 'current_id' => $id,
332
+ BWG()->nonce => wp_create_nonce($this->page),
333
+ ), admin_url('admin.php'));
334
+ $params['add_preview_image_action'] = add_query_arg(array(
335
+ 'action' => 'addImages',
336
+ 'width' => '800',
337
+ 'height' => '550',
338
+ 'extensions' => 'jpg,jpeg,png,gif',
339
+ 'callback' => 'bwg_add_preview_image',
340
+ BWG()->nonce => wp_create_nonce('addImages'),
341
+ 'TB_iframe' => '1',
342
+ ), admin_url('admin-ajax.php'));
343
+ $params['add_images_action'] = add_query_arg(array(
344
+ 'action' => 'addImages',
345
+ 'width' => '800',
346
+ 'height' => '550',
347
+ 'extensions' => 'jpg,jpeg,png,gif',
348
+ 'callback' => 'bwg_add_image',
349
+ BWG()->nonce => wp_create_nonce('addImages'),
350
+ 'TB_iframe' => '1',
351
+ ), admin_url('admin-ajax.php'));
352
+ $params['add_tags_action'] = add_query_arg(array(
353
+ 'action' => 'addTags_' . BWG()->prefix,
354
+ 'width' => '785',
355
+ 'height' => '550',
356
+ BWG()->nonce => wp_create_nonce('addTags_' . BWG()->prefix),
357
+ ), admin_url('admin-ajax.php'));
358
+ $params['preview_action'] = WDWLibrary::get_custom_post_permalink(array(
359
+ 'slug' => $params['row']->slug,
360
+ 'post_type' => 'gallery',
361
+ ));
362
+ $params['shortcode_id'] = WDWLibrary::get_shortcode_id( array('slug' => $params['row']->slug, 'post_type' => 'gallery' ));
363
+ $params['instagram_post_gallery'] = $params['row']->gallery_type == 'instagram_post' ? TRUE : FALSE;
364
+ $params['facebook_post_gallery'] = (!$params['instagram_post_gallery']) ? ($params['row']->gallery_type == 'facebook_post' ? TRUE : FALSE) : FALSE;
365
+ $params['gallery_type'] = ($params['row']->gallery_type == 'instagram' || $params['row']->gallery_type == 'instagram_post') ? 'instagram' : (($params['row']->gallery_type == 'facebook_post' || $params['row']->gallery_type == 'facebook') ? 'facebook' : '');
366
+
367
+ // Image display params.
368
+ $params['actions'] = $this->image_actions;
369
+ $params['page_url'] = $params['form_action'];
370
+ $params['order'] = 'asc';
371
+ $params['orderby'] = 'order';
372
+ $params['items_per_page'] = $this->items_per_page;
373
+ $page = (int) WDWLibrary::get('paged', 1);
374
+ $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
375
+ $params['page_num'] = $page_num;
376
+ $params['search'] = WDWLibrary::get('s', '');
377
+ $params['message'] = $message;
378
+
379
+ $params['total'] = $this->model->image_total($id, $params);
380
+ $params['rows'] = $this->model->get_image_rows_data($id, $params);
381
+ $params['pager'] = 0;
382
+ $params['facebook_embed'] = $this->get_facebook_embed();
383
+ $this->view->edit( $params );
384
+ }
385
+
386
+ /**
387
+ * Save.
388
+ *
389
+ * @param $id
390
+ */
391
+ public function save( $id, $all = FALSE ) {
392
+ // Save gallery and images.
393
+ $data = $this->model->save();
394
+ $message = array('gallery_message' => $data['saved'], 'image_message' => '');
395
+
396
+ $ajax_task = WDWLibrary::get('ajax_task', '');
397
+ if ( $ajax_task != '' ) {
398
+ if ( method_exists($this->model, $ajax_task) ) {
399
+ $image_id = WDWLibrary::get('image_current_id', 0);
400
+ $message['image_message'] = $this->model->$ajax_task($image_id, $all);
401
+ }
402
+ }
403
+
404
+ $this->edit($data['id'], $message);
405
+ }
406
+
407
+ /**
408
+ * Bulk actions for images.
409
+ *
410
+ * @param $image_action
411
+ */
412
+ public function image_bulk_action($image_action) {
413
+ // Save gallery and images.
414
+ $data = $this->model->save();
415
+
416
+ $message = array();
417
+ $successfully_updated = 0;
418
+
419
+ $check = WDWLibrary::get('check', '');
420
+ $all = WDWLibrary::get('check_all_items', FALSE);
421
+
422
+ if ( method_exists($this->model, $image_action) ) {
423
+ if ( $all ) {
424
+ $message['image_message'] = $this->model->$image_action(0, TRUE);
425
+ }
426
+ else {
427
+ if ( $check ) {
428
+ foreach ( $check as $image_id ) {
429
+ if ( strpos($image_id, 'pr_') === FALSE ) {
430
+ $message['image_message'] = $this->model->$image_action($image_id);
431
+ if ( $message['image_message'] == 6 ) {
432
+ // Action set watermark with none watermark type.
433
+ break;
434
+ }
435
+ elseif ( $message['image_message'] != 2 ) {
436
+ // Increase successfully updated items count, if action doesn't failed.
437
+ $successfully_updated++;
438
+ }
439
+ }
440
+ }
441
+ }
442
+ if ( $successfully_updated ) {
443
+ $message['image_message'] = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, BWG()->prefix), $successfully_updated, $this->image_actions[$image_action]['bulk_action']);
444
+ }
445
+ }
446
+ }
447
+
448
+ $this->edit($data['id'], $message);
449
+ }
450
+
451
+ // ToDo: remove
452
+ public function save_old() {
453
+
454
+ $msg = __("Item Succesfully Saved.", BWG()->prefix);
455
+ if ( function_exists('BWGEC') ) {
456
+ $not_set_items = $this->check_pricelist();
457
+ if ( empty($not_set_items) === FALSE ) {
458
+ $msg .= __(" Selected pricelist item longest dimension greater than some original images dimensions.", BWG()->prefix);
459
+ }
460
+ }
461
+ echo WDWLibrary::message($msg, 'wd_updated');
462
+ $this->display();
463
+ }
464
+
465
+ public function check_pricelist() {
466
+ global $wpdb;
467
+ $gallery_id = isset($_POST['current_id']) ? $_POST['current_id'] : 0;
468
+ $not_set_items = array();
469
+ if ( $gallery_id ) {
470
+ $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 . '"');
471
+ foreach ( $rows as $row ) {
472
+ if ( $row->item_longest_dimension ) {
473
+ $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $row->thumb_url, ENT_COMPAT | ENT_QUOTES));
474
+ list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
475
+ if ( $row->item_longest_dimension > $img_width ) {
476
+ $not_set_items[] = $row->id;
477
+ }
478
+ }
479
+ }
480
+ }
481
+ if ( empty($not_set_items) == FALSE ) {
482
+ echo "<input type='hidden' id='not_set_items' value='" . implode(",", $not_set_items) . "'>";
483
+ }
484
+
485
+ return $not_set_items;
486
+ }
487
+
488
+ private function get_facebook_embed() {
489
+ if ( has_filter('init_display_facebook_gallery_embed_bwg') ) {
490
+ $data = apply_filters('init_display_facebook_gallery_embed_bwg', array(), array() );
491
+ return $data;
492
+ }
493
+ }
494
+ }
admin/controllers/Licensing.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class LicensingController_bwg
5
+ */
6
+ class LicensingController_bwg {
7
+ private $view;
8
+ public function __construct() {
9
+ require_once BWG()->plugin_dir . "/admin/views/Licensing.php";
10
+ $this->view = new LicensingView_bwg();
11
+ }
12
+
13
+ public function execute() {
14
+ $task = WDWLibrary::get('task');
15
+ if (method_exists($this, $task)) {
16
+ $this->$task();
17
+ }
18
+ else {
19
+ $this->display();
20
+ }
21
+ }
22
+
23
+ public function display() {
24
+ $this->view->display();
25
+ }
26
+ }
admin/controllers/Options.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class OptionsController_bwg
5
+ */
6
+ class OptionsController_bwg {
7
+
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
+ }
19
+ $params = array();
20
+ $params['permissions'] = array(
21
+ 'manage_options' => 'Administrator',
22
+ 'moderate_comments' => 'Editor',
23
+ 'publish_posts' => 'Author',
24
+ 'edit_posts' => 'Contributor',
25
+ );
26
+ $built_in_watermark_fonts = array();
27
+ foreach (scandir(path_join(BWG()->plugin_dir, 'fonts')) as $filename) {
28
+ if (strpos($filename, '.') === 0) continue;
29
+ else $built_in_watermark_fonts[] = $filename;
30
+ }
31
+ $params['built_in_watermark_fonts'] = $built_in_watermark_fonts;
32
+ $params['watermark_fonts'] = array(
33
+ 'arial' => 'Arial',
34
+ 'Lucida grande' => 'Lucida grande',
35
+ 'segoe ui' => 'Segoe ui',
36
+ 'tahoma' => 'Tahoma',
37
+ 'trebuchet ms' => 'Trebuchet ms',
38
+ 'verdana' => 'Verdana',
39
+ 'cursive' =>'Cursive',
40
+ 'fantasy' => 'Fantasy',
41
+ 'monospace' => 'Monospace',
42
+ 'serif' => 'Serif',
43
+ );
44
+ $params['effects'] = array(
45
+ 'none' => 'None',
46
+ 'cubeH' => 'Cube Horizontal',
47
+ 'cubeV' => 'Cube Vertical',
48
+ 'fade' => 'Fade',
49
+ 'sliceH' => 'Slice Horizontal',
50
+ 'sliceV' => 'Slice Vertical',
51
+ 'slideH' => 'Slide Horizontal',
52
+ 'slideV' => 'Slide Vertical',
53
+ 'scaleOut' => 'Scale Out',
54
+ 'scaleIn' => 'Scale In',
55
+ 'blockScale' => 'Block Scale',
56
+ 'kaleidoscope' => 'Kaleidoscope',
57
+ 'fan' => 'Fan',
58
+ 'blindH' => 'Blind Horizontal',
59
+ 'blindV' => 'Blind Vertical',
60
+ 'random' => 'Random',
61
+ );
62
+ $params['page_title'] = __('Edit options', BWG()->prefix);
63
+ $params['active_tab'] = WDWLibrary::get('active_tab', 0);
64
+ $params['gallery_type'] = WDWLibrary::get('gallery_type', 'thumbnails');
65
+ $params['album_type'] = WDWLibrary::get('album_type', 'album_compact_preview');
66
+ $params['gallery_types_name'] = array(
67
+ 'thumbnails' => __('Thumbnails', BWG()->prefix),
68
+ 'thumbnails_masonry' => __('Masonry', BWG()->prefix),
69
+ 'thumbnails_mosaic' => __('Mosaic', BWG()->prefix),
70
+ 'slideshow' => __('Slideshow', BWG()->prefix),
71
+ 'image_browser' => __('Image Browser', BWG()->prefix),
72
+ 'blog_style' => __('Blog Style', BWG()->prefix),
73
+ 'carousel' => __('Carousel', BWG()->prefix),
74
+ );
75
+ $params['album_types_name'] = array(
76
+ 'album_compact_preview' => __('Compact', BWG()->prefix),
77
+ 'album_masonry_preview' => __('Masonry', BWG()->prefix),
78
+ 'album_extended_preview' => __('Extended', BWG()->prefix),
79
+ );
80
+ if (method_exists($this, $task)) {
81
+ $this->$task($params);
82
+ }
83
+ else {
84
+ $this->display($params);
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Display.
90
+ *
91
+ * @param $params
92
+ */
93
+ public function display($params = array()) {
94
+ $row = new WD_BWG_Options();
95
+ // Set Instagram access token.
96
+ $instagram_access_token = WDWLibrary::get('access_token');
97
+ if ( $instagram_access_token ) {
98
+ ob_end_clean();
99
+ $success = $this->model->set_instagram_access_token($instagram_access_token);
100
+ if ( $success ) {
101
+ wp_redirect( add_query_arg( array('page' => $this->page .'&instagram_token=' . time() ), admin_url('admin.php')) );
102
+ }
103
+ }
104
+
105
+ $params['row'] = $row;
106
+ $params['page'] = $this->page;
107
+ $params['instagram_return_url'] = 'https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic+public_content&redirect_uri=http://api.web-dorado.com/instagram/?return_url=' . urlencode( admin_url('admin.php?page=options_bwg')) . '&response_type=token';
108
+ $params['instagram_reset_href'] = add_query_arg( array(
109
+ 'page' => $this->page,
110
+ 'task' => 'reset_instagram_access_token',
111
+ BWG()->nonce => wp_create_nonce(BWG()->nonce),
112
+ ), admin_url('admin.php'));
113
+ $this->view->display($params);
114
+ }
115
+
116
+ /**
117
+ * Reset.
118
+ *
119
+ * @param array $params
120
+ */
121
+ public function reset( $params = array() ) {
122
+ $params['row'] = new WD_BWG_Options(true);
123
+ $params['page'] = $this->page;
124
+ $params['instagram_return_url'] = 'https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic+public_content&redirect_uri=http://api.web-dorado.com/instagram/?return_url=' . urlencode( admin_url('admin.php?page=options_bwg')) . '&response_type=token';
125
+ $params['instagram_reset_href'] = add_query_arg( array(
126
+ 'page' => $this->page,
127
+ 'task' => 'reset_instagram_access_token',
128
+ BWG()->nonce => wp_create_nonce(BWG()->nonce),
129
+ ), admin_url('admin.php'));
130
+ echo WDWLibrary::message_id(0, __('Default values restored. Changes must be saved.', BWG()->prefix), 'notice notice-warning');
131
+ $this->view->display($params);
132
+ }
133
+
134
+ /**
135
+ * Reset instagram access token.
136
+ *
137
+ * @param array $params
138
+ */
139
+ function reset_instagram_access_token ( $params = array() ) {
140
+ ob_end_clean();
141
+ $success = $this->model->set_instagram_access_token();
142
+ if ( $success ) {
143
+ wp_redirect( add_query_arg( array( 'page' => $this->page . '&instagram_token=' . time() ), admin_url( 'admin.php' ) ) );
144
+ }
145
+ }
146
+
147
+ public function save( $params = array() ) {
148
+ $this->save_db();
149
+ $this->display( $params );
150
+ }
151
+
152
+ public function save_db() {
153
+ $row = new WD_BWG_Options();
154
+ if (isset($_POST['old_images_directory'])) {
155
+ $row->old_images_directory = esc_html(stripslashes($_POST['old_images_directory']));
156
+ }
157
+ if (isset($_POST['images_directory'])) {
158
+ $row->images_directory = esc_html(stripslashes($_POST['images_directory']));
159
+ 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)) {
160
+ if (!is_dir(ABSPATH . $row->images_directory)) {
161
+ echo WDWLibrary::message_id(0, __('Uploads directory doesn\'t exist. Old value is restored.', BWG()->prefix), 'error');
162
+ }
163
+ else {
164
+ echo WDWLibrary::message_id(0, __('Warning: "photo-gallery" folder already exists in uploads directory. Old value is restored.', BWG()->prefix), 'error');
165
+ }
166
+ if ($row->old_images_directory) {
167
+ $row->images_directory = $row->old_images_directory;
168
+ }
169
+ else {
170
+ $upload_dir = wp_upload_dir();
171
+ if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
172
+ mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
173
+ }
174
+ $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
175
+ }
176
+ }
177
+ }
178
+ else {
179
+ $upload_dir = wp_upload_dir();
180
+ if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
181
+ mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
182
+ }
183
+ $row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
184
+ }
185
+
186
+ foreach ($row as $name => $value) {
187
+ if ($name == 'autoupdate_interval') {
188
+ $autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : null);
189
+ /*minimum autoupdate interval is 1 min*/
190
+ $row->autoupdate_interval = isset($autoupdate_interval) && $autoupdate_interval >= 1 ? $autoupdate_interval : 1;
191
+ }
192
+ else if ($name != 'images_directory' && isset($_POST[$name])) {
193
+ $row->$name = esc_html(stripslashes($_POST[$name]));
194
+ }
195
+ }
196
+
197
+ $save = update_option('wd_bwg_options', json_encode($row), 'no');
198
+ if (isset($_POST['watermark']) && $_POST['watermark'] == "image_set_watermark") {
199
+ $this->image_set_watermark();
200
+ }
201
+ if (isset($_POST['recreate']) && $_POST['recreate'] == "resize_image_thumb") {
202
+ $this->resize_image_thumb();
203
+ echo WDWLibrary::message_id(0, __('All thumbnails are successfully recreated.', BWG()->prefix));
204
+ }
205
+
206
+ if ($save) {
207
+ if ($row->old_images_directory && $row->old_images_directory != $row->images_directory) {
208
+ rename(ABSPATH . $row->old_images_directory . '/photo-gallery', ABSPATH . $row->images_directory . '/photo-gallery');
209
+ }
210
+ if (!is_dir(ABSPATH . $row->images_directory . '/photo-gallery')) {
211
+ mkdir(ABSPATH . $row->images_directory . '/photo-gallery', 0777);
212
+ }
213
+ else {
214
+ echo WDWLibrary::message_id(0, __('Item Succesfully Saved.', BWG()->prefix));
215
+ }
216
+
217
+ /*clear hook for scheduled events,
218
+ refresh filter according to new time interval,
219
+ then add new schedule with the same hook name
220
+ */
221
+ wp_clear_scheduled_hook( 'bwg_schedule_event_hook' );
222
+ remove_filter( 'cron_schedules', array(BWG(), 'autoupdate_interval') );
223
+ add_filter( 'cron_schedules', array(BWG(), 'autoupdate_interval') );
224
+ wp_schedule_event( time(), 'bwg_autoupdate_interval', 'bwg_schedule_event_hook' );
225
+ }
226
+ }
227
+
228
+ public function image_set_watermark() {
229
+ WDWLibrary::bwg_image_set_watermark(0);
230
+ echo WDWLibrary::message_id(0, __('All images are successfully watermarked.', BWG()->prefix), 'updated');
231
+ }
232
+
233
+ public function image_recover_all($params) {
234
+ WDWLibrary::bwg_image_recover_all(0);
235
+ echo WDWLibrary::message_id(0, __('All images are successfully reset.', BWG()->prefix), 'updated');
236
+ $this->display($params);
237
+ }
238
+
239
+ public function resize_image_thumb() {
240
+ global $wpdb;
241
+
242
+ $img_ids = $wpdb->get_results('SELECT id, thumb_url, filetype FROM ' . $wpdb->prefix . 'bwg_image');
243
+ foreach ($img_ids as $img_id) {
244
+ if ( preg_match('/EMBED/', $img_id->filetype) == 1 ) {
245
+ continue;
246
+ }
247
+ $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
248
+ $new_file_path = htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
249
+ $image = wp_get_image_editor( $file_path );
250
+ if ( ! is_wp_error( $image ) ) {
251
+ $img_width = $image->get_size()['width'];
252
+ $img_height = $image->get_size()['height'];
253
+ }
254
+ if (!$img_width || !$img_height) {
255
+ continue;
256
+ }
257
+ $max_width = BWG()->options->upload_thumb_width;
258
+ $max_height = BWG()->options->upload_thumb_height;
259
+ $scale = min(
260
+ $max_width / $img_width,
261
+ $max_height / $img_height
262
+ );
263
+ $new_width = $img_width * $scale;
264
+ $new_height = $img_height * $scale;
265
+
266
+ $image->set_quality(BWG()->options->image_quality);
267
+ $image->resize($new_width, $new_height, false);
268
+ $image->save($new_file_path);
269
+ }
270
+ }
271
+ }
admin/controllers/Shortcode.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ShortcodeController_bwg {
4
+
5
+ public function __construct() {
6
+ $this->model = new ShortcodeModel_bwg();
7
+ $this->view = new ShortcodeView_bwg();
8
+ $this->page = WDWLibrary::get('page');
9
+ $this->from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'shortcode_' . BWG()->prefix)) ? TRUE : FALSE);
10
+ }
11
+
12
+ public function execute() {
13
+ $task = WDWLibrary::get('task');
14
+ if ( $task != '' && $this->from_menu ) {
15
+ if ( !WDWLibrary::verify_nonce(BWG()->nonce) ) {
16
+ die('Sorry, your nonce did not verify.');
17
+ }
18
+ }
19
+ if ( method_exists($this, $task) ) {
20
+ $this->$task();
21
+ }
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ $params = array();
27
+ $params['gutenberg_callback'] = WDWLibrary::get('callback', 0);
28
+ $params['gutenberg_id'] = WDWLibrary::get('edit', 0);
29
+ $params['from_menu'] = $this->from_menu;
30
+ $params['gallery_rows'] = $this->model->get_gallery_rows_data();
31
+ $params['album_rows'] = $this->model->get_album_rows_data();
32
+ $params['theme_rows'] = $this->model->get_theme_rows_data();
33
+ $params['shortcodes'] = $this->model->get_shortcode_data();
34
+ $params['shortcode_max_id'] = $this->model->get_shortcode_max_id();
35
+ $params['tag_rows'] = $this->model->get_tag_rows_data();
36
+
37
+ $params['effects'] = array(
38
+ 'none' => __('None',BWG()->prefix),
39
+ 'cubeH' => __('Cube Horizontal',BWG()->prefix),
40
+ 'cubeV' => __('Cube Vertical',BWG()->prefix),
41
+ 'fade' => __('Fade',BWG()->prefix),
42
+ 'sliceH' => __('Slice Horizontal',BWG()->prefix),
43
+ 'sliceV' => __('Slice Vertical',BWG()->prefix),
44
+ 'slideH' => __('Slide Horizontal',BWG()->prefix),
45
+ 'slideV' => __('Slide Vertical',BWG()->prefix),
46
+ 'scaleOut' => __('Scale Out',BWG()->prefix),
47
+ 'scaleIn' => __('Scale In',BWG()->prefix),
48
+ 'blockScale' => __('Block Scale',BWG()->prefix),
49
+ 'kaleidoscope' => __('Kaleidoscope',BWG()->prefix),
50
+ 'fan' => __('Fan',BWG()->prefix),
51
+ 'blindH' => __('Blind Horizontal',BWG()->prefix),
52
+ 'blindV' => __('Blind Vertical',BWG()->prefix),
53
+ 'random' => __('Random',BWG()->prefix),
54
+ );
55
+ $params['watermark_fonts'] = WDWLibrary::get_fonts();
56
+ $params['gallery_types_name'] = array(
57
+ 'thumbnails' => __('Thumbnails', BWG()->prefix),
58
+ 'thumbnails_masonry' => __('Masonry', BWG()->prefix),
59
+ 'thumbnails_mosaic' => __('Mosaic', BWG()->prefix),
60
+ 'slideshow' => __('Slideshow', BWG()->prefix),
61
+ 'image_browser' => __('Image Browser', BWG()->prefix),
62
+ 'blog_style' => __('Blog Style', BWG()->prefix),
63
+ 'carousel' => __('Carousel', BWG()->prefix),
64
+ );
65
+ $params['album_types_name'] = array(
66
+ 'album_compact_preview' => __('Compact', BWG()->prefix),
67
+ 'album_masonry_preview' => __('Masonry', BWG()->prefix),
68
+ 'album_extended_preview' => __('Extended', BWG()->prefix),
69
+ );
70
+
71
+ $this->view->display($params);
72
+ }
73
+
74
+ public function save() {
75
+ global $wpdb;
76
+ $tagtext = ((isset($_POST['tagtext'])) ? stripslashes($_POST['tagtext']) : '');
77
+ if ($tagtext) {
78
+ $id = ((isset($_POST['currrent_id'])) ? (int) esc_html(stripslashes($_POST['currrent_id'])) : 0);
79
+ $insert = ((isset($_POST['bwg_insert'])) ? (int) esc_html(stripslashes($_POST['bwg_insert'])) : 0);
80
+ if (!$insert) {
81
+ $wpdb->update($wpdb->prefix . 'bwg_shortcode', array(
82
+ 'tagtext' => $tagtext
83
+ ), array('id' => $id));
84
+ }
85
+ else {
86
+ $wpdb->insert($wpdb->prefix . 'bwg_shortcode', array(
87
+ 'id' => $id,
88
+ 'tagtext' => $tagtext
89
+ ), array(
90
+ '%d',
91
+ '%s'
92
+ ));
93
+ }
94
+ }
95
+ }
96
+ }
admin/controllers/Themes.php ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ThemesController_bwg
4
+ */
5
+ class ThemesController_bwg {
6
+ /**
7
+ * @var $model
8
+ */
9
+ private $model;
10
+ /**
11
+ * @var $view
12
+ */
13
+ private $view;
14
+ /**
15
+ * @var string $page
16
+ */
17
+ private $page;
18
+ /**
19
+ * @var string $bulk_action_name
20
+ */
21
+ private $bulk_action_name;
22
+ /**
23
+ * @var int $items_per_page
24
+ */
25
+ private $items_per_page = 20;
26
+ /**
27
+ * @var array $actions
28
+ */
29
+ private $actions = array();
30
+
31
+ public function __construct() {
32
+ $this->model = new ThemesModel_bwg();
33
+ $this->view = new ThemesView_bwg();
34
+
35
+ $this->page = WDWLibrary::get('page');
36
+
37
+ $this->actions = array(
38
+ 'duplicate' => array(
39
+ 'title' => __('Duplicate', BWG()->prefix),
40
+ $this->bulk_action_name => __('duplicated', BWG()->prefix),
41
+ ),
42
+ 'delete' => array(
43
+ 'title' => __('Delete', BWG()->prefix),
44
+ $this->bulk_action_name => __('deleted', BWG()->prefix),
45
+ ),
46
+ );
47
+
48
+ $user = get_current_user_id();
49
+ $screen = get_current_screen();
50
+ $option = $screen->get_option('per_page', 'option');
51
+ $this->items_per_page = get_user_meta($user, $option, true);
52
+
53
+ if ( empty ( $this->items_per_page) || $this->items_per_page < 1 ) {
54
+ $this->items_per_page = $screen->get_option( 'per_page', 'default' );
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Execute.
60
+ */
61
+ public function execute() {
62
+ $task = WDWLibrary::get('task');
63
+ $id = (int) WDWLibrary::get('current_id', 0);
64
+ if ( method_exists($this, $task) ) {
65
+ if ( $task != 'add' && $task != 'edit' && $task != 'display' ) {
66
+ check_admin_referer(BWG()->nonce, BWG()->nonce);
67
+ }
68
+ $action = WDWLibrary::get('bulk_action', -1);
69
+ if ( $action != -1 ) {
70
+ $this->bulk_action($action);
71
+ }
72
+ else {
73
+ $this->$task($id);
74
+ }
75
+ }
76
+ else {
77
+ $this->display();
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Display.
83
+ */
84
+ public function display() {
85
+ // Set params for view.
86
+ $params = array();
87
+ $params['page'] = $this->page;
88
+ $params['page_title'] = __('Themes', BWG()->prefix);
89
+ $params['actions'] = $this->actions;
90
+ $params['order'] = WDWLibrary::get('order', 'desc');
91
+ $params['orderby'] = WDWLibrary::get('orderby', 'default_theme');
92
+ // To prevent SQL injections.
93
+ $params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
94
+ if ( !in_array($params['orderby'], array( 'name', 'default_theme' )) ) {
95
+ $params['orderby'] = 'default_theme';
96
+ }
97
+ $params['items_per_page'] = $this->items_per_page;
98
+ $page = (int) WDWLibrary::get('paged', 1);
99
+ $page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
100
+ $params['page_num'] = $page_num;
101
+ $params['search'] = WDWLibrary::get('s', '');;
102
+ $params['total'] = $this->model->total($params);
103
+ $params['rows_data'] = $this->model->get_rows_data($params);
104
+ $this->view->display($params);
105
+ }
106
+
107
+ /**
108
+ * Bulk actions.
109
+ *
110
+ * @param $task
111
+ */
112
+ public function bulk_action($task) {
113
+ $message = 0;
114
+ $successfully_updated = 0;
115
+
116
+ $check = WDWLibrary::get('check', '');
117
+ $all = WDWLibrary::get('check_all_items', '');
118
+ $all = ($all == 'on' ? TRUE : FALSE);
119
+
120
+ if ( $check ) {
121
+ foreach ( $check as $form_id => $item ) {
122
+ if ( method_exists($this, $task) ) {
123
+ $message = $this->$task($form_id, TRUE, $all);
124
+ if ( $message != 2 ) {
125
+ // Increase successfully updated items count, if action doesn't failed.
126
+ $successfully_updated++;
127
+ }
128
+ }
129
+ }
130
+ if ( $successfully_updated ) {
131
+ $block_action = $this->bulk_action_name;
132
+ $message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, BWG()->prefix), $successfully_updated, $this->actions[$task][$block_action]);
133
+ }
134
+ }
135
+ WDWLibrary::redirect(add_query_arg(array(
136
+ 'page' => $this->page,
137
+ 'task' => 'display',
138
+ ($message === 2 ? 'message' : 'msg') => $message,
139
+ ), admin_url('admin.php')));
140
+ }
141
+
142
+ /**
143
+ * Delete form by id.
144
+ *
145
+ * @param $id
146
+ * @param bool $bulk
147
+ * @param bool $all
148
+ *
149
+ * @return int
150
+ */
151
+ public function delete( $id, $bulk = FALSE, $all = FALSE ) {
152
+ $isDefault = $this->model->get_default($id);
153
+ if ( $isDefault ) {
154
+ $message = 4;
155
+ }
156
+ else {
157
+ global $wpdb;
158
+ $where = ($all ? '' : ' WHERE id=' . $id);
159
+ $delete = $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_theme`' . $where);
160
+ if ( $delete ) {
161
+ $message = 3;
162
+ }
163
+ else {
164
+ $message = 2;
165
+ }
166
+ }
167
+ if ( $bulk ) {
168
+ return $message;
169
+ }
170
+ WDWLibrary::redirect( add_query_arg( array('page' => $this->page, 'task' => 'display', 'message' => $message), admin_url('admin.php') ) );
171
+ }
172
+
173
+ /**
174
+ * Duplicate by id.
175
+ *
176
+ * @param $id
177
+ * @param bool $bulk
178
+ * @param bool $all
179
+ *
180
+ * @return int
181
+ */
182
+ public function duplicate( $id, $bulk = FALSE, $all = FALSE ) {
183
+ $message = 2;
184
+ $table = 'bwg_theme';
185
+ $row = $this->model->select_rows("get_row", array(
186
+ "selection" => "*",
187
+ "table" => $table,
188
+ "where" => "id=" . (int) $id,
189
+ ));
190
+ if ( $row ) {
191
+ $row = (array) $row;
192
+ unset($row['id']);
193
+ $row['default_theme'] = 0;
194
+ $inserted = $this->model->insert_data_to_db($table, (array) $row);
195
+ if ( $inserted !== FALSE ) {
196
+ $message = 11;
197
+ }
198
+ }
199
+ if ( $bulk ) {
200
+ return $message;
201
+ }
202
+ else {
203
+ WDWLibrary::redirect(add_query_arg(array(
204
+ 'page' => $this->page,
205
+ 'task' => 'display',
206
+ 'message' => $message,
207
+ ), admin_url('admin.php')));
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Add.
213
+ *
214
+ * @param int $id
215
+ */
216
+ public function add( $id = 0 ) {
217
+ $this->edit(0);
218
+ }
219
+
220
+ /**
221
+ * Edit by id.
222
+ *
223
+ * @param int $id
224
+ * @param bool $bulk
225
+ */
226
+ public function edit( $id = 0, $bulk = FALSE ) {
227
+ $reset = WDWLibrary::get('reset', FALSE);
228
+ // Get Theme data.
229
+ $row = $this->model->get_row_data($id, $reset);
230
+ $current_type = WDWLibrary::get('current_type', 'Thumbnail');
231
+ $form_action = add_query_arg(array(
232
+ 'page' => 'themes_' . BWG()->prefix,
233
+ 'current_id' => $id,
234
+ BWG()->nonce => wp_create_nonce(BWG()->nonce),
235
+ ), admin_url('admin.php'));
236
+ $tabs = array(
237
+ 'Thumbnail' => __('Thumbnail', BWG()->prefix),
238
+ 'Masonry' => __('Masonry', BWG()->prefix),
239
+ 'Mosaic' => __('Mosaic', BWG()->prefix),
240
+ 'Slideshow' => __('Slideshow', BWG()->prefix),
241
+ 'Image_browser' => __('Image browser', BWG()->prefix),
242
+ 'Compact_album' => __('Compact album', BWG()->prefix),
243
+ 'Masonry_album' => __('Masonry album', BWG()->prefix),
244
+ 'Extended_album' => __('Extended album', BWG()->prefix),
245
+ 'Blog_style' => __('Blog style', BWG()->prefix),
246
+ 'Lightbox' => __('Lightbox', BWG()->prefix),
247
+ 'Navigation' => __('Navigation', BWG()->prefix),
248
+ 'Carousel' => __('Carousel', BWG()->prefix),
249
+ );
250
+ $border_styles = array(
251
+ 'none' => __('None', BWG()->prefix),
252
+ 'solid' => __('Solid', BWG()->prefix),
253
+ 'dotted' => __('Dotted', BWG()->prefix),
254
+ 'dashed' => __('Dashed', BWG()->prefix),
255
+ 'double' => __('Double', BWG()->prefix),
256
+ 'groove' => __('Groove', BWG()->prefix),
257
+ 'ridge' => __('Ridge', BWG()->prefix),
258
+ 'inset' => __('Inset', BWG()->prefix),
259
+ 'outset' => __('Outset', BWG()->prefix),
260
+ );
261
+ $google_fonts = WDWLibrary::get_google_fonts();
262
+ $font_families = array(
263
+ 'arial' => 'Arial',
264
+ 'lucida grande' => 'Lucida grande',
265
+ 'segoe ui' => 'Segoe ui',
266
+ 'tahoma' => 'Tahoma',
267
+ 'trebuchet ms' => 'Trebuchet ms',
268
+ 'verdana' => 'Verdana',
269
+ 'cursive' => 'Cursive',
270
+ 'fantasy' => 'Fantasy',
271
+ 'monospace' => 'Monospace',
272
+ 'serif' => 'Serif',
273
+ );
274
+ $aligns = array(
275
+ 'left' => __('Left', BWG()->prefix),
276
+ 'center' => __('Center', BWG()->prefix),
277
+ 'right' => __('Right', BWG()->prefix),
278
+ );
279
+ $font_weights = array(
280
+ 'lighter' => __('Lighter', BWG()->prefix),
281
+ 'normal' => __('Normal', BWG()->prefix),
282
+ 'bold' => __('Bold', BWG()->prefix),
283
+ );
284
+ $hover_effects = array(
285
+ 'none' => __('None', BWG()->prefix),
286
+ 'rotate' => __('Rotate', BWG()->prefix),
287
+ 'scale' => __('Scale', BWG()->prefix),
288
+ 'skew' => __('Skew', BWG()->prefix),
289
+ );
290
+ $button_styles = array(
291
+ 'fa-chevron' => __('Chevron', BWG()->prefix),
292
+ 'fa-angle' => __('Angle', BWG()->prefix),
293
+ 'fa-angle-double' => __('Double', BWG()->prefix),
294
+ );
295
+ $rate_icons = array(
296
+ 'star' => __('Star', BWG()->prefix),
297
+ 'bell' => __('Bell', BWG()->prefix),
298
+ 'circle' => __('Circle', BWG()->prefix),
299
+ 'flag' => __('Flag', BWG()->prefix),
300
+ 'heart' => __('Heart', BWG()->prefix),
301
+ 'square' => __('Square', BWG()->prefix),
302
+ );
303
+ $params = array(
304
+ 'id' => $id,
305
+ 'row' => $row,
306
+ 'reset' => $reset,
307
+ 'form_action' => $form_action,
308
+ 'tabs' => $tabs,
309
+ 'current_type' => $current_type,
310
+ 'border_styles' => $border_styles,
311
+ 'google_fonts' => $google_fonts,
312
+ 'font_families' => $font_families,
313
+ 'aligns' => $aligns,
314
+ 'font_weights' => $font_weights,
315
+ 'hover_effects' => $hover_effects,
316
+ 'button_styles' => $button_styles,
317
+ 'rate_icons' => $rate_icons,
318
+ );
319
+ $this->view->edit($params);
320
+ }
321
+
322
+ /**
323
+ * Reset by id.
324
+ *
325
+ * @param int $id
326
+ */
327
+ public function reset( $id = 0 ) {
328
+ WDWLibrary::redirect(add_query_arg(array(
329
+ 'page' => $this->page,
330
+ 'task' => 'edit',
331
+ 'current_id' => $id,
332
+ 'reset' => '1',
333
+ ), admin_url('admin.php')));
334
+ }
335
+
336
+ /**
337
+ * Save by id.
338
+ *
339
+ * @param int $id
340
+ */
341
+ public function save( $id = 0 ) {
342
+ $data = $this->save_db($id);
343
+ $page = WDWLibrary::get('page');
344
+ $query_url = wp_nonce_url(admin_url('admin.php'), 'themes_bwg', 'bwg_nonce');
345
+ $query_url = add_query_arg(array(
346
+ 'page' => $page,
347
+ 'task' => 'edit',
348
+ 'current_id' => $data['id'],
349
+ 'message' => $data['msg'],
350
+ ), $query_url);
351
+ WDWLibrary::spider_redirect($query_url);
352
+ }
353
+ }
admin/controllers/Uninstall.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class UninstallController_bwg
5
+ */
6
+ class UninstallController_bwg {
7
+ /**
8
+ * @var $model
9
+ */
10
+ private $model;
11
+ /**
12
+ * @var $view
13
+ */
14
+ private $view;
15
+ /**
16
+ * @var string $page
17
+ */
18
+ private $page;
19
+
20
+ public function __construct() {
21
+ $this->model = new UninstallModel_bwg();
22
+ $this->view = new UninstallView_bwg();
23
+
24
+ $this->page = WDWLibrary::get('page');
25
+ }
26
+
27
+ /**
28
+ * Execute.
29
+ */
30
+ public function execute() {
31
+ $task = WDWLibrary::get('task');
32
+
33
+ if ( method_exists($this, $task) ) {
34
+ $this->$task();
35
+ }
36
+ else {
37
+ $this->display();
38
+ }
39
+ }
40
+
41
+ /**
42
+ * Display.
43
+ */
44
+ public function display() {
45
+ $params = array();
46
+ $params['page_title'] = sprintf(__('Uninstall %s', BWG()->prefix), BWG()->nicename);
47
+ $params['tables'] = $this->get_tables();
48
+
49
+ $this->view->display($params);
50
+ }
51
+
52
+ /**
53
+ * Return DB tables names.
54
+ *
55
+ * @return array
56
+ */
57
+ private function get_tables() {
58
+ global $wpdb;
59
+ $tables = array(
60
+ $wpdb->prefix . 'bwg_album',
61
+ $wpdb->prefix . 'bwg_album_gallery',
62
+ $wpdb->prefix . 'bwg_gallery',
63
+ $wpdb->prefix . 'bwg_image',
64
+ $wpdb->prefix . 'bwg_image_comment',
65
+ $wpdb->prefix . 'bwg_image_rate',
66
+ $wpdb->prefix . 'bwg_image_tag',
67
+ $wpdb->prefix . 'bwg_option',
68
+ $wpdb->prefix . 'bwg_theme',
69
+ $wpdb->prefix . 'bwg_shortcode',
70
+ );
71
+
72
+ return $tables;
73
+ }
74
+
75
+ /**
76
+ * Uninstall.
77
+ */
78
+ public function uninstall() {
79
+ $params = array();
80
+ $params['tables'] = $this->get_tables();
81
+
82
+ $this->model->delete_folder();
83
+ $this->model->delete_db_tables($params);
84
+ // Deactivate all addons.
85
+ WDWLibrary::deactivate_all_addons();
86
+ $params['page_title'] = sprintf(__('Uninstall %s', BWG()->prefix), BWG()->nicename);
87
+ $params['deactivate'] = TRUE;
88
+
89
+ $this->view->display($params);
90
+ }
91
+ }
admin/controllers/Widget.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class WidgetController_bwg
5
+ */
6
+ class WidgetController_bwg extends WP_Widget {
7
+
8
+ private $view;
9
+ private $model;
10
+
11
+ public function __construct() {
12
+ $widget_ops = array(
13
+ 'classname' => 'bwp_gallery',
14
+ 'description' => __('Add Photo Gallery albums or galleries to Your widget area.', BWG()->prefix)
15
+ );
16
+ // Widget Control Settings.
17
+ $control_ops = array('id_base' => 'bwp_gallery');
18
+ // Create the widget.
19
+ parent::__construct('bwp_gallery', 'Photo Gallery Widget', $widget_ops, $control_ops);
20
+ require_once( BWG()->plugin_dir . '/admin/models/Widget.php');
21
+ $this->model = new WidgetModel_bwg();
22
+
23
+ require_once( BWG()->plugin_dir . '/admin/views/Widget.php');
24
+ $this->view = new WidgetView_bwg();
25
+ }
26
+
27
+ /**
28
+ * @param array $args
29
+ * @param array $instance
30
+ */
31
+ public function widget($args, $instance) {
32
+ $this->view->widget($args, $instance);
33
+ }
34
+
35
+ /**
36
+ * Form.
37
+ *
38
+ * @param array $instance
39
+ */
40
+ public function form( $instance ) {
41
+ // Set params for view.
42
+ $params = array(
43
+ 'id_title' => parent::get_field_id('title'),
44
+ 'name_title' => parent::get_field_name('title'),
45
+ 'id_type' => parent::get_field_id('type'),
46
+ 'name_type' => parent::get_field_name('type'),
47
+ 'id_show' => parent::get_field_id('show'),
48
+ 'name_show' => parent::get_field_name('show'),
49
+ 'id_gallery_id' => parent::get_field_id('gallery_id'),
50
+ 'name_gallery_id' => parent::get_field_name('gallery_id'),
51
+ 'id_album_id' => parent::get_field_id('album_id'),
52
+ 'name_album_id' => parent::get_field_name('album_id'),
53
+ 'id_count' => parent::get_field_id('count'),
54
+ 'name_count' => parent::get_field_name('count'),
55
+ 'id_width' => parent::get_field_id('width'),
56
+ 'name_width' => parent::get_field_name('width'),
57
+ 'id_height' => parent::get_field_id('height'),
58
+ 'name_height' => parent::get_field_name('height'),
59
+ 'id_theme_id' => parent::get_field_id('theme_id'),
60
+ 'name_theme_id' => parent::get_field_name('theme_id'),
61
+ 'id_view_type' => parent::get_field_id('view_type'),
62
+ 'name_view_type' => parent::get_field_name('view_type'),
63
+ 'gallery_rows' => $this->model->get_gallery_rows_data(),
64
+ 'album_rows' => $this->model->get_album_rows_data(),
65
+ 'theme_rows' => $this->model->get_theme_rows_data()
66
+ );
67
+ $this->view->form($params, $instance);
68
+ }
69
+
70
+ /**
71
+ * Update.
72
+ *
73
+ * @param array $new_instance
74
+ * @param array $old_instance
75
+ * @return mixed
76
+ */
77
+ public function update($new_instance, $old_instance) {
78
+ $instance['title'] = strip_tags($new_instance['title']);
79
+ $instance['type'] = $new_instance['type'];
80
+ $instance['gallery_id'] = $new_instance['gallery_id'];
81
+ $instance['album_id'] = $new_instance['album_id'];
82
+ $instance['show'] = $new_instance['show'];
83
+ $instance['count'] = $new_instance['count'];
84
+ $instance['width'] = $new_instance['width'];
85
+ $instance['height'] = $new_instance['height'];
86
+ $instance['theme_id'] = $new_instance['theme_id'];
87
+ $instance['view_type'] = $new_instance['view_type'];
88
+ return $instance;
89
+ }
90
+ }
admin/controllers/WidgetSlideshow.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class WidgetSlideshowController_bwg
5
+ */
6
+ class WidgetSlideshowController_bwg extends WP_Widget {
7
+
8
+ private $view;
9
+ private $model;
10
+
11
+ public function __construct() {
12
+ $widget_ops = array(
13
+ 'classname' => 'bwp_gallery_slideshow',
14
+ 'description' => __('Add Photo Gallery slideshow to Your widget area.', BWG()->prefix)
15
+ );
16
+ // Widget Control Settings.
17
+ $control_ops = array('id_base' => 'bwp_gallery_slideshow');
18
+ // Create the widget.
19
+ parent::__construct('bwp_gallery_slideshow', 'Photo Gallery Slideshow', $widget_ops, $control_ops);
20
+ require_once( BWG()->plugin_dir . '/admin/models/Widget.php');
21
+ $this->model = new WidgetModel_bwg();
22
+
23
+ require_once( BWG()->plugin_dir . '/admin/views/WidgetSlideshow.php');
24
+ $this->view = new WidgetSlideshowView_bwg($this->model);
25
+ }
26
+
27
+ /**
28
+ * Widget.
29
+ *
30
+ * @param array $args
31
+ * @param array $instance
32
+ */
33
+ public function widget($args, $instance) {
34
+ $this->view->widget($args, $instance);
35
+ }
36
+
37
+ /**
38
+ * Form.
39
+ *
40
+ * @param array $instance
41
+ */
42
+ public function form( $instance ) {
43
+ $slideshow_effects = array(
44
+ 'none' => __('None', BWG()->prefix),
45
+ 'cubeH' => __('Cube Horizontal', BWG()->prefix),
46
+ 'cubeV' => __('Cube Vertical', BWG()->prefix),
47
+ 'fade' => __('Fade', BWG()->prefix),
48
+ 'sliceH' => __('Slice Horizontal', BWG()->prefix),
49
+ 'sliceV' => __('Slice Vertical', BWG()->prefix),
50
+ 'slideH' => __('Slide Horizontal', BWG()->prefix),
51
+ 'slideV' => __('Slide Vertical', BWG()->prefix),
52
+ 'scaleOut' => __('Scale Out', BWG()->prefix),
53
+ 'scaleIn' => __('Scale In', BWG()->prefix),
54
+ 'blockScale' => __('Block Scale', BWG()->prefix),
55
+ 'kaleidoscope' => __('Kaleidoscope', BWG()->prefix),
56
+ 'fan' => __('Fan', BWG()->prefix),
57
+ 'blindH' => __('Blind Horizontal', BWG()->prefix),
58
+ 'blindV' => __('Blind Vertical', BWG()->prefix),
59
+ 'random' => __('Random', BWG()->prefix),
60
+ );
61
+
62
+ // Set params for view.
63
+ $params = array(
64
+ 'id_title' => parent::get_field_id('title'),
65
+ 'name_title' => parent::get_field_name('title'),
66
+ 'id_gallery_id' => parent::get_field_id('gallery_id'),
67
+ 'name_gallery_id' => parent::get_field_name('gallery_id'),
68
+ 'id_width' => parent::get_field_id('width'),
69
+ 'name_width' => parent::get_field_name('width'),
70
+ 'id_height' => parent::get_field_id('height'),
71
+ 'name_height' => parent::get_field_name('height'),
72
+ 'id_filmstrip_height' => parent::get_field_id('filmstrip_height'),
73
+ 'name_filmstrip_height' => parent::get_field_name('filmstrip_height'),
74
+ 'id_effect' => parent::get_field_id('effect'),
75
+ 'name_effect' => parent::get_field_name('effect'),
76
+ 'id_interval' => parent::get_field_id('interval'),
77
+ 'name_interval' => parent::get_field_name('interval'),
78
+ 'id_shuffle' => parent::get_field_id('shuffle'),
79
+ 'name_shuffle' => parent::get_field_name('shuffle'),
80
+ 'id_theme_id' => parent::get_field_id('theme_id'),
81
+ 'name_theme_id' => parent::get_field_name('theme_id'),
82
+ 'id_enable_ctrl_btn' => parent::get_field_id('enable_ctrl_btn'),
83
+ 'name_enable_ctrl_btn' => parent::get_field_name('enable_ctrl_btn'),
84
+ 'id_enable_autoplay' => parent::get_field_id('enable_autoplay'),
85
+ 'name_enable_autoplay' => parent::get_field_name('enable_autoplay'),
86
+ 'gallery_rows' => $this->model->get_gallery_rows_data(),
87
+ 'theme_rows' => $this->model->get_theme_rows_data(),
88
+ 'slideshow_effects' => $slideshow_effects
89
+ );
90
+ $this->view->form($params, $instance);
91
+ }
92
+
93
+ // Update Settings.
94
+ public function update($new_instance, $old_instance) {
95
+ $instance['title'] = strip_tags($new_instance['title']);
96
+ $instance['gallery_id'] = $new_instance['gallery_id'];
97
+ $instance['width'] = $new_instance['width'];
98
+ $instance['height'] = $new_instance['height'];
99
+ $instance['filmstrip_height'] = $new_instance['filmstrip_height'];
100
+ $instance['effect'] = $new_instance['effect'];
101
+ $instance['interval'] = $new_instance['interval'];
102
+ $instance['shuffle'] = $new_instance['shuffle'];
103
+ $instance['theme_id'] = $new_instance['theme_id'];
104
+ $instance['enable_ctrl_btn'] = $new_instance['enable_ctrl_btn'];
105
+ $instance['enable_autoplay'] = $new_instance['enable_autoplay'];
106
+ return $instance;
107
+ }
108
+ }
admin/controllers/WidgetTags.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class WidgetTagsController_bwg
5
+ */
6
+ class WidgetTagsController_bwg extends WP_Widget {
7
+
8
+ private $view;
9
+ private $model;
10
+
11
+ public function __construct() {
12
+ $widget_ops = array(
13
+ 'classname' => 'bwp_gallery_tags',
14
+ 'description' => __('Add Photo Gallery Tags dynamic cloud to Your widget area.', BWG()->prefix)
15
+ );
16
+ // Widget Control Settings.
17
+ $control_ops = array('id_base' => 'bwp_gallery_tags');
18
+ // Create the widget.
19
+ parent::__construct('bwp_gallery_tags', 'Photo Gallery Tags Cloud', $widget_ops, $control_ops);
20
+ require_once( BWG()->plugin_dir . '/admin/models/Widget.php');
21
+ $this->model = new WidgetModel_bwg();
22
+
23
+ require_once( BWG()->plugin_dir . '/admin/views/WidgetTags.php');
24
+ $this->view = new WidgetTagsView_bwg();
25
+ }
26
+
27
+ /**
28
+ * Widget.
29
+ *
30
+ * @param array $args
31
+ * @param array $instance
32
+ */
33
+ public function widget($args, $instance) {
34
+ $this->view->widget($args, $instance);
35
+ }
36
+
37
+ /**
38
+ * Form.
39
+ *
40
+ * @param array $instance
41
+ */
42
+ public function form( $instance ) {
43
+ // Set params for view.
44
+ $params = array(
45
+ 'id_title' => parent::get_field_id('title'),
46
+ 'name_title' => parent::get_field_name('title'),
47
+ 'id_type' => parent::get_field_id('type'),
48
+ 'name_type' => parent::get_field_name('type'),
49
+ 'id_show_name' => parent::get_field_id('show_name'),
50
+ 'name_show_name' => parent::get_field_name('show_name'),
51
+ 'id_open_option' => parent::get_field_id('open_option'),
52
+ 'name_open_option' => parent::get_field_name('open_option'),
53
+ 'id_count' => parent::get_field_id('count'),
54
+ 'name_count' => parent::get_field_name('count'),
55
+ 'id_width' => parent::get_field_id('width'),
56
+ 'name_width' => parent::get_field_name('width'),
57
+ 'id_height' => parent::get_field_id('height'),
58
+ 'name_height' => parent::get_field_name('height'),
59
+ 'id_background_transparent' => parent::get_field_id('background_transparent'),
60
+ 'name_background_transparent' => parent::get_field_name('background_transparent'),
61
+ 'id_background_color' => parent::get_field_id('background_color'),
62
+ 'name_background_color' => parent::get_field_name('background_color'),
63
+ 'id_text_color' => parent::get_field_id('text_color'),
64
+ 'name_text_color' => parent::get_field_name('text_color'),
65
+ 'id_theme_id' => parent::get_field_id('theme_id'),
66
+ 'name_theme_id' => parent::get_field_name('theme_id'),
67
+ 'theme_rows' => $this->model->get_theme_rows_data()
68
+ );
69
+ $this->view->form($params, $instance);
70
+ }
71
+
72
+ /**
73
+ * Update.
74
+ *
75
+ * @param array $new_instance
76
+ * @param array $old_instance
77
+ * @return mixed
78
+ */
79
+ public function update($new_instance, $old_instance) {
80
+ $instance['title'] = strip_tags($new_instance['title']);
81
+ $instance['type'] = $new_instance['type'];
82
+ $instance['show_name'] = $new_instance['show_name'];
83
+ $instance['open_option'] = $new_instance['open_option'];
84
+ $instance['count'] = $new_instance['count'];
85
+ $instance['width'] = $new_instance['width'];
86
+ $instance['height'] = $new_instance['height'];
87
+ $instance['background_transparent'] = $new_instance['background_transparent'];
88
+ $instance['background_color'] = $new_instance['background_color'];
89
+ $instance['text_color'] = $new_instance['text_color'];
90
+ $instance['theme_id'] = $new_instance['theme_id'];
91
+ return $instance;
92
+ }
93
+ }
admin/models/AddTags.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AddTagsModel_bwg
5
+ */
6
+ class AddTagsModel_bwg {
7
+ /**
8
+ * Get rows data or total count.
9
+ *
10
+ * @param $params
11
+ * @param bool $total
12
+ *
13
+ * @return array|null|object|string
14
+ */
15
+ public function get_rows_data( $params, $total = FALSE ) {
16
+ global $wpdb;
17
+ $order = $params['order'];
18
+ $orderby = $params['orderby'];
19
+ $page_per = $params['items_per_page'];
20
+ $page_num = $params['page_num'];
21
+ $search = $params['search'];
22
+
23
+ if ( !$total ) {
24
+ $query = 'SELECT table1.term_id as id, table1.name, table1.slug';
25
+ }
26
+ else {
27
+ $query = 'SELECT COUNT(*)';
28
+ }
29
+
30
+ $query .= ' FROM `' . $wpdb->prefix . 'terms` AS table1';
31
+ $query .= ' INNER JOIN `' . $wpdb->prefix . 'term_taxonomy` AS table2 ON table1.term_id = table2.term_id';
32
+ $query .= ' WHERE table2.taxonomy="bwg_tag"';
33
+
34
+ if ( $search ) {
35
+ $query .= ' AND `name` LIKE "%' . $search . '%"';
36
+ }
37
+ if ( !$total ) {
38
+ $query .= ' ORDER BY `' . $orderby . '` ' . $order;
39
+ $query .= ' LIMIT ' . $page_num . ',' . $page_per;
40
+ }
41
+
42
+ if ( !$total ) {
43
+ $rows = $wpdb->get_results($query);
44
+ }
45
+ else {
46
+ $rows = $wpdb->get_var($query);
47
+ }
48
+
49
+ return $rows;
50
+ }
51
+
52
+ /**
53
+ * Return total count.
54
+ *
55
+ * @param $params
56
+ *
57
+ * @return array|null|object|string
58
+ */
59
+ public function total($params) {
60
+ return $this->get_rows_data($params, TRUE);
61
+ }
62
+ }
admin/models/Albums.php ADDED
@@ -0,0 +1,461 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AlbumsModel_bwg
5
+ */
6
+ class AlbumsModel_bwg {
7
+ /**
8
+ * Get rows data or total count.
9
+ *
10
+ * @param $params
11
+ * @param bool $total
12
+ *
13
+ * @return array|null|object|string
14
+ */
15
+ public function get_rows_data( $params, $total = FALSE ) {
16
+ global $wpdb;
17
+ $order = $params['order'];
18
+ $orderby = $params['orderby'];
19
+ $page_per = $params['items_per_page'];
20
+ $page_num = $params['page_num'];
21
+ $search = $params['search'];
22
+
23
+ if ( !$total ) {
24
+ $query = 'SELECT *';
25
+ }
26
+ else {
27
+ $query = 'SELECT COUNT(*)';
28
+ }
29
+
30
+ $query .= ' FROM `' . $wpdb->prefix . 'bwg_album`';
31
+ if ( !current_user_can('manage_options') && BWG()->options->album_role ) {
32
+ $query .= " WHERE author=" . get_current_user_id();
33
+ }
34
+ else {
35
+ $query .= " WHERE author>=0";
36
+ }
37
+
38
+ if ( $search ) {
39
+ $query .= ' AND `name` LIKE "%' . $search . '%"';
40
+ }
41
+ if ( !$total ) {
42
+ $query .= ' ORDER BY `' . $orderby . '` ' . $order;
43
+ $query .= ' LIMIT ' . $page_num . ',' . $page_per;
44
+ }
45
+ if ( !$total ) {
46
+ $rows = $wpdb->get_results($query);
47
+ }
48
+ else {
49
+ $rows = $wpdb->get_var($query);
50
+ }
51
+
52
+ return $rows;
53
+ }
54
+
55
+ /**
56
+ * Return total count.
57
+ *
58
+ * @param $params
59
+ *
60
+ * @return array|null|object|string
61
+ */
62
+ public function total($params) {
63
+ return $this->get_rows_data($params, TRUE);
64
+ }
65
+
66
+ /**
67
+ * Delete.
68
+ *
69
+ * @param $id
70
+ * @param bool $all
71
+ *
72
+ * @return int
73
+ */
74
+ public function delete( $id, $all = FALSE ) {
75
+ global $wpdb;
76
+ $where = ($all ? '' : ' WHERE id=' . $id);
77
+ $alb_gal_where = ($all ? '' : ' AND alb_gal_id=' . $id);
78
+
79
+ // Remove custom post.
80
+ if ( $all ) {
81
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'posts` WHERE `post_type`="bwg_album"');
82
+ }
83
+ else {
84
+ $row = $wpdb->get_row( $wpdb->prepare('SELECT `slug` FROM `' . $wpdb->prefix . 'bwg_album` WHERE id="%d"', $id) );
85
+ if ( !empty($row) ) {
86
+ WDWLibrary::bwg_remove_custom_post( array( 'slug' => $row->slug, 'post_type' => 'bwg_album') );
87
+ }
88
+ }
89
+
90
+ $delete = $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_album`' . $where);
91
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_album_gallery` WHERE is_album="1"' . $alb_gal_where);
92
+
93
+ if ( $delete ) {
94
+ if ( $all ) {
95
+ $message = 5;
96
+ }
97
+ else {
98
+ $message = 3;
99
+ }
100
+ }
101
+ else {
102
+ $message = 2;
103
+ }
104
+
105
+ return $message;
106
+ }
107
+
108
+ /**
109
+ * Duplicate.
110
+ *
111
+ * @param $id
112
+ * @param bool $all
113
+ *
114
+ * @return int
115
+ */
116
+ public function duplicate( $id, $all = FALSE ) {
117
+ global $wpdb;
118
+ $message_id = 2;
119
+ // Duplicate all itmes.
120
+ if ( !$id && $all ) {
121
+ $results = $wpdb->get_results('SELECT
122
+ `a`.*,
123
+ `ag`.alb_gal_id,
124
+ `ag`.is_album,
125
+ `ag`.`order` AS `ag_order`
126
+ FROM
127
+ `' . $wpdb->prefix . 'bwg_album` `a`
128
+ LEFT JOIN `' . $wpdb->prefix . 'bwg_album_gallery` `ag`
129
+ ON
130
+ `a`.`id` = `ag`.`album_id`');
131
+ if ( !empty($results) ) {
132
+ foreach ( $results as $row ) {
133
+ $album_row['name'] = $row->name;
134
+ $album_row['slug'] = $row->slug;
135
+ $album_row['description'] = $row->description;
136
+ $album_row['preview_image'] = $row->preview_image;
137
+ $album_row['random_preview_image'] = $row->random_preview_image;
138
+ $album_row['order'] = $row->order;
139
+ $album_row['author'] = $row->author;
140
+ $album_row['published'] = $row->published;
141
+ // Insert bwg_album.
142
+ $album_id = $this->insert_data_to_db('bwg_album', $album_row);
143
+ if ( $album_id ) {
144
+ $slug = $album_row['slug'] . '-' . $album_id;
145
+ // Update bwg_album slug.
146
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_album` SET `slug`="' . $slug . '" WHERE id = ' . $album_id);
147
+ $album_gallery_row['album_id'] = $album_id;
148
+ if ( $row->alb_gal_id ) {
149
+ $album_gallery_row['alb_gal_id'] = $row->alb_gal_id;
150
+ }
151
+ if ( $row->is_album ) {
152
+ $album_gallery_row['is_album'] = $row->is_album;
153
+ }
154
+ if ( $row->ag_order ) {
155
+ $album_gallery_row['order'] = $row->ag_order;
156
+ }
157
+ // Insert bwg_album_gallery.
158
+ $album_gallery_id = $this->insert_data_to_db('bwg_album_gallery', $album_gallery_row);
159
+ if ( $album_gallery_id ) {
160
+ // Create custom post.
161
+ $custom_post_params = array(
162
+ 'id' => $album_id,
163
+ 'title' => $album_row['name'],
164
+ 'slug' => $slug,
165
+ 'type' => array(
166
+ 'post_type' => 'album',
167
+ 'mode' => '',
168
+ ),
169
+ );
170
+ WDWLibrary::bwg_create_custom_post($custom_post_params);
171
+ $message_id = 11;
172
+ }
173
+ }
174
+ }
175
+ }
176
+ }
177
+ // Duplicate itme by id.
178
+ else {
179
+ $rows = $wpdb->get_results('SELECT
180
+ `a`.*,
181
+ `ag`.alb_gal_id,
182
+ `ag`.is_album,
183
+ `ag`.`order` AS `ag_order`
184
+ FROM
185
+ `' . $wpdb->prefix . 'bwg_album` a
186
+ LEFT JOIN `' . $wpdb->prefix . 'bwg_album_gallery` ag
187
+ ON
188
+ (`a`.`id` = `ag`.`album_id`)
189
+ WHERE
190
+ `a`.`id` = ' . $id);
191
+ if ( $rows ) {
192
+ $row = $rows[0];
193
+ $album_row['name'] = $row->name;
194
+ $album_row['slug'] = $row->slug;
195
+ $album_row['description'] = $row->description;
196
+ $album_row['preview_image'] = $row->preview_image;
197
+ $album_row['random_preview_image'] = $row->random_preview_image;
198
+ $album_row['order'] = $row->order;
199
+ $album_row['author'] = $row->author;
200
+ $album_row['published'] = $row->published;
201
+ // Insert bwg_album.
202
+ $album_id = $this->insert_data_to_db('bwg_album', $album_row);
203
+ if ( $album_id ) {
204
+ $slug = $album_row['slug'] . '-' . $album_id;
205
+ // Update bwg_album slug.
206
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_album` SET `slug`="' . $slug . '" WHERE id = ' . $album_id);
207
+ $album_gallery_row['album_id'] = $album_id;
208
+ foreach ( $rows as $row ) {
209
+ if ( $row->alb_gal_id ) {
210
+ $album_gallery_row['alb_gal_id'] = $row->alb_gal_id;
211
+ }
212
+ if ( $row->is_album ) {
213
+ $album_gallery_row['is_album'] = $row->is_album;
214
+ }
215
+ if ( $row->ag_order ) {
216
+ $album_gallery_row['order'] = $row->ag_order;
217
+ }
218
+ // Insert bwg_album_gallery.
219
+ $album_gallery_id = $this->insert_data_to_db('bwg_album_gallery', $album_gallery_row);
220
+ }
221
+ $message_id = 11;
222
+ // Create custom post.
223
+ $custom_post_params = array(
224
+ 'id' => $album_id,
225
+ 'title' => $album_row['name'],
226
+ 'slug' => $slug,
227
+ 'type' => array(
228
+ 'post_type' => 'album',
229
+ 'mode' => '',
230
+ ),
231
+ );
232
+ WDWLibrary::bwg_create_custom_post($custom_post_params);
233
+ }
234
+ }
235
+ }
236
+
237
+ return $message_id;
238
+ }
239
+
240
+ /**
241
+ * Get row data.
242
+ *
243
+ * @param int $id
244
+ *
245
+ * @return array|null|object|stdClass|void
246
+ */
247
+ public function get_row_data( $id = 0 ) {
248
+ global $wpdb;
249
+ if ( $id != 0 ) {
250
+ if ( !current_user_can('manage_options') && BWG()->options->album_role ) {
251
+ $where = " WHERE author = " . get_current_user_id();
252
+ }
253
+ else {
254
+ $where = " WHERE author >= 0 ";
255
+ }
256
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'bwg_album`' . $where . ' AND id="%d"', $id));
257
+ }
258
+ else {
259
+ $row = new stdClass();
260
+ $row->id = 0;
261
+ $row->name = '';
262
+ $row->slug = '';
263
+ $row->description = '';
264
+ $row->preview_image = '';
265
+ $row->order = 0;
266
+ $row->author = get_current_user_id();
267
+ $row->published = 1;
268
+ $row->modified_date = time();
269
+ }
270
+ $user_data = get_userdata($row->author);
271
+ $row->author = ($user_data != FALSE ? $user_data->display_name : '');
272
+
273
+ return $row;
274
+ }
275
+
276
+ /**
277
+ * Save.
278
+ *
279
+ * @param $id
280
+ *
281
+ * @return int
282
+ */
283
+ public function save( $id = 0 ) {
284
+ global $wpdb;
285
+ $message_id = 2;
286
+ $author = get_current_user_id();
287
+ $name = WDWLibrary::get('name');
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', '', FALSE);
294
+ $albumgallery_ids = WDWLibrary::get('albumgallery_ids');
295
+ $modified_date = WDWLibrary::get('modified_date', time());
296
+ $data = array(
297
+ 'name' => $name,
298
+ 'slug' => $slug,
299
+ 'description' => $description,
300
+ 'preview_image' => $preview_image,
301
+ 'published' => $published,
302
+ 'modified_date' => $modified_date
303
+ );
304
+ if ( $id ) {
305
+ $save = $wpdb->update($wpdb->prefix . 'bwg_album', $data, array( 'id' => $id ));
306
+ }
307
+ else {
308
+ $data['author'] = $author;
309
+ $data['order'] = ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_album')) + 1;
310
+ $data['modified_date'] = time();
311
+ $data['random_preview_image'] = '';
312
+ $save = $wpdb->insert($wpdb->prefix . 'bwg_album', $data, array(
313
+ '%s',
314
+ '%s',
315
+ '%s',
316
+ '%s',
317
+ '%s',
318
+ '%d',
319
+ '%d',
320
+ '%d',
321
+ ));
322
+ $id = $wpdb->insert_id;
323
+ }
324
+ // Create custom post (type is album).
325
+ $custom_post_params = array(
326
+ 'id' => $id,
327
+ 'title' => $name,
328
+ 'slug' => $slug,
329
+ 'old_slug' => $old_slug,
330
+ 'type' => array(
331
+ 'post_type' => 'album',
332
+ 'mode' => '',
333
+ ),
334
+ );
335
+ WDWLibrary::bwg_create_custom_post($custom_post_params);
336
+ $save = $this->save_album_gallery($id, $albumgallery_ids);
337
+ // Set random image.
338
+ $random_preview_image = (($preview_image == '') ? $this->get_image_for_album($id) : '');
339
+ $wpdb->update($wpdb->prefix . 'bwg_album', array( 'random_preview_image' => $random_preview_image ), array( 'id' => $id ));
340
+ if ( $save !== FALSE ) {
341
+ $message_id = 1;
342
+ }
343
+
344
+ return array('message_id' => $message_id, 'current_id' => $id);
345
+ }
346
+
347
+ /**
348
+ * Get request value.
349
+ *
350
+ * @param string $table
351
+ * @param array $data
352
+ *
353
+ * @return array
354
+ */
355
+ private function insert_data_to_db( $table, $data ) {
356
+ global $wpdb;
357
+ $insert = $wpdb->insert($wpdb->prefix . $table, $data);
358
+ if ( $insert ) {
359
+ return $wpdb->insert_id;
360
+ }
361
+
362
+ return FALSE;
363
+ }
364
+
365
+ private function create_unique_slug( $slug, $id ) {
366
+ global $wpdb;
367
+ $slug = sanitize_title($slug);
368
+ if ( $id != 0 ) {
369
+ $query = $wpdb->prepare('SELECT `slug` FROM `' . $wpdb->prefix . 'bwg_album` WHERE `slug` = %s AND `id` != %d', $slug, $id);
370
+ }
371
+ else {
372
+ $query = $wpdb->prepare('SELECT `slug` FROM `' . $wpdb->prefix . 'bwg_album` WHERE `slug` = %s', $slug);
373
+ }
374
+ if ( $wpdb->get_var($query) ) {
375
+ $num = 2;
376
+ do {
377
+ $alt_slug = $slug . "-$num";
378
+ $num++;
379
+ $slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $alt_slug));
380
+ }
381
+ while ( $slug_check );
382
+ $slug = $alt_slug;
383
+ }
384
+
385
+ return $slug;
386
+ }
387
+
388
+ // Return random image from gallery or album for album preview.
389
+ private function get_image_for_album( $album_id ) {
390
+ global $wpdb;
391
+ $preview_image = '';
392
+ $gallery_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=0 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
393
+ if ( $gallery_row ) {
394
+ $preview_image = (($gallery_row->preview_image) ? $gallery_row->preview_image : $gallery_row->random_preview_image);
395
+ }
396
+ if ( !$preview_image ) {
397
+ $album_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_album as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=1 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
398
+ if ( $album_row ) {
399
+ $preview_image = (($album_row->preview_image) ? $album_row->preview_image : $album_row->random_preview_image);
400
+ }
401
+ }
402
+
403
+ return $preview_image;
404
+ }
405
+
406
+ private function save_album_gallery( $album_id, $albumgallery_ids ) {
407
+ global $wpdb;
408
+ $save = 2;
409
+ $wpdb->query($wpdb->prepare('DELETE FROM `' . $wpdb->prefix . 'bwg_album_gallery` WHERE `album_id` = "%d"', $album_id));
410
+ if ( !empty($albumgallery_ids) ) {
411
+ $items = explode(',', rtrim($albumgallery_ids ,','));
412
+ if ( !empty($items) ) {
413
+ foreach ( $items as $order => $item ) {
414
+ list($alb_gal_id, $is_album) = explode(':', $item);
415
+ if ($alb_gal_id) {
416
+ $data = array(
417
+ 'album_id' => $album_id,
418
+ 'alb_gal_id' => $alb_gal_id,
419
+ 'is_album' => $is_album,
420
+ 'order' => $order + 1,
421
+ );
422
+ $save = $wpdb->insert($wpdb->prefix . 'bwg_album_gallery', $data, array('%d', '%d', '%d', '%d'));
423
+ }
424
+ }
425
+ }
426
+ }
427
+
428
+ return $save;
429
+ }
430
+
431
+ /**
432
+ * Get albums galleries data.
433
+ *
434
+ * @param int $id
435
+ *
436
+ * @return array $data
437
+ */
438
+ public function get_albums_galleries_data( $id = 0 ) {
439
+ global $wpdb;
440
+ $query = '(SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order, t2.preview_image, t2.random_preview_image, t2.published FROM ' . $wpdb->prefix . 'bwg_album_gallery as t1 INNER JOIN ' . $wpdb->prefix . 'bwg_album as t2 on t1.alb_gal_id = t2.id where t1.is_album="1" AND t1.album_id="' . $id . '")
441
+ UNION
442
+ (SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order, t2.preview_image, t2.random_preview_image, t2.published FROM ' . $wpdb->prefix . 'bwg_album_gallery as t1 INNER JOIN ' . $wpdb->prefix . 'bwg_gallery as t2 on t1.alb_gal_id = t2.id where t1.is_album="0" AND t1.album_id="' . $id . '") ORDER BY `order`';
443
+ $results = $wpdb->get_results($query);
444
+ if ( !empty($results) ) {
445
+ foreach ( $results as $result ) {
446
+ $preview_image = BWG()->plugin_url . '/images/no-image.png';
447
+ if ( !empty($result->preview_image) ) {
448
+ $preview_image = site_url() . '/' . BWG()->upload_dir . $result->preview_image;
449
+ }
450
+ if ( !empty($result->random_preview_image) ) {
451
+ $preview_image = site_url() . '/' . BWG()->upload_dir . $result->random_preview_image;
452
+ if ( WDWLibrary::check_external_link($result->random_preview_image) ) {
453
+ $preview_image = $result->random_preview_image;
454
+ }
455
+ }
456
+ $result->preview_image = $preview_image;
457
+ }
458
+ }
459
+ return $results;
460
+ }
461
+ }
admin/models/Albumsgalleries.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AlbumsgalleriesModel_bwg
5
+ */
6
+ class AlbumsgalleriesModel_bwg {
7
+ /**
8
+ * Get rows data or total count.
9
+ *
10
+ * @param $params
11
+ * @param bool $total
12
+ *
13
+ * @return array|null|object|string
14
+ */
15
+ public function get_rows_data($params, $total = FALSE) {
16
+ global $wpdb;
17
+ $where = $params['search'] ? '`name` LIKE "%' . $params['search'] . '%"' : '';
18
+ $order_by = $total ? '' : ' ORDER BY `' . $params['orderby'] . '` ' . $params['order'];
19
+ $limit = $total ? '' : ' LIMIT ' . $params['page_num'] . ',' . $params['items_per_page'];
20
+ $query = '(SELECT id, name, preview_image, random_preview_image, published, 1 as is_album FROM ' . $wpdb->prefix . 'bwg_album WHERE id <> ' . $params['album_id'] . ' ' . (($where) ? 'AND '. $where : '' ) . ')
21
+ UNION ALL
22
+ (SELECT id, name, preview_image, random_preview_image, published, 0 as is_album FROM ' . $wpdb->prefix . 'bwg_gallery ' . (($where) ? 'WHERE '. $where : '' ) . $order_by . $limit . ')';
23
+
24
+ if ($total) {
25
+ $query = 'SELECT COUNT(*) FROM (' . $query . ') as temp';
26
+ return $wpdb->get_var($query);
27
+ }
28
+ $rows = $wpdb->get_results($query);
29
+
30
+ return $rows;
31
+ }
32
+
33
+ /**
34
+ * Return total count.
35
+ *
36
+ * @param $params
37
+ *
38
+ * @return array|null|object|string
39
+ */
40
+ public function total($params) {
41
+ return $this->get_rows_data($params, TRUE);
42
+ }
43
+ }
admin/models/BWGModelAddAlbumsGalleries.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
-
3
- class BWGModelAddAlbumsGalleries {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $per_page = 20;
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- // Constructor & Destructor //
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- public function __construct() {
18
- $this->per_page = ((isset($_GET['bwg_items_per_page'])) ? esc_html($_GET['bwg_items_per_page']) : ((isset($_POST['bwg_items_per_page'])) ? esc_html($_POST['bwg_items_per_page']) : 20));
19
- }
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- // Public Methods //
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
-
24
- public function get_rows_data($album_id) {
25
- global $wpdb;
26
- $album_id = (int)$album_id;
27
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
28
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
29
- $asc_or_desc = ($asc_or_desc != 'asc') ? 'desc' : 'asc';
30
- $order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'name') . ' ' . $asc_or_desc;
31
- if (isset($_POST['page_number']) && $_POST['page_number']) {
32
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
33
- }
34
- else {
35
- $limit = 0;
36
- }
37
- $query = "SELECT id, name, 1 as is_album FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION ALL SELECT id, name, 0 as is_album FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
38
- $rows = $wpdb->get_results($query);
39
- return $rows;
40
- }
41
-
42
- public function page_nav($album_id) {
43
- global $wpdb;
44
- $album_id = (int)$album_id;
45
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
46
- $query = "SELECT id FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION ALL SELECT id FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where;
47
- $total = count($wpdb->get_col($query));
48
- $page_nav['total'] = $total;
49
- if (isset($_POST['page_number']) && $_POST['page_number']) {
50
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
51
- }
52
- else {
53
- $limit = 0;
54
- }
55
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
56
- return $page_nav;
57
- }
58
- ////////////////////////////////////////////////////////////////////////////////////////
59
- // Getters & Setters //
60
- ////////////////////////////////////////////////////////////////////////////////////////
61
- public function per_page(){
62
- return $this->per_page;
63
-
64
- }
65
- ////////////////////////////////////////////////////////////////////////////////////////
66
- // Private Methods //
67
- ////////////////////////////////////////////////////////////////////////////////////////
68
- ////////////////////////////////////////////////////////////////////////////////////////
69
- // Listeners //
70
- ////////////////////////////////////////////////////////////////////////////////////////
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelAddTags.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- class BWGModelAddTags {
3
-
4
- private $per_page = 20;
5
-
6
- public function __construct() {
7
- $this->per_page = ((isset($_GET['bwg_items_per_page'])) ? esc_html($_GET['bwg_items_per_page']) : ((isset($_POST['bwg_items_per_page'])) ? esc_html($_POST['bwg_items_per_page']) : 20));
8
- }
9
-
10
- public function get_rows_data() {
11
- global $wpdb;
12
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
13
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
14
- $asc_or_desc = ($asc_or_desc != 'asc') ? 'desc' : 'asc';
15
- $order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'name') . ' ' . $asc_or_desc;
16
- if (isset($_POST['page_number']) && $_POST['page_number']) {
17
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
18
- }
19
- else {
20
- $limit = 0;
21
- }
22
- $query = "SELECT table1.term_id, table1.name, table1.slug FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "term_taxonomy AS table2 ON table1.term_id = table2.term_id WHERE table2.taxonomy='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
23
- $rows = $wpdb->get_results($query);
24
- return $rows;
25
- }
26
-
27
- public function page_nav() {
28
- global $wpdb;
29
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
30
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "term_taxonomy AS table2 ON table1.term_id = table2.term_id WHERE table2.taxonomy='bwg_tag' " . $where;
31
- $total = $wpdb->get_var($query);
32
- $page_nav['total'] = $total;
33
- if (isset($_POST['page_number']) && $_POST['page_number']) {
34
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
35
- }
36
- else {
37
- $limit = 0;
38
- }
39
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
40
- return $page_nav;
41
- }
42
-
43
- public function per_page() {
44
- return $this->per_page;
45
- }
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelAlbums_bwg.php DELETED
@@ -1,123 +0,0 @@
1
- <?php
2
-
3
- class BWGModelAlbums_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $per_page = 20;
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- // Constructor & Destructor //
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- public function __construct() {
18
- $user = get_current_user_id();
19
- $screen = get_current_screen();
20
- $option = $screen->get_option('per_page', 'option');
21
-
22
- $this->per_page = get_user_meta($user, $option, true);
23
-
24
- if ( empty ( $this->per_page) || $this->per_page < 1 ) {
25
- $this->per_page = $screen->get_option( 'per_page', 'default' );
26
- }
27
- }
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Public Methods //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
- public function get_rows_data() {
32
- global $wpdb;
33
- global $wd_bwg_options;
34
- if (!current_user_can('manage_options') && $wd_bwg_options->album_role) {
35
- $where = " WHERE author=" . get_current_user_id();
36
- }
37
- else {
38
- $where = " WHERE author>=0 ";
39
- }
40
- $where .= ((isset($_POST['search_value'])) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
41
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
42
- $order_by_arr = array('id', 'name', 'slug', 'order', 'author', 'published');
43
- $order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'order');
44
- $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
45
- if (isset($_POST['page_number']) && $_POST['page_number']) {
46
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
47
- }
48
- else {
49
- $limit = 0;
50
- }
51
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_album " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
52
- $rows = $wpdb->get_results($query);
53
- return $rows;
54
- }
55
-
56
- public function get_row_data($id) {
57
- global $wpdb;
58
- global $wd_bwg_options;
59
- if ($id != 0) {
60
- if (!current_user_can('manage_options') && $wd_bwg_options->album_role) {
61
- $where = " WHERE author=" . get_current_user_id();
62
- }
63
- else {
64
- $where = " WHERE author>=0 ";
65
- }
66
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album ' . $where . ' AND id="%d"', $id));
67
- }
68
- else {
69
- $row = new stdClass();
70
- $row->id = 0;
71
- $row->name = '';
72
- $row->slug = '';
73
- $row->description = '';
74
- $row->preview_image = '';
75
- $row->order = 0;
76
- $row->author = get_current_user_id();
77
- $row->published = 1;
78
- }
79
- return $row;
80
- }
81
-
82
- public function get_albums_galleries_rows_data($album_id) {
83
- global $wpdb;
84
- global $wd_bwg_options;
85
- if (!current_user_can('manage_options') && $wd_bwg_options->album_role) {
86
- $where = " AND author=" . get_current_user_id();
87
- }
88
- else {
89
- $where = " AND author>=0 ";
90
- }
91
- $row = $wpdb->get_results("SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order FROM " . $wpdb->prefix . "bwg_album_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album as t2 on t1.alb_gal_id = t2.id where t1.is_album='1'" . $where . " AND t1.album_id='" . $album_id . "' union SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order FROM " . $wpdb->prefix . "bwg_album_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_gallery as t2 on t1.alb_gal_id = t2.id where t1.is_album='0'" . $where . " AND t1.album_id='" . $album_id . "' ORDER BY `order`");
92
- return $row;
93
- }
94
-
95
- public function page_nav() {
96
- global $wpdb;
97
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'WHERE name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
98
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_album " . $where;
99
- $total = $wpdb->get_var($query);
100
- $page_nav['total'] = $total;
101
- if (isset($_POST['page_number']) && $_POST['page_number']) {
102
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
103
- }
104
- else {
105
- $limit = 0;
106
- }
107
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
108
- return $page_nav;
109
- }
110
- ////////////////////////////////////////////////////////////////////////////////////////
111
- // Getters & Setters //
112
- ////////////////////////////////////////////////////////////////////////////////////////
113
- public function per_page(){
114
- return $this->per_page;
115
-
116
- }
117
- ////////////////////////////////////////////////////////////////////////////////////////
118
- // Private Methods //
119
- ////////////////////////////////////////////////////////////////////////////////////////
120
- ////////////////////////////////////////////////////////////////////////////////////////
121
- // Listeners //
122
- ////////////////////////////////////////////////////////////////////////////////////////
123
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelEditThumb.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- class BWGModelEditThumb {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_image_data($id) {
23
- global $wpdb;
24
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
25
- return $row;
26
- }
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- // Getters & Setters //
29
- ////////////////////////////////////////////////////////////////////////////////////////
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
- // Private Methods //
32
- ////////////////////////////////////////////////////////////////////////////////////////
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- // Listeners //
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelGalleries_bwg.php DELETED
@@ -1,171 +0,0 @@
1
- <?php
2
- class BWGModelGalleries_bwg {
3
-
4
- private $per_page = 20;
5
-
6
- public function __construct() {
7
- $user = get_current_user_id();
8
- $screen = get_current_screen();
9
- $option = $screen->get_option('per_page', 'option');
10
-
11
- $this->per_page = get_user_meta($user, $option, true);
12
-
13
- if ( empty ( $this->per_page) || $this->per_page < 1 ) {
14
- $this->per_page = $screen->get_option( 'per_page', 'default' );
15
-
16
- }
17
- }
18
-
19
- public function get_image_rows_data($gallery_id) {
20
- global $wpdb;
21
- global $wd_bwg_options;
22
- if (!current_user_can('manage_options') && $wd_bwg_options->image_role) {
23
- $where = " WHERE author=" . get_current_user_id();
24
- }
25
- else {
26
- $where = " WHERE author>=0 ";
27
- }
28
- $where .= ((isset($_POST['search_value'])) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
29
- $image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
30
- $image_asc_or_desc = ($image_asc_or_desc != 'asc') ? 'desc' : 'asc';
31
- $image_order_by = ((isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) != '') ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by']) && esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) != '') ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
32
- $order_by_arr = array('filename', 'alt', 'description', 'published');
33
- $image_order_by = in_array($image_order_by, $order_by_arr) ? $image_order_by : 'order';
34
- $image_order_by = ' ORDER BY `' . $image_order_by . '` ' . $image_asc_or_desc;
35
-
36
- if (isset($_POST['page_number']) && $_POST['page_number']) {
37
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
38
- }
39
- else {
40
- $limit = 0;
41
- }
42
- $row = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "bwg_image " . $where . " AND gallery_id='" . $gallery_id . "' " . $image_order_by . " LIMIT " . $limit . "," . $this->per_page);
43
- return $row;
44
- }
45
-
46
- public function get_tag_rows_data($image_id) {
47
- global $wpdb;
48
- $rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "bwg_image_tag AS table2 ON table1.term_id=table2.tag_id WHERE table2.image_id='%d' ORDER BY table2.tag_id", $image_id));
49
- return $rows;
50
- }
51
-
52
- public function get_rows_data() {
53
- global $wpdb;
54
- global $wd_bwg_options;
55
- if (!current_user_can('manage_options') && $wd_bwg_options->gallery_role) {
56
- $where = " WHERE author=" . get_current_user_id();
57
- }
58
- else {
59
- $where = " WHERE author>=0 ";
60
- }
61
- $where .= ((isset($_POST['search_value'])) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
62
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
63
- $order_by_arr = array('id', 'name', 'slug', 'order', 'author', 'published');
64
- $order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'order');
65
- $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
66
- if (isset($_POST['page_number']) && $_POST['page_number']) {
67
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
68
- }
69
- else {
70
- $limit = 0;
71
- }
72
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
73
- $rows = $wpdb->get_results($query);
74
- return $rows;
75
- }
76
-
77
- public function get_row_data($id) {
78
- global $wpdb;
79
- global $wd_bwg_options;
80
- if ($id != 0) {
81
- if (!current_user_can('manage_options') && $wd_bwg_options->gallery_role) {
82
- $where = " WHERE author=" . get_current_user_id();
83
- }
84
- else {
85
- $where = " WHERE author>=0 ";
86
- }
87
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_gallery ' . $where . ' AND id="%d"', $id));
88
- }
89
- else {
90
- $row = new stdClass();
91
- $row->id = 0;
92
- $row->name = '';
93
- $row->slug = '';
94
- $row->description = '';
95
- $row->preview_image = '';
96
- $row->order = 0;
97
- $row->author = get_current_user_id();
98
- $row->images_count = 0;
99
- $row->published = 1;
100
- $row->gallery_type = '';
101
- $row->gallery_source = '';
102
- $row->autogallery_image_number = 12;
103
- $row->update_flag = '';
104
- }
105
- return $row;
106
- }
107
-
108
- public function page_nav() {
109
- global $wpdb;
110
- global $wd_bwg_options;
111
- if (!current_user_can('manage_options') && $wd_bwg_options->gallery_role) {
112
- $where = " WHERE author=" . get_current_user_id();
113
- }
114
- else {
115
- $where = " WHERE author>=0 ";
116
- }
117
- $where .= ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
118
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_gallery " . $where;
119
- $total = $wpdb->get_var($query);
120
- $page_nav['total'] = $total;
121
- if (isset($_POST['page_number']) && $_POST['page_number']) {
122
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
123
- }
124
- else {
125
- $limit = 0;
126
- }
127
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
128
- return $page_nav;
129
- }
130
-
131
- public function image_page_nav($gallery_id) {
132
- global $wpdb;
133
- global $wd_bwg_options;
134
- if (!current_user_can('manage_options') && $wd_bwg_options->image_role) {
135
- $where = " AND author=" . get_current_user_id();
136
- }
137
- else {
138
- $where = " AND author>=0 ";
139
- }
140
- $where .= ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
141
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='" . $gallery_id . "' " . $where;
142
- $total = $wpdb->get_var($query);
143
- $page_nav['total'] = $total;
144
- if (isset($_POST['page_number']) && $_POST['page_number']) {
145
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
146
- }
147
- else {
148
- $limit = 0;
149
- }
150
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
151
- return $page_nav;
152
- }
153
-
154
- public function get_images_count($gallery_id) {
155
- global $wpdb;
156
- global $wd_bwg_options;
157
- if (!current_user_can('manage_options') && $wd_bwg_options->image_role) {
158
- $where = " WHERE author=" . get_current_user_id();
159
- }
160
- else {
161
- $where = " WHERE author>=0 ";
162
- }
163
- $row = $wpdb->get_var($wpdb->prepare("SELECT COUNT(filename) FROM " . $wpdb->prefix . "bwg_image " . $where . " AND gallery_id='%d'", $gallery_id));
164
- return $row;
165
- }
166
-
167
- public function per_page(){
168
- return $this->per_page;
169
-
170
- }
171
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelOptions_bwg.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
-
3
- class BWGModelOptions_bwg {
4
- }
 
 
 
 
admin/models/BWGModelTags_bwg.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
-
3
- class BWGModelTags_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $per_page = 20;
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- // Constructor & Destructor //
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- public function __construct() {
18
- $user = get_current_user_id();
19
- $screen = get_current_screen();
20
- $option = $screen->get_option('per_page', 'option');
21
-
22
-
23
- $this->per_page = get_user_meta($user, $option, true);
24
-
25
- if ( empty ( $this->per_page) || $this->per_page < 1 ) {
26
- $this->per_page = $screen->get_option( 'per_page', 'default' );
27
- }
28
- }
29
- ////////////////////////////////////////////////////////////////////////////////////////
30
- // Public Methods //
31
- ////////////////////////////////////////////////////////////////////////////////////////
32
- public function get_rows_data() {
33
- global $wpdb;
34
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'AND A.name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
35
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
36
- $order_by_arr = array('A.term_id', 'A.name', 'A.slug', 'B.count');
37
- $order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'A.term_id');
38
- $order_by = ' ORDER BY ' . $order_by . ' ' . $asc_or_desc;
39
- if (isset($_POST['page_number']) && $_POST['page_number']) {
40
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
41
- }
42
- else {
43
- $limit = 0;
44
- }
45
- $query ="SELECT * FROM ".$wpdb->prefix."terms as A LEFT JOIN ".$wpdb->prefix ."term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . "," . $this->per_page;
46
- $rows = $wpdb->get_results($query);
47
- return $rows;
48
- }
49
-
50
- public function page_nav() {
51
- global $wpdb;
52
- $where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'AND A.name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
53
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "terms as A LEFT JOIN ".$wpdb->prefix . "term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy ='bwg_tag' " . $where;
54
- $total = $wpdb->get_var($query);
55
- $page_nav['total'] = $total;
56
- if (isset($_POST['page_number']) && $_POST['page_number']) {
57
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
58
- }
59
- else {
60
- $limit = 0;
61
- }
62
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
63
- return $page_nav;
64
- }
65
-
66
- public function get_count_of_images($term_id) {
67
- global $wpdb;
68
- $query = "SELECT count FROM " . $wpdb->prefix . "term_taxonomy WHERE term_id=" . $term_id;
69
- $count = $wpdb->get_var($query);
70
- return $count;
71
- }
72
- ////////////////////////////////////////////////////////////////////////////////////////
73
- // Getters & Setters //
74
- ////////////////////////////////////////////////////////////////////////////////////////
75
- public function per_page(){
76
- return $this->per_page;
77
-
78
- }
79
- ////////////////////////////////////////////////////////////////////////////////////////
80
- // Private Methods //
81
- ////////////////////////////////////////////////////////////////////////////////////////
82
- ////////////////////////////////////////////////////////////////////////////////////////
83
- // Listeners //
84
- ////////////////////////////////////////////////////////////////////////////////////////
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelThemes_bwg.php DELETED
@@ -1,585 +0,0 @@
1
- <?php
2
-
3
- class BWGModelThemes_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $per_page = 20;
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- // Constructor & Destructor //
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- public function __construct() {
18
- $user = get_current_user_id();
19
- $screen = get_current_screen();
20
- $option = $screen->get_option('per_page', 'option');
21
-
22
- $this->per_page = get_user_meta($user, $option, true);
23
-
24
- if ( empty ( $this->per_page) || $this->per_page < 1 ) {
25
- $this->per_page = $screen->get_option( 'per_page', 'default' );
26
- }
27
- }
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Public Methods //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
- public function get_rows_data() {
32
- global $wpdb;
33
- $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE name LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
34
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
35
- $order_by_arr = array('id', 'name', 'default');
36
- $order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'id');
37
- $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
38
- if (isset($_POST['page_number']) && $_POST['page_number']) {
39
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
40
- }
41
- else {
42
- $limit = 0;
43
- }
44
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_theme " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
45
- $rows = $wpdb->get_results($query);
46
- return $rows;
47
- }
48
-
49
- public function get_row_data($id, $reset) {
50
- global $wpdb;
51
- if ($id != 0) {
52
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id));
53
- $themes = json_decode($row->options);
54
- foreach ($themes as $key => $value) {
55
- $row->$key = $value;
56
- }
57
- if (!isset($row->lightbox_bg_transparent)) {
58
- $row->lightbox_bg_transparent = 100;
59
- }
60
- if (!isset($row->image_browser_image_title_align)) {
61
- $row->image_browser_image_title_align = 'top';
62
- }
63
- if ($reset) {
64
- if (!$row->default_theme) {
65
- $row_id = $row->id;
66
- $row_name = $row->name;
67
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
68
- $row->id = $row_id;
69
- $row->name = $row_name;
70
- $row->default_theme = FALSE;
71
- $themes = json_decode($row->options);
72
- foreach ($themes as $key => $value) {
73
- $row->$key = $value;
74
- }
75
- if (!isset($row->lightbox_bg_transparent)) {
76
- $row->lightbox_bg_transparent = 100;
77
- }
78
- if (!isset($row->image_browser_image_title_align)) {
79
- $row->image_browser_image_title_align = 'top';
80
- }
81
- }
82
- else {
83
- $row->thumb_margin = 4;
84
- $row->thumb_padding = 0;
85
- $row->thumb_border_radius = '0';
86
- $row->thumb_border_width = 0;
87
- $row->thumb_border_style = 'none';
88
- $row->thumb_border_color = 'CCCCCC';
89
- $row->thumb_bg_color = 'FFFFFF';
90
- $row->thumbs_bg_color = 'FFFFFF';
91
- $row->thumb_bg_transparent = 0;
92
- $row->thumb_box_shadow = '0px 0px 0px #888888';
93
- $row->thumb_transparent = 100;
94
- $row->thumb_align = 'left';
95
- $row->thumb_hover_effect = 'scale';
96
- $row->thumb_hover_effect_value = '1.1';
97
- $row->thumb_transition = 1;
98
- $row->thumb_title_font_color = 'CCCCCC';
99
- $row->thumb_title_font_style = 'segoe ui';
100
- $row->thumb_title_pos = 'bottom';
101
- $row->thumb_title_font_size = 16;
102
- $row->thumb_title_font_weight = 'bold';
103
- $row->thumb_title_margin = '2px';
104
- $row->thumb_title_shadow = '0px 0px 0px #888888';
105
-
106
- $row->page_nav_position = 'bottom';
107
- $row->page_nav_align = 'center';
108
- $row->page_nav_number = 0;
109
- $row->page_nav_font_size = 12;
110
- $row->page_nav_font_style = 'segoe ui';
111
- $row->page_nav_font_color = '666666';
112
- $row->page_nav_font_weight = 'bold';
113
- $row->page_nav_border_width = 1;
114
- $row->page_nav_border_style = 'solid';
115
- $row->page_nav_border_color = 'E3E3E3';
116
- $row->page_nav_border_radius = '0';
117
- $row->page_nav_margin = '0';
118
- $row->page_nav_padding = '3px 6px';
119
- $row->page_nav_button_bg_color = 'FFFFFF';
120
- $row->page_nav_button_bg_transparent = 100;
121
- $row->page_nav_box_shadow = '0';
122
- $row->page_nav_button_transition = 1;
123
- $row->page_nav_button_text = 0;
124
-
125
- $row->lightbox_overlay_bg_color = '000000';
126
- $row->lightbox_overlay_bg_transparent = 70;
127
- $row->lightbox_bg_color = '000000';
128
- $row->lightbox_ctrl_btn_pos = 'bottom';
129
- $row->lightbox_ctrl_btn_align = 'center';
130
- $row->lightbox_ctrl_btn_height = 20;
131
- $row->lightbox_ctrl_btn_margin_top = 10;
132
- $row->lightbox_ctrl_btn_margin_left = 7;
133
- $row->lightbox_ctrl_btn_transparent = 100;
134
- $row->lightbox_ctrl_btn_color = 'FFFFFF';
135
- $row->lightbox_toggle_btn_height = 14;
136
- $row->lightbox_toggle_btn_width = 100;
137
- $row->lightbox_ctrl_cont_bg_color = '000000';
138
- $row->lightbox_ctrl_cont_transparent = 65;
139
- $row->lightbox_ctrl_cont_border_radius = 4;
140
- $row->lightbox_close_btn_transparent = 100;
141
- $row->lightbox_close_btn_bg_color = '000000';
142
- $row->lightbox_close_btn_border_width = 2;
143
- $row->lightbox_close_btn_border_radius = '16px';
144
- $row->lightbox_close_btn_border_style = 'none';
145
- $row->lightbox_close_btn_border_color = 'FFFFFF';
146
- $row->lightbox_close_btn_box_shadow = '0';
147
- $row->lightbox_close_btn_color = 'FFFFFF';
148
- $row->lightbox_close_btn_size = 10;
149
- $row->lightbox_close_btn_width = 20;
150
- $row->lightbox_close_btn_height = 20;
151
- $row->lightbox_close_btn_top = '-10';
152
- $row->lightbox_close_btn_right = '-10';
153
- $row->lightbox_close_btn_full_color = 'FFFFFF';
154
- $row->lightbox_rl_btn_bg_color = '000000';
155
- $row->lightbox_rl_btn_border_radius = '20px';
156
- $row->lightbox_rl_btn_border_width = 0;
157
- $row->lightbox_rl_btn_border_style = 'none';
158
- $row->lightbox_rl_btn_border_color = 'FFFFFF';
159
- $row->lightbox_rl_btn_box_shadow = '';
160
- $row->lightbox_rl_btn_color = 'FFFFFF';
161
- $row->lightbox_rl_btn_height = 40;
162
- $row->lightbox_rl_btn_width = 40;
163
- $row->lightbox_rl_btn_size = 20;
164
- $row->lightbox_close_rl_btn_hover_color = 'CCCCCC';
165
- $row->lightbox_comment_pos = 'left';
166
- $row->lightbox_comment_width = 400;
167
- $row->lightbox_comment_bg_color = '000000';
168
- $row->lightbox_comment_font_color = 'CCCCCC';
169
- $row->lightbox_comment_font_style = 'segoe ui';
170
- $row->lightbox_comment_font_size = 12;
171
- $row->lightbox_comment_button_bg_color = '616161';
172
- $row->lightbox_comment_button_border_color = '666666';
173
- $row->lightbox_comment_button_border_width = 1;
174
- $row->lightbox_comment_button_border_style = 'none';
175
- $row->lightbox_comment_button_border_radius = '3px';
176
- $row->lightbox_comment_button_padding = '3px 10px';
177
- $row->lightbox_comment_input_bg_color = '333333';
178
- $row->lightbox_comment_input_border_color = '666666';
179
- $row->lightbox_comment_input_border_width = 1;
180
- $row->lightbox_comment_input_border_style = 'none';
181
- $row->lightbox_comment_input_border_radius = '0';
182
- $row->lightbox_comment_input_padding = '2px';
183
- $row->lightbox_comment_separator_width = 1;
184
- $row->lightbox_comment_separator_style = 'solid';
185
- $row->lightbox_comment_separator_color = '383838';
186
- $row->lightbox_comment_author_font_size = 14;
187
- $row->lightbox_comment_date_font_size = 10;
188
- $row->lightbox_comment_body_font_size = 12;
189
- $row->lightbox_comment_share_button_color = 'CCCCCC';
190
- $row->lightbox_filmstrip_pos = 'top';
191
- $row->lightbox_filmstrip_rl_bg_color = '3B3B3B';
192
- $row->lightbox_filmstrip_rl_btn_size = 20;
193
- $row->lightbox_filmstrip_rl_btn_color = 'FFFFFF';
194
- $row->lightbox_filmstrip_thumb_margin = '0 1px';
195
- $row->lightbox_filmstrip_thumb_border_width = 1;
196
- $row->lightbox_filmstrip_thumb_border_style = 'solid';
197
- $row->lightbox_filmstrip_thumb_border_color = '000000';
198
- $row->lightbox_filmstrip_thumb_border_radius = '0';
199
- $row->lightbox_filmstrip_thumb_deactive_transparent = 80;
200
- $row->lightbox_filmstrip_thumb_active_border_width = 0;
201
- $row->lightbox_filmstrip_thumb_active_border_color = 'FFFFFF';
202
- $row->lightbox_rl_btn_style = 'fa-chevron';
203
- $row->lightbox_rl_btn_transparent = 80;
204
- $row->lightbox_bg_transparent = 100;
205
-
206
- $row->album_compact_back_font_color = '000000';
207
- $row->album_compact_back_font_style = 'segoe ui';
208
- $row->album_compact_back_font_size = 16;
209
- $row->album_compact_back_font_weight = 'bold';
210
- $row->album_compact_back_padding = '0';
211
- $row->album_compact_title_font_color = 'CCCCCC';
212
- $row->album_compact_title_font_style = 'segoe ui';
213
- $row->album_compact_thumb_title_pos = 'bottom';
214
- $row->album_compact_title_font_size = 16;
215
- $row->album_compact_title_font_weight = 'bold';
216
- $row->album_compact_title_margin = '2px';
217
- $row->album_compact_title_shadow = '0px 0px 0px #888888';
218
- $row->album_compact_thumb_margin = 4;
219
- $row->album_compact_thumb_padding = 0;
220
- $row->album_compact_thumb_border_radius = '0';
221
- $row->album_compact_thumb_border_width = 0;
222
- $row->album_compact_thumb_border_style = 'none';
223
- $row->album_compact_thumb_border_color = 'CCCCCC';
224
- $row->album_compact_thumb_bg_color = 'FFFFFF';
225
- $row->album_compact_thumbs_bg_color = 'FFFFFF';
226
- $row->album_compact_thumb_bg_transparent = 0;
227
- $row->album_compact_thumb_box_shadow = '0px 0px 0px #888888';
228
- $row->album_compact_thumb_transparent = 100;
229
- $row->album_compact_thumb_align = 'left';
230
- $row->album_compact_thumb_hover_effect = 'scale';
231
- $row->album_compact_thumb_hover_effect_value = '1.1';
232
- $row->album_compact_thumb_transition = 0;
233
-
234
- $row->album_extended_thumb_margin = 2;
235
- $row->album_extended_thumb_padding = 0;
236
- $row->album_extended_thumb_border_radius = '0';
237
- $row->album_extended_thumb_border_width = 0;
238
- $row->album_extended_thumb_border_style = 'none';
239
- $row->album_extended_thumb_border_color = 'CCCCCC';
240
- $row->album_extended_thumb_bg_color = 'FFFFFF';
241
- $row->album_extended_thumbs_bg_color = 'FFFFFF';
242
- $row->album_extended_thumb_bg_transparent = 0;
243
- $row->album_extended_thumb_box_shadow = '';
244
- $row->album_extended_thumb_transparent = 100;
245
- $row->album_extended_thumb_align = 'left';
246
- $row->album_extended_thumb_hover_effect = 'scale';
247
- $row->album_extended_thumb_hover_effect_value = '1.1';
248
- $row->album_extended_thumb_transition = 0;
249
- $row->album_extended_back_font_color = '000000';
250
- $row->album_extended_back_font_style = 'segoe ui';
251
- $row->album_extended_back_font_size = 20;
252
- $row->album_extended_back_font_weight = 'bold';
253
- $row->album_extended_back_padding = '0';
254
- $row->album_extended_div_bg_color = 'FFFFFF';
255
- $row->album_extended_div_bg_transparent = 0;
256
- $row->album_extended_div_border_radius = '0 0 0 0';
257
- $row->album_extended_div_margin = '0 0 5px 0';
258
- $row->album_extended_div_padding = 10;
259
- $row->album_extended_div_separator_width = 1;
260
- $row->album_extended_div_separator_style = 'solid';
261
- $row->album_extended_div_separator_color = 'E0E0E0';
262
- $row->album_extended_thumb_div_bg_color = 'FFFFFF';
263
- $row->album_extended_thumb_div_border_radius = '0';
264
- $row->album_extended_thumb_div_border_width = 1;
265
- $row->album_extended_thumb_div_border_style = 'solid';
266
- $row->album_extended_thumb_div_border_color = 'E8E8E8';
267
- $row->album_extended_thumb_div_padding = '5px';
268
- $row->album_extended_text_div_bg_color = 'FFFFFF';
269
- $row->album_extended_text_div_border_radius = '0';
270
- $row->album_extended_text_div_border_width = 1;
271
- $row->album_extended_text_div_border_style = 'solid';
272
- $row->album_extended_text_div_border_color = 'E8E8E8';
273
- $row->album_extended_text_div_padding = '5px';
274
- $row->album_extended_title_span_border_width = 1;
275
- $row->album_extended_title_span_border_style = 'none';
276
- $row->album_extended_title_span_border_color = 'CCCCCC';
277
- $row->album_extended_title_font_color = '000000';
278
- $row->album_extended_title_font_style = 'segoe ui';
279
- $row->album_extended_title_font_size = 16;
280
- $row->album_extended_title_font_weight = 'bold';
281
- $row->album_extended_title_margin_bottom = 2;
282
- $row->album_extended_title_padding = '2px';
283
- $row->album_extended_desc_span_border_width = 1;
284
- $row->album_extended_desc_span_border_style = 'none';
285
- $row->album_extended_desc_span_border_color = 'CCCCCC';
286
- $row->album_extended_desc_font_color = '000000';
287
- $row->album_extended_desc_font_style = 'segoe ui';
288
- $row->album_extended_desc_font_size = 14;
289
- $row->album_extended_desc_font_weight = 'normal';
290
- $row->album_extended_desc_padding = '2px';
291
- $row->album_extended_desc_more_color = 'F2D22E';
292
- $row->album_extended_desc_more_size = 12;
293
-
294
- $row->album_masonry_back_font_color = '000000';
295
- $row->album_masonry_back_font_style = 'segoe ui';
296
- $row->album_masonry_back_font_size = 16;
297
- $row->album_masonry_back_font_weight = 'bold';
298
- $row->album_masonry_back_padding = '0';
299
- $row->album_masonry_title_font_color = 'CCCCCC';
300
- $row->album_masonry_title_font_style = 'segoe ui';
301
- $row->album_masonry_thumb_title_pos = 'bottom';
302
- $row->album_masonry_title_font_size = 16;
303
- $row->album_masonry_title_font_weight = 'bold';
304
- $row->album_masonry_title_margin = '2px';
305
- $row->album_masonry_title_shadow = '0px 0px 0px #888888';
306
- $row->album_masonry_thumb_margin = 4;
307
- $row->album_masonry_thumb_padding = 0;
308
- $row->album_masonry_thumb_border_radius = '0';
309
- $row->album_masonry_thumb_border_width = 0;
310
- $row->album_masonry_thumb_border_style = 'none';
311
- $row->album_masonry_thumb_border_color = 'CCCCCC';
312
- $row->album_masonry_thumb_bg_color = 'FFFFFF';
313
- $row->album_masonry_thumbs_bg_color = 'FFFFFF';
314
- $row->album_masonry_thumb_bg_transparent = 0;
315
- $row->album_masonry_thumb_box_shadow = '0px 0px 0px #888888';
316
- $row->album_masonry_thumb_transparent = 100;
317
- $row->album_masonry_thumb_align = 'left';
318
- $row->album_masonry_thumb_hover_effect = 'scale';
319
- $row->album_masonry_thumb_hover_effect_value = '1.1';
320
- $row->album_masonry_thumb_transition = 0;
321
-
322
- $row->masonry_thumb_padding = 4;
323
- $row->masonry_thumb_border_radius = '0';
324
- $row->masonry_thumb_border_width = 0;
325
- $row->masonry_thumb_border_style = 'none';
326
- $row->masonry_thumb_border_color = 'CCCCCC';
327
- $row->masonry_thumbs_bg_color = 'FFFFFF';
328
- $row->masonry_thumb_bg_transparent = 0;
329
- $row->masonry_thumb_transparent = 100;
330
- $row->masonry_thumb_align = 'left';
331
- $row->masonry_thumb_hover_effect = 'scale';
332
- $row->masonry_thumb_hover_effect_value = '1.1';
333
- $row->masonry_thumb_transition = 0;
334
- $row->masonry_description_font_size = 12;
335
- $row->masonry_description_color = 'CCCCCC';
336
- $row->masonry_description_font_style = 'segoe ui';
337
-
338
- $row->mosaic_thumb_padding = 4;
339
- $row->mosaic_thumb_border_radius = '0';
340
- $row->mosaic_thumb_border_width = 0;
341
- $row->mosaic_thumb_border_style = 'none';
342
- $row->mosaic_thumb_border_color = 'CCCCCC';
343
- $row->mosaic_thumbs_bg_color = 'FFFFFF';
344
- $row->mosaic_thumb_bg_transparent = 0;
345
- $row->mosaic_thumb_transparent = 100;
346
- $row->mosaic_thumb_align = 'left';
347
- $row->mosaic_thumb_hover_effect = 'scale';
348
- $row->mosaic_thumb_hover_effect_value = '1.1';
349
-
350
-
351
- $row->mosaic_thumb_title_font_size = 16;
352
- $row->mosaic_thumb_title_font_color = 'CCCCCC';
353
- $row->mosaic_thumb_title_font_style = 'segoe ui';
354
- $row->mosaic_thumb_title_font_weight = 'bold';
355
- $row->mosaic_thumb_title_shadow = '0px 0px 0px #888888';
356
- $row->mosaic_thumb_title_margin = '2px';
357
- $row->slideshow_cont_bg_color = '000000';
358
- $row->slideshow_close_btn_transparent = 100;
359
- $row->slideshow_rl_btn_bg_color = '000000';
360
- $row->slideshow_rl_btn_border_radius = '20px';
361
- $row->slideshow_rl_btn_border_width = 0;
362
- $row->slideshow_rl_btn_border_style = 'none';
363
- $row->slideshow_rl_btn_border_color = 'FFFFFF';
364
- $row->slideshow_rl_btn_box_shadow = '0px 0px 0px #000000';
365
- $row->slideshow_rl_btn_color = 'FFFFFF';
366
- $row->slideshow_rl_btn_height = 40;
367
- $row->slideshow_rl_btn_size = 20;
368
- $row->slideshow_rl_btn_width = 40;
369
- $row->slideshow_close_rl_btn_hover_color = 'CCCCCC';
370
- $row->slideshow_filmstrip_pos = 'top';
371
- $row->slideshow_filmstrip_thumb_border_width = 1;
372
- $row->slideshow_filmstrip_thumb_border_style = 'solid';
373
- $row->slideshow_filmstrip_thumb_border_color = '000000';
374
- $row->slideshow_filmstrip_thumb_border_radius = '0';
375
- $row->slideshow_filmstrip_thumb_margin = '0 1px';
376
- $row->slideshow_filmstrip_thumb_active_border_width = 0;
377
- $row->slideshow_filmstrip_thumb_active_border_color = 'FFFFFF';
378
- $row->slideshow_filmstrip_thumb_deactive_transparent = 80;
379
- $row->slideshow_filmstrip_rl_bg_color = '3B3B3B';
380
- $row->slideshow_filmstrip_rl_btn_color = 'FFFFFF';
381
- $row->slideshow_filmstrip_rl_btn_size = 20;
382
- $row->slideshow_title_font_size = 16;
383
- $row->slideshow_title_font = 'segoe ui';
384
- $row->slideshow_title_color = 'FFFFFF';
385
- $row->slideshow_title_opacity = 70;
386
- $row->slideshow_title_border_radius = '5px';
387
- $row->slideshow_title_background_color = '000000';
388
- $row->slideshow_title_padding = '0 0 0 0';
389
- $row->slideshow_description_font_size = 14;
390
- $row->slideshow_description_font = 'segoe ui';
391
- $row->slideshow_description_color = 'FFFFFF';
392
- $row->slideshow_description_opacity = 70;
393
- $row->slideshow_description_border_radius = '0';
394
- $row->slideshow_description_background_color = '000000';
395
- $row->slideshow_description_padding = '5px 10px 5px 10px';
396
- $row->slideshow_dots_width = 12;
397
- $row->slideshow_dots_height = 12;
398
- $row->slideshow_dots_border_radius = '5px';
399
- $row->slideshow_dots_background_color = 'F2D22E';
400
- $row->slideshow_dots_margin = 3;
401
- $row->slideshow_dots_active_background_color = 'FFFFFF';
402
- $row->slideshow_dots_active_border_width = 1;
403
- $row->slideshow_dots_active_border_color = '000000';
404
- $row->slideshow_play_pause_btn_size = 60;
405
- $row->slideshow_rl_btn_style = 'fa-chevron';
406
-
407
- $row->blog_style_margin = '2px';
408
- $row->blog_style_padding = '0';
409
- $row->blog_style_border_radius = '0';
410
- $row->blog_style_border_width = 1;
411
- $row->blog_style_border_style = 'solid';
412
- $row->blog_style_border_color = 'F5F5F5';
413
- $row->blog_style_bg_color = 'FFFFFF';
414
- $row->blog_style_transparent = 80;
415
- $row->blog_style_box_shadow = '';
416
- $row->blog_style_align = 'center';
417
- $row->blog_style_share_buttons_margin = '5px auto 10px auto';
418
- $row->blog_style_share_buttons_border_radius = '0';
419
- $row->blog_style_share_buttons_border_width = 0;
420
- $row->blog_style_share_buttons_border_style = 'none';
421
- $row->blog_style_share_buttons_border_color = '000000';
422
- $row->blog_style_share_buttons_bg_color = 'FFFFFF';
423
- $row->blog_style_share_buttons_align = 'right';
424
- $row->blog_style_img_font_size = 16;
425
- $row->blog_style_img_font_family = 'segoe ui';
426
- $row->blog_style_img_font_color = '000000';
427
- $row->blog_style_share_buttons_color = 'B3AFAF';
428
- $row->blog_style_share_buttons_bg_transparent = 0;
429
- $row->blog_style_share_buttons_font_size = 20;
430
-
431
- $row->image_browser_margin = '2px auto';
432
- $row->image_browser_padding = '4px';
433
- $row->image_browser_border_radius = '0';
434
- $row->image_browser_border_width = 1;
435
- $row->image_browser_border_style = 'none';
436
- $row->image_browser_border_color = 'F5F5F5';
437
- $row->image_browser_bg_color = 'EBEBEB';
438
- $row->image_browser_box_shadow = '';
439
- $row->image_browser_transparent = 80;
440
- $row->image_browser_align = 'center';
441
- $row->image_browser_image_description_margin = '0px 5px 0px 5px';
442
- $row->image_browser_image_description_padding = '8px 8px 8px 8px';
443
- $row->image_browser_image_description_border_radius = '0';
444
- $row->image_browser_image_description_border_width = 1;
445
- $row->image_browser_image_description_border_style = 'none';
446
- $row->image_browser_image_description_border_color = 'FFFFFF';
447
- $row->image_browser_image_description_bg_color = 'EBEBEB';
448
- $row->image_browser_image_description_align = 'center';
449
- $row->image_browser_img_font_size = 15;
450
- $row->image_browser_img_font_family = 'segoe ui';
451
- $row->image_browser_img_font_color = '000000';
452
- $row->image_browser_full_padding = '4px';
453
- $row->image_browser_full_border_radius = '0';
454
- $row->image_browser_full_border_width = 2;
455
- $row->image_browser_full_border_style = 'none';
456
- $row->image_browser_full_border_color = 'F7F7F7';
457
- $row->image_browser_full_bg_color = 'F5F5F5';
458
- $row->image_browser_full_transparent = 90;
459
- $row->image_browser_image_title_align = 'top';
460
- $row->lightbox_info_pos = 'top';
461
- $row->lightbox_info_align = 'right';
462
- $row->lightbox_info_bg_color = '000000';
463
- $row->lightbox_info_bg_transparent = 70;
464
- $row->lightbox_info_border_width = 1;
465
- $row->lightbox_info_border_style = 'none';
466
- $row->lightbox_info_border_color = '000000';
467
- $row->lightbox_info_border_radius = '5px';
468
- $row->lightbox_info_padding = '5px';
469
- $row->lightbox_info_margin = '15px';
470
- $row->lightbox_title_color = 'FFFFFF';
471
- $row->lightbox_title_font_style = 'segoe ui';
472
- $row->lightbox_title_font_weight = 'bold';
473
- $row->lightbox_title_font_size = 18;
474
- $row->lightbox_description_color = 'FFFFFF';
475
- $row->lightbox_description_font_style = 'segoe ui';
476
- $row->lightbox_description_font_weight = 'normal';
477
- $row->lightbox_description_font_size = 14;
478
- $row->lightbox_rate_pos = 'bottom';
479
- $row->lightbox_rate_align = 'right';
480
- $row->lightbox_rate_icon = 'star';
481
- $row->lightbox_rate_color = 'F9D062';
482
- $row->lightbox_rate_size = 20;
483
- $row->lightbox_rate_stars_count = 5;
484
- $row->lightbox_rate_padding = '15px';
485
- $row->lightbox_rate_hover_color = 'F7B50E';
486
- $row->lightbox_hit_pos = 'bottom';
487
- $row->lightbox_hit_align = 'left';
488
- $row->lightbox_hit_bg_color = '000000';
489
- $row->lightbox_hit_bg_transparent = 70;
490
- $row->lightbox_hit_border_width = 1;
491
- $row->lightbox_hit_border_style = 'none';
492
- $row->lightbox_hit_border_color = '000000';
493
- $row->lightbox_hit_border_radius = '5px';
494
- $row->lightbox_hit_padding = '5px';
495
- $row->lightbox_hit_margin = '0 5px';
496
- $row->lightbox_hit_color = 'FFFFFF';
497
- $row->lightbox_hit_font_style = 'segoe ui';
498
- $row->lightbox_hit_font_weight = 'normal';
499
- $row->lightbox_hit_font_size = 14;
500
- //carousel
501
- $row->carousel_cont_bg_color = '000000';
502
- $row->carousel_cont_btn_transparent = 0;
503
- $row->carousel_close_btn_transparent = 100;
504
- $row->carousel_rl_btn_bg_color = '000000';
505
- $row->carousel_rl_btn_border_radius = '20px';
506
- $row->carousel_rl_btn_border_width = 0;
507
- $row->carousel_rl_btn_border_style = 'none';
508
- $row->carousel_rl_btn_border_color = 'FFFFFF';
509
- $row->carousel_rl_btn_color = 'FFFFFF';
510
- $row->carousel_rl_btn_height = 40;
511
- $row->carousel_rl_btn_size = 20;
512
- $row->carousel_play_pause_btn_size = 20;
513
- $row->carousel_rl_btn_width = 40;
514
- $row->carousel_close_rl_btn_hover_color = 'CCCCCC';
515
- $row->carousel_rl_btn_style='fa-chevron';
516
- $row->carousel_mergin_bottom = '0.5';
517
- $row->carousel_font_family = 'segoe ui';
518
- $row->carousel_feature_border_width = 2;
519
- $row->carousel_feature_border_style = 'solid';
520
- $row->carousel_feature_border_color= '5D204F';
521
- $row->carousel_caption_background_color = '000000';
522
- $row->carousel_caption_bottom = 0;
523
- $row->carousel_caption_p_mergin = 0;
524
- $row->carousel_caption_p_pedding = 5;
525
- $row->carousel_caption_p_font_weight = 'bold';
526
- $row->carousel_caption_p_font_size = 14;
527
- $row->carousel_caption_p_color = 'white';
528
- $row->carousel_title_opacity = 100;
529
- $row->carousel_title_border_radius = '5px';
530
- $row->mosaic_thumb_transition = 1;
531
- }
532
- }
533
- }
534
- else {
535
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
536
- $row->id = 0;
537
- $row->name = '';
538
- $themes = json_decode($row->options);
539
- foreach ($themes as $key => $value) {
540
- $row->$key = $value;
541
- }
542
- $row->default_theme = 0;
543
- $themes = json_decode($row->options);
544
- foreach ($themes as $key => $value) {
545
- $row->$key = $value;
546
- }
547
- if (!isset($row->lightbox_bg_transparent)) {
548
- $row->lightbox_bg_transparent = 100;
549
- }
550
- if (!isset($row->image_browser_image_title_align)) {
551
- $row->image_browser_image_title_align = 'top';
552
- }
553
- }
554
- return $row;
555
- }
556
-
557
- public function page_nav() {
558
- global $wpdb;
559
- $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE name LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
560
- $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_theme " . $where;
561
- $total = $wpdb->get_var($query);
562
- $page_nav['total'] = $total;
563
- if (isset($_POST['page_number']) && $_POST['page_number']) {
564
- $limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
565
- }
566
- else {
567
- $limit = 0;
568
- }
569
- $page_nav['limit'] = (int) ($limit / $this->per_page + 1);
570
- return $page_nav;
571
- }
572
- ////////////////////////////////////////////////////////////////////////////////////////
573
- // Getters & Setters //
574
- ////////////////////////////////////////////////////////////////////////////////////////
575
- public function per_page(){
576
- return $this->per_page;
577
-
578
- }
579
- ////////////////////////////////////////////////////////////////////////////////////////
580
- // Private Methods //
581
- ////////////////////////////////////////////////////////////////////////////////////////
582
- ////////////////////////////////////////////////////////////////////////////////////////
583
- // Listeners //
584
- ////////////////////////////////////////////////////////////////////////////////////////
585
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelUninstall_bwg.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- class BWGModelUninstall_bwg {
4
- public function __construct() {
5
- }
6
- public function delete_db_tables() {
7
- global $wpdb;
8
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_album");
9
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_album_gallery");
10
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_gallery");
11
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_image");
12
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_image_comment");
13
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_image_rate");
14
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_image_tag");
15
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_option");
16
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_theme");
17
- $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "bwg_shortcode");
18
- delete_option("wd_bwg_version");
19
- delete_option("bwg_subscribe_done");
20
- delete_option("wd_bwg_options");
21
- delete_user_meta(get_current_user_id(), 'bwg_photo_gallery');
22
- if (isset($_COOKIE['bwg_image_asc_or_desc'])) {
23
- $_COOKIE['bwg_image_asc_or_desc'] = '';
24
- }
25
- if (isset($_COOKIE['bwg_image_order_by'])) {
26
- $_COOKIE['bwg_image_order_by'] = '';
27
- }
28
- // Delete terms.
29
- $terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
30
- foreach ($terms as $term) {
31
- wp_delete_term($term->term_id, 'bwg_tag');
32
- }
33
- // Delete custom pages for galleries.
34
- $posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_gallery'));
35
- foreach ($posts as $post) {
36
- wp_delete_post($post->ID, TRUE);
37
- }
38
- // Delete custom pages for albums.
39
- $posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_album'));
40
- foreach ($posts as $post) {
41
- wp_delete_post($post->ID, TRUE);
42
- }
43
- // Delete custom pages for tags.
44
- $posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_tag'));
45
- foreach ($posts as $post) {
46
- wp_delete_post($post->ID, TRUE);
47
- }
48
- // Delete custom pages for share.
49
- $posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_share'));
50
- foreach ($posts as $post) {
51
- wp_delete_post($post->ID, TRUE);
52
- }
53
- }
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelWidget.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- class BWGModelWidget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_gallery_rows_data() {
23
- global $wpdb;
24
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
25
- $rows = $wpdb->get_results($query);
26
- return $rows;
27
- }
28
-
29
- public function get_album_rows_data() {
30
- global $wpdb;
31
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_album WHERE published=1";
32
- $rows = $wpdb->get_results($query);
33
- return $rows;
34
- }
35
-
36
- public function get_theme_rows_data() {
37
- global $wpdb;
38
- $query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
39
- $rows = $wpdb->get_results($query);
40
- return $rows;
41
- }
42
-
43
- ////////////////////////////////////////////////////////////////////////////////////////
44
- // Getters & Setters //
45
- ////////////////////////////////////////////////////////////////////////////////////////
46
- ////////////////////////////////////////////////////////////////////////////////////////
47
- // Private Methods //
48
- ////////////////////////////////////////////////////////////////////////////////////////
49
- ////////////////////////////////////////////////////////////////////////////////////////
50
- // Listeners //
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/BWGModelWidgetTags.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- class BWGModelWidgetTags {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_gallery_rows_data() {
23
- global $wpdb;
24
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
25
- $rows = $wpdb->get_results($query);
26
- return $rows;
27
- }
28
-
29
- public function get_album_rows_data() {
30
- global $wpdb;
31
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_album WHERE published=1";
32
- $rows = $wpdb->get_results($query);
33
- return $rows;
34
- }
35
-
36
- public function get_theme_rows_data() {
37
- global $wpdb;
38
- $query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
39
- $rows = $wpdb->get_results($query);
40
- return $rows;
41
- }
42
-
43
- ////////////////////////////////////////////////////////////////////////////////////////
44
- // Getters & Setters //
45
- ////////////////////////////////////////////////////////////////////////////////////////
46
- ////////////////////////////////////////////////////////////////////////////////////////
47
- // Private Methods //
48
- ////////////////////////////////////////////////////////////////////////////////////////
49
- ////////////////////////////////////////////////////////////////////////////////////////
50
- // Listeners //
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/Editimage.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class EditimageModel_bwg
5
+ */
6
+ class EditimageModel_bwg {
7
+ public function get_image_data() {
8
+ $id = (int) WDWLibrary::get('image_id', 0);
9
+ global $wpdb;
10
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
11
+ return $row;
12
+ }
13
+ }
admin/models/Galleries.php ADDED
@@ -0,0 +1,1060 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class GalleriesModel_bwg
5
+ */
6
+ class GalleriesModel_bwg {
7
+ /**
8
+ * Get rows data or total count.
9
+ *
10
+ * @param $params
11
+ * @param bool $total
12
+ *
13
+ * @return array|null|object|string
14
+ */
15
+ public function get_rows_data( $params, $total = FALSE ) {
16
+ global $wpdb;
17
+ $order = $params['order'];
18
+ $orderby = $params['orderby'];
19
+ $page_per = $params['items_per_page'];
20
+ $page_num = $params['page_num'];
21
+ $search = $params['search'];
22
+
23
+ if ( !$total ) {
24
+ $query = 'SELECT t1.*, count(DISTINCT t2.filename) as images_count';
25
+ }
26
+ else {
27
+ $query = 'SELECT COUNT(*)';
28
+ }
29
+ $query .= ' FROM `' . $wpdb->prefix . 'bwg_gallery` as t1';
30
+ if ( !$total ) {
31
+ $query .= ' LEFT JOIN `' . $wpdb->prefix . 'bwg_image` as t2 on t1.id=t2.gallery_id';
32
+ }
33
+ if ( !current_user_can('manage_options') && BWG()->options->gallery_role ) {
34
+ $query .= " WHERE t1.author=" . get_current_user_id();
35
+ }
36
+ else {
37
+ $query .= " WHERE t1.author>=0";
38
+ }
39
+ if ( $search ) {
40
+ $query .= ' AND t1.`name` LIKE "%' . $search . '%"';
41
+ }
42
+ if ( !$total ) {
43
+ $query .= " GROUP BY t1.id";
44
+ $query .= ' ORDER BY `' . $orderby . '` ' . $order;
45
+ $query .= ' LIMIT ' . $page_num . ',' . $page_per;
46
+ }
47
+ if ( !$total ) {
48
+ $rows = $wpdb->get_results($query);
49
+ }
50
+ else {
51
+ $rows = $wpdb->get_var($query);
52
+ }
53
+
54
+ return $rows;
55
+ }
56
+
57
+ /**
58
+ * Return total count.
59
+ *
60
+ * @param $params
61
+ *
62
+ * @return array|null|object|string
63
+ */
64
+ public function total($params) {
65
+ return $this->get_rows_data($params, TRUE);
66
+ }
67
+
68
+ /**
69
+ * Delete.
70
+ *
71
+ * @param $id
72
+ * @param bool $all
73
+ *
74
+ * @return int
75
+ */
76
+ public function delete( $id, $all = FALSE ) {
77
+ global $wpdb;
78
+ $where = ($all ? '' : ' WHERE id=' . $id);
79
+ $image_where = ($all ? '' : ' WHERE gallery_id=' . $id);
80
+ $alb_gal_where = ($all ? '' : ' AND alb_gal_id=' . $id);
81
+
82
+ // Remove custom post.
83
+ if ( $all ) {
84
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'posts` WHERE `post_type`="bwg_gallery"');
85
+ }
86
+ else {
87
+ $row = $wpdb->get_row( $wpdb->prepare('SELECT `slug` FROM `' . $wpdb->prefix . 'bwg_gallery` WHERE id="%d"', $id) );
88
+ if ( !empty($row) ) {
89
+ WDWLibrary::bwg_remove_custom_post( array( 'slug' => $row->slug, 'post_type' => 'bwg_gallery') );
90
+ }
91
+ }
92
+
93
+ $delete = $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_gallery`' . $where);
94
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image`' . $image_where);
95
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_album_gallery` WHERE is_album="0"' . $alb_gal_where);
96
+ if ( $delete ) {
97
+ if ( $all ) {
98
+ $message = 5;
99
+ }
100
+ else {
101
+ $message = 3;
102
+ }
103
+ }
104
+ else {
105
+ $message = 2;
106
+ }
107
+
108
+ return $message;
109
+ }
110
+
111
+ /**
112
+ * Delete images without gallery.
113
+ */
114
+ public function delete_unknown_images() {
115
+ global $wpdb;
116
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image` WHERE gallery_id=0');
117
+ }
118
+
119
+ /**
120
+ * Get images rows data or total count.
121
+ *
122
+ * @param $gallery_id
123
+ * @param $params
124
+ * @param bool $total
125
+ *
126
+ * @return array|null|object|string
127
+ */
128
+ public function get_image_rows_data($gallery_id, $params, $total = FALSE) {
129
+ global $wpdb;
130
+ $order = $params['order'];
131
+ $orderby = $params['orderby'];
132
+ $page_per = $params['items_per_page'];
133
+ $page_num = $params['page_num'];
134
+ $search = $params['search'];
135
+
136
+ $ecommerce_addon = function_exists('BWGEC');
137
+
138
+ if ( !$total ) {
139
+ $query = 'SELECT T_IMAGE.*';
140
+ if ( $ecommerce_addon ) {
141
+ $query .= ", T_PRICELISTS.title AS priselist_name, T_PRICELIST_ITEMS.item_longest_dimension, T_PRICELISTS.sections";
142
+ }
143
+ }
144
+ else {
145
+ $query = 'SELECT COUNT(*)';
146
+ }
147
+ $query .= ' FROM `' . $wpdb->prefix . 'bwg_image` AS T_IMAGE';
148
+ if ( $ecommerce_addon ) {
149
+ $query .= " LEFT JOIN `" . $wpdb->prefix . "wdpg_ecommerce_pricelists` AS T_PRICELISTS ON T_IMAGE.pricelist_id = T_PRICELISTS.id";
150
+ $query .= " LEFT JOIN ( SELECT MAX(item_longest_dimension) AS item_longest_dimension, pricelist_id FROM `" . $wpdb->prefix . "wdpg_ecommerce_pricelist_items` GROUP BY pricelist_id) AS T_PRICELIST_ITEMS ON T_PRICELIST_ITEMS.pricelist_id = T_PRICELISTS.id";
151
+ }
152
+ if ( !current_user_can('manage_options') && BWG()->options->image_role ) {
153
+ $query .= " WHERE author=" . get_current_user_id();
154
+ }
155
+ else {
156
+ $query .= " WHERE author>=0";
157
+ }
158
+ $query .= " AND `gallery_id`=" . $gallery_id;
159
+ if ( $search ) {
160
+ $query .= ' AND `filename` LIKE "%' . $search . '%"';
161
+ }
162
+ if ( !$total ) {
163
+ $query .= ' ORDER BY `' . $orderby . '` ' . $order;
164
+ $query .= ' LIMIT ' . $page_num . ',' . $page_per;
165
+ }
166
+ if ( !$total ) {
167
+ $rows = $wpdb->get_results($query);
168
+ if ( $ecommerce_addon ) {
169
+ foreach ( $rows as $value ) {
170
+ $value->not_set_items = 0;
171
+ if ( $value->item_longest_dimension && strpos($value->sections, "downloads") !== FALSE ) {
172
+ $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $value->thumb_url, ENT_COMPAT | ENT_QUOTES));
173
+ list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
174
+ if ( $value->item_longest_dimension > $img_width ) {
175
+ $value->not_set_items = 1;
176
+ }
177
+ }
178
+ }
179
+ }
180
+
181
+ if ( !$rows ) {
182
+ $rows = array();
183
+ }
184
+ $rows['template'] = new stdClass();
185
+ $rows['template']->id = "tempid";
186
+ $rows['template']->gallery_id = $gallery_id;
187
+ $rows['template']->order = 0;
188
+ $rows['template']->published = 1;
189
+ $rows['template']->tags = array();
190
+ $rows['template']->image_url = "tempimage_url";
191
+ $rows['template']->thumb_url = "tempthumb_url";
192
+ $rows['template']->filename = "tempfilename";
193
+ $rows['template']->date = "tempdate";
194
+ $rows['template']->resolution = "tempresolution";
195
+ $rows['template']->size = "tempsize";
196
+ $rows['template']->filetype = "tempfiletype";
197
+ $rows['template']->description = "tempdescription";
198
+ $rows['template']->alt = "tempalt";
199
+ $rows['template']->author = get_current_user_id();
200
+ $rows['template']->comment_count = 0;
201
+ $rows['template']->avg_rating = 0;
202
+ $rows['template']->rate_count = 0;
203
+ $rows['template']->hit_count = 0;
204
+ $rows['template']->redirect_url = '';
205
+ $rows['template']->pricelist_id = 0;
206
+ $rows['template']->priselist_name = '';
207
+ $rows['template']->not_set_items = 0;
208
+
209
+ if ( !$total ) {
210
+ foreach ( $rows as $value ) {
211
+ $value->tags = $this->get_tag_rows_data($value->id);
212
+ }
213
+ }
214
+ }
215
+ else {
216
+ $rows = $wpdb->get_var($query);
217
+ }
218
+
219
+ return $rows;
220
+ }
221
+
222
+ /**
223
+ * Return images total count.
224
+ *
225
+ * @param $gallery_id
226
+ * @param $params
227
+ *
228
+ * @return array|null|object|string
229
+ */
230
+ public function image_total($gallery_id, $params) {
231
+ return $this->get_image_rows_data($gallery_id, $params, TRUE);
232
+ }
233
+
234
+ /**
235
+ * Get tags by image.
236
+ *
237
+ * @param $image_id
238
+ *
239
+ * @return mixed
240
+ */
241
+ public function get_tag_rows_data($image_id) {
242
+ global $wpdb;
243
+ $rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "bwg_image_tag AS table2 ON table1.term_id=table2.tag_id WHERE table2.image_id='%d' ORDER BY table2.tag_id", $image_id));
244
+
245
+ if ( !$rows ) {
246
+ $rows = array();
247
+ }
248
+ $rows['template'] = new stdClass();
249
+ $rows['template']->term_id = "temptagid";
250
+ $rows['template']->name = "temptagname";
251
+
252
+ return $rows;
253
+ }
254
+
255
+ /**
256
+ * Get gallery row by id.
257
+ *
258
+ * @param $id
259
+ *
260
+ * @return stdClass
261
+ */
262
+ public function get_row_data( $id ) {
263
+ if ( $id != 0 ) {
264
+ if ( !current_user_can('manage_options') && BWG()->options->gallery_role ) {
265
+ $where = " WHERE author=" . get_current_user_id();
266
+ }
267
+ else {
268
+ $where = " WHERE author>=0 ";
269
+ }
270
+ global $wpdb;
271
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'bwg_gallery`' . $where . ' AND id="%d"', $id));
272
+ }
273
+ else {
274
+ $row = new stdClass();
275
+ $row->id = 0;
276
+ $row->name = '';
277
+ $row->slug = '';
278
+ $row->description = '';
279
+ $row->preview_image = '';
280
+ $row->order = 0;
281
+ $row->author = get_current_user_id();
282
+ $row->images_count = 0;
283
+ $row->published = 1;
284
+ $row->gallery_type = '';
285
+ $row->gallery_source = '';
286
+ $row->autogallery_image_number = 12;
287
+ $row->update_flag = '';
288
+ $row->modified_date = time();
289
+ }
290
+ $user_data = get_userdata($row->author);
291
+ $row->author = ($user_data != FALSE ? $user_data->display_name : '');
292
+
293
+ return $row;
294
+ }
295
+
296
+ /**
297
+ * Save.
298
+ *
299
+ * @param int $id
300
+ *
301
+ * @return array
302
+ */
303
+ public function save($id = 0) {
304
+ $gallery_id = $this->save_db();
305
+ $saved = $this->save_image_db( $gallery_id );
306
+
307
+ return array('id' => $gallery_id, 'saved' => ($gallery_id === FALSE || $saved === FALSE) ? FALSE : TRUE);
308
+ }
309
+
310
+ /**
311
+ * Save Gallery.
312
+ *
313
+ * @return bool|int
314
+ */
315
+ public function save_db() {
316
+ global $wpdb;
317
+ $id = isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0;
318
+ $name = $this->bwg_get_unique_name(WDWLibrary::get('name', ''), $id);
319
+ $slug = WDWLibrary::get('slug');
320
+ $slug = $this->bwg_get_unique_slug((empty($slug) ? $name : $slug), $id);
321
+ $old_slug = WDWLibrary::get('old_slug', '');
322
+ $preview_image = WDWLibrary::get('preview_image', '');
323
+ $random_preview_image = '';
324
+
325
+ if ( $preview_image == '' ) {
326
+ if ( $id != 0 ) {
327
+ $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
328
+ if ( $random_preview_image == '' || !file_exists(ABSPATH . BWG()->upload_dir . $random_preview_image) ) {
329
+ $random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
330
+ }
331
+ if ( empty($random_preview_image) ) {
332
+ $random_preview_image = $this->get_post_random_image( $_REQUEST );
333
+ }
334
+ }
335
+ else {
336
+ $random_preview_image = $this->get_post_random_image( $_REQUEST );
337
+ }
338
+ }
339
+ if ( !WDWLibrary::check_external_link($preview_image) ) {
340
+ $preview_image = wp_normalize_path($preview_image);
341
+ }
342
+ if ( !WDWLibrary::check_external_link($random_preview_image) ) {
343
+ $random_preview_image = wp_normalize_path($random_preview_image);
344
+ }
345
+ if(empty($random_preview_image)) {
346
+ $random_preview_image = '';
347
+ }
348
+
349
+ $data = array(
350
+ 'id' => $id,
351
+ 'name' => $name,
352
+ 'slug' => $slug,
353
+ 'description' => WDWLibrary::get('description', '', FALSE),
354
+ 'page_link' => '',
355
+ 'preview_image' => $preview_image,
356
+ 'random_preview_image' => $random_preview_image,
357
+ 'order' => 0,
358
+ 'author' => get_current_user_id(),
359
+ 'published' => (int) WDWLibrary::get('published', 1),
360
+ 'gallery_type' => WDWLibrary::get('gallery_type', ''),
361
+ 'gallery_source' => WDWLibrary::get('gallery_source', ''),
362
+ 'autogallery_image_number' => (int) WDWLibrary::get('autogallery_image_number', 12),
363
+ 'update_flag' => WDWLibrary::get('update_flag', ''),
364
+ 'modified_date' => WDWLibrary::get('modified_date', time() )
365
+ );
366
+ $saved = $wpdb->replace($wpdb->prefix . 'bwg_gallery', $data);
367
+
368
+ if ( $saved !== FALSE ) {
369
+ if ( $id == 0 ) {
370
+ $id = $wpdb->insert_id;
371
+ }
372
+ // Create custom post (type is gallery).
373
+ $custom_post_params = array(
374
+ 'id' => $id,
375
+ 'title' => $name,
376
+ 'slug' => $slug,
377
+ 'old_slug' => $old_slug,
378
+ 'type' => array(
379
+ 'post_type' => 'gallery',
380
+ 'mode' => '',
381
+ ),
382
+ );
383
+ WDWLibrary::bwg_create_custom_post($custom_post_params);
384
+ return $id;
385
+ }
386
+ else {
387
+ return FALSE;
388
+ }
389
+ }
390
+
391
+ /**
392
+ * Save Images.
393
+ *
394
+ * @param int $gallery_id
395
+ *
396
+ * @return bool
397
+ */
398
+ public function save_image_db( $gallery_id = 0 ) {
399
+ global $wpdb;
400
+ $image_ids = WDWLibrary::get('ids_string', '');
401
+ $image_id_array = explode(',', $image_ids);
402
+ $save = TRUE;
403
+ foreach ( $image_id_array as $image_id ) {
404
+ if ( $image_id ) {
405
+ $filename = WDWLibrary::get('input_filename_' . $image_id, '');
406
+ $image_url = WDWLibrary::get('image_url_' . $image_id, '');
407
+ $thumb_url = WDWLibrary::get('thumb_url_' . $image_id, '');
408
+ $description = WDWLibrary::get('image_description_' . $image_id, '');
409
+ $alt = WDWLibrary::get('image_alt_text_' . $image_id, '');
410
+ $date = WDWLibrary::get('input_date_modified_' . $image_id, '');
411
+ $size = WDWLibrary::get('input_size_' . $image_id, '');
412
+ $filetype = WDWLibrary::get('input_filetype_' . $image_id, '');
413
+ $resolution = WDWLibrary::get('input_resolution_' . $image_id, '');
414
+ $order = (int) WDWLibrary::get('order_input_' . $image_id, 0);
415
+ $redirect_url = WDWLibrary::get('redirect_url_' . $image_id, '');
416
+ $author = get_current_user_id();
417
+ $tags_ids = WDWLibrary::get('tags_' . $image_id, '');
418
+ $data = array(
419
+ 'gallery_id' => $gallery_id,
420
+ 'slug' => WDWLibrary::spider_replace4byte($alt),
421
+ 'description' => WDWLibrary::spider_replace4byte($description),
422
+ 'redirect_url' => $redirect_url,
423
+ 'alt' => WDWLibrary::spider_replace4byte($alt),
424
+ 'date' => $date,
425
+ 'size' => $size,
426
+ 'filetype' => $filetype,
427
+ 'resolution' => $resolution,
428
+ 'order' => $order,
429
+ );
430
+ if ( strpos($image_id, 'pr_') !== FALSE ) {
431
+ if ( !WDWLibrary::check_external_link($image_url) ) {
432
+ $image_url = wp_normalize_path($image_url);
433
+ }
434
+ if ( !WDWLibrary::check_external_link($thumb_url) ) {
435
+ $thumb_url = wp_normalize_path($thumb_url);
436
+ }
437
+ $data += array(
438
+ 'filename' => $filename,
439
+ 'image_url' => $image_url,
440
+ 'thumb_url' => $thumb_url,
441
+ 'author' => $author,
442
+ 'published' => 1,
443
+ 'comment_count' => 0,
444
+ 'avg_rating' => 0,
445
+ 'rate_count' => 0,
446
+ 'hit_count' => 0,
447
+ 'pricelist_id' => 0,
448
+ );
449
+ $save = $wpdb->insert($wpdb->prefix . 'bwg_image', $data);
450
+ $new_image_id = $wpdb->insert_id;
451
+ if ( isset($_POST['check']) && in_array($image_id, $_POST['check']) ) {
452
+ $_POST['check'][] = $new_image_id;
453
+ }
454
+ if ( isset($_POST['image_current_id']) && (esc_html($_POST['image_current_id']) == $image_id) ) {
455
+ $_POST['image_current_id'] = $new_image_id;
456
+ }
457
+ $image_id = $new_image_id;
458
+ }
459
+ else {
460
+ $save = $wpdb->update($wpdb->prefix . 'bwg_image', $data, array( 'id' => $image_id ));
461
+ }
462
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d" AND gallery_id="%d"', $image_id, $gallery_id));
463
+ if ( $save !== FALSE ) {
464
+ $tag_id_array = explode(',', $tags_ids);
465
+ foreach ( $tag_id_array as $tag_id ) {
466
+ if ( $tag_id ) {
467
+ if ( strpos($tag_id, 'pr_') !== FALSE ) {
468
+ $tag_id = substr($tag_id, 3);
469
+ }
470
+ $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
471
+ 'tag_id' => $tag_id,
472
+ 'image_id' => $image_id,
473
+ 'gallery_id' => $gallery_id,
474
+ ));
475
+ // Increase tag count in term_taxonomy table.
476
+ $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
477
+ }
478
+ }
479
+ }
480
+ }
481
+ }
482
+ if ( $save !== FALSE ) {
483
+ return TRUE;
484
+ }
485
+ else {
486
+ return FALSE;
487
+ }
488
+ }
489
+
490
+ /**
491
+ * Get POST random image.
492
+ *
493
+ * @param array $params
494
+ *
495
+ * @return string
496
+ */
497
+ public function get_post_random_image( $params = array() ) {
498
+ $i = 0;
499
+ $random_preview_image = '';
500
+
501
+ while ( isset($params['input_filetype_pr_' . $i]) ) {
502
+ if ( isset($params['thumb_url_pr_' . $i]) ) {
503
+ $random_preview_image = esc_html(stripslashes($params['thumb_url_pr_' . $i]));
504
+ }
505
+ $i++;
506
+ }
507
+
508
+ return $random_preview_image;
509
+ }
510
+
511
+ public function bwg_get_unique_slug( $slug, $id ) {
512
+ global $wpdb;
513
+ $slug = sanitize_title($slug);
514
+ if ( $id != 0 ) {
515
+ $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s AND id != %d", $slug, $id);
516
+ }
517
+ else {
518
+ $query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $slug);
519
+ }
520
+ if ( $wpdb->get_var($query) ) {
521
+ $num = 2;
522
+ do {
523
+ $alt_slug = $slug . "-$num";
524
+ $num++;
525
+ $slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $alt_slug));
526
+ }
527
+ while ( $slug_check );
528
+ $slug = $alt_slug;
529
+ }
530
+
531
+ return $slug;
532
+ }
533
+
534
+ public function bwg_get_unique_name( $name, $id ) {
535
+ global $wpdb;
536
+ if ( $id != 0 ) {
537
+ $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s AND id != %d", $name, $id);
538
+ }
539
+ else {
540
+ $query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $name);
541
+ }
542
+ if ( $wpdb->get_var($query) ) {
543
+ $num = 2;
544
+ do {
545
+ $alt_name = $name . "-$num";
546
+ $num++;
547
+ $slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $alt_name));
548
+ }
549
+ while ( $slug_check );
550
+ $name = $alt_name;
551
+ }
552
+
553
+ return $name;
554
+ }
555
+
556
+ /**
557
+ * Delete image.
558
+ *
559
+ * @param $id
560
+ * @param bool $all
561
+ *
562
+ * @return int
563
+ */
564
+ public function image_delete( $id, $all = FALSE ) {
565
+ global $wpdb;
566
+ $where = ($all ? '' : ' WHERE id=' . $id);
567
+ $image_where = ($all ? '' : ' WHERE image_id=' . $id);
568
+
569
+ $delete = $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image`' . $where);
570
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image_comment`' . $image_where);
571
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image_rate`' . $image_where);
572
+ $tag_ids = $wpdb->get_col('SELECT tag_id FROM `' . $wpdb->prefix . 'bwg_image_tag`' . $image_where);
573
+ $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image_tag`' . $image_where);
574
+ // Increase tag count in term_taxonomy table.
575
+ if ( !empty($tag_ids) ) {
576
+ foreach ( $tag_ids as $tag_id ) {
577
+ $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
578
+ }
579
+ }
580
+
581
+ $current_id = WDWLibrary::get('current_id', 0);
582
+ if ( !empty($current_id) ) {
583
+ // after deleted and empty image lists then update `preview_image` and `random_preview_image` colums.
584
+ $row = $wpdb->get_row( 'SELECT * FROM `' . $wpdb->prefix . 'bwg_gallery` AS `g` INNER JOIN `' . $wpdb->prefix . 'bwg_image` AS `i` ON (`g`.`id` = `i`.`gallery_id`) WHERE `g`.`id` = ' . $current_id );
585
+ if ( empty($row) ) {
586
+ $wpdb->update($wpdb->prefix . 'bwg_gallery',
587
+ array('preview_image' => '', 'random_preview_image' => ''),
588
+ array('id' => $current_id)
589
+ );
590
+ }
591
+ }
592
+
593
+ $message = 2;
594
+ if ( $delete ) {
595
+ if ( $all ) {
596
+ $message = 5;
597
+ }
598
+ else {
599
+ $message = 3;
600
+ }
601
+ }
602
+ return $message;
603
+ }
604
+
605
+ /**
606
+ * Publish image.
607
+ *
608
+ * @param $id
609
+ * @param bool $all
610
+ *
611
+ * @return int
612
+ */
613
+ public function image_publish( $id, $all = FALSE ) {
614
+ global $wpdb;
615
+ $where = ($all ? '' : ' WHERE id=' . $id);
616
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_image` SET published=1' . $where);
617
+
618
+ $message = 2;
619
+ if ( $updated !== FALSE ) {
620
+ $message = 9;
621
+ }
622
+ return $message;
623
+ }
624
+
625
+ /**
626
+ * Unpublish image.
627
+ *
628
+ * @param $id
629
+ * @param bool $all
630
+ *
631
+ * @return int
632
+ */
633
+ public function image_unpublish( $id, $all = FALSE ) {
634
+ global $wpdb;
635
+ $where = ($all ? '' : ' WHERE id=' . $id);
636
+ $updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'bwg_image` SET published=0' . $where);
637
+ $message = 2;
638
+ if ( $updated !== FALSE ) {
639
+ $message = 10;
640
+ }
641
+ return $message;
642
+ }
643
+
644
+ /**
645
+ * Reset image.
646
+ *
647
+ * @param $id
648
+ * @param bool $all
649
+ *
650
+ * @return int
651
+ */
652
+ public function image_reset( $id, $all = FALSE ) {
653
+ if ( $all ) {
654
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
655
+ WDWLibrary::bwg_image_recover_all($gallery_id);
656
+ }
657
+ else {
658
+ global $wpdb;
659
+ $thumb_width = BWG()->options->upload_thumb_width;
660
+ $width = BWG()->options->upload_img_width;
661
+ $image = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
662
+ WDWLibrary::recover_image($image, $thumb_width, $width, 'gallery_page');
663
+ $where = ($id) ? ' `id` = ' . $id : 1;
664
+ WDWLibrary::update_image_modified_date( $where );
665
+ }
666
+ return 20;
667
+ }
668
+
669
+ /**
670
+ * Set watermark.
671
+ *
672
+ * @param $id
673
+ * @param bool $all
674
+ *
675
+ * @return int
676
+ */
677
+ public function image_set_watermark($id, $all = FALSE) {
678
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
679
+ $message_id = WDWLibrary::bwg_image_set_watermark($gallery_id, ($all ? 0 : $id));
680
+
681
+ return $message_id;
682
+ }
683
+
684
+ /**
685
+ * Rotate left.
686
+ *
687
+ * @param $id
688
+ * @param bool $all
689
+ *
690
+ * @return int
691
+ */
692
+ public function image_rotate_left($id, $all = FALSE) {
693
+ return $this->rotate(90, $id, $all);
694
+ }
695
+
696
+ /**
697
+ * Rotate right.
698
+ *
699
+ * @param $id
700
+ * @param bool $all
701
+ *
702
+ * @return int
703
+ */
704
+ public function image_rotate_right($id, $all = FALSE) {
705
+ return $this->rotate(270, $id, $all);
706
+ }
707
+
708
+ /**
709
+ * Rotate.
710
+ *
711
+ * @param $edit_type
712
+ * @param int $id
713
+ * @param bool $all
714
+ *
715
+ * @return int
716
+ */
717
+ public function rotate( $edit_type, $id = 0, $all = FALSE ) {
718
+ global $wpdb;
719
+ $image_id = ($all ? 0 : $id);
720
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
721
+ $where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ($image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
722
+ $images_data = $wpdb->get_results( 'SELECT id, image_url, thumb_url FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where );
723
+ @ini_set('memory_limit', '-1');
724
+ foreach ( $images_data as $image_data ) {
725
+ $image_data->image_url = stripcslashes($image_data->image_url);
726
+ $filename = htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
727
+ $thumb_filename = htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
728
+ list($width_rotate, $height_rotate, $type_rotate) = getimagesize($filename);
729
+ if ( $edit_type == '270' || $edit_type == '90' ) {
730
+ if ( $type_rotate == 2 ) {
731
+ $source = imagecreatefromjpeg($filename);
732
+ $thumb_source = imagecreatefromjpeg($thumb_filename);
733
+ $rotate = imagerotate($source, $edit_type, 0);
734
+ $thumb_rotate = imagerotate($thumb_source, $edit_type, 0);
735
+ imagejpeg($thumb_rotate, $thumb_filename, BWG()->options->jpeg_quality);
736
+ imagejpeg($rotate, $filename, BWG()->options->jpeg_quality);
737
+ imagedestroy($source);
738
+ imagedestroy($rotate);
739
+ imagedestroy($thumb_source);
740
+ imagedestroy($thumb_rotate);
741
+ }
742
+ elseif ( $type_rotate == 3 ) {
743
+ $source = imagecreatefrompng($filename);
744
+ $thumb_source = imagecreatefrompng($thumb_filename);
745
+ imagealphablending($source, FALSE);
746
+ imagealphablending($thumb_source, FALSE);
747
+ imagesavealpha($source, TRUE);
748
+ imagesavealpha($thumb_source, TRUE);
749
+ $rotate = imagerotate($source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
750
+ $thumb_rotate = imagerotate($thumb_source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
751
+ imagealphablending($rotate, FALSE);
752
+ imagealphablending($thumb_rotate, FALSE);
753
+ imagesavealpha($rotate, TRUE);
754
+ imagesavealpha($thumb_rotate, TRUE);
755
+ imagepng($rotate, $filename, BWG()->options->png_quality);
756
+ imagepng($thumb_rotate, $thumb_filename, BWG()->options->png_quality);
757
+ imagedestroy($source);
758
+ imagedestroy($rotate);
759
+ imagedestroy($thumb_source);
760
+ imagedestroy($thumb_rotate);
761
+ }
762
+ elseif ( $type_rotate == 1 ) {
763
+ $source = imagecreatefromgif($filename);
764
+ $thumb_source = imagecreatefromgif($thumb_filename);
765
+ imagealphablending($source, FALSE);
766
+ imagealphablending($thumb_source, FALSE);
767
+ imagesavealpha($source, TRUE);
768
+ imagesavealpha($thumb_source, TRUE);
769
+ $rotate = imagerotate($source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
770
+ $thumb_rotate = imagerotate($thumb_source, $edit_type, imageColorAllocateAlpha($source, 0, 0, 0, 127));
771
+ imagealphablending($rotate, FALSE);
772
+ imagealphablending($thumb_rotate, FALSE);
773
+ imagesavealpha($rotate, TRUE);
774
+ imagesavealpha($thumb_rotate, TRUE);
775
+ imagegif($rotate, $filename);
776
+ imagegif($thumb_rotate, $thumb_filename);
777
+ imagedestroy($source);
778
+ imagedestroy($rotate);
779
+ imagedestroy($thumb_source);
780
+ imagedestroy($thumb_rotate);
781
+ }
782
+ }
783
+ }
784
+ WDWLibrary::update_image_modified_date( $where );
785
+ return 22;
786
+ }
787
+
788
+ /**
789
+ * Recreate thumbnail.
790
+ *
791
+ * @param $id
792
+ * @param bool $all
793
+ *
794
+ * @return int
795
+ */
796
+ public function image_recreate_thumbnail($id, $all = FALSE) {
797
+ $image_id = ($all ? 0 : $id);
798
+ global $wpdb;
799
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
800
+ $where = ( ($gallery_id) ? ' `gallery_id` = ' . $gallery_id . ( $image_id ? ' AND `id` = ' . $image_id : '' ) : 1 );
801
+ $img_ids = $wpdb->get_results( 'SELECT id, thumb_url FROM `' . $wpdb->prefix . 'bwg_image` WHERE ' . $where );
802
+ foreach ( $img_ids as $img_id ) {
803
+ $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
804
+ $new_file_path = htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
805
+ list($img_width, $img_height, $type) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
806
+ if ( !$img_width || !$img_height ) {
807
+ continue;
808
+ }
809
+ $max_width = BWG()->options->upload_thumb_width;
810
+ $max_height = BWG()->options->upload_thumb_height;
811
+ $scale = min($max_width / $img_width, $max_height / $img_height);
812
+ @ini_set('memory_limit', '-1');
813
+ if ( !function_exists('imagecreatetruecolor') ) {
814
+ error_log('Function not found: imagecreatetruecolor');
815
+
816
+ return FALSE;
817
+ }
818
+ $new_width = $img_width * $scale;
819
+ $new_height = $img_height * $scale;
820
+ $dst_x = 0;
821
+ $dst_y = 0;
822
+ $new_img = @imagecreatetruecolor($new_width, $new_height);
823
+ switch ( $type ) {
824
+ case 2:
825
+ $src_img = @imagecreatefromjpeg($file_path);
826
+ $write_image = 'imagejpeg';
827
+ $image_quality = BWG()->options->jpeg_quality;
828
+ break;
829
+ case 1:
830
+ @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
831
+ $src_img = @imagecreatefromgif($file_path);
832
+ $write_image = 'imagegif';
833
+ $image_quality = NULL;
834
+ break;
835
+ case 3:
836
+ @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
837
+ @imagealphablending($new_img, FALSE);
838
+ @imagesavealpha($new_img, TRUE);
839
+ $src_img = @imagecreatefrompng($file_path);
840
+ $write_image = 'imagepng';
841
+ $image_quality = BWG()->options->png_quality;
842
+ break;
843
+ default:
844
+ $src_img = NULL;
845
+ break;
846
+ }
847
+ $src_img && @imagecopyresampled($new_img, $src_img, $dst_x, $dst_y, 0, 0, $new_width, $new_height, $img_width, $img_height) && $write_image($new_img, $new_file_path, $image_quality);
848
+ // Free up memory (imagedestroy does not delete files):
849
+ @imagedestroy($src_img);
850
+ @imagedestroy($new_img);
851
+ @ini_restore('memory_limit');
852
+ }
853
+ WDWLibrary::update_image_modified_date( $where );
854
+ return 23;
855
+ }
856
+
857
+ /**
858
+ * Resize image.
859
+ *
860
+ * @param $id
861
+ * @param bool $all
862
+ *
863
+ * @return int
864
+ */
865
+ public function image_resize($id, $all = FALSE) {
866
+ $image_id = ($all ? 0 : $id);
867
+ global $wpdb;
868
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
869
+ $image_width = (int) WDWLibrary::get('image_width', 1600);
870
+ $image_height = (int) WDWLibrary::get('image_height', 1200);
871
+ $where = ( ($gallery_id) ? ' WHERE gallery_id=' . $gallery_id . ( $image_id ? ' AND id=' . $image_id : '' ) : '' );
872
+ $images = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'bwg_image` ' . $where );
873
+ if ( !empty($images) ) {
874
+ foreach ( $images as $image ) {
875
+ $this->scaled_image(ABSPATH . BWG()->upload_dir . $image->image_url, $image_width, $image_height);
876
+ }
877
+ }
878
+ WDWLibrary::update_image_modifie_date( $where );
879
+ return 24;
880
+ }
881
+
882
+ /**
883
+ * Create scaled image.
884
+ *
885
+ * @param $file_path
886
+ * @param int $max_width
887
+ * @param int $max_height
888
+ * @param bool $crop
889
+ *
890
+ * @return bool
891
+ */
892
+ public function scaled_image( $file_path, $max_width = 0, $max_height = 0, $crop = FALSE ) {
893
+ $file_path = htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES);
894
+ if ( !function_exists('getimagesize') ) {
895
+ error_log('Function not found: getimagesize');
896
+
897
+ return FALSE;
898
+ }
899
+ list($img_width, $img_height, $type) = @getimagesize($file_path);
900
+ if ( !$img_width || !$img_height ) {
901
+ return FALSE;
902
+ }
903
+ $scale = min($max_width / $img_width, $max_height / $img_height);
904
+ @ini_set('memory_limit', '-1');
905
+ if ( ($scale >= 1) || (($max_width === 0) && ($max_height === 0)) ) {
906
+ // if ($file_path !== $new_file_path) {
907
+ // return copy($file_path, $new_file_path);
908
+ // }
909
+ return TRUE;
910
+ }
911
+ if ( !function_exists('imagecreatetruecolor') ) {
912
+ error_log('Function not found: imagecreatetruecolor');
913
+
914
+ return FALSE;
915
+ }
916
+ if ( !$crop ) {
917
+ $new_width = $img_width * $scale;
918
+ $new_height = $img_height * $scale;
919
+ $dst_x = 0;
920
+ $dst_y = 0;
921
+ $new_img = @imagecreatetruecolor($new_width, $new_height);
922
+ }
923
+ else {
924
+ if ( ($img_width / $img_height) >= ($max_width / $max_height) ) {
925
+ $new_width = $img_width / ($img_height / $max_height);
926
+ $new_height = $max_height;
927
+ }
928
+ else {
929
+ $new_width = $max_width;
930
+ $new_height = $img_height / ($img_width / $max_width);
931
+ }
932
+ $dst_x = 0 - ($new_width - $max_width) / 2;
933
+ $dst_y = 0 - ($new_height - $max_height) / 2;
934
+ $new_img = @imagecreatetruecolor($max_width, $max_height);
935
+ }
936
+ switch ( $type ) {
937
+ case 2:
938
+ $src_img = @imagecreatefromjpeg($file_path);
939
+ $write_image = 'imagejpeg';
940
+ $image_quality = BWG()->options->jpeg_quality;
941
+ break;
942
+ case 1:
943
+ @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
944
+ $src_img = @imagecreatefromgif($file_path);
945
+ $write_image = 'imagegif';
946
+ $image_quality = NULL;
947
+ break;
948
+ case 3:
949
+ @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
950
+ @imagealphablending($new_img, FALSE);
951
+ @imagesavealpha($new_img, TRUE);
952
+ $src_img = @imagecreatefrompng($file_path);
953
+ $write_image = 'imagepng';
954
+ $image_quality = BWG()->options->png_quality;
955
+ break;
956
+ default:
957
+ $src_img = NULL;
958
+ }
959
+ $success = $src_img && @imagecopyresampled($new_img, $src_img, $dst_x, $dst_y, 0, 0, $new_width, $new_height, $img_width, $img_height) && $write_image($new_img, $file_path, $image_quality);
960
+ // Free up memory (imagedestroy does not delete files):
961
+ @imagedestroy($src_img);
962
+ @imagedestroy($new_img);
963
+ @ini_restore('memory_limit');
964
+
965
+ return $success;
966
+ }
967
+
968
+ /**
969
+ * Edit image alt/description/redirect URL.
970
+ *
971
+ * @param $id
972
+ * @param bool $all
973
+ *
974
+ * @return int
975
+ */
976
+ public function image_edit($id, $all = FALSE) {
977
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
978
+ $where = ($all ? array('gallery_id' => $gallery_id ) : array('id' => $id));
979
+ $title = WDWLibrary::get('title', '');
980
+ $desc = WDWLibrary::get('desc', '');
981
+ $redirecturl = WDWLibrary::get('redirecturl', '');
982
+ global $wpdb;
983
+ $wpdb->update($wpdb->prefix . 'bwg_image', array(
984
+ 'alt' => $title,
985
+ 'description' => $desc,
986
+ 'redirect_url' => $redirecturl
987
+ ), $where);
988
+
989
+ return 25;
990
+ }
991
+
992
+ public function image_add_tag($id, $all = FALSE) {
993
+ $image_id = ($all ? 0 : $id);
994
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
995
+ $tag_ids = WDWLibrary::get('added_tags_id', '');
996
+ $tag_ids_array = explode(',', $tag_ids);
997
+ global $wpdb;
998
+ $images = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'bwg_image` WHERE gallery_id=' . $gallery_id . ($image_id ? ' AND id=' . $image_id : ''));
999
+ foreach ( $images as $image ) {
1000
+ foreach ( $tag_ids_array as $tag_id ) {
1001
+ if ( $tag_id ) {
1002
+ $exist_tag = $wpdb->get_var($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d" AND image_id="%d" AND gallery_id="%d"', $tag_id, $image->id, $gallery_id));
1003
+ if ( $exist_tag == NULL ) {
1004
+ $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
1005
+ 'tag_id' => $tag_id,
1006
+ 'image_id' => $image->id,
1007
+ 'gallery_id' => $gallery_id,
1008
+ ));
1009
+ // Increase tag count in term_taxonomy table.
1010
+ $wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
1011
+ }
1012
+ }
1013
+ }
1014
+ }
1015
+
1016
+ return 25;
1017
+ }
1018
+
1019
+ public function set_image_pricelist($id, $all = FALSE) {
1020
+ global $wpdb;
1021
+ $pricelist_id = (int) WDWLibrary::get('image_pricelist_id', 0);
1022
+ $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%"');
1023
+ $not_set_items = array();
1024
+ if ($pricelist_id) {
1025
+ $image_id = ($all ? 0 : $id);
1026
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
1027
+ $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"' . ($image_id ? ' AND id=%d' : ''), ($image_id ? array($gallery_id, $image_id) : array($gallery_id))));
1028
+ foreach ($image_ids_col as $image_id) {
1029
+ $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . BWG()->upload_dir . $_POST['thumb_url_' . $image_id], ENT_COMPAT | ENT_QUOTES));
1030
+ list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
1031
+ if ($item_longest_dimension > $img_width && $img_width) {
1032
+ $not_set_items[] = $image_id . "-" . $item_longest_dimension;
1033
+ }
1034
+ $wpdb->update($wpdb->prefix . 'bwg_image', array('pricelist_id' => $pricelist_id), array('id' => $image_id));
1035
+ }
1036
+ }
1037
+ if ( empty($not_set_items) === FALSE ) {
1038
+ echo "<div class='bwg_msg'>" . __('Selected pricelist item longest dimension greater than some original images dimensions.', BWG()->prefix) . "</div>";
1039
+ }
1040
+ }
1041
+
1042
+
1043
+ public function remove_image_pricelist() {
1044
+ global $wpdb;
1045
+ $image_id = (int) WDWLibrary::get('remove_pricelist', 0);
1046
+ if ( $image_id ) {
1047
+ $wpdb->update($wpdb->prefix . 'bwg_image', array( 'pricelist_id' => 0 ), array( 'id' => $image_id ));
1048
+ }
1049
+ }
1050
+
1051
+ public function remove_pricelist_all($id, $all = FALSE) {
1052
+ global $wpdb;
1053
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
1054
+ $image_id = ($all ? 0 : $id);
1055
+ $image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"' . ($image_id ? ' AND id=%d' : ''), ($image_id ? array($gallery_id, $image_id) : array($gallery_id))));
1056
+ foreach ( $image_ids_col as $image_id ) {
1057
+ $wpdb->update($wpdb->prefix . 'bwg_image', array('pricelist_id' => 0), array('id' => $image_id));
1058
+ }
1059
+ }
1060
+ }
admin/models/{BWGModelLicensing_bwg.php → Licensing.php} RENAMED
File without changes
admin/models/Options.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class OptionsModel_bwg
5
+ */
6
+ class OptionsModel_bwg {
7
+
8
+ /**
9
+ * Set instagram access token.
10
+ *
11
+ * @param $key
12
+ * @return mixed
13
+ */
14
+ function set_instagram_access_token( $key = '' ) {
15
+ $row = new WD_BWG_Options();
16
+ $row->instagram_access_token = $key;
17
+ $upd = update_option('wd_bwg_options', json_encode($row));
18
+ return $upd;
19
+ }
20
+ }
admin/models/{BWGModelBWGShortcode.php → Shortcode.php} RENAMED
@@ -1,7 +1,6 @@
1
  <?php
2
 
3
- class BWGModelBWGShortcode {
4
- public function __construct() {}
5
 
6
  public function get_shortcode_data() {
7
  global $wpdb;
@@ -32,7 +31,7 @@ class BWGModelBWGShortcode {
32
 
33
  public function get_theme_rows_data() {
34
  global $wpdb;
35
- $query = "SELECT * FROM " . $wpdb->prefix . "bwg_theme ORDER BY name";
36
  $rows = $wpdb->get_results($query);
37
  return $rows;
38
  }
1
  <?php
2
 
3
+ class ShortcodeModel_bwg {
 
4
 
5
  public function get_shortcode_data() {
6
  global $wpdb;
31
 
32
  public function get_theme_rows_data() {
33
  global $wpdb;
34
+ $query = "SELECT * FROM " . $wpdb->prefix . "bwg_theme ORDER BY `default_theme` DESC, `name`";
35
  $rows = $wpdb->get_results($query);
36
  return $rows;
37
  }
admin/models/Themes.php ADDED
@@ -0,0 +1,727 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ThemesModel_bwg
4
+ */
5
+ class ThemesModel_bwg {
6
+ /**
7
+ * Get rows data.
8
+ *
9
+ * @param $params
10
+ *
11
+ * @return array $rows
12
+ */
13
+ public function get_rows_data( $params, $total = FALSE ) {
14
+ global $wpdb;
15
+ $order = $params['order'];
16
+ $orderby = $params['orderby'];
17
+ $page_per = $params['items_per_page'];
18
+ $page_num = $params['page_num'];
19
+ $search = $params['search'];
20
+
21
+ if ( !$total ) {
22
+ $query = 'SELECT *';
23
+ }
24
+ else {
25
+ $query = 'SELECT COUNT(*)';
26
+ }
27
+ $query .= ' FROM `' . $wpdb->prefix . 'bwg_theme` AS `t`';
28
+
29
+ if ( $search ) {
30
+ $query .= ' WHERE `t`.`name` LIKE "%' . $search . '%"';
31
+ }
32
+
33
+ if ( !$total ) {
34
+ $query .= ' ORDER BY `t`.`' . $orderby . '` ' . $order;
35
+ $query .= ' LIMIT ' . $page_num . ',' . $page_per;
36
+ }
37
+
38
+ if ( !$total ) {
39
+ $rows = $wpdb->get_results($query);
40
+ }
41
+ else {
42
+ $rows = $wpdb->get_var($query);
43
+ }
44
+ return $rows;
45
+ }
46
+
47
+ public function get_row_data($id, $reset = FALSE) {
48
+ global $wpdb;
49
+ if ($id != 0) {
50
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id));
51
+ $themes = json_decode($row->options);
52
+ foreach ($themes as $key => $value) {
53
+ $row->$key = $value;
54
+ }
55
+ if (!isset($row->lightbox_bg_transparent)) {
56
+ $row->lightbox_bg_transparent = 100;
57
+ }
58
+ if (!isset($row->image_browser_image_title_align)) {
59
+ $row->image_browser_image_title_align = 'top';
60
+ }
61
+ if (!isset($row->thumb_gal_title_font_color)) {
62
+ $row->thumb_gal_title_font_color = $row->album_compact_back_font_color;
63
+ }
64
+ if (!isset($row->thumb_gal_title_font_style)) {
65
+ $row->thumb_gal_title_font_style = $row->album_compact_back_font_style;
66
+ }
67
+ if (!isset($row->thumb_gal_title_font_size)) {
68
+ $row->thumb_gal_title_font_size = $row->album_compact_back_font_size;
69
+ }
70
+ if (!isset($row->thumb_gal_title_font_weight)) {
71
+ $row->thumb_gal_title_font_weight = $row->album_compact_back_font_weight;
72
+ }
73
+ if (!isset($row->thumb_gal_title_margin)) {
74
+ $row->thumb_gal_title_margin = '2px';
75
+ }
76
+ if (!isset($row->thumb_gal_title_shadow)) {
77
+ $row->thumb_gal_title_shadow = '0px 0px 0px #888888';
78
+ }
79
+ if (!isset($row->thumb_gal_title_align)) {
80
+ $row->thumb_gal_title_align = 'center';
81
+ }
82
+ if (!isset($row->album_compact_gal_title_font_color)) {
83
+ $row->album_compact_gal_title_font_color = $row->album_compact_back_font_color;
84
+ }
85
+ if (!isset($row->album_compact_gal_title_font_style)) {
86
+ $row->album_compact_gal_title_font_style = $row->album_compact_back_font_style;
87
+ }
88
+ if (!isset($row->album_compact_gal_title_font_size)) {
89
+ $row->album_compact_gal_title_font_size = $row->album_compact_back_font_size;
90
+ }
91
+ if (!isset($row->album_compact_gal_title_font_weight)) {
92
+ $row->album_compact_gal_title_font_weight = $row->album_compact_back_font_weight;
93
+ }
94
+ if (!isset($row->album_compact_gal_title_margin)) {
95
+ $row->album_compact_gal_title_margin = '2px';
96
+ }
97
+ if (!isset($row->album_compact_gal_title_shadow)) {
98
+ $row->album_compact_gal_title_shadow = '0px 0px 0px #888888';
99
+ }
100
+ if (!isset($row->album_compact_gal_title_align)) {
101
+ $row->album_compact_gal_title_align = 'center';
102
+ }
103
+ if (!isset($row->album_extended_gal_title_font_color)) {
104
+ $row->album_extended_gal_title_font_color = $row->album_extended_back_font_color;
105
+ }
106
+ if (!isset($row->album_extended_gal_title_font_style)) {
107
+ $row->album_extended_gal_title_font_style = $row->album_extended_back_font_style;
108
+ }
109
+ if (!isset($row->album_extended_gal_title_font_size)) {
110
+ $row->album_extended_gal_title_font_size = $row->album_extended_back_font_size;
111
+ }
112
+ if (!isset($row->album_extended_gal_title_font_weight)) {
113
+ $row->album_extended_gal_title_font_weight = $row->album_extended_back_font_weight;
114
+ }
115
+ if (!isset($row->album_extended_gal_title_margin)) {
116
+ $row->album_extended_gal_title_margin = '2px';
117
+ }
118
+ if (!isset($row->album_extended_gal_title_shadow)) {
119
+ $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
120
+ }
121
+ if (!isset($row->album_extended_gal_title_align)) {
122
+ $row->album_extended_gal_title_align = 'center';
123
+ }
124
+ if (!isset($row->masonry_thumb_gal_title_font_color)) {
125
+ $row->masonry_thumb_gal_title_font_color = $row->album_compact_back_font_color;
126
+ }
127
+ if (!isset($row->masonry_thumb_gal_title_font_style)) {
128
+ $row->masonry_thumb_gal_title_font_style = $row->album_compact_back_font_style;
129
+ }
130
+ if (!isset($row->masonry_thumb_gal_title_font_size)) {
131
+ $row->masonry_thumb_gal_title_font_size = $row->album_compact_back_font_size;
132
+ }
133
+ if (!isset($row->masonry_thumb_gal_title_font_weight)) {
134
+ $row->masonry_thumb_gal_title_font_weight = $row->album_compact_back_font_weight;
135
+ }
136
+ if (!isset($row->masonry_thumb_gal_title_margin)) {
137
+ $row->masonry_thumb_gal_title_margin = '2px';
138
+ }
139
+ if (!isset($row->masonry_thumb_gal_title_shadow)) {
140
+ $row->masonry_thumb_gal_title_shadow = '0px 0px 0px #888888';
141
+ }
142
+ if (!isset($row->masonry_thumb_gal_title_align)) {
143
+ $row->masonry_thumb_gal_title_align = 'center';
144
+ }
145
+ if (!isset($row->album_masonry_gal_title_font_color)) {
146
+ $row->album_masonry_gal_title_font_color = $row->album_masonry_back_font_color;
147
+ }
148
+ if (!isset($row->album_masonry_gal_title_font_style)) {
149
+ $row->album_masonry_gal_title_font_style = $row->album_masonry_back_font_style;
150
+ }
151
+ if (!isset($row->album_masonry_gal_title_font_size)) {
152
+ $row->album_masonry_gal_title_font_size = $row->album_masonry_back_font_size;
153
+ }
154
+ if (!isset($row->album_masonry_gal_title_font_weight)) {
155
+ $row->album_masonry_gal_title_font_weight = $row->album_masonry_back_font_weight;
156
+ }
157
+ if (!isset($row->album_masonry_gal_title_margin)) {
158
+ $row->album_masonry_gal_title_margin = '2px';
159
+ }
160
+ if (!isset($row->album_masonry_gal_title_shadow)) {
161
+ $row->album_masonry_gal_title_shadow = '0px 0px 0px #888888';
162
+ }
163
+ if (!isset($row->album_masonry_gal_title_align)) {
164
+ $row->album_masonry_gal_title_align = 'center';
165
+ }
166
+ if (!isset($row->mosaic_thumb_gal_title_font_color)) {
167
+ $row->mosaic_thumb_gal_title_font_color = $row->album_compact_back_font_color;
168
+ }
169
+ if (!isset($row->mosaic_thumb_gal_title_font_style)) {
170
+ $row->mosaic_thumb_gal_title_font_style = $row->album_compact_back_font_style;
171
+ }
172
+ if (!isset($row->mosaic_thumb_gal_title_font_size)) {
173
+ $row->mosaic_thumb_gal_title_font_size = $row->album_compact_back_font_size;
174
+ }
175
+ if (!isset($row->mosaic_thumb_gal_title_font_weight)) {
176
+ $row->mosaic_thumb_gal_title_font_weight = $row->album_compact_back_font_weight;
177
+ }
178
+ if (!isset($row->mosaic_thumb_gal_title_margin)) {
179
+ $row->mosaic_thumb_gal_title_margin = '2px';
180
+ }
181
+ if (!isset($row->mosaic_thumb_gal_title_shadow)) {
182
+ $row->mosaic_thumb_gal_title_shadow = '0px 0px 0px #888888';
183
+ }
184
+ if (!isset($row->mosaic_thumb_gal_title_align)) {
185
+ $row->mosaic_thumb_gal_title_align = 'center';
186
+ }
187
+ if (!isset($row->image_browser_gal_title_font_color)) {
188
+ $row->image_browser_gal_title_font_color = 'CCCCCC';
189
+ }
190
+ if (!isset($row->image_browser_gal_title_font_style)) {
191
+ $row->image_browser_gal_title_font_style = 'segoe ui';
192
+ }
193
+ if (!isset($row->image_browser_gal_title_font_size)) {
194
+ $row->image_browser_gal_title_font_size = 16;
195
+ }
196
+ if (!isset($row->image_browser_gal_title_font_weight)) {
197
+ $row->image_browser_gal_title_font_weight = 'bold';
198
+ }
199
+ if (!isset($row->image_browser_gal_title_margin)) {
200
+ $row->image_browser_gal_title_margin = '2px';
201
+ }
202
+ if (!isset($row->image_browser_gal_title_shadow)) {
203
+ $row->image_browser_gal_title_shadow = '0px 0px 0px #888888';
204
+ }
205
+ if (!isset($row->image_browser_gal_title_align)) {
206
+ $row->image_browser_gal_title_align = 'center';
207
+ }
208
+
209
+ if (!isset($row->blog_style_gal_title_font_color)) {
210
+ $row->blog_style_gal_title_font_color = 'CCCCCC';
211
+ }
212
+ if (!isset($row->blog_style_gal_title_font_style)) {
213
+ $row->blog_style_gal_title_font_style = 'segoe ui';
214
+ }
215
+ if (!isset($row->blog_style_gal_title_font_size)) {
216
+ $row->blog_style_gal_title_font_size = 16;
217
+ }
218
+ if (!isset($row->blog_style_gal_title_font_weight)) {
219
+ $row->blog_style_gal_title_font_weight = 'bold';
220
+ }
221
+ if (!isset($row->blog_style_gal_title_margin)) {
222
+ $row->blog_style_gal_title_margin = '2px';
223
+ }
224
+ if (!isset($row->blog_style_gal_title_shadow)) {
225
+ $row->blog_style_gal_title_shadow = '0px 0px 0px #888888';
226
+ }
227
+ if (!isset($row->blog_style_gal_title_align)) {
228
+ $row->blog_style_gal_title_align = 'center';
229
+ }
230
+ if ($reset) {
231
+ if (!$row->default_theme) {
232
+ $row_id = $row->id;
233
+ $row_name = $row->name;
234
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
235
+ $row->id = $row_id;
236
+ $row->name = $row_name;
237
+ $row->default_theme = FALSE;
238
+ $themes = json_decode($row->options);
239
+ foreach ($themes as $key => $value) {
240
+ $row->$key = $value;
241
+ }
242
+ if (!isset($row->lightbox_bg_transparent)) {
243
+ $row->lightbox_bg_transparent = 100;
244
+ }
245
+ if (!isset($row->image_browser_image_title_align)) {
246
+ $row->image_browser_image_title_align = 'top';
247
+ }
248
+ if (!isset($row->thumb_gal_title_font_color)) {
249
+ $row->thumb_gal_title_font_color = 'CCCCCC';
250
+ }
251
+ if (!isset($row->thumb_gal_title_font_style)) {
252
+ $row->thumb_gal_title_font_style = 'segoe ui';
253
+ }
254
+ if (!isset($row->thumb_gal_title_font_size)) {
255
+ $row->thumb_gal_title_font_size = 16;
256
+ }
257
+ if (!isset($row->thumb_gal_title_font_weight)) {
258
+ $row->thumb_gal_title_font_weight = 'bold';
259
+ }
260
+ if (!isset($row->thumb_gal_title_margin)) {
261
+ $row->thumb_gal_title_margin = '2px';
262
+ }
263
+ if (!isset($row->thumb_gal_title_shadow)) {
264
+ $row->thumb_gal_title_shadow = '0px 0px 0px #888888';
265
+ }
266
+ if (!isset($row->thumb_gal_title_align)) {
267
+ $row->thumb_gal_title_align = 'center';
268
+ }
269
+ if (!isset($row->album_compact_gal_title_font_color)) {
270
+ $row->album_compact_gal_title_font_color = 'CCCCCC';
271
+ }
272
+ if (!isset($row->album_compact_gal_title_font_style)) {
273
+ $row->album_compact_gal_title_font_style = 'segoe ui';
274
+ }
275
+ if (!isset($row->album_compact_gal_title_font_size)) {
276
+ $row->album_compact_gal_title_font_size = 16;
277
+ }
278
+ if (!isset($row->album_compact_gal_title_font_weight)) {
279
+ $row->album_compact_gal_title_font_weight = 'bold';
280
+ }
281
+ if (!isset($row->album_compact_gal_title_margin)) {
282
+ $row->album_compact_gal_title_margin = '2px';
283
+ }
284
+ if (!isset($row->album_compact_gal_title_shadow)) {
285
+ $row->album_compact_gal_title_shadow = '0px 0px 0px #888888';
286
+ }
287
+ if (!isset($row->album_compact_gal_title_align)) {
288
+ $row->album_compact_gal_title_align = 'center';
289
+ }
290
+ if (!isset($row->album_extended_gal_title_font_color)) {
291
+ $row->album_extended_gal_title_font_color = 'CCCCCC';
292
+ }
293
+ if (!isset($row->album_extended_gal_title_font_style)) {
294
+ $row->album_extended_gal_title_font_style = 'segoe ui';
295
+ }
296
+ if (!isset($row->album_extended_gal_title_font_size)) {
297
+ $row->album_extended_gal_title_font_size = 16;
298
+ }
299
+ if (!isset($row->album_extended_gal_title_font_weight)) {
300
+ $row->album_extended_gal_title_font_weight = 'bold';
301
+ }
302
+ if (!isset($row->album_extended_gal_title_margin)) {
303
+ $row->album_extended_gal_title_margin = '2px';
304
+ }
305
+ if (!isset($row->album_extended_gal_title_shadow)) {
306
+ $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
307
+ }
308
+ if (!isset($row->album_extended_gal_title_align)) {
309
+ $row->album_extended_gal_title_align = 'center';
310
+ }
311
+ if (!isset($row->masonry_thumb_gal_title_font_color)) {
312
+ $row->masonry_thumb_gal_title_font_color = 'CCCCCC';
313
+ }
314
+ if (!isset($row->masonry_thumb_gal_title_font_style)) {
315
+ $row->masonry_thumb_gal_title_font_style = 'segoe ui';
316
+ }
317
+ if (!isset($row->masonry_thumb_gal_title_font_size)) {
318
+ $row->masonry_thumb_gal_title_font_size = 16;
319
+ }
320
+ if (!isset($row->masonry_thumb_gal_title_font_weight)) {
321
+ $row->masonry_thumb_gal_title_font_weight = 'bold';
322
+ }
323
+ if (!isset($row->masonry_thumb_gal_title_margin)) {
324
+ $row->masonry_thumb_gal_title_margin = '2px';
325
+ }
326
+ if (!isset($row->masonry_thumb_gal_title_shadow)) {
327
+ $row->masonry_thumb_gal_title_shadow = '0px 0px 0px #888888';
328
+ }
329
+ if (!isset($row->masonry_thumb_gal_title_align)) {
330
+ $row->masonry_thumb_gal_title_align = 'center';
331
+ }
332
+ if (!isset($row->album_masonry_gal_title_font_color)) {
333
+ $row->album_masonry_gal_title_font_color = 'CCCCCC';
334
+ }
335
+ if (!isset($row->album_masonry_gal_title_font_style)) {
336
+ $row->album_masonry_gal_title_font_style = 'segoe ui';
337
+ }
338
+ if (!isset($row->album_masonry_gal_title_font_size)) {
339
+ $row->album_masonry_gal_title_font_size = 16;
340
+ }
341
+ if (!isset($row->album_masonry_gal_title_font_weight)) {
342
+ $row->album_masonry_gal_title_font_weight = 'bold';
343
+ }
344
+ if (!isset($row->album_masonry_gal_title_margin)) {
345
+ $row->album_masonry_gal_title_margin = '2px';
346
+ }
347
+ if (!isset($row->album_masonry_gal_title_shadow)) {
348
+ $row->album_masonry_gal_title_shadow = '0px 0px 0px #888888';
349
+ }
350
+ if (!isset($row->album_masonry_gal_title_align)) {
351
+ $row->album_masonry_gal_title_align = 'center';
352
+ }
353
+ if (!isset($row->mosaic_thumb_gal_title_font_color)) {
354
+ $row->mosaic_thumb_gal_title_font_color = 'CCCCCC';
355
+ }
356
+ if (!isset($row->mosaic_thumb_gal_title_font_style)) {
357
+ $row->mosaic_thumb_gal_title_font_style = 'segoe ui';
358
+ }
359
+ if (!isset($row->mosaic_thumb_gal_title_font_size)) {
360
+ $row->mosaic_thumb_gal_title_font_size = 16;
361
+ }
362
+ if (!isset($row->mosaic_thumb_gal_title_font_weight)) {
363
+ $row->mosaic_thumb_gal_title_font_weight = 'bold';
364
+ }
365
+ if (!isset($row->mosaic_thumb_gal_title_margin)) {
366
+ $row->mosaic_thumb_gal_title_margin = '2px';
367
+ }
368
+ if (!isset($row->mosaic_thumb_gal_title_shadow)) {
369
+ $row->mosaic_thumb_gal_title_shadow = '0px 0px 0px #888888';
370
+ }
371
+ if (!isset($row->mosaic_thumb_gal_title_align)) {
372
+ $row->mosaic_thumb_gal_title_align = 'center';
373
+ }
374
+ if (!isset($row->image_browser_gal_title_font_color)) {
375
+ $row->image_browser_gal_title_font_color = 'CCCCCC';
376
+ }
377
+ if (!isset($row->image_browser_gal_title_font_style)) {
378
+ $row->image_browser_gal_title_font_style = 'segoe ui';
379
+ }
380
+ if (!isset($row->image_browser_gal_title_font_size)) {
381
+ $row->image_browser_gal_title_font_size = 16;
382
+ }
383
+ if (!isset($row->image_browser_gal_title_font_weight)) {
384
+ $row->image_browser_gal_title_font_weight = 'bold';
385
+ }
386
+ if (!isset($row->image_browser_gal_title_margin)) {
387
+ $row->image_browser_gal_title_margin = '2px';
388
+ }
389
+ if (!isset($row->image_browser_gal_title_shadow)) {
390
+ $row->image_browser_gal_title_shadow = '0px 0px 0px #888888';
391
+ }
392
+ if (!isset($row->image_browser_gal_title_align)) {
393
+ $row->image_browser_gal_title_align = 'center';
394
+ }
395
+
396
+ if (!isset($row->blog_style_gal_title_font_color)) {
397
+ $row->blog_style_gal_title_font_color = 'CCCCCC';
398
+ }
399
+ if (!isset($row->blog_style_gal_title_font_style)) {
400
+ $row->blog_style_gal_title_font_style = 'segoe ui';
401
+ }
402
+ if (!isset($row->blog_style_gal_title_font_size)) {
403
+ $row->blog_style_gal_title_font_size = 16;
404
+ }
405
+ if (!isset($row->blog_style_gal_title_font_weight)) {
406
+ $row->blog_style_gal_title_font_weight = 'bold';
407
+ }
408
+ if (!isset($row->blog_style_gal_title_margin)) {
409
+ $row->blog_style_gal_title_margin = '2px';
410
+ }
411
+ if (!isset($row->blog_style_gal_title_shadow)) {
412
+ $row->blog_style_gal_title_shadow = '0px 0px 0px #888888';
413
+ }
414
+ if (!isset($row->blog_style_gal_title_align)) {
415
+ $row->blog_style_gal_title_align = 'center';
416
+ }
417
+ }
418
+ else {
419
+ $theme_defaults = '{"thumb_margin":"2","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":0,"thumb_border_style":"none","thumb_border_color":"CCCCCC","thumb_bg_color":"FFFFFF","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"scale","thumb_hover_effect_value":"1.08","thumb_transition":1,"thumb_title_margin":"2px","thumb_title_font_style":"Ubuntu","thumb_title_pos":"bottom","thumb_title_font_color":"CCCCCC","thumb_title_shadow":"0px 0px 0px #888888","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"CCCCCC","thumb_gal_title_font_style":"segoe ui","thumb_gal_title_font_size":16,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"0px 0px 0px #888888","thumb_gal_title_align":"center","page_nav_position":"bottom","page_nav_align":"center","page_nav_number":0,"page_nav_font_size":12,"page_nav_font_style":"segoe ui","page_nav_font_color":"666666","page_nav_font_weight":"bold","page_nav_border_width":1,"page_nav_border_style":"solid","page_nav_border_color":"E3E3E3","page_nav_border_radius":"0","page_nav_margin":"0","page_nav_padding":"3px 6px","page_nav_button_bg_color":"FFFFFF","page_nav_button_bg_transparent":100,"page_nav_box_shadow":"0","page_nav_button_transition":1,"page_nav_button_text":0,"lightbox_ctrl_btn_pos":"bottom","lightbox_ctrl_btn_align":"center","lightbox_ctrl_btn_height":20,"lightbox_ctrl_btn_margin_top":10,"lightbox_ctrl_btn_margin_left":7,"lightbox_ctrl_btn_transparent":100,"lightbox_ctrl_btn_color":"808080","lightbox_toggle_btn_height":20,"lightbox_toggle_btn_width":100,"lightbox_ctrl_cont_bg_color":"FFFFFF","lightbox_ctrl_cont_border_radius":4,"lightbox_ctrl_cont_transparent":85,"lightbox_close_btn_bg_color":"FFFFFF","lightbox_close_btn_border_radius":"16px","lightbox_close_btn_border_width":2,"lightbox_close_btn_border_style":"none","lightbox_close_btn_border_color":"FFFFFF","lightbox_close_btn_box_shadow":"0","lightbox_close_btn_color":"808080","lightbox_close_btn_size":20,"lightbox_close_btn_width":30,"lightbox_close_btn_height":30,"lightbox_close_btn_top":"-20","lightbox_close_btn_right":"-15","lightbox_close_btn_full_color":"000000","lightbox_close_btn_transparent":60,"lightbox_rl_btn_bg_color":"FFFFFF","lightbox_rl_btn_transparent":"60","lightbox_rl_btn_border_radius":"20px","lightbox_rl_btn_border_width":0,"lightbox_rl_btn_border_style":"none","lightbox_rl_btn_border_color":"FFFFFF","lightbox_rl_btn_box_shadow":"","lightbox_rl_btn_color":"ADADAD","lightbox_rl_btn_height":35,"lightbox_rl_btn_width":35,"lightbox_rl_btn_size":25,"lightbox_close_rl_btn_hover_color":"808080","lightbox_comment_pos":"left","lightbox_comment_width":350,"lightbox_comment_bg_color":"FFFFFF","lightbox_comment_font_color":"7A7A7A","lightbox_comment_font_style":"Ubuntu","lightbox_comment_font_size":12,"lightbox_comment_button_bg_color":"2F2F2F","lightbox_comment_button_border_color":"666666","lightbox_comment_button_border_width":1,"lightbox_comment_button_border_style":"none","lightbox_comment_button_border_radius":"7px","lightbox_comment_button_padding":"10px 10px","lightbox_comment_input_bg_color":"F7F8F9","lightbox_comment_input_border_color":"EBEBEB","lightbox_comment_input_border_width":2,"lightbox_comment_input_border_style":"none","lightbox_comment_input_border_radius":"7px","lightbox_comment_input_padding":"5px","lightbox_comment_separator_width":20,"lightbox_comment_separator_style":"none","lightbox_comment_separator_color":"383838","lightbox_comment_author_font_size":14,"lightbox_comment_date_font_size":10,"lightbox_comment_body_font_size":12,"lightbox_comment_share_button_color":"808080","lightbox_filmstrip_rl_bg_color":"EBEBEB","lightbox_filmstrip_rl_btn_size":20,"lightbox_filmstrip_rl_btn_color":"808080","lightbox_filmstrip_thumb_margin":"0 1px","lightbox_filmstrip_thumb_border_width":1,"lightbox_filmstrip_thumb_border_style":"none","lightbox_filmstrip_thumb_border_color":"000000","lightbox_filmstrip_thumb_border_radius":"0","lightbox_filmstrip_thumb_deactive_transparent":80,"lightbox_filmstrip_pos":"bottom","lightbox_filmstrip_thumb_active_border_width":0,"lightbox_filmstrip_thumb_active_border_color":"FFFFFF","lightbox_overlay_bg_transparent":60,"lightbox_bg_color":"FFFFFF","lightbox_overlay_bg_color":"EEEEEE","lightbox_rl_btn_style":"fa-angle","lightbox_bg_transparent":100,"blog_style_margin":"2px","blog_style_padding":"0","blog_style_border_radius":"0","blog_style_border_width":1,"blog_style_border_style":"solid","blog_style_border_color":"F5F5F5","blog_style_bg_color":"FFFFFF","blog_style_transparent":80,"blog_style_box_shadow":"","blog_style_align":"center","blog_style_share_buttons_margin":"5px auto 10px auto","blog_style_share_buttons_border_radius":"0","blog_style_share_buttons_border_width":0,"blog_style_share_buttons_border_style":"none","blog_style_share_buttons_border_color":"000000","blog_style_share_buttons_bg_color":"FFFFFF","blog_style_share_buttons_align":"right","blog_style_img_font_size":16,"blog_style_img_font_family":"segoe ui","blog_style_img_font_color":"000000","blog_style_share_buttons_font_size":20,"blog_style_share_buttons_color":"B3AFAF","blog_style_share_buttons_bg_transparent":0,"blog_style_gal_title_font_color":"CCCCCC","blog_style_gal_title_font_style":"segoe ui","blog_style_gal_title_font_size":16,"blog_style_gal_title_font_weight":"bold","blog_style_gal_title_margin":"2px","blog_style_gal_title_shadow":"0px 0px 0px #888888","blog_style_gal_title_align":"center","image_browser_margin":"2px auto","image_browser_padding":"4px","image_browser_border_radius":"0","image_browser_border_width":1,"image_browser_border_style":"none","image_browser_border_color":"F5F5F5","image_browser_bg_color":"EBEBEB","image_browser_box_shadow":"","image_browser_transparent":80,"image_browser_align":"center","image_browser_image_description_margin":"0px 5px 0px 5px","image_browser_image_description_padding":"8px 8px 8px 8px","image_browser_image_description_border_radius":"0","image_browser_image_description_border_width":1,"image_browser_image_description_border_style":"none","image_browser_image_description_border_color":"FFFFFF","image_browser_image_description_bg_color":"EBEBEB","image_browser_image_description_align":"center","image_browser_img_font_size":15,"image_browser_img_font_family":"Ubuntu","image_browser_img_font_color":"000000","image_browser_full_padding":"4px","image_browser_full_border_radius":"0","image_browser_full_border_width":2,"image_browser_full_border_style":"none","image_browser_full_border_color":"F7F7F7","image_browser_full_bg_color":"F5F5F5","image_browser_full_transparent":90,"image_browser_image_title_align":"top","image_browser_gal_title_font_color":"CCCCCC","image_browser_gal_title_font_style":"segoe ui","image_browser_gal_title_font_size":16,"image_browser_gal_title_font_weight":"bold","image_browser_gal_title_margin":"2px","image_browser_gal_title_shadow":"0px 0px 0px #888888","image_browser_gal_title_align":"center","album_compact_title_margin":"2px","album_compact_thumb_margin":2,"album_compact_back_padding":"0","album_compact_thumb_padding":0,"album_compact_thumb_border_radius":"0","album_compact_thumb_border_width":0,"album_compact_title_font_style":"segoe ui","album_compact_back_font_color":"000000","album_compact_title_font_color":"FFFFFF","album_compact_title_shadow":"0px 0px 0px #888888","album_compact_thumb_bg_transparent":0,"album_compact_thumb_box_shadow":"0px 0px 0px #888888","album_compact_thumb_transition":1,"album_compact_thumb_border_style":"none","album_compact_thumb_border_color":"CCCCCC","album_compact_thumb_bg_color":"FFFFFF","album_compact_back_font_weight":"bold","album_compact_back_font_size":16,"album_compact_back_font_style":"segoe ui","album_compact_thumb_title_pos":"bottom","album_compact_thumbs_bg_color":"FFFFFF","album_compact_title_font_size":16,"album_compact_title_font_weight":"bold","album_compact_thumb_align":"center","album_compact_thumb_hover_effect":"scale","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"1.08","album_compact_gal_title_font_color":"CCCCCC","album_compact_gal_title_font_style":"segoe ui","album_compact_gal_title_font_size":16,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"2px","album_compact_gal_title_shadow":"0px 0px 0px #888888","album_compact_gal_title_align":"center","album_extended_thumb_margin":2,"album_extended_thumb_padding":0,"album_extended_thumb_border_radius":"0","album_extended_thumb_border_width":0,"album_extended_thumb_border_style":"none","album_extended_thumb_border_color":"CCCCCC","album_extended_thumb_bg_color":"FFFFFF","album_extended_thumbs_bg_color":"FFFFFF","album_extended_thumb_bg_transparent":0,"album_extended_thumb_box_shadow":"","album_extended_thumb_transparent":100,"album_extended_thumb_align":"left","album_extended_thumb_hover_effect":"scale","album_extended_thumb_hover_effect_value":"1.08","album_extended_thumb_transition":1,"album_extended_back_font_color":"000000","album_extended_back_font_style":"segoe ui","album_extended_back_font_size":20,"album_extended_back_font_weight":"bold","album_extended_back_padding":"0","album_extended_div_bg_color":"FFFFFF","album_extended_div_bg_transparent":0,"album_extended_div_border_radius":"0 0 0 0","album_extended_div_margin":"0 0 5px 0","album_extended_div_padding":10,"album_extended_div_separator_width":1,"album_extended_div_separator_style":"solid","album_extended_div_separator_color":"E0E0E0","album_extended_thumb_div_bg_color":"FFFFFF","album_extended_thumb_div_border_radius":"0","album_extended_thumb_div_border_width":1,"album_extended_thumb_div_border_style":"solid","album_extended_thumb_div_border_color":"E8E8E8","album_extended_thumb_div_padding":"5px","album_extended_text_div_bg_color":"FFFFFF","album_extended_text_div_border_radius":"0","album_extended_text_div_border_width":1,"album_extended_text_div_border_style":"solid","album_extended_text_div_border_color":"E8E8E8","album_extended_text_div_padding":"5px","album_extended_title_span_border_width":1,"album_extended_title_span_border_style":"none","album_extended_title_span_border_color":"CCCCCC","album_extended_title_font_color":"000000","album_extended_title_font_style":"segoe ui","album_extended_title_font_size":16,"album_extended_title_font_weight":"bold","album_extended_title_margin_bottom":2,"album_extended_title_padding":"2px","album_extended_desc_span_border_width":1,"album_extended_desc_span_border_style":"none","album_extended_desc_span_border_color":"CCCCCC","album_extended_desc_font_color":"000000","album_extended_desc_font_style":"segoe ui","album_extended_desc_font_size":14,"album_extended_desc_font_weight":"normal","album_extended_desc_padding":"2px","album_extended_desc_more_color":"F2D22E","album_extended_desc_more_size":12,"album_extended_gal_title_font_color":"CCCCCC","album_extended_gal_title_font_style":"segoe ui","album_extended_gal_title_font_size":16,"album_extended_gal_title_font_weight":"bold","album_extended_gal_title_margin":"2px","album_extended_gal_title_shadow":"0px 0px 0px #888888","album_extended_gal_title_align":"center","slideshow_cont_bg_color":"F2F2F2","slideshow_close_btn_transparent":100,"slideshow_rl_btn_bg_color":"FFFFFF","slideshow_rl_btn_border_radius":"20px","slideshow_rl_btn_border_width":0,"slideshow_rl_btn_border_style":"none","slideshow_rl_btn_border_color":"FFFFFF","slideshow_rl_btn_box_shadow":"0px 0px 0px #000000","slideshow_rl_btn_color":"D6D6D6","slideshow_rl_btn_height":37,"slideshow_rl_btn_size":12,"slideshow_rl_btn_width":37,"slideshow_close_rl_btn_hover_color":"BABABA","slideshow_filmstrip_pos":"bottom","slideshow_filmstrip_thumb_border_width":0,"slideshow_filmstrip_thumb_border_style":"none","slideshow_filmstrip_thumb_border_color":"000000","slideshow_filmstrip_thumb_border_radius":"0","slideshow_filmstrip_thumb_margin":"0px 2px 0 0 ","slideshow_filmstrip_thumb_active_border_width":0,"slideshow_filmstrip_thumb_active_border_color":"FFFFFF","slideshow_filmstrip_thumb_deactive_transparent":100,"slideshow_filmstrip_rl_bg_color":"F2F2F2","slideshow_filmstrip_rl_btn_color":"BABABA","slideshow_filmstrip_rl_btn_size":20,"slideshow_title_font_size":16,"slideshow_title_font":"segoe ui","slideshow_title_color":"FFFFFF","slideshow_title_opacity":70,"slideshow_title_border_radius":"5px","slideshow_title_background_color":"000000","slideshow_title_padding":"0 0 0 0","slideshow_description_font_size":14,"slideshow_description_font":"segoe ui","slideshow_description_color":"FFFFFF","slideshow_description_opacity":70,"slideshow_description_border_radius":"0","slideshow_description_background_color":"000000","slideshow_description_padding":"5px 10px 5px 10px","slideshow_dots_width":12,"slideshow_dots_height":12,"slideshow_dots_border_radius":"5px","slideshow_dots_background_color":"F2D22E","slideshow_dots_margin":3,"slideshow_dots_active_background_color":"FFFFFF","slideshow_dots_active_border_width":1,"slideshow_dots_active_border_color":"000000","slideshow_play_pause_btn_size":35,"slideshow_rl_btn_style":"fa-chevron","masonry_thumb_padding":"2","masonry_thumb_border_radius":"0","masonry_thumb_border_width":"0","masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_transparent":"0","masonry_thumb_transparent":"100","masonry_thumb_align":"center","masonry_thumb_hover_effect":"scale","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":"1","masonry_thumb_gal_title_font_color":"CCCCCC","masonry_thumb_gal_title_font_style":"segoe ui","masonry_thumb_gal_title_font_size":16,"masonry_thumb_gal_title_font_weight":"bold","masonry_thumb_gal_title_margin":"2px","masonry_thumb_gal_title_shadow":"0px 0px 0px #888888","masonry_thumb_gal_title_align":"center","mosaic_thumb_padding":"2","mosaic_thumb_border_radius":"0","mosaic_thumb_border_width":"0","mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":"0","mosaic_thumb_transparent":"100","mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"scale","mosaic_thumb_hover_effect_value":"1.08","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_font_style":"segoe ui","mosaic_thumb_title_font_color":"CCCCCC","mosaic_thumb_title_shadow":"0px 0px 0px #888888","mosaic_thumb_title_font_size":16,"mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_color":"CCCCCC","mosaic_thumb_gal_title_font_style":"segoe ui","mosaic_thumb_gal_title_font_size":16,"mosaic_thumb_gal_title_font_weight":"bold","mosaic_thumb_gal_title_margin":"2px","mosaic_thumb_gal_title_shadow":"0px 0px 0px #888888","mosaic_thumb_gal_title_align":"center","lightbox_info_pos":"bottom","lightbox_info_align":"left","lightbox_info_bg_color":"FFFFFF","lightbox_info_bg_transparent":"70","lightbox_info_border_width":"1","lightbox_info_border_style":"none","lightbox_info_border_color":"000000","lightbox_info_border_radius":"0px","lightbox_info_padding":"10px 7px 44px 10px","lightbox_info_margin":"10px 10px -5px 10px","lightbox_title_color":"808080","lightbox_title_font_style":"Ubuntu","lightbox_title_font_weight":"bold","lightbox_title_font_size":"16","lightbox_description_color":"B0B0B0","lightbox_description_font_style":"Ubuntu","lightbox_description_font_weight":"bold","lightbox_description_font_size":"13","lightbox_rate_pos":"top","lightbox_rate_align":"left","lightbox_rate_icon":"star","lightbox_rate_color":"F9D062","lightbox_rate_size":"20","lightbox_rate_stars_count":"5","lightbox_rate_padding":"15px","lightbox_rate_hover_color":"F7B50E","lightbox_hit_pos":"bottom","lightbox_hit_align":"left","lightbox_hit_bg_color":"000000","lightbox_hit_bg_transparent":"70","lightbox_hit_border_width":"1","lightbox_hit_border_style":"none","lightbox_hit_border_color":"000000","lightbox_hit_border_radius":"5px","lightbox_hit_padding":"5px","lightbox_hit_margin":"0 5px","lightbox_hit_color":"FFFFFF","lightbox_hit_font_style":"segoe ui","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":"14","masonry_description_font_size":12,"masonry_description_color":"CCCCCC","masonry_description_font_style":"segoe ui","album_masonry_back_font_color":"000000","album_masonry_back_font_style":"segoe ui","album_masonry_back_font_size":16,"album_masonry_back_font_weight":"bold","album_masonry_back_padding":"0","album_masonry_title_font_color":"CCCCCC","album_masonry_title_font_style":"segoe ui","album_masonry_thumb_title_pos":"bottom","album_masonry_title_font_size":16,"album_masonry_title_font_weight":"bold","album_masonry_title_margin":"","album_masonry_title_shadow":"0px 0px 0px #888888","album_masonry_thumb_margin":0,"album_masonry_thumb_padding":0,"album_masonry_thumb_border_radius":"0","album_masonry_thumb_border_width":0,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"CCCCCC","album_masonry_thumb_bg_color":"FFFFFF","album_masonry_thumbs_bg_color":"FFFFFF","album_masonry_thumb_bg_transparent":0,"album_masonry_thumb_box_shadow":"","album_masonry_thumb_transparent":100,"album_masonry_thumb_align":"center","album_masonry_thumb_hover_effect":"scale","album_masonry_thumb_hover_effect_value":"1.08","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"CCCCCC","album_masonry_gal_title_font_style":"segoe ui","album_masonry_gal_title_font_size":16,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"2px","album_masonry_gal_title_shadow":"0px 0px 0px #888888","album_masonry_gal_title_align":"center","carousel_cont_bg_color":"000000","carousel_cont_btn_transparent":0,"carousel_close_btn_transparent":50,"carousel_rl_btn_bg_color":"FFFFFF","carousel_rl_btn_border_radius":"20px","carousel_rl_btn_border_width":0,"carousel_rl_btn_border_style":"none","carousel_rl_btn_border_color":"FFFFFF","carousel_rl_btn_color":"303030","carousel_rl_btn_height":35,"carousel_rl_btn_size":15,"carousel_play_pause_btn_size":25,"carousel_rl_btn_width":35,"carousel_close_rl_btn_hover_color":"191919","carousel_rl_btn_style":"fa-chevron","carousel_mergin_bottom":"0.5","carousel_font_family":"arial","carousel_feature_border_width":2,"carousel_feature_border_style":"none","carousel_feature_border_color":"5D204F","carousel_caption_background_color":"000000","carousel_caption_bottom":0,"carousel_caption_p_mergin":0,"carousel_caption_p_pedding":5,"carousel_caption_p_font_weight":"bold","carousel_caption_p_font_size":14,"carousel_caption_p_color":"FFFFFF","carousel_title_opacity":100,"carousel_title_border_radius":"5px","mosaic_thumb_transition":"1"}';
420
+ $theme_defaults = json_decode($theme_defaults);
421
+ foreach ($theme_defaults as $key => $value) {
422
+ $row->$key = $value;
423
+ }
424
+ }
425
+ }
426
+ }
427
+ else {
428
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
429
+ $row->id = 0;
430
+ $row->name = '';
431
+ $themes = json_decode($row->options);
432
+ foreach ($themes as $key => $value) {
433
+ $row->$key = $value;
434
+ }
435
+ $row->default_theme = 0;
436
+ $themes = json_decode($row->options);
437
+ foreach ($themes as $key => $value) {
438
+ $row->$key = $value;
439
+ }
440
+ if (!isset($row->lightbox_bg_transparent)) {
441
+ $row->lightbox_bg_transparent = 100;
442
+ }
443
+ if (!isset($row->image_browser_image_title_align)) {
444
+ $row->image_browser_image_title_align = 'top';
445
+ }
446
+ if (!isset($row->thumb_gal_title_font_color)) {
447
+ $row->thumb_gal_title_font_color = 'CCCCCC';
448
+ }
449
+ if (!isset($row->thumb_gal_title_font_style)) {
450
+ $row->thumb_gal_title_font_style = 'segoe ui';
451
+ }
452
+ if (!isset($row->thumb_gal_title_font_size)) {
453
+ $row->thumb_gal_title_font_size = 16;
454
+ }
455
+ if (!isset($row->thumb_gal_title_font_weight)) {
456
+ $row->thumb_gal_title_font_weight = 'bold';
457
+ }
458
+ if (!isset($row->thumb_gal_title_margin)) {
459
+ $row->thumb_gal_title_margin = '2px';
460
+ }
461
+ if (!isset($row->thumb_gal_title_shadow)) {
462
+ $row->thumb_gal_title_shadow = '0px 0px 0px #888888';
463
+ }
464
+ if (!isset($row->thumb_gal_title_align)) {
465
+ $row->thumb_gal_title_align = 'center';
466
+ }
467
+ if (!isset($row->album_compact_gal_title_font_color)) {
468
+ $row->album_compact_gal_title_font_color = 'CCCCCC';
469
+ }
470
+ if (!isset($row->album_compact_gal_title_font_style)) {
471
+ $row->album_compact_gal_title_font_style = 'segoe ui';
472
+ }
473
+ if (!isset($row->album_compact_gal_title_font_size)) {
474
+ $row->album_compact_gal_title_font_size = 16;
475
+ }
476
+ if (!isset($row->album_compact_gal_title_font_weight)) {
477
+ $row->album_compact_gal_title_font_weight = 'bold';
478
+ }
479
+ if (!isset($row->album_compact_gal_title_margin)) {
480
+ $row->album_compact_gal_title_margin = '2px';
481
+ }
482
+ if (!isset($row->album_compact_gal_title_shadow)) {
483
+ $row->album_compact_gal_title_shadow = '0px 0px 0px #888888';
484
+ }
485
+ if (!isset($row->album_compact_gal_title_align)) {
486
+ $row->album_compact_gal_title_align = 'center';
487
+ }
488
+ if (!isset($row->album_extended_gal_title_font_color)) {
489
+ $row->album_extended_gal_title_font_color = 'CCCCCC';
490
+ }
491
+ if (!isset($row->album_extended_gal_title_font_style)) {
492
+ $row->album_extended_gal_title_font_style = 'segoe ui';
493
+ }
494
+ if (!isset($row->album_extended_gal_title_font_size)) {
495
+ $row->album_extended_gal_title_font_size = 16;
496
+ }
497
+ if (!isset($row->album_extended_gal_title_font_weight)) {
498
+ $row->album_extended_gal_title_font_weight = 'bold';
499
+ }
500
+ if (!isset($row->album_extended_gal_title_margin)) {
501
+ $row->album_extended_gal_title_margin = '2px';
502
+ }
503
+ if (!isset($row->album_extended_gal_title_shadow)) {
504
+ $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
505
+ }
506
+ if (!isset($row->album_extended_gal_title_align)) {
507
+ $row->album_extended_gal_title_align = 'center';
508
+ }
509
+ if (!isset($row->masonry_thumb_gal_title_font_color)) {
510
+ $row->masonry_thumb_gal_title_font_color = 'CCCCCC';
511
+ }
512
+ if (!isset($row->masonry_thumb_gal_title_font_style)) {
513
+ $row->masonry_thumb_gal_title_font_style = 'segoe ui';
514
+ }
515
+ if (!isset($row->masonry_thumb_gal_title_font_size)) {
516
+ $row->masonry_thumb_gal_title_font_size = 16;
517
+ }
518
+ if (!isset($row->masonry_thumb_gal_title_font_weight)) {
519
+ $row->masonry_thumb_gal_title_font_weight = 'bold';
520
+ }
521
+ if (!isset($row->masonry_thumb_gal_title_margin)) {
522
+ $row->masonry_thumb_gal_title_margin = '2px';
523
+ }
524
+ if (!isset($row->masonry_thumb_gal_title_shadow)) {
525
+ $row->masonry_thumb_gal_title_shadow = '0px 0px 0px #888888';
526
+ }
527
+ if (!isset($row->masonry_thumb_gal_title_align)) {
528
+ $row->masonry_thumb_gal_title_align = 'center';
529
+ }
530
+ if (!isset($row->album_masonry_gal_title_font_color)) {
531
+ $row->album_masonry_gal_title_font_color = 'CCCCCC';
532
+ }
533
+ if (!isset($row->album_masonry_gal_title_font_style)) {
534
+ $row->album_masonry_gal_title_font_style = 'segoe ui';
535
+ }
536
+ if (!isset($row->album_masonry_gal_title_font_size)) {
537
+ $row->album_masonry_gal_title_font_size = 16;
538
+ }
539
+ if (!isset($row->album_masonry_gal_title_font_weight)) {
540
+ $row->album_masonry_gal_title_font_weight = 'bold';
541
+ }
542
+ if (!isset($row->album_masonry_gal_title_margin)) {
543
+ $row->album_masonry_gal_title_margin = '2px';
544
+ }
545
+ if (!isset($row->album_masonry_gal_title_shadow)) {
546
+ $row->album_masonry_gal_title_shadow = '0px 0px 0px #888888';
547
+ }
548
+ if (!isset($row->album_masonry_gal_title_align)) {
549
+ $row->album_masonry_gal_title_align = 'center';
550
+ }
551
+ if (!isset($row->mosaic_thumb_gal_title_font_color)) {
552
+ $row->mosaic_thumb_gal_title_font_color = 'CCCCCC';
553
+ }
554
+ if (!isset($row->mosaic_thumb_gal_title_font_style)) {
555
+ $row->mosaic_thumb_gal_title_font_style = 'segoe ui';
556
+ }
557
+ if (!isset($row->mosaic_thumb_gal_title_font_size)) {
558
+ $row->mosaic_thumb_gal_title_font_size = 16;
559
+ }
560
+ if (!isset($row->mosaic_thumb_gal_title_font_weight)) {
561
+ $row->mosaic_thumb_gal_title_font_weight = 'bold';
562
+ }
563
+ if (!isset($row->mosaic_thumb_gal_title_margin)) {
564
+ $row->mosaic_thumb_gal_title_margin = '2px';
565
+ }
566
+ if (!isset($row->mosaic_thumb_gal_title_shadow)) {
567
+ $row->mosaic_thumb_gal_title_shadow = '0px 0px 0px #888888';
568
+ }
569
+ if (!isset($row->mosaic_thumb_gal_title_align)) {
570
+ $row->mosaic_thumb_gal_title_align = 'center';
571
+ }
572
+ if (!isset($row->image_browser_gal_title_font_color)) {
573
+ $row->image_browser_gal_title_font_color = 'CCCCCC';
574
+ }
575
+ if (!isset($row->image_browser_gal_title_font_style)) {
576
+ $row->image_browser_gal_title_font_style = 'segoe ui';
577
+ }
578
+ if (!isset($row->image_browser_gal_title_font_size)) {
579
+ $row->image_browser_gal_title_font_size = 16;
580
+ }
581
+ if (!isset($row->image_browser_gal_title_font_weight)) {
582
+ $row->image_browser_gal_title_font_weight = 'bold';
583
+ }
584
+ if (!isset($row->image_browser_gal_title_margin)) {
585
+ $row->image_browser_gal_title_margin = '2px';
586
+ }
587
+ if (!isset($row->image_browser_gal_title_shadow)) {
588
+ $row->image_browser_gal_title_shadow = '0px 0px 0px #888888';
589
+ }
590
+ if (!isset($row->image_browser_gal_title_align)) {
591
+ $row->image_browser_gal_title_align = 'center';
592
+ }
593
+ if (!isset($row->blog_style_gal_title_font_color)) {
594
+ $row->blog_style_gal_title_font_color = 'CCCCCC';
595
+ }
596
+ if (!isset($row->blog_style_gal_title_font_style)) {
597
+ $row->blog_style_gal_title_font_style = 'segoe ui';
598
+ }
599
+ if (!isset($row->blog_style_gal_title_font_size)) {
600
+ $row->blog_style_gal_title_font_size = 16;
601
+ }
602
+ if (!isset($row->blog_style_gal_title_font_weight)) {
603
+ $row->blog_style_gal_title_font_weight = 'bold';
604
+ }
605
+ if (!isset($row->blog_style_gal_title_margin)) {
606
+ $row->blog_style_gal_title_margin = '2px';
607
+ }
608
+ if (!isset($row->blog_style_gal_title_shadow)) {
609
+ $row->blog_style_gal_title_shadow = '0px 0px 0px #888888';
610
+ }
611
+ if (!isset($row->blog_style_gal_title_align)) {
612
+ $row->blog_style_gal_title_align = 'center';
613
+ }
614
+ }
615
+ return $row;
616
+ }
617
+
618
+ /**
619
+ * Return total count of themes.
620
+ *
621
+ * @param $params
622
+ *
623
+ * @return array|null|object|string
624
+ */
625
+ public function total($params) {
626
+ return $this->get_rows_data($params, TRUE);
627
+ }
628
+
629
+ /**
630
+ * Delete row(s) from db.
631
+ *
632
+ * @param array $params
633
+ * params = [selection, table, where, order_by, limit]
634
+ *
635
+ * @return array
636
+ */
637
+ public function delete_rows( $params ) {
638
+ global $wpdb;
639
+ $query = 'DELETE FROM ' . $wpdb->prefix . $params['table'];
640
+ if ( isset($params['where']) ) {
641
+ $where = $params['where'];
642
+ $query .= ' WHERE ' . $where;
643
+ }
644
+ if ( isset($params['order_by']) ) {
645
+ $query .= ' ' . $params['order_by'];
646
+ }
647
+ if ( isset($params['limit']) ) {
648
+ $query .= ' ' . $params['limit'];
649
+ }
650
+
651
+ return $wpdb->query($query);
652
+ }
653
+
654
+ /**
655
+ * Get row(s) from db.
656
+ *
657
+ * @param string $get_type
658
+ * @param array $params
659
+ * params = [selection, table, where, order_by, limit]
660
+ *
661
+ * @return array
662
+ */
663
+ public function select_rows( $get_type, $params ) {
664
+ global $wpdb;
665
+ $query = "SELECT " . $params['selection'] . " FROM " . $wpdb->prefix . $params['table'];
666
+ if ( isset($params['where']) ) {
667
+ $query .= " WHERE " . $params['where'];
668
+ }
669
+ if ( isset($params['order_by']) ) {
670
+ $query .= " " . $params['order_by'];
671
+ }
672
+ if ( isset($params['limit']) ) {
673
+ $query .= " " . $params['limit'];
674
+ }
675
+ if ( $get_type == "get_col" ) {
676
+ return $wpdb->get_col($query);
677
+ }
678
+ elseif ( $get_type == "get_var" ) {
679
+ return $wpdb->get_var($query);
680
+ }
681
+
682
+ return $wpdb->get_row($query);
683
+ }
684
+
685
+ /**
686
+ * Get request value.
687
+ *
688
+ * @param string $table
689
+ * @param array $data
690
+ *
691
+ * @return array
692
+ */
693
+ public function insert_data_to_db( $table, $data ) {
694
+ global $wpdb;
695
+ $query = $wpdb->insert($wpdb->prefix . $table, $data);
696
+ $wpdb->show_errors();
697
+
698
+ return $query;
699
+ }
700
+
701
+ /**
702
+ * Check if theme is default.
703
+ *
704
+ * @params int $id
705
+ *
706
+ * @return string
707
+ */
708
+ public function get_default( $id ) {
709
+ global $wpdb;
710
+
711
+ return $wpdb->get_var($wpdb->prepare('SELECT `default_theme` FROM `' . $wpdb->prefix . 'bwg_theme` WHERE id="%d"', $id));
712
+ }
713
+
714
+ /**
715
+ * Update DB.
716
+ *
717
+ * @params array $params
718
+ * @params array $where
719
+ *
720
+ * @return bool
721
+ */
722
+ public function update( $params, $where ) {
723
+ global $wpdb;
724
+
725
+ return $wpdb->update($wpdb->prefix . 'bwg_theme', $params, $where);
726
+ }
727
+ }
admin/models/Uninstall.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class UninstallModel_bwg
5
+ */
6
+ class UninstallModel_bwg {
7
+ /**
8
+ * Delete images folder.
9
+ */
10
+ public function delete_folder() {
11
+ if ( isset($_POST['bwg_delete_files']) ) {
12
+ function delfiles($del_file) {
13
+ if (is_dir($del_file)) {
14
+ $del_folder = scandir($del_file);
15
+ foreach ($del_folder as $file) {
16
+ if ($file != '.' and $file != '..') {
17
+ delfiles($del_file . '/' . $file);
18
+ }
19
+ }
20
+ rmdir($del_file);
21
+ }
22
+ else {
23
+ unlink($del_file);
24
+ }
25
+ }
26
+
27
+ if (BWG()->upload_dir) {
28
+ if (is_dir(ABSPATH . BWG()->upload_dir)) {
29
+ delfiles(ABSPATH . BWG()->upload_dir);
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Delete DB tables and other data.
37
+ */
38
+ public function delete_db_tables($params) {
39
+ global $wpdb;
40
+ // Delete terms.
41
+ $terms = get_terms('bwg_tag', array( 'orderby' => 'count', 'hide_empty' => 0 ));
42
+ foreach ( $terms as $term ) {
43
+ wp_delete_term($term->term_id, 'bwg_tag');
44
+ }
45
+ // Delete custom pages for galleries.
46
+ $posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => 'bwg_gallery' ));
47
+ foreach ( $posts as $post ) {
48
+ wp_delete_post($post->ID, TRUE);
49
+ }
50
+ // Delete custom pages for albums.
51
+ $posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => 'bwg_album' ));
52
+ foreach ( $posts as $post ) {
53
+ wp_delete_post($post->ID, TRUE);
54
+ }
55
+ // Delete custom pages for tags.
56
+ $posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => 'bwg_tag' ));
57
+ foreach ( $posts as $post ) {
58
+ wp_delete_post($post->ID, TRUE);
59
+ }
60
+ // Delete custom pages for share.
61
+ $posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => 'bwg_share' ));
62
+ foreach ( $posts as $post ) {
63
+ wp_delete_post($post->ID, TRUE);
64
+ }
65
+ foreach ( $params['tables'] as $table ) {
66
+ $wpdb->query("DROP TABLE IF EXISTS `" . $table . "`");
67
+ }
68
+ delete_option("wd_bwg_version");
69
+ delete_option("bwg_subscribe_done");
70
+ delete_option("wd_bwg_options");
71
+ delete_user_meta(get_current_user_id(), 'bwg_photo_gallery');
72
+ if ( isset($_COOKIE['bwg_image_asc_or_desc']) ) {
73
+ $_COOKIE['bwg_image_asc_or_desc'] = '';
74
+ }
75
+ if ( isset($_COOKIE['bwg_image_order_by']) ) {
76
+ $_COOKIE['bwg_image_order_by'] = '';
77
+ }
78
+ }
79
+ }
admin/models/Widget.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class WidgetModel_bwg
5
+ */
6
+ class WidgetModel_bwg {
7
+ /**
8
+ * @return array|null|object
9
+ */
10
+ public function get_gallery_rows_data() {
11
+ global $wpdb;
12
+ $query = 'SELECT * FROM ' . $wpdb->prefix . 'bwg_gallery WHERE `published`=1';
13
+ $rows = $wpdb->get_results($query);
14
+ return $rows;
15
+ }
16
+
17
+ /**
18
+ * @return array|null|object
19
+ */
20
+ public function get_album_rows_data() {
21
+ global $wpdb;
22
+ $query = 'SELECT * FROM ' . $wpdb->prefix . 'bwg_album WHERE `published`=1';
23
+ $rows = $wpdb->get_results($query);
24
+ return $rows;
25
+ }
26
+
27
+ /**
28
+ * @return array|null|object
29
+ */
30
+ public function get_theme_rows_data() {
31
+ global $wpdb;
32
+ $query = 'SELECT `id`,`name`,`default_theme` FROM `' . $wpdb->prefix . 'bwg_theme` ORDER BY `default_theme` DESC';
33
+ $rows = $wpdb->get_results($query);
34
+ return $rows;
35
+ }
36
+ }
admin/views/AddTags.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class AddTagsView_bwg extends AdminView_bwg {
3
+ public function __construct() {
4
+ // Register and include styles and scripts.
5
+ BWG()->register_admin_scripts();
6
+ wp_print_styles(BWG()->prefix . '_tables');
7
+ wp_print_scripts(BWG()->prefix . '_admin');
8
+ }
9
+
10
+ /**
11
+ * Display page.
12
+ *
13
+ * @param $params
14
+ */
15
+ public function display( $params ) {
16
+ ob_start();
17
+ $params['page_url'] = add_query_arg(array(
18
+ 'action' => 'addTags_' . BWG()->prefix,
19
+ 'width' => '785',
20
+ 'height' => '550',
21
+ 'TB_iframe' => '1',
22
+ ), admin_url('admin-ajax.php'));
23
+ echo $this->body($params);
24
+ // Pass the content to form.
25
+ $form_attr = array(
26
+ 'id' => BWG()->prefix . '_tags',
27
+ 'name' => BWG()->prefix . '_tags',
28
+ 'class' => BWG()->prefix . '_tags wd-form wp-core-ui media-frame',
29
+ 'action' => $params['page_url'],
30
+ );
31
+ echo $this->form(ob_get_clean(), $form_attr);
32
+
33
+ wp_print_scripts('common'); // Check all.
34
+
35
+ die();
36
+ }
37
+
38
+ /**
39
+ * Generate page body.
40
+ *
41
+ * @param $params
42
+ */
43
+ public function body( $params ) {
44
+ ?>
45
+ <div class="wd-table-container">
46
+ <?php
47
+ $image_id = WDWLibrary::get('image_id', 0);
48
+ echo $this->title( array(
49
+ 'title' => $params['page_title'],
50
+ 'title_class' => 'wd-header',
51
+ 'add_new_button' => FALSE,
52
+ )
53
+ );
54
+ ?>
55
+ <div class="wp-search-wrap">
56
+ <?php echo $this->search(); ?>
57
+ <div class="tablenav top">
58
+ <?php echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']); ?>
59
+ </div>
60
+ </div>
61
+ <div>
62
+ <table class="adminlist table table-striped wp-list-table widefat fixed pages">
63
+ <thead>
64
+ <td id="cb" class="column-cb check-column">
65
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', BWG()->prefix); ?></label>
66
+ <input id="check_all" type="checkbox" onclick="spider_check_all(this)" />
67
+ </td>
68
+ <?php echo WDWLibrary::ordering('name', $params['orderby'], $params['order'], __('Name', BWG()->prefix), $params['page_url'], 'column-primary'); ?>
69
+ </thead>
70
+ <tbody id="tbody_arr">
71
+ <?php
72
+ if ( $params['rows'] ) {
73
+ foreach ( $params['rows'] as $row ) {
74
+ $alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
75
+ ?>
76
+ <tr id="tr_<?php echo $row->id; ?>" <?php echo $alternate; ?>>
77
+ <th class="check-column">
78
+ <input class="tags"
79
+ type="checkbox"
80
+ id="check_<?php echo $row->id; ?>"
81
+ name="check[<?php echo $row->id; ?>]"
82
+ onclick="spider_check_all(this)"
83
+ data-id="<?php echo $row->id; ?>"
84
+ data-name="<?php echo $row->name; ?>" />
85
+ </th>
86
+ <td class="column-primary column-title" data-colname="<?php _e('Name', BWG()->prefix); ?>">
87
+ <a class="cursor-pointer" onclick="<?php echo $image_id ? 'window.parent.bwg_add_tag(\'' . $image_id . '\', [\'' . $row->id . '\'],[\'' . htmlspecialchars(addslashes($row->name)) . '\'])' : 'bwg_bulk_add_tags(\'' . $row->id . '\')'; ?>;" id="a_<?php echo $row->id; ?>">
88
+ <?php echo $row->name; ?>
89
+ </a>
90
+ </td>
91
+ </tr>
92
+ <?php
93
+ }
94
+ }
95
+ else {
96
+ echo WDWLibrary::no_items('tags', 2);
97
+ }
98
+ ?>
99
+ </tbody>
100
+ </table>
101
+ </div>
102
+ </div>
103
+ <input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
104
+ <div class="media-frame-toolbar">
105
+ <div class="media-toolbar">
106
+ <div class="media-toolbar-primary search-form">
107
+ <button class="button media-button button-primary button-large media-button-insert" type="button" onclick="<?php echo $image_id ? 'bwg_add_tags(\'' . $image_id . '\')' : 'bwg_bulk_add_tags()'; ?>"><?php _e('Add to image', BWG()->prefix); ?></button>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <script>
112
+ jQuery(window).load(function() {
113
+ jQuery("#loading_div", window.parent.document).hide();
114
+ });
115
+ </script>
116
+ <?php
117
+ }
118
+ }
admin/views/AdminView.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined('ABSPATH') || die('Access Denied');
3
+
4
+ /**
5
+ * Admin view class.
6
+ */
7
+ class AdminView_bwg {
8
+
9
+ public function __construct() {
10
+ wp_enqueue_style(BWG()->prefix . '_tables');
11
+ wp_enqueue_script(BWG()->prefix . '_admin');
12
+ }
13
+ /**
14
+ * Generate form.
15
+ *
16
+ * @param string $content
17
+ * @param array $attr
18
+ *
19
+ * @return string Form html.
20
+ */
21
+ protected function form($content = '', $attr = array()) {
22
+ ob_start();
23
+ // Form.
24
+ $action = isset($attr['action']) ? esc_attr($attr['action']) : '';
25
+ $method = isset($attr['method']) ? esc_attr($attr['method']) : 'post';
26
+ $name = isset($attr['name']) ? esc_attr($attr['name']) : BWG()->prefix . '_form';
27
+ $id = isset($attr['id']) ? esc_attr($attr['id']) : '';
28
+ $class = isset($attr['class']) ? esc_attr($attr['class']) : BWG()->prefix . '_form';
29
+ $style = isset($attr['style']) ? esc_attr($attr['style']) : '';
30
+ $current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
31
+ $task = isset($attr['task']) ? esc_attr($attr['task']) : '';
32
+ ?><div class="wrap<?php echo (isset($_GET['action']) ? ' wd-wrap-ajax' : ''); ?>">
33
+ <?php
34
+ // Generate message container by message id or directly by message.
35
+ $message_id = WDWLibrary::get('message', 0);
36
+ $message = WDWLibrary::get('msg', '');
37
+ echo WDWLibrary::message_id($message_id, $message);
38
+ ?>
39
+ <form
40
+ <?php echo $action ? 'action="' . $action . '"' : ''; ?>
41
+ <?php echo $method ? 'method="' . $method . '"' : ''; ?>
42
+ <?php echo $name ? ' name="' . $name . '"' : ''; ?>
43
+ <?php echo $id ? ' id="' . $id . '"' : ''; ?>
44
+ <?php echo $class ? ' class="' . $class . '"' : ''; ?>
45
+ <?php echo $style ? ' style="' . $style . '"' : ''; ?>
46
+ ><h1 class="hidden"></h1><?php
47
+ echo $content;
48
+ // Add nonce to form.
49
+ wp_nonce_field(BWG()->nonce, BWG()->nonce);
50
+ ?>
51
+ <input id="task" name="task" type="hidden" value="<?php echo $task; ?>"/>
52
+ <input id="current_id" name="current_id" type="hidden" value="<?php echo $current_id; ?>"/>
53
+ </form>
54
+ </div><?php
55
+ return ob_get_clean();
56
+ }
57
+
58
+ /**
59
+ * Generate title.
60
+ *
61
+ * @param array $params
62
+ *
63
+ * @return string Title html.
64
+ */
65
+ protected function title($params) {
66
+ $title = !empty($params['title']) ? $params['title'] : '';
67
+ $title_class = !empty($params['title_class']) ? $params['title_class'] : '';
68
+ $title_name = !empty($params['title_name']) ? $params['title_name'] : '';
69
+ $title_id = !empty($params['title_id']) ? $params['title_id'] : '';
70
+ $title_value = !empty($params['title_value']) ? $params['title_value'] : '';
71
+ $add_new_button = !empty($params['add_new_button']) ? $params['add_new_button'] : '';
72
+
73
+ $attributes = '';
74
+ if ( !empty($add_new_button) && is_array($add_new_button) ) {
75
+ foreach ( $add_new_button as $key => $val ) {
76
+ $attributes .= $key . '="' . $val . '"';
77
+ }
78
+ }
79
+
80
+ ob_start();
81
+ ?><div class="wd-page-title <?php echo $title_class; ?>">
82
+ <h1 class="wp-heading-inline"><?php echo $title; ?>
83
+ <?php
84
+ if ( $title_name || $title_id || $title_value ) {
85
+ ?>
86
+ <span id="fm-title-edit">
87
+ <input type="text" id="<?php echo $title_id; ?>" name="<?php echo $title_name; ?>" value="<?php echo $title_value; ?>" />
88
+ </span>
89
+ <?php
90
+ }
91
+ if ( $add_new_button ) {
92
+ ?>
93
+ <a class="page-title-action" <?php echo $attributes; ?>>
94
+ <?php _e('Add New', BWG()->prefix); ?>
95
+ </a>
96
+ <?php
97
+ }
98
+ ?>
99
+ </h1>
100
+ </div><?php
101
+ return ob_get_clean();
102
+ }
103
+
104
+ /**
105
+ * Generate buttons.
106
+ *
107
+ * @param array $buttons
108
+ * @param bool $single
109
+ * @param array $parent
110
+ *
111
+ * @return array Buttons html.
112
+ */
113
+ protected function buttons($buttons = array(), $single = FALSE, $parent = array()) {
114
+ ob_start();
115
+ if ( !$single ) {
116
+ $parent_id = isset($parent['id']) ? esc_attr($parent['id']) : '';
117
+ $parent_class = isset($parent['class']) ? esc_attr($parent['class']) : 'wd-buttons';
118
+ $parent_style = isset($parent['style']) ? esc_attr($parent['style']) : '';
119
+ ?>
120
+ <div
121
+ <?php echo $parent_id ? 'id="' . $parent_id . '"' : ''; ?>
122
+ <?php echo $parent_class ? ' class="' . $parent_class . '"' : ''; ?>
123
+ <?php echo $parent_style ? ' style="' . $parent_style . '"' : ''; ?>
124
+ >
125
+ <?php
126
+ }
127
+ foreach ($buttons as $button) {
128
+ $title = isset($button['title']) ? esc_attr($button['title']) : '';
129
+ $value = isset($button['value']) ? esc_attr($button['value']) : '';
130
+ $name = isset($button['name']) ? esc_attr($button['name']) : '';
131
+ $id = isset($button['id']) ? esc_attr($button['id']) : '';
132
+ $class = isset($button['class']) ? esc_attr($button['class']) : '';
133
+ $style = isset($button['style']) ? esc_attr($button['style']) : '';
134
+ $onclick = isset($button['onclick']) ? esc_attr($button['onclick']) : '';
135
+ ?><button type="submit"
136
+ <?php echo $value ? ' value="' . $value . '"' : ''; ?>
137
+ <?php echo $name ? ' name="' . $name . '"' : ''; ?>
138
+ <?php echo $id ? ' id="' . $id . '"' : ''; ?>
139
+ class="wd-button <?php echo $class; ?>"
140
+ <?php echo $style ? ' style="' . $style . '"' : ''; ?>
141
+ <?php echo $onclick ? ' onclick="' . $onclick . '"' : ''; ?>
142
+ ><?php echo $title; ?></button><?php
143
+ }
144
+ if ( !$single ) {
145
+ ?>
146
+ </div>
147
+ <?php
148
+ }
149
+ return ob_get_clean();
150
+ }
151
+
152
+ /**
153
+ * Search.
154
+ *
155
+ * @param array $params
156
+ * @return string
157
+ */
158
+ protected function search( $params = array() ) {
159
+ $search = WDWLibrary::get('s', '');
160
+ ob_start();
161
+ ?>
162
+ <p class="search-box">
163
+ <input name="s" value="<?php echo $search; ?>" type="search" onkeypress="return input_search(event, this)" />
164
+ <input class="button" value="<?php echo __('Search', BWG()->prefix) . ' ' . ( !empty( $params['search_item_name'] ) ? $params['search_item_name'] : '' ); ?>" type="button" onclick="search(this)" />
165
+ </p>
166
+ <?php
167
+ return ob_get_clean();
168
+ }
169
+
170
+ /**
171
+ * Pagination.
172
+ *
173
+ * @param $page_url
174
+ * @param $total
175
+ * @param int $items_per_page
176
+ *
177
+ * @return string
178
+ */
179
+ protected function pagination($page_url, $total, $items_per_page = 20) {
180
+ $page_number = WDWLibrary::get('paged', 1);
181
+ $search = WDWLibrary::get('s', '');
182
+ $orderby = WDWLibrary::get('orderby', '');
183
+ $order = WDWLibrary::get('order', '');
184
+ $url_arg = array();
185
+ if( !empty($search) ) {
186
+ $url_arg['s'] = $search;
187
+ }
188
+ if( !empty($orderby) ) {
189
+ $url_arg['orderby'] = $orderby;
190
+ }
191
+ if( !empty($order) ) {
192
+ $url_arg['order'] = $order;
193
+ }
194
+ $page_url = add_query_arg($url_arg, $page_url);
195
+
196
+ if ( $total ) {
197
+ if ( $total % $items_per_page ) {
198
+ $pages_count = ($total - $total % $items_per_page) / $items_per_page + 1;
199
+ }
200
+ else {
201
+ $pages_count = ($total - $total % $items_per_page) / $items_per_page;
202
+ }
203
+ }
204
+ else {
205
+ $pages_count = 1;
206
+ }
207
+ ob_start();
208
+ ?>
209
+ <div class="tablenav-pages">
210
+ <span class="displaying-num">
211
+ <?php printf(_n('%s item', '%s items', $total, BWG()->prefix), $total); ?>
212
+ </span>
213
+ <?php
214
+ if ( $total > $items_per_page ) {
215
+ ?>
216
+ <span class="pagination-links" data-pages-count="<?php echo $pages_count; ?>">
217
+ <?php
218
+ if ( $page_number == 1 ) {
219
+ ?>
220
+ <span class="tablenav-pages-navspan" aria-hidden="true">«</span>
221
+ <span class="tablenav-pages-navspan" aria-hidden="true">‹</span>
222
+ <?php
223
+ }
224
+ else {
225
+ ?>
226
+ <a data-paged="<?php echo 1; ?>" href="<?php echo add_query_arg(array('paged' => 1), $page_url); ?>" class="wd-page first-page"><span class="screen-reader-text"><?php _e('First page', BWG()->prefix); ?></span><span aria-hidden="true">«</span></a>
227
+ <a data-paged="<?php echo ($page_number == 1 ? 1 : ($page_number - 1)); ?>" href="<?php echo add_query_arg(array('paged' => ($page_number == 1 ? 1 : ($page_number - 1))), $page_url); ?>" class="wd-page previous-page"><span class="screen-reader-text"><?php _e('Previous page', BWG()->prefix); ?></span><span aria-hidden="true">‹</span></a>
228
+ <?php
229
+ }
230
+ ?>
231
+ <span class="paging-input">
232
+ <label for="current-page-selector" class="screen-reader-text"><?php _e('Current Page', BWG()->prefix); ?></label>
233
+ <input type="text" class="current-page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return input_pagination(event, this)" size="1" />
234
+ <span class="tablenav-paging-text">
235
+ <?php _e('of', BWG()->prefix); ?>
236
+ <span class="total-pages"><?php echo $pages_count; ?></span>
237
+ </span>
238
+ </span>
239
+ <?php
240
+ if ( $page_number >= $pages_count ) {
241
+ ?>
242
+ <span class="tablenav-pages-navspan" aria-hidden="true">›</span>
243
+ <span class="tablenav-pages-navspan" aria-hidden="true">»</span>
244
+ <?php
245
+ }
246
+ else {
247
+ ?>
248
+ <a data-paged="<?php echo ($page_number >= $pages_count ? $pages_count : ($page_number + 1)); ?>" href="<?php echo add_query_arg(array('paged' => ($page_number >= $pages_count ? $pages_count : ($page_number + 1))), $page_url); ?>" class="wd-page next-page"><span class="screen-reader-text"><?php _e('Next page', BWG()->prefix); ?></span><span aria-hidden="true">›</span></a>
249
+ <a data-paged="<?php echo $pages_count; ?>" href="<?php echo add_query_arg(array('paged' => $pages_count), $page_url); ?>" class="wd-page last-page"><span class="screen-reader-text"><?php _e('Last page', BWG()->prefix); ?></span><span aria-hidden="true">»</span></a>
250
+ <?php
251
+ }
252
+ ?>
253
+ </span>
254
+ <?php
255
+ }
256
+ ?>
257
+ </div>
258
+ <?php
259
+
260
+ return ob_get_clean();
261
+ }
262
+
263
+ /**
264
+ * Bulk actions list.
265
+ *
266
+ * @param $actions
267
+ * @param bool $select_all
268
+ * @param string $name
269
+ *
270
+ * @return string
271
+ */
272
+ protected function bulk_actions($actions, $select_all = FALSE, $name = "bulk_action") {
273
+ ob_start();
274
+ ?>
275
+ <div class="alignleft actions bulkactions">
276
+ <?php
277
+ if ( $select_all ) {
278
+ ?>
279
+ <span class="button wd-check-all" onclick="spider_check_all_items(event)">
280
+ <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox(event)" />
281
+ <span><?php _e('Select All', BWG()->prefix); ?></span>
282
+ </span>
283
+ <?php
284
+ }
285
+ ?>
286
+ <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e('Select bulk action', BWG()->prefix); ?></label>
287
+ <select name="<?php echo $name; ?>" id="bulk-action-selector-top">
288
+ <option value="-1"><?php _e('Bulk Actions', BWG()->prefix); ?></option>
289
+ <?php
290
+ foreach ( $actions as $key => $action ) {
291
+ ?>
292
+ <option value="<?php echo $key; ?>"><?php echo $action['title']; ?></option>
293
+ <?php
294
+ }
295
+ ?>
296
+ </select>
297
+ <input type="button" id="doaction" class="button action" onclick="wd_bulk_action(this)" value="<?php _e('Apply', BWG()->prefix); ?>" />
298
+ </div>
299
+ <?php
300
+
301
+ return ob_get_clean();
302
+ }
303
+
304
+ /**
305
+ * Filters.
306
+ *
307
+ * @param array $params
308
+ * @return string
309
+ */
310
+ protected function filters( $params = array() ) {
311
+ ob_start();
312
+ if ( !empty($params['filters']) ) {
313
+ $filters = $params['filters'];
314
+ ?>
315
+ <div class="alignleft actions">
316
+ <?php
317
+ foreach ( $filters as $filter_key => $filter_values ) {
318
+ $filter_by_key = 'filter-by-' . $filter_key;
319
+ $filter_by = WDWLibrary::get($filter_by_key, '');
320
+ ?>
321
+ <label for="filter-by-<?php echo $filter_key ?>" class="screen-reader-text"><?php echo $filter_values['label']; ?></label>
322
+ <select class="wd-filter" name="filter[filter-by-<?php echo $filter_key ?>]" id="filter-by-<?php echo $filter_key ?>">
323
+ <?php
324
+ foreach ( $filter_values['items'] as $item_key => $item_value ) {
325
+ $selected = ($filter_by == $item_key ? 'selected' : '');
326
+ ?>
327
+ <option <?php echo $selected; ?> value="<?php echo $item_key ?>"><?php echo $item_value ?></option>
328
+ <?php
329
+ }
330
+ ?>
331
+ </select>
332
+ <?php
333
+ }
334
+ ?>
335
+ </div>
336
+ <?php
337
+ }
338
+
339
+ return ob_get_clean();
340
+ }
341
+ }
admin/views/Albums.php ADDED
@@ -0,0 +1,377 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AlbumsView_bwg
5
+ */
6
+ class AlbumsView_bwg extends AdminView_bwg {
7
+ /**
8
+ * Display page.
9
+ *
10
+ * @param $params
11
+ */
12
+ public function display( $params ) {
13
+ ob_start();
14
+ echo $this->body($params);
15
+ // Pass the content to form.
16
+ $form_attr = array(
17
+ 'id' => BWG()->prefix . '_albums',
18
+ 'name' => BWG()->prefix . '_albums',
19
+ 'class' => BWG()->prefix . '_albums wd-form',
20
+ 'action' => add_query_arg(array( 'page' => 'albums_' . BWG()->prefix ), 'admin.php'),
21
+ );
22
+ echo $this->form(ob_get_clean(), $form_attr);
23
+ }
24
+
25
+ /**
26
+ * Generate page body.
27
+ *
28
+ * @param $params
29
+ */
30
+ public function body( $params ) {
31
+ echo $this->title( array(
32
+ 'title' => $params['page_title'],
33
+ 'title_class' => 'wd-header',
34
+ 'add_new_button' => array(
35
+ 'href' => add_query_arg(array( 'page' => $params['page'], 'task' => 'edit' ), admin_url('admin.php')),
36
+ )
37
+ )
38
+ );
39
+ echo $this->search();
40
+ ?>
41
+ <div class="tablenav top">
42
+ <?php
43
+ echo $this->bulk_actions($params['actions'], TRUE);
44
+ echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']);
45
+ ?>
46
+ </div>
47
+ <table class="adminlist table table-striped wp-list-table widefat fixed pages media">
48
+ <thead>
49
+ <td id="cb" class="column-cb check-column">
50
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', BWG()->prefix); ?></label>
51
+ <input id="check_all" type="checkbox" onclick="spider_check_all(this)" />
52
+ </td>
53
+ <?php echo WDWLibrary::ordering('name', $params['orderby'], $params['order'], __('Title', BWG()->prefix), $params['page_url'], 'column-primary'); ?>
54
+ <?php echo WDWLibrary::ordering('author', $params['orderby'], $params['order'], __('Author', BWG()->prefix), $params['page_url']); ?>
55
+ </thead>
56
+ <tbody>
57
+ <?php
58
+ if ( $params['rows'] ) {
59
+ foreach ( $params['rows'] as $row ) {
60
+ $user = get_userdata($row->author);
61
+ $alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
62
+ $edit_url = add_query_arg(array(
63
+ 'page' => $params['page'],
64
+ 'task' => 'edit',
65
+ 'current_id' => $row->id,
66
+ ), admin_url('admin.php'));
67
+ $publish_url = add_query_arg(array(
68
+ 'task' => ($row->published ? 'unpublish' : 'publish'),
69
+ 'current_id' => $row->id,
70
+ ), $params['page_url']);
71
+ $duplicate_url = add_query_arg(array( 'task' => 'duplicate', 'current_id' => $row->id ), $params['page_url']);
72
+ $delete_url = add_query_arg(array( 'task' => 'delete', 'current_id' => $row->id ), $params['page_url']);
73
+ $preview_url = WDWLibrary::get_custom_post_permalink( array('slug' => $row->slug, 'post_type' => 'album' ));
74
+ $preview_image = BWG()->plugin_url . '/images/no-image.png';
75
+ if ( !empty($row->preview_image) ) {
76
+ $preview_image = site_url() . '/' . BWG()->upload_dir . $row->preview_image;
77
+ }
78
+ if ( !empty($row->random_preview_image)) {
79
+ $preview_image = site_url() . '/' . BWG()->upload_dir . $row->random_preview_image;
80
+ if ( WDWLibrary::check_external_link($row->random_preview_image) ) {
81
+ $preview_image = $row->random_preview_image;
82
+ }
83
+ }
84
+ ?>
85
+ <tr id="tr_<?php echo $row->id; ?>" <?php echo $alternate; ?>>
86
+ <th class="check-column">
87
+ <input type="checkbox" id="check_<?php echo $row->id; ?>" name="check[<?php echo $row->id; ?>]" onclick="spider_check_all(this)" />
88
+ </th>
89
+ <td class="column-primary column-title" data-colname="<?php _e('Title', BWG()->prefix); ?>">
90
+ <strong class="has-media-icon">
91
+ <a href="<?php echo $edit_url; ?>">
92
+ <span class="media-icon image-icon">
93
+ <img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
94
+ </span>
95
+ <?php echo $row->name; ?>
96
+ </a>
97
+ <?php if ( !$row->published ) { ?>
98
+ — <span class="post-state"><?php _e('Unpublished', BWG()->prefix); ?></span>
99
+ <?php } ?>
100
+ </strong>
101
+ <div class="row-actions">
102
+ <span><a href="<?php echo $edit_url; ?>"><?php _e('Edit', BWG()->prefix); ?></a> |</span>
103
+ <span><a href="<?php echo $publish_url; ?>"><?php echo ($row->published ? __('Unpublish', BWG()->prefix) : __('Publish', BWG()->prefix)); ?></a> |</span>
104
+ <span><a href="<?php echo $duplicate_url; ?>"><?php _e('Duplicate', BWG()->prefix); ?></a> |</span>
105
+ <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>
106
+ <span><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e('Preview', BWG()->prefix); ?></a></span>
107
+ </div>
108
+ <button class="toggle-row" type="button">
109
+ <span class="screen-reader-text"><?php _e('Show more details', BWG()->prefix); ?></span>
110
+ </button>
111
+ </td>
112
+ <td data-colname="<?php _e('Author', BWG()->prefix); ?>"><?php echo ( $user ) ? $user->display_name : ''; ?></td>
113
+ </tr>
114
+ <?php
115
+ }
116
+ }
117
+ else {
118
+ echo WDWLibrary::no_items('gallery groups', 3);
119
+ }
120
+ ?>
121
+ </tbody>
122
+ </table>
123
+ <div class="tablenav bottom">
124
+ <?php echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']); ?>
125
+ </div>
126
+ <?php
127
+ }
128
+
129
+ /**
130
+ * Add/Edit.
131
+ *
132
+ * @param array $params .
133
+ *
134
+ * @return string html.
135
+ */
136
+ public function edit( $params ) {
137
+ wp_enqueue_script('jquery-ui-sortable');
138
+ wp_admin_css('thickbox');
139
+ wp_enqueue_media();
140
+ ob_start();
141
+ echo $this->edit_body($params);
142
+ // Pass the content to form.
143
+ $form_attr = array(
144
+ 'id' => BWG()->prefix . '_albums',
145
+ 'name' => BWG()->prefix . '_albums',
146
+ 'class' => BWG()->prefix . '_albums wd-form',
147
+ 'action' => $params['form_action'],
148
+ 'current_id' => $params['id'],
149
+ );
150
+ echo $this->form(ob_get_clean(), $form_attr);
151
+ }
152
+
153
+ /**
154
+ * Generate page edit body.
155
+ *
156
+ * @param $params
157
+ */
158
+ public function edit_body( $params ) {
159
+ wp_enqueue_style('thickbox');
160
+ wp_enqueue_script('thickbox');
161
+ $row = $params['row'];
162
+ $enable_wp_editor = isset(BWG()->options->enable_wp_editor) ? BWG()->options->enable_wp_editor : 1;
163
+ ?>
164
+ <div class="bwg-page-header">
165
+ <div class="wd-page-title wd-header">
166
+ <h1 class="wp-heading-inline"><?php _e('Gallery Group Title', BWG()->prefix); ?></h1>
167
+ <input type="text" id="name" name="name" value="<?php echo !empty($row->name) ? $row->name : ''; ?>">
168
+ <div class="bwg-page-actions">
169
+ <?php
170
+ if ( $params['shortcode_id'] ) {
171
+ ?>
172
+ <button class="button button-secondary button-large" onclick="how_to_use(); return false;">
173
+ <?php _e('How to use', BWG()->prefix); ?>
174
+ </button>
175
+ <?php
176
+ }
177
+ ?>
178
+ <button class="button button-primary button-large" onclick="if (spider_check_required('name', 'Title')) {return false;}; spider_set_input_value('task', 'save')">
179
+ <?php echo ($params['id']) ? __('Update', BWG()->prefix) : __('Publish', BWG()->prefix); ?>
180
+ </button>
181
+ <?php if ($params['id'] && $params['preview_action']) { ?>
182
+ <a class="button preview-button button-large" href="<?php echo $params['preview_action']; ?>" target="_blank"><?php _e('Preview', BWG()->prefix); ?></a>
183
+ <?php } ?>
184
+ </div>
185
+ </div>
186
+ <div class="bwg-clear"></div>
187
+ </div>
188
+ <div class="wd-table meta-box-sortables">
189
+ <div class="wd-table-row wd-table-col-100 wd-table-col-left">
190
+ <div class="wd-box-section">
191
+ <div class="postbox <?php echo $params['id'] ? 'closed' : '' ?>">
192
+ <button class="button-link handlediv" type="button" aria-expanded="true">
193
+ <span class="screen-reader-text"><?php _e('Toggle panel:', BWG()->prefix); ?></span>
194
+ <span class="toggle-indicator" aria-hidden="true"></span>
195
+ </button>
196
+ <h2 class="hndle">
197
+ <span><?php _e('Basic', BWG()->prefix); ?></span>
198
+ </h2>
199
+ <div class="inside">
200
+ <div class="wd-box-content">
201
+ <div class="wd-group">
202
+ <label class="wd-label" for="preview_image"><?php _e('Preview image', BWG()->prefix); ?></label>
203
+ <div>
204
+ <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;':'' ?>">
205
+ <span class="dashicons dashicons-camera"></span><?php _e('Add', BWG()->prefix); ?>
206
+ </a>
207
+ <img id="img_preview_image" src="<?php echo $row->preview_image ? (site_url() . '/' . BWG()->upload_dir . $row->preview_image) : ''; ?>" style="<?php echo empty($row->preview_image)?'display:none;':'' ?>"/>
208
+ <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>
209
+ <input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>"/>
210
+ <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>
211
+ </div>
212
+ </div>
213
+ <div class="wd-group">
214
+ <label class="wd-label"><?php _e('Published', BWG()->prefix); ?></label>
215
+ <input type="radio" class="inputbox" id="published1" name="published" <?php echo(($row->published == 1 || !$params['id']) ? 'checked="checked"' : ''); ?> value="1"/>
216
+ <label for="published1"><?php _e('Yes', BWG()->prefix); ?></label>
217
+ <input type="radio" class="inputbox" id="published0" name="published" <?php echo(($row->published) ? '' : 'checked="checked"'); ?> value="0"/>
218
+ <label for="published0"><?php _e('No', BWG()->prefix); ?></label>
219
+ </div>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ <div class="wd-table-row wd-table-col-100 wd-table-col-left">
226
+ <div class="wd-box-section">
227
+ <div class="postbox closed">
228
+ <button class="button-link handlediv" type="button" aria-expanded="true">
229
+ <span class="screen-reader-text"><?php _e('Toggle panel:', BWG()->prefix); ?></span>
230
+ <span class="toggle-indicator" aria-hidden="false"></span>
231
+ </button>
232
+ <h2 class="hndle">
233
+ <span><?php _e('Advanced', BWG()->prefix); ?></span>
234
+ </h2>
235
+ <div class="inside">
236
+ <div class="wd-group">
237
+ <label class="wd-label"><?php _e('Author', BWG()->prefix); ?></label>
238
+ <span><?php echo $row->author; ?></span>
239
+ </div>
240
+ <div class="wd-group">
241
+ <label class="wd-label" for="slug"><?php _e('Slug', BWG()->prefix); ?></label>
242
+ <input type="text" id="slug" name="slug" value="<?php echo $row->slug; ?>">
243
+ <input type="hidden" id="old_slug" name="old_slug" value="<?php echo $row->slug; ?>">
244
+ </div>
245
+ <div class="wd-group">
246
+ <label class="wd-label" for="description"><?php _e('Description', BWG()->prefix); ?> </label>
247
+ <?php
248
+ if ( user_can_richedit() && $enable_wp_editor ) {
249
+ wp_editor($row->description, 'description', array(
250
+ 'teeny' => TRUE,
251
+ 'textarea_name' => 'description',
252
+ 'media_buttons' => FALSE,
253
+ 'textarea_rows' => 5,
254
+ ));
255
+ }
256
+ else {
257
+ ?>
258
+ <textarea cols="36" rows="5" id="description" name="description" class="wd-resize-vertical"><?php echo $row->description; ?></textarea>
259
+ <?php
260
+ }
261
+ ?>
262
+ </div>
263
+ </div>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ <?php if ( $params['shortcode_id'] ) { ?>
268
+ <div class="wd-table-row wd-table-col-100 wd-table-col-left">
269
+ <div class="wd-box-section">
270
+ <div class="postbox closed how_to_postbox">
271
+ <button class="button-link handlediv" type="button" aria-expanded="true">
272
+ <span class="screen-reader-text"><?php _e('Toggle panel:', BWG()->prefix); ?></span>
273
+ <span class="toggle-indicator" aria-hidden="false"></span>
274
+ </button>
275
+ <h2 class="hndle">
276
+ <span><?php _e('How to use', BWG()->prefix); ?></span>
277
+ </h2>
278
+ <div class="inside">
279
+ <div class="howto_container">
280
+ <div class="howto_content">
281
+ <h2><?php _e('Page or Post editor', BWG()->prefix); ?></h2>
282
+ <h4><?php _e('Insert it into an existing post with the button.', BWG()->prefix); ?></h4>
283
+ <img src="<?php echo BWG()->plugin_url . '/images/wp-publish.png'; ?>" alt="<?php _e('Post editor', BWG()->prefix); ?>" />
284
+ </div>
285
+ <div class="howto_content">
286
+ <h2><?php _e('PHP code', BWG()->prefix); ?></h2>
287
+ <h4><?php _e('Copy and paste the PHP code into your template file.', BWG()->prefix); ?></h4>
288
+ <input type="text" class="bwg_howto_phpcode" value="&#60;?php photo_gallery(<?php echo $params['shortcode_id']; ?>); ?&#62;" onclick="spider_select_value(this)" size="17" readonly="readonly" />
289
+ </div>
290
+ <div class="howto_content">
291
+ <h2><?php _e('Widget', BWG()->prefix); ?></h2>
292
+ <h4><?php _e('Insert as Widget.', BWG()->prefix); ?></h4>
293
+ <img src="<?php echo BWG()->plugin_url . '/images/wp-widget.png'; ?>" alt="<?php _e('Widget', BWG()->prefix); ?>" />
294
+ </div>
295
+ </div>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ <?php } ?>
301
+ </div>
302
+ <div class="wd-table">
303
+ <div class="wd-table-col wd-table-col-100 meta-box-sortables">
304
+ <div class="wd-box-section">
305
+ <div class="wd-box-content">
306
+ <div class="wd-group">
307
+ <h2 class="wd-titles"><?php _e('Galleries and Gallery Groups', BWG()->prefix); ?></h2>
308
+ <div id="bwg_tabs" class="bwg_tabs">
309
+ <?php
310
+ foreach ($params['albums_galleries'] as $item) {
311
+ $item->published = !$item->published ? 'dashicons-hidden' : 'hidden';
312
+ $item->preview_image = 'background-image:url("'. $item->preview_image .'")';
313
+ echo $this->albumgallery_template($item);
314
+ }
315
+ $template = new stdClass();
316
+ $template->alb_gal_id = '%%alb_gal_id%%';
317
+ $template->is_album = '%%is_album%%';
318
+ $template->preview_image = '%%preview_image%%';
319
+ $template->name = '%%name%%';
320
+ $template->published = '%%status%%';
321
+ echo $this->albumgallery_template($template, true);
322
+ ?>
323
+ <div class="bwg_subtab">
324
+ <div class="new_tab_image">
325
+ <a class="new_tab_link thickbox-preview" onclick="jQuery('#loading_div').show();" href="<?php echo $params['add_albums_galleries_action']; ?>">
326
+ <p id="add_album_gallery_text"><?php _e('Add', BWG()->prefix); ?></p>
327
+ </a>
328
+ </div>
329
+ </div>
330
+ </div>
331
+ <input type="hidden" id="albums_galleries" name="albumgallery_ids" value=""/>
332
+ </div>
333
+ </div>
334
+ </div>
335
+ </div>
336
+ </div>
337
+ <div id="loading_div" class="bwg_show"></div>
338
+ <input type="hidden" value="<?php echo !empty($row->modified_date) ? $row->modified_date : time() ?>" id="modified_date" name="modified_date" />
339
+ <?php
340
+ }
341
+
342
+ public function albumgallery_template($albumgallery_row, $template = false) {
343
+ ob_start();
344
+ if ($template) {
345
+ ?>
346
+ <div id="bwg_template">
347
+ <?php
348
+ }
349
+ ?>
350
+ <div class="bwg_subtab connectedSortable <?php echo 'bwg_subtab_' . $albumgallery_row->published; ?>" data-id="<?php echo $albumgallery_row->alb_gal_id; ?>" data-is-album="<?php echo $albumgallery_row->is_album; ?>" data-status="<?php echo $albumgallery_row->published; ?>">
351
+ <div style='<?php echo $albumgallery_row->preview_image; ?>; background-position: center;' class="tab_image">
352
+ <div class="tab_buttons">
353
+ <div class="handle_wrap">
354
+ <span class="bwg_move dashicons dashicons-move" title="<?php _e('Drag to re-order', BWG()->prefix); ?>"></span>
355
+ </div>
356
+ <div class="bwg_tab_title_wrap" title="<?php echo $albumgallery_row->name; ?>">
357
+ <label class="bwg_tab_title" title="<?php echo $albumgallery_row->name; ?>"><?php echo $albumgallery_row->name; ?></label>
358
+ </div>
359
+ </div>
360
+ <div class="overlay">
361
+ <div class="hover_buttons">
362
+ <span class="bwg_tab_remove dashicons dashicons-trash" title="<?php _e('Remove', BWG()->prefix); ?>" onclick="bwg_remove_album_gallery(this)"></span>
363
+ <span class="bwg_tab_status dashicons <?php echo $albumgallery_row->published; ?>" title="<?php _e('Unpublished', BWG()->prefix); ?>"></span>
364
+ <span class="bwg_clear"></span>
365
+ </div>
366
+ </div>
367
+ </div>
368
+ </div>
369
+ <?php
370
+ if ($template) {
371
+ ?>
372
+ </div>
373
+ <?php
374
+ }
375
+ return ob_get_clean();
376
+ }
377
+ }
admin/views/Albumsgalleries.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class AlbumsgalleriespView_bwg
5
+ */
6
+ class AlbumsgalleriesView_bwg extends AdminView_bwg {
7
+ public function __construct() {
8
+ // Register and include styles and scripts.
9
+ BWG()->register_admin_scripts();
10
+ wp_print_styles(BWG()->prefix . '_tables');
11
+ wp_print_scripts(BWG()->prefix . '_admin');
12
+ ?>
13
+ <script>
14
+ var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
15
+ </script>
16
+ <?php
17
+ }
18
+
19
+ /**
20
+ * Display page.
21
+ *
22
+ * @param $params
23
+ */
24
+ public function display( $params ) {
25
+ ob_start();
26
+ $params['page_url'] = add_query_arg(array(
27
+ 'action' => 'albumsgalleries_' . BWG()->prefix,
28
+ 'album_id' => $params['album_id'],
29
+ 'width' => '785',
30
+ 'height' => '550',
31
+ BWG()->nonce => wp_create_nonce('albumsgalleries_' . BWG()->prefix),
32
+ 'TB_iframe' => '1'
33
+ ), admin_url('admin-ajax.php'));
34
+ echo $this->body($params);
35
+ // Pass the content to form.
36
+ $form_attr = array(
37
+ 'id' => BWG()->prefix . '_albumsgalleries',
38
+ 'name' => BWG()->prefix . '_albumsgalleries',
39
+ 'class' => BWG()->prefix . '_albumsgalleries wd-form wp-core-ui media-frame',
40
+ 'action' => $params['page_url'],
41
+ );
42
+ echo $this->form(ob_get_clean(), $form_attr);
43
+
44
+ wp_print_scripts('common'); // Check all.
45
+
46
+ die();
47
+ }
48
+
49
+ /**
50
+ * Generate page body.
51
+ *
52
+ * @param $params
53
+ */
54
+ public function body( $params ) {
55
+ ?>
56
+ <div id="loading_div"></div>
57
+ <div id="wd-content">
58
+ <div class="wd-table-container">
59
+ <?php
60
+ echo $this->title( array(
61
+ 'title' => $params['page_title'],
62
+ 'title_class' => 'wd-header',
63
+ 'add_new_button' => FALSE,
64
+ )
65
+ );
66
+ ?>
67
+ <div class="wp-search-wrap">
68
+ <?php echo $this->search(); ?>
69
+ <div class="tablenav top">
70
+ <?php echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']); ?>
71
+ </div>
72
+ </div>
73
+ <div>
74
+ <table class="wp-list-table widefat fixed pages media">
75
+ <thead>
76
+ <td class="sortable manage-column column-cb check-column table_small_col">
77
+ <input id="check_all" type="checkbox" />
78
+ </td>
79
+ <?php echo WDWLibrary::ordering('name', $params['orderby'], $params['order'], __('Title', BWG()->prefix), $params['page_url'], 'column-primary'); ?>
80
+ <?php echo WDWLibrary::ordering('is_album', $params['orderby'], $params['order'], __('Type', BWG()->prefix), $params['page_url']); ?>
81
+ </thead>
82
+ <tbody id="tbody_albums_galleries">
83
+ <?php
84
+ if ($params['rows']) {
85
+ $iterator = 0;
86
+ foreach ($params['rows'] as $row) {
87
+ $alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
88
+ $preview_image = BWG()->plugin_url . '/images/no-image.png';
89
+ if ( !empty($row->preview_image) ) {
90
+ $preview_image = site_url() . '/' . BWG()->upload_dir . $row->preview_image;
91
+ }
92
+ if ( !empty($row->random_preview_image)) {
93
+ $preview_image = site_url() . '/' . BWG()->upload_dir . $row->random_preview_image;
94
+ if ( WDWLibrary::check_external_link($row->random_preview_image) ) {
95
+ $preview_image = $row->random_preview_image;
96
+ }
97
+ }
98
+ ?>
99
+ <tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
100
+ <th class="table_small_col check-column">
101
+ <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 htmlspecialchars(addslashes($preview_image)); ?>" data-name="<?php echo htmlspecialchars(addslashes($row->name)); ?>" data-status="<?php echo !$row->published ? 'dashicons-hidden' : 'hidden'; ?>" />
102
+ </th>
103
+ <td class="column-primary column-title" data-colname="<?php _e('Title', BWG()->prefix); ?>">
104
+ <strong class="has-media-icon">
105
+ <a class="wd-pointer" onclick="window.parent.bwg_add_album_gallery('<?php echo $row->id; ?>', '<?php echo htmlspecialchars(addslashes($row->is_album)); ?>', '<?php echo htmlspecialchars(addslashes($preview_image)); ?>', '<?php echo htmlspecialchars(addslashes($row->name)); ?>','<?php echo !$row->published ? 'dashicons-hidden' : 'hidden' ?>')" id="a_<?php echo $iterator; ?>">
106
+ <span class="media-icon image-icon">
107
+ <img class="preview-image" title="<?php echo $row->title; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
108
+ </span>
109
+ <?php echo $row->name?>
110
+ </a>
111
+ <?php if ( !$row->published ) { ?>
112
+ — <span class="post-state"><?php _e('Unpublished', BWG()->prefix); ?></span>
113
+ <?php } ?>
114
+ </strong>
115
+ <button class="toggle-row" type="button">
116
+ <span class="screen-reader-text"><?php _e('Show more details', BWG()->prefix); ?></span>
117
+ </button>
118
+ </td>
119
+ <td id="type_<?php echo $iterator; ?>" class="table_medium_col_uncenter" data-colname="<?php _e('Type', BWG()->prefix); ?>">
120
+ <?php echo ($row->is_album ? __("Gallery group", BWG()->prefix) : __("Gallery", BWG()->prefix)) ; ?>
121
+ </td>
122
+ </tr>
123
+ <?php
124
+ $iterator++;
125
+ }
126
+ }
127
+ else {
128
+ echo WDWLibrary::no_items('galleries or gallery groups',3);
129
+ }
130
+ ?>
131
+ </tbody>
132
+ </table>
133
+ </div>
134
+ </div>
135
+ <div class="media-frame-toolbar">
136
+ <div class="media-toolbar">
137
+ <div class="media-toolbar-primary search-form">
138
+ <button class="button media-button button-primary button-large media-button-insert" type="button" onclick="jQuery('#loading_div').show(); spider_get_items();"><?php _e('Add to Gallery Group', BWG()->prefix); ?></button>
139
+ </div>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ <script>
144
+ jQuery(window).load(function() {
145
+ jQuery("#loading_div", window.parent.document).hide();
146
+ });
147
+ </script>
148
+ <?php
149
+ }
150
+ }
admin/views/BWGViewAddAlbumsGalleries.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
-
3
- class BWGViewAddAlbumsGalleries {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $album_id = ((isset($_GET['album_id'])) ? esc_html(stripslashes($_GET['album_id'])) : ((isset($_POST['album_id'])) ? esc_html(stripslashes($_POST['album_id'])) : ''));
27
- $rows_data = $this->model->get_rows_data($album_id);
28
- $page_nav = $this->model->page_nav($album_id);
29
- $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
30
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
31
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
32
- $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
- $per_page = $this->model->per_page();
34
- $pager = 0;
35
- wp_print_scripts('jquery');
36
- wp_print_scripts('wp-pointer');
37
- wp_print_styles('admin-bar');
38
- wp_print_styles('dashicons');
39
- wp_print_styles('wp-admin');
40
- wp_print_styles('buttons');
41
- wp_print_styles('wp-auth-check');
42
- wp_print_styles('wp-pointer');
43
- if (get_bloginfo('version') < '3.9') { ?>
44
- <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
45
- <?php } ?>
46
- <link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="spider_audio_player_tables-css" rel="stylesheet">
47
- <script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
48
- <form class="wrap wp-core-ui bwg_form" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
49
- <?php wp_nonce_field( 'addAlbumsGalleries', 'bwg_nonce' ); ?>
50
- <h2 style="width:200px;float:left"><?php _e("Albums/Galleries", 'bwg_back'); ?></h2>
51
- <a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
52
- <div id="add_albums" class='wd-btn wd-btn-primary wd-btn-icon wd-btn-add' style="border:none;padding-top:8px !important;" ><?php echo __('ADD','bwg_back');?> </div>
53
- </a>
54
- <div class="tablenav top">
55
- <?php
56
- WDWLibrary::search(__('Name','bwg_back'), $search_value, 'albums_galleries_form', 'position_search');
57
- WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
58
- ?>
59
- </div>
60
- <table class="wp-list-table widefat fixed pages">
61
- <thead>
62
- <th class="sortable manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
63
- <th class="sortable table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>" style="padding-left:20px;">
64
- <a onclick="spider_set_input_value('order_by', 'id');
65
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
66
- spider_form_submit(event, 'albums_galleries_form')" href="">
67
- <span>ID</span><span class="sorting-indicator"></span>
68
- </a>
69
- </th>
70
- <th class="sortable table_medium_col_uncenter <?php if ($order_by == 'is_album') {echo $order_class;} ?>">
71
- <a onclick="spider_set_input_value('task', '');
72
- spider_set_input_value('order_by', 'is_album');
73
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'is_album') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
74
- spider_form_submit(event, 'albums_galleries_form')" href="">
75
- <span><?php _e("Type", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
76
- </a>
77
- </th>
78
- <th class="sortable <?php if ($order_by == 'name') {echo $order_class;} ?>">
79
- <a onclick="spider_set_input_value('order_by', 'name');
80
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
81
- spider_form_submit(event, 'albums_galleries_form')" href="">
82
- <span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
83
- </a>
84
- </th>
85
- </thead>
86
- <tbody id="tbody_albums_galleries">
87
- <?php
88
- if ($rows_data) {
89
- $iterator = 0;
90
- foreach ($rows_data as $row_data) {
91
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
92
- ?>
93
- <tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
94
- <td class="table_small_col check-column"><input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" /></td>
95
- <td id="id_<?php echo $iterator; ?>" class="table_small_col"><?php echo $row_data->id; ?></td>
96
- <td id="url_<?php echo $iterator; ?>" class="table_medium_col_uncenter"><?php echo ($row_data->is_album ? __("Album", 'bwg_back') : __("Gallery", 'bwg_back')) ; ?></td>
97
- <td>
98
- <a onclick="window.parent.bwg_add_items(['<?php echo $row_data->id?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'], ['<?php echo htmlspecialchars(addslashes($row_data->is_album))?>'])" id="a_<?php echo $iterator; ?>" style="cursor:pointer;">
99
- <?php echo $row_data->name?>
100
- </a>
101
- </td>
102
- </tr>
103
- <?php
104
- $iterator++;
105
- }
106
- }
107
- ?>
108
- </tbody>
109
- </table>
110
- <div class="tablenav bottom">
111
- <?php
112
- WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
113
- ?>
114
- </div>
115
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
116
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
117
- <input id="album_id" name="album_id" type="hidden" value="<?php echo $album_id; ?>" />
118
- </form>
119
- <script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
120
- <?php
121
- include_once (WD_BWG_DIR .'/includes/bwg_pointers.php');
122
- new BWG_pointers();
123
- die();
124
- }
125
-
126
- ////////////////////////////////////////////////////////////////////////////////////////
127
- // Getters & Setters //
128
- ////////////////////////////////////////////////////////////////////////////////////////
129
- ////////////////////////////////////////////////////////////////////////////////////////
130
- // Private Methods //
131
- ////////////////////////////////////////////////////////////////////////////////////////
132
- ////////////////////////////////////////////////////////////////////////////////////////
133
- // Listeners //
134
- ////////////////////////////////////////////////////////////////////////////////////////
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewAddTags.php DELETED
@@ -1,99 +0,0 @@
1
- <?php
2
- class BWGViewAddTags {
3
-
4
- private $model;
5
-
6
- public function __construct($model) {
7
- $this->model = $model;
8
- }
9
-
10
- public function display() {
11
- $rows_data = $this->model->get_rows_data();
12
- $page_nav = $this->model->page_nav();
13
- $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
14
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
15
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
16
- $image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : ((isset($_POST['image_id'])) ? esc_html($_POST['image_id']) : '0'));
17
- $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
18
- $per_page = $this->model->per_page();
19
- $pager = 0;
20
- wp_print_scripts('jquery');
21
- wp_print_styles('admin-bar');
22
- wp_print_styles('wp-admin');
23
- wp_print_styles('dashicons');
24
- wp_print_styles('buttons');
25
- wp_print_styles('wp-auth-check');
26
- if (get_bloginfo('version') < '3.9') { ?>
27
- <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
28
- <?php } ?>
29
- <link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="bwg_tables-css" rel="stylesheet">
30
- <script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
31
- <form class="wrap wp-core-ui bwg_form" id="tags_form" method="post" action="<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:99%; margin: 0 auto;">
32
- <?php wp_nonce_field( 'addTags', 'bwg_nonce' ); ?>
33
- <h2 style="width:200px; float:left;"><?php _e("Tags", 'bwg_back'); ?></h2>
34
- <a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Tag" onclick="bwg_get_tags('<?php echo $image_id; ?>', event);" style="float:right; padding: 9px 0px 4px 0">
35
- <div class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" style="border:none;padding-top:8px !important;">ADD </div>
36
- </a>
37
- <div class="tablenav top">
38
- <?php
39
- WDWLibrary::search(__('Name','bwg_back'), $search_value, 'tags_form', 'position_search');
40
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
41
- ?>
42
- </div>
43
- <table class="wp-list-table widefat fixed pages">
44
- <thead>
45
- <th class="sortable manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
46
- <th class="sortable table_small_col <?php if ($order_by == 'term_id') {echo $order_class;} ?>" style="padding-left:15px;">
47
- <a onclick="spider_set_input_value('order_by', 'term_id');
48
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'term_id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
49
- spider_form_submit(event, 'tags_form')" href="">
50
- <span>ID</span><span class="sorting-indicator"></span></th>
51
- </a>
52
- <th class="sortable <?php if ($order_by == 'name') {echo $order_class;} ?>">
53
- <a onclick="spider_set_input_value('order_by', 'name');
54
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
55
- spider_form_submit(event, 'tags_form')" href="">
56
- <span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
57
- </a>
58
- </th>
59
- <th class="sortable <?php if ($order_by == 'slug') {echo $order_class;} ?>">
60
- <a onclick="spider_set_input_value('order_by', 'slug');
61
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
62
- spider_form_submit(event, 'tags_form')" href="">
63
- <span><?php _e("Slug", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
64
- </a>
65
- </th>
66
- </thead>
67
- <tbody id="tbody_arr">
68
- <?php
69
- if ($rows_data) {
70
- foreach ($rows_data as $row_data) {
71
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
72
- ?>
73
- <tr id="tr_<?php echo $row_data->term_id; ?>" <?php echo $alternate; ?>>
74
- <td class="table_small_col check-column"><input id="check_<?php echo $row_data->term_id; ?>" name="check_<?php echo $row_data->term_id; ?>" type="checkbox" /></td>
75
- <td class="table_small_col"><?php echo $row_data->term_id; ?></td>
76
- <td><a onclick="window.parent.bwg_add_tag('<?php echo $image_id; ?>', ['<?php echo $row_data->term_id; ?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'])" id="a_<?php echo $row_data->term_id; ?>" style="cursor:pointer;"><?php echo $row_data->name; ?></a></td>
77
- <td id="slug_<?php echo $row_data->term_id; ?>"><?php echo (($row_data->slug) ? $row_data->slug : '&nbsp;'); ?></td>
78
- </tr>
79
- <?php
80
- }
81
- }
82
- ?>
83
- </tbody>
84
- </table>
85
- <div class="tablenav bottom">
86
- <?php
87
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
88
- ?>
89
- </div>
90
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
91
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
92
- <input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
93
- </form>
94
- <script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
95
- <?php
96
-
97
- die();
98
- }
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewAlbums_bwg.php DELETED
@@ -1,380 +0,0 @@
1
- <?php
2
- class BWGViewAlbums_bwg {
3
-
4
- private $model;
5
-
6
- public function __construct($model) {
7
- $this->model = $model;
8
- }
9
- public function display() {
10
- global $WD_BWG_UPLOAD_DIR;
11
- $rows_data = $this->model->get_rows_data();
12
- $page_nav = $this->model->page_nav();
13
- $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
14
- $search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
15
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
16
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'order');
17
- $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
18
- $ids_string = '';
19
- $per_page = $this->model->per_page();
20
- $pager = 0;
21
- $album_button_array = array(
22
- 'publish_all' => __('Publish', 'bwg_back'),
23
- 'unpublish_all' => __('Unpublish', 'bwg_back'),
24
- 'delete_all' => __('Delete', 'bwg_back')
25
- );
26
- ?>
27
- <form class="wrap bwg_form" id="albums_form" method="post" action="admin.php?page=albums_bwg" style="width: 98%; float: left;">
28
- <?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
29
- <div>
30
- <span class="album-icon"></span>
31
- <h2>
32
- <?php _e('Albums', 'bwg_back'); ?>
33
- <a href="" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
34
- spider_form_submit(event, 'albums_form')"><?php _e('Add new', 'bwg_back'); ?></a>
35
- </h2>
36
- </div>
37
- <div id="draganddrop" class="wd_updated" style="display:none;"><strong><p><?php _e('Changes made in this table should be saved.', 'bwg_back'); ?></p></strong></div>
38
- <?php WDWLibrary::search(__('Name', 'bwg_back'), $search_value, 'albums_form',''); ?>
39
- <div class="tablenav top buttons_div buttons_div_left">
40
- <span class="wd-btn wd-btn-primary-gray bwg_check_all non_selectable" onclick="spider_check_all_items()">
41
- <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
42
- <span style="vertical-align: middle;"><?php echo __('Select All', 'bwg_back'); ?></span>
43
- </span>
44
- <select class='select_icon bulk_action'>
45
- <option value=""><?php _e('Bulk Actions', 'bwg_back'); ?></option>
46
- <?php
47
- foreach ($album_button_array as $key => $value) {
48
- ?>
49
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
50
- <?php
51
- }
52
- ?>
53
- </select>
54
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php _e("Apply", "bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action', 'album_page')) {return false;}" value="<?php _e("Apply", "bwg_back"); ?>" />
55
- <?php WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'albums_form', $per_page); ?>
56
- </div>
57
- <table class="wp-list-table widefat fixed pages">
58
- <thead>
59
- <th class="sortable check-column table_small_col manage-column <?php if ($order_by == 'order') {echo $order_class;} ?>" style="margin: 0px auto 5px 10px; width: 77px; vertical-align:middle;">
60
- <a id="show_hide_weights" class="bwg_order_column" onclick="spider_show_hide_weights();" value="<?php echo __('Hide order column', 'bwg_back'); ?>" ></a>
61
- <a id="show_order_button" class="bwg_save_order" title="<?php echo __('Save Order', 'bwg_back'); ?>" onclick="spider_set_input_value('task', 'save_order');spider_form_submit(event, 'albums_form')" value="<?php echo __('Save Order', 'bwg_back'); ?>" ></a>
62
- <a id="th_order" onclick="spider_set_input_value('task', '');
63
- spider_set_input_value('order_by', 'order');
64
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'order') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
65
- spider_form_submit(event, 'albums_form')" href="">
66
- <span class="sorting-indicator"></span>
67
- </a>
68
- </th>
69
- <th class="sortable manage-column column-cb check-column table_small_col" style="padding-top:14px !important;" ><input id="check_all" onclick="spider_check_all(this)" type="checkbox" style="margin:0;" /></th>
70
- <th class="sortable table_th_middle table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
71
- <a onclick="spider_set_input_value('task', '');
72
- spider_set_input_value('order_by', 'id');
73
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
74
- spider_form_submit(event, 'albums_form')" href="">
75
- <span>ID</span><span class="sorting-indicator"></span>
76
- </a>
77
- </th>
78
- <th class="table_extra_large_col"><?php echo __('Thumbnail', 'bwg_back'); ?></th>
79
- <th class="sortable table_extra_large_col <?php if ($order_by == 'name') {echo $order_class;} ?>">
80
- <a onclick="spider_set_input_value('task', '');
81
- spider_set_input_value('order_by', 'name');
82
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
83
- spider_form_submit(event, 'albums_form')" href="">
84
- <span><?php echo __('Name', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
85
- </a>
86
- </th>
87
- <th class="sortable table_extra_large_col<?php if ($order_by == 'slug') {echo $order_class;} ?>">
88
- <a onclick="spider_set_input_value('task', '');
89
- spider_set_input_value('order_by', 'slug');
90
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
91
- spider_form_submit(event, 'albums_form')" href="">
92
- <span><?php echo __('Slug', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
93
- </a>
94
- </th>
95
- <th class="sortable table_extra_large_col <?php if ($order_by == 'display_name') {echo $order_class;} ?>">
96
- <a onclick="spider_set_input_value('task', '');
97
- spider_set_input_value('order_by', 'display_name');
98
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'display_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
99
- spider_form_submit(event, 'albums_form')" href="">
100
- <span><?php echo __('Author', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
101
- </a>
102
- </th>
103
- <th class="sortable table_big_col <?php if ($order_by == 'published') {echo $order_class;} ?>" style="padding-left:20px;">
104
- <a onclick="spider_set_input_value('task', '');
105
- spider_set_input_value('order_by', 'published');
106
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
107
- spider_form_submit(event, 'albums_form')" href="">
108
- <span><?php echo __('Published', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
109
- </a>
110
- </th>
111
- <th class="table_small_col"><?php echo __('Edit', 'bwg_back'); ?></th>
112
- <th class="table_small_col"><?php echo __('Delete', 'bwg_back'); ?></th>
113
- </thead>
114
- <tbody id="tbody_arr">
115
- <?php
116
- if ($rows_data) {
117
- foreach ($rows_data as $row_data) {
118
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
119
- $published_image = (($row_data->published) ? 'publish-blue' : 'unpublish-red');
120
- $published = (($row_data->published) ? 'unpublish' : 'publish');
121
- $unpublished = ((!$row_data->published) ? 'Unpublish' : 'Publish');
122
- if ($row_data->preview_image == '') {
123
- $preview_image = WD_BWG_URL . '/images/no-image.png';
124
- }
125
- else {
126
- $preview_image = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row_data->preview_image;
127
- }
128
- ?>
129
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
130
- <td class="spider_order table_medium_col"><input id="order_input_<?php echo $row_data->id; ?>" name="order_input_<?php echo $row_data->id; ?>" type="text" size="1" value="<?php echo $row_data->order; ?>" /></td>
131
- <td class="connectedSortable handles table_small_col"><div class="bwg_img_handle handle" style="margin:5px auto 0 auto;" title="Drag to re-order"></div></td>
132
- <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
133
- <td class="table_small_col"><?php echo $row_data->id; ?></td>
134
- <td class="table_extra_large_col">
135
- <img title="<?php echo $row_data->name; ?>" style="border: 1px solid #CCCCCC; max-width:60px; max-height:60px;" src="<?php echo $preview_image; ?>">
136
- </td>
137
- <td><a onclick="spider_set_input_value('task', 'edit');
138
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
139
- spider_form_submit(event, 'albums_form')" href="" title="<?php echo __('Edit', 'bwg_back'); ?>"><?php echo $row_data->name; ?></a></td>
140
- <td><?php echo $row_data->slug; ?></td>
141
- <td><?php echo get_userdata($row_data->author)->display_name; ?></td>
142
- <td class="table_big_col publish_icon"><a style="background-image:url('<?php echo WD_BWG_URL . '/images/icons/' . $published_image . '.png'; ?>'); background-repeat: no-repeat; display: inline-block; width: 18px; height: 22px;margin: 3px; vertical-align: middle;background-size: contain;" title="<?php echo $unpublished; ?>" onclick="spider_set_input_value('task', '<?php echo $published; ?>');spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');spider_form_submit(event, 'albums_form')" href=""></a></td>
143
- <td class="table_big_col"><a class="bwg_img_edit" title="<?php echo __('Edit', 'bwg_back'); ?>" onclick="spider_set_input_value('task', 'edit');
144
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
145
- spider_form_submit(event, 'albums_form')" href=""></a></td>
146
- <td class="table_big_col"><a class="bwg_img_remove" title="<?php echo __('Delete', 'bwg_back'); ?>" onclick="if(confirm('Do you want to delete selected items?')){ spider_set_input_value('task', 'delete');
147
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
148
- spider_form_submit(event, 'albums_form')}
149
- else {
150
- return false;
151
- }" href=""></a></td>
152
- </tr>
153
- <?php
154
- $ids_string .= $row_data->id . ',';
155
- }
156
- }
157
- ?>
158
- </tbody>
159
- </table>
160
- <div class="tablenav bottom">
161
- <?php
162
- WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
163
- ?>
164
- </div>
165
- <input id="task" name="task" type="hidden" value="" />
166
- <input id="current_id" name="current_id" type="hidden" value="" />
167
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
168
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
169
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
170
- <script>
171
- window.onload = spider_show_hide_weights;
172
- </script>
173
- </form>
174
- <?php
175
- }
176
-
177
- public function edit($id) {
178
- global $WD_BWG_UPLOAD_DIR;
179
- global $wd_bwg_options;
180
- $row = $this->model->get_row_data($id);
181
- $page_title = (($id != 0) ? __('Edit album ',"bwg_back") . $row->name : __('Create new album',"bwg_back"));
182
- $per_page = $this->model->per_page();
183
- $enable_wp_editor = isset($wd_bwg_options->enable_wp_editor) ? $wd_bwg_options->enable_wp_editor : 1;
184
- ?>
185
- <script>
186
- function bwg_add_preview_image(files) {
187
- document.getElementById("preview_image").value = files[0]['thumb_url'];
188
- document.getElementById("button_preview_image").style.display = "none";
189
- document.getElementById("delete_preview_image").style.display = "inline-block";
190
- if (document.getElementById("img_preview_image")) {
191
- document.getElementById("img_preview_image").src = files[0]['reliative_url'];
192
- document.getElementById("img_preview_image").style.display = "inline-block";
193
- }
194
- }
195
-
196
- function bwg_add_items(trackIds, titles, types) {
197
- jQuery(document).trigger("onAddAlbum");
198
- var tbody = document.getElementById('tbody_albums_galleries');
199
- var counter = 0;
200
- for(i = 0; i < trackIds.length; i++) {
201
- tr = document.createElement('tr');
202
- tr.setAttribute('id', "tr_0:" + types[i] + ":" + trackIds[i]);
203
- tr.setAttribute('style', 'height:35px');
204
-
205
- var td_drag = document.createElement('td');
206
- td_drag.setAttribute('class','connectedSortable table_small_col');
207
- td_drag.setAttribute('title','Drag to re-order');
208
-
209
- var div_drag = document.createElement('div');
210
- div_drag.setAttribute('class', 'bwg_img_handle handle');
211
- div_drag.setAttribute('style','margin-left:10px;');
212
- td_drag.appendChild(div_drag);
213
- tr.appendChild(td_drag);
214
-
215
- var td_title = document.createElement('td');
216
- td_title.setAttribute('style', 'max-width:420px;min-width:400px;');
217
- td_title.innerHTML = (types[i] == '1' ? 'Album: ' : 'Gallery: ') + titles[i];
218
-
219
- tr.appendChild(td_title);
220
-
221
- var td_delete = document.createElement('td');
222
- td_delete.setAttribute('class', 'table_small_col');
223
-
224
- var span_del = document.createElement('span');
225
- span_del.setAttribute('class', 'spider_delete_img');
226
- span_del.setAttribute('onclick', 'spider_remove_row("tbody_albums_galleries", event, this);');
227
-
228
- td_delete.appendChild(span_del);
229
- tr.appendChild(td_delete);
230
-
231
- tbody.appendChild(tr);
232
- counter++;
233
- }
234
- if (counter) {
235
- document.getElementById("table_albums_galleries").style.display = "block";
236
- }
237
- spider_sortt('tbody_albums_galleries');
238
- tb_remove();
239
- }
240
- </script>
241
- <form class="wrap bwg_form" method="post" action="admin.php?page=albums_bwg" style="width: 98%; float: left;">
242
- <?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
243
- <div>
244
- <span class="album-icon"></span>
245
- <h2><?php echo $page_title; ?></h2>
246
- </div>
247
- <div style="float:right;">
248
- <input id="save_albums" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-save" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'save')" value="<?php echo __('Save', 'bwg_back'); ?>" />
249
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'apply')" value="<?php echo __('Apply', 'bwg_back'); ?>" />
250
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="<?php echo __('Cancel', 'bwg_back'); ?>" />
251
- </div>
252
- <table style="clear:both;">
253
- <tbody>
254
- <tr>
255
- <td class="spider_label"><label for="name"><?php _e('Name:', 'bwg_back'); ?> <span style="color:#FF0000;">*</span> </label></td>
256
- <td><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="39" class="bwg_requried"/></td>
257
- </tr>
258
- <tr>
259
- <td class="spider_label"><label for="slug"><?php _e('Slug:', 'bwg_back'); ?> </label></td>
260
- <td><input type="text" id="slug" name="slug" value="<?php echo $row->slug; ?>" size="39" /><input type="hidden" id="old_slug" name="old_slug" value="<?php echo $row->slug; ?>" size="39" /></td>
261
- </tr>
262
- <tr>
263
- <td class="spider_label"><label for="description"><?php _e('Description:', 'bwg_back'); ?> </label></td>
264
- <td>
265
- <div style="width:500px;">
266
- <?php
267
- if (user_can_richedit() && $enable_wp_editor) {
268
- wp_editor($row->description, 'description', array('teeny' => TRUE, 'textarea_name' => 'description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
269
- }
270
- else {
271
- ?>
272
- <textarea cols="36" rows="5" id="description" name="description" style="resize:vertical">
273
- <?php echo $row->description; ?>
274
- </textarea>
275
- <?php
276
- }
277
- ?>
278
- </div>
279
- </td>
280
- </tr>
281
- <tr>
282
- <td class="spider_label"><label><?php _e('Author:', 'bwg_back'); ?> </label></td>
283
- <td><?php echo get_userdata($row->author)->display_name; ?></td>
284
- </tr>
285
- <tr>
286
- <td class="spider_label"><label for="published1"><?php _e('Published:', 'bwg_back'); ?> </label></td>
287
- <td>
288
- <input type="radio" class="inputbox" id="published0" name="published" <?php echo (($row->published) ? '' : 'checked="checked"'); ?> value="0" >
289
- <label for="published0"><?php _e('No', 'bwg_back'); ?></label>
290
- <input type="radio" class="inputbox" id="published1" name="published" <?php echo (($row->published) ? 'checked="checked"' : ''); ?> value="1" >
291
- <label for="published1"><?php _e('Yes', 'bwg_back'); ?></label>
292
- </td>
293
- </tr>
294
- <tr>
295
- <td class="spider_label"><label for="url"><?php _e('Preview image:', 'bwg_back'); ?> </label></td>
296
- <td>
297
- <?php
298
- $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_preview_image'), admin_url('admin-ajax.php'));
299
- $query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
300
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
301
-
302
-
303
- ?>
304
- <a href="<?php echo $query_url; ?>"
305
- id="button_preview_image"
306
- class="wd-preview-image-btn thickbox thickbox-preview"
307
- title="<?php echo __('Add Preview Image', 'bwg_back'); ?>"
308
- onclick="return false;"
309
- style="display:none;">
310
-
311
- </a>
312
- <input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>" style="display:inline-block;"/>
313
- <img id="img_preview_image"
314
- style="max-height:90px; max-width:120px; vertical-align:middle;"
315
- src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row->preview_image; ?>">
316
- <span id="delete_preview_image" class="spider_delete_img"
317
- onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
318
- </td>
319
- </tr>
320
- <tr>
321
- <td class="spider_label"><label for="content-add_media"><?php _e('Albums And Galleries:', 'bwg_back'); ?> </label></td>
322
- <td>
323
- <?php
324
- $query_url = add_query_arg(array('action' => 'addAlbumsGalleries', 'album_id' => $id, 'width' => '700', 'height' => '550', 'bwg_items_per_page'=>$per_page ), admin_url('admin-ajax.php'));
325
- $query_url = wp_nonce_url( $query_url, 'addAlbumsGalleries', 'bwg_nonce' );
326
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
327
-
328
-
329
- ?>
330
- <a href="<?php echo $query_url; ?>" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add thickbox thickbox-preview" id="content-add_media" title="<?php echo __("Add Images", 'bwg_back'); ?>" onclick="return false;">
331
- <?php _e('Add Albums/Galleries', 'bwg_back'); ?>
332
- </a>
333
- <?php $albums_galleries = $this->model->get_albums_galleries_rows_data($id) ?>
334
- <table id="table_albums_galleries" class="widefat spider_table" <?php echo (($albums_galleries) ? '' : 'style="display:none;"'); ?>>
335
- <tbody id="tbody_albums_galleries">
336
- <?php
337
- if ($albums_galleries) {
338
- $hidden = "";
339
- foreach($albums_galleries as $alb_gal) {
340
- if ($alb_gal) {
341
- ?>
342
- <tr id="tr_<?php echo $alb_gal->id . ":" . $alb_gal->is_album . ":" . $alb_gal->alb_gal_id ?>" style="height:35px;">
343
- <td class="connectedSortable table_small_col" title="<?php _e('Drag to re-order', 'bwg_back'); ?>"><div class="handle"></div></td>
344
- <td style="max-width:420px; min-width:400px;"><?php echo ($alb_gal->is_album ? 'Album: ' : 'Gallery: ') . $alb_gal->name; ?></td>
345
- <td class="table_small_col">
346
- <span class="spider_delete_img" onclick="spider_remove_row('tbody_albums_galleries', event, this)"/>
347
- </td>
348
- </tr>
349
- <?php
350
- $hidden .= $alb_gal->id . ":" . $alb_gal->is_album . ":" . $alb_gal->alb_gal_id . ",";
351
- }
352
- }
353
- }
354
- ?>
355
- </tbody>
356
- </table>
357
- <input type="hidden" value="<?php echo isset($hidden) ? $hidden : ''; ?>" id="albums_galleries" name="albums_galleries"/>
358
- </td>
359
- </tr>
360
- </tbody>
361
- </table>
362
- <input id="task" name="task" type="hidden" value="" />
363
- <input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
364
- <script>
365
- jQuery(window).load(function() {
366
- spider_reorder_items('tbody_albums_galleries');
367
- });
368
- <?php
369
- if ($row->preview_image == '') {
370
- ?>
371
- spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image');
372
- <?php
373
- }
374
- ?>
375
- </script>
376
- </form>
377
- <?php
378
- }
379
-
380
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewBWGShortcode.php DELETED
@@ -1,2131 +0,0 @@
1
- <?php
2
- class BWGViewBWGShortcode {
3
-
4
- private $model;
5
-
6
- public function __construct($model) {
7
- $this->model = $model;
8
- }
9
-
10
- public function display() {
11
- $gallery_rows = $this->model->get_gallery_rows_data();
12
- $album_rows = $this->model->get_album_rows_data();
13
- global $wd_bwg_options;
14
- $theme_rows = $this->model->get_theme_rows_data();
15
- $from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
16
- $shortcodes = $this->model->get_shortcode_data();
17
- $shortcode_max_id = $this->model->get_shortcode_max_id();
18
- $tag_rows = $this->model->get_tag_rows_data();
19
- $effects = array(
20
- 'none' => __('None','bwg_back'),
21
- 'cubeH' => __('Cube Horizontal','bwg_back'),
22
- 'cubeV' => __('Cube Vertical','bwg_back'),
23
- 'fade' => __('Fade','bwg_back'),
24
- 'sliceH' => __('Slice Horizontal','bwg_back'),
25
- 'sliceV' => __('Slice Vertical','bwg_back'),
26
- 'slideH' => __('Slide Horizontal','bwg_back'),
27
- 'slideV' => __('Slide Vertical','bwg_back'),
28
- 'scaleOut' => __('Scale Out','bwg_back'),
29
- 'scaleIn' => __('Scale In','bwg_back'),
30
- 'blockScale' => __('Block Scale','bwg_back'),
31
- 'kaleidoscope' => __('Kaleidoscope','bwg_back'),
32
- 'fan' => __('Fan','bwg_back'),
33
- 'blindH' => __('Blind Horizontal','bwg_back'),
34
- 'blindV' => __('Blind Vertical','bwg_back'),
35
- 'random' => __('Random','bwg_back'),
36
- );
37
- $watermark_fonts = WDWLibrary::get_fonts();
38
- $gallery_types_name = array(
39
- 'thumbnails' => __('Thumbnails', 'bwg_back'),
40
- 'thumbnails_masonry' => __('Masonry', 'bwg_back'),
41
- 'thumbnails_mosaic' => __('Mosaic', 'bwg_back'),
42
- 'slideshow' => __('Slideshow', 'bwg_back'),
43
- 'image_browser' => __('Image Browser', 'bwg_back'),
44
- 'album_compact_preview' => __('Compact Album', 'bwg_back'),
45
- 'album_masonry_preview' => __('Masonry Album', 'bwg_back'),
46
- 'album_extended_preview' => __('Extended Album', 'bwg_back'),
47
- 'blog_style' => __('Blog Style', 'bwg_back'),
48
- 'carousel' => __('Carousel', 'bwg_back'),
49
- );
50
- if (!$from_menu) {
51
- ?>
52
- <html xmlns="http://www.w3.org/1999/xhtml">
53
- <head>
54
- <title><?php _e('Photo Gallery', 'bwg_back'); ?></title>
55
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
56
- <?php
57
- wp_print_scripts('jquery');
58
- bwg_register_admin_scripts();
59
- }
60
- wp_print_scripts('jquery-ui-core');
61
- wp_print_scripts('jquery-ui-widget');
62
- wp_print_scripts('jquery-ui-position');
63
- wp_print_scripts('jquery-ui-tooltip');
64
- wp_print_scripts('bwg_shortcode');
65
- wp_print_scripts('wp-pointer');
66
- wp_print_styles('wp-pointer');
67
- wp_print_styles('dashicons');
68
- ?>
69
- <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/bwg_shortcode.css?ver='.wd_bwg_version(); ?>">
70
- <link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
71
- <script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/jscolor/jscolor.js?ver='.wd_bwg_version(); ?>"></script>
72
- <?php
73
- if (!$from_menu) {
74
- wp_print_styles('forms');
75
- ?>
76
- <style>
77
- #WD-PhotoGallery .ui-widget-content a {
78
- margin-top: 3px;
79
- display: inline-block;
80
- line-height: 22px;
81
- height: 24px;
82
- }
83
- #WD-PhotoGallery #bwg_change_gallery_type {
84
- padding-top: 13px;
85
- }
86
- #WD-PhotoGallery .mceActionPanel {
87
- margin-top: 10px;
88
- padding-top: 10px;
89
- border-top: 1px solid;
90
- border-color: #919B9C ;
91
- }
92
- #WD-PhotoGallery .mceActionPanel #bwg_pro_version_link,
93
- #WD-PhotoGallery .mceActionPanel #insert {
94
- float: right;
95
- outline:none;
96
- display: inline-block;
97
- text-decoration: none;
98
- font-size: 13px;
99
- line-height: 26px;
100
- height: 28px;
101
- margin: 0 10px 0 0;
102
- padding: 0 10px 1px;
103
- cursor: pointer;
104
- border-width: 1px;
105
- border-style: solid;
106
- -webkit-appearance: none;
107
- -webkit-border-radius: 3px;
108
- -webkit-box-sizing: border-box;
109
- -webkit-box-shadow: 0 1px 0 #ccc;
110
- box-shadow: 0 1px 0 #ccc;
111
- border-radius: 3px;
112
- white-space: nowrap;
113
- -moz-box-sizing: border-box;
114
- box-sizing: border-box;
115
- background: #0085ba;
116
- border-color: #0073aa #006799 #006799;
117
- -webkit-box-shadow: 0 1px 0 #006799;
118
- box-shadow: 0 1px 0 #006799;
119
- color: #fff;
120
- text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
121
- }
122
- #WD-PhotoGallery .mceActionPanel #bwg_pro_version_link {
123
- float: left;
124
- }
125
- </style>
126
- <base target="_self">
127
- </head>
128
- <body id="WD-PhotoGallery">
129
- <?php if (isset($_POST['tagtext'])) { echo '<script>top.tinyMCE.activeEditor.windowManager.close(window);</script></body></html>'; die(); } ?>
130
- <form method="post" action="#" id="bwg_shortcode_form">
131
- <?php wp_nonce_field( 'BWGShortcode', 'bwg_nonce' ); ?>
132
- <div class="panel_wrapper">
133
- <div id="display_panel" class="panel current">
134
- <?php
135
- }
136
- else {
137
- ?>
138
- <form method="post" action="#" id="bwg_shortcode_form">
139
- <?php wp_nonce_field( 'BWGShortcode', 'bwg_nonce' ); ?>
140
- <div id="display_panel" style="width: 99%; margin-top: 30px;">
141
- <?php
142
- }
143
- ?>
144
- <div id="bwg_change_gallery_type">
145
- <span class="gallery_type" onClick="bwg_gallery_type('thumbnails')">
146
- <div class="gallery_type_div"><input type="radio" class="gallery_type_radio" id="thumbnails" name="gallery_type" value="thumbnails"/><label class="gallery_type_label" for="thumbnails"><?php _e("Thumbnails", 'bwg_back'); ?></label></div>
147
- <div><label for="thumbnails"><img id="display_thumb" src="<?php echo WD_BWG_URL . '/images/thumbnails.jpg'; ?>" /></label></div>
148
- </span>
149
- <span title="<?php _e("This view is available only in Paid version.", 'bwg_back'); ?><a class='wd-btn wd-btn-primary-blue wd-not-image' href='http://wpdemo.web-dorado.com/masonry-view/' target='_blank'>Demo View</a>" class="gallery_type">
150
- <div class="gallery_type_div"><input disabled="disabled" class="gallery_type_radio" type="radio" id="thumbnails_masonry" name="gallery_type" value="thumbnails_masonry" /><label class="spider_free_version_label gallery_type_label" for="thumbnails_masonry"><?php _e("Masonry", 'bwg_back'); ?></label></div>
151
- <div><label><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_masonry.jpg'; ?>" /></label></div>
152
- </span>
153
- <span title="<?php _e("This view is available only in Paid version.", 'bwg_back'); ?><a class='wd-btn wd-btn-primary-blue wd-not-image' href='http://wpdemo.web-dorado.com/mosaic-view/' target='_blank'>Demo View</a>" class="gallery_type">
154
- <div class="gallery_type_div"><input disabled="disabled" type="radio" class="gallery_type_radio" id="thumbnails_mosaic" name="gallery_type" value="thumbnails_mosaic" /><label class="spider_free_version_label gallery_type_label" for="thumbnails_mosaic"><?php _e("Mosaic", 'bwg_back'); ?></label></div>
155
- <div><label for="thumbnails_mosaic"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_mosaic.jpg'; ?>" /></label></div>
156
- </span>
157
- <span class="gallery_type" onClick="bwg_gallery_type('slideshow')">
158
- <div class="gallery_type_div"><input type="radio" id="slideshow" class="gallery_type_radio" name="gallery_type" value="slideshow" /><label class="gallery_type_label" for="slideshow"><?php _e("Slideshow", 'bwg_back'); ?></label></div>
159
- <label for="slideshow"><img src="<?php echo WD_BWG_URL . '/images/slideshow.jpg'; ?>" /></label>
160
- </span>
161
- <span class="gallery_type" onClick="bwg_gallery_type('image_browser')">
162
- <div class="gallery_type_div"><input type="radio" class="gallery_type_radio" id="image_browser" name="gallery_type" value="image_browser" /><label class="gallery_type_label" for="image_browser"><?php _e("Image Browser", 'bwg_back'); ?></label></div>
163
- <div><label for="image_browser"><img src="<?php echo WD_BWG_URL . '/images/image_browser.jpg'; ?>" /></label></div>
164
- </span>
165
- <span class="gallery_type" onClick="bwg_gallery_type('album_compact_preview')">
166
- <div class="album_type_div"><input type="radio" class="album_type_radio" id="album_compact_preview" name="gallery_type" value="album_compact_preview" /><label class="album_type_label" for="album_compact_preview"><?php _e("Compact Album", 'bwg_back'); ?></label></div>
167
- <div><label for="album_compact_preview"><img src="<?php echo WD_BWG_URL . '/images/album_compact_preview.jpg'; ?>" /></label></div>
168
- </span>
169
- <span title="<?php _e("This view is available only in Paid version.", 'bwg_back'); ?><a class='wd-btn wd-btn-primary-blue wd-not-image' href='http://wpdemo.web-dorado.com/masonry-album-view/' target='_blank'>Demo View</a>" class="gallery_type">
170
- <div class="album_type_div"><input disabled="disabled" type="radio" class="album_type_radio" id="album_masonry_preview" name="gallery_type" value="album_masonry_preview" /><label class="spider_free_version_label album_type_label" for="album_masonry_preview"><?php _e("Masonry Album", 'bwg_back'); ?></label></div>
171
- <div><label for="album_masonry_preview"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_masonry.jpg'; ?>" /></label></div>
172
- </span>
173
- <span class="gallery_type" onClick="bwg_gallery_type('album_extended_preview')">
174
- <div class="album_type_div"><input type="radio" class="album_type_radio" id="album_extended_preview" name="gallery_type" value="album_extended_preview" /><label class="album_type_label" for="album_extended_preview"><?php _e("Extended Album", 'bwg_back'); ?></label></div>
175
- <div><label for="album_extended_preview"><img src="<?php echo WD_BWG_URL . '/images/album_extended_preview.jpg'; ?>" /></label></div>
176
- </span>
177
- <span title="<?php _e("This view is available only in Paid version.", 'bwg_back'); ?><a class='wd-btn wd-btn-primary-blue wd-not-image' href='http://wpdemo.web-dorado.com/blog-style-view/' target='_blank'>Demo View</a>" class="gallery_type">
178
- <div class="gallery_type_div"><input disabled="disabled" type="radio" class="gallery_type_radio" id="blog_style" name="gallery_type" value="blog_style" /><label class="spider_free_version_label gallery_type_label" for="blog_style"><?php _e("Blog Style", 'bwg_back'); ?></label></div>
179
- <label><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/blog_style.jpg'; ?>" /></label>
180
- </span>
181
- <span title="<?php _e("This view is available only in Paid version.", 'bwg_back'); ?><a class='wd-btn wd-btn-primary-blue wd-not-image' href='http://wpdemo.web-dorado.com/gallery-carousel/' target='_blank'>Demo View</a>" class="gallery_type">
182
- <div class="gallery_type_div"><input disabled="disabled" type="radio" class="gallery_type_radio" id="carousel" name="gallery_type" value="carousel" /><label class="spider_free_version_label gallery_type_label" for="carousel"><?php _e("Carousel", 'bwg_back'); ?></label></div>
183
- <div><label for="carousel"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/Carousel.png'; ?>" /></label></div>
184
- </span>
185
- </div>
186
- <div id="bwg_select_gallery_type" style="display:none; text-align:center; height:33px;">
187
- <select name="gallery_types_name" id="gallery_types_name" class="aaa select_icon select_icon_pos" style="width:100%;" onchange="bwg_gallery_type(jQuery(this).val());">
188
- <?php
189
- foreach ($gallery_types_name as $key=>$gallery_type_name) {
190
- ?>
191
- <option <?php echo selected($gallery_type_name,true); ?> <?php echo ($gallery_type_name == 'Carousel' || $gallery_type_name == 'Masonry' || $gallery_type_name == 'Mosaic' || $gallery_type_name == 'Masonry Album' || $gallery_type_name == 'Blog Style') ? 'title="'. __("This view is disabled in free version.", 'bwg_back').'" disabled="disabled"' : '';?> value="<?php echo $key; ?>"><?php echo $gallery_type_name; ?></option>
192
- <?php
193
- }
194
- ?>
195
- </select>
196
- </div>
197
- <div class="tabs_views" style="display:none;">
198
- <div class="tabs_chang_view" id="" onclick="bwg_change_views('type_them');">
199
- <a id="bwg_them" class="wd-btn wd-btn-primary wd-not-image">
200
- <div class=""><?php _e('Global', 'bwg_back'); ?></div>
201
- </a>
202
- </div>
203
- <div class="tabs_chang_view" id="" onclick="bwg_change_views('type_slideshow');">
204
- <a id="bwg_slideshow" class="wd-btn wd-btn-primary wd-not-image">
205
- <div class="bwg_tab_label"><?php _e('Lightbox', 'bwg_back'); ?></div>
206
- </a>
207
- </div>
208
- <div class="tabs_chang_view" id="" onclick="bwg_change_views('type_advertisement');">
209
- <a id="bwg_advertisement" class="wd-btn wd-btn-primary wd-not-image">
210
- <div class="bwg_tab_label">
211
- <?php _e('Advertisement', 'bwg_back'); ?>
212
-
213
- </div>
214
- </a>
215
- </div>
216
- </div>
217
- <hr class="bwg_hr_shortcode" />
218
- <div class="bwg_short_div type_them" style="border-right: 1px solid #000000;">
219
- <div style="width:100%;display:table;">
220
- <div style="display:table-cell;">
221
- <div class="gallery_album_option_left">
222
- <table style="display:inline-block;">
223
- <tbody>
224
- <tr id="tr_theme">
225
- <td <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." class="spider_label spider_free_version_label"' : 'class="spider_label"'); ?>><label for="theme"><?php _e("Theme:", 'bwg_back'); ?> </label></td>
226
- <td>
227
- <select name="theme" id="theme" class="select_icon" style="width:150px;" <?php echo (get_option("wd_bwg_theme_version") ? 'disabled="disabled"' : ''); ?>>
228
- <option value="0"><?php echo __('Select Theme', 'bwg_back'); ?></option>
229
- <?php
230
- foreach ($theme_rows as $theme_row) {
231
- ?>
232
- <option <?php echo ($theme_row->default_theme) ? 'selected="selected"' : ''; ?> value="<?php echo $theme_row->id; ?>"><?php echo $theme_row->name; ?></option>
233
- <?php
234
- }
235
- ?>
236
- </select>
237
- </td>
238
- </tr>
239
- <tr id="tr_gallery">
240
- <td class="spider_label"><label for="gallery"><?php _e('Gallery:', 'bwg_back'); ?> </label></td>
241
- <td>
242
- <select name="gallery" id="gallery" class="select_icon" style="width:150px;">
243
- <option value="0"><?php _e('All Galleries', 'bwg_back'); ?></option>
244
- <?php
245
- foreach ($gallery_rows as $gallery_row) {
246
- ?>
247
- <option value="<?php echo $gallery_row->id; ?>"><?php echo $gallery_row->name; ?></option>
248
- <?php
249
- }
250
- ?>
251
- </select>
252
- </td>
253
- </tr>
254
- <tr id="tr_album">
255
- <td title="<?php _e('The selected album expanded content will be displayed.', 'bwg_back'); ?>" class="spider_label"><label for="album"><?php echo __('Album:', 'bwg_back'); ?> </label></td>
256
- <td>
257
- <select name="album" id="album" class="select_icon" style="width:150px;">
258
- <option value="0" selected="selected"><?php _e('Select Album', 'bwg_back'); ?></option>
259
- <?php
260
- foreach ($album_rows as $album_row) {
261
- ?>
262
- <option value="<?php echo $album_row->id; ?>"><?php echo $album_row->name; ?></option>
263
- <?php
264
- }
265
- ?>
266
- </select>
267
- </td>
268
- </tr>
269
- <tr id="tr_sort_by">
270
- <td class="spider_label"><label for="sort_by"><?php _e('Sort images by:', 'bwg_back'); ?> </label></td>
271
- <td>
272
- <select name="sort_by" id="sort_by" class="select_icon" style="width:150px;">
273
- <option value="order" selected="selected"><?php _e('Order', 'bwg_back'); ?></option>
274
- <option value="alt"><?php _e('Title', 'bwg_back'); ?></option>
275
- <option value="date"><?php _e('Date', 'bwg_back'); ?></option>
276
- <option value="filename"><?php _e('Filename', 'bwg_back'); ?></option>
277
- <option value="size"><?php _e('Size', 'bwg_back'); ?></option>
278
- <option value="filetype"><?php _e('Type', 'bwg_back'); ?></option>
279
- <option value="resolution"><?php _e('Resolution', 'bwg_back'); ?></option>
280
- <option value="random"><?php _e('Random', 'bwg_back'); ?></option>
281
- </select>
282
- </td>
283
- </tr>
284
- <tr id="tr_tag">
285
- <td class="spider_label"><label for="tag"><?php echo __('Tag:', 'bwg_back'); ?> </label></td>
286
- <td>
287
- <select name="tag" id="tag" class="select_icon" style="width:150px;">
288
- <option value="0"><?php _e('All Tags', 'bwg_back'); ?></option>
289
- <?php
290
- foreach ($tag_rows as $tag_row) {
291
- ?>
292
- <option value="<?php echo $tag_row->term_id; ?>"><?php echo $tag_row->name; ?></option>
293
- <?php
294
- }
295
- ?>
296
- </select>
297
- </td>
298
- </tr>
299
- <tr id="tr_order_by">
300
- <td class="spider_label"><label><?php _e("Order images:", 'bwg_back'); ?>: </label></td>
301
- <td>
302
- <input type="radio" name="order_by" id="order_by_1" value="asc" checked="checked" /><label for="order_by_1"><?php _e("Ascending", 'bwg_back'); ?></label>
303
- <span class="order_by_desc"><input type="radio" name="order_by" id="order_by_0" value="desc" /><label for="order_by_0"><?php _e("Descending", 'bwg_back'); ?></label></span>
304
- </td>
305
- </tr>
306
- <tr id="tr_show_search_box">
307
- <td class="spider_label"><label><?php _e("Show search box:", 'bwg_back'); ?> </label></td>
308
- <td>
309
- <input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($wd_bwg_options->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_1"><?php _e("Yes", 'bwg_back'); ?></label>
310
- <input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$wd_bwg_options->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
311
- </td>
312
- </tr>
313
- <tr id="tr_search_box_width">
314
- <td class="spider_label"><label for="search_box_width"><?php _e("Search box width:", 'bwg_back'); ?> </label></td>
315
- <td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $wd_bwg_options->search_box_width; ?>" class="spider_int_input" /> px</td>
316
- </tr>
317
- <tr id="tr_show_tag_box">
318
- <td class="spider_label"><label><?php _e("Show tag box:", 'bwg_back'); ?> </label></td>
319
- <td>
320
- <input type="radio" name="show_tag_box" id="show_tag_box_1" value="1" <?php if ($wd_bwg_options->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_1"><?php _e('Yes', 'bwg_back'); ?></label>
321
- <input type="radio" name="show_tag_box" id="show_tag_box_0" value="0" <?php if (!$wd_bwg_options->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
322
- </td>
323
- </tr>
324
- <tr id="tr_show_sort_images">
325
- <td class="spider_label"><label><?php _e("Show 'Order by' dropdown list:", 'bwg_back'); ?> </label></td>
326
- <td>
327
- <input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($wd_bwg_options->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
328
- <input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$wd_bwg_options->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0"><?php _e('No', 'bwg_back'); ?>;</label>
329
- </td>
330
- </tr>
331
- <tr id="tr_showthumbs_name">
332
- <td class="spider_label"><label><?php echo _e('Show gallery title:', 'bwg_back'); ?> </label></td>
333
- <td>
334
- <input type="radio" name="showthumbs_name" id="showthumbs_name_1" value="1" <?php if ($wd_bwg_options->showthumbs_name) echo 'checked="checked"'; ?> onchange="" /><label for="showthumbs_name_1"><?php echo _e('Yes', 'bwg_back'); ?></label>
335
- <input type="radio" name="showthumbs_name" id="showthumbs_name_0" value="0" <?php if (!$wd_bwg_options->showthumbs_name) echo 'checked="checked"'; ?> onchange="" /><label for="showthumbs_name_0"><?php echo _e('No', 'bwg_back'); ?></label>
336
- </td>
337
- </tr>
338
- <tr id="tr_show_album_name">
339
- <td class="spider_label"><label><?php echo _e('Show gallery title:', 'bwg_back'); ?> </label></td>
340
- <td>
341
- <input type="radio" name="show_album_name" id="show_album_name_1" value="1" <?php if ($wd_bwg_options->show_album_name) echo 'checked="checked"'; ?> onchange="" /><label for="show_album_name_1"><?php echo _e('Yes', 'bwg_back'); ?></label>
342
- <input type="radio" name="show_album_name" id="show_album_name_0" value="0" <?php if (!$wd_bwg_options->show_album_name) echo 'checked="checked"'; ?> onchange="" /><label for="show_album_name_0"><?php echo _e('No', 'bwg_back'); ?></label>
343
- </td>
344
- </tr>
345
- <tr id="tr_show_gallery_description">
346
- <td class="spider_label"><label><?php echo __('Show gallery description:', 'bwg_back'); ?> </label></td>
347
- <td>
348
- <input type="radio" name="show_gallery_description" id="show_gallery_description_1" value="1" <?php if ($wd_bwg_options->show_gallery_description) echo 'checked="checked"'; ?> onchange="" /><label for="show_gallery_description_1"><?php echo __('Yes', 'bwg_back'); ?></label>
349
- <input type="radio" name="show_gallery_description" id="show_gallery_description_0" value="0" <?php if (!$wd_bwg_options->show_gallery_description) echo 'checked="checked"'; ?> onchange="" /><label for="show_gallery_description_0"><?php echo __('No', 'bwg_back'); ?></label>
350
- </td>
351
- </tr>
352
- <!--Slideshow view-->
353
- <tr id="tr_slideshow_effect">
354
- <td class="spider_label"><label for="slideshow_effect"><?php _e("Slideshow Effect:", 'bwg_back'); ?> </label></td>
355
- <td>
356
- <select name="slideshow_effect" class="select_icon" id="slideshow_effect" style="width:150px;">
357
- <?php
358
- foreach ($effects as $key => $effect) {
359
- ?>
360
- <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="' . __("This effect is disabled in free version.","bwg_back") . '"' : ''; ?> <?php echo ($wd_bwg_options->slideshow_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
361
- <?php
362
- }
363
- ?>
364
- </select>
365
- </td>
366
- </tr>
367
- <tr id="tr_slideshow_effect_duration">
368
- <td title="<?php echo __("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label></td>
369
- <td><input type="text" name="slideshow_effect_duration" id="slideshow_effect_duration" value="<?php echo $wd_bwg_options->slideshow_effect_duration; ?>" class="spider_int_input" /> sec.</td>
370
- </tr>
371
- <tr id="tr_slideshow_interval">
372
- <td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
373
- <td><input type="text" name="slideshow_interval" id="slideshow_interval" value="<?php echo $wd_bwg_options->slideshow_interval; ?>" class="spider_int_input" /> sec.</td>
374
- </tr>
375
- <tr id="tr_slideshow_width_height">
376
- <td title="<?php _e("Maximum values for slideshow width and height.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_width"><?php _e("Slideshow dimensions:", 'bwg_back'); ?> </label></td>
377
- <td>
378
- <input type="text" name="slideshow_width" id="slideshow_width" value="<?php echo $wd_bwg_options->slideshow_width; ?>" class="spider_int_input" /> x
379
- <input type="text" name="slideshow_height" id="slideshow_height" value="<?php echo $wd_bwg_options->slideshow_height; ?>" class="spider_int_input" /> px
380
- </td>
381
- </tr>
382
- </tbody>
383
- </table>
384
- </div>
385
- <div class="gallery_album_option_right">
386
- <table style="display:inline-block;">
387
- <tbody>
388
- <!--Thumbnails, Masonry viewies-->
389
- <tr id="tr_masonry_hor_ver">
390
- <td class="spider_label"><label><?php _e("Masonry:", 'bwg_back'); ?> </label></td>
391
- <td>
392
- <input type="radio" name="masonry_hor_ver" id="masonry_ver" value="vertical" onclick="bwg_change_label('image_column_number_label', 'Number of image rows: ');
393
- bwg_change_label('thumb_width_height_label', 'Image thumbnail width: ');
394
- jQuery('#thumb_width').show();
395
- jQuery('#thumb_height').hide();
396
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->masonry == 'vertical') ? 'checked' : ''; ?> /><label for="masonry_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
397
- <input type="radio" name="masonry_hor_ver" id="masonry_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns: ", 'bwg_back'); ?>');
398
- bwg_change_label('thumb_width_height_label', 'Image Thumbnail Height: ');
399
- jQuery('#thumb_width').hide();
400
- jQuery('#thumb_height').show();
401
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->masonry == 'horizontal') ? 'checked' : ''; ?> /><label for="masonry_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
402
- </td>
403
- </tr>
404
- <!--Thumbnails, Mosaic viewies-->
405
- <tr id="tr_mosaic_hor_ver">
406
- <td class="spider_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
407
- <td>
408
- <input type="radio" name="mosaic_hor_ver" id="mosaic_ver" value="vertical" onclick="bwg_change_label('image_column_number_label', '<?php _e("Number of image rows: ", 'bwg_back'); ?>');
409
- bwg_change_label('thumb_width_height_label', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
410
- jQuery('#thumb_width').show();
411
- jQuery('#thumb_height').hide();
412
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
413
- <input type="radio" name="mosaic_hor_ver" id="mosaic_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
414
- bwg_change_label('thumb_width_height_label', '<?php _e("Image Thumbnail Height:", 'bwg_back'); ?> ');
415
- jQuery('#thumb_width').hide();
416
- jQuery('#thumb_height').show();
417
- jQuery('#thumb_width_height_separator').hide();" <?php echo ($wd_bwg_options->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
418
-
419
-
420
- </td>
421
- </tr>
422
- <tr id="tr_resizable_mosaic">
423
- <td title="<?php _e('Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.', 'bwg_back'); ?>" class="spider_label"><label for="resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
424
- <td>
425
- <input type="radio" name="resizable_mosaic" id="resizable_mosaic_1" value="1" <?php echo ($wd_bwg_options->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
426
- <input type="radio" name="resizable_mosaic" id="resizable_mosaic_0" value="0" <?php echo ($wd_bwg_options->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
427
- <br />
428
- </td>
429
- </tr>
430
- <tr id="tr_mosaic_total_width">
431
- <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
432
- <td><input type="text" name="mosaic_total_width" id="mosaic_total_width" value="<?php echo $wd_bwg_options->mosaic_total_width; ?>" class="spider_int_input" /> %</td>
433
- </tr>
434
- <!--Thumbnails, Masonry and Mosaic viewies-->
435
- <tr id="tr_image_column_number">
436
- <td class="spider_label"><label id="image_column_number_label" for="image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
437
- <td><input type="text" name="image_column_number" id="image_column_number" value="<?php echo $wd_bwg_options->image_column_number; ?>" class="spider_int_input" /></td>
438
- </tr>
439
- <tr id="tr_images_per_page">
440
- <td title="<?php _e('If you want to display all images you should leave it blank or insert 0.', 'bwg_back'); ?>" class="spider_label"><label for="images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
441
- <td><input type="text" name="images_per_page" id="images_per_page" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
442
- </tr>
443
- <tr id="tr_image_title_hover">
444
- <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
445
- <td>
446
- <input type="radio" name="image_title" id="image_title_hover" value="hover" <?php echo ($wd_bwg_options->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
447
- <input type="radio" name="image_title" id="image_title_show" value="show" <?php echo ($wd_bwg_options->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
448
- <input type="radio" name="image_title" id="image_title_none" value="none" <?php echo ($wd_bwg_options->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
449
- </td>
450
- </tr>
451
- <tr id="tr_image_enable_page">
452
- <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
453
- <td>
454
- <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_yes" value="1" <?php echo ($wd_bwg_options->image_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
455
- <input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_no" value="0" <?php echo ($wd_bwg_options->image_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_no"><?php _e('No', 'bwg_back'); ?></label>
456
- <span class="bwg_enable_page"><input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($wd_bwg_options->image_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
457
- <input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($wd_bwg_options->image_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label></span>
458
- </td>
459
- </tr>
460
- <tr id="tr_load_more_image_count">
461
- <td class="spider_label"><label for="load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
462
- <td><input type="text" name="load_more_image_count" id="load_more_image_count" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
463
- </tr>
464
- <tr id="tr_thumb_width_height">
465
- <td title="<?php _e('Maximum values for thumbnail dimension.', 'bwg_back'); ?>" class="spider_label"><label id="thumb_width_height_label" for="thumb_width"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
466
- <td>
467
- <input type="text" name="thumb_width" id="thumb_width" value="<?php echo $wd_bwg_options->thumb_width; ?>" class="spider_int_input" /><span id="thumb_width_height_separator"> x </span>
468
- <input type="text" name="thumb_height" id="thumb_height" value="<?php echo $wd_bwg_options->thumb_height; ?>" class="spider_int_input" /> px
469
- </td>
470
- </tr>
471
-
472
- <!--Compact Album view-->
473
- <tr id="tr_compuct_album_column_number">
474
- <td class="spider_label"><label for="compuct_album_column_number"><?php _e("Max. number of album columns:", 'bwg_back'); ?> </label></td>
475
- <td><input type="text" name="compuct_album_column_number" id="compuct_album_column_number" value="<?php echo $wd_bwg_options->album_column_number; ?>" class="spider_int_input" /></td>
476
- </tr>
477
- <tr id="tr_compuct_albums_per_page">
478
- <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
479
- <td><input type="text" name="compuct_albums_per_page" id="compuct_albums_per_page" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
480
- </tr>
481
- <tr id="tr_compuct_album_title_hover">
482
- <td class="spider_label"><label><?php _e("Album title:", 'bwg_back'); ?> </label></td>
483
- <td>
484
- <input type="radio" name="compuct_album_title" id="compuct_album_title_hover" value="hover" <?php echo ($wd_bwg_options->album_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
485
- <input type="radio" name="compuct_album_title" id="compuct_album_title_show" value="show" <?php echo ($wd_bwg_options->album_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
486
- <input type="radio" name="compuct_album_title" id="compuct_album_title_none" value="none" <?php echo ($wd_bwg_options->album_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
487
- </td>
488
- </tr>
489
- <tr id="tr_compuct_album_thumb_width_height">
490
- <td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_thumb_width"><?php _e("Album Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
491
- <td>
492
- <input type="text" name="compuct_album_thumb_width" id="compuct_album_thumb_width" value="<?php echo $wd_bwg_options->album_thumb_width; ?>" class="spider_int_input" /> x
493
- <input type="text" name="compuct_album_thumb_height" id="compuct_album_thumb_height" value="<?php echo $wd_bwg_options->album_thumb_height; ?>" class="spider_int_input" /> px
494
- </td>
495
- </tr>
496
- <tr id="tr_compuct_album_view_type">
497
- <td title="<?php _e('The gallery images view type in the album.<br /><br />This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
498
- <td>
499
- <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_1" value="thumbnail" <?php if ($wd_bwg_options->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
500
- <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_0" value="masonry" <?php if ($wd_bwg_options->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
501
- <input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_2" value="mosaic" <?php if ($wd_bwg_options->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
502
- </td>
503
- </tr>
504
- <tr id="tr_compuct_album_mosaic_hor_ver">
505
- <td title="<?php _e('This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
506
- <td>
507
- <input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_ver" value="vertical" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Number of image rows:", 'bwg_back'); ?> ');
508
- bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail width:", 'bwg_back'); ?> ');
509
- jQuery('#compuct_album_image_thumb_width').show();
510
- jQuery('#compuct_album_image_thumb_height').hide();
511
- jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
512
- <input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
513
- bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail height:", 'bwg_back'); ?> ');
514
- jQuery('#compuct_album_image_thumb_width').hide();
515
- jQuery('#compuct_album_image_thumb_height').show();
516
- jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
517
-
518
-
519
- </td>
520
- </tr>
521
- <tr id="tr_compuct_album_resizable_mosaic">
522
- <td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="compuct_album_resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
523
- <td>
524
- <input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_1" value="1" <?php echo ($wd_bwg_options->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
525
- <input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_0" value="0" <?php echo ($wd_bwg_options->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
526
- <br />
527
- </td>
528
- </tr>
529
- <tr id="tr_compuct_album_mosaic_total_width">
530
- <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
531
- <td><input type="text" name="compuct_album_mosaic_total_width" id="compuct_album_mosaic_total_width" value="<?php echo $wd_bwg_options->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
532
- </tr>
533
- <tr id="tr_compuct_album_image_column_number">
534
- <td class="spider_label"><label for="compuct_album_image_column_number"><?php _e("Max. number of image columns: ", 'bwg_back'); ?></label></td>
535
- <td><input type="text" name="compuct_album_image_column_number" id="compuct_album_image_column_number" value="<?php echo $wd_bwg_options->image_column_number; ?>" class="spider_int_input" /></td>
536
- </tr>
537
- <tr id="tr_compuct_album_images_per_page">
538
- <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
539
- <td><input type="text" name="compuct_album_images_per_page" id="compuct_album_images_per_page" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
540
- </tr>
541
- <tr id="tr_compuct_album_image_title">
542
- <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
543
- <td>
544
- <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_hover" value="hover" <?php echo ($wd_bwg_options->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
545
- <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_show" value="show" <?php echo ($wd_bwg_options->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
546
- <input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_none" value="none" <?php echo ($wd_bwg_options->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
547
- </td>
548
- </tr>
549
- <tr id="tr_compuct_album_image_thumb_width_height">
550
- <td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_image_thumb_width" id="compuct_album_image_thumb_dimensions"><?php _e("Image thumbnail dimensions: ", 'bwg_back'); ?></label></td>
551
- <td>
552
- <input type="text" name="compuct_album_image_thumb_width" id="compuct_album_image_thumb_width" value="<?php echo $wd_bwg_options->thumb_width; ?>" class="spider_int_input" /><span id="compuct_album_image_thumb_dimensions_x" > x </span>
553
- <input type="text" name="compuct_album_image_thumb_height" id="compuct_album_image_thumb_height" value="<?php echo $wd_bwg_options->thumb_height; ?>" class="spider_int_input" /> px
554
- </td>
555
- </tr>
556
- <tr id="tr_compuct_album_enable_page">
557
- <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
558
- <td>
559
- <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_yes" value="1" <?php echo ($wd_bwg_options->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="compuct_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
560
- <input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_no" value="0" <?php echo ($wd_bwg_options->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
561
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($wd_bwg_options->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
562
- <input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($wd_bwg_options->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
563
- </td>
564
- </tr>
565
- <tr id="tr_compuct_albums_per_page_load_more">
566
- <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
567
- <td><input type="text" name="compuct_albums_per_page_load_more" id="compuct_albums_per_page_load_more" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
568
- </tr>
569
- <tr id="tr_compuct_album_load_more_image_count">
570
- <td class="spider_label"><label for="compuct_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
571
- <td><input type="text" name="compuct_album_load_more_image_count" id="compuct_album_load_more_image_count" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
572
- </tr>
573
-
574
- <!--Extended Album view-->
575
- <tr id="tr_extended_albums_per_page">
576
- <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
577
- <td><input type="text" name="extended_albums_per_page" id="extended_albums_per_page" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
578
- </tr>
579
- <tr id="tr_extended_album_height">
580
- <td class="spider_label"><label for="extended_album_height"><?php _e("Album row height:", 'bwg_back'); ?> </label></td>
581
- <td><input type="text" name="extended_album_height" id="extended_album_height" value="<?php echo $wd_bwg_options->extended_album_height; ?>" class="spider_int_input" /> px</td>
582
- </tr>
583
- <tr id="tr_extended_album_description_enable">
584
- <td title="<?php _e("If you disable description only the title of the album will be displayed.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable album description:", 'bwg_back'); ?> </label></td>
585
- <td>
586
- <input type="radio" name="extended_album_description_enable" id="extended_album_description_yes" value="1" <?php echo ($wd_bwg_options->extended_album_description_enable) ? 'checked' : ''; ?> /><label for="extended_album_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
587
- <input type="radio" name="extended_album_description_enable" id="extended_album_description_no" value="0" <?php echo ($wd_bwg_options->extended_album_description_enable) ? '' : 'checked'; ?> /><label for="extended_album_description_no"><?php _e('No', 'bwg_back'); ?></label>
588
- </td>
589
- </tr>
590
- <tr id="tr_extended_album_thumb_width_height">
591
- <td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_thumb_width"><?php _e("Album thumbnail dimensions:", 'bwg_back'); ?> </label></td>
592
- <td>
593
- <input type="text" name="extended_album_thumb_width" id="extended_album_thumb_width" value="<?php echo $wd_bwg_options->album_thumb_width; ?>" class="spider_int_input" /> x
594
- <input type="text" name="extended_album_thumb_height" id="extended_album_thumb_height" value="<?php echo $wd_bwg_options->album_thumb_height; ?>" class="spider_int_input" /> px
595
- </td>
596
- </tr>
597
- <tr id="tr_extended_album_view_type">
598
- <td title="<?php _e("The gallery images view type in the album.", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
599
- <td>
600
- <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_1" value="thumbnail" <?php if ($wd_bwg_options->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
601
- <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_0" value="masonry" <?php if ($wd_bwg_options->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
602
- <input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_2" value="mosaic" <?php if ($wd_bwg_options->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
603
- </td>
604
- </tr>
605
- <tr id="tr_extended_album_mosaic_hor_ver">
606
- <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
607
- <td>
608
- <input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_ver" value="vertical" onclick="bwg_change_label('extended_album_image_column_number', 'Number of image rows: ');
609
- bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
610
- jQuery('#extended_album_image_thumb_width').show();
611
- jQuery('#extended_album_image_thumb_height').hide();
612
- jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
613
- <input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
614
- bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail height: ", 'bwg_back'); ?>');
615
- jQuery('#extended_album_image_thumb_width').hide();
616
- jQuery('#extended_album_image_thumb_height').show();
617
- jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($wd_bwg_options->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
618
-
619
-
620
- </td>
621
- </tr>
622
- <tr id="tr_extended_album_resizable_mosaic">
623
- <td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="extended_album_resizable_mosaic"><?php _e("Resizable mosaic:", 'bwg_back'); ?> </label></td>
624
- <td>
625
- <input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_1" value="1" <?php echo ($wd_bwg_options->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
626
- <input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_0" value="0" <?php echo ($wd_bwg_options->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
627
- <br />
628
- </td>
629
- </tr>
630
- <tr id="tr_extended_album_mosaic_total_width">
631
- <td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
632
- <td><input type="text" name="extended_album_mosaic_total_width" id="extended_album_mosaic_total_width" value="<?php echo $wd_bwg_options->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
633
- </tr>
634
- <tr id="tr_extended_album_image_column_number">
635
- <td class="spider_label"><label for="extended_album_image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
636
- <td><input type="text" name="extended_album_image_column_number" id="extended_album_image_column_number" value="<?php echo $wd_bwg_options->image_column_number; ?>" class="spider_int_input" /></td>
637
- </tr>
638
- <tr id="tr_extended_album_images_per_page">
639
- <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
640
- <td><input type="text" name="extended_album_images_per_page" id="extended_album_images_per_page" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
641
- </tr>
642
- <tr id="tr_extended_album_image_title">
643
- <td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
644
- <td>
645
- <input type="radio" name="extended_album_image_title" id="extended_album_image_title_hover" value="hover" <?php echo ($wd_bwg_options->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="extended_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
646
- <input type="radio" name="extended_album_image_title" id="extended_album_image_title_show" value="show" <?php echo ($wd_bwg_options->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="extended_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
647
- <input type="radio" name="extended_album_image_title" id="extended_album_image_title_none" value="none" <?php echo ($wd_bwg_options->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="extended_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
648
- </td>
649
- </tr>
650
- <tr id="tr_extended_album_image_thumb_width_height">
651
- <td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_image_thumb_width" id="extended_album_image_thumb_dimensions"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
652
- <td>
653
- <input type="text" name="extended_album_image_thumb_width" id="extended_album_image_thumb_width" value="<?php echo $wd_bwg_options->thumb_width; ?>" class="spider_int_input" /><span id="extended_album_image_thumb_dimensions_x" > x </span>
654
- <input type="text" name="extended_album_image_thumb_height" id="extended_album_image_thumb_height" value="<?php echo $wd_bwg_options->thumb_height; ?>" class="spider_int_input" /> px
655
- </td>
656
- </tr>
657
- <tr id="tr_extended_album_enable_page">
658
- <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
659
- <td>
660
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($wd_bwg_options->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
661
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($wd_bwg_options->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
662
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($wd_bwg_options->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
663
- <input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($wd_bwg_options->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
664
- </td>
665
- </tr>
666
- <tr id="tr_extended_albums_per_page_load_more">
667
- <td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
668
- <td><input type="text" name="extended_albums_per_page_load_more" id="extended_albums_per_page_load_more" value="<?php echo $wd_bwg_options->albums_per_page; ?>" class="spider_int_input" /></td>
669
- </tr>
670
- <tr id="tr_extended_album_load_more_image_count">
671
- <td class="spider_label"><label for="extended_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
672
- <td><input type="text" name="extended_album_load_more_image_count" id="extended_album_load_more_image_count" value="<?php echo $wd_bwg_options->images_per_page; ?>" class="spider_int_input" /></td>
673
- </tr>
674
-
675
- <!--Image Browser view-->
676
- <tr id="tr_image_browser_width_height">
677
- <td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="image_browser_width"><?php _e("Image width: ", 'bwg_back'); ?></label></td>
678
- <td>
679
- <input type="text" name="image_browser_width" id="image_browser_width" value="<?php echo $wd_bwg_options->image_browser_width; ?>" class="spider_int_input" /> px
680
- </td>
681
- </tr>
682
- <tr id="tr_image_browser_title_enable">
683
- <td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
684
- <td>
685
- <input type="radio" name="image_browser_title_enable" id="image_browser_title_yes" value="1" <?php echo ($wd_bwg_options->image_browser_title_enable) ? 'checked' : ''; ?> /><label for="image_browser_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
686
- <input type="radio" name="image_browser_title_enable" id="image_browser_title_no" value="0" <?php echo ($wd_bwg_options->image_browser_title_enable) ? '' : 'checked'; ?> /><label for="image_browser_title_no"><?php _e('No', 'bwg_back'); ?></label>
687
- </td>
688
- </tr>
689
- <tr id="tr_image_browser_description_enable">
690
- <td class="spider_label"><label><?php _e("Enable image description:", 'bwg_back'); ?> </label></td>
691
- <td>
692
- <input type="radio" name="image_browser_description_enable" id="image_browser_description_yes" value="1" <?php echo ($wd_bwg_options->image_browser_description_enable) ? 'checked' : ''; ?> /><label for="image_browser_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
693
- <input type="radio" name="image_browser_description_enable" id="image_browser_description_no" value="0" <?php echo ($wd_bwg_options->image_browser_description_enable) ? '' : 'checked'; ?> /><label for="image_browser_description_no"><?php _e('No', 'bwg_back'); ?></label>
694
- </td>
695
- </tr>
696
-
697
- <!--Blog Style view-->
698
- <tr id="tr_blog_style_width_height">
699
- <td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_width"><?php _e("Image width:", 'bwg_back'); ?> </label></td>
700
- <td>
701
- <input type="text" name="blog_style_width" id="blog_style_width" value="<?php echo $wd_bwg_options->blog_style_width; ?>" class="spider_int_input" /> px
702
- </td>
703
- </tr>
704
- <tr id="tr_blog_style_title_enable">
705
- <td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
706
- <td>
707
- <input type="radio" name="blog_style_title_enable" id="blog_style_title_yes" value="1" <?php echo ($wd_bwg_options->blog_style_title_enable) ? 'checked' : ''; ?> /><label for="blog_style_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
708
- <input type="radio" name="blog_style_title_enable" id="blog_style_title_no" value="0" <?php echo ($wd_bwg_options->blog_style_title_enable) ? '' : 'checked'; ?> /><label for="blog_style_title_no"><?php _e('No', 'bwg_back'); ?></label>
709
- </td>
710
- </tr>
711
- <tr id="tr_blog_style_images_per_page">
712
- <td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
713
- <td><input type="text" name="blog_style_images_per_page" id="blog_style_images_per_page" value="<?php echo $wd_bwg_options->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
714
- </tr>
715
- <tr id="tr_blog_style_enable_page">
716
- <td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
717
- <td>
718
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($wd_bwg_options->blog_style_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
719
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($wd_bwg_options->blog_style_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_no"><?php _e('No', 'bwg_back'); ?></label>
720
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_loadmore" value="2" <?php echo ($wd_bwg_options->blog_style_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_loadmore">Load more</label>
721
- <input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($wd_bwg_options->blog_style_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
722
- </td>
723
- </tr>
724
- <tr id="tr_blog_style_load_more_image_count">
725
- <td class="spider_label"><label for="blog_style_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
726
- <td><input type="text" name="blog_style_load_more_image_count" id="blog_style_load_more_image_count" value="<?php echo $wd_bwg_options->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
727
- </tr>
728
- <tr id="tr_enable_slideshow_autoplay">
729
- <td class="spider_label"><label><?php _e("Enable Autoplay:", 'bwg_back'); ?> </label></td>
730
- <td>
731
- <input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_autoplay) ? 'checked' : ''; ?> /><label for="slideshow_autoplay_yes"><?php _e('Yes', 'bwg_back'); ?></label>
732
- <input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_autoplay) ? '' : 'checked'; ?> /><label for="slideshow_autoplay_no"><?php _e('No', 'bwg_back'); ?></label>
733
- </td>
734
- </tr>
735
- <tr id="tr_enable_slideshow_shuffle">
736
- <td class="spider_label"><label><?php _e("Enable Shuffle:", 'bwg_back'); ?> </label></td>
737
- <td>
738
- <input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_shuffle) ? 'checked' : ''; ?> /><label for="slideshow_shuffle_yes"><?php _e('Yes', 'bwg_back'); ?></label>
739
- <input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_shuffle) ? '' : 'checked'; ?> /><label for="slideshow_shuffle_no"><?php _e('No', 'bwg_back'); ?></label>
740
- </td>
741
- </tr>
742
- <tr id="tr_enable_slideshow_ctrl">
743
- <td class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
744
- <td>
745
- <input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_ctrl) ? 'checked' : ''; ?> /><label for="slideshow_ctrl_yes"><?php _e('Yes', 'bwg_back'); ?></label>
746
- <input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_ctrl) ? '' : 'checked'; ?> /><label for="slideshow_ctrl_no"><?php _e('No', 'bwg_back'); ?></label>
747
- </td>
748
- </tr>
749
- <tr id="tr_enable_slideshow_filmstrip">
750
- <td title="<?php _e("Enable slideshow filmstrip view", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable slideshow filmstrip:", 'bwg_back'); ?> </label></td>
751
- <td>
752
- <input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes')" <?php echo ($wd_bwg_options->slideshow_enable_filmstrip) ? 'checked' : ''; ?> /><label for="slideshow_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
753
- <input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_no')" <?php echo ($wd_bwg_options->slideshow_enable_filmstrip) ? '' : 'checked'; ?> /><label for="slideshow_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
754
- </td>
755
- </tr>
756
- <tr id="tr_slideshow_filmstrip_height">
757
- <td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
758
- <td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $wd_bwg_options->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
759
- </tr>
760
- <tr id="tr_slideshow_enable_title">
761
- <td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
762
- <td>
763
- <input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
764
- <input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no"><?php _e('No', 'bwg_back'); ?></label>
765
- </td>
766
- </tr>
767
- <tr id="tr_slideshow_title_position">
768
- <td title="<?php _e("Image title position on slideshow", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Title Position:", 'bwg_back'); ?> </label></td>
769
- <td>
770
- <table class="bws_position_table">
771
- <tbody>
772
- <tr>
773
- <td><input type="radio" value="top-left" id="slideshow_title_top-left" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'top-left') ? 'checked' : ''; ?>></td>
774
- <td><input type="radio" value="top-center" id="slideshow_title_top-center" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'top-center') ? 'checked' : ''; ?>></td>
775
- <td><input type="radio" value="top-right" id="slideshow_title_top-right" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'top-right') ? 'checked' : ''; ?>></td>
776
- </tr>
777
- <tr>
778
- <td><input type="radio" value="middle-left" id="slideshow_title_middle-left" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'middle-left') ? 'checked' : ''; ?>></td>
779
- <td><input type="radio" value="middle-center" id="slideshow_title_middle-center" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'middle-center') ? 'checked' : ''; ?>></td>
780
- <td><input type="radio" value="middle-right" id="slideshow_title_middle-right" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'middle-right') ? 'checked' : ''; ?>></td>
781
- </tr>
782
- <tr>
783
- <td><input type="radio" value="bottom-left" id="slideshow_title_bottom-left" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'bottom-left') ? 'checked' : ''; ?>></td>
784
- <td><input type="radio" value="bottom-center" id="slideshow_title_bottom-center" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'bottom-center') ? 'checked' : ''; ?>></td>
785
- <td><input type="radio" value="bottom-right" id="slideshow_title_bottom-right" name="slideshow_title_position" <?php echo ($wd_bwg_options->slideshow_title_position == 'bottom-right') ? 'checked' : ''; ?>></td>
786
- </tr>
787
- </tbody>
788
- </table>
789
- </td>
790
- </tr>
791
- <tr id="tr_slideshow_full_width_title">
792
- <td title="<?php _e("Display image title based on the slideshow dimensions.", 'bwg_back'); ?>" class="spider_label">
793
- <label><?php _e("Full width title:", 'bwg_back'); ?></label>
794
- </td>
795
- <td>
796
- <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_1" value="1" <?php if ($wd_bwg_options->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
797
- <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_0" value="0" <?php if (!$wd_bwg_options->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
798
- </td>
799
- </tr>
800
- <tr id="tr_slideshow_enable_description">
801
- <td class="spider_label"><label><?php _e("Enable Image Description:", 'bwg_back'); ?> </label></td>
802
- <td>
803
- <input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes')" /><label for="slideshow_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
804
- <input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($wd_bwg_options->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no"><?php _e('No', 'bwg_back'); ?></label>
805
- </td>
806
- </tr>
807
- <tr id="tr_slideshow_description_position">
808
- <td title="<?php _e("Image description position on slideshow", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Description Position: ", 'bwg_back'); ?></label></td>
809
- <td>
810
- <table class="bws_position_table">
811
- <tbody>
812
- <tr>
813
- <td><input type="radio" value="top-left" id="slideshow_description_top-left" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'top-left') ? 'checked' : ''; ?>></td>
814
- <td><input type="radio" value="top-center" id="slideshow_description_top-center" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'top-center') ? 'checked' : ''; ?>></td>
815
- <td><input type="radio" value="top-right" id="slideshow_description_top-right" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'top-right') ? 'checked' : ''; ?>></td>
816
- </tr>
817
- <tr>
818
- <td><input type="radio" value="middle-left" id="slideshow_description_middle-left" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'middle-left') ? 'checked' : ''; ?>></td>
819
- <td><input type="radio" value="middle-center" id="slideshow_description_middle-center" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'middle-center') ? 'checked' : ''; ?>></td>
820
- <td><input type="radio" value="middle-right" id="slideshow_description_middle-right" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'middle-right') ? 'checked' : ''; ?>></td>
821
- </tr>
822
- <tr>
823
- <td><input type="radio" value="bottom-left" id="slideshow_description_bottm-Left" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'bottom-left') ? 'checked' : ''; ?>></td>
824
- <td><input type="radio" value="bottom-center" id="slideshow_description_bottom-center" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'bottom-center') ? 'checked' : ''; ?>></td>
825
- <td><input type="radio" value="bottom-right" id="slideshow_description_bottm-right" name="slideshow_description_position" <?php echo ($wd_bwg_options->slideshow_description_position == 'bottom-right') ? 'checked' : ''; ?>></td>
826
- </tr>
827
- </tbody>
828
- </table>
829
- </td>
830
- </tr>
831
- <tr id="tr_enable_slideshow_music">
832
- <td class="spider_label"><label><?php _e("Enable Slideshow Music:", 'bwg_back'); ?> </label></td>
833
- <td>
834
- <input type="radio" name="enable_slideshow_music" id="slideshow_music_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes')" <?php echo ($wd_bwg_options->slideshow_enable_music) ? 'checked' : ''; ?> /><label for="slideshow_music_yes"><?php _e('Yes', 'bwg_back'); ?></label>
835
- <input type="radio" name="enable_slideshow_music" id="slideshow_music_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_music_url', 'slideshow_music_no')" <?php echo ($wd_bwg_options->slideshow_enable_music) ? '' : 'checked'; ?> /><label for="slideshow_music_no"><?php _e('No', 'bwg_back'); ?></label>
836
- </td>
837
- </tr>
838
- <tr id="tr_slideshow_music_url">
839
- <td title="<?php _e("Enter absolute audio file url or add file from Options page.", 'bwg_back'); ?>" class="spider_label">
840
- <label for="slideshow_music_url"><?php _e("Music url:", 'bwg_back'); ?> </label>
841
- </td>
842
- <td>
843
- <input type="text" id="slideshow_music_url" name="slideshow_music_url" value="<?php echo $wd_bwg_options->slideshow_audio_url; ?>" style="display:inline-block;" />
844
- </td>
845
- </tr>
846
- </tbody>
847
- </table>
848
- </div>
849
- </div>
850
- </div>
851
- </div>
852
- <div class="bwg_short_div type_slideshow" style="border-right: 1px solid #000000;">
853
- <div style="display:table;width:100%;">
854
- <!--Lightbox view-->
855
- <div style="display:table-cell;">
856
- <div class="lightbox_option_left">
857
- <table style="display:inline-block;">
858
- <tbody id="tbody_popup_other">
859
- <tr id="tr_thumb_click_action">
860
- <td class="spider_label"><label><?php _e("Image click action:", 'bwg_back'); ?> </label></td>
861
- <td>
862
- <input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($wd_bwg_options->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
863
- <input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($wd_bwg_options->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
864
- <input type="radio" name="thumb_click_action" id="thumb_click_action_3" value="do_nothing" <?php if ($wd_bwg_options->thumb_click_action == 'do_nothing') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_3"><?php _e("Do Nothing", 'bwg_back'); ?></label>
865
- </td>
866
- </tr>
867
- <tr id="tr_thumb_link_target">
868
- <td title="<?php _e("Open new window when redirecting.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Open in new window:", 'bwg_back'); ?> </label></td>
869
- <td>
870
- <input type="radio" name="thumb_link_target" id="thumb_link_target_yes" value="1" <?php if ($wd_bwg_options->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_yes"><?php _e('Yes', 'bwg_back'); ?></label>
871
- <input type="radio" name="thumb_link_target" id="thumb_link_target_no" value="0" <?php if (!$wd_bwg_options->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_no"><?php _e('No', 'bwg_back'); ?></label>
872
- </td>
873
- </tr>
874
- </tbody>
875
- <tbody id="tbody_popup">
876
- <tr id="tr_popup_fullscreen">
877
- <td title="<?php _e("Enable full width feature for the lightbox.", 'bwg_back'); ?>" class="spider_label">
878
- <label><?php _e("Full width lightbox:", 'bwg_back'); ?></label>
879
- </td>
880
- <td>
881
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($wd_bwg_options->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1"><?php _e('Yes', 'bwg_back'); ?></label>
882
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$wd_bwg_options->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0"><?php _e('No', 'bwg_back'); ?></label>
883
- </td>
884
- </tr>
885
- <tr id="tr_popup_width_height">
886
- <td title="<?php _e("Maximum values for lightbox width and height.", 'bwg_back'); ?>" class="spider_label"><label for="popup_width"><?php _e("Lightbox dimensions:", 'bwg_back'); ?> </label></td>
887
- <td>
888
- <input type="text" name="popup_width" id="popup_width" value="<?php echo $wd_bwg_options->popup_width; ?>" class="spider_int_input" /> x
889
- <input type="text" name="popup_height" id="popup_height" value="<?php echo $wd_bwg_options->popup_height; ?>" class="spider_int_input" /> px
890
- </td>
891
- </tr>
892
- <tr id="tr_popup_effect">
893
- <td title="<?php _e("Lightbox slideshow effect.", 'bwg_back'); ?>" class="spider_label"><label for="popup_effect"><?php _e("Lightbox effect:", 'bwg_back'); ?> </label></td>
894
- <td>
895
- <select name="popup_effect" class="select_icon" id="popup_effect" style="width:150px;">
896
- <?php
897
- foreach ($effects as $key => $effect) {
898
- ?>
899
- <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="This effect is disabled in free version."' : ''; ?> <?php echo ($wd_bwg_options->popup_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
900
- <?php
901
- }
902
- ?>
903
- </select>
904
- </td>
905
- </tr>
906
- <tr id="tr_popup_effect_duration">
907
- <td title="<?php echo __("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label></td>
908
- <td><input type="text" name="popup_effect_duration" id="popup_effect_duration" value="<?php echo $wd_bwg_options->popup_effect_duration; ?>" class="spider_int_input" /> sec.</td>
909
- </tr>
910
- <tr id="tr_popup_autoplay">
911
- <td class="spider_label">
912
- <label><?php _e("Lightbox autoplay:", 'bwg_back'); ?> </label>
913
- </td>
914
- <td>
915
- <input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($wd_bwg_options->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1"><?php _e('Yes', 'bwg_back'); ?></label>
916
- <input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$wd_bwg_options->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0"><?php _e('No', 'bwg_back'); ?></label>
917
- </td>
918
- </tr>
919
- <tr id="tr_popup_interval">
920
- <td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
921
- <td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $wd_bwg_options->popup_interval; ?>" class="spider_int_input" /> sec.</td>
922
- </tr>
923
- <tr id="tr_popup_enable_filmstrip">
924
- <td title="<?php _e("Enable filmstrip view for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable filmstrip in lightbox:", 'bwg_back'); ?> </label></td>
925
- <td>
926
- <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes')" <?php echo ($wd_bwg_options->popup_enable_filmstrip) ? 'checked' : ''; ?> /><label for="popup_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
927
- <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_popup_filmstrip_height', 'popup_filmstrip_no')" <?php echo ($wd_bwg_options->popup_enable_filmstrip) ? '' : 'checked'; ?> /><label for="popup_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
928
- </td>
929
- </tr>
930
- <tr id="tr_popup_filmstrip_height">
931
- <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="popup_filmstrip_height"><?php _e("Filmstrip size:", 'bwg_back'); ?> </label></td>
932
- <td class="spider_free_version_label"><input disabled="disabled" type="text" name="popup_filmstrip_height" id="popup_filmstrip_height" value="<?php echo $wd_bwg_options->popup_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
933
- </tr>
934
- <tr id="tr_popup_hit_counter">
935
- <td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Display hit counter:", 'bwg_back'); ?> </label></td>
936
- <td>
937
- <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_yes" value="1" <?php echo ($wd_bwg_options->popup_hit_counter) ? 'checked' : ''; ?> /><label for="popup_hit_counter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
938
- <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_no" value="0" <?php echo ($wd_bwg_options->popup_hit_counter) ? '' : 'checked'; ?> /><label for="popup_hit_counter_no"><?php _e('No', 'bwg_back'); ?></label>
939
- </td>
940
- </tr>
941
- </tbody>
942
- </table>
943
- </div>
944
- <div class="lightbox_option_right">
945
- <table style="display:inline-block;">
946
- <tr id="tr_popup_enable_ctrl_btn">
947
- <td title="<?php _e("Enable control buttons in lightbox", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
948
- <td>
949
- <input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_yes" value="1" onClick="bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');" <?php echo ($wd_bwg_options->popup_enable_ctrl_btn) ? 'checked' : ''; ?> /><label for="popup_ctrl_btn_yes"><?php _e('Yes', 'bwg_back'); ?></label>
950
- <input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_no" value="0" onClick="bwg_enable_disable('none', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_no');" <?php echo ($wd_bwg_options->popup_enable_ctrl_btn) ? '' : 'checked'; ?> /><label for="popup_ctrl_btn_no"><?php _e('No', 'bwg_back'); ?></label>
951
- </td>
952
- </tr>
953
- <tbody id="tbody_popup_ctrl_btn">
954
- <tr id="tr_popup_enable_fullscreen">
955
- <td title="<?php _e("Enable fullscreen view for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable fullscreen:", 'bwg_back'); ?> </label></td>
956
- <td>
957
- <input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_fullscreen) ? 'checked' : ''; ?> /><label for="popup_fullscreen_yes"><?php _e('Yes', 'bwg_back'); ?></label>
958
- <input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_no" value="0" <?php echo ($wd_bwg_options->popup_enable_fullscreen) ? '' : 'checked'; ?> /><label for="popup_fullscreen_no"><?php _e('No', 'bwg_back'); ?></label>
959
- </td>
960
- </tr>
961
- <tr id="tr_popup_enable_info">
962
- <td title="<?php _e("Enable title, description for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable info:", 'bwg_back'); ?> </label></td>
963
- <td>
964
- <input type="radio" name="popup_enable_info" id="popup_info_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_info) ? 'checked="checked"' : ''; ?> /><label for="popup_info_yes"><?php _e('Yes', 'bwg_back'); ?></label>
965
- <input type="radio" name="popup_enable_info" id="popup_info_no" value="0" <?php echo ($wd_bwg_options->popup_enable_info) ? '' : 'checked="checked"'; ?> /><label for="popup_info_no"><?php _e('No', 'bwg_back'); ?></label>
966
- </td>
967
- </tr>
968
- <tr id="tr_popup_info_always_show">
969
- <td class="spider_label"><label><?php _e("Display info by default:", 'bwg_back'); ?> </label></td>
970
- <td>
971
- <input type="radio" name="popup_info_always_show" id="popup_info_always_show_yes" value="1" <?php echo ($wd_bwg_options->popup_info_always_show) ? 'checked="checked"' : ''; ?> /><label for="popup_info_always_show_yes"><?php _e('Yes', 'bwg_back'); ?></label>
972
- <input type="radio" name="popup_info_always_show" id="popup_info_always_show_no" value="0" <?php echo ($wd_bwg_options->popup_info_always_show) ? '' : 'checked="checked"'; ?> /><label for="popup_info_always_show_no"><?php _e('No', 'bwg_back'); ?></label>
973
- </td>
974
- </tr>
975
- <tr id="tr_popup_info_full_width">
976
- <td title="<?php _e("Display image information based on the lightbox dimensions.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Full width info:", 'bwg_back'); ?></label></td>
977
- <td>
978
- <input type="radio" name="popup_info_full_width" id="popup_info_full_width_1" value="1" <?php if ($wd_bwg_options->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
979
- <input type="radio" name="popup_info_full_width" id="popup_info_full_width_0" value="0" <?php if (!$wd_bwg_options->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
980
- </td>
981
- </tr>
982
- <tr id="tr_popup_enable_rate">
983
- <td title="<?php _e("Enable rating for images", 'bwg_back'); ?><br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label><?php _e("Enable rating:", 'bwg_back'); ?> </label></td>
984
- <td>
985
- <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_rate) ? 'checked="checked"' : ''; ?> /><label for="popup_rate_yes"><?php _e('Yes', 'bwg_back'); ?></label>
986
- <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_no" value="0" <?php echo ($wd_bwg_options->popup_enable_rate) ? '' : 'checked="checked"'; ?> /><label for="popup_rate_no"><?php _e('No', 'bwg_back'); ?></label>
987
- </td>
988
- </tr>
989
- <tr id="tr_popup_enable_comment">
990
- <td title="<?php _e("Enable comments for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable comments:", 'bwg_back'); ?> </label></td>
991
- <td>
992
- <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_comment) ? 'checked' : ''; ?> /><label for="popup_comment_yes"><?php _e('Yes', 'bwg_back'); ?></label>
993
- <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_no" value="0" <?php echo ($wd_bwg_options->popup_enable_comment) ? '' : 'checked'; ?> /><label for="popup_comment_no"><?php _e('No', 'bwg_back'); ?></label>
994
- </td>
995
- </tr>
996
- <tr id="tr_popup_enable_facebook">
997
- <td title="<?php _e("Enable Facebook share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Facebook button:", 'bwg_back'); ?> </label></td>
998
- <td>
999
- <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_facebook) ? 'checked' : ''; ?> /><label for="popup_facebook_yes"><?php _e('Yes', 'bwg_back'); ?></label>
1000
- <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_no" value="0" <?php echo ($wd_bwg_options->popup_enable_facebook) ? '' : 'checked'; ?> /><label for="popup_facebook_no"><?php _e('No', 'bwg_back'); ?></label>
1001
- </td>
1002
- </tr>
1003
- <tr id="tr_popup_enable_twitter">
1004
- <td title="<?php _e("Enable Twitter share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Twitter button:", 'bwg_back'); ?> </label></td>
1005
- <td>
1006
- <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_twitter) ? 'checked' : ''; ?> /><label for="popup_twitter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
1007
- <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_no" value="0" <?php echo ($wd_bwg_options->popup_enable_twitter) ? '' : 'checked'; ?> /><label for="popup_twitter_no"><?php _e('No', 'bwg_back'); ?></label>
1008
- </td>
1009
- </tr>
1010
- <tr id="tr_popup_enable_google">
1011
- <td title="<?php _e("Enable Google+ share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Google+ button:", 'bwg_back'); ?> </label></td>
1012
- <td>
1013
- <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_google) ? 'checked' : ''; ?> /><label for="popup_google_yes"><?php _e('Yes', 'bwg_back'); ?></label>
1014
- <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_no" value="0" <?php echo ($wd_bwg_options->popup_enable_google) ? '' : 'checked'; ?> /><label for="popup_google_no"><?php _e('No', 'bwg_back'); ?></label>
1015
- </td>
1016
- </tr>
1017
- <tr id="tr_popup_enable_pinterest">
1018
- <td title="<?php _e("Enable Pinterest share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Pinterest button:", 'bwg_back'); ?> </label></td>
1019
- <td>
1020
- <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_pinterest) ? 'checked' : ''; ?> /><label for="popup_pinterest_yes"><?php _e('Yes', 'bwg_back'); ?></label>
1021
- <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_no" value="0" <?php echo ($wd_bwg_options->popup_enable_pinterest) ? '' : 'checked'; ?> /><label for="popup_pinterest_no"><?php _e('No', 'bwg_back'); ?></label>
1022
- </td>
1023
- </tr>
1024
- <tr id="tr_popup_enable_tumblr">
1025
- <td title="<?php _e("Enable Tumblr share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Tumblr button:", 'bwg_back'); ?> </label></td>
1026
- <td>
1027
- <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_yes" value="1" <?php echo ($wd_bwg_options->popup_enable_tumblr) ? 'checked' : ''; ?> /><label for="popup_tumblr_yes"><?php _e('Yes', 'bwg_back'); ?></label>
1028
- <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_no" value="0" <?php echo ($wd_bwg_options->popup_enable_tumblr) ? '' : 'checked'; ?> /><label for="popup_tumblr_no"><?php _e('No', 'bwg_back'); ?></label>
1029
- </td>
1030
- </tr>
1031
- </tbody>
1032
- </table>
1033
- </div>
1034
- </div>
1035
- </div>
1036
- </div>
1037
- <div class="bwg_short_div type_advertisement">
1038
- <table>
1039
- <tbody>
1040
- <tr id="tr_watermark_type">
1041
- <td class="spider_label"><label><?php _e("Advertisement Type:", 'bwg_back'); ?> </label></td>
1042
- <td>
1043
- <input type="radio" name="watermark_type" id="watermark_type_none" value="none" onClick="bwg_watermark('watermark_type_none')" <?php echo ($wd_bwg_options->watermark_type == 'none') ? 'checked' : ''; ?> /><label for="watermark_type_none"><?php _e("None", 'bwg_back'); ?></label>
1044
- <input type="radio" name="watermark_type" id="watermark_type_text" value="text" onClick="bwg_watermark('watermark_type_text')" <?php echo ($wd_bwg_options->watermark_type == 'text') ? 'checked' : ''; ?> /><label for="watermark_type_text"><?php _e("Text", 'bwg_back'); ?></label>
1045
- <input type="radio" name="watermark_type" id="watermark_type_image" value="image" onClick="bwg_watermark('watermark_type_image')" <?php echo ($wd_bwg_options->watermark_type == 'image') ? 'checked' : ''; ?> /><label for="watermark_type_image"><?php _e("Image", 'bwg_back'); ?></label>
1046
- </td>
1047
- </tr>
1048
- <tr id="tr_watermark_link">
1049
- <td title="<?php _e("Enter absolute url", 'bwg_back'); ?>, e.g. http://www.example.com" class="spider_label">
1050
- <label for="watermark_link"><?php _e("Advertisement link:", 'bwg_back'); ?> </label>
1051
- </td>
1052
- <td>
1053
- <input type="text" id="watermark_link" name="watermark_link" value="<?php echo $wd_bwg_options->watermark_link; ?>" style="display:inline-block;" />
1054
- </td>
1055
- </tr>
1056
- <tr id="tr_watermark_url">
1057
- <td title="<?php _e("Enter absolute image file url or add file from Options page.", 'bwg_back'); ?>" class="spider_label">
1058
- <label for="watermark_url"><?php _e("Advertisement url:", 'bwg_back'); ?> </label>
1059
- </td>
1060
- <td>
1061
- <input type="text" id="watermark_url" name="watermark_url" value="<?php echo $wd_bwg_options->watermark_url; ?>" style="display:inline-block;" />
1062
- </td>
1063
- </tr>
1064
- <tr id="tr_watermark_width_height">
1065
- <td title="<?php _e("Maximum values for watermark image width and height.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_width"><?php _e("Advertisement dimensions:", 'bwg_back'); ?> </label></td>
1066
- <td>
1067
- <input type="text" name="watermark_width" id="watermark_width" value="<?php echo $wd_bwg_options->watermark_width; ?>" class="spider_int_input" /> x
1068
- <input type="text" name="watermark_height" id="watermark_height" value="<?php echo $wd_bwg_options->watermark_height; ?>" class="spider_int_input" /> px
1069
- </td>
1070
- </tr>
1071
- <tr id="tr_watermark_text">
1072
- <td class="spider_label"><label for="watermark_text"><?php _e("Advertisement text:", 'bwg_back'); ?> </label></td>
1073
- <td>
1074
- <input type="text" name="watermark_text" id="watermark_text" value="<?php echo $wd_bwg_options->watermark_text; ?>" />
1075
- </td>
1076
- </tr>
1077
- <tr id="tr_watermark_font_size">
1078
- <td class="spider_label"><label for="watermark_font_size"><?php _e("Advertisement font size:", 'bwg_back'); ?> </label></td>
1079
- <td>
1080
- <input type="text" name="watermark_font_size" id="watermark_font_size" value="<?php echo $wd_bwg_options->watermark_font_size; ?>" class="spider_int_input" /> px
1081
- </td>
1082
- </tr>
1083
- <tr id="tr_watermark_font">
1084
- <td class="spider_label"><label for="watermark_font"><?php _e("Advertisement font style:", 'bwg_back'); ?> </label></td>
1085
- <td>
1086
- <select name="watermark_font" class="select_icon" id="watermark_font" style="width:150px;">
1087
- <?php
1088
- $google_fonts = WDWLibrary::get_google_fonts();
1089
- $is_google_fonts = (in_array($wd_bwg_options->watermark_font, $google_fonts)) ? true : false;
1090
- $watermark_font_families = $is_google_fonts ? $google_fonts : $watermark_fonts;
1091
- foreach ($watermark_font_families as $key => $watermark_font) {
1092
- ?>
1093
- <option value="<?php echo $watermark_font; ?>" <?php echo ($wd_bwg_options->watermark_font == $watermark_font) ? 'selected="selected"' : ''; ?>><?php echo $watermark_font; ?></option>
1094
- <?php
1095
- }
1096
- ?>
1097
- </select>
1098
- <input type="radio" name="watermark_google_fonts" id="watermark_google_fonts1" onchange="bwg_change_fonts('watermark_font', jQuery(this).attr('id'))" value="1" <?php if ($is_google_fonts) echo 'checked="checked"'; ?> />
1099
- <label for="watermark_google_fonts1" id="watermark_google_fonts1_lbl"><?php echo __('Google fonts', 'bwg_back'); ?></label>
1100
- <input type="radio" name="watermark_google_fonts" id="watermark_google_fonts0" onchange="bwg_change_fonts('watermark_font', '')" value="0" <?php if (!$is_google_fonts) echo 'checked="checked"'; ?> />
1101
- <label for="watermark_google_fonts0" id="watermark_google_fonts0_lbl"><?php echo __('Default', 'bwg_back'); ?></label>
1102
- </td>
1103
- </tr>
1104
- <tr id="tr_watermark_color">
1105
- <td class="spider_label"><label for="watermark_color"><?php _e("Advertisement color:", 'bwg_back'); ?> </label></td>
1106
- <td>
1107
- <input type="text" name="watermark_color" id="watermark_color" value="<?php echo $wd_bwg_options->watermark_color; ?>" class="color" />
1108
- </td>
1109
- </tr>
1110
- <tr id="tr_watermark_opacity">
1111
- <td title="<?php _e("Value must be between 0 to 100.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_opacity"><?php _e("Advertisement opacity:", 'bwg_back'); ?> </label></td>
1112
- <td>
1113
- <input type="text" name="watermark_opacity" id="watermark_opacity" value="<?php echo $wd_bwg_options->watermark_opacity; ?>" class="spider_int_input" /> %
1114
- </td>
1115
- </tr>
1116
- <tr id="tr_watermark_position">
1117
- <td class="spider_label"><label><?php _e("Advertisement Position:", 'bwg_back'); ?> </label></td>
1118
- <td>
1119
- <table class="bws_position_table">
1120
- <tbody>
1121
- <tr>
1122
- <td><input type="radio" value="top-left" id="watermark_top-left" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'top-left') ? 'checked' : ''; ?>></td>
1123
- <td><input type="radio" value="top-center" id="watermark_top-center" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'top-center') ? 'checked' : ''; ?>></td>
1124
- <td><input type="radio" value="top-right" id="watermark_top-right" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'top-right') ? 'checked' : ''; ?>></td>
1125
- </tr>
1126
- <tr>
1127
- <td><input type="radio" value="middle-left" id="watermark_middle-left" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'middle-left') ? 'checked' : ''; ?>></td>
1128
- <td><input type="radio" value="middle-center" id="watermark_middle-center" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'middle-center') ? 'checked' : ''; ?>></td>
1129
- <td><input type="radio" value="middle-right" id="watermark_middle-right" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'middle-right') ? 'checked' : ''; ?>></td>
1130
- </tr>
1131
- <tr>
1132
- <td><input type="radio" value="bottom-left" id="watermark_bottom-left" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'bottom-left') ? 'checked' : ''; ?>></td>
1133
- <td><input type="radio" value="bottom-center" id="watermark_bottom-center" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'bottom-center') ? 'checked' : ''; ?>></td>
1134
- <td><input type="radio" value="bottom-right" id="watermark_bottom-right" name="watermark_position" <?php echo ($wd_bwg_options->watermark_position == 'bottom-right') ? 'checked' : ''; ?>></td>
1135
- </tr>
1136
- </tbody>
1137
- </table>
1138
- </td>
1139
- </tr>
1140
- </tbody>
1141
- </table>
1142
- </div>
1143
- <?php
1144
- if (!$from_menu) {
1145
- ?>
1146
- </div>
1147
- </div>
1148
- <div class="mceActionPanel">
1149
- <input type="button" id="insert" name="insert" value="<?php _e("Insert", 'bwg_back'); ?>" onClick="bwg_insert_shortcode('');" />
1150
- <a id="bwg_pro_version_link" class="bwg_link_shortcode" target="_blank" href="http://wpdemo.web-dorado.com/thumbnails-view-2/"><?php _e("Please see Pro ", 'bwg_back'); ?><span id="bwg_pro_version"><?php _e("Thumbnail", 'bwg_back'); ?></span> <?php _e("View", 'bwg_back'); ?></a>
1151
- </div>
1152
- </div>
1153
- <?php
1154
- }
1155
- else {
1156
- $tagtext = '';
1157
- $tagfunction = '';
1158
- if (isset($_POST['currrent_id'])) {
1159
- $currrent_id = stripslashes($_POST['currrent_id']);
1160
- $title = ((isset($_POST['title'])) ? stripslashes($_POST['title']) : '');
1161
- $tagtext = '[Best_Wordpress_Gallery id="' . $currrent_id . '"' . $title . ']';
1162
- $tagfunction = "<?php echo photo_gallery(" . $currrent_id . "); ?>";
1163
- }
1164
- ?>
1165
- <hr class="bwg_hr_shortcode" style="float: left; width: 100%;" />
1166
- <span style="float: left; width: 100%;">
1167
- <a id="bwg_pro_version_link" class="wd-btn wd-btn-primary-blue wd-not-image" target="_blank" style="display: table; margin-bottom: 5px;" href="https://web-dorado.com/files/fromPhotoGallery.php"><?php _e("Please see Pro", 'bwg_back'); ?> <span id="bwg_pro_version"><?php _e("Thumbnail", 'bwg_back'); ?></span> <?php _e("View", 'bwg_back'); ?></a>
1168
- <input type="button" class="wd-btn wd-btn-primary-blue wd-not-image" id="insert" name="insert" value="<?php echo __("Generate", 'bwg_back'); ?>" onclick="bwg_insert_shortcode(''); jQuery('#loading_div').show(); jQuery('#opacity_div').show();" />
1169
- <input type="button" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-import" id="import" name="import" value="<?php echo __("Import", 'bwg_back'); ?>" onclick="bwg_update_shortcode()" />
1170
- <div>
1171
- <input type="text" size="55" id="bwg_shortcode" name="bwg_shortcode" value='<?php echo $tagtext; ?>' onclick="bwg_onKeyDown(event)" />
1172
- <b><?php _e('Shortcode', 'bwg_back'); ?></b>
1173
- </div>
1174
- <div>
1175
- <input type="text" size="55" id="bwg_function" name="bwg_function" value="<?php echo $tagfunction; ?>" onclick="spider_select_value(this)" readonly="readonly" />
1176
- <b><?php _e('PHP function', 'bwg_back'); ?></b>
1177
- </div>
1178
- </span>
1179
- </div>
1180
- <div id="opacity_div" style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 99998; background-color: rgba(0, 0, 0, 0.2); display: none;"></div>
1181
- <div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
1182
- <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.gif'; ?>" class="bwg_spider_ajax_loading" style="margin-top: 200px; width:30px;" />
1183
- </div>
1184
- <?php
1185
- }
1186
- ?>
1187
- <input type="hidden" id="tagtext" name="tagtext" value="" />
1188
- <input type="hidden" id="currrent_id" name="currrent_id" value="" />
1189
- <input type="hidden" id="title" name="title" value="" />
1190
- <input type="hidden" id="bwg_insert" name="bwg_insert" value="" />
1191
- <input type="hidden" id="task" name="task" value="" />
1192
- </form>
1193
- <script type="text/javascript">
1194
- var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
1195
- var shortcodes = [];
1196
- var shortcode_id = 1;
1197
- <?php
1198
- foreach ($shortcodes as $shortcode) {
1199
- ?>
1200
- shortcodes[<?php echo $shortcode->id; ?>] = '<?php echo addslashes($shortcode->tagtext); ?>';
1201
- <?php
1202
- }
1203
- ?>
1204
- shortcode_id = <?php echo $shortcode_max_id + 1; ?>;
1205
- window.onload = bwg_shortcode_load;
1206
- var params = get_params("Best_Wordpress_Gallery");
1207
- var bwg_insert = 1;
1208
- bwg_update_shortcode();
1209
- <?php if (!$from_menu) { ?>
1210
- var content = top.tinyMCE.activeEditor.selection.getContent();
1211
- <?php } else { ?>
1212
- var content = jQuery("#bwg_shortcode").val();
1213
- <?php } ?>
1214
- function bwg_update_shortcode() {
1215
- params = get_params("Best_Wordpress_Gallery");
1216
- if (!params) { // Insert.
1217
- <?php if (!$from_menu) { ?>
1218
- jQuery('#insert').val('Insert');
1219
- <?php } ?>
1220
- bwg_gallery_type('thumbnails');
1221
- }
1222
- else { // Update.
1223
- if (params['id']) {
1224
- shortcode_id = params['id'];
1225
- if(typeof shortcodes[shortcode_id] === 'undefined'){
1226
- alert("<?php echo addslashes(__('There is no shortcode with such ID!', 'bwg_back')); ?>");
1227
- bwg_gallery_type('thumbnails');
1228
- return 0;
1229
- }
1230
- var short_code = get_short_params(shortcodes[shortcode_id]);
1231
- bwg_insert = 0;
1232
- }
1233
- else {
1234
- var short_code = get_params("Best_Wordpress_Gallery");
1235
- }
1236
- <?php if (!$from_menu) { ?>
1237
- jQuery('#insert').val('Update');
1238
- <?php } else { ?>
1239
- content = jQuery("#bwg_shortcode").val();
1240
- <?php } ?>
1241
- jQuery('#insert').attr('onclick', "bwg_insert_shortcode(content)");
1242
- jQuery("select[id=theme] option[value='" + short_code['theme_id'] + "']").attr('selected', 'selected');
1243
- jQuery("select[id=gallery_types_name] option[value='" + short_code['gallery_type'] + "']").attr('selected', 'selected');
1244
- if ( short_code['use_option_defaults'] == 1 ) {
1245
- switch ( short_code['type'] ) {
1246
- case 'gallery': {
1247
- jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
1248
- break;
1249
- }
1250
- case 'album': {
1251
- jQuery("select[id=album] option[value='" + short_code['album_id'] + "']").attr('selected', 'selected');
1252
- break;
1253
- }
1254
- }
1255
- jQuery("select[id=tag] option[value='" + short_code['tag'] + "']").attr('selected', 'selected');
1256
- bwg_gallery_type(short_code['gallery_type']);
1257
- return false;
1258
- }
1259
- switch (short_code['gallery_type']) {
1260
- case 'thumbnails': {
1261
- jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
1262
- jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
1263
- jQuery("select[id=tag] option[value='" + short_code['tag'] + "']").attr('selected', 'selected');
1264
- if (short_code['order_by'] == 'asc') {
1265
- jQuery("#order_by_1").attr('checked', 'checked');
1266
- }
1267
- else {
1268
- jQuery("#order_by_0").attr('checked', 'checked');
1269
- }
1270
- if (short_code['show_search_box'] == 1) {
1271
- jQuery("#show_search_box_1").attr('checked', 'checked');
1272
- jQuery("#tr_search_box_width").css('display', '');
1273
- }
1274
- else {
1275
- jQuery("#show_search_box_0").attr('checked', 'checked');
1276
- jQuery("#tr_search_box_width").css('display', 'none');
1277
- }
1278
- if (short_code['show_sort_images'] == 1) {
1279
- jQuery("#show_sort_images_1").attr('checked', 'checked');
1280
- }
1281
- else {
1282
- jQuery("#show_sort_images_0").attr('checked', 'checked');
1283
- }
1284
- if (short_code['show_tag_box'] == 1) {
1285
- jQuery("#show_tag_box_1").attr('checked', 'checked');
1286
- }
1287
- else {
1288
- jQuery("#show_tag_box_0").attr('checked', 'checked');
1289
- }
1290
- if (short_code['search_box_width']) {
1291
- jQuery("#search_box_width").val(short_code['search_box_width']);
1292
- }
1293
- jQuery("#image_column_number").val(short_code['image_column_number']);
1294
- jQuery("#images_per_page").val(short_code['images_per_page']);
1295
- jQuery("#load_more_image_count").val(short_code['load_more_image_count']);
1296
- jQuery("#image_title_" + short_code['image_title']).attr('checked', 'checked');
1297
- if (short_code['image_enable_page'] == 1) {
1298
- jQuery("#image_page_yes").attr('checked', 'checked');
1299
- }
1300
- else if (short_code['image_enable_page'] == 0) {
1301
- jQuery("#image_page_no").attr('checked', 'checked');
1302
- }
1303
- else if (short_code['image_enable_page'] == 2) {
1304
- jQuery("#image_page_loadmore").attr('checked', 'checked');
1305
- }
1306
- else if (short_code['image_enable_page'] == 3) {
1307
- jQuery("#image_page_scrol_load").attr('checked', 'checked');
1308
- }
1309
- if (short_code['show_gallery_description'] == 1) {
1310
- jQuery("#show_gallery_description_1").attr('checked', 'checked');
1311
- }
1312
- else {
1313
- jQuery("#show_gallery_description_0").attr('checked', 'checked');
1314
- }
1315
- if (short_code['showthumbs_name'] == 1) {
1316
- jQuery("#showthumbs_name_1").attr('checked', 'checked');
1317
- }
1318
- else {
1319
- jQuery("#showthumbs_name_0").attr('checked', 'checked');
1320
- }
1321
- jQuery("#thumb_width").val(short_code['thumb_width']);
1322
- jQuery("#thumb_height").val(short_code['thumb_height']);
1323
- break;
1324
-
1325
- }
1326
- case 'slideshow': {
1327
- jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
1328
- jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
1329
- jQuery("select[id=tag] option[value='" + short_code['tag'] + "']").attr('selected', 'selected');
1330
- if (short_code['order_by'] == 'asc') {
1331
- jQuery("#order_by_1").attr('checked', 'checked');
1332
- }
1333
- else {
1334
- jQuery("#order_by_0").attr('checked', 'checked');
1335
- }
1336
- jQuery("select[id=slideshow_effect] option[value='" + short_code['slideshow_effect'] + "']").attr('selected', 'selected');
1337
- jQuery("#slideshow_interval").val(short_code['slideshow_interval']);
1338
- jQuery("#slideshow_effect_duration").val(short_code['slideshow_effect_duration']);
1339
- jQuery("#slideshow_width").val(short_code['slideshow_width']);
1340
- jQuery("#slideshow_height").val(short_code['slideshow_height']);
1341
- if (short_code['enable_slideshow_autoplay'] == 1) {
1342
- jQuery("#slideshow_autoplay_yes").attr('checked', 'checked');
1343
- }
1344
- else {
1345
- jQuery("#slideshow_autoplay_no").attr('checked', 'checked');
1346
- }
1347
- if (short_code['enable_slideshow_shuffle'] == 1) {
1348
- jQuery("#slideshow_shuffle_yes").attr('checked', 'checked');
1349
- }
1350
- else {
1351
- jQuery("#slideshow_shuffle_no").attr('checked', 'checked');
1352
- }
1353
- if (short_code['enable_slideshow_ctrl'] == 1) {
1354
- jQuery("#slideshow_ctrl_yes").attr('checked', 'checked');
1355
- }
1356
- else {
1357
- jQuery("#slideshow_ctrl_no").attr('checked', 'checked');
1358
- }
1359
- if (short_code['enable_slideshow_filmstrip'] == 1) {
1360
- jQuery("#slideshow_filmstrip_yes").attr('checked', 'checked');
1361
- jQuery("#slideshow_filmstrip_height").val(short_code['slideshow_filmstrip_height']);
1362
- bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes');
1363
- }
1364
- else {
1365
- jQuery("#slideshow_filmstrip_no").attr('checked', 'checked');
1366
- }
1367
- if (short_code['slideshow_enable_title'] == 1) {
1368
- jQuery("#slideshow_title_yes").attr('checked', 'checked');
1369
- jQuery("#slideshow_title_" + short_code['slideshow_title_position']).attr('checked', 'checked');
1370
- bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes');
1371
- }
1372
- else {
1373
- jQuery("#slideshow_title_no").attr('checked', 'checked');
1374
- }
1375
- if (short_code['slideshow_enable_description'] == 1) {
1376
- jQuery("#slideshow_description_yes").attr('checked', 'checked');
1377
- jQuery("#slideshow_description_" + short_code['slideshow_description_position']).attr('checked', 'checked');
1378
- bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes');
1379
- }
1380
- else {
1381
- jQuery("#slideshow_description_no").attr('checked', 'checked');
1382
- }
1383
- if (short_code['enable_slideshow_music'] == 1) {
1384
- jQuery("#slideshow_music_yes").attr('checked', 'checked');
1385
- jQuery("#slideshow_music_url").val(short_code['slideshow_music_url']);
1386
- bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes');
1387
- }
1388
- else {
1389
- jQuery("#slideshow_music_no").attr('checked', 'checked');
1390
- }
1391
- break;
1392
- }
1393
- case 'image_browser': {
1394
- jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
1395
- jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
1396
- jQuery("select[id=tag] option[value='" + short_code['tag'] + "']").attr('selected', 'selected');
1397
- if (short_code['order_by'] == 'asc') {
1398
- jQuery("#order_by_1").attr('checked', 'checked');
1399
- }
1400
- else {
1401
- jQuery("#order_by_0").attr('checked', 'checked');
1402
- }
1403
- if (short_code['show_search_box'] == 1) {
1404
- jQuery("#show_search_box_1").attr('checked', 'checked');
1405
- jQuery("#tr_search_box_width").css('display', '');
1406
- }
1407
- else {
1408
- jQuery("#show_search_box_0").attr('checked', 'checked');
1409
- jQuery("#tr_search_box_width").css('display', 'none');
1410
- }
1411
- if (short_code['search_box_width']) {
1412
- jQuery("#search_box_width").val(short_code['search_box_width']);
1413
- }
1414
- jQuery("#image_browser_width").val(short_code['image_browser_width']);
1415
- if (short_code['image_browser_title_enable'] == 1) {
1416
- jQuery("#image_browser_title_yes").attr('checked', 'checked');
1417
- }
1418
- else {
1419
- jQuery("#image_browser_title_no").attr('checked', 'checked');
1420
- }
1421
- if (short_code['image_browser_description_enable'] == 1) {
1422
- jQuery("#image_browser_description_yes").attr('checked', 'checked');
1423
- }
1424
- else {
1425
- jQuery("#image_browser_description_no").attr('checked', 'checked');
1426
- }
1427
- if (short_code['show_gallery_description'] == 1) {
1428
- jQuery("#show_gallery_description_1").attr('checked', 'checked');
1429
- }
1430
- else {
1431
- jQuery("#show_gallery_description_0").attr('checked', 'checked');
1432
- }
1433
- if (short_code['showthumbs_name'] == 1) {
1434
- jQuery("#showthumbs_name_1").attr('checked', 'checked');
1435
- }
1436
- else {
1437
- jQuery("#showthumbs_name_0").attr('checked', 'checked');
1438
- }
1439
- break;
1440
-
1441
- }
1442
- case 'album_compact_preview': {
1443
- jQuery("select[id=album] option[value='" + short_code['album_id'] + "']").attr('selected', 'selected');
1444
- jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
1445
- if (short_code['order_by'] == 'asc') {
1446
- jQuery("#order_by_1").attr('checked', 'checked');
1447
- }
1448
- else {
1449
- jQuery("#order_by_0").attr('checked', 'checked');
1450
- }
1451
- if (short_code['show_search_box'] == 1) {
1452
- jQuery("#show_search_box_1").attr('checked', 'checked');
1453
- jQuery("#tr_search_box_width").css('display', '');
1454
- }
1455
- else {
1456
- jQuery("#show_search_box_0").attr('checked', 'checked');
1457
- jQuery("#tr_search_box_width").css('display', 'none');
1458
- }
1459
- if (short_code['show_sort_images'] == 1) {
1460
- jQuery("#show_sort_images_1").attr('checked', 'checked');
1461
- }
1462
- else {
1463
- jQuery("#show_sort_images_0").attr('checked', 'checked');
1464
- }
1465
- if (short_code['search_box_width']) {
1466
- jQuery("#search_box_width").val(short_code['search_box_width']);
1467
- }
1468
- jQuery("#compuct_album_column_number").val(short_code['compuct_album_column_number']);
1469
- jQuery("#compuct_albums_per_page").val(short_code['compuct_albums_per_page']);
1470
- jQuery("#compuct_album_title_" + short_code['compuct_album_title']).attr('checked', 'checked');
1471
- jQuery("#compuct_album_thumb_width").val(short_code['compuct_album_thumb_width']);
1472
- jQuery("#compuct_album_thumb_height").val(short_code['compuct_album_thumb_height']);
1473
- jQuery("#compuct_album_image_column_number").val(short_code['compuct_album_image_column_number']);
1474
- jQuery("#compuct_album_images_per_page").val(short_code['compuct_album_images_per_page']);
1475
- jQuery("#compuct_album_image_title_" + short_code['compuct_album_image_title']).attr('checked', 'checked');
1476
- jQuery("#compuct_album_image_thumb_width").val(short_code['compuct_album_image_thumb_width']);
1477
- jQuery("#compuct_album_image_thumb_height").val(short_code['compuct_album_image_thumb_height']);
1478
- jQuery("#compuct_album_load_more_image_count").val(short_code['compuct_album_load_more_image_count']);
1479
- jQuery("#compuct_albums_per_page_load_more").val(short_code['compuct_albums_per_page_load_more']);
1480
- if (short_code['compuct_album_enable_page'] == 1) {
1481
- jQuery("#compuct_album_page_yes").attr('checked', 'checked');
1482
- }
1483
- else if (short_code['compuct_album_enable_page'] == 0) {
1484
- jQuery("#compuct_album_page_no").attr('checked', 'checked');
1485
- }
1486
- else if (short_code['compuct_album_enable_page'] == 2) {
1487
- jQuery("#compuct_album_page_loadmore").attr('checked', 'checked');
1488
- }
1489
- else if (short_code['compuct_album_enable_page'] == 3) {
1490
- jQuery("#compuct_album_page_scrol_load").attr('checked', 'checked');
1491
- }
1492
- if (short_code['compuct_album_view_type'] == 'thumbnail') {
1493
- jQuery("#compuct_album_view_type_1").attr('checked', 'checked');
1494
- }
1495
- else if (short_code['compuct_album_view_type'] == 'masonry'){
1496
- jQuery("#compuct_album_view_type_0").attr('checked', 'checked');
1497
- }
1498
- else{
1499
- jQuery("#compuct_album_view_type_2").attr('checked', 'checked');
1500
- }
1501
- if (short_code['compuct_album_mosaic_hor_ver'] == "vertical") {
1502
- jQuery("#compuct_album_mosaic_ver").attr('checked', 'checked');
1503
- }
1504
- else {
1505
- jQuery("#compuct_album_mosaic_hor").attr('checked', 'checked');
1506
- }
1507
- if (short_code['compuct_album_resizable_mosaic'] == 1) {
1508
- jQuery("#compuct_album_resizable_mosaic_1").attr('checked', 'checked');
1509
- }
1510
- else {
1511
- jQuery("#compuct_album_resizable_mosaic_0").attr('checked', 'checked');
1512
- }
1513
- if (short_code['show_tag_box'] == 1) {
1514
- jQuery("#show_tag_box_1").attr('checked', 'checked');
1515
- }
1516
- else {
1517
- jQuery("#show_tag_box_0").attr('checked', 'checked');
1518
- }
1519
- if (short_code['show_gallery_description'] == 1) {
1520
- jQuery("#show_gallery_description_1").attr('checked', 'checked');
1521
- }
1522
- else {
1523
- jQuery("#show_gallery_description_0").attr('checked', 'checked');
1524
- }
1525
- if (short_code['show_album_name'] == 1) {
1526
- jQuery("#show_album_name_1").attr('checked', 'checked');
1527
- }
1528
- else {
1529
- jQuery("#show_album_name_0").attr('checked', 'checked');
1530
- }
1531
- jQuery("#compuct_album_mosaic_total_width").val(short_code['compuct_album_mosaic_total_width']);
1532
- break;
1533
-
1534
- }
1535
- case 'album_extended_preview': {
1536
- jQuery("select[id=album] option[value='" + short_code['album_id'] + "']").attr('selected', 'selected');
1537
- jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
1538
- if (short_code['order_by'] == 'asc') {
1539
- jQuery("#order_by_1").attr('checked', 'checked');
1540
- }
1541
- else {
1542
- jQuery("#order_by_0").attr('checked', 'checked');
1543
- }
1544
- if (short_code['show_search_box'] == 1) {
1545
- jQuery("#show_search_box_1").attr('checked', 'checked');
1546
- jQuery("#tr_search_box_width").css('display', '');
1547
- }
1548
- else {
1549
- jQuery("#show_search_box_0").attr('checked', 'checked');
1550
- jQuery("#tr_search_box_width").css('display', 'none');
1551
- }
1552
- if (short_code['show_sort_images'] == 1) {
1553
- jQuery("#show_sort_images_1").attr('checked', 'checked');
1554
- }
1555
- else {
1556
- jQuery("#show_sort_images_0").attr('checked', 'checked');
1557
- }
1558
- if (short_code['search_box_width']) {
1559
- jQuery("#search_box_width").val(short_code['search_box_width']);
1560
- }
1561
- jQuery("#extended_albums_per_page").val(short_code['extended_albums_per_page']);
1562
- jQuery("#extended_album_height").val(short_code['extended_album_height']);
1563
- if (short_code['extended_album_description_enable'] == 1) {
1564
- jQuery("#extended_album_description_yes").attr('checked', 'checked');
1565
- }
1566
- else {
1567
- jQuery("#extended_album_description_no").attr('checked', 'checked');
1568
- }
1569
- jQuery("#extended_album_thumb_width").val(short_code['extended_album_thumb_width']);
1570
- jQuery("#extended_album_thumb_height").val(short_code['extended_album_thumb_height']);
1571
- jQuery("#extended_album_image_column_number").val(short_code['extended_album_image_column_number']);
1572
- jQuery("#extended_album_images_per_page").val(short_code['extended_album_images_per_page']);
1573
- jQuery("#extended_album_image_title_" + short_code['extended_album_image_title']).attr('checked', 'checked');
1574
- jQuery("#extended_album_image_thumb_width").val(short_code['extended_album_image_thumb_width']);
1575
- jQuery("#extended_album_image_thumb_height").val(short_code['extended_album_image_thumb_height']);
1576
- jQuery("#extended_albums_per_page_load_more").val(short_code['extended_albums_per_page_load_more']);
1577
- jQuery("#extended_album_load_more_image_count").val(short_code['extended_album_load_more_image_count']);
1578
- if (short_code['extended_album_enable_page'] == 1) {
1579
- jQuery("#extended_album_page_yes").attr('checked', 'checked');
1580
- }
1581
- else if (short_code['extended_album_enable_page'] == 0) {
1582
- jQuery("#extended_album_page_no").attr('checked', 'checked');
1583
- }
1584
- else if (short_code['extended_album_enable_page'] == 2) {
1585
- jQuery("#extended_album_page_loadmore").attr('checked', 'checked');
1586
- }
1587
- else if (short_code['extended_album_enable_page'] == 3){
1588
- jQuery("#extended_album_page_scrol_load").attr('checked', 'checked');
1589
- }
1590
- if (short_code['extended_album_view_type'] == 'thumbnail') {
1591
- jQuery("#extended_album_view_type_1").attr('checked', 'checked');
1592
- }
1593
- else if(short_code['extended_album_view_type'] == 'masonry'){
1594
- jQuery("#extended_album_view_type_0").attr('checked', 'checked');
1595
- }
1596
- else{
1597
- jQuery("#extended_album_view_type_2").attr('checked', 'checked');
1598
- }
1599
- if (short_code['extended_album_mosaic_hor_ver'] == "vertical") {
1600
- jQuery("#extended_album_mosaic_ver").attr('checked', 'checked');
1601
- }
1602
- else {
1603
- jQuery("#extended_album_mosaic_hor").attr('checked', 'checked');
1604
- }
1605
- if (short_code['extended_album_resizable_mosaic'] == 1) {
1606
- jQuery("#extended_album_resizable_mosaic_1").attr('checked', 'checked');
1607
- }
1608
- else {
1609
- jQuery("#extended_album_resizable_mosaic_0").attr('checked', 'checked');
1610
- }
1611
- if (short_code['show_tag_box'] == 1) {
1612
- jQuery("#show_tag_box_1").attr('checked', 'checked');
1613
- }
1614
- else {
1615
- jQuery("#show_tag_box_0").attr('checked', 'checked');
1616
- }
1617
- jQuery("#extended_album_mosaic_total_width").val(short_code['extended_album_mosaic_total_width']);
1618
- if (short_code['show_gallery_description'] == 1) {
1619
- jQuery("#show_gallery_description_1").attr('checked', 'checked');
1620
- }
1621
- else {
1622
- jQuery("#show_gallery_description_0").attr('checked', 'checked');
1623
- }
1624
- if (short_code['show_album_name'] == 1) {
1625
- jQuery("#show_album_name_1").attr('checked', 'checked');
1626
- }
1627
- else {
1628
- jQuery("#show_album_name_0").attr('checked', 'checked');
1629
- }
1630
- break;
1631
-
1632
- }
1633
- }
1634
- // Lightbox.
1635
- if (short_code['popup_width'] != undefined) {
1636
- jQuery("#popup_width").val(short_code['popup_width']);
1637
- }
1638
- if (short_code['popup_height'] != undefined) {
1639
- jQuery("#popup_height").val(short_code['popup_height']);
1640
- }
1641
- if (short_code['popup_effect'] != undefined) {
1642
- jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
1643
- }
1644
- if (short_code['popup_interval'] != undefined) {
1645
- jQuery("#popup_interval").val(short_code['popup_interval']);
1646
- }
1647
- if (short_code['popup_effect_duration'] != undefined){
1648
- jQuery("#popup_effect_duration").val(short_code['popup_effect_duration']);
1649
- }
1650
- if(short_code['popup_fullscreen'] != undefined) {
1651
- if (short_code['popup_fullscreen'] == 1) {
1652
- jQuery("#popup_fullscreen_1").attr('checked', 'checked');
1653
- jQuery("#tr_popup_width_height").css('display', 'none');
1654
- }
1655
- else {
1656
- jQuery("#popup_fullscreen_0").attr('checked', 'checked');
1657
- jQuery("#tr_popup_width_height").css('display', '');
1658
- }
1659
- }
1660
- if(short_code['popup_autoplay'] != undefined) {
1661
- if (short_code['popup_autoplay'] == 1) {
1662
- jQuery("#popup_autoplay_1").attr('checked', 'checked');
1663
- }
1664
- else {
1665
- jQuery("#popup_autoplay_0").attr('checked', 'checked');
1666
- }
1667
- }
1668
- if(short_code['popup_enable_filmstrip'] != undefined) {
1669
- if (short_code['popup_enable_filmstrip'] == 1) {
1670
- jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
1671
- jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
1672
- bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes');
1673
- }
1674
- else {
1675
- jQuery("#popup_filmstrip_no").attr('checked', 'checked');
1676
- }
1677
- }
1678
- if (short_code['popup_enable_ctrl_btn'] != undefined){
1679
- if (short_code['popup_enable_ctrl_btn'] == 1) {
1680
- jQuery("#popup_ctrl_btn_yes").attr('checked', 'checked');
1681
- bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');
1682
- if (short_code['popup_enable_fullscreen'] == 1) {
1683
- jQuery("#popup_fullscreen_yes").attr('checked', 'checked');
1684
- }
1685
- else {
1686
- jQuery("#popup_fullscreen_no").attr('checked', 'checked');
1687
- }
1688
- if (short_code['popup_enable_info'] == 1 || !short_code['popup_enable_info']) {
1689
- jQuery("#popup_info_yes").attr('checked', 'checked');
1690
- }
1691
- else {
1692
- jQuery("#popup_info_no").attr('checked', 'checked');
1693
- }
1694
- if (short_code['show_tag_box'] == 0 || !short_code['show_tag_box']) {
1695
- jQuery("#show_tag_box_0").attr('checked', 'checked');
1696
- }
1697
- else {
1698
- jQuery("#show_tag_box_1").attr('checked', 'checked');
1699
- }
1700
- if (short_code['popup_info_full_width'] == 1) {
1701
- jQuery("#popup_info_full_width_1").attr('checked', 'checked');
1702
- }
1703
- else {
1704
- jQuery("#popup_info_full_width_0").attr('checked', 'checked');
1705
- }
1706
- if (short_code['popup_info_always_show'] == 1 && short_code['popup_info_always_show']) {
1707
- jQuery("#popup_info_always_show_yes").attr('checked', 'checked');
1708
- }
1709
- else {
1710
- jQuery("#popup_info_always_show_no").attr('checked', 'checked');
1711
- }
1712
- if (short_code['popup_enable_rate'] == 1 && short_code['popup_enable_rate']) {
1713
- jQuery("#popup_rate_yes").attr('checked', 'checked');
1714
- }
1715
- else {
1716
- jQuery("#popup_rate_no").attr('checked', 'checked');
1717
- }
1718
- if (short_code['popup_enable_comment'] == 1) {
1719
- jQuery("#popup_comment_yes").attr('checked', 'checked');
1720
- }
1721
- else {
1722
- jQuery("#popup_comment_no").attr('checked', 'checked');
1723
- }
1724
- if (short_code['popup_hit_counter'] == 1 && short_code['popup_hit_counter']) {
1725
- jQuery("#popup_hit_counter_yes").attr('checked', 'checked');
1726
- }
1727
- else {
1728
- jQuery("#popup_hit_counter_no").attr('checked', 'checked');
1729
- }
1730
- if (short_code['popup_enable_facebook'] == 1) {
1731
- jQuery("#popup_facebook_yes").attr('checked', 'checked');
1732
- }
1733
- else {
1734
- jQuery("#popup_facebook_no").attr('checked', 'checked');
1735
- }
1736
- if (short_code['popup_enable_twitter'] == 1) {
1737
- jQuery("#popup_twitter_yes").attr('checked', 'checked');
1738
- }
1739
- else {
1740
- jQuery("#popup_twitter_no").attr('checked', 'checked');
1741
- }
1742
- if (short_code['popup_enable_google'] == 1) {
1743
- jQuery("#popup_google_yes").attr('checked', 'checked');
1744
- }
1745
- else {
1746
- jQuery("#popup_google_no").attr('checked', 'checked');
1747
- }
1748
- if (short_code['popup_enable_ecommerce'] == 1) {
1749
- jQuery("#popup_ecommerce_yes").attr('checked', 'checked');
1750
- }
1751
- else {
1752
- jQuery("#popup_ecommerce_no").attr('checked', 'checked');
1753
- }
1754
- if (short_code['popup_enable_pinterest'] == 1) {
1755
- jQuery("#popup_pinterest_yes").attr('checked', 'checked');
1756
- }
1757
- else {
1758
- jQuery("#popup_pinterest_no").attr('checked', 'checked');
1759
- }
1760
- if (short_code['popup_enable_tumblr'] == 1) {
1761
- jQuery("#popup_tumblr_yes").attr('checked', 'checked');
1762
- }
1763
- else {
1764
- jQuery("#popup_tumblr_no").attr('checked', 'checked');
1765
- }
1766
- }
1767
- else {
1768
- jQuery("#popup_ctrl_btn_no").attr('checked', 'checked');
1769
- }
1770
- }
1771
- if (!short_code['thumb_click_action'] || short_code['thumb_click_action'] == 'undefined' || short_code['thumb_click_action'] == 'do_nothing') {
1772
- jQuery("#thumb_click_action_3").attr('checked', 'checked');
1773
- }
1774
- else if (short_code['thumb_click_action'] == 'redirect_to_url') {
1775
- jQuery("#thumb_click_action_2").attr('checked', 'checked');
1776
- }
1777
- else if (short_code['thumb_click_action'] == 'open_lightbox') {
1778
- jQuery("#thumb_click_action_1").attr('checked', 'checked');
1779
- }
1780
- if (short_code['thumb_link_target'] == 1 || !short_code['thumb_link_target'] || short_code['thumb_link_target'] == 'undefined') {
1781
- jQuery("#thumb_link_target_yes").attr('checked', 'checked');
1782
- }
1783
- else {
1784
- jQuery("#thumb_link_target_no").attr('checked', 'checked');
1785
- }
1786
- bwg_thumb_click_action();
1787
-
1788
- // Watermark.
1789
- if (short_code['watermark_type'] == 'text') {
1790
- jQuery("#watermark_type_text").attr('checked', 'checked');
1791
- jQuery("#watermark_link").val(decodeURIComponent(short_code['watermark_link']));
1792
- jQuery("#watermark_text").val(short_code['watermark_text']);
1793
- jQuery("#watermark_font_size").val(short_code['watermark_font_size']);
1794
- if (in_array(short_code['watermark_font'], bwg_objectGGF)) {
1795
- jQuery("#watermark_google_fonts1").attr('checked', 'checked');
1796
- bwg_change_fonts('watermark_font', 'watermark_google_fonts1');
1797
- }
1798
- else {
1799
- jQuery("#watermark_google_fonts0").attr('checked', 'checked');
1800
- bwg_change_fonts('watermark_font', '');
1801
- }
1802
- jQuery("select[id=watermark_font] option[value='" + short_code['watermark_font'] + "']").attr('selected', 'selected');
1803
- jQuery("#watermark_color").val(short_code['watermark_color']);
1804
- jQuery("#watermark_opacity").val(short_code['watermark_opacity']);
1805
- jQuery("#watermark_type_text").attr('checked', 'checked');
1806
- jQuery("#watermark_" + short_code['watermark_position']).attr('checked', 'checked');
1807
- }
1808
- else if (short_code['watermark_type'] == 'image') {
1809
- jQuery("#watermark_type_image").attr('checked', 'checked');
1810
- jQuery("#watermark_link").val(decodeURIComponent(short_code['watermark_link']));
1811
- jQuery("#watermark_url").val(short_code['watermark_url']);
1812
- jQuery("#watermark_width").val(short_code['watermark_width']);
1813
- jQuery("#watermark_height").val(short_code['watermark_height']);
1814
- jQuery("#watermark_opacity").val(short_code['watermark_opacity']);
1815
- jQuery("#watermark_type_image").attr('checked', 'checked');
1816
- jQuery("#watermark_" + short_code['watermark_position']).attr('checked', 'checked');
1817
- }
1818
- else {
1819
- jQuery("#watermark_type_none").attr('checked', 'checked');
1820
- }
1821
- bwg_watermark('watermark_type_' + short_code['watermark_type']);
1822
- bwg_gallery_type(short_code['gallery_type']);
1823
- }
1824
- }
1825
- // in_array
1826
- function in_array(what, where) {
1827
- var t = false;
1828
- for (var i in where) {
1829
- if (what == where[i]) {
1830
- t = true;
1831
- break;
1832
- }
1833
- }
1834
- if(t == true) {
1835
- return true;
1836
- }
1837
- else {
1838
- return false;
1839
- }
1840
- }
1841
- // Get shortcodes attributes.
1842
- function get_params(module_name) {
1843
- <?php if (!$from_menu) { ?>
1844
- var selected_text = top.tinyMCE.activeEditor.selection.getContent();
1845
- <?php } else { ?>
1846
- var selected_text = jQuery("#bwg_shortcode").val();
1847
- <?php } ?>
1848
- var module_start_index = selected_text.indexOf("[" + module_name);
1849
- var module_end_index = selected_text.indexOf("]", module_start_index);
1850
- var module_str = "";
1851
- if ((module_start_index >= 0) && (module_end_index >= 0)) {
1852
- module_str = selected_text.substring(module_start_index + 1, module_end_index);
1853
- }
1854
- else {
1855
- return false;
1856
- }
1857
- var params_str = module_str.substring(module_str.indexOf(" ") + 1);
1858
- var key_values = params_str.split('" ');
1859
- var short_code_attr = new Array();
1860
- for (var key in key_values) {
1861
- var short_code_index = key_values[key].split('=')[0];
1862
- var short_code_value = key_values[key].split('=')[1];
1863
- short_code_value = short_code_value.replace(/\"/g, '');
1864
- short_code_attr[short_code_index] = short_code_value;
1865
- }
1866
- return short_code_attr;
1867
- }
1868
- function get_short_params(tagtext) {
1869
- var params_str = tagtext.substring(tagtext.indexOf(" ") + 1);
1870
- var key_values = params_str.split('" ');
1871
- var short_code_attr = new Array();
1872
- for (var key in key_values) {
1873
- var short_code_index = key_values[key].split('=')[0];
1874
- var short_code_value = key_values[key].split('=')[1];
1875
- short_code_value = short_code_value.replace(/\"/g, '');
1876
- short_code_attr[short_code_index] = short_code_value;
1877
- }
1878
- return short_code_attr;
1879
- }
1880
- function bwg_insert_shortcode(content) {
1881
- window.parent.window.jQuery(window.parent.document).trigger("onOpenShortcode");
1882
- var gallery_type = jQuery("input[name=gallery_type]:checked").val();
1883
- var theme = jQuery("#theme").val();
1884
- var title = "";
1885
- var short_code = '[Best_Wordpress_Gallery';
1886
- var tagtext = ' gallery_type="' + gallery_type + '" theme_id="' + theme + '"';
1887
- // TODO need works (this value get dinamic).
1888
- tagtext += ' use_option_defaults="0"';
1889
- switch (gallery_type) {
1890
- case 'thumbnails': {
1891
- tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1892
- tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1893
- tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1894
- tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
1895
- tagtext += ' show_sort_images="' + jQuery("input[name=show_sort_images]:checked").val() + '"';
1896
- tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
1897
- tagtext += ' image_column_number="' + jQuery("#image_column_number").val() + '"';
1898
- tagtext += ' images_per_page="' + jQuery("#images_per_page").val() + '"';
1899
- tagtext += ' image_title="' + jQuery("input[name=image_title]:checked").val() + '"';
1900
- tagtext += ' image_enable_page="' + jQuery("input[name=image_enable_page]:checked").val() + '"';
1901
- tagtext += ' thumb_width="' + jQuery("#thumb_width").val() + '"';
1902
- tagtext += ' thumb_height="' + jQuery("#thumb_height").val() + '"';
1903
- title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
1904
- tagtext += ' load_more_image_count="' + jQuery("#load_more_image_count").val() + '"';
1905
- tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
1906
- tagtext += ' tag="' + jQuery("#tag").val() + '"';
1907
- tagtext += ' show_gallery_description="' + jQuery("input[name=show_gallery_description]:checked").val() + '"';
1908
- tagtext += ' showthumbs_name="' + jQuery("input[name=showthumbs_name]:checked").val() + '"';
1909
- break;
1910
-
1911
- }
1912
- case 'slideshow': {
1913
- tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1914
- tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1915
- tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1916
- tagtext += ' slideshow_effect="' + jQuery("#slideshow_effect").val() + '"';
1917
- tagtext += ' slideshow_interval="' + jQuery("#slideshow_interval").val() + '"';
1918
- tagtext += ' slideshow_width="' + jQuery("#slideshow_width").val() + '"';
1919
- tagtext += ' slideshow_height="' + jQuery("#slideshow_height").val() + '"';
1920
- tagtext += ' enable_slideshow_autoplay="' + jQuery("input[name=enable_slideshow_autoplay]:checked").val() + '"';
1921
- tagtext += ' enable_slideshow_shuffle="' + jQuery("input[name=enable_slideshow_shuffle]:checked").val() + '"';
1922
- tagtext += ' enable_slideshow_ctrl="' + jQuery("input[name=enable_slideshow_ctrl]:checked").val() + '"';
1923
- tagtext += ' enable_slideshow_filmstrip="' + jQuery("input[name=enable_slideshow_filmstrip]:checked").val() + '"';
1924
- tagtext += ' slideshow_filmstrip_height="' + jQuery("#slideshow_filmstrip_height").val() + '"';
1925
- tagtext += ' slideshow_enable_title="' + jQuery("input[name=slideshow_enable_title]:checked").val() + '"';
1926
- tagtext += ' slideshow_title_position="' + jQuery("input[name=slideshow_title_position]:checked").val() + '"';
1927
- tagtext += ' slideshow_title_full_width="' + jQuery("input[name=slideshow_title_full_width]:checked").val() + '"';
1928
- tagtext += ' slideshow_enable_description="' + jQuery("input[name=slideshow_enable_description]:checked").val() + '"';
1929
- tagtext += ' slideshow_description_position="' + jQuery("input[name=slideshow_description_position]:checked").val() + '"';
1930
- tagtext += ' enable_slideshow_music="' + jQuery("input[name=enable_slideshow_music]:checked").val() + '"';
1931
- tagtext += ' slideshow_music_url="' + jQuery("#slideshow_music_url").val() + '"';
1932
- title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
1933
- tagtext += ' slideshow_effect_duration="' + jQuery("#slideshow_effect_duration").val() + '"';
1934
- tagtext += ' tag="' + jQuery("#tag").val() + '"';
1935
- break;
1936
-
1937
- }
1938
- case 'image_browser': {
1939
- tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
1940
- tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1941
- tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1942
- tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
1943
- tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
1944
- tagtext += ' image_browser_width="' + jQuery("#image_browser_width").val() + '"';
1945
- tagtext += ' image_browser_title_enable="' + jQuery("input[name=image_browser_title_enable]:checked").val() + '"';
1946
- tagtext += ' image_browser_description_enable="' + jQuery("input[name=image_browser_description_enable]:checked").val() + '"';
1947
- title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
1948
- tagtext += ' tag="' + jQuery("#tag").val() + '"';
1949
- tagtext += ' show_gallery_description="' + jQuery("input[name=show_gallery_description]:checked").val() + '"';
1950
- tagtext += ' showthumbs_name="' + jQuery("input[name=showthumbs_name]:checked").val() + '"';
1951
- break;
1952
-
1953
- }
1954
- case 'album_compact_preview': {
1955
- tagtext += ' album_id="' + jQuery("#album").val() + '"';
1956
- tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1957
- tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1958
- tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
1959
- tagtext += ' show_sort_images="' + jQuery("input[name=show_sort_images]:checked").val() + '"';
1960
- tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
1961
- tagtext += ' compuct_album_column_number="' + jQuery("#compuct_album_column_number").val() + '"';
1962
- tagtext += ' compuct_albums_per_page="' + jQuery("#compuct_albums_per_page").val() + '"';
1963
- tagtext += ' compuct_album_title="' + jQuery("input[name=compuct_album_title]:checked").val() + '"';
1964
- tagtext += ' compuct_album_view_type="' + jQuery("input[name=compuct_album_view_type]:checked").val() + '"';
1965
- tagtext += ' compuct_album_mosaic_hor_ver="' + jQuery("input[name=compuct_album_mosaic_hor_ver]:checked").val() + '"';
1966
- tagtext += ' compuct_album_resizable_mosaic="' + jQuery("input[name=compuct_album_resizable_mosaic]:checked").val() + '"';
1967
- tagtext += ' compuct_album_mosaic_total_width="' + jQuery("#compuct_album_mosaic_total_width").val() + '"';
1968
- tagtext += ' compuct_album_thumb_width="' + jQuery("#compuct_album_thumb_width").val() + '"';
1969
- tagtext += ' compuct_album_thumb_height="' + jQuery("#compuct_album_thumb_height").val() + '"';
1970
- tagtext += ' compuct_album_image_column_number="' + jQuery("#compuct_album_image_column_number").val() + '"';
1971
- tagtext += ' compuct_album_images_per_page="' + jQuery("#compuct_album_images_per_page").val() + '"';
1972
- tagtext += ' compuct_album_image_title="' + jQuery("input[name=compuct_album_image_title]:checked").val() + '"';
1973
- tagtext += ' compuct_album_image_thumb_width="' + jQuery("#compuct_album_image_thumb_width").val() + '"';
1974
- tagtext += ' compuct_album_image_thumb_height="' + jQuery("#compuct_album_image_thumb_height").val() + '"';
1975
- tagtext += ' compuct_album_enable_page="' + jQuery("input[name=compuct_album_enable_page]:checked").val() + '"';
1976
- tagtext += ' compuct_album_load_more_image_count="' + jQuery("#compuct_album_load_more_image_count").val() + '"';
1977
- tagtext += ' compuct_albums_per_page_load_more="' + jQuery("#compuct_albums_per_page_load_more").val() + '"';
1978
- tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
1979
- title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
1980
- tagtext += ' show_gallery_description="' + jQuery("input[name=show_gallery_description]:checked").val() + '"';
1981
- tagtext += ' show_album_name="' + jQuery("input[name=show_album_name]:checked").val() + '"';
1982
- break;
1983
-
1984
- }
1985
- case 'album_extended_preview': {
1986
- tagtext += ' album_id="' + jQuery("#album").val() + '"';
1987
- tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
1988
- tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
1989
- tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
1990
- tagtext += ' show_sort_images="' + jQuery("input[name=show_sort_images]:checked").val() + '"';
1991
- tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
1992
- tagtext += ' extended_albums_per_page="' + jQuery("#extended_albums_per_page").val() + '"';
1993
- tagtext += ' extended_album_height="' + jQuery("#extended_album_height").val() + '"';
1994
- tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
1995
- tagtext += ' extended_album_view_type="' + jQuery("input[name=extended_album_view_type]:checked").val() + '"';
1996
- tagtext += ' extended_album_mosaic_hor_ver="' + jQuery("input[name=extended_album_mosaic_hor_ver]:checked").val() + '"';
1997
- tagtext += ' extended_album_resizable_mosaic="' + jQuery("input[name=extended_album_resizable_mosaic]:checked").val() + '"';
1998
- tagtext += ' extended_album_mosaic_total_width="' + jQuery("#extended_album_mosaic_total_width").val() + '"';
1999
- tagtext += ' extended_album_thumb_width="' + jQuery("#extended_album_thumb_width").val() + '"';
2000
- tagtext += ' extended_album_thumb_height="' + jQuery("#extended_album_thumb_height").val() + '"';
2001
- tagtext += ' extended_album_image_column_number="' + jQuery("#extended_album_image_column_number").val() + '"';
2002
- tagtext += ' extended_album_images_per_page="' + jQuery("#extended_album_images_per_page").val() + '"';
2003
- tagtext += ' extended_album_image_title="' + jQuery("input[name=extended_album_image_title]:checked").val() + '"';
2004
- tagtext += ' extended_album_image_thumb_width="' + jQuery("#extended_album_image_thumb_width").val() + '"';
2005
- tagtext += ' extended_album_image_thumb_height="' + jQuery("#extended_album_image_thumb_height").val() + '"';
2006
- tagtext += ' extended_album_enable_page="' + jQuery("input[name=extended_album_enable_page]:checked").val() + '"';
2007
- tagtext += ' extended_album_load_more_image_count="' + jQuery("#extended_album_load_more_image_count").val() + '"';
2008
- tagtext += ' extended_albums_per_page_load_more="' + jQuery("#extended_albums_per_page_load_more").val() + '"';
2009
- tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
2010
- title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
2011
- tagtext += ' show_gallery_description="' + jQuery("input[name=show_gallery_description]:checked").val() + '"';
2012
- tagtext += ' show_album_name="' + jQuery("input[name=show_album_name]:checked").val() + '"';
2013
- break;
2014
-
2015
- }
2016
- }
2017
- // Lightbox paramteres.
2018
- tagtext += ' thumb_click_action="' + jQuery("input[name=thumb_click_action]:checked").val() + '"';
2019
- tagtext += ' thumb_link_target="' + jQuery("input[name=thumb_link_target]:checked").val() + '"';
2020
- tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
2021
- tagtext += ' popup_autoplay="' + jQuery("input[name=popup_autoplay]:checked").val() + '"';
2022
- tagtext += ' popup_width="' + jQuery("#popup_width").val() + '"';
2023
- tagtext += ' popup_height="' + jQuery("#popup_height").val() + '"';
2024
- tagtext += ' popup_effect="' + jQuery("#popup_effect").val() + '"';
2025
- tagtext += ' popup_interval="' + jQuery("#popup_interval").val() + '"';
2026
- tagtext += ' popup_enable_filmstrip="' + jQuery("input[name=popup_enable_filmstrip]:checked").val() + '"';
2027
- tagtext += ' popup_filmstrip_height="' + jQuery("#popup_filmstrip_height").val() + '"';
2028
- tagtext += ' popup_enable_ctrl_btn="' + jQuery("input[name=popup_enable_ctrl_btn]:checked").val() + '"';
2029
- tagtext += ' popup_enable_fullscreen="' + jQuery("input[name=popup_enable_fullscreen]:checked").val() + '"';
2030
- tagtext += ' popup_enable_info="' + jQuery("input[name=popup_enable_info]:checked").val() + '"';
2031
- tagtext += ' popup_info_always_show="' + jQuery("input[name=popup_info_always_show]:checked").val() + '"';
2032
- tagtext += ' popup_info_full_width="' + jQuery("input[name=popup_info_full_width]:checked").val() + '"';
2033
- tagtext += ' popup_enable_rate="' + jQuery("input[name=popup_enable_rate]:checked").val() + '"';
2034
- tagtext += ' popup_enable_comment="' + jQuery("input[name=popup_enable_comment]:checked").val() + '"';
2035
- tagtext += ' popup_hit_counter="' + jQuery("input[name=popup_hit_counter]:checked").val() + '"';
2036
- tagtext += ' popup_enable_facebook="' + jQuery("input[name=popup_enable_facebook]:checked").val() + '"';
2037
- tagtext += ' popup_enable_twitter="' + jQuery("input[name=popup_enable_twitter]:checked").val() + '"';
2038
- tagtext += ' popup_enable_google="' + jQuery("input[name=popup_enable_google]:checked").val() + '"';
2039
- tagtext += ' popup_enable_pinterest="' + jQuery("input[name=popup_enable_pinterest]:checked").val() + '"';
2040
- tagtext += ' popup_enable_tumblr="' + jQuery("input[name=popup_enable_tumblr]:checked").val() + '"';
2041
- tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
2042
- tagtext += ' popup_effect_duration="' + jQuery("#popup_effect_duration").val() + '"';
2043
-
2044
- // Watermark parameters.
2045
- tagtext += ' watermark_type="' + jQuery("input[name=watermark_type]:checked").val() + '"';
2046
- tagtext += ' watermark_link="' + (jQuery("#watermark_link").val()) + '"';
2047
- if (jQuery("input[name=watermark_type]:checked").val() == 'text') {
2048
- tagtext += ' watermark_text="' + jQuery("#watermark_text").val() + '"';
2049
- tagtext += ' watermark_font_size="' + jQuery("#watermark_font_size").val() + '"';
2050
- tagtext += ' watermark_font="' + jQuery("#watermark_font").val() + '"';
2051
- tagtext += ' watermark_color="' + jQuery("#watermark_color").val() + '"';
2052
- tagtext += ' watermark_opacity="' + jQuery("#watermark_opacity").val() + '"';
2053
- tagtext += ' watermark_position="' + jQuery("input[name=watermark_position]:checked").val() + '"';
2054
- }
2055
- else if (jQuery("input[name=watermark_type]:checked").val() == 'image') {
2056
- tagtext += ' watermark_url="' + jQuery("#watermark_url").val() + '"';
2057
- tagtext += ' watermark_width="' + jQuery("#watermark_width").val() + '"';
2058
- tagtext += ' watermark_height="' + jQuery("#watermark_height").val() + '"';
2059
- tagtext += ' watermark_opacity="' + jQuery("#watermark_opacity").val() + '"';
2060
- tagtext += ' watermark_position="' + jQuery("input[name=watermark_position]:checked").val() + '"';
2061
- }
2062
- short_code += ' id="' + shortcode_id + '"' + title + ']';
2063
- var short_id = ' id="' + shortcode_id + '"' + title;
2064
- short_code = short_code.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function(d, c) {
2065
- return "<img src='<?php echo WD_BWG_URL; ?>/images/icons/gallery-icon.png' class='bwg_shortcode mceItem' title='Best_Wordpress_Gallery" + short_id + "' />";
2066
- });
2067
- <?php if (!$from_menu) { ?>
2068
- jQuery("#task").val("save");
2069
- jQuery("#tagtext").val(tagtext);
2070
- jQuery("#currrent_id").val(shortcode_id);
2071
- jQuery("#title").val(title);
2072
- jQuery("#bwg_insert").val((content && !bwg_insert) ? 0 : 1);
2073
- jQuery("#bwg_shortcode_form").submit();
2074
- if (top.tinymce.isIE && content) {
2075
- // IE and Update.
2076
- var all_content = top.tinyMCE.activeEditor.getContent();
2077
- all_content = all_content.replace('<p></p><p>[Best_Wordpress_Gallery', '<p>[Best_Wordpress_Gallery');
2078
- top.tinyMCE.activeEditor.setContent(all_content.replace(content, '[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']'));
2079
- }
2080
- else {
2081
- top.tinyMCE.execCommand('mceInsertContent', false, short_code);
2082
- }
2083
- top.tinyMCE.execCommand('mceRepaint');
2084
- <?php } else { ?>
2085
- var post_data = {};
2086
- var url = jQuery("#bwg_insert_shortcode").attr('action');
2087
- post_data['bwg_nonce'] = jQuery("#bwg_nonce").val();
2088
- post_data['task'] = "save";
2089
- post_data['tagtext'] = tagtext;
2090
- post_data['currrent_id'] = shortcode_id;
2091
- post_data['title'] = title;
2092
- post_data['bwg_insert'] = (content && !bwg_insert) ? 0 : 1;
2093
- // TODO need works (this value get dinamic).
2094
- post_data['use_option_defaults'] = 0;
2095
-
2096
- jQuery.post(
2097
- url,
2098
- post_data
2099
- ).success(function (data, textStatus, errorThrown) {
2100
- jQuery("#bwg_shortcode").val('[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']');
2101
- var str = "&#60;?php echo photo_gallery(" + shortcode_id + "); ?&#62;";
2102
- jQuery("#bwg_function").val(str.replace("&#60;", '<').replace("&#62;", '>'));
2103
- shortcodes[shortcode_id] = tagtext;
2104
- jQuery('#loading_div').hide();
2105
- jQuery('#opacity_div').hide();
2106
- });
2107
- <?php } ?>
2108
- }
2109
- jQuery(document).ready(function () {
2110
- bwg_loadmore();
2111
- bwg_change_tab();
2112
- });
2113
- jQuery(window).resize(function (){
2114
- bwg_change_tab();
2115
- });
2116
- var bwg_image_thumb = '<?php echo addslashes(__('Image thumbnail dimensions:', 'bwg_back')); ?>';
2117
- var bwg_image_thumb_width = '<?php echo addslashes(__('Image thumbnail width: ', 'bwg_back')); ?>';
2118
- var bwg_max_column = '<?php echo addslashes(__('Max. number of image columns:', 'bwg_back')); ?>';
2119
- var bwg_image_thumb_height = '<?php echo addslashes(__('Image thumbnail height:', 'bwg_back')); ?>';
2120
- var bwg_number_of_image_rows = '<?php echo addslashes(__('Number of image rows:', 'bwg_back')); ?>';
2121
- </script>
2122
- </body>
2123
- </html>
2124
- <?php
2125
- include_once (WD_BWG_DIR .'/includes/bwg_pointers.php');
2126
- new BWG_pointers();
2127
- if ( !$from_menu ) {
2128
- die();
2129
- }
2130
- }
2131
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewGalleries_bwg.php DELETED
@@ -1,1041 +0,0 @@
1
- <?php
2
- class BWGViewGalleries_bwg {
3
-
4
- private $model;
5
-
6
- public function __construct($model) {
7
- $this->model = $model;
8
- }
9
-
10
- public function display() {
11
- global $WD_BWG_UPLOAD_DIR;
12
- $rows_data = $this->model->get_rows_data();
13
- $page_nav = $this->model->page_nav();
14
- $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
15
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
16
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'order');
17
- $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
18
- $ids_string = '';
19
- $per_page = $this->model->per_page();
20
- $pager = 0;
21
- $gallery_button_array = array(
22
- 'publish_all' => __('Publish', 'bwg_back'),
23
- 'unpublish_all' => __('Unpublish', 'bwg_back'),
24
- 'delete_all' => __('Delete', 'bwg_back')
25
- );
26
- ?>
27
- <form class="wrap bwg_form" id="galleries_form" method="post" action="admin.php?page=galleries_bwg" style="width: 98%; float: left;">
28
- <?php wp_nonce_field( 'galleries_bwg', 'bwg_nonce' ); ?>
29
- <div>
30
- <span class="gallery-icon"></span>
31
- <h2>
32
- <?php _e("Galleries", 'bwg_back'); ?>
33
- <a href="" id="galleries_id" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
34
- spider_form_submit(event, 'galleries_form')"><?php _e('Add new', 'bwg_back'); ?></a>
35
- </h2>
36
- </div>
37
- <div id="draganddrop" class="wd_updated" style="display:none;"><strong><p><?php _e("Changes made in this table should be saved.", 'bwg_back'); ?></p></strong></div>
38
- <?php WDWLibrary::search(__('Name','bwg_back'), $search_value, 'galleries_form', '');?>
39
- <div class="tablenav top buttons_div" >
40
- <span class="wd-btn wd-btn-primary-gray bwg_check_all non_selectable" onclick="spider_check_all_items()">
41
- <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
42
- <span style="vertical-align: middle;"><?php echo __('Select All', 'bwg_back'); ?></span>
43
- </span>
44
- <select class='select_icon bulk_action'>
45
- <option value=""><?php _e('Bulk Actions', 'bwg_back'); ?></option>
46
- <?php
47
- foreach($gallery_button_array as $key => $value) {
48
- ?>
49
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
50
- <?php
51
- }
52
- ?>
53
- </select>
54
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php _e("Apply","bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action', 'gallery_page')) {return false;}" value="<?php _e("Apply","bwg_back"); ?>" />
55
- <?php
56
- if ( is_plugin_active( 'image-optimizer-wd/io-wd.php' ) && !empty($rows_data)) {
57
-
58
- ?>
59
- <a href="<?php echo add_query_arg(array( 'page' => 'iowd_settings', 'target' => 'wd_gallery'), admin_url('admin.php'));?>" class="wd-btn wd-btn-primary" target="_blank"><?php _e("Optimize Images", "bwg_back"); ?></a>
60
- <?php
61
- }
62
- ?>
63
- <?php WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page); ?>
64
- </div>
65
- <table class="wp-list-table widefat fixed pages">
66
- <thead>
67
- <th class="sortable check-column table_small_col manage-column <?php if ($order_by == 'order') {echo $order_class;} ?>" style="margin: 0px auto 5px 15px; width: 77px; vertical-align: middle;">
68
- <a id="show_hide_weights" class="bwg_order_column" title="<?php echo __('Hide order column', 'bwg_back'); ?>" onclick="spider_show_hide_weights();" value="<?php echo __('Hide order column', 'bwg_back'); ?>" ></a>
69
- <a id="show_order_button" class="bwg_save_order" title="<?php echo __('Save Order', 'bwg_back'); ?>" onclick="spider_set_input_value('task', 'save_order');spider_form_submit(event, 'galleries_form')" value="<?php echo __('Save Order', 'bwg_back'); ?>" ></a>
70
- <a id="th_order" onclick="spider_set_input_value('task', '');
71
- spider_set_input_value('order_by', 'order');
72
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'order') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
73
- spider_form_submit(event, 'galleries_form')" href="">
74
- <span class="sorting-indicator"></span>
75
- </a>
76
- </th>
77
- <th class="sortable manage-column column-cb check-column table_small_col" style="padding-top:15px !important;"><input id="check_all" type="checkbox" onclick="spider_check_all(this)" style="margin:0" /></th>
78
- <th class="sortable table_th_middle table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
79
- <a onclick="spider_set_input_value('task', '');
80
- spider_set_input_value('order_by', 'id');
81
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
82
- spider_form_submit(event, 'galleries_form')" href="">
83
- <span>ID</span><span class="sorting-indicator"></span>
84
- </a>
85
- </th>
86
- <th class="table_extra_large_col"><?php echo __('Thumbnail', 'bwg_back'); ?></th>
87
- <th class="sortable <?php if ($order_by == 'name') {echo $order_class;} ?>">
88
- <a onclick="spider_set_input_value('task', '');
89
- spider_set_input_value('order_by', 'name');
90
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
91
- spider_form_submit(event, 'galleries_form')" href="">
92
- <span><?php echo __('Name', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
93
- </a>
94
- </th>
95
- <th class="sortable <?php if ($order_by == 'slug') {echo $order_class;} ?>">
96
- <a onclick="spider_set_input_value('task', '');
97
- spider_set_input_value('order_by', 'slug');
98
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
99
- spider_form_submit(event, 'galleries_form')" href="">
100
- <span><?php echo __('Slug', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
101
- </a>
102
- </th>
103
- <th class="sortable <?php if ($order_by == 'display_name') {echo $order_class;} ?>">
104
- <a onclick="spider_set_input_value('task', '');
105
- spider_set_input_value('order_by', 'display_name');
106
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'display_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
107
- spider_form_submit(event, 'galleries_form')" href="">
108
- <span><?php echo __('Author', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
109
- </a>
110
- </th>
111
- <th class="table_big_col"><?php echo __('Images count', 'bwg_back'); ?></th>
112
- <th class="sortable table_big_col <?php if ($order_by == 'published') {echo $order_class;} ?>" style="padding-left:30px;">
113
- <a onclick="spider_set_input_value('task', '');
114
- spider_set_input_value('order_by', 'published');
115
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
116
- spider_form_submit(event, 'galleries_form')" href="">
117
- <span><?php echo __('Published', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
118
- </a>
119
- </th>
120
- <th class="table_small_col"><?php echo __('Edit', 'bwg_back'); ?></th>
121
- <th class="table_small_col"><?php echo __('Delete', 'bwg_back'); ?></th>
122
- </thead>
123
- <tbody id="tbody_arr">
124
- <?php
125
- if ($rows_data) {
126
- foreach ($rows_data as $row_data) {
127
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
128
- $published_image = (($row_data->published) ? 'publish-blue' : 'unpublish-red');
129
- $published = (($row_data->published) ? 'unpublish' : 'publish');
130
- $unpublish = ((!$row_data->published) ? 'Unpublish' : 'Publish');
131
- $images_count = $this->model->get_images_count($row_data->id);
132
- if ($row_data->preview_image == '') {
133
- $preview_image = WD_BWG_URL . '/images/no-image.png';
134
- }
135
- else {
136
- $preview_image = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row_data->preview_image;
137
- }
138
- ?>
139
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
140
- <td class="spider_order table_medium_col"><input id="order_input_<?php echo $row_data->id; ?>" name="order_input_<?php echo $row_data->id; ?>" type="text" size="1" value="<?php echo $row_data->order; ?>" /></td>
141
- <td class="connectedSortable handles table_small_col"><div title="Drag to re-order" class="handle" style="margin:5px auto 0 auto;"></div></td>
142
- <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
143
- <td class="table_small_col"><?php echo $row_data->id; ?></td>
144
- <td class="table_extra_large_col">
145
- <img title="<?php echo $row_data->name; ?>" style="border: 1px solid #CCCCCC; max-width:60px; max-height:60px;" src="<?php echo $preview_image . '?date=' . date('Y-m-y H:i:s'); ?>">
146
- </td>
147
- <td><a onclick="spider_set_input_value('task', 'edit');
148
- spider_set_input_value('page_number', '1');
149
- spider_set_input_value('search_value', '');
150
- spider_set_input_value('search_or_not', '');
151
- spider_set_input_value('asc_or_desc', 'asc');
152
- spider_set_input_value('order_by', 'order');
153
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
154
- spider_form_submit(event, 'galleries_form')" href="" title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $row_data->name; ?></a></td>
155
- <td><?php echo $row_data->slug; ?></td>
156
- <td><?php echo get_userdata($row_data->author)->display_name; ?></td>
157
- <td class="table_large_col"><?php echo $images_count; ?></td>
158
- <td class="table_big_col publish_icon"><a style="background-image:url('<?php echo WD_BWG_URL . '/images/icons/' . $published_image . '.png'; ?>'); background-repeat: no-repeat; display: inline-block; width: 18px; height: 22px;margin: 3px; vertical-align: middle;background-size: contain;" title="<?php echo $unpublish; ?>" onclick="spider_set_input_value('task', '<?php echo $published; ?>');spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');spider_form_submit(event, 'galleries_form')" href=""></a></td>
159
- <td class="table_big_col"><a class="bwg_img_edit" title="<?php echo __('Edit', 'bwg_back'); ?>" onclick="spider_set_input_value('task', 'edit');
160
- spider_set_input_value('page_number', '1');
161
- spider_set_input_value('search_value', '');
162
- spider_set_input_value('search_or_not', '');
163
- spider_set_input_value('asc_or_desc', 'asc');
164
- spider_set_input_value('order_by', 'order');
165
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
166
- spider_form_submit(event, 'galleries_form')" href=""></a></td>
167
- <td class="table_big_col"><a class="bwg_img_remove" title="<?php echo __('Delete', 'bwg_back'); ?>" onclick="if (confirm('<?php echo addslashes(__('Do you want to delete selected items?', 'bwg_back')); ?>')) {
168
- spider_set_input_value('task', 'delete');
169
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
170
- spider_form_submit(event, 'galleries_form')
171
- } else {
172
- return false;
173
- }" href=""></a></td>
174
- </tr>
175
- <?php
176
- $ids_string .= $row_data->id . ',';
177
- }
178
- }
179
- ?>
180
- </tbody>
181
- </table>
182
- <div class="tablenav bottom">
183
- <?php
184
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page);
185
- ?>
186
- </div>
187
- <input id="task" name="task" type="hidden" value="" />
188
- <input id="current_id" name="current_id" type="hidden" value="" />
189
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
190
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
191
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
192
- <script>
193
- window.onload = spider_show_hide_weights;
194
- </script>
195
- </form>
196
- <?php
197
- }
198
-
199
- public function edit($id) {
200
- global $WD_BWG_UPLOAD_DIR;
201
- global $wd_bwg_options;
202
- $row = $this->model->get_row_data($id);
203
- $page_title = (($id != 0) ? __('Edit gallery','bwg_back') . $row->name : __('Create new gallery','bwg_back'));
204
- $per_page = $this->model->per_page();
205
- $images_count = $this->model->get_images_count($id);
206
- $enable_wp_editor = isset($wd_bwg_options->enable_wp_editor) ? $wd_bwg_options->enable_wp_editor : 1;
207
- ?>
208
- <script>
209
- function spider_set_href(a, number, type) {
210
- var image_url = document.getElementById("image_url_" + number).value;
211
- var thumb_url = document.getElementById("thumb_url_" + number).value;
212
- <?php
213
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'editThumb', 'bwg_nonce' );
214
- ?>
215
- a.href='<?php echo add_query_arg(array('action' => 'editThumb', 'width' => '800', 'height' => '500'), $query_url); ?>&type=' + type + '&image_id=' + number + '&image_url=' + image_url + '&thumb_url=' + thumb_url + '&TB_iframe=1';
216
- }
217
- function bwg_add_preview_image(files) {
218
- document.getElementById("preview_image").value = files[0]['thumb_url'];
219
- document.getElementById("button_preview_image").style.display = "none";
220
- document.getElementById("delete_preview_image").style.display = "inline-block";
221
- if (document.getElementById("img_preview_image")) {
222
- document.getElementById("img_preview_image").src = files[0]['reliative_url'];
223
- document.getElementById("img_preview_image").style.display = "inline-block";
224
- }
225
- }
226
- var j_int = 0;
227
- var bwg_j = 'pr_' + j_int;
228
- function bwg_add_image(files) {
229
- jQuery(document).trigger("bwgImagesAdded");
230
- var tbody = document.getElementById('tbody_arr');
231
- for (var i in files) {
232
- var is_direct_url = files[i]['filetype'].indexOf("DIRECT_URL_") > -1 ? true : false;
233
- var is_embed = files[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
234
- var tr = document.createElement('tr');
235
- tr.setAttribute('id', "tr_" + bwg_j);
236
- if (tbody.firstChild) {
237
- tbody.insertBefore(tr, tbody.firstChild);
238
- }
239
- else {
240
- tbody.appendChild(tr);
241
- }
242
- // Handle TD.
243
- var td_handle = document.createElement('td');
244
- td_handle.setAttribute('class', "connectedSortable table_small_col");
245
- td_handle.setAttribute('title', "Drag to re-order");
246
- tr.appendChild(td_handle);
247
- var div_handle = document.createElement('div');
248
- div_handle.setAttribute('class', "bwg_img_handle handle connectedSortable");
249
- div_handle.setAttribute('style', "margin: 5px auto 0px;");
250
- td_handle.appendChild(div_handle);
251
- // Checkbox TD.
252
- var td_checkbox = document.createElement('td');
253
- td_checkbox.setAttribute('class', "table_small_col check-column");
254
- td_checkbox.setAttribute('onclick', "spider_check_all(this)");
255
- tr.appendChild(td_checkbox);
256
- var input_checkbox = document.createElement('input');
257
- input_checkbox.setAttribute('id', "check_" + bwg_j);
258
- input_checkbox.setAttribute('name', "check_" + bwg_j);
259
- input_checkbox.setAttribute('type', "checkbox");
260
- td_checkbox.appendChild(input_checkbox);
261
- // Numbering TD.
262
- var td_numbering = document.createElement('td');
263
- td_numbering.setAttribute('class', "table_small_col");
264
- td_numbering.innerHTML = "";
265
- tr.appendChild(td_numbering);
266
- // Thumb TD.
267
- var td_thumb = document.createElement('td');
268
- td_thumb.setAttribute('class', "table_extra_large_col");
269
- tr.appendChild(td_thumb);
270
- var a_thumb = document.createElement('a');
271
- a_thumb.setAttribute('class', "thickbox thickbox-preview");
272
- <?php
273
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'editThumb', 'bwg_nonce' );
274
- ?>
275
- a_thumb.setAttribute('href', "<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display'/*thumb_display*/, 'width' => '650', 'height' => '500'), $query_url); ?>&image_id=" + bwg_j + "&TB_iframe=1");
276
- a_thumb.setAttribute('title', files[i]['name']);
277
- td_thumb.appendChild(a_thumb);
278
- var img_thumb = document.createElement('img');
279
- img_thumb.setAttribute('id', "image_thumb_" + bwg_j);
280
- img_thumb.setAttribute('class', "thumb");
281
- img_thumb.setAttribute('src', files[i]['thumb']);
282
- a_thumb.appendChild(img_thumb);
283
- // Filename TD.
284
- var td_filename = document.createElement('td');
285
- td_filename.setAttribute('class', "table_extra_large_col");
286
- tr.appendChild(td_filename);
287
- var div_filename = document.createElement('div');
288
- div_filename.setAttribute('class', "filename");
289
- div_filename.setAttribute('id', "filename_" + bwg_j);
290
- td_filename.appendChild(div_filename);
291
- var strong_filename = document.createElement('strong');
292
- div_filename.appendChild(strong_filename);
293
- var a_filename = document.createElement('a');
294
- <?php
295
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'editThumb', 'bwg_nonce' );
296
- ?>
297
- a_filename.setAttribute('href', "<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display', 'width' => '800', 'height' => '500'), $query_url); ?>&image_id=" + bwg_j + "&TB_iframe=1");
298
- a_filename.setAttribute('class', "spider_word_wrap thickbox thickbox-preview");
299
- a_filename.setAttribute('title', files[i]['filename']);
300
- a_filename.innerHTML = files[i]['filename'];
301
- strong_filename.appendChild(a_filename);
302
- var div_date_modified = document.createElement('div');
303
- div_date_modified.setAttribute('class', "fileDescription");
304
- div_date_modified.setAttribute('title', "Date modified");
305
- div_date_modified.setAttribute('id', "date_modified_" + bwg_j);
306
- div_date_modified.innerHTML = files[i]['date_modified'];
307
- td_filename.appendChild(div_date_modified);
308
- var div_fileresolution = document.createElement('div');
309
- div_fileresolution.setAttribute('class', "fileDescription");
310
- div_fileresolution.setAttribute('title', "Image Resolution");
311
- div_fileresolution.setAttribute('id', "fileresolution" + bwg_j);
312
- div_fileresolution.innerHTML = files[i]['resolution'];
313
- td_filename.appendChild(div_fileresolution);
314
- var div_filesize = document.createElement('div');
315
- div_filesize.setAttribute('class', "fileDescription");
316
- div_filesize.setAttribute('title', "Image size");
317
- div_filesize.setAttribute('id', "filesize" + bwg_j);
318
- div_filesize.innerHTML = files[i]['size'];
319
- td_filename.appendChild(div_filesize);
320
- var div_filetype = document.createElement('div');
321
- div_filetype.setAttribute('class', "fileDescription");
322
- div_filetype.setAttribute('title', "Type");
323
- div_filetype.setAttribute('id', "filetype" + bwg_j);
324
- div_filetype.innerHTML = files[i]['filetype'];
325
- td_filename.appendChild(div_filetype);
326
- if ( !is_embed ) {
327
- var div_edit = document.createElement('div');
328
- td_filename.appendChild(div_edit);
329
- var span_edit_crop = document.createElement('span');
330
- span_edit_crop.setAttribute('class', "edit_thumb");
331
- div_edit.appendChild(span_edit_crop);
332
- var a_crop = document.createElement('a');
333
- a_crop.setAttribute('class', "thickbox thickbox-preview");
334
- a_crop.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'crop');");
335
- a_crop.innerHTML = "<?php _e('Crop', 'bwg_back'); ?>";
336
- span_edit_crop.appendChild(a_crop);
337
- div_edit.innerHTML += " | ";
338
- var span_edit_rotate = document.createElement('span');
339
- span_edit_rotate.setAttribute('class', "edit_thumb");
340
- div_edit.appendChild(span_edit_rotate);
341
- var a_rotate = document.createElement('a');
342
- a_rotate.setAttribute('class', "thickbox thickbox-preview");
343
- a_rotate.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'rotate');");
344
- a_rotate.innerHTML = "<?php _e('Edit', 'bwg_back'); ?>";
345
- span_edit_rotate.appendChild(a_rotate);
346
- div_edit.innerHTML += " | "
347
- var span_edit_recover = document.createElement('span');
348
- span_edit_recover.setAttribute('class', "edit_thumb");
349
- div_edit.appendChild(span_edit_recover);
350
- var a_recover = document.createElement('a');
351
- a_recover.setAttribute('onclick', 'if (confirm("<?php echo addslashes(__('Do you want to reset the image?', 'bwg_back')); ?>")) { spider_set_input_value("ajax_task", "recover"); spider_set_input_value("image_current_id", "' + bwg_j + '"); spider_ajax_save("galleries_form");} return false;');
352
- a_recover.innerHTML = "<?php _e('Reset', 'bwg_back'); ?>";
353
- span_edit_recover.appendChild(a_recover);
354
- }
355
- var input_image_url = document.createElement('input');
356
- input_image_url.setAttribute('id', "image_url_" + bwg_j);
357
- input_image_url.setAttribute('name', "image_url_" + bwg_j);
358
- input_image_url.setAttribute('type', "hidden");
359
- input_image_url.setAttribute('value', files[i]['url']);
360
- td_filename.appendChild(input_image_url);
361
- var input_thumb_url = document.createElement('input');
362
- input_thumb_url.setAttribute('id', "thumb_url_" + bwg_j);
363
- input_thumb_url.setAttribute('name', "thumb_url_" + bwg_j);
364
- input_thumb_url.setAttribute('type', "hidden");
365
- input_thumb_url.setAttribute('value', files[i]['thumb_url']);
366
- td_filename.appendChild(input_thumb_url);
367
- var input_filename = document.createElement('input');
368
- input_filename.setAttribute('id', "input_filename_" + bwg_j);
369
- input_filename.setAttribute('name', "input_filename_" + bwg_j);
370
- input_filename.setAttribute('type', "hidden");
371
- input_filename.setAttribute('value', files[i]['filename']);
372
- td_filename.appendChild(input_filename);
373
- var input_date_modified = document.createElement('input');
374
- input_date_modified.setAttribute('id', "input_date_modified_" + bwg_j);
375
- input_date_modified.setAttribute('name', "input_date_modified_" + bwg_j);
376
- input_date_modified.setAttribute('type', "hidden");
377
- input_date_modified.setAttribute('value', files[i]['date_modified']);
378
- td_filename.appendChild(input_date_modified);
379
- var input_resolution = document.createElement('input');
380
- input_resolution.setAttribute('id', "input_resolution_" + bwg_j);
381
- input_resolution.setAttribute('name', "input_resolution_" + bwg_j);
382
- input_resolution.setAttribute('type', "hidden");
383
- input_resolution.setAttribute('value', files[i]['resolution']);
384
- td_filename.appendChild(input_resolution);
385
- var input_size = document.createElement('input');
386
- input_size.setAttribute('id', "input_size_" + bwg_j);
387
- input_size.setAttribute('name', "input_size_" + bwg_j);
388
- input_size.setAttribute('type', "hidden");
389
- input_size.setAttribute('value', files[i]['size']);
390
- td_filename.appendChild(input_size);
391
- var input_filetype = document.createElement('input');
392
- input_filetype.setAttribute('id', "input_filetype_" + bwg_j);
393
- input_filetype.setAttribute('name', "input_filetype_" + bwg_j);
394
- input_filetype.setAttribute('type', "hidden");
395
- input_filetype.setAttribute('value', files[i]['filetype']);
396
- td_filename.appendChild(input_filetype);
397
- // Alt/Title TD.
398
- var td_alt = document.createElement('td');
399
- td_alt.setAttribute('class', "table_extra_large_col");
400
- tr.appendChild(td_alt);
401
- var input_alt = document.createElement('textarea');
402
- input_alt.setAttribute('id', "image_alt_text_" + bwg_j);
403
- input_alt.setAttribute('name', "image_alt_text_" + bwg_j);
404
- input_alt.setAttribute('style', "resize: vertical; height: 54px;");
405
- input_alt.setAttribute('rows', "2");
406
- if (is_embed && !is_direct_url) {
407
- input_alt.innerHTML = files[i]['name'];
408
- }
409
- else {/*uploaded images and direct URLs of images only*/
410
- input_alt.innerHTML = files[i]['alt'];
411
- }
412
- td_alt.appendChild(input_alt);
413
-
414
- <?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?>
415
- //Redirect url
416
- input_alt = document.createElement('input');
417
- input_alt.setAttribute('id', "redirect_url_" + bwg_j);
418
- input_alt.setAttribute('name', "redirect_url_" + bwg_j);
419
- input_alt.setAttribute('type', "text");
420
- input_alt.setAttribute('size', "24");
421
- td_alt.appendChild(input_alt);
422
- <?php } ?>
423
- // Description TD.
424
- var td_desc = document.createElement('td');
425
- td_desc.setAttribute('class', "table_extra_large_col");
426
- tr.appendChild(td_desc);
427
- var textarea_desc = document.createElement('textarea');
428
- textarea_desc.setAttribute('id', "image_description_" + bwg_j);
429
- textarea_desc.setAttribute('name', "image_description_" + bwg_j);
430
- textarea_desc.setAttribute('rows', "2");
431
- textarea_desc.setAttribute('style', "resize:vertical;");
432
- textarea_desc.innerHTML = files[i]['description'] ? files[i]['description'] : '';
433
- if (<?php echo $wd_bwg_options->read_metadata; ?>) {
434
- textarea_desc.innerHTML += files[i]['description'] ? '\n' : '';
435
- textarea_desc.innerHTML += files[i]['credit'] ? 'Author: ' + files[i]['credit'] + '\n' : '';
436
- textarea_desc.innerHTML += ((files[i]['aperture'] != 0 && files[i]['aperture'] != '') ? 'Aperture: ' + files[i]['aperture'] + '\n' : '');
437
- textarea_desc.innerHTML += ((files[i]['camera'] != 0 && files[i]['camera'] != '') ? 'Camera: ' + files[i]['camera'] + '\n' : '');
438
- textarea_desc.innerHTML += ((files[i]['caption'] != 0 && files[i]['caption'] != '') ? 'Caption: ' + files[i]['caption'] + '\n' : '');
439
- textarea_desc.innerHTML += ((files[i]['iso'] != 0 && files[i]['iso'] != '') ? 'Iso: ' + files[i]['iso'] + '\n' : '');
440
- textarea_desc.innerHTML += ((files[i]['copyright'] != 0 && files[i]['copyright'] != '') ? 'Copyright: ' + files[i]['copyright'] + '\n' : '');
441
- textarea_desc.innerHTML += ((files[i]['orientation'] != 0 && files[i]['orientation'] != '') ? 'Orientation: ' + files[i]['orientation'] + '\n' : '');
442
- }
443
- td_desc.appendChild(textarea_desc);
444
- // Tag TD.
445
- var td_tag = document.createElement('td');
446
- td_tag.setAttribute('class', "table_extra_large_col");
447
- tr.appendChild(td_tag);
448
- var a_tag = document.createElement('a');
449
- a_tag.setAttribute('class', "button-small wd-btn wd-btn-primary wd-not-image thickbox thickbox-preview");
450
- a_tag.setAttribute('title' , "<?php addslashes(_e("Add tag", 'bwg_back')); ?>");
451
- <?php
452
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addTags', 'bwg_nonce' );
453
- ?>
454
- a_tag.setAttribute('href', "<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'bwg_items_per_page' => $per_page), $query_url); ?>&image_id=" + bwg_j + "&TB_iframe=1");
455
- a_tag.innerHTML = '<?php addslashes(_e("Add tag", 'bwg_back')); ?>';
456
- td_tag.appendChild(a_tag);
457
- var div_tag = document.createElement('div');
458
- div_tag.setAttribute('class', "tags_div");
459
- div_tag.setAttribute('id', "tags_div_" + bwg_j);
460
- td_tag.appendChild(div_tag);
461
- var hidden_tag = document.createElement('input');
462
- hidden_tag.setAttribute('type', "hidden");
463
- hidden_tag.setAttribute('id', "tags_" + bwg_j);
464
- hidden_tag.setAttribute('name', "tags_" + bwg_j);
465
- hidden_tag.setAttribute('value', "");
466
- td_tag.appendChild(hidden_tag);
467
- // Order TD.
468
- var td_order = document.createElement('td');
469
- td_order.setAttribute('class', "spider_order table_medium_col");
470
- td_order.setAttribute('style', "display: none;");
471
- tr.appendChild(td_order);
472
- var input_order = document.createElement('input');
473
- input_order.setAttribute('id', "order_input_" + bwg_j);
474
- input_order.setAttribute('name', "order_input_" + bwg_j);
475
- input_order.setAttribute('type', "text");
476
- input_order.setAttribute('value', 0 - j_int);
477
- input_order.setAttribute('size', "1");
478
- td_order.appendChild(input_order);
479
- // Publish TD.
480
- var td_publish = document.createElement('td');
481
- td_publish.setAttribute('class', "table_big_col publish_icon");
482
- tr.appendChild(td_publish);
483
- var a_publish = document.createElement('a');
484
- a_publish.setAttribute('style',"background-image:url('<?php echo WD_BWG_URL . '/images/icons/publish-blue.png'; ?>');background-repeat: no-repeat; display: inline-block; width: 18px; height: 22px;margin: 3px; vertical-align: middle;background-size: contain;")
485
- a_publish.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_unpublish');spider_set_input_value('image_current_id', '" + bwg_j + "');spider_ajax_save('galleries_form');");
486
- a_publish.setAttribute('title','Publish');
487
- td_publish.appendChild(a_publish);
488
- // Delete TD.
489
- var td_delete = document.createElement('td');
490
- td_delete.setAttribute('class', "table_big_col spider_delete_button");
491
- tr.appendChild(td_delete);
492
- var a_delete = document.createElement('a');
493
- a_delete.setAttribute('class', "bwg_img_remove");
494
- a_delete.setAttribute('title', "Delete");
495
- a_delete.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_delete');spider_set_input_value('image_current_id', '" + bwg_j + "');spider_ajax_save('galleries_form');");
496
- td_delete.appendChild(a_delete);
497
- document.getElementById("ids_string").value += bwg_j + ',';
498
- j_int++;
499
- bwg_j = 'pr_' + j_int;
500
- }
501
- jQuery("#show_hide_weights").val("<?php addslashes(_e("Hide order column", 'bwg_back')); ?>");
502
- jQuery("#show_hide_weights").attr('title',"<?php addslashes(_e("Hide order column", 'bwg_back')); ?>");
503
- spider_show_hide_weights();
504
- }
505
- </script>
506
- <script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_embed.js?ver='; ?><?php echo get_option("wd_bwg_version"); ?>"></script>
507
- <form class="wrap bwg_form" method="post" id="galleries_form" action="admin.php?page=galleries_bwg" style="float: left; width: 98%;">
508
- <?php wp_nonce_field( 'galleries_bwg', 'bwg_nonce' ); ?>
509
- <div>
510
- <span class="gallery-icon"></span>
511
- <h2><?php echo $page_title; ?></h2>
512
- </div>
513
- <div style="float:right;">
514
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-save" id='save_gall' type="button" onclick="if (spider_check_required('name', 'Name')) {return false;};
515
- spider_set_input_value('page_number', '1');
516
- spider_set_input_value('ajax_task', 'ajax_save');
517
- spider_ajax_save('galleries_form');
518
- spider_set_input_value('task', 'save');" value="<?php _e("Save", 'bwg_back'); ?>" />
519
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" onclick="if (spider_check_required('name', 'Name')) {return false;};
520
- spider_set_input_value('ajax_task', 'ajax_apply');
521
- spider_ajax_save('galleries_form');" value="<?php _e("Apply", 'bwg_back'); ?>" />
522
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="submit" onclick="spider_set_input_value('page_number', '1');
523
- spider_set_input_value('task', 'cancel')" value="<?php _e("Cancel", 'bwg_back'); ?>" />
524
- </div>
525
- <table style="clear:both; width:99.9%">
526
- <tbody>
527
- <tr>
528
- <td class="spider_label_galleries"><label for="name"><?php _e('Name:', 'bwg_back'); ?> <span style="color:#FF0000;">*</span> </label></td>
529
- <td><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="39" class="bwg_requried"/></td>
530
- </tr>
531
- <tr>
532
- <td class="spider_label_galleries"><label for="slug"><?php _e('Slug:', 'bwg_back'); ?> </label></td>
533
- <td>
534
- <input type="text" id="slug" name="slug" value="<?php echo $row->slug; ?>" size="39" />
535
- <input type="hidden" id="old_slug" name="old_slug" value="<?php echo $row->slug; ?>" size="39" />
536
- </td>
537
- </tr>
538
- <tr>
539
- <td class="spider_label_galleries"><label for="gallery_type" ><?php _e("Gallery content type:", 'bwg_back'); ?> </label></td>
540
- <td class="">
541
- <select class="select_icon" id="gallery_type" style="width:150px;" onchange="bwg_gallery_type();">
542
- <option value="" selected="selected"><?php _e("Standard", 'bwg_back'); ?></option>
543
- <option value="instagram"><?php _e("Instagram only", 'bwg_back'); ?></option>
544
- </select>
545
- <input type="text" id="gallery_type_old" name="gallery_type_old" value="" style='display:none;'/>
546
- </td>
547
- </tr>
548
- </tbody>
549
- <tbody id="add_instagram_gallery" class="spider_free_version"><!-- /*use this in javascript*/-->
550
- <tr id='tr_gallery_source' style='display:none;'>
551
- <td class="spider_label_galleries"><label for="gallery_source" class="spider_free_version_label"><?php _e("Instagram username:", 'bwg_back'); ?> </label></td>
552
- <td><input type="text" disabled="disabled" id="gallery_source" value="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" size="64" /></td>
553
- </tr>
554
- <tr id='tr_autogallery_image_number' style='display:none;'>
555
- <td class="spider_label_galleries"><label for="autogallery_image_number" class="spider_free_version_label"><?php _e("Number of Instagram recent posts to add to gallery: ", 'bwg_back'); ?></label></td>
556
- <td><input disabled="disabled" type="number" id="autogallery_image_number" value="12" /></td>
557
- </tr>
558
- <tr id='tr_instagram_post_gallery' style='display:none'>
559
- <td class="spider_label_galleries"><label class="spider_free_version_label">I<?php _e("Instagram embed type:", 'bwg_back'); ?> </label></td>
560
- <td>
561
- <input disabled="disabled" type="radio" class="inputbox" id="instagram_post_gallery_0" checked="checked" value="0" >
562
- <label for="instagram_post_gallery_0"><?php _e("Content", 'bwg_back'); ?></label>&nbsp;
563
- <input disabled="disabled" type="radio" class="inputbox" id="instagram_post_gallery_1" value="1" >
564
- <label for="instagram_post_gallery_1"><?php _e("Whole post", 'bwg_back'); ?></label>
565
- </td>
566
- </tr>
567
- <tr id='tr_update_flag' style='display:none' >
568
- <td class="spider_label_galleries"><label class="spider_free_version_label"><?php _e("Gallery autoupdate option:", 'bwg_back'); ?> </label></td>
569
- <td>
570
- <input disabled="disabled" type="radio" class="inputbox" id="update_flag_0" value="" >
571
- <label for="update_flag_0"><?php _e("No update", 'bwg_back'); ?></label>&nbsp;
572
- <input disabled="disabled" type="radio" class="inputbox" id="update_flag_1" value="add" >
573
- <label for="update_flag_1"><?php _e("Add new media, keep old ones published.", 'bwg_back'); ?></label>&nbsp;
574
- <input disabled="disabled" type="radio" class="inputbox" id="update_flag_2" checked="checked" value="replace" >
575
- <label for="update_flag_2"><?php _e("Add new media, unpublish old ones.", 'bwg_back'); ?></label>&nbsp;
576
- </td>
577
- </tr>
578
- <tr id='tr_instagram_gallery_add_button' style='display:none;' >
579
- <td class="spider_label_galleries"></td>
580
- <td>
581
- <input id="instagram_gallery_add_button" class="button-primary spider_free_version_button" type="button" onclick="" value="<?php _e("Add Instagram Gallery", 'bwg_back'); ?>" />
582
- </td>
583
- </tr>
584
- </tbody>
585
- <tbody>
586
- <tr>
587
- <td class="spider_label_galleries"><label for="description"><?php _e("Description:", 'bwg_back'); ?> </label></td>
588
- <td>
589
- <div style="width:500px;">
590
- <?php
591
- if (user_can_richedit() && $enable_wp_editor) {
592
- wp_editor($row->description, 'description', array('teeny' => TRUE, 'textarea_name' => 'description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
593
- }
594
- else {
595
- ?>
596
- <textarea cols="36" rows="5" id="description" name="description" style="resize:vertical">
597
- <?php echo $row->description; ?>
598
- </textarea>
599
- <?php
600
- }
601
- ?>
602
- </div>
603
- </td>
604
- </tr>
605
- <tr>
606
- <td class="spider_label_galleries"><label><?php _e("Author:", 'bwg_back'); ?> </label></td>
607
- <td><?php echo get_userdata($row->author)->display_name; ?></td>
608
- </tr>
609
- <tr>
610
- <td class="spider_label_galleries"><label><?php _e("Published:", 'bwg_back'); ?> </label></td>
611
- <td>
612
- <input type="radio" class="inputbox" id="published0" name="published" <?php echo (($row->published) ? '' : 'checked="checked"'); ?> value="0" >
613
- <label for="published0"><?php _e("No", 'bwg_back'); ?></label>
614
- <input type="radio" class="inputbox" id="published1" name="published" <?php echo (($row->published) ? 'checked="checked"' : ''); ?> value="1" >
615
- <label for="published1"><?php _e("Yes", 'bwg_back'); ?></label>
616
- </td>
617
- </tr>
618
- <tr>
619
- <td class="spider_label_galleries"><label for="url"><?php _e("Preview image:", 'bwg_back'); ?> </label></td>
620
- <td>
621
- <?php
622
- $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_preview_image'), admin_url('admin-ajax.php'));
623
- $query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
624
- $query_url = add_query_arg(array( 'TB_iframe' => '1'), $query_url);
625
- ?>
626
- <a href="<?php echo $query_url; ?>"
627
- id="button_preview_image"
628
- class="wd-preview-image-btn thickbox thickbox-preview"
629
- title="<?php echo __('Add Preview Image', 'bwg_back'); ?>"
630
- onclick="return false;"
631
- style="display:none;">
632
-
633
- </a>
634
- <input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>" style="display:inline-block;"/>
635
- <img id="img_preview_image"
636
- style="max-height:90px; max-width:120px; vertical-align:middle;"
637
- src="<?php echo $row->preview_image ? (site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row->preview_image) : ''; ?>" />
638
- <span id="delete_preview_image" class="spider_delete_img"
639
- onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
640
- </td>
641
- </tr>
642
- </tbody>
643
- </table>
644
- <?php echo $this->image_display($id); ?>
645
- <input id="task" name="task" type="hidden" value="" />
646
- <input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
647
- <script>
648
- <?php
649
- if ($row->preview_image == '') {
650
- ?>
651
- spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image');
652
- <?php
653
- }
654
- ?>
655
- </script>
656
- <div id="opacity_div" style="display: none; background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
657
- <div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
658
- <img src="<?php echo WD_BWG_URL . '/images/ajax_loader.gif'; ?>" class="bwg_spider_ajax_loading" style="margin-top: 200px; width:30px;">
659
- </div>
660
- </form>
661
- <?php
662
- }
663
-
664
- public function image_display($id) {
665
- wp_enqueue_media();
666
- global $WD_BWG_UPLOAD_DIR;
667
- global $wd_bwg_options;
668
- $rows_data = $this->model->get_image_rows_data($id);
669
- $page_nav = $this->model->image_page_nav($id);
670
- $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
671
- $image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
672
- $image_order_by = ((isset($_POST['image_order_by'])) ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by'])) ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
673
- $order_class = 'manage-column column-title sorted ' . $image_asc_or_desc;
674
- $page_number = (isset($_POST['page_number']) ? esc_html(stripslashes($_POST['page_number'])) : 1);
675
- $ids_string = '';
676
- $per_page = $this->model->per_page();
677
- $pager = 0;
678
- $gallery_row = $this->model->get_row_data($id);
679
- $gallery_type = ($gallery_row->gallery_type == 'instagram' || $gallery_row->gallery_type == 'instagram_post') ? 'instagram' : '';
680
- $image_array = array(
681
- 'image_set_watermark' => __('Set Watermark', 'bwg_back'),
682
- 'image_get_resize' => __('Resize', 'bwg_back'),
683
- 'resize_image_thumb' => __('Recreate Thumbnail', 'bwg_back'),
684
- 'rotate_left' => __('Rotate left', 'bwg_back'),
685
- 'rotate_right' => __('Rotate right', 'bwg_back'),
686
- 'image_recover_all' => __('Reset', 'bwg_back'),
687
- 'image_publish_all' => __('Publish', 'bwg_back'),
688
- 'image_unpublish_all' => __('Unpublish', 'bwg_back'),
689
- 'image_desc' => __('Edit', 'bwg_back'),
690
- 'image_delete_all' => __('Delete', 'bwg_back'),
691
- );
692
- ?>
693
- <div class="buttons_div_left">
694
- <?php
695
- $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image'), admin_url('admin-ajax.php'));
696
- $query_url = wp_nonce_url($query_url, 'addImages', 'bwg_nonce');
697
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
698
- ?>
699
- <a href="<?php echo $query_url; ?>" id="add_image_bwg" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add thickbox thickbox-preview" id="content-add_media" title="<?php _e("Add Images", 'bwg_back'); ?>" onclick="return false;" style="margin-bottom:5px; <?php if($gallery_type !='') {echo 'display:none';} ?>" >
700
- <?php _e('Add Images', 'bwg_back'); ?>
701
- </a>
702
- <input type="button" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" onclick="spider_media_uploader(event, true); return false;" value="<?php _e("Import from Media Library", 'bwg_back'); ?>" />
703
- <?php
704
- $query_url = wp_nonce_url(admin_url('admin-ajax.php'), '', 'bwg_nonce');
705
- /*(re?)define ajax_url to add nonce only in admin*/
706
- ?>
707
- <script>
708
- var ajax_url = "<?php echo $query_url; ?>";
709
- </script>
710
- <input id="show_add_embed" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-media" type="button" title="<?php _e("Embed Media", 'bwg_back'); ?>" onclick="jQuery('.opacity_add_embed').show(); jQuery('#add_embed_help').hide(); return false;" value="<?php _e("Embed Media", 'bwg_back'); ?>" />
711
- <input id="show_bulk_embed" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-bulk_media spider_free_version_button" type="button" title="<?php _e("Social Bulk Embed", 'bwg_back'); ?>" onclick="jQuery('.opacity_bulk_embed').show(); return false;" value="<?php _e("Social Bulk Embed", 'bwg_back'); ?>" />
712
- <?php WDWLibrary::ajax_search(__('Filename', 'bwg_back'), $search_value, 'galleries_form'); ?>
713
- </div>
714
- <div class="tablenav top buttons_div_left bwg_buttons_div">
715
- <span class="wd-btn wd-btn-primary-gray bwg_check_all non_selectable " onclick="spider_check_all_items()">
716
- <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
717
- <span style="vertical-align: middle;"><?php echo __('Select All', 'bwg_back'); ?></span>
718
- </span>
719
- <select class="select_icon bulk_action_img">
720
- <option value=""><?php _e('Bulk Actions', 'bwg_back'); ?></option>
721
- <?php
722
- foreach ($image_array as $key => $value) {
723
- ?>
724
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
725
- <?php
726
- }
727
- ?>
728
- </select>
729
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php _e("Apply", "bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action_img', '')) {return false;}" value="<?php _e("Apply", "bwg_back"); ?>" />
730
- <?php
731
- if ( is_plugin_active( 'image-optimizer-wd/io-wd.php' ) && !empty($rows_data)) {
732
-
733
- ?>
734
- <a href="<?php echo add_query_arg(array( 'page' => 'iowd_settings', 'target' => 'wd_gallery'), admin_url('admin.php'));?>" class="wd-btn wd-btn-primary" target="_blank"><?php _e("Optimize Images", "bwg_back"); ?></a>
735
- <?php
736
- }
737
- ?>
738
- <?php WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page, $pager++); ?>
739
- </div>
740
- <div class="opacity_resize_image opacity_add_embed opacity_image_desc opacity_bulk_embed bwg_opacity_media" onclick="jQuery('.opacity_add_embed').hide(); jQuery('.opacity_bulk_embed').hide(); jQuery('.opacity_resize_image').hide(); jQuery('.opacity_image_desc').hide();"></div>
741
- <div id="add_embed" class="opacity_add_embed bwg_add_embed">
742
- <input type="text" id="embed_url" name="embed_url" value="" />
743
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" type="button" onclick="if (bwg_get_embed_info('embed_url')) {jQuery('.opacity_add_embed').hide();} return false;" value="<?php _e('Add to gallery', 'bwg_back'); ?>" />
744
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="button" onclick="jQuery('.opacity_add_embed').hide(); return false;" value="<?php _e('Cancel', 'bwg_back'); ?>" />
745
- <div class="spider_description">
746
- <p><?php _e('Enter YouTube, Vimeo, Instagram, Flickr or Dailymotion URL here.', 'bwg_back'); ?> <a onclick="jQuery('#add_embed_help').show();" style='text-decoration: underline; color:blue; cursor: pointer;'><?php _e('Help', 'bwg_back'); ?></a></p>
747
- </div>
748
- <div id="add_embed_help" class="opacity_add_embed bwg_add_embed" style="display: none;">
749
- <p style="text-align:right; margin-top:0px;"><a onclick="jQuery('#add_embed_help').hide();" style="text-decoration: underline; color:blue; cursor: pointer; "><?php _e('Close', 'bwg_back'); ?></a></p>
750
- <p><b>Youtube</b> <?php _e('URL example:', 'bwg_back'); ?> <i>https://www.youtube.com/watch?v=fa4RLjE-yM8</i></p>
751
- <p><b>Vimeo</b> <?php _e('URL example:', 'bwg_back'); ?> <i>http://vimeo.com/8110647</i></p>
752
- <p><b>Instagram</b> <?php _e('URL example:', 'bwg_back'); ?> <i>http://instagram.com/p/ykvv0puS4u</i>. <?php _e('Add', 'bwg_back'); ?> "<i style="text-decoration:underline;"><?php _e('post', 'bwg_back'); ?></i>" <?php _e('to the end of URL if you want to embed the whole Instagram post, not only its content.', 'bwg_back'); ?></p>
753
- <p><b>Flickr</b> <?php _e('URL example:', 'bwg_back'); ?> <i>https://www.flickr.com/photos/sui-fong/15250186998/in/gallery-flickr-72157648726328108/</i></p>
754
- <p><b>Dailymotion</b> <?php _e('URL example:', 'bwg_back'); ?> <i>http://www.dailymotion.com/video/xexaq0_frank-sinatra-strangers-in-the-nigh_music</i></p>
755
- </div>
756
- </div>
757
- <div id="bulk_embed" class="opacity_bulk_embed bwg_bulk_embed">
758
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="button" onclick="jQuery('.opacity_bulk_embed').hide(); jQuery('#opacity_div').hide(); jQuery('#loading_div').hide(); return false;" value="<?php _e('Cancel', 'bwg_back'); ?>" style="float: right; margin-left: 5px;" />
759
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add spider_free_version_button" type="button" value="<?php _e('Add to gallery', 'bwg_back'); ?>" style="float:right; margin-left:5px;"/>
760
- <div class="spider_description"></div>
761
- <table class="spider_free_version ">
762
- <thead>
763
- <tr>
764
- <td class="spider_label_galleries"><label for="bulk_embed_from" class="spider_free_version_label_color"><?php _e("Bulk embed from:", 'bwg_back'); ?> </label></td>
765
- <td>
766
- <input type="radio" disabled="disabled" class="inputbox" id="bulk_embed_from_instagram" onclick="jQuery('#instagram_bulk_params').show();" checked="checked" value="<?php _e("instagram", 'bwg_back'); ?>" >
767
- <label for="bulk_embed_from_instagram" class="spider_free_version_label_color"><?php _e("Instagram", 'bwg_back'); ?></label>&nbsp;
768
- </td>
769
- </tr>
770
- </thead>
771
- <tbody id="instagram_bulk_params">
772
- <tr id='popup_tr_instagram_gallery_source' style='display:table-row'>
773
- <td class="spider_label_galleries"><label for="popup_instagram_gallery_source" class="spider_free_version_label_color"><?php _e("Instagram username:", 'bwg_back'); ?> </label></td>
774
- <td class="spider_free_version_label_color"><input type="text" id="popup_instagram_gallery_source" disabled="disabled" value="<?php _e("Bulk embed from Instagram is disabled in free version", 'bwg_back'); ?>" size="64" /></td>
775
- </tr>
776
- <tr id='popup_tr_instagram_image_number' style='display:table-row'>
777
- <td class="spider_label_galleries"><label for="popup_instagram_image_number" class="spider_free_version_label_color"><?php _e("Number of Instagram recent posts to add to gallery:", 'bwg_back'); ?> </label></td>
778
- <td><input type="number" disabled="disabled" id="popup_instagram_image_number" value="12" /></td>
779
- </tr>
780
- <tr id='popup_tr_instagram_post_gallery' style='display:table-row'>
781
- <td class="spider_label_galleries"><label class="spider_free_version_label_color"><?php _e("Instagram embed type:", 'bwg_back'); ?> </label></td>
782
- <td class="spider_free_version_label_color">
783
- <input type="radio" disabled="disabled" class="inputbox" id="popup_instagram_post_gallery_0" checked="checked" value="0" >
784
- <label for="popup_instagram_post_gallery_0" class="spider_free_version_label_color"><?php _e("Content", 'bwg_back'); ?></label>&nbsp;
785
- <input type="radio" disabled="disabled" class="inputbox" id="popup_instagram_post_gallery_1" value="1" >
786
- <label for="popup_instagram_post_gallery_1" class="spider_free_version_label_color"><?php _e("Whole post", 'bwg_back'); ?></label>
787
- </td>
788
- </tr>
789
- </tbody>
790
- </table>
791
- </div>
792
- <div class="opacity_resize_image bwg_resize_image">
793
- <?php _e("Resize images to: ", 'bwg_back'); ?>
794
- <input type="text" name="image_width" id="image_width" value="1600" /> x
795
- <input type="text" name="image_height" id="image_height" value="1200" /> px
796
- <input class="wd-btn wd-btn-primary wd-not-image" type="button" onclick="spider_set_input_value('ajax_task', 'image_resize');
797
- spider_ajax_save('galleries_form');
798
- jQuery('.opacity_resize_image').hide();
799
- return false;" value="<?php _e("Resize", 'bwg_back'); ?>" />
800
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="button" onclick="jQuery('.opacity_resize_image').hide(); return false;" value="<?php _e("Cancel", 'bwg_back'); ?>" />
801
- <div class="spider_description"><?php _e("The maximum size of resized image.", 'bwg_back'); ?></div>
802
- </div>
803
- <div id="add_desc" class="opacity_image_desc bwg_image_desc">
804
- <div>
805
- <span class="bwg_popup_label">
806
- <?php _e('Alt/Title: ', 'bwg_back'); ?>
807
- </span>
808
- <input class="bwg_popup_input" type="text" id="title" name="title" value="" />
809
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add" type="button" onclick="if (window.parent.bwg_add_title_desc()) {jQuery('.opacity_image_desc').hide();} return false;" value="<?php echo __('Update', 'bwg_back'); ?>" />
810
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-cancel" type="button" onclick="jQuery('.opacity_image_desc').hide(); return false;" value="<?php echo __('Cancel', 'bwg_back'); ?>" />
811
- </div>
812
- <?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?>
813
- <div>
814
- <span class="bwg_popup_label">
815
- <?php _e('Redirect URL: ', 'bwg_back'); ?>
816
- </span>
817
- <input class="bwg_popup_input" type="text" id="redirecturl" name="redirecturl" value="" />
818
- </div>
819
- <?php } ?>
820
- <div>
821
- <span class="bwg_popup_label">
822
- <?php _e('Description: ', 'bwg_back'); ?>
823
- </span>
824
- <textarea class="bwg_popup_input" type="text" id="desc" name="desc"></textarea>
825
- </div>
826
- </div>
827
- <div id="draganddrop" class="wd_updated" style="display:none;"><strong><p><?php _e('Changes made in this table should be saved.', 'bwg_back'); ?></p></strong></div>
828
- <table id="images_table" class="wp-list-table widefat fixed pages">
829
- <thead>
830
- <th class="check-column table_small_col table_medium_col manage-column column-title sorted asc" style="margin: 0px auto 0px 15px; width: 60px; vertical-align: middle;">
831
- <a id="show_hide_weights" class="bwg_order_column" title="<?php _e('Hide order column', 'bwg_back'); ?>" onclick="spider_show_hide_weights();return false;" value="<?php _e('Hide order column', 'bwg_back'); ?>"></a>
832
- <a id="th_order" onclick="spider_set_input_value('task', '');
833
- spider_set_input_value('image_order_by', 'order');
834
- spider_set_input_value('image_asc_or_desc', 'desc');
835
- spider_ajax_save('galleries_form');" style="display: none;">
836
- <span class="sorting-indicator"></span>
837
- </a>
838
- </th>
839
- <th class="manage-column column-cb check-column table_small_col" style="padding-top:12px !important;"><input id="check_all" type="checkbox" onclick="spider_check_all(this)" style="margin:5px auto 0;" /></th>
840
- <th class="table_small_col">#</th>
841
- <th class="table_extra_large_col"><?php _e('Thumbnail', 'bwg_back'); ?></th>
842
- <th class="sortable table_extra_large_col <?php if ($image_order_by == 'filename') {echo $order_class;} ?>">
843
- <a onclick="spider_set_input_value('task', '');
844
- spider_set_input_value('image_order_by', 'filename');
845
- spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'filename' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
846
- spider_ajax_save('galleries_form');">
847
- <span><?php _e('Filename', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
848
- </a>
849
- </th>
850
- <th class="sortable table_extra_large_col <?php if ($image_order_by == 'alt') {echo $order_class;} ?>">
851
- <a onclick="spider_set_input_value('task', '');
852
- spider_set_input_value('image_order_by', 'alt');
853
- spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'alt' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
854
- spider_ajax_save('galleries_form');">
855
- <span><?php _e('Alt/Title', 'bwg_back'); ?><?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?><br /><?php echo __('Redirect', 'bwg_back'); ?> URL<?php } ?></span><span class="sorting-indicator"></span>
856
- </a>
857
- </th>
858
- <th class="sortable table_extra_large_col <?php if ($image_order_by == 'description') {echo $order_class;} ?>">
859
- <a onclick="spider_set_input_value('task', '');
860
- spider_set_input_value('image_order_by', 'description');
861
- spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'description' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
862
- spider_ajax_save('galleries_form');">
863
- <span><?php _e('Description', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
864
- </a>
865
- </th>
866
- <?php
867
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addTags', 'bwg_nonce' );
868
- $query_url = add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'bwg_items_per_page' => $per_page ), $query_url);
869
- ?>
870
- <th class="table_extra_big_col">
871
- <a onclick="return bwg_check_checkboxes();" title="<?php echo __('Add tag', 'bwg_back'); ?>" href="<?php echo $query_url; ?>&TB_iframe=1" class="wd-btn wd-btn-primary wd-not-image thickbox thickbox-preview"><?php echo __('Add tag', 'bwg_back'); ?></a>
872
- </th>
873
- <th class="sortable table_big_col <?php if ($image_order_by == 'published') {echo $order_class;} ?>">
874
- <a onclick="spider_set_input_value('task', '');
875
- spider_set_input_value('image_order_by', 'published');
876
- spider_set_input_value('image_asc_or_desc', '<?php echo ($image_order_by == 'published' && $image_asc_or_desc == 'asc') ? 'desc' : 'asc'; ?>');
877
- spider_ajax_save('galleries_form');">
878
- <span><?php _e('Published', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
879
- </a>
880
- </th>
881
- <th class="table_small_col"><?php echo __('Delete', 'bwg_back'); ?></th>
882
- </thead>
883
- <tbody id="tbody_arr">
884
- <?php
885
- $i = ($page_number - 1) * $per_page;
886
- if ($rows_data) {
887
- foreach ($rows_data as $row_data) {
888
- $is_embed = preg_match('/EMBED/',$row_data->filetype)==1 ? true :false;
889
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
890
- $rows_tag_data = $this->model->get_tag_rows_data($row_data->id);
891
- $published_image = (($row_data->published) ? 'publish-blue' : 'unpublish-red');
892
- $published = (($row_data->published) ? 'unpublish' : 'publish');
893
- $unpublish = ((!$row_data->published) ? 'Unpublish' : 'Publish');
894
- ?>
895
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
896
- <td class="spider_order table_medium_col"><input id="order_input_<?php echo $row_data->id; ?>" name="order_input_<?php echo $row_data->id; ?>" type="text" size="1" value="<?php echo $row_data->order; ?>" /></td>
897
- <td class="connectedSortable handles table_small_col"><div title="Drag to re-order" class="handle" style="margin:5px auto 0 auto;"></div></td>
898
- <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
899
- <td class="table_small_col"><?php echo ++$i; ?></td>
900
- <td class="table_extra_large_col">
901
- <?php
902
- $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/', $row_data->filetype) == 1 ? true :false;
903
- $instagram_post_width = 0;
904
- $instagram_post_height = 0;
905
- if ($is_embed_instagram_post) {
906
- $image_resolution = explode(' x ', $row_data->resolution);
907
- if (is_array($image_resolution)) {
908
- $instagram_post_width = $image_resolution[0];
909
- $instagram_post_height = explode(' ', $image_resolution[1]);
910
- $instagram_post_height = $instagram_post_height[0];
911
- }
912
- }
913
- $query_url = add_query_arg(array('action' => 'editThumb', 'type' => 'display'/*thumb_display*/, 'image_id' => $row_data->id, 'width' => '800', 'height' => '500', 'instagram_post_width' => $instagram_post_width, 'instagram_post_height' => $instagram_post_height), admin_url('admin-ajax.php'));
914
- $query_url = wp_nonce_url( $query_url, 'editThumb', 'bwg_nonce' );
915
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
916
- $is_embed_instagram_post = preg_match('/INSTAGRAM_POST/',$row_data->filetype) == 1 ? true : false;
917
- ?>
918
- <a class="thickbox thickbox-preview" title="<?php echo $row_data->alt; ?>" href="<?php echo $query_url; ?>">
919
- <img id="image_thumb_<?php echo $row_data->id; ?>" class="thumb" src="<?php echo (!$is_embed ? site_url() . '/' . $WD_BWG_UPLOAD_DIR : "") . $row_data->thumb_url . ($is_embed ? '' : '?date=' . date('Y-m-y H:i:s')); ?>" />
920
- </a>
921
- </td>
922
- <td class="table_extra_large_col">
923
- <div class="filename" id="filename_<?php echo $row_data->id; ?>">
924
- <strong><a title="<?php echo $row_data->alt; ?>" class="spider_word_wrap thickbox thickbox-preview" href="<?php echo $query_url ; ?>"><?php echo $row_data->filename; ?></a></strong>
925
- </div>
926
- <div class="fileDescription" title="<?php _e("Date modified", 'bwg_back'); ?>" id="date_modified_<?php echo $row_data->id; ?>"><?php echo date("d F Y, H:i", strtotime($row_data->date)); ?></div>
927
- <div class="fileDescription" title="<?php _e("Image Resolution", 'bwg_back'); ?>" id="fileresolution_<?php echo $row_data->id; ?>"><?php echo $row_data->resolution; ?></div>
928
- <div class="fileDescription" title="<?php _e("Image size", 'bwg_back'); ?>" id="filesize_<?php echo $row_data->id; ?>"><?php echo $row_data->size; ?></div>
929
- <div class="fileDescription" title="<?php _e("Type", 'bwg_back'); ?>" id="filetype_<?php echo $row_data->id; ?>"><?php echo $row_data->filetype; ?></div>
930
- <?php
931
- if (!$is_embed) {
932
- ?>
933
- <div>
934
- <?php
935
- $query_url = add_query_arg(array('action' => 'editThumb', 'type' => 'crop', 'image_id' => $row_data->id, 'width' => '800', 'height' => '500'), admin_url('admin-ajax.php'));
936
- $query_url = wp_nonce_url( $query_url, 'editThumb', 'bwg_nonce' );
937
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
938
- ?>
939
- <span class="edit_thumb"><a class="thickbox thickbox-preview" href="<?php echo $query_url; ?>"><?php _e("Crop", 'bwg_back'); ?></a></span> |
940
- <?php
941
- $query_url = add_query_arg(array('action' => 'editThumb', 'type' => 'rotate', 'image_id' => $row_data->id, 'width' => '800', 'height' => '500'), admin_url('admin-ajax.php'));
942
- $query_url = wp_nonce_url( $query_url, 'editThumb', 'bwg_nonce' );
943
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
944
- ?>
945
- <span class="edit_thumb"><a class="thickbox thickbox-preview" href="<?php echo $query_url; ?>"><?php _e("Edit", 'bwg_back'); ?></a></span> |
946
- <span class="edit_thumb"><a onclick="if (confirm('<?php echo addslashes(__('Do you want to reset the image?', 'bwg_back')); ?>')) {
947
- spider_set_input_value('ajax_task', 'recover');
948
- spider_set_input_value('image_current_id', '<?php echo $row_data->id; ?>');
949
- spider_ajax_save('galleries_form');
950
- }
951
- return false;"><?php _e('Reset', 'bwg_back'); ?></a></span>
952
- </div>
953
- <?php } ?>
954
- <input type="hidden" id="image_url_<?php echo $row_data->id; ?>" name="image_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->image_url; ?>" />
955
- <input type="hidden" id="thumb_url_<?php echo $row_data->id; ?>" name="thumb_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->thumb_url; ?>" />
956
- <input type="hidden" id="input_filename_<?php echo $row_data->id; ?>" name="input_filename_<?php echo $row_data->id; ?>" value="<?php echo $row_data->filename; ?>" />
957
- <input type="hidden" id="input_date_modified_<?php echo $row_data->id; ?>" name="input_date_modified_<?php echo $row_data->id; ?>" value="<?php echo $row_data->date; ?>" />
958
- <input type="hidden" id="input_resolution_<?php echo $row_data->id; ?>" name="input_resolution_<?php echo $row_data->id; ?>" value="<?php echo $row_data->resolution; ?>" />
959
- <input type="hidden" id="input_size_<?php echo $row_data->id; ?>" name="input_size_<?php echo $row_data->id; ?>" value="<?php echo $row_data->size; ?>" />
960
- <input type="hidden" id="input_filetype_<?php echo $row_data->id; ?>" name="input_filetype_<?php echo $row_data->id; ?>" value="<?php echo $row_data->filetype; ?>" />
961
- </td>
962
- <td class="table_extra_large_col">
963
- <textarea rows="2" id="image_alt_text_<?php echo $row_data->id; ?>" name="image_alt_text_<?php echo $row_data->id; ?>" style="resize:vertical;"><?php echo $row_data->alt; ?></textarea>
964
- <?php if ($wd_bwg_options->thumb_click_action != 'open_lightbox') { ?>
965
- <input size="24" type="text" id="redirect_url_<?php echo $row_data->id; ?>" name="redirect_url_<?php echo $row_data->id; ?>" value="<?php echo $row_data->redirect_url; ?>" />
966
- <?php } ?>
967
- </td>
968
- <td class="table_extra_large_col">
969
- <textarea rows="3" id="image_description_<?php echo $row_data->id; ?>" name="image_description_<?php echo $row_data->id; ?>" style="resize:vertical;"><?php echo $row_data->description; ?></textarea>
970
- </td>
971
- <td class="table_extra_large_col">
972
- <?php
973
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addTags', 'bwg_nonce' );
974
- $query_url = add_query_arg(array('action' => 'addTags', 'image_id' => $row_data->id, 'width' => '650', 'height' => '500', 'bwg_items_per_page' => $per_page, 'TB_iframe' => '1'), $query_url);
975
- ?>
976
- <a href="<?php echo $query_url; ?>" title="<?php _e('Add tag', 'bwg_back'); ?>" class="button-small wd-btn wd-btn-primary wd-not-image thickbox thickbox-preview"><?php _e('Add tag', 'bwg_back'); ?></a>
977
- <div class="tags_div" id="tags_div_<?php echo $row_data->id; ?>">
978
- <?php
979
- $tags_id_string = '';
980
- if ($rows_tag_data) {
981
- foreach($rows_tag_data as $row_tag_data) {
982
- ?>
983
- <div class="tag_div" id="<?php echo $row_data->id; ?>_tag_<?php echo $row_tag_data->term_id; ?>">
984
- <span class="tag_name"><?php echo $row_tag_data->name; ?></span>
985
- <span style="float:right;" class="spider_delete_img_small" onclick="bwg_remove_tag('<?php echo $row_tag_data->term_id; ?>', '<?php echo $row_data->id; ?>')" />
986
- </div>
987
- <?php
988
- $tags_id_string .= $row_tag_data->term_id . ',';
989
- }
990
- }
991
- ?>
992
- </div>
993
- <input type="hidden" value="<?php echo $tags_id_string; ?>" id="tags_<?php echo $row_data->id; ?>" name="tags_<?php echo $row_data->id; ?>"/>
994
- </td>
995
- <td class="table_big_col publish_icon"><a style="background-image:url('<?php echo WD_BWG_URL . '/images/icons/' . $published_image . '.png'; ?>'); background-repeat: no-repeat; display: inline-block; width: 18px; height: 22px;margin: 3px; vertical-align: middle;background-size: contain;" title="<?php echo $unpublish; ?>" onclick="spider_set_input_value('ajax_task', 'image_<?php echo $published; ?>');
996
- spider_set_input_value('image_current_id', '<?php echo $row_data->id; ?>');
997
- spider_ajax_save('galleries_form');"></a></td>
998
- <td class="table_big_col spider_delete_button" ><a class="bwg_img_remove" title='<?php echo __('Delete', 'bwg_back'); ?>' onclick="if (confirm('<?php echo addslashes(__('Do you want to delete selected items?', 'bwg_back')); ?>')) {
999
- spider_set_input_value('ajax_task', 'image_delete');
1000
- spider_set_input_value('image_current_id', '<?php echo $row_data->id; ?>');
1001
- spider_ajax_save('galleries_form');
1002
- } else {
1003
- return false;
1004
- }"></a></td>
1005
- </tr>
1006
- <?php
1007
- $ids_string .= $row_data->id . ',';
1008
- }
1009
- }
1010
- ?>
1011
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
1012
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
1013
- <input id="image_asc_or_desc" name="image_asc_or_desc" type="hidden" value="asc" />
1014
- <input id="image_order_by" name="image_order_by" type="hidden" value="<?php echo $image_order_by; ?>" />
1015
- <input id="ajax_task" name="ajax_task" type="hidden" value="" />
1016
- <input id="image_current_id" name="image_current_id" type="hidden" value="" />
1017
- <input id="added_tags_select_all" name="added_tags_select_all" type="hidden" value="" />
1018
- <input type="hidden" id="bulk_edit" name="bulk_edit" value="0" />
1019
- </tbody>
1020
- </table>
1021
- <div class="tablenav bottom">
1022
- <?php
1023
- WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page, $pager++);
1024
- ?>
1025
- </div>
1026
- <script>
1027
- window.onload = spider_show_hide_weights;
1028
- </script>
1029
- <?php
1030
- }
1031
-
1032
- ////////////////////////////////////////////////////////////////////////////////////////
1033
- // Getters & Setters //
1034
- ////////////////////////////////////////////////////////////////////////////////////////
1035
- ////////////////////////////////////////////////////////////////////////////////////////
1036
- // Private Methods //
1037
- ////////////////////////////////////////////////////////////////////////////////////////
1038
- ////////////////////////////////////////////////////////////////////////////////////////
1039
- // Listeners //
1040
- ////////////////////////////////////////////////////////////////////////////////////////
1041
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewLicensing_bwg.php DELETED
@@ -1,110 +0,0 @@
1
- <?php
2
-
3
- class BWGViewLicensing_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- ?>
27
- <div id="featurs_tables">
28
- <div id="featurs_table1">
29
- <span>WordPress 3.4+ <?php _e("ready", 'bwg_back'); ?></span>
30
- <span>SEO-<?php _e("friendly", 'bwg_back'); ?></span>
31
- <span><?php _e("Responsive Design and Layout", 'bwg_back'); ?></span>
32
- <span><?php _e("5 Standard Gallery/Album Views", 'bwg_back'); ?></span>
33
- <span><?php _e("Watermarking/ Advertising Possibility", 'bwg_back'); ?></span>
34
- <span><?php _e("Basic Tag Cloud Widget", 'bwg_back'); ?></span>
35
- <span><?php _e("Image Download", 'bwg_back'); ?></span>
36
- <span><?php _e("Photo Gallery Slideshow Widget", 'bwg_back'); ?></span>
37
- <span><?php _e("Photo Gallery Widget", 'bwg_back'); ?></span>
38
- <span><?php _e("Slideshow/Lightbox Effects", 'bwg_back'); ?></span>
39
- <span><?php _e("Possibility of Editing/Creating New Themes", 'bwg_back'); ?></span>
40
- <span><?php _e("10 Pro Gallery/Album Views", 'bwg_back'); ?></span>
41
- <span><?php _e("Image Commenting", 'bwg_back'); ?></span>
42
- <span><?php _e("Image Social Sharing", 'bwg_back'); ?></span>
43
- <span><?php _e("Photo Gallery Tags Cloud Widget", 'bwg_back'); ?></span>
44
- <span><?php _e("Instagram Integration", 'bwg_back'); ?></span>
45
- <span>AddThis <?php _e("Integration", 'bwg_back'); ?></span>
46
- <span><?php _e("Add-ons Support", 'bwg_back'); ?></span>
47
- </div>
48
- <div id="featurs_table2">
49
- <span style="padding-top: 18px;height: 39px;"><?php _e("Free", 'bwg_back'); ?></span>
50
- <span class="yes"></span>
51
- <span class="yes"></span>
52
- <span class="yes"></span>
53
- <span class="yes"></span>
54
- <span class="yes"></span>
55
- <span class="yes"></span>
56
- <span class="yes"></span>
57
- <span class="yes"></span>
58
- <span class="yes"></span>
59
- <span>1</span>
60
- <span class="no"></span>
61
- <span class="no"></span>
62
- <span class="no"></span>
63
- <span class="no"></span>
64
- <span class="no"></span>
65
- <span class="no"></span>
66
- <span class="no"></span>
67
- <span class="no"></span>
68
- </div>
69
- <div id="featurs_table3">
70
- <span><?php _e("Pro Version", 'bwg_back'); ?></span>
71
- <span class="yes"></span>
72
- <span class="yes"></span>
73
- <span class="yes"></span>
74
- <span class="yes"></span>
75
- <span class="yes"></span>
76
- <span class="yes"></span>
77
- <span class="yes"></span>
78
- <span class="yes"></span>
79
- <span class="yes"></span>
80
- <span>15</span>
81
- <span class="yes"></span>
82
- <span class="yes"></span>
83
- <span class="yes"></span>
84
- <span class="yes"></span>
85
- <span class="yes"></span>
86
- <span class="yes"></span>
87
- <span class="yes"></span>
88
- <span class="yes"></span>
89
- </div>
90
- </div>
91
- <div style="float: left; clear: both;">
92
- <p><?php _e("After purchasing the commercial version follow these steps:", 'bwg_back'); ?></p>
93
- <ol>
94
- <li><?php _e("Deactivate Photo Gallery plugin.", 'bwg_back'); ?></li>
95
- <li><?php _e("Delete Photo Gallery plugin.", 'bwg_back'); ?></li>
96
- <li><?php _e("Install the downloaded commercial version of the plugin.", 'bwg_back'); ?></li>
97
- </ol>
98
- </div>
99
- <?php
100
- }
101
- ////////////////////////////////////////////////////////////////////////////////////////
102
- // Getters & Setters //
103
- ////////////////////////////////////////////////////////////////////////////////////////
104
- ////////////////////////////////////////////////////////////////////////////////////////
105
- // Private Methods //
106
- ////////////////////////////////////////////////////////////////////////////////////////
107
- ////////////////////////////////////////////////////////////////////////////////////////
108
- // Listeners //
109
- ////////////////////////////////////////////////////////////////////////////////////////
110
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewOptions_bwg.php DELETED
@@ -1,1817 +0,0 @@
1
- <?php
2
-
3
- class BWGViewOptions_bwg {
4
- private $model;
5
-
6
- public function __construct($model) {
7
- $this->model = $model;
8
- }
9
-
10
- public function display($reset = FALSE) {
11
- if (isset($_GET['bwg_start_tour']) && $_GET['bwg_start_tour'] == '1') {
12
- update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
13
- WDWLibrary::spider_redirect('admin.php?page=options_bwg');
14
- }
15
- global $WD_BWG_UPLOAD_DIR;
16
- ?>
17
- <script>
18
- function bwg_add_music(files) {
19
- document.getElementById("slideshow_audio_url").value = files[0]['url'];
20
- }
21
- function bwg_add_built_in_watermark_image(files) {
22
- document.getElementById("built_in_watermark_url").value = '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + files[0]['url'];
23
- }
24
- function bwg_add_watermark_image(files) {
25
- document.getElementById("watermark_url").value = '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + files[0]['url'];
26
- }
27
- </script>
28
- <?php
29
- $row = new WD_BWG_Options($reset);
30
- if (!$row) {
31
- echo WDWLibrary::message_id(2);
32
- return;
33
- }
34
- $built_in_watermark_fonts = array();
35
- foreach (scandir(path_join(WD_BWG_DIR, 'fonts')) as $filename) {
36
- if (strpos($filename, '.') === 0) continue;
37
- else $built_in_watermark_fonts[] = $filename;
38
- }
39
- $watermark_fonts = array(
40
- 'arial' => 'Arial',
41
- 'Lucida grande' => 'Lucida grande',
42
- 'segoe ui' => 'Segoe ui',
43
- 'tahoma' => 'Tahoma',
44
- 'trebuchet ms' => 'Trebuchet ms',
45
- 'verdana' => 'Verdana',
46
- 'cursive' =>'Cursive',
47
- 'fantasy' => 'Fantasy',
48
- 'monospace' => 'Monospace',
49
- 'serif' => 'Serif',
50
- );
51
- $effects = array(
52
- 'none' => 'None',
53
- 'cubeH' => 'Cube Horizontal',
54
- 'cubeV' => 'Cube Vertical',
55
- 'fade' => 'Fade',
56
- 'sliceH' => 'Slice Horizontal',
57
- 'sliceV' => 'Slice Vertical',
58
- 'slideH' => 'Slide Horizontal',
59
- 'slideV' => 'Slide Vertical',
60
- 'scaleOut' => 'Scale Out',
61
- 'scaleIn' => 'Scale In',
62
- 'blockScale' => 'Block Scale',
63
- 'kaleidoscope' => 'Kaleidoscope',
64
- 'fan' => 'Fan',
65
- 'blindH' => 'Blind Horizontal',
66
- 'blindV' => 'Blind Vertical',
67
- 'random' => 'Random',
68
- );
69
- ?>
70
- <form method="post" class="wrap bwg_form" action="admin.php?page=options_bwg" style="float: left; width: 98%;">
71
- <?php wp_nonce_field( 'options_bwg', 'bwg_nonce' ); ?>
72
- <div>
73
- <span class="option-icon"></span>
74
- <h2 id="ed_options"><?php _e('Edit options', 'bwg_back'); ?></h2>
75
- </div>
76
- <div style="display: inline-block; width: 100%;">
77
- <div style="float: right;">
78
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-save" type="submit" onclick="if (spider_check_required('title', 'Title')) {return false;}; spider_set_input_value('task', 'save')" value="<?php _e('Save', 'bwg_back'); ?>" />
79
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-reset" type="submit" onclick="if (confirm('<?php echo addslashes(__('Do you want to reset to default?', 'bwg_back')); ?>')) {
80
- spider_set_input_value('task', 'reset');
81
- } else {
82
- return false;
83
- }" value="<?php _e('Reset all options', 'bwg_back'); ?>" />
84
- </div>
85
- </div>
86
- <div class="tab_conteiner">
87
- <div class="tab_button_wrap option_tab_button_wrap" id="bwg_options" onclick="bwg_change_tab('bwg_options_box');return false;">
88
- <a id="bwg_standart" class="wd-btn_tabs wd-btn-primary-tabs wd-not-image_gray">
89
- <div class="bwg_tab_label"><?php _e('Global options', 'bwg_back'); ?></div>
90
- </a>
91
- </div>
92
- <div class="tab_button_wrap default_tab_button_wrap" id="bwg_default_option" onclick="bwg_change_tab('bwg_default_box');return false;">
93
- <a id="bwg_default" class="wd-btn_tabs wd-btn-primary-tabs wd-not-image_gray">
94
- <div class="bwg_tab_label">
95
- <?php _e('Shortcode defaults', 'bwg_back'); ?>
96
- <small class="bwg_tab_desc"><?php _e('Applies to new shortcodes only', 'bwg_back'); ?></small>
97
- </div>
98
- </a>
99
- </div>
100
- <input type="hidden" id="type_option" name="type_option" value="<?php echo (isset($_POST["type_option"]) ? esc_html(stripslashes($_POST["type_option"])) : "bwg_default_box"); ?>" />
101
- </div>
102
- <div class="bwg_default_box default_option">
103
- <div style="display: none; width: 100%;" id="display_default_option_panel">
104
- <div class="options_tab">
105
- <div id="div_8" class="gallery_type" onclick="bwg_change_option_type('8')"> <?php echo __('Thumbnail options', 'bwg_back'); ?></div>
106
- <div class="bwg_line_option">|</div>
107
- <div id="div_9" class="gallery_type" onclick="bwg_change_option_type('9')"> <?php echo __('Lightbox', 'bwg_back'); ?></div>
108
- <div class="bwg_line_option">|</div>
109
- <div id="div_10" class="gallery_type" onclick="bwg_change_option_type('10')"> <?php echo __('Slideshow', 'bwg_back'); ?></div>
110
- <div class="bwg_line_option">|</div>
111
- <div id="div_11" class="gallery_type" onclick="bwg_change_option_type('11')"> <?php echo __('Album options', 'bwg_back'); ?></div>
112
- <div class="bwg_line_option">|</div>
113
- <div id="div_12" class="gallery_type" onclick="bwg_change_option_type('12')"> <?php echo __('Image options', 'bwg_back'); ?></div>
114
- <div class="bwg_line_option">|</div>
115
- <div id="div_13" class="gallery_type" onclick="bwg_change_option_type('13')"> <?php echo __('Carousel', 'bwg_back'); ?></div>
116
- <div class="bwg_line_option">|</div>
117
- <div id="div_14" class="gallery_type" onclick="bwg_change_option_type('14')"> <?php echo __('Advertisement', 'bwg_back'); ?></div>
118
- <input type="hidden" id="type_def" name="type_def" value="<?php echo (isset($_POST["type_def"]) ? esc_html(stripslashes($_POST["type_def"])) : "8"); ?>"/>
119
- </div>
120
- <!--Thumbnail options-->
121
- <div class="spider_div_options" id="div_content_8">
122
- <table>
123
- <tbody>
124
- <tr style="display:none;">
125
- <td class="spider_label_options">
126
- <label><?php _e("Masonry:", 'bwg_back'); ?></label>
127
- </td>
128
- <td>
129
- <input type="radio" name="masonry" id="masonry_1" value="horizontal" <?php if ($row->masonry == "horizontal") echo 'checked="checked"'; ?> /><label for="masonry_1"><?php _e("Horizontal", 'bwg_back'); ?></label>
130
- <input type="radio" name="masonry" id="masonry_0" value="vertical" <?php if ($row->masonry == "vertical") echo 'checked="checked"'; ?> /><label for="masonry_0"><?php _e("Vertical", 'bwg_back'); ?></label>
131
- <div class="spider_description"></div>
132
- </td>
133
- </tr>
134
- <tr style="display:none;">
135
- <td class="spider_label_options">
136
- <label><?php _e("Mosaic:", 'bwg_back'); ?></label>
137
- </td>
138
- <td>
139
- <input type="radio" name="mosaic" id="mosaic_0" value="vertical" <?php if ($row->mosaic == "vertical") echo 'checked="checked"'; ?> /><label for="mosaic_0"><?php _e("Vertical", 'bwg_back'); ?></label>
140
- <input type="radio" name="mosaic" id="mosaic_1" value="horizontal" <?php if ($row->mosaic == "horizontal") echo 'checked="checked"'; ?> /><label for="mosaic_1"><?php _e("Horizontal", 'bwg_back'); ?></label>
141
- <div class="spider_description"></div>
142
- </td>
143
- </tr>
144
- <tr style="display:none;">
145
- <td class="spider_label_options">
146
- <label><?php _e("Resizable mosaic:", 'bwg_back'); ?></label>
147
- </td>
148
- <td>
149
- <input type="radio" name="resizable_mosaic" id="resizable_mosaic_0" value="0" <?php if ($row->resizable_mosaic == "0") echo 'checked="checked"'; ?> /><label for="resizable_mosaic_0"><?php _e("No", 'bwg_back'); ?></label>
150
- <input type="radio" name="resizable_mosaic" id="resizable_mosaic_1" value="1" <?php if ($row->resizable_mosaic == "1") echo 'checked="checked"'; ?> /><label for="resizable_mosaic_1"><?php _e("Yes", 'bwg_back'); ?></label>
151
- <div class="spider_description"></div>
152
- </td>
153
- </tr>
154
- <tr style="display:none;">
155
- <td class="spider_label_options">
156
- <label for="mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label>
157
- </td>
158
- <td>
159
- <input type="text" name="mosaic_total_width" id="mosaic_total_width" value="<?php echo $row->mosaic_total_width; ?>" class="spider_int_input" /> %
160
- <div class="spider_description"><?php _e("Width of mosaic as a percentage of container's width.", 'bwg_back'); ?></div>
161
- </td>
162
- </tr>
163
- <tr>
164
- <td class="spider_label_options">
165
- <label for="image_column_number"><?php _e("Number of image columns:", 'bwg_back'); ?> </label>
166
- </td>
167
- <td>
168
- <input type="text" name="image_column_number" id="image_column_number" value="<?php echo $row->image_column_number; ?>" class="spider_int_input" />
169
- <div class="spider_description"></div>
170
- </td>
171
- </tr>
172
- <tr>
173
- <td class="spider_label_options">
174
- <label for="images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label>
175
- </td>
176
- <td>
177
- <input type="text" name="images_per_page" id="images_per_page" value="<?php echo $row->images_per_page; ?>" class="spider_int_input" />
178
- <div class="spider_description"></div>
179
- </td>
180
- </tr>
181
- <tr>
182
- <td class="spider_label_options">
183
- <label for="thumb_width"><?php _e("Frontend thumbnail dimensions:", 'bwg_back'); ?> </label>
184
- </td>
185
- <td>
186
- <input type="text" name="thumb_width" id="thumb_width" value="<?php echo $row->thumb_width; ?>" class="spider_int_input" /> x
187
- <input type="text" name="thumb_height" id="thumb_height" value="<?php echo $row->thumb_height; ?>" class="spider_int_input" /> px
188
- <div class="spider_description"><?php _e("The default size of the thumbnail which will be displayed in the website", 'bwg_back'); ?></div>
189
- </td>
190
- </tr>
191
- <tr>
192
- <td class="spider_label_options">
193
- <label><?php _e("Show image title:", 'bwg_back'); ?></label>
194
- </td>
195
- <td>
196
- <input type="radio" name="image_title_show_hover" id="image_title_show_hover_1" value="hover" <?php if ($row->image_title_show_hover == "hover") echo 'checked="checked"'; ?> /><label for="image_title_show_hover_1"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
197
- <input type="radio" name="image_title_show_hover" id="image_title_show_hover_0" value="show" <?php if ($row->image_title_show_hover == "show") echo 'checked="checked"'; ?> /><label for="image_title_show_hover_0"><?php _e("Always show", 'bwg_back'); ?></label><br />
198
- <input type="radio" name="image_title_show_hover" id="image_title_show_hover_2" value="none" <?php if ($row->image_title_show_hover == "none") echo 'checked="checked"'; ?> /><label for="image_title_show_hover_2"><?php _e("Don't show", 'bwg_back'); ?></label>
199
- <div class="spider_description"></div>
200
- </td>
201
- </tr>
202
- <tr>
203
- <td class="spider_label_options"><label><?php _e("Enable image pagination:", 'bwg_back'); ?> </label></td>
204
- <td>
205
- <input type="radio" name="image_enable_page" id="image_enable_page_yes" value="1" <?php if ($row->image_enable_page) echo 'checked="checked"'; ?> /><label for="image_enable_page_yes"><?php _e("Yes", 'bwg_back'); ?></label>
206
- <input type="radio" name="image_enable_page" id="image_enable_page_no" value="0" <?php if (!$row->image_enable_page) echo 'checked="checked"'; ?> /><label for="image_enable_page_no"><?php _e("No", 'bwg_back'); ?></label>
207
- <div class="spider_description"></div>
208
- </td>
209
- </tr>
210
- <tr id="tr_thumb_show_name">
211
- <td class="spider_label_options"><label><?php _e("Show gallery name:", 'bwg_back'); ?> </label></td>
212
- <td>
213
- <input type="radio" name="showthumbs_name" id="thumb_name_yes" value="1" <?php if ($row->showthumbs_name) echo 'checked="checked"'; ?> /><label for="thumb_name_yes"><?php _e("Yes", 'bwg_back'); ?></label>
214
- <input type="radio" name="showthumbs_name" id="thumb_name_no" value="0" <?php if (!$row->showthumbs_name) echo 'checked="checked"'; ?> /><label for="thumb_name_no"><?php _e("No", 'bwg_back'); ?></label>
215
- <div class="spider_description"></div>
216
- </td>
217
- </tr>
218
- <tr>
219
- <td class="spider_label_options"><label><?php echo __('Show Gallery description:', 'bwg_back'); ?> </label></td>
220
- <td>
221
- <input type="radio" name="show_gallery_description" id="show_gallery_description_1" value="1" <?php if ($row->show_gallery_description) echo 'checked="checked"'; ?> /><label for="show_gallery_description_1"><?php echo __('Yes', 'bwg_back'); ?></label>
222
- <input type="radio" name="show_gallery_description" id="show_gallery_description_0" value="0" <?php if (!$row->show_gallery_description) echo 'checked="checked"'; ?> /><label for="show_gallery_description_0"><?php echo __('No', 'bwg_back'); ?></label>
223
- <div class="spider_description"></div>
224
- </td>
225
- </tr>
226
- <tr>
227
- <td class="spider_label_options"><label><?php _e("Image click action:", 'bwg_back'); ?> </label></td>
228
- <td>
229
- <input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($row->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_thumb_link_target', 'thumb_click_action_1')" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label>
230
- <input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($row->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_thumb_link_target', 'thumb_click_action_2')" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label>
231
- <input type="radio" name="thumb_click_action" id="thumb_click_action_3" value="do_nothing" <?php if ($row->thumb_click_action == 'do_nothing') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_thumb_link_target', 'thumb_click_action_3')" /><label for="thumb_click_action_3"><?php _e("Do Nothing", 'bwg_back'); ?></label>
232
- <div class="spider_description"></div>
233
- </td>
234
- </tr>
235
- <tr id="tr_thumb_link_target">
236
- <td class="spider_label_options"><label><?php _e("Open in a new window:", 'bwg_back'); ?> </label></td>
237
- <td>
238
- <input type="radio" name="thumb_link_target" id="thumb_link_target_yes" value="1" <?php if ($row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_yes"><?php _e("Yes", 'bwg_back'); ?></label>
239
- <input type="radio" name="thumb_link_target" id="thumb_link_target_no" value="0" <?php if (!$row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_no"><?php _e("No", 'bwg_back'); ?></label>
240
- <div class="spider_description"></div>
241
- </td>
242
- </tr>
243
- </tbody>
244
- </table>
245
- </div>
246
- <!--Lightbox-->
247
- <div class="spider_div_options" id="div_content_9">
248
- <table style="width: 100%;">
249
- <tr>
250
- <td class="options_left">
251
- <table style="display: inline-table;">
252
- <tbody>
253
- <tr id="tr_popup_full_width">
254
- <td class="spider_label_options">
255
- <label><?php _e('Full width lightbox:', 'bwg_back'); ?></label>
256
- </td>
257
- <td>
258
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen(1)" /><label for="popup_fullscreen_1"><?php _e('Yes', 'bwg_back'); ?></label>
259
- <input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen(0)" /><label for="popup_fullscreen_0"><?php _e('No', 'bwg_back'); ?></label>
260
- <div class="spider_description"><?php _e('Enable full width feature for the lightbox.', 'bwg_back'); ?></div>
261
- </td>
262
- </tr>
263
- <tr id="tr_popup_dimensions" >
264
- <td class="spider_label_options">
265
- <label for="popup_width"><?php _e('Lightbox dimensions:', 'bwg_back'); ?></label>
266
- </td>
267
- <td>
268
- <input type="text" name="popup_width" id="popup_width" value="<?php echo $row->popup_width; ?>" class="spider_int_input" /> x
269
- <input type="text" name="popup_height" id="popup_height" value="<?php echo $row->popup_height; ?>" class="spider_int_input" /> px
270
- <div class="spider_description"></div>
271
- </td>
272
- </tr>
273
- <tr>
274
- <td class="spider_label_options">
275
- <label for="popup_type"><?php _e('Lightbox effect:', 'bwg_back'); ?></label>
276
- </td>
277
- <td>
278
- <select class="select_icon" name="popup_type" id="popup_type" style="width:120px;">
279
- <?php
280
- foreach ($effects as $key => $effect) {
281
- ?>
282
- <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="'.__("This effect is disabled in free version.", 'bwg_back').'"' : ''; ?> <?php if ($row->popup_type == $key) echo 'selected="selected"'; ?>><?php echo __($effect,"bwg_back"); ?></option>
283
- <?php
284
- }
285
- ?>
286
- </select>
287
- <div class="spider_description"></div>
288
- </td>
289
- </tr>
290
- <tr>
291
- <td class="spider_label_options">
292
- <label for="popup_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label>
293
- </td>
294
- <td>
295
- <input type="text" name="popup_effect_duration" id="popup_effect_duration" value="<?php echo $row->popup_effect_duration; ?>" class="spider_int_input" /> sec.
296
- <div class="spider_description"></div>
297
- </td>
298
- </tr>
299
- <tr id="tr_popup_autoplay">
300
- <td class="spider_label_options">
301
- <label><?php _e('Lightbox autoplay:', 'bwg_back'); ?> </label>
302
- </td>
303
- <td>
304
- <input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1"><?php _e('Yes', 'bwg_back'); ?></label>
305
- <input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0"><?php _e('No', 'bwg_back'); ?></label>
306
- <div class="spider_description"></div>
307
- </td>
308
- </tr>
309
- <tr>
310
- <td class="spider_label_options">
311
- <label for="popup_interval"><?php _e('Time interval:', 'bwg_back'); ?></label>
312
- </td>
313
- <td>
314
- <input type="text" name="popup_interval" id="popup_interval" value="<?php echo $row->popup_interval; ?>" class="spider_int_input" /> sec.
315
- <div class="spider_description"></div>
316
- </td>
317
- </tr>
318
- <tr>
319
- <td class="spider_label_options">
320
- <label><?php _e('Enable filmstrip:', 'bwg_back'); ?></label>
321
- </td>
322
- <td>
323
- <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_enable_filmstrip_1" value="1" <?php if ($row->popup_enable_filmstrip ) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_enable_filmstrip_1')" /><label for="popup_enable_filmstrip_1"><?php _e("Yes", 'bwg_back'); ?></label>
324
- <input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_enable_filmstrip_0" value="0" <?php if (!$row->popup_enable_filmstrip ) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_popup_filmstrip_height', 'popup_enable_filmstrip_0')" /><label for="popup_enable_filmstrip_0"><?php _e("No", 'bwg_back'); ?></label>
325
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
326
- </td>
327
- </tr>
328
- <tr id="tr_popup_filmstrip_height">
329
- <td class="spider_label_options spider_free_version_label">
330
- <label for="popup_filmstrip_height"><?php _e("Filmstrip size:", 'bwg_back'); ?></label>
331
- </td>
332
- <td class="spider_free_version_label">
333
- <input disabled="disabled" type="text" name="popup_filmstrip_height" id="popup_filmstrip_height" value="<?php echo $row->popup_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px
334
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
335
- </td>
336
- </tr>
337
- <tr id="tr_popup_hit_counter">
338
- <td class="spider_label_options spider_free_version_label">
339
- <label><?php _e("Display hit counter:", 'bwg_back'); ?></label>
340
- </td>
341
- <td>
342
- <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_1" value="1" <?php if ($row->popup_hit_counter) echo 'checked="checked"'; ?> /><label for="popup_hit_counter_1"><?php _e("Yes", 'bwg_back'); ?></label>
343
- <input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_0" value="0" <?php if (!$row->popup_hit_counter) echo 'checked="checked"'; ?> /><label for="popup_hit_counter_0"><?php _e("No", 'bwg_back'); ?></label>
344
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
345
- </td>
346
- </tr>
347
- <tr>
348
- <td class="spider_label_options">
349
- <label><?php _e("Enable control buttons:", 'bwg_back'); ?></label>
350
- </td>
351
- <td>
352
- <input type="radio" name="popup_enable_ctrl_btn" id="popup_enable_ctrl_btn_1" value="1" <?php if ($row->popup_enable_ctrl_btn) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_1');
353
- bwg_enable_disable('', 'tr_popup_info', 'popup_enable_ctrl_btn_1');
354
- bwg_enable_disable('', 'tr_popup_comment', 'popup_enable_ctrl_btn_1');
355
- bwg_enable_disable('', 'tr_popup_facebook', 'popup_enable_ctrl_btn_1');
356
- bwg_enable_disable('', 'tr_popup_twitter', 'popup_enable_ctrl_btn_1');
357
- bwg_enable_disable('', 'tr_popup_google', 'popup_enable_ctrl_btn_1');
358
- bwg_enable_disable('', 'tr_popup_pinterest', 'popup_enable_ctrl_btn_1');
359
- bwg_enable_disable('', 'tr_popup_tumblr', 'popup_enable_ctrl_btn_1');
360
- bwg_enable_disable('', 'tr_comment_moderation', 'comment_moderation_1');
361
- bwg_enable_disable('', 'tr_popup_email', 'popup_enable_ctrl_btn_1');
362
- bwg_enable_disable('', 'tr_popup_captcha', 'popup_enable_ctrl_btn_1');
363
- bwg_enable_disable('', 'tr_popup_download', 'popup_enable_ctrl_btn_1');
364
- bwg_enable_disable('', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_1');" /><label for="popup_enable_ctrl_btn_1"><?php _e("Yes", 'bwg_back'); ?></label>
365
- <input type="radio" name="popup_enable_ctrl_btn" id="popup_enable_ctrl_btn_0" value="0" <?php if (!$row->popup_enable_ctrl_btn) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_0');
366
- bwg_enable_disable('none', 'tr_popup_info', 'popup_enable_ctrl_btn_0');
367
- bwg_enable_disable('none', 'tr_popup_comment', 'popup_enable_ctrl_btn_0');
368
- bwg_enable_disable('none', 'tr_popup_facebook', 'popup_enable_ctrl_btn_0');
369
- bwg_enable_disable('none', 'tr_popup_twitter', 'popup_enable_ctrl_btn_0');
370
- bwg_enable_disable('none', 'tr_popup_google', 'popup_enable_ctrl_btn_0');
371
- bwg_enable_disable('none', 'tr_popup_pinterest', 'popup_enable_ctrl_btn_0');
372
- bwg_enable_disable('none', 'tr_popup_tumblr', 'popup_enable_ctrl_btn_0');
373
- bwg_enable_disable('none', 'tr_comment_moderation', 'comment_moderation_0');
374
- bwg_enable_disable('none', 'tr_popup_email', 'popup_enable_ctrl_btn_0');
375
- bwg_enable_disable('none', 'tr_popup_captcha', 'popup_enable_ctrl_btn_0');
376
- bwg_enable_disable('none', 'tr_popup_download', 'popup_enable_ctrl_btn_0');
377
- bwg_enable_disable('none', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_0');" /><label for="popup_enable_ctrl_btn_0"><?php _e("No", 'bwg_back'); ?></label>
378
- <div class="spider_description"></div>
379
- </td>
380
- </tr>
381
- <tr id="tr_popup_fullscreen">
382
- <td class="spider_label_options">
383
- <label><?php _e("Enable fullscreen:", 'bwg_back'); ?></label>
384
- </td>
385
- <td>
386
- <input type="radio" name="popup_enable_fullscreen" id="popup_enable_fullscreen_1" value="1" <?php if ($row->popup_enable_fullscreen) echo 'checked="checked"'; ?> /><label for="popup_enable_fullscreen_1"><?php _e("Yes", 'bwg_back'); ?></label>
387
- <input type="radio" name="popup_enable_fullscreen" id="popup_enable_fullscreen_0" value="0" <?php if (!$row->popup_enable_fullscreen) echo 'checked="checked"'; ?> /><label for="popup_enable_fullscreen_0"><?php _e("No", 'bwg_back'); ?></label>
388
- <div class="spider_description"></div>
389
- </td>
390
- </tr>
391
- <tr id="tr_popup_info">
392
- <td class="spider_label_options">
393
- <label><?php _e("Enable info:", 'bwg_back'); ?></label>
394
- </td>
395
- <td>
396
- <input type="radio" name="popup_enable_info" id="popup_enable_info_1" value="1" <?php if ($row->popup_enable_info) echo 'checked="checked"'; ?> /><label for="popup_enable_info_1"><?php _e("Yes", 'bwg_back'); ?></label>
397
- <input type="radio" name="popup_enable_info" id="popup_enable_info_0" value="0" <?php if (!$row->popup_enable_info) echo 'checked="checked"'; ?> /><label for="popup_enable_info_0"><?php _e("No", 'bwg_back'); ?></label>
398
- <div class="spider_description"></div>
399
- </td>
400
- </tr>
401
- <tr id="tr_popup_info_always_show">
402
- <td class="spider_label_options">
403
- <label><?php _e("Display info by default:", 'bwg_back'); ?></label>
404
- </td>
405
- <td>
406
- <input type="radio" name="popup_info_always_show" id="popup_info_always_show_1" value="1" <?php if ($row->popup_info_always_show) echo 'checked="checked"'; ?> /><label for="popup_info_always_show_1"><?php _e("Yes", 'bwg_back'); ?></label>
407
- <input type="radio" name="popup_info_always_show" id="popup_info_always_show_0" value="0" <?php if (!$row->popup_info_always_show) echo 'checked="checked"'; ?> /><label for="popup_info_always_show_0"><?php _e("No", 'bwg_back'); ?></label>
408
- <div class="spider_description"></div>
409
- </td>
410
- </tr>
411
- <tr id="tr_popup_info_full_width">
412
- <td class="spider_label_options">
413
- <label><?php _e("Full width info:", 'bwg_back'); ?></label>
414
- </td>
415
- <td>
416
- <input type="radio" name="popup_info_full_width" id="popup_info_full_width_1" value="1" <?php if ($row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_1"><?php _e("Yes", 'bwg_back'); ?></label>
417
- <input type="radio" name="popup_info_full_width" id="popup_info_full_width_0" value="0" <?php if (!$row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_0"><?php _e("No", 'bwg_back'); ?></label>
418
- <div class="spider_description"><?php _e("Display image information based on the lightbox dimensions.", 'bwg_back'); ?></div>
419
- </td>
420
- </tr>
421
- </tbody>
422
- </table>
423
- </td>
424
- <td class="options_right">
425
- <table style="display: inline-table;">
426
- <tbody>
427
- <tr id="tr_popup_rate">
428
- <td class="spider_label_options spider_free_version_label">
429
- <label><?php _e("Enable rating:", 'bwg_back'); ?></label>
430
- </td>
431
- <td>
432
- <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_enable_rate_1" value="1" <?php if ($row->popup_enable_rate) echo 'checked="checked"'; ?> /><label for="popup_enable_rate_1"><?php _e("Yes", 'bwg_back'); ?></label>
433
- <input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_enable_rate_0" value="0" <?php if (!$row->popup_enable_rate) echo 'checked="checked"'; ?> /><label for="popup_enable_rate_0"><?php _e("No", 'bwg_back'); ?></label>
434
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
435
- </td>
436
- </tr>
437
- <tr id="tr_popup_comment">
438
- <td class="spider_label_options spider_free_version_label">
439
- <label><?php _e("Enable comments:", 'bwg_back'); ?></label>
440
- </td>
441
- <td>
442
- <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_enable_comment_1" value="1" <?php if ($row->popup_enable_comment) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_comment_moderation', 'popup_enable_comment_1');
443
- bwg_enable_disable('', 'tr_popup_email', 'popup_enable_comment_1');
444
- bwg_enable_disable('', 'tr_popup_captcha', 'popup_enable_comment_1');" /><label for="popup_enable_comment_1"><?php _e("Yes", 'bwg_back'); ?></label>
445
- <input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_enable_comment_0" value="0" <?php if (!$row->popup_enable_comment) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_comment_moderation', 'popup_enable_comment_0');
446
- bwg_enable_disable('none', 'tr_popup_email', 'popup_enable_comment_0');
447
- bwg_enable_disable('none', 'tr_popup_captcha', 'popup_enable_comment_0');" /><label for="popup_enable_comment_0"><?php _e("No", 'bwg_back'); ?></label>
448
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
449
- </td>
450
- </tr>
451
- <tr id="tr_comment_moderation">
452
- <td class="spider_label_options spider_free_version_label">
453
- <label><?php _e("Enable comments moderation:", 'bwg_back'); ?></label>
454
- </td>
455
- <td>
456
- <input disabled="disabled" type="radio" name="comment_moderation" id="comment_moderation_1" value="1" <?php if ($row->comment_moderation) echo 'checked="checked"'; ?> /><label for="comment_moderation_1"><?php _e("Yes", 'bwg_back'); ?></label>
457
- <input disabled="disabled" type="radio" name="comment_moderation" id="comment_moderation_0" value="0" <?php if (!$row->comment_moderation) echo 'checked="checked"'; ?> /><label for="comment_moderation_0"><?php _e("No", 'bwg_back'); ?></label>
458
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
459
- </td>
460
- </tr>
461
- <tr id="tr_popup_facebook">
462
- <td class="spider_label_options spider_free_version_label">
463
- <label><?php _e("Enable Facebook button:", 'bwg_back'); ?></label>
464
- </td>
465
- <td>
466
- <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_enable_facebook_1" value="1" <?php if ($row->popup_enable_facebook) echo 'checked="checked"'; ?> /><label for="popup_enable_facebook_1"><?php _e("Yes", 'bwg_back'); ?></label>
467
- <input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_enable_facebook_0" value="0" <?php if (!$row->popup_enable_facebook) echo 'checked="checked"'; ?> /><label for="popup_enable_facebook_0"><?php _e("No", 'bwg_back'); ?></label>
468
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
469
- </td>
470
- </tr>
471
- <tr id="tr_popup_twitter">
472
- <td class="spider_label_options spider_free_version_label">
473
- <label><?php _e("Enable Twitter button:", 'bwg_back'); ?></label>
474
- </td>
475
- <td>
476
- <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_enable_facebook_1" value="1" <?php if ($row->popup_enable_twitter) echo 'checked="checked"'; ?> /><label for="popup_enable_twitter_1"><?php _e("Yes", 'bwg_back'); ?></label>
477
- <input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_enable_facebook_0" value="0" <?php if (!$row->popup_enable_twitter) echo 'checked="checked"'; ?> /><label for="popup_enable_twitter_0"><?php _e("No", 'bwg_back'); ?></label>
478
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
479
- </td>
480
- </tr>
481
- <tr id="tr_popup_google">
482
- <td class="spider_label_options spider_free_version_label">
483
- <label><?php _e("Enable Google+ button:", 'bwg_back'); ?></label>
484
- </td>
485
- <td>
486
- <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_enable_google_1" value="1" <?php if ($row->popup_enable_google) echo 'checked="checked"'; ?> /><label for="popup_enable_google_1"><?php _e("Yes", 'bwg_back'); ?></label>
487
- <input disabled="disabled" type="radio" name="popup_enable_google" id="popup_enable_google_0" value="0" <?php if (!$row->popup_enable_google) echo 'checked="checked"'; ?> /><label for="popup_enable_google_0"><?php _e("No", 'bwg_back'); ?></label>
488
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
489
- </td>
490
- </tr>
491
- <tr id="tr_popup_pinterest">
492
- <td class="spider_label_options spider_free_version_label">
493
- <label><?php _e("Enable Pinterest button:", 'bwg_back'); ?></label>
494
- </td>
495
- <td>
496
- <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_enable_pinterest_1" value="1" <?php if ($row->popup_enable_pinterest) echo 'checked="checked"'; ?> /><label for="popup_enable_pinterest_1"><?php _e("Yes", 'bwg_back'); ?></label>
497
- <input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_enable_pinterest_0" value="0" <?php if (!$row->popup_enable_pinterest) echo 'checked="checked"'; ?> /><label for="popup_enable_pinterest_0"><?php _e("No", 'bwg_back'); ?></label>
498
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
499
- </td>
500
- </tr>
501
- <tr id="tr_popup_tumblr">
502
- <td class="spider_label_options spider_free_version_label">
503
- <label><?php _e("Enable Tumblr button:", 'bwg_back'); ?></label>
504
- </td>
505
- <td>
506
- <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_enable_tumblr_1" value="1" <?php if ($row->popup_enable_tumblr) echo 'checked="checked"'; ?> /><label for="popup_enable_tumblr_1"><?php _e("Yes", 'bwg_back'); ?></label>
507
- <input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_enable_tumblr_0" value="0" <?php if (!$row->popup_enable_tumblr) echo 'checked="checked"'; ?> /><label for="popup_enable_tumblr_0"><?php _e("No", 'bwg_back'); ?></label>
508
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
509
- </td>
510
- </tr>
511
- </tbody>
512
- </table>
513
- </td>
514
- </tr>
515
- </table>
516
- </div>
517
- <!--Slideshow-->
518
- <div class="spider_div_options" id="div_content_10">
519
- <table style="width: 100%;">
520
- <tr>
521
- <td class="options_left">
522
- <table style="display: inline-table;">
523
- <tbody>
524
- <tr>
525
- <td class="spider_label_options">
526
- <label for="slideshow_type"><?php _e("Slideshow effect:", 'bwg_back'); ?> </label>
527
- </td>
528
- <td>
529
- <select class="select_icon" name="slideshow_type" id="slideshow_type" style="width:120px;">
530
- <?php
531
- foreach ($effects as $key => $effect) {
532
- ?>
533
- <option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="This effect is disabled in free version."' : ''; ?> <?php if ($row->slideshow_type == $key) echo 'selected="selected"'; ?>><?php echo $effect; ?></option>
534
- <?php
535
- }
536
- ?>
537
- </select>
538
- <div class="spider_description"></div>
539
- </td>
540
- </tr>
541
- <tr>
542
- <td class="spider_label_options">
543
- <label for="slideshow_effect_duration"><?php echo __('Effect duration:', 'bwg_back'); ?> </label>
544
- </td>
545
- <td>
546
- <input type="text" name="slideshow_effect_duration" id="slideshow_effect_duration" value="<?php echo $row->slideshow_effect_duration; ?>" class="spider_int_input" /> sec.
547
- <div class="spider_description"></div>
548
- </td>
549
- </tr>
550
- <tr>
551
- <td class="spider_label_options">
552
- <label for="slideshow_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label>
553
- </td>
554
- <td>
555
- <input type="text" name="slideshow_interval" id="slideshow_interval" value="<?php echo $row->slideshow_interval; ?>" class="spider_int_input" /> sec.
556
- <div class="spider_description"></div>
557
- </td>
558
- </tr>
559
- <tr>
560
- <td class="spider_label_options">
561
- <label for="slideshow_width"><?php _e("Slideshow dimensions:", 'bwg_back'); ?> </label>
562
- </td>
563
- <td>
564
- <input type="text" name="slideshow_width" id="slideshow_width" value="<?php echo $row->slideshow_width; ?>" class="spider_int_input" /> x
565
- <input type="text" name="slideshow_height" id="slideshow_height" value="<?php echo $row->slideshow_height; ?>" class="spider_int_input" /> px
566
- <div class="spider_description"></div>
567
- </td>
568
- </tr>
569
- <tr>
570
- <td class="spider_label_options">
571
- <label><?php _e("Enable autoplay:", 'bwg_back'); ?> </label>
572
- </td>
573
- <td>
574
- <input type="radio" name="slideshow_enable_autoplay" id="slideshow_enable_autoplay_yes" value="1" <?php if ($row->slideshow_enable_autoplay) echo 'checked="checked"'; ?> /><label for="slideshow_enable_autoplay_yes"><?php _e("Yes", 'bwg_back'); ?></label>
575
- <input type="radio" name="slideshow_enable_autoplay" id="slideshow_enable_autoplay_no" value="0" <?php if (!$row->slideshow_enable_autoplay) echo 'checked="checked"'; ?> /><label for="slideshow_enable_autoplay_no"><?php _e("No", 'bwg_back'); ?></label>
576
- <div class="spider_description"></div>
577
- </td>
578
- </tr>
579
- <tr>
580
- <td class="spider_label_options">
581
- <label><?php _e("Enable shuffle:", 'bwg_back'); ?> </label>
582
- </td>
583
- <td>
584
- <input type="radio" name="slideshow_enable_shuffle" id="slideshow_enable_shuffle_yes" value="1" <?php if ($row->slideshow_enable_shuffle) echo 'checked="checked"'; ?> /><label for="slideshow_enable_shuffle_yes"><?php _e("Yes", 'bwg_back'); ?></label>
585
- <input type="radio" name="slideshow_enable_shuffle" id="slideshow_enable_shuffle_no" value="0" <?php if (!$row->slideshow_enable_shuffle) echo 'checked="checked"'; ?> /><label for="slideshow_enable_shuffle_no"><?php _e("No", 'bwg_back'); ?></label>
586
- <div class="spider_description"></div>
587
- </td>
588
- </tr>
589
- <tr>
590
- <td class="spider_label_options">
591
- <label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label>
592
- </td>
593
- <td>
594
- <input type="radio" name="slideshow_enable_ctrl" id="slideshow_enable_ctrl_yes" value="1" <?php if ($row->slideshow_enable_ctrl) echo 'checked="checked"'; ?> /><label for="slideshow_enable_ctrl_yes"><?php _e("Yes", 'bwg_back'); ?></label>
595
- <input type="radio" name="slideshow_enable_ctrl" id="slideshow_enable_ctrl_no" value="0" <?php if (!$row->slideshow_enable_ctrl) echo 'checked="checked"'; ?> /><label for="slideshow_enable_ctrl_no"><?php _e("No", 'bwg_back'); ?></label>
596
- <div class="spider_description"></div>
597
- </td>
598
- </tr>
599
- <tr>
600
- <td class="spider_label_options spider_free_version_label"><label><?php _e("Enable slideshow filmstrip:", 'bwg_back'); ?> </label></td>
601
- <td>
602
- <input disabled="disabled" type="radio" name="slideshow_enable_filmstrip" id="slideshow_enable_filmstrip_yes" value="1" <?php if ($row->slideshow_enable_filmstrip) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_enable_filmstrip_yes')" /><label for="slideshow_enable_filmstrip_yes"><?php _e("Yes", 'bwg_back'); ?></label>
603
- <input disabled="disabled" type="radio" name="slideshow_enable_filmstrip" id="slideshow_enable_filmstrip_no" value="0" <?php if (!$row->slideshow_enable_filmstrip) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_filmstrip_height', 'slideshow_enable_filmstrip_no')" /><label for="slideshow_enable_filmstrip_no"><?php _e("No", 'bwg_back'); ?></label>
604
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
605
- </td>
606
- </tr>
607
- <tr id="tr_slideshow_filmstrip_height">
608
- <td class="spider_label_options spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow filmstrip size:", 'bwg_back'); ?> </label></td>
609
- <td class="spider_free_version_label">
610
- <input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $row->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px
611
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
612
- </td>
613
- </tr>
614
- </tbody>
615
- </table>
616
- </td>
617
- <td class="options_right">
618
- <table style="width: 100%; display: inline-table;">
619
- <tbody>
620
- <tr>
621
- <td class="spider_label_options"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
622
- <td>
623
- <input type="radio" name="slideshow_enable_title" id="slideshow_enable_title_yes" value="1" <?php if ($row->slideshow_enable_title) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_enable_title_yes')" /><label for="slideshow_enable_title_yes"><?php _e("Yes", 'bwg_back'); ?></label>
624
- <input type="radio" name="slideshow_enable_title" id="slideshow_enable_title_no" value="0" <?php if (!$row->slideshow_enable_title) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_enable_title_no')" /><label for="slideshow_enable_title_no"><?php _e("No", 'bwg_back'); ?></label>
625
- <div class="spider_description"></div>
626
- </td>
627
- </tr>
628
- <tr id="tr_slideshow_title_position">
629
- <td class="spider_label_options"><label><?php _e("Title position:", 'bwg_back'); ?> </label></td>
630
- <td>
631
- <table class="bwg_position_table">
632
- <tbody>
633
- <tr>
634
- <td><input type="radio" value="top-left" id="slideshow_title_topLeft" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "top-left") echo 'checked="checked"'; ?>></td>
635
- <td><input type="radio" value="top-center" id="slideshow_title_topCenter" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "top-center") echo 'checked="checked"'; ?>></td>
636
- <td><input type="radio" value="top-right" id="slideshow_title_topRight" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "top-right") echo 'checked="checked"'; ?>></td>
637
- </tr>
638
- <tr>
639
- <td><input type="radio" value="middle-left" id="slideshow_title_midLeft" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "middle-left") echo 'checked="checked"'; ?>></td>
640
- <td><input type="radio" value="middle-center" id="slideshow_title_midCenter" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "middle-center") echo 'checked="checked"'; ?>></td>
641
- <td><input type="radio" value="middle-right" id="slideshow_title_midRight" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "middle-right") echo 'checked="checked"'; ?>></td>
642
- </tr>
643
- <tr>
644
- <td><input type="radio" value="bottom-left" id="slideshow_title_botLeft" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "bottom-left") echo 'checked="checked"'; ?>></td>
645
- <td><input type="radio" value="bottom-center" id="slideshow_title_botCenter" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "bottom-center") echo 'checked="checked"'; ?>></td>
646
- <td><input type="radio" value="bottom-right" id="slideshow_title_botRight" name="slideshow_title_position" <?php if ($row->slideshow_title_position == "bottom-right") echo 'checked="checked"'; ?>></td>
647
- </tr>
648
- </tbody>
649
- </table>
650
- <div class="spider_description"><?php _e("Image title position on slideshow", 'bwg_back'); ?></div>
651
- </td>
652
- </tr>
653
- <tr id="tr_slideshow_full_width_title">
654
- <td class="spider_label_options">
655
- <label><?php _e("Full width title:", 'bwg_back'); ?></label>
656
- </td>
657
- <td>
658
- <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_1" value="1" <?php if ($row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_1"><?php _e("Yes", 'bwg_back'); ?></label>
659
- <input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_0" value="0" <?php if (!$row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_0"><?php _e("No", 'bwg_back'); ?></label>
660
- <div class="spider_description"><?php _e("Display image title based on the slideshow dimensions.", 'bwg_back'); ?></div>
661
- </td>
662
- </tr>
663
- <tr>
664
- <td class="spider_label_options"><label><?php _e("Enable image description: ", 'bwg_back'); ?></label></td>
665
- <td>
666
- <input type="radio" name="slideshow_enable_description" id="slideshow_enable_description_yes" value="1" <?php if ($row->slideshow_enable_description) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_enable_description_yes')" /><label for="slideshow_enable_description_yes"><?php _e("Yes", 'bwg_back'); ?></label>
667
- <input type="radio" name="slideshow_enable_description" id="slideshow_enable_description_no" value="0" <?php if (!$row->slideshow_enable_description) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_enable_description_no')" /><label for="slideshow_enable_description_no"><?php _e("No", 'bwg_back'); ?></label>
668
- <div class="spider_description"></div>
669
- </td>
670
- </tr>
671
- <tr id="tr_slideshow_description_position">
672
- <td class="spider_label"><label><?php _e("Description position:", 'bwg_back'); ?> </label></td>
673
- <td>
674
- <table class="bwg_position_table">
675
- <tbody>
676
- <tr>
677
- <td><input type="radio" value="top-left" id="slideshow_description_topLeft" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "top-left") echo 'checked="checked"'; ?>></td>
678
- <td><input type="radio" value="top-center" id="slideshow_description_topCenter" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "top-center") echo 'checked="checked"'; ?>></td>
679
- <td><input type="radio" value="top-right" id="slideshow_description_topRight" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "top-right") echo 'checked="checked"'; ?>></td>
680
- </tr>
681
- <tr>
682
- <td><input type="radio" value="middle-left" id="slideshow_description_midLeft" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "middle-left") echo 'checked="checked"'; ?>></td>
683
- <td><input type="radio" value="middle-center" id="slideshow_description_midCenter" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "middle-center") echo 'checked="checked"'; ?>></td>
684
- <td><input type="radio" value="middle-right" id="slideshow_description_midRight" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "middle-right") echo 'checked="checked"'; ?>></td>
685
- </tr>
686
- <tr>
687
- <td><input type="radio" value="bottom-left" id="slideshow_description_botLeft" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "bottom-left") echo 'checked="checked"'; ?>></td>
688
- <td><input type="radio" value="bottom-center" id="slideshow_description_botCenter" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "bottom-center") echo 'checked="checked"'; ?>></td>
689
- <td><input type="radio" value="bottom-right" id="slideshow_description_botRight" name="slideshow_description_position" <?php if ($row->slideshow_description_position == "bottom-right") echo 'checked="checked"'; ?>></td>
690
- </tr>
691
- </tbody>
692
- </table>
693
- <div class="spider_description"><?php _e("Image description position on slideshow", 'bwg_back'); ?></div>
694
- </td>
695
- </tr>
696
- <tr>
697
- <td class="spider_label_options">
698
- <label><?php _e("Enable slideshow Music:", 'bwg_back'); ?> </label>
699
- </td>
700
- <td>
701
- <input type="radio" name="slideshow_enable_music" id="slideshow_enable_music_yes" value="1" <?php if ($row->slideshow_enable_music) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_enable_music_yes')" /><label for="slideshow_enable_music_yes"><?php _e("Yes", 'bwg_back'); ?></label>
702
- <input type="radio" name="slideshow_enable_music" id="slideshow_enable_music_no" value="0" <?php if (!$row->slideshow_enable_music) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_music_url', 'slideshow_enable_music_no')" /><label for="slideshow_enable_music_no"><?php _e("No", 'bwg_back'); ?></label>
703
- <div class="spider_description"></div>
704
- </td>
705
- </tr>
706
- <tr id="tr_slideshow_music_url">
707
- <td class="spider_label_options">
708
- <label for="slideshow_audio_url"><?php _e("Music url:", 'bwg_back'); ?> </label>
709
- </td>
710
- <td>
711
- <input type="text" id="slideshow_audio_url" name="slideshow_audio_url" style="width: 70%;" value="<?php echo $row->slideshow_audio_url; ?>" style="display:inline-block;" />
712
- <?php
713
- $query_url = add_query_arg(array('action' => 'addMusic', 'width' => '700', 'height' => '550', 'extensions' => 'aac,m4a,f4a,mp3,ogg,oga', 'callback' => 'bwg_add_music'), admin_url('admin-ajax.php'));
714
- $query_url = wp_nonce_url( $query_url, 'addMusic', 'bwg_nonce' );
715
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
716
- ?>
717
- <a href="<?php echo $query_url; ?>" id="button_add_music" class="button-primary thickbox thickbox-preview"
718
- title="Add music"
719
- onclick="return false;"
720
- style="margin-bottom:5px;">
721
- <?php _e("Add Music", 'bwg_back'); ?>
722
- </a>
723
- <div class="spider_description"><?php _e("Only", 'bwg_back'); ?> .aac,.m4a,.f4a,.mp3,.ogg,.oga <?php _e("formats are supported.", 'bwg_back'); ?></div>
724
- </td>
725
- </tr>
726
- </tbody>
727
- </table>
728
- </td>
729
- </tr>
730
- </table>
731
- </div>
732
- <!--Album options-->
733
- <div class="spider_div_options" id="div_content_11">
734
- <table>
735
- <tbody>
736
- <tr>
737
- <td class="spider_label_options">
738
- <label><?php _e('Show album/gallery name:', 'bwg_back'); ?></label>
739
- </td>
740
- <td>
741
- <input type="radio" name="show_album_name" id="show_album_name_enable_1" value="1" <?php if ($row->show_album_name) echo 'checked="checked"'; ?> /><label for="show_album_name_enable_1"><?php _e('Yes', 'bwg_back'); ?></label>
742
- <input type="radio" name="show_album_name" id="show_album_name_enable_0" value="0" <?php if (!$row->show_album_name) echo 'checked="checked"'; ?> /><label for="show_album_name_enable_0"><?php _e('No', 'bwg_back'); ?></label>
743
- <div class="spider_description"></div>
744
- </td>
745
- </tr>
746
- <tr>
747
- <td class="spider_label_options">
748
- <label for="album_column_number"><?php _e("Number of album columns:", 'bwg_back'); ?> </label>
749
- </td>
750
- <td>
751
- <input type="text" name="album_column_number" id="album_column_number" value="<?php echo $row->album_column_number; ?>" class="spider_int_input" />
752
- <div class="spider_description"></div>
753
- </td>
754
- </tr>
755
- <tr>
756
- <td class="spider_label_options">
757
- <label for="albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label>
758
- </td>
759
- <td>
760
- <input type="text" name="albums_per_page" id="albums_per_page" value="<?php echo $row->albums_per_page; ?>" class="spider_int_input" />
761
- <div class="spider_description"></div>
762
- </td>
763
- </tr>
764
- <tr>
765
- <td class="spider_label_options">
766
- <label><?php _e("Enable pagination:", 'bwg_back'); ?></label>
767
- </td>
768
- <td>
769
- <input type="radio" name="album_enable_page" id="album_enable_page_1" value="1" <?php if ($row->album_enable_page) echo 'checked="checked"'; ?> /><label for="album_enable_page_1"><?php _e("Yes", 'bwg_back'); ?></label>
770
- <input type="radio" name="album_enable_page" id="album_enable_page_0" value="0" <?php if (!$row->album_enable_page) echo 'checked="checked"'; ?> /><label for="album_enable_page_0"><?php _e("No", 'bwg_back'); ?></label>
771
- <div class="spider_description"></div>
772
- </td>
773
- </tr>
774
- <tr>
775
- <td class="spider_label_options">
776
- <label><?php _e("Album view type:", 'bwg_back'); ?></label>
777
- </td>
778
- <td>
779
- <input disabled="disabled" type="radio" name="album_view_type" id="album_view_type_1" value="thumbnail" <?php if ($row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> /><label for="album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
780
- <input disabled="disabled" type="radio" name="album_view_type" id="album_view_type_0" value="masonry" <?php if ($row->album_view_type == "masonry") echo 'checked="checked"'; ?> /><label for="album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
781
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
782
- </td>
783
- </tr>
784
- <tr>
785
- <td class="spider_label_options">
786
- <label><?php _e("Show title:", 'bwg_back'); ?></label>
787
- </td>
788
- <td>
789
- <input type="radio" name="album_title_show_hover" id="album_title_show_hover_1" value="hover" <?php if ($row->album_title_show_hover == "hover") echo 'checked="checked"'; ?> /><label for="album_title_show_hover_1"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
790
- <input type="radio" name="album_title_show_hover" id="album_title_show_hover_0" value="show" <?php if ($row->album_title_show_hover == "show") echo 'checked="checked"'; ?> /><label for="album_title_show_hover_0"><?php _e("Always show", 'bwg_back'); ?></label><br />
791
- <input type="radio" name="album_title_show_hover" id="album_title_show_hover_2" value="none" <?php if ($row->album_title_show_hover == "none") echo 'checked="checked"'; ?> /><label for="album_title_show_hover_2"><?php _e("Don't show", 'bwg_back'); ?></label>
792
- <div class="spider_description"></div>
793
- </td>
794
- </tr>
795
- <tr>
796
- <td class="spider_label_options">
797
- <label><?php _e("Enable extended album description:", 'bwg_back'); ?></label>
798
- </td>
799
- <td>
800
- <input type="radio" name="extended_album_description_enable" id="extended_album_description_enable_1" value="1" <?php if ($row->extended_album_description_enable) echo 'checked="checked"'; ?> /><label for="extended_album_description_enable_1"><?php _e("Yes", 'bwg_back'); ?></label>
801
- <input type="radio" name="extended_album_description_enable" id="extended_album_description_enable_0" value="0" <?php if (!$row->extended_album_description_enable) echo 'checked="checked"'; ?> /><label for="extended_album_description_enable_0"><?php _e("No", 'bwg_back'); ?></label>
802
- <div class="spider_description"></div>
803
- </td>
804
- </tr>
805
- <tr>
806
- <td class="spider_label_options">
807
- <label for="album_thumb_width"><?php _e("Album thumbnail dimensions:", 'bwg_back'); ?> </label>
808
- </td>
809
- <td>
810
- <input type="text" name="album_thumb_width" id="album_thumb_width" value="<?php echo $row->album_thumb_width; ?>" class="spider_int_input" /> x
811
- <input type="text" name="album_thumb_height" id="album_thumb_height" value="<?php echo $row->album_thumb_height; ?>" class="spider_int_input" /> px
812
- <div class="spider_description"></div>
813
- </td>
814
- </tr>
815
- <tr>
816
- <td class="spider_label_options">
817
- <label for="extended_album_height"><?php _e("Extended album height:", 'bwg_back'); ?> </label>
818
- </td>
819
- <td>
820
- <input type="text" name="extended_album_height" id="extended_album_height" value="<?php echo $row->extended_album_height; ?>" class="spider_int_input" /> px
821
- <div class="spider_description"></div>
822
- </td>
823
- </tr>
824
- </tbody>
825
- </table>
826
- </div>
827
- <!--Image options-->
828
- <div class="spider_div_options" id="div_content_12">
829
- <table>
830
- <tbody>
831
- <tr>
832
- <td class="spider_label_options">
833
- <label><?php _e("Enable image title for Image Browser view:", 'bwg_back'); ?></label>
834
- </td>
835
- <td>
836
- <input type="radio" name="image_browser_title_enable" id="image_browser_title_enable_1" value="1" <?php if ($row->image_browser_title_enable) echo 'checked="checked"'; ?> /><label for="image_browser_title_enable_1"><?php _e("Yes", 'bwg_back'); ?></label>
837
- <input type="radio" name="image_browser_title_enable" id="image_browser_title_enable_0" value="0" <?php if (!$row->image_browser_title_enable) echo 'checked="checked"'; ?> /><label for="image_browser_title_enable_0"><?php _e("No", 'bwg_back'); ?></label>
838
- <div class="spider_description"></div>
839
- </td>
840
- </tr>
841
- <tr>
842
- <td class="spider_label_options">
843
- <label><?php _e("Enable image description for Image Browser view:", 'bwg_back'); ?></label>
844
- </td>
845
- <td>
846
- <input type="radio" name="image_browser_description_enable" id="image_browser_description_enable_1" value="1" <?php if ($row->image_browser_description_enable) echo 'checked="checked"'; ?> /><label for="image_browser_description_enable_1"><?php _e("Yes", 'bwg_back'); ?></label>
847
- <input type="radio" name="image_browser_description_enable" id="image_browser_description_enable_0" value="0" <?php if (!$row->image_browser_description_enable) echo 'checked="checked"'; ?> /><label for="image_browser_description_enable_0"><?php _e("No", 'bwg_back'); ?></label>
848
- <div class="spider_description"></div>
849
- </td>
850
- </tr>
851
- <tr>
852
- <td class="spider_label_options">
853
- <label for="image_browser_width"><?php _e("Image width for Image Browser view:", 'bwg_back'); ?></label>
854
- </td>
855
- <td>
856
- <input type="text" name="image_browser_width" id="image_browser_width" value="<?php echo $row->image_browser_width; ?>" class="spider_int_input" /> px
857
- <div class="spider_description"></div>
858
- </td>
859
- </tr>
860
- <tr>
861
- <td colspan="2">
862
- <div style="margin: 0;" class="spider_description spider_free_version"><?php _e("The Blog Style view is disabled in free version.", 'bwg_back'); ?></div>
863
- </td>
864
- </tr>
865
- <tr>
866
- <td class="spider_label_options spider_free_version_label">
867
- <label><?php _e("Enable image title for Blog Style view:", 'bwg_back'); ?></label>
868
- </td>
869
- <td class="spider_free_version_label">
870
- <input disabled="disabled" type="radio" name="blog_style_title_enable" id="blog_style_title_enable_1" value="1" <?php if ($row->blog_style_title_enable) echo 'checked="checked"'; ?> /><label for="blog_style_title_enable_1"><?php _e("Yes", 'bwg_back'); ?></label>
871
- <input disabled="disabled" type="radio" name="blog_style_title_enable" id="blog_style_title_enable_0" value="0" <?php if (!$row->blog_style_title_enable) echo 'checked="checked"'; ?> /><label for="blog_style_title_enable_0"><?php _e("No", 'bwg_back'); ?></label>
872
- <div class="spider_description"></div>
873
- </td>
874
- </tr>
875
- <tr>
876
- <td class="spider_label_options spider_free_version_label">
877
- <label for="blog_style_width"><?php _e("Image width for Blog Style view:", 'bwg_back'); ?></label>
878
- </td>
879
- <td class="spider_free_version_label">
880
- <input disabled="disabled" type="text" name="blog_style_width" id="blog_style_width" value="<?php echo $row->blog_style_width; ?>" class="spider_int_input spider_free_version_label" /> px
881
- <div class="spider_description"></div>
882
- </td>
883
- </tr>
884
- <tr>
885
- <td class="spider_label_options spider_free_version_label">
886
- <label for="blog_style_images_per_page"><?php _e("Images per page in Blog Style view:", 'bwg_back'); ?></label>
887
- </td>
888
- <td class="spider_free_version_label">
889
- <input disabled="disabled" type="text" name="blog_style_images_per_page" id="blog_style_images_per_page" value="<?php echo $row->blog_style_images_per_page; ?>" class="spider_int_input spider_free_version_label" />
890
- <div class="spider_description"></div>
891
- </td>
892
- </tr>
893
- <tr>
894
- <td class="spider_label_options spider_free_version_label">
895
- <label><?php _e("Enable pagination for Blog Style view:", 'bwg_back'); ?></label>
896
- </td>
897
- <td class="spider_free_version_label">
898
- <input disabled="disabled" type="radio" name="blog_style_enable_page" id="blog_style_enable_page_1" value="1" <?php if ($row->blog_style_enable_page) echo 'checked="checked"'; ?> /><label for="blog_style_enable_page_1"><?php _e("Yes", 'bwg_back'); ?></label>
899
- <input disabled="disabled" type="radio" name="blog_style_enable_page" id="blog_style_enable_page_0" value="0" <?php if (!$row->blog_style_enable_page) echo 'checked="checked"'; ?> /><label for="blog_style_enable_page_0"><?php _e("No", 'bwg_back'); ?></label>
900
- <div class="spider_description"></div>
901
- </td>
902
- </tr>
903
- </tbody>
904
- </table>
905
- </div>
906
- <!-- Carousel-->
907
- <div class="spider_div_options" id="div_content_13">
908
- <table style="width: 100%;">
909
- <tr>
910
- <td class="options_left">
911
- <table style="display: inline-table;">
912
- <tbody>
913
- <tr>
914
- <td class="spider_label_options spider_free_version_label">
915
- <label for="carousel_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label>
916
- </td>
917
- <td class="spider_free_version_label">
918
- <input type="text" disabled="disabled" name="carousel_interval" id="carousel_interval" value="<?php echo $row->carousel_interval; ?>" class="spider_int_input" /> sec.
919
- <div class="spider_description"></div>
920
- </td>
921
- </tr>
922
- <tr>
923
- <td class="spider_label_options spider_free_version_label">
924
- <label for="carousel_image_column_number"><?php _e("Max. number of images:", 'bwg_back'); ?> </label>
925
- </td>
926
- <td class="spider_free_version_label">
927
- <input type="text" disabled="disabled" name="carousel_image_column_number" id="carousel_image_column_number" value="<?php echo $row->carousel_image_column_number; ?>" class="spider_int_input" /> sec.
928
- <div class="spider_description"></div>
929
- </td>
930
- </tr>
931
- <tr>
932
- <td class="spider_label_options spider_free_version_label">
933
- <label for="carousel_image_par"><?php _e("Carousel image ratio:", 'bwg_back'); ?> </label>
934
- </td>
935
- <td class="spider_free_version_label">
936
- <input type="text" disabled="disabled" name="carousel_image_par" id="carousel_image_par" value="<?php echo $row->carousel_image_par; ?>" />
937
- <div class="spider_description"></div>
938
- </td>
939
- </tr>
940
- <tr>
941
- <td class="spider_label_options spider_free_version_label">
942
- <label for="carousel_width"><?php _e("Image dimensions:", 'bwg_back'); ?> </label>
943
- </td>
944
- <td class="spider_free_version_label">
945
- <input type="text" disabled="disabled" name="carousel_width" id="carousel_width" value="<?php echo $row->carousel_width; ?>" class="spider_int_input" /> x
946
- <input type="text" disabled="disabled" name="carousel_height" id="carousel_height" value="<?php echo $row->carousel_height; ?>" class="spider_int_input" /> px
947
- <div class="spider_description"></div>
948
- </td>
949
- </tr>
950
- <tr>
951
- <td class="spider_label_options spider_free_version_label">
952
- <label for="carousel_r_width"><?php _e("Fixed width:", 'bwg_back'); ?> </label>
953
- </td>
954
- <td class="spider_free_version_label">
955
- <input type="text" disabled="disabled" name="carousel_r_width" id="carousel_r_width" value="<?php echo $row->carousel_r_width; ?>" class="spider_int_input" /> px
956
- </td>
957
- </tr>
958
- </tbody>
959
- </table>
960
- </td>
961
- <td class="options_right">
962
- <table style="width: 100%; display: inline-table;">
963
- <tbody>
964
- <tr>
965
- <td class="spider_label_options spider_free_version_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
966
- <td class="spider_free_version_label">
967
- <input type="radio" disabled="disabled" name="carousel_enable_title" id="carousel_enable_title_yes" value="1" <?php if ($row->carousel_enable_title) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_carousel_title_position', 'carousel_enable_title_yes')" /><label for="carousel_enable_title_yes"><?php _e("Yes", 'bwg_back'); ?></label>
968
- <input type="radio" disabled="disabled" name="carousel_enable_title" id="carousel_enable_title_no" value="0" <?php if (!$row->carousel_enable_title) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_carousel_title_position', 'carousel_enable_title_no')" /><label for="carousel_enable_title_no"><?php _e("No", 'bwg_back'); ?></label>
969
- <div class="spider_description"></div>
970
- </td>
971
- </tr>
972
- <tr>
973
- <td class="spider_label_options spider_free_version_label">
974
- <label><?php _e("Enable autoplay:", 'bwg_back'); ?> </label>
975
- </td>
976
- <td class="spider_free_version_label">
977
- <input type="radio" disabled="disabled" name="carousel_enable_autoplay" id="carousel_enable_autoplay_yes" value="1" <?php if ($row->carousel_enable_autoplay) echo 'checked="checked"'; ?> /><label for="carousel_enable_autoplay_yes"><?php _e("Yes", 'bwg_back'); ?></label>
978
- <input type="radio" disabled="disabled" name="carousel_enable_autoplay" id="carousel_enable_autoplay_no" value="0" <?php if (!$row->carousel_enable_autoplay) echo 'checked="checked"'; ?> /><label for="carousel_enable_autoplay_no"><?php _e("No", 'bwg_back'); ?></label>
979
- <div class="spider_description"></div>
980
- </td>
981
- </tr>
982
- <tr>
983
- <td class="spider_label_options spider_free_version_label">
984
- <label> <?php _e("Container fit:", 'bwg_back'); ?> </label>
985
- </td>
986
- <td class="spider_free_version_label">
987
- <input type="radio" disabled="disabled" name="carousel_fit_containerWidth" id="carousel_fit_containerWidth_yes" value="1" <?php if ($row->carousel_fit_containerWidth) echo 'checked="checked"'; ?> /><label for="carousel_fit_containerWidth_yes"><?php _e("Yes", 'bwg_back'); ?></label>
988
- <input type="radio" disabled="disabled" name="carousel_fit_containerWidth" id="carousel_fit_containerWidth_no" value="0" <?php if (!$row->carousel_fit_containerWidth) echo 'checked="checked"'; ?> /><label for="carousel_fit_containerWidth_no"><?php _e("No", 'bwg_back'); ?></label>
989
- <div class="spider_description"></div>
990
- </td>
991
- </tr>
992
- <tr>
993
- <td class="spider_label_options spider_free_version_label">
994
- <label> <?php _e("Next/Previous buttons:", 'bwg_back'); ?> </label>
995
- </td>
996
- <td class="spider_free_version_label">
997
- <input type="radio" disabled="disabled" name="carousel_prev_next_butt" id="carousel_prev_next_butt_yes" value="1" <?php if ($row->carousel_prev_next_butt) echo 'checked="checked"'; ?> /><label for="carousel_prev_next_butt_yes"><?php _e("Yes", 'bwg_back'); ?></label>
998
- <input type="radio" disabled="disabled" name="carousel_prev_next_butt" id="carousel_prev_next_butt_no" value="0" <?php if (!$row->carousel_prev_next_butt) echo 'checked="checked"'; ?> /><label for="carousel_prev_next_butt_no"><?php _e("No", 'bwg_back'); ?></label>
999
- <div class="spider_description"></div>
1000
- </td>
1001
- </tr>
1002
- <tr>
1003
- <td class="spider_label_options spider_free_version_label">
1004
- <label> <?php _e("Play/Pause button:", 'bwg_back'); ?> </label>
1005
- </td>
1006
- <td class="spider_free_version_label">
1007
- <input type="radio" disabled="disabled" name="carousel_play_pause_butt" id="carousel_play_pause_butt_yes" value="1" <?php if ($row->carousel_play_pause_butt) echo 'checked="checked"'; ?> /><label for="carousel_play_pause_butt_yes"><?php _e("Yes", 'bwg_back'); ?></label>
1008
- <input type="radio" disabled="disabled" name="carousel_play_pause_butt" id="carousel_play_pause_butt_no" value="0" <?php if (!$row->carousel_play_pause_butt) echo 'checked="checked"'; ?> /><label for="carousel_play_pause_butt_no"><?php _e("No", 'bwg_back'); ?></label>
1009
- <div class="spider_description"></div>
1010
- </td>
1011
- </tr>
1012
- </tbody>
1013
- </table>
1014
- </td>
1015
- </tr>
1016
- </table>
1017
- <div class="spider_description spider_free_version"><?php _e("Carousel view is disabled in free version.", 'bwg_back'); ?></div>
1018
- </div>
1019
- <!--Advertisement-->
1020
- <div class="spider_div_options" id="div_content_14">
1021
- <table style="width: 100%;">
1022
- <tr>
1023
- <td class="options_left">
1024
- <table style="display: inline-table;">
1025
- <tbody>
1026
- <tr id="tr_watermark_type">
1027
- <td class="spider_label_options">
1028
- <label><?php _e('Advertisement type:', 'bwg_back'); ?> </label>
1029
- </td>
1030
- <td>
1031
- <input type="radio" name="watermark_type" id="watermark_type_none" value="none" <?php if ($row->watermark_type == 'none') echo 'checked="checked"'; ?> onClick="bwg_watermark('watermark_type_none')" />
1032
- <label for="watermark_type_none"><?php _e('None', 'bwg_back'); ?></label>
1033
- <input type="radio" name="watermark_type" id="watermark_type_text" value="text" <?php if ($row->watermark_type == 'text') echo 'checked="checked"'; ?> onClick="bwg_watermark('watermark_type_text')" onchange="preview_watermark()" />
1034
- <label for="watermark_type_text"><?php _e('Text', 'bwg_back'); ?></label>
1035
- <input type="radio" name="watermark_type" id="watermark_type_image" value="image" <?php if ($row->watermark_type == 'image') echo 'checked="checked"'; ?> onClick="bwg_watermark('watermark_type_image')" onchange="preview_watermark()" />
1036
- <label for="watermark_type_image"><?php _e('Image', 'bwg_back'); ?></label>
1037
- <div class="spider_description"></div>
1038
- </td>
1039
- </tr>
1040
- <tr id="tr_watermark_url">
1041
- <td class="spider_label_options">
1042
- <label for="watermark_url"><?php _e('Advertisement url:', 'bwg_back'); ?> </label>
1043
- </td>
1044
- <td>
1045
- <input type="text" id="watermark_url" name="watermark_url" style="width: 68%;" value="<?php echo $row->watermark_url; ?>" style="display:inline-block;" onchange="preview_watermark()" />
1046
-
1047
- <?php
1048
- $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_watermark_image'), admin_url('admin-ajax.php'));
1049
- $query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
1050
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
1051
- ?>
1052
-
1053
- <a href="<?php echo $query_url; ?>" id="button_add_watermark_image" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add thickbox thickbox-preview"
1054
- title="Add image"
1055
- onclick="return false;"
1056
- style="margin-bottom:5px;">
1057
- <?php _e('Add Image', 'bwg_back'); ?>
1058
- </a>
1059
- <div class="spider_description"><?php _e('Enter absolute image file url or add file from Options page. (.jpg,.jpeg,.png,.gif formats are supported)', 'bwg_back'); ?></div>
1060
- </td>
1061
- </tr>
1062
- <tr id="tr_watermark_text">
1063
- <td class="spider_label_options">
1064
- <label for="watermark_text"><?php _e('Advertisement text:', 'bwg_back'); ?> </label>
1065
- </td>
1066
- <td>
1067
- <input type="text" name="watermark_text" id="watermark_text" style="width: 100%;" value="<?php echo $row->watermark_text; ?>" onchange="preview_watermark()" onkeypress="preview_watermark()" />
1068
- <div class="spider_description"></div>
1069
- </td>
1070
- </tr>
1071
- <tr id="tr_watermark_link">
1072
- <td class="spider_label_options">
1073
- <label for="watermark_link"><?php _e('Advertisement link:', 'bwg_back'); ?> </label>
1074
- </td>
1075
- <td>
1076
- <input type="text" name="watermark_link" id="watermark_link" style="width: 100%;" value="<?php echo $row->watermark_link; ?>" onchange="preview_watermark()" onkeypress="preview_watermark()" />
1077
- <div class="spider_description"><?php _e('Enter a URL to open when the advertisement banner is clicked.', 'bwg_back'); ?></div>
1078
- </td>
1079
- </tr>
1080
- <tr id="tr_watermark_width_height">
1081
- <td class="spider_label_options">
1082
- <label for="watermark_width"><?php _e('Advertisement dimensions:', 'bwg_back'); ?> </label>
1083
- </td>
1084
- <td>
1085
- <input type="text" name="watermark_width" id="watermark_width" value="<?php echo $row->watermark_width; ?>" class="spider_int_input" onchange="preview_watermark()" /> x
1086
- <input type="text" name="watermark_height" id="watermark_height" value="<?php echo $row->watermark_height; ?>" class="spider_int_input" onchange="preview_watermark()" /> px
1087
- <div class="spider_description"><?php _e('Maximum values for watermark image width and height.', 'bwg_back'); ?></div>
1088
- </td>
1089
- </tr>
1090
- <tr id="tr_watermark_font_size">
1091
- <td class="spider_label_options">
1092
- <label for="watermark_font_size"><?php _e('Advertisement font size:', 'bwg_back'); ?> </label>
1093
- </td>
1094
- <td>
1095
- <input type="text" name="watermark_font_size" id="watermark_font_size" value="<?php echo $row->watermark_font_size; ?>" class="spider_int_input" onchange="preview_watermark()" /> px
1096
- <div class="spider_description"></div>
1097
- </td>
1098
- </tr>
1099
- <tr id="tr_watermark_font">
1100
- <td class="spider_label_options">
1101
- <label for="watermark_font"><?php _e('Advertisement font style:', 'bwg_back'); ?> </label>
1102
- </td>
1103
- <td>
1104
- <select name="watermark_font" id="watermark_font" class="select_icon bwg_font_select" style="width:120px;" onchange="preview_watermark()">
1105
- <?php
1106
- $google_fonts = WDWLibrary::get_google_fonts();
1107
- $is_google_fonts = (in_array($row->watermark_font, $google_fonts) ) ? true : false;
1108
- $watermark_font_families = ($is_google_fonts == true) ? $google_fonts : $watermark_fonts;
1109
- foreach ($watermark_font_families as $watermark_font) {
1110
- ?>
1111
- <option value="<?php echo $watermark_font; ?>" <?php if ($row->watermark_font == $watermark_font) echo 'selected="selected"'; ?>><?php echo $watermark_font; ?></option>
1112
- <?php
1113
- }
1114
- ?>
1115
- </select>
1116
- <input type="radio" name="watermark_google_fonts" id="watermark_google_fonts1" onchange="bwg_change_fonts('watermark_font', jQuery(this).attr('id'))" value="1" <?php if ($is_google_fonts) echo 'checked="checked"'; ?> />
1117
- <label for="watermark_google_fonts1" id="watermark_google_fonts1_lbl"><?php echo __('Google fonts', 'bwg_back'); ?></label>
1118
- <input type="radio" name="watermark_google_fonts" id="watermark_google_fonts0" onchange="bwg_change_fonts('watermark_font', '')" value="0" <?php if (!$is_google_fonts) echo 'checked="checked"'; ?> />
1119
- <label for="watermark_google_fonts0" id="watermark_google_fonts0_lbl"><?php echo __('Default', 'bwg_back'); ?></label>
1120
- <div class="spider_description"></div>
1121
- </td>
1122
- </tr>
1123
- <tr id="tr_watermark_color">
1124
- <td class="spider_label_options">
1125
- <label for="watermark_color"><?php _e('Advertisement color:', 'bwg_back'); ?> </label>
1126
- </td>
1127
- <td>
1128
- <input type="text" name="watermark_color" id="watermark_color" value="<?php echo $row->watermark_color; ?>" class="color" onchange="preview_watermark()" />
1129
- <div class="spider_description"></div>
1130
- </td>
1131
- </tr>
1132
- <tr id="tr_watermark_opacity">
1133
- <td class="spider_label_options">
1134
- <label for="watermark_opacity"><?php _e('Advertisement opacity:', 'bwg_back'); ?> </label>
1135
- </td>
1136
- <td>
1137
- <input type="text" name="watermark_opacity" id="watermark_opacity" value="<?php echo $row->watermark_opacity; ?>" class="spider_int_input" onchange="preview_watermark()" /> %
1138
- <div class="spider_description"><?php _e('Value must be between 0 to 100.', 'bwg_back'); ?></div>
1139
- </td>
1140
- </tr>
1141
- <tr id="tr_watermark_position">
1142
- <td class="spider_label_options">
1143
- <label><?php _e('Advertisement position:', 'bwg_back'); ?> </label>
1144
- </td>
1145
- <td>
1146
- <table class="bwg_position_table">
1147
- <tbody>
1148
- <tr>
1149
- <td><input type="radio" value="top-left" name="watermark_position" <?php if ($row->watermark_position == "top-left") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1150
- <td><input type="radio" value="top-center" name="watermark_position" <?php if ($row->watermark_position == "top-center") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1151
- <td><input type="radio" value="top-right" name="watermark_position" <?php if ($row->watermark_position == "top-right") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1152
- </tr>
1153
- <tr>
1154
- <td><input type="radio" value="middle-left" name="watermark_position" <?php if ($row->watermark_position == "middle-left") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1155
- <td><input type="radio" value="middle-center" name="watermark_position" <?php if ($row->watermark_position == "middle-center") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1156
- <td><input type="radio" value="middle-right" name="watermark_position" <?php if ($row->watermark_position == "middle-right") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1157
- </tr>
1158
- <tr>
1159
- <td><input type="radio" value="bottom-left" name="watermark_position" <?php if ($row->watermark_position == "bottom-left") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1160
- <td><input type="radio" value="bottom-center" name="watermark_position" <?php if ($row->watermark_position == "bottom-center") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1161
- <td><input type="radio" value="bottom-right" name="watermark_position" <?php if ($row->watermark_position == "bottom-right") echo 'checked="checked"'; ?> onchange="preview_watermark()"></td>
1162
- </tr>
1163
- </tbody>
1164
- </table>
1165
- <div class="spider_description"></div>
1166
- </td>
1167
- </tr>
1168
- </tbody>
1169
- </table>
1170
- </td>
1171
- <td class="options_right">
1172
- <table style="width: 100%; display: inline-table;">
1173
- <tbody>
1174
- <tr>
1175
- <td>
1176
- <span id="preview_watermark" style="display:table-cell; background-image:url('<?php echo WD_BWG_URL . '/images/watermark_preview.jpg'?>');background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;">
1177
- </span>
1178
- </td>
1179
- </tr>
1180
- </tbody>
1181
- </table>
1182
- </td>
1183
- </tr>
1184
- </table>
1185
- </div>
1186
- </div>
1187
- </div>
1188
- <div class="bwg_options_box standart_option" style="display:none;">
1189
- <div style="display:none; width: 100%;" id="display_panel">
1190
- <div class="options_tab">
1191
- <div id="div_1" class="gallery_type" onclick="bwg_change_option_type('1')"><?php _e('General', 'bwg_back'); ?></div>
1192
- <div class="bwg_line_option">|</div>
1193
- <div id="div_2" class="gallery_type" onclick="bwg_change_option_type('2')"><?php _e('Thumbnail options', 'bwg_back'); ?></div>
1194
- <div class="bwg_line_option">|</div>
1195
- <div id="div_3" class="gallery_type" onclick="bwg_change_option_type('3')"><?php _e('Lightbox', 'bwg_back'); ?></div>
1196
- <div class="bwg_line_option">|</div>
1197
- <div id="div_4" class="gallery_type" onclick="bwg_change_option_type('4')"><?php _e('Slideshow', 'bwg_back'); ?></div>
1198
- <div class="bwg_line_option">|</div>
1199
- <div id="div_6" class="gallery_type" onclick="bwg_change_option_type('6')"><?php _e('Social options', 'bwg_back'); ?></div>
1200
- <div class="bwg_line_option">|</div>
1201
- <div id="div_7" class="gallery_type" onclick="bwg_change_option_type('7')"><?php _e('Watermark', 'bwg_back'); ?></div>
1202
- <input type="hidden" id="type" name="type" value="<?php echo (isset($_POST["type"]) ? esc_html(stripslashes($_POST["type"])) : 1); ?>" />
1203
- </div>
1204
- <!--Global options-->
1205
- <div class="spider_div_options" id="div_content_1">
1206
- <table>
1207
- <tbody>
1208
- <tr>
1209
- <td class="spider_label_options">
1210
- <label for="images_directory"><?php _e("Images directory:", 'bwg_back'); ?></label>
1211
- </td>
1212
- <td>
1213
- <input id="images_directory" name="images_directory" type="text" style="display:inline-block; width:100%;" value="<?php echo $row->images_directory; ?>" />
1214
- <input type="hidden" id="old_images_directory" name="old_images_directory" value="<?php echo $row->old_images_directory; ?>"/>
1215
- <div class="spider_description"><?php _e("Input an existing directory inside the Wordpress directory to store uploaded images.<br />Old directory content will be moved to the new one.", 'bwg_back'); ?></div>
1216
- </td>
1217
- </tr>
1218
- <tr>
1219
- <td class="spider_label_options">
1220
- <label for="upload_img_width"><?php _e("Image dimensions:", 'bwg_back'); ?> </label>
1221
- </td>
1222
- <td>
1223
- <input type="text" name="upload_img_width" id="upload_img_width" value="<?php echo $row->upload_img_width; ?>" class="spider_int_input" /> x
1224
- <input type="text" name="upload_img_height" id="upload_img_height" value="<?php echo $row->upload_img_height; ?>" class="spider_int_input" /> px
1225
- <div class="spider_description"><?php _e("The maximum size of the uploaded image (0 for original size).", 'bwg_back'); ?></div>
1226
- </td>
1227
- </tr>
1228
- <tr>
1229
- <td class="spider_label_options">
1230
- <label for="image_quality"><?php _e('Image quality:', 'bwg_back'); ?></label>
1231
- </td>
1232
- <td>
1233
- <input type="text" name="image_quality" id="image_quality" value="<?php echo $row->image_quality; ?>" class="spider_int_input" /> %
1234
- <div class="spider_description"><?php _e('Set the quality of gallery images. Provide a value from 0 to 100%.', 'bwg_back'); ?></div>
1235
- </td>
1236
- </tr>
1237
- <tr>
1238
- <td class="spider_label_options">
1239
- <label><?php _e("Right click protection:", 'bwg_back'); ?></label>
1240
- </td>
1241
- <td>
1242
- <input type="radio" name="image_right_click" id="image_right_click_1" value="1" <?php if ($row->image_right_click) echo 'checked="checked"'; ?> /><label for="image_right_click_1"><?php _e("Yes", 'bwg_back'); ?></label>
1243
- <input type="radio" name="image_right_click" id="image_right_click_0" value="0" <?php if (!$row->image_right_click) echo 'checked="checked"'; ?> /><label for="image_right_click_0"><?php _e("No", 'bwg_back'); ?></label>
1244
- <div class="spider_description"><?php _e("Disable image right click possibility.", 'bwg_back'); ?></div>
1245
- </td>
1246
- </tr>
1247
- <tr style="display: none;">
1248
- <td class="spider_label_options">
1249
- <label><?php _e("Gallery role:", 'bwg_back'); ?></label>
1250
- </td>
1251
- <td>
1252
- <input type="radio" name="gallery_role" id="gallery_role_1" value="1" <?php if ($row->gallery_role) echo 'checked="checked"'; ?> /><label for="gallery_role_1"><?php _e("Yes", 'bwg_back'); ?></label>
1253
- <input type="radio" name="gallery_role" id="gallery_role_0" value="0" <?php if (!$row->gallery_role) echo 'checked="checked"'; ?> /><label for="gallery_role_0">No</label>
1254
- <div class="spider_description">Only author can change a gallery.</div>
1255
- </td>
1256
- </tr>
1257
- <tr style="display: none;">
1258
- <td class="spider_label_options">
1259
- <label>Album role:</label>
1260
- </td>
1261
- <td>
1262
- <input type="radio" name="album_role" id="album_role_1" value="1" <?php if ($row->album_role) echo 'checked="checked"'; ?> /><label for="album_role_1"><?php _e("Yes", 'bwg_back'); ?></label>
1263
- <input type="radio" name="album_role" id="album_role_0" value="0" <?php if (!$row->album_role) echo 'checked="checked"'; ?> /><label for="album_role_0">No</label>
1264
- <div class="spider_description">Only author can change an album.</div>
1265
- </td>
1266
- </tr>
1267
- <tr style="display: none;">
1268
- <td class="spider_label_options">
1269
- <label>Image role:</label>
1270
- </td>
1271
- <td>
1272
- <input type="radio" name="image_role" id="image_role_1" value="1" <?php if ($row->image_role) echo 'checked="checked"'; ?> /><label for="image_role_1"><?php _e("Yes", 'bwg_back'); ?></label>
1273
- <input type="radio" name="image_role" id="image_role_0" value="0" <?php if (!$row->image_role) echo 'checked="checked"'; ?> /><label for="image_role_0"><?php _e("No", 'bwg_back'); ?></label>
1274
- <div class="spider_description"><?php _e("Only author can change an image.", 'bwg_back'); ?></div>
1275
- </td>
1276
- </tr>
1277
- <tr>
1278
- <td class="spider_label_options">
1279
- <label><?php echo __('Show search box:', 'bwg_back'); ?></label>
1280
- </td>
1281
- <td>
1282
- <input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($row->show_search_box) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_search_box_width', 'show_search_box_1'); bwg_enable_disable('', 'tr_search_box_placeholder', 'show_search_box_1')" /><label for="show_search_box_1"><?php echo __('Yes', 'bwg_back'); ?></label>
1283
- <input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$row->show_search_box) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_search_box_width', 'show_search_box_0'); bwg_enable_disable('none', 'tr_search_box_placeholder', 'show_search_box_0')" /><label for="show_search_box_0"><?php echo __('No', 'bwg_back'); ?></label>
1284
- <div class="spider_description"></div>
1285
- </td>
1286
- </tr>
1287
- <tr id="tr_search_box_placeholder">
1288
- <td class="spider_label_options">
1289
- <label for="placeholder"><?php echo __('Add placeholder to search:', 'bwg_back'); ?> </label>
1290
- </td>
1291
- <td>
1292
- <input type="text" name="placeholder" id="placeholder" value="<?php echo $row->placeholder; ?>" />
1293
- <div class="spider_description"></div>
1294
- </td>
1295
- </tr>
1296
- <tr id="tr_search_box_width">
1297
- <td class="spider_label_options">
1298
- <label for="search_box_width"><?php _e('Search box width:', 'bwg_back'); ?> </label>
1299
- </td>
1300
- <td>
1301
- <input type="text" name="search_box_width" id="search_box_width" value="<?php echo $row->search_box_width; ?>" class="spider_int_input" /> px
1302
- <div class="spider_description"></div>
1303
- </td>
1304
- </tr>
1305
- <tr>
1306
- <td class="spider_label_options">
1307
- <label><?php _e('Show "Order by" dropdown list:', 'bwg_back'); ?></label>
1308
- </td>
1309
- <td>
1310
- <input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($row->show_sort_images) echo 'checked="checked"'; ?> /><label for="show_sort_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
1311
- <input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$row->show_sort_images) echo 'checked="checked"'; ?> /><label for="show_sort_images_0"><?php _e('No', 'bwg_back'); ?></label>
1312
- <div class="spider_description"></div>
1313
- </td>
1314
- </tr>
1315
- <tr>
1316
- <td class="spider_label_options">
1317
- <label><?php _e('Show tag box:', 'bwg_back'); ?></label>
1318
- </td>
1319
- <td>
1320
- <input type="radio" name="show_tag_box" id="show_tag_box_1" value="1" <?php if ($row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_1"><?php _e('Yes', 'bwg_back'); ?></label>
1321
- <input type="radio" name="show_tag_box" id="show_tag_box_0" value="0" <?php if (!$row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_0"><?php _e('No', 'bwg_back'); ?></label>
1322
- <div class="spider_description"></div>
1323
- </td>
1324
- </tr>
1325
- <tr>
1326
- <td class="spider_label_options">
1327
- <label><?php _e('Preload images:', 'bwg_back'); ?></label>
1328
- </td>
1329
- <td>
1330
- <input type="radio" name="preload_images" id="preload_images_1" value="1" <?php if ($row->preload_images) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_preload_images_count', 'preload_images_1')" /><label for="preload_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
1331
- <input type="radio" name="preload_images" id="preload_images_0" value="0" <?php if (!$row->preload_images) echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_preload_images_count', 'preload_images_0')" /><label for="preload_images_0"><?php _e('No', 'bwg_back'); ?></label>
1332
- <div class="spider_description"></div>
1333
- </td>
1334
- </tr>
1335
- <tr id="tr_preload_images_count">
1336
- <td class="spider_label_options">
1337
- <label for="preload_images_count"><?php _e('Count of images:', 'bwg_back'); ?> </label>
1338
- </td>
1339
- <td>
1340
- <input type="text" name="preload_images_count" id="preload_images_count" value="<?php echo $row->preload_images_count; ?>" class="spider_int_input" />
1341
- <div class="spider_description"><?php _e('Count of images to preload (0 for all).', 'bwg_back'); ?></div>
1342
- </td>
1343
- </tr>
1344
- <tr>
1345
- <td class="spider_label_options">
1346
- <label><?php _e('Enable html editor:', 'bwg_back'); ?></label>
1347
- </td>
1348
- <td>
1349
- <input type="radio" name="enable_wp_editor" id="enable_wp_editor_1" value="1" <?php if ($row->enable_wp_editor) echo 'checked="checked"'; ?> /><label for="enable_wp_editor_1"><?php _e('Yes', 'bwg_back'); ?></label>
1350
- <input type="radio" name="enable_wp_editor" id="enable_wp_editor_0" value="0" <?php if (!$row->enable_wp_editor) echo 'checked="checked"'; ?> /><label for="enable_wp_editor_0"><?php _e('No', 'bwg_back'); ?></label>
1351
- <div class="spider_description"></div>
1352
- </td>
1353
- </tr>
1354
- <tr>
1355
- <td class="spider_label_options">
1356
- <label><?php _e('Enable href attribute:', 'bwg_back'); ?></label>
1357
- </td>
1358
- <td>
1359
- <input type="radio" name="enable_seo" id="enable_seo_1" value="1" <?php if ($row->enable_seo) echo 'checked="checked"'; ?> /><label for="enable_seo_1"><?php _e('Yes', 'bwg_back'); ?></label>
1360
- <input type="radio" name="enable_seo" id="enable_seo_0" value="0" <?php if (!$row->enable_seo) echo 'checked="checked"'; ?> /><label for="enable_seo_0"><?php _e('No', 'bwg_back'); ?></label>
1361
- <div class="spider_description"><?php _e('Disable this option only if it conflicts with your theme.', 'bwg_back'); ?></div>
1362
- </td>
1363
- </tr>
1364
- <tr>
1365
- <td class="spider_label_options">
1366
- <label><?php _e('Meta auto-fill:', 'bwg_back'); ?></label>
1367
- </td>
1368
- <td>
1369
- <input type="radio" name="read_metadata" id="read_metadata_1" value="1" <?php if ($row->read_metadata) echo 'checked="checked"'; ?> /><label for="read_metadata_1"><?php _e('Yes', 'bwg_back'); ?></label>
1370
- <input type="radio" name="read_metadata" id="read_metadata_0" value="0" <?php if (!$row->read_metadata) echo 'checked="checked"'; ?> /><label for="read_metadata_0"><?php _e('No', 'bwg_back'); ?></label>
1371
- <div class="spider_description"><?php _e('Enabling this option the meta description of the image will be automatically filled in image description field.', 'bwg_back'); ?></div>
1372
- </td>
1373
- </tr>
1374
-
1375
- <tr>
1376
- <td class="spider_label_options">
1377
- <label><?php _e('Show/hide custom post types:', 'bwg_back'); ?></label>
1378
- </td>
1379
- <td>
1380
- <input type="radio" name="show_hide_custom_post" id="show_hide_custom_post_1" value="1" <?php if ($row->show_hide_custom_post) echo 'checked="checked"'; ?> /><label for="show_hide_custom_post_1"><?php _e('Yes', 'bwg_back'); ?></label>
1381
- <input type="radio" name="show_hide_custom_post" id="show_hide_custom_post_0" value="0" <?php if (!$row->show_hide_custom_post) echo 'checked="checked"'; ?> /><label for="show_hide_custom_post_0"><?php _e('No', 'bwg_back'); ?></label>
1382
- <div class="spider_description"></div>
1383
- </td>
1384
- </tr>
1385
- <tr>
1386
- <td class="spider_label_options">
1387
- <label><?php _e('Show/hide comments for custom post types:', 'bwg_back'); ?></label>
1388
- </td>
1389
- <td>
1390
- <input type="radio" name="show_hide_post_meta" id="show_hide_post_meta_1" value="1" <?php if ($row->show_hide_post_meta) echo 'checked="checked"'; ?> /><label for="show_hide_post_meta_1"><?php _e("Yes", 'bwg_back'); ?></label>
1391
- <input type="radio" name="show_hide_post_meta" id="show_hide_post_meta_0" value="0" <?php if (!$row->show_hide_post_meta) echo 'checked="checked"'; ?> /><label for="show_hide_post_meta_0"><?php _e("No", 'bwg_back'); ?></label>
1392
- <div class="spider_description"></div>
1393
- </td>
1394
- </tr>
1395
- <tr>
1396
- <td class="spider_label_options">
1397
- <label><?php echo __('Include styles/scripts in necessary pages only:', 'bwg_back'); ?></label>
1398
- </td>
1399
- <td>
1400
- <input type="radio" name="use_inline_stiles_and_scripts" id="use_inline_stiles_and_scripts_1" value="1" <?php if ($row->use_inline_stiles_and_scripts) echo 'checked="checked"'; ?> /><label for="use_inline_stiles_and_scripts_1"><?php echo __('Yes', 'bwg_back'); ?></label>
1401
- <input type="radio" name="use_inline_stiles_and_scripts" id="use_inline_stiles_and_scripts_0" value="0" <?php if (!$row->use_inline_stiles_and_scripts) echo 'checked="checked"'; ?> /><label for="use_inline_stiles_and_scripts_0"><?php echo __('No', 'bwg_back'); ?></label>
1402
- <div class="spider_description"></div>
1403
- </td>
1404
- </tr>
1405
- <tr>
1406
- <td class="spider_label_options spider_free_version_label">
1407
- <label><?php _e('Enable bulk download button:', 'bwg_back'); ?></label>
1408
- </td>
1409
- <td>
1410
- <input disabled="disabled" type="radio" name="gallery_download" id="gallery_download_1" value="1" <?php if ($row->gallery_download) echo 'checked="checked"'; ?> /><label for="gallery_download_1"><?php _e('Yes', 'bwg_back'); ?></label>
1411
- <input disabled="disabled" type="radio" name="gallery_download" id="gallery_download_0" value="0" <?php if (!$row->gallery_download) echo 'checked="checked"'; ?> /><label for="gallery_download_0"><?php _e('No', 'bwg_back'); ?></label>
1412
- <div style="width: 200px;" class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
1413
- </td>
1414
- </tr>
1415
- <tr>
1416
- <td class="spider_label_options">
1417
- <label><?php echo __('Introduction tour:', 'bwg_back'); ?></label>
1418
- </td>
1419
- <td>
1420
- <a href="admin.php?page=options_bwg&bwg_start_tour=1" class="wd-btn wd-btn-primary wd-not-image" title="<?php echo _e('Start tour', 'bwg_back'); ?>">
1421
- <?php _e('Start tour', 'bwg_back'); ?>
1422
- </a>
1423
- <div class="spider_description"><?php echo __('Take this tour to quickly learn about the use of this plugin.', 'bwg_back'); ?></div>
1424
- </td>
1425
- </tr>
1426
- </tbody>
1427
- </table>
1428
- </div>
1429
- <!--Thumbnail options-->
1430
- <div class="spider_div_options" id="div_content_2">
1431
- <table>
1432
- <tbody>
1433
- <tr>
1434
- <td class="spider_label_options">
1435
- <label for="upload_thumb_width"><?php _e("Generated thumbnail dimensions:", 'bwg_back'); ?> </label>
1436
- </td>
1437
- <td>
1438
- <input type="text" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo $row->upload_thumb_width; ?>" class="spider_int_input" /> x
1439
- <input type="text" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo $row->upload_thumb_height; ?>" class="spider_int_input" /> px
1440
- <input type="submit" class="wd-btn wd-btn-primary wd-not-image" onclick="spider_set_input_value('task', 'save'); spider_set_input_value('recreate', 'resize_image_thumb');" value="<?php echo __('Recreate', 'bwg_back'); ?>" />
1441
- <div class="spider_description"><?php _e("The maximum size of the generated thumbnail. Its dimensions should be larger than the ones of the frontend thumbnail.", 'bwg_back'); ?></div>
1442
- </td>
1443
- </tr>
1444
- <tr>
1445
- <td class="spider_label_options spider_free_version_label">
1446
- <label><?php _e("Show description in Vertical Masonry view:", 'bwg_back'); ?> </label>
1447
- </td>
1448
- <td>
1449
- <input disabled="disabled" type="radio" name="show_masonry_thumb_description" id="masonry_thumb_desc_1" value="1" <?php if ($row->show_masonry_thumb_description) echo 'checked="checked"'; ?> /><label for="masonry_thumb_desc_1"><?php _e("Yes", 'bwg_back'); ?></label>
1450
- <input disabled="disabled" type="radio" name="show_masonry_thumb_description" id="masonry_thumb_desc_0" value="0" <?php if (!$row->show_masonry_thumb_description) echo 'checked="checked"'; ?> /><label for="masonry_thumb_desc_0"><?php _e("No", 'bwg_back'); ?></label>
1451
- <div style="width: 200px;" class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
1452
- </td>
1453
- </tr>
1454
- <tr>
1455
- <td class="spider_label_options"><label><?php _e("Play icon over the video thumbnail:", 'bwg_back'); ?> </label></td>
1456
- <td>
1457
- <input type="radio" name="play_icon" id="play_icon_yes" value="1" <?php if ($row->play_icon) echo 'checked="checked"'; ?> /><label for="play_icon_yes"><?php _e("Yes", 'bwg_back'); ?></label>
1458
- <input type="radio" name="play_icon" id="play_icon_no" value="0" <?php if (!$row->play_icon) echo 'checked="checked"'; ?> /><label for="play_icon_no"><?php _e("No", 'bwg_back'); ?></label>
1459
- <div class="spider_description"></div>
1460
- </td>
1461
- </tr>
1462
- </tbody>
1463
- </table>
1464
- </div>
1465
- <!--Lightbox-->
1466
- <div class="spider_div_options" id="div_content_3">
1467
- <table style="width: 100%;">
1468
- <tr>
1469
- <td style="width: 50%; vertical-align: top;">
1470
- <table style="display: inline-table;">
1471
- <tbody>
1472
- <tr>
1473
- <td class="spider_label_options">
1474
- <label> <?php _e("Show Next / Previous buttons:", 'bwg_back'); ?></label>
1475
- </td>
1476
- <td>
1477
- <input type="radio" name="autohide_lightbox_navigation" id="autohide_lightbox_navigation_1" value="1" <?php if ($row->autohide_lightbox_navigation ) echo 'checked="checked"'; ?> /><label for="autohide_lightbox_navigation_1"><?php _e("On hover", 'bwg_back'); ?></label>
1478
- <input type="radio" name="autohide_lightbox_navigation" id="autohide_lightbox_navigation_0" value="0" <?php if (!$row->autohide_lightbox_navigation ) echo 'checked="checked"'; ?> /><label for="autohide_lightbox_navigation_0"><?php _e("Always", 'bwg_back'); ?></label>
1479
- <div class="spider_description"></div>
1480
- </td>
1481
- </tr>
1482
- <tr id="tr_popup_email">
1483
- <td class="spider_label_options spider_free_version_label">
1484
- <label><?php _e("Enable Email for comments:", 'bwg_back'); ?></label>
1485
- </td>
1486
- <td>
1487
- <input disabled="disabled" type="radio" name="popup_enable_email" id="popup_enable_email_1" value="1" <?php if ($row->popup_enable_email) echo 'checked="checked"'; ?> /><label for="popup_enable_email_1"><?php _e("Yes", 'bwg_back'); ?></label>
1488
- <input disabled="disabled" type="radio" name="popup_enable_email" id="popup_enable_email_0" value="0" <?php if (!$row->popup_enable_email) echo 'checked="checked"'; ?> /><label for="popup_enable_email_0"><?php _e("No", 'bwg_back'); ?></label>
1489
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
1490
- </td>
1491
- </tr>
1492
- <tr id="tr_popup_captcha">
1493
- <td class="spider_label_options spider_free_version_label">
1494
- <label><?php _e("Enable Captcha for comments:", 'bwg_back'); ?></label>
1495
- </td>
1496
- <td>
1497
- <input disabled="disabled" type="radio" name="popup_enable_captcha" id="popup_enable_captcha_1" value="1" <?php if ($row->popup_enable_captcha) echo 'checked="checked"'; ?> /><label for="popup_enable_captcha_1"><?php _e("Yes", 'bwg_back'); ?></label>
1498
- <input disabled="disabled" type="radio" name="popup_enable_captcha" id="popup_enable_captcha_0" value="0" <?php if (!$row->popup_enable_captcha) echo 'checked="checked"'; ?> /><label for="popup_enable_captcha_0"><?php _e("No", 'bwg_back'); ?></label>
1499
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
1500
- </td>
1501
- </tr>
1502
- <tr id="tr_popup_fullsize_image">
1503
- <td class="spider_label_options">
1504
- <label><?php _e("Enable original image display button:", 'bwg_back'); ?></label>
1505
- </td>
1506
- <td>
1507
- <input type="radio" name="popup_enable_fullsize_image" id="popup_enable_fullsize_image_1" value="1" <?php if ($row->popup_enable_fullsize_image) echo 'checked="checked"'; ?> /><label for="popup_enable_fullsize_image_1"><?php _e("Yes", 'bwg_back'); ?></label>
1508
- <input type="radio" name="popup_enable_fullsize_image" id="popup_enable_fullsize_image_0" value="0" <?php if (!$row->popup_enable_fullsize_image) echo 'checked="checked"'; ?> /><label for="popup_enable_fullsize_image_0"><?php _e("No", 'bwg_back'); ?></label>
1509
- <div class="spider_description"></div>
1510
- </td>
1511
- </tr>
1512
- <tr id="tr_popup_download">
1513
- <td class="spider_label_options">
1514
- <label><?php _e("Enable download button:", 'bwg_back'); ?></label>
1515
- </td>
1516
- <td>
1517
- <input type="radio" name="popup_enable_download" id="popup_enable_download_1" value="1" <?php if ($row->popup_enable_download) echo 'checked="checked"'; ?> /><label for="popup_enable_download_1"><?php _e("Yes", 'bwg_back'); ?></label>
1518
- <input type="radio" name="popup_enable_download" id="popup_enable_download_0" value="0" <?php if (!$row->popup_enable_download) echo 'checked="checked"'; ?> /><label for="popup_enable_download_0"><?php _e("No", 'bwg_back'); ?></label>
1519
- <div class="spider_description"></div>
1520
- </td>
1521
- </tr>
1522
- <tr id="tr_image_count">
1523
- <td class="spider_label_options">
1524
- <label><?php _e("Show images count:", 'bwg_back'); ?></label>
1525
- </td>
1526
- <td>
1527
- <input type="radio" name="show_image_counts" id="show_image_counts_current_image_number_1" value="1" <?php if ($row->show_image_counts) echo 'checked="checked"'; ?> /><label for="show_image_counts_current_image_number_1"><?php _e("Yes", 'bwg_back'); ?></label>
1528
- <input type="radio" name="show_image_counts" id="show_image_counts_current_image_number_0" value="0" <?php if (!$row->show_image_counts) echo 'checked="checked"'; ?> /><label for="show_image_counts_current_image_number_0"><?php _e("No", 'bwg_back'); ?></label>
1529
- <div class="spider_description"></div>
1530
- </td>
1531
- </tr>
1532
- <tr id="tr_image_cycle">
1533
- <td class="spider_label_options">
1534
- <label><?php _e("Enable loop:", 'bwg_back'); ?></label>
1535
- </td>
1536
- <td>
1537
- <input type="radio" name="enable_loop" id="enable_loop_1" value="1" <?php if ($row->enable_loop) echo 'checked="checked"'; ?> /><label for="enable_loop_1"><?php _e("Yes", 'bwg_back'); ?></label>
1538
- <input type="radio" name="enable_loop" id="enable_loop_0" value="0" <?php if (!$row->enable_loop) echo 'checked="checked"'; ?> /><label for="enable_loop_0"><?php _e("No", 'bwg_back'); ?></label>
1539
- <div class="spider_description"></div>
1540
- </td>
1541
- </tr>
1542
- <tr>
1543
- <td class="spider_label_options spider_free_version_label">
1544
- <label><?php _e("Enable", 'bwg_back'); ?> AddThis:</label>
1545
- </td>
1546
- <td>
1547
- <input disabled="disabled" type="radio" name="enable_addthis" id="enable_addthis_1" value="1" <?php if ($row->enable_addthis ) echo 'checked="checked"'; ?> />
1548
- <label for="enable_addthis_1"><?php _e("Yes", 'bwg_back'); ?></label>
1549
- <input disabled="disabled" type="radio" name="enable_addthis" id="enable_addthis_0" value="0" <?php if (!$row->enable_addthis ) echo 'checked="checked"'; ?> />
1550
- <label for="enable_addthis_0"><?php _e("No", 'bwg_back'); ?></label>
1551
- <div class="spider_description spider_free_version"><?php _e("This option is disabled in free version.", 'bwg_back'); ?></div>
1552
- </td>
1553
- </tr>
1554
- </tbody>
1555
- </table>
1556
- </td>
1557
- </tr>
1558
- </table>
1559
- </div>
1560
- <!--Slideshow-->
1561
- <div class="spider_div_options" id="div_content_4">
1562
- <table style="width: 100%;">
1563
- <tr>
1564
- <td style="width: 50%; vertical-align: top;">
1565
- <table style="display: inline-table;">
1566
- <tbody>
1567
- <tr>
1568
- <td class="spider_label_options">
1569
- <label><?php _e('Show Next / Previous buttons:', 'bwg_back'); ?></label>
1570
- </td>
1571
- <td>
1572
- <input type="radio" name="autohide_slideshow_navigation" id="autohide_slideshow_navigation_1" value="1" <?php if ($row->autohide_slideshow_navigation) echo 'checked="checked"'; ?> /><label for="autohide_slideshow_navigation_1"><?php _e('On hover', 'bwg_back'); ?></label>
1573
- <input type="radio" name="autohide_slideshow_navigation" id="autohide_slideshow_navigation_0" value="0" <?php if (!$row->autohide_slideshow_navigation) echo 'checked="checked"'; ?> /><label for="autohide_slideshow_navigation_0"><?php _e('Always', 'bwg_back'); ?></label>
1574
- <div class="spider_description"></div>
1575
- </td>
1576
- </tr>
1577
- </tbody>
1578
- </table>
1579
- </td>
1580
- </tr>
1581
- </table>
1582
- </div>
1583
- <!--Embed options-->
1584
- <div class="spider_div_options" id="div_content_6">
1585
- <table>
1586
- <tbody>
1587
- <tr>
1588
- <td class="spider_label_options spider_free_version_label">
1589
- <label ><?php _e('Gallery autoupdate interval:', 'bwg_back'); ?></label>
1590
- </td>
1591
- <td class="spider_free_version_label">
1592
- <input type="number" disabled="disabled" id="autoupdate_interval_hour" class="spider_int_input" min="0" max="24" value="0" />
1593
- <?php _e('hour', 'bwg_back'); ?>
1594
- <input type="number" disabled="disabled" id="autoupdate_interval_min" class="spider_int_input" min="0" max="59" value="30" />
1595
- <?php _e('min', 'bwg_back'); ?>
1596
- <div class="spider_description spider_free_version"><?php _e('Autoupdatable galleries are disabled in free version.', 'bwg_back'); ?></div>
1597
- </td>
1598
- </tr>
1599
- <tr>
1600
- <td class="spider_label_options spider_free_version_label">
1601
- <label><?php _e('Instagram Access Token:', 'bwg_back'); ?></label>
1602
- </td>
1603
- <td class="spider_free_version_label">
1604
- <input id="instagram_client_id" type="text" disabled="disabled" style="display:inline-block; width:100%;" value="" />
1605
- <div class="spider_description spider_free_version"><?php _e('Instagram galleries are disabled in free version.', 'bwg_back'); ?></div>
1606
- </td>
1607
- </tr>
1608
- </tbody>
1609
- </table>
1610
- </div>
1611
- <!--Watermark-->
1612
- <div class="spider_div_options" id="div_content_7">
1613
- <table style="width: 100%;">
1614
- <tr>
1615
- <td class="options_left">
1616
- <table style="display: inline-table;">
1617
- <tbody>
1618
- <tr id="tr_built_in_watermark_type">
1619
- <td class="spider_label_options">
1620
- <label><?php _e('Watermark type: ', 'bwg_back'); ?></label>
1621
- </td>
1622
- <td>
1623
- <input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_none" value="none" <?php if ($row->built_in_watermark_type == 'none') echo 'checked="checked"'; ?> onClick="bwg_built_in_watermark('watermark_type_none')" />
1624
- <label for="built_in_watermark_type_none"><?php _e('None', 'bwg_back'); ?></label>
1625
- <input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_text" value="text" <?php if ($row->built_in_watermark_type == 'text') echo 'checked="checked"'; ?> onClick="bwg_built_in_watermark('watermark_type_text')" onchange="preview_built_in_watermark()" />
1626
- <label for="built_in_watermark_type_text"><?php _e('Text', 'bwg_back'); ?></label>
1627
- <input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_image" value="image" <?php if ($row->built_in_watermark_type == 'image') echo 'checked="checked"'; ?> onClick="bwg_built_in_watermark('watermark_type_image')" onchange="preview_built_in_watermark()" />
1628
- <label for="built_in_watermark_type_image"><?php _e('Image', 'bwg_back'); ?></label>
1629
- <div class="spider_description"></div>
1630
- </td>
1631
- </tr>
1632
- <tr id="tr_built_in_watermark_url">
1633
- <td class="spider_label_options">
1634
- <label for="built_in_watermark_url"><?php _e('Watermark url: ', 'bwg_back'); ?></label>
1635
- </td>
1636
- <td>
1637
- <input type="text" id="built_in_watermark_url" name="built_in_watermark_url" style="width: 68%;" value="<?php echo $row->built_in_watermark_url; ?>" style="display:inline-block;" onchange="preview_built_in_watermark()" />
1638
- <?php
1639
- $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'png', 'callback' => 'bwg_add_built_in_watermark_image'), admin_url('admin-ajax.php'));
1640
- $query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
1641
- $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
1642
- ?>
1643
- <a href="<?php echo $query_url; ?>" id="button_add_built_in_watermark_image" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add thickbox thickbox-preview"
1644
- title="Add image"
1645
- onclick="return false;"
1646
- style="margin-bottom:5px;">
1647
- <?php _e('Add Image', 'bwg_back'); ?>
1648
- </a>
1649
- <div class="spider_description"><?php _e('Only .png format is supported.', 'bwg_back'); ?></div>
1650
- </td>
1651
- </tr>
1652
- <tr id="tr_built_in_watermark_text">
1653
- <td class="spider_label_options">
1654
- <label for="built_in_watermark_text"><?php _e('Watermark text: ', 'bwg_back'); ?></label>
1655
- </td>
1656
- <td>
1657
- <input type="text" name="built_in_watermark_text" id="built_in_watermark_text" style="width: 100%;" value="<?php echo $row->built_in_watermark_text; ?>" onchange="preview_built_in_watermark()" onkeypress="preview_built_in_watermark()" />
1658
- <div class="spider_description"></div>
1659
- </td>
1660
- </tr>
1661
- <tr id="tr_built_in_watermark_size">
1662
- <td class="spider_label_options">
1663
- <label for="built_in_watermark_size"><?php _e('Watermark size: ', 'bwg_back'); ?></label>
1664
- </td>
1665
- <td>
1666
- <input type="text" name="built_in_watermark_size" id="built_in_watermark_size" value="<?php echo $row->built_in_watermark_size; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" /> %
1667
- <div class="spider_description"><?php _e('Enter size of watermark in percents according to image.', 'bwg_back'); ?></div>
1668
- </td>
1669
- </tr>
1670
- <tr id="tr_built_in_watermark_font_size">
1671
- <td class="spider_label_options">
1672
- <label for="built_in_watermark_font_size"><?php _e('Watermark font size:', 'bwg_back'); ?></label>
1673
- </td>
1674
- <td>
1675
- <input type="text" name="built_in_watermark_font_size" id="built_in_watermark_font_size" value="<?php echo $row->built_in_watermark_font_size; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" />
1676
- <div class="spider_description"></div>
1677
- </td>
1678
- </tr>
1679
- <tr id="tr_built_in_watermark_font">
1680
- <td class="spider_label_options">
1681
- <label for="built_in_watermark_font"><?php _e('Watermark font style: ', 'bwg_back'); ?></label>
1682
- </td>
1683
- <td>
1684
- <select class="select_icon" name="built_in_watermark_font" id="built_in_watermark_font" style="width:120px;" onchange="preview_built_in_watermark()">
1685
- <?php
1686
- foreach ($built_in_watermark_fonts as $watermark_font) {
1687
- ?>
1688
- <option value="<?php echo $watermark_font; ?>" <?php if ($row->built_in_watermark_font == $watermark_font) echo 'selected="selected"'; ?>><?php echo $watermark_font; ?></option>
1689
- <?php
1690
- }
1691
- ?>
1692
- </select>
1693
- <?php
1694
- foreach ($built_in_watermark_fonts as $watermark_font) {
1695
- ?>
1696
- <style>
1697
- @font-face {
1698
- font-family: <?php echo 'bwg_' . str_replace('.ttf', '', $watermark_font); ?>;
1699
- src: url("<?php echo WD_BWG_URL . '/fonts/' . $watermark_font; ?>");
1700
- }
1701
- </style>
1702
- <?php
1703
- }
1704
- ?>
1705
- <div class="spider_description"></div>
1706
- </td>
1707
- </tr>
1708
- <tr id="tr_built_in_watermark_color">
1709
- <td class="spider_label_options">
1710
- <label for="built_in_watermark_color"><?php _e('Watermark color:', 'bwg_back'); ?> </label>
1711
- </td>
1712
- <td>
1713
- <input type="text" name="built_in_watermark_color" id="built_in_watermark_color" value="<?php echo $row->built_in_watermark_color; ?>" class="color" onchange="preview_built_in_watermark()" />
1714
- <div class="spider_description"></div>
1715
- </td>
1716
- </tr>
1717
- <tr id="tr_built_in_watermark_opacity">
1718
- <td class="spider_label_options">
1719
- <label for="built_in_watermark_opacity"><?php _e('Watermark opacity:', 'bwg_back'); ?> </label>
1720
- </td>
1721
- <td>
1722
- <input type="text" name="built_in_watermark_opacity" id="built_in_watermark_opacity" value="<?php echo $row->built_in_watermark_opacity; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" /> %
1723
- <div class="spider_description"><?php _e('Opacity value must be in the range of 0 to 100.', 'bwg_back'); ?></div>
1724
- </td>
1725
- </tr>
1726
- <tr id="tr_built_in_watermark_position">
1727
- <td class="spider_label_options">
1728
- <label><?php _e('Watermark position:', 'bwg_back'); ?> </label>
1729
- </td>
1730
- <td>
1731
- <table class="bwg_position_table">
1732
- <tbody>
1733
- <tr>
1734
- <td><input type="radio" value="top-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1735
- <td><input type="radio" value="top-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1736
- <td><input type="radio" value="top-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1737
- </tr>
1738
- <tr>
1739
- <td><input type="radio" value="middle-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1740
- <td><input type="radio" value="middle-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1741
- <td><input type="radio" value="middle-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1742
- </tr>
1743
- <tr>
1744
- <td><input type="radio" value="bottom-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1745
- <td><input type="radio" value="bottom-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1746
- <td><input type="radio" value="bottom-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
1747
- </tr>
1748
- </tbody>
1749
- </table>
1750
- <input type="submit" class="wd-btn wd-btn-primary wd-not-image" title="<?php _e('Set watermark', 'bwg_back'); ?>" style="margin-top: 5px;"
1751
- onclick="spider_set_input_value('task', 'save'); spider_set_input_value('watermark', 'image_set_watermark');"
1752
- value="<?php _e('Set Watermark', 'bwg_back'); ?>"/>
1753
- <input type="submit" class="wd-btn wd-btn-primary wd-not-image" title="<?php _e('Reset watermark', 'bwg_back'); ?>" style="margin-top: 5px;"
1754
- onclick="spider_set_input_value('task', 'image_recover_all');"
1755
- value="<?php echo __('Reset Watermark', 'bwg_back'); ?>"/>
1756
- <div class="spider_description"></div>
1757
- </td>
1758
- </tr>
1759
- </tbody>
1760
- </table>
1761
- </td>
1762
- <td class="options_right">
1763
- <table style="width: 100%; display: inline-table;">
1764
- <tbody>
1765
- <tr>
1766
- <td>
1767
- <span id="preview_built_in_watermark" style="display:table-cell; background-image:url('<?php echo WD_BWG_URL . '/images/watermark_preview.jpg'?>');background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;">
1768
- </span>
1769
- </td>
1770
- </tr>
1771
- </tbody>
1772
- </table>
1773
- </td>
1774
- </tr>
1775
- </table>
1776
- </div>
1777
- </div>
1778
- </div>
1779
- <input id="task" name="task" type="hidden" value="" />
1780
- <input id="recreate" name="recreate" type="hidden" value="" />
1781
- <input id="watermark" name="watermark" type="hidden" value="" />
1782
- <script>
1783
- // "state" global get var is for checking redirect from facebook.
1784
- window.onload = bwg_change_tab('<?php echo isset($_POST['type_option']) ? esc_html($_POST['type_option']) : (isset($_GET['state']) ? 'bwg_default_box' : 'bwg_options_box'); ?>');
1785
- window.onload = bwg_inputs();
1786
- window.onload = bwg_watermark('watermark_type_<?php echo $row->watermark_type ?>');
1787
- window.onload = bwg_built_in_watermark('watermark_type_<?php echo $row->built_in_watermark_type ?>');
1788
- window.onload = bwg_popup_fullscreen(<?php echo $row->popup_fullscreen; ?>);
1789
- window.onload = bwg_enable_disable(<?php echo $row->show_search_box ? "'', 'tr_search_box_width', 'show_search_box_1'" : "'none', 'tr_search_box_width', 'show_search_box_0'" ?>);
1790
- window.onload = bwg_enable_disable(<?php echo $row->show_search_box ? "'', 'tr_search_box_placeholder', 'show_search_box_1'" : "'none', 'tr_search_box_placeholder', 'show_search_box_0'" ?>);
1791
- window.onload = bwg_enable_disable(<?php echo $row->preload_images ? "'', 'tr_preload_images_count', 'preload_images_1'" : "'none', 'tr_preload_images_count', 'preload_images_0'" ?>);
1792
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullscreen', 'popup_enable_ctrl_btn_0'" ?>);
1793
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_info', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_info', 'popup_enable_ctrl_btn_0'" ?>);
1794
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_download', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_download', 'popup_enable_ctrl_btn_0'" ?>);
1795
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_fullsize_image', 'popup_enable_ctrl_btn_0'" ?>);
1796
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_comment', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_comment', 'popup_enable_ctrl_btn_0'" ?>);
1797
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? ($row->popup_enable_comment ? "'', 'tr_comment_moderation', 'popup_enable_comment_1'" : "'none', 'tr_comment_moderation', 'popup_enable_comment_0'") : "'none', 'tr_comment_moderation', 'popup_enable_comment_0'" ?>);
1798
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? ($row->popup_enable_comment ? "'', 'tr_popup_email', 'popup_enable_comment_1'" : "'none', 'tr_popup_email', 'popup_enable_comment_0'") : "'none', 'tr_popup_email', 'popup_enable_comment_0'" ?>);
1799
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? ($row->popup_enable_comment ? "'', 'tr_popup_captcha', 'popup_enable_comment_1'" : "'none', 'tr_popup_captcha', 'popup_enable_comment_0'") : "'none', 'tr_popup_captcha', 'popup_enable_comment_0'" ?>);
1800
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_facebook', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_facebook', 'popup_enable_ctrl_btn_0'" ?>);
1801
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_twitter', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_twitter', 'popup_enable_ctrl_btn_0'" ?>);
1802
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_google', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_google', 'popup_enable_ctrl_btn_0'" ?>);
1803
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_pinterest', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_pinterest', 'popup_enable_ctrl_btn_0'" ?>);
1804
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_ctrl_btn ? "'', 'tr_popup_thumblr', 'popup_enable_ctrl_btn_1'" : "'none', 'tr_popup_thumblr', 'popup_enable_ctrl_btn_0'" ?>);
1805
- window.onload = bwg_enable_disable(<?php echo $row->popup_enable_filmstrip ? "'', 'tr_popup_filmstrip_height', 'popup_enable_filmstrip_1'" : "'none', 'tr_popup_filmstrip_height', 'popup_enable_filmstrip_0'" ?>);
1806
- window.onload = bwg_enable_disable(<?php echo $row->slideshow_enable_filmstrip ? "'', 'tr_slideshow_filmstrip_height', 'slideshow_enable_filmstrip_yes'" : "'none', 'tr_slideshow_filmstrip_height', 'slideshow_enable_filmstrip_no'" ?>);
1807
- window.onload = bwg_enable_disable(<?php echo $row->slideshow_enable_title ? "'', 'tr_slideshow_title_position', 'slideshow_enable_title_yes'" : "'none', 'tr_slideshow_title_position', 'slideshow_enable_title_no'" ?>);
1808
- window.onload = bwg_enable_disable(<?php echo $row->slideshow_enable_description ? "'', 'tr_slideshow_description_position', 'slideshow_enable_description_yes'" : "'none', 'tr_slideshow_description_position', 'slideshow_enable_description_no'" ?>);
1809
- window.onload = bwg_enable_disable(<?php echo $row->slideshow_enable_music ? "'', 'tr_slideshow_music_url', 'slideshow_enable_music_yes'" : "'none', 'tr_slideshow_music_url', 'slideshow_enable_music_no'" ?>);
1810
- window.onload = bwg_enable_disable(<?php echo $row->thumb_click_action == 'redirect_to_url' ? "'', 'tr_thumb_link_target', 'thumb_click_action_2'" : "'none', 'tr_thumb_link_target', 'thumb_click_action_" . ($row->thumb_click_action == 'open_lightbox' ? 1 : 3) . "'"; ?>);
1811
- window.onload = preview_watermark();
1812
- window.onload = preview_built_in_watermark();
1813
- </script>
1814
- </form>
1815
- <?php
1816
- }
1817
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewTags_bwg.php DELETED
@@ -1,168 +0,0 @@
1
- <?php
2
- class BWGViewTags_bwg {
3
-
4
- private $model;
5
-
6
- public function __construct($model) {
7
- $this->model = $model;
8
- }
9
-
10
- public function display() {
11
- $rows_data = $this->model->get_rows_data();
12
- $page_nav = $this->model->page_nav();
13
- $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
14
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
15
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'A.term_id');
16
- $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
17
- $ids_string = '';
18
- $per_page = $this->model->per_page();
19
- $pager = 0;
20
- $query_url = wp_nonce_url( admin_url('admin-ajax.php'), '', 'bwg_nonce' );
21
- $query_url = add_query_arg(array('action' => ''), $query_url);
22
- ?>
23
- <script>
24
- var ajax_url = "<?php echo $query_url; ?>";
25
- </script>
26
- <div id="wordpress_message_1" style="width:99%;display:none"><div id="wordpress_message_2" class="wd_updated"><p><strong><?php echo __('Item Succesfully Saved.', 'bwg_back'); ?></strong></p></div></div>
27
- <form class="wrap bwg_form" id="tags_form" method="post" action="admin.php?page=tags_bwg" style="width: 98%; float: left;">
28
- <?php wp_nonce_field( 'tags_bwg', 'bwg_nonce' ); ?>
29
- <div>
30
- <span class="tag_icon"></span>
31
- <h2><?php _e('Tags', 'bwg_back'); ?></h2>
32
- </div>
33
- <div class="buttons_div_right">
34
- <span class="wd-btn wd-btn-primary-gray bwg_check_all non_selectable " onclick="spider_check_all_items()">
35
- <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
36
- <span style="vertical-align: middle;"><?php echo __('Select All', 'bwg_back'); ?></span>
37
- </span>
38
- <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-save" type="submit" value="<?php echo addslashes(__("Save", 'bwg_back')); ?>" onclick="spider_set_input_value('task', 'edit_tags');" />
39
- <input class="wd-btn wd-btn-primary-red wd-btn-icon wd-btn-delete" type="submit" value="<?php echo addslashes(__("Delete", 'bwg_back')); ?>" onclick="if (confirm('Do you want to delete selected items?')) {
40
- spider_set_input_value('task', 'delete_all');
41
- } else {
42
- return false;
43
- }" />
44
- </div>
45
- <div class="tablenav top">
46
- <?php
47
- WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'tags_form', 'position_search');
48
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
49
- ?>
50
- </div>
51
- <table class="wp-list-table widefat fixed pages">
52
- <thead>
53
- <tr>
54
- <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
55
- <th class="sortable table_small_col <?php if ($order_by == 'A.term_id') {echo $order_class;} ?>">
56
- <a onclick="spider_set_input_value('task', '');
57
- spider_set_input_value('order_by', 'A.term_id');
58
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'A.term_id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
59
- spider_form_submit(event, 'tags_form')" href="">
60
- <span>ID</span><span class="sorting-indicator"></span></th>
61
- </a>
62
- <th class="sortable <?php if ($order_by == 'A.name') {echo $order_class;} ?>">
63
- <a onclick="spider_set_input_value('task', '');
64
- spider_set_input_value('order_by', 'A.name');
65
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'A.name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
66
- spider_form_submit(event, 'tags_form')" href="">
67
- <span><?php echo __('Name', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
68
- </a>
69
- </th>
70
- <th class="sortable <?php if ($order_by == 'A.slug') {echo $order_class;} ?>">
71
- <a onclick="spider_set_input_value('task', '');
72
- spider_set_input_value('order_by', 'A.slug');
73
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'A.slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
74
- spider_form_submit(event, 'tags_form')" href="">
75
- <span><?php echo __('Slug', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
76
- </a>
77
- </th>
78
- <th class="sortable <?php if ($order_by == 'B.count') {echo $order_class;} ?> table_medium_col" style="padding-left:10px;">
79
- <a onclick="spider_set_input_value('task', '');
80
- spider_set_input_value('order_by', 'B.count');
81
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'B.count') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
82
- spider_form_submit(event, 'tags_form')" href="">
83
- <span><?php echo __('Count', 'bwg_back'); ?></span><span class="sorting-indicator"></span>
84
- </a>
85
- </th>
86
- <th class="table_big_col"><?php echo __('Edit', 'bwg_back'); ?></th>
87
- <th class="table_small_col"><?php echo __('Delete', 'bwg_back'); ?></th>
88
- </tr>
89
- <tr id="tr">
90
- <th></th>
91
- <th></th>
92
- <th class="edit_input">
93
- <input class="input_th" name="tagname" type="text" value="">
94
- </th>
95
- <th class="edit_input">
96
- <input class="input_th" name="slug" type="text" value="">
97
- </th>
98
- <th></th>
99
- <th class="table_big_col">
100
- <a class="add_tag_th wd-btn wd-btn-primary wd-not-image button-small" title="<?php echo __('Add Tag ', 'bwg_back'); ?>" onclick="spider_set_input_value('task', 'save');
101
- spider_set_input_value('current_id', '');
102
- spider_form_submit(event, 'tags_form')" href=""><?php echo __('Add Tag ', 'bwg_back'); ?></a>
103
- </th>
104
- <th></th>
105
- </tr>
106
- </thead>
107
- <tbody id="tbody_arr">
108
- <?php
109
- if ($rows_data) {
110
- foreach ($rows_data as $row_data) {
111
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
112
- ?>
113
- <tr id="tr_<?php echo $row_data->term_id; ?>" <?php echo $alternate; ?>>
114
- <td class="table_small_col check-column" id="td_check_<?php echo $row_data->term_id; ?>" ><input id="check_<?php echo $row_data->term_id; ?>" name="check_<?php echo $row_data->term_id; ?>" type="checkbox" /></td>
115
- <td class="table_small_col" id="td_id_<?php echo $row_data->term_id; ?>" ><?php echo $row_data->term_id; ?></td>
116
- <td id="td_name_<?php echo $row_data->term_id; ?>" >
117
- <a class="pointer" id="name<?php echo $row_data->term_id; ?>"
118
- onclick="edit_tag(<?php echo $row_data->term_id; ?>)"
119
- title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $row_data->name; ?></a>
120
- </td>
121
- <td id="td_slug_<?php echo $row_data->term_id; ?>">
122
- <a class="pointer"
123
- id="slug<?php echo $row_data->term_id; ?>"
124
- onclick="edit_tag(<?php echo $row_data->term_id; ?>)"
125
- title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $row_data->slug; ?></a>
126
- </td>
127
- <td class="table_big_col" id="td_count_<?php echo $row_data->term_id; ?>" >
128
- <a class="pointer"
129
- id="count<?php echo $row_data->term_id; ?>"
130
- title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $this->model->get_count_of_images($row_data->term_id); ?></a>
131
- </td>
132
- <td class="table_big_col" id="td_edit_<?php echo $row_data->term_id; ?>">
133
- <a class="bwg_img_edit" title="<?php _e("Edit", 'bwg_back'); ?>" onclick="edit_tag(<?php echo $row_data->term_id; ?>)"></a>
134
- </td>
135
- <td class="table_big_col" id="td_delete_<?php echo $row_data->term_id; ?>">
136
- <a class="bwg_img_remove" title="<?php _e("Delete", 'bwg_back'); ?>" onclick="if(confirm('Do you want to delete selected items?')) {
137
- spider_set_input_value('task', 'delete');
138
- spider_set_input_value('current_id', <?php echo $row_data->term_id; ?>);
139
- spider_form_submit(event, 'tags_form');
140
- }
141
- else {
142
- return false;
143
- }
144
- " href=""></a>
145
- </td>
146
- </tr>
147
- <?php
148
- $ids_string .= $row_data->term_id . ',';
149
- }
150
- }
151
- ?>
152
- </tbody>
153
- </table>
154
- <div class="tablenav bottom">
155
- <?php
156
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
157
- ?>
158
- </div>
159
- <input id="task" name="task" type="hidden" value="" />
160
- <input id="current_id" name="current_id" type="hidden" value="" />
161
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
162
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="<?php echo $asc_or_desc; ?>" />
163
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
164
- <input id="tag_current_id" name="tag_current_id" type="hidden" value="" />
165
- </form>
166
- <?php
167
- }
168
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/BWGViewThemes_bwg.php DELETED
@@ -1,3490 +0,0 @@
1
- <?php
2
-
3
- class BWGViewThemes_bwg {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($model) {
19
- $this->model = $model;
20
- }
21
-
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $rows_data = $this->model->get_rows_data();
27
- $page_nav = $this->model->page_nav();
28
- $search_value = ((isset($_POST['search_value'])) ? esc_html($_POST['search_value']) : '');
29
- $search_select_value = ((isset($_POST['search_select_value'])) ? (int)$_POST['search_select_value'] : 0);
30
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html($_POST['asc_or_desc']) : 'asc');
31
- $order_by = (isset($_POST['order_by']) ? esc_html($_POST['order_by']) : 'id');
32
- $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
- $ids_string = '';
34
- $per_page = $this->model->per_page();
35
- $pager = 0;
36
- ?>
37
- <?php
38
- if (get_option("wd_bwg_theme_version")) {
39
- ?>
40
- <div style="clear: both; float: left; width: 99%;">
41
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_thumbnails.png'; ?>" />
42
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_masonry.png'; ?>" />
43
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_mosaic.png'; ?>" />
44
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_slideshow.png'; ?>" />
45
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_image_browser.png'; ?>" />
46
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_compact_album.png'; ?>" />
47
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_masonry_album.png'; ?>" />
48
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_extended_album.png'; ?>" />
49
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_blog_style.png'; ?>" />
50
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_lightbox.png'; ?>" />
51
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_page_navigation.png'; ?>" />
52
- <img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_carousel.png'; ?>" />
53
- </div>
54
- <?php
55
- die();
56
- }
57
- ?>
58
- <form class="wrap bwg_form" id="themes_form" method="post" action="admin.php?page=themes_bwg" style="float: left; width: 98%;">
59
- <?php wp_nonce_field( 'themes_bwg', 'bwg_nonce' ); ?>
60
- <span class="theme_icon"></span>
61
- <div>
62
- <h2>
63
- <?php _e("Themes", 'bwg_back'); ?>
64
- <a href="" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
65
- spider_form_submit(event, 'themes_form')"><?php _e("Add new", 'bwg_back'); ?></a>
66
- </h2>
67
- </div>
68
- <div class="buttons_div">
69
- <input class="button-secondary" type="submit" onclick="if (confirm('<?php echo addslashes(__('Do you want to delete selected items?', 'bwg_back')); ?>')) {
70
- spider_set_input_value('task', 'delete_all');
71
- } else {
72
- return false;
73
- }" value="<?php _e("Delete", 'bwg_back'); ?>"/>
74
- </div>
75
- <div class="tablenav top">
76
- <?php
77
- WDWLibrary::search(__('Title','bwg_back'), $search_value, 'themes_form', 'position_search');
78
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'themes_form', $per_page);
79
- ?>
80
- </div>
81
- <table class="wp-list-table widefat fixed pages">
82
- <thead>
83
- <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;"/></th>
84
- <th class="table_small_col <?php if ($order_by == 'id') { echo $order_class; } ?>">
85
- <a onclick="spider_set_input_value('task', '');
86
- spider_set_input_value('order_by', 'id');
87
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html($_POST['order_by']) == 'id') && esc_html($_POST['asc_or_desc']) == 'asc') ? 'desc' : 'asc'); ?>');
88
- spider_form_submit(event, 'themes_form')" href="">
89
- <span>ID</span><span class="sorting-indicator"></span></a>
90
- </th>
91
- <th class="<?php if ($order_by == 'name') { echo $order_class; } ?>">
92
- <a onclick="spider_set_input_value('task', '');
93
- spider_set_input_value('order_by', 'name');
94
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html($_POST['order_by']) == 'title') && esc_html($_POST['asc_or_desc']) == 'asc') ? 'desc' : 'asc'); ?>');
95
- spider_form_submit(event, 'themes_form')" href="">
96
- <span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span></a>
97
- </th>
98
- <th class="table_big_col <?php if ($order_by == 'default_theme') { echo $order_class; } ?>">
99
- <a onclick="spider_set_input_value('task', '');
100
- spider_set_input_value('order_by', 'default_theme');
101
- spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html($_POST['order_by']) == 'default_theme') && esc_html($_POST['asc_or_desc']) == 'asc') ? 'desc' : 'asc'); ?>');
102
- spider_form_submit(event, 'themes_form')" href="">
103
- <span><?php _e("Default", 'bwg_back'); ?></span><span class="sorting-indicator"></span></a>
104
- </th>
105
- <th class="table_big_col"><?php _e("Edit", 'bwg_back'); ?></th>
106
- <th class="table_big_col"><?php _e("Delete", 'bwg_back'); ?></th>
107
- </thead>
108
- <tbody id="tbody_arr">
109
- <?php
110
- if ($rows_data) {
111
- foreach ($rows_data as $row_data) {
112
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
113
- $default_image = (($row_data->default_theme) ? 'default' : 'notdefault');
114
- $default = (($row_data->default_theme) ? '' : 'setdefault');
115
- ?>
116
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
117
- <td class="table_small_col check-column">
118
- <input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" type="checkbox"/>
119
- </td>
120
- <td class="table_small_col"><?php echo $row_data->id; ?></td>
121
- <td>
122
- <a onclick="spider_set_input_value('task', 'edit');
123
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
124
- spider_form_submit(event, 'themes_form')" href="" title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $row_data->name; ?></a>
125
- </td>
126
- <td class="table_big_col">
127
- <?php
128
- if ($default != '') {
129
- ?>
130
- <a onclick="spider_set_input_value('task', '<?php echo $default; ?>');
131
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
132
- spider_form_submit(event, 'themes_form')" href="">
133
- <?php
134
- }
135
- ?>
136
- <img src="<?php echo WD_BWG_URL . '/images/' . $default_image . '.png'; ?>" />
137
- <?php
138
- if ($default != '') {
139
- ?>
140
- </a>
141
- <?php
142
- }
143
- ?>
144
- </td>
145
- <td class="table_big_col">
146
- <a onclick="spider_set_input_value('task', 'edit');
147
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
148
- spider_form_submit(event, 'themes_form')" href=""><?php _e("Edit", 'bwg_back'); ?></a>
149
- </td>
150
- <td class="table_big_col">
151
- <a onclick="spider_set_input_value('task', 'delete');
152
- spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
153
- spider_form_submit(event, 'themes_form')" href=""><?php _e("Delete", 'bwg_back'); ?></a>
154
- </td>
155
- </tr>
156
- <?php
157
- $ids_string .= $row_data->id . ',';
158
- }
159
- }
160
- ?>
161
- </tbody>
162
- </table>
163
- <div class="tablenav bottom">
164
- <?php
165
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'themes_form', $per_page);
166
- ?>
167
- </div>
168
- <input id="task" name="task" type="hidden" value=""/>
169
- <input id="current_id" name="current_id" type="hidden" value=""/>
170
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
171
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
172
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
173
- </form>
174
- <?php
175
- }
176
-
177
- public function edit($id, $reset) {
178
- $row = $this->model->get_row_data($id, $reset);
179
- $page_title = (($id != 0) ? 'Edit theme ' . $row->name : 'Create new theme');
180
- $current_type = WDWLibrary::get('current_type', 'Thumbnail');
181
- $border_styles = array(
182
- 'none' => __('None', 'bwg_back'),
183
- 'solid' => __('Solid', 'bwg_back'),
184
- 'dotted' => __('Dotted', 'bwg_back'),
185
- 'dashed' => __('Dashed', 'bwg_back'),
186
- 'double' => __('Double', 'bwg_back'),
187
- 'groove' => __('Groove', 'bwg_back'),
188
- 'ridge' => __('Ridge', 'bwg_back'),
189
- 'inset' => __('Inset', 'bwg_back'),
190
- 'outset' => __('Outset', 'bwg_back'),
191
- );
192
- $font_families = array(
193
- 'arial' => 'Arial',
194
- 'lucida grande' => 'Lucida grande',
195
- 'segoe ui' => 'Segoe ui',
196
- 'tahoma' => 'Tahoma',
197
- 'trebuchet ms' => 'Trebuchet ms',
198
- 'verdana' => 'Verdana',
199
- 'cursive' =>'Cursive',
200
- 'fantasy' => 'Fantasy',
201
- 'monospace' => 'Monospace',
202
- 'serif' => 'Serif',
203
- );
204
- $google_fonts = WDWLibrary::get_google_fonts();
205
- $aligns = array(
206
- 'left' => __('Left', 'bwg_back'),
207
- 'center' => __('Center', 'bwg_back'),
208
- 'right' => __('Right', 'bwg_back'),
209
- );
210
- $font_weights = array(
211
- 'lighter' => __('Lighter', 'bwg_back'),
212
- 'normal' => __('Normal', 'bwg_back'),
213
- 'bold' => __('Bold', 'bwg_back'),
214
- );
215
- $hover_effects = array(
216
- 'none' => __('None', 'bwg_back'),
217
- 'rotate' => __('Rotate', 'bwg_back'),
218
- 'scale' => __('Scale', 'bwg_back'),
219
- 'skew' => __('Skew', 'bwg_back'),
220
- );
221
- $button_styles = array(
222
- 'fa-chevron' => __('Chevron', 'bwg_back'),
223
- 'fa-angle' => __('Angle', 'bwg_back'),
224
- 'fa-angle-double' => __('Double', 'bwg_back'),
225
- );
226
- $rate_icons = array(
227
- 'star' => __('Star', 'bwg_back'),
228
- 'bell' => __('Bell', 'bwg_back'),
229
- 'circle' => __('Circle', 'bwg_back'),
230
- 'flag' => __('Flag', 'bwg_back'),
231
- 'heart' => __('Heart', 'bwg_back'),
232
- 'square' => __('Square', 'bwg_back'),
233
- );
234
- ?>
235
- <form class="wrap bwg_form" method="post" action="admin.php?page=themes_bwg" style="float: left; width: 98%;">
236
- <?php wp_nonce_field( 'themes_bwg', 'bwg_nonce' ); ?>
237
- <div>
238
- <span class="theme_icon"></span>
239
- <h2><?php echo $page_title; ?></h2>
240
- </div>
241
- <div style="float: right; margin: 0 5px 0 0;">
242
- <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'save')" value="<?php _e("Save", 'bwg_back'); ?>"/>
243
- <?php if ($id) { ?>
244
- <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'save');
245
- spider_set_input_value('save_as_copy', 1)" value="<?php echo __('Save as Copy', 'bwg_back'); ?>" />
246
- <?php } ?>
247
- <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'apply')" value="<?php _e("Apply", 'bwg_back'); ?>"/>
248
- <input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="<?php _e("Cancel", 'bwg_back'); ?>"/>
249
- <input title="Reset to default theme" class="button-primary" type="submit" onclick="if (confirm('<?php echo addslashes(__("Do you want to reset to default?", 'bwg_back')); ?>')) {
250
- spider_set_input_value('task', 'reset');
251
- } else {
252
- return false;
253
- }" value="<?php _e("Reset", 'bwg_back'); ?>"/>
254
- </div>
255
- <div style="float: left; margin: 10px 0 0; display: none;" id="type_menu">
256
- <div id="type_Thumbnail" class="theme_type" onclick="bwg_change_theme_type('Thumbnail')"><?php _e("Thumbnails", 'bwg_back'); ?></div>
257
- <div id="type_Masonry" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version"><?php _e("Masonry", 'bwg_back'); ?></div>
258
- <div id="type_Mosaic" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version"><?php _e("Mosaic", 'bwg_back'); ?></div>
259
- <div id="type_Slideshow" class="theme_type" onclick="bwg_change_theme_type('Slideshow')"><?php _e("Slideshow", 'bwg_back'); ?></div>
260
- <div id="type_Image_browser" class="theme_type" onclick="bwg_change_theme_type('Image_browser')"><?php _e("Image Browser", 'bwg_back'); ?></div>
261
- <div id="type_Compact_album" class="theme_type" onclick="bwg_change_theme_type('Compact_album')"><?php _e("Compact Album", 'bwg_back'); ?></div>
262
- <div id="type_Masonry_album" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="<?php _e("This tab is disabled in free version", 'bwg_back'); ?>"><?php _e("Masonry Album", 'bwg_back'); ?></div>
263
- <div id="type_Extended_album" class="theme_type" onclick="bwg_change_theme_type('Extended_album')"><?php _e("Extended Album", 'bwg_back'); ?></div>
264
- <div id="type_Blog_style" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version"><?php _e("Blog Style", 'bwg_back'); ?></div>
265
- <div id="type_Lightbox" class="theme_type" onclick="bwg_change_theme_type('Lightbox')"><?php _e("Lightbox", 'bwg_back'); ?></div>
266
- <div id="type_Navigation" class="theme_type" onclick="bwg_change_theme_type('Navigation')"><?php _e("Page Navigation", 'bwg_back'); ?></div>
267
- <div id="type_Carousel" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version"><?php _e("Carousel", 'bwg_back'); ?></div>
268
- <input type="hidden" id="current_type" name="current_type" value="<?php echo $current_type; ?>" />
269
- </div>
270
- <fieldset class="spider_fieldset">
271
- <legend><?php _e("Parameters", 'bwg_back'); ?></legend>
272
- <table style="clear:both;">
273
- <tbody>
274
- <tr>
275
- <td class="spider_label"><label for="name"><?php _e("Name:", 'bwg_back'); ?> <span style="color:#FF0000;"> * </span> </label></td>
276
- <td><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" class="spider_text_input bwg_requried"/></td>
277
- </tr>
278
- </tbody>
279
- </table>
280
-
281
- <fieldset class="spider_type_fieldset" id="Thumbnail">
282
- <fieldset class="spider_child_fieldset" id="Thumbnail_1">
283
- <table style="clear:both;">
284
- <tbody>
285
- <tr>
286
- <td class="spider_label"><label for="thumb_margin"><?php _e("Margin:", 'bwg_back'); ?> </label></td>
287
- <td>
288
- <input type="text" name="thumb_margin" id="thumb_margin" value="<?php echo $row->thumb_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
289
- </td>
290
- </tr>
291
- <tr>
292
- <td class="spider_label"><label for="thumb_padding"><?php _e("Padding:", 'bwg_back'); ?> </label></td>
293
- <td>
294
- <input type="text" name="thumb_padding" id="thumb_padding" value="<?php echo $row->thumb_padding; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
295
- </td>
296
- </tr>
297
- <tr>
298
- <td class="spider_label"><label for="thumb_border_width"><?php _e("Border width:", 'bwg_back'); ?> </label></td>
299
- <td>
300
- <input type="text" name="thumb_border_width" id="thumb_border_width" value="<?php echo $row->thumb_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
301
- </td>
302
- </tr>
303
- <tr>
304
- <td class="spider_label"><label for="thumb_border_style"><?php _e("Border style:", 'bwg_back'); ?> </label></td>
305
- <td>
306
- <select name="thumb_border_style" id="thumb_border_style">
307
- <?php
308
- foreach ($border_styles as $key => $border_style) {
309
- ?>
310
- <option value="<?php echo $key; ?>" <?php echo (($row->thumb_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($border_style,"bwg_back"); ?></option>
311
- <?php
312
- }
313
- ?>
314
- </select>
315
- </td>
316
- </tr>
317
- <tr>
318
- <td class="spider_label"><label for="thumb_border_color"><?php _e("Border color:", 'bwg_back'); ?></label></td>
319
- <td>
320
- <input type="text" name="thumb_border_color" id="thumb_border_color" value="<?php echo $row->thumb_border_color; ?>" class="color"/>
321
- </td>
322
- </tr>
323
- <tr>
324
- <td class="spider_label"><label for="thumb_border_radius"><?php _e("Border radius:", 'bwg_back'); ?> </label></td>
325
- <td>
326
- <input type="text" name="thumb_border_radius" id="thumb_border_radius" value="<?php echo $row->thumb_border_radius; ?>" class="spider_char_input" />
327
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
328
- </td>
329
- </tr>
330
- <tr>
331
- <td class="spider_label"><label for="thumb_box_shadow"><?php _e("Shadow:", 'bwg_back'); ?> </label></td>
332
- <td>
333
- <input type="text" name="thumb_box_shadow" id="thumb_box_shadow" value="<?php echo $row->thumb_box_shadow; ?>" class="spider_box_input" />
334
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
335
- </td>
336
- </tr>
337
- <tr>
338
- <td class="spider_label"><label for="thumb_hover_effect"><?php _e("Hover effect:", 'bwg_back'); ?> </label></td>
339
- <td>
340
- <select name="thumb_hover_effect" id="thumb_hover_effect" class="spider_int_input">
341
- <?php
342
- foreach ($hover_effects as $key => $hover_effect) {
343
- ?>
344
- <option value="<?php echo $key; ?>" <?php echo (($row->thumb_hover_effect == $key) ? 'selected="selected"' : ''); ?>><?php echo __($hover_effect,"bwg_back"); ?></option>
345
- <?php
346
- }
347
- ?>
348
- </select>
349
- </td>
350
- </tr>
351
- <tr>
352
- <td class="spider_label"><label for="thumb_hover_effect_value"><?php _e("Hover effect value:", 'bwg_back'); ?> </label></td>
353
- <td>
354
- <input type="text" name="thumb_hover_effect_value" id="thumb_hover_effect_value" value="<?php echo $row->thumb_hover_effect_value; ?>" class="spider_char_input"/>
355
- <div class="spider_description"><?php _e("E.g. Rotate:", 'bwg_back'); ?> 10deg, <?php _e("Scale:", 'bwg_back'); ?> 1.5, <?php _e("Skew:", 'bwg_back'); ?> 10deg.</div>
356
- </td>
357
- </tr>
358
- <tr>
359
- <td class="spider_label"><label><?php _e("Transition:", 'bwg_back'); ?> </label></td>
360
- <td id="thumb_transition">
361
- <input type="radio" name="thumb_transition" id="thumb_transition1" value="1"<?php if ($row->thumb_transition == 1) echo 'checked="checked"'; ?> />
362
- <label for="thumb_transition1" id="thumb_transition1_lbl"><?php _e("Yes", 'bwg_back'); ?></label>
363
- <input type="radio" name="thumb_transition" id="thumb_transition0" value="0"<?php if ($row->thumb_transition == 0) echo 'checked="checked"'; ?> />
364
- <label for="thumb_transition0" id="thumb_transition0_lbl"><?php _e("No", 'bwg_back'); ?></label>
365
- </td>
366
- </tr>
367
- </tbody>
368
- </table>
369
- </fieldset>
370
- <fieldset class="spider_child_fieldset" id="Thumbnail_2">
371
- <table style="clear:both;">
372
- <tbody>
373
- <tr>
374
- <td class="spider_label">
375
- <label for="thumb_bg_color"><?php _e("Thumbnail background color:", 'bwg_back'); ?> </label>
376
- </td>
377
- <td>
378
- <input type="text" name="thumb_bg_color" id="thumb_bg_color" value="<?php echo $row->thumb_bg_color; ?>" class="color"/>
379
- </td>
380
- </tr>
381
- <tr>
382
- <td class="spider_label"><label for="thumb_transparent"><?php _e("Thumbnail transparency:", 'bwg_back'); ?> </label></td>
383
- <td>
384
- <input type="text" name="thumb_transparent" id="thumb_transparent" value="<?php echo $row->thumb_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
385
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
386
- </td>
387
- </tr>
388
- <tr>
389
- <td class="spider_label"><label for="thumbs_bg_color"><?php _e("Full background color:", 'bwg_back'); ?> </label></td>
390
- <td>
391
- <input type="text" name="thumbs_bg_color" id="thumbs_bg_color" value="<?php echo $row->thumbs_bg_color; ?>" class="color"/>
392
- </td>
393
- </tr>
394
- <tr>
395
- <td class="spider_label"><label for="thumb_bg_transparent"><?php _e("Full background transparency:", 'bwg_back'); ?> </label></td>
396
- <td>
397
- <input type="text" name="thumb_bg_transparent" id="thumb_bg_transparent" value="<?php echo $row->thumb_bg_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
398
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
399
- </td>
400
- </tr>
401
- <tr>
402
- <td class="spider_label"><label for="thumb_align"><?php _e("Alignment:", 'bwg_back'); ?> </label></td>
403
- <td>
404
- <select name="thumb_align" id="thumb_align">
405
- <?php
406
- foreach ($aligns as $key => $align) {
407
- ?>
408
- <option value="<?php echo $key; ?>" <?php echo (($row->thumb_align == $key) ? 'selected="selected"' : ''); ?>><?php echo __($align,"bwg_back"); ?></option>
409
- <?php
410
- }
411
- ?>
412
- </select>
413
- </td>
414
- </tr>
415
- </tbody>
416
- </table>
417
- </fieldset>
418
- <fieldset class="spider_child_fieldset" id="Thumbnail_3">
419
- <table style="clear:both;">
420
- <tbody>
421
- <tr>
422
- <td class="spider_label"><label><?php _e("Title position:", 'bwg_back'); ?> </label></td>
423
- <td>
424
- <input type="radio" name="thumb_title_pos" id="thumb_title_pos1" value="top" <?php if ($row->thumb_title_pos == "top") echo 'checked="checked"'; ?> />
425
- <label for="thumb_title_pos1" id="thumb_title_pos1_lbl"><?php _e("Top", 'bwg_back'); ?></label>
426
- <input type="radio" name="thumb_title_pos" id="thumb_title_pos0" value="bottom" <?php if ($row->thumb_title_pos == "bottom") echo 'checked="checked"'; ?> />
427
- <label for="thumb_title_pos0" id="thumb_title_pos0_lbl"><?php _e("Bottom", 'bwg_back'); ?></label>
428
- </td>
429
- </tr>
430
- <tr>
431
- <td class="spider_label"><label for="thumb_title_font_size"><?php _e("Title font size:", 'bwg_back'); ?> </label></td>
432
- <td>
433
- <input type="text" name="thumb_title_font_size" id="thumb_title_font_size" value="<?php echo $row->thumb_title_font_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
434
- </td>
435
- </tr>
436
- <tr>
437
- <td class="spider_label"><label for="thumb_title_font_color"><?php _e("Title font color:", 'bwg_back'); ?> </label></td>
438
- <td>
439
- <input type="text" name="thumb_title_font_color" id="thumb_title_font_color" value="<?php echo $row->thumb_title_font_color; ?>" class="color" />
440
- </td>
441
- </tr>
442
- <tr>
443
- <td class="spider_label"><label for="thumb_title_font_style"><?php _e("Title font family:", 'bwg_back'); ?> </label></td>
444
- <td>
445
- <select name="thumb_title_font_style" id="thumb_title_font_style" class="select_icon_them">
446
- <?php
447
- $is_google_fonts = (in_array(str_replace('+', ' ', $row->thumb_title_font_style), $google_fonts) ) ? true : false;
448
- $thumb_font_families = ($is_google_fonts == true) ? $google_fonts : $font_families;
449
- foreach ($thumb_font_families as $key => $font_family) {
450
- ?>
451
- <option value="<?php echo $key; ?>" <?php echo (($row->thumb_title_font_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
452
- <?php
453
- }
454
- ?>
455
- </select>
456
- <input type="radio" name="thumb_title_google_fonts" id="thumb_title_google_fonts1" onchange="bwg_change_fonts('thumb_title_font_style', jQuery(this).attr('id'))" value="1" <?php if ($is_google_fonts == true) echo 'checked="checked"'; ?> />
457
- <label for="thumb_title_google_fonts1" id="thumb_title_google_fonts1_lbl"><?php echo __('Google fonts', 'bwg_back'); ?></label>
458
- <input type="radio" name="thumb_title_google_fonts" id="thumb_title_google_fonts0" onchange="bwg_change_fonts('thumb_title_font_style', '')" value="0" <?php if ($is_google_fonts == false) echo 'checked="checked"'; ?> />
459
- <label for="thumb_title_google_fonts0" id="thumb_title_google_fonts0_lbl"><?php echo __('Default', 'bwg_back'); ?></label>
460
- </td>
461
- </tr>
462
- <tr>
463
- <td class="spider_label"><label for="thumb_title_font_weight"><?php _e("Title font weight:", 'bwg_back'); ?> </label></td>
464
- <td>
465
- <select name="thumb_title_font_weight" id="thumb_title_font_weight">
466
- <?php
467
- foreach ($font_weights as $key => $font_weight) {
468
- ?>
469
- <option value="<?php echo $key; ?>" <?php echo (($row->thumb_title_font_weight == $key) ? 'selected="selected"' : ''); ?>><?php echo __($font_weight,"bwg_back"); ?></option>
470
- <?php
471
- }
472
- ?>
473
- </select>
474
- </td>
475
- </tr>
476
- <tr>
477
- <td class="spider_label"><label for="thumb_title_shadow"><?php _e("Title box shadow:", 'bwg_back'); ?> </label></td>
478
- <td>
479
- <input type="text" name="thumb_title_shadow" id="thumb_title_shadow" value="<?php echo $row->thumb_title_shadow; ?>" class="spider_box_input" />
480
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
481
- </td>
482
- </tr>
483
- <tr>
484
- <td class="spider_label"><label for="thumb_title_margin"><?php _e("Title margin:", 'bwg_back'); ?> </label></td>
485
- <td>
486
- <input type="text" name="thumb_title_margin" id="thumb_title_margin" value="<?php echo $row->thumb_title_margin; ?>" class="spider_char_input" />
487
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
488
- </td>
489
- </tr>
490
- </tbody>
491
- </table>
492
- </fieldset>
493
- </fieldset>
494
-
495
- <fieldset class="spider_type_fieldset" id="Masonry">
496
- <fieldset class="spider_child_fieldset" id="Masonry_1">
497
- <table style="clear:both;">
498
- <tbody>
499
- <tr>
500
- <td class="spider_label"><label for="masonry_thumb_padding"><?php _e("Padding:", 'bwg_back'); ?> </label></td>
501
- <td>
502
- <input type="text" name="masonry_thumb_padding" id="masonry_thumb_padding" value="<?php echo $row->masonry_thumb_padding; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
503
- </td>
504
- </tr>
505
- <tr>
506
- <td class="spider_label"><label for="masonry_thumb_border_width"><?php _e("Border width:", 'bwg_back'); ?> </label></td>
507
- <td>
508
- <input type="text" name="masonry_thumb_border_width" id="masonry_thumb_border_width" value="<?php echo $row->masonry_thumb_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
509
- </td>
510
- </tr>
511
- <tr>
512
- <td class="spider_label"><label for="masonry_thumb_border_style"><?php _e("Border style:", 'bwg_back'); ?> </label></td>
513
- <td>
514
- <select name="masonry_thumb_border_style" id="masonry_thumb_border_style">
515
- <?php
516
- foreach ($border_styles as $key => $border_style) {
517
- ?>
518
- <option value="<?php echo $key; ?>" <?php echo (($row->masonry_thumb_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($border_style,"bwg_back"); ?></option>
519
- <?php
520
- }
521
- ?>
522
- </select>
523
- </td>
524
- </tr>
525
- <tr>
526
- <td class="spider_label"><label for="masonry_thumb_border_color"><?php _e("Border color:", 'bwg_back'); ?> </label></td>
527
- <td>
528
- <input type="text" name="masonry_thumb_border_color" id="masonry_thumb_border_color" value="<?php echo $row->masonry_thumb_border_color; ?>" class="color" />
529
- </td>
530
- </tr>
531
- <tr>
532
- <td class="spider_label"><label for="masonry_thumb_border_radius"><?php _e("Border radius:", 'bwg_back'); ?> </label></td>
533
- <td>
534
- <input type="text" name="masonry_thumb_border_radius" id="masonry_thumb_border_radius" value="<?php echo $row->masonry_thumb_border_radius; ?>" class="spider_char_input" />
535
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
536
- </td>
537
- </tr>
538
- </tbody>
539
- </table>
540
- </fieldset>
541
- <fieldset class="spider_child_fieldset" id="Masonry_2">
542
- <table style="clear:both;">
543
- <tbody>
544
- <tr>
545
- <td class="spider_label"><label for="masonry_thumb_transparent"><?php _e("Transparency:", 'bwg_back'); ?> </label></td>
546
- <td>
547
- <input type="text" name="masonry_thumb_transparent" id="masonry_thumb_transparent" value="<?php echo $row->masonry_thumb_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
548
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
549
- </td>
550
- </tr>
551
- <tr>
552
- <td class="spider_label"><label for="masonry_thumbs_bg_color"><?php _e("Background color:", 'bwg_back'); ?> </label></td>
553
- <td>
554
- <input type="text" name="masonry_thumbs_bg_color" id="masonry_thumbs_bg_color" value="<?php echo $row->masonry_thumbs_bg_color; ?>" class="color" />
555
- </td>
556
- </tr>
557
- <tr>
558
- <td class="spider_label"><label for="masonry_thumb_bg_transparent"><?php _e("Background transparency:", 'bwg_back'); ?> </label></td>
559
- <td>
560
- <input type="text" name="masonry_thumb_bg_transparent" id="masonry_thumb_bg_transparent" value="<?php echo $row->masonry_thumb_bg_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
561
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
562
- </td>
563
- </tr>
564
- <tr>
565
- <td class="spider_label"><label for="masonry_thumb_align0"><?php _e("Alignment:", 'bwg_back'); ?> </label></td>
566
- <td>
567
- <select name="masonry_thumb_align" id="masonry_thumb_align">
568
- <?php
569
- foreach ($aligns as $key => $align) {
570
- ?>
571
- <option value="<?php echo $key; ?>" <?php echo (($row->masonry_thumb_align == $key) ? 'selected="selected"' : ''); ?>><?php echo __($align,"bwg_back"); ?></option>
572
- <?php
573
- }
574
- ?>
575
- </select>
576
- </td>
577
- </tr>
578
- </tbody>
579
- </table>
580
- </fieldset>
581
- <fieldset class="spider_child_fieldset" id="Masonry_3">
582
- <table style="clear:both;">
583
- <tbody>
584
- <tr>
585
- <td class="spider_label"><label for="masonry_thumb_hover_effect"><?php _e("Hover effect:", 'bwg_back'); ?> </label></td>
586
- <td>
587
- <select name="masonry_thumb_hover_effect" id="masonry_thumb_hover_effect" class="spider_int_input">
588
- <?php
589
- foreach ($hover_effects as $key => $hover_effect) {
590
- ?>
591
- <option value="<?php echo $key; ?>" <?php echo (($row->masonry_thumb_hover_effect == $key) ? 'selected="selected"' : ''); ?>><?php echo __($hover_effect,"bwg_back"); ?></option>
592
- <?php
593
- }
594
- ?>
595
- </select>
596
- </td>
597
- </tr>
598
- <tr>
599
- <td class="spider_label"><label for="masonry_thumb_hover_effect_value"><?php _e("Hover effect value:", 'bwg_back'); ?> </label></td>
600
- <td>
601
- <input type="text" name="masonry_thumb_hover_effect_value" id="masonry_thumb_hover_effect_value" value="<?php echo $row->masonry_thumb_hover_effect_value; ?>" class="spider_char_input" />
602
- <div class="spider_description">E.g. <?php _e("Rotate:", 'bwg_back'); ?> 10deg, <?php _e("Scale:", 'bwg_back'); ?> 1.5, <?php _e("Skew:", 'bwg_back'); ?> 10deg.</div>
603
- </td>
604
- </tr>
605
- <tr>
606
- <td class="spider_label"><label><?php _e("Transition:", 'bwg_back'); ?> </label></td>
607
- <td id="masonry_thumb_transition">
608
- <input type="radio" name="masonry_thumb_transition" id="masonry_thumb_transition1" value="1"<?php if ($row->masonry_thumb_transition == 1) echo 'checked="checked"'; ?> />
609
- <label for="masonry_thumb_transition1" id="masonry_thumb_transition1_lbl"><?php _e("Yes", 'bwg_back'); ?></label>
610
- <input type="radio" name="masonry_thumb_transition" id="masonry_thumb_transition0" value="0"<?php if ($row->masonry_thumb_transition == 0) echo 'checked="checked"'; ?> />
611
- <label for="masonry_thumb_transition0" id="masonry_thumb_transition0_lbl"><?php _e("No", 'bwg_back'); ?></label>
612
- </td>
613
- </tr>
614
- <tr>
615
- <td class="spider_label"><label for="masonry_description_font_size"><?php _e("Description font size:", 'bwg_back'); ?> </label></td>
616
- <td>
617
- <input type="text" name="masonry_description_font_size" id="masonry_description_font_size" value="<?php echo $row->masonry_description_font_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
618
- </td>
619
- </tr>
620
- <tr>
621
- <td class="spider_label"><label for="masonry_description_color"><?php _e("Description font color:", 'bwg_back'); ?> </label></td>
622
- <td>
623
- <input type="text" name="masonry_description_color" id="masonry_description_color" value="<?php echo $row->masonry_description_color; ?>" class="color" />
624
- </td>
625
- </tr>
626
- <tr>
627
- <td class="spider_label"><label for="masonry_description_font_style"><?php _e("Description font family:", 'bwg_back'); ?> </label></td>
628
- <td>
629
- <select name="masonry_description_font_style" id="masonry_description_font_style" class="select_icon_them">
630
- <?php
631
- $is_google_fonts = (in_array(str_replace('+', ' ', $row->masonry_description_font_style), $google_fonts) ) ? true : false;
632
- $masonry_font_families = ($is_google_fonts == true) ? $google_fonts : $font_families;
633
- foreach ($masonry_font_families as $key => $font_family) {
634
- ?>
635
- <option value="<?php echo $key; ?>" <?php echo (($row->masonry_description_font_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
636
- <?php
637
- }
638
- ?>
639
- <input type="radio" name="masonry_description_google_fonts" id="masonry_description_google_fonts1" onchange="bwg_change_fonts('masonry_description_font_style', jQuery(this).attr('id'))" value="1" <?php if ($is_google_fonts == true) echo 'checked="checked"'; ?> />
640
- <label for="masonry_description_google_fonts1" id="masonry_description_google_fonts1_lbl"><?php echo __('Google fonts', 'bwg_back'); ?></label>
641
- <input type="radio" name="masonry_description_google_fonts" id="masonry_description_google_fonts0" onchange="bwg_change_fonts('masonry_description_font_style', '')" value="0" <?php if ($is_google_fonts == false) echo 'checked="checked"'; ?> />
642
- <label for="masonry_description_google_fonts0" id="masonry_description_google_fonts0_lbl"><?php echo __('Default', 'bwg_back'); ?></label>
643
- </select>
644
- </td>
645
- </tr>
646
- </tbody>
647
- </table>
648
- </fieldset>
649
- </fieldset>
650
-
651
- <fieldset class="spider_type_fieldset" id="Slideshow">
652
- <fieldset class="spider_child_fieldset" id="Slideshow_1">
653
- <table style="clear:both;">
654
- <tbody>
655
- <tr>
656
- <td class="spider_label"><label for="slideshow_cont_bg_color"><?php _e("Background color:", 'bwg_back'); ?> </label></td>
657
- <td>
658
- <input type="text" name="slideshow_cont_bg_color" id="slideshow_cont_bg_color" value="<?php echo $row->slideshow_cont_bg_color; ?>" class="color"/>
659
- </td>
660
- </tr>
661
- <tr>
662
- <td class="spider_label"><label for="slideshow_rl_btn_size"><?php _e("Right, left buttons size:", 'bwg_back'); ?> </label></td>
663
- <td>
664
- <input type="text" name="slideshow_rl_btn_size" id="slideshow_rl_btn_size" value="<?php echo $row->slideshow_rl_btn_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
665
- </td>
666
- </tr>
667
- <tr>
668
- <td class="spider_label"><label for="slideshow_play_pause_btn_size"><?php _e("Play, pause buttons size:", 'bwg_back'); ?> </label></td>
669
- <td>
670
- <input type="text" name="slideshow_play_pause_btn_size" id="slideshow_play_pause_btn_size" value="<?php echo $row->slideshow_play_pause_btn_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
671
- </td>
672
- </tr>
673
- <tr>
674
- <td class="spider_label"><label for="slideshow_rl_btn_color"><?php _e("Buttons color:", 'bwg_back'); ?> </label></td>
675
- <td>
676
- <input type="text" name="slideshow_rl_btn_color" id="slideshow_rl_btn_color" value="<?php echo $row->slideshow_rl_btn_color; ?>" class="color"/>
677
- </td>
678
- </tr>
679
- <tr>
680
- <td class="spider_label"><label for="slideshow_close_btn_transparent"><?php _e("Buttons transparency:", 'bwg_back'); ?> </label></td>
681
- <td>
682
- <input type="text" name="slideshow_close_btn_transparent" id="slideshow_close_btn_transparent" value="<?php echo $row->slideshow_close_btn_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
683
- <div class="spider_description">V<?php _e("alue must be between 0 to 100.", 'bwg_back'); ?></div>
684
- </td>
685
- </tr>
686
- <tr>
687
- <td class="spider_label"><label for="slideshow_close_rl_btn_hover_color"><?php _e("Buttons hover color:", 'bwg_back'); ?> </label></td>
688
- <td>
689
- <input type="text" name="slideshow_close_rl_btn_hover_color" id="slideshow_close_rl_btn_hover_color" value="<?php echo $row->slideshow_close_rl_btn_hover_color; ?>" class="color"/>
690
- </td>
691
- </tr>
692
- <tr>
693
- <td class="spider_label"><label for="slideshow_rl_btn_width"><?php _e("Right, left buttons width:", 'bwg_back'); ?> </label></td>
694
- <td>
695
- <input type="text" name="slideshow_rl_btn_width" id="slideshow_rl_btn_width" value="<?php echo $row->slideshow_rl_btn_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
696
- </td>
697
- </tr>
698
- <tr>
699
- <td class="spider_label"><label for="slideshow_rl_btn_height"><?php _e("Right, left buttons height:", 'bwg_back'); ?> </label></td>
700
- <td>
701
- <input type="text" name="slideshow_rl_btn_height" id="slideshow_rl_btn_height" value="<?php echo $row->slideshow_rl_btn_height; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
702
- </td>
703
- </tr>
704
- <tr>
705
- <td class="spider_label"><label for="slideshow_rl_btn_bg_color"><?php _e("Right, left buttons background color:", 'bwg_back'); ?> </label></td>
706
- <td>
707
- <input type="text" name="slideshow_rl_btn_bg_color" id="slideshow_rl_btn_bg_color" value="<?php echo $row->slideshow_rl_btn_bg_color; ?>" class="color"/>
708
- </td>
709
- </tr>
710
- <tr>
711
- <td class="spider_label"><label for="slideshow_rl_btn_border_width"><?php _e("Right, left buttons border width:", 'bwg_back'); ?> </label></td>
712
- <td>
713
- <input type="text" name="slideshow_rl_btn_border_width" id="slideshow_rl_btn_border_width" value="<?php echo $row->slideshow_rl_btn_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
714
- </td>
715
- </tr>
716
- <tr>
717
- <td class="spider_label"><label for="slideshow_rl_btn_border_style"><?php _e("Right, left buttons border style: ", 'bwg_back'); ?></label></td>
718
- <td>
719
- <select name="slideshow_rl_btn_border_style" id="slideshow_rl_btn_border_style">
720
- <?php
721
- foreach ($border_styles as $key => $border_style) {
722
- ?>
723
- <option value="<?php echo $key; ?>" <?php echo (($row->slideshow_rl_btn_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($border_style,"bwg_back"); ?></option>
724
- <?php
725
- }
726
- ?>
727
- </select>
728
- </td>
729
- </tr>
730
- <tr>
731
- <td class="spider_label"><label for="slideshow_rl_btn_border_color"><?php _e("Right, left buttons border color:", 'bwg_back'); ?> </label></td>
732
- <td>
733
- <input type="text" name="slideshow_rl_btn_border_color" id="slideshow_rl_btn_border_color" value="<?php echo $row->slideshow_rl_btn_border_color; ?>" class="color"/>
734
- </td>
735
- </tr>
736
- <tr>
737
- <td class="spider_label"><label for="slideshow_rl_btn_border_radius"><?php _e("Right, left buttons border radius: ", 'bwg_back'); ?></label></td>
738
- <td>
739
- <input type="text" name="slideshow_rl_btn_border_radius" id="slideshow_rl_btn_border_radius" value="<?php echo $row->slideshow_rl_btn_border_radius; ?>" class="spider_char_input"/>
740
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
741
- </td>
742
- </tr>
743
- <tr>
744
- <td class="spider_label"><label for="slideshow_rl_btn_style"><?php _e("Right, left buttons style:", 'bwg_back'); ?> </label></td>
745
- <td>
746
- <select name="slideshow_rl_btn_style" id="slideshow_rl_btn_style">
747
- <?php
748
- foreach ($button_styles as $key => $button_style) {
749
- ?>
750
- <option value="<?php echo $key; ?>" <?php echo (($row->slideshow_rl_btn_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($button_style,"bwg_back"); ?></option>
751
- <?php
752
- }
753
- ?>
754
- </select>
755
- </td>
756
- </tr>
757
- <tr>
758
- <td class="spider_label"><label for="slideshow_rl_btn_box_shadow"><?php _e("Right, left buttons box shadow:", 'bwg_back'); ?> </label></td>
759
- <td>
760
- <input type="text" name="slideshow_rl_btn_box_shadow" id="slideshow_rl_btn_box_shadow" value="<?php echo $row->slideshow_rl_btn_box_shadow; ?>" class="spider_box_input"/>
761
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
762
- </td>
763
- </tr>
764
- </tbody>
765
- </table>
766
- </fieldset>
767
- <fieldset class="spider_child_fieldset" id="Slideshow_2">
768
- <table style="clear:both;">
769
- <tbody>
770
- <tr>
771
- <td class="spider_label"><label><?php _e("Filmstrip/Slider bullet position: ", 'bwg_back'); ?></label></td>
772
- <td>
773
- <select name="slideshow_filmstrip_pos" id="slideshow_filmstrip_pos">
774
- <option value="top" <?php echo (($row->slideshow_filmstrip_pos == "top") ? 'selected="selected"' : ''); ?>><?php _e("Top", 'bwg_back'); ?></option>
775
- <option value="right" <?php echo (($row->slideshow_filmstrip_pos == "right") ? 'selected="selected"' : ''); ?>><?php _e("Right", 'bwg_back'); ?></option>
776
- <option value="bottom" <?php echo (($row->slideshow_filmstrip_pos == "bottom") ? 'selected="selected"' : ''); ?>><?php _e("Bottom", 'bwg_back'); ?></option>
777
- <option value="left" <?php echo (($row->slideshow_filmstrip_pos == "left") ? 'selected="selected"' : ''); ?>><?php _e("Left", 'bwg_back'); ?></option>
778
- </select>
779
- </td>
780
- </tr>
781
- <tr>
782
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_margin"><?php _e("Filmstrip margin:", 'bwg_back'); ?> </label></td>
783
- <td>
784
- <input type="text" name="slideshow_filmstrip_thumb_margin" id="slideshow_filmstrip_thumb_margin" value="<?php echo $row->slideshow_filmstrip_thumb_margin; ?>" class="spider_char_input"/>
785
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
786
- </td>
787
- </tr>
788
- <tr>
789
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_border_width"><?php _e("Filmstrip border width:", 'bwg_back'); ?> </label></td>
790
- <td>
791
- <input type="text" name="slideshow_filmstrip_thumb_border_width" id="slideshow_filmstrip_thumb_border_width" value="<?php echo $row->slideshow_filmstrip_thumb_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
792
- </td>
793
- </tr>
794
- <tr>
795
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_border_style"><?php _e("Filmstrip border style: ", 'bwg_back'); ?></label>
796
- </td>
797
- <td>
798
- <select name="slideshow_filmstrip_thumb_border_style" id="slideshow_filmstrip_thumb_border_style">
799
- <?php
800
- foreach ($border_styles as $key => $border_style) {
801
- ?>
802
- <option value="<?php echo $key; ?>" <?php echo (($row->slideshow_filmstrip_thumb_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($border_style,"bwg_back"); ?></option>
803
- <?php
804
- }
805
- ?>
806
- </select>
807
- </td>
808
- </tr>
809
- <tr>
810
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_border_color"><?php _e("Filmstrip border color: ", 'bwg_back'); ?></label></td>
811
- <td>
812
- <input type="text" name="slideshow_filmstrip_thumb_border_color" id="slideshow_filmstrip_thumb_border_color" value="<?php echo $row->slideshow_filmstrip_thumb_border_color; ?>" class="color"/>
813
- </td>
814
- </tr>
815
- <tr>
816
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_border_radius"><?php _e("Filmstrip border radius: ", 'bwg_back'); ?></label></td>
817
- <td>
818
- <input type="text" name="slideshow_filmstrip_thumb_border_radius" id="slideshow_filmstrip_thumb_border_radius" value="<?php echo $row->slideshow_filmstrip_thumb_border_radius; ?>" class="spider_char_input"/>
819
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
820
- </td>
821
- </tr>
822
- <tr>
823
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_active_border_width"><?php _e("Filmstrip active border width:", 'bwg_back'); ?> </label></td>
824
- <td>
825
- <input type="text" name="slideshow_filmstrip_thumb_active_border_width" id="slideshow_filmstrip_thumb_active_border_width" value="<?php echo $row->slideshow_filmstrip_thumb_active_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/>px
826
- </td>
827
- </tr>
828
- <tr>
829
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_active_border_color"><?php _e("Filmstrip active border color:", 'bwg_back'); ?> </label></td>
830
- <td>
831
- <input type="text" name="slideshow_filmstrip_thumb_active_border_color" id="slideshow_filmstrip_thumb_active_border_color" value="<?php echo $row->slideshow_filmstrip_thumb_active_border_color; ?>" class="color"/>
832
- </td>
833
- </tr>
834
- <tr id="tr_appWidth">
835
- <td class="spider_label"><label for="slideshow_filmstrip_thumb_deactive_transparent"><?php _e("Filmstrip deactive transparency:", 'bwg_back'); ?> </label></td>
836
- <td>
837
- <input type="text" name="slideshow_filmstrip_thumb_deactive_transparent" id="slideshow_filmstrip_thumb_deactive_transparent" value="<?php echo $row->slideshow_filmstrip_thumb_deactive_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
838
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
839
- </td>
840
- </tr>
841
- <tr>
842
- <td class="spider_label"><label for="slideshow_filmstrip_rl_bg_color"><?php _e("Filmstrip right, left buttons background color:", 'bwg_back'); ?> </label></td>
843
- <td>
844
- <input type="text" name="slideshow_filmstrip_rl_bg_color" id="slideshow_filmstrip_rl_bg_color" value="<?php echo $row->slideshow_filmstrip_rl_bg_color; ?>" class="color"/>
845
- </td>
846
- </tr>
847
- <tr>
848
- <td class="spider_label"><label for="slideshow_filmstrip_rl_btn_color"><?php _e("Filmstrip right, left buttons color: ", 'bwg_back'); ?></label></td>
849
- <td>
850
- <input type="text" name="slideshow_filmstrip_rl_btn_color" id="slideshow_filmstrip_rl_btn_color" value="<?php echo $row->slideshow_filmstrip_rl_btn_color; ?>" class="color"/>
851
- </td>
852
- </tr>
853
- <tr>
854
- <td class="spider_label"><label for="slideshow_filmstrip_rl_btn_size"><?php _e("Filmstrip right, left buttons size: ", 'bwg_back'); ?></label></td>
855
- <td>
856
- <input type="text" name="slideshow_filmstrip_rl_btn_size" id="slideshow_filmstrip_rl_btn_size" value="<?php echo $row->slideshow_filmstrip_rl_btn_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
857
- </td>
858
- </tr>
859
- <tr>
860
- <td class="spider_label"><label for="slideshow_dots_width"><?php _e("Slider bullet width: ", 'bwg_back'); ?></label></td>
861
- <td>
862
- <input type="text" name="slideshow_dots_width" id="slideshow_dots_width" value="<?php echo $row->slideshow_dots_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
863
- </td>
864
- </tr>
865
- <tr>
866
- <td class="spider_label"><label for="slideshow_dots_height"><?php _e("Slider bullet height: ", 'bwg_back'); ?></label></td>
867
- <td>
868
- <input type="text" name="slideshow_dots_height" id="slideshow_dots_height" value="<?php echo $row->slideshow_dots_height; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
869
- </td>
870
- </tr>
871
- <tr>
872
- <td class="spider_label"><label for="slideshow_dots_border_radius"><?php _e("Slider bullet border radius:", 'bwg_back'); ?> </label></td>
873
- <td>
874
- <input type="text" name="slideshow_dots_border_radius" id="slideshow_dots_border_radius" value="<?php echo $row->slideshow_dots_border_radius; ?>" class="spider_char_input"/>
875
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
876
- </td>
877
- </tr>
878
- <tr>
879
- <td class="spider_label"><label for="slideshow_dots_background_color"><?php _e("Slider bullet background color: ", 'bwg_back'); ?></label></td>
880
- <td>
881
- <input type="text" name="slideshow_dots_background_color" id="slideshow_dots_background_color" value="<?php echo $row->slideshow_dots_background_color; ?>" class="color"/>
882
- </td>
883
- </tr>
884
- <tr>
885
- <td class="spider_label"><label for="slideshow_dots_margin"><?php _e("Slider bullet margin:", 'bwg_back'); ?> </label></td>
886
- <td>
887
- <input type="text" name="slideshow_dots_margin" id="slideshow_dots_margin" value="<?php echo $row->slideshow_dots_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
888
- </td>
889
- </tr>
890
- <tr>
891
- <td class="spider_label"><label for="slideshow_dots_active_background_color"><?php _e("Slider bullet active background color:", 'bwg_back'); ?> </label></td>
892
- <td>
893
- <input type="text" name="slideshow_dots_active_background_color" id="slideshow_dots_active_background_color" value="<?php echo $row->slideshow_dots_active_background_color; ?>" class="color"/>
894
- </td>
895
- </tr>
896
- <tr>
897
- <td class="spider_label"><label for="slideshow_dots_active_border_width"><?php _e("Slider bullet active border width: ", 'bwg_back'); ?></label></td>
898
- <td>
899
- <input type="text" name="slideshow_dots_active_border_width" id="slideshow_dots_active_border_width" value="<?php echo $row->slideshow_dots_active_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
900
- </td>
901
- </tr>
902
- <tr>
903
- <td class="spider_label"><label for="slideshow_dots_active_border_color"><?php _e("Slider bullet active border color:", 'bwg_back'); ?> </label></td>
904
- <td>
905
- <input type="text" name="slideshow_dots_active_border_color" id="slideshow_dots_active_border_color" value="<?php echo $row->slideshow_dots_active_border_color; ?>" class="color"/>
906
- </td>
907
- </tr>
908
- </tbody>
909
- </table>
910
- </fieldset>
911
- <fieldset class="spider_child_fieldset" id="Slideshow_3">
912
- <table style="clear:both;">
913
- <tbody>
914
- <tr>
915
- <td class="spider_label"><label for="slideshow_title_background_color"><?php _e("Title background color:", 'bwg_back'); ?> </label></td>
916
- <td>
917
- <input type="text" name="slideshow_title_background_color" id="slideshow_title_background_color" value="<?php echo $row->slideshow_title_background_color; ?>" class="color"/>
918
- </td>
919
- </tr>
920
- <tr>
921
- <td class="spider_label"><label for="slideshow_title_opacity"><?php _e("Title transparency: ", 'bwg_back'); ?></label></td>
922
- <td>
923
- <input type="text" name="slideshow_title_opacity" id="slideshow_title_opacity" value="<?php echo $row->slideshow_title_opacity; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
924
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
925
- </td>
926
- </tr>
927
- <tr>
928
- <td class="spider_label"><label for="slideshow_title_border_radius"><?php _e("Title border radius:", 'bwg_back'); ?> </label></td>
929
- <td>
930
- <input type="text" name="slideshow_title_border_radius" id="slideshow_title_border_radius" value="<?php echo $row->slideshow_title_border_radius; ?>" class="spider_char_input"/>
931
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
932
- </td>
933
- </tr>
934
- <tr>
935
- <td class="spider_label"><label for="slideshow_title_padding"><?php _e("Title padding:", 'bwg_back'); ?> </label></td>
936
- <td>
937
- <input type="text" name="slideshow_title_padding" id="slideshow_title_padding" value="<?php echo $row->slideshow_title_padding; ?>" class="spider_char_input"/>
938
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
939
- </td>
940
- </tr>
941
- <tr>
942
- <td class="spider_label"><label for="slideshow_title_font_size"><?php _e("Title font size:", 'bwg_back'); ?> </label></td>
943
- <td>
944
- <input type="text" name="slideshow_title_font_size" id="slideshow_title_font_size" value="<?php echo $row->slideshow_title_font_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
945
- </td>
946
- </tr>
947
- <tr>
948
- <td class="spider_label"><label for="slideshow_title_color"><?php _e("Title color:", 'bwg_back'); ?> </label></td>
949
- <td>
950
- <input type="text" name="slideshow_title_color" id="slideshow_title_color" value="<?php echo $row->slideshow_title_color; ?>" class="color"/>
951
- </td>
952
- </tr>
953
- <tr>
954
- <td class="spider_label"><label for="slideshow_title_font"><?php _e("Title font family:", 'bwg_back'); ?> </label></td>
955
- <td>
956
- <select name="slideshow_title_font" id="slideshow_title_font" class="select_icon_them">
957
- <?php
958
- $is_google_fonts = (in_array(str_replace('+', ' ', $row->slideshow_title_font), $google_fonts) ) ? true : false;
959
- $slideshow_title_font_families = ($is_google_fonts == true) ? $google_fonts : $font_families;
960
- foreach ($slideshow_title_font_families as $key => $font_family) {
961
- ?>
962
- <option value="<?php echo $key; ?>" <?php echo (($row->slideshow_title_font == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
963
- <?php
964
- }
965
- ?>
966
- </select>
967
- <input type="radio" name="slideshow_title_google_fonts" id="slideshow_title_google_fonts1" onchange="bwg_change_fonts('slideshow_title_font', jQuery(this).attr('id'))" value="1" <?php if ($is_google_fonts == true) echo 'checked="checked"'; ?> />
968
- <label for="slideshow_title_google_fonts1" id="slideshow_title_google_fonts1_lbl"><?php echo __('Google fonts', 'bwg_back'); ?></label>
969
- <input type="radio" name="slideshow_title_google_fonts" id="slideshow_title_google_fonts0" onchange="bwg_change_fonts('slideshow_title_font', '')" value="0" <?php if ($is_google_fonts == false) echo 'checked="checked"'; ?> />
970
- <label for="slideshow_title_google_fonts0" id="slideshow_title_google_fonts0_lbl"><?php echo __('Default', 'bwg_back'); ?></label>
971
- </td>
972
- </tr>
973
- <tr>
974
- <td class="spider_label"><label for="slideshow_description_background_color"><?php _e("Description background color:", 'bwg_back'); ?> </label></td>
975
- <td>
976
- <input type="text" name="slideshow_description_background_color" id="slideshow_description_background_color" value="<?php echo $row->slideshow_description_background_color; ?>" class="color"/>
977
- </td>
978
- </tr>
979
- <tr>
980
- <td class="spider_label"><label for="slideshow_description_opacity"><?php _e("Description transparency: ", 'bwg_back'); ?></label></td>
981
- <td>
982
- <input type="text" name="slideshow_description_opacity" id="slideshow_description_opacity" value="<?php echo $row->slideshow_description_opacity; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
983
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
984
- </td>
985
- </tr>
986
- <tr>
987
- <td class="spider_label"><label for="slideshow_description_border_radius"><?php _e("Description border radius: ", 'bwg_back'); ?></label></td>
988
- <td>
989
- <input type="text" name="slideshow_description_border_radius" id="slideshow_description_border_radius" value="<?php echo $row->slideshow_description_border_radius; ?>" class="spider_char_input"/>
990
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
991
- </td>
992
- </tr>
993
- <tr>
994
- <td class="spider_label"><label for="slideshow_description_padding"><?php _e("Description padding:", 'bwg_back'); ?> </label></td>
995
- <td>
996
- <input type="text" name="slideshow_description_padding" id="slideshow_description_padding" value="<?php echo $row->slideshow_description_padding; ?>" class="spider_char_input"/>
997
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
998
- </td>
999
- </tr>
1000
- <tr>
1001
- <td class="spider_label"><label for="slideshow_description_font_size"><?php _e("Description font size:", 'bwg_back'); ?> </label></td>
1002
- <td>
1003
- <input type="text" name="slideshow_description_font_size" id="slideshow_description_font_size" value="<?php echo $row->slideshow_description_font_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
1004
- </td>
1005
- </tr>
1006
- <tr>
1007
- <td class="spider_label"><label for="slideshow_description_color"><?php _e("Description color: ", 'bwg_back'); ?></label></td>
1008
- <td>
1009
- <input type="text" name="slideshow_description_color" id="slideshow_description_color" value="<?php echo $row->slideshow_description_color; ?>" class="color"/>
1010
- </td>
1011
- </tr>
1012
- <tr>
1013
- <td class="spider_label"><label for="slideshow_description_font"><?php _e("Description font family: ", 'bwg_back'); ?></label></td>
1014
- <td>
1015
- <select name="slideshow_description_font" id="slideshow_description_font" class="select_icon_them">
1016
- <?php
1017
- $is_google_fonts = (in_array(str_replace('+', ' ', $row->slideshow_description_font), $google_fonts) ) ? true : false;
1018
- $slideshow_description_font_families = ($is_google_fonts == true) ? $google_fonts : $font_families;
1019
- foreach ($slideshow_description_font_families as $key => $font_family) {
1020
- ?>
1021
- <option value="<?php echo $key; ?>" <?php echo (($row->slideshow_description_font == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
1022
- <?php
1023
- }
1024
- ?>
1025
- </select>
1026
- <input type="radio" name="slideshow_description_google_fonts" id="slideshow_description_google_fonts1" onchange="bwg_change_fonts('slideshow_description_font', jQuery(this).attr('id'))" value="1" <?php if ($is_google_fonts == true) echo 'checked="checked"'; ?> />
1027
- <label for="slideshow_description_google_fonts1" id="slideshow_description_google_fonts1_lbl"><?php echo __('Google fonts', 'bwg_back'); ?></label>
1028
- <input type="radio" name="slideshow_description_google_fonts" id="slideshow_description_google_fonts0" onchange="bwg_change_fonts('slideshow_description_font', '')" value="0" <?php if ($is_google_fonts == false) echo 'checked="checked"'; ?> />
1029
- <label for="slideshow_description_google_fonts0" id="slideshow_description_google_fonts0_lbl"><?php echo __('Default', 'bwg_back'); ?></label>
1030
- </td>
1031
- </tr>
1032
- </tbody>
1033
- </table>
1034
- </fieldset>
1035
- </fieldset>
1036
-
1037
- <fieldset class="spider_type_fieldset" id="Image_browser">
1038
- <fieldset class="spider_child_fieldset" id="Image_browser_1">
1039
- <table style="clear:both;">
1040
- <tbody>
1041
- <tr>
1042
- <td class="spider_label"><label for="image_browser_full_padding"><?php _e("Full padding:", 'bwg_back'); ?> </label></td>
1043
- <td>
1044
- <input type="text" name="image_browser_full_padding" id="image_browser_full_padding" value="<?php echo $row->image_browser_full_padding; ?>" class="spider_char_input"/>
1045
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
1046
- </td>
1047
- </tr>
1048
- <tr>
1049
- <td class="spider_label"><label for="image_browser_full_bg_color"><?php _e("Full background color:", 'bwg_back'); ?> </label></td>
1050
- <td>
1051
- <input type="text" name="image_browser_full_bg_color" id="image_browser_full_bg_color" value="<?php echo $row->image_browser_full_bg_color; ?>" class="color" />
1052
- </td>
1053
- </tr>
1054
- <tr>
1055
- <td class="spider_label"><label for="image_browser_full_transparent"><?php _e("Full background transparency:", 'bwg_back'); ?> </label></td>
1056
- <td>
1057
- <input type="text" name="image_browser_full_transparent" id="image_browser_full_transparent" value="<?php echo $row->image_browser_full_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
1058
- <div class="spider_description"><?php _e("Value must be between 0 to 100.", 'bwg_back'); ?></div>
1059
- </td>
1060
- </tr>
1061
- <tr>
1062
- <td class="spider_label"><label for="image_browser_full_border_radius"><?php _e("Full border radius:", 'bwg_back'); ?> </label></td>
1063
- <td>
1064
- <input type="text" name="image_browser_full_border_radius" id="image_browser_full_border_radius" value="<?php echo $row->image_browser_full_border_radius; ?>" class="spider_char_input" />
1065
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
1066
- </td>
1067
- </tr>
1068
- <tr>
1069
- <td class="spider_label"><label for="image_browser_full_border_width"><?php _e("Full border width:", 'bwg_back'); ?> </label></td>
1070
- <td>
1071
- <input type="text" name="image_browser_full_border_width" id="image_browser_full_border_width" value="<?php echo $row->image_browser_full_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
1072
- </td>
1073
- </tr>
1074
- <tr>
1075
- <td class="spider_label"><label for="image_browser_full_border_style"><?php _e("Full border style:", 'bwg_back'); ?> </label></td>
1076
- <td>
1077
- <select name="image_browser_full_border_style" id="image_browser_full_border_style">
1078
- <?php
1079
- foreach ($border_styles as $key => $border_style) {
1080
- ?>
1081
- <option value="<?php echo $key; ?>" <?php echo (($row->image_browser_full_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($border_style,"bwg_back"); ?></option>
1082
- <?php
1083
- }
1084
- ?>
1085
- </select>
1086
- </td>
1087
- </tr>
1088
- <tr>
1089
- <td class="spider_label"><label for="image_browser_full_border_color"><?php _e("Full border color:", 'bwg_back'); ?> </label></td>
1090
- <td>
1091
- <input type="text" name="image_browser_full_border_color" id="image_browser_full_border_color" value="<?php echo $row->image_browser_full_border_color; ?>" class="color" />
1092
- </td>
1093
- </tr>
1094
- </tbody>
1095
- </table>
1096
- </fieldset>
1097
- <fieldset class="spider_child_fieldset" id="Image_browser_2">
1098
- <table style="clear:both;">
1099
- <tbody>
1100
- <tr>
1101
- <td class="spider_label"><label for="image_browser_align0"><?php _e("Alignment:", 'bwg_back'); ?> </label></td>
1102
- <td>
1103
- <select name="image_browser_align" id="image_browser_align">
1104
- <?php
1105
- foreach ($aligns as $key => $align) {
1106
- ?>
1107
- <option value="<?php echo $key; ?>" <?php echo (($row->image_browser_align == $key) ? 'selected="selected"' : ''); ?>><?php echo __($align,"bwg_back"); ?></option>
1108
- <?php
1109
- }
1110
- ?>
1111
- </select>
1112
- </td>
1113
- </tr>
1114
- <tr>
1115
- <td class="spider_label"><label for="image_browser_margin"><?php _e("Margin:", 'bwg_back'); ?> </label></td>
1116
- <td>
1117
- <input type="text" name="image_browser_margin" id="image_browser_margin" value="<?php echo $row->image_browser_margin; ?>" class="spider_char_input" />
1118
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
1119
- </td>
1120
- </tr>
1121
- <tr>
1122
- <td class="spider_label"><label for="image_browser_padding"><?php _e("Padding:", 'bwg_back'); ?> </label></td>
1123
- <td>
1124
- <input type="text" name="image_browser_padding" id="image_browser_padding" value="<?php echo $row->image_browser_padding; ?>" class="spider_char_input" />
1125
- <div class="spider_description"><?php _e("Use CSS type values.", 'bwg_back'); ?></div>
1126
- </td>
1127
- </tr>
1128
- <tr>
1129
- <td class="spider_label"><label for="image_browser_border_width"><?php _e("Border width:", 'bwg_back'); ?> </label></td>
1130
- <td>
1131
- <input type="text" name="image_browser_border_width" id="image_browser_border_width" value="<?php echo $row->image_browser_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
1132
- </td>
1133
- </tr>
1134
- <tr>
1135
- <td class="spider_label"><label for="image_browser_border_style"><?php _e("Border style:", 'bwg_back'); ?> </label></td>
1136
- <td>
1137
- <select name="image_browser_border_style" id="image_browser_border_style">
1138
- <?php
1139
- foreach ($border_styles as $key => $border_style) {
1140
- ?>
1141
- <option value="<?php echo $key; ?>" <?php echo (($row->image_browser_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo __($border_style,"bwg_back"); ?></option>
1142
- <?php
1143
- }
1144
- ?>
1145
- </select>
1146
- </td>
1147
- </tr>
1148
- <tr>
1149
- <td class="spider_label"><label for="image_browser_border_color"><?php _e("Border color:", 'bwg_back'); ?> </label></td>
1150
- <td>
1151
- <input type="text" name="image_browser_border_color" id="image_browser_border_color" value="<?php echo $row->image_browser_border_color; ?>" class="color" />
1152
- </td>
1153
- </tr>
1154
- <tr>
1155
- <td class="spider_label"><label for="image_browser_border_radius"><?php _e("Border