Photo Gallery by WD – Responsive Photo Gallery - Version 1.3.1

Version Description

Fixed: Switching between blogs.

Download this release

Release Info

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

Code changes from version 1.3.0 to 1.3.1

admin/views/BWGViewAlbums_bwg.php CHANGED
@@ -79,7 +79,7 @@ class BWGViewAlbums_bwg {
79
  ?>
80
  </select>
81
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php echo __("Apply","bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action', 'album_page')) {return false;}" value="<?php echo __("Apply","bwg_back"); ?>" />
82
- <?php WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page,''); ?>
83
  </div>
84
  <table class="wp-list-table widefat fixed pages">
85
  <thead>
@@ -186,7 +186,7 @@ class BWGViewAlbums_bwg {
186
  </table>
187
  <div class="tablenav bottom">
188
  <?php
189
- WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page,'');
190
  ?>
191
  </div>
192
  <input id="task" name="task" type="hidden" value="" />
79
  ?>
80
  </select>
81
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php echo __("Apply","bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action', 'album_page')) {return false;}" value="<?php echo __("Apply","bwg_back"); ?>" />
82
+ <?php WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page); ?>
83
  </div>
84
  <table class="wp-list-table widefat fixed pages">
85
  <thead>
186
  </table>
187
  <div class="tablenav bottom">
188
  <?php
189
+ WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
190
  ?>
191
  </div>
192
  <input id="task" name="task" type="hidden" value="" />
admin/views/BWGViewGalleries_bwg.php CHANGED
@@ -79,7 +79,7 @@ class BWGViewGalleries_bwg {
79
  ?>
80
  </select>
81
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php echo __("Apply","bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action', 'gallery_page')) {return false;}" value="<?php echo __("Apply","bwg_back"); ?>" />
82
- <?php WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page,''); ?>
83
  </div>
84
  <table class="wp-list-table widefat fixed pages">
85
  <thead>
@@ -200,7 +200,7 @@ class BWGViewGalleries_bwg {
200
  </table>
201
  <div class="tablenav bottom">
202
  <?php
203
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page,'');
204
  ?>
205
  </div>
206
  <input id="task" name="task" type="hidden" value="" />
79
  ?>
80
  </select>
81
  <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php echo __("Apply","bwg_back"); ?>" onclick="if (!bwg_bulk_actions('.bulk_action', 'gallery_page')) {return false;}" value="<?php echo __("Apply","bwg_back"); ?>" />
82
+ <?php WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page); ?>
83
  </div>
84
  <table class="wp-list-table widefat fixed pages">
85
  <thead>
200
  </table>
201
  <div class="tablenav bottom">
202
  <?php
203
+ WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'galleries_form', $per_page);
204
  ?>
205
  </div>
206
  <input id="task" name="task" type="hidden" value="" />
admin/views/BWGViewTags_bwg.php CHANGED
@@ -65,7 +65,7 @@ class BWGViewTags_bwg {
65
  <div class="tablenav top">
66
  <?php
67
  WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'tags_form', 'position_search');
68
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page,'position_pag');
69
  ?>
70
  </div>
71
  <table class="wp-list-table widefat fixed pages">
@@ -173,7 +173,7 @@ class BWGViewTags_bwg {
173
  </table>
174
  <div class="tablenav bottom">
175
  <?php
176
- WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page,'');
177
  ?>
178
  </div>
179
  <input id="task" name="task" type="hidden" value="" />
65
  <div class="tablenav top">
66
  <?php
67
  WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'tags_form', 'position_search');
68
+ WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
69
  ?>
70
  </div>
71
  <table class="wp-list-table widefat fixed pages">
173
  </table>
174
  <div class="tablenav bottom">
175
  <?php
176
+ WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
177
  ?>
178
  </div>
179
  <input id="task" name="task" type="hidden" value="" />
css/bwg_tables.css CHANGED
@@ -858,7 +858,8 @@ a.wd-btn-primary:hover, a.wd-btn-primary:active, a.wd-btn-primary:link{
858
  display:inline-block;
859
  width:97%;
860
  }
861
- input{
 
862
  height:30px;
863
  }
864
 
@@ -866,17 +867,24 @@ th.sortable a span,
866
  th.sorted a span {
867
  float: left;
868
  }
 
869
  #show_order_button {
870
  display:inline-block;
871
  margin: 5px auto;
872
  padding: 0;
873
  background-size: initial;
874
  }
 
875
  #current_page {
876
- width:35px !important;
877
- height:28px !important;
878
- padding-top:2px;
879
  }
 
880
  .publish_icon {
881
  padding-top:11px !important;
 
 
 
 
882
  }
858
  display:inline-block;
859
  width:97%;
860
  }
861
+
862
+ input {
863
  height:30px;
864
  }
865
 
867
  th.sorted a span {
868
  float: left;
869
  }
870
+
871
  #show_order_button {
872
  display:inline-block;
873
  margin: 5px auto;
874
  padding: 0;
875
  background-size: initial;
876
  }
877
+
878
  #current_page {
879
+ width:35px !important;
880
+ height:28px !important;
881
+ padding-top:2px;
882
  }
883
+
884
  .publish_icon {
885
  padding-top:11px !important;
886
+ }
887
+
888
+ .displaying-num {
889
+ line-height: 28px;
890
  }
framework/WDWLibrary.php CHANGED
@@ -238,7 +238,7 @@ class WDWLibrary {
238
  <?php
239
  }
240
 
241
- public static function html_page_nav($count_items, $pager, $page_number, $form_id, $items_per_page = 20, $position_pag) {
242
  $limit = $items_per_page;
243
  if ($count_items) {
244
  if ($count_items % $limit) {
@@ -250,12 +250,6 @@ class WDWLibrary {
250
  }
251
  else {
252
  $items_county = 1;
253
- }
254
- if($count_items > $items_per_page){
255
- $margin_top = 0;
256
- }
257
- else {
258
- $margin_top = 12;
259
  }
260
  if (!$pager) {
261
  ?>
@@ -306,7 +300,7 @@ class WDWLibrary {
306
  </script>
307
  <?php } ?>
308
 
309
- <div class="alignright tablenav-pages" style="<?php if($position_pag == '' || $count_items <= $items_per_page) {echo 'margin-top:'.$margin_top.'px';} ?>">
310
  <span class="displaying-num">
311
  <?php
312
  if ($count_items != 0) {
238
  <?php
239
  }
240
 
241
+ public static function html_page_nav($count_items, $pager, $page_number, $form_id, $items_per_page = 20) {
242
  $limit = $items_per_page;
243
  if ($count_items) {
244
  if ($count_items % $limit) {
250
  }
251
  else {
252
  $items_county = 1;
 
 
 
 
 
 
253
  }
254
  if (!$pager) {
255
  ?>
300
  </script>
301
  <?php } ?>
302
 
303
+ <div class="alignright tablenav-pages">
304
  <span class="displaying-num">
305
  <?php
306
  if ($count_items != 0) {
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.3.0
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -1923,7 +1923,7 @@ function bwg_activate() {
1923
  ));
1924
  }
1925
  $version = WD_BWG_VERSION;
1926
- $new_version = '1.3.0';
1927
  if ($version && version_compare($version, $new_version, '<')) {
1928
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1929
  bwg_update($version);
@@ -1946,14 +1946,13 @@ function bwg_global_activate($networkwide) {
1946
  // Check if it is a network activation - if so, run the activation function for each blog id.
1947
  if ($networkwide) {
1948
  global $wpdb;
1949
- $old_blog = $wpdb->blogid;
1950
  // Get all blog ids.
1951
  $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
1952
  foreach ($blogids as $blog_id) {
1953
  switch_to_blog($blog_id);
1954
  bwg_activate();
 
1955
  }
1956
- switch_to_blog($old_blog);
1957
  return;
1958
  }
1959
  }
@@ -1964,10 +1963,9 @@ register_activation_hook(__FILE__, 'bwg_global_activate');
1964
  function bwg_new_blog_added($blog_id, $user_id, $domain, $path, $site_id, $meta ) {
1965
  if (is_plugin_active_for_network('photo-gallery/photo-gallery.php')) {
1966
  global $wpdb;
1967
- $old_blog = $wpdb->blogid;
1968
  switch_to_blog($blog_id);
1969
  bwg_activate();
1970
- switch_to_blog($old_blog);
1971
  }
1972
  }
1973
  add_action('wpmu_new_blog', 'bwg_new_blog_added', 10, 6);
@@ -1977,7 +1975,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
1977
 
1978
  function bwg_update_hook() {
1979
  $version = WD_BWG_VERSION;
1980
- $new_version = '1.3.0';
1981
  if ($version && version_compare($version, $new_version, '<')) {
1982
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1983
  bwg_update($version);
@@ -1988,14 +1986,13 @@ function bwg_update_hook() {
1988
  function bwg_global_update() {
1989
  if (function_exists('is_multisite') && is_multisite()) {
1990
  global $wpdb;
1991
- $old_blog = $wpdb->blogid;
1992
  // Get all blog ids.
1993
  $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
1994
  foreach ($blogids as $blog_id) {
1995
  switch_to_blog($blog_id);
1996
  bwg_update_hook();
 
1997
  }
1998
- switch_to_blog($old_blog);
1999
  return;
2000
  }
2001
  bwg_update_hook();
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.3.1
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
1923
  ));
1924
  }
1925
  $version = WD_BWG_VERSION;
1926
+ $new_version = '1.3.1';
1927
  if ($version && version_compare($version, $new_version, '<')) {
1928
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1929
  bwg_update($version);
1946
  // Check if it is a network activation - if so, run the activation function for each blog id.
1947
  if ($networkwide) {
1948
  global $wpdb;
 
1949
  // Get all blog ids.
1950
  $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
1951
  foreach ($blogids as $blog_id) {
1952
  switch_to_blog($blog_id);
1953
  bwg_activate();
1954
+ restore_current_blog();
1955
  }
 
1956
  return;
1957
  }
1958
  }
1963
  function bwg_new_blog_added($blog_id, $user_id, $domain, $path, $site_id, $meta ) {
1964
  if (is_plugin_active_for_network('photo-gallery/photo-gallery.php')) {
1965
  global $wpdb;
 
1966
  switch_to_blog($blog_id);
1967
  bwg_activate();
1968
+ restore_current_blog();
1969
  }
1970
  }
1971
  add_action('wpmu_new_blog', 'bwg_new_blog_added', 10, 6);
1975
 
1976
  function bwg_update_hook() {
1977
  $version = WD_BWG_VERSION;
1978
+ $new_version = '1.3.1';
1979
  if ($version && version_compare($version, $new_version, '<')) {
1980
  require_once WD_BWG_DIR . "/update/bwg_update.php";
1981
  bwg_update($version);
1986
  function bwg_global_update() {
1987
  if (function_exists('is_multisite') && is_multisite()) {
1988
  global $wpdb;
 
1989
  // Get all blog ids.
1990
  $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
1991
  foreach ($blogids as $blog_id) {
1992
  switch_to_blog($blog_id);
1993
  bwg_update_hook();
1994
+ restore_current_blog();
1995
  }
 
1996
  return;
1997
  }
1998
  bwg_update_hook();
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, 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, facebook, mosaic, facebook integration, instagram feed, Flickr, Dailymotion, widget, youtube gallery, ecommerce
5
  Requires at least: 3.4
6
  Tested up to: 4.5
7
- Stable tag: 1.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -225,6 +225,9 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
225
 
226
  == Changelog ==
227
 
 
 
 
228
  = 1.3.0 =
229
  * Changed: Backend design.
230
  * Fixed: Random order album for widget.
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, 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, facebook, mosaic, facebook integration, instagram feed, Flickr, Dailymotion, widget, youtube gallery, ecommerce
5
  Requires at least: 3.4
6
  Tested up to: 4.5
7
+ Stable tag: 1.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
225
 
226
  == Changelog ==
227
 
228
+ = 1.3.1 =
229
+ Fixed: Switching between blogs.
230
+
231
  = 1.3.0 =
232
  * Changed: Backend design.
233
  * Fixed: Random order album for widget.