Image Photo Gallery Final Tiles Grid - Version 2.0.13

Version Description

  • Added missing alt image attribute
Download this release

Release Info

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

Code changes from version 2.0.12 to 2.0.13

FinalTilesGalleryLite.php CHANGED
@@ -4,11 +4,11 @@ Plugin Name: Final Tiles Grid Gallery Lite
4
  Plugin URI: http://codecanyon.net/item/final-tiles-gallery-for-wordpress/5189351?ref=GreenTreeLabs
5
  Description: Wordpress Plugin for creating responsive image galleries. By: Green Tree Labs
6
  Author: Green Tree Labs
7
- Version: 2.0.12
8
  Author URI: http://codecanyon.net/user/GreenTreeLabs
9
  */
10
 
11
- define("FTGLITEVERSION", "2.0.12");
12
  define("PRO_CALL", "<span class='procall'>(<a href='http://www.final-tiles-gallery.com/wordpress/pro.html' target='_blank'>available with PRO version</a>)</span>");
13
  define("PRO_UNLOCK", "<a href='http://www.final-tiles-gallery.com/wordpress/pro.html' target='_blank'>Add unlimited images with PRO version</a>");
14
 
@@ -377,17 +377,20 @@ if (!class_exists("FinalTiles_GalleryLite"))
377
  $add_gallery = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Add Gallery','FinalTiles-gallery'), __('Add Gallery','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-add-gallery', array($this, 'add_gallery'));
378
  $plugins = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Other galleries','FinalTiles-gallery'), __('Other galleries','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-gallery-others', array($this, 'other_galleries'));
379
  $tutorial = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Tutorial','FinalTiles-gallery'), __('Tutorial','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-tutorial', array($this, 'tutorial'));
380
- $support = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Support','FinalTiles-gallery'), __('Support','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-support', array($this, 'support'));
381
 
382
  add_action('admin_print_styles-'.$add_gallery, array($this, 'FinalTiles_gallery_admin_style_load'));
383
- // add_action('admin_print_styles-'.$edit_gallery, array($this, 'FinalTiles_gallery_admin_style_load'));
 
 
384
 
385
  add_action('load-'.$tutorial, array($this, 'gallery_admin_init'));
386
  add_action('load-'.$overview, array($this, 'gallery_admin_init'));
387
  add_action('load-'.$plugins, array($this, 'gallery_admin_init'));
388
  add_action('load-'.$add_gallery, array($this, 'gallery_admin_init'));
 
389
  // add_action('load-'.$edit_gallery, array($this, 'gallery_admin_init'));
390
- add_action('load-'.$support, array($this, 'gallery_admin_init'));
391
 
392
  add_action( 'admin_bar_menu', array($this, 'gallery_admin_bar'), 100);
393
  }
@@ -410,6 +413,11 @@ if (!class_exists("FinalTiles_GalleryLite"))
410
  include("admin/overview.php");
411
  }
412
  }
 
 
 
 
 
413
 
414
  public function other_galleries()
415
  {
@@ -792,6 +800,22 @@ if (!class_exists("FinalTiles_GalleryLite"))
792
  die();
793
  }
794
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
795
  //Create gallery
796
  public function create_gallery($galleryId)
797
  {
4
  Plugin URI: http://codecanyon.net/item/final-tiles-gallery-for-wordpress/5189351?ref=GreenTreeLabs
5
  Description: Wordpress Plugin for creating responsive image galleries. By: Green Tree Labs
6
  Author: Green Tree Labs
7
+ Version: 2.0.13
8
  Author URI: http://codecanyon.net/user/GreenTreeLabs
9
  */
10
 
11
+ define("FTGLITEVERSION", "2.0.13");
12
  define("PRO_CALL", "<span class='procall'>(<a href='http://www.final-tiles-gallery.com/wordpress/pro.html' target='_blank'>available with PRO version</a>)</span>");
13
  define("PRO_UNLOCK", "<a href='http://www.final-tiles-gallery.com/wordpress/pro.html' target='_blank'>Add unlimited images with PRO version</a>");
14
 
377
  $add_gallery = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Add Gallery','FinalTiles-gallery'), __('Add Gallery','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-add-gallery', array($this, 'add_gallery'));
378
  $plugins = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Other galleries','FinalTiles-gallery'), __('Other galleries','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-gallery-others', array($this, 'other_galleries'));
379
  $tutorial = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Tutorial','FinalTiles-gallery'), __('Tutorial','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-tutorial', array($this, 'tutorial'));
380
+ $upgrade = add_submenu_page('ftg-lite-gallery-admin', __('FinalTiles Gallery >> Upgrade','FinalTiles-gallery'), __('Upgrade','FinalTiles-gallery'), 'edit_posts', 'ftg-lite-gallery-upgrade', array($this, 'upgrade'));
381
 
382
  add_action('admin_print_styles-'.$add_gallery, array($this, 'FinalTiles_gallery_admin_style_load'));
383
+
384
+ //
385
+
386
 
387
  add_action('load-'.$tutorial, array($this, 'gallery_admin_init'));
388
  add_action('load-'.$overview, array($this, 'gallery_admin_init'));
389
  add_action('load-'.$plugins, array($this, 'gallery_admin_init'));
390
  add_action('load-'.$add_gallery, array($this, 'gallery_admin_init'));
391
+ add_action('load-'.$upgrade, array($this, 'gallery_admin_init'));
392
  // add_action('load-'.$edit_gallery, array($this, 'gallery_admin_init'));
393
+ // add_action('load-'.$support, array($this, 'gallery_admin_init'));
394
 
395
  add_action( 'admin_bar_menu', array($this, 'gallery_admin_bar'), 100);
396
  }
413
  include("admin/overview.php");
414
  }
415
  }
416
+
417
+ public function upgrade()
418
+ {
419
+ include("admin/upgrade.php");
420
+ }
421
 
422
  public function other_galleries()
423
  {
800
  die();
801
  }
802
 
803
+ public static function get_image_size_links($id)
804
+ {
805
+ $result = array();
806
+ $sizes = get_intermediate_image_sizes();
807
+ $sizes[] = 'full';
808
+
809
+ foreach ($sizes as $size) {
810
+ $image = wp_get_attachment_image_src($id, $size);
811
+
812
+ if (!empty($image) && (true == $image[3] || 'full' == $size))
813
+ $result["$image[1]x$image[2]"] = $image[0];
814
+ }
815
+ ksort($result);
816
+ return $result;
817
+ }
818
+
819
  //Create gallery
820
  public function create_gallery($galleryId)
821
  {
admin/upgrade.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <p>Redirecting to modula.greentreelabs.net</p>
2
+ <script>
3
+ location.href = "http://www.final-tiles-gallery.com/wordpress/pro.html";
4
+ </script>
lib/gallery-class.php CHANGED
@@ -35,19 +35,31 @@ if (!class_exists("FinalTilesGallery"))
35
  $atts = get_posts($args);
36
 
37
  $upload_dir = wp_upload_dir();
 
38
  foreach($atts as $att)
39
  {
40
- $meta = get_post_custom($att->ID);
41
- foreach($this->images as &$image)
42
- {
43
- if($image->attID == $att->ID)
44
- {
45
- //$image->url = $upload_dir['baseurl'] .'/'. $meta['_wp_attached_file'][0];
46
- $image->url = wp_get_attachment_image_url($att->ID, "large", false);
47
- break;
48
- }
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
 
53
  var $cssPrefixes = array("-moz-", "-webkit-", "-o-", "-ms-", "");
@@ -336,7 +348,7 @@ if (!class_exists("FinalTilesGallery"))
336
 
337
  $src= $gallery->sequentialImageLoading == "T" ? "" : $image->imagePath;
338
 
339
- $html .= "<img class='item' data-ftg-src='$image->imagePath' src='$src' />\n";
340
 
341
 
342
  if((! empty($image->description) && $this->useCaptions()) || $gallery->captionEmpty == "show" || $this->hasCaptionIcon())
35
  $atts = get_posts($args);
36
 
37
  $upload_dir = wp_upload_dir();
38
+ $metaData = array();
39
  foreach($atts as $att)
40
  {
41
+ $file = get_post_custom($att->ID);
42
+ $metaData["att" . $att->ID] = array(
43
+ 'alt' => get_post_meta( $att->ID, '_wp_attachment_image_alt', true ),
44
+ 'caption' => $att->post_excerpt,
45
+ 'description' => $att->post_content,
46
+ 'href' => get_permalink( $att->ID ),
47
+ 'src' => $att->guid,
48
+ 'title' => $att->post_title,
49
+ 'file' => $file['_wp_attached_file'][0]
50
+ );
51
+ }
52
+
53
+ foreach($this->images as &$image)
54
+ {
55
+ $meta = $metaData['att' . $image->imageId];
56
+ $sizes = FinalTiles_GalleryLite::get_image_size_links($image->imageId);
57
+ $size = explode("x", array_search($image->imagePath, $sizes));
58
+ $image->width = $size[0];
59
+ $image->height = $size[1];
60
+ $image->url = $meta['src'];
61
+ $image->alt = $meta['alt'];
62
+ }
63
  }
64
 
65
  var $cssPrefixes = array("-moz-", "-webkit-", "-o-", "-ms-", "");
348
 
349
  $src= $gallery->sequentialImageLoading == "T" ? "" : $image->imagePath;
350
 
351
+ $html .= "<img alt='$image->alt' class='item' data-ftg-src='$image->imagePath' src='$src' />\n";
352
 
353
 
354
  if((! empty($image->description) && $this->useCaptions()) || $gallery->captionEmpty == "show" || $this->hasCaptionIcon())
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
- === Final Tiles Grid Gallery ===
2
  Contributors: GreenTreeLabs
3
  Donate link: http://greentreelabs.net/blog/donate/
4
- Tags: best gallery plugin, grid gallery, best gallery, best grid gallery, photo album, wedding album, wedding photo album, portfolio plugin, portfolio design gallery, portfolio grid gallery, wordpress portfolio, wordpress portfolio plugin, best wordpress portfolio plugin, add gallery, add image, add images, add photo, add picture, add pictures, album, art gallery, content gallery, easy gallery, fotoalbum, fotogalerie, free gallery, free images, free photo gallery, free slider, fullscreen gallery, fullscreen slider, galeri, galeria, galerie, galery, Galleria, galleries, gallery, gallery image, gallery lightbox, Gallery Plugin, gallery shortcode, gallery slider, gallery wordpress, grid, grid gallery, image, image album, image gallery, image gallery plugin, Image Rotator, image slider, images, images gallery, iphone gallery, jquery gallery, lightbox gallery, Lightbox slider, media gallery, multiple pictures, photo album, photo albums, photo gallery, photoalbum, photogallery, photoset, Picture Gallery, plugin gallery, responsive, responsive galleries, responsive gallery, responsive wordpress photo gallery, revolution, shortcode gallery, Simple gallery, slide, slideshow, slideshow gallery, thumbnail view, website gallery, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins
5
  Requires at least: 3.8.0
6
- Tested up to: 4.5.2
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- The best wordpress grid gallery , you can say goodbye to the old-looking galleries based on squares, columns or rows.
12
 
13
  == Description ==
14
 
@@ -103,6 +103,9 @@ The PRO license bundles 7 different lightboxes. However you can use any other li
103
 
104
  == Changelog ==
105
 
 
 
 
106
  = 2.0.12 =
107
  * Lightbox now group images by gallery
108
 
1
+ === Gallery Final Tiles Grid ===
2
  Contributors: GreenTreeLabs
3
  Donate link: http://greentreelabs.net/blog/donate/
4
+ Tags: gallery, grid gallery, thumbnail, slider, best gallery, free gallery, best grid gallery, gallery plugin, gallery grid plugin, best grid gallery plugin, social, share
5
  Requires at least: 3.8.0
6
+ Tested up to: 4.5.3
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Gallery. Probably the best gallery around. Unique layout, you have to try it! Highly customizable, easy and fast.
12
 
13
  == Description ==
14
 
103
 
104
  == Changelog ==
105
 
106
+ = 2.0.13 =
107
+ * Added missing alt image attribute
108
+
109
  = 2.0.12 =
110
  * Lightbox now group images by gallery
111