Photo Gallery by WD – Responsive Photo Gallery - Version 1.5.12

Version Description

  • Added: Number of columns option for Extended Gallery Group view.
  • Added: Title/description vertical alignment option for Extended Gallery Group view.
  • Added: Backend notification if php-xml library is not installed.
  • Changed: Extended Gallery Group view theme default values.
  • Changed: Bulk-editing image info.
  • Improved: Extended Gallery Group view responsiveness.
  • Improved: Decreased load time in Image uploader and working with a large number of images.
  • Fixed: Bug on inserting media from Youtube.
  • Fixed: Crop popup dimensions for a newly added image.
  • Fixed: Image uploader popup dimensions in Bridge theme.
  • Fixed: Gutenberg block edit functionality.
  • Fixed: JS before doctype on Gutenberg edit page.
  • Added: Free plugin flow: When installing Manager, store plugin name or slug in a WP option.
Download this release

Release Info

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

Code changes from version 1.5.11 to 1.5.12

admin/controllers/Albums.php CHANGED
@@ -200,8 +200,8 @@ class AlbumsController_bwg {
200
 
201
  $params['add_preview_image_action'] = add_query_arg(array(
202
  'action' => 'addImages',
203
- 'width' => '800',
204
- 'height' => '550',
205
  'extensions' => 'jpg,jpeg,png,gif',
206
  'callback' => 'bwg_add_preview_image',
207
  BWG()->nonce => wp_create_nonce('addImages'),
200
 
201
  $params['add_preview_image_action'] = add_query_arg(array(
202
  'action' => 'addImages',
203
+ 'bwg_width' => '800',
204
+ 'bwg_height' => '550',
205
  'extensions' => 'jpg,jpeg,png,gif',
206
  'callback' => 'bwg_add_preview_image',
207
  BWG()->nonce => wp_create_nonce('addImages'),
admin/controllers/Galleries.php CHANGED
@@ -285,8 +285,8 @@ class GalleriesController_bwg {
285
  ), admin_url('admin.php'));
286
  $params['add_preview_image_action'] = add_query_arg(array(
287
  'action' => 'addImages',
288
- 'width' => '800',
289
- 'height' => '550',
290
  'extensions' => 'jpg,jpeg,png,gif',
291
  'callback' => 'bwg_add_preview_image',
292
  BWG()->nonce => wp_create_nonce('addImages'),
@@ -294,8 +294,8 @@ class GalleriesController_bwg {
294
  ), admin_url('admin-ajax.php'));
295
  $params['add_images_action'] = add_query_arg(array(
296
  'action' => 'addImages',
297
- 'width' => '1150',
298
- 'height' => '800',
299
  'extensions' => 'jpg,jpeg,png,gif',
300
  'callback' => 'bwg_add_image',
301
  BWG()->nonce => wp_create_nonce('addImages'),
@@ -303,8 +303,8 @@ class GalleriesController_bwg {
303
  ), admin_url('admin-ajax.php'));
304
  $params['add_tags_action'] = add_query_arg(array(
305
  'action' => 'addTags_' . BWG()->prefix,
306
- 'width' => '785',
307
- 'height' => '550',
308
  BWG()->nonce => wp_create_nonce('addTags_' . BWG()->prefix),
309
  ), admin_url('admin-ajax.php'));
310
  $params['preview_action'] = WDWLibrary::get_custom_post_permalink(array(
285
  ), admin_url('admin.php'));
286
  $params['add_preview_image_action'] = add_query_arg(array(
287
  'action' => 'addImages',
288
+ 'bwg_width' => '800',
289
+ 'bwg_height' => '550',
290
  'extensions' => 'jpg,jpeg,png,gif',
291
  'callback' => 'bwg_add_preview_image',
292
  BWG()->nonce => wp_create_nonce('addImages'),
294
  ), admin_url('admin-ajax.php'));
295
  $params['add_images_action'] = add_query_arg(array(
296
  'action' => 'addImages',
297
+ 'bwg_width' => '1150',
298
+ 'bwg_height' => '800',
299
  'extensions' => 'jpg,jpeg,png,gif',
300
  'callback' => 'bwg_add_image',
301
  BWG()->nonce => wp_create_nonce('addImages'),
303
  ), admin_url('admin-ajax.php'));
304
  $params['add_tags_action'] = add_query_arg(array(
305
  'action' => 'addTags_' . BWG()->prefix,
306
+ 'bwg_width' => '785',
307
+ 'bwg_height' => '550',
308
  BWG()->nonce => wp_create_nonce('addTags_' . BWG()->prefix),
309
  ), admin_url('admin-ajax.php'));
310
  $params['preview_action'] = WDWLibrary::get_custom_post_permalink(array(
admin/controllers/Options.php CHANGED
@@ -182,9 +182,7 @@ class OptionsController_bwg {
182
  $row->$name = esc_html(stripslashes($_POST[$name]));
183
  }
184
  }
185
-
186
  $save = update_option('wd_bwg_options', json_encode($row), 'no');
187
-
188
  if (isset($_POST['recreate']) && $_POST['recreate'] == "resize_image_thumb") {
189
  $this->resize_image_thumb();
190
  echo WDWLibrary::message_id(0, __('All thumbnails are successfully recreated.', BWG()->prefix));
@@ -237,18 +235,24 @@ class OptionsController_bwg {
237
  $this->model->update_options_by_key( $update_options );
238
  }
239
 
240
- $error = false;
241
- list($width_watermark, $height_watermark, $type_watermark) = getimagesize( $update_options['built_in_watermark_url'] );
242
- if ( $update_options['built_in_watermark_type'] == 'image' && ( empty($width_watermark) OR empty($height_watermark) OR empty($type_watermark)) ) {
243
- $error = true;
244
- $message = WDWLibrary::message_id(0, __('Watermark could not be set. The image URL is incorrect.', $this->prefix), 'error');
245
- }
246
- if ( $error === false ) {
247
- WDWLibrary::bwg_image_set_watermark( 0, 0, $limitstart );
248
- $message = WDWLibrary::message_id(0, __('All images are successfully watermarked.', $this->prefix), 'updated');
249
- }
250
- $json_data = array('error' => $error, 'message' => $message);
251
- echo json_encode($json_data); die();
 
 
 
 
 
 
252
  }
253
 
254
  public function image_recover_all($params = array()) {
182
  $row->$name = esc_html(stripslashes($_POST[$name]));
183
  }
184
  }
 
185
  $save = update_option('wd_bwg_options', json_encode($row), 'no');
 
186
  if (isset($_POST['recreate']) && $_POST['recreate'] == "resize_image_thumb") {
187
  $this->resize_image_thumb();
188
  echo WDWLibrary::message_id(0, __('All thumbnails are successfully recreated.', BWG()->prefix));
235
  $this->model->update_options_by_key( $update_options );
236
  }
237
 
238
+ $error = false;
239
+ if ( ini_get('allow_url_fopen') == 0 ) {
240
+ $error = true;
241
+ $message = WDWLibrary::message_id(0, __('http:// wrapper is disabled in the server configuration by allow_url_fopen=0.', $this->prefix), 'error');
242
+ }
243
+ else {
244
+ list($width_watermark, $height_watermark, $type_watermark) = getimagesize($update_options['built_in_watermark_url']);
245
+ if ( $update_options['built_in_watermark_type'] == 'image' && (empty($width_watermark) OR empty($height_watermark) OR empty($type_watermark)) ) {
246
+ $error = TRUE;
247
+ $message = WDWLibrary::message_id(0, __('Watermark could not be set. The image URL is incorrect.', $this->prefix), 'error');
248
+ }
249
+ if ( $error === FALSE ) {
250
+ WDWLibrary::bwg_image_set_watermark(0, 0, $limitstart);
251
+ $message = WDWLibrary::message_id(0, __('All images are successfully watermarked.', $this->prefix), 'updated');
252
+ }
253
+ }
254
+ $json_data = array('error' => $error, 'message' => $message);
255
+ echo json_encode($json_data); die();
256
  }
257
 
258
  public function image_recover_all($params = array()) {
admin/controllers/Uninstall.php CHANGED
@@ -79,6 +79,7 @@ class UninstallController_bwg {
79
  $wpdb->prefix . 'bwg_option',
80
  $wpdb->prefix . 'bwg_theme',
81
  $wpdb->prefix . 'bwg_shortcode',
 
82
  );
83
 
84
  return $tables;
79
  $wpdb->prefix . 'bwg_option',
80
  $wpdb->prefix . 'bwg_theme',
81
  $wpdb->prefix . 'bwg_shortcode',
82
+ $wpdb->prefix . 'bwg_file_paths',
83
  );
84
 
85
  return $tables;
admin/models/Galleries.php CHANGED
@@ -778,17 +778,22 @@ class GalleriesModel_bwg {
778
  * @return int
779
  */
780
  public function image_set_watermark($id, $gallery_id = 0, $all = FALSE) {
781
- $options = new WD_BWG_Options();
782
- list($width_watermark, $height_watermark, $type_watermark) = @getimagesize( str_replace(' ', '%20', $options->built_in_watermark_url) );
783
- if ( $options->built_in_watermark_type == 'image' && (empty($width_watermark) OR empty($height_watermark) OR empty($type_watermark))) {
784
- $message_id = 26;
785
  }
786
  else {
787
- if ( $gallery_id == 0 ) {
788
- $gallery_id = (int) WDWLibrary::get('current_id', 0);
 
 
 
 
 
 
 
 
 
789
  }
790
- $limit = WDWLibrary::get('limit', 0);
791
- $message_id = WDWLibrary::bwg_image_set_watermark($gallery_id, ($all ? 0 : $id), $limit);
792
  }
793
 
794
  return $message_id;
778
  * @return int
779
  */
780
  public function image_set_watermark($id, $gallery_id = 0, $all = FALSE) {
781
+ if ( ini_get('allow_url_fopen') == 0 ) {
782
+ $message_id = 27;
 
 
783
  }
784
  else {
785
+ $options = new WD_BWG_Options();
786
+ list($width_watermark, $height_watermark, $type_watermark) = @getimagesize(str_replace(' ', '%20', $options->built_in_watermark_url));
787
+ if ( $options->built_in_watermark_type == 'image' && (empty($width_watermark) OR empty($height_watermark) OR empty($type_watermark)) ) {
788
+ $message_id = 26;
789
+ }
790
+ else {
791
+ if ( $gallery_id == 0 ) {
792
+ $gallery_id = (int) WDWLibrary::get('current_id', 0);
793
+ }
794
+ $limit = WDWLibrary::get('limit', 0);
795
+ $message_id = WDWLibrary::bwg_image_set_watermark($gallery_id, ($all ? 0 : $id), $limit);
796
  }
 
 
797
  }
798
 
799
  return $message_id;
admin/models/Themes.php CHANGED
@@ -101,7 +101,7 @@ class ThemesModel_bwg {
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;
@@ -113,13 +113,13 @@ class ThemesModel_bwg {
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 = '0 2px 2px 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_bg_color)) {
125
  $row->masonry_thumb_bg_color = '000000';
@@ -268,6 +268,9 @@ class ThemesModel_bwg {
268
  if (!isset($row->album_compact_title_font_color_hover)) {
269
  $row->album_compact_title_font_color_hover = 'FFFFFF';
270
  }
 
 
 
271
  if ( $reset ) {
272
  if ( !$row->default_theme ) {
273
  $row_id = $row->id;
@@ -329,7 +332,7 @@ class ThemesModel_bwg {
329
  $row->album_compact_gal_title_align = 'center';
330
  }
331
  if (!isset($row->album_extended_gal_title_font_color)) {
332
- $row->album_extended_gal_title_font_color = '323A45';
333
  }
334
  if (!isset($row->album_extended_gal_title_font_style)) {
335
  $row->album_extended_gal_title_font_style = 'Ubuntu';
@@ -341,13 +344,13 @@ class ThemesModel_bwg {
341
  $row->album_extended_gal_title_font_weight = 'bold';
342
  }
343
  if (!isset($row->album_extended_gal_title_margin)) {
344
- $row->album_extended_gal_title_margin = '0 2px 2px 2px';
345
  }
346
  if (!isset($row->album_extended_gal_title_shadow)) {
347
  $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
348
  }
349
  if (!isset($row->album_extended_gal_title_align)) {
350
- $row->album_extended_gal_title_align = 'center';
351
  }
352
  if ($row->masonry_thumb_hover_effect) {
353
  $row->masonry_thumb_hover_effect = 'zoom';
@@ -563,9 +566,12 @@ class ThemesModel_bwg {
563
  if (!isset($row->album_masonry_container_margin)) {
564
  $row->album_masonry_container_margin = 1;
565
  }
 
 
 
566
  }
567
  else {
568
- $theme_defaults = '{"thumb_margin":"4","album_compact_title_font_color_hover":"FFFFFF","compact_container_margin":"1","container_margin":"1","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":0,"thumb_border_style":"none","thumb_border_color":"CCCCCC","thumb_bg_color":"000000","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"zoom","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":"323A45","thumb_title_font_color_hover":"FFFFFF","thumb_title_shadow":"","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"323A45","thumb_gal_title_font_style":"Ubuntu","thumb_gal_title_font_size":18,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"","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":"Ubuntu","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":"Ubuntu","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":"323A45","blog_style_gal_title_font_style":"Ubuntu","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":"323A45","image_browser_gal_title_font_style":"Ubuntu","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":4,"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":"Ubuntu","album_compact_back_font_color":"323A45","album_compact_title_font_color":"323A45","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":"000000","album_compact_back_font_weight":"bold","album_compact_back_font_size":15,"album_compact_back_font_style":"Ubuntu","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":"zoom","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"1.08","album_compact_gal_title_font_color":"323A45","album_compact_gal_title_font_style":"Ubuntu","album_compact_gal_title_font_size":18,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"0 2px 2px 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":"323A45","album_extended_back_font_style":"Ubuntu","album_extended_back_font_size":15,"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":"Ubuntu","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":"Ubuntu","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":"323A45","album_extended_gal_title_font_style":"Ubuntu","album_extended_gal_title_font_size":18,"album_extended_gal_title_font_weight":"bold","album_extended_gal_title_margin":"0 2px 2px 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":"","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":"Ubuntu","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":"Ubuntu","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":"4","masonry_container_margin":"1","masonry_thumb_border_width":"0","masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumb_border_radius":"0","masonry_thumb_hover_effect":"zoom","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":"1","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_color":"000000","masonry_thumb_bg_transparent":"0","masonry_thumb_transparent":"100","masonry_thumb_align":"center","masonry_thumb_title_font_size":"16","masonry_thumb_title_font_color":"323A45","masonry_thumb_title_font_color_hover":"FFFFFF","masonry_thumb_title_font_style":"Ubuntu","masonry_thumb_title_font_weight":"bold","masonry_thumb_title_margin":"2px","masonry_description_font_size":16,"masonry_description_color":"323A45","masonry_description_font_style":"Ubuntu","masonry_thumb_gal_title_font_size":18,"masonry_thumb_gal_title_font_color":"323A45","masonry_thumb_gal_title_font_style":"Ubuntu","masonry_thumb_gal_title_font_weight":"bold","masonry_thumb_gal_title_shadow":"","masonry_thumb_gal_title_margin":"2px","masonry_thumb_gal_title_align":"center","mosaic_thumb_padding":"2","mosaic_container_margin":"1","mosaic_thumb_border_radius":"0","mosaic_thumb_border_width":"0","mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumb_bg_color":"000000","mosaic_thumb_transparent":"100","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":"0","mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"zoom","mosaic_thumb_hover_effect_value":"1.08","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_font_style":"Ubuntu","mosaic_thumb_title_font_color":"323A45","mosaic_thumb_title_font_color_hover":"FFFFFF","mosaic_thumb_title_shadow":"","mosaic_thumb_title_font_size":16,"mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_color":"323A45","mosaic_thumb_gal_title_font_style":"Ubuntu","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":"","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":"Ubuntu","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":"14","album_masonry_back_font_color":"323A45","album_masonry_back_font_style":"Ubuntu","album_masonry_back_font_size":15,"album_masonry_back_font_weight":"bold","album_masonry_back_padding":"0","album_masonry_title_font_color":"323A45","album_masonry_thumb_title_font_color_hover":"FFFFFF","album_masonry_title_font_style":"Ubuntu","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":4,"album_masonry_thumb_border_radius":"0","album_masonry_container_margin":1,"album_masonry_thumb_border_width":0,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"CCCCCC","album_masonry_thumb_bg_color":"000000","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":"zoom","album_masonry_thumb_hover_effect_value":"1.08","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"323A45","album_masonry_gal_title_font_style":"Ubuntu","album_masonry_gal_title_font_size":18,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"0 2px 2px 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"}';
569
 
570
  $theme_defaults = json_decode($theme_defaults);
571
  foreach ($theme_defaults as $key => $value) {
@@ -637,7 +643,7 @@ class ThemesModel_bwg {
637
  $row->album_compact_gal_title_align = 'center';
638
  }
639
  if (!isset($row->album_extended_gal_title_font_color)) {
640
- $row->album_extended_gal_title_font_color = '323A45';
641
  }
642
  if (!isset($row->album_extended_gal_title_font_style)) {
643
  $row->album_extended_gal_title_font_style = 'Ubuntu';
@@ -649,13 +655,13 @@ class ThemesModel_bwg {
649
  $row->album_extended_gal_title_font_weight = 'bold';
650
  }
651
  if (!isset($row->album_extended_gal_title_margin)) {
652
- $row->album_extended_gal_title_margin = '0 2px 2px 2px';
653
  }
654
  if (!isset($row->album_extended_gal_title_shadow)) {
655
  $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
656
  }
657
  if (!isset($row->album_extended_gal_title_align)) {
658
- $row->album_extended_gal_title_align = 'center';
659
  }
660
  // Masonry default value. TODO change logic in the other version.
661
  $row->masonry_thumb_hover_effect = 'zoom';
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 = 'CCCCCC';
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;
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 = 'right';
123
  }
124
  if (!isset($row->masonry_thumb_bg_color)) {
125
  $row->masonry_thumb_bg_color = '000000';
268
  if (!isset($row->album_compact_title_font_color_hover)) {
269
  $row->album_compact_title_font_color_hover = 'FFFFFF';
270
  }
271
+ if (!isset($row->album_extended_title_desc_alignment)) {
272
+ $row->album_extended_title_desc_alignment = 'top';
273
+ }
274
  if ( $reset ) {
275
  if ( !$row->default_theme ) {
276
  $row_id = $row->id;
332
  $row->album_compact_gal_title_align = 'center';
333
  }
334
  if (!isset($row->album_extended_gal_title_font_color)) {
335
+ $row->album_extended_gal_title_font_color = 'CCCCCC';
336
  }
337
  if (!isset($row->album_extended_gal_title_font_style)) {
338
  $row->album_extended_gal_title_font_style = 'Ubuntu';
344
  $row->album_extended_gal_title_font_weight = 'bold';
345
  }
346
  if (!isset($row->album_extended_gal_title_margin)) {
347
+ $row->album_extended_gal_title_margin = '2px';
348
  }
349
  if (!isset($row->album_extended_gal_title_shadow)) {
350
  $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
351
  }
352
  if (!isset($row->album_extended_gal_title_align)) {
353
+ $row->album_extended_gal_title_align = 'right';
354
  }
355
  if ($row->masonry_thumb_hover_effect) {
356
  $row->masonry_thumb_hover_effect = 'zoom';
566
  if (!isset($row->album_masonry_container_margin)) {
567
  $row->album_masonry_container_margin = 1;
568
  }
569
+ if (!isset($row->album_extended_title_desc_alignment)) {
570
+ $row->album_extended_title_desc_alignment = 'top';
571
+ }
572
  }
573
  else {
574
+ $theme_defaults = '{"thumb_margin":"4","album_compact_title_font_color_hover":"FFFFFF","compact_container_margin":"1","container_margin":"1","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":0,"thumb_border_style":"none","thumb_border_color":"CCCCCC","thumb_bg_color":"000000","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"zoom","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":"323A45","thumb_title_font_color_hover":"FFFFFF","thumb_title_shadow":"","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"323A45","thumb_gal_title_font_style":"Ubuntu","thumb_gal_title_font_size":18,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"","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":"Ubuntu","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":"Ubuntu","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":"323A45","blog_style_gal_title_font_style":"Ubuntu","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":"323A45","image_browser_gal_title_font_style":"Ubuntu","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":4,"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":"Ubuntu","album_compact_back_font_color":"323A45","album_compact_title_font_color":"323A45","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":"000000","album_compact_back_font_weight":"bold","album_compact_back_font_size":15,"album_compact_back_font_style":"Ubuntu","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":"zoom","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"1.08","album_compact_gal_title_font_color":"323A45","album_compact_gal_title_font_style":"Ubuntu","album_compact_gal_title_font_size":18,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"0 2px 2px 2px","album_compact_gal_title_shadow":"0px 0px 0px #888888","album_compact_gal_title_align":"center","album_extended_thumb_margin":0,"album_extended_thumb_padding":0,"album_extended_thumb_border_radius":"10px","album_extended_thumb_border_width":0,"album_extended_thumb_border_style":"none","album_extended_thumb_border_color":"FAFAFA","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":"none","album_extended_thumb_hover_effect_value":"1.03","album_extended_thumb_transition":0,"album_extended_back_font_color":"000000","album_extended_back_font_style":"Ubuntu","album_extended_back_font_size":20,"album_extended_back_font_weight":"bold","album_extended_back_padding":"0","album_extended_div_bg_color":"FAFAFA","album_extended_div_bg_transparent":0,"album_extended_div_border_radius":"14px","album_extended_div_margin":"20px 20px 0px 0px","album_extended_div_padding":0,"album_extended_div_separator_width":0,"album_extended_div_separator_style":"solid","album_extended_div_separator_color":"E0E0E0","album_extended_thumb_div_bg_color":"FAFAFA","album_extended_thumb_div_border_radius":"","album_extended_thumb_div_border_width":0,"album_extended_thumb_div_border_style":"none","album_extended_thumb_div_border_color":"E8E8E8","album_extended_thumb_div_padding":"14px","album_extended_text_div_bg_color":"FAFAFA","album_extended_text_div_border_radius":"0","album_extended_text_div_border_width":0,"album_extended_text_div_border_style":"none","album_extended_text_div_border_color":"E8E8E8","album_extended_title_desc_alignment":"top","album_extended_text_div_padding":"16px","album_extended_title_span_border_width":0,"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":"Ubuntu","album_extended_title_font_size":22,"album_extended_title_font_weight":"bold","album_extended_title_margin_bottom":0,"album_extended_title_padding":"0px 0px 0px 0px","album_extended_desc_span_border_width":0,"album_extended_desc_span_border_style":"none","album_extended_desc_span_border_color":"CCCCCC","album_extended_desc_font_color":"5C5C5C","album_extended_desc_font_style":"Ubuntu","album_extended_desc_font_size":16,"album_extended_desc_font_weight":"normal","album_extended_desc_padding":"0px 0px 0px 0px","album_extended_desc_more_color":"007AFF","album_extended_desc_more_size":12,"album_extended_gal_title_font_color":"CCCCCC","album_extended_gal_title_font_style":"Ubuntu","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":"right","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":"","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":"Ubuntu","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":"Ubuntu","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":"4","masonry_container_margin":"1","masonry_thumb_border_width":"0","masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumb_border_radius":"0","masonry_thumb_hover_effect":"zoom","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":"1","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_color":"000000","masonry_thumb_bg_transparent":"0","masonry_thumb_transparent":"100","masonry_thumb_align":"center","masonry_thumb_title_font_size":"16","masonry_thumb_title_font_color":"323A45","masonry_thumb_title_font_color_hover":"FFFFFF","masonry_thumb_title_font_style":"Ubuntu","masonry_thumb_title_font_weight":"bold","masonry_thumb_title_margin":"2px","masonry_description_font_size":16,"masonry_description_color":"323A45","masonry_description_font_style":"Ubuntu","masonry_thumb_gal_title_font_size":18,"masonry_thumb_gal_title_font_color":"323A45","masonry_thumb_gal_title_font_style":"Ubuntu","masonry_thumb_gal_title_font_weight":"bold","masonry_thumb_gal_title_shadow":"","masonry_thumb_gal_title_margin":"2px","masonry_thumb_gal_title_align":"center","mosaic_thumb_padding":"2","mosaic_container_margin":"1","mosaic_thumb_border_radius":"0","mosaic_thumb_border_width":"0","mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumb_bg_color":"000000","mosaic_thumb_transparent":"100","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":"0","mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"zoom","mosaic_thumb_hover_effect_value":"1.08","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_font_style":"Ubuntu","mosaic_thumb_title_font_color":"323A45","mosaic_thumb_title_font_color_hover":"FFFFFF","mosaic_thumb_title_shadow":"","mosaic_thumb_title_font_size":16,"mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_color":"323A45","mosaic_thumb_gal_title_font_style":"Ubuntu","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":"","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":"Ubuntu","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":"14","album_masonry_back_font_color":"323A45","album_masonry_back_font_style":"Ubuntu","album_masonry_back_font_size":15,"album_masonry_back_font_weight":"bold","album_masonry_back_padding":"0","album_masonry_title_font_color":"323A45","album_masonry_thumb_title_font_color_hover":"FFFFFF","album_masonry_title_font_style":"Ubuntu","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":4,"album_masonry_thumb_border_radius":"0","album_masonry_container_margin":1,"album_masonry_thumb_border_width":0,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"CCCCCC","album_masonry_thumb_bg_color":"000000","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":"zoom","album_masonry_thumb_hover_effect_value":"1.08","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"323A45","album_masonry_gal_title_font_style":"Ubuntu","album_masonry_gal_title_font_size":18,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"0 2px 2px 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"}';
575
 
576
  $theme_defaults = json_decode($theme_defaults);
577
  foreach ($theme_defaults as $key => $value) {
643
  $row->album_compact_gal_title_align = 'center';
644
  }
645
  if (!isset($row->album_extended_gal_title_font_color)) {
646
+ $row->album_extended_gal_title_font_color = 'CCCCCC';
647
  }
648
  if (!isset($row->album_extended_gal_title_font_style)) {
649
  $row->album_extended_gal_title_font_style = 'Ubuntu';
655
  $row->album_extended_gal_title_font_weight = 'bold';
656
  }
657
  if (!isset($row->album_extended_gal_title_margin)) {
658
+ $row->album_extended_gal_title_margin = '2px';
659
  }
660
  if (!isset($row->album_extended_gal_title_shadow)) {
661
  $row->album_extended_gal_title_shadow = '0px 0px 0px #888888';
662
  }
663
  if (!isset($row->album_extended_gal_title_align)) {
664
+ $row->album_extended_gal_title_align = 'right';
665
  }
666
  // Masonry default value. TODO change logic in the other version.
667
  $row->masonry_thumb_hover_effect = 'zoom';
admin/models/Uninstall.php CHANGED
@@ -70,6 +70,7 @@ class UninstallModel_bwg {
70
  delete_option("wd_bwg_options");
71
  delete_option('tenweb_notice_status');
72
  delete_user_meta(get_current_user_id(), 'bwg_photo_gallery');
 
73
  if ( isset($_COOKIE['bwg_image_asc_or_desc']) ) {
74
  $_COOKIE['bwg_image_asc_or_desc'] = '';
75
  }
70
  delete_option("wd_bwg_options");
71
  delete_option('tenweb_notice_status');
72
  delete_user_meta(get_current_user_id(), 'bwg_photo_gallery');
73
+ delete_option('tenweb_notice_status');
74
  if ( isset($_COOKIE['bwg_image_asc_or_desc']) ) {
75
  $_COOKIE['bwg_image_asc_or_desc'] = '';
76
  }
admin/views/AddTags.php CHANGED
@@ -16,8 +16,8 @@ class AddTagsView_bwg extends AdminView_bwg {
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);
16
  ob_start();
17
  $params['page_url'] = add_query_arg(array(
18
  'action' => 'addTags_' . BWG()->prefix,
19
+ 'bwg_width' => '785',
20
+ 'bwg_height' => '550',
21
  'TB_iframe' => '1',
22
  ), admin_url('admin-ajax.php'));
23
  echo $this->body($params);
admin/views/Editimage.php CHANGED
@@ -148,8 +148,8 @@ class EditimageView_bwg {
148
  'image_id' => $image_id,
149
  'image_url' => $image_data->image_url,
150
  'thumb_url' => $image_data->thumb_url,
151
- 'width' => '1000',
152
- 'height' => '600',
153
  'TB_iframe' => '1',
154
  ), admin_url('admin-ajax.php'));
155
  }
@@ -161,8 +161,8 @@ class EditimageView_bwg {
161
  'action' => 'editimage_' . BWG()->prefix,
162
  'type' => 'crop',
163
  'image_id' => $image_id,
164
- 'width' => '1000',
165
- 'height' => '600',
166
  'TB_iframe' => '1',
167
  ), admin_url('admin-ajax.php'));
168
  }
@@ -471,8 +471,8 @@ class EditimageView_bwg {
471
  'image_id' => $image_id,
472
  'image_url' => $image_data->image_url,
473
  'thumb_url' => $image_data->thumb_url,
474
- 'width' => '650',
475
- 'height' => '500',
476
  'TB_iframe' => '1',
477
  ), admin_url('admin-ajax.php'));
478
  }
@@ -484,8 +484,8 @@ class EditimageView_bwg {
484
  'action' => 'editimage_' . BWG()->prefix,
485
  'type' => 'rotate',
486
  'image_id' => $image_id,
487
- 'width' => '650',
488
- 'height' => '500',
489
  'TB_iframe' => '1',
490
  ), admin_url('admin-ajax.php'));
491
  }
148
  'image_id' => $image_id,
149
  'image_url' => $image_data->image_url,
150
  'thumb_url' => $image_data->thumb_url,
151
+ 'bwg_width' => '1000',
152
+ 'bwg_height' => '600',
153
  'TB_iframe' => '1',
154
  ), admin_url('admin-ajax.php'));
155
  }
161
  'action' => 'editimage_' . BWG()->prefix,
162
  'type' => 'crop',
163
  'image_id' => $image_id,
164
+ 'bwg_width' => '1000',
165
+ 'bwg_height' => '600',
166
  'TB_iframe' => '1',
167
  ), admin_url('admin-ajax.php'));
168
  }
471
  'image_id' => $image_id,
472
  'image_url' => $image_data->image_url,
473
  'thumb_url' => $image_data->thumb_url,
474
+ 'bwg_width' => '650',
475
+ 'bwg_height' => '500',
476
  'TB_iframe' => '1',
477
  ), admin_url('admin-ajax.php'));
478
  }
484
  'action' => 'editimage_' . BWG()->prefix,
485
  'type' => 'rotate',
486
  'image_id' => $image_id,
487
+ 'bwg_width' => '650',
488
+ 'bwg_height' => '500',
489
  'TB_iframe' => '1',
490
  ), admin_url('admin-ajax.php'));
491
  }
admin/views/Galleries.php CHANGED
@@ -626,8 +626,8 @@ class GalleriesView_bwg extends AdminView_bwg {
626
  'image_url' => urlencode($row->pure_image_url),
627
  'thumb_url' => urlencode($row->pure_thumb_url),
628
  'image_id' => $row->id,
629
- 'width' => '1000',
630
- 'height' => '500',
631
  BWG()->nonce => wp_create_nonce('editimage_' . BWG()->prefix),
632
  ), admin_url('admin-ajax.php'));
633
  $image_link = add_query_arg(array(
@@ -649,7 +649,7 @@ class GalleriesView_bwg extends AdminView_bwg {
649
  ), $image_link);
650
  $image_link = add_query_arg(array('TB_iframe' => '1'), $image_link);
651
  $edit_link = add_query_arg(array('type' => 'rotate', 'TB_iframe' => '1'), $link);
652
- $crop_link = add_query_arg(array('height' => '600', 'type' => 'crop', 'TB_iframe' => '1'), $link);
653
  $image_url = (!$is_embed ? BWG()->upload_url : "") . $row->thumb_url;
654
  $add_tag_url = add_query_arg(array('image_id' => $row->id, 'TB_iframe' => '1'), $params['add_tags_action']);
655
  ?>
@@ -777,8 +777,8 @@ class GalleriesView_bwg extends AdminView_bwg {
777
  'action' => 'add_pricelist',
778
  'page' => 'pricelists_pge',
779
  'task' => 'explore',
780
- 'width' => '785',
781
- 'height' => '550',
782
  'TB_iframe' => '1',
783
  ), $query_url);
784
  ?>
626
  'image_url' => urlencode($row->pure_image_url),
627
  'thumb_url' => urlencode($row->pure_thumb_url),
628
  'image_id' => $row->id,
629
+ 'bwg_width' => '1000',
630
+ 'bwg_height' => '500',
631
  BWG()->nonce => wp_create_nonce('editimage_' . BWG()->prefix),
632
  ), admin_url('admin-ajax.php'));
633
  $image_link = add_query_arg(array(
649
  ), $image_link);
650
  $image_link = add_query_arg(array('TB_iframe' => '1'), $image_link);
651
  $edit_link = add_query_arg(array('type' => 'rotate', 'TB_iframe' => '1'), $link);
652
+ $crop_link = add_query_arg(array('bwg_height' => '600', 'type' => 'crop', 'TB_iframe' => '1'), $link);
653
  $image_url = (!$is_embed ? BWG()->upload_url : "") . $row->thumb_url;
654
  $add_tag_url = add_query_arg(array('image_id' => $row->id, 'TB_iframe' => '1'), $params['add_tags_action']);
655
  ?>
777
  'action' => 'add_pricelist',
778
  'page' => 'pricelists_pge',
779
  'task' => 'explore',
780
+ 'bwg_width' => '785',
781
+ 'bwg_height' => '550',
782
  'TB_iframe' => '1',
783
  ), $query_url);
784
  ?>
admin/views/Options.php CHANGED
@@ -984,12 +984,16 @@ class OptionsView_bwg extends AdminView_bwg {
984
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'', 'tr_album_resizable_mosaic', 'album_view_type_2'" : "'none', 'tr_album_resizable_mosaic', 'album_view_type_" . $row->album_view_type . "'"; ?>);
985
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'', 'tr_album_mosaic_total_width', 'album_view_type_2'" : "'none', 'tr_album_mosaic_total_width', 'album_view_type_" . $row->album_view_type . "'"; ?>);
986
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'none', 'for_album_image_title_show_hover_0', 'album_view_type_2'" : "'', 'for_album_image_title_show_hover_0', 'album_view_type_" . $row->album_view_type . "'"; ?>);
 
987
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'none', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_2'" : "'', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_" . $row->album_view_type . "'"; ?>);
 
988
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'', 'tr_album_extended_mosaic', 'album_extended_view_type_2'" : "'none', 'tr_album_extended_mosaic', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
989
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_2'" : "'none', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
990
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_2'" : "'none', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
991
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'none', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_2'" : "'', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
 
992
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'none', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_2'" : "'', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
 
993
  bwg_enable_disable(<?php echo $row->masonry == 'horizontal' ? "'none', 'bwg-vertical-block-masonry', 'masonry_1'" : "'', 'bwg-vertical-block-masonry', 'masonry_0'"; ?>);
994
  preview_watermark();
995
  preview_built_in_watermark();
@@ -2617,9 +2621,9 @@ class OptionsView_bwg extends AdminView_bwg {
2617
  <div class="wd-group">
2618
  <label class="wd-label"><?php _e('Gallery view type', BWG()->prefix); ?></label>
2619
  <div class="bwg-flex">
2620
- <input <?php echo BWG()->is_pro ? '' : '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"'; ?> onClick="bwg_enable_disable('none', 'tr_album_mosaic', 'album_view_type_1'); bwg_enable_disable('none', 'tr_album_resizable_mosaic', 'album_view_type_1'); bwg_enable_disable('none', 'tr_album_mosaic_total_width', 'album_view_type_1');bwg_enable_disable('', 'for_album_image_title_show_hover_0', 'album_view_type_1');bwg_enable_disable('', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_1');" /><label for="album_view_type_1" class="wd-radio-label"><?php _e('Thumbnail', BWG()->prefix); ?></label>
2621
- <input <?php echo BWG()->is_pro ? '' : '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"'; ?> onClick="bwg_enable_disable('none', 'tr_album_mosaic', 'album_view_type_0'); bwg_enable_disable('none', 'tr_album_resizable_mosaic', 'album_view_type_0'); bwg_enable_disable('none', 'tr_album_mosaic_total_width', 'album_view_type_0');bwg_enable_disable('', 'for_album_image_title_show_hover_0', 'album_view_type_0');bwg_enable_disable('', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_0');" /><label for="album_view_type_0" class="wd-radio-label"><?php _e('Masonry', BWG()->prefix); ?></label>
2622
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_view_type" id="album_view_type_2" value="mosaic" <?php if ($row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_album_mosaic', 'album_view_type_2'); bwg_enable_disable('', 'tr_album_resizable_mosaic', 'album_view_type_2'); bwg_enable_disable('', 'tr_album_mosaic_total_width', 'album_view_type_2');bwg_enable_disable('none', 'for_album_image_title_show_hover_0', 'album_view_type_2');bwg_enable_disable('none', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_2');" /><label for="album_view_type_2" class="wd-radio-label"><?php _e('Mosaic', BWG()->prefix); ?></label>
2623
  </div>
2624
  <p class="description"><?php _e('Choose the display type for gallery groups, Thumbnails, Masonry or Mosaic.', BWG()->prefix); ?></p>
2625
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
@@ -2661,9 +2665,12 @@ class OptionsView_bwg extends AdminView_bwg {
2661
  <div class="wd-group">
2662
  <label class="wd-label"><?php _e('Show image title', BWG()->prefix); ?></label>
2663
  <div class="bwg-flex">
2664
- <label for="album_image_title_show_hover_1" class="wd-radio-label"><input type="radio" name="album_image_title_show_hover" id="album_image_title_show_hover_1" value="hover" <?php if ($row->album_image_title_show_hover == "hover") echo 'checked="checked"'; ?> /><?php _e('Show on hover', BWG()->prefix); ?></label>
2665
- <label id="for_album_image_title_show_hover_0" for="album_image_title_show_hover_0" class="wd-radio-label"><input type="radio" name="album_image_title_show_hover" id="album_image_title_show_hover_0" value="show" <?php if ($row->album_image_title_show_hover == "show") echo 'checked="checked"'; ?> /><?php _e('Always show', BWG()->prefix); ?></label>
2666
- <label for="album_image_title_show_hover_2" class="wd-radio-label"><input type="radio" name="album_image_title_show_hover" id="album_image_title_show_hover_2" value="none" <?php if ($row->album_image_title_show_hover == "none") echo 'checked="checked"'; ?> /><?php _e("Don't show", BWG()->prefix); ?></label>
 
 
 
2667
  </div>
2668
  <p class="description"><?php _e('Choose to show/hide titles of images, or display them on hover.', BWG()->prefix); ?></p>
2669
  </div>
@@ -2933,6 +2940,17 @@ class OptionsView_bwg extends AdminView_bwg {
2933
  </div>
2934
  <p class="description"><?php _e('Set the height of blocks in Extended gallery groups.', BWG()->prefix); ?></p>
2935
  </div>
 
 
 
 
 
 
 
 
 
 
 
2936
  </div>
2937
  <div class="wd-box-content wd-width-100">
2938
  <div class="wd-group">
@@ -3104,9 +3122,9 @@ class OptionsView_bwg extends AdminView_bwg {
3104
  <div class="wd-group">
3105
  <label class="wd-label"><?php _e('Gallery view type', BWG()->prefix); ?></label>
3106
  <div class="bwg-flex">
3107
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_view_type" id="album_extended_view_type_1" value="thumbnail" <?php if ($row->album_extended_view_type == "thumbnail") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_album_extended_mosaic', 'album_extended_view_type_1'); bwg_enable_disable('none', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_1'); bwg_enable_disable('none', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_1');bwg_enable_disable('', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_1');bwg_enable_disable('', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_1');" /><label for="album_extended_view_type_1" class="wd-radio-label"><?php _e('Thumbnail', BWG()->prefix); ?></label>
3108
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_view_type" id="album_extended_view_type_0" value="masonry" <?php if ($row->album_extended_view_type == "masonry") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_album_extended_mosaic', 'album_extended_view_type_0'); bwg_enable_disable('none', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_0'); bwg_enable_disable('none', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_0');bwg_enable_disable('', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_0');bwg_enable_disable('', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_0');" /><label for="album_extended_view_type_0" class="wd-radio-label"><?php _e('Masonry', BWG()->prefix); ?></label>
3109
- <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_view_type" id="album_extended_view_type_2" value="mosaic" <?php if ($row->album_extended_view_type == "mosaic") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_album_extended_mosaic', 'album_extended_view_type_2'); bwg_enable_disable('', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_2'); bwg_enable_disable('', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_2');bwg_enable_disable('none', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_2');bwg_enable_disable('none', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_2');" /><label for="album_extended_view_type_2" class="wd-radio-label"><?php _e('Mosaic', BWG()->prefix); ?></label>
3110
  </div>
3111
  <p class="description"><?php _e('Choose the display type for gallery groups, Thumbnails, Masonry or Mosaic.', BWG()->prefix); ?></p>
3112
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
@@ -3148,9 +3166,12 @@ class OptionsView_bwg extends AdminView_bwg {
3148
  <div class="wd-group">
3149
  <label class="wd-label"><?php _e('Show image title', BWG()->prefix); ?></label>
3150
  <div class="bwg-flex">
3151
- <label for="album_extended_image_title_show_hover_1" class="wd-radio-label"><input type="radio" name="album_extended_image_title_show_hover" id="album_extended_image_title_show_hover_1" value="hover" <?php if ($row->album_extended_image_title_show_hover == "hover") echo 'checked="checked"'; ?> /><?php _e('Show on hover', BWG()->prefix); ?></label>
3152
- <label id="for_album_extended_image_title_show_hover_0" for="album_extended_image_title_show_hover_0" class="wd-radio-label"><input type="radio" name="album_extended_image_title_show_hover" id="album_extended_image_title_show_hover_0" value="show" <?php if ($row->album_extended_image_title_show_hover == "show") echo 'checked="checked"'; ?> /><?php _e('Always show', BWG()->prefix); ?></label>
3153
- <label for="album_extended_image_title_show_hover_2" class="wd-radio-label"><input type="radio" name="album_extended_image_title_show_hover" id="album_extended_image_title_show_hover_2" value="none" <?php if ($row->album_extended_image_title_show_hover == "none") echo 'checked="checked"'; ?> /><?php _e("Don't show", BWG()->prefix); ?></label>
 
 
 
3154
  </div>
3155
  <p class="description"><?php _e('Choose to show/hide titles of images, or display them on hover.', BWG()->prefix); ?></p>
3156
  </div>
984
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'', 'tr_album_resizable_mosaic', 'album_view_type_2'" : "'none', 'tr_album_resizable_mosaic', 'album_view_type_" . $row->album_view_type . "'"; ?>);
985
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'', 'tr_album_mosaic_total_width', 'album_view_type_2'" : "'none', 'tr_album_mosaic_total_width', 'album_view_type_" . $row->album_view_type . "'"; ?>);
986
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'none', 'for_album_image_title_show_hover_0', 'album_view_type_2'" : "'', 'for_album_image_title_show_hover_0', 'album_view_type_" . $row->album_view_type . "'"; ?>);
987
+ bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'none', 'album_image_title_show_hover_0', 'album_view_type_2'" : "'', 'album_image_title_show_hover_0', 'album_view_type_" . $row->album_view_type . "'"; ?>);
988
  bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'none', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_2'" : "'', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_" . $row->album_view_type . "'"; ?>);
989
+ bwg_enable_disable(<?php echo $row->album_view_type == 'mosaic' ? "'none', 'album_ecommerce_icon_show_hover_0', 'album_view_type_2'" : "'', 'album_ecommerce_icon_show_hover_0', 'album_view_type_" . $row->album_view_type . "'"; ?>);
990
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'', 'tr_album_extended_mosaic', 'album_extended_view_type_2'" : "'none', 'tr_album_extended_mosaic', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
991
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_2'" : "'none', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
992
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_2'" : "'none', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
993
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'none', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_2'" : "'', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
994
+ bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'none', 'album_extended_image_title_show_hover_0', 'album_extended_view_type_2'" : "'', 'album_extended_image_title_show_hover_0', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
995
  bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'none', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_2'" : "'', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
996
+ bwg_enable_disable(<?php echo $row->album_extended_view_type == 'mosaic' ? "'none', 'album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_2'" : "'', 'album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_" . $row->album_extended_view_type . "'"; ?>);
997
  bwg_enable_disable(<?php echo $row->masonry == 'horizontal' ? "'none', 'bwg-vertical-block-masonry', 'masonry_1'" : "'', 'bwg-vertical-block-masonry', 'masonry_0'"; ?>);
998
  preview_watermark();
999
  preview_built_in_watermark();
2621
  <div class="wd-group">
2622
  <label class="wd-label"><?php _e('Gallery view type', BWG()->prefix); ?></label>
2623
  <div class="bwg-flex">
2624
+ <input <?php echo BWG()->is_pro ? '' : '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"'; ?> onClick="bwg_enable_disable('none', 'tr_album_mosaic', 'album_view_type_1'); bwg_enable_disable('none', 'tr_album_resizable_mosaic', 'album_view_type_1'); bwg_enable_disable('none', 'tr_album_mosaic_total_width', 'album_view_type_1');bwg_enable_disable('', 'for_album_image_title_show_hover_0', 'album_view_type_1');bwg_enable_disable('', 'album_image_title_show_hover_0', 'album_view_type_1');bwg_enable_disable('', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_1');" /><label for="album_view_type_1" class="wd-radio-label"><?php _e('Thumbnail', BWG()->prefix); ?></label>
2625
+ <input <?php echo BWG()->is_pro ? '' : '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"'; ?> onClick="bwg_enable_disable('none', 'tr_album_mosaic', 'album_view_type_0'); bwg_enable_disable('none', 'tr_album_resizable_mosaic', 'album_view_type_0'); bwg_enable_disable('none', 'tr_album_mosaic_total_width', 'album_view_type_0');bwg_enable_disable('', 'for_album_image_title_show_hover_0', 'album_view_type_0');bwg_enable_disable('', 'album_image_title_show_hover_0', 'album_view_type_0');bwg_enable_disable('', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_0');" /><label for="album_view_type_0" class="wd-radio-label"><?php _e('Masonry', BWG()->prefix); ?></label>
2626
+ <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_view_type" id="album_view_type_2" value="mosaic" <?php if ($row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_album_mosaic', 'album_view_type_2'); bwg_enable_disable('', 'tr_album_resizable_mosaic', 'album_view_type_2'); bwg_enable_disable('', 'tr_album_mosaic_total_width', 'album_view_type_2');bwg_enable_disable('none', 'for_album_image_title_show_hover_0', 'album_view_type_2');bwg_enable_disable('none', 'album_image_title_show_hover_0', 'album_view_type_2');bwg_enable_disable('none', 'for_album_ecommerce_icon_show_hover_0', 'album_view_type_2');" /><label for="album_view_type_2" class="wd-radio-label"><?php _e('Mosaic', BWG()->prefix); ?></label>
2627
  </div>
2628
  <p class="description"><?php _e('Choose the display type for gallery groups, Thumbnails, Masonry or Mosaic.', BWG()->prefix); ?></p>
2629
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
2665
  <div class="wd-group">
2666
  <label class="wd-label"><?php _e('Show image title', BWG()->prefix); ?></label>
2667
  <div class="bwg-flex">
2668
+ <input type="radio" name="album_image_title_show_hover" id="album_image_title_show_hover_1" value="hover" <?php if ($row->album_image_title_show_hover == "hover") echo 'checked="checked"'; ?> />
2669
+ <label for="album_image_title_show_hover_1" class="wd-radio-label"><?php _e('Show on hover', BWG()->prefix); ?></label>
2670
+ <input type="radio" name="album_image_title_show_hover" id="album_image_title_show_hover_0" value="show" <?php if ($row->album_image_title_show_hover == "show") echo 'checked="checked"'; ?> />
2671
+ <label id="for_album_image_title_show_hover_0" for="album_image_title_show_hover_0" class="wd-radio-label"><?php _e('Always show', BWG()->prefix); ?></label>
2672
+ <input type="radio" name="album_image_title_show_hover" id="album_image_title_show_hover_2" value="none" <?php if ($row->album_image_title_show_hover == "none") echo 'checked="checked"'; ?> />
2673
+ <label for="album_image_title_show_hover_2" class="wd-radio-label"><?php _e("Don't show", BWG()->prefix); ?></label>
2674
  </div>
2675
  <p class="description"><?php _e('Choose to show/hide titles of images, or display them on hover.', BWG()->prefix); ?></p>
2676
  </div>
2940
  </div>
2941
  <p class="description"><?php _e('Set the height of blocks in Extended gallery groups.', BWG()->prefix); ?></p>
2942
  </div>
2943
+ </div>
2944
+ <div class="wd-box-content wd-width-100">
2945
+ <div class="wd-group">
2946
+ <label class="wd-label" for="extended_album_column_number"><?php _e('Number of columns', BWG()->prefix); ?></label>
2947
+ <div class="bwg-flex">
2948
+ <input type="radio" name="extended_album_column_number" id="extended_album_column_number_1" value="1" <?php if ($row->extended_album_column_number == 1) echo 'checked="checked"'; ?> /><label for="extended_album_column_number_1" class="wd-radio-label"><?php _e('1 column', BWG()->prefix); ?></label>
2949
+ <input type="radio" name="extended_album_column_number" id="extended_album_column_number_2" value="2" <?php if ($row->extended_album_column_number == 2) echo 'checked="checked"'; ?> /><label for="extended_album_column_number_2" class="wd-radio-label"><?php _e('2 column', BWG()->prefix); ?></label>
2950
+ <input type="radio" name="extended_album_column_number" id="extended_album_column_number_3" value="3" <?php if ($row->extended_album_column_number == 3) echo 'checked="checked"'; ?> /><label for="extended_album_column_number_3" class="wd-radio-label"><?php _e('3 column', BWG()->prefix); ?></label>
2951
+ </div>
2952
+ <p class="description"><?php _e('Set the maximum number of columns.', BWG()->prefix); ?></p>
2953
+ </div>
2954
  </div>
2955
  <div class="wd-box-content wd-width-100">
2956
  <div class="wd-group">
3122
  <div class="wd-group">
3123
  <label class="wd-label"><?php _e('Gallery view type', BWG()->prefix); ?></label>
3124
  <div class="bwg-flex">
3125
+ <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_view_type" id="album_extended_view_type_1" value="thumbnail" <?php if ($row->album_extended_view_type == "thumbnail") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_album_extended_mosaic', 'album_extended_view_type_1'); bwg_enable_disable('none', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_1'); bwg_enable_disable('none', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_1');bwg_enable_disable('', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_1');bwg_enable_disable('', 'album_extended_image_title_show_hover_0', 'album_extended_view_type_1');bwg_enable_disable('', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_1');" /><label for="album_extended_view_type_1" class="wd-radio-label"><?php _e('Thumbnail', BWG()->prefix); ?></label>
3126
+ <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_view_type" id="album_extended_view_type_0" value="masonry" <?php if ($row->album_extended_view_type == "masonry") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_album_extended_mosaic', 'album_extended_view_type_0'); bwg_enable_disable('none', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_0'); bwg_enable_disable('none', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_0');bwg_enable_disable('', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_0');bwg_enable_disable('', 'album_extended_image_title_show_hover_0', 'album_extended_view_type_0');bwg_enable_disable('', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_0');" /><label for="album_extended_view_type_0" class="wd-radio-label"><?php _e('Masonry', BWG()->prefix); ?></label>
3127
+ <input <?php echo BWG()->is_pro ? '' : 'disabled="disabled"'; ?> type="radio" name="album_extended_view_type" id="album_extended_view_type_2" value="mosaic" <?php if ($row->album_extended_view_type == "mosaic") echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_album_extended_mosaic', 'album_extended_view_type_2'); bwg_enable_disable('', 'tr_album_extended_resizable_mosaic', 'album_extended_view_type_2'); bwg_enable_disable('', 'tr_album_extended_mosaic_total_width', 'album_extended_view_type_2');bwg_enable_disable('none', 'for_album_extended_image_title_show_hover_0', 'album_extended_view_type_2');bwg_enable_disable('none', 'album_extended_image_title_show_hover_0', 'album_extended_view_type_2');bwg_enable_disable('none', 'for_album_extended_ecommerce_icon_show_hover_0', 'album_extended_view_type_2');" /><label for="album_extended_view_type_2" class="wd-radio-label"><?php _e('Mosaic', BWG()->prefix); ?></label>
3128
  </div>
3129
  <p class="description"><?php _e('Choose the display type for gallery groups, Thumbnails, Masonry or Mosaic.', BWG()->prefix); ?></p>
3130
  <?php if ( !BWG()->is_pro ) { ?><p class="description spider_free_version"><?php echo BWG()->free_msg; ?></p><?php } ?>
3166
  <div class="wd-group">
3167
  <label class="wd-label"><?php _e('Show image title', BWG()->prefix); ?></label>
3168
  <div class="bwg-flex">
3169
+ <input type="radio" name="album_extended_image_title_show_hover" id="album_extended_image_title_show_hover_1" value="hover" <?php if ($row->album_extended_image_title_show_hover == "hover") echo 'checked="checked"'; ?> />
3170
+ <label for="album_extended_image_title_show_hover_1" class="wd-radio-label"><?php _e('Show on hover', BWG()->prefix); ?></label>
3171
+ <input type="radio" name="album_extended_image_title_show_hover" id="album_extended_image_title_show_hover_0" value="show" <?php if ($row->album_extended_image_title_show_hover == "show") echo 'checked="checked"'; ?> />
3172
+ <label id="for_album_extended_image_title_show_hover_0" for="album_extended_image_title_show_hover_0" class="wd-radio-label"><?php _e('Always show', BWG()->prefix); ?></label>
3173
+ <input type="radio" name="album_extended_image_title_show_hover" id="album_extended_image_title_show_hover_2" value="none" <?php if ($row->album_extended_image_title_show_hover == "none") echo 'checked="checked"'; ?> />
3174
+ <label for="album_extended_image_title_show_hover_2" class="wd-radio-label"><?php _e("Don't show", BWG()->prefix); ?></label>
3175
  </div>
3176
  <p class="description"><?php _e('Choose to show/hide titles of images, or display them on hover.', BWG()->prefix); ?></p>
3177
  </div>
admin/views/Shortcode.php CHANGED
@@ -1343,6 +1343,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
1343
  }
1344
  case 'album_extended_preview': {
1345
  jQuery("#extended_album_height").val(short_code['extended_album_height']);
 
1346
  jQuery("#album_extended_thumb_width").val(short_code['extended_album_thumb_width']);
1347
  jQuery("#album_extended_thumb_height").val(short_code['extended_album_thumb_height']);
1348
  jQuery("#album_extended_image_column_number").val(short_code['extended_album_image_column_number']);
@@ -1402,7 +1403,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
1402
  else {
1403
  jQuery("#album_extended_show_gallery_description_0").attr('checked', 'checked');
1404
  }
1405
- if (short_code['extended_album_view_type'] == 'thumbnail') {
1406
  jQuery("#album_extended_view_type_1").attr('checked', 'checked');
1407
  jQuery("#for_album_extended_image_title_show_hover_0").show();
1408
  jQuery("#for_album_extended_ecommerce_icon_show_hover_0").show();
@@ -2017,8 +2018,8 @@ class ShortcodeView_bwg extends AdminView_bwg {
2017
  case 'album_extended_preview': {
2018
  title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
2019
  tagtext += ' album_id="' + jQuery("#album").val() + '"';
2020
-
2021
  tagtext += ' extended_album_height="' + jQuery("#extended_album_height").val() + '"';
 
2022
  tagtext += ' extended_album_thumb_width="' + jQuery("#album_extended_thumb_width").val() + '"';
2023
  tagtext += ' extended_album_thumb_height="' + jQuery("#album_extended_thumb_height").val() + '"';
2024
  tagtext += ' extended_album_image_column_number="' + jQuery("#album_extended_image_column_number").val() + '"';
@@ -2035,7 +2036,7 @@ class ShortcodeView_bwg extends AdminView_bwg {
2035
  tagtext += ' show_sort_images="' + jQuery("input[name=album_extended_show_sort_images]:checked").val() + '"';
2036
  tagtext += ' show_tag_box="' + jQuery("input[name=album_extended_show_tag_box]:checked").val() + '"';
2037
  tagtext += ' show_album_name="' + jQuery("input[name=show_album_extended_name]:checked").val() + '"';
2038
- tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
2039
  tagtext += ' show_gallery_description="' + jQuery("input[name=album_extended_show_gallery_description]:checked").val() + '"';
2040
  tagtext += ' extended_album_view_type="' + jQuery("input[name=album_extended_view_type]:checked").val() + '"';
2041
  tagtext += ' extended_album_image_title="' + jQuery("input[name=album_extended_image_title_show_hover]:checked").val() + '"';
1343
  }
1344
  case 'album_extended_preview': {
1345
  jQuery("#extended_album_height").val(short_code['extended_album_height']);
1346
+ jQuery("#extended_album_column_number_" + short_code['extended_album_column_number']).attr('checked', 'checked');
1347
  jQuery("#album_extended_thumb_width").val(short_code['extended_album_thumb_width']);
1348
  jQuery("#album_extended_thumb_height").val(short_code['extended_album_thumb_height']);
1349
  jQuery("#album_extended_image_column_number").val(short_code['extended_album_image_column_number']);
1403
  else {
1404
  jQuery("#album_extended_show_gallery_description_0").attr('checked', 'checked');
1405
  }
1406
+ if (short_code['extended_album_view_type'] == 'thumbnail') {
1407
  jQuery("#album_extended_view_type_1").attr('checked', 'checked');
1408
  jQuery("#for_album_extended_image_title_show_hover_0").show();
1409
  jQuery("#for_album_extended_ecommerce_icon_show_hover_0").show();
2018
  case 'album_extended_preview': {
2019
  title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
2020
  tagtext += ' album_id="' + jQuery("#album").val() + '"';
 
2021
  tagtext += ' extended_album_height="' + jQuery("#extended_album_height").val() + '"';
2022
+ tagtext += ' extended_album_column_number="' + jQuery("input[name=extended_album_column_number]:checked").val() + '"';
2023
  tagtext += ' extended_album_thumb_width="' + jQuery("#album_extended_thumb_width").val() + '"';
2024
  tagtext += ' extended_album_thumb_height="' + jQuery("#album_extended_thumb_height").val() + '"';
2025
  tagtext += ' extended_album_image_column_number="' + jQuery("#album_extended_image_column_number").val() + '"';
2036
  tagtext += ' show_sort_images="' + jQuery("input[name=album_extended_show_sort_images]:checked").val() + '"';
2037
  tagtext += ' show_tag_box="' + jQuery("input[name=album_extended_show_tag_box]:checked").val() + '"';
2038
  tagtext += ' show_album_name="' + jQuery("input[name=show_album_extended_name]:checked").val() + '"';
2039
+ tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
2040
  tagtext += ' show_gallery_description="' + jQuery("input[name=album_extended_show_gallery_description]:checked").val() + '"';
2041
  tagtext += ' extended_album_view_type="' + jQuery("input[name=album_extended_view_type]:checked").val() + '"';
2042
  tagtext += ' extended_album_image_title="' + jQuery("input[name=album_extended_image_title_show_hover]:checked").val() + '"';
admin/views/Themes.php CHANGED
@@ -503,7 +503,7 @@ class ThemesView_bwg extends AdminView_bwg {
503
  </td>
504
  </tr>
505
  <tr>
506
- <td class="spider_label"><label for="thumb_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
507
  <td>
508
  <select name="thumb_gal_title_align" id="thumb_gal_title_align">
509
  <?php
@@ -825,7 +825,7 @@ class ThemesView_bwg extends AdminView_bwg {
825
  </td>
826
  </tr>
827
  <tr>
828
- <td class="spider_label"><label for="masonry_thumb_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
829
  <td>
830
  <select name="masonry_thumb_gal_title_align" id="masonry_thumb_gal_title_align">
831
  <?php
@@ -1122,7 +1122,7 @@ class ThemesView_bwg extends AdminView_bwg {
1122
  </td>
1123
  </tr>
1124
  <tr>
1125
- <td class="spider_label"><label for="mosaic_thumb_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
1126
  <td>
1127
  <select name="mosaic_thumb_gal_title_align" id="mosaic_thumb_gal_title_align">
1128
  <?php
@@ -1880,7 +1880,7 @@ class ThemesView_bwg extends AdminView_bwg {
1880
  </td>
1881
  </tr>
1882
  <tr>
1883
- <td class="spider_label"><label for="image_browser_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
1884
  <td>
1885
  <select name="image_browser_gal_title_align" id="image_browser_gal_title_align">
1886
  <?php
@@ -2255,7 +2255,7 @@ class ThemesView_bwg extends AdminView_bwg {
2255
  </td>
2256
  </tr>
2257
  <tr>
2258
- <td class="spider_label"><label for="album_compact_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
2259
  <td>
2260
  <select name="album_compact_gal_title_align" id="album_compact_gal_title_align">
2261
  <?php
@@ -2344,7 +2344,7 @@ class ThemesView_bwg extends AdminView_bwg {
2344
  </td>
2345
  </tr>
2346
  <tr>
2347
- <td class="spider_label"><label for="album_extended_thumb_align0"><?php echo __('Thumbnail alignment:', BWG()->prefix); ?> </label></td>
2348
  <td>
2349
  <select name="album_extended_thumb_align" id="album_extended_thumb_align">
2350
  <?php
@@ -2369,7 +2369,7 @@ class ThemesView_bwg extends AdminView_bwg {
2369
  <td>
2370
  <select name="album_extended_thumb_hover_effect" id="album_extended_thumb_hover_effect">
2371
  <?php
2372
- foreach ($hover_effects as $key => $hover_effect) {
2373
  ?>
2374
  <option value="<?php echo $key; ?>" <?php echo (($row->album_extended_thumb_hover_effect == $key) ? 'selected="selected"' : ''); ?>><?php echo __($hover_effect, BWG()->prefix); ?></option>
2375
  <?php
@@ -2586,6 +2586,20 @@ class ThemesView_bwg extends AdminView_bwg {
2586
  <div class="wd-box-content">
2587
  <table style="clear:both;">
2588
  <tbody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2589
  <tr>
2590
  <td class="spider_label"><label for="album_extended_text_div_padding"><?php echo __('Text div padding:', BWG()->prefix); ?> </label></td>
2591
  <td>
@@ -2875,7 +2889,7 @@ class ThemesView_bwg extends AdminView_bwg {
2875
  </td>
2876
  </tr>
2877
  <tr>
2878
- <td class="spider_label"><label for="album_extended_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
2879
  <td>
2880
  <select name="album_extended_gal_title_align" id="album_extended_gal_title_align">
2881
  <?php
@@ -3223,7 +3237,7 @@ class ThemesView_bwg extends AdminView_bwg {
3223
  </td>
3224
  </tr>
3225
  <tr>
3226
- <td class="spider_label"><label for="album_masonry_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
3227
  <td>
3228
  <select name="album_masonry_gal_title_align" id="album_masonry_gal_title_align">
3229
  <?php
@@ -3528,7 +3542,7 @@ class ThemesView_bwg extends AdminView_bwg {
3528
  </td>
3529
  </tr>
3530
  <tr>
3531
- <td class="spider_label"><label for="blog_style_gal_title_align"><?php echo __('Gallery title/description alignment:', BWG()->prefix); ?> </label></td>
3532
  <td>
3533
  <select name="blog_style_gal_title_align" id="blog_style_gal_title_align">
3534
  <?php
503
  </td>
504
  </tr>
505
  <tr>
506
+ <td class="spider_label"><label for="thumb_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
507
  <td>
508
  <select name="thumb_gal_title_align" id="thumb_gal_title_align">
509
  <?php
825
  </td>
826
  </tr>
827
  <tr>
828
+ <td class="spider_label"><label for="masonry_thumb_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
829
  <td>
830
  <select name="masonry_thumb_gal_title_align" id="masonry_thumb_gal_title_align">
831
  <?php
1122
  </td>
1123
  </tr>
1124
  <tr>
1125
+ <td class="spider_label"><label for="mosaic_thumb_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
1126
  <td>
1127
  <select name="mosaic_thumb_gal_title_align" id="mosaic_thumb_gal_title_align">
1128
  <?php
1880
  </td>
1881
  </tr>
1882
  <tr>
1883
+ <td class="spider_label"><label for="image_browser_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
1884
  <td>
1885
  <select name="image_browser_gal_title_align" id="image_browser_gal_title_align">
1886
  <?php
2255
  </td>
2256
  </tr>
2257
  <tr>
2258
+ <td class="spider_label"><label for="album_compact_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
2259
  <td>
2260
  <select name="album_compact_gal_title_align" id="album_compact_gal_title_align">
2261
  <?php
2344
  </td>
2345
  </tr>
2346
  <tr>
2347
+ <td class="spider_label"><label for="album_extended_thumb_align0"><?php echo __('Description alignment:', BWG()->prefix); ?> </label></td>
2348
  <td>
2349
  <select name="album_extended_thumb_align" id="album_extended_thumb_align">
2350
  <?php
2369
  <td>
2370
  <select name="album_extended_thumb_hover_effect" id="album_extended_thumb_hover_effect">
2371
  <?php
2372
+ foreach ($thumbnail_hover_effects as $key => $hover_effect) {
2373
  ?>
2374
  <option value="<?php echo $key; ?>" <?php echo (($row->album_extended_thumb_hover_effect == $key) ? 'selected="selected"' : ''); ?>><?php echo __($hover_effect, BWG()->prefix); ?></option>
2375
  <?php
2586
  <div class="wd-box-content">
2587
  <table style="clear:both;">
2588
  <tbody>
2589
+ <tr>
2590
+ <td class="spider_label"><label for="album_extended_title_desc_alignment"><?php _e('Title/description alignment:', BWG()->prefix); ?></label></td>
2591
+ <td>
2592
+ <select name="album_extended_title_desc_alignment" id="album_extended_title_desc_alignment">
2593
+ <?php
2594
+ foreach ( array('top', 'center', 'bottom') as $val ) {
2595
+ ?>
2596
+ <option value="<?php echo $val; ?>" <?php echo (($row->album_extended_title_desc_alignment == $val) ? 'selected="selected"' : ''); ?>><?php echo ucfirst( __($val, BWG()->prefix) ); ?></option>
2597
+ <?php
2598
+ }
2599
+ ?>
2600
+ </select><div class="spider_description"></div>
2601
+ </td>
2602
+ </tr>
2603
  <tr>
2604
  <td class="spider_label"><label for="album_extended_text_div_padding"><?php echo __('Text div padding:', BWG()->prefix); ?> </label></td>
2605
  <td>
2889
  </td>
2890
  </tr>
2891
  <tr>
2892
+ <td class="spider_label"><label for="album_extended_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
2893
  <td>
2894
  <select name="album_extended_gal_title_align" id="album_extended_gal_title_align">
2895
  <?php
3237
  </td>
3238
  </tr>
3239
  <tr>
3240
+ <td class="spider_label"><label for="album_masonry_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
3241
  <td>
3242
  <select name="album_masonry_gal_title_align" id="album_masonry_gal_title_align">
3243
  <?php
3542
  </td>
3543
  </tr>
3544
  <tr>
3545
+ <td class="spider_label"><label for="blog_style_gal_title_align"><?php echo __('Gallery title alignment:', BWG()->prefix); ?> </label></td>
3546
  <td>
3547
  <select name="blog_style_gal_title_align" id="blog_style_gal_title_align">
3548
  <?php
css/bwg_elementor_icon/bwg_elementor_icon.css ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'twbb-icons';
3
+ src: url('../../fonts/twbb-icons.eot');
4
+ src: url('../../fonts/twbb-icons.eot') format('embedded-opentype'),
5
+ url('../../fonts/twbb-icons.ttf') format('truetype'),
6
+ url('../../fonts/twbb-icons.woff') format('woff'),
7
+ url('../../fonts/twbb-icon.svg') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+
12
+ .twbb-widget-icon {
13
+ /* use !important to prevent issues with browser extensions that change fonts */
14
+ font-family: 'twbb-icons' !important;
15
+ speak: none;
16
+ font-style: normal;
17
+ font-weight: normal;
18
+ font-variant: normal;
19
+ text-transform: none;
20
+ line-height: 1;
21
+ /* Better Font Rendering =========== */
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
+ }
25
+
26
+ .twbb-widget-icon:before {
27
+ color: #556068;
28
+ }
29
+
30
+ .elementor-element:hover .twbb-widget-icon:before {
31
+ color: #d30c5c;
32
+ }
33
+
34
+ /*ICONS*/
35
+
36
+ .twbb-photo-gallery.twbb-widget-icon:before {
37
+ content: "\e906";
38
+ color: #556068;
39
+ }
40
+ .twbb-slider-wd.twbb-widget-icon:before {
41
+ content: "\e907";
42
+ color: #556068;
43
+ }
44
+ .twbb-form-maker.twbb-widget-icon:before {
45
+ content: "\e908";
46
+ color: #556068;
47
+ }
css/font-awesome/font-awesome.css CHANGED
@@ -10,6 +10,7 @@
10
  src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), url('fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');
11
  font-weight: normal;
12
  font-style: normal;
 
13
  }
14
  #spider_popup_wrap .fa,
15
  div[id^="bwg_container"] .fa,
10
  src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'), url('fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), url('fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), url('fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), url('fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');
11
  font-weight: normal;
12
  font-style: normal;
13
+ font-display: fallback;
14
  }
15
  #spider_popup_wrap .fa,
16
  div[id^="bwg_container"] .fa,
css/font-awesome/font-awesome.min.css CHANGED
@@ -1,4 +1,4 @@
1
  /*!
2
  * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
3
  * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4
- */.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.fa-fw,.fa-li{text-align:center}@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?v=4.6.3);src:url(fonts/fontawesome-webfont.eot?#iefix&v=4.6.3) format('embedded-opentype'),url(fonts/fontawesome-webfont.woff2?v=4.6.3) format('woff2'),url(fonts/fontawesome-webfont.woff?v=4.6.3) format('woff'),url(fonts/fontawesome-webfont.ttf?v=4.6.3) format('truetype'),url(fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular) format('svg');font-weight:400;font-style:normal}#bwg_rotate_image .fa,#spider_popup_wrap .fa,div[id^=bwg_container] .fa{display:inline-block;font-family:FontAwesome!important;font-style:normal;font-weight:400;text-rendering:auto;line-height:1!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before,.fa-resize-full:before{content:"\f065"}.fa-compress:before,.fa-resize-small:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before,.fa-resize-vertical:before{content:"\f07d"}.fa-arrows-h:before,.fa-resize-horizontal:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before,.fa-fullscreen:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:"\f2a3"}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-sign-language:before,.fa-signing:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
1
  /*!
2
  * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
3
  * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4
+ */.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.fa-fw,.fa-li{text-align:center}@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?v=4.6.3);src:url(fonts/fontawesome-webfont.eot?#iefix&v=4.6.3) format('embedded-opentype'),url(fonts/fontawesome-webfont.woff2?v=4.6.3) format('woff2'),url(fonts/fontawesome-webfont.woff?v=4.6.3) format('woff'),url(fonts/fontawesome-webfont.ttf?v=4.6.3) format('truetype'),url(fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular) format('svg');font-weight:400;font-style:normal;font-display: fallback}#bwg_rotate_image .fa,#spider_popup_wrap .fa,div[id^=bwg_container] .fa{display:inline-block;font-family:FontAwesome!important;font-style:normal;font-weight:400;text-rendering:auto;line-height:1!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before,.fa-resize-full:before{content:"\f065"}.fa-compress:before,.fa-resize-small:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before,.fa-resize-vertical:before{content:"\f07d"}.fa-arrows-h:before,.fa-resize-horizontal:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before,.fa-fullscreen:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-y-combinator:before,.fa-yc:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-television:before,.fa-tv:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:"\f2a3"}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-sign-language:before,.fa-signing:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
filemanager/UploadHandler.php CHANGED
@@ -196,19 +196,18 @@ class bwg_UploadHandler {
196
  return strpos($url, '?') === false ? '?' : '&';
197
  }
198
 
199
- protected function get_download_url($file_name, $version = null) {
200
  if ($this->options['download_via_php']) {
201
- $url = $this->options['script_url']
202
- .$this->get_query_separator($this->options['script_url'])
203
- .'file='.rawurlencode($file_name);
204
  if ($version) {
205
  $url .= '&version='.rawurlencode($version);
206
  }
207
  return $url.'&download=1';
208
  }
209
  $version_path = empty($version) ? '' : rawurlencode($version).'/';
210
- return $this->options['upload_url'].$this->get_user_path().'/'
211
- .$version_path.rawurlencode($file_name);
 
212
  }
213
 
214
  protected function set_file_delete_properties($file) {
@@ -238,7 +237,6 @@ class bwg_UploadHandler {
238
  clearstatcache(true, $file_path);
239
  }*/
240
  return $this->fix_integer_overflow(filesize($file_path));
241
-
242
  }
243
 
244
  protected function is_valid_file_object($file_name) {
@@ -256,12 +254,12 @@ class bwg_UploadHandler {
256
  $file->size = $this->get_file_size(
257
  $this->get_upload_path($file_name)
258
  );
259
- $file->url = $this->get_download_url($file->name);
260
  foreach($this->options['image_versions'] as $version => $options) {
261
  if (!empty($version)) {
262
  if (is_file($this->get_upload_path($file_name, $version))) {
263
  $file->{$version.'_url'} = $this->get_download_url(
264
- $file->name,
265
  $version
266
  );
267
  }
@@ -493,10 +491,7 @@ class bwg_UploadHandler {
493
  foreach($this->options['image_versions'] as $version => $options) {
494
  if ($this->create_scaled_image($file->name, $version, $options)) {
495
  if (!empty($version)) {
496
- $file->{$version.'_url'} = $this->get_download_url(
497
- $file->name,
498
- $version
499
- );
500
  }
501
  else {
502
  $file->size = $this->get_file_size($file_path, true);
@@ -510,12 +505,10 @@ class bwg_UploadHandler {
510
  case 0:
511
  break;
512
  case 1:
513
- $file->error = 'Failed to create scaled version: '
514
- .$failed_versions[0];
515
  break;
516
  default:
517
- $file->error = 'Failed to create scaled versions: '
518
- .implode($failed_versions,', ');
519
  }
520
  }
521
 
@@ -575,7 +568,7 @@ class bwg_UploadHandler {
575
  $file->name = $name;
576
  $file->size = $this->fix_integer_overflow(intval($size));
577
  $file->type = $type;
578
- $file->url = $this->get_download_url($file->name);
579
  list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
580
  if ($this->options['max_width'] && $this->options['max_height']) {
581
  // Zip Upload.
@@ -595,83 +588,81 @@ class bwg_UploadHandler {
595
  }
596
 
597
  protected function handle_file_import($uploaded_file, $name) {
598
- $parent_dir = wp_upload_dir();
599
- $basedir = $parent_dir['basedir'];
600
-
601
- $file_type_array = explode('.', $name);
602
- $type = strtolower(end($file_type_array));
603
- $file = new stdClass();
604
- if ( WDWLibrary::allowed_upload_types($type) ) {
605
- $file->error = false;
606
- $file->name = $this->get_file_name($name, $type, 0, "");
607
- $file->type = $type;
608
- $this->handle_form_data($file, 0);
609
- $upload_dir = $this->get_upload_path();
610
- if ( !is_dir($upload_dir) ) {
611
- mkdir($upload_dir, $this->options['mkdir_mode'], true);
612
- }
613
- $file_path = $this->get_upload_path($file->name);
614
- copy($basedir . '/' . $uploaded_file, $file_path);
615
 
616
- if ( $this->options['max_width'] && $this->options['max_height'] ) {
617
- // Media library Upload.
618
- $this->create_scaled_image($file->name, 'main', $this->options);
619
- }
620
- list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
621
- if ( is_int($img_width) ) {
622
- $this->handle_image_file($file_path, $file);
623
- }
624
- $this->set_file_delete_properties($file);
625
-
626
- // Additional information.
627
- $file->filetype = $type;
628
- $file->filename = str_replace('.' . $file->filetype, '', $file->name);
629
- $file->alt = $file->filename;
630
- $file->reliative_url = $this->options['upload_url'] . '/' . $this->options['media_library_folder'] . $file->name;
631
- $file->url = '/' . $this->options['media_library_folder'] . '/' . $file->name;
632
- $file->thumb = $this->options['upload_url'] . '/' . $this->options['media_library_folder'] . '/thumb/' . $file->name;
633
- $file->thumb_url = '/' . $this->options['media_library_folder'] . '/thumb/' . $file->name;
634
-
635
- $file_size_kb = (int)(filesize($file_path) / 1024);
636
- $file->size = $file_size_kb . ' KB';
637
- $file->date_modified = date('d F Y, H:i', filemtime($file_path));
638
- $image_info = getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
639
- $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
640
-
641
- if ( BWG()->options->read_metadata ) {
642
- $exif = WDWLibrary::read_image_metadata($upload_dir . '.original/' . $file->name);
643
- $file->credit = $exif['credit'];
644
- $file->aperture = $exif['aperture'];
645
- $file->camera = $exif['camera'];
646
- $file->caption = $exif['caption'];
647
- $file->iso = $exif['iso'];
648
- $file->orientation = $exif['orientation'];
649
- $file->copyright = $exif['copyright'];
650
- $file->alt = $exif['title'] ? $exif['title'] : $file->filename;
651
- $file->tags = $exif['tags'];
652
- }
653
- }
654
- else {
655
- $file->error = true;
656
- }
657
-
658
- return $file;
659
  }
660
 
661
- protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) {
662
  $file = new stdClass();
 
 
663
  $file->name = $this->get_file_name($name, $type, $index, $content_range);
664
  $file->size = $this->fix_integer_overflow(intval($size));
665
  $file->type = $type;
666
- if ($this->validate($uploaded_file, $file, $error, $index)) {
667
  $this->handle_form_data($file, $index);
668
  $upload_dir = $this->get_upload_path();
669
  if (!is_dir($upload_dir)) {
670
  mkdir($upload_dir, $this->options['mkdir_mode'], true);
671
  }
672
  $file_path = $this->get_upload_path($file->name);
673
- $append_file = $content_range && is_file($file_path) &&
674
- $file->size > $this->get_file_size($file_path);
675
  if ($uploaded_file && is_uploaded_file($uploaded_file)) {
676
  // multipart/formdata uploads (POST method uploads)
677
  if ($append_file) {
@@ -699,7 +690,7 @@ class bwg_UploadHandler {
699
  // Upload.
700
  $this->create_scaled_image($file->name, 'main', $this->options);
701
  }
702
- $file->url = $this->get_download_url($file->name);
703
  list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
704
  if (is_int($img_width)) {
705
  $this->handle_image_file($file_path, $file);
@@ -715,7 +706,26 @@ class bwg_UploadHandler {
715
  $file->error = 'abort';
716
  }
717
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
718
  $this->set_file_delete_properties($file);
 
719
  }
720
  return $file;
721
  }
@@ -865,14 +875,31 @@ class bwg_UploadHandler {
865
  }
866
 
867
  public function post($print_response = true) {
868
- if ( isset($_REQUEST['import']) && $_REQUEST['import'] == 1 ) {
869
- $file_names = json_decode(isset($_REQUEST['file_namesML']) ? stripslashes($_REQUEST['file_namesML']) : '');
 
870
  $files = array();
871
- foreach ($file_names as $index => $value) {
872
- $file_name_array = explode('/', $value);
873
- $files[] = $this->handle_file_import($value, end($file_name_array));
874
- }
875
- echo json_encode($files);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876
  return;
877
  }
878
  if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') {
@@ -898,14 +925,15 @@ class bwg_UploadHandler {
898
  $extension = explode(".", $filename);
899
  $extension = end($extension);
900
  $filename = str_replace('.' . $extension, strtolower('.' . $extension), $filename);
901
- $files[] = $this->handle_file_upload(
902
  $upload['tmp_name'][$index],
903
  $filename,
904
  $size ? $size : $upload['size'][$index],
905
  $upload['type'][$index],
906
  $upload['error'][$index],
907
  $index,
908
- $content_range
 
909
  );
910
  }
911
  }
@@ -919,19 +947,23 @@ class bwg_UploadHandler {
919
  $files[] = $this->handle_file_upload(
920
  isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
921
  $filename,
922
- $size ? $size : (isset($upload['size']) ?
923
- $upload['size'] : $_SERVER['CONTENT_LENGTH']),
924
- isset($upload['type']) ?
925
- $upload['type'] : $_SERVER['CONTENT_TYPE'],
926
  isset($upload['error']) ? $upload['error'] : null,
927
  null,
928
- $content_range
 
929
  );
930
  }
931
- return $this->generate_response(
932
- array($this->options['param_name'] => $files),
933
- $print_response
934
- );
 
 
 
 
 
935
  }
936
 
937
  public function delete($print_response = true) {
@@ -951,6 +983,49 @@ class bwg_UploadHandler {
951
  return $this->generate_response(array('success' => $success), $print_response);
952
  }
953
 
954
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
955
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
956
  die();
196
  return strpos($url, '?') === false ? '?' : '&';
197
  }
198
 
199
+ protected function get_download_url($file, $version = null) {
200
  if ($this->options['download_via_php']) {
201
+ $url = $this->options['script_url'] . $this->get_query_separator($this->options['script_url']) . 'file='.rawurlencode($file->name);
 
 
202
  if ($version) {
203
  $url .= '&version='.rawurlencode($version);
204
  }
205
  return $url.'&download=1';
206
  }
207
  $version_path = empty($version) ? '' : rawurlencode($version).'/';
208
+ $file_path = !empty($file->path) ? $file->path : '';
209
+ $url = $this->options['upload_url'].$this->get_user_path() . $file_path . $version_path . rawurlencode($file->name);
210
+ return $url;
211
  }
212
 
213
  protected function set_file_delete_properties($file) {
237
  clearstatcache(true, $file_path);
238
  }*/
239
  return $this->fix_integer_overflow(filesize($file_path));
 
240
  }
241
 
242
  protected function is_valid_file_object($file_name) {
254
  $file->size = $this->get_file_size(
255
  $this->get_upload_path($file_name)
256
  );
257
+ $file->url = $this->get_download_url($file);
258
  foreach($this->options['image_versions'] as $version => $options) {
259
  if (!empty($version)) {
260
  if (is_file($this->get_upload_path($file_name, $version))) {
261
  $file->{$version.'_url'} = $this->get_download_url(
262
+ $file,
263
  $version
264
  );
265
  }
491
  foreach($this->options['image_versions'] as $version => $options) {
492
  if ($this->create_scaled_image($file->name, $version, $options)) {
493
  if (!empty($version)) {
494
+ $file->{$version.'_url'} = $this->get_download_url($file, $version);
 
 
 
495
  }
496
  else {
497
  $file->size = $this->get_file_size($file_path, true);
505
  case 0:
506
  break;
507
  case 1:
508
+ $file->error = 'Failed to create scaled version: ' .$failed_versions[0];
 
509
  break;
510
  default:
511
+ $file->error = 'Failed to create scaled versions: ' .implode($failed_versions,', ');
 
512
  }
513
  }
514
 
568
  $file->name = $name;
569
  $file->size = $this->fix_integer_overflow(intval($size));
570
  $file->type = $type;
571
+ $file->url = $this->get_download_url($file);
572
  list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
573
  if ($this->options['max_width'] && $this->options['max_height']) {
574
  // Zip Upload.
588
  }
589
 
590
  protected function handle_file_import($uploaded_file, $name) {
591
+ $parent_dir = wp_upload_dir();
592
+ $basedir = $parent_dir['basedir'];
593
+ $file_type_array = explode('.', $name);
594
+ $type = strtolower(end($file_type_array));
595
+ $file = new stdClass();
596
+ if ( WDWLibrary::allowed_upload_types($type) ) {
597
+ $file->error = false;
598
+ $file->name = $this->get_file_name($name, $type, 0, "");
599
+ $file->type = $type;
600
+ $this->handle_form_data($file, 0);
601
+ $upload_dir = $this->get_upload_path();
602
+ if ( !is_dir($upload_dir) ) {
603
+ mkdir($upload_dir, $this->options['mkdir_mode'], true);
604
+ }
605
+ $file_path = $this->get_upload_path($file->name);
606
+ copy($basedir . '/' . $uploaded_file, $file_path);
 
607
 
608
+ if ( $this->options['max_width'] && $this->options['max_height'] ) {
609
+ // Media library Upload.
610
+ $this->create_scaled_image($file->name, 'main', $this->options);
611
+ }
612
+ list($img_width) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
613
+ if ( is_int($img_width) ) {
614
+ $this->handle_image_file($file_path, $file);
615
+ }
616
+ $this->set_file_delete_properties($file);
617
+ // Additional information.
618
+ $file->path = '/' . $this->options['media_library_folder'];
619
+ $file->filetype = $type;
620
+ $file->filename = str_replace('.' . $file->filetype, '', $file->name);
621
+ $file->alt = $file->filename;
622
+ $file->reliative_url = $this->options['upload_url'] . '/' . $this->options['media_library_folder'] . $file->name;
623
+ $file->url = '/' . $this->options['media_library_folder'] . $file->name;
624
+ $file->thumb = $this->options['upload_url'] . '/' . $this->options['media_library_folder'] . 'thumb/' . $file->name;
625
+ $file->thumb_url = '/' . $this->options['media_library_folder'] . 'thumb/' . $file->name;
626
+ $file_size_kb = (int)(filesize($file_path) / 1024);
627
+ $file->size = $file_size_kb . ' KB';
628
+ $file->date_modified = date('Y-m-d H:i:s', filemtime($file_path));
629
+ $image_info = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
630
+ $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
631
+ if ( BWG()->options->read_metadata ) {
632
+ $meta = WDWLibrary::read_image_metadata($upload_dir . '.original/' . $file->name);
633
+ $file->credit = $meta['credit'];
634
+ $file->aperture = $meta['aperture'];
635
+ $file->camera = $meta['camera'];
636
+ $file->caption = $meta['caption'];
637
+ $file->iso = $meta['iso'];
638
+ $file->orientation = $meta['orientation'];
639
+ $file->copyright = $meta['copyright'];
640
+ $file->alt = $meta['title'] ? $meta['title'] : $file->filename;
641
+ $file->tags = $meta['tags'];
642
+ }
643
+ }
644
+ else {
645
+ $file->error = true;
646
+ }
647
+ return $file;
 
 
 
648
  }
649
 
650
+ protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null, $path = '') {
651
  $file = new stdClass();
652
+ $file->dir = $this->get_upload_path();
653
+ $file->path = $path;
654
  $file->name = $this->get_file_name($name, $type, $index, $content_range);
655
  $file->size = $this->fix_integer_overflow(intval($size));
656
  $file->type = $type;
657
+ if ( $this->validate($uploaded_file, $file, $error, $index) ) {
658
  $this->handle_form_data($file, $index);
659
  $upload_dir = $this->get_upload_path();
660
  if (!is_dir($upload_dir)) {
661
  mkdir($upload_dir, $this->options['mkdir_mode'], true);
662
  }
663
  $file_path = $this->get_upload_path($file->name);
664
+ $append_file = $content_range && is_file($file_path) &&
665
+ $file->size = $this->get_file_size($file_path);
666
  if ($uploaded_file && is_uploaded_file($uploaded_file)) {
667
  // multipart/formdata uploads (POST method uploads)
668
  if ($append_file) {
690
  // Upload.
691
  $this->create_scaled_image($file->name, 'main', $this->options);
692
  }
693
+ $file->url = $this->get_download_url($file);
694
  list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
695
  if (is_int($img_width)) {
696
  $this->handle_image_file($file_path, $file);
706
  $file->error = 'abort';
707
  }
708
  }
709
+
710
+ $file->filename = str_replace( "_", " ", substr($file->name, 0, strrpos($file->name, '.')) );
711
+ $file_ex = explode('.', $file->name);
712
+ $file->type = strtolower(end($file_ex));
713
+ $file->thumb = $file->name;
714
+ $file->size = (int)($file->size / 1024) . ' KB';
715
+ $image_info = @getimagesize(htmlspecialchars_decode($file->url, ENT_COMPAT | ENT_QUOTES));
716
+ $file->resolution = $image_info[0] . ' x ' . $image_info[1] . ' px';
717
+ $meta = WDWLibrary::read_image_metadata( $file->dir . '/.original/' . $file->name );
718
+ $file->alt = (BWG()->options->read_metadata && $meta['title']) ? $meta['title'] : str_replace("_", " ", $file->filename);
719
+ $file->credit = !empty($meta['credit']) ? $meta['credit'] : '';
720
+ $file->aperture = !empty($meta['aperture']) ? $meta['aperture'] : '';
721
+ $file->camera = !empty($meta['camera']) ? $meta['camera'] : '';
722
+ $file->caption = !empty($meta['caption']) ? $meta['caption'] : '';
723
+ $file->iso = !empty($meta['iso']) ? $meta['iso'] : '';
724
+ $file->orientation = !empty($meta['orientation']) ? $meta['orientation'] : '';
725
+ $file->copyright = !empty($meta['copyright']) ? $meta['copyright']: '';
726
+ $file->tags = !empty($meta['tags']) ? $meta['tags'] : '';
727
  $this->set_file_delete_properties($file);
728
+ // $file->date_modified = date('d F Y, H:i');
729
  }
730
  return $file;
731
  }
875
  }
876
 
877
  public function post($print_response = true) {
878
+ global $wpdb;
879
+ $path = isset($_REQUEST['dir']) ? str_replace('\\', '', ($_REQUEST['dir'])) . '/' : '/';
880
+ if ( isset($_REQUEST['import']) && $_REQUEST['import'] == 1 ) {
881
  $files = array();
882
+ $file_names = json_decode( isset($_REQUEST['file_namesML']) ? stripslashes($_REQUEST['file_namesML']) : array() );
883
+ if ( !empty($file_names) ) {
884
+ // Create IMPORTED_FROM_MEDIA_LIBRAY folder.
885
+ if ( !is_dir( $this->get_upload_path() ) ) {
886
+ $folder = new stdClass();
887
+ $folder_name = trim($this->options['media_library_folder'],'/');
888
+ $folder->path = '/';
889
+ $folder->name = $folder_name;
890
+ $folder->filename = $folder_name;
891
+ $folder->alt = $folder_name;
892
+ $wpdb->insert( $wpdb->prefix . 'bwg_file_paths', $this->set_folder_info($folder) );
893
+ }
894
+ // Adding images on IMPORTED_FROM_MEDIA_LIBRAY folder.
895
+ foreach ($file_names as $index => $value) {
896
+ $file_name_array = explode('/', $value);
897
+ $file_info = $this->handle_file_import($value, end($file_name_array));
898
+ $files[] = $file_info;
899
+ $wpdb->insert($wpdb->prefix . 'bwg_file_paths', $this->set_file_info($file_info) );
900
+ }
901
+ echo json_encode($files);
902
+ }
903
  return;
904
  }
905
  if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') {
925
  $extension = explode(".", $filename);
926
  $extension = end($extension);
927
  $filename = str_replace('.' . $extension, strtolower('.' . $extension), $filename);
928
+ $files[] = $this->handle_file_upload(
929
  $upload['tmp_name'][$index],
930
  $filename,
931
  $size ? $size : $upload['size'][$index],
932
  $upload['type'][$index],
933
  $upload['error'][$index],
934
  $index,
935
+ $content_range,
936
+ $path
937
  );
938
  }
939
  }
947
  $files[] = $this->handle_file_upload(
948
  isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
949
  $filename,
950
+ $size ? $size : (isset($upload['size']) ? $upload['size'] : $_SERVER['CONTENT_LENGTH']),
951
+ isset($upload['type']) ? $upload['type'] : $_SERVER['CONTENT_TYPE'],
 
 
952
  isset($upload['error']) ? $upload['error'] : null,
953
  null,
954
+ $content_range,
955
+ $path
956
  );
957
  }
958
+
959
+ if ( !empty($files) ) {
960
+ foreach( $files as $file ) {
961
+ if ( empty($file->error) ) {
962
+ $wpdb->insert($wpdb->prefix . 'bwg_file_paths', $this->set_file_info($file) );
963
+ }
964
+ }
965
+ }
966
+ return $this->generate_response( array($this->options['param_name'] => $files), $print_response);
967
  }
968
 
969
  public function delete($print_response = true) {
983
  return $this->generate_response(array('success' => $success), $print_response);
984
  }
985
 
986
+ /**
987
+ * Set folder info
988
+ *
989
+ * @param $info
990
+ * @return mixed
991
+ */
992
+ private function set_folder_info( $info ) {
993
+ $data['is_dir'] = 1;
994
+ $data['path'] = $info->path;
995
+ $data['name'] = $info->name;
996
+ $data['filename'] = $info->name;
997
+ $data['thumb'] = '/filemanager/images/dir.png';
998
+ $data['alt'] = $info->alt;
999
+ $data['date_modified'] = date("Y-m-d H:i:s");
1000
+ return $data;
1001
+ }
1002
 
1003
+ /**
1004
+ * Set file info.
1005
+ *
1006
+ * @param $info
1007
+ * @return mixed
1008
+ */
1009
+ private function set_file_info( $info ) {
1010
+ $data['is_dir'] = 0;
1011
+ $data['path'] = $info->path;
1012
+ $data['type'] = $info->type;
1013
+ $data['name'] = $info->name;
1014
+ $data['filename'] = $info->filename;
1015
+ $data['alt'] = $info->alt;
1016
+ $data['thumb'] = 'thumb/' . $info->name;
1017
+ $data['size'] = $info->size;
1018
+ $data['resolution'] = $info->resolution;
1019
+ $data['credit'] = $info->credit;
1020
+ $data['aperture'] = $info->aperture;
1021
+ $data['camera'] = $info->camera;
1022
+ $data['caption'] = $info->caption;
1023
+ $data['iso'] = $info->iso;
1024
+ $data['orientation'] = $info->orientation;
1025
+ $data['copyright'] = $info->copyright;
1026
+ $data['tags'] = $info->tags;
1027
+ $data['date_modified'] = date('Y-m-d H:i:s');
1028
+ return $data;
1029
+ }
1030
+ }
1031
  die();
filemanager/controller.php CHANGED
@@ -1,15 +1,23 @@
1
  <?php
2
  /**
3
- * Author: Rob
4
- * Date: 6/24/13
5
- * Time: 10:57 AM
6
  */
7
-
8
  class FilemanagerController {
 
 
 
 
9
  public $uploads_dir;
10
  public $uploads_url;
 
11
 
12
  public function __construct() {
 
 
 
 
 
 
13
  $this->uploads_dir = BWG()->upload_dir;
14
  $this->uploads_url = BWG()->upload_url;
15
  }
@@ -33,27 +41,127 @@ class FilemanagerController {
33
  }
34
 
35
  public function display() {
36
- require_once BWG()->plugin_dir . '/filemanager/model.php';
37
- $model = new FilemanagerModel($this);
38
- require_once BWG()->plugin_dir . '/filemanager/view.php';
39
- $view = new FilemanagerView($this, $model);
40
- $view->display();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
 
43
- private function esc_dir($dir) {
44
- $dir = str_replace('../', '', $dir);
45
-
46
- return $dir;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  public function make_dir() {
 
50
  $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', esc_html($_REQUEST['dir'])) : '');
51
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
52
  $input_dir = $this->esc_dir($input_dir);
53
 
54
  $cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
55
 
56
- $new_dir_path = $cur_dir_path . '/' . (isset($_REQUEST['new_dir_name']) ? stripslashes(esc_html(sanitize_file_name($_REQUEST['new_dir_name']))) : '');
 
57
  $new_dir_path = htmlspecialchars_decode($new_dir_path, ENT_COMPAT | ENT_QUOTES);
58
  $new_dir_path = $this->esc_dir($new_dir_path);
59
 
@@ -62,13 +170,23 @@ class FilemanagerController {
62
  }
63
  else {
64
  $msg = '';
 
 
 
 
 
 
 
 
 
 
65
  mkdir($new_dir_path);
66
  }
67
  $args = array(
68
  'action' => 'addImages',
69
  'filemanager_msg' => $msg,
70
- 'width' => '850',
71
- 'height' => '550',
72
  'task' => 'display',
73
  'extensions' => esc_html($_REQUEST['extensions']),
74
  'callback' => esc_html($_REQUEST['callback']),
@@ -81,7 +199,37 @@ class FilemanagerController {
81
  exit;
82
  }
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  public function rename_item() {
 
85
  $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', esc_html($_REQUEST['dir'])) : '');
86
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
87
  $input_dir = $this->esc_dir($input_dir);
@@ -100,9 +248,7 @@ class FilemanagerController {
100
  $file_path = $cur_dir_path . '/' . $file_name;
101
  $thumb_file_path = $cur_dir_path . '/thumb/' . $file_name;
102
  $original_file_path = $cur_dir_path . '/.original/' . $file_name;
103
-
104
  $msg = '';
105
- global $wpdb;
106
 
107
  if (file_exists($file_path) == false) {
108
  $msg = __("File doesn't exist.", BWG()->prefix);
@@ -117,7 +263,27 @@ class FilemanagerController {
117
  thumb_url = INSERT(thumb_url, LOCATE("' . $input_dir . '/' . $file_name . '", thumb_url), CHAR_LENGTH("' . $input_dir . '/' . $file_name . '"), "' . $input_dir . '/' . $file_new_name . '")');
118
  $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET
119
  preview_image = INSERT(preview_image, LOCATE("' . $input_dir . '/' . $file_name . '", preview_image), CHAR_LENGTH("' . $input_dir . '/' . $file_name . '"), "' . $input_dir . '/' . $file_new_name . '")');
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  }
122
  elseif ((strrpos($file_name, '.') !== false)) {
123
  $file_extension = substr($file_name, strrpos($file_name, '.') + 1);
@@ -132,10 +298,22 @@ class FilemanagerController {
132
  ), array(
133
  'thumb_url' => $input_dir . '/thumb/' . $file_name,
134
  ));
135
- $wpdb->update($wpdb->prefix . 'bwg_gallery', array(
136
- 'preview_image' => $input_dir . '/thumb/' . $file_new_name . '.' . $file_extension,
137
- ), array(
138
- 'preview_image' => $input_dir . '/thumb/' . $file_name));
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
  rename($thumb_file_path, $cur_dir_path . '/thumb/' . $file_new_name . '.' . $file_extension);
141
  rename($original_file_path, $cur_dir_path . '/.original/' . $file_new_name . '.' . $file_extension);
@@ -143,13 +321,13 @@ class FilemanagerController {
143
  }
144
  else {
145
  $msg = __("Can't rename the file.", BWG()->prefix);
146
- }
147
  $_REQUEST['file_names'] = '';
148
  $args = array(
149
  'action' => 'addImages',
150
  'filemanager_msg' => $msg,
151
- 'width' => '850',
152
- 'height' => '550',
153
  'task' => 'display',
154
  'extensions' => esc_html($_REQUEST['extensions']),
155
  'callback' => esc_html($_REQUEST['callback']),
@@ -163,6 +341,7 @@ class FilemanagerController {
163
  }
164
 
165
  public function remove_items() {
 
166
  $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', ($_REQUEST['dir'])) : '');
167
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
168
  $input_dir = $this->esc_dir($input_dir);
@@ -170,8 +349,9 @@ class FilemanagerController {
170
  $cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
171
 
172
  $file_names = explode('**#**', (isset($_REQUEST['file_names']) ? stripslashes(esc_html($_REQUEST['file_names'])) : ''));
173
-
174
  $msg = '';
 
175
  foreach ($file_names as $file_name) {
176
  $file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
177
  $file_name = str_replace('../', '', $file_name);
@@ -182,6 +362,18 @@ class FilemanagerController {
182
  $msg = __("Some of the files couldn't be removed.", BWG()->prefix);
183
  }
184
  else {
 
 
 
 
 
 
 
 
 
 
 
 
185
  $this->remove_file_dir($file_path, $input_dir, $file_name);
186
  if (file_exists($thumb_file_path)) {
187
  $this->remove_file_dir($thumb_file_path);
@@ -195,8 +387,8 @@ class FilemanagerController {
195
  $args = array(
196
  'action' => 'addImages',
197
  'filemanager_msg' => $msg,
198
- 'width' => '850',
199
- 'height' => '550',
200
  'task' => 'show_file_manager',
201
  'extensions' => esc_html($_REQUEST['extensions']),
202
  'callback' => esc_html($_REQUEST['callback']),
@@ -210,132 +402,183 @@ class FilemanagerController {
210
  }
211
 
212
  public function paste_items() {
213
- $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', ($_REQUEST['dir'])) : '');
214
- $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
215
- $input_dir = $this->esc_dir($input_dir);
216
-
217
- $msg = '';
218
- $flag = TRUE;
219
-
220
- $file_names = explode('**#**', (isset($_REQUEST['clipboard_files']) ? stripslashes($_REQUEST['clipboard_files']) : ''));
221
- $src_dir = (isset($_REQUEST['clipboard_src']) ? stripslashes($_REQUEST['clipboard_src']) : '');
222
- $relative_source_dir = $src_dir;
223
- $src_dir = $src_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $src_dir;
224
- $src_dir = htmlspecialchars_decode($src_dir, ENT_COMPAT | ENT_QUOTES);
225
- $src_dir = $this->esc_dir($src_dir);
226
-
227
- $dest_dir = (isset($_REQUEST['clipboard_dest']) ? stripslashes($_REQUEST['clipboard_dest']) : '');
228
- $dest_dir = $dest_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $dest_dir;
229
- $dest_dir = htmlspecialchars_decode($dest_dir, ENT_COMPAT | ENT_QUOTES);
230
- $dest_dir = $this->esc_dir($dest_dir);
231
-
232
- switch ((isset($_REQUEST['clipboard_task']) ? stripslashes($_REQUEST['clipboard_task']) : '')) {
233
- case 'copy':
234
- foreach ($file_names as $file_name) {
235
- $file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
236
- $file_name = str_replace('../', '', $file_name);
237
- $src = $src_dir . '/' . $file_name;
238
- if (file_exists($src) == false) {
239
- $msg = "Failed to copy some of the files.";
240
- $msg = $file_name;
241
- continue;
242
- }
243
- $dest = $dest_dir . '/' . $file_name;
244
- if (!is_dir($src_dir . '/' . $file_name)) {
245
- if (!is_dir($dest_dir . '/thumb')) {
246
- mkdir($dest_dir . '/thumb', 0755);
247
- }
248
- $thumb_src = $src_dir . '/thumb/' . $file_name;
249
- $thumb_dest = $dest_dir . '/thumb/' . $file_name;
250
- if (!is_dir($dest_dir . '/.original')) {
251
- mkdir($dest_dir . '/.original', 0755);
252
- }
253
- $original_src = $src_dir . '/.original/' . $file_name;
254
- $original_dest = $dest_dir . '/.original/' . $file_name;
255
- }
256
- $i = 0;
257
- if (file_exists($dest) == true) {
258
- $path_parts = pathinfo($dest);
259
- while (file_exists($path_parts['dirname'] . '/' . $path_parts['filename'] . '(' . ++$i . ')' . '.' . $path_parts['extension'])) {
260
- }
261
- $dest = $path_parts['dirname'] . '/' . $path_parts['filename'] . '(' . $i . ')' . '.' . $path_parts['extension'];
262
- if (!is_dir($src_dir . '/' . $file_name)) {
263
- $thumb_dest = $path_parts['dirname'] . '/thumb/' . $path_parts['filename'] . '(' . $i . ')' . '.' . $path_parts['extension'];
264
- $original_dest = $path_parts['dirname'] . '/.original/' . $path_parts['filename'] . '(' . $i . ')' . '.' . $path_parts['extension'];
265
- }
266
- }
267
-
268
- if (!$this->copy_file_dir($src, $dest)) {
269
- $msg = __("Failed to copy some of the files.", BWG()->prefix);
270
- }
271
- if (!is_dir($src_dir . '/' . $file_name)) {
272
- $this->copy_file_dir($thumb_src, $thumb_dest);
273
- $this->copy_file_dir($original_src, $original_dest);
274
- }
275
- }
276
- break;
277
- case 'cut':
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  if ( $src_dir != $dest_dir ) {
279
- foreach ( $file_names as $file_name ) {
280
- $file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
281
- $file_name = str_replace('../', '', $file_name);
282
- $src = $src_dir . '/' . $file_name;
283
- $dest = $dest_dir . '/' . $file_name;
284
- if ( (file_exists($src) == FALSE) || (file_exists($dest) == TRUE) ) {
285
- $flag = FALSE;
286
- }
287
- else {
288
- $flag = rename($src, $dest);
289
- }
290
- if ( !$flag ) {
291
- $msg = __("Failed to move some of the files.", BWG()->prefix);
292
- }
293
- else {
294
- global $wpdb;
295
- if ( is_dir($dest_dir . '/' . $file_name) ) {
296
- $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_image SET
297
- image_url = INSERT(image_url, LOCATE("' . str_replace($this->uploads_dir . '/', '', $src) . '", image_url), CHAR_LENGTH("' . str_replace($this->uploads_dir . '/', '', $src) . '"), "' . str_replace(str_replace($input_dir, '', $dest_dir), '', $dest) . '"),
298
- thumb_url = INSERT(thumb_url, LOCATE("' . str_replace($this->uploads_dir . '/', '', $src) . '", thumb_url), CHAR_LENGTH("' . str_replace($this->uploads_dir . '/', '', $src) . '"), "' . str_replace(str_replace($input_dir, '', $dest_dir), '', $dest) . '")');
299
- $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET
300
- preview_image = INSERT(preview_image, LOCATE("' . str_replace($this->uploads_dir . '/', '', $src) . '", preview_image), CHAR_LENGTH("' . str_replace($this->uploads_dir . '/', '', $src) . '"), "' . str_replace(str_replace($input_dir, '', $dest_dir), '', $dest) . '")');
301
- }
302
- else {
303
- $thumb_src = $src_dir . '/thumb/' . $file_name;
304
- $thumb_dest = $dest_dir . '/thumb/' . $file_name;
305
- if ( !is_dir($dest_dir . '/thumb') ) {
306
- mkdir($dest_dir . '/thumb', 0755);
307
- }
308
- $original_src = $src_dir . '/.original/' . $file_name;
309
- $original_dest = $dest_dir . '/.original/' . $file_name;
310
- if ( !is_dir($dest_dir . '/.original') ) {
311
- mkdir($dest_dir . '/.original', 0755);
312
- }
313
- rename($thumb_src, $thumb_dest);
314
- rename($original_src, $original_dest);
315
- $wpdb->update($wpdb->prefix . 'bwg_image', array(
316
- 'filename' => $file_name,
317
- 'image_url' => str_replace(str_replace($input_dir, '', $dest_dir), '', $dest),
318
- 'thumb_url' => $input_dir . '/thumb/' . $file_name,
319
- ), array(
320
- 'thumb_url' => $relative_source_dir . '/thumb/' . $file_name,
321
- ));
322
- $wpdb->update($wpdb->prefix . 'bwg_gallery', array(
323
- 'preview_image' => $input_dir . '/thumb/' . $file_name,
324
- ), array(
325
- 'preview_image' => $relative_source_dir . '/thumb/' . $file_name,
326
- ));
327
- }
328
- }
329
- }
330
- }
331
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  }
333
 
334
- $args = array(
335
  'action' => 'addImages',
336
  'filemanager_msg' => $msg,
337
- 'width' => '850',
338
- 'height' => '550',
339
  'task' => 'show_file_manager',
340
  'extensions' => esc_html($_REQUEST['extensions']),
341
  'callback' => esc_html($_REQUEST['callback']),
@@ -444,4 +687,28 @@ class FilemanagerController {
444
  return copy($src, $dest);
445
  }
446
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  }
1
  <?php
2
  /**
3
+ * Class FilemanagerController
 
 
4
  */
 
5
  class FilemanagerController {
6
+
7
+ public $model;
8
+ public $view;
9
+
10
  public $uploads_dir;
11
  public $uploads_url;
12
+ public $page_per = 60;
13
 
14
  public function __construct() {
15
+ require_once BWG()->plugin_dir . '/filemanager/model.php';
16
+ $this->model = new FilemanagerModel($this);
17
+
18
+ require_once BWG()->plugin_dir . '/filemanager/view.php';
19
+ $this->view = new FilemanagerView($this, $this->model);
20
+
21
  $this->uploads_dir = BWG()->upload_dir;
22
  $this->uploads_url = BWG()->upload_url;
23
  }
41
  }
42
 
43
  public function display() {
44
+ $params = array();
45
+ $dir = $this->model->get_from_session('dir', '');
46
+ $search = $this->model->get_from_session('search', '');
47
+ $page_num = $this->model->get_from_session('paged', 0);
48
+ $extensions = $this->model->get_from_session('extensions', '*');
49
+ $callback = $this->model->get_from_session('callback', '');
50
+ $valid_types = explode( ',', strtolower($extensions) );
51
+
52
+ // set session data.
53
+ $session_data = array();
54
+ $session_data['sort_by'] = $this->model->get_from_session('sort_by', 'date_modified');
55
+ $session_data['sort_order'] = $this->model->get_from_session('sort_order', 'desc');
56
+ $session_data['items_view'] = $this->model->get_from_session('items_view', 'thumbs');
57
+ $session_data['clipboard_task'] = $this->model->get_from_session('clipboard_task', '');
58
+ $session_data['clipboard_files'] = $this->model->get_from_session('clipboard_files', '');
59
+ $session_data['clipboard_src'] = $this->model->get_from_session('clipboard_src', '');
60
+ $session_data['clipboard_dest'] = $this->model->get_from_session('clipboard_dest', '');
61
+ $params['session_data'] = $session_data;
62
+
63
+ $params['dir'] = ($dir == '' || $dir == '/') ? '/' : $dir .'/';
64
+ $params['path_components'] = $this->model->get_path_components( $dir );
65
+ $params['search'] = $search;
66
+ $params['page_num'] = $page_num;
67
+ $params['valid_types'] = $valid_types;
68
+ $params['orderby'] = $session_data['sort_by'];
69
+ $params['order'] = $session_data['sort_order'];
70
+ $params['page_per'] = $this->page_per;
71
+ // get file lists.
72
+ $items = $this->model->get_file_lists( $params );
73
+ $params['items'] = $items;
74
+
75
+ $pagination_args = array(
76
+ 'action' => 'addImages',
77
+ 'filemanager_msg' => '',
78
+ 'width' => '850',
79
+ 'height' => '550',
80
+ 'task' => 'pagination',
81
+ 'extensions' => '',
82
+ 'callback' => '',
83
+ 'dir' => $dir,
84
+ 'TB_iframe' => '1',
85
+ );
86
+ $ajax_pagination_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' );
87
+ $ajax_pagination_url = add_query_arg($pagination_args, $ajax_pagination_url);
88
+ $params['ajax_pagination_url'] = $ajax_pagination_url;
89
+
90
+ $all_select_args = array(
91
+ 'action' => 'addImages',
92
+ 'task' => 'get_all_select',
93
+ );
94
+ $ajax_get_all_select_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' );
95
+ $ajax_get_all_select_url = add_query_arg($all_select_args, $ajax_get_all_select_url);
96
+ $params['ajax_get_all_select_url'] = $ajax_get_all_select_url;
97
+
98
+ $this->view->display( $params );
99
  }
100
 
101
+ function pagination() {
102
+ $dir = $this->model->get_from_session('dir', '');
103
+ $dir = ($dir == '') ? '/' : $dir .'/';
104
+ $order = $this->model->get_from_session('order', 'desc');
105
+ $orderby = $this->model->get_from_session('orderby', 'date_modified');
106
+ $search = $this->model->get_from_session('search', '');
107
+ $paged = $this->model->get_from_session('paged', 0);
108
+ $page_per = $this->page_per;
109
+ $data = $this->model->get_file_lists(
110
+ array(
111
+ 'dir' => $dir,
112
+ 'order' => $order,
113
+ 'orderby' => $orderby,
114
+ 'page_num' => $paged,
115
+ 'page_per' => $page_per,
116
+ 'search' => $search
117
+ )
118
+ );
119
+ $html = '';
120
+ $i = 0;
121
+ if ( !empty($data['files']) ) {
122
+ foreach($data['files'] as $file ) {
123
+ ++$i;
124
+ $file['index'] = $paged * $this->page_per + $i;
125
+ $html .= $this->view->print_file_thumb($file);
126
+ }
127
+ }
128
+ $json = array('html' => $html);
129
+ echo json_encode($json); exit;
130
  }
131
 
132
+ function get_all_select() {
133
+ $dir = $this->model->get_from_session('dir', '');
134
+ $search = $this->model->get_from_session('search', '');
135
+ $order = $this->model->get_from_session('order', 'desc');
136
+ $orderby = $this->model->get_from_session('orderby', 'date_modified');
137
+ $data = array();
138
+ $data = $this->model->get_all_files( array('dir' => $dir, 'search' => $search, 'orderby' => $orderby, 'order' => $order) );
139
+ $json = array('data' => $data);
140
+ echo json_encode($json); exit;
141
+ }
142
+
143
+ /**
144
+ * esc dir.
145
+ * @param $dir
146
+ *
147
+ * @return mixed
148
+ */
149
+ private function esc_dir($dir) {
150
+ $dir = str_replace('../', '', $dir);
151
+
152
+ return $dir;
153
+ }
154
+
155
  public function make_dir() {
156
+ global $wpdb;
157
  $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', esc_html($_REQUEST['dir'])) : '');
158
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
159
  $input_dir = $this->esc_dir($input_dir);
160
 
161
  $cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
162
 
163
+ $new_dir_path_name = isset($_REQUEST['new_dir_name']) ? stripslashes(esc_html(sanitize_file_name($_REQUEST['new_dir_name']))) : '';
164
+ $new_dir_path = $cur_dir_path . '/' . $new_dir_path_name;
165
  $new_dir_path = htmlspecialchars_decode($new_dir_path, ENT_COMPAT | ENT_QUOTES);
166
  $new_dir_path = $this->esc_dir($new_dir_path);
167
 
170
  }
171
  else {
172
  $msg = '';
173
+ $path = $input_dir . '/';
174
+ $data = array(
175
+ 'is_dir' => 1,
176
+ 'path' => $path,
177
+ 'name' => $new_dir_path_name,
178
+ 'alt' => str_replace("_", " ", $new_dir_path_name),
179
+ 'filename' => str_replace("_", " ", $new_dir_path_name),
180
+ 'thumb' => '/filemanager/images/dir.png'
181
+ );
182
+ $wpdb->insert($wpdb->prefix . 'bwg_file_paths', $data);
183
  mkdir($new_dir_path);
184
  }
185
  $args = array(
186
  'action' => 'addImages',
187
  'filemanager_msg' => $msg,
188
+ 'bwg_width' => '850',
189
+ 'bwg_height' => '550',
190
  'task' => 'display',
191
  'extensions' => esc_html($_REQUEST['extensions']),
192
  'callback' => esc_html($_REQUEST['callback']),
199
  exit;
200
  }
201
 
202
+ public function parsing_items() {
203
+ $dir = $this->model->get_from_session('dir', '');
204
+ $dir = ($dir == '' || $dir == '/') ? '/' : $dir .'/';
205
+ $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', esc_html($_REQUEST['dir'])) : '');
206
+ $valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
207
+ $parsing = $this->model->files_parsing_db(array(
208
+ 'refresh' => true,
209
+ 'dir' => BWG()->upload_dir . $dir,
210
+ 'path' => $dir,
211
+ 'valid_types' => $valid_types,
212
+ ));
213
+ $_REQUEST['file_names'] = '';
214
+ $args = array(
215
+ 'action' => 'addImages',
216
+ 'filemanager_msg' => '',
217
+ 'width' => '850',
218
+ 'height' => '550',
219
+ 'task' => 'display',
220
+ 'extensions' => esc_html($_REQUEST['extensions']),
221
+ 'callback' => esc_html($_REQUEST['callback']),
222
+ 'dir' => $input_dir,
223
+ 'TB_iframe' => '1',
224
+ );
225
+ $query_url = wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' );
226
+ $query_url = add_query_arg($args, $query_url);
227
+ header('Location: ' . $query_url);
228
+ exit;
229
+ }
230
+
231
  public function rename_item() {
232
+ global $wpdb;
233
  $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', esc_html($_REQUEST['dir'])) : '');
234
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
235
  $input_dir = $this->esc_dir($input_dir);
248
  $file_path = $cur_dir_path . '/' . $file_name;
249
  $thumb_file_path = $cur_dir_path . '/thumb/' . $file_name;
250
  $original_file_path = $cur_dir_path . '/.original/' . $file_name;
 
251
  $msg = '';
 
252
 
253
  if (file_exists($file_path) == false) {
254
  $msg = __("File doesn't exist.", BWG()->prefix);
263
  thumb_url = INSERT(thumb_url, LOCATE("' . $input_dir . '/' . $file_name . '", thumb_url), CHAR_LENGTH("' . $input_dir . '/' . $file_name . '"), "' . $input_dir . '/' . $file_new_name . '")');
264
  $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET
265
  preview_image = INSERT(preview_image, LOCATE("' . $input_dir . '/' . $file_name . '", preview_image), CHAR_LENGTH("' . $input_dir . '/' . $file_name . '"), "' . $input_dir . '/' . $file_new_name . '")');
266
+
267
+ // Update all paths.
268
+ $path_where = (empty($input_dir) ? '/' : $input_dir .'/');
269
+ $paths = $this->getRecursivePathLists( $path_where, $file_name);
270
+ $wpdb->update($wpdb->prefix . 'bwg_file_paths',
271
+ array(
272
+ 'name' => $file_new_name,
273
+ 'filename' => $file_new_name,
274
+ 'alt' => $file_new_name
275
+ ),
276
+ array('path' => $path_where, 'name' => $file_name)
277
+ );
278
+ if ( !empty($paths) ) {
279
+ foreach( $paths as $val) {
280
+ $wpdb->update($wpdb->prefix . 'bwg_file_paths',
281
+ array('path' => str_replace($file_name, $file_new_name, $val)),
282
+ array('path' => $val)
283
+ );
284
+ }
285
+ }
286
+ }
287
  }
288
  elseif ((strrpos($file_name, '.') !== false)) {
289
  $file_extension = substr($file_name, strrpos($file_name, '.') + 1);
298
  ), array(
299
  'thumb_url' => $input_dir . '/thumb/' . $file_name,
300
  ));
301
+ $wpdb->update($wpdb->prefix . 'bwg_gallery',
302
+ array('preview_image' => $input_dir . '/thumb/' . $file_new_name . '.' . $file_extension),
303
+ array('preview_image' => $input_dir . '/thumb/' . $file_name)
304
+ );
305
+
306
+ $path = $input_dir .'/';
307
+ $wpdb->update($wpdb->prefix . 'bwg_file_paths',
308
+ array(
309
+ 'name' => $file_new_name . '.' . $file_extension,
310
+ 'filename' => $file_new_name,
311
+ 'thumb' => 'thumb/'. $file_new_name . '.' . $file_extension,
312
+ 'alt' => $file_new_name,
313
+ 'date_modified' => date('Y-m-d H:i:s')
314
+ ),
315
+ array('path' => $path, 'name' => $file_name)
316
+ );
317
 
318
  rename($thumb_file_path, $cur_dir_path . '/thumb/' . $file_new_name . '.' . $file_extension);
319
  rename($original_file_path, $cur_dir_path . '/.original/' . $file_new_name . '.' . $file_extension);
321
  }
322
  else {
323
  $msg = __("Can't rename the file.", BWG()->prefix);
324
+ }
325
  $_REQUEST['file_names'] = '';
326
  $args = array(
327
  'action' => 'addImages',
328
  'filemanager_msg' => $msg,
329
+ 'bwg_width' => '850',
330
+ 'bwg_height' => '550',
331
  'task' => 'display',
332
  'extensions' => esc_html($_REQUEST['extensions']),
333
  'callback' => esc_html($_REQUEST['callback']),
341
  }
342
 
343
  public function remove_items() {
344
+ global $wpdb;
345
  $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', ($_REQUEST['dir'])) : '');
346
  $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
347
  $input_dir = $this->esc_dir($input_dir);
349
  $cur_dir_path = $input_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $input_dir;
350
 
351
  $file_names = explode('**#**', (isset($_REQUEST['file_names']) ? stripslashes(esc_html($_REQUEST['file_names'])) : ''));
352
+ $path = $input_dir .'/';
353
  $msg = '';
354
+ $file_path_tbl = $wpdb->prefix . 'bwg_file_paths';
355
  foreach ($file_names as $file_name) {
356
  $file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
357
  $file_name = str_replace('../', '', $file_name);
362
  $msg = __("Some of the files couldn't be removed.", BWG()->prefix);
363
  }
364
  else {
365
+ if ( is_dir($file_path) == true ) {
366
+ $paths = $this->getRecursivePathLists($path, $file_name);
367
+ if ( !empty($paths) ) {
368
+ $wpdb->delete( $file_path_tbl, array('path' => $path, 'name' => $file_name) );
369
+ foreach( $paths as $val ) {
370
+ $wpdb->delete( $file_path_tbl, array('path' => $val) );
371
+ }
372
+ }
373
+ }
374
+ else {
375
+ $wpdb->delete( $file_path_tbl, array('path' => $path, 'name' => $file_name) );
376
+ }
377
  $this->remove_file_dir($file_path, $input_dir, $file_name);
378
  if (file_exists($thumb_file_path)) {
379
  $this->remove_file_dir($thumb_file_path);
387
  $args = array(
388
  'action' => 'addImages',
389
  'filemanager_msg' => $msg,
390
+ 'bwg_width' => '850',
391
+ 'bwg_height' => '550',
392
  'task' => 'show_file_manager',
393
  'extensions' => esc_html($_REQUEST['extensions']),
394
  'callback' => esc_html($_REQUEST['callback']),
402
  }
403
 
404
  public function paste_items() {
405
+ global $wpdb;
406
+ $input_dir = (isset($_REQUEST['dir']) ? str_replace('\\', '', ($_REQUEST['dir'])) : '');
407
+ $input_dir = htmlspecialchars_decode($input_dir, ENT_COMPAT | ENT_QUOTES);
408
+ $input_dir = $this->esc_dir($input_dir);
409
+
410
+ $msg = '';
411
+ $flag = TRUE;
412
+
413
+ $file_names = explode('**#**', (isset($_REQUEST['clipboard_files']) ? stripslashes($_REQUEST['clipboard_files']) : ''));
414
+ $src_dir = (isset($_REQUEST['clipboard_src']) ? stripslashes($_REQUEST['clipboard_src']) : '');
415
+ $relative_source_dir = $src_dir;
416
+ $src_dir = $src_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $src_dir;
417
+ $src_dir = htmlspecialchars_decode($src_dir, ENT_COMPAT | ENT_QUOTES);
418
+ $src_dir = $this->esc_dir($src_dir);
419
+
420
+ $dest_dir = (isset($_REQUEST['clipboard_dest']) ? stripslashes($_REQUEST['clipboard_dest']) : '');
421
+ $dest_dir = $dest_dir == '' ? $this->uploads_dir : $this->uploads_dir . '/' . $dest_dir;
422
+ $dest_dir = htmlspecialchars_decode($dest_dir, ENT_COMPAT | ENT_QUOTES);
423
+ $dest_dir = $this->esc_dir($dest_dir);
424
+
425
+ $path_old = (isset($_REQUEST['clipboard_src']) ? stripslashes($_REQUEST['clipboard_src']) .'/' : '/');
426
+ $path_new = (isset($_REQUEST['clipboard_dest']) ? stripslashes($_REQUEST['clipboard_dest']) .'/' : '/');
427
+ $file_path_tbl = $wpdb->prefix . 'bwg_file_paths';
428
+
429
+ switch ((isset($_REQUEST['clipboard_task']) ? stripslashes($_REQUEST['clipboard_task']) : '')) {
430
+ case 'copy': {
431
+ foreach ($file_names as $file_name) {
432
+ $file = $wpdb->get_row( 'SELECT * FROM `' . $file_path_tbl . '` WHERE `path` ="' . $path_old . '" AND `name`="' . $file_name . '"', 'ARRAY_A' );
433
+ unset($file['id']);
434
+ $file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
435
+ $file_name = str_replace('../', '', $file_name);
436
+ $src = $src_dir . '/' . $file_name;
437
+ if (file_exists($src) == false) {
438
+ $msg = "Failed to copy some of the files.";
439
+ $msg = $file_name;
440
+ continue;
441
+ }
442
+ $dest = $dest_dir . '/' . $file_name;
443
+ if ( !is_dir($src_dir . '/' . $file_name) ) {
444
+ if ( !is_dir($dest_dir . '/thumb') ) {
445
+ mkdir($dest_dir . '/thumb', 0755);
446
+ }
447
+ $thumb_src = $src_dir . '/thumb/' . $file_name;
448
+ $thumb_dest = $dest_dir . '/thumb/' . $file_name;
449
+ if (!is_dir($dest_dir . '/.original')) {
450
+ mkdir($dest_dir . '/.original', 0755);
451
+ }
452
+ $original_src = $src_dir . '/.original/' . $file_name;
453
+ $original_dest = $dest_dir . '/.original/' . $file_name;
454
+ }
455
+
456
+ $i = 0;
457
+ $new_file_name = '';
458
+ $new_file_title = '';
459
+ if ( file_exists($dest) == true ) {
460
+ $path_parts = pathinfo($dest);
461
+ $extension = !empty( $path_parts['extension'] ) ? '.' . $path_parts['extension'] : '';
462
+ while ( file_exists($path_parts['dirname'] . '/' . $path_parts['filename'] . '(' . ++$i . ')' . $extension )) {}
463
+ $dest = $path_parts['dirname'] . '/' . $path_parts['filename'] . '(' . $i . ')' . $extension;
464
+ $new_file_name = $path_parts['filename'] . '(' . $i . ')' . $extension;
465
+ $new_file_title = $path_parts['filename'] . '(' . $i . ')';
466
+ if ( !is_dir($src_dir . '/' . $file_name) ) {
467
+ $thumb_dest = $path_parts['dirname'] . '/thumb/' . $new_file_name;
468
+ $original_dest = $path_parts['dirname'] . '/.original/' . $new_file_name;
469
+ }
470
+ }
471
+ if ( !$this->copy_file_dir($src, $dest) ) {
472
+ $msg = __("Failed to copy some of the files.", BWG()->prefix);
473
+ }
474
+ if ( !is_dir($src_dir . '/' . $file_name) ) {
475
+ $_file_name = !empty($new_file_name) ? $new_file_name : $file_name;
476
+ $_file_title = !empty($new_file_title) ? $new_file_title : preg_replace("/\.[^.]+$/", "", $file_name);
477
+ $file['path'] = $path_new;
478
+ $file['name'] = $_file_name;
479
+ $file['thumb'] = $_file_name;
480
+ $file['filename'] = $_file_title;
481
+ $file['alt'] = $_file_title;
482
+ $wpdb->insert( $file_path_tbl, $file );
483
+ $this->copy_file_dir($thumb_src, $thumb_dest);
484
+ $this->copy_file_dir($original_src, $original_dest);
485
+ }
486
+ else {
487
+ $path_where = '/'. $file_name .'/';
488
+ $path_file = (isset($_REQUEST['clipboard_dest']) ? stripslashes($_REQUEST['clipboard_dest']) .'/' : '');
489
+
490
+ $file['path'] = $path_file;
491
+ $file['name'] = !empty($new_file_title) ? $new_file_title : $file['name'];
492
+ $file['filename'] = !empty($new_file_title) ? $new_file_title : $file['filename'];
493
+ $file['alt'] = !empty($new_file_title) ? $new_file_title : $file['alt'];
494
+ $wpdb->insert( $file_path_tbl, $file );
495
+
496
+ $files = $wpdb->get_results( 'SELECT * FROM `' . $file_path_tbl . '` WHERE `path` ="' . $path_where . '"', 'ARRAY_A' );
497
+ foreach( $files as $file ) {
498
+ unset($file['id']);
499
+ $file['path'] = $path_file . (!empty($new_file_title) ? $new_file_title .'/' : $file_name .'/');
500
+ $wpdb->insert( $file_path_tbl, $file );
501
+ }
502
+ }
503
+ }
504
+ } break;
505
+ case 'cut': {
506
  if ( $src_dir != $dest_dir ) {
507
+ foreach ( $file_names as $file_name ) {
508
+ $file_name = htmlspecialchars_decode($file_name, ENT_COMPAT | ENT_QUOTES);
509
+ $file_name = str_replace('../', '', $file_name);
510
+ $src = $src_dir . '/' . $file_name;
511
+ $dest = $dest_dir . '/' . $file_name;
512
+
513
+ if ( (file_exists($src) == FALSE) || (file_exists($dest) == TRUE) ) {
514
+ $flag = FALSE;
515
+ } else {
516
+ $flag = rename($src, $dest);
517
+ }
518
+ if ( !$flag ) {
519
+ $msg = __("Failed to move some of the files.", BWG()->prefix);
520
+ }
521
+ else {
522
+ if ( is_dir($dest_dir . '/' . $file_name) ) {
523
+ $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_image SET
524
+ image_url = INSERT(image_url, LOCATE("' . str_replace($this->uploads_dir . '/', '', $src) . '", image_url), CHAR_LENGTH("' . str_replace($this->uploads_dir . '/', '', $src) . '"), "' . str_replace(str_replace($input_dir, '', $dest_dir), '', $dest) . '"),
525
+ thumb_url = INSERT(thumb_url, LOCATE("' . str_replace($this->uploads_dir . '/', '', $src) . '", thumb_url), CHAR_LENGTH("' . str_replace($this->uploads_dir . '/', '', $src) . '"), "' . str_replace(str_replace($input_dir, '', $dest_dir), '', $dest) . '")');
526
+
527
+ $wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET preview_image =
528
+ INSERT(preview_image, LOCATE("' . str_replace($this->uploads_dir . '/', '', $src) . '", preview_image), CHAR_LENGTH("' . str_replace($this->uploads_dir . '/', '', $src) . '"), "' . str_replace(str_replace($input_dir, '', $dest_dir), '', $dest) . '")');
529
+
530
+ $paths = $this->getRecursivePathLists($path_old, $file_name);
531
+ $wpdb->update( $file_path_tbl, array('path' => $path_new), array('path' => $path_old, 'name' => $file_name) );
532
+ $path_where = $path_old . $file_name .'/';
533
+ foreach ( $paths as $val ) {
534
+ $path_update = $path_new . str_replace($path_old, '', $val);
535
+ $wpdb->update( $file_path_tbl, array('path' => $path_update), array('path' => $val) );
536
+ }
537
+ }
538
+ else {
539
+ $thumb_src = $src_dir . '/thumb/' . $file_name;
540
+ $thumb_dest = $dest_dir . '/thumb/' . $file_name;
541
+ if ( !is_dir($dest_dir . '/thumb') ) {
542
+ mkdir($dest_dir . '/thumb', 0755);
543
+ }
544
+ $original_src = $src_dir . '/.original/' . $file_name;
545
+ $original_dest = $dest_dir . '/.original/' . $file_name;
546
+ if ( !is_dir($dest_dir . '/.original') ) {
547
+ mkdir($dest_dir . '/.original', 0755);
548
+ }
549
+ rename($thumb_src, $thumb_dest);
550
+ rename($original_src, $original_dest);
551
+
552
+ $wpdb->update($wpdb->prefix . 'bwg_image',
553
+ array(
554
+ 'filename' => $file_name,
555
+ 'image_url' => str_replace(str_replace($input_dir, '', $dest_dir), '', $dest),
556
+ 'thumb_url' => $input_dir . '/thumb/' . $file_name,
557
+ ),
558
+ array(
559
+ 'thumb_url' => $relative_source_dir . '/thumb/' . $file_name,
560
+ ));
561
+ $wpdb->update($wpdb->prefix . 'bwg_gallery',
562
+ array(
563
+ 'preview_image' => $input_dir . '/thumb/' . $file_name,
564
+ ),
565
+ array(
566
+ 'preview_image' => $relative_source_dir . '/thumb/' . $file_name,
567
+ ));
568
+
569
+ $wpdb->update( $file_path_tbl, array('path' => $path_new), array('path' => $path_old, 'name' => $file_name) );
570
+ }
571
+ }
572
+ }
573
+ }
574
+ } break;
575
  }
576
 
577
+ $args = array(
578
  'action' => 'addImages',
579
  'filemanager_msg' => $msg,
580
+ 'bwg_width' => '850',
581
+ 'bwg_height' => '550',
582
  'task' => 'show_file_manager',
583
  'extensions' => esc_html($_REQUEST['extensions']),
584
  'callback' => esc_html($_REQUEST['callback']),
687
  return copy($src, $dest);
688
  }
689
  }
690
+
691
+ /**
692
+ * Get recursive path lists.
693
+ *
694
+ * @param string $path
695
+ * @param string $name
696
+ * @param int $level
697
+ *
698
+ * @return array
699
+ */
700
+ private function getRecursivePathLists( $path = '/', $name = '', $level = 0 ) {
701
+ global $wpdb;
702
+ static $parents = array();
703
+ $where = ($level == 0) ? ' AND `name`="' . $name . '"' : '';
704
+ $items = $wpdb->get_results( 'SELECT * FROM `' . $wpdb->prefix . 'bwg_file_paths` WHERE `is_dir` = 1 AND `path` ="' . $path . '"' . $where );
705
+ if( !empty($items) ) {
706
+ foreach( $items as $item) {
707
+ $path = $item->path . $item->name .'/';
708
+ $children = $this->getRecursivePathLists($path, $item->name, $level+1);
709
+ $parents[] = $path;
710
+ }
711
+ }
712
+ return $parents;
713
+ }
714
  }
filemanager/css/default.css CHANGED
@@ -791,4 +791,20 @@ a.wd-btn-primary:link {
791
 
792
  #explorer_header .item_name, #explorer_header .item_size, #explorer_header .item_date_modified {
793
  padding: 0px 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
794
  }
791
 
792
  #explorer_header .item_name, #explorer_header .item_size, #explorer_header .item_date_modified {
793
  padding: 0px 15px;
794
+ }
795
+
796
+ #explorer_body_container .fm-no-found-wrap {
797
+ position: absolute;
798
+ top: 35%;
799
+ left: 0;
800
+ right: 0;
801
+ display:none;
802
+ text-align: center;
803
+ }
804
+
805
+ #explorer_body_container .fm-no-found-wrap h2 {
806
+ font-size: 20px;
807
+ line-height: 28px;
808
+ font-weight: 400;
809
+ margin: 0;
810
  }
filemanager/js/default.js CHANGED
@@ -1,102 +1,79 @@
1
- /**
2
- * Author: Rob
3
- * Date: 4/18/13
4
- * Time: 3:56 PM
5
- */
6
-
7
- var keyFileSelected;
8
- var filesSelected;
9
  var dragFiles;
10
  var isUploading;
11
-
12
- var ajax = true;
13
-
14
  var all_files_selected = false;
 
15
  var no_selected_files = [];
16
  var wdb_all_files_filtered = [];
17
 
18
  jQuery(document).ready(function () {
19
- wdb_all_files_filtered = wdb_all_files;
20
- var all_items_count = wdb_all_files_filtered.length;
21
- var page = 2;
22
- jQuery("#explorer_body_container").scroll(function () {
23
- var explorer_item_count = jQuery("#explorer_body .explorer_item").length;
24
- if ( ajax && explorer_item_count < all_items_count ) {
25
- var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
26
- var scroll_Height = jQuery(this)[0].scrollHeight;
27
- if ( scroll_position >= scroll_Height ) {
28
- var start_count = (page - 1) * element_load_count;
29
- var end_count = page * element_load_count;
30
- var next_files = wdb_all_files_filtered.slice(start_count, end_count);
31
- ajax_print_images(next_files, jQuery("#explorer_body"), 'explorer_item', start_count);
32
- page++;
33
- }
34
- }
35
- });
36
-
37
- var all_images_count = jQuery("#file_manager .item_thumb img").length;
38
- if (!all_images_count) {
39
- setTimeout(function(){jQuery(document).trigger("onUpload")});
40
- }
41
- else {
42
- setTimeout(function(){jQuery(document).trigger("onSelectAllImage")});
43
- }
44
- if (all_images_count == 0 || all_images_count <= 24) {
45
- loaded();
46
- }
47
- setTimeout(function(){loaded()}, 10000);
48
- filesSelected = [];
49
- dragFiles = [];
50
-
51
- jQuery("#wrapper").css("top", jQuery("#file_manager_message").css("height"));
52
- jQuery(window).resize(function () {
53
- jQuery("#container").css("top", jQuery("#file_manager_message").css("height"));
54
- });
55
-
56
- isUploading = false;
57
- jQuery("#uploader").css("display", "none");
58
- jQuery("#uploader_progress_bar").css("display", "none");
59
- jQuery("#importer").css("display", "none");
60
-
61
- //decrease explorer header width by scroller width
62
- jQuery(".scrollbar_filler").css("width", getScrollBarWidth() + "px");
63
- jQuery(document).keydown(function(e) {
64
- onKeyDown(e);
65
- });
66
- jQuery("#search_by_name .search_by_name").on("input keyup", function() {
67
- wdb_all_files_filtered = [];
68
- var search_by_name = jQuery(this).val().toLowerCase();
69
- jQuery("#explorer_body .explorer_item").remove();
70
- jQuery('html,body').animate({scrollTop:0},0);
71
- if ( search_by_name ) {
72
- for ( var key in wdb_all_files ) {
73
- var filename = wdb_all_files[key].filename.toLowerCase();
74
- if (filename.indexOf(search_by_name) != -1) {
75
- wdb_all_files_filtered.push(wdb_all_files[key]);
76
- }
77
- }
78
- }
79
- else {
80
- wdb_all_files_filtered = wdb_all_files;
81
- }
82
- var next_files = wdb_all_files_filtered.slice(0, element_load_count);
83
- ajax_print_images(next_files, jQuery("#explorer_body"), 'explorer_item', 0);
84
- all_items_count = wdb_all_files_filtered.length;
85
- page = 2;
86
- });
87
  });
88
- // TODO. remove this not used
89
- function loaded() {
90
- jQuery("#loading_div").hide();
91
- }
92
 
93
  function getClipboardFiles() {
94
  return jQuery("form[name=adminForm]").find("input[name=clipboard_file]").val();
95
  }
96
 
97
  function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDirName, clipboardTask, clipboardFiles, clipboardSrc, clipboardDest) {
 
98
  var names_array = [];
99
- if (all_files_selected === true) {
100
  for (i in wdb_all_files_filtered) {
101
  var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
102
  if (index < 0) {
@@ -111,6 +88,9 @@ function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDir
111
  }
112
 
113
  switch (task) {
 
 
 
114
  case "rename_item":
115
  destDir = dir;
116
  newDirName = "";
@@ -199,13 +179,14 @@ function submitFiles() {
199
  if (filesSelected.length == 0) {
200
  return;
201
  }
 
202
  var filesValid = [];
203
  if (all_files_selected === true) {
204
  for (i in wdb_all_files_filtered) {
205
  var fileData = [];
206
- if (wdb_all_files_filtered[i]["is_dir"] === false) {
207
  var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
208
- if (index < 0) {
209
  fileData['name'] = wdb_all_files_filtered[i]["name"];
210
  fileData['filename'] = wdb_all_files_filtered[i]["filename"];;
211
  fileData['alt'] = wdb_all_files_filtered[i]["alt"];;
@@ -298,7 +279,6 @@ function getFileExtension(file) {
298
  return file.substring(file.lastIndexOf('.') + 1);
299
  }
300
 
301
-
302
  //ctrls bar handlers
303
  function onBtnUpClick(event, obj) {
304
  var destDir = dir.substring(0, dir.lastIndexOf(DS));
@@ -313,174 +293,144 @@ function onBtnMakeDirClick(event, obj) {
313
  }
314
 
315
  function onBtnRenameItemClick(event, obj) {
316
- if (filesSelected.length != 0) {
317
- var oldName = getFileName(filesSelected[0]);
318
- var newName = prompt(messageEnterNewName, oldName);
319
- if ((newName != null) && (newName != "")) {
320
- newName = newName.replace(/ /g, "_").replace(/%/g, "");
321
- /*var image_url = jQuery('#tbody_arr', window.parent.document).find('input[value$="/' + filesSelected[0] + '"]');
322
- if ( image_url.length ) {
323
- var thumb_url = jQuery('#tbody_arr', window.parent.document).find('input[value$="/thumb/' + filesSelected[0] + '"]');
324
- var file_name = jQuery('#tbody_arr', window.parent.document).find('input[value="' + oldName + '"]');
325
-
326
- image_url.val(image_url.val().replace(oldName, newName));
327
- thumb_url.val(thumb_url.val().replace(oldName, newName));
328
- file_name.val(file_name.val().replace(oldName, newName));
329
- }*/
330
-
331
- submit("rename_item", null, null, null, null, newName, null, null, null, null, null);
332
- }
333
- }
334
  }
335
 
336
  function onBtnCopyClick(event, obj) {
337
- if (filesSelected.length != 0) {
338
- var names_list = filesSelected.join("**#**");
339
- var names_array = [];
340
- if (all_files_selected === true) {
341
- for (i in wdb_all_files_filtered) {
342
- var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
343
- if (index < 0) {
344
- var all_names = wdb_all_files_filtered[i]["name"];
345
- names_array.push(all_names);
346
- }
347
- }
348
- names_list = names_array.join("**#**");
349
- }
350
-
351
- submit("", null, null, null, null, null, null, "copy", names_list, dir, null);
352
- }
353
  }
354
 
355
  function onBtnCutClick(event, obj) {
356
- if (filesSelected.length != 0) {
357
- var names_list = filesSelected.join("**#**");
358
- var names_array = [];
359
- if (all_files_selected === true) {
360
- for (var i in wdb_all_files_filtered) {
361
- var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
362
- if (index < 0) {
363
- var all_names = wdb_all_files_filtered[i]["name"];
364
- names_array.push(all_names);
365
- }
366
- }
367
- names_list = names_array.join("**#**");
368
- }
369
- submit("", null, null, null, null, null, null, "cut", names_list, dir, null);
370
- }
371
  }
372
 
373
  function onBtnPasteClick(event, obj) {
374
- if (getClipboardFiles() != "") {
375
- /*if ( jQuery("form[name=adminForm]").find("input[name=clipboard_task]").val() == 'cut' ) {
376
- var images_arr = jQuery("form[name=adminForm]").find("input[name=clipboard_files]").val().split("**#**");
377
- for (var i in images_arr) {
378
- var image_url = jQuery('#tbody_arr', window.parent.document).find('input[value$="/' + images_arr[i] + '"]');
379
- if ( image_url.length ) {
380
- var thumb_url = jQuery('#tbody_arr', window.parent.document).find('input[value$="/thumb/' + images_arr[i] + '"]');
381
- image_url.val(dir + "/" + images_arr[i]);
382
- thumb_url.val(dir + "/thumb/" + images_arr[i]);
383
- }
384
- }
385
- }*/
386
- submit("paste_items", null, null, null, null, null, null, null, null, null, dir);
387
- }
388
  }
389
 
390
  function onBtnRemoveItemsClick(event, obj) {
391
- if ((filesSelected.length != 0) && (confirm(warningRemoveItems) == true)) {
392
- /*for ( var i in filesSelected ) {
393
- var tr = jQuery('#tbody_arr', window.parent.document).find('input[value$="/' + filesSelected[i] + '"]').parents("tr");
394
- if ( tr.length ) {
395
- tr.remove();
396
- var id = tr.attr("id");
397
- id = id.replace("tr_", "");
398
- jQuery("#ids_string", window.parent.document).val(jQuery("#ids_string", window.parent.document).val().replace(id + ",", ""));
399
- }
400
- }*/
401
- submit("remove_items", null, null, null, null, null, null, null, null, null, null);
402
- }
403
  }
404
 
405
  function onBtnShowUploaderClick(event, obj) {
406
- jQuery(document).trigger("onUploadFilesPressed");
407
- jQuery("#uploader").fadeIn();
408
  }
409
 
410
  function onBtnViewThumbsClick(event, obj) {
411
- submit("", null, null, "thumbs", null, null, null, null, null, null, null);
412
  }
413
 
414
  function onBtnViewListClick(event, obj) {
415
- submit("", null, null, "list", null, null, null, null, null, null, null);
416
  }
417
 
418
  function onBtnBackClick(event, obj) {
419
- if ((isUploading == false) || (confirm(warningCancelUploads) == true)) {
420
- // jQuery("#uploader").fadeOut(function () {
421
- submit("", null, null, null, null, null, null, null, null, null, null);
422
- // });
423
- }
424
  }
425
 
426
-
427
  function onPathComponentClick(event, obj, key) {
428
- if (typeof key != "undefined" && key == 0) {
429
- path = "";
430
- }
431
- else {
432
- path = jQuery(obj).html();
433
- path = path.trim();
434
- }
435
- submit("", null, null, null, path, null, null, null, null, null, null);
436
  }
437
 
438
  function onBtnShowImportClick(event, obj) {
439
- jQuery("#importer").fadeIn();
440
  }
441
 
442
  function onNameHeaderClick(event, obj) {
443
- var newSortOrder = ((sortBy == "name") && (sortOrder == "asc")) ? "desc" : "asc";
444
- submit("", "name", newSortOrder, null, null, null, null, null, null, null, null);
445
  }
446
 
447
  function onSizeHeaderClick(event, obj) {
448
- var newSortOrder = ((sortBy == "size") && (sortOrder == "asc")) ? "desc" : "asc";
449
- submit("", "size", newSortOrder, null, null, null, null, null, null, null, null);
450
  }
451
 
452
  function onDateModifiedHeaderClick(event, obj) {
453
- var newSortOrder = ((sortBy == "date_modified") && (sortOrder == "asc")) ? "desc" : "asc";
454
- submit("", "date_modified", newSortOrder, null, null, null, null, null, null, null, null);
455
  }
456
 
457
-
458
  //file handlers
459
  function onKeyDown(e) {
460
- var e = e || window.event;
461
- var chCode1 = e.which || e.paramlist_keyCode;
462
- if ((e.ctrlKey || e.metaKey) && chCode1 == 65) {
463
- all_files_selected = true;
464
- jQuery(".explorer_item").addClass("explorer_item_select");
465
- jQuery(".importer_item").addClass("importer_item_select");
466
- filesSelected = [];
467
- jQuery(".explorer_item").each(function() {
468
- var objName = jQuery(this).attr("name");
469
- if (filesSelected.indexOf(objName) == -1) {
470
- filesSelected.push(objName);
471
- keyFileSelected = this;
472
- }
473
- });
474
- e.preventDefault();
475
- }
476
  }
477
 
478
  function onFileMOver(event, obj) {
479
- jQuery(obj).addClass("explorer_item_hover");
480
  }
481
 
482
  function onFileMOut(event, obj) {
483
- jQuery(obj).removeClass("explorer_item_hover");
484
  }
485
 
486
  function onFileClick(event, obj) {
@@ -541,7 +491,7 @@ function onFileDblClick(event, obj) {
541
  submitFiles();
542
  }
543
  }
544
-
545
  function onFileDragStart(event, obj) {
546
  var objName = jQuery(obj).attr("name");
547
  if (filesSelected.indexOf(objName) < 0) {
@@ -576,11 +526,11 @@ function onFileDragStart(event, obj) {
576
  }
577
  dragFiles = filesSelected;
578
  }
579
-
580
  function onFileDragOver(event, obj) {
581
  event.preventDefault();
582
  }
583
-
584
  function onFileDrop(event, obj) {
585
  var destDirName = jQuery(obj).attr("name");
586
  if ((dragFiles.length == 0) || (dragFiles.indexOf(destDirName) >= 0)) {
@@ -607,87 +557,89 @@ function onBtnCancelClick(event, obj) {
607
  window.parent.tb_remove();
608
  }
609
 
610
- function onBtnSelectAllClick() {
611
- jQuery(".explorer_item").removeClass("explorer_item_select");
612
- jQuery(".explorer_item:visible").addClass("explorer_item_select");
613
- filesSelected = [];
614
- jQuery(".explorer_item:visible").each(function() {
615
- var objName = jQuery(this).attr("name");
616
- if (filesSelected.indexOf(objName) == -1) {
617
- filesSelected.push(objName);
618
- keyFileSelected = this;
619
- }
620
- });
621
- all_files_selected = true;
622
- }
623
-
624
- function ajax_print_images(files, element, view_type, count) {
625
- for (var i in files) {
626
- var corent_file = files[i];
627
- var name = corent_file["name"];
628
- var filename = corent_file["filename"];
629
- var filethumb = corent_file["thumb"];
630
- var filesize = corent_file["size"];
631
- var filetype = corent_file["type"];
632
- var date_modified = corent_file["date_modified"];
633
- var fileresolution = corent_file["resolution"];
634
- var fileCredit = corent_file["credit"];
635
- var fileAperture = corent_file["aperture"];
636
- var fileCamera = corent_file["camera"];
637
- var fileCaption = corent_file["caption"];
638
- var fileIso = corent_file["iso"];
639
- var fileOrientation = corent_file["orientation"];
640
- var fileCopyright = corent_file["copyright"];
641
- var fileTags = corent_file["tags"];
642
- var onmouseover = "onFileMOver(event, this);";
643
- var onmouseout = "onFileMOut(event, this);";
644
- var onclick = "onFileClick(event, this);";
645
- var ondblclick = "onFileDblClick(event, this);";
646
- var ondragstart = "onFileDragStart(event, this);";
647
- var ondragover = "";
648
- var ondrop = "";
649
- if (corent_file['is_dir'] == true) {
650
- ondragover = "onFileDragOver(event, this);";
651
- ondrop = "onFileDrop(event, this);";
652
- }
653
- var isDir = false;
654
- if (corent_file['is_dir'] === true) {
655
- isDir = 'true';
656
- }
657
-
658
- var item_number = count;
659
- count++;
660
- var item_thumb = '<span class="item_thumb"><img src="' + corent_file['thumb'] + '"/></span>';
661
- var item_icon = '<span class="item_icon"><img src="'+corent_file['thumb']+'"/> </span>';
662
- var item_name = '<span class="item_name">'+corent_file['name']+'</span>';
663
- var item_size = '<span class="item_size">'+corent_file['size']+'</span>';
664
- var item_date_modified = '<span class="item_date_modified">'+corent_file['date_modified']+'</span>';
665
- var item_numbering = '<span class="item_numbering">'+item_number+'</span>';
666
- var explorer_item = '<div class="explorer_item" ' +
667
- 'name="' + name + '" ' +
668
- 'filename="' + filename + '" ' +
669
- 'filethumb="' + filethumb + '" ' +
670
- 'filesize="' + filesize + '" ' +
671
- 'filetype="' + filetype + '" ' +
672
- 'date_modified="' + date_modified + '" ' +
673
- 'fileresolution="' + fileresolution + '" ' +
674
- 'fileCredit="' + fileCredit + '" ' +
675
- 'fileAperture="' + fileAperture + '" ' +
676
- 'fileCamera="' + fileCamera + '" ' +
677
- 'fileCaption="' + fileCaption + '" ' +
678
- 'fileIso="' + fileIso + '" ' +
679
- 'fileOrientation="' + fileOrientation + '" ' +
680
- 'fileCopyright="' + fileCopyright + '" ' +
681
- 'fileTags="' + fileTags + '" ' +
682
- 'isDir="' + isDir + '" ' +
683
- 'onmouseover="' + onmouseover + '" ' +
684
- 'onmouseout="' + onmouseout + '" ' +
685
- 'onclick="' + onclick + '" ' +
686
- 'ondblclick="' + ondblclick + '" ' +
687
- 'ondragstart="' + ondragstart + '" ' +
688
- 'ondragover="' + ondragover + '" ' +
689
- 'ondrop="' + ondrop + '" ' +
690
- 'draggable="true">'+item_numbering + item_thumb + item_icon+item_name+item_size+item_date_modified+'</div>';
691
- element.append(explorer_item);
692
- }
 
 
693
  }
1
+ var ajax = true;
 
 
 
 
 
 
 
2
  var dragFiles;
3
  var isUploading;
4
+ var filesSelected;
5
+ var keyFileSelected;
 
6
  var all_files_selected = false;
7
+ var params = [];
8
  var no_selected_files = [];
9
  var wdb_all_files_filtered = [];
10
 
11
  jQuery(document).ready(function () {
12
+ var page = 1;
13
+ var page_per = jQuery("#explorer_body").data('page_per');
14
+ jQuery("#explorer_body_container").scroll(function () {
15
+ var items_count = jQuery("#explorer_body .explorer_item").length;
16
+ var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
17
+ var scroll_Height = jQuery(this)[0].scrollHeight - 200;
18
+ if ( scroll_position >= scroll_Height && items_count == (page_per * page) ) {
19
+ var orderby = jQuery("input[name='sort_by']").val();
20
+ var order = jQuery("input[name='sort_order']").val();
21
+ params['is_search'] = false;
22
+ params['element'] = jQuery("#explorer_body");
23
+ params['search'] = jQuery('#search_by_name .search_by_name').val().toLowerCase();
24
+ params['page'] = page;
25
+ params['orderby'] = orderby;
26
+ params['order'] = order;
27
+ ajax_print_images( params );
28
+ page++;
29
+ }
30
+ });
31
+
32
+ filesSelected = [];
33
+ dragFiles = [];
34
+
35
+ jQuery("#wrapper").css("top", jQuery("#file_manager_message").css("height"));
36
+ jQuery(window).resize(function () {
37
+ jQuery("#container").css("top", jQuery("#file_manager_message").css("height"));
38
+ });
39
+
40
+ isUploading = false;
41
+ jQuery("#uploader").css("display", "none");
42
+ jQuery("#uploader_progress_bar").css("display", "none");
43
+ jQuery("#importer").css("display", "none");
44
+
45
+ //decrease explorer header width by scroller width
46
+ jQuery(".scrollbar_filler").css("width", getScrollBarWidth() + "px");
47
+ jQuery(document).keydown(function(e) {
48
+ onKeyDown(e);
49
+ });
50
+
51
+ jQuery("#search_by_name .search_by_name").on("input", function() { // keyup
52
+ page = 0;
53
+ var search_by_name = jQuery(this).val().toLowerCase();
54
+ var orderby = jQuery("input[name='sort_by']").val();
55
+ var order = jQuery("input[name='sort_order']").val();
56
+ var element = jQuery("#explorer_body");
57
+ element.html('');
58
+ jQuery('html, body').animate({scrollTop:0},0);
59
+ params['is_search'] = true;
60
+ params['element'] = element;
61
+ params['search'] = search_by_name;
62
+ params['page'] = page;
63
+ params['orderby'] = orderby;
64
+ params['order'] = order;
65
+ ajax_print_images( params );
66
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  });
 
 
 
 
68
 
69
  function getClipboardFiles() {
70
  return jQuery("form[name=adminForm]").find("input[name=clipboard_file]").val();
71
  }
72
 
73
  function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDirName, clipboardTask, clipboardFiles, clipboardSrc, clipboardDest) {
74
+ jQuery('#loading_div', window.parent.document).show();
75
  var names_array = [];
76
+ if ( all_files_selected === true ) {
77
  for (i in wdb_all_files_filtered) {
78
  var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
79
  if (index < 0) {
88
  }
89
 
90
  switch (task) {
91
+ case "parsing_items":
92
+ destDir = dir;
93
+ break;
94
  case "rename_item":
95
  destDir = dir;
96
  newDirName = "";
179
  if (filesSelected.length == 0) {
180
  return;
181
  }
182
+
183
  var filesValid = [];
184
  if (all_files_selected === true) {
185
  for (i in wdb_all_files_filtered) {
186
  var fileData = [];
187
+ if (wdb_all_files_filtered[i]["is_dir"] === '0') {
188
  var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
189
+ if ( index < 0 ) {
190
  fileData['name'] = wdb_all_files_filtered[i]["name"];
191
  fileData['filename'] = wdb_all_files_filtered[i]["filename"];;
192
  fileData['alt'] = wdb_all_files_filtered[i]["alt"];;
279
  return file.substring(file.lastIndexOf('.') + 1);
280
  }
281
 
 
282
  //ctrls bar handlers
283
  function onBtnUpClick(event, obj) {
284
  var destDir = dir.substring(0, dir.lastIndexOf(DS));
293
  }
294
 
295
  function onBtnRenameItemClick(event, obj) {
296
+ if (filesSelected.length != 0) {
297
+ var oldName = getFileName(filesSelected[0]);
298
+ var newName = prompt(messageEnterNewName, oldName);
299
+ if ((newName != null) && (newName != "")) {
300
+ newName = newName.replace(/ /g, "_").replace(/%/g, "");
301
+ submit("rename_item", null, null, null, null, newName, null, null, null, null, null);
302
+ }
303
+ }
 
 
 
 
 
 
 
 
 
 
304
  }
305
 
306
  function onBtnCopyClick(event, obj) {
307
+ if (filesSelected.length != 0) {
308
+ var names_list = filesSelected.join("**#**");
309
+ var names_array = [];
310
+ if (all_files_selected === true) {
311
+ for (i in wdb_all_files_filtered) {
312
+ var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
313
+ if (index < 0) {
314
+ var all_names = wdb_all_files_filtered[i]["name"];
315
+ names_array.push(all_names);
316
+ }
317
+ }
318
+ names_list = names_array.join("**#**");
319
+ }
320
+
321
+ submit("", null, null, null, null, null, null, "copy", names_list, dir, null);
322
+ }
323
  }
324
 
325
  function onBtnCutClick(event, obj) {
326
+ if (filesSelected.length != 0) {
327
+ var names_list = filesSelected.join("**#**");
328
+ var names_array = [];
329
+ if (all_files_selected === true) {
330
+ for (var i in wdb_all_files_filtered) {
331
+ var index = no_selected_files.indexOf(wdb_all_files_filtered[i]["name"]);
332
+ if (index < 0) {
333
+ var all_names = wdb_all_files_filtered[i]["name"];
334
+ names_array.push(all_names);
335
+ }
336
+ }
337
+ names_list = names_array.join("**#**");
338
+ }
339
+ submit("", null, null, null, null, null, null, "cut", names_list, dir, null);
340
+ }
341
  }
342
 
343
  function onBtnPasteClick(event, obj) {
344
+ if (getClipboardFiles() != "") {
345
+ submit("paste_items", null, null, null, null, null, null, null, null, null, dir);
346
+ }
 
 
 
 
 
 
 
 
 
 
 
347
  }
348
 
349
  function onBtnRemoveItemsClick(event, obj) {
350
+ if ((filesSelected.length != 0) && (confirm(warningRemoveItems) == true)) {
351
+ submit("remove_items", null, null, null, null, null, null, null, null, null, null);
352
+ }
353
+ }
354
+
355
+ function onBtnParsingItemsClick(event, obj) {
356
+ submit("parsing_items", null, null, null, null, null, null, null, null, null, null);
 
 
 
 
 
357
  }
358
 
359
  function onBtnShowUploaderClick(event, obj) {
360
+ jQuery(document).trigger("onUploadFilesPressed");
361
+ jQuery("#uploader").fadeIn();
362
  }
363
 
364
  function onBtnViewThumbsClick(event, obj) {
365
+ submit("", null, null, "thumbs", null, null, null, null, null, null, null);
366
  }
367
 
368
  function onBtnViewListClick(event, obj) {
369
+ submit("", null, null, "list", null, null, null, null, null, null, null);
370
  }
371
 
372
  function onBtnBackClick(event, obj) {
373
+ if ((isUploading == false) || (confirm(warningCancelUploads) == true)) {
374
+ submit("", null, null, null, null, null, null, null, null, null, null);
375
+ }
 
 
376
  }
377
 
 
378
  function onPathComponentClick(event, obj, key) {
379
+ if (typeof key != "undefined" && key == 0) {
380
+ path = "";
381
+ }
382
+ else {
383
+ path = jQuery(obj).html();
384
+ path = path.trim();
385
+ }
386
+ submit("", null, null, null, path, null, null, null, null, null, null);
387
  }
388
 
389
  function onBtnShowImportClick(event, obj) {
390
+ jQuery("#importer").fadeIn();
391
  }
392
 
393
  function onNameHeaderClick(event, obj) {
394
+ var newSortOrder = ((sortBy == "name") && (sortOrder == "asc")) ? "desc" : "asc";
395
+ submit("", "name", newSortOrder, null, null, null, null, null, null, null, null);
396
  }
397
 
398
  function onSizeHeaderClick(event, obj) {
399
+ var newSortOrder = ((sortBy == "size") && (sortOrder == "asc")) ? "desc" : "asc";
400
+ submit("", "size", newSortOrder, null, null, null, null, null, null, null, null);
401
  }
402
 
403
  function onDateModifiedHeaderClick(event, obj) {
404
+ var newSortOrder = ((sortBy == "date_modified") && (sortOrder == "asc")) ? "desc" : "asc";
405
+ submit("", "date_modified", newSortOrder, null, null, null, null, null, null, null, null);
406
  }
407
 
 
408
  //file handlers
409
  function onKeyDown(e) {
410
+ var e = e || window.event;
411
+ var chCode1 = e.which || e.paramlist_keyCode;
412
+ if ((e.ctrlKey || e.metaKey) && chCode1 == 65) {
413
+ all_files_selected = true;
414
+ jQuery(".explorer_item").addClass("explorer_item_select");
415
+ jQuery(".importer_item").addClass("importer_item_select");
416
+ filesSelected = [];
417
+ jQuery(".explorer_item").each(function() {
418
+ var objName = jQuery(this).attr("name");
419
+ if (filesSelected.indexOf(objName) == -1) {
420
+ filesSelected.push(objName);
421
+ keyFileSelected = this;
422
+ }
423
+ });
424
+ e.preventDefault();
425
+ }
426
  }
427
 
428
  function onFileMOver(event, obj) {
429
+ jQuery(obj).addClass("explorer_item_hover");
430
  }
431
 
432
  function onFileMOut(event, obj) {
433
+ jQuery(obj).removeClass("explorer_item_hover");
434
  }
435
 
436
  function onFileClick(event, obj) {
491
  submitFiles();
492
  }
493
  }
494
+ /*TODO function not used on view! (only file)*/
495
  function onFileDragStart(event, obj) {
496
  var objName = jQuery(obj).attr("name");
497
  if (filesSelected.indexOf(objName) < 0) {
526
  }
527
  dragFiles = filesSelected;
528
  }
529
+ /*TODO function not used on view! (only folder)*/
530
  function onFileDragOver(event, obj) {
531
  event.preventDefault();
532
  }
533
+ /*TODO function not used on view! (only folder)*/
534
  function onFileDrop(event, obj) {
535
  var destDirName = jQuery(obj).attr("name");
536
  if ((dragFiles.length == 0) || (dragFiles.indexOf(destDirName) >= 0)) {
557
  window.parent.tb_remove();
558
  }
559
 
560
+ function onBtnSelectAllClick( dir ) {
561
+ jQuery(".explorer_item").removeClass("explorer_item_select");
562
+ jQuery(".explorer_item:visible").addClass("explorer_item_select");
563
+ var search = jQuery('#search_by_name .search_by_name').val();
564
+ var orderby = jQuery("input[name='sort_by']").val();
565
+ var order = jQuery("input[name='sort_order']").val();
566
+ jQuery.ajax({
567
+ type: "POST",
568
+ dataType: "json",
569
+ url: ajax_get_all_select_url,
570
+ data: {
571
+ dir,
572
+ search,
573
+ order,
574
+ orderby
575
+ },
576
+ success: function (res) {
577
+ files = res.data;
578
+ filesSelected = [];
579
+ jQuery.each(files, function(i, v) {
580
+ var objName = v.name;
581
+ if (filesSelected.indexOf(objName) == -1) {
582
+ filesSelected.push(objName);
583
+ keyFileSelected = this;
584
+ }
585
+ });
586
+ all_files_selected = true;
587
+ wdb_all_files_filtered = files;
588
+ },
589
+ beforeSend: function() {
590
+ },
591
+ complete:function() {
592
+ }
593
+ });
594
+ }
595
+
596
+ function ajax_print_images( params ) {
597
+ var element = params['element'];
598
+ var is_search = params['is_search'];
599
+ var paged = params['page'];
600
+ var search = params['search'];
601
+ var orderby = params['orderby'];
602
+ var order = params['order'];
603
+ var page_per = element.data('page_per');
604
+ var files_count = element.data('files_count');
605
+ var found_wrap = jQuery('#explorer_body_container .fm-no-found-wrap');
606
+ if ( (page_per * paged) < files_count ) {
607
+ jQuery.ajax({
608
+ type: "POST",
609
+ dataType: "json",
610
+ url: ajax_pagination_url,
611
+ data: {
612
+ dir,
613
+ paged,
614
+ search,
615
+ order,
616
+ orderby
617
+ },
618
+ success: function (res) {
619
+ if ( is_search ) {
620
+ jQuery('#loading_div', window.parent.document).hide();
621
+ element.html('');
622
+ }
623
+ if ( res.html ) {
624
+ element.append(res.html);
625
+ jQuery('#explorer_body .explorer_item').each(function(i,that) {
626
+ var img = jQuery(that).find('img');
627
+ img.attr('scr', jQuery(that).attr('filethumb') );
628
+ });
629
+ found_wrap.hide();
630
+ }
631
+ else if ( search && res.html == '') {
632
+ found_wrap.show();
633
+ }
634
+ },
635
+ beforeSend: function() {
636
+ if ( is_search ) {
637
+ jQuery('#loading_div', window.parent.document).show();
638
+ element.html('');
639
+ }
640
+ },
641
+ complete:function() {
642
+ }
643
+ });
644
+ }
645
  }
filemanager/model.php CHANGED
@@ -1,204 +1,271 @@
1
  <?php
2
  /**
3
- * Author: Rob
4
- * Date: 6/24/13
5
- * Time: 11:31 AM
6
  */
7
-
8
- $p_dir;
9
- $s_order;
10
-
11
  class FilemanagerModel {
12
- private $controller;
13
- private $element_load_count = 60;
14
-
15
- public function __construct($controller) {
16
- $this->controller = $controller;
17
- }
18
-
19
- public function get_file_manager_data() {
20
- $session_data = array();
21
- $session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
22
- $session_data['sort_order'] = $this->get_from_session('sort_order', 'desc');
23
- $session_data['items_view'] = $this->get_from_session('items_view', 'thumbs');
24
- $session_data['clipboard_task'] = $this->get_from_session('clipboard_task', '');
25
- $session_data['clipboard_files'] = $this->get_from_session('clipboard_files', '');
26
- $session_data['clipboard_src'] = $this->get_from_session('clipboard_src', '');
27
- $session_data['clipboard_dest'] = $this->get_from_session('clipboard_dest', '');
28
-
29
- $data = array();
30
- $data['session_data'] = $session_data;
31
- $data['path_components'] = $this->get_path_components();
32
- $data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
33
- $data['dir'] = str_replace('../', '', $data['dir']);
34
- $get_files_data = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
35
- $data['files'] = $get_files_data['files'];
36
- $data['files_count'] = $get_files_data['files_count'];
37
- $data['all_files'] = $get_files_data['all_files'];
38
- $data['element_load_count'] = $this->element_load_count;
39
- $data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
40
- $data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
41
- return $data;
42
- }
43
-
44
- private function get_from_session($key, $default) {
45
- if (isset($_REQUEST[$key])) {
46
- $_REQUEST[$key] = stripslashes($_REQUEST[$key]);
47
- }
48
- else {
49
- $_REQUEST[$key] = stripslashes($default);
50
- }
51
- return esc_html(stripslashes($_REQUEST[$key]));
52
- }
53
 
54
- public function get_path_components() {
55
- $dir_names = explode('/', (isset($_REQUEST['dir']) ? str_replace('../', '', esc_html($_REQUEST['dir'])) : ''));
56
- $path = '';
57
 
58
- $components = array();
59
- $component = array();
60
-
61
- $component['name'] = BWG()->upload_dir;
62
- $component['path'] = $path;
63
- $components[] = $component;
64
- for ($i = 0; $i < count($dir_names); $i++) {
65
- $dir_name = $dir_names[$i];
66
- if ($dir_name == '') {
67
- continue;
68
- }
69
- $path .= (($path == '') ? $dir_name : '/' . $dir_name);
70
- $component = array();
71
- $component['name'] = $dir_name;
72
- $component['path'] = $path;
73
- $components[] = $component;
74
- }
75
- return $components;
76
- }
77
 
78
- function get_files($sort_by, $sort_order) {
79
- $icons_dir_url = BWG()->plugin_url . '/filemanager/images';
80
- $valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
81
- $dir = (isset($_REQUEST['dir']) ? '/' . htmlspecialchars_decode(stripslashes(esc_html(str_replace('../', '', $_REQUEST['dir']))), ENT_COMPAT | ENT_QUOTES) : '');
82
- $parent_dir = $this->controller->get_uploads_dir() . $dir;
83
- $parent_dir = str_replace('../', '', $parent_dir);
84
- $parent_dir_url = $this->controller->get_uploads_url() . $dir;
85
 
86
- $file_names = $this->get_sorted_file_names($parent_dir, $sort_by, $sort_order);
 
87
 
88
- $dirs = array();
89
- $files = array();
90
- foreach ($file_names as $file_name) {
91
- if (($file_name == '.') || ($file_name == '..') || ($file_name == 'thumb') || ($file_name == '.original')) {
92
- continue;
93
- }
94
- if (is_dir($parent_dir . '/' . $file_name) == TRUE) {
95
- $file = array();
96
- $file['is_dir'] = TRUE;
97
- $file['name'] = $file_name;
98
- $file['alt'] = str_replace("_", " ", $file_name);
99
- $file['filename'] = str_replace("_", " ", $file_name);
100
- $file['type'] = '';
101
- $file['thumb'] = $icons_dir_url . '/dir.png';
102
- $file['size'] = '';
103
- $file['date_modified'] = '';
104
- $file['resolution'] = '';
105
- $dirs[] = $file;
106
- }
107
- else {
108
- $file = array();
109
- $file['is_dir'] = FALSE;
110
- $file['name'] = $file_name;
111
- $filename = substr($file_name, 0, strrpos($file_name, '.'));
112
- $file['filename'] = str_replace("_", " ", $filename);
113
- $file_extension = explode('.', $file_name);
114
- $file['type'] = strtolower(end($file_extension));
115
- $file['thumb'] = $parent_dir_url . '/thumb/' . $file_name;
116
- if (($valid_types[0] != '*') && (in_array($file['type'], $valid_types) == FALSE)) {
117
- continue;
118
- }
119
- $file_size_kb = (int)(filesize($parent_dir . '/' . $file_name) / 1024);
120
- // $file_size_mb = (int)($file_size_kb / 1024);
121
- // $file['size'] = $file_size_kb < 1024 ? (string)$file_size_kb . 'KB' : (string)$file_size_mb . 'MB';
122
- $file['size'] = $file_size_kb . ' KB';
123
- $file['date_modified'] = date('d F Y, H:i' );
124
- $image_info = getimagesize(htmlspecialchars_decode($parent_dir . '/' . $file_name, ENT_COMPAT | ENT_QUOTES));
125
- $file['resolution'] = $this->is_img($file['type']) ? $image_info[0] . ' x ' . $image_info[1] . ' px' : '';
126
- $exif = WDWLibrary::read_image_metadata( $parent_dir . '/.original/' . $file_name );
127
- $file['credit'] = $exif['credit'];
128
- $file['aperture'] = $exif['aperture'];
129
- $file['camera'] = $exif['camera'];
130
- $file['caption'] = $exif['caption'];
131
- $file['iso'] = $exif['iso'];
132
- $file['orientation'] = $exif['orientation'];
133
- $file['copyright'] = $exif['copyright'];
134
- $file['alt'] = BWG()->options->read_metadata && $exif['title'] ? $exif['title'] : str_replace("_", " ", $filename);
135
- $file['tags'] = $exif['tags'];
136
- $files[] = $file;
137
- }
138
- }
139
 
140
- // $result = $sort_order == 'asc' ? array_merge($dirs, $files) : array_merge($files, $dirs);
141
- $result = array_merge($dirs, $files);
142
- $files_count = count($result);
143
- $all_files = $result;
144
- $result = array_slice($result, 0, $this->element_load_count, true);
145
- return array("files" => $result, "all_files"=>$all_files, "files_count" => $files_count);
146
- }
 
 
 
 
 
 
 
 
 
 
147
 
148
- private function get_sorted_file_names($parent_dir, $sort_by, $sort_order) {
149
- $file_names = scandir($parent_dir);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
- global $p_dir;
152
- global $s_order;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
- $p_dir = $parent_dir;
155
- $s_order = $sort_order;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
- function sort_by_size ($a, $b) {
158
- global $p_dir;
159
- global $s_order;
 
 
 
 
 
 
 
 
 
 
160
 
161
- $size_of_a = filesize($p_dir . '/' . $a);
162
- $size_of_b = filesize($p_dir . '/' . $b);
163
- return $s_order == 'asc' ? $size_of_a > $size_of_b : $size_of_a < $size_of_b;
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
 
166
- function sort_by_date($a, $b) {
167
- global $p_dir;
168
- global $s_order;
 
 
 
 
 
 
 
 
169
 
170
- $m_time_a = filemtime($p_dir . '/' . $a);
171
- $m_time_b = filemtime($p_dir . '/' . $b);
172
- return $s_order == 'asc' ? $m_time_a > $m_time_b : $m_time_a < $m_time_b;
173
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
- switch ($sort_by) {
176
- case 'name':
177
- natcasesort($file_names);
178
- if ($sort_order == 'desc') {
179
- $file_names = array_reverse($file_names);
180
- }
181
- break;
182
- case 'size':
183
- usort($file_names, 'sort_by_size');
184
- break;
185
- case 'date_modified':
186
- usort($file_names, 'sort_by_date');
187
- break;
188
- }
189
- return $file_names;
190
- }
191
 
192
- private function is_img($file_type) {
193
- switch ($file_type) {
194
- case 'jpg':
195
- case 'jpeg':
196
- case 'png':
197
- case 'bmp':
198
- case 'gif':
199
- return true;
200
- break;
201
- }
202
- return false;
203
- }
204
  }
1
  <?php
2
  /**
3
+ * Class FilemanagerModel
 
 
4
  */
 
 
 
 
5
  class FilemanagerModel {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
+ private $controller;
 
 
8
 
9
+ public function __construct($controller) {
10
+ $this->controller = $controller;
11
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ public function get_path_components( $dir = '' ) {
14
+ $dir_names = explode('/', $dir);
15
+ $path = '';
 
 
 
 
16
 
17
+ $components = array();
18
+ $component = array();
19
 
20
+ $component['name'] = BWG()->upload_dir;
21
+ $component['path'] = $path;
22
+ $components[] = $component;
23
+ for ($i = 0; $i < count($dir_names); $i++) {
24
+ $dir_name = $dir_names[$i];
25
+ if ($dir_name == '') {
26
+ continue;
27
+ }
28
+ $path .= (($path == '') ? $dir_name : '/' . $dir_name);
29
+ $component = array();
30
+ $component['name'] = $dir_name;
31
+ $component['path'] = $path;
32
+ $components[] = $component;
33
+ }
34
+ return $components;
35
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ /**
38
+ * Get file lists.
39
+ *
40
+ * @param array $params
41
+ * @return array
42
+ */
43
+ public function get_file_lists( $params = array() ) {
44
+ global $wpdb;
45
+ $results = array();
46
+ $results['num_rows'] = 0;
47
+ $results['files'] = array();
48
+ $dir = $params['dir'];
49
+ $orderby = $params['orderby'];
50
+ $order = $params['order'];
51
+ $search = $params['search'];
52
+ $page_num = $params['page_num'];
53
+ $page_per = $params['page_per'];
54
 
55
+ $query = ' SELECT * FROM `' . $wpdb->prefix . 'bwg_file_paths`';
56
+ $query .= ' WHERE `path` = "' . $dir . '"';
57
+ if ( $search ) {
58
+ $query .= ' AND ((filename LIKE "%' . $search . '%") OR (alt LIKE "%' . $search . '%")) ';
59
+ }
60
+ if ( $orderby == 'size') {
61
+ $orderby = 'CAST('. $orderby .' AS unsigned)';
62
+ }
63
+ $query .= ' ORDER BY `is_dir` DESC, '. $orderby . ' ' . $order;
64
+ // Get total num rows.
65
+ $results['page_per'] = $page_per;
66
+ $results['num_rows'] = $wpdb->get_var( str_replace('SELECT *', 'SELECT COUNT(*)', $query) );
67
+ $query .= ' LIMIT ' . ($page_num * $page_per) . ',' . $page_per;
68
+ $items = $wpdb->get_results($query, 'ARRAY_A');
69
+ if ( empty($items) && empty($search) ) {
70
+ $params['dir'] = BWG()->upload_dir . $dir;
71
+ $params['path'] = $dir;
72
+ $this->files_parsing_db( $params );
73
+ $items = $wpdb->get_results($query, 'ARRAY_A');
74
+ $results['num_rows'] = $wpdb->get_var( str_replace('SELECT *', 'SELECT COUNT(*)', $query) );
75
+ }
76
+ if ( !empty($items) ) {
77
+ foreach( $items as $item ) {
78
+ $thumb = BWG()->plugin_url . $item['thumb'];
79
+ if ( $item['is_dir'] == 0 ) {
80
+ $thumb = $this->controller->get_uploads_url() .''. $item['path'] .''. $item['thumb'];
81
+ }
82
+ $item['thumb'] = $thumb;
83
+ $results['files'][] = $item;
84
+ }
85
+ }
86
+ return $results;
87
+ }
88
 
89
+ /**
90
+ * Is img.
91
+ * @param $file_type
92
+ *
93
+ * @return bool
94
+ */
95
+ private function is_img($file_type) {
96
+ switch ($file_type) {
97
+ case 'jpg':
98
+ case 'jpeg':
99
+ case 'png':
100
+ case 'bmp':
101
+ case 'gif':
102
+ return true;
103
+ break;
104
+ }
105
+ return false;
106
+ }
107
 
108
+ /**
109
+ * Get dir contents.
110
+ *
111
+ * @param $dir
112
+ * @param string $filter
113
+ * @param array $results
114
+ *
115
+ * @return array
116
+ */
117
+ function get_dir_contents( $dir, $filter = '', &$results = array() ) {
118
+ $files = scandir($dir);
119
+ if ( !empty($files) ) {
120
+ foreach ( $files as $key => $value ) {
121
+ if ( in_array($value, array('.','..','thumb','.original') ) ) continue;
122
+ $path = realpath($dir.DIRECTORY_SEPARATOR.$value);
123
+ if ( !is_dir($path) ) {
124
+ if ( empty($filter) || preg_match($filter, $path) ) {
125
+ $results[] = $path;
126
+ }
127
+ } else {
128
+ $results[] = $path;
129
+ // is recursive
130
+ // $this->get_dir_contents($path, $filter, $results);
131
+ }
132
+ }
133
+ }
134
+ return $results;
135
+ }
136
 
137
+ /**
138
+ * Get all files.
139
+ *
140
+ * @param array $params
141
+ *
142
+ * @return array
143
+ */
144
+ function get_all_files( $params = array() ) {
145
+ global $wpdb;
146
+ $dir = $params['dir'];
147
+ $search = $params['search'];
148
+ $orderby = $params['orderby'];
149
+ $order = $params['order'];
150
 
151
+ $query = ' SELECT * FROM `' . $wpdb->prefix . 'bwg_file_paths`';
152
+ $query .= ' WHERE `path` = "' . $dir . '"';
153
+ if ( $search ) {
154
+ $query .= ' AND ((filename LIKE "%' . $search . '%") OR (alt LIKE "%' . $search . '%")) ';
155
+ }
156
+ $query .= ' ORDER BY `is_dir` DESC, `' . $orderby . '` ' . $order;
157
+ $items = $wpdb->get_results($query, 'ARRAY_A');
158
+ $results = array();
159
+ if ( !empty($items) ) {
160
+ foreach( $items as $item ) {
161
+ $thumb = BWG()->plugin_url . $item['thumb'];
162
+ if ( $item['is_dir'] == 0 ) {
163
+ $thumb = $this->controller->get_uploads_url() .''. $item['path'] .''. $item['thumb'];
164
+ }
165
+ $item['thumb'] = $thumb;
166
+ $results[] = $item;
167
+ }
168
+ }
169
+ return $results;
170
+ }
171
 
172
+ /**
173
+ * Files parsing db.
174
+ *
175
+ * @param array $params
176
+ */
177
+ function files_parsing_db( $params = array() ) {
178
+ global $wpdb;
179
+ $dir = $params['dir'];
180
+ $path = $params['path'];
181
+ $valid_types = $params['valid_types'];
182
+ $truncate = !empty($params['truncate']) ? true : false;
183
 
184
+ $dir = str_replace('/', DIRECTORY_SEPARATOR , $dir);
185
+ $data = array();
186
+ $dirs = array();
187
+ $files = array();
188
+ $items = $this->get_dir_contents($dir);
189
+ if ( !empty($items) ) {
190
+ foreach ( $items as $item ) {
191
+ $value = str_replace($dir, '', $item);
192
+ $value = explode(DIRECTORY_SEPARATOR, $value);
193
+ $name = end($value);
194
+ /*
195
+ $paths = $value;
196
+ array_pop($paths);
197
+ $implode_path = implode($paths,'/');
198
+ $path = !empty($implode_path) ? '/'. $implode_path . '/' : '/';
199
+ */
200
+ if ( is_dir($item) == TRUE ) {
201
+ $file = array();
202
+ $file['is_dir'] = 1;
203
+ $file['path'] = $path;
204
+ $file['name'] = $name;
205
+ $file['filename'] = str_replace("_", " ", $name);
206
+ $file['alt'] = str_replace("_", " ", $name);
207
+ $file['thumb'] = '/filemanager/images/dir.png';
208
+ $dirs[] = $file;
209
+ }
210
+ else {
211
+ $file = array();
212
+ $file['is_dir'] = 0;
213
+ $file['path'] = $path;
214
+ $file['name'] = $name;
215
+ $filename = substr($name, 0, strrpos($name, '.'));
216
+ $file['filename'] = str_replace("_", " ", $filename);
217
+ $file_extension = explode('.', $name);
218
+ $file['type'] = strtolower(end($file_extension));
219
+ $file['thumb'] = 'thumb/' . $name;
220
+ if (($valid_types[0] != '*') && (in_array($file['type'], $valid_types) == FALSE)) {
221
+ continue;
222
+ }
223
+ $file_size_kb = (int)(filesize($item) / 1024);
224
+ $file['size'] = $file_size_kb . ' KB';
225
+ $image_info = getimagesize(htmlspecialchars_decode($item, ENT_COMPAT | ENT_QUOTES));
226
+ $file['resolution'] = $this->is_img($file['type']) ? $image_info[0] . ' x ' . $image_info[1] . ' px' : '';
227
+ $exif = WDWLibrary::read_image_metadata( $dir . '/.original/' . $name );
228
+ $file['alt'] = BWG()->options->read_metadata && $exif['title'] ? $exif['title'] : str_replace("_", " ", $filename);
229
+ $file['credit'] = !empty($exif['credit']) ? $exif['credit'] : '';
230
+ $file['aperture'] = !empty($exif['aperture']) ? $exif['aperture'] : '';
231
+ $file['camera'] = !empty($exif['camera']) ? $exif['camera'] : '';
232
+ $file['caption'] = !empty($exif['caption']) ? $exif['caption'] : '';
233
+ $file['iso'] = !empty($exif['iso']) ? $exif['iso'] : '';
234
+ $file['orientation'] = !empty($exif['orientation']) ? $exif['orientation'] : '';
235
+ $file['copyright'] = !empty($exif['copyright']) ? $exif['copyright']: '';
236
+ $file['tags'] = !empty($exif['tags']) ? $exif['tags'] : '';
237
+ $file['date_modified'] = date("Y-m-d H:i:s", filemtime($item));
238
+ $files[] = $file;
239
+ }
240
+ }
241
+ $data = array_merge($dirs,$files);
242
+ $insert = 0;
243
+ $tbl = $wpdb->prefix . 'bwg_file_paths';
244
+ if( !empty($params['refresh']) ) {
245
+ $wpdb->delete($tbl, array('path' => $path ) );
246
+ }
247
+ foreach( $data as $val ) {
248
+ $insert = $wpdb->insert($tbl, $val );
249
+ }
250
+ return $insert;
251
+ }
252
+ }
253
 
254
+ /**
255
+ * Get from session.
256
+ * @param $key
257
+ * @param $default
258
+ *
259
+ * @return mixed
260
+ */
261
+ public function get_from_session( $key, $default ) {
262
+ if (isset($_REQUEST[$key])) {
263
+ $_REQUEST[$key] = stripslashes($_REQUEST[$key]);
264
+ }
265
+ else {
266
+ $_REQUEST[$key] = stripslashes($default);
267
+ }
 
 
268
 
269
+ return esc_html(stripslashes($_REQUEST[$key]));
270
+ }
 
 
 
 
 
 
 
 
 
 
271
  }
filemanager/view.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Class FilemanagerView
5
  */
6
  class FilemanagerView {
7
 
@@ -21,8 +21,23 @@ class FilemanagerView {
21
  /**
22
  * Display.
23
  */
24
- public function display() {
25
- if (isset($_GET['filemanager_msg']) && esc_html($_GET['filemanager_msg']) != '') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ?>
27
  <div id="file_manager_message" style="height:40px;">
28
  <div style="background-color: #FFEBE8; border: 1px solid #CC0000; margin: 5px 15px 2px; padding: 5px 10px;">
@@ -32,19 +47,8 @@ class FilemanagerView {
32
  <?php
33
  $_GET['filemanager_msg'] = '';
34
  }
35
-
36
- $file_manager_data = $this->model->get_file_manager_data();
37
- $items_view = $file_manager_data['session_data']['items_view'];
38
- $sort_by = $file_manager_data['session_data']['sort_by'];
39
- $sort_order = $file_manager_data['session_data']['sort_order'];
40
- $clipboard_task = $file_manager_data['session_data']['clipboard_task'];
41
- $clipboard_files = $file_manager_data['session_data']['clipboard_files'];
42
- $clipboard_src = $file_manager_data['session_data']['clipboard_src'];
43
- $clipboard_dest = $file_manager_data['session_data']['clipboard_dest'];
44
-
45
  // Register and include styles and scripts.
46
  BWG()->register_admin_scripts();
47
-
48
  wp_print_scripts('jquery');
49
  wp_print_scripts('jquery-ui-widget');
50
  wp_print_scripts('wp-pointer');
@@ -58,46 +62,29 @@ class FilemanagerView {
58
  <script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
59
  <script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
60
  <script>
 
61
  var demo_message = "<?php echo addslashes(__('This option is disabled in demo.', BWG()->prefix)); ?>";
62
  var ajaxurl = "<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' ); ?>";
63
- var DS = "<?php echo addslashes('/'); ?>";
64
-
65
  var errorLoadingFile = "<?php echo __('File loading failed', BWG()->prefix); ?>";
66
-
67
  var warningRemoveItems = "<?php echo __('Are you sure you want to permanently remove selected items?', BWG()->prefix); ?>";
68
  var warningCancelUploads = "<?php echo __('This will cancel uploads. Continue?', BWG()->prefix); ?>";
69
-
70
  var messageEnterDirName = "<?php echo __('Enter directory name', BWG()->prefix); ?>";
71
  var messageEnterNewName = "<?php echo __('Enter new name', BWG()->prefix); ?>";
72
  var messageFilesUploadComplete = "<?php echo __('Processing uploaded files...', BWG()->prefix); ?>";
73
-
74
  var root = "<?php echo addslashes($this->controller->get_uploads_dir()); ?>";
75
  var dir = "<?php echo (isset($_REQUEST['dir']) ? trim(esc_html($_REQUEST['dir'])) : ''); ?>";
76
  var dirUrl = "<?php echo $this->controller->get_uploads_url() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) . '/' : ''); ?>";
77
  var callback = "<?php echo (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : ''); ?>";
78
  var sortBy = "<?php echo $sort_by; ?>";
79
  var sortOrder = "<?php echo $sort_order; ?>";
80
- var wdb_all_files = <?php echo isset($file_manager_data["all_files"]) && json_encode($file_manager_data["all_files"]) ? json_encode($file_manager_data["all_files"]) : "''"; ?>;
81
- var element_load_count = <?php echo isset($file_manager_data["element_load_count"]) && json_encode($file_manager_data["element_load_count"]) ? json_encode($file_manager_data["element_load_count"]) : "''"; ?>;
82
  </script>
83
  <script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/default.js?ver=<?php echo BWG()->plugin_version; ?>"></script>
84
  <link href="<?php echo BWG()->plugin_url; ?>/filemanager/css/default.css?ver=<?php echo BWG()->plugin_version; ?>" type="text/css" rel="stylesheet">
85
- <?php
86
- switch ($items_view) {
87
- case 'list':
88
- ?>
89
- <link href="<?php echo BWG()->plugin_url; ?>/filemanager/css/default_view_list.css?ver=<?php echo BWG()->plugin_version; ?>" type="text/css" rel="stylesheet">
90
- <?php
91
- break;
92
- case 'thumbs':
93
- ?>
94
- <link href="<?php echo BWG()->plugin_url; ?>/filemanager/css/default_view_thumbs.css?ver=<?php echo BWG()->plugin_version; ?>" type="text/css" rel="stylesheet">
95
- <?php
96
- break;
97
- }
98
- $i = 0;
99
- ?>
100
- <form id="adminForm" name="adminForm" action="" method="post" class="wp-core-ui">
101
  <?php wp_nonce_field( '', 'bwg_nonce' ); ?>
102
  <div id="wrapper">
103
  <div id="file_manager">
@@ -112,6 +99,8 @@ class FilemanagerView {
112
  <span class="dashicons dashicons-editor-paste-text ctrl_bar_btn" onclick="<?php echo (BWG()->is_demo ? 'alert(demo_message)' : 'onBtnPasteClick(event, this)'); ?>" title="<?php echo __('Paste', BWG()->prefix); ?>"></span>
113
  <span class="dashicons dashicons-trash ctrl_bar_btn" onclick="<?php echo (BWG()->is_demo ? 'alert(demo_message)' : 'onBtnRemoveItemsClick(event, this)'); ?>" title="<?php echo __('Remove items', BWG()->prefix); ?>"></span>
114
  <span class="ctrl_bar_divider">|</span>
 
 
115
  </div>
116
  <div class="ctrls_right">
117
  <span class="dashicons dashicons-grid-view ctrl_bar_btn" onclick="onBtnViewThumbsClick(event, this);" title="<?php echo __('View thumbs', BWG()->prefix); ?>"></span>
@@ -128,7 +117,7 @@ class FilemanagerView {
128
  </div>
129
  <div id="path">
130
  <?php
131
- foreach ($file_manager_data['path_components'] as $key => $path_component) {
132
  ?>
133
  <a <?php echo ($key == 0) ? 'title="'. __("To change upload directory go to Options page.", BWG()->prefix).'"' : ''; ?> class="path_component path_dir"
134
  onclick="onPathComponentClick(event, this, <?php echo $key; ?>);">
@@ -198,77 +187,26 @@ class FilemanagerView {
198
  </div>
199
  <div id="explorer_body_wrapper">
200
  <div id="explorer_body_container">
201
- <div id="explorer_body" data-files_count="<?php echo $file_manager_data["files_count"]; ?>">
202
  <?php
203
- foreach ($file_manager_data['files'] as $key => $file) {
 
204
  if ( BWG()->is_demo !== '1' || strpos( $file[ 'date_modified' ], '20 July 2014' ) === FALSE ) {
205
- $file[ 'name' ] = esc_html( $file[ 'name' ] );
206
- $file[ 'filename' ] = esc_html( $file[ 'filename' ] );
207
- $file[ 'alt' ] = esc_html( $file[ 'alt' ] );
208
- $file[ 'thumb' ] = esc_html( $file[ 'thumb' ] );
209
- $file[ 'credit' ] = esc_html( $file[ 'credit' ] );
210
- $file[ 'aperture' ] = esc_html( $file[ 'aperture' ] );
211
- $file[ 'camera' ] = esc_html( $file[ 'camera' ] );
212
- $file[ 'caption' ] = esc_html( $file[ 'caption' ] );
213
- $file[ 'copyright' ] = esc_html( $file[ 'copyright' ] );
214
- $file[ 'tags' ] = esc_html( $file[ 'tags' ] );
215
- ?>
216
- <div class="explorer_item" draggable="true"
217
- name="<?php echo $file[ 'name' ]; ?>"
218
- filename="<?php echo $file[ 'filename' ]; ?>"
219
- alt="<?php echo $file[ 'alt' ]; ?>"
220
- filethumb="<?php echo $file[ 'thumb' ]; ?>"
221
- filesize="<?php echo $file[ 'size' ]; ?>"
222
- filetype="<?php echo strtoupper( $file[ 'type' ] ); ?>"
223
- date_modified="<?php echo $file[ 'date_modified' ]; ?>"
224
- fileresolution="<?php echo $file[ 'resolution' ]; ?>"
225
- fileCredit="<?php echo isset( $file[ 'credit' ] ) ? $file[ 'credit' ] : ''; ?>"
226
- fileAperture="<?php echo isset( $file[ 'aperture' ] ) ? $file[ 'aperture' ] : ''; ?>"
227
- fileCamera="<?php echo isset( $file[ 'camera' ] ) ? $file[ 'camera' ] : ''; ?>"
228
- fileCaption="<?php echo isset( $file[ 'caption' ] ) ? $file[ 'caption' ] : ''; ?>"
229
- fileIso="<?php echo isset( $file[ 'iso' ] ) ? $file[ 'iso' ] : ''; ?>"
230
- fileOrientation="<?php echo isset( $file[ 'orientation' ] ) ? $file[ 'orientation' ] : ''; ?>"
231
- fileCopyright="<?php echo isset( $file[ 'copyright' ] ) ? $file[ 'copyright' ] : ''; ?>"
232
- fileTags='<?php echo isset( $file[ 'tags' ] ) ? $file[ 'tags' ] : ''; ?>'
233
- onmouseover="onFileMOver(event, this);"
234
- onmouseout="onFileMOut(event, this);"
235
- onclick="onFileClick(event, this);"
236
- ondblclick="onFileDblClick(event, this);"
237
- ondragstart="onFileDragStart(event, this);"
238
- <?php if ( $file[ 'is_dir' ] == true ) { ?>
239
- ontouchend="onFileDblClick(event, this);"
240
- ondragover="onFileDragOver(event, this);"
241
- ondrop="onFileDrop(event, this);"
242
- <?php } ?>
243
- isDir="<?php echo $file[ 'is_dir' ] == true ? 'true' : 'false'; ?>">
244
- <span class="item_numbering"><?php echo ++$i; ?></span>
245
- <span class="item_thumb">
246
- <img src="<?php echo $file[ 'thumb' ]; ?>" <?php echo $key >= 24 ? 'onload="loaded()"' : ''; ?> />
247
- </span>
248
- <span class="item_icon">
249
- <img src="<?php echo $file[ 'thumb' ]; ?>"/>
250
- </span>
251
- <span class="item_name">
252
- <?php echo $file[ 'name' ]; ?>
253
- </span>
254
- <span class="item_size">
255
- <?php echo $file[ 'size' ]; ?>
256
- </span>
257
- <span class="item_date_modified">
258
- <?php echo $file[ 'date_modified' ]; ?>
259
- </span>
260
- </div>
261
- <?php
262
  }
263
  }
264
  ?>
265
  </div>
 
 
 
266
  </div>
267
  </div>
268
  </div>
269
  <div class="ctrls_bar ctrls_bar_footer">
270
  <div class="ctrls_left">
271
- <a id="select_all_images" class="button button-primary button-large" onclick="onBtnSelectAllClick();"><?php echo __('Select All', BWG()->prefix); ?></a>
272
  </div>
273
  <div class="ctrls_right">
274
  <span id="file_names_span">
@@ -317,8 +255,8 @@ class FilemanagerView {
317
  $query_url = add_query_arg(array('action' => 'bwg_UploadHandler', 'dir' => (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '') . '/'), $query_url);
318
  ?>
319
  <input id="jQueryUploader" type="file" name="files[]"
320
- data-url="<?php echo $query_url; ?>"
321
- multiple>
322
  </div>
323
  </div>
324
  </label>
@@ -362,10 +300,9 @@ class FilemanagerView {
362
  'upload_problem': '<?php _e('There has been a problem while trying to upload the following images. Please try to upload them again.', BWG()->prefix); ?>',
363
  'allowed_upload_types' : '<?php _e('Allowed upload types JPG, JPEG, GIF, PNG.', BWG()->prefix); ?>'
364
  }
365
- jQuery(window).load(function() {
366
  jQuery("#loading_div", window.parent.document).hide();
367
  });
368
-
369
  jQuery("#jQueryUploader").fileupload({
370
  dataType: "json",
371
  dropZone: jQuery("#uploader_hitter"),
@@ -451,4 +388,60 @@ class FilemanagerView {
451
  <?php
452
  die();
453
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  }
1
  <?php
2
 
3
  /**
4
+ * Class FilemanagerViewwp_db
5
  */
6
  class FilemanagerView {
7
 
21
  /**
22
  * Display.
23
  */
24
+ public function display( $params = array() ) {
25
+ $dir = $params['dir'];
26
+ $items = $params['items'];
27
+ $path_components = $params['path_components'];
28
+ $session = $params['session_data'];
29
+ $sort_by = $session['sort_by'];
30
+ $sort_order = $session['sort_order'];
31
+ $clipboard_task = $session['clipboard_task'];
32
+ $clipboard_files = $session['clipboard_files'];
33
+ $clipboard_src = $session['clipboard_src'];
34
+ $clipboard_dest = $session['clipboard_dest'];
35
+ $items_view = $session['items_view'];
36
+ $page_per = $params['page_per'];
37
+ $ajax_pagination_url = $params["ajax_pagination_url"];
38
+ $ajax_get_all_select_url = $params["ajax_get_all_select_url"];
39
+
40
+ if (isset($_GET['filemanager_msg']) && esc_html($_GET['filemanager_msg']) != '') {
41
  ?>
42
  <div id="file_manager_message" style="height:40px;">
43
  <div style="background-color: #FFEBE8; border: 1px solid #CC0000; margin: 5px 15px 2px; padding: 5px 10px;">
47
  <?php
48
  $_GET['filemanager_msg'] = '';
49
  }
 
 
 
 
 
 
 
 
 
 
50
  // Register and include styles and scripts.
51
  BWG()->register_admin_scripts();
 
52
  wp_print_scripts('jquery');
53
  wp_print_scripts('jquery-ui-widget');
54
  wp_print_scripts('wp-pointer');
62
  <script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
63
  <script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
64
  <script>
65
+ var DS = "<?php echo addslashes('/'); ?>";
66
  var demo_message = "<?php echo addslashes(__('This option is disabled in demo.', BWG()->prefix)); ?>";
67
  var ajaxurl = "<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'addImages', 'bwg_nonce' ); ?>";
68
+ var ajax_pagination_url = "<?php echo $ajax_pagination_url; ?>";
69
+ var ajax_get_all_select_url = "<?php echo $ajax_get_all_select_url; ?>";
70
  var errorLoadingFile = "<?php echo __('File loading failed', BWG()->prefix); ?>";
 
71
  var warningRemoveItems = "<?php echo __('Are you sure you want to permanently remove selected items?', BWG()->prefix); ?>";
72
  var warningCancelUploads = "<?php echo __('This will cancel uploads. Continue?', BWG()->prefix); ?>";
 
73
  var messageEnterDirName = "<?php echo __('Enter directory name', BWG()->prefix); ?>";
74
  var messageEnterNewName = "<?php echo __('Enter new name', BWG()->prefix); ?>";
75
  var messageFilesUploadComplete = "<?php echo __('Processing uploaded files...', BWG()->prefix); ?>";
 
76
  var root = "<?php echo addslashes($this->controller->get_uploads_dir()); ?>";
77
  var dir = "<?php echo (isset($_REQUEST['dir']) ? trim(esc_html($_REQUEST['dir'])) : ''); ?>";
78
  var dirUrl = "<?php echo $this->controller->get_uploads_url() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) . '/' : ''); ?>";
79
  var callback = "<?php echo (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : ''); ?>";
80
  var sortBy = "<?php echo $sort_by; ?>";
81
  var sortOrder = "<?php echo $sort_order; ?>";
82
+ var page_per = "<?php echo $page_per; ?>";
 
83
  </script>
84
  <script src="<?php echo BWG()->plugin_url; ?>/filemanager/js/default.js?ver=<?php echo BWG()->plugin_version; ?>"></script>
85
  <link href="<?php echo BWG()->plugin_url; ?>/filemanager/css/default.css?ver=<?php echo BWG()->plugin_version; ?>" type="text/css" rel="stylesheet">
86
+ <link href="<?php echo BWG()->plugin_url; ?>/filemanager/css/default_view_<?php echo $items_view; ?>.css?ver=<?php echo BWG()->plugin_version; ?>" type="text/css" rel="stylesheet">
87
+ <form id="adminForm" name="adminForm" action="" method="post" class="wp-core-ui">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  <?php wp_nonce_field( '', 'bwg_nonce' ); ?>
89
  <div id="wrapper">
90
  <div id="file_manager">
99
  <span class="dashicons dashicons-editor-paste-text ctrl_bar_btn" onclick="<?php echo (BWG()->is_demo ? 'alert(demo_message)' : 'onBtnPasteClick(event, this)'); ?>" title="<?php echo __('Paste', BWG()->prefix); ?>"></span>
100
  <span class="dashicons dashicons-trash ctrl_bar_btn" onclick="<?php echo (BWG()->is_demo ? 'alert(demo_message)' : 'onBtnRemoveItemsClick(event, this)'); ?>" title="<?php echo __('Remove items', BWG()->prefix); ?>"></span>
101
  <span class="ctrl_bar_divider">|</span>
102
+ <span class="dashicons dashicons-update ctrl_bar_btn" onclick="<?php echo (BWG()->is_demo ? 'alert(demo_message)' : 'onBtnParsingItemsClick(event, this)'); ?>" title="<?php echo __('Refresh', BWG()->prefix); ?>"></span>
103
+ <span class="ctrl_bar_divider">|</span>
104
  </div>
105
  <div class="ctrls_right">
106
  <span class="dashicons dashicons-grid-view ctrl_bar_btn" onclick="onBtnViewThumbsClick(event, this);" title="<?php echo __('View thumbs', BWG()->prefix); ?>"></span>
117
  </div>
118
  <div id="path">
119
  <?php
120
+ foreach ( $path_components as $key => $path_component ) {
121
  ?>
122
  <a <?php echo ($key == 0) ? 'title="'. __("To change upload directory go to Options page.", BWG()->prefix).'"' : ''; ?> class="path_component path_dir"
123
  onclick="onPathComponentClick(event, this, <?php echo $key; ?>);">
187
  </div>
188
  <div id="explorer_body_wrapper">
189
  <div id="explorer_body_container">
190
+ <div id="explorer_body" data-page_per=<?php echo $items['page_per']; ?> data-files_count="<?php echo $items["num_rows"]; ?>">
191
  <?php
192
+ $i = 0;
193
+ foreach ( $items['files'] as $key => $file ) {
194
  if ( BWG()->is_demo !== '1' || strpos( $file[ 'date_modified' ], '20 July 2014' ) === FALSE ) {
195
+ $file['index'] = ++$i;
196
+ echo $this->print_file_thumb($file);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  }
198
  }
199
  ?>
200
  </div>
201
+ <div class="fm-no-found-wrap">
202
+ <h2><?php _e('No items found.', BWG()->prefix); ?></h2>
203
+ </div>
204
  </div>
205
  </div>
206
  </div>
207
  <div class="ctrls_bar ctrls_bar_footer">
208
  <div class="ctrls_left">
209
+ <a id="select_all_images" class="button button-primary button-large" onclick="onBtnSelectAllClick('<?php echo $dir; ?>');"><?php echo __('Select All', BWG()->prefix); ?></a>
210
  </div>
211
  <div class="ctrls_right">
212
  <span id="file_names_span">
255
  $query_url = add_query_arg(array('action' => 'bwg_UploadHandler', 'dir' => (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '') . '/'), $query_url);
256
  ?>
257
  <input id="jQueryUploader" type="file" name="files[]"
258
+ data-url="<?php echo $query_url; ?>"
259
+ multiple>
260
  </div>
261
  </div>
262
  </label>
300
  'upload_problem': '<?php _e('There has been a problem while trying to upload the following images. Please try to upload them again.', BWG()->prefix); ?>',
301
  'allowed_upload_types' : '<?php _e('Allowed upload types JPG, JPEG, GIF, PNG.', BWG()->prefix); ?>'
302
  }
303
+ jQuery(document).ready(function () {
304
  jQuery("#loading_div", window.parent.document).hide();
305
  });
 
306
  jQuery("#jQueryUploader").fileupload({
307
  dataType: "json",
308
  dropZone: jQuery("#uploader_hitter"),
388
  <?php
389
  die();
390
  }
391
+
392
+ /**
393
+ * Print file thumb.
394
+ *
395
+ * @param array $file
396
+ *
397
+ * @return false|string
398
+ */
399
+ function print_file_thumb( $file = array() ) {
400
+ ob_start();
401
+ $file['name'] = esc_html( $file['name'] );
402
+ $file['filename'] = esc_html( $file['filename'] );
403
+ $file['alt' ] = esc_html( $file['alt'] );
404
+ $file['thumb'] = esc_html( $file['thumb'] );
405
+ $file['credit'] = esc_html( $file['credit'] );
406
+ $file['aperture'] = esc_html( $file['aperture'] );
407
+ $file['camera'] = esc_html( $file['camera'] );
408
+ $file['caption'] = esc_html( $file['caption'] );
409
+ $file['copyright'] = esc_html( $file['copyright'] );
410
+ $file['tags'] = esc_html( $file['tags'] );
411
+ ?>
412
+ <div class="explorer_item"
413
+ name="<?php echo $file['name']; ?>"
414
+ filename="<?php echo $file['filename']; ?>"
415
+ alt="<?php echo $file['alt']; ?>"
416
+ filethumb="<?php echo $file['thumb']; ?>"
417
+ filesize="<?php echo $file['size']; ?>"
418
+ filetype="<?php echo strtoupper( $file['type'] ); ?>"
419
+ date_modified="<?php echo $file['date_modified']; ?>"
420
+ fileresolution="<?php echo $file['resolution']; ?>"
421
+ fileCredit="<?php echo isset( $file['credit'] ) ? $file['credit'] : ''; ?>"
422
+ fileAperture="<?php echo isset( $file['aperture'] ) ? $file['aperture'] : ''; ?>"
423
+ fileCamera="<?php echo isset( $file['camera'] ) ? $file['camera'] : ''; ?>"
424
+ fileCaption="<?php echo isset( $file['caption'] ) ? $file['caption'] : ''; ?>"
425
+ fileIso="<?php echo isset( $file['iso'] ) ? $file['iso'] : ''; ?>"
426
+ fileOrientation="<?php echo isset( $file['orientation'] ) ? $file['orientation'] : ''; ?>"
427
+ fileCopyright="<?php echo isset( $file['copyright'] ) ? $file['copyright'] : ''; ?>"
428
+ fileTags='<?php echo isset( $file['tags'] ) ? $file['tags'] : ''; ?>'
429
+ onmouseover="onFileMOver(event, this);"
430
+ onmouseout="onFileMOut(event, this);"
431
+ onclick="onFileClick(event, this);"
432
+ ondblclick="onFileDblClick(event, this);"
433
+ <?php if ( $file[ 'is_dir' ] == true ) { ?>
434
+ ontouchend="onFileDblClick(event, this);"
435
+ <?php } ?>
436
+ isDir="<?php echo ($file[ 'is_dir' ] == true) ? 'true' : 'false'; ?>">
437
+ <span class="item_numbering"><?php echo $file['index']; ?></span>
438
+ <span class="item_thumb"><img src="<?php echo $file[ 'thumb' ]; ?>" /></span>
439
+ <span class="item_icon"><img src="<?php echo $file[ 'thumb' ]; ?>" /></span>
440
+ <span class="item_name"><?php echo $file['name']; ?></span>
441
+ <span class="item_size"><?php echo $file['size']; ?></span>
442
+ <span class="item_date_modified"><?php echo $file['date_modified']; ?></span>
443
+ </div>
444
+ <?php
445
+ return ob_get_clean();
446
+ }
447
  }
framework/BWGOptions.php CHANGED
@@ -211,12 +211,13 @@ class WD_BWG_Options {
211
  public $album_masonry_ecommerce_icon_show_hover = 'none';
212
 
213
  // Album extended
214
- public $extended_album_height = 200;
215
- public $album_extended_thumb_width = 250;
216
- public $album_extended_thumb_height = 140;
 
217
  public $album_extended_image_column_number = 5;
218
- public $album_extended_image_thumb_width = 250;
219
- public $album_extended_image_thumb_height = 140;
220
  public $album_extended_enable_page = 1;
221
  public $albums_extended_per_page = 30;
222
  public $album_extended_images_per_page = 30;
211
  public $album_masonry_ecommerce_icon_show_hover = 'none';
212
 
213
  // Album extended
214
+ public $extended_album_column_number = 2;
215
+ public $extended_album_height = 160;
216
+ public $album_extended_thumb_width = 357;
217
+ public $album_extended_thumb_height = 201;
218
  public $album_extended_image_column_number = 5;
219
+ public $album_extended_image_thumb_width = 357;
220
+ public $album_extended_image_thumb_height = 201;
221
  public $album_extended_enable_page = 1;
222
  public $albums_extended_per_page = 30;
223
  public $album_extended_images_per_page = 30;
framework/WDWLibrary.php CHANGED
@@ -206,6 +206,11 @@ class WDWLibrary {
206
  $type = 'error';
207
  break;
208
  }
 
 
 
 
 
209
  default: {
210
  $message = '';
211
  break;
@@ -1312,13 +1317,12 @@ class WDWLibrary {
1312
  global $wpdb;
1313
  $message_id = 21;
1314
  $options = new WD_BWG_Options();
1315
-
1316
  if ( $options->built_in_watermark_type != 'none' ) {
1317
  $limitstart = '';
1318
  if ( !$limit ) {
1319
  $limitstart = ' LIMIT 50 OFFSET ' . $limit;
1320
  }
1321
- $where = (($gallery_id) ? ' `gallery_id`=' . $gallery_id . ($image_id && !$limit ? ' AND `id`=' . $image_id : '') : 1);
1322
  $search = WDWLibrary::get( 's', '' );
1323
  if ( $search ) {
1324
  $where .= ' AND `filename` LIKE "%' . $search . '%"';
@@ -2061,6 +2065,7 @@ class WDWLibrary {
2061
  break;
2062
  case 'album_extended_preview':
2063
  $defaults['extended_album_height'] = self::get_option_value('extended_album_height', 'extended_album_height', 'extended_album_height', $use_option_defaults, $params);
 
2064
  $defaults['extended_album_thumb_width'] = self::get_option_value('extended_album_thumb_width', 'extended_album_thumb_width', 'album_extended_thumb_width', $use_option_defaults, $params);
2065
  $defaults['extended_album_thumb_height'] = self::get_option_value('extended_album_thumb_height', 'extended_album_thumb_height', 'album_extended_thumb_height', $use_option_defaults, $params);
2066
  $defaults['extended_album_image_column_number'] = self::get_option_value('extended_album_image_column_number', 'extended_album_image_column_number', 'album_extended_image_column_number', $use_option_defaults, $params);
@@ -2078,7 +2083,7 @@ class WDWLibrary {
2078
  $defaults['show_tag_box'] = self::get_option_value('album_extended_show_tag_box', 'show_tag_box', 'album_extended_show_tag_box', $use_option_defaults, $params);
2079
  $defaults['show_album_name'] = self::get_option_value('show_album_extended_name', 'show_album_name', 'show_album_extended_name', $use_option_defaults, $params);
2080
  $defaults['show_gallery_description'] = self::get_option_value('album_extended_show_gallery_description', 'show_gallery_description', 'album_extended_show_gallery_description', $use_option_defaults, $params);
2081
- $defaults['extended_album_description_enable'] = self::get_option_value('extended_album_description_enable', 'extended_album_description_enable', 'extended_album_description_enable', $use_option_defaults, $params);
2082
  $defaults['extended_album_view_type'] = self::get_option_value('extended_album_view_type', 'extended_album_view_type', 'album_extended_view_type', $use_option_defaults, $params);
2083
  $defaults['extended_album_image_title'] = self::get_option_value('extended_album_image_title', 'extended_album_image_title', 'album_extended_image_title_show_hover', $use_option_defaults, $params);
2084
  $defaults['extended_album_mosaic_hor_ver'] = self::get_option_value('extended_album_mosaic_hor_ver', 'extended_album_mosaic_hor_ver', 'album_mosaic', $use_option_defaults, $params);
@@ -2549,7 +2554,7 @@ class WDWLibrary {
2549
  }
2550
  $show_content = $show_content && !BWG()->is_pro;
2551
  $support_forum_link = 'https://wordpress.org/support/plugin/photo-gallery';
2552
- $premium_link = 'https://web-dorado.com/files/fromPhotoGallery.php';
2553
  wp_enqueue_style(BWG()->prefix . '-roboto');
2554
  wp_enqueue_style(BWG()->prefix . '-pricing');
2555
  ob_start();
@@ -2774,7 +2779,7 @@ class WDWLibrary {
2774
  }
2775
 
2776
  public static function error_message_ids() {
2777
- return array( 26 );
2778
  }
2779
 
2780
  /**
206
  $type = 'error';
207
  break;
208
  }
209
+ case 27: {
210
+ $message = __('http:// wrapper is disabled in the server configuration by allow_url_fopen=0.', BWG()->prefix);
211
+ $type = 'error';
212
+ break;
213
+ }
214
  default: {
215
  $message = '';
216
  break;
1317
  global $wpdb;
1318
  $message_id = 21;
1319
  $options = new WD_BWG_Options();
 
1320
  if ( $options->built_in_watermark_type != 'none' ) {
1321
  $limitstart = '';
1322
  if ( !$limit ) {
1323
  $limitstart = ' LIMIT 50 OFFSET ' . $limit;
1324
  }
1325
+ $where = (($gallery_id) ? ' `gallery_id`=' . $gallery_id . ($image_id ? ' AND `id`=' . $image_id : '') : 1);
1326
  $search = WDWLibrary::get( 's', '' );
1327
  if ( $search ) {
1328
  $where .= ' AND `filename` LIKE "%' . $search . '%"';
2065
  break;
2066
  case 'album_extended_preview':
2067
  $defaults['extended_album_height'] = self::get_option_value('extended_album_height', 'extended_album_height', 'extended_album_height', $use_option_defaults, $params);
2068
+ $defaults['extended_album_column_number'] = self::get_option_value('extended_album_column_number', 'extended_album_column_number', 'extended_album_column_number', $use_option_defaults, $params);
2069
  $defaults['extended_album_thumb_width'] = self::get_option_value('extended_album_thumb_width', 'extended_album_thumb_width', 'album_extended_thumb_width', $use_option_defaults, $params);
2070
  $defaults['extended_album_thumb_height'] = self::get_option_value('extended_album_thumb_height', 'extended_album_thumb_height', 'album_extended_thumb_height', $use_option_defaults, $params);
2071
  $defaults['extended_album_image_column_number'] = self::get_option_value('extended_album_image_column_number', 'extended_album_image_column_number', 'album_extended_image_column_number', $use_option_defaults, $params);
2083
  $defaults['show_tag_box'] = self::get_option_value('album_extended_show_tag_box', 'show_tag_box', 'album_extended_show_tag_box', $use_option_defaults, $params);
2084
  $defaults['show_album_name'] = self::get_option_value('show_album_extended_name', 'show_album_name', 'show_album_extended_name', $use_option_defaults, $params);
2085
  $defaults['show_gallery_description'] = self::get_option_value('album_extended_show_gallery_description', 'show_gallery_description', 'album_extended_show_gallery_description', $use_option_defaults, $params);
2086
+ $defaults['extended_album_description_enable'] = self::get_option_value('extended_album_description_enable', 'extended_album_description_enable', 'extended_album_description_enable', $use_option_defaults, $params);
2087
  $defaults['extended_album_view_type'] = self::get_option_value('extended_album_view_type', 'extended_album_view_type', 'album_extended_view_type', $use_option_defaults, $params);
2088
  $defaults['extended_album_image_title'] = self::get_option_value('extended_album_image_title', 'extended_album_image_title', 'album_extended_image_title_show_hover', $use_option_defaults, $params);
2089
  $defaults['extended_album_mosaic_hor_ver'] = self::get_option_value('extended_album_mosaic_hor_ver', 'extended_album_mosaic_hor_ver', 'album_mosaic', $use_option_defaults, $params);
2554
  }
2555
  $show_content = $show_content && !BWG()->is_pro;
2556
  $support_forum_link = 'https://wordpress.org/support/plugin/photo-gallery';
2557
+ $premium_link = 'https://10web.io/plugins/wordpress-photo-gallery/?utm_source=photo_gallery&utm_medium=free_plugin';
2558
  wp_enqueue_style(BWG()->prefix . '-roboto');
2559
  wp_enqueue_style(BWG()->prefix . '-pricing');
2560
  ob_start();
2779
  }
2780
 
2781
  public static function error_message_ids() {
2782
+ return array( 26, 27 );
2783
  }
2784
 
2785
  /**
frontend/controllers/controller.php CHANGED
@@ -250,6 +250,9 @@ class BWGControllerSite {
250
  if ( !isset($theme_row->album_extended_gal_title_align) ) {
251
  $theme_row->album_extended_gal_title_align = 'center';
252
  }
 
 
 
253
  }
254
  }
255
 
@@ -482,7 +485,7 @@ class BWGControllerSite {
482
  $params['tags_rows'] = $this->model->get_tags_rows_data($params['gallery_id']);
483
  }
484
 
485
- $params['current_url'] = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
486
 
487
  $params_array = array(
488
  'action' => 'GalleryBox',
250
  if ( !isset($theme_row->album_extended_gal_title_align) ) {
251
  $theme_row->album_extended_gal_title_align = 'center';
252
  }
253
+ if ( !isset($theme_row->album_extended_title_desc_alignment) ) {
254
+ $theme_row->album_extended_title_desc_alignment = 'top';
255
+ }
256
  }
257
  }
258
 
485
  $params['tags_rows'] = $this->model->get_tags_rows_data($params['gallery_id']);
486
  }
487
 
488
+ $params['current_url'] = trim((is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
489
 
490
  $params_array = array(
491
  'action' => 'GalleryBox',
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -62,117 +62,97 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
62
 
63
  if ( $params['album_view_type'] != 'gallery' ) {
64
  ?>
65
- <div data-bwg="<?php echo $bwg; ?>"
66
- id="<?php echo $params['container_id']; ?>"
67
- class="bwg-thumbnails bwg-container bwg-container-<?php echo $bwg; ?> bwg-album-thumbnails <?php echo 'bwg_album_extended_thumbnails_' . $bwg; ?>">
68
- <?php
69
- if ( !$params['album_gallery_rows']['page_nav']['total'] ) {
70
- echo WDWLibrary::message(__('Album is empty.', BWG()->prefix), 'wd_error');
71
- }
72
- foreach ( $params['album_gallery_rows']['rows'] as $row ) {
73
- $href = add_query_arg(array(
74
- "type_" . $bwg => $row->def_type,
75
- "album_gallery_id_" . $bwg => (($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id),
76
- ), $_SERVER['REQUEST_URI']);
77
-
78
- /* ToDO: Remove after refactoring.*/
79
- $preview_path_url = htmlspecialchars_decode($row->preview_path, ENT_COMPAT | ENT_QUOTES);
80
- if ( strpos($preview_path_url, '?bwg') !== FALSE) {
81
- $preview_path_url = explode('?bwg', $preview_path_url);
82
- $preview_path = $preview_path_url[0];
83
- }
84
- else {
85
- $preview_path = $preview_path_url;
86
- }
87
- list($image_thumb_width, $image_thumb_height) = @getimagesize($preview_path);
88
- if ( !$image_thumb_width ) {
89
- $image_thumb_width = 1;
90
- }
91
- if ( !$image_thumb_height ) {
92
- $image_thumb_height = 1;
93
  }
94
- $scale = max($params['extended_album_thumb_width'] / $image_thumb_width, $params['extended_album_thumb_height'] / $image_thumb_height);
95
- $image_thumb_width *= $scale;
96
- $image_thumb_height *= $scale;
97
- $thumb_left = ($params['extended_album_thumb_width'] - $image_thumb_width) / 2;
98
- $thumb_top = ($params['extended_album_thumb_height'] - $image_thumb_height) / 2;
99
- ?>
100
- <div class="bwg_album_extended_div_<?php echo $bwg; ?>">
101
- <div class="bwg_album_extended_thumb_div_<?php echo $bwg; ?>">
102
- <a class="bwg-album bwg_album_<?php echo $bwg; ?>"
103
- <?php echo(BWG()->options->enable_seo ? "href='" . esc_url($href) . "'" : ""); ?>
104
- style="font-size: 0;"
105
- data-bwg="<?php echo $bwg; ?>"
106
- data-container_id="<?php echo $params['container_id']; ?>"
107
- data-alb_gal_id="<?php echo (($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
108
- data-def_type="<?php echo $row->def_type; ?>"
109
- data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
110
- <span class="bwg_album_thumb_<?php echo $bwg; ?>" style="height:inherit;">
111
- <span class="bwg_album_thumb_spun1_<?php echo $bwg; ?>">
112
- <span class="bwg_album_thumb_spun2_<?php echo $bwg; ?>">
113
- <img class="skip-lazy bwg_img_clear bwg_img_custom"
114
- style="width:<?php echo $image_thumb_width; ?>px; height:<?php echo $image_thumb_height; ?>px; margin-left: <?php echo $thumb_left; ?>px; margin-top: <?php echo $thumb_top; ?>px;"
115
- src="<?php echo $row->preview_image; ?>"
116
- alt="<?php echo $row->name; ?>" />
117
- </span>
118
- </span>
119
- </span>
120
- </a>
121
- </div>
122
- <div class="bwg_album_extended_text_div_<?php echo $bwg; ?>">
123
- <?php
124
- if ( $row->name ) {
125
- ?>
126
  <a class="bwg-album bwg_album_<?php echo $bwg; ?>"
127
- <?php echo (BWG()->options->enable_seo ? "href='" . esc_url($href) . "'" : ""); ?>
128
  style="font-size: 0;"
129
  data-bwg="<?php echo $bwg; ?>"
130
  data-container_id="<?php echo $params['container_id']; ?>"
131
- data-alb_gal_id="<?php echo(($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
132
  data-def_type="<?php echo $row->def_type; ?>"
133
  data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
134
- <span class="bwg_title_spun_<?php echo $bwg; ?>"><?php echo $row->name; ?></span>
 
 
 
 
 
 
 
 
135
  </a>
 
 
136
  <?php
137
- }
138
- if ( $params['extended_album_description_enable'] && $row->description ) {
139
- if ( stripos($row->description, '<!--more-->') !== FALSE ) {
140
- $description_array = explode('<!--more-->', $row->description);
141
- $description_short = $description_array[0];
142
- $description_full = $description_array[1];
143
  ?>
144
- <span class="bwg_description_spun1_<?php echo $bwg; ?>">
145
- <span class="bwg_description_spun2_<?php echo $bwg; ?>">
146
- <span class="bwg_description_short_<?php echo $bwg; ?>">
147
- <?php echo $description_short; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  </span>
149
- <span class="bwg_description_full">
150
- <?php echo $description_full; ?>
 
 
151
  </span>
152
  </span>
153
- <span data-more-msg="<?php _e('More', BWG()->prefix); ?>"
154
- data-hide-msg="<?php _e('Hide', BWG()->prefix); ?>"
155
- class="bwg_description_more bwg_description_more_<?php echo $bwg; ?> bwg_more">
156
- <?php _e('More', BWG()->prefix); ?>
157
- </span>
158
- </span>
159
- <?php
160
- }
161
- else {
162
- ?>
163
- <span class="bwg_description_spun1_<?php echo $bwg; ?>">
164
  <span class="bwg_description_short_<?php echo $bwg; ?>">
165
  <?php echo $row->description; ?>
166
  </span>
167
  </span>
168
- <?php
 
169
  }
170
- }
171
- ?>
172
  </div>
173
- </div>
174
- <?php
175
- }
176
  ?>
177
  </div>
178
  <?php
@@ -207,60 +187,46 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
207
  $rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
208
  $rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
209
  ?>
210
- /* Style for thumbnail view.*/
211
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> * {
212
- -moz-box-sizing: border-box;
213
- box-sizing: border-box;
214
- }
215
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> {
216
- display: block;
217
  -moz-box-sizing: border-box;
218
  box-sizing: border-box;
219
  background-color: rgba(<?php echo $rgb_album_extended_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_thumb_bg_transparent / 100, 2, ".", ""); ?>);
220
- font-size: 0;
221
  text-align: <?php echo $theme_row->album_extended_thumb_align; ?>;
222
- max-width: inherit;
223
  }
224
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_div_<?php echo $bwg; ?> {
225
- display: table;
226
- width: 100%;
227
- height: <?php echo $params['extended_album_height']; ?>px;
228
- border-spacing: <?php echo $theme_row->album_extended_div_padding; ?>px;
229
  border-bottom: <?php echo $theme_row->album_extended_div_separator_width; ?>px <?php echo $theme_row->album_extended_div_separator_style; ?> #<?php echo $theme_row->album_extended_div_separator_color; ?>;
230
  background-color: rgba(<?php echo $rgb_album_extended_div_bg_color['red']; ?>, <?php echo $rgb_album_extended_div_bg_color['green']; ?>, <?php echo $rgb_album_extended_div_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_div_bg_transparent / 100, 2, ".", ""); ?>);
231
  border-radius: <?php echo $theme_row->album_extended_div_border_radius; ?>;
232
  margin: <?php echo $theme_row->album_extended_div_margin; ?>;
 
233
  }
234
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumb_div_<?php echo $bwg; ?> {
 
235
  background-color: #<?php echo $theme_row->album_extended_thumb_div_bg_color; ?>;
236
  border-radius: <?php echo $theme_row->album_extended_thumb_div_border_radius; ?>;
237
- text-align: center;
238
  border: <?php echo $theme_row->album_extended_thumb_div_border_width; ?>px <?php echo $theme_row->album_extended_thumb_div_border_style; ?> #<?php echo $theme_row->album_extended_thumb_div_border_color; ?>;
239
- display: table-cell;
240
- vertical-align: middle;
241
  padding: <?php echo $theme_row->album_extended_thumb_div_padding; ?>;
 
 
242
  }
243
- @media only screen and (max-width : 320px) {
244
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumb_div_<?php echo $bwg; ?> {
245
- display: table-row;
246
- }
247
- }
248
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_text_div_<?php echo $bwg; ?> {
249
  background-color: #<?php echo $theme_row->album_extended_text_div_bg_color; ?>;
250
  border-radius: <?php echo $theme_row->album_extended_text_div_border_radius; ?>;
251
  border: <?php echo $theme_row->album_extended_text_div_border_width; ?>px <?php echo $theme_row->album_extended_text_div_border_style; ?> #<?php echo $theme_row->album_extended_text_div_border_color; ?>;
252
- display: table-cell;
253
- width: 100%;
254
  border-collapse: collapse;
255
- vertical-align: middle;
256
  padding: <?php echo $theme_row->album_extended_text_div_padding; ?>;
 
257
  }
258
- @media only screen and (max-width : 320px) {
259
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_text_div_<?php echo $bwg; ?> {
260
- display: table-row;
261
- }
262
- }
263
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun_<?php echo $bwg; ?> {
264
  border: <?php echo $theme_row->album_extended_title_span_border_width; ?>px <?php echo $theme_row->album_extended_title_span_border_style; ?> #<?php echo $theme_row->album_extended_title_span_border_color; ?>;
265
  color: #<?php echo $theme_row->album_extended_title_font_color; ?>;
266
  display: block;
@@ -272,15 +238,15 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
272
  padding: <?php echo $theme_row->album_extended_title_padding; ?>;
273
  text-align: left;
274
  vertical-align: middle;
275
- width: inherit;
276
  }
277
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> a {
278
  color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
279
  font-size: <?php echo $theme_row->album_extended_desc_font_size; ?>px;
280
  font-weight: <?php echo $theme_row->album_extended_desc_font_weight; ?>;
281
  font-family: <?php echo $theme_row->album_extended_desc_font_style; ?>;
282
  }
283
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> {
284
  border: <?php echo $theme_row->album_extended_desc_span_border_width; ?>px <?php echo $theme_row->album_extended_desc_span_border_style; ?> #<?php echo $theme_row->album_extended_desc_span_border_color; ?>;
285
  display: inline-block;
286
  color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
@@ -290,23 +256,23 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
290
  height: inherit;
291
  padding: <?php echo $theme_row->album_extended_desc_padding; ?>;
292
  vertical-align: middle;
293
- width: inherit;
294
  word-wrap: break-word;
295
  word-break: break-word;
296
  }
297
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun1_<?php echo $bwg; ?> * {
298
  margin: 0;
299
  }
300
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_spun2_<?php echo $bwg; ?> {
301
  float: left;
302
  }
303
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_short_<?php echo $bwg; ?> {
304
  display: inline;
305
  }
306
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_full {
307
  display: none;
308
  }
309
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_description_more_<?php echo $bwg; ?> {
310
  clear: both;
311
  color: #<?php echo $theme_row->album_extended_desc_more_color; ?>;
312
  cursor: pointer;
@@ -314,75 +280,56 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
314
  font-size: <?php echo $theme_row->album_extended_desc_more_size; ?>px;
315
  font-weight: normal;
316
  }
317
- /*Album thumbs styles.*/
318
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_<?php echo $bwg; ?> {
319
- display: inline-block;
320
- text-align: center;
321
- }
322
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?> {
323
  background-color: #<?php echo $theme_row->album_extended_thumb_bg_color; ?>;
324
  border-radius: <?php echo $theme_row->album_extended_thumb_border_radius; ?>;
325
  border: <?php echo $theme_row->album_extended_thumb_border_width; ?>px <?php echo $theme_row->album_extended_thumb_border_style; ?> #<?php echo $theme_row->album_extended_thumb_border_color; ?>;
326
  box-shadow: <?php echo $theme_row->album_extended_thumb_box_shadow; ?>;
327
- display: inline-block;
328
- height: <?php echo $params['extended_album_thumb_height']; ?>px;
329
  margin: <?php echo $theme_row->album_extended_thumb_margin; ?>px;
330
  opacity: <?php echo number_format($theme_row->album_extended_thumb_transparent / 100, 2, ".", ""); ?>;
331
  filter: Alpha(opacity=<?php echo $theme_row->album_extended_thumb_transparent; ?>);
332
- <?php echo ($theme_row->album_extended_thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
333
- padding: <?php echo $theme_row->album_extended_thumb_padding; ?>px;
334
- text-align: center;
335
- vertical-align: middle;
336
- width: <?php echo $params['extended_album_thumb_width']; ?>px;
337
- z-index: 100;
338
  }
339
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover {
340
- opacity: 1;
341
- filter: Alpha(opacity=100);
342
- backface-visibility: hidden;
343
- -webkit-backface-visibility: hidden;
344
- -moz-backface-visibility: hidden;
345
- -ms-backface-visibility: hidden;
346
- z-index: 102;
347
  }
348
- @media only screen and (min-width: 480px) {
349
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun1_<?php echo $bwg; ?>:hover {
350
- transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
351
- -ms-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
352
- -webkit-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
 
 
 
 
 
 
 
 
 
353
  }
354
- }
355
- #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_thumb_spun2_<?php echo $bwg; ?> {
356
- display: inline-block;
357
- height: <?php echo $params['extended_album_thumb_height']; ?>px;
358
- overflow: hidden;
359
- width: <?php echo $params['extended_album_thumb_width']; ?>px;
360
- }
361
- @media screen and (max-width: <?php echo $params['extended_album_thumb_width'] + 100; ?>px) {
362
- div[class^="bwg_album_extended_thumb_div_"],
363
- span[class^="bwg_album_thumb_"],
364
- span[class^="bwg_album_thumb_"] .bwg_img_custom
365
- {
366
- width: 100% !important;
367
- height: auto !important;
368
- }
369
- span[class^="bwg_album_thumb_"] .bwg_img_custom {
370
- margin:0px auto !important;
371
  }
 
372
  }
373
- @media screen and (max-width: <?php echo $params['extended_album_image_thumb_width'] + 100; ?>px) {
374
- div[class^="bwg_mosaic_thumbnails_"],
375
- div[class^="bwg_mosaic_thumb_spun_"],
376
- img[class^="bwg_mosaic_thumb_"]
377
- {
378
- width: 100% !important;
379
- height: auto !important;
380
- }
381
- img[class^="bwg_mosaic_thumb_"] {
382
- margin:0px auto !important;
 
 
 
 
 
 
383
  }
 
384
  }
385
- <?php
386
 
387
  /* Add gallery styles, if gallery type exist.*/
388
  if ( $this->gallery_view && method_exists($this->gallery_view, 'inline_styles') ) {
@@ -404,6 +351,7 @@ class BWGViewAlbum_extended_preview extends BWGViewSite {
404
 
405
  echo $this->gallery_view->inline_styles($bwg, $theme_row, $params);
406
  }
 
407
  return ob_get_clean();
408
  }
409
  }
62
 
63
  if ( $params['album_view_type'] != 'gallery' ) {
64
  ?>
65
+ <div data-max-count="<?php echo $params['extended_album_column_number']; ?>"
66
+ data-thumbnail-width="<?php echo $params['extended_album_thumb_width']; ?>"
67
+ data-global-spacing="<?php echo $theme_row->album_extended_div_margin; ?>"
68
+ data-spacing="<?php echo $theme_row->album_extended_div_padding; ?>"
69
+ data-bwg="<?php echo $bwg; ?>"
70
+ id="<?php echo $params['container_id']; ?>"
71
+ class="bwg-album-extended bwg-border-box bwg-thumbnails bwg-container bwg-container-<?php echo $bwg; ?> bwg-album-thumbnails bwg_album_extended_thumbnails_<?php echo $bwg; ?>">
72
+ <?php
73
+ if ( !$params['album_gallery_rows']['page_nav']['total'] ) {
74
+ echo WDWLibrary::message(__('Album is empty.', BWG()->prefix), 'wd_error');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
+ foreach ( $params['album_gallery_rows']['rows'] as $row ) {
77
+ $href = add_query_arg(array(
78
+ "type_" . $bwg => $row->def_type,
79
+ "album_gallery_id_" . $bwg => (($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id),
80
+ ), $_SERVER['REQUEST_URI']);
81
+ ?>
82
+ <div class="bwg-extended-item">
83
+ <div class="bwg-extended-item0">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  <a class="bwg-album bwg_album_<?php echo $bwg; ?>"
85
+ <?php echo(BWG()->options->enable_seo ? "href='" . esc_url($href) . "'" : ""); ?>
86
  style="font-size: 0;"
87
  data-bwg="<?php echo $bwg; ?>"
88
  data-container_id="<?php echo $params['container_id']; ?>"
89
+ data-alb_gal_id="<?php echo (($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
90
  data-def_type="<?php echo $row->def_type; ?>"
91
  data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
92
+ <div class="bwg-item0 bwg_album_thumb_<?php echo $bwg; ?>">
93
+ <div class="bwg-item1 bwg_album_thumb_spun1_<?php echo $bwg; ?>">
94
+ <div class="bwg-item2">
95
+ <img class="skip-lazy"
96
+ src="<?php echo $row->preview_image; ?>"
97
+ alt="<?php echo $row->name; ?>" />
98
+ </div>
99
+ </div>
100
+ </div>
101
  </a>
102
+ </div>
103
+ <div class="bwg-extended-item1">
104
  <?php
105
+ if ( $row->name ) {
 
 
 
 
 
106
  ?>
107
+ <a class="bwg-album bwg_album_<?php echo $bwg; ?>"
108
+ <?php echo (BWG()->options->enable_seo ? "href='" . esc_url($href) . "'" : ""); ?>
109
+ data-bwg="<?php echo $bwg; ?>"
110
+ data-container_id="<?php echo $params['container_id']; ?>"
111
+ data-alb_gal_id="<?php echo(($params['album_gallery_id'] != 0) ? $row->alb_gal_id : $row->id); ?>"
112
+ data-def_type="<?php echo $row->def_type; ?>"
113
+ data-title="<?php echo htmlspecialchars(addslashes($row->name)); ?>">
114
+ <span class="bwg_title_spun_<?php echo $bwg; ?>"><?php echo $row->name; ?></span>
115
+ </a>
116
+ <?php
117
+ }
118
+ if ( $params['extended_album_description_enable'] && $row->description ) {
119
+ if ( stripos($row->description, '<!--more-->') !== FALSE ) {
120
+ $description_array = explode('<!--more-->', $row->description);
121
+ $description_short = $description_array[0];
122
+ $description_full = $description_array[1];
123
+ ?>
124
+ <span class="bwg_description_spun1_<?php echo $bwg; ?>">
125
+ <span class="bwg_description_spun2_<?php echo $bwg; ?>">
126
+ <span class="bwg_description_short_<?php echo $bwg; ?>">
127
+ <?php echo $description_short; ?>
128
+ </span>
129
+ <span class="bwg_description_full">
130
+ <?php echo $description_full; ?>
131
+ </span>
132
  </span>
133
+ <span data-more-msg="<?php _e('More', BWG()->prefix); ?>"
134
+ data-hide-msg="<?php _e('Hide', BWG()->prefix); ?>"
135
+ class="bwg_description_more bwg_description_more_<?php echo $bwg; ?> bwg_more">
136
+ <?php _e('More', BWG()->prefix); ?>
137
  </span>
138
  </span>
139
+ <?php
140
+ }
141
+ else {
142
+ ?>
143
+ <span class="bwg_description_spun1_<?php echo $bwg; ?>">
 
 
 
 
 
 
144
  <span class="bwg_description_short_<?php echo $bwg; ?>">
145
  <?php echo $row->description; ?>
146
  </span>
147
  </span>
148
+ <?php
149
+ }
150
  }
151
+ ?>
152
+ </div>
153
  </div>
154
+ <?php
155
+ }
 
156
  ?>
157
  </div>
158
  <?php
187
  $rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
188
  $rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
189
  ?>
 
 
 
 
 
190
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_album_extended_thumbnails_<?php echo $bwg; ?> {
 
191
  -moz-box-sizing: border-box;
192
  box-sizing: border-box;
193
  background-color: rgba(<?php echo $rgb_album_extended_thumbs_bg_color['red']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['green']; ?>, <?php echo $rgb_album_extended_thumbs_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_thumb_bg_transparent / 100, 2, ".", ""); ?>);
 
194
  text-align: <?php echo $theme_row->album_extended_thumb_align; ?>;
 
195
  }
196
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-extended-item {
197
+ display: flex;
198
+ flex-direction: row;
199
+ flex-wrap: wrap;
200
+ min-height: <?php echo $params['extended_album_height']; ?>px;
201
  border-bottom: <?php echo $theme_row->album_extended_div_separator_width; ?>px <?php echo $theme_row->album_extended_div_separator_style; ?> #<?php echo $theme_row->album_extended_div_separator_color; ?>;
202
  background-color: rgba(<?php echo $rgb_album_extended_div_bg_color['red']; ?>, <?php echo $rgb_album_extended_div_bg_color['green']; ?>, <?php echo $rgb_album_extended_div_bg_color['blue']; ?>, <?php echo number_format($theme_row->album_extended_div_bg_transparent / 100, 2, ".", ""); ?>);
203
  border-radius: <?php echo $theme_row->album_extended_div_border_radius; ?>;
204
  margin: <?php echo $theme_row->album_extended_div_margin; ?>;
205
+ overflow: hidden;
206
  }
207
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-extended-item0 {
208
+ margin: <?php echo $theme_row->album_extended_div_padding; ?>px <?php echo $theme_row->album_extended_div_padding / 2; ?>px;
209
  background-color: #<?php echo $theme_row->album_extended_thumb_div_bg_color; ?>;
210
  border-radius: <?php echo $theme_row->album_extended_thumb_div_border_radius; ?>;
 
211
  border: <?php echo $theme_row->album_extended_thumb_div_border_width; ?>px <?php echo $theme_row->album_extended_thumb_div_border_style; ?> #<?php echo $theme_row->album_extended_thumb_div_border_color; ?>;
212
+ display: flex;
213
+ flex-direction: column;
214
  padding: <?php echo $theme_row->album_extended_thumb_div_padding; ?>;
215
+ justify-content: center;
216
+ max-width: <?php echo $params['extended_album_thumb_width']; ?>px;
217
  }
218
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-extended-item1 {
219
+ margin: <?php echo $theme_row->album_extended_div_padding; ?>px <?php echo $theme_row->album_extended_div_padding / 2; ?>px;
 
 
 
 
220
  background-color: #<?php echo $theme_row->album_extended_text_div_bg_color; ?>;
221
  border-radius: <?php echo $theme_row->album_extended_text_div_border_radius; ?>;
222
  border: <?php echo $theme_row->album_extended_text_div_border_width; ?>px <?php echo $theme_row->album_extended_text_div_border_style; ?> #<?php echo $theme_row->album_extended_text_div_border_color; ?>;
223
+ display: flex;
224
+ flex-direction: column;
225
  border-collapse: collapse;
 
226
  padding: <?php echo $theme_row->album_extended_text_div_padding; ?>;
227
+ justify-content: <?php if ( $theme_row->album_extended_title_desc_alignment == 'top' ) { echo 'start'; } elseif ( $theme_row->album_extended_title_desc_alignment == 'bottom' ) { echo 'flex-end'; } else { echo 'center'; } ; ?>;
228
  }
229
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_title_spun_<?php echo $bwg; ?> {
 
 
 
 
 
230
  border: <?php echo $theme_row->album_extended_title_span_border_width; ?>px <?php echo $theme_row->album_extended_title_span_border_style; ?> #<?php echo $theme_row->album_extended_title_span_border_color; ?>;
231
  color: #<?php echo $theme_row->album_extended_title_font_color; ?>;
232
  display: block;
238
  padding: <?php echo $theme_row->album_extended_title_padding; ?>;
239
  text-align: left;
240
  vertical-align: middle;
241
+ width: 100%;
242
  }
243
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_spun1_<?php echo $bwg; ?> a {
244
  color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
245
  font-size: <?php echo $theme_row->album_extended_desc_font_size; ?>px;
246
  font-weight: <?php echo $theme_row->album_extended_desc_font_weight; ?>;
247
  font-family: <?php echo $theme_row->album_extended_desc_font_style; ?>;
248
  }
249
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_spun1_<?php echo $bwg; ?> {
250
  border: <?php echo $theme_row->album_extended_desc_span_border_width; ?>px <?php echo $theme_row->album_extended_desc_span_border_style; ?> #<?php echo $theme_row->album_extended_desc_span_border_color; ?>;
251
  display: inline-block;
252
  color: #<?php echo $theme_row->album_extended_desc_font_color; ?>;
256
  height: inherit;
257
  padding: <?php echo $theme_row->album_extended_desc_padding; ?>;
258
  vertical-align: middle;
259
+ width: 100%;
260
  word-wrap: break-word;
261
  word-break: break-word;
262
  }
263
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_spun1_<?php echo $bwg; ?> * {
264
  margin: 0;
265
  }
266
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_spun2_<?php echo $bwg; ?> {
267
  float: left;
268
  }
269
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_short_<?php echo $bwg; ?> {
270
  display: inline;
271
  }
272
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_full {
273
  display: none;
274
  }
275
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg_description_more_<?php echo $bwg; ?> {
276
  clear: both;
277
  color: #<?php echo $theme_row->album_extended_desc_more_color; ?>;
278
  cursor: pointer;
280
  font-size: <?php echo $theme_row->album_extended_desc_more_size; ?>px;
281
  font-weight: normal;
282
  }
283
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item0 {
284
+ padding: <?php echo $theme_row->album_extended_thumb_padding; ?>px;
 
 
 
 
285
  background-color: #<?php echo $theme_row->album_extended_thumb_bg_color; ?>;
286
  border-radius: <?php echo $theme_row->album_extended_thumb_border_radius; ?>;
287
  border: <?php echo $theme_row->album_extended_thumb_border_width; ?>px <?php echo $theme_row->album_extended_thumb_border_style; ?> #<?php echo $theme_row->album_extended_thumb_border_color; ?>;
288
  box-shadow: <?php echo $theme_row->album_extended_thumb_box_shadow; ?>;
 
 
289
  margin: <?php echo $theme_row->album_extended_thumb_margin; ?>px;
290
  opacity: <?php echo number_format($theme_row->album_extended_thumb_transparent / 100, 2, ".", ""); ?>;
291
  filter: Alpha(opacity=<?php echo $theme_row->album_extended_thumb_transparent; ?>);
 
 
 
 
 
 
292
  }
293
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item1 {
294
+ padding-top: <?php echo $params['extended_album_thumb_height'] / $params['extended_album_thumb_width'] * 100; ?>%;
 
 
 
 
 
 
295
  }
296
+ <?php if ( $theme_row->album_extended_thumb_hover_effect == 'zoom' ) { ?>
297
+ @media only screen and (min-width: 480px) {
298
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item1 img {
299
+ <?php echo ($theme_row->album_extended_thumb_transition) ? '-webkit-transition: all .3s; transition: all .3s;' : ''; ?>
300
+ }
301
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item1 img:hover {
302
+ -ms-transform: scale(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
303
+ -webkit-transform: scale(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
304
+ transform: scale(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
305
+ }
306
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item0:hover {
307
+ -ms-transform: none;
308
+ -webkit-transform: none;
309
+ transform: none;
310
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  }
312
+ <?php
313
  }
314
+ else {
315
+ ?>
316
+ @media only screen and (min-width: 480px) {
317
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item0 {
318
+ <?php echo ($theme_row->album_extended_thumb_transition) ? 'transition: all 0.3s ease 0s;-webkit-transition: all 0.3s ease 0s;' : ''; ?>
319
+ }
320
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item0:hover {
321
+ -ms-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
322
+ -webkit-transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
323
+ transform: <?php echo $theme_row->album_extended_thumb_hover_effect; ?>(<?php echo $theme_row->album_extended_thumb_hover_effect_value; ?>);
324
+ }
325
+ #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg-container-<?php echo $bwg; ?>.bwg-album-extended .bwg-item1 img:hover {
326
+ -ms-transform: none;
327
+ -webkit-transform: none;
328
+ transform: none;
329
+ }
330
  }
331
+ <?php
332
  }
 
333
 
334
  /* Add gallery styles, if gallery type exist.*/
335
  if ( $this->gallery_view && method_exists($this->gallery_view, 'inline_styles') ) {
351
 
352
  echo $this->gallery_view->inline_styles($bwg, $theme_row, $params);
353
  }
354
+
355
  return ob_get_clean();
356
  }
357
  }
insert.php CHANGED
@@ -129,8 +129,8 @@ class BWGInsert {
129
 
130
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
131
 
132
- $theme1 = '{"thumb_margin":"4","album_compact_title_font_color_hover":"FFFFFF","compact_container_margin":"1","container_margin":"1","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":0,"thumb_border_style":"none","thumb_border_color":"CCCCCC","thumb_bg_color":"000000","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"zoom","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":"323A45","thumb_title_font_color_hover":"FFFFFF","thumb_title_shadow":"","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"323A45","thumb_gal_title_font_style":"Ubuntu","thumb_gal_title_font_size":18,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"","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":"Ubuntu","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":"","lightbox_close_btn_size":20,"lightbox_close_btn_color":"808080","lightbox_close_btn_width":30,"lightbox_close_btn_height":30,"lightbox_overlay_bg_color":"EEEEEE","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_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":"Ubuntu","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":"323A45","blog_style_gal_title_font_style":"Ubuntu","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":"323A45","image_browser_gal_title_font_style":"Ubuntu","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":4,"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":"Ubuntu","album_compact_back_font_color":"323A45","album_compact_title_font_color":"323A45","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":"000000","album_compact_back_font_weight":"bold","album_compact_back_font_size":15,"album_compact_back_font_style":"Ubuntu","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":"zoom","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"1.08","album_compact_gal_title_font_color":"323A45","album_compact_gal_title_font_style":"Ubuntu","album_compact_gal_title_font_size":18,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"0 2px 2px 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":"323A45","album_extended_back_font_style":"Ubuntu","album_extended_back_font_size":15,"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":"Ubuntu","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":"Ubuntu","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":"323A45","album_extended_gal_title_font_style":"Ubuntu","album_extended_gal_title_font_size":18,"album_extended_gal_title_font_weight":"bold","album_extended_gal_title_margin":"0 2px 2px 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":"","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":"Ubuntu","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":"Ubuntu","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":"4","masonry_container_margin":"1","masonry_thumb_border_width":"0","masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumb_border_radius":"0","masonry_thumb_hover_effect":"zoom","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":"1","masonry_thumb_bg_color":"000000","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_transparent":"0","masonry_thumb_transparent":"100","masonry_thumb_align":"center","masonry_thumb_title_font_size":16,"masonry_thumb_title_font_color":"323A45","masonry_thumb_title_font_color_hover":"FFFFFF","masonry_thumb_title_font_style":"Ubuntu","masonry_thumb_title_font_weight":"bold","masonry_thumb_title_margin":"2px","masonry_description_font_size":16,"masonry_description_color":"323A45","masonry_description_font_style":"Ubuntu","masonry_thumb_gal_title_font_color":"323A45","masonry_thumb_gal_title_font_style":"Ubuntu","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":"","masonry_thumb_gal_title_align":"center","mosaic_thumb_padding":"2","mosaic_container_margin":"1","mosaic_thumb_border_radius":"0","mosaic_thumb_border_width":"0","mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumb_bg_color":"000000","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":"0","mosaic_thumb_transparent":"100","mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"zoom","mosaic_thumb_hover_effect_value":"1.08","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_font_style":"Ubuntu","mosaic_thumb_title_font_color":"323A45","mosaic_thumb_title_font_color_hover":"FFFFFF","mosaic_thumb_title_shadow":"","mosaic_thumb_title_font_size":16,"mosaic_thumb_gal_title_font_color":"323A45","mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_style":"Ubuntu","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":"","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":"Ubuntu","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":14,"album_masonry_back_font_color":"323A45","album_masonry_back_font_style":"Ubuntu","album_masonry_back_font_size":15,"album_masonry_back_font_weight":"bold","album_masonry_back_padding":"0","album_masonry_title_font_color":"323A45","album_masonry_title_font_style":"Ubuntu","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":4,"album_masonry_thumb_border_radius":"0","album_masonry_container_margin":1,"album_masonry_thumb_border_width":0,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"CCCCCC","album_masonry_thumb_bg_color":"000000","album_masonry_thumb_title_font_color_hover":"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":"zoom","album_masonry_thumb_hover_effect_value":"1.08","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"323A45","album_masonry_gal_title_font_style":"Ubuntu","album_masonry_gal_title_font_size":18,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"0 2px 2px 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"}';
133
- $theme2 = '{"thumb_margin":"4","album_compact_title_font_color_hover":"FFFFFF","compact_container_margin":"1","container_margin":"1","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":5,"thumb_border_style":"none","thumb_border_color":"FFFFFF","thumb_bg_color":"000000","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"zoom","thumb_hover_effect_value":"1.08","thumb_transition":1,"thumb_title_margin":"5px","thumb_title_font_style":"Ubuntu","thumb_title_pos":"bottom","thumb_title_font_color":"323A45","thumb_title_font_color_hover":"FFFFFF","thumb_title_shadow":"","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"323A45","thumb_gal_title_font_style":"Ubuntu","thumb_gal_title_font_size":18,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"","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":"Ubuntu","page_nav_font_color":"666666","page_nav_font_weight":"bold","page_nav_border_width":1,"page_nav_border_style":"none","page_nav_border_color":"E3E3E3","page_nav_border_radius":"0","page_nav_margin":"0","page_nav_padding":"3px 6px","page_nav_button_bg_color":"FCFCFC","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":80,"lightbox_ctrl_btn_color":"FFFFFF","lightbox_toggle_btn_height":14,"lightbox_toggle_btn_width":100,"lightbox_ctrl_cont_bg_color":"000000","lightbox_ctrl_cont_border_radius":4,"lightbox_ctrl_cont_transparent":80,"lightbox_close_btn_bg_color":"000000","lightbox_close_btn_border_radius":"16px","lightbox_close_btn_border_width":0,"lightbox_close_btn_border_style":"none","lightbox_close_btn_border_color":"FFFFFF","lightbox_close_btn_box_shadow":"","lightbox_close_btn_size":10,"lightbox_close_btn_color":"FFFFFF","lightbox_close_btn_width":20,"lightbox_close_btn_height":20,"lightbox_overlay_bg_color":"000000","lightbox_close_btn_top":"-10","lightbox_close_btn_right":"-10","lightbox_close_btn_full_color":"FFFFFF","lightbox_close_btn_transparent":95,"lightbox_rl_btn_bg_color":"000000","lightbox_rl_btn_transparent":80,"lightbox_rl_btn_border_radius":"20px","lightbox_rl_btn_border_width":2,"lightbox_rl_btn_border_style":"none","lightbox_rl_btn_border_color":"FFFFFF","lightbox_rl_btn_box_shadow":"","lightbox_rl_btn_color":"FFFFFF","lightbox_rl_btn_height":40,"lightbox_rl_btn_width":40,"lightbox_rl_btn_size":20,"lightbox_close_rl_btn_hover_color":"FFFFFF","lightbox_comment_pos":"left","lightbox_comment_width":400,"lightbox_comment_bg_color":"000000","lightbox_comment_font_color":"CCCCCC","lightbox_comment_font_style":"Ubuntu","lightbox_comment_font_size":12,"lightbox_comment_button_bg_color":"333333","lightbox_comment_button_border_color":"666666","lightbox_comment_button_border_width":1,"lightbox_comment_button_border_style":"none","lightbox_comment_button_border_radius":"3px","lightbox_comment_button_padding":"3px 10px","lightbox_comment_input_bg_color":"333333","lightbox_comment_input_border_color":"666666","lightbox_comment_input_border_width":1,"lightbox_comment_input_border_style":"none","lightbox_comment_input_border_radius":"0","lightbox_comment_input_padding":"3px","lightbox_comment_separator_width":1,"lightbox_comment_separator_style":"solid","lightbox_comment_separator_color":"2B2B2B","lightbox_comment_author_font_size":14,"lightbox_comment_date_font_size":10,"lightbox_comment_body_font_size":12,"lightbox_comment_share_button_color":"FFFFFF","lightbox_filmstrip_rl_bg_color":"2B2B2B","lightbox_filmstrip_rl_btn_size":20,"lightbox_filmstrip_rl_btn_color":"FFFFFF","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":"top","lightbox_filmstrip_thumb_active_border_width":0,"lightbox_filmstrip_thumb_active_border_color":"FFFFFF","lightbox_overlay_bg_transparent":70,"lightbox_bg_color":"000000","lightbox_rl_btn_style":"fa-chevron","lightbox_bg_transparent":100,"blog_style_margin":"2px","blog_style_padding":"4px","blog_style_border_radius":"0","blog_style_border_width":1,"blog_style_border_style":"none","blog_style_border_color":"CCCCCC","blog_style_bg_color":"E8E8E8","blog_style_transparent":70,"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":"Ubuntu","blog_style_img_font_color":"000000","blog_style_share_buttons_font_size":20,"blog_style_share_buttons_color":"A1A1A1","blog_style_share_buttons_bg_transparent":0,"blog_style_gal_title_font_color":"323A45","blog_style_gal_title_font_style":"Ubuntu","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":"2px","image_browser_border_width":1,"image_browser_border_style":"none","image_browser_border_color":"E8E8E8","image_browser_bg_color":"E8E8E8","image_browser_box_shadow":"","image_browser_transparent":80,"image_browser_align":"center","image_browser_image_description_margin":"24px 0px 0px 0px","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":"E8E8E8","image_browser_image_description_align":"center","image_browser_img_font_size":14,"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":1,"image_browser_full_border_style":"solid","image_browser_full_border_color":"EDEDED","image_browser_full_bg_color":"FFFFFF","image_browser_full_transparent":90,"image_browser_image_title_align":"top","image_browser_gal_title_font_color":"323A45","image_browser_gal_title_font_style":"Ubuntu","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":"5px","album_compact_thumb_margin":4,"album_compact_back_padding":"0","album_compact_thumb_padding":4,"album_compact_thumb_border_radius":"0","album_compact_thumb_border_width":1,"album_compact_title_font_style":"Ubuntu","album_compact_back_font_color":"323A45","album_compact_title_font_color":"CCCCCC","album_compact_title_shadow":"","album_compact_thumb_bg_transparent":100,"album_compact_thumb_box_shadow":"","album_compact_thumb_transition":1,"album_compact_thumb_border_style":"none","album_compact_thumb_border_color":"000000","album_compact_thumb_bg_color":"000000","album_compact_back_font_weight":"normal","album_compact_back_font_size":15,"album_compact_back_font_style":"Ubuntu","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":"rotate","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"2deg","album_compact_gal_title_font_color":"323A45","album_compact_gal_title_font_style":"Ubuntu","album_compact_gal_title_font_size":18,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"0 2px 2px 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":4,"album_extended_thumb_border_radius":"0","album_extended_thumb_border_width":4,"album_extended_thumb_border_style":"none","album_extended_thumb_border_color":"E8E8E8","album_extended_thumb_bg_color":"E8E8E8","album_extended_thumbs_bg_color":"FFFFFF","album_extended_thumb_bg_transparent":100,"album_extended_thumb_box_shadow":"","album_extended_thumb_transparent":100,"album_extended_thumb_align":"left","album_extended_thumb_hover_effect":"rotate","album_extended_thumb_hover_effect_value":"2deg","album_extended_thumb_transition":0,"album_extended_back_font_color":"323A45","album_extended_back_font_style":"Ubuntu","album_extended_back_font_size":15,"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","album_extended_div_margin":"0 0 5px 0","album_extended_div_padding":10,"album_extended_div_separator_width":1,"album_extended_div_separator_style":"none","album_extended_div_separator_color":"CCCCCC","album_extended_thumb_div_bg_color":"FFFFFF","album_extended_thumb_div_border_radius":"0","album_extended_thumb_div_border_width":0,"album_extended_thumb_div_border_style":"none","album_extended_thumb_div_border_color":"CCCCCC","album_extended_thumb_div_padding":"0","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":"none","album_extended_text_div_border_color":"CCCCCC","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":"Ubuntu","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":"Ubuntu","album_extended_desc_font_size":14,"album_extended_desc_font_weight":"normal","album_extended_desc_padding":"2px","album_extended_desc_more_color":"FFC933","album_extended_desc_more_size":12,"album_extended_gal_title_font_color":"323A45","album_extended_gal_title_font_style":"Ubuntu","album_extended_gal_title_font_size":18,"album_extended_gal_title_font_weight":"bold","album_extended_gal_title_margin":"0 2px 2px 2px","album_extended_gal_title_shadow":"0px 0px 0px #888888","album_extended_gal_title_align":"center","slideshow_cont_bg_color":"000000","slideshow_close_btn_transparent":100,"slideshow_rl_btn_bg_color":"000000","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":"","slideshow_rl_btn_color":"FFFFFF","slideshow_rl_btn_height":40,"slideshow_rl_btn_size":20,"slideshow_rl_btn_width":40,"slideshow_close_rl_btn_hover_color":"DBDBDB","slideshow_filmstrip_pos":"bottom","slideshow_filmstrip_thumb_border_width":1,"slideshow_filmstrip_thumb_border_style":"none","slideshow_filmstrip_thumb_border_color":"000000","slideshow_filmstrip_thumb_border_radius":"0","slideshow_filmstrip_thumb_margin":"0 1px","slideshow_filmstrip_thumb_active_border_width":0,"slideshow_filmstrip_thumb_active_border_color":"FFFFFF","slideshow_filmstrip_thumb_deactive_transparent":80,"slideshow_filmstrip_rl_bg_color":"303030","slideshow_filmstrip_rl_btn_color":"FFFFFF","slideshow_filmstrip_rl_btn_size":20,"slideshow_title_font_size":16,"slideshow_title_font":"Ubuntu","slideshow_title_color":"FFFFFF","slideshow_title_opacity":70,"slideshow_title_border_radius":"5px","slideshow_title_background_color":"000000","slideshow_title_padding":"5px 10px 5px 10px","slideshow_description_font_size":14,"slideshow_description_font":"Ubuntu","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":10,"slideshow_dots_height":10,"slideshow_dots_border_radius":"10px","slideshow_dots_background_color":"292929","slideshow_dots_margin":1,"slideshow_dots_active_background_color":"292929","slideshow_dots_active_border_width":2,"slideshow_dots_active_border_color":"FFC933","slideshow_play_pause_btn_size":60,"slideshow_rl_btn_style":"fa-chevron","masonry_thumb_padding":4,"masonry_container_margin":"1","masonry_thumb_border_width":1,"masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumb_border_radius":"2px","masonry_thumb_hover_effect":"zoom","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":1,"masonry_thumb_bg_color":"000000","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_transparent":0,"masonry_thumb_transparent":80,"masonry_thumb_align":"center","masonry_thumb_title_font_size":16,"masonry_thumb_title_font_color":"323A45","masonry_thumb_title_font_color_hover":"FFFFFF","masonry_thumb_title_font_style":"Ubuntu","masonry_thumb_title_font_weight":"bold","masonry_thumb_title_margin":"2px","masonry_description_font_size":16,"masonry_description_color":"323A45","masonry_description_font_style":"Ubuntu","masonry_thumb_gal_title_font_color":"323A45","masonry_thumb_gal_title_font_style":"Ubuntu","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":"","masonry_thumb_gal_title_align":"center","mosaic_container_margin":"1","mosaic_thumb_padding":4,"mosaic_thumb_border_radius":"2px","mosaic_thumb_border_width":1,"mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumb_bg_color":"000000","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":0,"mosaic_thumb_transparent":80,"mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"rotate","mosaic_thumb_hover_effect_value":"2deg","mosaic_thumb_title_font_color":"323A45","mosaic_thumb_title_font_style":"Ubuntu","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_shadow":"0px 0px 0px #888888","mosaic_thumb_title_font_size":16,"mosaic_thumb_gal_title_font_color":"323A45","mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_style":"Ubuntu","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":"","mosaic_thumb_gal_title_align":"center","lightbox_info_pos":"top","lightbox_info_align":"right","lightbox_info_bg_color":"000000","lightbox_info_bg_transparent":70,"lightbox_info_border_width":1,"lightbox_info_border_style":"none","lightbox_info_border_color":"000000","lightbox_info_border_radius":"5px","lightbox_info_padding":"5px","lightbox_info_margin":"15px","lightbox_title_color":"FFFFFF","lightbox_title_font_style":"Ubuntu","lightbox_title_font_weight":"bold","lightbox_title_font_size":18,"lightbox_description_color":"FFFFFF","lightbox_description_font_style":"Ubuntu","lightbox_description_font_weight":"normal","lightbox_description_font_size":14,"lightbox_rate_pos":"bottom","lightbox_rate_align":"right","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":"Ubuntu","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":14,"album_masonry_back_font_color":"323A45","album_masonry_back_font_style":"Ubuntu","album_masonry_back_font_size":15,"album_masonry_back_font_weight":"normal","album_masonry_back_padding":"0","album_masonry_title_font_color":"323A45","album_masonry_thumb_title_font_color_hover":"FFFFFF","album_masonry_title_font_style":"Ubuntu","album_masonry_thumb_title_pos":"bottom","album_masonry_title_font_size":16,"album_masonry_title_font_weight":"bold","album_masonry_title_margin":"5px","album_masonry_title_shadow":"","album_masonry_thumb_margin":4,"album_masonry_thumb_padding":4,"album_masonry_thumb_border_radius":"0","album_masonry_container_margin":1,"album_masonry_thumb_border_width":1,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"000000","album_masonry_thumb_bg_color":"000000","album_masonry_thumbs_bg_color":"FFFFFF","album_masonry_thumb_bg_transparent":100,"album_masonry_thumb_box_shadow":"","album_masonry_thumb_transparent":100,"album_masonry_thumb_align":"center","album_masonry_thumb_hover_effect":"zoom","album_masonry_thumb_hover_effect_value":"2deg","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"323A45","album_masonry_gal_title_font_style":"Ubuntu","album_masonry_gal_title_font_size":18,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"0 2px 2px 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":100,"carousel_rl_btn_bg_color":"000000","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":"FFFFFF","carousel_rl_btn_height":40,"carousel_rl_btn_size":20,"carousel_play_pause_btn_size":20,"carousel_rl_btn_width":40,"carousel_close_rl_btn_hover_color":"CCCCCC","carousel_rl_btn_style":"fa-chevron","carousel_mergin_bottom":"0.5","carousel_font_family":"Ubuntu","carousel_feature_border_width":2,"carousel_feature_border_style":"solid","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}';
134
 
135
  if (!$exists_default) {
136
  $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
@@ -146,5 +146,29 @@ class BWGInsert {
146
  'default_theme' => 0
147
  ));
148
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
  }
129
 
130
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
131
 
132
+ $theme1 = '{"thumb_margin":"4","album_compact_title_font_color_hover":"FFFFFF","compact_container_margin":"1","container_margin":"1","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":0,"thumb_border_style":"none","thumb_border_color":"CCCCCC","thumb_bg_color":"000000","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"zoom","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":"323A45","thumb_title_font_color_hover":"FFFFFF","thumb_title_shadow":"","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"323A45","thumb_gal_title_font_style":"Ubuntu","thumb_gal_title_font_size":18,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"","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":"Ubuntu","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":"","lightbox_close_btn_size":20,"lightbox_close_btn_color":"808080","lightbox_close_btn_width":30,"lightbox_close_btn_height":30,"lightbox_overlay_bg_color":"EEEEEE","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_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":"Ubuntu","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":"323A45","blog_style_gal_title_font_style":"Ubuntu","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":"323A45","image_browser_gal_title_font_style":"Ubuntu","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":4,"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":"Ubuntu","album_compact_back_font_color":"323A45","album_compact_title_font_color":"323A45","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":"000000","album_compact_back_font_weight":"bold","album_compact_back_font_size":15,"album_compact_back_font_style":"Ubuntu","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":"zoom","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"1.08","album_compact_gal_title_font_color":"323A45","album_compact_gal_title_font_style":"Ubuntu","album_compact_gal_title_font_size":18,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"0 2px 2px 2px","album_compact_gal_title_shadow":"0px 0px 0px #888888","album_compact_gal_title_align":"center","album_extended_thumb_margin":0,"album_extended_thumb_padding":0,"album_extended_thumb_border_radius":"10px","album_extended_thumb_border_width":0,"album_extended_thumb_border_style":"none","album_extended_thumb_border_color":"FAFAFA","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":"none","album_extended_thumb_hover_effect_value":"1.03","album_extended_thumb_transition":0,"album_extended_back_font_color":"000000","album_extended_back_font_style":"Ubuntu","album_extended_back_font_size":20,"album_extended_back_font_weight":"bold","album_extended_back_padding":"0","album_extended_div_bg_color":"FAFAFA","album_extended_div_bg_transparent":0,"album_extended_div_border_radius":"14px","album_extended_div_margin":"20px 20px 0px 0px","album_extended_div_padding":0,"album_extended_div_separator_width":0,"album_extended_div_separator_style":"solid","album_extended_div_separator_color":"E0E0E0","album_extended_thumb_div_bg_color":"FAFAFA","album_extended_thumb_div_border_radius":"","album_extended_thumb_div_border_width":0,"album_extended_thumb_div_border_style":"none","album_extended_thumb_div_border_color":"E8E8E8","album_extended_thumb_div_padding":"14px","album_extended_text_div_bg_color":"FAFAFA","album_extended_text_div_border_radius":"0","album_extended_text_div_border_width":0,"album_extended_text_div_border_style":"none","album_extended_text_div_border_color":"E8E8E8","album_extended_title_desc_alignment":"top","album_extended_text_div_padding":"16px","album_extended_title_span_border_width":0,"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":"Ubuntu","album_extended_title_font_size":22,"album_extended_title_font_weight":"bold","album_extended_title_margin_bottom":0,"album_extended_title_padding":"0px 0px 0px 0px","album_extended_desc_span_border_width":0,"album_extended_desc_span_border_style":"none","album_extended_desc_span_border_color":"CCCCCC","album_extended_desc_font_color":"5C5C5C","album_extended_desc_font_style":"Ubuntu","album_extended_desc_font_size":16,"album_extended_desc_font_weight":"normal","album_extended_desc_padding":"0px 0px 0px 0px","album_extended_desc_more_color":"007AFF","album_extended_desc_more_size":12,"album_extended_gal_title_font_color":"CCCCCC","album_extended_gal_title_font_style":"Ubuntu","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":"right","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":"","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":"Ubuntu","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":"Ubuntu","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":"4","masonry_container_margin":"1","masonry_thumb_border_width":"0","masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumb_border_radius":"0","masonry_thumb_hover_effect":"zoom","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":"1","masonry_thumb_bg_color":"000000","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_transparent":"0","masonry_thumb_transparent":"100","masonry_thumb_align":"center","masonry_thumb_title_font_size":16,"masonry_thumb_title_font_color":"323A45","masonry_thumb_title_font_color_hover":"FFFFFF","masonry_thumb_title_font_style":"Ubuntu","masonry_thumb_title_font_weight":"bold","masonry_thumb_title_margin":"2px","masonry_description_font_size":16,"masonry_description_color":"323A45","masonry_description_font_style":"Ubuntu","masonry_thumb_gal_title_font_color":"323A45","masonry_thumb_gal_title_font_style":"Ubuntu","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":"","masonry_thumb_gal_title_align":"center","mosaic_thumb_padding":"2","mosaic_container_margin":"1","mosaic_thumb_border_radius":"0","mosaic_thumb_border_width":"0","mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumb_bg_color":"000000","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":"0","mosaic_thumb_transparent":"100","mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"zoom","mosaic_thumb_hover_effect_value":"1.08","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_font_style":"Ubuntu","mosaic_thumb_title_font_color":"323A45","mosaic_thumb_title_font_color_hover":"FFFFFF","mosaic_thumb_title_shadow":"","mosaic_thumb_title_font_size":16,"mosaic_thumb_gal_title_font_color":"323A45","mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_style":"Ubuntu","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":"","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":"Ubuntu","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":14,"album_masonry_back_font_color":"323A45","album_masonry_back_font_style":"Ubuntu","album_masonry_back_font_size":15,"album_masonry_back_font_weight":"bold","album_masonry_back_padding":"0","album_masonry_title_font_color":"323A45","album_masonry_title_font_style":"Ubuntu","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":4,"album_masonry_thumb_border_radius":"0","album_masonry_container_margin":1,"album_masonry_thumb_border_width":0,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"CCCCCC","album_masonry_thumb_bg_color":"000000","album_masonry_thumb_title_font_color_hover":"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":"zoom","album_masonry_thumb_hover_effect_value":"1.08","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"323A45","album_masonry_gal_title_font_style":"Ubuntu","album_masonry_gal_title_font_size":18,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"0 2px 2px 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"}';
133
+ $theme2 = '{"thumb_margin":"4","album_compact_title_font_color_hover":"FFFFFF","compact_container_margin":"1","container_margin":"1","thumb_padding":"0","thumb_border_radius":"0","thumb_border_width":5,"thumb_border_style":"none","thumb_border_color":"FFFFFF","thumb_bg_color":"000000","thumbs_bg_color":"FFFFFF","thumb_bg_transparent":0,"thumb_box_shadow":"","thumb_transparent":100,"thumb_align":"center","thumb_hover_effect":"zoom","thumb_hover_effect_value":"1.08","thumb_transition":1,"thumb_title_margin":"5px","thumb_title_font_style":"Ubuntu","thumb_title_pos":"bottom","thumb_title_font_color":"323A45","thumb_title_font_color_hover":"FFFFFF","thumb_title_shadow":"","thumb_title_font_size":16,"thumb_title_font_weight":"bold","thumb_gal_title_font_color":"323A45","thumb_gal_title_font_style":"Ubuntu","thumb_gal_title_font_size":18,"thumb_gal_title_font_weight":"bold","thumb_gal_title_margin":"2px","thumb_gal_title_shadow":"","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":"Ubuntu","page_nav_font_color":"666666","page_nav_font_weight":"bold","page_nav_border_width":1,"page_nav_border_style":"none","page_nav_border_color":"E3E3E3","page_nav_border_radius":"0","page_nav_margin":"0","page_nav_padding":"3px 6px","page_nav_button_bg_color":"FCFCFC","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":80,"lightbox_ctrl_btn_color":"FFFFFF","lightbox_toggle_btn_height":14,"lightbox_toggle_btn_width":100,"lightbox_ctrl_cont_bg_color":"000000","lightbox_ctrl_cont_border_radius":4,"lightbox_ctrl_cont_transparent":80,"lightbox_close_btn_bg_color":"000000","lightbox_close_btn_border_radius":"16px","lightbox_close_btn_border_width":0,"lightbox_close_btn_border_style":"none","lightbox_close_btn_border_color":"FFFFFF","lightbox_close_btn_box_shadow":"","lightbox_close_btn_size":10,"lightbox_close_btn_color":"FFFFFF","lightbox_close_btn_width":20,"lightbox_close_btn_height":20,"lightbox_overlay_bg_color":"000000","lightbox_close_btn_top":"-10","lightbox_close_btn_right":"-10","lightbox_close_btn_full_color":"FFFFFF","lightbox_close_btn_transparent":95,"lightbox_rl_btn_bg_color":"000000","lightbox_rl_btn_transparent":80,"lightbox_rl_btn_border_radius":"20px","lightbox_rl_btn_border_width":2,"lightbox_rl_btn_border_style":"none","lightbox_rl_btn_border_color":"FFFFFF","lightbox_rl_btn_box_shadow":"","lightbox_rl_btn_color":"FFFFFF","lightbox_rl_btn_height":40,"lightbox_rl_btn_width":40,"lightbox_rl_btn_size":20,"lightbox_close_rl_btn_hover_color":"FFFFFF","lightbox_comment_pos":"left","lightbox_comment_width":400,"lightbox_comment_bg_color":"000000","lightbox_comment_font_color":"CCCCCC","lightbox_comment_font_style":"Ubuntu","lightbox_comment_font_size":12,"lightbox_comment_button_bg_color":"333333","lightbox_comment_button_border_color":"666666","lightbox_comment_button_border_width":1,"lightbox_comment_button_border_style":"none","lightbox_comment_button_border_radius":"3px","lightbox_comment_button_padding":"3px 10px","lightbox_comment_input_bg_color":"333333","lightbox_comment_input_border_color":"666666","lightbox_comment_input_border_width":1,"lightbox_comment_input_border_style":"none","lightbox_comment_input_border_radius":"0","lightbox_comment_input_padding":"3px","lightbox_comment_separator_width":1,"lightbox_comment_separator_style":"solid","lightbox_comment_separator_color":"2B2B2B","lightbox_comment_author_font_size":14,"lightbox_comment_date_font_size":10,"lightbox_comment_body_font_size":12,"lightbox_comment_share_button_color":"FFFFFF","lightbox_filmstrip_rl_bg_color":"2B2B2B","lightbox_filmstrip_rl_btn_size":20,"lightbox_filmstrip_rl_btn_color":"FFFFFF","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":"top","lightbox_filmstrip_thumb_active_border_width":0,"lightbox_filmstrip_thumb_active_border_color":"FFFFFF","lightbox_overlay_bg_transparent":70,"lightbox_bg_color":"000000","lightbox_rl_btn_style":"fa-chevron","lightbox_bg_transparent":100,"blog_style_margin":"2px","blog_style_padding":"4px","blog_style_border_radius":"0","blog_style_border_width":1,"blog_style_border_style":"none","blog_style_border_color":"CCCCCC","blog_style_bg_color":"E8E8E8","blog_style_transparent":70,"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":"Ubuntu","blog_style_img_font_color":"000000","blog_style_share_buttons_font_size":20,"blog_style_share_buttons_color":"A1A1A1","blog_style_share_buttons_bg_transparent":0,"blog_style_gal_title_font_color":"323A45","blog_style_gal_title_font_style":"Ubuntu","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":"2px","image_browser_border_width":1,"image_browser_border_style":"none","image_browser_border_color":"E8E8E8","image_browser_bg_color":"E8E8E8","image_browser_box_shadow":"","image_browser_transparent":80,"image_browser_align":"center","image_browser_image_description_margin":"24px 0px 0px 0px","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":"E8E8E8","image_browser_image_description_align":"center","image_browser_img_font_size":14,"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":1,"image_browser_full_border_style":"solid","image_browser_full_border_color":"EDEDED","image_browser_full_bg_color":"FFFFFF","image_browser_full_transparent":90,"image_browser_image_title_align":"top","image_browser_gal_title_font_color":"323A45","image_browser_gal_title_font_style":"Ubuntu","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":"5px","album_compact_thumb_margin":4,"album_compact_back_padding":"0","album_compact_thumb_padding":4,"album_compact_thumb_border_radius":"0","album_compact_thumb_border_width":1,"album_compact_title_font_style":"Ubuntu","album_compact_back_font_color":"323A45","album_compact_title_font_color":"CCCCCC","album_compact_title_shadow":"","album_compact_thumb_bg_transparent":100,"album_compact_thumb_box_shadow":"","album_compact_thumb_transition":1,"album_compact_thumb_border_style":"none","album_compact_thumb_border_color":"000000","album_compact_thumb_bg_color":"000000","album_compact_back_font_weight":"normal","album_compact_back_font_size":15,"album_compact_back_font_style":"Ubuntu","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":"rotate","album_compact_thumb_transparent":100,"album_compact_thumb_hover_effect_value":"2deg","album_compact_gal_title_font_color":"323A45","album_compact_gal_title_font_style":"Ubuntu","album_compact_gal_title_font_size":18,"album_compact_gal_title_font_weight":"bold","album_compact_gal_title_margin":"0 2px 2px 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":4,"album_extended_thumb_border_radius":"0","album_extended_thumb_border_width":4,"album_extended_thumb_border_style":"none","album_extended_thumb_border_color":"E8E8E8","album_extended_thumb_bg_color":"E8E8E8","album_extended_thumbs_bg_color":"FFFFFF","album_extended_thumb_bg_transparent":100,"album_extended_thumb_box_shadow":"","album_extended_thumb_transparent":100,"album_extended_thumb_align":"left","album_extended_thumb_hover_effect":"rotate","album_extended_thumb_hover_effect_value":"2deg","album_extended_thumb_transition":0,"album_extended_back_font_color":"323A45","album_extended_back_font_style":"Ubuntu","album_extended_back_font_size":15,"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":"","album_extended_div_margin":"0 0 5px 0","album_extended_div_padding":10,"album_extended_div_separator_width":1,"album_extended_div_separator_style":"none","album_extended_div_separator_color":"CCCCCC","album_extended_thumb_div_bg_color":"FFFFFF","album_extended_thumb_div_border_radius":"","album_extended_thumb_div_border_width":0,"album_extended_thumb_div_border_style":"none","album_extended_thumb_div_border_color":"CCCCCC","album_extended_thumb_div_padding":"0","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":"none","album_extended_text_div_border_color":"CCCCCC","album_extended_title_desc_alignment":"top","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":"Ubuntu","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":"Ubuntu","album_extended_desc_font_size":14,"album_extended_desc_font_weight":"normal","album_extended_desc_padding":"2px","album_extended_desc_more_color":"FFC933","album_extended_desc_more_size":12,"album_extended_gal_title_font_color":"323A45","album_extended_gal_title_font_style":"Ubuntu","album_extended_gal_title_font_size":18,"album_extended_gal_title_font_weight":"bold","album_extended_gal_title_margin":"0 2px 2px 2px","album_extended_gal_title_shadow":"0px 0px 0px #888888","album_extended_gal_title_align":"center","slideshow_cont_bg_color":"000000","slideshow_close_btn_transparent":100,"slideshow_rl_btn_bg_color":"000000","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":"","slideshow_rl_btn_color":"FFFFFF","slideshow_rl_btn_height":40,"slideshow_rl_btn_size":20,"slideshow_rl_btn_width":40,"slideshow_close_rl_btn_hover_color":"DBDBDB","slideshow_filmstrip_pos":"bottom","slideshow_filmstrip_thumb_border_width":1,"slideshow_filmstrip_thumb_border_style":"none","slideshow_filmstrip_thumb_border_color":"000000","slideshow_filmstrip_thumb_border_radius":"0","slideshow_filmstrip_thumb_margin":"0 1px","slideshow_filmstrip_thumb_active_border_width":0,"slideshow_filmstrip_thumb_active_border_color":"FFFFFF","slideshow_filmstrip_thumb_deactive_transparent":80,"slideshow_filmstrip_rl_bg_color":"303030","slideshow_filmstrip_rl_btn_color":"FFFFFF","slideshow_filmstrip_rl_btn_size":20,"slideshow_title_font_size":16,"slideshow_title_font":"Ubuntu","slideshow_title_color":"FFFFFF","slideshow_title_opacity":70,"slideshow_title_border_radius":"5px","slideshow_title_background_color":"000000","slideshow_title_padding":"5px 10px 5px 10px","slideshow_description_font_size":14,"slideshow_description_font":"Ubuntu","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":10,"slideshow_dots_height":10,"slideshow_dots_border_radius":"10px","slideshow_dots_background_color":"292929","slideshow_dots_margin":1,"slideshow_dots_active_background_color":"292929","slideshow_dots_active_border_width":2,"slideshow_dots_active_border_color":"FFC933","slideshow_play_pause_btn_size":60,"slideshow_rl_btn_style":"fa-chevron","masonry_thumb_padding":4,"masonry_container_margin":"1","masonry_thumb_border_width":1,"masonry_thumb_border_style":"none","masonry_thumb_border_color":"CCCCCC","masonry_thumb_border_radius":"2px","masonry_thumb_hover_effect":"zoom","masonry_thumb_hover_effect_value":"1.08","masonry_thumb_transition":1,"masonry_thumb_bg_color":"000000","masonry_thumbs_bg_color":"FFFFFF","masonry_thumb_bg_transparent":0,"masonry_thumb_transparent":80,"masonry_thumb_align":"center","masonry_thumb_title_font_size":16,"masonry_thumb_title_font_color":"323A45","masonry_thumb_title_font_color_hover":"FFFFFF","masonry_thumb_title_font_style":"Ubuntu","masonry_thumb_title_font_weight":"bold","masonry_thumb_title_margin":"2px","masonry_description_font_size":16,"masonry_description_color":"323A45","masonry_description_font_style":"Ubuntu","masonry_thumb_gal_title_font_color":"323A45","masonry_thumb_gal_title_font_style":"Ubuntu","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":"","masonry_thumb_gal_title_align":"center","mosaic_container_margin":"1","mosaic_thumb_padding":4,"mosaic_thumb_border_radius":"2px","mosaic_thumb_border_width":1,"mosaic_thumb_border_style":"none","mosaic_thumb_border_color":"CCCCCC","mosaic_thumb_bg_color":"000000","mosaic_thumbs_bg_color":"FFFFFF","mosaic_thumb_bg_transparent":0,"mosaic_thumb_transparent":80,"mosaic_thumb_align":"center","mosaic_thumb_hover_effect":"rotate","mosaic_thumb_hover_effect_value":"2deg","mosaic_thumb_title_font_color":"323A45","mosaic_thumb_title_font_style":"Ubuntu","mosaic_thumb_title_margin":"2px","mosaic_thumb_title_shadow":"0px 0px 0px #888888","mosaic_thumb_title_font_size":16,"mosaic_thumb_gal_title_font_color":"323A45","mosaic_thumb_title_font_weight":"bold","mosaic_thumb_gal_title_font_style":"Ubuntu","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":"","mosaic_thumb_gal_title_align":"center","lightbox_info_pos":"top","lightbox_info_align":"right","lightbox_info_bg_color":"000000","lightbox_info_bg_transparent":70,"lightbox_info_border_width":1,"lightbox_info_border_style":"none","lightbox_info_border_color":"000000","lightbox_info_border_radius":"5px","lightbox_info_padding":"5px","lightbox_info_margin":"15px","lightbox_title_color":"FFFFFF","lightbox_title_font_style":"Ubuntu","lightbox_title_font_weight":"bold","lightbox_title_font_size":18,"lightbox_description_color":"FFFFFF","lightbox_description_font_style":"Ubuntu","lightbox_description_font_weight":"normal","lightbox_description_font_size":14,"lightbox_rate_pos":"bottom","lightbox_rate_align":"right","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":"Ubuntu","lightbox_hit_font_weight":"normal","lightbox_hit_font_size":14,"album_masonry_back_font_color":"323A45","album_masonry_back_font_style":"Ubuntu","album_masonry_back_font_size":15,"album_masonry_back_font_weight":"normal","album_masonry_back_padding":"0","album_masonry_title_font_color":"323A45","album_masonry_thumb_title_font_color_hover":"FFFFFF","album_masonry_title_font_style":"Ubuntu","album_masonry_thumb_title_pos":"bottom","album_masonry_title_font_size":16,"album_masonry_title_font_weight":"bold","album_masonry_title_margin":"5px","album_masonry_title_shadow":"","album_masonry_thumb_margin":4,"album_masonry_thumb_padding":4,"album_masonry_thumb_border_radius":"0","album_masonry_container_margin":1,"album_masonry_thumb_border_width":1,"album_masonry_thumb_border_style":"none","album_masonry_thumb_border_color":"000000","album_masonry_thumb_bg_color":"000000","album_masonry_thumbs_bg_color":"FFFFFF","album_masonry_thumb_bg_transparent":100,"album_masonry_thumb_box_shadow":"","album_masonry_thumb_transparent":100,"album_masonry_thumb_align":"center","album_masonry_thumb_hover_effect":"zoom","album_masonry_thumb_hover_effect_value":"2deg","album_masonry_thumb_transition":1,"album_masonry_gal_title_font_color":"323A45","album_masonry_gal_title_font_style":"Ubuntu","album_masonry_gal_title_font_size":18,"album_masonry_gal_title_font_weight":"bold","album_masonry_gal_title_margin":"0 2px 2px 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":100,"carousel_rl_btn_bg_color":"000000","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":"FFFFFF","carousel_rl_btn_height":40,"carousel_rl_btn_size":20,"carousel_play_pause_btn_size":20,"carousel_rl_btn_width":40,"carousel_close_rl_btn_hover_color":"CCCCCC","carousel_rl_btn_style":"fa-chevron","carousel_mergin_bottom":"0.5","carousel_font_family":"Ubuntu","carousel_feature_border_width":2,"carousel_feature_border_style":"solid","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}';
134
 
135
  if (!$exists_default) {
136
  $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
146
  'default_theme' => 0
147
  ));
148
  }
149
+
150
+ $file_paths = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_file_paths` (
151
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
152
+ `is_dir` tinyint(1) DEFAULT 0,
153
+ `path` mediumtext,
154
+ `type` varchar(5),
155
+ `name` varchar(250),
156
+ `filename` varchar(250),
157
+ `alt` varchar(250),
158
+ `thumb` varchar(250),
159
+ `size` varchar(10),
160
+ `resolution` varchar(15),
161
+ `credit` varchar(250),
162
+ `aperture` int(10),
163
+ `camera` varchar(250),
164
+ `caption` varchar(250),
165
+ `iso` int(10),
166
+ `orientation` int(10),
167
+ `copyright` varchar(250),
168
+ `tags` mediumtext,
169
+ `date_modified` datetime,
170
+ PRIMARY KEY (`id`)
171
+ ) " . $charset_collate . ";";
172
+ $wpdb->query($file_paths);
173
  }
174
  }
js/bwg.js CHANGED
@@ -125,7 +125,7 @@ jQuery(document).ready(function () {
125
  });
126
  });
127
 
128
- /* bwg_tb_window function changes the size of PopUp (width, height) */
129
  bwg_tb_window();
130
 
131
  /* Hide loading */
@@ -395,6 +395,9 @@ function spider_ajax_save(form_id, tr_group) {
395
  jQuery( "tbody" ).on( "click", ".toggle-row", function() {
396
  jQuery( this ).closest( "tr" ).toggleClass( "is-expanded" );
397
  });
 
 
 
398
  }
399
  });
400
 
@@ -1651,6 +1654,9 @@ function bwg_add_image(files) {
1651
  jQuery("#tbody_arr").prepend("<tr id='tr_" + bwg_j + "'>");
1652
  jQuery("#tr_" + bwg_j).html(html);
1653
 
 
 
 
1654
  jQuery("#ids_string").val(jQuery("#ids_string").val() + bwg_j + ',');
1655
  if ( jQuery("#tbody_arr").data("meta") == 1 && files[i]['tags'] ) {
1656
  /* If tags added to image from image file meta keywords.*/
@@ -1700,9 +1706,9 @@ function wd_pagination() {
1700
  });
1701
  }
1702
 
1703
- function bwg_tb_window(id) {
1704
- if (typeof id === 'undefined') {
1705
- var id = '';
1706
  }
1707
  var thickDims, tbWidth, tbHeight;
1708
  thickDims = function () {
@@ -1722,17 +1728,17 @@ function bwg_tb_window(id) {
1722
  jQuery(window).resize(function () {
1723
  thickDims()
1724
  });
1725
- jQuery('a.thickbox-preview' + id).click(function () {
1726
  tb_click.call(this);
1727
  var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
1728
- if (tbWidth = href.match(/&width=[0-9]+/)) {
1729
  tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
1730
  }
1731
  else {
1732
  tbWidth = jQuery(window).width() - 120;
1733
  }
1734
 
1735
- if (tbHeight = href.match(/&height=[0-9]+/)) {
1736
  tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
1737
  }
1738
  else {
125
  });
126
  });
127
 
128
+ /* Change the popup dimensions. */
129
  bwg_tb_window();
130
 
131
  /* Hide loading */
395
  jQuery( "tbody" ).on( "click", ".toggle-row", function() {
396
  jQuery( this ).closest( "tr" ).toggleClass( "is-expanded" );
397
  });
398
+
399
+ /* Change the popup dimensions. */
400
+ bwg_tb_window("#images_table");
401
  }
402
  });
403
 
1654
  jQuery("#tbody_arr").prepend("<tr id='tr_" + bwg_j + "'>");
1655
  jQuery("#tr_" + bwg_j).html(html);
1656
 
1657
+ /* Change the popup dimensions. */
1658
+ bwg_tb_window("#tr_" + bwg_j);
1659
+
1660
  jQuery("#ids_string").val(jQuery("#ids_string").val() + bwg_j + ',');
1661
  if ( jQuery("#tbody_arr").data("meta") == 1 && files[i]['tags'] ) {
1662
  /* If tags added to image from image file meta keywords.*/
1706
  });
1707
  }
1708
 
1709
+ function bwg_tb_window(cont_id) {
1710
+ if (typeof cont_id === 'undefined') {
1711
+ var cont_id = '';
1712
  }
1713
  var thickDims, tbWidth, tbHeight;
1714
  thickDims = function () {
1728
  jQuery(window).resize(function () {
1729
  thickDims()
1730
  });
1731
+ jQuery(cont_id + ' a.thickbox-preview').click(function () {
1732
  tb_click.call(this);
1733
  var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
1734
+ if (tbWidth = href.match(/&bwg_width=[0-9]+/)) {
1735
  tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
1736
  }
1737
  else {
1738
  tbWidth = jQuery(window).width() - 120;
1739
  }
1740
 
1741
+ if (tbHeight = href.match(/&bwg_height=[0-9]+/)) {
1742
  tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
1743
  }
1744
  else {
js/bwg_frontend.js CHANGED
@@ -793,6 +793,9 @@ function bwg_all_thumbnails_loaded_callback(that) {
793
  if (jQuery(that).hasClass('bwg-masonry-thumbnails')) {
794
  bwg_thumbnail_masonry( that );
795
  }
 
 
 
796
  }
797
 
798
  function bwg_container_loaded(bwg) {
@@ -804,6 +807,72 @@ function bwg_album_thumbnail(that) {
804
  bwg_container_loaded(jQuery(that).data('bwg'));
805
  }
806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
807
  function bwg_thumbnail(that) {
808
  var container_width = jQuery(that).width();
809
  var thumb_width = jQuery(that).data("thumbnail-width");
793
  if (jQuery(that).hasClass('bwg-masonry-thumbnails')) {
794
  bwg_thumbnail_masonry( that );
795
  }
796
+ if (jQuery(that).hasClass('bwg-album-extended')) {
797
+ bwg_album_extended( that );
798
+ }
799
  }
800
 
801
  function bwg_container_loaded(bwg) {
807
  bwg_container_loaded(jQuery(that).data('bwg'));
808
  }
809
 
810
+ function bwg_album_extended(that) {
811
+ var container_width = jQuery(that).width();
812
+ var thumb_width = jQuery(that).data("thumbnail-width");
813
+ var spacing = jQuery(that).data("spacing");
814
+ var max_count = jQuery(that).data("max-count");
815
+ var column_count = parseInt(container_width / (2 * thumb_width));
816
+ if ( column_count < 1 ) {
817
+ column_count = 1;
818
+ }
819
+ if (column_count > max_count) {
820
+ column_count = max_count;
821
+ }
822
+ var min_width = 100 / column_count;
823
+ var bwg_item = jQuery(that).find(".bwg-extended-item");
824
+ var margin_left = parseInt(bwg_item.css("margin-left"));
825
+ var margin_right = parseInt(bwg_item.css("margin-right"));
826
+ bwg_item.css({
827
+ width: "calc(" + min_width + "% - " + (margin_left + margin_right) + "px)"
828
+ });
829
+ if ( bwg_item.width() < thumb_width ) {
830
+ bwg_item.find(".bwg-extended-item0, .bwg-extended-item1").css({
831
+ width: 'calc(100% - ' + spacing + 'px)'
832
+ });
833
+ }
834
+ else if ( bwg_item.width() > 2 * thumb_width ) {
835
+ bwg_item.find(".bwg-extended-item0").css({
836
+ width: 'calc(50% - ' + spacing + 'px)'
837
+ });
838
+ bwg_item.find(".bwg-extended-item1").css({
839
+ width: 'calc(100% - ' + (thumb_width + spacing * 2) + 'px)'
840
+ });
841
+ }
842
+ else {
843
+ bwg_item.find(".bwg-extended-item0, .bwg-extended-item1").css({
844
+ width: 'calc(50% - ' + spacing + 'px)'
845
+ });
846
+ }
847
+
848
+ jQuery(that).children(".bwg-extended-item").each(function () {
849
+ var image = jQuery(this).find("img");
850
+ var item0 = jQuery(this).find(".bwg-item0");
851
+ var item2 = jQuery(this).find(".bwg-item2");
852
+ if ( (item2.width() / item2.height()) > (image.width() / image.height()) ) {
853
+ if ( item2.width() > image.width() ) {
854
+ image.css({width: "100%"});
855
+ }
856
+ else {
857
+ image.css({maxWidth: "100%"});
858
+ }
859
+ }
860
+ else {
861
+ if ( item2.height() > image.height() ) {
862
+ image.css({height: "100%"});
863
+ }
864
+ else {
865
+ image.css({maxHeight: "100%"});
866
+ }
867
+ }
868
+ jQuery(this).find(".bwg-item2").css({
869
+ marginLeft: (item0.width() - image.width()) / 2,
870
+ marginTop: (item0.height() - image.height()) / 2
871
+ });
872
+ });
873
+ bwg_container_loaded(jQuery(that).data('bwg'));
874
+ }
875
+
876
  function bwg_thumbnail(that) {
877
  var container_width = jQuery(that).width();
878
  var thumb_width = jQuery(that).data("thumbnail-width");
js/bwg_gallery_box.js CHANGED
@@ -862,7 +862,7 @@ function bwg_ecommerce() {
862
  bwg_popup_sidebar_close(jQuery(".bwg_comment_container"));
863
  jQuery(".bwg_comment_container").attr("class", "bwg_comment_container bwg_close");
864
  // Must be translatable
865
- jQuery(".bwg_comment").attr("title", bwg_objectsL10n.bwg_how_comments);
866
  }
867
  if (jQuery(".bwg_ecommerce_container").hasClass("bwg_open")) {
868
  /* Close ecommerce.*/
862
  bwg_popup_sidebar_close(jQuery(".bwg_comment_container"));
863
  jQuery(".bwg_comment_container").attr("class", "bwg_comment_container bwg_close");
864
  // Must be translatable
865
+ jQuery(".bwg_comment").attr("title", bwg_objectsL10n.bwg_show_comments);
866
  }
867
  if (jQuery(".bwg_ecommerce_container").hasClass("bwg_open")) {
868
  /* Close ecommerce.*/
js/tw-gb/block.js CHANGED
@@ -1,8 +1,28 @@
1
  /**
2
  * 10Web plugins Gutenberg integration
3
- * version 2.0.0
4
  */
5
  ( function ( blocks, element ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  registerAllPluginBlocks();
7
 
8
  function registerAllPluginBlocks() {
@@ -92,6 +112,16 @@
92
  }
93
  };
94
  props.setAttributes( { popupOpened: true } );
 
 
 
 
 
 
 
 
 
 
95
  var elem = el( 'form', { className: 'tw-container' }, el( 'div', { className: 'tw-container-wrap' + (pluginData.containerClass ? ' ' + pluginData.containerClass : '') }, el( 'span', {
96
  className: "media-modal-close",
97
  onClick: close
1
  /**
2
  * 10Web plugins Gutenberg integration
3
+ * version 2.0.1
4
  */
5
  ( function ( blocks, element ) {
6
+ if ( !window['tw_gb'] ) {
7
+ window['tw_gb'] = {};
8
+ }
9
+ if ( !window['tw_gb'][tw_obj.key] ) {
10
+ window['tw_gb'][tw_obj.key] = {
11
+ title: tw_obj.plugin_name,
12
+ titleSelect: tw_obj.select,
13
+ iconUrl: tw_obj.icon_url,
14
+ iconSvg: {
15
+ width: '20',
16
+ height: '20',
17
+ src: tw_obj.icon_svg
18
+ },
19
+ isPopup: true,
20
+ data: {
21
+ shortcodeUrl: tw_obj.url
22
+ }
23
+ }
24
+ }
25
+
26
  registerAllPluginBlocks();
27
 
28
  function registerAllPluginBlocks() {
112
  }
113
  };
114
  props.setAttributes( { popupOpened: true } );
115
+ if (!shortcode_id && '' != shortcode) {
116
+ var shortcode_extract = shortcode.split(' ');
117
+ for (i = 0; i < shortcode_extract.length; i++) {
118
+ var attributes = shortcode_extract[i].split('=');
119
+ if ('id'== attributes[0]) {
120
+ shortcode_id = attributes[1].replace(/"/g, "");
121
+ }
122
+ }
123
+ // shortcode_id = parseInt(shortcode_extract[1].split('=')[1].split('"')[1]);
124
+ }
125
  var elem = el( 'form', { className: 'tw-container' }, el( 'div', { className: 'tw-container-wrap' + (pluginData.containerClass ? ' ' + pluginData.containerClass : '') }, el( 'span', {
126
  className: "media-modal-close",
127
  onClick: close
photo-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
- * Version: 1.5.11
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/pricing/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -81,8 +81,8 @@ final class BWG {
81
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
82
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
83
  $this->main_file = plugin_basename(__FILE__);
84
- $this->plugin_version = '1.5.11';
85
- $this->db_version = '1.5.11';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
@@ -216,10 +216,18 @@ final class BWG {
216
 
217
  // Register widget for Elementor builder.
218
  add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
 
 
 
 
219
  // Register 10Web category for Elementor widget if 10Web builder doesn't installed.
220
  add_action('elementor/elements/categories_registered', array($this, 'register_widget_category'), 1, 1);
221
  }
222
 
 
 
 
 
223
  /**
224
  * Register widget for Elementor builder.
225
  */
@@ -242,7 +250,7 @@ final class BWG {
242
  }
243
 
244
  public function register_block_editor_assets($assets) {
245
- $version = '2.0.0';
246
  $js_path = $this->plugin_url . '/js/tw-gb/block.js';
247
  $css_path = $this->plugin_url . '/css/tw-gb/block.css';
248
  if (!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
@@ -264,34 +272,6 @@ final class BWG {
264
  }
265
 
266
  public function enqueue_block_editor_assets() {
267
- $key = 'tw/' . $this->prefix;
268
- $plugin_name = $this->nicename;
269
- $icon_url = $this->plugin_url . '/images/tw-gb/photo-gallery.svg';
270
- $icon_svg = $this->plugin_url . '/images/tw-gb/icon.svg';
271
- $url = add_query_arg(array('action' => 'shortcode_bwg'), admin_url('admin-ajax.php'));
272
- ?>
273
- <script>
274
- if ( !window['tw_gb'] ) {
275
- window['tw_gb'] = {};
276
- }
277
- if ( !window['tw_gb']['<?php echo $key; ?>'] ) {
278
- window['tw_gb']['<?php echo $key; ?>'] = {
279
- title: '<?php echo $plugin_name; ?>',
280
- titleSelect: '<?php echo sprintf(__('Select %s', $this->prefix), $plugin_name); ?>',
281
- iconUrl: '<?php echo $icon_url; ?>',
282
- iconSvg: {
283
- width: '20',
284
- height: '20',
285
- src: '<?php echo $icon_svg; ?>'
286
- },
287
- isPopup: true,
288
- data: {
289
- shortcodeUrl: '<?php echo $url; ?>'
290
- }
291
- }
292
- }
293
- </script>
294
- <?php
295
  // Remove previously registered or enqueued versions
296
  $wp_scripts = wp_scripts();
297
  foreach ($wp_scripts->registered as $key => $value) {
@@ -308,6 +288,12 @@ final class BWG {
308
  wp_localize_script('tw-gb-block', 'tw_obj', array(
309
  'nothing_selected' => __('Nothing selected.', $this->prefix),
310
  'empty_item' => __('- Select -', $this->prefix),
 
 
 
 
 
 
311
  ));
312
  wp_enqueue_style('tw-gb-block', $assets['css_path'], array( 'wp-edit-blocks' ), $assets['version']);
313
  }
@@ -1239,6 +1225,7 @@ final class BWG {
1239
  $this->prefix . '_sumoselect',
1240
  $this->prefix . '_font-awesome',
1241
  $this->prefix . '_mCustomScrollbar',
 
1242
  );
1243
  $required_scripts = array(
1244
  'jquery',
@@ -1309,7 +1296,6 @@ final class BWG {
1309
  'bwg_hide_ecommerce' => __('Hide Ecommerce', $this->prefix),
1310
  'bwg_show_comments' => __('Show Comments', $this->prefix),
1311
  'bwg_hide_comments' => __('Hide Comments', $this->prefix),
1312
- 'bwg_how_comments' => __('how Comments', $this->prefix),
1313
  'bwg_restore' => __('Restore', $this->prefix),
1314
  'bwg_maximize' => __('Maximize', $this->prefix),
1315
  'bwg_fullscreen' => __('Fullscreen', $this->prefix),
@@ -1921,12 +1907,10 @@ function wdpg_tenweb_install_notice() {
1921
  <?php
1922
  }
1923
  ?>
1924
-
1925
  </div>
1926
  </div>
1927
  <button type="button" class="wd_tenweb_notice_dissmiss notice-dismiss" onclick="jQuery('#wd_tenweb_notice_cont').attr('style', 'display: none !important;'); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
1928
  <div id="verifyUrl" data-url="<?php echo $verify_url ?>"></div>
1929
-
1930
  </div>
1931
  <script>
1932
  var url = jQuery(".tenweb_activaion").attr("data-install-url");
@@ -1941,8 +1925,10 @@ function wdpg_tenweb_install_notice() {
1941
  method: "POST",
1942
  url: url,
1943
  }).done(function() {
1944
- jQuery.ajax({ // Check if plugin installed
 
1945
  type: 'POST',
 
1946
  url: jQuery("#verifyUrl").attr('data-url'),
1947
  error: function()
1948
  {
@@ -1951,11 +1937,11 @@ function wdpg_tenweb_install_notice() {
1951
  },
1952
  success: function(response)
1953
  {
1954
- var plStatus = JSON.parse(response);
1955
- if(plStatus.status_install != 1) {
1956
  jQuery('#install_now').addClass('hide');
1957
  jQuery('#activate_now').removeClass('hide');
1958
- activate_tenweb_plugin();
 
1959
  }
1960
  else {
1961
  jQuery("#loading").removeClass('is-active');
@@ -1964,12 +1950,10 @@ function wdpg_tenweb_install_notice() {
1964
  }
1965
  });
1966
  })
1967
- .fail(function() {
1968
- //window.location = window.location.href;
1969
- jQuery("#loading").removeClass('is-active');
1970
- jQuery(".error_install").removeClass('hide');
1971
- });
1972
-
1973
  }
1974
 
1975
  function activate_tenweb_plugin() {
@@ -1980,8 +1964,10 @@ function wdpg_tenweb_install_notice() {
1980
  }).done(function() {
1981
  jQuery("#loading").removeClass('is-active');
1982
  var data_tenweb_url = '';
1983
- jQuery.ajax({ // Check if plugin installed
 
1984
  type: 'POST',
 
1985
  url: jQuery("#verifyUrl").attr('data-url'),
1986
  error: function()
1987
  {
@@ -1990,8 +1976,7 @@ function wdpg_tenweb_install_notice() {
1990
  },
1991
  success: function(response)
1992
  {
1993
- var plStatus = JSON.parse(response);
1994
- if(plStatus.status_active == 1) {
1995
  jQuery('#install_now').addClass('hide');
1996
  data_tenweb_url = jQuery('#activate_now').attr('data-tenweb-url');
1997
  jQuery.post('<?php echo $dismiss_url; ?>');
@@ -2003,24 +1988,22 @@ function wdpg_tenweb_install_notice() {
2003
  },
2004
  complete : function() {
2005
  if ( data_tenweb_url != '' ) {
2006
- window.location.href = data_tenweb_url;
2007
  }
2008
  }
2009
  });
2010
-
2011
  })
2012
- .fail(function() {
2013
- //window.location = window.location.href;
2014
- jQuery("#loading").removeClass('is-active');
2015
- });
2016
  }
2017
 
2018
  jQuery("#install_now").on("click",function(){
2019
  install_tenweb_plugin();
2020
- })
2021
  jQuery("#activate_now").on("click",function(){
2022
- activate_tenweb_plugin()
2023
- })
2024
  </script>
2025
  <style>
2026
  #wd_tenweb_notice_cont {
@@ -2086,13 +2069,10 @@ function wdpg_tenweb_install_notice() {
2086
  font-size: 13px;
2087
  }
2088
 
2089
-
2090
  .tenweb_plugins_icons{
2091
  position: relative;
2092
  }
2093
 
2094
-
2095
-
2096
  .tenweb_plugins_icons #tenweb_plugins_icons_cont {
2097
  display: flex;
2098
  height: 110px;
@@ -2221,8 +2201,6 @@ function wdpg_tenweb_install_notice() {
2221
  }
2222
  }
2223
 
2224
-
2225
-
2226
  @media only screen and (min-width: 1440px) and (max-width: 1919px){
2227
  .tenweb_logo {
2228
  width: calc(15% - 10px);
@@ -2307,11 +2285,8 @@ function wdpg_tenweb_install_notice() {
2307
  font-weight: 500;
2308
  line-height: 19px;
2309
  }
2310
-
2311
-
2312
  }
2313
 
2314
-
2315
  @media only screen and (max-width: 1024px) {
2316
  #wd_tenweb_notice_cont {
2317
  width: calc(100% - 20px);
@@ -2482,17 +2457,29 @@ if ( !function_exists('wd_tenwebps_install_notice_status') ) {
2482
  add_action('wp_ajax_wd_tenweb_dismiss', 'wd_tenwebps_install_notice_status');
2483
  }
2484
 
2485
-
2486
- //Check status 10web manager install
2487
- function check_tenweb_status(){
2488
  $status_install = 0;
2489
  $status_active = 0;
2490
  $plugin_dir = ABSPATH . 'wp-content/plugins/10web-manager/';
2491
- if ( !is_dir($plugin_dir)){
2492
  $status_install = 1;
2493
- }else if(is_plugin_active( '10web-manager/10web-manager.php' )) {
2494
  $status_active = 1;
2495
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
2496
  $jsondata = array('status_install' => $status_install, 'status_active' => $status_active);
2497
  echo json_encode($jsondata); exit;
2498
  }
3
  * Plugin Name: Photo Gallery
4
  * Plugin URI: https://10web.io/plugins/wordpress-photo-gallery/
5
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
6
+ * Version: 1.5.12
7
  * Author: Photo Gallery Team
8
  * Author URI: https://10web.io/pricing/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
81
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
82
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
83
  $this->main_file = plugin_basename(__FILE__);
84
+ $this->plugin_version = '1.5.12';
85
+ $this->db_version = '1.5.12';
86
  $this->prefix = 'bwg';
87
  $this->nicename = __('Photo Gallery', $this->prefix);
88
 
216
 
217
  // Register widget for Elementor builder.
218
  add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
219
+
220
+ //fires after elementor editor styles and scripts are enqueued.
221
+ add_action('elementor/editor/after_enqueue_styles', array($this, 'enqueue_editor_styles'), 11);
222
+
223
  // Register 10Web category for Elementor widget if 10Web builder doesn't installed.
224
  add_action('elementor/elements/categories_registered', array($this, 'register_widget_category'), 1, 1);
225
  }
226
 
227
+ public function enqueue_editor_styles() {
228
+ wp_enqueue_style('twbb-editor-styles', $this->plugin_url . '/css/bwg_elementor_icon/bwg_elementor_icon.css', array(), '1.0.0');
229
+ }
230
+
231
  /**
232
  * Register widget for Elementor builder.
233
  */
250
  }
251
 
252
  public function register_block_editor_assets($assets) {
253
+ $version = '2.0.1';
254
  $js_path = $this->plugin_url . '/js/tw-gb/block.js';
255
  $css_path = $this->plugin_url . '/css/tw-gb/block.css';
256
  if (!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
272
  }
273
 
274
  public function enqueue_block_editor_assets() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  // Remove previously registered or enqueued versions
276
  $wp_scripts = wp_scripts();
277
  foreach ($wp_scripts->registered as $key => $value) {
288
  wp_localize_script('tw-gb-block', 'tw_obj', array(
289
  'nothing_selected' => __('Nothing selected.', $this->prefix),
290
  'empty_item' => __('- Select -', $this->prefix),
291
+ 'key' => 'tw/' . $this->prefix,
292
+ 'plugin_name' => $this->nicename,
293
+ 'select' => sprintf(__('Select %s', $this->prefix), $this->nicename),
294
+ 'icon_url' => $this->plugin_url . '/images/tw-gb/photo-gallery.svg',
295
+ 'icon_svg' => $this->plugin_url . '/images/tw-gb/icon.svg',
296
+ 'url' => add_query_arg(array('action' => 'shortcode_bwg'), admin_url('admin-ajax.php')),
297
  ));
298
  wp_enqueue_style('tw-gb-block', $assets['css_path'], array( 'wp-edit-blocks' ), $assets['version']);
299
  }
1225
  $this->prefix . '_sumoselect',
1226
  $this->prefix . '_font-awesome',
1227
  $this->prefix . '_mCustomScrollbar',
1228
+ 'dashicons'
1229
  );
1230
  $required_scripts = array(
1231
  'jquery',
1296
  'bwg_hide_ecommerce' => __('Hide Ecommerce', $this->prefix),
1297
  'bwg_show_comments' => __('Show Comments', $this->prefix),
1298
  'bwg_hide_comments' => __('Hide Comments', $this->prefix),
 
1299
  'bwg_restore' => __('Restore', $this->prefix),
1300
  'bwg_maximize' => __('Maximize', $this->prefix),
1301
  'bwg_fullscreen' => __('Fullscreen', $this->prefix),
1907
  <?php
1908
  }
1909
  ?>
 
1910
  </div>
1911
  </div>
1912
  <button type="button" class="wd_tenweb_notice_dissmiss notice-dismiss" onclick="jQuery('#wd_tenweb_notice_cont').attr('style', 'display: none !important;'); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
1913
  <div id="verifyUrl" data-url="<?php echo $verify_url ?>"></div>
 
1914
  </div>
1915
  <script>
1916
  var url = jQuery(".tenweb_activaion").attr("data-install-url");
1925
  method: "POST",
1926
  url: url,
1927
  }).done(function() {
1928
+ // Check if plugin installed
1929
+ jQuery.ajax({
1930
  type: 'POST',
1931
+ dataType: 'json',
1932
  url: jQuery("#verifyUrl").attr('data-url'),
1933
  error: function()
1934
  {
1937
  },
1938
  success: function(response)
1939
  {
1940
+ if ( response.status_install == 1 ) {
 
1941
  jQuery('#install_now').addClass('hide');
1942
  jQuery('#activate_now').removeClass('hide');
1943
+
1944
+ activate_tenweb_plugin();
1945
  }
1946
  else {
1947
  jQuery("#loading").removeClass('is-active');
1950
  }
1951
  });
1952
  })
1953
+ .fail(function() {
1954
+ jQuery("#loading").removeClass('is-active');
1955
+ jQuery(".error_install").removeClass('hide');
1956
+ });
 
 
1957
  }
1958
 
1959
  function activate_tenweb_plugin() {
1964
  }).done(function() {
1965
  jQuery("#loading").removeClass('is-active');
1966
  var data_tenweb_url = '';
1967
+ // Check if plugin installed
1968
+ jQuery.ajax({
1969
  type: 'POST',
1970
+ dataType: 'json',
1971
  url: jQuery("#verifyUrl").attr('data-url'),
1972
  error: function()
1973
  {
1976
  },
1977
  success: function(response)
1978
  {
1979
+ if ( response.status_active == 0 ) {
 
1980
  jQuery('#install_now').addClass('hide');
1981
  data_tenweb_url = jQuery('#activate_now').attr('data-tenweb-url');
1982
  jQuery.post('<?php echo $dismiss_url; ?>');
1988
  },
1989
  complete : function() {
1990
  if ( data_tenweb_url != '' ) {
1991
+ window.location.href = data_tenweb_url;
1992
  }
1993
  }
1994
  });
 
1995
  })
1996
+ .fail(function() {
1997
+ jQuery("#loading").removeClass('is-active');
1998
+ });
 
1999
  }
2000
 
2001
  jQuery("#install_now").on("click",function(){
2002
  install_tenweb_plugin();
2003
+ });
2004
  jQuery("#activate_now").on("click",function(){
2005
+ activate_tenweb_plugin();
2006
+ });
2007
  </script>
2008
  <style>
2009
  #wd_tenweb_notice_cont {
2069
  font-size: 13px;
2070
  }
2071
 
 
2072
  .tenweb_plugins_icons{
2073
  position: relative;
2074
  }
2075
 
 
 
2076
  .tenweb_plugins_icons #tenweb_plugins_icons_cont {
2077
  display: flex;
2078
  height: 110px;
2201
  }
2202
  }
2203
 
 
 
2204
  @media only screen and (min-width: 1440px) and (max-width: 1919px){
2205
  .tenweb_logo {
2206
  width: calc(15% - 10px);
2285
  font-weight: 500;
2286
  line-height: 19px;
2287
  }
 
 
2288
  }
2289
 
 
2290
  @media only screen and (max-width: 1024px) {
2291
  #wd_tenweb_notice_cont {
2292
  width: calc(100% - 20px);
2457
  add_action('wp_ajax_wd_tenweb_dismiss', 'wd_tenwebps_install_notice_status');
2458
  }
2459
 
2460
+ // Check status 10web manager install
2461
+ function check_tenweb_status() {
 
2462
  $status_install = 0;
2463
  $status_active = 0;
2464
  $plugin_dir = ABSPATH . 'wp-content/plugins/10web-manager/';
2465
+ if ( is_dir($plugin_dir) ) {
2466
  $status_install = 1;
2467
+ } else if ( is_plugin_active( '10web-manager/10web-manager.php' ) ) {
2468
  $status_active = 1;
2469
  }
2470
+
2471
+ if ( is_dir($plugin_dir) ) {
2472
+ $old_opt_array = array();
2473
+ $new_opt_array = array('photo-gallery' => date('Y-m-d H:i:s'));
2474
+ $key = 'tenweb_manager_installed';
2475
+ $option = get_option($key);
2476
+ if ( !empty($option) ) {
2477
+ $old_opt_array = (array) json_decode($option);
2478
+ }
2479
+ $array_installed = array_merge( $new_opt_array, $old_opt_array );
2480
+ update_option( $key, json_encode($array_installed) );
2481
+ }
2482
+
2483
  $jsondata = array('status_install' => $status_install, 'status_active' => $status_active);
2484
  echo json_encode($jsondata); exit;
2485
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,wdsupport,photogallerysupport,10web
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.0
6
- Stable tag: 1.5.11
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -279,6 +279,21 @@ Choose whether to display random or the first/last specific number of images.
279
 
280
  == Changelog ==
281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  = 1.5.11 =
283
  * Fixed: Upload image when there is a qoute in the image metadata.
284
  * Fixed: Bug on slideshow autoplay.
3
  Tags: gallery, photo gallery, image gallery, responsive gallery, wordpress gallery plugin, photo albums, gallery slider, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery, watermarking, video gallery
4
  Requires at least: 3.4
5
  Tested up to: 5.0
6
+ Stable tag: 1.5.12
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
279
 
280
  == Changelog ==
281
 
282
+ = 1.5.12 =
283
+ * Added: Number of columns option for Extended Gallery Group view.
284
+ * Added: Title/description vertical alignment option for Extended Gallery Group view.
285
+ * Added: Backend notification if php-xml library is not installed.
286
+ * Changed: Extended Gallery Group view theme default values.
287
+ * Changed: Bulk-editing image info.
288
+ * Improved: Extended Gallery Group view responsiveness.
289
+ * Improved: Decreased load time in Image uploader and working with a large number of images.
290
+ * Fixed: Bug on inserting media from Youtube.
291
+ * Fixed: Crop popup dimensions for a newly added image.
292
+ * Fixed: Image uploader popup dimensions in Bridge theme.
293
+ * Fixed: Gutenberg block edit functionality.
294
+ * Fixed: JS before doctype on Gutenberg edit page.
295
+ * Added: Free plugin flow: When installing Manager, store plugin name or slug in a WP option.
296
+
297
  = 1.5.11 =
298
  * Fixed: Upload image when there is a qoute in the image metadata.
299
  * Fixed: Bug on slideshow autoplay.
update.php CHANGED
@@ -389,11 +389,37 @@ class BWGUpdate {
389
  require_once(BWG()->plugin_dir . '/framework/WDWLibrary.php');
390
  WDWLibrary::before_update_create_custom_posts();
391
  }
392
- if ( version_compare($version, '1.4.0' ) == -1 ) {
393
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `modified_date` int(10) NOT NULL DEFAULT 0");
394
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_album ADD `modified_date` int(10) NOT NULL DEFAULT 0");
395
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_image ADD `modified_date` int(10) NOT NULL DEFAULT 0");
396
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  return;
398
  }
399
  }
389
  require_once(BWG()->plugin_dir . '/framework/WDWLibrary.php');
390
  WDWLibrary::before_update_create_custom_posts();
391
  }
392
+ if ( version_compare($version, '1.4.0' ) == -1 ) {
393
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_gallery ADD `modified_date` int(10) NOT NULL DEFAULT 0");
394
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_album ADD `modified_date` int(10) NOT NULL DEFAULT 0");
395
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_image ADD `modified_date` int(10) NOT NULL DEFAULT 0");
396
  }
397
+ if ( version_compare($version, '1.5.12' ) == -1 ) {
398
+ $charset_collate = $wpdb->get_charset_collate();
399
+ $file_paths_tbl = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_file_paths` (
400
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
401
+ `is_dir` tinyint(1) DEFAULT 0,
402
+ `path` mediumtext,
403
+ `type` varchar(5),
404
+ `name` varchar(250),
405
+ `filename` varchar(250),
406
+ `alt` varchar(250),
407
+ `thumb` varchar(250),
408
+ `size` varchar(10),
409
+ `resolution` varchar(15),
410
+ `credit` varchar(250),
411
+ `aperture` int(10),
412
+ `camera` varchar(250),
413
+ `caption` varchar(250),
414
+ `iso` int(10),
415
+ `orientation` int(10),
416
+ `copyright` varchar(250),
417
+ `tags` mediumtext,
418
+ `date_modified` datetime,
419
+ PRIMARY KEY (`id`)
420
+ ) " . $charset_collate . ";";
421
+ $wpdb->query($file_paths_tbl);
422
+ }
423
  return;
424
  }
425
  }