Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.46

Version Description

  • Changed: Activate, Deactivate hooks for multisite.
Download this release

Release Info

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

Code changes from version 1.2.45 to 1.2.46

Files changed (3) hide show
  1. filemanager/view.php +6 -2
  2. photo-gallery.php +52 -5
  3. readme.txt +4 -1
filemanager/view.php CHANGED
@@ -67,7 +67,7 @@ class FilemanagerView {
67
 
68
  var messageEnterDirName = "<?php echo 'Enter directory name'; ?>";
69
  var messageEnterNewName = "<?php echo 'Enter new name'; ?>";
70
- var messageFilesUploadComplete = "<?php echo 'Files upload complete'; ?>";
71
 
72
  var root = "<?php echo addslashes($this->controller->get_uploads_dir()); ?>";
73
  var dir = "<?php echo (isset($_REQUEST['dir']) ? addslashes(esc_html($_REQUEST['dir'])) : ''); ?>";
@@ -415,13 +415,15 @@ class FilemanagerView {
415
  jQuery("#uploader_progress_text").text(messageFilesUploadComplete);
416
  jQuery("#uploader_progress_text").addClass("uploader_text");
417
  });
 
 
418
  }
419
  },
420
  stop: function (e, data) {
421
  onBtnBackClick();
422
  },
423
  done: function (e, data) {
424
- jQuery.each(data.result.files, function (index, file) {
425
  if (file.error) {
426
  alert(errorLoadingFile + ' :: ' + file.error);
427
  }
@@ -432,6 +434,8 @@ class FilemanagerView {
432
  jQuery("#uploaded_files ul").prepend(jQuery("<li class=uploaded_item>" + file.name + " (<?php echo 'Uploaded' ?>)" + "</li>"));
433
  }
434
  });
 
 
435
  }
436
  });
437
  jQuery(window).load(function () {
67
 
68
  var messageEnterDirName = "<?php echo 'Enter directory name'; ?>";
69
  var messageEnterNewName = "<?php echo 'Enter new name'; ?>";
70
+ var messageFilesUploadComplete = "<?php echo 'Processing uploaded files...'; ?>";
71
 
72
  var root = "<?php echo addslashes($this->controller->get_uploads_dir()); ?>";
73
  var dir = "<?php echo (isset($_REQUEST['dir']) ? addslashes(esc_html($_REQUEST['dir'])) : ''); ?>";
415
  jQuery("#uploader_progress_text").text(messageFilesUploadComplete);
416
  jQuery("#uploader_progress_text").addClass("uploader_text");
417
  });
418
+ jQuery("#opacity_div").show();
419
+ jQuery("#loading_div").show();
420
  }
421
  },
422
  stop: function (e, data) {
423
  onBtnBackClick();
424
  },
425
  done: function (e, data) {
426
+ jQuery.each(data.files, function (index, file) {
427
  if (file.error) {
428
  alert(errorLoadingFile + ' :: ' + file.error);
429
  }
434
  jQuery("#uploaded_files ul").prepend(jQuery("<li class=uploaded_item>" + file.name + " (<?php echo 'Uploaded' ?>)" + "</li>"));
435
  }
436
  });
437
+ jQuery("#opacity_div").hide();
438
+ jQuery("#loading_div").hide();
439
  }
440
  });
441
  jQuery(window).load(function () {
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.2.45
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -3205,7 +3205,7 @@ function bwg_activate() {
3205
  ));
3206
  }
3207
  $version = get_option("wd_bwg_version");
3208
- $new_version = '1.2.45';
3209
  if ($version && version_compare($version, $new_version, '<')) {
3210
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3211
  bwg_update($version);
@@ -3216,22 +3216,69 @@ function bwg_activate() {
3216
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
3217
  }
3218
  }
3219
- register_activation_hook(__FILE__, 'bwg_activate');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3220
 
3221
  /*there is no instagram provider for https*/
3222
  wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.instagram.com/oembed', true );
3223
 
3224
  function bwg_update_hook() {
3225
  $version = get_option("wd_bwg_version");
3226
- $new_version = '1.2.45';
3227
  if ($version && version_compare($version, $new_version, '<')) {
3228
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3229
  bwg_update($version);
3230
  update_option("wd_bwg_version", $new_version);
3231
  }
3232
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3233
  if (!isset($_GET['action']) || $_GET['action'] != 'deactivate') {
3234
- add_action('admin_init', 'bwg_update_hook');
3235
  }
3236
 
3237
  // Plugin styles.
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.2.46
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
3205
  ));
3206
  }
3207
  $version = get_option("wd_bwg_version");
3208
+ $new_version = '1.2.46';
3209
  if ($version && version_compare($version, $new_version, '<')) {
3210
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3211
  bwg_update($version);
3216
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
3217
  }
3218
  }
3219
+
3220
+ function bwg_global_activate($networkwide) {
3221
+ if (function_exists('is_multisite') && is_multisite()) {
3222
+ // Check if it is a network activation - if so, run the activation function for each blog id.
3223
+ if ($networkwide) {
3224
+ global $wpdb;
3225
+ $old_blog = $wpdb->blogid;
3226
+ // Get all blog ids.
3227
+ $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
3228
+ foreach ($blogids as $blog_id) {
3229
+ switch_to_blog($blog_id);
3230
+ bwg_activate();
3231
+ }
3232
+ switch_to_blog($old_blog);
3233
+ return;
3234
+ }
3235
+ }
3236
+ bwg_activate();
3237
+ }
3238
+ register_activation_hook(__FILE__, 'bwg_global_activate');
3239
+
3240
+ function bwg_new_blog_added($blog_id, $user_id, $domain, $path, $site_id, $meta ) {
3241
+ if (is_plugin_active_for_network('photo-gallery/photo-gallery.php')) {
3242
+ global $wpdb;
3243
+ $old_blog = $wpdb->blogid;
3244
+ switch_to_blog($blog_id);
3245
+ bwg_activate();
3246
+ switch_to_blog($old_blog);
3247
+ }
3248
+ }
3249
+ add_action('wpmu_new_blog', 'bwg_new_blog_added', 10, 6);
3250
 
3251
  /*there is no instagram provider for https*/
3252
  wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.instagram.com/oembed', true );
3253
 
3254
  function bwg_update_hook() {
3255
  $version = get_option("wd_bwg_version");
3256
+ $new_version = '1.2.46';
3257
  if ($version && version_compare($version, $new_version, '<')) {
3258
  require_once WD_BWG_DIR . "/update/bwg_update.php";
3259
  bwg_update($version);
3260
  update_option("wd_bwg_version", $new_version);
3261
  }
3262
  }
3263
+
3264
+ function bwg_global_update() {
3265
+ if (function_exists('is_multisite') && is_multisite()) {
3266
+ global $wpdb;
3267
+ $old_blog = $wpdb->blogid;
3268
+ // Get all blog ids.
3269
+ $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
3270
+ foreach ($blogids as $blog_id) {
3271
+ switch_to_blog($blog_id);
3272
+ bwg_update_hook();
3273
+ }
3274
+ switch_to_blog($old_blog);
3275
+ return;
3276
+ }
3277
+ bwg_update_hook();
3278
+ }
3279
+
3280
  if (!isset($_GET['action']) || $_GET['action'] != 'deactivate') {
3281
+ add_action('admin_init', 'bwg_global_update');
3282
  }
3283
 
3284
  // Plugin styles.
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos, instagram, mosaic
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.2.45
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -207,6 +207,9 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
207
 
208
  == Changelog ==
209
 
 
 
 
210
  = 1.2.45 =
211
  * Changed: Licensing page.
212
 
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos, instagram, mosaic
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.2.46
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
207
 
208
  == Changelog ==
209
 
210
+ = 1.2.46 =
211
+ * Changed: Activate, Deactivate hooks for multisite.
212
+
213
  = 1.2.45 =
214
  * Changed: Licensing page.
215