Image Photo Gallery Final Tiles Grid - Version 3.3.24

Version Description

Download this release

Release Info

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

Code changes from version 3.3.22 to 3.3.24

FinalTilesGalleryLite.php CHANGED
@@ -1,250 +1,254 @@
1
  <?php
2
 
3
- /**
4
- * Plugin Name: Final Tiles Grid Gallery - Image Gallery
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.22
9
- * Author URI: https://www.greentreelabs.net
10
- *
11
- * @fs_premium_only /lightbox-pro/
12
- *
13
  */
14
- define( 'FTGVERSION', '3.3.22' );
15
- /*
16
- Changelog:
17
- 3.3.22
18
- Added "ask for review" functionality
19
- 3.3.21
20
- Fixed disabled hover rotation field
21
- 3.3.20
22
- Fixed disabled caption behaviour field
23
- 3.3.19
24
- Fixed ignored caption font size
25
- 3.3.18
26
- Fixed issue with iconv function
27
- 3.3.17
28
- Fixed issues in admin panel
29
- 3.3.16
30
- Fixed plugin name
31
- 3.3.15
32
- Fixed minor issue
33
- 3.3.14
34
- Fixed bug
35
- 3.3.13
36
- Fixed menu slug
37
- 3.3.12
38
- Lite version code merged with premium
39
- 3.3.10
40
- Bug fix (wrong behaviour on mobile with columns layout)
41
- 3.3.9
42
- Extended support for PHP versions
43
- 3.3.8
44
- Bug fix (Woocommerce categories were ignored)
45
- 3.3.7
46
- Bug fix (Youtube videos not showing in lightboxes)
47
- 3.3.6
48
- Bug fix (Vimeo videos not showing in lightboxes)
49
- 3.3.5
50
- Enhanced compatibility with EverlightBox
51
- 3.3.4
52
- Bug fix (woocommerce 3.1.x galleries not working)
53
- Admin UI minor fixes
54
- 3.3.3
55
- Bug fix (wrong behaviour of captions on mobile devices)
56
- 3.3.2
57
- Bug fix (videos not using the masonry layout)
58
- 3.3.1
59
- Bug fix (videos not visible)
60
- 3.3.0
61
- Use gallery options inside shortcode
62
- Enhanced backend UI
63
- Added new caption behaviours
64
- Fix FitVid conflicts
65
- Added Hover effects and Image loaded effects presets
66
- Added hover effect duration
67
- Added new feature: disable grid size below given screen width
68
- Added title and description to LightGallery
69
- 3.2.9
70
- Added support for EverlightBox
71
- Renamed get_image_sizes function to avoid conflicts
72
- 3.2.8
73
- Minor Bug fix
74
- 3.2.7
75
- Minor Bug fix
76
- 3.2.6
77
- Bug fix
78
- New feature: choose image size for lightbox
79
- 3.2.5
80
- SwipeBox now supports filters
81
- Download the full size from LighGallery
82
- Ajax loading (beta)
83
- 3.2.4
84
- Bug fix
85
- 3.2.3
86
- Bug fix
87
- 3.2.2
88
- Bug fix
89
- 3.2.1
90
- Bug fix
91
- 3.2.0
92
- Lightbox groups
93
- Hidden images
94
- 3.1.32
95
- Added date filter to media panel
96
- Added support to Enhanced Media Panel
97
- Lazy loading with multiple image loading
98
- Pre-selected filter
99
- 3.1.31
100
- Enhanced compatibility with other plugins and themes by adding data-class attribute on images
101
- 3.1.30
102
- Fixed jQuery issue
103
- 3.1.29
104
- Minor bug fix
105
- 3.1.28
106
- Bug fix
107
- 3.1.27
108
- Alt tag
109
- 3.1.26
110
- Bug fix
111
- 3.1.25
112
- Bug fix
113
- 3.1.24
114
- Bug fix
115
- 3.1.23
116
- Fixed bug occuring with Lazy load + Filters
117
- 3.1.22
118
- Lazy load
119
- 3.1.21
120
- New layout Masonry
121
- 3.1.20
122
- Max number of posts for "Recent posts" galleries
123
- 3.1.19
124
- Open videos in lightbox
125
- 3.1.18
126
- Admin panel enhancements
127
- Fixed issue about Magnific Popup being loaded even when not needed
128
- 3.1.17
129
- New lightbox added: Lightgallery
130
- Fixed minor bug in Custom CSS (removed slashes)
131
- 3.1.16
132
- Fixed bug in 'Recent posts' galleries, now it's possible to link posts
133
- 3.1.15
134
- Added new lightbox: LightGallery
135
- 3.1.14
136
- Import/Export features, Set title font size, select images by filter (backend), choose mobile lightbox
137
- 3.1.13
138
- Fixed issue with some lightboxes on pages with more than one gallery
139
- 3.1.12
140
- Solved conflicts with FitVids
141
- 3.1.11
142
- [Backend] edit gallery by clicking the tile
143
- 3.1.10
144
- Bug fix
145
- 3.1.9
146
- Load gallery with a selected filter, choose to reload page after clicking a filter,
147
- choose gallery from text editor, load scripts from footer for enhanced page load
148
- 3.1.8
149
- Updated material design fonts
150
- 3.1.7
151
- Fix grid size 0
152
- 3.1.6
153
- Minor bug fix
154
- 3.1.5
155
- Image loaded effects
156
- 3.1.4
157
- Bug fix
158
- 3.1.3
159
- Set a custom label for "All" filter, Choose size of images in admin panel, Loading bar color, Loading bar background color, Caption font size, Sequential image loading
160
- 3.1.2
161
- PrettyPhoto security fix
162
- 3.1.1
163
- Minor bug fix
164
- 3.1.0
165
- New Backoffice
166
- Wizard
167
- WooCommerce products
168
- New caption styles
169
- Earn money with referral
170
- 3.0.21
171
- Bug fix
172
- 3.0.20
173
- Support for Social Gallery plugin by EpicPlugins
174
- 3.0.19
175
- Bug fix
176
- 3.0.18
177
- Posts galleries can use lightboxes
178
- 3.0.17
179
- Bug fix
180
- 3.0.16
181
- Filters available with recent posts
182
- 3.0.15
183
- bug fix
184
- 3.1.14
185
- New customization fields: before gallery text and after gallery text
186
- 3.0.13
187
- Removed unused gallery properties
188
- Read "Description" field from media panel
189
- Added delay control
190
- 3.0.12
191
- minor bug fix
192
- 3.0.11
193
- Image width and height attributes are now ignored
194
- 3.0.10
195
- Added compatibility with Cherry themes
196
- 3.0.9
197
- Minor bug fix
198
- 3.0.8
199
- Minor bug fix
200
- 3.0.7
201
- Minor bug fix
202
- 3.0.6
203
- Added filters in media panel
204
- 3.0.5
205
- Minor bug fix
206
- 3.0.4
207
- Minor bug fix
208
- 3.0.3
209
- Bug fix
210
- 3.0.2
211
- Bug fix
212
- 3.0.1
213
- Bug fix
214
- 3.0
215
- New grid layout algorithm
216
- Video support, reverse order option
217
- Automatic gallery with recent posts, toggle HTML compression, caption behavior on mobile devices, custom caption icon, update to FontAwesone 4.1.0
218
- 2.1.10
219
- Lazy loading
220
- 2.1.9
221
- Fixed issue with single quote character in captions
222
- 2.1.8
223
- Re-activated html compression
224
- 2.1.7
225
- Fixed notice messages
226
- 2.1.6
227
- Magnific Popup and Lightbox now work with gallery filters
228
- 2.1.5
229
- New feature: dynamic image size factor
230
- 2.1.4
231
- New fields: CSS class and REL on A tag
232
- 2.1.3
233
- Social icons bug fix
234
-
235
- 2.1.2
236
- Show empty captions
237
- Inverted captions (visible then hidden on mouse over)
238
- Icons in captions
239
- Admin redesign UI
240
- Enable/Disable effects on mouse over
241
- Caption auto height
242
- Set color of social sharing icons
243
- Fixed captions
244
- Loading progress bar
245
- Minor bugs fixes
246
- Page with support request instructions
247
- Page with instructions
 
 
 
 
248
  */
249
  if ( !function_exists( 'ftg_fs' ) ) {
250
  // Create a helper function for easy SDK access.
@@ -309,7 +313,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
309
  'captionIcon' => 'zoom',
310
  'captionIconColor' => '#ffffff',
311
  'captionIconSize' => 12,
312
- 'captionMobileBehavior' => 'desktop',
313
  'captionOpacity' => 80,
314
  'captionPosition' => 'inside',
315
  'captionVerticalAlignment' => 'middle',
@@ -356,8 +360,8 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
356
  'loadedScaleY' => 100,
357
  'loadedScaleX' => 100,
358
  'loadedVSlide' => 0,
359
- 'loadingBarBackgroundColor' => '#fff',
360
- 'loadingBarColor' => '#666',
361
  'loadMethod' => 'sequential',
362
  'margin' => 10,
363
  'max_posts' => 0,
@@ -501,46 +505,42 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
501
  if ( !$valid ) {
502
  return;
503
  }
 
504
  ?>
505
- <div class="notice notice-info is-dismissible ftg-review-notice">
506
  <p><?php
507
  _e( 'Hey, I noticed you created a photo gallery with Final Tiles - that’s awesome! Would you mind give it a 5-star rating on WordPress to help us spread the word and boost our motivation for new featrues?', 'final-tiles-gallery-lite' );
508
- ?>
509
- </p>
510
  <p><strong><?php
511
  _e( 'Diego Imbriani<br>Founder of GreenTreeLabs', 'final-tiles-gallery' );
512
- ?>
513
- </strong></p>
514
- <p>
515
  <a href="https://wordpress.org/support/plugin/final-tiles-grid-gallery-lite/reviews/?filter=5#new-post" class="ftg-dismiss-review-notice ftg-review-out" target="_blank" rel="noopener"><?php
516
  _e( 'Ok, you deserve it', 'final-tiles-gallery-lite' );
517
- ?>
518
- </a><br>
519
  <a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
520
  _e( 'Nope, maybe later', 'final-tiles-gallery' );
521
- ?>
522
- </a><br>
523
  <a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
524
  _e( 'I already did', 'final-tiles-gallery' );
525
- ?>
526
- </a><br>
527
- </p>
528
- </div>
529
- <script type="text/javascript">
530
- jQuery(document).ready( function($) {
531
- $(document).on('click', '.ftg-dismiss-review-notice, .ftg-review-notice button', function( event ) {
532
- if ( ! $(this).hasClass('ftg-review-out') ) {
533
- event.preventDefault();
534
- }
535
-
536
- $.post( ajaxurl, {
537
- action: 'ftg_dismiss_review'
538
- });
539
-
540
- $('.ftg-review-notice').remove();
541
- });
542
- });
543
- </script>
544
  <?php
545
  }
546
 
@@ -582,15 +582,16 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
582
  'excludeFrom'
583
  );
584
  foreach ( $this->fields as $tab_name => $tab ) {
585
- foreach ( $tab['fields'] as $key => $field ) {
586
  //print_r($field);
587
  foreach ( $keys as $kk ) {
588
  if ( !array_key_exists( $kk, $field ) ) {
589
- $this->fields[$tab_name]['fields'][$key][$kk] = '';
590
  }
591
  }
592
  }
593
  }
 
594
  }
595
 
596
  public function register_links( $links, $file )
@@ -678,16 +679,16 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
678
 
679
  public function attachment_fields_to_edit( $form, $post )
680
  {
681
- $form['ftg_link'] = array(
682
- 'label' => 'Link <small>FTG</small>',
683
- 'input' => 'text',
684
- 'value' => get_post_meta( $post->ID, '_ftg_link', true ),
685
- 'helps' => '',
686
  );
687
- $form['ftg_target'] = array(
688
- 'label' => '_blank <small>FTG</small>',
689
- 'input' => 'html',
690
- 'html' => "<input type='checkbox' name='attachments[{$post->ID}][ftg_target]' id='attachments[{$post->ID}][ftg_target]' value='_mblank' " . (( get_post_meta( $post->ID, '_ftg_target', true ) == '_mblank' ? 'checked' : '' )) . ' />',
691
  );
692
  return $form;
693
  }
@@ -709,7 +710,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
709
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
710
  $this->FinalTilesdb->deleteGallery( intval( $_POST['id'] ) );
711
  }
712
- die;
713
  }
714
 
715
  public function update_configuration()
@@ -721,7 +722,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
721
  $this->FinalTilesdb->update_config( $id, $config );
722
  }
723
 
724
- die;
725
  }
726
 
727
  public function get_configuration()
@@ -733,7 +734,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
733
  echo $gallery ;
734
  }
735
 
736
- die;
737
  }
738
 
739
  public function get_image_size_url()
@@ -741,7 +742,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
741
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
742
  echo wp_get_attachment_image_url( $_POST['id'], $_POST['size'], false ) ;
743
  }
744
- die;
745
  }
746
 
747
  //Clone gallery
@@ -751,7 +752,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
751
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
752
  $sourceId = intval( $_POST['id'] );
753
  $g = $this->FinalTilesdb->getGalleryById( $sourceId, true );
754
- $g['name'] .= ' (copy)';
755
  $this->FinalTilesdb->addGallery( $g );
756
  $id = $this->FinalTilesdb->getNewGalleryId();
757
  $images = $this->FinalTilesdb->getImagesByGalleryId( $sourceId );
@@ -762,7 +763,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
762
  $this->FinalTilesdb->addImages( $id, $images );
763
  }
764
 
765
- die;
766
  }
767
 
768
  //Add gallery scripts
@@ -797,15 +798,15 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
797
  wp_enqueue_media();
798
  }
799
  $ftg_db_version = '5.0';
800
- $installed_ver = get_option( 'FinalTiles_gallery_db_version' );
801
  if ( !$installed_ver ) {
802
- update_option( 'FinalTiles_gallery_db_version', $ftg_db_version );
803
  }
804
  $this->FinalTilesdb->updateConfiguration();
805
 
806
  if ( $installed_ver != $ftg_db_version ) {
807
  $this->create_db_tables();
808
- update_option( 'FinalTiles_gallery_db_version', $ftg_db_version );
809
  }
810
 
811
  function ftg_get_image_sizes()
@@ -836,9 +837,9 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
836
  }
837
 
838
  foreach ( ftg_get_image_sizes() as $name => $size ) {
839
- $this->fields['Links & Lightbox']['fields']['lightboxImageSize']['values']['Size'][] = $name . '|' . $name . ' (' . $size['width'] . 'x' . $size['height'] . (( $size['crop'] ? ' cropped)' : ')' ));
840
  }
841
- $this->fields['Links & Lightbox']['fields']['lightboxImageSize']['values']['Size'][] = 'full|Original (full)';
842
  wp_enqueue_script( 'jquery' );
843
  wp_enqueue_script( 'jquery-ui-dialog' );
844
  wp_enqueue_script( 'jquery-ui-sortable' );
@@ -906,35 +907,35 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
906
  global $ftg_fields ;
907
  $ftg_fields = $this->fields;
908
  global $ftg_parent_page ;
909
- $ftg_parent_page = 'dashboard';
910
 
911
- if ( array_key_exists( 'id', $_GET ) ) {
912
  $woocommerce_post_types = array(
913
- 'product',
914
- 'product_variation',
915
- 'shop_order',
916
- 'shop_order_refund',
917
- 'shop_coupon',
918
- 'shop_webhook'
919
  );
920
- $wp_post_types = array( 'revision', 'nav_menu_item' );
921
  $excluded_post_types = array_merge( $wp_post_types, $woocommerce_post_types );
922
  $woo_categories = $this->getWooCategories();
923
- include 'admin/edit-gallery.php';
924
  } else {
925
- include 'admin/overview.php';
926
  }
927
 
928
  }
929
 
930
  public function tutorial()
931
  {
932
- include 'admin/tutorial.php';
933
  }
934
 
935
  public function support()
936
  {
937
- include 'admin/support.php';
938
  }
939
 
940
  private function getWooCategories()
@@ -973,23 +974,23 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
973
  $ftg_fields = $this->fields;
974
  $gallery = null;
975
  $woocommerce_post_types = array(
976
- 'product',
977
- 'product_variation',
978
- 'shop_order',
979
- 'shop_order_refund',
980
- 'shop_coupon',
981
- 'shop_webhook'
982
  );
983
- $wp_post_types = array( 'revision', 'nav_menu_item' );
984
  $excluded_post_types = array_merge( $wp_post_types, $woocommerce_post_types );
985
  $woo_categories = $this->getWooCategories();
986
- include 'admin/add-gallery.php';
987
  }
988
 
989
  public function delete_image()
990
  {
991
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
992
- foreach ( explode( ',', $_POST['id'] ) as $id ) {
993
  $this->FinalTilesdb->deleteImage( intval( $id ) );
994
  }
995
  }
@@ -1001,13 +1002,13 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1001
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1002
 
1003
  if ( $_POST['source'] == 'posts' ) {
1004
- foreach ( explode( ',', $_POST['id'] ) as $id ) {
1005
  update_post_meta( intval( $id ), 'ftg_filters', $_POST['filters'] );
1006
  }
1007
  } else {
1008
- foreach ( explode( ',', $_POST['id'] ) as $id ) {
1009
  $result = $this->FinalTilesdb->editImage( $id, array(
1010
- 'filters' => $_POST['filters'],
1011
  ) );
1012
  }
1013
  }
@@ -1019,10 +1020,10 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1019
  public function toggle_visibility()
1020
  {
1021
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1022
- foreach ( explode( ',', $_POST['id'] ) as $id ) {
1023
  $image = $this->FinalTilesdb->getImage( $id );
1024
  $this->FinalTilesdb->editImage( $id, array(
1025
- 'hidden' => ( $image->hidden == 'T' ? 'F' : 'T' ),
1026
  ) );
1027
  }
1028
  }
@@ -1034,13 +1035,13 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1034
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1035
 
1036
  if ( $_POST['source'] == 'posts' ) {
1037
- foreach ( explode( ',', $_POST['id'] ) as $id ) {
1038
  update_post_meta( intval( $id ), 'ftg_group', $_POST['group'] );
1039
  }
1040
  } else {
1041
- foreach ( explode( ',', $_POST['id'] ) as $id ) {
1042
  $result = $this->FinalTilesdb->editImage( $id, array(
1043
- 'group' => $_POST['group'],
1044
  ) );
1045
  }
1046
  }
@@ -1054,15 +1055,15 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1054
 
1055
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1056
  $gid = intval( $_POST['galleryId'] );
1057
- $enc_images = stripslashes( $_POST['enc_images'] );
1058
  $images = json_decode( $enc_images );
1059
  $result = $this->FinalTilesdb->addImages( $gid, $images );
1060
- header( 'Content-type: application/json' );
1061
 
1062
  if ( $result === false ) {
1063
- echo '{"success":false}' ;
1064
  } else {
1065
- echo '{"success":true}' ;
1066
  }
1067
 
1068
  }
@@ -1094,12 +1095,12 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1094
 
1095
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1096
  $result = $this->FinalTilesdb->sortImages( explode( ',', $_POST['ids'] ) );
1097
- header( 'Content-type: application/json' );
1098
 
1099
  if ( $result === false ) {
1100
- echo '{"success":false}' ;
1101
  } else {
1102
- echo '{"success":true}' ;
1103
  }
1104
 
1105
  }
@@ -1112,7 +1113,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1112
  require_once 'lib/gallery-class.php';
1113
 
1114
  if ( check_admin_referer( 'finaltilesgallery', 'finaltilesgallery' ) ) {
1115
- $gid = intval( $_POST['gallery'] );
1116
  $images = $this->FinalTilesdb->getImagesByGalleryId( $gid );
1117
  $FinalTilesGallery = new FinalTilesGallery( $gid, $this->FinalTilesdb, $this->defaultValues );
1118
  echo $FinalTilesGallery->images_markup() ;
@@ -1139,7 +1140,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1139
  $postId = intval( $_POST['post_id'] );
1140
  $img_url = stripslashes( $_POST['img_url'] );
1141
  update_post_meta( $postId, 'ftg_image_url', $img_url );
1142
- if ( array_key_exists( 'filters', $_POST ) && strlen( $_POST['filters'] ) ) {
1143
  update_post_meta( $postId, 'ftg_filters', $_POST['filters'] );
1144
  }
1145
  } else {
@@ -1155,34 +1156,34 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1155
  $imageId = intval( $_POST['img_id'] );
1156
  $sortOrder = intval( $_POST['sortOrder'] );
1157
  $data = array(
1158
- 'imagePath' => $imageUrl,
1159
- 'target' => $target,
1160
- 'link' => $link,
1161
- 'imageId' => $imageId,
1162
- 'description' => $imageCaption,
1163
- 'filters' => $filters,
1164
- 'title' => $title,
1165
- 'group' => $group,
1166
- 'hidden' => $hidden,
1167
- 'sortOrder' => $sortOrder,
1168
  );
1169
 
1170
- if ( !empty($_POST['id']) ) {
1171
  $imageId = intval( $_POST['id'] );
1172
  $result = $this->FinalTilesdb->editImage( $imageId, $data );
1173
  } else {
1174
- $data['gid'] = intval( $_POST['galleryId'] );
1175
  $result = $this->FinalTilesdb->addFullImage( $data );
1176
  }
1177
 
1178
  }
1179
 
1180
- header( 'Content-type: application/json' );
1181
 
1182
  if ( $result === false ) {
1183
- echo '{"success":false}' ;
1184
  } else {
1185
- echo '{"success":true}' ;
1186
  }
1187
 
1188
  }
@@ -1195,31 +1196,31 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1195
 
1196
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1197
  $result = false;
1198
- $type = ( isset( $_POST['type'] ) ? $_POST['type'] : '' );
1199
  $data = array(
1200
- 'imagePath' => stripslashes( $_POST['embed'] ),
1201
- 'filters' => stripslashes( $_POST['filters'] ),
1202
- 'gid' => intval( $_POST['galleryId'] ),
1203
  );
1204
- $id = ( isset( $_POST['id'] ) ? intval( $_POST['id'] ) : '' );
1205
- $step = ( isset( $_POST['step'] ) ? $_POST['step'] : '' );
1206
  if ( !empty($step) ) {
1207
 
1208
- if ( $step == 'add' ) {
1209
  $result = $this->FinalTilesdb->addVideo( $data );
1210
  } else {
1211
- if ( $step == 'edit' ) {
1212
  $result = $this->FinalTilesdb->editVideo( $id, $data );
1213
  }
1214
  }
1215
 
1216
  }
1217
- header( 'Content-type: application/json' );
1218
 
1219
  if ( $result === false ) {
1220
- echo '{"success":false}' ;
1221
  } else {
1222
- echo '{"success":true}' ;
1223
  }
1224
 
1225
  }
@@ -1231,11 +1232,11 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1231
  {
1232
 
1233
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1234
- $gid = intval( $_POST['gid'] );
1235
  $imageResults = $this->FinalTilesdb->getImagesByGalleryId( $gid );
1236
  $gallery = $this->FinalTilesdb->getGalleryById( $gid );
1237
- $list_size = 'medium';
1238
- $column_size = 's6 m3 l3';
1239
  if ( isset( $_POST['list_size'] ) && !empty($_POST['list_size']) ) {
1240
  $list_size = $_POST['list_size'];
1241
  }
@@ -1261,23 +1262,23 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1261
 
1262
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1263
  $data = $this->defaultValues;
1264
- $data['name'] = $_POST['ftg_name'];
1265
- $data['description'] = $_POST['ftg_description'];
1266
- $data['source'] = $_POST['ftg_source'];
1267
- $data['wp_field_caption'] = $_POST['ftg_wp_field_caption'];
1268
- $data['wp_field_title'] = $_POST['ftg_wp_field_title'];
1269
- $data['captionEffect'] = $_POST['ftg_captionEffect'];
1270
- $data['post_categories'] = $_POST['post_categories'];
1271
- $data['post_tags'] = $_POST['post_tags'];
1272
- $data['layout'] = $_POST['layout'];
1273
- $data['defaultWooImageSize'] = $_POST['def_imgsize'];
1274
- $data['defaultPostImageSize'] = $_POST['def_imgsize'];
1275
- $data['woo_categories'] = $_POST['woo_categories'];
1276
  $result = $this->FinalTilesdb->addGallery( $data );
1277
  $id = $this->FinalTilesdb->getNewGalleryId();
1278
 
1279
  if ( $id > 0 && array_key_exists( 'enc_images', $_POST ) && strlen( $_POST['enc_images'] ) ) {
1280
- $enc_images = stripslashes( $_POST['enc_images'] );
1281
  $images = json_decode( $enc_images );
1282
  $result = $this->FinalTilesdb->addImages( $id, $images );
1283
  }
@@ -1304,7 +1305,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1304
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1305
  $galleryName = stripslashes( $_POST['ftg_name'] );
1306
  $galleryDescription = stripslashes( $_POST['ftg_description'] );
1307
- $slug = strtolower( str_replace( ' ', '', $galleryName ) );
1308
  $margin = intval( $_POST['ftg_margin'] );
1309
  $minTileWidth = intval( $_POST['ftg_minTileWidth'] );
1310
  $gridCellSize = intval( $_POST['ftg_gridCellSize'] );
@@ -1455,7 +1456,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1455
  'loadedRotateY' => intval( $_POST['ftg_loadedRotateY'] ),
1456
  'loadedRotateX' => intval( $_POST['ftg_loadedRotateX'] ),
1457
  );
1458
- header( 'Content-type: application/json' );
1459
 
1460
  if ( $id > 0 ) {
1461
  $result = $this->FinalTilesdb->editGallery( $id, $data );
@@ -1466,9 +1467,9 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1466
 
1467
 
1468
  if ( $result ) {
1469
- echo '{"success":true,"id":' . $id . '}' ;
1470
  } else {
1471
- echo '{"success":false}' ;
1472
  }
1473
 
1474
  }
@@ -1484,7 +1485,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1484
  foreach ( $sizes as $size ) {
1485
  $image = wp_get_attachment_image_src( $id, $size );
1486
  if ( !empty($image) && (true == $image[3] || 'full' == $size) ) {
1487
- $result["{$image['1']}x{$image['2']}"] = $image[0];
1488
  }
1489
  }
1490
  ksort( $result );
@@ -1507,73 +1508,73 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1507
  );
1508
  $settings = $FinalTilesGallery->getGallery();
1509
  switch ( $settings->lightbox ) {
1510
- case 'magnific':
1511
  wp_enqueue_style( 'magnific_stylesheet' );
1512
  wp_enqueue_script( 'magnific_script' );
1513
  break;
1514
- case 'prettyphoto':
1515
  wp_enqueue_style( 'prettyphoto_stylesheet' );
1516
  wp_enqueue_script( 'prettyphoto_script' );
1517
  break;
1518
- case 'fancybox':
1519
  wp_enqueue_style( 'fancybox_stylesheet' );
1520
  wp_enqueue_script( 'fancybox_script' );
1521
  break;
1522
- case 'colorbox':
1523
  wp_enqueue_style( 'colorbox_stylesheet' );
1524
  wp_enqueue_script( 'colorbox_script' );
1525
  break;
1526
- case 'swipebox':
1527
  wp_enqueue_style( 'swipebox_stylesheet' );
1528
  wp_enqueue_script( 'swipebox_script' );
1529
  break;
1530
- case 'lightbox2':
1531
  wp_enqueue_style( 'lightbox2_stylesheet' );
1532
  wp_enqueue_script( 'lightbox2_script' );
1533
  break;
1534
- case 'image-lightbox':
1535
  wp_enqueue_script( 'image-lightbox_script' );
1536
- case 'lightgallery':
1537
  wp_enqueue_style( 'lightgallery_stylesheet' );
1538
  wp_enqueue_script( 'lightgallery_script' );
1539
  break;
1540
  }
1541
  switch ( $settings->mobileLightbox ) {
1542
  default:
1543
- case 'magnific':
1544
  wp_enqueue_style( 'magnific_stylesheet' );
1545
  wp_enqueue_script( 'magnific_script' );
1546
  break;
1547
- case 'prettyphoto':
1548
  wp_enqueue_style( 'prettyphoto_stylesheet' );
1549
  wp_enqueue_script( 'prettyphoto_script' );
1550
  break;
1551
- case 'fancybox':
1552
  wp_enqueue_style( 'fancybox_stylesheet' );
1553
  wp_enqueue_script( 'fancybox_script' );
1554
  break;
1555
- case 'colorbox':
1556
  wp_enqueue_style( 'colorbox_stylesheet' );
1557
  wp_enqueue_script( 'colorbox_script' );
1558
  break;
1559
- case 'swipebox':
1560
  wp_enqueue_style( 'swipebox_stylesheet' );
1561
  wp_enqueue_script( 'swipebox_script' );
1562
  break;
1563
- case 'lightbox2':
1564
  wp_enqueue_style( 'lightbox2_stylesheet' );
1565
  wp_enqueue_script( 'lightbox2_script' );
1566
  break;
1567
- case 'image-lightbox':
1568
  wp_enqueue_script( 'image-lightbox_script' );
1569
- case 'lightgallery':
1570
  wp_enqueue_style( 'lightgallery_stylesheet' );
1571
  wp_enqueue_script( 'lightgallery_script' );
1572
  break;
1573
  }
1574
  return $FinalTilesGallery->render();
1575
  } else {
1576
- return 'Gallery not found.';
1577
  }
1578
 
1579
  }
@@ -1588,7 +1589,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1588
  {
1589
  $text = preg_replace( '~[^\\pL\\d]+~u', '-', $text );
1590
  $text = trim( $text, '-' );
1591
- if ( function_exists( 'iconv' ) ) {
1592
  $text = iconv( 'utf-8', 'us-ascii//TRANSLIT', $text );
1593
  }
1594
  $text = strtolower( $text );
@@ -1601,13 +1602,13 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1601
 
1602
  public static function getFieldType( $field )
1603
  {
1604
- return 'cta';
1605
  }
1606
 
1607
- public $fields = array() ;
1608
  private function addField( $section, $field, $data )
1609
  {
1610
- $this->fields[$section]['fields'][$field] = $data;
1611
  }
1612
 
1613
  private function setupFields()
@@ -1617,7 +1618,7 @@ if ( !class_exists( 'FinalTiles_Gallery' ) ) {
1617
 
1618
  }
1619
  }
1620
- if ( !class_exists( 'FinalTilesGalleryUtils' ) ) {
1621
  class FinalTilesGalleryUtils
1622
  {
1623
  public static function shortcodeToFieldName( $string, $capitalizeFirstCharacter = false )
@@ -1644,7 +1645,7 @@ if ( !class_exists( 'FinalTilesGalleryUtils' ) ) {
1644
  }
1645
  }
1646
 
1647
- if ( class_exists( 'FinalTiles_Gallery' ) ) {
1648
  global $ob_FinalTiles_Gallery ;
1649
  $ob_FinalTiles_Gallery = new FinalTiles_Gallery();
1650
- }
1
  <?php
2
 
3
+ /**
4
+ * Plugin Name: Final Tiles Grid Gallery - Image Gallery
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.24
9
+ * Author URI: https://www.greentreelabs.net
10
+ *
11
+ * @fs_premium_only /lightbox-pro/
12
+ *
13
  */
14
+ define( "FTGVERSION", "3.3.24" );
15
+ /*
16
+ Changelog:
17
+ 3.3.24
18
+ Fixed missing captions on mobile
19
+ 3.3.23
20
+ Added "ask for review" functionality
21
+ 3.3.22
22
+ Fixed issue with filters
23
+ 3.3.21
24
+ Fixed disabled hover rotation field
25
+ 3.3.20
26
+ Fixed disabled caption behaviour field
27
+ 3.3.19
28
+ Fixed ignored caption font size
29
+ 3.3.18
30
+ Fixed issue with iconv function
31
+ 3.3.17
32
+ Fixed issues in admin panel
33
+ 3.3.16
34
+ Fixed plugin name
35
+ 3.3.15
36
+ Fixed minor issue
37
+ 3.3.14
38
+ Fixed bug
39
+ 3.3.13
40
+ Fixed menu slug
41
+ 3.3.12
42
+ Lite version code merged with premium
43
+ 3.3.10
44
+ Bug fix (wrong behaviour on mobile with columns layout)
45
+ 3.3.9
46
+ Extended support for PHP versions
47
+ 3.3.8
48
+ Bug fix (Woocommerce categories were ignored)
49
+ 3.3.7
50
+ Bug fix (Youtube videos not showing in lightboxes)
51
+ 3.3.6
52
+ Bug fix (Vimeo videos not showing in lightboxes)
53
+ 3.3.5
54
+ Enhanced compatibility with EverlightBox
55
+ 3.3.4
56
+ Bug fix (woocommerce 3.1.x galleries not working)
57
+ Admin UI minor fixes
58
+ 3.3.3
59
+ Bug fix (wrong behaviour of captions on mobile devices)
60
+ 3.3.2
61
+ Bug fix (videos not using the masonry layout)
62
+ 3.3.1
63
+ Bug fix (videos not visible)
64
+ 3.3.0
65
+ Use gallery options inside shortcode
66
+ Enhanced backend UI
67
+ Added new caption behaviours
68
+ Fix FitVid conflicts
69
+ Added Hover effects and Image loaded effects presets
70
+ Added hover effect duration
71
+ Added new feature: disable grid size below given screen width
72
+ Added title and description to LightGallery
73
+ 3.2.9
74
+ Added support for EverlightBox
75
+ Renamed get_image_sizes function to avoid conflicts
76
+ 3.2.8
77
+ Minor Bug fix
78
+ 3.2.7
79
+ Minor Bug fix
80
+ 3.2.6
81
+ Bug fix
82
+ New feature: choose image size for lightbox
83
+ 3.2.5
84
+ SwipeBox now supports filters
85
+ Download the full size from LighGallery
86
+ Ajax loading (beta)
87
+ 3.2.4
88
+ Bug fix
89
+ 3.2.3
90
+ Bug fix
91
+ 3.2.2
92
+ Bug fix
93
+ 3.2.1
94
+ Bug fix
95
+ 3.2.0
96
+ Lightbox groups
97
+ Hidden images
98
+ 3.1.32
99
+ Added date filter to media panel
100
+ Added support to Enhanced Media Panel
101
+ Lazy loading with multiple image loading
102
+ Pre-selected filter
103
+ 3.1.31
104
+ Enhanced compatibility with other plugins and themes by adding data-class attribute on images
105
+ 3.1.30
106
+ Fixed jQuery issue
107
+ 3.1.29
108
+ Minor bug fix
109
+ 3.1.28
110
+ Bug fix
111
+ 3.1.27
112
+ Alt tag
113
+ 3.1.26
114
+ Bug fix
115
+ 3.1.25
116
+ Bug fix
117
+ 3.1.24
118
+ Bug fix
119
+ 3.1.23
120
+ Fixed bug occuring with Lazy load + Filters
121
+ 3.1.22
122
+ Lazy load
123
+ 3.1.21
124
+ New layout Masonry
125
+ 3.1.20
126
+ Max number of posts for "Recent posts" galleries
127
+ 3.1.19
128
+ Open videos in lightbox
129
+ 3.1.18
130
+ Admin panel enhancements
131
+ Fixed issue about Magnific Popup being loaded even when not needed
132
+ 3.1.17
133
+ New lightbox added: Lightgallery
134
+ Fixed minor bug in Custom CSS (removed slashes)
135
+ 3.1.16
136
+ Fixed bug in 'Recent posts' galleries, now it's possible to link posts
137
+ 3.1.15
138
+ Added new lightbox: LightGallery
139
+ 3.1.14
140
+ Import/Export features, Set title font size, select images by filter (backend), choose mobile lightbox
141
+ 3.1.13
142
+ Fixed issue with some lightboxes on pages with more than one gallery
143
+ 3.1.12
144
+ Solved conflicts with FitVids
145
+ 3.1.11
146
+ [Backend] edit gallery by clicking the tile
147
+ 3.1.10
148
+ Bug fix
149
+ 3.1.9
150
+ Load gallery with a selected filter, choose to reload page after clicking a filter,
151
+ choose gallery from text editor, load scripts from footer for enhanced page load
152
+ 3.1.8
153
+ Updated material design fonts
154
+ 3.1.7
155
+ Fix grid size 0
156
+ 3.1.6
157
+ Minor bug fix
158
+ 3.1.5
159
+ Image loaded effects
160
+ 3.1.4
161
+ Bug fix
162
+ 3.1.3
163
+ Set a custom label for "All" filter, Choose size of images in admin panel, Loading bar color, Loading bar background color, Caption font size, Sequential image loading
164
+ 3.1.2
165
+ PrettyPhoto security fix
166
+ 3.1.1
167
+ Minor bug fix
168
+ 3.1.0
169
+ New Backoffice
170
+ Wizard
171
+ WooCommerce products
172
+ New caption styles
173
+ Earn money with referral
174
+ 3.0.21
175
+ Bug fix
176
+ 3.0.20
177
+ Support for Social Gallery plugin by EpicPlugins
178
+ 3.0.19
179
+ Bug fix
180
+ 3.0.18
181
+ Posts galleries can use lightboxes
182
+ 3.0.17
183
+ Bug fix
184
+ 3.0.16
185
+ Filters available with recent posts
186
+ 3.0.15
187
+ bug fix
188
+ 3.1.14
189
+ New customization fields: before gallery text and after gallery text
190
+ 3.0.13
191
+ Removed unused gallery properties
192
+ Read "Description" field from media panel
193
+ Added delay control
194
+ 3.0.12
195
+ minor bug fix
196
+ 3.0.11
197
+ Image width and height attributes are now ignored
198
+ 3.0.10
199
+ Added compatibility with Cherry themes
200
+ 3.0.9
201
+ Minor bug fix
202
+ 3.0.8
203
+ Minor bug fix
204
+ 3.0.7
205
+ Minor bug fix
206
+ 3.0.6
207
+ Added filters in media panel
208
+ 3.0.5
209
+ Minor bug fix
210
+ 3.0.4
211
+ Minor bug fix
212
+ 3.0.3
213
+ Bug fix
214
+ 3.0.2
215
+ Bug fix
216
+ 3.0.1
217
+ Bug fix
218
+ 3.0
219
+ New grid layout algorithm
220
+ Video support, reverse order option
221
+ Automatic gallery with recent posts, toggle HTML compression, caption behavior on mobile devices, custom caption icon, update to FontAwesone 4.1.0
222
+ 2.1.10
223
+ Lazy loading
224
+ 2.1.9
225
+ Fixed issue with single quote character in captions
226
+ 2.1.8
227
+ Re-activated html compression
228
+ 2.1.7
229
+ Fixed notice messages
230
+ 2.1.6
231
+ Magnific Popup and Lightbox now work with gallery filters
232
+ 2.1.5
233
+ New feature: dynamic image size factor
234
+ 2.1.4
235
+ New fields: CSS class and REL on A tag
236
+ 2.1.3
237
+ Social icons bug fix
238
+
239
+ 2.1.2
240
+ Show empty captions
241
+ Inverted captions (visible then hidden on mouse over)
242
+ Icons in captions
243
+ Admin redesign UI
244
+ Enable/Disable effects on mouse over
245
+ Caption auto height
246
+ Set color of social sharing icons
247
+ Fixed captions
248
+ Loading progress bar
249
+ Minor bugs fixes
250
+ Page with support request instructions
251
+ Page with instructions
252
  */
253
  if ( !function_exists( 'ftg_fs' ) ) {
254
  // Create a helper function for easy SDK access.
313
  'captionIcon' => 'zoom',
314
  'captionIconColor' => '#ffffff',
315
  'captionIconSize' => 12,
316
+ 'captionMobileBehavior' => "desktop",
317
  'captionOpacity' => 80,
318
  'captionPosition' => 'inside',
319
  'captionVerticalAlignment' => 'middle',
360
  'loadedScaleY' => 100,
361
  'loadedScaleX' => 100,
362
  'loadedVSlide' => 0,
363
+ 'loadingBarBackgroundColor' => "#fff",
364
+ 'loadingBarColor' => "#666",
365
  'loadMethod' => 'sequential',
366
  'margin' => 10,
367
  'max_posts' => 0,
505
  if ( !$valid ) {
506
  return;
507
  }
508
+ // We have a candidate! Output a review message.
509
  ?>
510
+ <div class="notice notice-info is-dismissible ftg-review-notice">
511
  <p><?php
512
  _e( 'Hey, I noticed you created a photo gallery with Final Tiles - that’s awesome! Would you mind give it a 5-star rating on WordPress to help us spread the word and boost our motivation for new featrues?', 'final-tiles-gallery-lite' );
513
+ ?></p>
 
514
  <p><strong><?php
515
  _e( 'Diego Imbriani<br>Founder of GreenTreeLabs', 'final-tiles-gallery' );
516
+ ?></strong></p>
517
+ <p>
 
518
  <a href="https://wordpress.org/support/plugin/final-tiles-grid-gallery-lite/reviews/?filter=5#new-post" class="ftg-dismiss-review-notice ftg-review-out" target="_blank" rel="noopener"><?php
519
  _e( 'Ok, you deserve it', 'final-tiles-gallery-lite' );
520
+ ?></a><br>
 
521
  <a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
522
  _e( 'Nope, maybe later', 'final-tiles-gallery' );
523
+ ?></a><br>
 
524
  <a href="#" class="ftg-dismiss-review-notice" rel="noopener"><?php
525
  _e( 'I already did', 'final-tiles-gallery' );
526
+ ?></a><br>
527
+ </p>
528
+ </div>
529
+ <script type="text/javascript">
530
+ jQuery(document).ready( function($) {
531
+ $(document).on('click', '.ftg-dismiss-review-notice, .ftg-review-notice button', function( event ) {
532
+ if ( ! $(this).hasClass('ftg-review-out') ) {
533
+ event.preventDefault();
534
+ }
535
+
536
+ $.post( ajaxurl, {
537
+ action: 'ftg_dismiss_review'
538
+ });
539
+
540
+ $('.ftg-review-notice').remove();
541
+ });
542
+ });
543
+ </script>
 
544
  <?php
545
  }
546
 
582
  'excludeFrom'
583
  );
584
  foreach ( $this->fields as $tab_name => $tab ) {
585
+ foreach ( $tab["fields"] as $key => $field ) {
586
  //print_r($field);
587
  foreach ( $keys as $kk ) {
588
  if ( !array_key_exists( $kk, $field ) ) {
589
+ $this->fields[$tab_name]["fields"][$key][$kk] = "";
590
  }
591
  }
592
  }
593
  }
594
+ //print_r($this->fields);
595
  }
596
 
597
  public function register_links( $links, $file )
679
 
680
  public function attachment_fields_to_edit( $form, $post )
681
  {
682
+ $form["ftg_link"] = array(
683
+ "label" => "Link <small>FTG</small>",
684
+ "input" => "text",
685
+ "value" => get_post_meta( $post->ID, "_ftg_link", true ),
686
+ "helps" => "",
687
  );
688
+ $form["ftg_target"] = array(
689
+ "label" => "_blank <small>FTG</small>",
690
+ "input" => "html",
691
+ "html" => "<input type='checkbox' name='attachments[{$post->ID}][ftg_target]' id='attachments[{$post->ID}][ftg_target]' value='_mblank' " . (( get_post_meta( $post->ID, "_ftg_target", true ) == "_mblank" ? "checked" : "" )) . " />",
692
  );
693
  return $form;
694
  }
710
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
711
  $this->FinalTilesdb->deleteGallery( intval( $_POST['id'] ) );
712
  }
713
+ exit;
714
  }
715
 
716
  public function update_configuration()
722
  $this->FinalTilesdb->update_config( $id, $config );
723
  }
724
 
725
+ exit;
726
  }
727
 
728
  public function get_configuration()
734
  echo $gallery ;
735
  }
736
 
737
+ exit;
738
  }
739
 
740
  public function get_image_size_url()
742
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
743
  echo wp_get_attachment_image_url( $_POST['id'], $_POST['size'], false ) ;
744
  }
745
+ exit;
746
  }
747
 
748
  //Clone gallery
752
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
753
  $sourceId = intval( $_POST['id'] );
754
  $g = $this->FinalTilesdb->getGalleryById( $sourceId, true );
755
+ $g['name'] .= " (copy)";
756
  $this->FinalTilesdb->addGallery( $g );
757
  $id = $this->FinalTilesdb->getNewGalleryId();
758
  $images = $this->FinalTilesdb->getImagesByGalleryId( $sourceId );
763
  $this->FinalTilesdb->addImages( $id, $images );
764
  }
765
 
766
+ exit;
767
  }
768
 
769
  //Add gallery scripts
798
  wp_enqueue_media();
799
  }
800
  $ftg_db_version = '5.0';
801
+ $installed_ver = get_option( "FinalTiles_gallery_db_version" );
802
  if ( !$installed_ver ) {
803
+ update_option( "FinalTiles_gallery_db_version", $ftg_db_version );
804
  }
805
  $this->FinalTilesdb->updateConfiguration();
806
 
807
  if ( $installed_ver != $ftg_db_version ) {
808
  $this->create_db_tables();
809
+ update_option( "FinalTiles_gallery_db_version", $ftg_db_version );
810
  }
811
 
812
  function ftg_get_image_sizes()
837
  }
838
 
839
  foreach ( ftg_get_image_sizes() as $name => $size ) {
840
+ $this->fields["Links & Lightbox"]["fields"]["lightboxImageSize"]["values"]["Size"][] = $name . "|" . $name . " (" . $size['width'] . 'x' . $size['height'] . (( $size['crop'] ? ' cropped)' : ')' ));
841
  }
842
+ $this->fields["Links & Lightbox"]["fields"]["lightboxImageSize"]["values"]["Size"][] = "full|Original (full)";
843
  wp_enqueue_script( 'jquery' );
844
  wp_enqueue_script( 'jquery-ui-dialog' );
845
  wp_enqueue_script( 'jquery-ui-sortable' );
907
  global $ftg_fields ;
908
  $ftg_fields = $this->fields;
909
  global $ftg_parent_page ;
910
+ $ftg_parent_page = "dashboard";
911
 
912
+ if ( array_key_exists( "id", $_GET ) ) {
913
  $woocommerce_post_types = array(
914
+ "product",
915
+ "product_variation",
916
+ "shop_order",
917
+ "shop_order_refund",
918
+ "shop_coupon",
919
+ "shop_webhook"
920
  );
921
+ $wp_post_types = array( "revision", "nav_menu_item" );
922
  $excluded_post_types = array_merge( $wp_post_types, $woocommerce_post_types );
923
  $woo_categories = $this->getWooCategories();
924
+ include "admin/edit-gallery.php";
925
  } else {
926
+ include "admin/overview.php";
927
  }
928
 
929
  }
930
 
931
  public function tutorial()
932
  {
933
+ include "admin/tutorial.php";
934
  }
935
 
936
  public function support()
937
  {
938
+ include "admin/support.php";
939
  }
940
 
941
  private function getWooCategories()
974
  $ftg_fields = $this->fields;
975
  $gallery = null;
976
  $woocommerce_post_types = array(
977
+ "product",
978
+ "product_variation",
979
+ "shop_order",
980
+ "shop_order_refund",
981
+ "shop_coupon",
982
+ "shop_webhook"
983
  );
984
+ $wp_post_types = array( "revision", "nav_menu_item" );
985
  $excluded_post_types = array_merge( $wp_post_types, $woocommerce_post_types );
986
  $woo_categories = $this->getWooCategories();
987
+ include "admin/add-gallery.php";
988
  }
989
 
990
  public function delete_image()
991
  {
992
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
993
+ foreach ( explode( ",", $_POST["id"] ) as $id ) {
994
  $this->FinalTilesdb->deleteImage( intval( $id ) );
995
  }
996
  }
1002
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1003
 
1004
  if ( $_POST['source'] == 'posts' ) {
1005
+ foreach ( explode( ",", $_POST["id"] ) as $id ) {
1006
  update_post_meta( intval( $id ), 'ftg_filters', $_POST['filters'] );
1007
  }
1008
  } else {
1009
+ foreach ( explode( ",", $_POST["id"] ) as $id ) {
1010
  $result = $this->FinalTilesdb->editImage( $id, array(
1011
+ "filters" => $_POST["filters"],
1012
  ) );
1013
  }
1014
  }
1020
  public function toggle_visibility()
1021
  {
1022
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1023
+ foreach ( explode( ",", $_POST["id"] ) as $id ) {
1024
  $image = $this->FinalTilesdb->getImage( $id );
1025
  $this->FinalTilesdb->editImage( $id, array(
1026
+ "hidden" => ( $image->hidden == 'T' ? 'F' : 'T' ),
1027
  ) );
1028
  }
1029
  }
1035
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1036
 
1037
  if ( $_POST['source'] == 'posts' ) {
1038
+ foreach ( explode( ",", $_POST["id"] ) as $id ) {
1039
  update_post_meta( intval( $id ), 'ftg_group', $_POST['group'] );
1040
  }
1041
  } else {
1042
+ foreach ( explode( ",", $_POST["id"] ) as $id ) {
1043
  $result = $this->FinalTilesdb->editImage( $id, array(
1044
+ "group" => $_POST["group"],
1045
  ) );
1046
  }
1047
  }
1055
 
1056
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1057
  $gid = intval( $_POST['galleryId'] );
1058
+ $enc_images = stripslashes( $_POST["enc_images"] );
1059
  $images = json_decode( $enc_images );
1060
  $result = $this->FinalTilesdb->addImages( $gid, $images );
1061
+ header( "Content-type: application/json" );
1062
 
1063
  if ( $result === false ) {
1064
+ echo "{\"success\":false}" ;
1065
  } else {
1066
+ echo "{\"success\":true}" ;
1067
  }
1068
 
1069
  }
1095
 
1096
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1097
  $result = $this->FinalTilesdb->sortImages( explode( ',', $_POST['ids'] ) );
1098
+ header( "Content-type: application/json" );
1099
 
1100
  if ( $result === false ) {
1101
+ echo "{\"success\":false}" ;
1102
  } else {
1103
+ echo "{\"success\":true}" ;
1104
  }
1105
 
1106
  }
1113
  require_once 'lib/gallery-class.php';
1114
 
1115
  if ( check_admin_referer( 'finaltilesgallery', 'finaltilesgallery' ) ) {
1116
+ $gid = intval( $_POST["gallery"] );
1117
  $images = $this->FinalTilesdb->getImagesByGalleryId( $gid );
1118
  $FinalTilesGallery = new FinalTilesGallery( $gid, $this->FinalTilesdb, $this->defaultValues );
1119
  echo $FinalTilesGallery->images_markup() ;
1140
  $postId = intval( $_POST['post_id'] );
1141
  $img_url = stripslashes( $_POST['img_url'] );
1142
  update_post_meta( $postId, 'ftg_image_url', $img_url );
1143
+ if ( array_key_exists( "filters", $_POST ) && strlen( $_POST['filters'] ) ) {
1144
  update_post_meta( $postId, 'ftg_filters', $_POST['filters'] );
1145
  }
1146
  } else {
1156
  $imageId = intval( $_POST['img_id'] );
1157
  $sortOrder = intval( $_POST['sortOrder'] );
1158
  $data = array(
1159
+ "imagePath" => $imageUrl,
1160
+ "target" => $target,
1161
+ "link" => $link,
1162
+ "imageId" => $imageId,
1163
+ "description" => $imageCaption,
1164
+ "filters" => $filters,
1165
+ "title" => $title,
1166
+ "group" => $group,
1167
+ "hidden" => $hidden,
1168
+ "sortOrder" => $sortOrder,
1169
  );
1170
 
1171
+ if ( !empty($_POST["id"]) ) {
1172
  $imageId = intval( $_POST['id'] );
1173
  $result = $this->FinalTilesdb->editImage( $imageId, $data );
1174
  } else {
1175
+ $data["gid"] = intval( $_POST['galleryId'] );
1176
  $result = $this->FinalTilesdb->addFullImage( $data );
1177
  }
1178
 
1179
  }
1180
 
1181
+ header( "Content-type: application/json" );
1182
 
1183
  if ( $result === false ) {
1184
+ echo "{\"success\":false}" ;
1185
  } else {
1186
+ echo "{\"success\":true}" ;
1187
  }
1188
 
1189
  }
1196
 
1197
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1198
  $result = false;
1199
+ $type = ( isset( $_POST['type'] ) ? $_POST['type'] : "" );
1200
  $data = array(
1201
+ "imagePath" => stripslashes( $_POST["embed"] ),
1202
+ "filters" => stripslashes( $_POST['filters'] ),
1203
+ "gid" => intval( $_POST['galleryId'] ),
1204
  );
1205
+ $id = ( isset( $_POST['id'] ) ? intval( $_POST['id'] ) : "" );
1206
+ $step = ( isset( $_POST['step'] ) ? $_POST['step'] : "" );
1207
  if ( !empty($step) ) {
1208
 
1209
+ if ( $step == "add" ) {
1210
  $result = $this->FinalTilesdb->addVideo( $data );
1211
  } else {
1212
+ if ( $step == "edit" ) {
1213
  $result = $this->FinalTilesdb->editVideo( $id, $data );
1214
  }
1215
  }
1216
 
1217
  }
1218
+ header( "Content-type: application/json" );
1219
 
1220
  if ( $result === false ) {
1221
+ echo "{\"success\":false}" ;
1222
  } else {
1223
+ echo "{\"success\":true}" ;
1224
  }
1225
 
1226
  }
1232
  {
1233
 
1234
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1235
+ $gid = intval( $_POST["gid"] );
1236
  $imageResults = $this->FinalTilesdb->getImagesByGalleryId( $gid );
1237
  $gallery = $this->FinalTilesdb->getGalleryById( $gid );
1238
+ $list_size = "medium";
1239
+ $column_size = "s6 m3 l3";
1240
  if ( isset( $_POST['list_size'] ) && !empty($_POST['list_size']) ) {
1241
  $list_size = $_POST['list_size'];
1242
  }
1262
 
1263
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1264
  $data = $this->defaultValues;
1265
+ $data["name"] = $_POST['ftg_name'];
1266
+ $data["description"] = $_POST['ftg_description'];
1267
+ $data["source"] = $_POST['ftg_source'];
1268
+ $data["wp_field_caption"] = $_POST['ftg_wp_field_caption'];
1269
+ $data["wp_field_title"] = $_POST['ftg_wp_field_title'];
1270
+ $data["captionEffect"] = $_POST['ftg_captionEffect'];
1271
+ $data["post_categories"] = $_POST["post_categories"];
1272
+ $data["post_tags"] = $_POST["post_tags"];
1273
+ $data["layout"] = $_POST["layout"];
1274
+ $data["defaultWooImageSize"] = $_POST['def_imgsize'];
1275
+ $data["defaultPostImageSize"] = $_POST['def_imgsize'];
1276
+ $data["woo_categories"] = $_POST["woo_categories"];
1277
  $result = $this->FinalTilesdb->addGallery( $data );
1278
  $id = $this->FinalTilesdb->getNewGalleryId();
1279
 
1280
  if ( $id > 0 && array_key_exists( 'enc_images', $_POST ) && strlen( $_POST['enc_images'] ) ) {
1281
+ $enc_images = stripslashes( $_POST["enc_images"] );
1282
  $images = json_decode( $enc_images );
1283
  $result = $this->FinalTilesdb->addImages( $id, $images );
1284
  }
1305
  if ( check_admin_referer( 'FinalTiles_gallery', 'FinalTiles_gallery' ) ) {
1306
  $galleryName = stripslashes( $_POST['ftg_name'] );
1307
  $galleryDescription = stripslashes( $_POST['ftg_description'] );
1308
+ $slug = strtolower( str_replace( " ", "", $galleryName ) );
1309
  $margin = intval( $_POST['ftg_margin'] );
1310
  $minTileWidth = intval( $_POST['ftg_minTileWidth'] );
1311
  $gridCellSize = intval( $_POST['ftg_gridCellSize'] );
1456
  'loadedRotateY' => intval( $_POST['ftg_loadedRotateY'] ),
1457
  'loadedRotateX' => intval( $_POST['ftg_loadedRotateX'] ),
1458
  );
1459
+ header( "Content-type: application/json" );
1460
 
1461
  if ( $id > 0 ) {
1462
  $result = $this->FinalTilesdb->editGallery( $id, $data );
1467
 
1468
 
1469
  if ( $result ) {
1470
+ echo "{\"success\":true,\"id\":" . $id . "}" ;
1471
  } else {
1472
+ echo "{\"success\":false}" ;
1473
  }
1474
 
1475
  }
1485
  foreach ( $sizes as $size ) {
1486
  $image = wp_get_attachment_image_src( $id, $size );
1487
  if ( !empty($image) && (true == $image[3] || 'full' == $size) ) {
1488
+ $result["{$image[1]}x{$image[2]}"] = $image[0];
1489
  }
1490
  }
1491
  ksort( $result );
1508
  );
1509
  $settings = $FinalTilesGallery->getGallery();
1510
  switch ( $settings->lightbox ) {
1511
+ case "magnific":
1512
  wp_enqueue_style( 'magnific_stylesheet' );
1513
  wp_enqueue_script( 'magnific_script' );
1514
  break;
1515
+ case "prettyphoto":
1516
  wp_enqueue_style( 'prettyphoto_stylesheet' );
1517
  wp_enqueue_script( 'prettyphoto_script' );
1518
  break;
1519
+ case "fancybox":
1520
  wp_enqueue_style( 'fancybox_stylesheet' );
1521
  wp_enqueue_script( 'fancybox_script' );
1522
  break;
1523
+ case "colorbox":
1524
  wp_enqueue_style( 'colorbox_stylesheet' );
1525
  wp_enqueue_script( 'colorbox_script' );
1526
  break;
1527
+ case "swipebox":
1528
  wp_enqueue_style( 'swipebox_stylesheet' );
1529
  wp_enqueue_script( 'swipebox_script' );
1530
  break;
1531
+ case "lightbox2":
1532
  wp_enqueue_style( 'lightbox2_stylesheet' );
1533
  wp_enqueue_script( 'lightbox2_script' );
1534
  break;
1535
+ case "image-lightbox":
1536
  wp_enqueue_script( 'image-lightbox_script' );
1537
+ case "lightgallery":
1538
  wp_enqueue_style( 'lightgallery_stylesheet' );
1539
  wp_enqueue_script( 'lightgallery_script' );
1540
  break;
1541
  }
1542
  switch ( $settings->mobileLightbox ) {
1543
  default:
1544
+ case "magnific":
1545
  wp_enqueue_style( 'magnific_stylesheet' );
1546
  wp_enqueue_script( 'magnific_script' );
1547
  break;
1548
+ case "prettyphoto":
1549
  wp_enqueue_style( 'prettyphoto_stylesheet' );
1550
  wp_enqueue_script( 'prettyphoto_script' );
1551
  break;
1552
+ case "fancybox":
1553
  wp_enqueue_style( 'fancybox_stylesheet' );
1554
  wp_enqueue_script( 'fancybox_script' );
1555
  break;
1556
+ case "colorbox":
1557
  wp_enqueue_style( 'colorbox_stylesheet' );
1558
  wp_enqueue_script( 'colorbox_script' );
1559
  break;
1560
+ case "swipebox":
1561
  wp_enqueue_style( 'swipebox_stylesheet' );
1562
  wp_enqueue_script( 'swipebox_script' );
1563
  break;
1564
+ case "lightbox2":
1565
  wp_enqueue_style( 'lightbox2_stylesheet' );
1566
  wp_enqueue_script( 'lightbox2_script' );
1567
  break;
1568
+ case "image-lightbox":
1569
  wp_enqueue_script( 'image-lightbox_script' );
1570
+ case "lightgallery":
1571
  wp_enqueue_style( 'lightgallery_stylesheet' );
1572
  wp_enqueue_script( 'lightgallery_script' );
1573
  break;
1574
  }
1575
  return $FinalTilesGallery->render();
1576
  } else {
1577
+ return "Gallery not found.";
1578
  }
1579
 
1580
  }
1589
  {
1590
  $text = preg_replace( '~[^\\pL\\d]+~u', '-', $text );
1591
  $text = trim( $text, '-' );
1592
+ if ( function_exists( "iconv" ) ) {
1593
  $text = iconv( 'utf-8', 'us-ascii//TRANSLIT', $text );
1594
  }
1595
  $text = strtolower( $text );
1602
 
1603
  public static function getFieldType( $field )
1604
  {
1605
+ return "cta";
1606
  }
1607
 
1608
+ var $fields = array() ;
1609
  private function addField( $section, $field, $data )
1610
  {
1611
+ $this->fields[$section]["fields"][$field] = $data;
1612
  }
1613
 
1614
  private function setupFields()
1618
 
1619
  }
1620
  }
1621
+ if ( !class_exists( "FinalTilesGalleryUtils" ) ) {
1622
  class FinalTilesGalleryUtils
1623
  {
1624
  public static function shortcodeToFieldName( $string, $capitalizeFirstCharacter = false )
1645
  }
1646
  }
1647
 
1648
+ if ( class_exists( "FinalTiles_Gallery" ) ) {
1649
  global $ob_FinalTiles_Gallery ;
1650
  $ob_FinalTiles_Gallery = new FinalTiles_Gallery();
1651
+ }
admin/add-gallery.php CHANGED
@@ -6,11 +6,10 @@ if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
6
  ?>
7
 
8
  <?php
9
- $ftg_subtitle = 'New gallery';
10
- ?>
11
-
12
  <?php
13
- include 'header.php';
14
  ?>
15
 
16
 
@@ -19,8 +18,7 @@ include 'header.php';
19
  <div id="ftg-wizard">
20
  <h2><?php
21
  _e( 'Add new gallery wizard', 'final-tiles-gallery' );
22
- ?>
23
- </h2>
24
 
25
  <form action="#" method="post">
26
  <?php
@@ -38,29 +36,25 @@ wp_nonce_field( 'FinalTiles_gallery', 'FinalTiles_gallery' );
38
  <input name="ftg_name" id="name" type="text" class="validate" required="required">
39
  <label for="name"><?php
40
  _e( 'Name of the gallery', 'final-tiles-gallery' );
41
- ?>
42
- </label>
43
  </div>
44
  </div>
45
  <div class="input-field">
46
  <textarea name="ftg_description" class="materialize-textarea" id="description"></textarea>
47
  <label for="description"><?php
48
  _e( 'Description of the gallery', 'final-tiles-gallery' );
49
- ?>
50
- </label>
51
  </div>
52
  </fieldset>
53
  <fieldset data-step="2">
54
  <h5><?php
55
  _e( 'Choose the source of the images', 'final-tiles-gallery' );
56
- ?>
57
- </h5>
58
  <p>
59
  <input class="with-gap" type="radio" checked="checked" name="ftg_source" id="source1" value="images" />
60
  <label for="source1"><?php
61
  _e( 'Media library', 'final-tiles-gallery' );
62
- ?>
63
- </label>
64
  </p>
65
  <p>
66
  <?php
@@ -68,11 +62,9 @@ _e( 'Media library', 'final-tiles-gallery' );
68
  <input disabled class="with-gap" type="radio" name="ftg_source" value="*" id="source2" />
69
  <label for="source2"><?php
70
  _e( 'Recent posts', 'final-tiles-gallery' );
71
- ?>
72
- - <a class="in-wizard-cta" href="<?php
73
  echo ftg_fs()->get_upgrade_url() ;
74
- ?>
75
- "><i class="mdi mdi-bell-ring-outline"></i>
76
  <?php
77
  _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
78
  ?>
@@ -86,11 +78,9 @@ _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
86
  <input class="with-gap" disabled type="radio" name="ftg_source" value="*" id="source3" />
87
  <label for="source3"><?php
88
  _e( 'WooCommerce products', 'final-tiles-gallery' );
89
- ?>
90
- - <a class="in-wizard-cta" href="<?php
91
  echo ftg_fs()->get_upgrade_url() ;
92
- ?>
93
- "><i class="mdi mdi-bell-ring-outline"></i>
94
  <?php
95
  _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
96
  ?>
@@ -103,8 +93,7 @@ _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
103
  <div class="field">
104
  <h5><?php
105
  _e( 'WordPress field for captions:', 'final-tiles-gallery' );
106
- ?>
107
- </h5>
108
  <select class="browser-default" name="ftg_wp_field_caption">
109
  <option value="none"> Don't use captions </option>
110
  <option value="title"> Title </option>
@@ -116,8 +105,7 @@ _e( 'WordPress field for captions:', 'final-tiles-gallery' );
116
  <div class="field">
117
  <h5><?php
118
  _e( 'WordPress field for titles:', 'final-tiles-gallery' );
119
- ?>
120
- </h5>
121
  <select class="browser-default" name="ftg_wp_field_title">
122
  <option value="none"> Don't use titles </option>
123
  <option selected value="title"> Title </option>
@@ -144,39 +132,31 @@ _e( 'WordPress field for titles:', 'final-tiles-gallery' );
144
  <div class="field">
145
  <h5><?php
146
  _e( 'Caption effect:', 'final-tiles-gallery' );
147
- ?>
148
- </h5>
149
  <select class="browser-default" name="ftg_captionEffect">
150
  <option value="none"><?php
151
  _e( 'Fade' );
152
- ?>
153
- </option>
154
  <?php
155
  ?>
156
  <option value="fixed" disabled><?php
157
  _e( 'Fixed' );
158
- ?>
159
- (Upgrade to unlock)</option>
160
  <option value="fixed-bg" disabled><?php
161
  _e( 'Fixed with background' );
162
- ?>
163
- (Upgrade to unlock)</option>
164
  <option value="fixed-then-hidden" disabled><?php
165
  _e( 'Fixed, hidden on hover' );
166
- ?>
167
- (Upgrade to unlock)</option>
168
  <option value="fixed-bottom" disabled><?php
169
  _e( 'Fixed at bottom' );
170
- ?>
171
- (Upgrade to unlock)</option>
172
  <option value="slide-from-top" disabled><?php
173
  _e( 'Slide from top' );
174
- ?>
175
- (Upgrade to unlock)</option>
176
  <option value="slide-from-bottom" disabled><?php
177
  _e( 'Slide from bottom' );
178
- ?>
179
- (Upgrade to unlock)</option>
180
  <?php
181
  ?>
182
  </select>
@@ -188,8 +168,7 @@ _e( 'Slide from bottom' );
188
  <div class="field">
189
  <h5><?php
190
  _e( 'Choose the layout', 'final-tiles-gallery' );
191
- ?>
192
- </h5>
193
  <select class="browser-default" name="layout">
194
  <option value="final">Final Tiles Gallery (mixed image width)</option>
195
  <option value="columns">Masonry (columns, same image width)</option>
@@ -198,41 +177,35 @@ _e( 'Choose the layout', 'final-tiles-gallery' );
198
  <div class="field">
199
  <h5><?php
200
  _e( 'Choose a default image size', 'final-tiles-gallery' );
201
- ?>
202
- </h5>
203
- <select class="browser-default" name="def_imgsize">
204
  <?php
205
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
206
- print '<option value="' . $size . '">' . $size . ' (' . implode( 'x', $atts ) . ')</option>';
207
  }
208
  ?>
209
  </select>
210
  <label><?php
211
  _e( 'You can customize each image later', 'final-tiles-gallery' );
212
- ?>
213
- </label>
214
  <br>
215
  <label class="shortpixel">
216
  <img src="<?php
217
  echo plugins_url( '', __FILE__ ) ;
218
- ?>
219
- /images/icon-shortpixel.png" alt="ShortPixel">
220
  <a target="_blank" href="https://shortpixel.com/wp/af/J4PFT4Z72393"><?php
221
  _e( 'We suggest you to use ShortPixel image optimization plugin for best SEO results.', 'modula-gallery' );
222
- ?>
223
- </a></label>
224
  </div>
225
  <div class="field select-images">
226
  <a class="waves-effect waves-light btn add-images">
227
  <i class="fa fa-plus left"></i> <?php
228
  _e( 'Add images', 'final-tiles-gallery' );
229
- ?>
230
- </a>
231
  <br>
232
  <label><?php
233
  _e( 'You can add images now or later.', 'final-tiles-gallery' );
234
- ?>
235
- </label>
236
  <div class="images list-group"></div>
237
  </div>
238
  </fieldset>
@@ -242,35 +215,28 @@ _e( 'You can add images now or later.', 'final-tiles-gallery' );
242
  </div>
243
  <a class="waves-effect waves-yellow btn-flat prev"><?php
244
  _e( 'Previous', 'final-tiles-gallery' );
245
- ?>
246
- </a>
247
  <a class="waves-effect waves-green btn-flat next"><?php
248
  _e( 'Next', 'final-tiles-gallery' );
249
- ?>
250
- </a>
251
  </footer>
252
  </form>
253
  <div id="success" class="modal">
254
  <div class="modal-content">
255
  <h4><?php
256
  _e( 'Success!', 'final-tiles-gallery' );
257
- ?>
258
- </h4>
259
  <p><?php
260
  _e( 'Your gallery', 'final-tiles-gallery' );
261
- ?>
262
- "<span class="gallery-name"></span>" <?php
263
  _e( 'has been created. Copy the following shortcode:', 'final-tiles-gallery' );
264
- ?>
265
- <br>
266
  <input type="text" readonly class="code"><br>
267
  <?php
268
  _e( 'and paste it inside a post or a page. Otherwise click', 'final-tiles-gallery' );
269
- ?>
270
- <a class='customize'><?php
271
  _e( 'here', 'final-tiles-gallery' );
272
- ?>
273
- </a> <?php
274
  _e( 'to customize
275
  the gallery.', 'final-tiles-gallery' );
276
  ?>
@@ -279,30 +245,33 @@ _e( 'to customize
279
  <div class="modal-'footer">
280
  <a href="?page=ftg-lite-gallery-admin" id="modal-close" class="waves-effect waves-green btn-flat modal-action"><?php
281
  _e( 'Close', 'final-tiles-gallery' );
282
- ?>
283
- </a>
284
  </div>
285
  </div>
286
  <div id="error" class="modal">
287
  <div class="modal-content">
288
  <h4><?php
289
  _e( 'Error!', 'final-tiles-gallery' );
290
- ?>
291
- </h4>
292
  <p><?php
293
  _e( 'For some reason it was not possible to save your gallery, please contact', 'final-tiles-gallery' );
294
- ?>
295
- <a href="?page=ftg-support"><?php
296
  _e( 'support', 'final-tiles-gallery' );
297
- ?>
298
- </a>.</p>
299
  </div>
300
  <div class="modal-footer">
301
  <a href="?page=ftg-lite-gallery-admin" class="waves-effect waves-green btn-flat modal-action modal-close"><?php
302
  _e( 'Close', 'final-tiles-gallery' );
303
- ?>
304
- </a>
305
  </div>
306
  </div>
307
  </div>
308
- </div>
 
 
 
 
 
 
 
 
6
  ?>
7
 
8
  <?php
9
+ $ftg_subtitle = "New gallery";
10
+ ?>
 
11
  <?php
12
+ include "header.php";
13
  ?>
14
 
15
 
18
  <div id="ftg-wizard">
19
  <h2><?php
20
  _e( 'Add new gallery wizard', 'final-tiles-gallery' );
21
+ ?></h2>
 
22
 
23
  <form action="#" method="post">
24
  <?php
36
  <input name="ftg_name" id="name" type="text" class="validate" required="required">
37
  <label for="name"><?php
38
  _e( 'Name of the gallery', 'final-tiles-gallery' );
39
+ ?></label>
 
40
  </div>
41
  </div>
42
  <div class="input-field">
43
  <textarea name="ftg_description" class="materialize-textarea" id="description"></textarea>
44
  <label for="description"><?php
45
  _e( 'Description of the gallery', 'final-tiles-gallery' );
46
+ ?></label>
 
47
  </div>
48
  </fieldset>
49
  <fieldset data-step="2">
50
  <h5><?php
51
  _e( 'Choose the source of the images', 'final-tiles-gallery' );
52
+ ?></h5>
 
53
  <p>
54
  <input class="with-gap" type="radio" checked="checked" name="ftg_source" id="source1" value="images" />
55
  <label for="source1"><?php
56
  _e( 'Media library', 'final-tiles-gallery' );
57
+ ?></label>
 
58
  </p>
59
  <p>
60
  <?php
62
  <input disabled class="with-gap" type="radio" name="ftg_source" value="*" id="source2" />
63
  <label for="source2"><?php
64
  _e( 'Recent posts', 'final-tiles-gallery' );
65
+ ?> - <a class="in-wizard-cta" href="<?php
 
66
  echo ftg_fs()->get_upgrade_url() ;
67
+ ?>"><i class="mdi mdi-bell-ring-outline"></i>
 
68
  <?php
69
  _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
70
  ?>
78
  <input class="with-gap" disabled type="radio" name="ftg_source" value="*" id="source3" />
79
  <label for="source3"><?php
80
  _e( 'WooCommerce products', 'final-tiles-gallery' );
81
+ ?> - <a class="in-wizard-cta" href="<?php
 
82
  echo ftg_fs()->get_upgrade_url() ;
83
+ ?>"><i class="mdi mdi-bell-ring-outline"></i>
 
84
  <?php
85
  _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
86
  ?>
93
  <div class="field">
94
  <h5><?php
95
  _e( 'WordPress field for captions:', 'final-tiles-gallery' );
96
+ ?></h5>
 
97
  <select class="browser-default" name="ftg_wp_field_caption">
98
  <option value="none"> Don't use captions </option>
99
  <option value="title"> Title </option>
105
  <div class="field">
106
  <h5><?php
107
  _e( 'WordPress field for titles:', 'final-tiles-gallery' );
108
+ ?></h5>
 
109
  <select class="browser-default" name="ftg_wp_field_title">
110
  <option value="none"> Don't use titles </option>
111
  <option selected value="title"> Title </option>
132
  <div class="field">
133
  <h5><?php
134
  _e( 'Caption effect:', 'final-tiles-gallery' );
135
+ ?></h5>
 
136
  <select class="browser-default" name="ftg_captionEffect">
137
  <option value="none"><?php
138
  _e( 'Fade' );
139
+ ?></option>
 
140
  <?php
141
  ?>
142
  <option value="fixed" disabled><?php
143
  _e( 'Fixed' );
144
+ ?> (Upgrade to unlock)</option>
 
145
  <option value="fixed-bg" disabled><?php
146
  _e( 'Fixed with background' );
147
+ ?> (Upgrade to unlock)</option>
 
148
  <option value="fixed-then-hidden" disabled><?php
149
  _e( 'Fixed, hidden on hover' );
150
+ ?> (Upgrade to unlock)</option>
 
151
  <option value="fixed-bottom" disabled><?php
152
  _e( 'Fixed at bottom' );
153
+ ?> (Upgrade to unlock)</option>
 
154
  <option value="slide-from-top" disabled><?php
155
  _e( 'Slide from top' );
156
+ ?> (Upgrade to unlock)</option>
 
157
  <option value="slide-from-bottom" disabled><?php
158
  _e( 'Slide from bottom' );
159
+ ?> (Upgrade to unlock)</option>
 
160
  <?php
161
  ?>
162
  </select>
168
  <div class="field">
169
  <h5><?php
170
  _e( 'Choose the layout', 'final-tiles-gallery' );
171
+ ?></h5>
 
172
  <select class="browser-default" name="layout">
173
  <option value="final">Final Tiles Gallery (mixed image width)</option>
174
  <option value="columns">Masonry (columns, same image width)</option>
177
  <div class="field">
178
  <h5><?php
179
  _e( 'Choose a default image size', 'final-tiles-gallery' );
180
+ ?></h5>
181
+ <select class="browser-default def_imgsize" name="def_imgsize">
 
182
  <?php
183
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
184
+ print '<option value="' . $size . '">' . $size . " (" . implode( 'x', $atts ) . ")</option>";
185
  }
186
  ?>
187
  </select>
188
  <label><?php
189
  _e( 'You can customize each image later', 'final-tiles-gallery' );
190
+ ?></label>
 
191
  <br>
192
  <label class="shortpixel">
193
  <img src="<?php
194
  echo plugins_url( '', __FILE__ ) ;
195
+ ?>/images/icon-shortpixel.png" alt="ShortPixel">
 
196
  <a target="_blank" href="https://shortpixel.com/wp/af/J4PFT4Z72393"><?php
197
  _e( 'We suggest you to use ShortPixel image optimization plugin for best SEO results.', 'modula-gallery' );
198
+ ?></a></label>
 
199
  </div>
200
  <div class="field select-images">
201
  <a class="waves-effect waves-light btn add-images">
202
  <i class="fa fa-plus left"></i> <?php
203
  _e( 'Add images', 'final-tiles-gallery' );
204
+ ?></a>
 
205
  <br>
206
  <label><?php
207
  _e( 'You can add images now or later.', 'final-tiles-gallery' );
208
+ ?></label>
 
209
  <div class="images list-group"></div>
210
  </div>
211
  </fieldset>
215
  </div>
216
  <a class="waves-effect waves-yellow btn-flat prev"><?php
217
  _e( 'Previous', 'final-tiles-gallery' );
218
+ ?></a>
 
219
  <a class="waves-effect waves-green btn-flat next"><?php
220
  _e( 'Next', 'final-tiles-gallery' );
221
+ ?></a>
 
222
  </footer>
223
  </form>
224
  <div id="success" class="modal">
225
  <div class="modal-content">
226
  <h4><?php
227
  _e( 'Success!', 'final-tiles-gallery' );
228
+ ?></h4>
 
229
  <p><?php
230
  _e( 'Your gallery', 'final-tiles-gallery' );
231
+ ?> "<span class="gallery-name"></span>" <?php
 
232
  _e( 'has been created. Copy the following shortcode:', 'final-tiles-gallery' );
233
+ ?><br>
 
234
  <input type="text" readonly class="code"><br>
235
  <?php
236
  _e( 'and paste it inside a post or a page. Otherwise click', 'final-tiles-gallery' );
237
+ ?> <a class='customize'><?php
 
238
  _e( 'here', 'final-tiles-gallery' );
239
+ ?></a> <?php
 
240
  _e( 'to customize
241
  the gallery.', 'final-tiles-gallery' );
242
  ?>
245
  <div class="modal-'footer">
246
  <a href="?page=ftg-lite-gallery-admin" id="modal-close" class="waves-effect waves-green btn-flat modal-action"><?php
247
  _e( 'Close', 'final-tiles-gallery' );
248
+ ?></a>
 
249
  </div>
250
  </div>
251
  <div id="error" class="modal">
252
  <div class="modal-content">
253
  <h4><?php
254
  _e( 'Error!', 'final-tiles-gallery' );
255
+ ?></h4>
 
256
  <p><?php
257
  _e( 'For some reason it was not possible to save your gallery, please contact', 'final-tiles-gallery' );
258
+ ?><a href="?page=ftg-support"><?php
 
259
  _e( 'support', 'final-tiles-gallery' );
260
+ ?></a>.</p>
 
261
  </div>
262
  <div class="modal-footer">
263
  <a href="?page=ftg-lite-gallery-admin" class="waves-effect waves-green btn-flat modal-action modal-close"><?php
264
  _e( 'Close', 'final-tiles-gallery' );
265
+ ?></a>
 
266
  </div>
267
  </div>
268
  </div>
269
+ </div>
270
+ <script>
271
+ jQuery(function (){
272
+ var $ = jQuery;
273
+ $(".def_imgsize").val("medium");
274
+
275
+ $()
276
+ });
277
+ </script>
admin/include/edit-gallery.php CHANGED
@@ -16,7 +16,7 @@ if ( !function_exists( 'ftg_p' ) ) {
16
  if ( $gallery == NULL || $gallery->{$field} === NULL ) {
17
 
18
  if ( $default === NULL ) {
19
- print '';
20
  } else {
21
  print stripslashes( $default );
22
  }
@@ -31,7 +31,7 @@ if ( !function_exists( 'ftg_p' ) ) {
31
  $gallery,
32
  $field,
33
  $value,
34
- $type = 'selected'
35
  )
36
  {
37
  global $ftg_options ;
@@ -43,7 +43,7 @@ if ( !function_exists( 'ftg_p' ) ) {
43
 
44
 
45
  if ( $gallery == NULL ) {
46
- print '';
47
  } else {
48
  if ( $gallery->{$field} == $value ) {
49
  print $type;
@@ -54,30 +54,30 @@ if ( !function_exists( 'ftg_p' ) ) {
54
 
55
  function ftg_checkFieldDisabled( $options )
56
  {
57
- if ( count( $options ) == 3 && $options[2] == 'disabled' ) {
58
- return 'disabled';
59
  }
60
- return '';
61
  }
62
 
63
  function ftg_checkDisabledOption( $plan )
64
  {
65
- return 'disabled';
66
- return '';
67
  }
68
 
69
  function ftg_printPro( $plan )
70
  {
71
- return ' (upgrade to unlock)';
72
- return '';
73
  }
74
 
75
  function ftg_printFieldPro( $options )
76
  {
77
- if ( count( $options ) == 3 && $options[2] == 'disabled' ) {
78
- return ' (upgrade to unlock)';
79
  }
80
- return '';
81
  }
82
 
83
  }
@@ -89,7 +89,7 @@ $filters = explode( '|', $gallery->filters );
89
  $idx = 0;
90
  function ftgSortByName( $a, $b )
91
  {
92
- return $a['name'] > $b['name'];
93
  }
94
 
95
  ?>
@@ -101,52 +101,46 @@ foreach ( $ftg_fields as $section => $s ) {
101
  ?>
102
  <li id="<?php
103
  _e( FinalTiles_Gallery::slugify( $section ) );
104
- ?>
105
- ">
106
  <div class="collapsible-header">
107
  <i class="mdi <?php
108
- _e( $s['icon'] );
109
- ?>
110
- ftg-section-icon white-text <?php
111
  print $colors[$idx];
112
- ?>
113
- darken-2"></i> <?php
114
  _e( $section );
115
  ?>
116
  </div>
117
  <div class="collapsible-body <?php
118
  print $colors[$idx];
119
- ?>
120
- lighten-5 tab form-fields">
121
  <div class="jump-head">
122
  <?php
123
  $jumpFields = array();
124
- foreach ( $s['fields'] as $f => $data ) {
125
  $jumpFields[$f] = $data;
126
  $jumpFields[$f]['_code'] = $f;
127
  }
128
  unset( $f );
129
  unset( $data );
130
- usort( $jumpFields, 'ftgSortByName' );
131
  ?>
132
  <select class="browser-default jump">
133
  <option><?php
134
  _e( 'Jump to setting', 'final-tiles-gallery' );
135
- ?>
136
- </option>
137
  <?php
138
  foreach ( $jumpFields as $f => $data ) {
139
  ?>
140
  <?php
141
 
142
- if ( is_array( $data['excludeFrom'] ) && !in_array( $ftg_parent_page, $data['excludeFrom'] ) ) {
143
  ?>
144
  <option value="<?php
145
  _e( $data['_code'] );
146
- ?>
147
- ">
148
  <?php
149
- _e( $data['name'] );
150
  ?>
151
  </option>
152
  <?php
@@ -160,20 +154,18 @@ foreach ( $ftg_fields as $section => $s ) {
160
 
161
  <?php
162
 
163
- if ( array_key_exists( 'presets', $s ) ) {
164
  ?>
165
  <select class="browser-default presets" data-field-idx="<?php
166
  echo $idx ;
167
- ?>
168
- ">
169
  <option value="">Select preset</option>
170
  <?php
171
- foreach ( $s['presets'] as $preset => $data ) {
172
  ?>
173
  <option><?php
174
  echo $preset ;
175
- ?>
176
- </option>
177
  <?php
178
  }
179
  ?>
@@ -186,32 +178,29 @@ foreach ( $ftg_fields as $section => $s ) {
186
  <table>
187
  <tbody>
188
  <?php
189
- foreach ( $s['fields'] as $f => $data ) {
190
  ?>
191
  <?php
192
 
193
- if ( is_array( $data['excludeFrom'] ) && !in_array( $ftg_parent_page, $data['excludeFrom'] ) ) {
194
  ?>
195
 
196
  <tr class="row-<?php
197
  print $f;
198
- ?>
199
- <?php
200
- print $data['type'];
201
- ?>
202
- ">
203
  <th scope="row">
204
  <label><?php
205
- _e( $data['name'] );
206
  ?>
207
  <?php
208
 
209
- if ( $data['mu'] ) {
210
  ?>
211
  (<?php
212
- _e( $data['mu'] );
213
- ?>
214
- )
215
  <?php
216
  }
217
 
@@ -220,72 +209,62 @@ foreach ( $ftg_fields as $section => $s ) {
220
  </th>
221
  <td>
222
  <div class="field <?php
223
- echo ( in_array( 'shortcode', $data['excludeFrom'] ) ? '' : 'js-update-shortcode' ) ;
224
- ?>
225
- ">
226
  <?php
227
 
228
- if ( $data['type'] == 'text' ) {
229
  ?>
230
  <div class="text">
231
  <input type="text" size="30" name="ftg_<?php
232
  print $f;
233
- ?>
234
- " value="<?php
235
- ftg_p( $gallery, $f, $data['default'] );
236
- ?>
237
- " />
238
  </div>
239
  <?php
240
- } elseif ( $data['type'] == 'cta' ) {
241
  ?>
242
  <div class="text">
243
  <a class="in-table-cta" href="<?php
244
  echo ftg_fs()->get_upgrade_url() ;
245
- ?>
246
- "><i class="mdi mdi-bell-ring-outline"></i>
247
  <?php
248
  _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
249
  ?>
250
  </a>
251
  </div>
252
  <?php
253
- } elseif ( $data['type'] == 'select' ) {
254
  ?>
255
  <div class="text">
256
  <select class="browser-default" name="ftg_<?php
257
  print $f;
258
- ?>
259
- ">
260
  <?php
261
- foreach ( array_keys( $data['values'] ) as $optgroup ) {
262
  ?>
263
  <optgroup label="<?php
264
  print $optgroup;
265
- ?>
266
- ">
267
  <?php
268
- foreach ( $data['values'][$optgroup] as $option ) {
269
  ?>
270
 
271
  <?php
272
- $v = explode( '|', $option );
273
  ?>
274
 
275
  <option <?php
276
  echo ftg_checkFieldDisabled( $v ) ;
277
- ?>
278
- <?php
279
  ftg_sel( $gallery, $f, $v[0] );
280
- ?>
281
- value="<?php
282
  print $v[0];
283
- ?>
284
- "><?php
285
  print $v[1];
286
  echo ftg_printFieldPro( $v ) ;
287
- ?>
288
- </option>
289
  <?php
290
  }
291
  ?>
@@ -296,7 +275,7 @@ foreach ( $ftg_fields as $section => $s ) {
296
  </select>
297
  <?php
298
 
299
- if ( $f == 'lightbox' ) {
300
  ?>
301
  <div class="col s12 ftg-everlightbox-settings">
302
  <?php
@@ -315,8 +294,7 @@ foreach ( $ftg_fields as $section => $s ) {
315
  <?php
316
  }
317
 
318
- ?>
319
-
320
  </div>
321
  <?php
322
  }
@@ -324,88 +302,73 @@ foreach ( $ftg_fields as $section => $s ) {
324
  ?>
325
  </div>
326
  <?php
327
- } elseif ( $data['type'] == 'toggle' ) {
328
  ?>
329
  <div class="text">
330
  <input type="checkbox" class="ftg-checkbox" id="ftg_<?php
331
  print $f;
332
- ?>
333
- " name="ftg_<?php
334
  print $f;
335
- ?>
336
- " value="<?php
337
- ftg_p( $gallery, $f, $data['default'] );
338
- ?>
339
- " <?php
340
  ftg_sel(
341
  $gallery,
342
  $f,
343
- 'T',
344
- 'checked'
345
  );
346
- ?>
347
- />
348
  <label for="ftg_<?php
349
  print $f;
350
- ?>
351
- "><?php
352
- _e( $data['description'] );
353
- ?>
354
- </label>
355
  </div>
356
 
357
  <?php
358
- } elseif ( $data['type'] == 'slider' ) {
359
  ?>
360
 
361
  <div class="text">
362
  <p class="range-field">
363
  <input name="ftg_<?php
364
  print $f;
365
- ?>
366
- " value="<?php
367
- ftg_p( $gallery, $f, $data['default'] );
368
- ?>
369
- " type="range" min="<?php
370
- print $data['min'];
371
- ?>
372
- " max="<?php
373
- print $data['max'];
374
- ?>
375
- " />
376
  </p>
377
  </div>
378
 
379
  <?php
380
- } elseif ( $data['type'] == 'number' ) {
381
  ?>
382
  <div class="text">
383
  <input type="text" name="ftg_<?php
384
  print $f;
385
- ?>
386
- " class="integer-only" value="<?php
387
- ftg_p( $gallery, $f, $data['default'] );
388
- ?>
389
- " >
390
  </div>
391
 
392
  <?php
393
- } elseif ( $data['type'] == 'color' ) {
394
  ?>
395
  <div class="text">
396
  <input type="text" size="6" data-default-color="<?php
397
- print $data['default'];
398
- ?>
399
- " name="ftg_<?php
400
  print $f;
401
- ?>
402
- " value="<?php
403
- ftg_p( $gallery, $f, $data['default'] );
404
- ?>
405
- " class='pickColor' /> </div>
406
 
407
  <?php
408
- } elseif ( $data['type'] == 'filter' ) {
409
  ?>
410
 
411
  <div class="filters gallery-filters dynamic-table">
@@ -414,29 +377,25 @@ foreach ( $ftg_fields as $section => $s ) {
414
  <i class="fa fa-plus left"></i> Add filter</a>
415
  <p class="reset"><button class="waves-effect waves-light btn yellow reset-default-filter">Reset selected filter</button></p>
416
  <input type="hidden" name="ftg_filters" value="<?php
417
- ftg_p( $gallery, 'filters' );
418
- ?>
419
- " />
420
  <input type="hidden" name="filter_def" value="<?php
421
- ftg_p( $gallery, 'defaultFilter' );
422
- ?>
423
- " />
424
  </div>
425
 
426
  <?php
427
- } elseif ( $data['type'] == 'textarea' ) {
428
  ?>
429
  <div class="text">
430
  <textarea name="ftg_<?php
431
  print $f;
432
- ?>
433
- "><?php
434
  ftg_p( $gallery, $f );
435
- ?>
436
- </textarea>
437
  </div>
438
  <?php
439
- } elseif ( $data['type'] == 'custom_isf' ) {
440
  ?>
441
  <div class="custom_isf dynamic-table">
442
  <table class="striped">
@@ -445,27 +404,23 @@ foreach ( $ftg_fields as $section => $s ) {
445
  <th></th>
446
  <th><?php
447
  _e( 'Resolution', 'final-tiles-gallery' );
448
- ?>
449
- (px)</th>
450
  <th><?php
451
  _e( 'Size factor', 'final-tiles-gallery' );
452
- ?>
453
- (%)</th>
454
  </tr>
455
  </thead>
456
  <tbody>
457
  </tbody>
458
  </table>
459
  <input type="hidden" name="ftg_imageSizeFactorCustom" value="<?php
460
- ftg_p( $gallery, 'imageSizeFactorCustom' );
461
- ?>
462
- " />
463
  <a href="#" class="add waves-effect waves-light btn">
464
  <i class="mdi-content-add left"></i>
465
  <?php
466
  _e( 'Add resolution', 'final-tiles-gallery' );
467
- ?>
468
- </a>
469
  </div>
470
  <?php
471
  }
@@ -474,37 +429,32 @@ foreach ( $ftg_fields as $section => $s ) {
474
  <div class="help">
475
  <?php
476
 
477
- if ( strlen( $data['description'] ) ) {
478
  ?>
479
  <p><?php
480
- _e( $data['description'] );
481
- ?>
482
- </p>
483
  <?php
484
  }
485
 
486
  ?>
487
  <?php
488
 
489
- if ( !in_array( 'shortcode', $data['excludeFrom'] ) && $data['type'] != 'cta' ) {
490
  ?>
491
  <div class="ftg-code">
492
  <a href="#" class="toggle-shortcode" data-code="<?php
493
  print $f;
494
- ?>
495
- "><i class="mdi mdi-settings"></i></a>
496
  <span id="shortcode-<?php
497
  print $f;
498
- ?>
499
- ">
500
  Shortcode attribute:
501
  <input type="text" class="shortcode-val" readonly="" value='<?php
502
  _e( FinalTilesGalleryUtils::fieldNameToShortcode( $f ) );
503
- ?>
504
- ="<?php
505
- ftg_p( $gallery, $f, $data['default'] );
506
- ?>
507
- "'>
508
  </span>
509
  </div>
510
  <?php
@@ -519,8 +469,7 @@ foreach ( $ftg_fields as $section => $s ) {
519
  <?php
520
  }
521
 
522
- ?>
523
-
524
  <?php
525
  }
526
  ?>
@@ -538,46 +487,38 @@ foreach ( $ftg_fields as $section => $s ) {
538
  <div class="collapsible-header">
539
  <i class="mdi mdi-image-filter ftg-section-icon white-text <?php
540
  print $colors[$idx];
541
- ?>
542
- darken-2"></i> <?php
543
  _e( 'Images', 'final-tiles-gallery' );
544
  ?>
545
  </div>
546
  <div class="collapsible-body <?php
547
  print $colors[$idx];
548
- ?>
549
- lighten-5">
550
  <div id="images" class="ftg-section form-fields">
551
  <div class="actions">
552
  <label><?php
553
  _e( 'Source:', 'final-tiles-gallery' );
554
- ?>
555
- </label>
556
  <select name="ftg_source" class="browser-default">
557
  <option value="images"><?php
558
  _e( 'User images', 'final-tiles-gallery' );
559
- ?>
560
- </option>
561
  <option value="posts" <?php
562
  echo ftg_checkDisabledOption( 'ultimate' ) ;
563
- ?>
564
- ><?php
565
  _e( 'Recent posts with featured image', 'final-tiles-gallery' );
566
  echo ftg_printPro( 'ultimate' ) ;
567
- ?>
568
- </option>
569
  <?php
570
 
571
  if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
572
  ?>
573
  <option value="woocommerce" <?php
574
  echo ftg_checkDisabledOption( 'ultimate' ) ;
575
- ?>
576
- ><?php
577
  _e( 'WooCommerce products', 'final-tiles-gallery' );
578
  echo ftg_printPro( 'ultimate' ) ;
579
- ?>
580
- </option>
581
  <?php
582
  }
583
 
@@ -589,13 +530,11 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
589
  <label>Loading method</label>
590
  <select name="ftg_loadMethod" class="browser-default">
591
  <option <?php
592
- ftg_sel( $gallery, 'loadMethod', 'sequential' );
593
- ?>
594
- value="sequential">Sequential</option>
595
  <option <?php
596
- ftg_sel( $gallery, 'loadMethod', 'lazy' );
597
- ?>
598
- value="lazy">Lazy</option>
599
  </select>
600
  </div>
601
  </div>
@@ -604,21 +543,18 @@ ftg_sel( $gallery, 'loadMethod', 'lazy' );
604
  <label>Ajax loading</label>
605
  <select name="ftg_ajaxLoading" class="browser-default js-ajax-loading-control">
606
  <option <?php
607
- ftg_sel( $gallery, 'ajaxLoading', 'F' );
608
- ?>
609
- value="F">Complete markup on page</option>
610
  <option <?php
611
- ftg_sel( $gallery, 'ajaxLoading', 'T' );
612
- ?>
613
- value="T">Enable ajax loading (still in beta!)</option>
614
  </select>
615
  </div>
616
  <div class="row js-ajax-loading" style="display:none;">
617
  <label>Number of images to load via ajax</label>
618
  <input class="browser-default" type="text" value="<?php
619
  echo $gallery->tilesPerPage ;
620
- ?>
621
- " name="ftg_tilesPerPage">
622
  </div>
623
  </div>
624
  <div class="actions source-images source-panel">
@@ -627,73 +563,58 @@ echo $gallery->tilesPerPage ;
627
  <span class="shortpixel">
628
  <img src="<?php
629
  echo plugins_url( '', __FILE__ ) ;
630
- ?>
631
- /../images/icon-shortpixel.png" alt="ShortPixel">
632
  <a target="_blank" href="https://shortpixel.com/wp/af/J4PFT4Z72393"><?php
633
  _e( 'We suggest you to use ShortPixel image optimization plugin for best SEO results.', 'modula-gallery' );
634
- ?>
635
- </a></span>
636
  </div>
637
  <label><?php
638
  _e( 'Image size', 'final-tiles-gallery' );
639
- ?>
640
- </label>
641
 
642
  <select class="current-image-size browser-default">
643
  <?php
644
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
645
- print '<option value="' . $size . '">' . $size . ' (' . implode( 'x', $atts ) . ')</option>';
646
  }
647
  ?>
648
  </select>
649
  <p class="tips"><?php
650
  _e( 'Want to add more images sizes?', 'final-tiles-gallery' );
651
- ?>
652
- <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
653
  _e( 'Read a simple tutorial.', 'final-tiles-gallery' );
654
- ?>
655
- </a></p>
656
  <div class="tips">
657
  <strong><?php
658
  _e( 'About choosing a proper image size:', 'final-tiles-gallery' );
659
- ?>
660
- </strong> <?php
661
- _e( 'Final Tiles Gallery doesn\'t scale down the images when there\'s enough space, it gives you the freedom to choose your favourite size for each image. So you should use images that are smaller than the container, choose the', 'final-tiles-gallery' );
662
- ?>
663
- <strong><?php
664
  _e( 'thumbnail', 'final-tiles-gallery' );
665
- ?>
666
- </strong> <?php
667
  _e( 'or', 'final-tiles-gallery' );
668
- ?>
669
- <strong><?php
670
  _e( 'medium', 'final-tiles-gallery' );
671
- ?>
672
- </strong> <?php
673
  _e( 'size, for example.', 'final-tiles-gallery' );
674
- ?>
675
- <br>
676
  <br>
677
  <?php
678
  _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
679
- ?>
680
- <a href="https://www.youtube.com/watch?v=RNT4JGjtyrs" target="_blank"><?php
681
  _e( 'video tutorial', 'final-tiles-gallery' );
682
- ?>
683
- </a>.
684
  </div>
685
  </div>
686
  <div class="row">
687
  <a href="#" class="open-media-panel waves-effect waves-light btn action"><i class="mdi mdi-image-area"></i> <?php
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>
@@ -701,67 +622,53 @@ _e( 'Add video', 'final-tiles-gallery' );
701
  <p class="tips"><?php
702
  _e( 'For multiple selections: Click+CTRL.
703
  Drag images to change order.', 'final-tiles-gallery' );
704
- ?>
705
- </p>
706
  </div>
707
  </div>
708
  <div class="actions source-posts source-panel">
709
  <div class="row">
710
  <label><?php
711
  _e( 'Image size', 'final-tiles-gallery' );
712
- ?>
713
- </label>
714
 
715
  <select class="browser-default" name="ftg_defaultPostImageSize">
716
  <?php
717
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
718
- print '<option ' . (( $size == $gallery->defaultPostImageSize ? 'selected' : '' )) . ' value="' . $size . '">' . $size . ' (' . implode( 'x', $atts ) . ')</option>';
719
  }
720
  ?>
721
  </select>
722
  <p class="tips"><?php
723
  _e( 'Want to add more images sizes?', 'final-tiles-gallery' );
724
- ?>
725
- <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
726
  _e( 'Read a simple tutorial.', 'final-tiles-gallery' );
727
- ?>
728
- </a></p>
729
  <div class="tips">
730
  <strong><?php
731
  _e( 'About choosing a proper image size:', 'final-tiles-gallery' );
732
- ?>
733
- </strong> <?php
734
- _e( 'Final Tiles Gallery doesn\'t scale down the images
735
- when there\'s enough space, it gives you the freedom to choose your favourite size for each image.
736
- So you should use images that are smaller than the container, choose the', 'final-tiles-gallery' );
737
- ?>
738
- <strong><?php
739
  _e( 'thumbnail', 'final-tiles-gallery' );
740
- ?>
741
- </strong> <?php
742
  _e( 'or', 'final-tiles-gallery' );
743
  ?>
744
  <strong><?php
745
  _e( 'medium', 'final-tiles-gallery' );
746
- ?>
747
- </strong> <?php
748
  _e( 'size, for example.', 'final-tiles-gallery' );
749
- ?>
750
- <br>
751
  <br>
752
  <?php
753
  _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
754
- ?>
755
- <a href="https://www.youtube.com/watch?v=RNT4JGjtyrs" target="_blank"><?php
756
  _e( 'video tutorial', 'final-tiles-gallery' );
757
- ?>
758
- </a>.
759
  </div>
760
  <div class="row checkboxes">
761
  <strong class="label"><?php
762
  _e( 'Post type:', 'final-tiles-gallery' );
763
- ?>
764
- </strong>
765
  <span>
766
  <?php
767
  $idx = 0;
@@ -775,18 +682,14 @@ foreach ( get_post_types( '', 'names' ) as $t ) {
775
  ?>
776
  <input id="post-type-<?php
777
  _e( $idx );
778
- ?>
779
- " type="checkbox" name="post_types" value="<?php
780
  _e( $t );
781
- ?>
782
- ">
783
  <label for="post-type-<?php
784
  _e( $idx );
785
- ?>
786
- "><?php
787
  _e( $t );
788
- ?>
789
- </label>
790
  <?php
791
  $idx++;
792
  ?>
@@ -799,15 +702,13 @@ foreach ( get_post_types( '', 'names' ) as $t ) {
799
  ?>
800
  <input type="hidden" name="ftg_post_types" value="<?php
801
  _e( $gallery->post_types );
802
- ?>
803
- " />
804
  </span>
805
  </div>
806
  <div class="row checkboxes">
807
  <strong class="label"><?php
808
  _e( 'Categories:', 'final-tiles-gallery' );
809
- ?>
810
- </strong>
811
  <span>
812
  <?php
813
  $idx = 0;
@@ -817,18 +718,14 @@ foreach ( get_categories() as $c ) {
817
  ?>
818
  <input id="post-cat-<?php
819
  _e( $idx );
820
- ?>
821
- " type="checkbox" name="post_categories" value="<?php
822
  _e( $c->cat_ID );
823
- ?>
824
- ">
825
  <label for="post-cat-<?php
826
  _e( $idx );
827
- ?>
828
- "><?php
829
  _e( $c->name );
830
- ?>
831
- </label>
832
  <?php
833
  $idx++;
834
  ?>
@@ -837,15 +734,13 @@ foreach ( get_categories() as $c ) {
837
  ?>
838
  <input type="hidden" name="ftg_post_categories" value="<?php
839
  _e( $gallery->post_categories );
840
- ?>
841
- " />
842
  </span>
843
  </div>
844
  <div class="row checkboxes">
845
  <strong class="label"><?php
846
  _e( 'Tags:', 'final-tiles-gallery' );
847
- ?>
848
- </strong>
849
  <span>
850
  <?php
851
  $tags = get_tags();
@@ -859,18 +754,14 @@ foreach ( $tags as $c ) {
859
 
860
  <input id="post-tag-<?php
861
  _e( $idx );
862
- ?>
863
- " type="checkbox" name="post_tags" value="<?php
864
  _e( $c->term_id );
865
- ?>
866
- ">
867
  <label for="post-tag-<?php
868
  _e( $idx );
869
- ?>
870
- "><?php
871
  _e( $c->name );
872
- ?>
873
- </label>
874
  <?php
875
  $idx++;
876
  ?>
@@ -890,24 +781,20 @@ if ( count( $tags ) == 0 ) {
890
  ?>
891
  <input type="hidden" name="ftg_post_tags" value="<?php
892
  echo $gallery->post_tags ;
893
- ?>
894
- " />
895
  </span>
896
  </div>
897
  <div class="row checkboxes">
898
  <strong class="label"><?php
899
  _e( 'Max posts:', 'final-tiles-gallery' );
900
- ?>
901
- </strong>
902
  <span class="aside">
903
  <input type="text" name="ftg_max_posts" value="<?php
904
  echo $gallery->max_posts ;
905
- ?>
906
- ">
907
  <span><?php
908
  _e( '(enter 0 for unlimited posts)', 'final-tiles-gallery' );
909
- ?>
910
- </span>
911
  </span>
912
  </div>
913
  </div>
@@ -920,59 +807,46 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
920
  <div class="row">
921
  <label><?php
922
  _e( 'Image size', 'final-tiles-gallery' );
923
- ?>
924
- </label>
925
 
926
  <select class="browser-default" name="ftg_defaultWooImageSize">
927
  <?php
928
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
929
- print '<option ' . (( $size == $gallery->defaultWooImageSize ? 'selected' : '' )) . ' value="' . $size . '">' . $size . ' (' . implode( 'x', $atts ) . ')</option>';
930
  }
931
  ?>
932
  </select>
933
  <p class="tips"><?php
934
  _e( 'Want to add more images sizes?', 'final-tiles-gallery' );
935
- ?>
936
- <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
937
  _e( 'Read a simple tutorial.', 'final-tiles-gallery' );
938
- ?>
939
- </a></p>
940
  <div class="tips">
941
  <strong><?php
942
  _e( 'About choosing a proper image size:', 'final-tiles-gallery' );
943
- ?>
944
- </strong> <?php
945
- _e( 'Final Tiles Gallery doesn\'t scale down the images
946
- when there\'s enough space, it gives you the freedom to choose your favourite size for each image.
947
- So you should use images that are smaller than the container, choose the', 'final-tiles-gallery' );
948
- ?>
949
- <strong><?php
950
  _e( 'thumbnail', 'final-tiles-gallery' );
951
- ?>
952
- </strong> <?php
953
  _e( 'or', 'final-tiles-gallery' );
954
  ?>
955
  <strong><?php
956
  _e( 'medium', 'final-tiles-gallery' );
957
- ?>
958
- </strong> <?php
959
  _e( 'size, for example.', 'final-tiles-gallery' );
960
- ?>
961
- <br>
962
  <br>
963
  <?php
964
  _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
965
- ?>
966
- <a href="https://www.youtube.com/watch?v=RNT4JGjtyrs" target="_blank"><?php
967
  _e( 'video tutorial', 'final-tiles-gallery' );
968
- ?>
969
- </a>.
970
  </div>
971
  <div class="row checkboxes">
972
  <strong class="label"><?php
973
  _e( 'Categories:', 'final-tiles-gallery' );
974
- ?>
975
- </strong>
976
  <span>
977
  <?php
978
  $idx = 0;
@@ -982,58 +856,47 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
982
  ?>
983
  <input id="woo-cat-<?php
984
  _e( $idx );
985
- ?>
986
- " type="checkbox" name="woo_cat" value="<?php
987
  _e( $c->cat_ID );
988
- ?>
989
- ">
990
  <label for="woo-cat-<?php
991
  _e( $idx );
992
- ?>
993
- "><?php
994
  _e( $c->cat_name );
995
- ?>
996
- </label>
997
  <?php
998
  $idx++;
999
- ?>
1000
-
1001
  <?php
1002
  }
1003
  ?>
1004
  <input type="hidden" name="ftg_woo_categories" value="<?php
1005
  _e( $gallery->woo_categories );
1006
- ?>
1007
- " />
1008
  </span>
1009
  </div>
1010
  </div>
1011
  <?php
1012
  }
1013
 
1014
- ?>
1015
-
1016
  </div>
1017
  <div class="actions">
1018
  <div class="bulk row">
1019
  <label><?php
1020
  _e( 'Bulk Actions', 'final-tiles-gallery' );
1021
- ?>
1022
- </label>
1023
  <div class="options">
1024
  <span class="indigo lighten-4">
1025
  <a class="btn indigo darken-4 waves-effect waves-light" href="#" data-action="select"><?php
1026
  _e( 'Select all', 'final-tiles-gallery' );
1027
- ?>
1028
- </a>
1029
  <a class="btn indigo darken-4 waves-effect waves-light" href="#" data-action="deselect"><?php
1030
  _e( 'Deselect all', 'final-tiles-gallery' );
1031
- ?>
1032
- </a>
1033
  <a class="btn indigo darken-4 waves-effect waves-light" href="#" data-action="toggle"><?php
1034
  _e( 'Toggle selection', 'final-tiles-gallery' );
1035
- ?>
1036
- </a>
1037
  </span>
1038
  <span class="green lighten-4">
1039
  <?php
@@ -1044,33 +907,27 @@ _e( 'Toggle selection', 'final-tiles-gallery' );
1044
  <span class="orange lighten-4">
1045
  <a class="btn lime darken-3 waves-effect waves-light" href="#" data-action="show-hide"><?php
1046
  _e( 'Toggle visibility', 'final-tiles-gallery' );
1047
- ?>
1048
- </a>
1049
  <a class="btn deep-orange darken-1 waves-effect waves-light" href="#" data-action="remove"><?php
1050
  _e( 'Remove', 'final-tiles-gallery' );
1051
- ?>
1052
- </a>
1053
  </span>
1054
  </div>
1055
 
1056
  <div class="row">
1057
  <b class="listview"> <?php
1058
  _e( 'List View:', 'final-tiles-gallery' );
1059
- ?>
1060
- </b>
1061
  <ul class="list-view-control">
1062
  <li data-size="small" id="listview-small" class="li"> <?php
1063
  _e( 'Small', 'final-tiles-gallery' );
1064
- ?>
1065
- </li>
1066
  <li data-size="medium" id="listview-medium" class="li" > <?php
1067
  _e( 'Medium', 'final-tiles-gallery', 'final-tiles-gallery' );
1068
- ?>
1069
- </li>
1070
  <li data-size="big" id="listview-big" class="li"> <?php
1071
  _e( 'Big', 'final-tiles-gallery' );
1072
- ?>
1073
- </li>
1074
  </ul>
1075
  </div>
1076
 
@@ -1080,22 +937,18 @@ _e( 'Big', 'final-tiles-gallery' );
1080
  <p class="input">
1081
  <input type="text" placeholder="<?php
1082
  _e( 'Group name', 'final-tiles-gallery' );
1083
- ?>
1084
- ">
1085
  <span><?php
1086
  _e( 'avoid space and special characters', 'final-tiles-gallery' );
1087
- ?>
1088
- </span>
1089
  </p>
1090
  <p class="buttons">
1091
  <a class="btn orange cancel" href="#"><?php
1092
  _e( 'Cancel', 'final-tiles-gallery' );
1093
- ?>
1094
- </a>
1095
  <a class="btn green proceed" href="#"><?php
1096
  _e( 'Proceed', 'final-tiles-gallery' );
1097
- ?>
1098
- </a>
1099
  </p>
1100
  </div>
1101
  </div>
@@ -1108,8 +961,7 @@ if ( is_array( $filters ) && count( $filters ) > 1 ) {
1108
  <div class="row filter-list">
1109
  <b class="listview"> <?php
1110
  _e( 'Filters:', 'final-tiles-gallery' );
1111
- ?>
1112
- </b>
1113
  <ul class="filter-select-control">
1114
  <?php
1115
  foreach ( $filters as $filter ) {
@@ -1148,21 +1000,17 @@ foreach ( $ftg_fields as $section => $s ) {
1148
  ?>
1149
  <li><a class="btn-floating <?php
1150
  _e( $colors[$idx++] );
1151
- ?>
1152
- " rel="<?php
1153
  _e( FinalTiles_Gallery::slugify( $section ) );
1154
- ?>
1155
- "><i class="large mdi <?php
1156
- _e( $s['icon'] );
1157
- ?>
1158
- "></i></a></li>
1159
  <?php
1160
  }
1161
  ?>
1162
  <li><a class="btn-floating <?php
1163
  _e( $colors[$idx++] );
1164
- ?>
1165
- " rel="images"><i class="large mdi mdi-image-filter"></i></a></li>
1166
  </ul>
1167
  </div>
1168
 
@@ -1172,43 +1020,34 @@ _e( $colors[$idx++] );
1172
  <div class="modal-content">
1173
  <p><?php
1174
  _e( 'Paste here the embed code (it must be an ', 'final-tiles-gallery' );
1175
- ?>
1176
- <strong><?php
1177
  _e( 'iframe', 'final-tiles-gallery' );
1178
- ?>
1179
- </strong>
1180
  <?php
1181
  _e( 'and it must contain the attributes', 'final-tiles-gallery' );
1182
- ?>
1183
- <strong><?php
1184
  _e( 'width', 'final-tiles-gallery' );
1185
- ?>
1186
- </strong> <?php
1187
  _e( 'and', 'final-tiles-gallery' );
1188
- ?>
1189
- <strong><?php
1190
  _e( ' height', 'final-tiles-gallery' );
1191
- ?>
1192
- </strong>)</p>
1193
  <div class="text dark">
1194
  <textarea></textarea>
1195
  </div>
1196
  <div class="field video-filters clearfix" ></div>
1197
  <input type="hidden" id="filter-video" value="<?php
1198
  print $gallery->filters;
1199
- ?>
1200
- ">
1201
  </div>
1202
  <input type="hidden" id="video-panel-action" >
1203
  <div class="field buttons modal-footer">
1204
  <a href="#" data-action="edit" class="action positive save modal-action modal-close waves-effect waves-green btn-flat"><?php
1205
  _e( 'Save', 'final-tiles-gallery' );
1206
- ?>
1207
- </a>
1208
  <a href="#" data-action="cancel" class="action neutral modal-action modal-close waves-effect waves-yellow btn-flat"><?php
1209
  _e( 'Cancel', 'final-tiles-gallery' );
1210
- ?>
1211
- </a>
1212
  </div>
1213
  </div>
1214
 
@@ -1219,8 +1058,7 @@ _e( 'Cancel', 'final-tiles-gallery' );
1219
  <div class="modal-content cf">
1220
  <h4><?php
1221
  _e( 'Edit image', 'final-tiles-gallery' );
1222
- ?>
1223
- </h4>
1224
  <div class="left">
1225
  <div class="figure"></div>
1226
  <div class="field sizes"></div>
@@ -1229,8 +1067,7 @@ _e( 'Edit image', 'final-tiles-gallery' );
1229
  <div class="field">
1230
  <label><?php
1231
  _e( 'Title', 'final-tiles-gallery' );
1232
- ?>
1233
- </label>
1234
  <div class="text">
1235
  <textarea name="imageTitle"></textarea>
1236
  </div>
@@ -1238,8 +1075,7 @@ _e( 'Title', 'final-tiles-gallery' );
1238
  <div class="field">
1239
  <label><?php
1240
  _e( 'Caption', 'final-tiles-gallery' );
1241
- ?>
1242
- </label>
1243
  <div class="text">
1244
  <textarea name="description"></textarea>
1245
  </div>
@@ -1255,8 +1091,7 @@ _e( 'Hidden, visible only with lightbox', 'final-tiles-gallery' );
1255
  <div class="field js-no-hidden">
1256
  <label><?php
1257
  _e( 'Link', 'final-tiles-gallery' );
1258
- ?>
1259
- </label>
1260
  <div class="text dark">
1261
  <input type="text" size="20" value="" name="link" />
1262
  </div>
@@ -1264,26 +1099,21 @@ _e( 'Link', 'final-tiles-gallery' );
1264
  <div class="field js-no-hidden">
1265
  <label><?php
1266
  _e( 'Link target', 'final-tiles-gallery' );
1267
- ?>
1268
- </label>
1269
  <div class="text">
1270
  <select name="target" class="browser-default">
1271
  <option value="default"><?php
1272
  _e( 'Default target', 'final-tiles-gallery' );
1273
- ?>
1274
- </option>
1275
  <option value="_self"><?php
1276
  _e( 'Open in same page', 'final-tiles-gallery' );
1277
- ?>
1278
- </option>
1279
  <option value="_blank"><?php
1280
  _e( 'Open in _blank', 'final-tiles-gallery' );
1281
- ?>
1282
- </option>
1283
  <option value="_lightbox"><?php
1284
  _e( 'Open in lightbox (when using a lightbox)', 'final-tiles-gallery' );
1285
- ?>
1286
- </option>
1287
  </select>
1288
  </div>
1289
  </div>
@@ -1294,12 +1124,10 @@ _e( 'Open in lightbox (when using a lightbox)', 'final-tiles-gallery' );
1294
  <div class="field buttons modal-footer">
1295
  <a href="#" data-action="save" class="action modal-action modal-close waves-effect waves-green btn-flat"><i class="fa fa-save"></i> <?php
1296
  _e( 'Save', 'final-tiles-gallery' );
1297
- ?>
1298
- </a>
1299
  <a href="#" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><i class="mdi-content-reply"></i> <?php
1300
  _e( 'Cancel', 'final-tiles-gallery' );
1301
- ?>
1302
- </a>
1303
  </div>
1304
  </div>
1305
 
@@ -1323,10 +1151,9 @@ _e( 'Cancel', 'final-tiles-gallery' );
1323
  <?php
1324
  $presetIdx = 0;
1325
  foreach ( $ftg_fields as $section => $s ) {
1326
- if ( array_key_exists( 'presets', $s ) ) {
1327
- foreach ( $s['presets'] as $preset => $values ) {
1328
- echo 'presets[\'preset_' . $presetIdx . '_' . $preset . '\'] = ' . json_encode( $values ) . ';
1329
- ' ;
1330
  }
1331
  }
1332
  $presetIdx++;
@@ -1334,9 +1161,8 @@ foreach ( $ftg_fields as $section => $s ) {
1334
  ?>
1335
 
1336
  var ftg_wp_caption_field = '<?php
1337
- ftg_p( $gallery, 'wp_field_caption' );
1338
- ?>
1339
- ';
1340
  (function ($) {
1341
  $("[name=captionFullHeight]").change(function () {
1342
  if($(this).val() == "F")
16
  if ( $gallery == NULL || $gallery->{$field} === NULL ) {
17
 
18
  if ( $default === NULL ) {
19
+ print "";
20
  } else {
21
  print stripslashes( $default );
22
  }
31
  $gallery,
32
  $field,
33
  $value,
34
+ $type = "selected"
35
  )
36
  {
37
  global $ftg_options ;
43
 
44
 
45
  if ( $gallery == NULL ) {
46
+ print "";
47
  } else {
48
  if ( $gallery->{$field} == $value ) {
49
  print $type;
54
 
55
  function ftg_checkFieldDisabled( $options )
56
  {
57
+ if ( count( $options ) == 3 && $options[2] == "disabled" ) {
58
+ return "disabled";
59
  }
60
+ return "";
61
  }
62
 
63
  function ftg_checkDisabledOption( $plan )
64
  {
65
+ return "disabled";
66
+ return "";
67
  }
68
 
69
  function ftg_printPro( $plan )
70
  {
71
+ return " (upgrade to unlock)";
72
+ return "";
73
  }
74
 
75
  function ftg_printFieldPro( $options )
76
  {
77
+ if ( count( $options ) == 3 && $options[2] == "disabled" ) {
78
+ return " (upgrade to unlock)";
79
  }
80
+ return "";
81
  }
82
 
83
  }
89
  $idx = 0;
90
  function ftgSortByName( $a, $b )
91
  {
92
+ return $a["name"] > $b["name"];
93
  }
94
 
95
  ?>
101
  ?>
102
  <li id="<?php
103
  _e( FinalTiles_Gallery::slugify( $section ) );
104
+ ?>">
 
105
  <div class="collapsible-header">
106
  <i class="mdi <?php
107
+ _e( $s["icon"] );
108
+ ?> ftg-section-icon white-text <?php
 
109
  print $colors[$idx];
110
+ ?> darken-2"></i> <?php
 
111
  _e( $section );
112
  ?>
113
  </div>
114
  <div class="collapsible-body <?php
115
  print $colors[$idx];
116
+ ?> lighten-5 tab form-fields">
 
117
  <div class="jump-head">
118
  <?php
119
  $jumpFields = array();
120
+ foreach ( $s["fields"] as $f => $data ) {
121
  $jumpFields[$f] = $data;
122
  $jumpFields[$f]['_code'] = $f;
123
  }
124
  unset( $f );
125
  unset( $data );
126
+ usort( $jumpFields, "ftgSortByName" );
127
  ?>
128
  <select class="browser-default jump">
129
  <option><?php
130
  _e( 'Jump to setting', 'final-tiles-gallery' );
131
+ ?></option>
 
132
  <?php
133
  foreach ( $jumpFields as $f => $data ) {
134
  ?>
135
  <?php
136
 
137
+ if ( is_array( $data["excludeFrom"] ) && !in_array( $ftg_parent_page, $data["excludeFrom"] ) ) {
138
  ?>
139
  <option value="<?php
140
  _e( $data['_code'] );
141
+ ?>">
 
142
  <?php
143
+ _e( $data["name"] );
144
  ?>
145
  </option>
146
  <?php
154
 
155
  <?php
156
 
157
+ if ( array_key_exists( "presets", $s ) ) {
158
  ?>
159
  <select class="browser-default presets" data-field-idx="<?php
160
  echo $idx ;
161
+ ?>">
 
162
  <option value="">Select preset</option>
163
  <?php
164
+ foreach ( $s["presets"] as $preset => $data ) {
165
  ?>
166
  <option><?php
167
  echo $preset ;
168
+ ?></option>
 
169
  <?php
170
  }
171
  ?>
178
  <table>
179
  <tbody>
180
  <?php
181
+ foreach ( $s["fields"] as $f => $data ) {
182
  ?>
183
  <?php
184
 
185
+ if ( is_array( $data["excludeFrom"] ) && !in_array( $ftg_parent_page, $data["excludeFrom"] ) ) {
186
  ?>
187
 
188
  <tr class="row-<?php
189
  print $f;
190
+ ?> <?php
191
+ print $data["type"];
192
+ ?>">
 
 
193
  <th scope="row">
194
  <label><?php
195
+ _e( $data["name"] );
196
  ?>
197
  <?php
198
 
199
+ if ( $data["mu"] ) {
200
  ?>
201
  (<?php
202
+ _e( $data["mu"] );
203
+ ?>)
 
204
  <?php
205
  }
206
 
209
  </th>
210
  <td>
211
  <div class="field <?php
212
+ echo ( in_array( 'shortcode', $data["excludeFrom"] ) ? "" : "js-update-shortcode" ) ;
213
+ ?>">
 
214
  <?php
215
 
216
+ if ( $data["type"] == "text" ) {
217
  ?>
218
  <div class="text">
219
  <input type="text" size="30" name="ftg_<?php
220
  print $f;
221
+ ?>" value="<?php
222
+ ftg_p( $gallery, $f, $data["default"] );
223
+ ?>" />
 
 
224
  </div>
225
  <?php
226
+ } elseif ( $data["type"] == "cta" ) {
227
  ?>
228
  <div class="text">
229
  <a class="in-table-cta" href="<?php
230
  echo ftg_fs()->get_upgrade_url() ;
231
+ ?>"><i class="mdi mdi-bell-ring-outline"></i>
 
232
  <?php
233
  _e( 'Unlock this feature. Upgrade Now!', 'final-tiles-grid-gallery-lite' );
234
  ?>
235
  </a>
236
  </div>
237
  <?php
238
+ } elseif ( $data["type"] == "select" ) {
239
  ?>
240
  <div class="text">
241
  <select class="browser-default" name="ftg_<?php
242
  print $f;
243
+ ?>">
 
244
  <?php
245
+ foreach ( array_keys( $data["values"] ) as $optgroup ) {
246
  ?>
247
  <optgroup label="<?php
248
  print $optgroup;
249
+ ?>">
 
250
  <?php
251
+ foreach ( $data["values"][$optgroup] as $option ) {
252
  ?>
253
 
254
  <?php
255
+ $v = explode( "|", $option );
256
  ?>
257
 
258
  <option <?php
259
  echo ftg_checkFieldDisabled( $v ) ;
260
+ ?> <?php
 
261
  ftg_sel( $gallery, $f, $v[0] );
262
+ ?> value="<?php
 
263
  print $v[0];
264
+ ?>"><?php
 
265
  print $v[1];
266
  echo ftg_printFieldPro( $v ) ;
267
+ ?></option>
 
268
  <?php
269
  }
270
  ?>
275
  </select>
276
  <?php
277
 
278
+ if ( $f == "lightbox" ) {
279
  ?>
280
  <div class="col s12 ftg-everlightbox-settings">
281
  <?php
294
  <?php
295
  }
296
 
297
+ ?>
 
298
  </div>
299
  <?php
300
  }
302
  ?>
303
  </div>
304
  <?php
305
+ } elseif ( $data["type"] == "toggle" ) {
306
  ?>
307
  <div class="text">
308
  <input type="checkbox" class="ftg-checkbox" id="ftg_<?php
309
  print $f;
310
+ ?>" name="ftg_<?php
 
311
  print $f;
312
+ ?>" value="<?php
313
+ ftg_p( $gallery, $f, $data["default"] );
314
+ ?>" <?php
 
 
315
  ftg_sel(
316
  $gallery,
317
  $f,
318
+ "T",
319
+ "checked"
320
  );
321
+ ?> />
 
322
  <label for="ftg_<?php
323
  print $f;
324
+ ?>"><?php
325
+ _e( $data["description"] );
326
+ ?></label>
 
 
327
  </div>
328
 
329
  <?php
330
+ } elseif ( $data["type"] == "slider" ) {
331
  ?>
332
 
333
  <div class="text">
334
  <p class="range-field">
335
  <input name="ftg_<?php
336
  print $f;
337
+ ?>" value="<?php
338
+ ftg_p( $gallery, $f, $data["default"] );
339
+ ?>" type="range" min="<?php
340
+ print $data["min"];
341
+ ?>" max="<?php
342
+ print $data["max"];
343
+ ?>" />
 
 
 
 
344
  </p>
345
  </div>
346
 
347
  <?php
348
+ } elseif ( $data["type"] == "number" ) {
349
  ?>
350
  <div class="text">
351
  <input type="text" name="ftg_<?php
352
  print $f;
353
+ ?>" class="integer-only" value="<?php
354
+ ftg_p( $gallery, $f, $data["default"] );
355
+ ?>" >
 
 
356
  </div>
357
 
358
  <?php
359
+ } elseif ( $data["type"] == "color" ) {
360
  ?>
361
  <div class="text">
362
  <input type="text" size="6" data-default-color="<?php
363
+ print $data["default"];
364
+ ?>" name="ftg_<?php
 
365
  print $f;
366
+ ?>" value="<?php
367
+ ftg_p( $gallery, $f, $data["default"] );
368
+ ?>" class='pickColor' /> </div>
 
 
369
 
370
  <?php
371
+ } elseif ( $data["type"] == "filter" ) {
372
  ?>
373
 
374
  <div class="filters gallery-filters dynamic-table">
377
  <i class="fa fa-plus left"></i> Add filter</a>
378
  <p class="reset"><button class="waves-effect waves-light btn yellow reset-default-filter">Reset selected filter</button></p>
379
  <input type="hidden" name="ftg_filters" value="<?php
380
+ ftg_p( $gallery, "filters" );
381
+ ?>" />
 
382
  <input type="hidden" name="filter_def" value="<?php
383
+ ftg_p( $gallery, "defaultFilter" );
384
+ ?>" />
 
385
  </div>
386
 
387
  <?php
388
+ } elseif ( $data["type"] == "textarea" ) {
389
  ?>
390
  <div class="text">
391
  <textarea name="ftg_<?php
392
  print $f;
393
+ ?>"><?php
 
394
  ftg_p( $gallery, $f );
395
+ ?></textarea>
 
396
  </div>
397
  <?php
398
+ } elseif ( $data["type"] == "custom_isf" ) {
399
  ?>
400
  <div class="custom_isf dynamic-table">
401
  <table class="striped">
404
  <th></th>
405
  <th><?php
406
  _e( 'Resolution', 'final-tiles-gallery' );
407
+ ?> (px)</th>
 
408
  <th><?php
409
  _e( 'Size factor', 'final-tiles-gallery' );
410
+ ?> (%)</th>
 
411
  </tr>
412
  </thead>
413
  <tbody>
414
  </tbody>
415
  </table>
416
  <input type="hidden" name="ftg_imageSizeFactorCustom" value="<?php
417
+ ftg_p( $gallery, "imageSizeFactorCustom" );
418
+ ?>" />
 
419
  <a href="#" class="add waves-effect waves-light btn">
420
  <i class="mdi-content-add left"></i>
421
  <?php
422
  _e( 'Add resolution', 'final-tiles-gallery' );
423
+ ?></a>
 
424
  </div>
425
  <?php
426
  }
429
  <div class="help">
430
  <?php
431
 
432
+ if ( strlen( $data["description"] ) ) {
433
  ?>
434
  <p><?php
435
+ _e( $data["description"] );
436
+ ?></p>
 
437
  <?php
438
  }
439
 
440
  ?>
441
  <?php
442
 
443
+ if ( !in_array( 'shortcode', $data["excludeFrom"] ) && $data["type"] != "cta" ) {
444
  ?>
445
  <div class="ftg-code">
446
  <a href="#" class="toggle-shortcode" data-code="<?php
447
  print $f;
448
+ ?>"><i class="mdi mdi-settings"></i></a>
 
449
  <span id="shortcode-<?php
450
  print $f;
451
+ ?>">
 
452
  Shortcode attribute:
453
  <input type="text" class="shortcode-val" readonly="" value='<?php
454
  _e( FinalTilesGalleryUtils::fieldNameToShortcode( $f ) );
455
+ ?>="<?php
456
+ ftg_p( $gallery, $f, $data["default"] );
457
+ ?>"'>
 
 
458
  </span>
459
  </div>
460
  <?php
469
  <?php
470
  }
471
 
472
+ ?>
 
473
  <?php
474
  }
475
  ?>
487
  <div class="collapsible-header">
488
  <i class="mdi mdi-image-filter ftg-section-icon white-text <?php
489
  print $colors[$idx];
490
+ ?> darken-2"></i> <?php
 
491
  _e( 'Images', 'final-tiles-gallery' );
492
  ?>
493
  </div>
494
  <div class="collapsible-body <?php
495
  print $colors[$idx];
496
+ ?> lighten-5">
 
497
  <div id="images" class="ftg-section form-fields">
498
  <div class="actions">
499
  <label><?php
500
  _e( 'Source:', 'final-tiles-gallery' );
501
+ ?></label>
 
502
  <select name="ftg_source" class="browser-default">
503
  <option value="images"><?php
504
  _e( 'User images', 'final-tiles-gallery' );
505
+ ?></option>
 
506
  <option value="posts" <?php
507
  echo ftg_checkDisabledOption( 'ultimate' ) ;
508
+ ?>><?php
 
509
  _e( 'Recent posts with featured image', 'final-tiles-gallery' );
510
  echo ftg_printPro( 'ultimate' ) ;
511
+ ?></option>
 
512
  <?php
513
 
514
  if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
515
  ?>
516
  <option value="woocommerce" <?php
517
  echo ftg_checkDisabledOption( 'ultimate' ) ;
518
+ ?>><?php
 
519
  _e( 'WooCommerce products', 'final-tiles-gallery' );
520
  echo ftg_printPro( 'ultimate' ) ;
521
+ ?></option>
 
522
  <?php
523
  }
524
 
530
  <label>Loading method</label>
531
  <select name="ftg_loadMethod" class="browser-default">
532
  <option <?php
533
+ ftg_sel( $gallery, "loadMethod", "sequential" );
534
+ ?> value="sequential">Sequential</option>
 
535
  <option <?php
536
+ ftg_sel( $gallery, "loadMethod", "lazy" );
537
+ ?> value="lazy">Lazy</option>
 
538
  </select>
539
  </div>
540
  </div>
543
  <label>Ajax loading</label>
544
  <select name="ftg_ajaxLoading" class="browser-default js-ajax-loading-control">
545
  <option <?php
546
+ ftg_sel( $gallery, "ajaxLoading", "F" );
547
+ ?> value="F">Complete markup on page</option>
 
548
  <option <?php
549
+ ftg_sel( $gallery, "ajaxLoading", "T" );
550
+ ?> value="T">Enable ajax loading (still in beta!)</option>
 
551
  </select>
552
  </div>
553
  <div class="row js-ajax-loading" style="display:none;">
554
  <label>Number of images to load via ajax</label>
555
  <input class="browser-default" type="text" value="<?php
556
  echo $gallery->tilesPerPage ;
557
+ ?>" name="ftg_tilesPerPage">
 
558
  </div>
559
  </div>
560
  <div class="actions source-images source-panel">
563
  <span class="shortpixel">
564
  <img src="<?php
565
  echo plugins_url( '', __FILE__ ) ;
566
+ ?>/../images/icon-shortpixel.png" alt="ShortPixel">
 
567
  <a target="_blank" href="https://shortpixel.com/wp/af/J4PFT4Z72393"><?php
568
  _e( 'We suggest you to use ShortPixel image optimization plugin for best SEO results.', 'modula-gallery' );
569
+ ?></a></span>
 
570
  </div>
571
  <label><?php
572
  _e( 'Image size', 'final-tiles-gallery' );
573
+ ?></label>
 
574
 
575
  <select class="current-image-size browser-default">
576
  <?php
577
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
578
+ print '<option value="' . $size . '">' . $size . " (" . implode( 'x', $atts ) . ")</option>";
579
  }
580
  ?>
581
  </select>
582
  <p class="tips"><?php
583
  _e( 'Want to add more images sizes?', 'final-tiles-gallery' );
584
+ ?> <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
 
585
  _e( 'Read a simple tutorial.', 'final-tiles-gallery' );
586
+ ?></a></p>
 
587
  <div class="tips">
588
  <strong><?php
589
  _e( 'About choosing a proper image size:', 'final-tiles-gallery' );
590
+ ?></strong> <?php
591
+ _e( "Final Tiles Gallery doesn't scale down the images when there's enough space, it gives you the freedom to choose your favourite size for each image. So you should use images that are smaller than the container, choose the", 'final-tiles-gallery' );
592
+ ?> <strong><?php
 
 
593
  _e( 'thumbnail', 'final-tiles-gallery' );
594
+ ?></strong> <?php
 
595
  _e( 'or', 'final-tiles-gallery' );
596
+ ?> <strong><?php
 
597
  _e( 'medium', 'final-tiles-gallery' );
598
+ ?></strong> <?php
 
599
  _e( 'size, for example.', 'final-tiles-gallery' );
600
+ ?><br>
 
601
  <br>
602
  <?php
603
  _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
604
+ ?> <a href="https://www.youtube.com/watch?v=RNT4JGjtyrs" target="_blank"><?php
 
605
  _e( 'video tutorial', 'final-tiles-gallery' );
606
+ ?></a>.
 
607
  </div>
608
  </div>
609
  <div class="row">
610
  <a href="#" class="open-media-panel waves-effect waves-light btn action"><i class="mdi mdi-image-area"></i> <?php
611
  _e( 'Add images', 'final-tiles-gallery' );
612
+ ?></a>
 
613
  <?php
614
  ?>
615
  <a onclick="alert('Upgrade to unlock')" href="#" class="waves-effect waves-light btn"><i class="mdi mdi-video"></i> <?php
616
  _e( 'Add video', 'final-tiles-gallery' );
617
+ ?></a>
 
618
  <?php
619
  ?>
620
  </div>
622
  <p class="tips"><?php
623
  _e( 'For multiple selections: Click+CTRL.
624
  Drag images to change order.', 'final-tiles-gallery' );
625
+ ?></p>
 
626
  </div>
627
  </div>
628
  <div class="actions source-posts source-panel">
629
  <div class="row">
630
  <label><?php
631
  _e( 'Image size', 'final-tiles-gallery' );
632
+ ?></label>
 
633
 
634
  <select class="browser-default" name="ftg_defaultPostImageSize">
635
  <?php
636
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
637
+ print '<option ' . (( $size == $gallery->defaultPostImageSize ? 'selected' : '' )) . ' value="' . $size . '">' . $size . " (" . implode( 'x', $atts ) . ")</option>";
638
  }
639
  ?>
640
  </select>
641
  <p class="tips"><?php
642
  _e( 'Want to add more images sizes?', 'final-tiles-gallery' );
643
+ ?> <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
 
644
  _e( 'Read a simple tutorial.', 'final-tiles-gallery' );
645
+ ?></a></p>
 
646
  <div class="tips">
647
  <strong><?php
648
  _e( 'About choosing a proper image size:', 'final-tiles-gallery' );
649
+ ?></strong> <?php
650
+ _e( "Final Tiles Gallery doesn't scale down the images\r\n\t\t\t\t\t\twhen there's enough space, it gives you the freedom to choose your favourite size for each image.\r\n\t\t\t\t\t\tSo you should use images that are smaller than the container, choose the", 'final-tiles-gallery' );
651
+ ?> <strong><?php
 
 
 
 
652
  _e( 'thumbnail', 'final-tiles-gallery' );
653
+ ?></strong> <?php
 
654
  _e( 'or', 'final-tiles-gallery' );
655
  ?>
656
  <strong><?php
657
  _e( 'medium', 'final-tiles-gallery' );
658
+ ?></strong> <?php
 
659
  _e( 'size, for example.', 'final-tiles-gallery' );
660
+ ?><br>
 
661
  <br>
662
  <?php
663
  _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
664
+ ?> <a href="https://www.youtube.com/watch?v=RNT4JGjtyrs" target="_blank"><?php
 
665
  _e( 'video tutorial', 'final-tiles-gallery' );
666
+ ?></a>.
 
667
  </div>
668
  <div class="row checkboxes">
669
  <strong class="label"><?php
670
  _e( 'Post type:', 'final-tiles-gallery' );
671
+ ?></strong>
 
672
  <span>
673
  <?php
674
  $idx = 0;
682
  ?>
683
  <input id="post-type-<?php
684
  _e( $idx );
685
+ ?>" type="checkbox" name="post_types" value="<?php
 
686
  _e( $t );
687
+ ?>">
 
688
  <label for="post-type-<?php
689
  _e( $idx );
690
+ ?>"><?php
 
691
  _e( $t );
692
+ ?></label>
 
693
  <?php
694
  $idx++;
695
  ?>
702
  ?>
703
  <input type="hidden" name="ftg_post_types" value="<?php
704
  _e( $gallery->post_types );
705
+ ?>" />
 
706
  </span>
707
  </div>
708
  <div class="row checkboxes">
709
  <strong class="label"><?php
710
  _e( 'Categories:', 'final-tiles-gallery' );
711
+ ?></strong>
 
712
  <span>
713
  <?php
714
  $idx = 0;
718
  ?>
719
  <input id="post-cat-<?php
720
  _e( $idx );
721
+ ?>" type="checkbox" name="post_categories" value="<?php
 
722
  _e( $c->cat_ID );
723
+ ?>">
 
724
  <label for="post-cat-<?php
725
  _e( $idx );
726
+ ?>"><?php
 
727
  _e( $c->name );
728
+ ?></label>
 
729
  <?php
730
  $idx++;
731
  ?>
734
  ?>
735
  <input type="hidden" name="ftg_post_categories" value="<?php
736
  _e( $gallery->post_categories );
737
+ ?>" />
 
738
  </span>
739
  </div>
740
  <div class="row checkboxes">
741
  <strong class="label"><?php
742
  _e( 'Tags:', 'final-tiles-gallery' );
743
+ ?></strong>
 
744
  <span>
745
  <?php
746
  $tags = get_tags();
754
 
755
  <input id="post-tag-<?php
756
  _e( $idx );
757
+ ?>" type="checkbox" name="post_tags" value="<?php
 
758
  _e( $c->term_id );
759
+ ?>">
 
760
  <label for="post-tag-<?php
761
  _e( $idx );
762
+ ?>"><?php
 
763
  _e( $c->name );
764
+ ?></label>
 
765
  <?php
766
  $idx++;
767
  ?>
781
  ?>
782
  <input type="hidden" name="ftg_post_tags" value="<?php
783
  echo $gallery->post_tags ;
784
+ ?>" />
 
785
  </span>
786
  </div>
787
  <div class="row checkboxes">
788
  <strong class="label"><?php
789
  _e( 'Max posts:', 'final-tiles-gallery' );
790
+ ?></strong>
 
791
  <span class="aside">
792
  <input type="text" name="ftg_max_posts" value="<?php
793
  echo $gallery->max_posts ;
794
+ ?>">
 
795
  <span><?php
796
  _e( '(enter 0 for unlimited posts)', 'final-tiles-gallery' );
797
+ ?></span>
 
798
  </span>
799
  </div>
800
  </div>
807
  <div class="row">
808
  <label><?php
809
  _e( 'Image size', 'final-tiles-gallery' );
810
+ ?></label>
 
811
 
812
  <select class="browser-default" name="ftg_defaultWooImageSize">
813
  <?php
814
  foreach ( $this->list_thumbnail_sizes() as $size => $atts ) {
815
+ print '<option ' . (( $size == $gallery->defaultWooImageSize ? 'selected' : '' )) . ' value="' . $size . '">' . $size . " (" . implode( 'x', $atts ) . ")</option>";
816
  }
817
  ?>
818
  </select>
819
  <p class="tips"><?php
820
  _e( 'Want to add more images sizes?', 'final-tiles-gallery' );
821
+ ?> <a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-additional-image-sizes-in-wordpress/" target="_blank"><?php
 
822
  _e( 'Read a simple tutorial.', 'final-tiles-gallery' );
823
+ ?></a></p>
 
824
  <div class="tips">
825
  <strong><?php
826
  _e( 'About choosing a proper image size:', 'final-tiles-gallery' );
827
+ ?></strong> <?php
828
+ _e( "Final Tiles Gallery doesn't scale down the images\r\n\t\t\t\t\t\twhen there's enough space, it gives you the freedom to choose your favourite size for each image.\r\n\t\t\t\t\t\tSo you should use images that are smaller than the container, choose the", 'final-tiles-gallery' );
829
+ ?> <strong><?php
 
 
 
 
830
  _e( 'thumbnail', 'final-tiles-gallery' );
831
+ ?></strong> <?php
 
832
  _e( 'or', 'final-tiles-gallery' );
833
  ?>
834
  <strong><?php
835
  _e( 'medium', 'final-tiles-gallery' );
836
+ ?></strong> <?php
 
837
  _e( 'size, for example.', 'final-tiles-gallery' );
838
+ ?><br>
 
839
  <br>
840
  <?php
841
  _e( 'How to get a better grid? Watch the', 'final-tiles-gallery' );
842
+ ?><a href="https://www.youtube.com/watch?v=RNT4JGjtyrs" target="_blank"><?php
 
843
  _e( 'video tutorial', 'final-tiles-gallery' );
844
+ ?></a>.
 
845
  </div>
846
  <div class="row checkboxes">
847
  <strong class="label"><?php
848
  _e( 'Categories:', 'final-tiles-gallery' );
849
+ ?></strong>
 
850
  <span>
851
  <?php
852
  $idx = 0;
856
  ?>
857
  <input id="woo-cat-<?php
858
  _e( $idx );
859
+ ?>" type="checkbox" name="woo_cat" value="<?php
 
860
  _e( $c->cat_ID );
861
+ ?>">
 
862
  <label for="woo-cat-<?php
863
  _e( $idx );
864
+ ?>"><?php
 
865
  _e( $c->cat_name );
866
+ ?></label>
 
867
  <?php
868
  $idx++;
869
+ ?>
 
870
  <?php
871
  }
872
  ?>
873
  <input type="hidden" name="ftg_woo_categories" value="<?php
874
  _e( $gallery->woo_categories );
875
+ ?>" />
 
876
  </span>
877
  </div>
878
  </div>
879
  <?php
880
  }
881
 
882
+ ?>
 
883
  </div>
884
  <div class="actions">
885
  <div class="bulk row">
886
  <label><?php
887
  _e( 'Bulk Actions', 'final-tiles-gallery' );
888
+ ?></label>
 
889
  <div class="options">
890
  <span class="indigo lighten-4">
891
  <a class="btn indigo darken-4 waves-effect waves-light" href="#" data-action="select"><?php
892
  _e( 'Select all', 'final-tiles-gallery' );
893
+ ?></a>
 
894
  <a class="btn indigo darken-4 waves-effect waves-light" href="#" data-action="deselect"><?php
895
  _e( 'Deselect all', 'final-tiles-gallery' );
896
+ ?></a>
 
897
  <a class="btn indigo darken-4 waves-effect waves-light" href="#" data-action="toggle"><?php
898
  _e( 'Toggle selection', 'final-tiles-gallery' );
899
+ ?></a>
 
900
  </span>
901
  <span class="green lighten-4">
902
  <?php
907
  <span class="orange lighten-4">
908
  <a class="btn lime darken-3 waves-effect waves-light" href="#" data-action="show-hide"><?php
909
  _e( 'Toggle visibility', 'final-tiles-gallery' );
910
+ ?></a>
 
911
  <a class="btn deep-orange darken-1 waves-effect waves-light" href="#" data-action="remove"><?php
912
  _e( 'Remove', 'final-tiles-gallery' );
913
+ ?></a>
 
914
  </span>
915
  </div>
916
 
917
  <div class="row">
918
  <b class="listview"> <?php
919
  _e( 'List View:', 'final-tiles-gallery' );
920
+ ?> </b>
 
921
  <ul class="list-view-control">
922
  <li data-size="small" id="listview-small" class="li"> <?php
923
  _e( 'Small', 'final-tiles-gallery' );
924
+ ?> </li>
 
925
  <li data-size="medium" id="listview-medium" class="li" > <?php
926
  _e( 'Medium', 'final-tiles-gallery', 'final-tiles-gallery' );
927
+ ?> </li>
 
928
  <li data-size="big" id="listview-big" class="li"> <?php
929
  _e( 'Big', 'final-tiles-gallery' );
930
+ ?> </li>
 
931
  </ul>
932
  </div>
933
 
937
  <p class="input">
938
  <input type="text" placeholder="<?php
939
  _e( 'Group name', 'final-tiles-gallery' );
940
+ ?>">
 
941
  <span><?php
942
  _e( 'avoid space and special characters', 'final-tiles-gallery' );
943
+ ?></span>
 
944
  </p>
945
  <p class="buttons">
946
  <a class="btn orange cancel" href="#"><?php
947
  _e( 'Cancel', 'final-tiles-gallery' );
948
+ ?></a>
 
949
  <a class="btn green proceed" href="#"><?php
950
  _e( 'Proceed', 'final-tiles-gallery' );
951
+ ?></a>
 
952
  </p>
953
  </div>
954
  </div>
961
  <div class="row filter-list">
962
  <b class="listview"> <?php
963
  _e( 'Filters:', 'final-tiles-gallery' );
964
+ ?> </b>
 
965
  <ul class="filter-select-control">
966
  <?php
967
  foreach ( $filters as $filter ) {
1000
  ?>
1001
  <li><a class="btn-floating <?php
1002
  _e( $colors[$idx++] );
1003
+ ?>" rel="<?php
 
1004
  _e( FinalTiles_Gallery::slugify( $section ) );
1005
+ ?>"><i class="large mdi <?php
1006
+ _e( $s["icon"] );
1007
+ ?>"></i></a></li>
 
 
1008
  <?php
1009
  }
1010
  ?>
1011
  <li><a class="btn-floating <?php
1012
  _e( $colors[$idx++] );
1013
+ ?>" rel="images"><i class="large mdi mdi-image-filter"></i></a></li>
 
1014
  </ul>
1015
  </div>
1016
 
1020
  <div class="modal-content">
1021
  <p><?php
1022
  _e( 'Paste here the embed code (it must be an ', 'final-tiles-gallery' );
1023
+ ?><strong><?php
 
1024
  _e( 'iframe', 'final-tiles-gallery' );
1025
+ ?></strong>
 
1026
  <?php
1027
  _e( 'and it must contain the attributes', 'final-tiles-gallery' );
1028
+ ?> <strong><?php
 
1029
  _e( 'width', 'final-tiles-gallery' );
1030
+ ?></strong> <?php
 
1031
  _e( 'and', 'final-tiles-gallery' );
1032
+ ?><strong><?php
 
1033
  _e( ' height', 'final-tiles-gallery' );
1034
+ ?></strong>)</p>
 
1035
  <div class="text dark">
1036
  <textarea></textarea>
1037
  </div>
1038
  <div class="field video-filters clearfix" ></div>
1039
  <input type="hidden" id="filter-video" value="<?php
1040
  print $gallery->filters;
1041
+ ?>">
 
1042
  </div>
1043
  <input type="hidden" id="video-panel-action" >
1044
  <div class="field buttons modal-footer">
1045
  <a href="#" data-action="edit" class="action positive save modal-action modal-close waves-effect waves-green btn-flat"><?php
1046
  _e( 'Save', 'final-tiles-gallery' );
1047
+ ?></a>
 
1048
  <a href="#" data-action="cancel" class="action neutral modal-action modal-close waves-effect waves-yellow btn-flat"><?php
1049
  _e( 'Cancel', 'final-tiles-gallery' );
1050
+ ?></a>
 
1051
  </div>
1052
  </div>
1053
 
1058
  <div class="modal-content cf">
1059
  <h4><?php
1060
  _e( 'Edit image', 'final-tiles-gallery' );
1061
+ ?></h4>
 
1062
  <div class="left">
1063
  <div class="figure"></div>
1064
  <div class="field sizes"></div>
1067
  <div class="field">
1068
  <label><?php
1069
  _e( 'Title', 'final-tiles-gallery' );
1070
+ ?></label>
 
1071
  <div class="text">
1072
  <textarea name="imageTitle"></textarea>
1073
  </div>
1075
  <div class="field">
1076
  <label><?php
1077
  _e( 'Caption', 'final-tiles-gallery' );
1078
+ ?></label>
 
1079
  <div class="text">
1080
  <textarea name="description"></textarea>
1081
  </div>
1091
  <div class="field js-no-hidden">
1092
  <label><?php
1093
  _e( 'Link', 'final-tiles-gallery' );
1094
+ ?></label>
 
1095
  <div class="text dark">
1096
  <input type="text" size="20" value="" name="link" />
1097
  </div>
1099
  <div class="field js-no-hidden">
1100
  <label><?php
1101
  _e( 'Link target', 'final-tiles-gallery' );
1102
+ ?></label>
 
1103
  <div class="text">
1104
  <select name="target" class="browser-default">
1105
  <option value="default"><?php
1106
  _e( 'Default target', 'final-tiles-gallery' );
1107
+ ?></option>
 
1108
  <option value="_self"><?php
1109
  _e( 'Open in same page', 'final-tiles-gallery' );
1110
+ ?></option>
 
1111
  <option value="_blank"><?php
1112
  _e( 'Open in _blank', 'final-tiles-gallery' );
1113
+ ?></option>
 
1114
  <option value="_lightbox"><?php
1115
  _e( 'Open in lightbox (when using a lightbox)', 'final-tiles-gallery' );
1116
+ ?></option>
 
1117
  </select>
1118
  </div>
1119
  </div>
1124
  <div class="field buttons modal-footer">
1125
  <a href="#" data-action="save" class="action modal-action modal-close waves-effect waves-green btn-flat"><i class="fa fa-save"></i> <?php
1126
  _e( 'Save', 'final-tiles-gallery' );
1127
+ ?></a>
 
1128
  <a href="#" data-action="cancel" class="action modal-action modal-close waves-effect waves-yellow btn-flat"><i class="mdi-content-reply"></i> <?php
1129
  _e( 'Cancel', 'final-tiles-gallery' );
1130
+ ?></a>
 
1131
  </div>
1132
  </div>
1133
 
1151
  <?php
1152
  $presetIdx = 0;
1153
  foreach ( $ftg_fields as $section => $s ) {
1154
+ if ( array_key_exists( "presets", $s ) ) {
1155
+ foreach ( $s["presets"] as $preset => $values ) {
1156
+ echo "presets['preset_" . $presetIdx . "_" . $preset . "'] = " . json_encode( $values ) . ";\n" ;
 
1157
  }
1158
  }
1159
  $presetIdx++;
1161
  ?>
1162
 
1163
  var ftg_wp_caption_field = '<?php
1164
+ ftg_p( $gallery, "wp_field_caption" );
1165
+ ?>';
 
1166
  (function ($) {
1167
  $("[name=captionFullHeight]").change(function () {
1168
  if($(this).val() == "F")
admin/include/fields.php CHANGED
@@ -1,364 +1,363 @@
1
  <?php
2
 
3
  $this->fields = array(
4
- 'General' => array(
5
- 'icon' => 'mdi-settings',
6
- 'fields' => array(),
7
  ),
8
- 'Links & Lightbox' => array(
9
- 'icon' => 'mdi-link-variant',
10
- 'fields' => array(),
11
  ),
12
- 'Captions' => array(
13
- 'icon' => 'mdi-comment-text-outline',
14
- 'fields' => array(),
15
  ),
16
- 'Hover effects' => array(
17
- 'icon' => 'mdi-file-image',
18
- 'presets' => array(
19
- 'Slow zoom in' => array(
20
- 'hoverDuration' => 60000,
21
- 'hoverZoom' => 400,
22
- 'hoverRotation' => 0,
23
  ),
24
- 'Zoom in' => array(
25
- 'hoverDuration' => 250,
26
- 'hoverZoom' => 200,
27
- 'hoverRotation' => 0,
28
  ),
29
- 'Swirl in' => array(
30
- 'hoverZoom' => 200,
31
- 'hoverRotation' => 20,
32
  ),
33
- 'Swirl in super' => array(
34
- 'hoverZoom' => 200,
35
- 'hoverRotation' => 360,
36
  ),
37
- 'Zoom out' => array(
38
- 'hoverZoom' => 50,
39
- 'hoverRotation' => 0,
40
  ),
41
- 'Swirl out' => array(
42
- 'hoverZoom' => 50,
43
- 'hoverRotation' => -20,
44
  ),
45
- 'Swirl out super' => array(
46
- 'hoverZoom' => 50,
47
- 'hoverRotation' => -360,
48
  ),
49
  ),
50
- 'fields' => array(),
51
  ),
52
- 'Image loaded effects' => array(
53
- 'icon' => 'mdi-reload',
54
- 'presets' => array(
55
- 'Wobble' => array(
56
- 'loadedDuration' => 600,
57
- 'loadedEasing' => 'elastic-out',
58
- 'loadedScaleY' => 50,
59
- 'loadedScaleX' => 50,
60
- 'loadedRotateY' => 0,
61
- 'loadedRotateX' => 0,
62
- 'loadedVSlide' => 0,
63
- 'loadedHSlide' => 0,
64
  ),
65
- 'Windows' => array(
66
- 'loadedDuration' => 600,
67
- 'loadedEasing' => 'elastic-out',
68
- 'loadedRotateY' => -120,
69
- 'loadedScaleY' => 100,
70
- 'loadedScaleX' => 100,
71
- 'loadedRotateX' => 0,
72
- 'loadedVSlide' => 0,
73
- 'loadedHSlide' => 0,
74
  ),
75
- 'Cards' => array(
76
- 'loadedDuration' => 600,
77
- 'loadedEasing' => 'ease-in-out',
78
- 'loadedRotateX' => -120,
79
- 'loadedRotateY' => -120,
80
- 'loadedScaleY' => 100,
81
- 'loadedScaleX' => 0,
82
- 'loadedVSlide' => 0,
83
- 'loadedHSlide' => 0,
84
  ),
85
- 'Slide from bottom' => array(
86
- 'loadedDuration' => 250,
87
- 'loadedEasing' => 'ease-out',
88
- 'loadedRotateX' => 0,
89
- 'loadedRotateY' => 0,
90
- 'loadedScaleY' => 100,
91
- 'loadedScaleX' => 100,
92
- 'loadedVSlide' => 100,
93
- 'loadedHSlide' => 0,
94
  ),
95
- 'Slide from left' => array(
96
- 'loadedDuration' => 250,
97
- 'loadedEasing' => 'ease-out',
98
- 'loadedRotateX' => 0,
99
- 'loadedRotateY' => 0,
100
- 'loadedScaleY' => 100,
101
- 'loadedScaleX' => 100,
102
- 'loadedVSlide' => 0,
103
- 'loadedHSlide' => -100,
104
  ),
105
- 'Elastic skew' => array(
106
- 'loadedDuration' => 800,
107
- 'loadedEasing' => 'elastic-out',
108
- 'loadedRotateX' => 0,
109
- 'loadedRotateY' => -180,
110
- 'loadedScaleY' => 200,
111
- 'loadedScaleX' => 100,
112
- 'loadedVSlide' => 300,
113
- 'loadedHSlide' => 0,
114
  ),
115
- 'Flying doors' => array(
116
- 'loadedDuration' => 800,
117
- 'loadedEasing' => 'ease-out-back',
118
- 'loadedRotateX' => -180,
119
- 'loadedRotateY' => 0,
120
- 'loadedScaleY' => 100,
121
- 'loadedScaleX' => 300,
122
- 'loadedVSlide' => -500,
123
- 'loadedHSlide' => -800,
124
  ),
125
- 'Pop' => array(
126
- 'loadedDuration' => 300,
127
- 'loadedEasing' => 'ease-in-out',
128
- 'loadedRotateX' => 0,
129
- 'loadedRotateY' => 0,
130
- 'loadedScaleY' => 1,
131
- 'loadedScaleX' => 1,
132
- 'loadedVSlide' => 0,
133
- 'loadedHSlide' => 0,
134
  ),
135
  ),
136
- 'fields' => array(),
137
  ),
138
- 'Style' => array(
139
- 'icon' => 'mdi-format-paint',
140
- 'fields' => array(),
141
  ),
142
- 'Customizations' => array(
143
- 'icon' => 'mdi-puzzle',
144
- 'fields' => array(),
145
  ),
146
  );
147
- $this->addField( 'General', 'name', array(
148
- 'name' => 'Name',
149
- 'hiddenFor' => array( 'dashboard', 'shortcode' ),
150
- 'type' => 'text',
151
- 'description' => 'Name of the gallery, for internal use.',
152
- 'proCall' => false,
153
- 'excludeFrom' => array( 'dashboard', 'shortcode' ),
154
- ) );
155
- $this->addField( 'General', 'description', array(
156
- 'name' => 'Description',
157
- 'hiddenFor' => array( 'dashboard', 'shortcode' ),
158
- 'type' => 'text',
159
- 'description' => 'Description of the gallery, for internal use.',
160
- 'proCall' => false,
161
- 'excludeFrom' => array( 'dashboard', 'shortcode' ),
162
- ) );
163
- $this->addField( 'General', 'layout', array(
164
- 'name' => 'Layout',
165
- 'type' => 'select',
166
- 'description' => '<strong>Final Tiles</strong>: use images with different sizes<br><strong>Masonry</strong>: multi-column layout, use this one if you need images of the same size.',
167
- 'values' => array(
168
- 'Layout' => array( 'final|Final Tiles', 'columns|Masonry' ),
169
  ),
170
- 'proCall' => false,
171
- 'excludeFrom' => array(),
172
- ) );
173
- $this->addField( 'General', 'width', array(
174
- 'name' => 'Width',
175
- 'type' => 'text',
176
- 'description' => 'Width of the gallery in pixels or percentage.',
177
- 'proCall' => false,
178
- 'excludeFrom' => array(),
179
- ) );
180
- $this->addField( 'General', 'margin', array(
181
- 'name' => 'Margin',
182
- 'type' => 'number',
183
- 'description' => 'Margin between images',
184
- 'mu' => 'px',
185
- 'min' => 0,
186
- 'max' => 50,
187
- 'proCall' => false,
188
- 'excludeFrom' => array(),
189
- ) );
190
- $this->addField( 'General', 'columns', array(
191
- 'name' => 'Number of columns',
192
- 'type' => 'number',
193
- 'description' => '',
194
- 'mu' => '',
195
- 'min' => 1,
196
- 'max' => 50,
197
- 'proCall' => false,
198
- 'excludeFrom' => array(),
199
- ) );
200
- $this->addField( 'General', 'columnsTabletLandscape', array(
201
- 'name' => 'Number of columns (Tablet landscape)',
202
- 'type' => 'number',
203
- 'description' => '',
204
- 'mu' => '',
205
- 'min' => 1,
206
- 'max' => 50,
207
- 'proCall' => false,
208
- 'excludeFrom' => array(),
209
- ) );
210
- $this->addField( 'General', 'columnsTabletPortrait', array(
211
- 'name' => 'Number of columns (Tablet portrait)',
212
- 'type' => 'number',
213
- 'description' => '',
214
- 'mu' => '',
215
- 'min' => 1,
216
- 'max' => 50,
217
- 'proCall' => false,
218
- 'excludeFrom' => array(),
219
- ) );
220
- $this->addField( 'General', 'columnsPhoneLandscape', array(
221
- 'name' => 'Number of columns (Phone landscape)',
222
- 'type' => 'number',
223
- 'description' => '',
224
- 'mu' => '',
225
- 'min' => 1,
226
- 'max' => 50,
227
- 'proCall' => false,
228
- 'excludeFrom' => array(),
229
- ) );
230
- $this->addField( 'General', 'columnsPhonePortrait', array(
231
- 'name' => 'Number of columns (Phone portrait)',
232
- 'type' => 'number',
233
- 'description' => '',
234
- 'mu' => '',
235
- 'min' => 1,
236
- 'max' => 50,
237
- 'proCall' => false,
238
- 'excludeFrom' => array(),
239
- ) );
240
- $this->addField( 'General', 'imageSizeFactor', array(
241
- 'name' => 'Image size factor',
242
- 'type' => 'slider',
243
- 'description' => 'Percentage of image size, i.e.: if an image of the gallery is 300x200 and the size factor is 50% then the resulting image will be 150x100.
244
- 90% is a suggested default value, because under some circumstances, the images could be enlarged by the script (to fill gaps and avoid blank spaces between tiles).',
245
- 'default' => 90,
246
- 'min' => 1,
247
- 'max' => 100,
248
- 'mu' => '%',
249
- 'proCall' => false,
250
- 'excludeFrom' => array(),
251
- ) );
252
- $this->addField( 'General', 'imageSizeFactorTabletLandscape', array(
253
- 'name' => 'Image size factor (Tablet Landscape)',
254
- 'type' => 'slider',
255
- 'description' => 'Image size factor to apply when the viewport is 1024px, typically for tablets with landscape orientation',
256
- 'default' => 80,
257
- 'min' => 1,
258
- 'max' => 100,
259
- 'mu' => '%',
260
- 'proCall' => false,
261
- 'excludeFrom' => array(),
262
- ) );
263
- $this->addField( 'General', 'imageSizeFactorTabletPortrait', array(
264
- 'name' => 'Image size factor Tablet Portrait',
265
- 'type' => 'slider',
266
- 'description' => 'Image size factor to apply when the viewport is 768px, typically for tablets with portrait orientation',
267
- 'default' => 70,
268
- 'min' => 1,
269
- 'max' => 100,
270
- 'mu' => '%',
271
- 'proCall' => false,
272
- 'excludeFrom' => array(),
273
- ) );
274
- $this->addField( 'General', 'imageSizeFactorPhoneLandscape', array(
275
- 'name' => 'Image size factor Smartphone Landscape',
276
- 'type' => 'slider',
277
- 'description' => 'Image size factor to apply when the viewport is 640px, typically for smartphones with landscape orientation',
278
- 'default' => 60,
279
- 'min' => 1,
280
- 'max' => 100,
281
- 'mu' => '%',
282
- 'proCall' => false,
283
- 'excludeFrom' => array(),
284
- ) );
285
- $this->addField( 'General', 'imageSizeFactorPhonePortrait', array(
286
- 'name' => 'Image size factor Phone Portrait',
287
- 'type' => 'slider',
288
- 'description' => 'Image size factor to apply when the viewport is 320px, typically for smartphones with portrait orientation',
289
- 'default' => 50,
290
- 'min' => 1,
291
- 'max' => 100,
292
- 'mu' => '%',
293
- 'proCall' => false,
294
- 'excludeFrom' => array(),
295
- ) );
296
- $this->addField( 'General', 'imageSizeFactorCustom', array(
297
- 'name' => 'Custom image size factor',
298
- 'hiddenFor' => array( 'dashboard', 'shortcode' ),
299
- 'type' => FinalTiles_Gallery::getFieldType( 'custom_isf' ),
300
- 'description' => 'Use this field if you need further resolutions. Make custom layout for any device and resolution.',
301
- 'proCall' => true,
302
- 'excludeFrom' => array( 'dashboard', 'shortcode' ),
303
- ) );
304
- $this->addField( 'General', 'minTileWidth', array(
305
- 'name' => 'Tile minimum width',
306
- 'type' => 'number',
307
- 'description' => 'Minimum width of each tile, <strong>multiply this value for the image size factor to get the real size</strong>.',
308
- 'mu' => 'px',
309
- 'min' => 50,
310
- 'max' => 500,
311
- 'default' => 200,
312
- 'proCall' => false,
313
- 'excludeFrom' => array(),
314
- ) );
315
- $this->addField( 'General', 'imagesOrder', array(
316
- 'name' => 'Images order',
317
- 'type' => 'select',
318
- 'description' => 'Choose the order of the images',
319
- 'default' => '',
320
- 'values' => array(
321
- 'Images order' => array( 'user|User', 'reverse|Reverse', 'random|Random' ),
322
  ),
323
- 'proCall' => false,
324
- 'excludeFrom' => array(),
325
- ) );
326
- $this->addField( 'General', 'filter', array(
327
- 'name' => 'Filters',
328
- 'type' => FinalTiles_Gallery::getFieldType( 'filter' ),
329
- 'description' => 'Manage here all the filters of this gallery',
330
- 'proCall' => true,
331
- 'excludeFrom' => array( 'dashboard', 'shortcode' ),
332
- ) );
333
- $this->addField( 'General', 'gridCellSize', array(
334
- 'name' => 'Size of the grid',
335
- 'type' => 'number',
336
- 'default' => 25,
337
- 'min' => 1,
338
- 'max' => 100,
339
- 'mu' => 'px',
340
- 'description' => 'Tiles are snapped to a virtual grid, <strong>the higher this value the higher the chance to get bottom aligned tiles</strong> (but it needs to crop vertically).',
341
- 'proCall' => false,
342
- 'excludeFrom' => array(),
343
- ) );
344
- $this->addField( 'General', 'gridCellSizeDisabledBelow', array(
345
- 'name' => 'Disable grid size below resolution',
346
- 'type' => 'number',
347
- 'default' => 800,
348
- 'min' => 0,
349
- 'max' => 4000,
350
- 'mu' => 'px',
351
- 'description' => 'If you have small tiny images under certain resolutions then you can switch off grid size (image cropping) when the screen resolution is below this value.',
352
- 'proCall' => false,
353
- 'excludeFrom' => array(),
354
- ) );
355
- $this->addField( 'General', 'enlargeImages', array(
356
- 'name' => 'Allow image enlargement',
357
- 'type' => 'toggle',
358
- 'description' => 'Images can be occasionally enlarged to avoid gaps. If you notice a quality loss try to reduce the <strong>Image size factor</strong> parameter.',
359
- 'default' => 'T',
360
- 'proCall' => false,
361
- 'excludeFrom' => array(),
362
  ) );
363
  /*"scrollEffect" , array(
364
  "name" => "Scroll effect",
@@ -370,186 +369,186 @@ $this->addField( 'General', 'enlargeImages', array(
370
  )
371
  ),
372
  "proCall" => false,
373
- "excludeFrom" => array()
374
  ));*/
375
- $this->addField( 'General', 'compressHTML', array(
376
- 'name' => 'Compress HTML',
377
- 'type' => 'toggle',
378
- 'description' => 'Enable or disable HTML compression, some themes prefer uncompressed, switch it off in case of problems.',
379
- 'default' => 'T',
380
- 'proCall' => false,
381
- 'excludeFrom' => array(),
382
- ) );
383
- $this->addField( 'Links & Lightbox', 'lightbox', array(
384
- 'name' => 'Lightbox &amp; Links',
385
- 'type' => 'select',
386
- 'description' => 'Define here what happens when user click on the images. Lightboxes with video support: EverlightBox, LightGallery, Magnific popup, Colorbox (require embed URL)); PrettyPhoto, FancyBox (require embed URL)',
387
- 'values' => array(
388
- 'Link' => array( ' |No link', 'direct|Direct link to image (useful for external lightboxes)|disabled', 'post|Post or WooCommerce product|disabled' ),
389
- 'Lightboxes' => array(
390
- 'lightbox2|Lightbox',
391
- 'everlightbox|EverlightBox + social sharing and comments',
392
- 'lightgallery|LightGallery|disabled',
393
- 'magnific|Magnific popup|disabled',
394
- 'colorbox|ColorBox|disabled',
395
- 'prettyphoto|PrettyPhoto|disabled',
396
- 'fancybox|FancyBox|disabled',
397
- 'swipebox|SwipeBox|disabled'
398
  ),
399
  ),
400
- 'proCall' => true,
401
- 'excludeFrom' => array(),
402
- ) );
403
- $this->addField( 'Links & Lightbox', 'mobileLightbox', array(
404
- 'name' => 'Lightbox &amp; Links',
405
- 'type' => 'select',
406
- 'description' => 'Define here what happens when user click on the images. Lightboxes with video support: EverlightBox, LightGallery, Magnific popup, Colorbox (require embed URL)); PrettyPhoto, FancyBox (require embed URL)',
407
- 'values' => array(
408
- 'Link' => array( ' |No link', 'direct|Direct link to image (useful for external lightboxes)', 'post|Post or WooCommerce product|disabled' ),
409
- 'Lightboxes' => array(
410
- 'lightbox2|Lightbox',
411
- 'everlightbox|EverlightBox + social sharing and comments',
412
- 'lightgallery|LightGallery|disabled',
413
- 'magnific|Magnific popup|disabled',
414
- 'colorbox|ColorBox|disabled',
415
- 'prettyphoto|PrettyPhoto|disabled',
416
- 'fancybox|FancyBox|disabled',
417
- 'swipebox|SwipeBox|disabled'
418
  ),
419
  ),
420
- 'proCall' => true,
421
- 'excludeFrom' => array(),
422
- ) );
423
- $this->addField( 'Links & Lightbox', 'lightboxImageSize', array(
424
- 'name' => 'Image size for the lightbox',
425
- 'type' => 'select',
426
- 'description' => '',
427
- 'values' => array(
428
- 'Size' => array(),
429
  ),
430
- 'proCall' => false,
431
- 'excludeFrom' => array(),
432
- ) );
433
- $this->addField( 'Links & Lightbox', 'disableLightboxGroups', array(
434
- 'name' => 'Disable lightbox grouping',
435
- 'type' => 'toggle',
436
- 'description' => 'Flag this option if you don\'t want to group images when opened in a lightbox.',
437
- 'default' => 'F',
438
- 'proCall' => false,
439
- 'excludeFrom' => array(),
440
- ) );
441
- $this->addField( 'Links & Lightbox', 'blank', array(
442
- 'name' => 'Links target',
443
- 'type' => 'toggle',
444
- 'description' => 'Open links in a blank page.',
445
- 'proCall' => false,
446
- 'excludeFrom' => array(),
447
- ) );
448
- $this->addField( 'Links & Lightbox', 'enableTwitter', array(
449
- 'name' => 'Enable Twitter icon',
450
- 'type' => 'toggle',
451
- 'description' => 'Enable Twitter sharing.',
452
- 'default' => 'F',
453
- 'proCall' => false,
454
- 'excludeFrom' => array(),
455
- ) );
456
- $this->addField( 'Links & Lightbox', 'enableFacebook', array(
457
- 'name' => 'Enable Facebook icon',
458
- 'type' => 'toggle',
459
- 'description' => 'Enable Facebook sharing. Note: after the last version of OpenGraph API it\'s not possible to share a specific image anymore.',
460
- 'default' => 'F',
461
- 'proCall' => false,
462
- 'excludeFrom' => array(),
463
- ) );
464
- $this->addField( 'Links & Lightbox', 'enableGplus', array(
465
- 'name' => 'Enable Google Plus icon',
466
- 'type' => 'toggle',
467
- 'description' => 'Enable Google Plus sharing',
468
- 'default' => 'F',
469
- 'proCall' => false,
470
- 'excludeFrom' => array(),
471
- ) );
472
- $this->addField( 'Links & Lightbox', 'enablePinterest', array(
473
- 'name' => 'Enable Pinterest icon',
474
- 'type' => 'toggle',
475
- 'description' => 'Enable Pinterest sharing',
476
- 'default' => 'F',
477
- 'proCall' => false,
478
- 'excludeFrom' => array(),
479
- ) );
480
- $this->addField( 'Links & Lightbox', 'socialIconColor', array(
481
- 'name' => 'Color of social sharing icons',
482
- 'type' => 'color',
483
- 'description' => 'Set the color of the social sharing icons',
484
- 'default' => '#ffffff',
485
- 'proCall' => false,
486
- 'excludeFrom' => array(),
487
- ) );
488
- $this->addField( 'Links & Lightbox', 'socialIconStyle', array(
489
- 'name' => 'Style of the social icons panel',
490
- 'type' => 'select',
491
- 'description' => 'Set the color of the social sharing icons',
492
- 'default' => 'none',
493
- 'values' => array(
494
- 'Style' => array( 'none|None', 'circle|Circles', 'bar|Bar' ),
495
  ),
496
- 'proCall' => false,
497
- 'excludeFrom' => array(),
498
- ) );
499
- $this->addField( 'Links & Lightbox', 'socialIconPosition', array(
500
- 'name' => 'Position of the social icons panel',
501
- 'type' => 'select',
502
- 'description' => 'Set the position of the social sharing icons',
503
- 'default' => 'bottom',
504
- 'values' => array(
505
- 'Position' => array( 'bottom|Bottom', 'right|Right' ),
506
  ),
507
- 'proCall' => false,
508
- 'excludeFrom' => array(),
509
- ) );
510
- $this->addField( 'Captions', 'captionBehavior', array(
511
- 'name' => 'Caption behavior',
512
- 'type' => 'select',
513
- 'description' => 'Effect used to show the captions.',
514
- 'values' => array(
515
- 'Effect' => array(
516
- 'none|Fade in',
517
- 'fixed|Fixed|disabled',
518
- 'fixed-bg|Fixed with background|disabled',
519
- 'fixed-then-hidden|Fixed, hidden on mouse hover|disabled',
520
- 'fixed-bottom|Fixed at bottom|disabled',
521
- 'slide-from-top|Slide from top|disabled',
522
- 'slide-from-bottom|Slide from bottom|disabled'
523
  ),
524
  ),
525
- 'proCall' => true,
526
- 'excludeFrom' => array(),
527
- ) );
528
- $this->addField( 'Captions', 'captionMobileBehavior', array(
529
- 'name' => 'Caption mobile behavior',
530
- 'type' => 'select',
531
- 'description' => 'Caption behavior for mobile devices.',
532
- 'values' => array(
533
- 'Behavior' => array(
534
- 'desktop|Same as desktop',
535
- 'none|Never show captions|disabled',
536
- 'fixed-bg|Fixed with background|disabled',
537
- 'fixed-bottom|Fixed at bottom|disabled',
538
- 'fixed-then-hidden|Visible, hidden on touch|disabled'
539
  ),
540
  ),
541
- 'proCall' => false,
542
- 'excludeFrom' => array(),
543
- ) );
544
- $this->addField( 'Captions', 'captionPosition', array(
545
- 'name' => 'Position',
546
- 'type' => 'select',
547
- 'description' => 'Choose the position of the caption.',
548
- 'values' => array(
549
- 'Behavior' => array( 'inside|Inside', 'outside|Outside (EXPERIMENTAL)' ),
550
  ),
551
- 'proCall' => false,
552
- 'excludeFrom' => array(),
553
  ) );
554
  /*"captionFullHeight" , array(
555
  "name" => "Caption full height",
@@ -557,535 +556,508 @@ $this->addField( 'Captions', 'captionPosition', array(
557
  "description" => "Enable this option for full height captions. <strong>This is required if you want to use caption icons and caption effects other than <i>fade</i>.</strong>",
558
  "default" => "T",
559
  "proCall" => false,
560
- "excludeFrom" => array()
561
  ));*/
562
- $this->addField( 'Captions', 'captionEmpty', array(
563
- 'name' => 'Empty captions',
564
- 'type' => 'select',
565
- 'description' => 'Choose if empty caption has to be shown.',
566
- 'values' => array(
567
- 'Empty captions' => array( 'hide|Don\'t show empty captions', 'show|Show empty captions|disabled' ),
568
  ),
569
- 'proCall' => false,
570
- 'excludeFrom' => array(),
571
- ) );
572
- $this->addField( 'Captions', 'captionIcon', array(
573
- 'name' => 'Caption icon',
574
- 'type' => 'select',
575
- 'description' => 'Choose the icon for the captions.',
576
- 'values' => array(
577
- 'Icon' => array(
578
- '|None',
579
- 'search|Lens',
580
- 'search-plus|Lens (plus)',
581
- 'link|Link',
582
- 'heart|Heart',
583
- 'heart-o|Heart empty',
584
- 'camera|Camera',
585
- 'camera-retro|Camera retro',
586
- 'picture-o|Picture',
587
- 'star|Star',
588
- 'star-o|Star empty',
589
- 'sun-o|Sun',
590
- 'arrows-alt|Arrows',
591
- 'hand-o-right|Hand'
592
  ),
593
  ),
594
- 'proCall' => false,
595
- 'excludeFrom' => array(),
596
- ) );
597
- $this->addField( 'Captions', 'customCaptionIcon', array(
598
- 'name' => 'Custom caption icon',
599
- 'type' => FinalTiles_Gallery::getFieldType( 'customCaptionIcon' ),
600
- 'description' => 'Use this field to insert the class of a FontAwesome icon (i.e.: fa-heart). <a href=\'http://fontawesome.io/icons/\' target=\'blank\'>See all available icons</a>. <strong>This value override the <i>Caption icon</i> value</strong>.',
601
- 'proCall' => false,
602
- 'excludeFrom' => array(),
603
- ) );
604
- $this->addField( 'Captions', 'captionIconColor', array(
605
- 'name' => 'Caption icon color',
606
- 'type' => 'color',
607
- 'description' => 'Color of the icon in captions.',
608
- 'default' => '#ffffff',
609
- 'proCall' => false,
610
- 'excludeFrom' => array(),
611
- ) );
612
- $this->addField( 'Captions', 'captionIconSize', array(
613
- 'name' => 'Caption icon size',
614
- 'type' => 'number',
615
- 'description' => 'Size of the icon in captions.',
616
- 'default' => 12,
617
- 'min' => 10,
618
- 'max' => 96,
619
- 'mu' => 'px',
620
- 'proCall' => false,
621
- 'excludeFrom' => array(),
622
- ) );
623
- $this->addField( 'Captions', 'captionFontSize', array(
624
- 'name' => 'Caption font size',
625
- 'type' => 'number',
626
- 'description' => 'Size of the font in captions.',
627
- 'default' => 12,
628
- 'min' => 10,
629
- 'max' => 96,
630
- 'mu' => 'px',
631
- 'proCall' => false,
632
- 'excludeFrom' => array(),
633
- ) );
634
- $this->addField( 'Captions', 'captionEasing', array(
635
- 'name' => 'Caption effect easing',
636
- 'type' => 'select',
637
- 'description' => 'Easing function for the caption animation, works better with sliding animations.',
638
- 'values' => array(
639
- 'Easing' => array(
640
- 'ease|Ease',
641
- 'linear|Linear|disabled',
642
- 'ease-in|Ease in|disabled',
643
- 'ease-out|Ease out|disabled',
644
- 'ease-in-out|Ease in and out|disabled'
645
  ),
646
  ),
647
- 'proCall' => false,
648
- 'excludeFrom' => array(),
649
- ) );
650
- $this->addField( 'Captions', 'captionFrame', array(
651
- 'name' => 'Caption frame',
652
- 'type' => 'toggle',
653
- 'description' => 'Add a frame around the caption',
654
- 'default' => 'F',
655
- 'proCall' => false,
656
- 'excludeFrom' => array(),
657
- ) );
658
- $this->addField( 'Captions', 'captionFrameColor', array(
659
- 'name' => 'Caption frame color',
660
- 'type' => 'color',
661
- 'description' => 'Color of the frame around the caption',
662
- 'default' => '#ffffff',
663
- 'proCall' => false,
664
- 'excludeFrom' => array(),
665
- ) );
666
- $this->addField( 'Captions', 'captionColor', array(
667
- 'name' => 'Caption color',
668
- 'type' => 'color',
669
- 'description' => 'Text color of the captions.',
670
- 'default' => '#ffffff',
671
- 'proCall' => false,
672
- 'excludeFrom' => array(),
673
- ) );
674
- $this->addField( 'Captions', 'captionEffectDuration', array(
675
- 'name' => 'Caption effect duration',
676
- 'type' => 'text',
677
- 'description' => 'Duration of the caption animation.',
678
- 'default' => 250,
679
- 'mu' => 'ms',
680
- 'min' => 0,
681
- 'max' => 1000,
682
- 'proCall' => false,
683
- 'excludeFrom' => array(),
684
- ) );
685
- $this->addField( 'Captions', 'captionBackgroundColor', array(
686
- 'name' => 'Caption background color',
687
- 'type' => 'color',
688
- 'description' => 'Caption background color',
689
- 'default' => '#000000',
690
- 'proCall' => false,
691
- 'excludeFrom' => array(),
692
- ) );
693
- $this->addField( 'Captions', 'captionOpacity', array(
694
- 'name' => 'Caption opacity',
695
- 'type' => 'text',
696
- 'description' => 'Opacity of the caption, 0% means \'invisible\' while 100% is a plain color without opacity.',
697
- 'default' => 80,
698
- 'min' => 0,
699
- 'max' => 100,
700
- 'mu' => '%',
701
- 'proCall' => false,
702
- 'excludeFrom' => array(),
703
- ) );
704
- $this->addField( 'Captions', 'wp_field_caption', array(
705
- 'name' => 'WordPress caption field',
706
- 'type' => 'select',
707
- 'description' => 'WordPress field used for captions. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore captions just set it to \'<i>Don\'t use captions</i>\'.',
708
- 'values' => array(
709
- 'Field' => array(
710
- 'none|Don\'t use captions',
711
- 'title|Title',
712
- 'caption|Caption',
713
- 'description|Description'
714
  ),
715
  ),
716
- 'proCall' => false,
717
- 'excludeFrom' => array( 'shortcode' ),
718
- ) );
719
- $this->addField( 'Captions', 'wp_field_title', array(
720
- 'name' => 'WordPress title field',
721
- 'type' => 'select',
722
- 'description' => 'WordPress field used for titles. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore titles just set it to \'<i>Don\'t use titles</i>\'.',
723
- 'values' => array(
724
- 'Field' => array( 'none|Don\'t use titles', 'title|Title', 'description|Description' ),
725
  ),
726
- 'proCall' => false,
727
- 'excludeFrom' => array( 'shortcode' ),
728
- ) );
729
- $this->addField( 'Captions', 'recentPostsCaption', array(
730
- 'name' => 'Recent posts caption',
731
- 'type' => 'select',
732
- 'description' => 'Field of the post used for captions when using "Recent posts" as source.',
733
- 'values' => array(
734
- 'Field' => array(
735
- 'none|Don\'t use captions',
736
- 'title|Title',
737
- 'excerpt|Excerpt',
738
- 'auto-excerpt|Auto excerpt'
739
  ),
740
  ),
741
- 'proCall' => false,
742
- 'excludeFrom' => array( 'shortcode' ),
743
- ) );
744
- $this->addField( 'Captions', 'recentPostsCaptionAutoExcerptLength', array(
745
- 'name' => 'Max number of words for \'Auto excerpt\'',
746
- 'type' => 'text',
747
- 'description' => 'Define the max number of words of the caption when <i>Recent posts caption</i> is set to <i>Auto excerpt</i>.',
748
- 'default' => '20',
749
- 'proCall' => false,
750
- 'excludeFrom' => array(),
751
- ) );
752
- $this->addField( 'Captions', 'captionVerticalAlignment', array(
753
- 'name' => 'Caption Vertical Alignment',
754
- 'type' => 'select',
755
- 'description' => 'Choose the vertical alignment of the caption',
756
- 'values' => array(
757
- 'Caption vertical alignment' => array( 'top|Top', 'middle|Middle', 'bottom|Bottom' ),
758
  ),
759
- 'proCall' => false,
760
- 'excludeFrom' => array(),
761
- ) );
762
- $this->addField( 'Captions', 'captionHorizontalAlignment', array(
763
- 'name' => 'Caption Horizontal Alignment',
764
- 'type' => 'select',
765
- 'description' => 'Choose the horizontal alignment of the caption',
766
- 'values' => array(
767
- 'Caption horizontal alignment' => array( 'left|Left', 'center|Center', 'right|Right' ),
768
  ),
769
- 'proCall' => false,
770
- 'excludeFrom' => array(),
771
- ) );
772
- $this->addField( 'Captions', 'titleFontSize', array(
773
- 'name' => 'Title font size',
774
- 'type' => 'number',
775
- 'description' => 'Size of the font in captions.',
776
- 'min' => 10,
777
- 'max' => 96,
778
- 'mu' => 'px',
779
- 'proCall' => false,
780
- 'excludeFrom' => array(),
781
- ) );
782
- $this->addField( 'Hover effects', 'hoverZoom', array(
783
- 'name' => 'Zoom',
784
- 'type' => FinalTiles_gallery::getFieldType( 'hoverZoom' ),
785
- 'description' => 'Scale value.',
786
- 'default' => 100,
787
- 'min' => 0,
788
- 'max' => 600,
789
- 'mu' => '%',
790
- 'proCall' => false,
791
- 'excludeFrom' => array(),
792
- ) );
793
- $this->addField( 'Hover effects', 'hoverRotation', array(
794
- 'name' => 'Rotation',
795
- 'type' => FinalTiles_gallery::getFieldType( 'hoverRotation' ),
796
- 'description' => 'Rotation value in degrees.',
797
- 'min' => 0,
798
- 'max' => 360,
799
- 'mu' => 'deg',
800
- 'default' => 0,
801
- 'proCall' => false,
802
- 'excludeFrom' => array(),
803
- ) );
804
- $this->addField( 'Hover effects', 'hoverDuration', array(
805
- 'name' => 'Duration',
806
- 'description' => '',
807
- 'type' => FinalTiles_gallery::getFieldType( 'hoverDuration' ),
808
- 'min' => 10,
809
- 'max' => 60000,
810
- 'mu' => 'ms',
811
- 'default' => 500,
812
- 'proCall' => false,
813
- 'excludeFrom' => array(),
814
- ) );
815
- $this->addField( 'Hover effects', 'hoverIconRotation', array(
816
- 'name' => 'Rotate icon',
817
- 'type' => 'toggle',
818
- 'default' => 'F',
819
- 'description' => 'Enable rotation of the icon.',
820
- 'proCall' => false,
821
- 'excludeFrom' => array(),
822
- ) );
823
- $this->addField( 'Image loaded effects', 'loadedDuration', array(
824
- 'name' => 'Duration',
825
- 'description' => '',
826
- 'type' => 'slider',
827
- 'min' => 10,
828
- 'max' => 1000,
829
- 'mu' => 'ms',
830
- 'default' => 500,
831
- 'proCall' => false,
832
- 'excludeFrom' => array(),
833
- ) );
834
- $this->addField( 'Image loaded effects', 'loadedEasing', array(
835
- 'name' => 'Easing curve',
836
- 'type' => 'select',
837
- 'description' => 'Choose the easing curve for the loading effect animation',
838
- 'values' => array(
839
- 'Easing curve' => array(
840
- 'linear|Linear',
841
- 'ease-in|Ease in',
842
- 'ease-out|Ease out',
843
- 'ease-in-out|Ease in and out',
844
- 'ease-out-back|Ease out back',
845
- 'ease-in-out-back|Ease in and out back',
846
- 'ease-out-back-accent|Ease out back (accent)',
847
- 'elastic-out|Elastic out'
848
  ),
849
  ),
850
- 'proCall' => false,
851
- 'excludeFrom' => array(),
852
- ) );
853
- $this->addField( 'Image loaded effects', 'loadedScaleY', array(
854
- 'name' => 'Vertical scaling',
855
- 'description' => '',
856
- 'type' => 'slider',
857
- 'min' => 1,
858
- 'max' => 300,
859
- 'mu' => '%',
860
- 'default' => 100,
861
- 'proCall' => false,
862
- 'excludeFrom' => array(),
863
- ) );
864
- $this->addField( 'Image loaded effects', 'loadedScaleX', array(
865
- 'name' => 'Horizontal scaling',
866
- 'description' => '',
867
- 'type' => 'slider',
868
- 'min' => 1,
869
- 'max' => 300,
870
- 'mu' => '%',
871
- 'default' => 100,
872
- 'proCall' => false,
873
- 'excludeFrom' => array(),
874
- ) );
875
- $this->addField( 'Image loaded effects', 'loadedRotateY', array(
876
- 'name' => 'Vertical rotation',
877
- 'description' => '',
878
- 'type' => 'slider',
879
- 'min' => -180,
880
- 'max' => 180,
881
- 'default' => 0,
882
- 'mu' => 'deg',
883
- 'proCall' => false,
884
- 'excludeFrom' => array(),
885
- ) );
886
- $this->addField( 'Image loaded effects', 'loadedRotateX', array(
887
- 'name' => 'Horizontal rotation',
888
- 'description' => '',
889
- 'type' => 'slider',
890
- 'min' => -180,
891
- 'max' => 180,
892
- 'default' => 0,
893
- 'mu' => 'deg',
894
- 'proCall' => false,
895
- 'excludeFrom' => array(),
896
- ) );
897
- $this->addField( 'Image loaded effects', 'loadedHSlide', array(
898
- 'name' => 'Horizontal slide',
899
- 'description' => '',
900
- 'type' => 'slider',
901
- 'min' => -1000,
902
- 'max' => 1000,
903
- 'mu' => 'px',
904
- 'default' => 0,
905
- 'proCall' => false,
906
- 'excludeFrom' => array(),
907
- ) );
908
- $this->addField( 'Image loaded effects', 'loadedVSlide', array(
909
- 'name' => 'Vertical slide',
910
- 'description' => '',
911
- 'type' => 'slider',
912
- 'min' => -1000,
913
- 'max' => 1000,
914
- 'mu' => 'px',
915
- 'default' => 0,
916
- 'proCall' => false,
917
- 'excludeFrom' => array(),
918
- ) );
919
- $this->addField( 'Style', 'borderSize', array(
920
- 'name' => 'Border size',
921
- 'type' => 'number',
922
- 'description' => 'Size of the border of each image.',
923
- 'default' => 0,
924
- 'min' => 0,
925
- 'max' => 10,
926
- 'mu' => 'px',
927
- 'proCall' => false,
928
- 'excludeFrom' => array(),
929
- ) );
930
- $this->addField( 'Style', 'borderRadius', array(
931
- 'name' => 'Border radius',
932
- 'type' => 'number',
933
- 'description' => 'Border radius of the images.',
934
- 'default' => 0,
935
- 'min' => 0,
936
- 'max' => 100,
937
- 'mu' => 'px',
938
- 'proCall' => false,
939
- 'excludeFrom' => array(),
940
- ) );
941
- $this->addField( 'Style', 'borderColor', array(
942
- 'name' => 'Border color',
943
- 'type' => 'color',
944
- 'description' => 'Color of the border when size is greater than 0.',
945
- 'default' => '#000000',
946
- 'proCall' => false,
947
- 'excludeFrom' => array(),
948
- ) );
949
- $this->addField( 'Style', 'loadingBarColor', array(
950
- 'name' => 'Loading Bar color',
951
- 'type' => 'color',
952
- 'description' => 'Color of the loading bar',
953
- 'default' => '#000000',
954
- 'proCall' => false,
955
- 'excludeFrom' => array(),
956
- ) );
957
- $this->addField( 'Style', 'loadingBarBackgroundColor', array(
958
- 'name' => 'Loading Bar background color',
959
- 'type' => 'color',
960
- 'description' => 'Background color of the loading bar',
961
- 'default' => '#cccccc',
962
- 'proCall' => false,
963
- 'excludeFrom' => array(),
964
- ) );
965
- $this->addField( 'Style', 'shadowSize', array(
966
- 'name' => 'Shadow size',
967
- 'type' => 'number',
968
- 'description' => 'Shadow size of the images.',
969
- 'default' => 0,
970
- 'min' => 0,
971
- 'max' => 20,
972
- 'mu' => 'px',
973
- 'proCall' => false,
974
- 'excludeFrom' => array(),
975
- ) );
976
- $this->addField( 'Style', 'shadowColor', array(
977
- 'name' => 'Shadow color',
978
- 'type' => 'color',
979
- 'description' => 'Color of the shadow when size is greater than 0.',
980
- 'default' => '#000000',
981
- 'proCall' => false,
982
- 'excludeFrom' => array(),
983
- ) );
984
- $this->addField( 'Style', 'backgroundColor', array(
985
- 'name' => 'Tile background color',
986
- 'type' => 'color',
987
- 'description' => 'Background color of tiles',
988
- 'default' => '#fafafa',
989
- 'proCall' => false,
990
- 'excludeFrom' => array(),
991
- ) );
992
- $this->addField( 'Customizations', 'aClass', array(
993
- 'name' => 'Additional CSS class on A tag',
994
- 'type' => 'text',
995
- 'description' => 'Use this field if you need to add additional CSS classes to the link that contains the image.',
996
- 'default' => '',
997
- 'proCall' => false,
998
- 'excludeFrom' => array(),
999
- ) );
1000
- $this->addField( 'Customizations', 'rel', array(
1001
- 'name' => 'Value of \'rel\' attribute on the link that contains the image.',
1002
- 'type' => 'text',
1003
- 'description' => 'Use this field if you need to add additional CSS classes to the link that contains the image. This is useful mostly to integrate the gallery with other lightbox plugins.',
1004
- 'default' => '',
1005
- 'proCall' => false,
1006
- 'excludeFrom' => array(),
1007
- ) );
1008
- $this->addField( 'Customizations', 'beforeGalleryText', array(
1009
- 'name' => 'Text before gallery',
1010
- 'type' => 'textarea',
1011
- 'description' => 'Use this field to add text/html to be placed just before your gallery.',
1012
- 'proCall' => false,
1013
- 'excludeFrom' => array( 'shortcode' ),
1014
- ) );
1015
- $this->addField( 'Customizations', 'afterGalleryText', array(
1016
- 'name' => 'Text after gallery',
1017
- 'type' => 'textarea',
1018
- 'description' => 'Use this field to add text/html to be placed just after your gallery.',
1019
- 'proCall' => false,
1020
- 'excludeFrom' => array( 'shortcode' ),
1021
- ) );
1022
- $this->addField( 'Customizations', 'style', array(
1023
- 'name' => 'Custom CSS',
1024
- 'type' => 'textarea',
1025
- 'description' => '<strong>Write just the code without using the &lt;style&gt; tag.</strong><br>List of useful selectors:<br>
1026
- <br>
1027
- <ul>
1028
- <li>
1029
- <em>.final-tiles-gallery</em> : gallery container;
1030
- </li>
1031
- <li>
1032
- <em>.final-tiles-gallery .tile-inner</em> : tile content;
1033
- </li>
1034
- <li>
1035
- <em>.final-tiles-gallery .tile-inner .item</em> : image of the tile;
1036
- </li>
1037
- <li>
1038
- <em>.final-tiles-gallery .tile-inner .caption</em> : caption of the tile;
1039
- </li>
1040
- <li>
1041
- <em>.final-tiles-gallery .ftg-filters</em> : filters container
1042
- </li>
1043
- <li>
1044
- <em>.final-tiles-gallery .ftg-filters a</em> : filter
1045
- </li>
1046
- <li>
1047
- <em>.final-tiles-gallery .ftg-filters a.selected</em> : selected filter
1048
- </li>
1049
- </ul>',
1050
- 'proCall' => false,
1051
- 'excludeFrom' => array( 'shortcode' ),
1052
- ) );
1053
- $this->addField( 'Customizations', 'script', array(
1054
- 'name' => 'Custom scripts',
1055
- 'type' => 'textarea',
1056
- 'description' => 'This script will be called after the gallery initialization. Useful for custom lightboxes.
1057
- <br />
1058
- <br />
1059
- <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>',
1060
- 'proCall' => false,
1061
- 'excludeFrom' => array( 'shortcode' ),
1062
- ) );
1063
- $this->addField( 'Customizations', 'delay', array(
1064
- 'name' => 'Delay',
1065
- 'type' => 'text',
1066
- 'description' => 'Delay (in milliseconds) before firing the gallery. Sometimes it\'s needed to avoid conflicts with other plugins.',
1067
- 'min' => 0,
1068
- 'max' => 5000,
1069
- 'mu' => 'ms',
1070
- 'default' => 0,
1071
- 'proCall' => false,
1072
- 'excludeFrom' => array(),
1073
- ) );
1074
- $this->addField( 'Customizations', 'support', array(
1075
- 'name' => 'Show developer link',
1076
- 'type' => 'toggle',
1077
- 'description' => 'I want to support this plugin, show the developer link!',
1078
- 'default' => 'F',
1079
- 'proCall' => false,
1080
- 'excludeFrom' => array(),
1081
- 'proCall' => false,
1082
- 'excludeFrom' => array(),
1083
- ) );
1084
- $this->addField( 'Customizations', 'supportText', array(
1085
- 'name' => 'Developer link text',
1086
- 'type' => 'text',
1087
- 'description' => 'Text for the developer link',
1088
- 'default' => 'powered by Final Tiles Grid Gallery',
1089
- 'proCall' => false,
1090
- 'excludeFrom' => array(),
1091
  ) );
1
  <?php
2
 
3
  $this->fields = array(
4
+ "General" => array(
5
+ "icon" => "mdi-settings",
6
+ "fields" => array(),
7
  ),
8
+ "Links & Lightbox" => array(
9
+ "icon" => "mdi-link-variant",
10
+ "fields" => array(),
11
  ),
12
+ "Captions" => array(
13
+ "icon" => "mdi-comment-text-outline",
14
+ "fields" => array(),
15
  ),
16
+ "Hover effects" => array(
17
+ "icon" => "mdi-file-image",
18
+ "presets" => array(
19
+ "Slow zoom in" => array(
20
+ "hoverDuration" => 60000,
21
+ "hoverZoom" => 400,
22
+ "hoverRotation" => 0,
23
  ),
24
+ "Zoom in" => array(
25
+ "hoverDuration" => 250,
26
+ "hoverZoom" => 200,
27
+ "hoverRotation" => 0,
28
  ),
29
+ "Swirl in" => array(
30
+ "hoverZoom" => 200,
31
+ "hoverRotation" => 20,
32
  ),
33
+ "Swirl in super" => array(
34
+ "hoverZoom" => 200,
35
+ "hoverRotation" => 360,
36
  ),
37
+ "Zoom out" => array(
38
+ "hoverZoom" => 50,
39
+ "hoverRotation" => 0,
40
  ),
41
+ "Swirl out" => array(
42
+ "hoverZoom" => 50,
43
+ "hoverRotation" => -20,
44
  ),
45
+ "Swirl out super" => array(
46
+ "hoverZoom" => 50,
47
+ "hoverRotation" => -360,
48
  ),
49
  ),
50
+ "fields" => array(),
51
  ),
52
+ "Image loaded effects" => array(
53
+ "icon" => "mdi-reload",
54
+ "presets" => array(
55
+ "Wobble" => array(
56
+ "loadedDuration" => 600,
57
+ "loadedEasing" => "elastic-out",
58
+ "loadedScaleY" => 50,
59
+ "loadedScaleX" => 50,
60
+ "loadedRotateY" => 0,
61
+ "loadedRotateX" => 0,
62
+ "loadedVSlide" => 0,
63
+ "loadedHSlide" => 0,
64
  ),
65
+ "Windows" => array(
66
+ "loadedDuration" => 600,
67
+ "loadedEasing" => "elastic-out",
68
+ "loadedRotateY" => -120,
69
+ "loadedScaleY" => 100,
70
+ "loadedScaleX" => 100,
71
+ "loadedRotateX" => 0,
72
+ "loadedVSlide" => 0,
73
+ "loadedHSlide" => 0,
74
  ),
75
+ "Cards" => array(
76
+ "loadedDuration" => 600,
77
+ "loadedEasing" => "ease-in-out",
78
+ "loadedRotateX" => -120,
79
+ "loadedRotateY" => -120,
80
+ "loadedScaleY" => 100,
81
+ "loadedScaleX" => 0,
82
+ "loadedVSlide" => 0,
83
+ "loadedHSlide" => 0,
84
  ),
85
+ "Slide from bottom" => array(
86
+ "loadedDuration" => 250,
87
+ "loadedEasing" => "ease-out",
88
+ "loadedRotateX" => 0,
89
+ "loadedRotateY" => 0,
90
+ "loadedScaleY" => 100,
91
+ "loadedScaleX" => 100,
92
+ "loadedVSlide" => 100,
93
+ "loadedHSlide" => 0,
94
  ),
95
+ "Slide from left" => array(
96
+ "loadedDuration" => 250,
97
+ "loadedEasing" => "ease-out",
98
+ "loadedRotateX" => 0,
99
+ "loadedRotateY" => 0,
100
+ "loadedScaleY" => 100,
101
+ "loadedScaleX" => 100,
102
+ "loadedVSlide" => 0,
103
+ "loadedHSlide" => -100,
104
  ),
105
+ "Elastic skew" => array(
106
+ "loadedDuration" => 800,
107
+ "loadedEasing" => "elastic-out",
108
+ "loadedRotateX" => 0,
109
+ "loadedRotateY" => -180,
110
+ "loadedScaleY" => 200,
111
+ "loadedScaleX" => 100,
112
+ "loadedVSlide" => 300,
113
+ "loadedHSlide" => 0,
114
  ),
115
+ "Flying doors" => array(
116
+ "loadedDuration" => 800,
117
+ "loadedEasing" => "ease-out-back",
118
+ "loadedRotateX" => -180,
119
+ "loadedRotateY" => 0,
120
+ "loadedScaleY" => 100,
121
+ "loadedScaleX" => 300,
122
+ "loadedVSlide" => -500,
123
+ "loadedHSlide" => -800,
124
  ),
125
+ "Pop" => array(
126
+ "loadedDuration" => 300,
127
+ "loadedEasing" => "ease-in-out",
128
+ "loadedRotateX" => 0,
129
+ "loadedRotateY" => 0,
130
+ "loadedScaleY" => 1,
131
+ "loadedScaleX" => 1,
132
+ "loadedVSlide" => 0,
133
+ "loadedHSlide" => 0,
134
  ),
135
  ),
136
+ "fields" => array(),
137
  ),
138
+ "Style" => array(
139
+ "icon" => "mdi-format-paint",
140
+ "fields" => array(),
141
  ),
142
+ "Customizations" => array(
143
+ "icon" => "mdi-puzzle",
144
+ "fields" => array(),
145
  ),
146
  );
147
+ $this->addField( "General", "name", array(
148
+ "name" => "Name",
149
+ "hiddenFor" => array( "dashboard", "shortcode" ),
150
+ "type" => "text",
151
+ "description" => "Name of the gallery, for internal use.",
152
+ "proCall" => false,
153
+ "excludeFrom" => array( "dashboard", "shortcode" ),
154
+ ) );
155
+ $this->addField( "General", "description", array(
156
+ "name" => "Description",
157
+ "hiddenFor" => array( "dashboard", "shortcode" ),
158
+ "type" => "text",
159
+ "description" => "Description of the gallery, for internal use.",
160
+ "proCall" => false,
161
+ "excludeFrom" => array( "dashboard", "shortcode" ),
162
+ ) );
163
+ $this->addField( "General", "layout", array(
164
+ "name" => "Layout",
165
+ "type" => "select",
166
+ "description" => "<strong>Final Tiles</strong>: use images with different sizes<br><strong>Masonry</strong>: multi-column layout, use this one if you need images of the same size.",
167
+ "values" => array(
168
+ "Layout" => array( "final|Final Tiles", "columns|Masonry" ),
169
  ),
170
+ "proCall" => false,
171
+ "excludeFrom" => array(),
172
+ ) );
173
+ $this->addField( "General", "width", array(
174
+ "name" => "Width",
175
+ "type" => "text",
176
+ "description" => "Width of the gallery in pixels or percentage.",
177
+ "proCall" => false,
178
+ "excludeFrom" => array(),
179
+ ) );
180
+ $this->addField( "General", "margin", array(
181
+ "name" => "Margin",
182
+ "type" => "number",
183
+ "description" => "Margin between images",
184
+ "mu" => "px",
185
+ "min" => 0,
186
+ "max" => 50,
187
+ "proCall" => false,
188
+ "excludeFrom" => array(),
189
+ ) );
190
+ $this->addField( "General", "columns", array(
191
+ "name" => "Number of columns",
192
+ "type" => "number",
193
+ "description" => "",
194
+ "mu" => "",
195
+ "min" => 1,
196
+ "max" => 50,
197
+ "proCall" => false,
198
+ "excludeFrom" => array(),
199
+ ) );
200
+ $this->addField( "General", "columnsTabletLandscape", array(
201
+ "name" => "Number of columns (Tablet landscape)",
202
+ "type" => "number",
203
+ "description" => "",
204
+ "mu" => "",
205
+ "min" => 1,
206
+ "max" => 50,
207
+ "proCall" => false,
208
+ "excludeFrom" => array(),
209
+ ) );
210
+ $this->addField( "General", "columnsTabletPortrait", array(
211
+ "name" => "Number of columns (Tablet portrait)",
212
+ "type" => "number",
213
+ "description" => "",
214
+ "mu" => "",
215
+ "min" => 1,
216
+ "max" => 50,
217
+ "proCall" => false,
218
+ "excludeFrom" => array(),
219
+ ) );
220
+ $this->addField( "General", "columnsPhoneLandscape", array(
221
+ "name" => "Number of columns (Phone landscape)",
222
+ "type" => "number",
223
+ "description" => "",
224
+ "mu" => "",
225
+ "min" => 1,
226
+ "max" => 50,
227
+ "proCall" => false,
228
+ "excludeFrom" => array(),
229
+ ) );
230
+ $this->addField( "General", "columnsPhonePortrait", array(
231
+ "name" => "Number of columns (Phone portrait)",
232
+ "type" => "number",
233
+ "description" => "",
234
+ "mu" => "",
235
+ "min" => 1,
236
+ "max" => 50,
237
+ "proCall" => false,
238
+ "excludeFrom" => array(),
239
+ ) );
240
+ $this->addField( "General", "imageSizeFactor", array(
241
+ "name" => "Image size factor",
242
+ "type" => "slider",
243
+ "description" => "Percentage of image size, i.e.: if an image of the gallery is 300x200 and the size factor is 50% then the resulting image will be 150x100.\n 90% is a suggested default value, because under some circumstances, the images could be enlarged by the script (to fill gaps and avoid blank spaces between tiles).",
244
+ "default" => 90,
245
+ "min" => 1,
246
+ "max" => 100,
247
+ "mu" => "%",
248
+ "proCall" => false,
249
+ "excludeFrom" => array(),
250
+ ) );
251
+ $this->addField( "General", "imageSizeFactorTabletLandscape", array(
252
+ "name" => "Image size factor (Tablet Landscape)",
253
+ "type" => "slider",
254
+ "description" => "Image size factor to apply when the viewport is 1024px, typically for tablets with landscape orientation",
255
+ "default" => 80,
256
+ "min" => 1,
257
+ "max" => 100,
258
+ "mu" => "%",
259
+ "proCall" => false,
260
+ "excludeFrom" => array(),
261
+ ) );
262
+ $this->addField( "General", "imageSizeFactorTabletPortrait", array(
263
+ "name" => "Image size factor Tablet Portrait",
264
+ "type" => "slider",
265
+ "description" => "Image size factor to apply when the viewport is 768px, typically for tablets with portrait orientation",
266
+ "default" => 70,
267
+ "min" => 1,
268
+ "max" => 100,
269
+ "mu" => "%",
270
+ "proCall" => false,
271
+ "excludeFrom" => array(),
272
+ ) );
273
+ $this->addField( "General", "imageSizeFactorPhoneLandscape", array(
274
+ "name" => "Image size factor Smartphone Landscape",
275
+ "type" => "slider",
276
+ "description" => "Image size factor to apply when the viewport is 640px, typically for smartphones with landscape orientation",
277
+ "default" => 60,
278
+ "min" => 1,
279
+ "max" => 100,
280
+ "mu" => "%",
281
+ "proCall" => false,
282
+ "excludeFrom" => array(),
283
+ ) );
284
+ $this->addField( "General", "imageSizeFactorPhonePortrait", array(
285
+ "name" => "Image size factor Phone Portrait",
286
+ "type" => "slider",
287
+ "description" => "Image size factor to apply when the viewport is 320px, typically for smartphones with portrait orientation",
288
+ "default" => 50,
289
+ "min" => 1,
290
+ "max" => 100,
291
+ "mu" => "%",
292
+ "proCall" => false,
293
+ "excludeFrom" => array(),
294
+ ) );
295
+ $this->addField( "General", "imageSizeFactorCustom", array(
296
+ "name" => "Custom image size factor",
297
+ "hiddenFor" => array( "dashboard", "shortcode" ),
298
+ "type" => FinalTiles_Gallery::getFieldType( "custom_isf" ),
299
+ "description" => "Use this field if you need further resolutions. Make custom layout for any device and resolution.",
300
+ "proCall" => true,
301
+ "excludeFrom" => array( "dashboard", "shortcode" ),
302
+ ) );
303
+ $this->addField( "General", "minTileWidth", array(
304
+ "name" => "Tile minimum width",
305
+ "type" => "number",
306
+ "description" => "Minimum width of each tile, <strong>multiply this value for the image size factor to get the real size</strong>.",
307
+ "mu" => "px",
308
+ "min" => 50,
309
+ "max" => 500,
310
+ "default" => 200,
311
+ "proCall" => false,
312
+ "excludeFrom" => array(),
313
+ ) );
314
+ $this->addField( "General", "imagesOrder", array(
315
+ "name" => "Images order",
316
+ "type" => "select",
317
+ "description" => "Choose the order of the images",
318
+ "default" => "",
319
+ "values" => array(
320
+ "Images order" => array( "user|User", "reverse|Reverse", "random|Random" ),
 
321
  ),
322
+ "proCall" => false,
323
+ "excludeFrom" => array(),
324
+ ) );
325
+ $this->addField( "General", "filter", array(
326
+ "name" => "Filters",
327
+ "type" => FinalTiles_Gallery::getFieldType( "filter" ),
328
+ "description" => "Manage here all the filters of this gallery",
329
+ "proCall" => true,
330
+ "excludeFrom" => array( "dashboard", "shortcode" ),
331
+ ) );
332
+ $this->addField( "General", "gridCellSize", array(
333
+ "name" => "Size of the grid",
334
+ "type" => "number",
335
+ "default" => 25,
336
+ "min" => 1,
337
+ "max" => 100,
338
+ "mu" => "px",
339
+ "description" => "Tiles are snapped to a virtual grid, <strong>the higher this value the higher the chance to get bottom aligned tiles</strong> (but it needs to crop vertically).",
340
+ "proCall" => false,
341
+ "excludeFrom" => array(),
342
+ ) );
343
+ $this->addField( "General", "gridCellSizeDisabledBelow", array(
344
+ "name" => "Disable grid size below resolution",
345
+ "type" => "number",
346
+ "default" => 800,
347
+ "min" => 0,
348
+ "max" => 4000,
349
+ "mu" => "px",
350
+ "description" => "If you have small tiny images under certain resolutions then you can switch off grid size (image cropping) when the screen resolution is below this value.",
351
+ "proCall" => false,
352
+ "excludeFrom" => array(),
353
+ ) );
354
+ $this->addField( "General", "enlargeImages", array(
355
+ "name" => "Allow image enlargement",
356
+ "type" => "toggle",
357
+ "description" => "Images can be occasionally enlarged to avoid gaps. If you notice a quality loss try to reduce the <strong>Image size factor</strong> parameter.",
358
+ "default" => "T",
359
+ "proCall" => false,
360
+ "excludeFrom" => array(),
361
  ) );
362
  /*"scrollEffect" , array(
363
  "name" => "Scroll effect",
369
  )
370
  ),
371
  "proCall" => false,
372
+ "excludeFrom" => array()
373
  ));*/
374
+ $this->addField( "General", "compressHTML", array(
375
+ "name" => "Compress HTML",
376
+ "type" => "toggle",
377
+ "description" => "Enable or disable HTML compression, some themes prefer uncompressed, switch it off in case of problems.",
378
+ "default" => "T",
379
+ "proCall" => false,
380
+ "excludeFrom" => array(),
381
+ ) );
382
+ $this->addField( "Links & Lightbox", "lightbox", array(
383
+ "name" => "Lightbox &amp; Links",
384
+ "type" => "select",
385
+ "description" => "Define here what happens when user click on the images. Lightboxes with video support: EverlightBox, LightGallery, Magnific popup, Colorbox (require embed URL)); PrettyPhoto, FancyBox (require embed URL)",
386
+ "values" => array(
387
+ "Link" => array( " |No link", "direct|Direct link to image (useful for external lightboxes)|disabled", "post|Post or WooCommerce product|disabled" ),
388
+ "Lightboxes" => array(
389
+ "lightbox2|Lightbox",
390
+ "everlightbox|EverlightBox + social sharing and comments",
391
+ "lightgallery|LightGallery|disabled",
392
+ "magnific|Magnific popup|disabled",
393
+ "colorbox|ColorBox|disabled",
394
+ "prettyphoto|PrettyPhoto|disabled",
395
+ "fancybox|FancyBox|disabled",
396
+ "swipebox|SwipeBox|disabled"
397
  ),
398
  ),
399
+ "proCall" => true,
400
+ "excludeFrom" => array(),
401
+ ) );
402
+ $this->addField( "Links & Lightbox", "mobileLightbox", array(
403
+ "name" => "Lightbox &amp; Links",
404
+ "type" => "select",
405
+ "description" => "Define here what happens when user click on the images. Lightboxes with video support: EverlightBox, LightGallery, Magnific popup, Colorbox (require embed URL)); PrettyPhoto, FancyBox (require embed URL)",
406
+ "values" => array(
407
+ "Link" => array( " |No link", "direct|Direct link to image (useful for external lightboxes)", "post|Post or WooCommerce product|disabled" ),
408
+ "Lightboxes" => array(
409
+ "lightbox2|Lightbox",
410
+ "everlightbox|EverlightBox + social sharing and comments",
411
+ "lightgallery|LightGallery|disabled",
412
+ "magnific|Magnific popup|disabled",
413
+ "colorbox|ColorBox|disabled",
414
+ "prettyphoto|PrettyPhoto|disabled",
415
+ "fancybox|FancyBox|disabled",
416
+ "swipebox|SwipeBox|disabled"
417
  ),
418
  ),
419
+ "proCall" => true,
420
+ "excludeFrom" => array(),
421
+ ) );
422
+ $this->addField( "Links & Lightbox", "lightboxImageSize", array(
423
+ "name" => "Image size for the lightbox",
424
+ "type" => "select",
425
+ "description" => "",
426
+ "values" => array(
427
+ "Size" => array(),
428
  ),
429
+ "proCall" => false,
430
+ "excludeFrom" => array(),
431
+ ) );
432
+ $this->addField( "Links & Lightbox", "disableLightboxGroups", array(
433
+ "name" => "Disable lightbox grouping",
434
+ "type" => "toggle",
435
+ "description" => "Flag this option if you don't want to group images when opened in a lightbox.",
436
+ "default" => "F",
437
+ "proCall" => false,
438
+ "excludeFrom" => array(),
439
+ ) );
440
+ $this->addField( "Links & Lightbox", "blank", array(
441
+ "name" => "Links target",
442
+ "type" => "toggle",
443
+ "description" => "Open links in a blank page.",
444
+ "proCall" => false,
445
+ "excludeFrom" => array(),
446
+ ) );
447
+ $this->addField( "Links & Lightbox", "enableTwitter", array(
448
+ "name" => "Enable Twitter icon",
449
+ "type" => "toggle",
450
+ "description" => "Enable Twitter sharing.",
451
+ "default" => "F",
452
+ "proCall" => false,
453
+ "excludeFrom" => array(),
454
+ ) );
455
+ $this->addField( "Links & Lightbox", "enableFacebook", array(
456
+ "name" => "Enable Facebook icon",
457
+ "type" => "toggle",
458
+ "description" => "Enable Facebook sharing. Note: after the last version of OpenGraph API it's not possible to share a specific image anymore.",
459
+ "default" => "F",
460
+ "proCall" => false,
461
+ "excludeFrom" => array(),
462
+ ) );
463
+ $this->addField( "Links & Lightbox", "enableGplus", array(
464
+ "name" => "Enable Google Plus icon",
465
+ "type" => "toggle",
466
+ "description" => "Enable Google Plus sharing",
467
+ "default" => "F",
468
+ "proCall" => false,
469
+ "excludeFrom" => array(),
470
+ ) );
471
+ $this->addField( "Links & Lightbox", "enablePinterest", array(
472
+ "name" => "Enable Pinterest icon",
473
+ "type" => "toggle",
474
+ "description" => "Enable Pinterest sharing",
475
+ "default" => "F",
476
+ "proCall" => false,
477
+ "excludeFrom" => array(),
478
+ ) );
479
+ $this->addField( "Links & Lightbox", "socialIconColor", array(
480
+ "name" => "Color of social sharing icons",
481
+ "type" => "color",
482
+ "description" => "Set the color of the social sharing icons",
483
+ "default" => "#ffffff",
484
+ "proCall" => false,
485
+ "excludeFrom" => array(),
486
+ ) );
487
+ $this->addField( "Links & Lightbox", "socialIconStyle", array(
488
+ "name" => "Style of the social icons panel",
489
+ "type" => "select",
490
+ "description" => "Set the color of the social sharing icons",
491
+ "default" => "none",
492
+ "values" => array(
493
+ "Style" => array( "none|None", "circle|Circles", "bar|Bar" ),
494
  ),
495
+ "proCall" => false,
496
+ "excludeFrom" => array(),
497
+ ) );
498
+ $this->addField( "Links & Lightbox", "socialIconPosition", array(
499
+ "name" => "Position of the social icons panel",
500
+ "type" => "select",
501
+ "description" => "Set the position of the social sharing icons",
502
+ "default" => "bottom",
503
+ "values" => array(
504
+ "Position" => array( "bottom|Bottom", "right|Right" ),
505
  ),
506
+ "proCall" => false,
507
+ "excludeFrom" => array(),
508
+ ) );
509
+ $this->addField( "Captions", "captionBehavior", array(
510
+ "name" => "Caption behavior",
511
+ "type" => "select",
512
+ "description" => "Effect used to show the captions.",
513
+ "values" => array(
514
+ "Effect" => array(
515
+ "none|Fade in",
516
+ "fixed|Fixed|disabled",
517
+ "fixed-bg|Fixed with background|disabled",
518
+ "fixed-then-hidden|Fixed, hidden on mouse hover|disabled",
519
+ "fixed-bottom|Fixed at bottom|disabled",
520
+ "slide-from-top|Slide from top|disabled",
521
+ "slide-from-bottom|Slide from bottom|disabled"
522
  ),
523
  ),
524
+ "proCall" => true,
525
+ "excludeFrom" => array(),
526
+ ) );
527
+ $this->addField( "Captions", "captionMobileBehavior", array(
528
+ "name" => "Caption mobile behavior",
529
+ "type" => "select",
530
+ "description" => "Caption behavior for mobile devices.",
531
+ "values" => array(
532
+ "Behavior" => array(
533
+ "desktop|Same as desktop",
534
+ "none|Never show captions|disabled",
535
+ "fixed-bg|Fixed with background|disabled",
536
+ "fixed-bottom|Fixed at bottom|disabled",
537
+ "fixed-then-hidden|Visible, hidden on touch|disabled"
538
  ),
539
  ),
540
+ "proCall" => false,
541
+ "excludeFrom" => array(),
542
+ ) );
543
+ $this->addField( "Captions", "captionPosition", array(
544
+ "name" => "Position",
545
+ "type" => "select",
546
+ "description" => "Choose the position of the caption.",
547
+ "values" => array(
548
+ "Behavior" => array( "inside|Inside", "outside|Outside (EXPERIMENTAL)" ),
549
  ),
550
+ "proCall" => false,
551
+ "excludeFrom" => array(),
552
  ) );
553
  /*"captionFullHeight" , array(
554
  "name" => "Caption full height",
556
  "description" => "Enable this option for full height captions. <strong>This is required if you want to use caption icons and caption effects other than <i>fade</i>.</strong>",
557
  "default" => "T",
558
  "proCall" => false,
559
+ "excludeFrom" => array()
560
  ));*/
561
+ $this->addField( "Captions", "captionEmpty", array(
562
+ "name" => "Empty captions",
563
+ "type" => "select",
564
+ "description" => "Choose if empty caption has to be shown.",
565
+ "values" => array(
566
+ "Empty captions" => array( "hide|Don't show empty captions", "show|Show empty captions|disabled" ),
567
  ),
568
+ "proCall" => false,
569
+ "excludeFrom" => array(),
570
+ ) );
571
+ $this->addField( "Captions", "captionIcon", array(
572
+ "name" => "Caption icon",
573
+ "type" => "select",
574
+ "description" => "Choose the icon for the captions.",
575
+ "values" => array(
576
+ "Icon" => array(
577
+ "|None",
578
+ "search|Lens",
579
+ "search-plus|Lens (plus)",
580
+ "link|Link",
581
+ "heart|Heart",
582
+ "heart-o|Heart empty",
583
+ "camera|Camera",
584
+ "camera-retro|Camera retro",
585
+ "picture-o|Picture",
586
+ "star|Star",
587
+ "star-o|Star empty",
588
+ "sun-o|Sun",
589
+ "arrows-alt|Arrows",
590
+ "hand-o-right|Hand"
591
  ),
592
  ),
593
+ "proCall" => false,
594
+ "excludeFrom" => array(),
595
+ ) );
596
+ $this->addField( "Captions", "customCaptionIcon", array(
597
+ "name" => "Custom caption icon",
598
+ "type" => FinalTiles_Gallery::getFieldType( "customCaptionIcon" ),
599
+ "description" => "Use this field to insert the class of a FontAwesome icon (i.e.: fa-heart). <a href='http://fontawesome.io/icons/' target='blank'>See all available icons</a>. <strong>This value override the <i>Caption icon</i> value</strong>.",
600
+ "proCall" => false,
601
+ "excludeFrom" => array(),
602
+ ) );
603
+ $this->addField( "Captions", "captionIconColor", array(
604
+ "name" => "Caption icon color",
605
+ "type" => "color",
606
+ "description" => "Color of the icon in captions.",
607
+ "default" => "#ffffff",
608
+ "proCall" => false,
609
+ "excludeFrom" => array(),
610
+ ) );
611
+ $this->addField( "Captions", "captionIconSize", array(
612
+ "name" => "Caption icon size",
613
+ "type" => "number",
614
+ "description" => "Size of the icon in captions.",
615
+ "default" => 12,
616
+ "min" => 10,
617
+ "max" => 96,
618
+ "mu" => "px",
619
+ "proCall" => false,
620
+ "excludeFrom" => array(),
621
+ ) );
622
+ $this->addField( "Captions", "captionFontSize", array(
623
+ "name" => "Caption font size",
624
+ "type" => "number",
625
+ "description" => "Size of the font in captions.",
626
+ "default" => 12,
627
+ "min" => 10,
628
+ "max" => 96,
629
+ "mu" => "px",
630
+ "proCall" => false,
631
+ "excludeFrom" => array(),
632
+ ) );
633
+ $this->addField( "Captions", "captionEasing", array(
634
+ "name" => "Caption effect easing",
635
+ "type" => "select",
636
+ "description" => "Easing function for the caption animation, works better with sliding animations.",
637
+ "values" => array(
638
+ "Easing" => array(
639
+ "ease|Ease",
640
+ "linear|Linear|disabled",
641
+ "ease-in|Ease in|disabled",
642
+ "ease-out|Ease out|disabled",
643
+ "ease-in-out|Ease in and out|disabled"
644
  ),
645
  ),
646
+ "proCall" => false,
647
+ "excludeFrom" => array(),
648
+ ) );
649
+ $this->addField( "Captions", "captionFrame", array(
650
+ "name" => "Caption frame",
651
+ "type" => "toggle",
652
+ "description" => "Add a frame around the caption",
653
+ "default" => "F",
654
+ "proCall" => false,
655
+ "excludeFrom" => array(),
656
+ ) );
657
+ $this->addField( "Captions", "captionFrameColor", array(
658
+ "name" => "Caption frame color",
659
+ "type" => "color",
660
+ "description" => "Color of the frame around the caption",
661
+ "default" => "#ffffff",
662
+ "proCall" => false,
663
+ "excludeFrom" => array(),
664
+ ) );
665
+ $this->addField( "Captions", "captionColor", array(
666
+ "name" => "Caption color",
667
+ "type" => "color",
668
+ "description" => "Text color of the captions.",
669
+ "default" => "#ffffff",
670
+ "proCall" => false,
671
+ "excludeFrom" => array(),
672
+ ) );
673
+ $this->addField( "Captions", "captionEffectDuration", array(
674
+ "name" => "Caption effect duration",
675
+ "type" => "text",
676
+ "description" => "Duration of the caption animation.",
677
+ "default" => 250,
678
+ "mu" => "ms",
679
+ "min" => 0,
680
+ "max" => 1000,
681
+ "proCall" => false,
682
+ "excludeFrom" => array(),
683
+ ) );
684
+ $this->addField( "Captions", "captionBackgroundColor", array(
685
+ "name" => "Caption background color",
686
+ "type" => "color",
687
+ "description" => "Caption background color",
688
+ "default" => "#000000",
689
+ "proCall" => false,
690
+ "excludeFrom" => array(),
691
+ ) );
692
+ $this->addField( "Captions", "captionOpacity", array(
693
+ "name" => "Caption opacity",
694
+ "type" => "text",
695
+ "description" => "Opacity of the caption, 0% means 'invisible' while 100% is a plain color without opacity.",
696
+ "default" => 80,
697
+ "min" => 0,
698
+ "max" => 100,
699
+ "mu" => "%",
700
+ "proCall" => false,
701
+ "excludeFrom" => array(),
702
+ ) );
703
+ $this->addField( "Captions", "wp_field_caption", array(
704
+ "name" => "WordPress caption field",
705
+ "type" => "select",
706
+ "description" => "WordPress field used for captions. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore captions just set it to '<i>Don't use captions</i>'.",
707
+ "values" => array(
708
+ "Field" => array(
709
+ "none|Don't use captions",
710
+ "title|Title",
711
+ "caption|Caption",
712
+ "description|Description"
713
  ),
714
  ),
715
+ "proCall" => false,
716
+ "excludeFrom" => array( "shortcode" ),
717
+ ) );
718
+ $this->addField( "Captions", "wp_field_title", array(
719
+ "name" => "WordPress title field",
720
+ "type" => "select",
721
+ "description" => "WordPress field used for titles. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore titles just set it to '<i>Don't use titles</i>'.",
722
+ "values" => array(
723
+ "Field" => array( "none|Don't use titles", "title|Title", "description|Description" ),
724
  ),
725
+ "proCall" => false,
726
+ "excludeFrom" => array( "shortcode" ),
727
+ ) );
728
+ $this->addField( "Captions", "recentPostsCaption", array(
729
+ "name" => "Recent posts caption",
730
+ "type" => "select",
731
+ "description" => "Field of the post used for captions when using \"Recent posts\" as source.",
732
+ "values" => array(
733
+ "Field" => array(
734
+ "none|Don't use captions",
735
+ "title|Title",
736
+ "excerpt|Excerpt",
737
+ "auto-excerpt|Auto excerpt"
738
  ),
739
  ),
740
+ "proCall" => false,
741
+ "excludeFrom" => array( "shortcode" ),
742
+ ) );
743
+ $this->addField( "Captions", "recentPostsCaptionAutoExcerptLength", array(
744
+ "name" => "Max number of words for 'Auto excerpt'",
745
+ "type" => "text",
746
+ "description" => "Define the max number of words of the caption when <i>Recent posts caption</i> is set to <i>Auto excerpt</i>.",
747
+ "default" => "20",
748
+ "proCall" => false,
749
+ "excludeFrom" => array(),
750
+ ) );
751
+ $this->addField( "Captions", "captionVerticalAlignment", array(
752
+ "name" => "Caption Vertical Alignment",
753
+ "type" => "select",
754
+ "description" => "Choose the vertical alignment of the caption",
755
+ "values" => array(
756
+ "Caption vertical alignment" => array( "top|Top", "middle|Middle", "bottom|Bottom" ),
757
  ),
758
+ "proCall" => false,
759
+ "excludeFrom" => array(),
760
+ ) );
761
+ $this->addField( "Captions", "captionHorizontalAlignment", array(
762
+ "name" => "Caption Horizontal Alignment",
763
+ "type" => "select",
764
+ "description" => "Choose the horizontal alignment of the caption",
765
+ "values" => array(
766
+ "Caption horizontal alignment" => array( "left|Left", "center|Center", "right|Right" ),
767
  ),
768
+ "proCall" => false,
769
+ "excludeFrom" => array(),
770
+ ) );
771
+ $this->addField( "Captions", "titleFontSize", array(
772
+ "name" => "Title font size",
773
+ "type" => "number",
774
+ "description" => "Size of the font in captions.",
775
+ "min" => 10,
776
+ "max" => 96,
777
+ "mu" => "px",
778
+ "proCall" => false,
779
+ "excludeFrom" => array(),
780
+ ) );
781
+ $this->addField( "Hover effects", "hoverZoom", array(
782
+ "name" => "Zoom",
783
+ "type" => FinalTiles_gallery::getFieldType( "hoverZoom" ),
784
+ "description" => "Scale value.",
785
+ "default" => 100,
786
+ "min" => 0,
787
+ "max" => 600,
788
+ "mu" => "%",
789
+ "proCall" => false,
790
+ "excludeFrom" => array(),
791
+ ) );
792
+ $this->addField( "Hover effects", "hoverRotation", array(
793
+ "name" => "Rotation",
794
+ "type" => FinalTiles_gallery::getFieldType( "hoverRotation" ),
795
+ "description" => "Rotation value in degrees.",
796
+ "min" => 0,
797
+ "max" => 360,
798
+ "mu" => "deg",
799
+ "default" => 0,
800
+ "proCall" => false,
801
+ "excludeFrom" => array(),
802
+ ) );
803
+ $this->addField( "Hover effects", "hoverDuration", array(
804
+ "name" => "Duration",
805
+ "description" => "",
806
+ "type" => FinalTiles_gallery::getFieldType( "hoverDuration" ),
807
+ "min" => 10,
808
+ "max" => 60000,
809
+ "mu" => "ms",
810
+ "default" => 500,
811
+ "proCall" => false,
812
+ "excludeFrom" => array(),
813
+ ) );
814
+ $this->addField( "Hover effects", "hoverIconRotation", array(
815
+ "name" => "Rotate icon",
816
+ "type" => "toggle",
817
+ "default" => "F",
818
+ "description" => "Enable rotation of the icon.",
819
+ "proCall" => false,
820
+ "excludeFrom" => array(),
821
+ ) );
822
+ $this->addField( "Image loaded effects", "loadedDuration", array(
823
+ "name" => "Duration",
824
+ "description" => "",
825
+ "type" => "slider",
826
+ "min" => 10,
827
+ "max" => 1000,
828
+ "mu" => "ms",
829
+ "default" => 500,
830
+ "proCall" => false,
831
+ "excludeFrom" => array(),
832
+ ) );
833
+ $this->addField( "Image loaded effects", "loadedEasing", array(
834
+ "name" => "Easing curve",
835
+ "type" => "select",
836
+ "description" => "Choose the easing curve for the loading effect animation",
837
+ "values" => array(
838
+ "Easing curve" => array(
839
+ "linear|Linear",
840
+ "ease-in|Ease in",
841
+ "ease-out|Ease out",
842
+ "ease-in-out|Ease in and out",
843
+ "ease-out-back|Ease out back",
844
+ "ease-in-out-back|Ease in and out back",
845
+ "ease-out-back-accent|Ease out back (accent)",
846
+ "elastic-out|Elastic out"
847
  ),
848
  ),
849
+ "proCall" => false,
850
+ "excludeFrom" => array(),
851
+ ) );
852
+ $this->addField( "Image loaded effects", "loadedScaleY", array(
853
+ "name" => "Vertical scaling",
854
+ "description" => "",
855
+ "type" => "slider",
856
+ "min" => 1,
857
+ "max" => 300,
858
+ "mu" => "%",
859
+ "default" => 100,
860
+ "proCall" => false,
861
+ "excludeFrom" => array(),
862
+ ) );
863
+ $this->addField( "Image loaded effects", "loadedScaleX", array(
864
+ "name" => "Horizontal scaling",
865
+ "description" => "",
866
+ "type" => "slider",
867
+ "min" => 1,
868
+ "max" => 300,
869
+ "mu" => "%",
870
+ "default" => 100,
871
+ "proCall" => false,
872
+ "excludeFrom" => array(),
873
+ ) );
874
+ $this->addField( "Image loaded effects", "loadedRotateY", array(
875
+ "name" => "Vertical rotation",
876
+ "description" => "",
877
+ "type" => "slider",
878
+ "min" => -180,
879
+ "max" => 180,
880
+ "default" => 0,
881
+ "mu" => "deg",
882
+ "proCall" => false,
883
+ "excludeFrom" => array(),
884
+ ) );
885
+ $this->addField( "Image loaded effects", "loadedRotateX", array(
886
+ "name" => "Horizontal rotation",
887
+ "description" => "",
888
+ "type" => "slider",
889
+ "min" => -180,
890
+ "max" => 180,
891
+ "default" => 0,
892
+ "mu" => "deg",
893
+ "proCall" => false,
894
+ "excludeFrom" => array(),
895
+ ) );
896
+ $this->addField( "Image loaded effects", "loadedHSlide", array(
897
+ "name" => "Horizontal slide",
898
+ "description" => "",
899
+ "type" => "slider",
900
+ "min" => -1000,
901
+ "max" => 1000,
902
+ "mu" => "px",
903
+ "default" => 0,
904
+ "proCall" => false,
905
+ "excludeFrom" => array(),
906
+ ) );
907
+ $this->addField( "Image loaded effects", "loadedVSlide", array(
908
+ "name" => "Vertical slide",
909
+ "description" => "",
910
+ "type" => "slider",
911
+ "min" => -1000,
912
+ "max" => 1000,
913
+ "mu" => "px",
914
+ "default" => 0,
915
+ "proCall" => false,
916
+ "excludeFrom" => array(),
917
+ ) );
918
+ $this->addField( "Style", "borderSize", array(
919
+ "name" => "Border size",
920
+ "type" => "number",
921
+ "description" => "Size of the border of each image.",
922
+ "default" => 0,
923
+ "min" => 0,
924
+ "max" => 10,
925
+ "mu" => "px",
926
+ "proCall" => false,
927
+ "excludeFrom" => array(),
928
+ ) );
929
+ $this->addField( "Style", "borderRadius", array(
930
+ "name" => "Border radius",
931
+ "type" => "number",
932
+ "description" => "Border radius of the images.",
933
+ "default" => 0,
934
+ "min" => 0,
935
+ "max" => 100,
936
+ "mu" => "px",
937
+ "proCall" => false,
938
+ "excludeFrom" => array(),
939
+ ) );
940
+ $this->addField( "Style", "borderColor", array(
941
+ "name" => "Border color",
942
+ "type" => "color",
943
+ "description" => "Color of the border when size is greater than 0.",
944
+ "default" => "#000000",
945
+ "proCall" => false,
946
+ "excludeFrom" => array(),
947
+ ) );
948
+ $this->addField( "Style", "loadingBarColor", array(
949
+ "name" => "Loading Bar color",
950
+ "type" => "color",
951
+ "description" => "Color of the loading bar",
952
+ "default" => "#000000",
953
+ "proCall" => false,
954
+ "excludeFrom" => array(),
955
+ ) );
956
+ $this->addField( "Style", "loadingBarBackgroundColor", array(
957
+ "name" => "Loading Bar background color",
958
+ "type" => "color",
959
+ "description" => "Background color of the loading bar",
960
+ "default" => "#cccccc",
961
+ "proCall" => false,
962
+ "excludeFrom" => array(),
963
+ ) );
964
+ $this->addField( "Style", "shadowSize", array(
965
+ "name" => "Shadow size",
966
+ "type" => "number",
967
+ "description" => "Shadow size of the images.",
968
+ "default" => 0,
969
+ "min" => 0,
970
+ "max" => 20,
971
+ "mu" => "px",
972
+ "proCall" => false,
973
+ "excludeFrom" => array(),
974
+ ) );
975
+ $this->addField( "Style", "shadowColor", array(
976
+ "name" => "Shadow color",
977
+ "type" => "color",
978
+ "description" => "Color of the shadow when size is greater than 0.",
979
+ "default" => "#000000",
980
+ "proCall" => false,
981
+ "excludeFrom" => array(),
982
+ ) );
983
+ $this->addField( "Style", "backgroundColor", array(
984
+ "name" => "Tile background color",
985
+ "type" => "color",
986
+ "description" => "Background color of tiles",
987
+ "default" => "#fafafa",
988
+ "proCall" => false,
989
+ "excludeFrom" => array(),
990
+ ) );
991
+ $this->addField( "Customizations", "aClass", array(
992
+ "name" => "Additional CSS class on A tag",
993
+ "type" => "text",
994
+ "description" => "Use this field if you need to add additional CSS classes to the link that contains the image.",
995
+ "default" => "",
996
+ "proCall" => false,
997
+ "excludeFrom" => array(),
998
+ ) );
999
+ $this->addField( "Customizations", "rel", array(
1000
+ "name" => "Value of 'rel' attribute on the link that contains the image.",
1001
+ "type" => "text",
1002
+ "description" => "Use this field if you need to add additional CSS classes to the link that contains the image. This is useful mostly to integrate the gallery with other lightbox plugins.",
1003
+ "default" => "",
1004
+ "proCall" => false,
1005
+ "excludeFrom" => array(),
1006
+ ) );
1007
+ $this->addField( "Customizations", "beforeGalleryText", array(
1008
+ "name" => "Text before gallery",
1009
+ "type" => "textarea",
1010
+ "description" => "Use this field to add text/html to be placed just before your gallery.",
1011
+ "proCall" => false,
1012
+ "excludeFrom" => array( "shortcode" ),
1013
+ ) );
1014
+ $this->addField( "Customizations", "afterGalleryText", array(
1015
+ "name" => "Text after gallery",
1016
+ "type" => "textarea",
1017
+ "description" => "Use this field to add text/html to be placed just after your gallery.",
1018
+ "proCall" => false,
1019
+ "excludeFrom" => array( "shortcode" ),
1020
+ ) );
1021
+ $this->addField( "Customizations", "style", array(
1022
+ "name" => "Custom CSS",
1023
+ "type" => "textarea",
1024
+ "description" => "<strong>Write just the code without using the &lt;style&gt; tag.</strong><br>List of useful selectors:<br>\n <br>\n <ul>\n <li>\n <em>.final-tiles-gallery</em> : gallery container;\n </li>\n <li>\n <em>.final-tiles-gallery .tile-inner</em> : tile content;\n </li>\n <li>\n <em>.final-tiles-gallery .tile-inner .item</em> : image of the tile;\n </li>\n <li>\n <em>.final-tiles-gallery .tile-inner .caption</em> : caption of the tile;\n </li>\n <li>\n <em>.final-tiles-gallery .ftg-filters</em> : filters container\n </li>\n <li>\n <em>.final-tiles-gallery .ftg-filters a</em> : filter\n </li>\n <li>\n <em>.final-tiles-gallery .ftg-filters a.selected</em> : selected filter\n </li>\n </ul>",
1025
+ "proCall" => false,
1026
+ "excludeFrom" => array( "shortcode" ),
1027
+ ) );
1028
+ $this->addField( "Customizations", "script", array(
1029
+ "name" => "Custom scripts",
1030
+ "type" => "textarea",
1031
+ "description" => "This script will be called after the gallery initialization. Useful for custom lightboxes.\n <br />\n <br />\n <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>",
1032
+ "proCall" => false,
1033
+ "excludeFrom" => array( "shortcode" ),
1034
+ ) );
1035
+ $this->addField( "Customizations", "delay", array(
1036
+ "name" => "Delay",
1037
+ "type" => "text",
1038
+ "description" => "Delay (in milliseconds) before firing the gallery. Sometimes it's needed to avoid conflicts with other plugins.",
1039
+ "min" => 0,
1040
+ "max" => 5000,
1041
+ "mu" => "ms",
1042
+ "default" => 0,
1043
+ "proCall" => false,
1044
+ "excludeFrom" => array(),
1045
+ ) );
1046
+ $this->addField( "Customizations", "support", array(
1047
+ "name" => "Show developer link",
1048
+ "type" => "toggle",
1049
+ "description" => "I want to support this plugin, show the developer link!",
1050
+ "default" => "F",
1051
+ "proCall" => false,
1052
+ "excludeFrom" => array(),
1053
+ "proCall" => false,
1054
+ "excludeFrom" => array(),
1055
+ ) );
1056
+ $this->addField( "Customizations", "supportText", array(
1057
+ "name" => "Developer link text",
1058
+ "type" => "text",
1059
+ "description" => "Text for the developer link",
1060
+ "default" => "powered by Final Tiles Grid Gallery",
1061
+ "proCall" => false,
1062
+ "excludeFrom" => array(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1063
  ) );
lib/gallery-class.php CHANGED
@@ -268,12 +268,7 @@ if (!class_exists("FinalTilesGallery"))
268
  }
269
 
270
  public function useCaptions()
271
- {
272
- if(wp_is_mobile() && $this->gallery->captionMobileBehavior == 'none')
273
- return false;
274
- if(wp_is_mobile() && $this->gallery->captionMobileBehavior == 'visible')
275
- return true;
276
-
277
  if($this->gallery->source == "images")
278
  {
279
  if(empty($this->gallery->wp_field_caption))
@@ -540,6 +535,7 @@ if (!class_exists("FinalTilesGallery"))
540
  }
541
  $html .= "\t\tnonce: '".wp_create_nonce('finaltilesgallery')."',\n";
542
  $html .= "\t\tgalleryId: '{$this->id}',\n";
 
543
  $html .= "\t\tlayout: '$gallery->layout',\n";
544
  $html .= "\t\tdebug: ".(empty($_GET['debug']) ? "false" : "true").",\n";
545
  $html .= "\t\tgridSize: $gallery->gridCellSize,\n";
@@ -654,28 +650,6 @@ if (!class_exists("FinalTilesGallery"))
654
  $html .= "\t}, ". $gallery->delay .");\n";
655
  $html .= "\t});\n";
656
 
657
- if($gallery->enableFacebook == "T")
658
- {
659
- $html .= "window.fbAsyncInit = function() {
660
- FB.init({
661
- appId : '1447224948871585',
662
- autoLogAppEvents : true,
663
- xfbml : true,
664
- version : 'v2.10'
665
- });
666
- FB.AppEvents.logPageView();
667
- };
668
-
669
- (function(d, s, id){
670
- var js, fjs = d.getElementsByTagName(s)[0];
671
- if (d.getElementById(id)) {return;}
672
- js = d.createElement(s); js.id = id;
673
- js.src = '//connect.facebook.net/en_US/sdk.js';
674
- fjs.parentNode.insertBefore(js, fjs);
675
- }(document, 'script', 'facebook-jssdk'));";
676
-
677
- }
678
-
679
  $html .= "</script>";
680
 
681
  $html .= stripslashes($this->gallery->afterGalleryText);
@@ -694,7 +668,8 @@ if (!class_exists("FinalTilesGallery"))
694
  $rid = $this->id;
695
 
696
  $gallery = $this->gallery;
697
-
 
698
  $html = "";
699
 
700
  $lightbox = wp_is_mobile() ?
268
  }
269
 
270
  public function useCaptions()
271
+ {
 
 
 
 
 
272
  if($this->gallery->source == "images")
273
  {
274
  if(empty($this->gallery->wp_field_caption))
535
  }
536
  $html .= "\t\tnonce: '".wp_create_nonce('finaltilesgallery')."',\n";
537
  $html .= "\t\tgalleryId: '{$this->id}',\n";
538
+ $html .= "\t\tsetupFilters: " . ($gallery->filterClick == 'F' ? "true" : "false") . ",\n";
539
  $html .= "\t\tlayout: '$gallery->layout',\n";
540
  $html .= "\t\tdebug: ".(empty($_GET['debug']) ? "false" : "true").",\n";
541
  $html .= "\t\tgridSize: $gallery->gridCellSize,\n";
650
  $html .= "\t}, ". $gallery->delay .");\n";
651
  $html .= "\t});\n";
652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
653
  $html .= "</script>";
654
 
655
  $html .= stripslashes($this->gallery->afterGalleryText);
668
  $rid = $this->id;
669
 
670
  $gallery = $this->gallery;
671
+ $current_filter = isset($_GET['ftg-set']) ? $_GET['ftg-set'] : null;
672
+
673
  $html = "";
674
 
675
  $lightbox = wp_is_mobile() ?
readme.txt CHANGED
@@ -135,6 +135,10 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
135
 
136
  == Changelog ==
137
 
 
 
 
 
138
  = 3.3.22 =
139
  * [Enhancement] Backend UI tweaks
140
 
@@ -245,6 +249,10 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
245
 
246
  == Upgrade Notice ==
247
 
 
 
 
 
248
  = 3.3.19 =
249
  * [Fix] Fixed ignored caption font size
250
 
135
 
136
  == Changelog ==
137
 
138
+ = 3.3.24
139
+ * [Fix] Fixed missing captions on mobile
140
+ * [Fix] Fixed skipped images when using columns layout
141
+
142
  = 3.3.22 =
143
  * [Enhancement] Backend UI tweaks
144
 
249
 
250
  == Upgrade Notice ==
251
 
252
+ = 3.3.24
253
+ * [Fix] Fixed missing captions on mobile
254
+ * [Fix] Fixed skipped images when using columns layout
255
+
256
  = 3.3.19 =
257
  * [Fix] Fixed ignored caption font size
258
 
scripts/jquery.finalTilesGallery.js CHANGED
@@ -57,7 +57,8 @@ var qualifyURL = function (url) {
57
  disableGridSizeBelow: 800,
58
  allowEnlargement: true,
59
  autoLoadURL: null,
60
- selectedFilter: '',
 
61
  onComplete: function () {},
62
  onUpdate: function () {},
63
  onLoading: function () {},
@@ -281,7 +282,8 @@ var qualifyURL = function (url) {
281
  });
282
  }
283
 
284
- this.setupFilters();
 
285
  this.edges.push({ left: 0, top: 0, width: this.currentWidth, index: 0 });
286
  this.loadImage();
287
  },
@@ -606,7 +608,7 @@ var qualifyURL = function (url) {
606
  hEdge.enlarged = false;
607
 
608
  //is the tile wider than the current edge?
609
- if (hEdge.width < w + this.settings.margin) {
610
  hEdge.case = 'Te';
611
  this.print('Te');
612
  //edge smaller than the image
57
  disableGridSizeBelow: 800,
58
  allowEnlargement: true,
59
  autoLoadURL: null,
60
+ selectedFilter: '',
61
+ setupFilters: true,
62
  onComplete: function () {},
63
  onUpdate: function () {},
64
  onLoading: function () {},
282
  });
283
  }
284
 
285
+ if(this.settings.setupFilters)
286
+ this.setupFilters();
287
  this.edges.push({ left: 0, top: 0, width: this.currentWidth, index: 0 });
288
  this.loadImage();
289
  },
608
  hEdge.enlarged = false;
609
 
610
  //is the tile wider than the current edge?
611
+ if (hEdge.width - w < w + this.settings.margin) {
612
  hEdge.case = 'Te';
613
  this.print('Te');
614
  //edge smaller than the image