Image Photo Gallery Final Tiles Grid - Version 3.3.35

Version Description

  • [Enhancement] Updated Freemius library
Download this release

Release Info

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

Code changes from version 3.3.34 to 3.3.35

FinalTilesGalleryLite.php CHANGED
@@ -5,15 +5,17 @@
5
  * Plugin URI: https://www.final-tiles-gallery.com
6
  * Description: Wordpress Plugin for creating responsive image galleries. By: GreenTreeLabs
7
  * Author: Green Tree Labs
8
- * Version: 3.3.34
9
  * Author URI: https://www.greentreelabs.net
10
  *
11
  * @fs_premium_only /lightbox-pro/
12
  *
13
  */
14
- define( "FTGVERSION", "3.3.34" );
15
  /*
16
  Changelog:
 
 
17
  3.3.34
18
  Fix: fixed lightbox skipping images bug
19
  3.3.30
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.35
9
  * Author URI: https://www.greentreelabs.net
10
  *
11
  * @fs_premium_only /lightbox-pro/
12
  *
13
  */
14
+ define( "FTGVERSION", "3.3.35" );
15
  /*
16
  Changelog:
17
+ 3.3.35
18
+ Updated Freemius library
19
  3.3.34
20
  Fix: fixed lightbox skipping images bug
21
  3.3.30
freemius/README.md CHANGED
@@ -164,7 +164,7 @@ Add logic which will only be available in your premium plugin version AND will o
164
  ```php
165
  <?php
166
  // This "if" block will be auto removed from the Free version.
167
- if ( my_prefix_fs()->is_plan_or_trial__premium_only('professional') ) {
168
  // ... logic related to Professional plan and higher plans ...
169
  }
170
  ?>
164
  ```php
165
  <?php
166
  // This "if" block will be auto removed from the Free version.
167
+ if ( my_prefix_fs()->is_plan__premium_only('professional') ) {
168
  // ... logic related to Professional plan and higher plans ...
169
  }
170
  ?>
freemius/config.php CHANGED
@@ -285,6 +285,9 @@
285
  if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
286
  define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
287
  }
 
 
 
288
 
289
  #--------------------------------------------------------------------------------
290
  #region Debugging
285
  if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
286
  define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
287
  }
288
+ if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
289
+ define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
290
+ }
291
 
292
  #--------------------------------------------------------------------------------
293
  #region Debugging
freemius/includes/class-freemius.php CHANGED
@@ -3009,10 +3009,6 @@
3009
 
3010
  $this->parse_settings( $plugin_info );
3011
 
3012
- if ( $this->has_affiliate_program() ) {
3013
- $this->fetch_affiliate_and_terms();
3014
- }
3015
-
3016
  if ( ! self::is_ajax() ) {
3017
  if ( ! $this->is_addon() || $this->is_only_premium() ) {
3018
  add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
@@ -7357,14 +7353,12 @@
7357
 
7358
  /**
7359
  * @author Leo Fajardo (@leorw)
7360
- * @since 1.2.3
7361
  */
7362
- private function fetch_affiliate_and_terms() {
7363
- $this->_logger->entrance();
7364
-
7365
  if ( ! is_object( $this->plugin_affiliate_terms ) ) {
7366
  $plugins_api = $this->get_api_plugin_scope();
7367
- $affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation', true );
7368
 
7369
  if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
7370
  return;
@@ -7372,20 +7366,30 @@
7372
 
7373
  $this->plugin_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
7374
  }
 
 
 
 
 
 
 
 
 
 
7375
 
7376
- if ( $this->is_registered() ) {
7377
  $users_api = $this->get_api_user_scope();
7378
- $result = $users_api->get( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json", true );
7379
  if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
7380
  if ( ! empty( $result->affiliates ) ) {
7381
  $affiliate = new FS_Affiliate( $result->affiliates[0] );
7382
 
7383
- if ( ! $affiliate->is_pending() && ! empty( $this->_storage->affiliate_application_data ) ) {
7384
- unset( $this->_storage->affiliate_application_data );
 
7385
  }
7386
 
7387
  if ( $affiliate->is_using_custom_terms ) {
7388
- $affiliate_terms = $users_api->get( "/plugins/{$this->_plugin->id}/affiliates/{$affiliate->id}/aff/{$affiliate->custom_affiliate_terms_id}.json", true );
7389
  if ( $this->is_api_result_entity( $affiliate_terms ) ) {
7390
  $this->custom_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
7391
  }
@@ -7397,6 +7401,17 @@
7397
  }
7398
  }
7399
 
 
 
 
 
 
 
 
 
 
 
 
7400
  /**
7401
  * @author Leo Fajardo
7402
  * @since 1.2.3
@@ -7469,6 +7484,8 @@
7469
  }
7470
  }
7471
 
 
 
7472
  $api = $this->get_api_user_scope();
7473
  $result = $api->call(
7474
  ( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
@@ -7490,6 +7507,7 @@
7490
  }
7491
 
7492
  $affiliate_application_data = array(
 
7493
  'stats_description' => $affiliate['stats_description'],
7494
  'promotion_method_description' => $affiliate['promotion_method_description'],
7495
  );
@@ -12671,6 +12689,8 @@
12671
  function _affiliation_page_render() {
12672
  $this->_logger->entrance();
12673
 
 
 
12674
  fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
12675
 
12676
  $vars = array( 'id' => $this->_module_id );
@@ -13160,8 +13180,6 @@
13160
  if (
13161
  // Product has no affiliate program.
13162
  ! $this->has_affiliate_program() ||
13163
- // User is already an affiliate.
13164
- is_object( $this->affiliate ) ||
13165
  // User has applied for an affiliate account.
13166
  ! empty( $this->_storage->affiliate_application_data ) ) {
13167
  return false;
3009
 
3010
  $this->parse_settings( $plugin_info );
3011
 
 
 
 
 
3012
  if ( ! self::is_ajax() ) {
3013
  if ( ! $this->is_addon() || $this->is_only_premium() ) {
3014
  add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
7353
 
7354
  /**
7355
  * @author Leo Fajardo (@leorw)
7356
+ * @since 1.2.4
7357
  */
7358
+ private function fetch_affiliate_terms() {
 
 
7359
  if ( ! is_object( $this->plugin_affiliate_terms ) ) {
7360
  $plugins_api = $this->get_api_plugin_scope();
7361
+ $affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation', false, WP_FS__TIME_WEEK_IN_SEC );
7362
 
7363
  if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
7364
  return;
7366
 
7367
  $this->plugin_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
7368
  }
7369
+ }
7370
+
7371
+ /**
7372
+ * @author Leo Fajardo (@leorw)
7373
+ * @since 1.2.4
7374
+ */
7375
+ private function fetch_affiliate_and_custom_terms() {
7376
+ if ( ! empty( $this->_storage->affiliate_application_data ) ) {
7377
+ $application_data = $this->_storage->affiliate_application_data;
7378
+ $flush = ( ! isset( $application_data['status'] ) || 'pending' === $application_data['status'] );
7379
 
 
7380
  $users_api = $this->get_api_user_scope();
7381
+ $result = $users_api->get( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json", $flush, WP_FS__TIME_WEEK_IN_SEC );
7382
  if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
7383
  if ( ! empty( $result->affiliates ) ) {
7384
  $affiliate = new FS_Affiliate( $result->affiliates[0] );
7385
 
7386
+ if ( ! isset( $application_data['status'] ) || $application_data['status'] !== $affiliate->status ) {
7387
+ $application_data['status'] = $affiliate->status;
7388
+ $this->_storage->affiliate_application_data = $application_data;
7389
  }
7390
 
7391
  if ( $affiliate->is_using_custom_terms ) {
7392
+ $affiliate_terms = $users_api->get( "/plugins/{$this->_plugin->id}/affiliates/{$affiliate->id}/aff/{$affiliate->custom_affiliate_terms_id}.json", $flush, WP_FS__TIME_WEEK_IN_SEC );
7393
  if ( $this->is_api_result_entity( $affiliate_terms ) ) {
7394
  $this->custom_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
7395
  }
7401
  }
7402
  }
7403
 
7404
+ /**
7405
+ * @author Leo Fajardo (@leorw)
7406
+ * @since 1.2.3
7407
+ */
7408
+ private function fetch_affiliate_and_terms() {
7409
+ $this->_logger->entrance();
7410
+
7411
+ $this->fetch_affiliate_terms();
7412
+ $this->fetch_affiliate_and_custom_terms();
7413
+ }
7414
+
7415
  /**
7416
  * @author Leo Fajardo
7417
  * @since 1.2.3
7484
  }
7485
  }
7486
 
7487
+ $this->fetch_affiliate_terms();
7488
+
7489
  $api = $this->get_api_user_scope();
7490
  $result = $api->call(
7491
  ( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
7507
  }
7508
 
7509
  $affiliate_application_data = array(
7510
+ 'status' => 'pending',
7511
  'stats_description' => $affiliate['stats_description'],
7512
  'promotion_method_description' => $affiliate['promotion_method_description'],
7513
  );
12689
  function _affiliation_page_render() {
12690
  $this->_logger->entrance();
12691
 
12692
+ $this->fetch_affiliate_and_terms();
12693
+
12694
  fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
12695
 
12696
  $vars = array( 'id' => $this->_module_id );
13180
  if (
13181
  // Product has no affiliate program.
13182
  ! $this->has_affiliate_program() ||
 
 
13183
  // User has applied for an affiliate account.
13184
  ! empty( $this->_storage->affiliate_application_data ) ) {
13185
  return false;
freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '1.2.3';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
@@ -498,4 +498,4 @@
498
  function fs_dump_log() {
499
  FS_Logger::dump();
500
  }
501
- }
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '1.2.4';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
498
  function fs_dump_log() {
499
  FS_Logger::dump();
500
  }
501
+ }
freemius/templates/forms/affiliation.php CHANGED
@@ -99,11 +99,15 @@
99
  <?php if ( $affiliate->is_active() ) : ?>
100
  <div class="updated">
101
  <p><strong><?php
102
- echo esc_html( sprintf(
103
- fs_text_inline( "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s.", 'affiliate-application-accepted', $slug ),
104
  $plugin_title,
105
- sprintf( '<a href="%s" target="_blank">%s</a>', $members_dashboard_login_url, $members_dashboard_login_url )
106
- ) );
 
 
 
 
107
  ?></strong></p>
108
  </div>
109
  <?php else : ?>
@@ -361,7 +365,7 @@
361
  beforeSend: function() {
362
  $cancelButton.addClass( 'disabled' );
363
  $submitButton.addClass( 'disabled' );
364
- $submitButton.text( '<?php fs_esc_js_inline( 'Processing', 'processing' ) ?>...' );
365
  },
366
  success : function( result ) {
367
  if ( result.success ) {
99
  <?php if ( $affiliate->is_active() ) : ?>
100
  <div class="updated">
101
  <p><strong><?php
102
+ echo sprintf(
103
+ fs_esc_html_inline( "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s.", 'affiliate-application-accepted', $slug ),
104
  $plugin_title,
105
+ sprintf(
106
+ '<a href="%s" target="_blank">%s</a>',
107
+ $members_dashboard_login_url,
108
+ $members_dashboard_login_url
109
+ )
110
+ );
111
  ?></strong></p>
112
  </div>
113
  <?php else : ?>
365
  beforeSend: function() {
366
  $cancelButton.addClass( 'disabled' );
367
  $submitButton.addClass( 'disabled' );
368
+ $submitButton.text( '<?php fs_esc_js_echo_inline( 'Processing', 'processing' ) ?>...' );
369
  },
370
  success : function( result ) {
371
  if ( result.success ) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: GreenTreeLabs
3
  Donate link: http://greentreelabs.net/blog/donate/
4
  Tags: gallery, grid gallery, best gallery plugin, free gallery, gallery plugin, gallery grid plugin, masonry, photo gallery, image gallery, social gallery, portfolio gallery, lightbox, justified gallery
5
  Requires at least: 3.8.2
6
- Tested up to: 4.8
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -135,6 +135,9 @@ Currently galleries made with Envira, FooGallery, Instagram, NextGen, JetPack, M
135
 
136
  == Changelog ==
137
 
 
 
 
138
  = 3.3.34 =
139
  * [Fix] Fixed lightbox skipping images bug
140
 
3
  Donate link: http://greentreelabs.net/blog/donate/
4
  Tags: gallery, grid gallery, best gallery plugin, free gallery, gallery plugin, gallery grid plugin, masonry, photo gallery, image gallery, social gallery, portfolio gallery, lightbox, justified gallery
5
  Requires at least: 3.8.2
6
+ Tested up to: 4.9.2
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
135
 
136
  == Changelog ==
137
 
138
+ = 3.3.35 =
139
+ * [Enhancement] Updated Freemius library
140
+
141
  = 3.3.34 =
142
  * [Fix] Fixed lightbox skipping images bug
143