Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.49

Version Description

  • Added: Call photo gallery by php function.
Download this release

Release Info

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

Code changes from version 1.2.48 to 1.2.49

admin/views/BWGViewBWGShortcode.php CHANGED
@@ -1002,10 +1002,12 @@ class BWGViewBWGShortcode {
1002
  }
1003
  else {
1004
  $tagtext = '';
 
1005
  if (isset($_POST['currrent_id'])) {
1006
  $currrent_id = stripslashes($_POST['currrent_id']);
1007
  $title = ((isset($_POST['title'])) ? stripslashes($_POST['title']) : '');
1008
  $tagtext = '[Best_Wordpress_Gallery id="' . $currrent_id . '"' . $title . ']';
 
1009
  }
1010
  ?>
1011
  <hr style="float: left; width: 100%;" />
@@ -1013,7 +1015,14 @@ class BWGViewBWGShortcode {
1013
  <a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="display: table; margin-bottom: 5px;" href="https://web-dorado.com/files/fromPhotoGallery.php">Please see Pro <span id="bwg_pro_version">Thumbnail</span> View</a>
1014
  <input type="button" class="button-primary" id="insert" name="insert" value="Generate" onclick="bwg_insert_shortcode('');" />
1015
  <input type="button" class="button-secondary" id="import" name="import" value="Import" onclick="bwg_update_shortcode()" />
1016
- <textarea style="width: 100%; resize: vertical; margin-top: 5px;" id="bwg_shortcode" rows="2" onkeydown="bwg_onKeyDown(event)"><?php echo $tagtext; ?></textarea>
 
 
 
 
 
 
 
1017
  </span>
1018
  </div>
1019
  <?php
1002
  }
1003
  else {
1004
  $tagtext = '';
1005
+ $tagfunction = '';
1006
  if (isset($_POST['currrent_id'])) {
1007
  $currrent_id = stripslashes($_POST['currrent_id']);
1008
  $title = ((isset($_POST['title'])) ? stripslashes($_POST['title']) : '');
1009
  $tagtext = '[Best_Wordpress_Gallery id="' . $currrent_id . '"' . $title . ']';
1010
+ $tagfunction = "<?php echo photo_gallery(" . $currrent_id . "); ?>";
1011
  }
1012
  ?>
1013
  <hr style="float: left; width: 100%;" />
1015
  <a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="display: table; margin-bottom: 5px;" href="https://web-dorado.com/files/fromPhotoGallery.php">Please see Pro <span id="bwg_pro_version">Thumbnail</span> View</a>
1016
  <input type="button" class="button-primary" id="insert" name="insert" value="Generate" onclick="bwg_insert_shortcode('');" />
1017
  <input type="button" class="button-secondary" id="import" name="import" value="Import" onclick="bwg_update_shortcode()" />
1018
+ <div>
1019
+ <input type="text" size="55" id="bwg_shortcode" name="bwg_shortcode" value='<?php echo $tagtext; ?>' onclick="bwg_onKeyDown(event)" />
1020
+ <b>Shortcode</b>
1021
+ </div>
1022
+ <div>
1023
+ <input type="text" size="55" id="bwg_function" name="bwg_function" value="<?php echo $tagfunction; ?>" onclick="spider_select_value(this)" readonly="readonly" />
1024
+ <b>PHP function</b>
1025
+ </div>
1026
  </span>
1027
  </div>
1028
  <?php
css/bwg_shortcode.css CHANGED
@@ -67,3 +67,8 @@
67
  border: 1px solid #CCCCCC;
68
  margin: 2px;
69
  }
 
 
 
 
 
67
  border: 1px solid #CCCCCC;
68
  margin: 2px;
69
  }
70
+
71
+ #bwg_function,
72
+ #bwg_shortcode {
73
+ margin: 10px 0 0;
74
+ }
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -2226,7 +2226,7 @@ class BWGViewGalleryBox {
2226
  }
2227
 
2228
  function bwg_resize_instagram_post(){
2229
- jQuery('.bwg_embed_frame').css({'width':'inherit', 'height':'inherit', 'vertical-align':'middle', 'display':'table-cell'});
2230
  /*jQuery.fn.exists = function(){return this.length>0;}*/
2231
  if (jQuery('.inner_instagram_iframe_bwg_embed_frame').length) {
2232
  var w = jQuery(".bwg_popup_embed").width();
2226
  }
2227
 
2228
  function bwg_resize_instagram_post(){
2229
+ jQuery('.bwg_embed_frame').css({'width':'inherit', 'height':'inherit', 'vertical-align':'middle', 'display':'inline-block'});
2230
  /*jQuery.fn.exists = function(){return this.length>0;}*/
2231
  if (jQuery('.inner_instagram_iframe_bwg_embed_frame').length) {
2232
  var w = jQuery(".bwg_popup_embed").width();
js/bwg_shortcode.js CHANGED
@@ -645,3 +645,8 @@ function bwg_onKeyDown(e) {
645
  }
646
  }
647
  }
 
 
 
 
 
645
  }
646
  }
647
  }
648
+
649
+ function spider_select_value(obj) {
650
+ obj.focus();
651
+ obj.select();
652
+ }
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.48
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -273,6 +273,10 @@ function bwg_create_taxonomy() {
273
  }
274
  add_action('init', 'bwg_create_taxonomy', 0);
275
 
 
 
 
 
276
  function bwg_shortcode($params) {
277
  if (isset($params['id'])) {
278
  global $wpdb;
@@ -585,7 +589,7 @@ function bwg_activate() {
585
  $bwg_image = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_image` (
586
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
587
  `gallery_id` bigint(20) NOT NULL,
588
- `slug` varchar(255) NOT NULL,
589
  `filename` varchar(255) NOT NULL,
590
  `image_url` mediumtext NOT NULL,
591
  `thumb_url` mediumtext NOT NULL,
@@ -2302,7 +2306,7 @@ function bwg_activate() {
2302
  ));
2303
  }
2304
  $version = get_option("wd_bwg_version");
2305
- $new_version = '1.2.48';
2306
  if ($version && version_compare($version, $new_version, '<')) {
2307
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2308
  bwg_update($version);
@@ -2350,7 +2354,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
2350
 
2351
  function bwg_update_hook() {
2352
  $version = get_option("wd_bwg_version");
2353
- $new_version = '1.2.48';
2354
  if ($version && version_compare($version, $new_version, '<')) {
2355
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2356
  bwg_update($version);
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.49
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
273
  }
274
  add_action('init', 'bwg_create_taxonomy', 0);
275
 
276
+ function photo_gallery($id) {
277
+ echo bwg_shortcode(array('id' => $id));
278
+ }
279
+
280
  function bwg_shortcode($params) {
281
  if (isset($params['id'])) {
282
  global $wpdb;
589
  $bwg_image = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "bwg_image` (
590
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
591
  `gallery_id` bigint(20) NOT NULL,
592
+ `slug` longtext NOT NULL,
593
  `filename` varchar(255) NOT NULL,
594
  `image_url` mediumtext NOT NULL,
595
  `thumb_url` mediumtext NOT NULL,
2306
  ));
2307
  }
2308
  $version = get_option("wd_bwg_version");
2309
+ $new_version = '1.2.49';
2310
  if ($version && version_compare($version, $new_version, '<')) {
2311
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2312
  bwg_update($version);
2354
 
2355
  function bwg_update_hook() {
2356
  $version = get_option("wd_bwg_version");
2357
+ $new_version = '1.2.49';
2358
  if ($version && version_compare($version, $new_version, '<')) {
2359
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2360
  bwg_update($version);
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.48
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.48 =
211
  * Fixed: Back to previous album/gallery.
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.49
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.49 =
211
+ * Added: Call photo gallery by php function.
212
+
213
  = 1.2.48 =
214
  * Fixed: Back to previous album/gallery.
215
 
update/bwg_update.php CHANGED
@@ -302,10 +302,12 @@ function bwg_update($version) {
302
  if (version_compare($version, '1.2.45') == -1) {
303
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `permissions` varchar(20) NOT NULL DEFAULT 'manage_options'");
304
  }
305
-
306
  if (version_compare($version, '1.2.47') == -1) {
307
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `mosaic_thumb_transition` tinyint(1) NOT NULL DEFAULT 1");
308
  }
 
 
 
309
  return;
310
  }
311
 
302
  if (version_compare($version, '1.2.45') == -1) {
303
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_option ADD `permissions` varchar(20) NOT NULL DEFAULT 'manage_options'");
304
  }
 
305
  if (version_compare($version, '1.2.47') == -1) {
306
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_theme ADD `mosaic_thumb_transition` tinyint(1) NOT NULL DEFAULT 1");
307
  }
308
+ if (version_compare($version, '1.2.48') == -1) {
309
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "bwg_image CHANGE `slug` `slug` longtext NOT NULL");
310
+ }
311
  return;
312
  }
313