Image Photo Gallery Final Tiles Grid - Version 3.3.17

Version Description

  • [Fix] Fixed issues in admin panel
Download this release

Release Info

Developer GreenTreeLabs
Plugin Icon 128x128 Image Photo Gallery Final Tiles Grid
Version 3.3.17
Comparing to
See all releases

Code changes from version 3.3.16 to 3.3.17

FinalTilesGalleryLite.php CHANGED
@@ -5,15 +5,17 @@
5
  * Plugin URI: https://www.final-tiles-gallery.com
6
  * Description: Wordpress Plugin for creating responsive image galleries. By: GreenTreeLabs
7
  * Author: Green Tree Labs
8
- * Version: 3.3.16
9
  * Author URI: https://www.greentreelabs.net
10
  *
11
  * @fs_premium_only /lightbox-pro/
12
  *
13
  */
14
- define( 'FTGVERSION', '3.3.16' );
15
  /*
16
  Changelog:
 
 
17
  3.3.16
18
  Fixed plugin name
19
  3.3.15
5
  * Plugin URI: https://www.final-tiles-gallery.com
6
  * Description: Wordpress Plugin for creating responsive image galleries. By: GreenTreeLabs
7
  * Author: Green Tree Labs
8
+ * Version: 3.3.17
9
  * Author URI: https://www.greentreelabs.net
10
  *
11
  * @fs_premium_only /lightbox-pro/
12
  *
13
  */
14
+ define( 'FTGVERSION', '3.3.17' );
15
  /*
16
  Changelog:
17
+ 3.3.17
18
+ Fixed issues in admin panel
19
  3.3.16
20
  Fixed plugin name
21
  3.3.15
admin/include/edit-gallery.php CHANGED
@@ -688,10 +688,14 @@ _e( 'video tutorial', 'final-tiles-gallery' );
688
  _e( 'Add images', 'final-tiles-gallery' );
689
  ?>
690
  </a>
691
- <a href="#" class="open-add-video waves-effect waves-light btn action"><i class="mdi mdi-video"></i> <?php
 
 
692
  _e( 'Add video', 'final-tiles-gallery' );
693
  ?>
694
  </a>
 
 
695
  </div>
696
  <div class="row">
697
  <p class="tips"><?php
@@ -1283,21 +1287,8 @@ _e( 'Open in lightbox (when using a lightbox)', 'final-tiles-gallery' );
1283
  </select>
1284
  </div>
1285
  </div>
1286
- <div class="field">
1287
- <div class="text dark">
1288
- <label><?php
1289
- _e( 'Lightbox group (rel)', 'final-tiles-gallery' );
1290
- ?>
1291
- </label>
1292
- <input type="text" size="20" value="" name="group" />
1293
- <p class="info"><?php
1294
- _e( 'Used to group images with the following lightbox: Magnific Popup, PrettyPhoto, FancyBox, SwipeBox, Lightbox', 'final-tiles-gallery' );
1295
  ?>
1296
- </p>
1297
- </div>
1298
- </div>
1299
-
1300
- <div class="field filters clearfix"></div>
1301
  </div>
1302
  </div>
1303
  <div class="field buttons modal-footer">
688
  _e( 'Add images', 'final-tiles-gallery' );
689
  ?>
690
  </a>
691
+ <?php
692
+ ?>
693
+ <a onclick="alert('Upgrade to unlock')" href="#" class="waves-effect waves-light btn"><i class="mdi mdi-video"></i> <?php
694
  _e( 'Add video', 'final-tiles-gallery' );
695
  ?>
696
  </a>
697
+ <?php
698
+ ?>
699
  </div>
700
  <div class="row">
701
  <p class="tips"><?php
1287
  </select>
1288
  </div>
1289
  </div>
1290
+ <?php
 
 
 
 
 
 
 
 
1291
  ?>
 
 
 
 
 
1292
  </div>
1293
  </div>
1294
  <div class="field buttons modal-footer">
admin/include/fields.php CHANGED
@@ -1088,12 +1088,4 @@ $this->addField( 'Customizations', 'supportText', array(
1088
  'default' => 'powered by Final Tiles Grid Gallery',
1089
  'proCall' => false,
1090
  'excludeFrom' => array(),
1091
- ) );
1092
- $this->addField( 'Customizations', 'envatoReferral', array(
1093
- 'name' => 'Envato username for referral',
1094
- 'type' => 'text',
1095
- 'description' => 'Enter your Envato username to earn money! Receive 30% of the first purchase or deposit of each referred user. You do not need to activate anything else, you are automatically eligible.',
1096
- 'default' => 'GreenTreeLabs',
1097
- 'proCall' => false,
1098
- 'excludeFrom' => array(),
1099
  ) );
1088
  'default' => 'powered by Final Tiles Grid Gallery',
1089
  'proCall' => false,
1090
  'excludeFrom' => array(),
 
 
 
 
 
 
 
 
1091
  ) );
admin/scripts/final-tiles-gallery-admin.js CHANGED
@@ -148,48 +148,20 @@ var FTG = function($) {
148
  });
149
  },
150
  update_filters: function() {
151
- var ff = [];
152
- $(".gallery-filters .f").each(function() {
153
- var val = $.trim($(this).val());
154
- if (val.length > 0 && $.inArray(val, ff) < 0) {
155
- ff.push(val);
156
- }
157
- });
158
- $(".gallery-filters [name=ftg_filters]").val(ff.join('|'));
159
-
160
 
161
  },
162
  update_custom_isf: function() {
163
  var isf = [];
164
- $(".custom_isf tbody tr").each(function(i, o) {
165
- var res = $.trim($(o).find("input.res").val());
166
- var size = $.trim($(o).find("input.size").val());
167
 
168
- if (res && size) {
169
- isf.push(res + "," + size);
170
- }
171
- });
172
- $("[name=ftg_imageSizeFactorCustom]").val(isf.join("|"));
173
  },
174
  add_filter: function(value) {
175
- var defFilter = $('[name="filter_def"]').val();
176
- var checked = value == defFilter ? "checked" : "";
177
- if (!value)
178
- value = "";
179
-
180
- var row = $("<p style='display:none'><a class='btn-floating waves-effect red' href='#'><i class='fa fa-times'></i></a> <input class='f' type='text' /> <input type='radio' " + checked + " name='ftg_filterDef' value='" + value + "'> Selected</p>");
181
- if (value)
182
- row.find(".f").val(value);
183
-
184
- $(".filters .text").append(row);
185
- row.slideDown();
186
- row.find("a").click(function(e) {
187
- e.preventDefault();
188
- row.slideUp(function() {
189
- $(this).remove();
190
- });
191
- FTG.update_filters();
192
- });
193
  },
194
  add_isf: function(value) {
195
  var $item = $("<tr><td class='del'></td><td></td><td></td></tr>");
@@ -212,83 +184,19 @@ var FTG = function($) {
212
 
213
  var source = $('[name=ftg_source').val();
214
 
215
- var ff = $(".filters [name=ftg_filters]").val().split('|');
216
-
217
- if (ff.length == 0 || ff[0] == "") {
218
- FTG.add_filter();
219
- } else {
220
- for (var i = 0; i < ff.length; i++) {
221
- if (ff[i].length > 0)
222
- FTG.add_filter(ff[i]);
223
- }
224
- }
225
-
226
- var isf = $("[name=ftg_imageSizeFactorCustom]").val().split('|');
227
 
228
- for (var i = 0; i < isf.length; i++) {
229
- if (isf[i].length)
230
- FTG.add_isf(isf[i]);
231
- }
232
  },
233
  refresh_woocommerce: function() {
234
- FTG.show_loading();
235
- var data = {
236
- action: 'refresh_gallery',
237
- source: 'woocommerce',
238
- FinalTiles_gallery: $('#FinalTiles_gallery').val()
239
- };
240
- data.woo_categories = $("[name=woo_cat]:checked").map(function() {
241
- return this.value;
242
- }).get().join();
243
 
244
- $.ajax({
245
- url: ajaxurl,
246
- type: 'post',
247
- data: data,
248
- error: function(a, b, c) {
249
- console.log(a, b, c);
250
- FTG.hide_loading();
251
- },
252
- success: function(html) {
253
- $("#image-list").empty().append(html)
254
- FTG.hide_loading();
255
- }
256
- });
257
  },
258
  refresh_posts: function() {
259
- FTG.show_loading();
260
- var data = {
261
- action: 'refresh_gallery',
262
- source: 'posts',
263
- FinalTiles_gallery: $('#FinalTiles_gallery').val()
264
- };
265
- data.post_categories = $("[name=post_categories]:checked").map(function() {
266
- return this.value;
267
- }).get().join();
268
-
269
- data.post_types = $("[name=post_types]:checked").map(function() {
270
- return this.value;
271
- }).get().join();
272
-
273
- data.post_tags = $("[name=post_tags]:checked").map(function() {
274
- return this.value;
275
- }).get().join();
276
 
277
- data.ftg_max_posts = $("[name=ftg_max_posts]").val();
278
-
279
- $.ajax({
280
- url: ajaxurl,
281
- data: data,
282
- type: "post",
283
- error: function(a, b, c) {
284
- console.log(a, b, c);
285
- FTG.hide_loading();
286
- },
287
- success: function(html) {
288
- $("#image-list").empty().append(html)
289
- FTG.hide_loading();
290
- }
291
- });
292
  },
293
  save_gallery: function() {
294
  // !gallery save
@@ -596,14 +504,9 @@ var FTG = function($) {
596
  e.preventDefault();
597
  FTG.save_gallery();
598
  });
599
- $(".filters a").click(function(e) {
600
- e.preventDefault();
601
- FTG.add_filter();
602
- });
603
- $(".custom_isf a").click(function(e) {
604
- e.preventDefault();
605
- FTG.add_isf();
606
- });
607
  $("#image-list").on("click", ".item .thumb", function() {
608
  $(this).parents(".item").toggleClass("selected");
609
  $(this).parents(".item").find(".checkbox").toggleClass("checked");
@@ -677,28 +580,9 @@ var FTG = function($) {
677
  else
678
  $(".js-no-hidden").show();
679
 
680
- if (source == 'posts') {
681
- panel.find("[name=link], textarea").hide();
682
- }
683
-
684
- var selFilters = $item.find("[name=filters]").val().split('|');
685
- var filters = $("[name=ftg_filters]").val().split('|');
686
-
687
- $(".filters", panel).empty();
688
- for (var i = 0; i < filters.length; i++) {
689
- if ($.trim(filters[i]).length > 0) {
690
- var ft = $("<input type='checkbox' />");
691
- ft.val($.trim(filters[i]));
692
- ft.attr("id", "imgft" + i);
693
- $(".filters", panel).append(ft);
694
-
695
- ft.after("<label for='imgft" + i + "'>" + $.trim(filters[i]) + "</label>");
696
 
697
- if ($.inArray(filters[i], selFilters) > -1)
698
- ft.attr("checked", "checked");
699
-
700
- }
701
- }
702
 
703
  var link = $item.find("[name=link]").val();
704
 
@@ -1046,70 +930,10 @@ var FTG = function($) {
1046
  var code = $(this).data("code");
1047
  $("#shortcode-" + code).toggleClass("visible");
1048
  });
1049
- $("body").on("click", "#video-panel-model a", function(e) {
1050
- e.preventDefault();
1051
- var filters = [];
1052
- $('.video-filters input[type=checkbox]:checked').each(function() {
1053
- filters.push($(this).val());
1054
- })
1055
- filters = filters.join('|');
1056
- switch ($(this).data("action")) {
1057
- case "edit":
1058
- // !video save
1059
- var $panel = $("#video-panel-model");
1060
- var data = {
1061
- action: 'save_video',
1062
- embed: $("textarea", $panel).val(),
1063
- galleryId: $("#gallery-id").val(),
1064
- FinalTiles_gallery: $('#FinalTiles_gallery').val()
1065
- };
1066
-
1067
- FTG.show_loading();
1068
-
1069
- $("input[type=hidden]", $panel).each(function() {
1070
- if ($(this).attr("name"))
1071
- data[$(this).attr("name")] = $(this).val();
1072
- });
1073
-
1074
- data['filters'] = filters;
1075
- console.log(data);
1076
-
1077
- data['step'] = $('#video-panel-action').val();
1078
-
1079
- $.ajax({
1080
- url: ajaxurl,
1081
- data: data,
1082
- dataType: "json",
1083
- type: "post",
1084
- error: function(a, b, c) {
1085
- console.log(a, b, c);
1086
- FTG.hide_loading();
1087
- alert("error adding images");
1088
- },
1089
- success: function(r) {
1090
- if (r.success) {
1091
- FTG.hide_loading();
1092
- FTG.load_images();
1093
- }
1094
- }
1095
- });
1096
- break;
1097
- }
1098
- });
1099
- $(".open-add-video").on("click", function(e) {
1100
- e.preventDefault();
1101
- $('#video-panel-action').val('add');
1102
- $(".save", $panel).text("Save");
1103
- $("#video-panel-model textarea").val("");
1104
- var $panel = $("#video-panel-model"); //.clone().attr("id", "video-panel");
1105
-
1106
- if ($('#video-panel-action').val('add')) {
1107
- $('.video-filters', $panel).empty();
1108
- }
1109
 
1110
- $panel.show().openModal();
 
1111
 
1112
- });
1113
 
1114
  $(".open-media-panel").on("click", function(e) {
1115
  e.preventDefault();
148
  });
149
  },
150
  update_filters: function() {
151
+
152
+ /* Premium Code Stripped by Freemius */
 
 
 
 
 
 
 
153
 
154
  },
155
  update_custom_isf: function() {
156
  var isf = [];
157
+
158
+ /* Premium Code Stripped by Freemius */
 
159
 
 
 
 
 
 
160
  },
161
  add_filter: function(value) {
162
+
163
+ /* Premium Code Stripped by Freemius */
164
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  },
166
  add_isf: function(value) {
167
  var $item = $("<tr><td class='del'></td><td></td><td></td></tr>");
184
 
185
  var source = $('[name=ftg_source').val();
186
 
187
+
188
+ /* Premium Code Stripped by Freemius */
 
 
 
 
 
 
 
 
 
 
189
 
 
 
 
 
190
  },
191
  refresh_woocommerce: function() {
192
+
193
+ /* Premium Code Stripped by Freemius */
 
 
 
 
 
 
 
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  },
196
  refresh_posts: function() {
197
+
198
+ /* Premium Code Stripped by Freemius */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  },
201
  save_gallery: function() {
202
  // !gallery save
504
  e.preventDefault();
505
  FTG.save_gallery();
506
  });
507
+
508
+ /* Premium Code Stripped by Freemius */
509
+
 
 
 
 
 
510
  $("#image-list").on("click", ".item .thumb", function() {
511
  $(this).parents(".item").toggleClass("selected");
512
  $(this).parents(".item").find(".checkbox").toggleClass("checked");
580
  else
581
  $(".js-no-hidden").show();
582
 
583
+
584
+ /* Premium Code Stripped by Freemius */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
 
 
 
 
 
 
586
 
587
  var link = $item.find("[name=link]").val();
588
 
930
  var code = $(this).data("code");
931
  $("#shortcode-" + code).toggleClass("visible");
932
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
933
 
934
+
935
+ /* Premium Code Stripped by Freemius */
936
 
 
937
 
938
  $(".open-media-panel").on("click", function(e) {
939
  e.preventDefault();
lib/gallery-class.php CHANGED
@@ -508,7 +508,7 @@ if (!class_exists("FinalTilesGallery"))
508
 
509
  if($gallery->support == 'T')
510
  {
511
- $html .= "<div class='support-text'><a target='_blank' href='http://codecanyon.net/item/final-tiles-grid-gallery-for-wordpress/5189351?ref=".$gallery->envatoReferral."'>".$gallery->supportText."</a></div>";
512
  }
513
  $html .= "</div>\n";
514
 
508
 
509
  if($gallery->support == 'T')
510
  {
511
+ $html .= "<div class='support-text'><a target='_blank' href='https://www.final-tiles-gallery.com/wordpress'>".$gallery->supportText."</a></div>";
512
  }
513
  $html .= "</div>\n";
514
 
readme.txt CHANGED
@@ -135,6 +135,9 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
135
 
136
  == Changelog ==
137
 
 
 
 
138
  = 3.3.16 =
139
  * [Fix] Fixed plugin name
140
 
135
 
136
  == Changelog ==
137
 
138
+ = 3.3.17 =
139
+ * [Fix] Fixed issues in admin panel
140
+
141
  = 3.3.16 =
142
  * [Fix] Fixed plugin name
143