Photo Gallery by WD – Responsive Photo Gallery - Version 1.1.26

Version Description

  • added option "Import from Media Library"
Download this release

Release Info

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

Code changes from version 1.1.25 to 1.1.26

admin/controllers/BWGControllerOptions_bwg.php CHANGED
@@ -178,6 +178,7 @@ class BWGControllerOptions_bwg {
178
  $thumb_link_target = (isset($_POST['thumb_link_target']) ? esc_html(stripslashes($_POST['thumb_link_target'])) : 1);
179
  $comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
180
  $popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
 
181
 
182
  $save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
183
  'images_directory' => $images_directory,
@@ -276,6 +277,7 @@ class BWGControllerOptions_bwg {
276
  'thumb_link_target' => $thumb_link_target,
277
  'comment_moderation' => $comment_moderation,
278
  'popup_hit_counter' => $popup_hit_counter,
 
279
  ), array('id' => 1));
280
 
281
  if ($save !== FALSE) {
178
  $thumb_link_target = (isset($_POST['thumb_link_target']) ? esc_html(stripslashes($_POST['thumb_link_target'])) : 1);
179
  $comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
180
  $popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
181
+ $enable_ML_import = (isset($_POST['enable_ML_import']) ? esc_html(stripslashes($_POST['enable_ML_import'])) : 0);
182
 
183
  $save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
184
  'images_directory' => $images_directory,
277
  'thumb_link_target' => $thumb_link_target,
278
  'comment_moderation' => $comment_moderation,
279
  'popup_hit_counter' => $popup_hit_counter,
280
+ 'enable_ML_import' => $enable_ML_import,
281
  ), array('id' => 1));
282
 
283
  if ($save !== FALSE) {
admin/models/BWGModelOptions_bwg.php CHANGED
@@ -132,6 +132,7 @@ class BWGModelOptions_bwg {
132
  $row->thumb_link_target = 1;
133
  $row->comment_moderation = 0;
134
  $row->popup_hit_counter = 0;
 
135
  }
136
  return $row;
137
  }
132
  $row->thumb_link_target = 1;
133
  $row->comment_moderation = 0;
134
  $row->popup_hit_counter = 0;
135
+ $row->enable_ML_import = 0;
136
  }
137
  return $row;
138
  }
admin/views/BWGViewGalleries_bwg.php CHANGED
@@ -197,7 +197,6 @@ class BWGViewGalleries_bwg {
197
  global $WD_BWG_UPLOAD_DIR;
198
  $row = $this->model->get_row_data($id);
199
  $option_row = $this->model->get_option_row_data();
200
- $pages = get_pages();
201
  $page_title = (($id != 0) ? 'Edit gallery ' . $row->name : 'Create new gallery');
202
  ?>
203
  <div style="clear: both; float: left; width: 95%;">
197
  global $WD_BWG_UPLOAD_DIR;
198
  $row = $this->model->get_row_data($id);
199
  $option_row = $this->model->get_option_row_data();
 
200
  $page_title = (($id != 0) ? 'Edit gallery ' . $row->name : 'Create new gallery');
201
  ?>
202
  <div style="clear: both; float: left; width: 95%;">
admin/views/BWGViewOptions_bwg.php CHANGED
@@ -203,6 +203,16 @@ class BWGViewOptions_bwg {
203
  <div class="spider_description">Count of images to preload (0 for all).</div>
204
  </td>
205
  </tr>
 
 
 
 
 
 
 
 
 
 
206
  </tbody>
207
  </table>
208
  </div>
203
  <div class="spider_description">Count of images to preload (0 for all).</div>
204
  </td>
205
  </tr>
206
+ <tr>
207
+ <td class="spider_label_options">
208
+ <label>Import from Media Library:</label>
209
+ </td>
210
+ <td>
211
+ <input type="radio" name="enable_ML_import" id="enable_ML_import_1" value="1" <?php if ($row->enable_ML_import) echo 'checked="checked"'; ?> /><label for="enable_ML_import_1">Yes</label>
212
+ <input type="radio" name="enable_ML_import" id="enable_ML_import_0" value="0" <?php if (!$row->enable_ML_import) echo 'checked="checked"'; ?> /><label for="enable_ML_import_0">No</label>
213
+ <div class="spider_description">Enable import from Media Library in file manager.</div>
214
+ </td>
215
+ </tr>
216
  </tbody>
217
  </table>
218
  </div>
filemanager/UploadHandler.php CHANGED
@@ -641,7 +641,8 @@ class UploadHandler {
641
  protected function handle_file_import($uploaded_file, $name, $index = null, $content_range = null) {
642
  $parent_dir = wp_upload_dir();
643
  $parent_dir = $parent_dir['basedir'];
644
- $type = strtolower(end(explode('.', $name)));
 
645
 
646
  $file = new stdClass();
647
  $file->name = $this->get_file_name($name, $type, $index, $content_range);
@@ -840,12 +841,13 @@ class UploadHandler {
840
  if (isset($_GET['import']) && $_GET['import'] == 'true') {
841
  $file_names = explode('**@**', (isset($_REQUEST['file_namesML']) ? stripslashes($_REQUEST['file_namesML']) : ''));
842
  foreach ($file_names as $index => $value) {
843
- $files[] = $this->handle_file_import(
844
- $value,
845
- end(explode('/', $value)),
846
- 0,
847
- ""
848
- );
 
849
  }
850
  header('Location: ' . add_query_arg(array('action' => 'addImages', 'width' => '650', 'height' => '500', 'task' => 'show_file_manager', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => $_REQUEST['callback'], 'dir' => $_REQUEST['redir'], 'TB_iframe' => '1'), admin_url('admin-ajax.php')));
851
  exit;
641
  protected function handle_file_import($uploaded_file, $name, $index = null, $content_range = null) {
642
  $parent_dir = wp_upload_dir();
643
  $parent_dir = $parent_dir['basedir'];
644
+ $file_type_array = explode('.', $name);
645
+ $type = strtolower(end($file_type_array));
646
 
647
  $file = new stdClass();
648
  $file->name = $this->get_file_name($name, $type, $index, $content_range);
841
  if (isset($_GET['import']) && $_GET['import'] == 'true') {
842
  $file_names = explode('**@**', (isset($_REQUEST['file_namesML']) ? stripslashes($_REQUEST['file_namesML']) : ''));
843
  foreach ($file_names as $index => $value) {
844
+ $file_name_array = explode('/', $value);
845
+ $files[] = $this->handle_file_import(
846
+ $value,
847
+ end($file_name_array),
848
+ 0,
849
+ ""
850
+ );
851
  }
852
  header('Location: ' . add_query_arg(array('action' => 'addImages', 'width' => '650', 'height' => '500', 'task' => 'show_file_manager', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => $_REQUEST['callback'], 'dir' => $_REQUEST['redir'], 'TB_iframe' => '1'), admin_url('admin-ajax.php')));
853
  exit;
filemanager/controller.php CHANGED
@@ -25,11 +25,12 @@ class FilemanagerController {
25
 
26
  public function __construct() {
27
  $upload_dir = wp_upload_dir();
28
- $this->uploads_dir = (($this->get_options_data()->images_directory . '/photo-gallery') ? ABSPATH . $this->get_options_data()->images_directory . '/photo-gallery' : WD_BWG_DIR . '/filemanager/uploads');
 
29
  if (file_exists($this->uploads_dir) == FALSE) {
30
  mkdir($this->uploads_dir);
31
  }
32
- $this->uploads_url = (($this->get_options_data()->images_directory . '/photo-gallery') ? site_url() . '/' . $this->get_options_data()->images_directory . '/photo-gallery' : WD_BWG_URL . '/filemanager/uploads');
33
  }
34
 
35
  ////////////////////////////////////////////////////////////////////////////////////////
25
 
26
  public function __construct() {
27
  $upload_dir = wp_upload_dir();
28
+ $bwg_options = $this->get_options_data();
29
+ $this->uploads_dir = (($bwg_options->images_directory . '/photo-gallery') ? ABSPATH . $bwg_options->images_directory . '/photo-gallery' : WD_BWG_DIR . '/filemanager/uploads');
30
  if (file_exists($this->uploads_dir) == FALSE) {
31
  mkdir($this->uploads_dir);
32
  }
33
+ $this->uploads_url = (($bwg_options->images_directory . '/photo-gallery') ? site_url() . '/' . $bwg_options->images_directory . '/photo-gallery' : WD_BWG_URL . '/filemanager/uploads');
34
  }
35
 
36
  ////////////////////////////////////////////////////////////////////////////////////////
filemanager/js/default.js CHANGED
@@ -305,7 +305,7 @@ function onPathComponentClick(event, obj, path) {
305
  submit("", null, null, null, path, null, null, null, null, null, null);
306
  }
307
 
308
- function onBtnShowImportClick(event, obj, path) {
309
  jQuery("#importer").fadeIn();
310
  }
311
 
305
  submit("", null, null, null, path, null, null, null, null, null, null);
306
  }
307
 
308
+ function onBtnShowImportClick(event, obj) {
309
  jQuery("#importer").fadeIn();
310
  }
311
 
filemanager/model.php CHANGED
@@ -47,7 +47,7 @@ class FilemanagerModel {
47
  $data['path_components'] = $this->get_path_components();
48
  $data['dir'] = (isset($_REQUEST['dir']) ? $_REQUEST['dir'] : '');
49
  $data['files'] = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
50
- $data['media_library_files'] = $this->get_media_library_files($session_data['sort_by'], $session_data['sort_order']);
51
  $data['extensions'] = (isset($_REQUEST['extensions']) ? $_REQUEST['extensions'] : '');
52
  $data['callback'] = (isset($_REQUEST['callback']) ? $_REQUEST['callback'] : '');
53
 
@@ -136,7 +136,8 @@ class FilemanagerModel {
136
  $file['is_dir'] = FALSE;
137
  $file['name'] = $file_name;
138
  $file['filename'] = substr($file_name, 0, strrpos($file_name, '.'));
139
- $file['type'] = strtolower(end(explode('.', $file_name)));
 
140
  $icon = $icons_dir_url . '/' . $file['type'] . '.png';
141
  if (file_exists($icons_dir_path . '/' . $file['type'] . '.png') == FALSE) {
142
  $icon = $icons_dir_url . '/' . '_blank.png';
@@ -181,11 +182,13 @@ class FilemanagerModel {
181
  if (isset($file_meta['file'])) {
182
  $file = array();
183
  $file['is_dir'] = FALSE;
184
- $file_name = end(explode('/', $file_meta['file']));
 
185
  $file['name'] = $file_name;
186
  $file['path'] = $file_meta['file'];
187
  $file['filename'] = substr($file_name, 0, strrpos($file_name, '.'));
188
- $file['type'] = strtolower(end(explode('.', $file_name)));
 
189
  $file['thumb'] = wp_get_attachment_thumb_url($image->ID);
190
  $file['icon'] = $file['thumb'];
191
  if (($valid_types[0] != '*') && (in_array($file['type'], $valid_types) == FALSE)) {
47
  $data['path_components'] = $this->get_path_components();
48
  $data['dir'] = (isset($_REQUEST['dir']) ? $_REQUEST['dir'] : '');
49
  $data['files'] = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
50
+ $data['media_library_files'] = ($this->controller->get_options_data()->enable_ML_import ? $this->get_media_library_files($session_data['sort_by'], $session_data['sort_order']) : NULL);
51
  $data['extensions'] = (isset($_REQUEST['extensions']) ? $_REQUEST['extensions'] : '');
52
  $data['callback'] = (isset($_REQUEST['callback']) ? $_REQUEST['callback'] : '');
53
 
136
  $file['is_dir'] = FALSE;
137
  $file['name'] = $file_name;
138
  $file['filename'] = substr($file_name, 0, strrpos($file_name, '.'));
139
+ $file_extension = explode('.', $file_name);
140
+ $file['type'] = strtolower(end($file_extension));
141
  $icon = $icons_dir_url . '/' . $file['type'] . '.png';
142
  if (file_exists($icons_dir_path . '/' . $file['type'] . '.png') == FALSE) {
143
  $icon = $icons_dir_url . '/' . '_blank.png';
182
  if (isset($file_meta['file'])) {
183
  $file = array();
184
  $file['is_dir'] = FALSE;
185
+ $file_name_array = explode('/', $file_meta['file']);
186
+ $file_name = end($file_name_array);
187
  $file['name'] = $file_name;
188
  $file['path'] = $file_meta['file'];
189
  $file['filename'] = substr($file_name, 0, strrpos($file_name, '.'));
190
+ $file_type_array = explode('.', $file_name);
191
+ $file['type'] = strtolower(end($file_type_array));
192
  $file['thumb'] = wp_get_attachment_thumb_url($image->ID);
193
  $file['icon'] = $file['thumb'];
194
  if (($valid_types[0] != '*') && (in_array($file['type'], $valid_types) == FALSE)) {
filemanager/view.php CHANGED
@@ -40,6 +40,7 @@ class FilemanagerView {
40
  <?php
41
  $_GET['filemanager_msg'] = '';
42
  }
 
43
  $file_manager_data = $this->model->get_file_manager_data();
44
 
45
  $items_view = $file_manager_data['session_data']['items_view'];
@@ -114,10 +115,12 @@ class FilemanagerView {
114
  <span class="ctrl_bar_btn btn_primary">
115
  <a class="ctrl_bar_btn btn_upload_files" onclick="onBtnShowUploaderClick(event, this);"><?php echo 'Upload files'; ?></a>
116
  </span>
 
117
  <span class="ctrl_bar_divider"></span>
118
  <span class="ctrl_bar_btn btn_primary">
119
- <a class="ctrl_bar_btn btn_import_files" onclick="onBtnShowImportClick(event, this, '<?php echo wp_upload_dir(); ?>');"><?php echo 'Media library'; ?></a>
120
  </span>
 
121
  </div>
122
  <div class="ctrls_right">
123
  <a class="ctrl_bar_btn btn_view_thumbs" onclick="onBtnViewThumbsClick(event, this);" title="<?php echo 'View thumbs'; ?>"></a>
@@ -254,8 +257,8 @@ class FilemanagerView {
254
  <div class="ctrls_bar ctrls_bar_header">
255
  <div class="ctrls_left upload_thumb">
256
  Generated Thumbnail Maximum Dimensions:
257
- <input type="text" class="upload_thumb_dim" name="importer_thumb_width" id="importer_thumb_width" value="<?php echo $this->controller->get_options_data()->upload_thumb_width; ?>" /> x
258
- <input type="text" class="upload_thumb_dim" name="importer_thumb_height" id="importer_thumb_height" value="<?php echo $this->controller->get_options_data()->upload_thumb_height; ?>" /> px
259
  </div>
260
  <div class="ctrls_right">
261
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo 'Back'; ?>"></a>
@@ -322,8 +325,8 @@ class FilemanagerView {
322
  <div class="ctrls_bar ctrls_bar_header">
323
  <div class="ctrls_left upload_thumb">
324
  Generated Thumbnail Maximum Dimensions:
325
- <input type="text" class="upload_thumb_dim" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo $this->controller->get_options_data()->upload_thumb_width; ?>" /> x
326
- <input type="text" class="upload_thumb_dim" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo $this->controller->get_options_data()->upload_thumb_height; ?>" /> px
327
  </div>
328
  <div class="ctrls_right">
329
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo 'Back'; ?>"></a>
40
  <?php
41
  $_GET['filemanager_msg'] = '';
42
  }
43
+ $bwg_options = $this->controller->get_options_data();
44
  $file_manager_data = $this->model->get_file_manager_data();
45
 
46
  $items_view = $file_manager_data['session_data']['items_view'];
115
  <span class="ctrl_bar_btn btn_primary">
116
  <a class="ctrl_bar_btn btn_upload_files" onclick="onBtnShowUploaderClick(event, this);"><?php echo 'Upload files'; ?></a>
117
  </span>
118
+ <?php if ($bwg_options->enable_ML_import) { ?>
119
  <span class="ctrl_bar_divider"></span>
120
  <span class="ctrl_bar_btn btn_primary">
121
+ <a class="ctrl_bar_btn btn_import_files" onclick="onBtnShowImportClick(event, this);"><?php echo 'Media library'; ?></a>
122
  </span>
123
+ <?php } ?>
124
  </div>
125
  <div class="ctrls_right">
126
  <a class="ctrl_bar_btn btn_view_thumbs" onclick="onBtnViewThumbsClick(event, this);" title="<?php echo 'View thumbs'; ?>"></a>
257
  <div class="ctrls_bar ctrls_bar_header">
258
  <div class="ctrls_left upload_thumb">
259
  Generated Thumbnail Maximum Dimensions:
260
+ <input type="text" class="upload_thumb_dim" name="importer_thumb_width" id="importer_thumb_width" value="<?php echo $bwg_options->upload_thumb_width; ?>" /> x
261
+ <input type="text" class="upload_thumb_dim" name="importer_thumb_height" id="importer_thumb_height" value="<?php echo $bwg_options->upload_thumb_height; ?>" /> px
262
  </div>
263
  <div class="ctrls_right">
264
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo 'Back'; ?>"></a>
325
  <div class="ctrls_bar ctrls_bar_header">
326
  <div class="ctrls_left upload_thumb">
327
  Generated Thumbnail Maximum Dimensions:
328
+ <input type="text" class="upload_thumb_dim" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo $bwg_options->upload_thumb_width; ?>" /> x
329
+ <input type="text" class="upload_thumb_dim" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo $bwg_options->upload_thumb_height; ?>" /> px
330
  </div>
331
  <div class="ctrls_right">
332
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo 'Back'; ?>"></a>
framework/WDWLibrary.php CHANGED
@@ -596,6 +596,7 @@ class WDWLibrary {
596
  function check_enter_key(e) {
597
  var key_code = e.which || e.keyCode;
598
  if (key_code == 13) {
 
599
  return false;
600
  }
601
  return true;
596
  function check_enter_key(e) {
597
  var key_code = e.which || e.keyCode;
598
  if (key_code == 13) {
599
+ spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1);
600
  return false;
601
  }
602
  return true;
frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -404,7 +404,6 @@ class BWGViewAlbum_compact_preview {
404
  text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
405
  vertical-align: middle;
406
  width: inherit;
407
- word-break: break-all;
408
  word-wrap: break-word;
409
  }
410
  /*Pagination styles.*/
404
  text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
405
  vertical-align: middle;
406
  width: inherit;
 
407
  word-wrap: break-word;
408
  }
409
  /*Pagination styles.*/
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -1305,7 +1305,7 @@ class BWGViewGalleryBox {
1305
  var cur_width = jQuery(current_image_class).width();
1306
  var innhtml = '<span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">';
1307
  if (!is_video) {
1308
- innhtml += '<img style="max-height: ' + cur_height + 'px; max-width: ' + cur_width + 'px;" class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[key]["image_url"]).text() + '" alt="' + jQuery('<div />').html(data[key]["alt"]).text() + '" />';
1309
  }
1310
  else {
1311
  innhtml += '<span style="height: ' + cur_height + 'px; width: ' + cur_width + 'px;" class="bwg_popup_video"><iframe class="bwg_video_frame" src="' + (data[key]['filetype'] == "YOUTUBE" ? "//www.youtube.com/embed/" + data[key]['filename'] + "?enablejsapi=1" : "//player.vimeo.com/video/" + data[key]['filename'] + "?api=1") + '" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe></span>';
1305
  var cur_width = jQuery(current_image_class).width();
1306
  var innhtml = '<span class="bwg_popup_image_spun1" style="display: table; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display: table-cell; vertical-align: middle; text-align: center;">';
1307
  if (!is_video) {
1308
+ innhtml += '<img style="max-height: ' + cur_height + 'px; max-width: ' + cur_width + 'px;" class="bwg_popup_image" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<div />').html(data[key]["image_url"]).text() + '" alt="' + data[key]["alt"] + '" />';
1309
  }
1310
  else {
1311
  innhtml += '<span style="height: ' + cur_height + 'px; width: ' + cur_width + 'px;" class="bwg_popup_video"><iframe class="bwg_video_frame" src="' + (data[key]['filetype'] == "YOUTUBE" ? "//www.youtube.com/embed/" + data[key]['filename'] + "?enablejsapi=1" : "//player.vimeo.com/video/" + data[key]['filename'] + "?api=1") + '" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe></span>';
frontend/views/BWGViewThumbnails.php CHANGED
@@ -252,7 +252,6 @@ class BWGViewThumbnails {
252
  text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
253
  vertical-align: middle;
254
  width: inherit;
255
- word-break: break-all;
256
  word-wrap: break-word;
257
  }
258
  /*pagination styles*/
252
  text-shadow: <?php echo $theme_row->thumb_title_shadow; ?>;
253
  vertical-align: middle;
254
  width: inherit;
 
255
  word-wrap: break-word;
256
  }
257
  /*pagination styles*/
js/bwg_editor_button.js CHANGED
@@ -25,7 +25,7 @@
25
  ed.addButton('bwg_mce', {
26
  title:'Insert Photo Gallery',
27
  cmd:'mcebwg_mce',
28
- image: bwg_plugin_url + '/images/bwg_edit_but.png'
29
  });
30
  ed.onMouseDown.add(function (d, f) {
31
  if (f.target.nodeName == "IMG" && d.dom.hasClass(f.target, "bwg_shortcode")) {
25
  ed.addButton('bwg_mce', {
26
  title:'Insert Photo Gallery',
27
  cmd:'mcebwg_mce',
28
+ image: url + '/images/bwg_edit_but.png'
29
  });
30
  ed.onMouseDown.add(function (d, f) {
31
  if (f.target.nodeName == "IMG" && d.dom.hasClass(f.target, "bwg_shortcode")) {
{images → js/images}/bwg_edit_but.png RENAMED
File without changes
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.1.25
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
@@ -561,6 +561,7 @@ function bwg_activate() {
561
  `thumb_link_target` tinyint(1) NOT NULL,
562
  `comment_moderation` tinyint(1) NOT NULL,
563
  `popup_hit_counter` tinyint(1) NOT NULL,
 
564
  PRIMARY KEY (`id`)
565
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
566
  $wpdb->query($bwg_option);
@@ -1077,6 +1078,7 @@ function bwg_activate() {
1077
  'comment_moderation' => 0,
1078
  'popup_info_always_show' => 0,
1079
  'popup_hit_counter' => 0,
 
1080
  ), array(
1081
  '%d',
1082
  '%s',
@@ -1184,6 +1186,7 @@ function bwg_activate() {
1184
  '%d',
1185
  '%d',
1186
  '%d',
 
1187
  ));
1188
  }
1189
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
@@ -2685,7 +2688,7 @@ function bwg_activate() {
2685
  ));
2686
  }
2687
  $version = get_option("wd_bwg_version");
2688
- $new_version = '1.1.24';
2689
  if ($version && version_compare($version, $new_version, '<')) {
2690
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2691
  bwg_update($version);
@@ -2700,7 +2703,7 @@ register_activation_hook(__FILE__, 'bwg_activate');
2700
 
2701
  function bwg_update_hook() {
2702
  $version = get_option("wd_bwg_version");
2703
- $new_version = '1.1.24';
2704
  if ($version && version_compare($version, $new_version, '<')) {
2705
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2706
  bwg_update($version);
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.1.26
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
561
  `thumb_link_target` tinyint(1) NOT NULL,
562
  `comment_moderation` tinyint(1) NOT NULL,
563
  `popup_hit_counter` tinyint(1) NOT NULL,
564
+ `enable_ML_import` tinyint(1) NOT NULL,
565
  PRIMARY KEY (`id`)
566
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
567
  $wpdb->query($bwg_option);
1078
  'comment_moderation' => 0,
1079
  'popup_info_always_show' => 0,
1080
  'popup_hit_counter' => 0,
1081
+ 'enable_ML_import' => 0,
1082
  ), array(
1083
  '%d',
1084
  '%s',
1186
  '%d',
1187
  '%d',
1188
  '%d',
1189
+ '%d',
1190
  ));
1191
  }
1192
  $exists_default = $wpdb->get_var('SELECT count(id) FROM ' . $wpdb->prefix . 'bwg_theme');
2688
  ));
2689
  }
2690
  $version = get_option("wd_bwg_version");
2691
+ $new_version = '1.1.26';
2692
  if ($version && version_compare($version, $new_version, '<')) {
2693
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2694
  bwg_update($version);
2703
 
2704
  function bwg_update_hook() {
2705
  $version = get_option("wd_bwg_version");
2706
+ $new_version = '1.1.26';
2707
  if ($version && version_compare($version, $new_version, '<')) {
2708
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2709
  bwg_update($version);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.9
7
- Stable tag: 1.1.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,6 +71,7 @@ Photo Gallery product in addition to the main plugin includes 4 specific widgets
71
  * Support for YouTube and Vimeo videos within Galleries.
72
  * Possibility of uploading images from the Media Library of the website.
73
  * Possibility to add tags to all images at once.
 
74
 
75
  Upgrade to [WordPress Photo Gallery Pro](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html) to add features:
76
 
@@ -171,6 +172,12 @@ If any problem occurs, please contact us at [info@web-dorado.com](mailto:info@w
171
 
172
  == Changelog ==
173
 
 
 
 
 
 
 
174
  = 1.1.24 =
175
  * Improve translation, Add tags to all images
176
 
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.9
7
+ Stable tag: 1.1.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
  * Support for YouTube and Vimeo videos within Galleries.
72
  * Possibility of uploading images from the Media Library of the website.
73
  * Possibility to add tags to all images at once.
74
+ * Right-click enabling option for the image downloads protection.
75
 
76
  Upgrade to [WordPress Photo Gallery Pro](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html) to add features:
77
 
172
 
173
  == Changelog ==
174
 
175
+ = 1.1.26 =
176
+ * added option "Import from Media Library"
177
+
178
+ = 1.1.25 =
179
+ * bug fixed in save gallery
180
+
181
  = 1.1.24 =
182
  * Improve translation, Add tags to all images
183
 
update/bwg_update.php CHANGED
@@ -123,6 +123,10 @@ function bwg_update($version) {
123
  // Add search box width option.
124
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `preload_images_count` int(4) NOT NULL DEFAULT 10");
125
  }
 
 
 
 
126
  return;
127
  }
128
 
123
  // Add search box width option.
124
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `preload_images_count` int(4) NOT NULL DEFAULT 10");
125
  }
126
+ if (version_compare($version, '1.1.26') == -1) {
127
+ // Add import from media library option.
128
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `enable_ML_import` tinyint(1) NOT NULL DEFAULT 0");
129
+ }
130
  return;
131
  }
132