404 to 301 - Version 3.0.5

Version Description

(02/07/2019) = ** Improvements**

  • Updated Freemius SDK.
  • Tested with WP 5.2.
Download this release

Release Info

Developer joelcj91
Plugin Icon 128x128 404 to 301
Version 3.0.5
Comparing to
See all releases

Code changes from version 3.0.4 to 3.0.5

Files changed (57) hide show
  1. 404-to-301.php +16 -16
  2. assets/css/index.php +0 -1
  3. assets/js/admin.min.js +1 -1
  4. assets/js/index.php +0 -1
  5. assets/src/css/{admin.css → admin.scss} +1 -1
  6. includes/admin/views/custom-redirect.php +2 -2
  7. languages/404-to-301.mo +0 -0
  8. languages/404-to-301.pot +9 -5
  9. readme.txt +13 -7
  10. vendor/freemius/assets/css/admin/account.css +1 -1
  11. vendor/freemius/assets/css/admin/add-ons.css +2 -2
  12. vendor/freemius/assets/css/admin/common.css +1 -1
  13. vendor/freemius/assets/css/admin/connect.css +1 -1
  14. vendor/freemius/assets/css/admin/dialog-boxes.css +1 -1
  15. vendor/freemius/assets/scss/admin/_badge.scss +14 -0
  16. vendor/freemius/assets/scss/admin/_license-activation.scss +5 -5
  17. vendor/freemius/assets/scss/admin/_multisite-options.scss +4 -4
  18. vendor/freemius/assets/scss/admin/_tag.scss +28 -0
  19. vendor/freemius/assets/scss/admin/_themes.scss +21 -14
  20. vendor/freemius/assets/scss/admin/account.scss +5 -0
  21. vendor/freemius/assets/scss/admin/add-ons.scss +172 -12
  22. vendor/freemius/assets/scss/admin/connect.scss +1 -1
  23. vendor/freemius/assets/scss/admin/plugins.scss +12 -0
  24. vendor/freemius/config.php +3 -3
  25. vendor/freemius/includes/class-freemius.php +1844 -355
  26. vendor/freemius/includes/class-fs-api.php +77 -38
  27. vendor/freemius/includes/class-fs-plugin-updater.php +164 -36
  28. vendor/freemius/includes/class-fs-storage.php +2 -0
  29. vendor/freemius/includes/entities/class-fs-payment.php +58 -0
  30. vendor/freemius/includes/entities/class-fs-plugin-license.php +22 -1
  31. vendor/freemius/includes/entities/class-fs-plugin-tag.php +12 -2
  32. vendor/freemius/includes/entities/class-fs-plugin.php +12 -0
  33. vendor/freemius/includes/entities/class-fs-site.php +4 -1
  34. vendor/freemius/includes/entities/class-fs-user.php +17 -0
  35. vendor/freemius/includes/fs-core-functions.php +35 -6
  36. vendor/freemius/includes/fs-plugin-info-dialog.php +557 -90
  37. vendor/freemius/includes/i18n.php +2 -2
  38. vendor/freemius/includes/managers/class-fs-admin-menu-manager.php +25 -14
  39. vendor/freemius/includes/managers/class-fs-option-manager.php +10 -3
  40. vendor/freemius/languages/freemius.pot +504 -438
  41. vendor/freemius/start.php +1 -1
  42. vendor/freemius/templates/account.php +164 -24
  43. vendor/freemius/templates/account/billing.php +8 -16
  44. vendor/freemius/templates/account/partials/addon.php +81 -24
  45. vendor/freemius/templates/account/partials/site.php +2 -2
  46. vendor/freemius/templates/account/payments.php +1 -1
  47. vendor/freemius/templates/add-ons.php +260 -16
  48. vendor/freemius/templates/checkout.php +11 -3
  49. vendor/freemius/templates/connect.php +51 -12
  50. vendor/freemius/templates/forms/deactivation/form.php +88 -46
  51. vendor/freemius/templates/forms/license-activation.php +32 -31
  52. vendor/freemius/templates/forms/premium-versions-upgrade-metadata.php +3 -1
  53. vendor/freemius/templates/forms/subscription-cancellation.php +3 -3
  54. vendor/freemius/templates/js/open-license-activation.php +1 -1
  55. vendor/freemius/templates/js/style-premium-theme.php +10 -2
  56. vendor/freemius/templates/partials/network-activation.php +12 -4
  57. vendor/freemius/templates/pricing.php +5 -0
404-to-301.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /**
3
- * Plugin Name: 404 to 301
4
  * Plugin URI: https://duckdev.com/products/404-to-301/
5
  * Description: Automatically redirect all <strong>404 errors</strong> to any page using <strong>301 redirect for SEO</strong>. You can <strong>redirect and log</strong> every 404 errors. No more 404 errors in Webmaster tool.
6
- * Version: 3.0.4
7
  * Author: Joel James
8
  * Author URI: https://duckdev.com/
9
  * Donate link: https://paypal.me/JoelCJ
@@ -25,11 +25,11 @@
25
  * You should have received a copy of the GNU General Public License
26
  * along with 404 to 301. If not, see <http://www.gnu.org/licenses/>.
27
  *
28
- * @category Core
29
- * @package JJ4T3
30
  * @author Joel James <mail@cjoel.com>
31
- * @license http://www.gnu.org/licenses/ GNU General Public License
32
  * @link https://duckdev.com/products/404-to-301/
 
 
 
33
  */
34
 
35
  // If this file is called directly, abort.
@@ -63,7 +63,7 @@ if ( ! class_exists( 'JJ_404_to_301' ) ) :
63
  'JJ4T3_DIR' => plugin_dir_path( __FILE__ ),
64
  'JJ4T3_URL' => plugin_dir_url( __FILE__ ),
65
  'JJ4T3_BASE_FILE' => __FILE__,
66
- 'JJ4T3_VERSION' => '3.0.4',
67
  'JJ4T3_DB_VERSION' => '11.0',
68
  'JJ4T3_TABLE' => $GLOBALS['wpdb']->prefix . '404_to_301',
69
  // Set who all can access plugin settings.
@@ -120,15 +120,15 @@ if ( ! class_exists( 'JJ_404_to_301' ) ) :
120
 
121
  // Initialize freemius sdk.
122
  $jj4t3_fs = fs_dynamic_init( array(
123
- 'id' => '2192',
124
- 'slug' => '404-to-301',
125
- 'type' => 'plugin',
126
- 'public_key' => 'pk_9d470f3128e5e491ea5a2da6bf4bf',
127
- 'is_premium' => false,
128
- 'has_addons' => true,
129
- 'has_paid_plans' => false,
130
- 'anonymous_mode' => true, // Temporary fix.
131
- 'menu' => array(
132
  'slug' => 'jj4t3-logs',
133
  'account' => false,
134
  'support' => false,
@@ -152,7 +152,7 @@ if ( ! class_exists( 'JJ_404_to_301' ) ) :
152
  // Uninstaller for 404 to 301.
153
  jj4t3_freemius()->add_action( 'after_uninstall', array(
154
  'JJ4T3_Activator_Deactivator_Uninstaller',
155
- 'uninstall'
156
  ) );
157
 
158
  // Signal that SDK was initiated.
1
  <?php
2
  /**
3
+ * Plugin Name: 404 to 301 - Redirect, Log and Notify 404 Errors
4
  * Plugin URI: https://duckdev.com/products/404-to-301/
5
  * Description: Automatically redirect all <strong>404 errors</strong> to any page using <strong>301 redirect for SEO</strong>. You can <strong>redirect and log</strong> every 404 errors. No more 404 errors in Webmaster tool.
6
+ * Version: 3.0.5
7
  * Author: Joel James
8
  * Author URI: https://duckdev.com/
9
  * Donate link: https://paypal.me/JoelCJ
25
  * You should have received a copy of the GNU General Public License
26
  * along with 404 to 301. If not, see <http://www.gnu.org/licenses/>.
27
  *
 
 
28
  * @author Joel James <mail@cjoel.com>
 
29
  * @link https://duckdev.com/products/404-to-301/
30
+ * @license http://www.gnu.org/licenses/ GNU General Public License
31
+ * @package JJ4T3
32
+ * @category Core
33
  */
34
 
35
  // If this file is called directly, abort.
63
  'JJ4T3_DIR' => plugin_dir_path( __FILE__ ),
64
  'JJ4T3_URL' => plugin_dir_url( __FILE__ ),
65
  'JJ4T3_BASE_FILE' => __FILE__,
66
+ 'JJ4T3_VERSION' => '3.0.5',
67
  'JJ4T3_DB_VERSION' => '11.0',
68
  'JJ4T3_TABLE' => $GLOBALS['wpdb']->prefix . '404_to_301',
69
  // Set who all can access plugin settings.
120
 
121
  // Initialize freemius sdk.
122
  $jj4t3_fs = fs_dynamic_init( array(
123
+ 'id' => '2192',
124
+ 'slug' => '404-to-301',
125
+ 'type' => 'plugin',
126
+ 'public_key' => 'pk_9d470f3128e5e491ea5a2da6bf4bf',
127
+ 'is_premium' => false,
128
+ 'has_addons' => true,
129
+ 'has_paid_plans' => false,
130
+ 'anonymous_mode' => true, // Temporary fix.
131
+ 'menu' => array(
132
  'slug' => 'jj4t3-logs',
133
  'account' => false,
134
  'support' => false,
152
  // Uninstaller for 404 to 301.
153
  jj4t3_freemius()->add_action( 'after_uninstall', array(
154
  'JJ4T3_Activator_Deactivator_Uninstaller',
155
+ 'uninstall',
156
  ) );
157
 
158
  // Signal that SDK was initiated.
assets/css/index.php DELETED
@@ -1 +0,0 @@
1
- <?php // Silence is golden
 
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";!function(t){t(function(){t("#jj4t3_redirect_to").change(function(){switch(t(this).val()){case"page":t("#custom_page").show(),t("#custom_url").hide();break;case"link":t("#custom_url").show(),t("#custom_page").hide();break;default:t("#custom_page").hide(),t("#custom_url").hide()}}),t(".jj4t3_redirect_thickbox").on("click",function(){var r={action:"jj4t3_redirect_thickbox",url_404:t(this).attr("url_404"),nonce:t(this).attr("wpnonce")};t.post(ajaxurl,r,function(r){tb_show(jj4t3strings.redirect,"#TB_inline?width=700&height=370&inlineId=jj4t3-redirect-modal"),t("#jj4t3_redirect_404").val(r.url_404),t("#jj4t3_redirect_404_text").html(r.url_404),t("#jj4t3_redirect_url").val(r.url),t("#jj4t3_custom_redirect_type").val(r.type),e("jj4t3_custom_redirect_redirect",r.redirect),e("jj4t3_custom_redirect_log",r.log),e("jj4t3_custom_redirect_alert",r.alert)})}),t("#jj4t3_custom_redirect_submit").on("click",function(){t(this).addClass("disabled"),t(".jj4t3-spinner").css("visibility","visible");var e=t("#jj4t3_custom_redirect_form").serialize();t.post(ajaxurl,e,function(e){tb_remove(),t("#jj4t3_custom_redirect_submit").removeClass("disabled"),t(".j4t3-spinner").css("visibility","hidden"),location.reload()})});var e=function(e,r){t("input[name="+e+"][value="+r+"]").prop("checked",!0)}})}(jQuery)}]);
1
+ !function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";var i;(i=jQuery)(function(){i("#jj4t3_redirect_to").change(function(){switch(i(this).val()){case"page":i("#custom_page").show(),i("#custom_url").hide();break;case"link":i("#custom_url").show(),i("#custom_page").hide();break;default:i("#custom_page").hide(),i("#custom_url").hide()}}),i(".jj4t3_redirect_thickbox").on("click",function(){var e={action:"jj4t3_redirect_thickbox",url_404:i(this).attr("url_404"),nonce:i(this).attr("wpnonce")};i.post(ajaxurl,e,function(e){tb_show(jj4t3strings.redirect,"#TB_inline?width=700&height=370&inlineId=jj4t3-redirect-modal"),i("#jj4t3_redirect_404").val(e.url_404),i("#jj4t3_redirect_404_text").html(e.url_404),i("#jj4t3_redirect_url").val(e.url),i("#jj4t3_custom_redirect_type").val(e.type),t("jj4t3_custom_redirect_redirect",e.redirect),t("jj4t3_custom_redirect_log",e.log),t("jj4t3_custom_redirect_alert",e.alert)})}),i("#jj4t3_custom_redirect_submit").on("click",function(){i(this).addClass("disabled"),i(".jj4t3-spinner").css("visibility","visible");var t=i("#jj4t3_custom_redirect_form").serialize();i.post(ajaxurl,t,function(t){tb_remove(),i("#jj4t3_custom_redirect_submit").removeClass("disabled"),i(".j4t3-spinner").css("visibility","hidden"),location.reload()})});var t=function(t,e){i("input[name="+t+"][value="+e+"]").prop("checked",!0)}})}]);
assets/js/index.php DELETED
@@ -1 +0,0 @@
1
- <?php // Silence is golden
 
assets/src/css/{admin.css → admin.scss} RENAMED
@@ -1,5 +1,5 @@
1
  .jj4t3-url-p {
2
- color: #E53531 !important;
3
  }
4
 
5
  .jj4t3-fixed-height {
1
  .jj4t3-url-p {
2
+ color: #e53531 !important;
3
  }
4
 
5
  .jj4t3-fixed-height {
includes/admin/views/custom-redirect.php CHANGED
@@ -39,7 +39,7 @@ defined( 'ABSPATH' ) or exit; ?>
39
  <th><?php _e( 'Redirect to', '404-to-301' ); ?> :</th>
40
  <td>
41
  <input type="text" size="40" name="jj4t3_custom_redirect" id="jj4t3_redirect_url" value="">
42
- <p class="description"><?php _e( 'Enter the url if you want to set custom redirect for above 404 path. Enter the full url including http://. Leave empty if you want to follow deafult settings.', '404-to-301' ); ?></p>
43
  <input type="hidden" value="" id="jj4t3_redirect_404" name="jj4t3_redirect_404">
44
  <input type="hidden" value="<?php echo wp_create_nonce( "jj4t3_redirect_nonce" ); ?>" id="jj4t3_redirect_nonce" name="jj4t3_redirect_nonce">
45
  <input type="hidden" value="jj4t3_redirect_form" name="action">
@@ -68,4 +68,4 @@ defined( 'ABSPATH' ) or exit; ?>
68
  </table>
69
  </form>
70
  </div>
71
- </div>
39
  <th><?php _e( 'Redirect to', '404-to-301' ); ?> :</th>
40
  <td>
41
  <input type="text" size="40" name="jj4t3_custom_redirect" id="jj4t3_redirect_url" value="">
42
+ <p class="description"><?php _e( 'Enter the url if you want to set custom redirect for above 404 path. Enter the full url including http://. Leave empty if you want to follow default settings.', '404-to-301' ); ?></p>
43
  <input type="hidden" value="" id="jj4t3_redirect_404" name="jj4t3_redirect_404">
44
  <input type="hidden" value="<?php echo wp_create_nonce( "jj4t3_redirect_nonce" ); ?>" id="jj4t3_redirect_nonce" name="jj4t3_redirect_nonce">
45
  <input type="hidden" value="jj4t3_redirect_form" name="action">
68
  </table>
69
  </form>
70
  </div>
71
+ </div>
languages/404-to-301.mo CHANGED
Binary file
languages/404-to-301.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: 404 to 301 3.0.4\n"
6
  "Report-Msgid-Bugs-To: https://duckdev.com/products/404-to-301/\n"
7
- "POT-Creation-Date: 2019-03-16 10:39:38+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -22,7 +22,7 @@ msgstr ""
22
  "X-Poedit-SearchPath-0: .\n"
23
  "X-Poedit-Bookmarks: \n"
24
  "X-Textdomain-Support: yes\n"
25
- "X-Generator: grunt-wp-i18n1.0.2\n"
26
 
27
  #: includes/admin/class-jj4t3-admin.php:139
28
  msgid "Custom Redirect"
@@ -50,7 +50,7 @@ msgstr ""
50
  msgid "Error Logs"
51
  msgstr ""
52
 
53
- #. Plugin Name of the plugin/theme
54
  msgid "404 to 301"
55
  msgstr ""
56
 
@@ -201,7 +201,7 @@ msgstr ""
201
  #: includes/admin/views/custom-redirect.php:42
202
  msgid ""
203
  "Enter the url if you want to set custom redirect for above 404 path. Enter "
204
- "the full url including http://. Leave empty if you want to follow deafult "
205
  "settings."
206
  msgstr ""
207
 
@@ -355,6 +355,10 @@ msgstr ""
355
  msgid "Alert sent by the %s404 to 301%s plugin for WordPress."
356
  msgstr ""
357
 
 
 
 
 
358
  #. Plugin URI of the plugin/theme
359
  msgid "https://duckdev.com/products/404-to-301/"
360
  msgstr ""
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: 404 to 301 - Redirect, Log and Notify 404 Errors 3.0.5\n"
6
  "Report-Msgid-Bugs-To: https://duckdev.com/products/404-to-301/\n"
7
+ "POT-Creation-Date: 2019-07-02 05:19:53+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
  "X-Poedit-Bookmarks: \n"
24
  "X-Textdomain-Support: yes\n"
25
+ "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
27
  #: includes/admin/class-jj4t3-admin.php:139
28
  msgid "Custom Redirect"
50
  msgid "Error Logs"
51
  msgstr ""
52
 
53
+ #: includes/admin/class-jj4t3-admin.php:288 includes/admin/views/admin.php:21
54
  msgid "404 to 301"
55
  msgstr ""
56
 
201
  #: includes/admin/views/custom-redirect.php:42
202
  msgid ""
203
  "Enter the url if you want to set custom redirect for above 404 path. Enter "
204
+ "the full url including http://. Leave empty if you want to follow default "
205
  "settings."
206
  msgstr ""
207
 
355
  msgid "Alert sent by the %s404 to 301%s plugin for WordPress."
356
  msgstr ""
357
 
358
+ #. Plugin Name of the plugin/theme
359
+ msgid "404 to 301 - Redirect, Log and Notify 404 Errors"
360
+ msgstr ""
361
+
362
  #. Plugin URI of the plugin/theme
363
  msgid "https://duckdev.com/products/404-to-301/"
364
  msgstr ""
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === 404 to 301 ===
2
  Contributors: joelcj91,duckdev
3
  Tags: 404, 301, 302, 307, not found, 404 redirect, 404 to 301, 301 redirect, seo redirect, error redirect, 404 seo, custom 404 page
4
  Donate link: https://www.paypal.me/JoelCJ
5
  Requires at least: 3.5
6
- Tested up to: 5.1
7
- Stable tag: 3.0.4
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -128,6 +128,12 @@ Bug reports for 404 to 301 are always welcome. [Report here](https://duckdev.com
128
 
129
  == Changelog ==
130
 
 
 
 
 
 
 
131
  = 3.0.4 (16/03/2019) =
132
  **📦 New**
133
 
@@ -408,8 +414,8 @@ Bug reports for 404 to 301 are always welcome. [Report here](https://duckdev.com
408
 
409
  == Upgrade Notice ==
410
 
411
- = 3.0.4 (16/03/2019) =
412
- **📦 New**
413
 
414
- * Added option to disable URL guessing.
415
- * Added review notice.
1
+ === 404 to 301 - Redirect, Log and Notify 404 Errors ===
2
  Contributors: joelcj91,duckdev
3
  Tags: 404, 301, 302, 307, not found, 404 redirect, 404 to 301, 301 redirect, seo redirect, error redirect, 404 seo, custom 404 page
4
  Donate link: https://www.paypal.me/JoelCJ
5
  Requires at least: 3.5
6
+ Tested up to: 5.2
7
+ Stable tag: 3.0.5
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
128
 
129
  == Changelog ==
130
 
131
+ = 3.0.5 (02/07/2019) =
132
+ **👌 Improvements**
133
+
134
+ * Updated Freemius SDK.
135
+ * Tested with WP 5.2.
136
+
137
  = 3.0.4 (16/03/2019) =
138
  **📦 New**
139
 
414
 
415
  == Upgrade Notice ==
416
 
417
+ = 3.0.5 (02/07/2019) =
418
+ **👌 Improvements**
419
 
420
+ * Updated Freemius SDK.
421
+ * Tested with WP 5.2.
vendor/freemius/assets/css/admin/account.css CHANGED
@@ -1 +1 @@
1
- #fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
1
+ label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
vendor/freemius/assets/css/admin/add-ons.css CHANGED
@@ -1,2 +1,2 @@
1
- #fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
- #TB_window,#TB_window iframe{width:772px !important}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
+ #TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
vendor/freemius/assets/css/admin/common.css CHANGED
@@ -1,2 +1,2 @@
1
- .theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
  .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
  .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
vendor/freemius/assets/css/admin/connect.css CHANGED
@@ -1 +1 @@
1
- #fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key #sites_list_container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #sites_list_container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
1
+ #fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
vendor/freemius/assets/css/admin/dialog-boxes.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}#license_options_container table,#license_options_container table select,#license_options_container table #available_license_key{width:100%}#license_options_container table td:first-child{width:1%}#license_options_container table #other_license_key_container label{position:relative;top:6px;float:left;margin-right:5px}#license_options_container table #other_license_key_container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}#license_options_container table #other_license_key_container div input{margin:0}#sites_list_container td{cursor:pointer}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #sites_list_container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
  .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
  .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
vendor/freemius/assets/scss/admin/_badge.scss ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .fs-badge
2
+ {
3
+ position: absolute;
4
+ top: 10px;
5
+ right: 0;
6
+ background: $fs-logo-green-color;
7
+ color: white;
8
+ text-transform: uppercase;
9
+ padding: 5px 10px;
10
+ @include border-radius(3px 0 0 3px);
11
+ font-weight: bold;
12
+ border-right: 0;
13
+ @include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
14
+ }
vendor/freemius/assets/scss/admin/_license-activation.scss CHANGED
@@ -1,14 +1,14 @@
1
  .fs-modal.fs-modal-license-activation {
2
  .fs-modal-body {
3
- input.license_key {
4
  width: 100%;
5
  }
6
  }
7
  }
8
 
9
- #license_options_container {
10
  table {
11
- &, select, #available_license_key {
12
  width: 100%;
13
  }
14
 
@@ -16,7 +16,7 @@
16
  width: 1%;
17
  }
18
 
19
- #other_license_key_container {
20
  label {
21
  position: relative;
22
  top: 6px;
@@ -40,7 +40,7 @@
40
  }
41
  }
42
 
43
- #sites_list_container {
44
  td {
45
  cursor: pointer;
46
  }
1
  .fs-modal.fs-modal-license-activation {
2
  .fs-modal-body {
3
+ input.fs-license-key {
4
  width: 100%;
5
  }
6
  }
7
  }
8
 
9
+ .fs-license-options-container {
10
  table {
11
+ &, select, .fs-available-license-key {
12
  width: 100%;
13
  }
14
 
16
  width: 1%;
17
  }
18
 
19
+ .fs-other-license-key-container {
20
  label {
21
  position: relative;
22
  top: 6px;
40
  }
41
  }
42
 
43
+ .fs-sites-list-container {
44
  td {
45
  cursor: pointer;
46
  }
vendor/freemius/assets/scss/admin/_multisite-options.scss CHANGED
@@ -1,4 +1,4 @@
1
- #multisite_options_container {
2
  margin-top: 10px;
3
  border: 1px solid #ccc;
4
  padding: 5px;
@@ -15,11 +15,11 @@
15
  }
16
  }
17
 
18
- &.apply-on-all-sites {
19
  border: 0 none;
20
  padding: 0;
21
 
22
- #all_sites_options {
23
  border-spacing: 0;
24
 
25
  td:not(:first-child) {
@@ -28,7 +28,7 @@
28
  }
29
  }
30
 
31
- #sites_list_container {
32
  display: none;
33
  overflow: auto;
34
 
1
+ .fs-multisite-options-container {
2
  margin-top: 10px;
3
  border: 1px solid #ccc;
4
  padding: 5px;
15
  }
16
  }
17
 
18
+ &.fs-apply-on-all-sites {
19
  border: 0 none;
20
  padding: 0;
21
 
22
+ .fs-all-sites-options {
23
  border-spacing: 0;
24
 
25
  td:not(:first-child) {
28
  }
29
  }
30
 
31
+ .fs-sites-list-container {
32
  display: none;
33
  overflow: auto;
34
 
vendor/freemius/assets/scss/admin/_tag.scss ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ label.fs-tag, span.fs-tag
2
+ {
3
+ background: #ffba00;
4
+ color: #fff;
5
+ display: inline-block;
6
+ border-radius: 3px;
7
+ padding: 5px;
8
+ font-size: 11px;
9
+ line-height: 11px;
10
+ vertical-align: baseline;
11
+
12
+ &.fs-warn
13
+ {
14
+ background: #ffba00;
15
+ }
16
+ &.fs-info
17
+ {
18
+ background: #00a0d2;
19
+ }
20
+ &.fs-success
21
+ {
22
+ background: #46b450;
23
+ }
24
+ &.fs-error
25
+ {
26
+ background: #dc3232;
27
+ }
28
+ }
vendor/freemius/assets/scss/admin/_themes.scss CHANGED
@@ -1,21 +1,28 @@
 
 
1
  .theme-browser
2
  {
3
  .theme
4
  {
5
- .fs-premium-theme-badge
6
- {
7
- position: absolute;
8
- top: 10px;
9
- right: 0;
10
- background: $fs-logo-green-color;
11
- color: #fff;
12
- text-transform: uppercase;
13
- padding: 5px 10px;
14
- @include border-radius(3px 0 0 3px);
15
- font-weight: bold;
16
- border-right: 0;
17
- @include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
18
- font-size: 1.1em;
 
 
 
 
 
19
  }
20
  }
21
  }
1
+ @import "badge";
2
+
3
  .theme-browser
4
  {
5
  .theme
6
  {
7
+ .fs-premium-theme-badge-container {
8
+ position: absolute;
9
+ right: 0;
10
+ top: 0;
11
+
12
+ .fs-badge {
13
+ position: relative;
14
+ top: 0;
15
+ margin-top: 10px;
16
+ text-align: center;
17
+
18
+ &.fs-premium-theme-badge {
19
+ font-size: 1.1em;
20
+ }
21
+
22
+ &.fs-beta-theme-badge {
23
+ background: #00a0d2;
24
+ }
25
+ }
26
  }
27
  }
28
  }
vendor/freemius/assets/scss/admin/account.scss CHANGED
@@ -1,4 +1,5 @@
1
  @import "../start";
 
2
 
3
  #fs_account
4
  {
@@ -132,6 +133,10 @@
132
  }
133
  }
134
 
 
 
 
 
135
  label.fs-tag
136
  {
137
  background: #ffba00;
1
  @import "../start";
2
+ @import "tag";
3
 
4
  #fs_account
5
  {
133
  }
134
  }
135
 
136
+ .fs-field-beta_program label {
137
+ margin-left: 7px;
138
+ }
139
+
140
  label.fs-tag
141
  {
142
  background: #ffba00;
vendor/freemius/assets/scss/admin/add-ons.scss CHANGED
@@ -1,4 +1,5 @@
1
  @import "../start";
 
2
 
3
  #fs_addons
4
  {
@@ -37,23 +38,23 @@
37
  height: 100%;
38
  position: relative;
39
 
40
- ul
41
  {
42
  @include transition(all, 0.15s);
43
  left: 0;
44
  right: 0;
45
  top: 0;
46
  position: absolute;
47
- }
48
 
49
- li
50
- {
51
- list-style: none;
52
- line-height: 18px;
53
- padding: 0 15px;
54
- width: 100%;
55
- display: block;
56
- @include box-sizing(border-box);
 
57
  }
58
 
59
  .fs-card-banner
@@ -66,6 +67,11 @@
66
  background-repeat: repeat-x;
67
  background-size: 100% 100%;
68
  @include transition(all, 0.15s);
 
 
 
 
 
69
  }
70
 
71
  .fs-title
@@ -109,7 +115,7 @@
109
 
110
  .fs-cta
111
  {
112
- .button
113
  {
114
  position: absolute;
115
  top: 112px;
@@ -156,12 +162,20 @@
156
  {
157
  &, iframe
158
  {
159
- width: 772px !important;
160
  }
161
  }
162
 
163
  #plugin-information
164
  {
 
 
 
 
 
 
 
 
165
  #section-description
166
  {
167
  h2, h3, p, b, i, blockquote, li, ul, ol
@@ -435,6 +449,152 @@
435
  }
436
  }
437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
  @media screen and (max-width: 961px) {
439
  #fs_addons
440
  {
1
  @import "../start";
2
+ @import "badge";
3
 
4
  #fs_addons
5
  {
38
  height: 100%;
39
  position: relative;
40
 
41
+ & > ul
42
  {
43
  @include transition(all, 0.15s);
44
  left: 0;
45
  right: 0;
46
  top: 0;
47
  position: absolute;
 
48
 
49
+ & > li
50
+ {
51
+ list-style: none;
52
+ line-height: 18px;
53
+ padding: 0 15px;
54
+ width: 100%;
55
+ display: block;
56
+ @include box-sizing(border-box);
57
+ }
58
  }
59
 
60
  .fs-card-banner
67
  background-repeat: repeat-x;
68
  background-size: 100% 100%;
69
  @include transition(all, 0.15s);
70
+
71
+ .fs-badge.fs-installed-addon-badge {
72
+ font-size: 1.02em;
73
+ line-height: 1.3em;
74
+ }
75
  }
76
 
77
  .fs-title
115
 
116
  .fs-cta
117
  {
118
+ .button, .button-group
119
  {
120
  position: absolute;
121
  top: 112px;
162
  {
163
  &, iframe
164
  {
165
+ width: 821px !important;
166
  }
167
  }
168
 
169
  #plugin-information
170
  {
171
+ .fyi {
172
+ width: 266px !important;
173
+ }
174
+
175
+ #section-holder {
176
+ margin-right: 299px;
177
+ }
178
+
179
  #section-description
180
  {
181
  h2, h3, p, b, i, blockquote, li, ul, ol
449
  }
450
  }
451
 
452
+ .fs-dropdown {
453
+ #fs_addons .fs-cards-list .fs-card .fs-inner &, #plugin-information & {
454
+ .button-group {
455
+ .button {
456
+ position: relative;
457
+ width: auto;
458
+ top: 0;
459
+ right: 0;
460
+
461
+ &:focus {
462
+ z-index: 10;
463
+ }
464
+ }
465
+
466
+ .fs-dropdown-arrow {
467
+ border-top: 6px solid white;
468
+ border-right: 4px solid transparent;
469
+ border-left: 4px solid transparent;
470
+ top: 12px;
471
+ position: relative;
472
+ }
473
+ }
474
+
475
+ &.active:not(.up) {
476
+ .button:not(.fs-dropdown-arrow-button) {
477
+ border-bottom-left-radius: 0;
478
+ }
479
+
480
+ .fs-dropdown-arrow-button {
481
+ border-bottom-right-radius: 0;
482
+ }
483
+ }
484
+
485
+ &.active.up {
486
+ .button:not(.fs-dropdown-arrow-button) {
487
+ border-top-left-radius: 0;
488
+ }
489
+
490
+ .fs-dropdown-arrow-button {
491
+ border-top-right-radius: 0;
492
+ }
493
+ }
494
+
495
+ .fs-dropdown-list {
496
+ position: absolute;
497
+ right: -1px;
498
+ top: 100%;
499
+ margin-left: auto;
500
+ padding: 3px 0;
501
+ border: 1px solid lighten($darkest-color, 75%);
502
+ background-color: #fff;
503
+ z-index: 1;
504
+ width: 230px;
505
+ text-align: left;
506
+ @include box-shadow(0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));
507
+
508
+ li {
509
+ margin: 0;
510
+
511
+ a {
512
+ display: block;
513
+ padding: 5px 10px;
514
+ text-decoration: none;
515
+ text-shadow: none;
516
+ }
517
+
518
+ &:hover {
519
+ background-color: $wp-selected-color;
520
+ color: #fff;
521
+
522
+ a {
523
+ color: #fff;
524
+ }
525
+ }
526
+ }
527
+ }
528
+
529
+ &:not(.up) {
530
+ .fs-dropdown-list {
531
+ @include border-radius(3px 0 3px 3px);
532
+ }
533
+ }
534
+
535
+ &.up {
536
+ .fs-dropdown-list {
537
+ @include border-radius(3px 3px 0 3px);
538
+ }
539
+ }
540
+ }
541
+
542
+ #plugin-information & {
543
+ .button-group {
544
+ width: 100%;
545
+
546
+ .button {
547
+ float: none;
548
+ font-size: 14px;
549
+ font-weight: normal;
550
+ text-transform: none;
551
+ }
552
+ }
553
+
554
+ .fs-dropdown-list {
555
+ margin-top: 1px;
556
+ }
557
+
558
+ &.up {
559
+ .fs-dropdown-list {
560
+ top: auto;
561
+ bottom: 100%;
562
+ margin-bottom: 2px;
563
+ }
564
+ }
565
+ }
566
+ }
567
+
568
+ #plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group {
569
+ text-align: center;
570
+
571
+ display: table;
572
+
573
+ .button {
574
+ display: table-cell;
575
+
576
+ &:not(.fs-dropdown-arrow-button) {
577
+ left: 1px;
578
+ width: 100%;
579
+ }
580
+ }
581
+ }
582
+
583
+ #plugin-information-footer {
584
+ > .button, .fs-dropdown {
585
+ position: relative;
586
+ top: 3px;
587
+
588
+ &.left {
589
+ float: left;
590
+ }
591
+ }
592
+
593
+ > .right, .fs-dropdown {
594
+ float: right;
595
+ }
596
+ }
597
+
598
  @media screen and (max-width: 961px) {
599
  #fs_addons
600
  {
vendor/freemius/assets/scss/admin/connect.scss CHANGED
@@ -54,7 +54,7 @@ $form_width: 480px;
54
  }
55
 
56
  &.require-license-key {
57
- #sites_list_container {
58
  td {
59
  cursor: pointer;
60
  }
54
  }
55
 
56
  &.require-license-key {
57
+ .fs-sites-list-container {
58
  td {
59
  cursor: pointer;
60
  }
vendor/freemius/assets/scss/admin/plugins.scss ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../start";
2
+ @import "tag";
3
+
4
+ .wp-list-table.plugins {
5
+ .plugin-title {
6
+ span.fs-tag {
7
+ display : inline-block;
8
+ margin-left: 5px;
9
+ line-height: 10px;
10
+ }
11
+ }
12
+ }
vendor/freemius/config.php CHANGED
@@ -204,7 +204,7 @@
204
  #--------------------------------------------------------------------------------
205
 
206
  if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
207
- define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' );
208
  }
209
  if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
210
  define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
@@ -351,8 +351,8 @@
351
  */
352
  if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
353
  define( 'WP_FS__IS_NETWORK_ADMIN',
354
- is_network_admin() ||
355
- ( is_multisite() &&
356
  ( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
357
  ( isset( $_REQUEST['_fs_network_admin'] ) /*||
358
  ( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
204
  #--------------------------------------------------------------------------------
205
 
206
  if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
207
+ define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' );
208
  }
209
  if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
210
  define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
351
  */
352
  if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
353
  define( 'WP_FS__IS_NETWORK_ADMIN',
354
+ is_multisite() &&
355
+ ( is_network_admin() ||
356
  ( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
357
  ( isset( $_REQUEST['_fs_network_admin'] ) /*||
358
  ( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
vendor/freemius/includes/class-freemius.php CHANGED
@@ -399,9 +399,11 @@
399
  $this->_is_multisite_integrated &&
400
  // Themes are always network activated, but the ACTUAL activation is per site.
401
  $this->is_plugin() &&
402
- ( is_plugin_active_for_network( $this->_plugin_basename ) ||
403
- // Plugin network level activation or uninstall.
404
- is_plugin_inactive( $this->_plugin_basename ) )
 
 
405
  );
406
 
407
  $this->_storage->set_network_active(
@@ -409,6 +411,17 @@
409
  $this->is_delegated_connection()
410
  );
411
 
 
 
 
 
 
 
 
 
 
 
 
412
  #region Migration
413
 
414
  if ( is_multisite() ) {
@@ -493,6 +506,188 @@
493
  $this->_version_updates_handler();
494
  }
495
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  /**
497
  * Checks whether this module has a settings menu.
498
  *
@@ -1275,9 +1470,7 @@
1275
  add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1276
  } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1277
  /**
1278
- * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant
1279
- * plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can
1280
- * determine if the plugin information dialog should show information from Freemius.
1281
  *
1282
  * @author Leo Fajardo (@leorw)
1283
  * @since 2.2.3
@@ -1408,6 +1601,7 @@
1408
 
1409
  add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1410
  add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
 
1411
 
1412
  $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1413
  $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
@@ -1467,7 +1661,7 @@
1467
  static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1468
  if ( is_object( $updates ) && isset( $updates->response ) ) {
1469
  foreach ( $updates->response as $file => $plugin ) {
1470
- if ( false !== strpos( $plugin->package, 'api.freemius' ) ) {
1471
  unset( $updates->response[ $file ] );
1472
  }
1473
  }
@@ -1530,6 +1724,122 @@
1530
  <?php
1531
  }
1532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1533
  /**
1534
  * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1535
  * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
@@ -1655,7 +1965,7 @@
1655
  // Try to load the cached value of the file path.
1656
  if ( isset( $this->_storage->plugin_main_file ) ) {
1657
  $plugin_main_file = $this->_storage->plugin_main_file;
1658
- if ( isset( $plugin_main_file->path ) ) {
1659
  $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
1660
  if ( file_exists( $absolute_path ) ) {
1661
  return $absolute_path;
@@ -1676,7 +1986,7 @@
1676
  if ( ! $is_init ) {
1677
  // Fetch prev path cache.
1678
  if ( isset( $this->_storage->plugin_main_file ) &&
1679
- isset( $this->_storage->plugin_main_file->prev_path )
1680
  ) {
1681
  $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
1682
  if ( file_exists( $absolute_path ) ) {
@@ -1780,7 +2090,7 @@
1780
  $store_option = true;
1781
  }
1782
 
1783
- if ( ! isset( $id_slug_type_path_map[ $module_id ]['path'] ) ||
1784
  /**
1785
  * This verification is for cases when suddenly the same module
1786
  * is installed but with a different folder name.
@@ -1844,6 +2154,7 @@
1844
  $caller_map = array();
1845
  $module_type = WP_FS__MODULE_TYPE_PLUGIN;
1846
  $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
 
1847
 
1848
  for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
1849
  if ( empty( $bt[ $i ]['file'] ) ) {
@@ -1869,12 +2180,46 @@
1869
  'activate_plugin'
1870
  ) )
1871
  ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1872
  // Ignore call stack hooks and files inclusion.
1873
  continue;
1874
  }
1875
 
1876
  $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
1877
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1878
  if ( 'functions.php' === basename( $caller_file_path ) ) {
1879
  /**
1880
  * 1. Assumes that theme's starting execution file is functions.php.
@@ -1934,50 +2279,84 @@
1934
  *
1935
  * @author Vova Feldman (@svovaf)
1936
  * @author Leo Fajardo (@leorw)
 
1937
  * @since 1.1.2
1938
  */
1939
  function _add_deactivation_feedback_dialog_box() {
1940
- /* Check the type of user:
1941
- * 1. Long-term (long-term)
1942
- * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
1943
- * 3. Short-term (short-term)
1944
- */
1945
- $is_long_term_user = true;
1946
-
1947
- // Check if the site is at least 2 days old.
1948
- $time_installed = $this->_storage->install_timestamp;
1949
 
1950
- // Difference in seconds.
1951
- $date_diff = time() - $time_installed;
 
 
 
 
 
 
 
 
 
 
1952
 
1953
- // Convert seconds to days.
1954
- $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
1955
 
1956
- if ( $date_diff_days < 2 ) {
1957
- $is_long_term_user = false;
 
 
 
 
1958
  }
1959
 
1960
- $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
1961
 
1962
- if ( $is_long_term_user ) {
1963
- $user_type = 'long-term';
1964
- } else {
1965
- if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
1966
- $user_type = 'non-registered-and-non-anonymous-short-term';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1967
  } else {
1968
- $user_type = 'short-term';
 
 
 
 
1969
  }
1970
- }
1971
 
1972
- $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
1973
 
1974
- // Load the HTML template for the deactivation feedback dialog box.
1975
- $vars = array(
1976
- 'reasons' => $uninstall_reasons,
1977
- 'id' => $this->_module_id
1978
- );
 
1979
 
1980
  /**
 
 
1981
  * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
1982
  */
1983
  fs_require_template( 'forms/deactivation/form.php', $vars );
@@ -2484,12 +2863,14 @@
2484
  function is_site_activation_mode( $and_on = true ) {
2485
  return (
2486
  ( $this->is_on() || ! $and_on ) &&
2487
- ( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
2488
  (
2489
- ( ! $this->is_registered() ||
2490
- ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
2491
- ( ! $this->is_enable_anonymous() ||
2492
- ( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
 
 
 
2493
  )
2494
  );
2495
  }
@@ -2621,17 +3002,47 @@
2621
  $active_basenames = get_option( 'active_plugins' );
2622
  }
2623
 
 
 
 
 
2624
  if ( is_multisite() ) {
2625
  $network_active_basenames = get_site_option( 'active_sitewide_plugins' );
2626
 
2627
  if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
2628
- $active_basenames = array_merge( $active_basenames, $network_active_basenames );
2629
  }
2630
  }
2631
 
2632
  return $active_basenames;
2633
  }
2634
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2635
  /**
2636
  * Get collection of all active plugins. Including network activated plugins.
2637
  *
@@ -2879,6 +3290,18 @@
2879
  add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
2880
  add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
2881
 
 
 
 
 
 
 
 
 
 
 
 
 
2882
 
2883
  self::$_statics_loaded = true;
2884
  }
@@ -3475,7 +3898,10 @@
3475
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
3476
 
3477
  $secure_auth = SECURE_AUTH_KEY;
3478
- if ( empty( $secure_auth ) || false !== strpos( $secure_auth, ' ' ) ) {
 
 
 
3479
  // Protect against default auth key.
3480
  $secure_auth = md5( microtime() );
3481
  }
@@ -4372,9 +4798,31 @@
4372
 
4373
  return;
4374
  } else {
4375
- if ( $this->_parent->is_registered() && ! $this->is_registered() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4376
  // If parent plugin activated, automatically install add-on for the user.
4377
- $this->_activate_addon_account( $this->_parent );
 
 
 
 
 
4378
  } else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4379
  // If add-on activated and parent not, automatically install parent for the user.
4380
  $this->activate_parent_account( $this->_parent );
@@ -4480,14 +4928,18 @@
4480
  private function should_use_freemius_updater_and_dialog() {
4481
  return (
4482
  /**
4483
- * Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, disallow updater
4484
- * and dialog on the "Add Plugins" admin page (/plugin-install.php) so that they won't interfere with
4485
- * the .org plugins' functionalities on that page (e.g. installation and viewing plugin details from
4486
- * .org).
 
4487
  */
4488
- ( ! self::is_plugin_install_page() || true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) &&
4489
- // Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
4490
- ( 'install-plugin' !== fs_request_get( 'action' ) )
 
 
 
4491
  );
4492
  }
4493
 
@@ -4943,6 +5395,7 @@
4943
  'premium_suffix' => $premium_suffix,
4944
  'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
4945
  'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
 
4946
  ) );
4947
 
4948
  if ( $plugin->is_updated() ) {
@@ -4952,6 +5405,21 @@
4952
  // Set the secret key after storing the plugin, we don't want to store the key in the storage.
4953
  $this->_plugin->secret_key = $secret_key;
4954
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4955
  if ( ! isset( $plugin_info['menu'] ) ) {
4956
  $plugin_info['menu'] = array();
4957
 
@@ -6066,7 +6534,7 @@
6066
  }
6067
 
6068
  if ( is_multisite() ) {
6069
- $this->switch_to_blog( $current_blog_id );
6070
 
6071
  $this->do_action( "after_{$name}_cron_multisite" );
6072
  }
@@ -6146,6 +6614,8 @@
6146
  */
6147
  function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
6148
  if ( $this->is_registered() ) {
 
 
6149
  if ( $this->has_paid_plan() ) {
6150
  // Initiate background plan sync.
6151
  $this->_sync_license( true, false, $current_blog_id );
@@ -6486,10 +6956,10 @@
6486
  * @author Leo Fajardo (@leorw)
6487
  * @since 1.2.2
6488
  */
6489
- if ( $this->is_theme()
6490
- && ! $this->has_settings_menu()
6491
- && ! isset( $_REQUEST['fs_action'] )
6492
- && $this->can_activate_previous_theme()
6493
  ) {
6494
  if ( $this->is_only_premium() ) {
6495
  $this->activate_previous_theme();
@@ -6804,7 +7274,7 @@
6804
  foreach ( $plans_ids_to_keep as $plan_id ) {
6805
  $plan = self::_get_plan_by_id( $plan_id );
6806
  if ( is_object( $plan ) ) {
6807
- $plans_to_keep[] = $plan;
6808
  }
6809
  }
6810
  }
@@ -6973,44 +7443,48 @@
6973
  // Clear API cache on activation.
6974
  FS_Api::clear_cache();
6975
 
6976
- $is_premium_version_activation = ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) );
 
 
6977
 
6978
  $this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
6979
 
6980
- // 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
6981
- // 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
6982
- $other_version_basename = $is_premium_version_activation ?
6983
- $this->_free_plugin_basename :
6984
- $this->premium_plugin_basename();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6985
 
6986
- if ( ! $this->_is_network_active ) {
6987
  /**
6988
- * During the activation, the plugin isn't yet active, therefore,
6989
- * _is_network_active will be set to false even if it's a network level
6990
- * activation. So we need to fix that by looking at the is_network_admin() value.
6991
  *
6992
- * @author Vova Feldman
 
 
 
 
6993
  */
6994
- $this->_is_network_active = (
6995
- $this->_is_multisite_integrated &&
6996
- // Themes are always network activated, but the ACTUAL activation is per site.
6997
- $this->is_plugin() &&
6998
- fs_is_network_admin()
6999
- );
7000
- }
7001
-
7002
- /**
7003
- * If the other module version is activate, deactivate it.
7004
- *
7005
- * is_plugin_active() checks if the plugin active on the site or the network level
7006
- * and deactivate_plugins() deactivates the plugin whether its activated on the site
7007
- * or network level.
7008
- *
7009
- * @author Leo Fajardo (@leorw)
7010
- * @since 1.2.2
7011
- */
7012
- if ( is_plugin_active( $other_version_basename ) ) {
7013
- deactivate_plugins( $other_version_basename );
7014
  }
7015
 
7016
  if ( $this->is_registered() ) {
@@ -7060,14 +7534,41 @@
7060
  }
7061
  }
7062
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7063
  if (
7064
  $is_premium_version_activation &&
7065
  (
7066
  ( ! $this->is_registered() && $this->is_anonymous() ) ||
7067
  (
7068
  $this->is_registered() &&
7069
- ! $this->is_trial() &&
7070
- ! $this->has_features_enabled_license()
7071
  )
7072
  )
7073
  ) {
@@ -7109,6 +7610,194 @@
7109
  $this->_storage->was_plugin_loaded = true;
7110
  }
7111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7112
  /**
7113
  * Delete account.
7114
  *
@@ -7166,6 +7855,7 @@
7166
 
7167
  // Clear all storage data.
7168
  $this->_storage->clear_all( true, array(
 
7169
  'connectivity_test',
7170
  'is_on',
7171
  ), false );
@@ -7521,7 +8211,7 @@
7521
  get_current_blog_id() == $network_or_blog_id ||
7522
  ( true === $network_or_blog_id && fs_is_network_admin() )
7523
  ) {
7524
- unset( $this->_is_anonymous );
7525
  }
7526
  }
7527
 
@@ -7985,16 +8675,18 @@
7985
  * @author Vova Feldman (@svovaf)
7986
  * @since 1.1.2
7987
  *
7988
- * @param string[] string $override
7989
- * @param bool $include_plugins Since 1.1.8 by default include plugin changes.
7990
- * @param bool $include_themes Since 1.1.8 by default include plugin changes.
 
7991
  *
7992
  * @return array
7993
  */
7994
  private function get_install_data_for_api(
7995
  array $override,
7996
  $include_plugins = true,
7997
- $include_themes = true
 
7998
  ) {
7999
  if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
8000
  /**
@@ -8022,13 +8714,18 @@
8022
 
8023
  $versions = $this->get_versions();
8024
 
8025
- return array_merge( $versions, array(
 
 
 
 
 
 
 
 
 
8026
  'version' => $this->get_plugin_version(),
8027
  'is_premium' => $this->is_premium(),
8028
- 'language' => get_bloginfo( 'language' ),
8029
- 'charset' => get_bloginfo( 'charset' ),
8030
- 'title' => get_bloginfo( 'name' ),
8031
- 'url' => get_site_url(),
8032
  // Special params.
8033
  'is_active' => true,
8034
  'is_disconnected' => $this->is_tracking_prohibited(),
@@ -8796,6 +9493,18 @@
8796
  return $this->_plugin->id;
8797
  }
8798
 
 
 
 
 
 
 
 
 
 
 
 
 
8799
  /**
8800
  * @author Vova Feldman (@svovaf)
8801
  * @since 1.2.1.5
@@ -9539,6 +10248,176 @@
9539
  return false;
9540
  }
9541
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9542
  /**
9543
  * @author Vova Feldman (@svovaf)
9544
  * @since 2.0.0
@@ -10017,7 +10896,7 @@
10017
  * @return number[]
10018
  */
10019
  private function get_plans_ids_associated_with_installs() {
10020
- if ( ! $this->_is_network_active ) {
10021
  if ( ! is_object( $this->_site ) ||
10022
  ! FS_Plugin_Plan::is_valid_id( $this->_site->plan_id )
10023
  ) {
@@ -10152,24 +11031,11 @@
10152
  $all_licenses = $this->get_user_licenses( $this->_user->id );
10153
  }
10154
 
10155
- $foreign_licenses = array(
10156
- 'ids' => array(),
10157
- 'license_keys' => array()
10158
- );
10159
 
10160
  $all_licenses_map = array();
10161
  foreach ( $all_licenses as $license ) {
10162
  $all_licenses_map[ $license->id ] = true;
10163
- if ( $license->user_id == $this->_user->id || $license->id == $site_license_id ) {
10164
- continue;
10165
- }
10166
-
10167
- $foreign_licenses['ids'][] = $license->id;
10168
- $foreign_licenses['license_keys'][] = $license->secret_key;
10169
- }
10170
-
10171
- if ( empty( $foreign_licenses['ids'] ) ) {
10172
- $foreign_licenses = array();
10173
  }
10174
 
10175
  $licenses = $this->_fetch_licenses( false, $site_license_id, $foreign_licenses, $blog_id );
@@ -10901,7 +11767,7 @@
10901
  return true;
10902
  }
10903
 
10904
- return ( 1 === count( $this->_plans ) );
10905
  }
10906
 
10907
  /**
@@ -11025,11 +11891,13 @@
11025
  * @since 2.2.1
11026
  *
11027
  * @param bool $is_license_deactivation
 
 
11028
  */
11029
- function _maybe_add_subscription_cancellation_dialog_box( $is_license_deactivation = false ) {
11030
  if ( fs_is_network_admin() ) {
11031
  // Subscription cancellation dialog box is currently not supported for multisite networks.
11032
- return;
11033
  }
11034
 
11035
  $license = $this->_get_license();
@@ -11044,7 +11912,7 @@
11044
  $license->is_lifetime() ||
11045
  ( ! $license->is_single_site() && $license->activated > 1 )
11046
  ) {
11047
- return;
11048
  }
11049
 
11050
  /**
@@ -11052,17 +11920,15 @@
11052
  */
11053
  $subscription = $this->_get_subscription( $license->id );
11054
  if ( ! is_object( $subscription ) || ! $subscription->is_active() ) {
11055
- return;
11056
  }
11057
 
11058
- $vars = array(
11059
  'id' => $this->_module_id,
11060
  'license' => $license,
11061
  'has_trial' => $this->is_paid_trial(),
11062
  'is_license_deactivation' => $is_license_deactivation,
11063
  );
11064
-
11065
- fs_require_template( 'forms/subscription-cancellation.php', $vars );
11066
  }
11067
 
11068
  /**
@@ -11127,10 +11993,17 @@
11127
 
11128
  // Add license activation link and AJAX request handler.
11129
  if ( self::is_plugins_page() ) {
11130
- /**
11131
- * @since 1.2.0 Add license action link only on plugins page.
11132
- */
11133
- $this->_add_license_action_link();
 
 
 
 
 
 
 
11134
  }
11135
 
11136
  // Add license activation AJAX callback.
@@ -11161,34 +12034,173 @@
11161
 
11162
  /**
11163
  * @author Leo Fajardo (@leorw)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11164
  *
 
11165
  * @since 1.1.9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11166
  * @since 2.0.0 When a super-admin that hasn't connected before is network activating a license and excluding some of the sites for the license activation, go over the unselected sites in the network and if a site is not connected, skipped, nor delegated, if it's a freemium product then just skip the connection for the site, if it's a premium only product, delegate the connection and license activation to the site admin (Vova Feldman @svovaf).
 
 
 
 
 
 
 
 
 
 
 
11167
  */
11168
- function _activate_license_ajax_action() {
 
 
 
 
 
 
11169
  $this->_logger->entrance();
11170
-
11171
- $this->check_ajax_referer( 'activate_license' );
11172
 
11173
- $license_key = trim( fs_request_get( 'license_key' ) );
11174
 
11175
- if ( empty( $license_key ) ) {
11176
- exit;
 
11177
  }
11178
 
11179
- $plugin_id = fs_request_get( 'module_id', '', 'post' );
11180
- $fs = ( $plugin_id == $this->_module_id ) ?
11181
  $this :
11182
  $this->get_addon_instance( $plugin_id );
11183
 
11184
  $error = false;
11185
  $next_page = false;
11186
 
11187
- $sites = fs_is_network_admin() ?
11188
- fs_request_get( 'sites', array(), 'post' ) :
11189
- array();
11190
-
11191
- $blog_id = fs_request_get( 'blog_id' );
11192
  $has_valid_blog_id = is_numeric( $blog_id );
11193
 
11194
  if ( $fs->is_registered() ) {
@@ -11278,7 +12290,7 @@
11278
  false,
11279
  false,
11280
  false,
11281
- fs_request_get_bool( 'is_marketing_allowed', null ),
11282
  $sites
11283
  );
11284
 
@@ -11332,7 +12344,7 @@
11332
  }
11333
 
11334
  if ( ! empty( $pending_sites ) ) {
11335
- if ( $this->is_freemium() ) {
11336
  $this->skip_connection( $pending_sites );
11337
  } else {
11338
  $this->delegate_connection( $pending_sites );
@@ -11351,14 +12363,24 @@
11351
  );
11352
 
11353
  if ( false !== $error ) {
11354
- $result['error'] = $error;
11355
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
11356
  $result['next_page'] = $next_page;
11357
  }
11358
 
11359
- echo json_encode( $result );
11360
-
11361
- exit;
11362
  }
11363
 
11364
  /**
@@ -11393,8 +12415,12 @@
11393
  $total_sites_to_delegate = count( $sites_by_action['delegate'] );
11394
 
11395
  $next_page = '';
 
 
 
11396
  if ( $total_sites === $total_sites_to_delegate &&
11397
- ! $this->is_network_upgrade_mode()
 
11398
  ) {
11399
  $this->delegate_connection();
11400
  } else {
@@ -11406,7 +12432,19 @@
11406
  $this->skip_connection( $sites_by_action['skip'] );
11407
  }
11408
 
11409
- if ( ! empty( $sites_by_action['allow'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
11410
  if ( ! $fs->is_registered() || ! $this->_is_network_active ) {
11411
  $next_page = $fs->opt_in(
11412
  false,
@@ -11993,11 +13031,11 @@
11993
  $params['trial'] = 'true';
11994
  }
11995
 
11996
- if ( $this->is_addon() ) {
11997
- return $this->_parent->addon_url( $this->_slug );
11998
- }
11999
 
12000
- return $this->_get_admin_page_url( 'pricing', $params );
12001
  }
12002
 
12003
  /**
@@ -12006,16 +13044,18 @@
12006
  * @author Vova Feldman (@svovaf)
12007
  * @since 1.0.6
12008
  *
12009
- * @param string $billing_cycle Billing cycle
12010
- * @param bool $is_trial
12011
- * @param array $extra (optional) Extra parameters, override other query params.
 
12012
  *
12013
  * @return string
12014
  */
12015
  function checkout_url(
12016
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
12017
  $is_trial = false,
12018
- $extra = array()
 
12019
  ) {
12020
  $this->_logger->entrance();
12021
 
@@ -12033,7 +13073,7 @@
12033
  */
12034
  $params = array_merge( $params, $extra );
12035
 
12036
- return $this->_get_admin_page_url( 'pricing', $params );
12037
  }
12038
 
12039
  /**
@@ -12042,10 +13082,11 @@
12042
  * @author Vova Feldman (@svovaf)
12043
  * @since 1.1.7
12044
  *
12045
- * @param number $addon_id
12046
- * @param number $pricing_id
12047
- * @param string $billing_cycle
12048
- * @param bool $is_trial
 
12049
  *
12050
  * @return string
12051
  */
@@ -12053,12 +13094,13 @@
12053
  $addon_id,
12054
  $pricing_id,
12055
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
12056
- $is_trial = false
 
12057
  ) {
12058
  return $this->checkout_url( $billing_cycle, $is_trial, array(
12059
  'plugin_id' => $addon_id,
12060
  'pricing_id' => $pricing_id,
12061
- ) );
12062
  }
12063
 
12064
  #endregion
@@ -12598,6 +13640,10 @@
12598
  * @return array Active & public sites collection.
12599
  */
12600
  static function get_sites() {
 
 
 
 
12601
  /**
12602
  * For consistency with get_blog_list() which only return active public sites.
12603
  *
@@ -12769,7 +13815,7 @@
12769
  * 'blog_id' => string The associated blog ID.
12770
  * }
12771
  */
12772
- private function find_first_install() {
12773
  $sites = self::get_sites();
12774
 
12775
  foreach ( $sites as $site ) {
@@ -13445,6 +14491,18 @@
13445
  ) );
13446
  }
13447
 
 
 
 
 
 
 
 
 
 
 
 
 
13448
  /* Logger
13449
  ------------------------------------------------------------------------------------------------------------------*/
13450
  /**
@@ -13670,8 +14728,9 @@
13670
  $this->get_install_by_blog_id();
13671
 
13672
  if ( fs_is_network_admin() &&
13673
- ! is_object( $site ) &&
13674
- FS_Site::is_valid_id( $this->_storage->network_install_blog_id )
 
13675
  ) {
13676
  $first_install = $this->find_first_install();
13677
 
@@ -13850,6 +14909,47 @@
13850
  return $versions;
13851
  }
13852
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13853
  /**
13854
  * @author Vova Feldman (@svovaf)
13855
  * @since 1.1.7.4
@@ -13895,18 +14995,7 @@
13895
 
13896
  if ( true === $network_level_or_blog_id ) {
13897
  if ( ! isset( $override_with['sites'] ) ) {
13898
- $params['sites'] = array();
13899
-
13900
- $sites = self::get_sites();
13901
-
13902
- foreach ( $sites as $site ) {
13903
- $blog_id = self::get_site_blog_id( $site );
13904
- if ( ! $this->is_site_delegated_connection( $blog_id ) &&
13905
- ! $this->is_installed_on_site( $blog_id )
13906
- ) {
13907
- $params['sites'][] = $this->get_site_info( $site );
13908
- }
13909
- }
13910
  }
13911
  } else {
13912
  $site = is_numeric( $network_level_or_blog_id ) ?
@@ -14266,71 +15355,10 @@
14266
  // If Freemius was OFF before, turn it on.
14267
  $this->turn_on();
14268
 
14269
- if ( ! $this->_is_network_active || ! $is_network_level_opt_in ) {
14270
- $this->_set_account( $user, $first_install );
14271
-
14272
- $this->do_action( 'after_account_connection', $user, $first_install );
14273
- } else {
14274
- $this->_store_user();
14275
-
14276
- // Map site addresses to their blog IDs.
14277
- $address_to_blog_map = $this->get_address_to_blog_map();
14278
-
14279
- $first_blog_id = null;
14280
- $blog_2_install_map = array();
14281
- foreach ( $installs as $install ) {
14282
- $address = trailingslashit( fs_strip_url_protocol( $install->url ) );
14283
- $blog_id = $address_to_blog_map[ $address ];
14284
-
14285
- $this->_store_site( true, $blog_id, $install );
14286
-
14287
- if ( is_null( $first_blog_id ) ) {
14288
- $first_blog_id = $blog_id;
14289
- }
14290
-
14291
- $blog_2_install_map[ $blog_id ] = $install;
14292
- }
14293
-
14294
- if ( ! FS_User::is_valid_id( $this->_storage->network_user_id ) ||
14295
- ! is_object( self::_get_user_by_id( $this->_storage->network_user_id ) )
14296
- ) {
14297
- // Store network user.
14298
- $this->_storage->network_user_id = $this->_user->id;
14299
- }
14300
-
14301
- if ( ! FS_Site::is_valid_id( $this->_storage->network_install_blog_id ) ) {
14302
- $this->_storage->network_install_blog_id = $first_blog_id;
14303
- }
14304
-
14305
- if ( count( $installs ) === count( $address_to_blog_map ) ) {
14306
- // Super-admin opted-in for all sites in the network.
14307
- $this->_storage->is_network_connected = true;
14308
- }
14309
-
14310
- $this->_store_licenses( false );
14311
-
14312
- self::$_accounts->store();
14313
-
14314
- // Don't sync the installs data on network upgrade
14315
- if ( ! $this->network_upgrade_mode_completed() ) {
14316
- $this->send_installs_update();
14317
- }
14318
-
14319
- // Switch install context back to the first install.
14320
- $this->_site = $first_install;
14321
-
14322
- $current_blog = get_current_blog_id();
14323
-
14324
- foreach ( $blog_2_install_map as $blog_id => $install ) {
14325
- $this->switch_to_blog( $blog_id );
14326
-
14327
- $this->do_action( 'after_account_connection', $user, $install );
14328
- }
14329
-
14330
- $this->switch_to_blog( $current_blog );
14331
-
14332
- $this->do_action( 'after_network_account_connection', $user, $blog_2_install_map );
14333
- }
14334
 
14335
  if ( is_numeric( $first_install->license_id ) ) {
14336
  $this->_license = $this->_get_license_by_id( $first_install->license_id );
@@ -14975,27 +16003,63 @@
14975
  * @author Vova Feldman (@svovaf)
14976
  * @since 1.0.6
14977
  *
14978
- * @param Freemius $parent_fs
 
14979
  */
14980
- private function _activate_addon_account( Freemius $parent_fs ) {
14981
  if ( $this->is_registered() ) {
14982
  // Already activated.
14983
  return;
14984
  }
14985
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14986
  // Activate add-on with parent plugin credentials.
14987
- $addon_install = $parent_fs->get_api_site_scope()->call(
14988
  "/addons/{$this->_plugin->id}/installs.json",
14989
  'post',
14990
- $this->get_install_data_for_api( array(
14991
- 'uid' => $this->get_anonymous_id(),
14992
- ), false, false )
14993
  );
14994
 
14995
- if ( isset( $addon_install->error ) ) {
 
 
 
 
14996
  $this->_admin_notices->add(
14997
  sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
14998
- $this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $addon_install->error->message . '</b>',
14999
  $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
15000
  'error'
15001
  );
@@ -15003,27 +16067,131 @@
15003
  return;
15004
  }
15005
 
 
 
 
 
 
 
 
15006
  // Get user information based on parent's plugin.
15007
  $user = $parent_fs->get_user();
15008
 
15009
  // First of all, set site and user info - otherwise we won't
15010
  // be able to invoke API calls.
15011
- $this->_site = new FS_Site( $addon_install );
15012
  $this->_user = $user;
15013
 
15014
  // Sync add-on plans.
15015
  $this->_sync_plans();
15016
 
15017
- // Get site's current plan.
15018
- //$this->_site->plan = $this->_get_plan_by_id( $this->_site->plan->id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15019
 
15020
- $this->_set_account( $user, $this->_site );
 
15021
 
15022
- // Sync licenses.
15023
- $this->_sync_licenses();
15024
 
15025
- // Try to activate premium license.
15026
- $this->_activate_license( true );
15027
  }
15028
 
15029
  /**
@@ -15140,6 +16308,8 @@
15140
  ! $this->is_registered()
15141
  );
15142
 
 
 
15143
  if ( ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) ||
15144
  $should_hide_site_admin_settings
15145
  ) {
@@ -15346,12 +16516,18 @@
15346
  }
15347
 
15348
  if ( ! $this->_menu->has_menu() || $this->_menu->is_top_level() ) {
15349
- $this->_dynamically_added_top_level_page_hook_name = $this->_menu->add_page_and_update(
15350
- $this->get_plugin_name(),
15351
- $this->get_plugin_name(),
15352
- 'manage_options',
15353
- $this->_menu->has_menu() ? $this->_menu->get_slug() : $this->_slug
15354
- );
 
 
 
 
 
 
15355
  } else {
15356
  $this->_menu->add_subpage_and_update(
15357
  $this->_menu->get_parent_slug(),
@@ -15437,6 +16613,44 @@
15437
  );
15438
  }
15439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15440
  /**
15441
  * Add default Freemius menu items.
15442
  *
@@ -15449,28 +16663,7 @@
15449
 
15450
  $is_activation_mode = $this->is_activation_mode();
15451
 
15452
- if ( $this->is_addon() ) {
15453
- // No submenu items for add-ons.
15454
- $add_submenu_items = false;
15455
- } else if ( $this->is_free_wp_org_theme() && ! fs_is_network_admin() ) {
15456
- // Also add submenu items when running in a free .org theme so the tabs will be visible.
15457
- $add_submenu_items = true;
15458
- } else if ( $is_activation_mode && ! $this->is_free_wp_org_theme() ) {
15459
- $add_submenu_items = false;
15460
- } else if ( fs_is_network_admin() ) {
15461
- /**
15462
- * Add submenu items to network level when plugin was network
15463
- * activated and the super-admin did NOT delegated the connection
15464
- * of all sites to site admins.
15465
- */
15466
- $add_submenu_items = (
15467
- $this->_is_network_active &&
15468
- ( WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED ||
15469
- ! $this->is_network_delegated_connection() )
15470
- );
15471
- } else {
15472
- $add_submenu_items = ( ! $this->_is_network_active || $this->is_delegated_connection() );
15473
- }
15474
 
15475
  if ( $add_submenu_items ) {
15476
  if ( $this->has_affiliate_program() ) {
@@ -16521,6 +17714,165 @@
16521
  self::$_accounts->set_option( 'account_addons', $all_addons, $store );
16522
  }
16523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16524
  /**
16525
  * Store account params in the Database.
16526
  *
@@ -16615,7 +17967,9 @@
16615
  $api = $this->get_api_site_scope();
16616
 
16617
  if ( ! is_numeric( $license_id ) ) {
16618
- $license_id = $this->_license->id;
 
 
16619
  }
16620
 
16621
  $result = $api->get( "/licenses/{$license_id}/subscriptions.json", true );
@@ -16722,7 +18076,7 @@
16722
  $plugin_id = $this->_plugin->id;
16723
  }
16724
 
16725
- $user_licenses_endpoint = "/plugins/{$plugin_id}/licenses.json";
16726
  if ( ! empty ( $foreign_licenses ) ) {
16727
  $foreign_licenses = array(
16728
  // Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
@@ -16771,7 +18125,7 @@
16771
 
16772
  if ( is_numeric( $site_license_id ) ) {
16773
  // Try to retrieve a foreign license that is linked to the install.
16774
- $api_result = $api->call( '/licenses.json' );
16775
 
16776
  if ( $this->is_api_result_object( $api_result, 'licenses' ) &&
16777
  is_array( $api_result->licenses )
@@ -16784,7 +18138,17 @@
16784
  } else {
16785
  $api_errors[] = $api_result;
16786
  }
16787
- } else if ( is_object( $this->_license ) ) {
 
 
 
 
 
 
 
 
 
 
16788
  $is_license_in_result = false;
16789
  if ( ! empty( $result ) ) {
16790
  foreach ( $result as $license ) {
@@ -16798,7 +18162,7 @@
16798
  if ( ! $is_license_in_result ) {
16799
  // Fetch foreign license by ID and license key.
16800
  $license = $api->get( "/licenses/{$this->_license->id}.json?license_key=" .
16801
- urlencode( $this->_license->secret_key ) );
16802
 
16803
  if ( $this->is_api_result_entity( $license ) ) {
16804
  $result[] = new FS_Plugin_License( $license );
@@ -16867,7 +18231,15 @@
16867
  $plugin_id = $this->_plugin->id;
16868
  }
16869
 
16870
- $result = $api->get( "/plugins/{$plugin_id}/payments.json?include_addons=true", $flush );
 
 
 
 
 
 
 
 
16871
 
16872
  if ( ! isset( $result->error ) ) {
16873
  for ( $i = 0, $len = count( $result->payments ); $i < $len; $i ++ ) {
@@ -16937,15 +18309,24 @@
16937
  return false;
16938
  }
16939
 
 
 
16940
  // Check if version is actually newer.
16941
  $has_new_version =
16942
  // If it's an non-installed add-on then always return latest.
16943
  ( $this->_is_addon_id( $plugin_id ) && ! $this->is_addon_activated( $plugin_id ) ) ||
16944
  // Compare versions.
16945
- version_compare( $this->get_plugin_version(), $latest_tag->version, '<' );
16946
 
16947
  $this->_logger->departure( $has_new_version ? 'Found newer plugin version ' . $latest_tag->version : 'No new version' );
16948
 
 
 
 
 
 
 
 
16949
  return $has_new_version ? $latest_tag : false;
16950
  }
16951
 
@@ -17156,9 +18537,19 @@
17156
  if ( $this->is_addon_activated( $addon_id ) ) {
17157
  // If already installed, use add-on sync.
17158
  $fs_addon = self::get_instance_by_id( $addon_id );
17159
- $fs_addon->_sync_license( $background );
17160
 
17161
- return;
 
 
 
 
 
 
 
 
 
 
 
17162
  }
17163
 
17164
  // Validate add-on exists.
@@ -17287,9 +18678,12 @@
17287
  if ( ! self::$_global_admin_notices->has_sticky( 'api_blocked' ) ) {
17288
  self::$_global_admin_notices->add(
17289
  sprintf(
17290
- $this->get_text_x_inline( 'Your server is blocking the access to Freemius\' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s', '%1s - plugin title, %2s - API domain', 'server-blocking-access' ),
17291
  $this->get_plugin_name(),
17292
- '<a href="' . $api->get_url() . '" target="_blank">' . $api->get_url() . '</a>'
 
 
 
17293
  ) . '<br> ' . $this->get_text_inline( 'Error received from the server:', 'server-error-message' ) . var_export( $result->error, true ),
17294
  $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
17295
  'error',
@@ -17452,7 +18846,7 @@
17452
  $this->_store_licenses();
17453
 
17454
  $plan_change = $is_free ?
17455
- 'upgraded' :
17456
  ( is_object( $new_license ) ?
17457
  'changed' :
17458
  'downgraded' );
@@ -17480,6 +18874,18 @@
17480
  $this->_sync_site_subscription( $this->_license );
17481
  }
17482
  }
 
 
 
 
 
 
 
 
 
 
 
 
17483
  }
17484
 
17485
  $hmm_text = $this->get_text_x_inline( 'Hmm', 'something somebody says when they are thinking about what you have just said.', 'hmm' ) . '...';
@@ -17513,11 +18919,12 @@
17513
  }
17514
  break;
17515
  case 'upgraded':
 
17516
  $this->_admin_notices->add_sticky(
17517
- sprintf(
17518
- $this->get_text_inline( 'Your plan was successfully upgraded.', 'plan-upgraded-message' ),
17519
- '<i>' . $this->get_plugin_name() . '</i>'
17520
- ) . $this->get_complete_upgrade_instructions(),
17521
  'plan_upgraded',
17522
  $this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
17523
  );
@@ -17632,22 +19039,24 @@
17632
  *
17633
  * @param bool $background
17634
  */
17635
- protected function _activate_license( $background = false ) {
17636
  $this->_logger->entrance();
17637
 
17638
- $license_id = fs_request_get( 'license_id' );
 
17639
 
17640
- if ( is_object( $this->_site ) &&
17641
- FS_Plugin_License::is_valid_id( $license_id ) &&
17642
- $license_id == $this->_site->license_id
17643
- ) {
17644
- // License is already activated.
17645
- return;
17646
- }
17647
 
17648
- $premium_license = FS_Plugin_License::is_valid_id( $license_id ) ?
17649
- $this->_get_license_by_id( $license_id ) :
17650
- $this->_get_available_premium_license();
 
17651
 
17652
  if ( ! is_object( $premium_license ) ) {
17653
  return;
@@ -17696,7 +19105,7 @@
17696
  }
17697
 
17698
  $api = $this->get_api_site_scope();
17699
- $license = $api->call( "/licenses/{$premium_license->id}.json", 'put', $api_request_params );
17700
 
17701
  if ( ! $this->is_api_result_entity( $license ) ) {
17702
  if ( ! $background ) {
@@ -17730,6 +19139,18 @@
17730
 
17731
  $this->_store_account();
17732
 
 
 
 
 
 
 
 
 
 
 
 
 
17733
  if ( ! $background ) {
17734
  $this->_admin_notices->add_sticky(
17735
  $this->get_text_inline( 'Your license was successfully activated.', 'license-activated-message' ) .
@@ -18132,6 +19553,8 @@
18132
 
18133
  if ( $this->has_secret_key() ) {
18134
  $endpoint = add_query_arg( 'type', 'all', $endpoint );
 
 
18135
  }
18136
 
18137
  return $endpoint;
@@ -18288,9 +19711,16 @@
18288
  function _get_invoice_api_url( $payment_id = false ) {
18289
  $this->_logger->entrance();
18290
 
18291
- return $this->get_api_user_scope()->get_signed_url(
18292
  "/payments/{$payment_id}/invoice.pdf"
18293
  );
 
 
 
 
 
 
 
18294
  }
18295
 
18296
  /**
@@ -18336,7 +19766,7 @@
18336
  $this->get_parent_instance() :
18337
  $this;
18338
 
18339
- return $fs->get_account_url( 'download_latest', $params );
18340
  }
18341
 
18342
  #endregion Download Plugin ------------------------------------------------------------------
@@ -18425,7 +19855,9 @@
18425
  if ( ! $flush && $api->is_cached( $path ) ) {
18426
  $addons = self::get_all_addons();
18427
 
18428
- return $addons[ $this->_plugin->id ];
 
 
18429
  }
18430
 
18431
  $result = $api->get( $path, $flush );
@@ -18661,7 +20093,7 @@
18661
  if ( ! isset( $result->error ) ) {
18662
  $this->_admin_notices->add( sprintf(
18663
  $this->get_text_inline( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.', 'verification-email-sent-message' ),
18664
- sprintf( '<a href="mailto:%1s">%2s</a>', esc_url( $this->_user->email ), $this->_user->email )
18665
  ) );
18666
  } else {
18667
  // handle different error cases.
@@ -18726,7 +20158,9 @@
18726
  ) {
18727
  $first_time_path = '';
18728
  } else {
18729
- $first_time_path = $this->_menu->get_first_time_path();
 
 
18730
  }
18731
 
18732
  if ( $this->_is_network_active &&
@@ -19371,7 +20805,8 @@
19371
  $user->id,
19372
  $user->public_key,
19373
  ! $this->is_live(),
19374
- $user->secret_key
 
19375
  );
19376
  }
19377
 
@@ -19399,7 +20834,8 @@
19399
  $user->id,
19400
  $user->public_key,
19401
  ! $this->is_live(),
19402
- $user->secret_key
 
19403
  );
19404
 
19405
  return $this->_user_api;
@@ -19424,7 +20860,8 @@
19424
  $this->_site->id,
19425
  $this->_site->public_key,
19426
  ! $this->is_live(),
19427
- $this->_site->secret_key
 
19428
  );
19429
  }
19430
 
@@ -19448,7 +20885,9 @@
19448
  'plugin',
19449
  $this->_plugin->id,
19450
  $this->_plugin->public_key,
19451
- ! $this->is_live()
 
 
19452
  );
19453
  }
19454
 
@@ -19488,6 +20927,10 @@
19488
  $plans = array( $plans );
19489
  }
19490
 
 
 
 
 
19491
  $this->_storage->has_trial_plan = FS_Plan_Manager::instance()->has_trial_plan( $plans );
19492
  }
19493
 
@@ -19865,7 +21308,33 @@
19865
  function _add_upgrade_action_link() {
19866
  $this->_logger->entrance();
19867
 
19868
- if ( ! $this->is_paying() && $this->has_paid_plan() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19869
  $this->add_plugin_action_link(
19870
  $this->get_text_inline( 'Upgrade', 'upgrade' ),
19871
  $this->get_upgrade_url(),
@@ -19875,7 +21344,11 @@
19875
  );
19876
  }
19877
 
19878
- if ( $this->has_addons() ) {
 
 
 
 
19879
  $this->add_plugin_action_link(
19880
  $this->get_text_inline( 'Add-Ons', 'add-ons' ),
19881
  $this->_get_admin_page_url( 'addons' ),
@@ -19926,7 +21399,7 @@
19926
  }
19927
 
19928
  /**
19929
- * Adds "Opt in" or "Opt out" link to the main "Plugins" page link actions collection.
19930
  *
19931
  * @author Leo Fajardo (@leorw)
19932
  * @since 1.2.1.5
@@ -19938,13 +21411,19 @@
19938
 
19939
  $this->_logger->entrance();
19940
 
19941
- /**
19942
- * If the activation has been delegated to site admins, no tracking-related actions for now.
19943
- *
19944
- * @author Leo Fajardo (@leorw)
19945
- */
19946
- if ( $this->_is_network_active && $this->is_network_delegated_connection() ) {
19947
- return;
 
 
 
 
 
 
19948
  }
19949
 
19950
  if ( fs_request_is_action_secure( $this->get_unique_affix() . '_reconnect' ) ) {
@@ -19962,14 +21441,16 @@
19962
  return;
19963
  }
19964
 
19965
- if ( ! $this->is_enable_anonymous() ) {
19966
- // Don't allow to opt-out if anonymous mode is disabled.
19967
- return;
19968
- }
 
19969
 
19970
- if ( ! $this->is_free_plan() ) {
19971
- // Don't allow to opt-out if running in paid plan.
19972
- return;
 
19973
  }
19974
 
19975
  if ( $this->add_ajax_action( 'stop_tracking', array( &$this, '_stop_tracking_callback' ) ) ) {
@@ -19980,7 +21461,8 @@
19980
  return;
19981
  }
19982
 
19983
- $url = '#';
 
19984
 
19985
  if ( $this->is_registered() ) {
19986
  if ( $this->is_tracking_allowed() ) {
@@ -19990,7 +21472,10 @@
19990
  }
19991
 
19992
  add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
19993
- } else {
 
 
 
19994
  $link_text_id = $this->get_text_inline( 'Opt In', 'opt-in' );
19995
 
19996
  $params = ! $this->is_anonymous() ?
@@ -20003,7 +21488,7 @@
20003
  $url = $this->get_activation_url( $params );
20004
  }
20005
 
20006
- if ( $this->is_plugin() && self::is_plugins_page() ) {
20007
  $this->add_plugin_action_link(
20008
  $link_text_id,
20009
  $url,
@@ -20026,7 +21511,9 @@
20026
  $url = false;
20027
 
20028
  if ( ! $this->is_addon() || ! $this->has_free_plan() ) {
20029
- $first_time_path = $this->_menu->get_first_time_path();
 
 
20030
 
20031
  if ( $this->is_activation_mode() ) {
20032
  $url = $this->get_activation_url();
@@ -20214,8 +21701,8 @@
20214
  $premium_plugin_basename = $this->premium_plugin_basename();
20215
 
20216
  return sprintf(
20217
- /* translators: %1s: Product title; %2s: Plan title */
20218
- $this->get_text_inline( ' The paid version of %1s is already installed. Please activate it to start benefiting the %2s features. %3s', 'activate-premium-version' ),
20219
  sprintf( '<em>%s</em>', esc_html( $this->get_plugin_title() ) ),
20220
  $plan_title,
20221
  sprintf(
@@ -20245,7 +21732,7 @@
20245
  ) ),
20246
  $deactivation_step,
20247
  $this->get_text_inline( 'Upload and activate the downloaded version', 'upload-and-activate' ),
20248
- '//bit.ly/upload-wp-' . $this->_module_type . 's',
20249
  $this->get_text_inline( 'How to upload and activate?', 'howto-upload-activate' )
20250
  );
20251
  }
@@ -21228,7 +22715,9 @@
21228
  'plugin',
21229
  $user_plugin->id,
21230
  $user_plugin->public_key,
21231
- ! $user_plugin->is_live
 
 
21232
  );
21233
 
21234
  $addons_result = $plugin_api->get( '/addons.json?enriched=true', true );
@@ -21318,7 +22807,7 @@
21318
  '%s %s %s',
21319
  $thank_you,
21320
  $already_opted_in,
21321
- sprintf($this->get_text_inline( 'Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard 🙂', 'due-to-gdpr-compliance-requirements' ), '<a href="https://eugdpr.org/" target="_blank" rel="noopener noreferrer">', '</a>') .
21322
  '<br><br>' .
21323
  '<b>' . $this->get_text_inline( "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:", 'contact-for-updates' ) . '</b>' .
21324
  $actions .
399
  $this->_is_multisite_integrated &&
400
  // Themes are always network activated, but the ACTUAL activation is per site.
401
  $this->is_plugin() &&
402
+ (
403
+ is_plugin_active_for_network( $this->_plugin_basename ) ||
404
+ // Plugin network level activation or uninstall.
405
+ ( fs_is_network_admin() && is_plugin_inactive( $this->_plugin_basename ) )
406
+ )
407
  );
408
 
409
  $this->_storage->set_network_active(
411
  $this->is_delegated_connection()
412
  );
413
 
414
+ if ( ! isset( $this->_storage->is_network_activated ) ) {
415
+ $this->_storage->is_network_activated = $this->_is_network_active;
416
+ }
417
+
418
+ if ( $this->_storage->is_network_activated != $this->_is_network_active ) {
419
+ // Update last activation level.
420
+ $this->_storage->is_network_activated = $this->_is_network_active;
421
+
422
+ $this->maybe_adjust_storage();
423
+ }
424
+
425
  #region Migration
426
 
427
  if ( is_multisite() ) {
506
  $this->_version_updates_handler();
507
  }
508
 
509
+ /**
510
+ * @author Leo Fajardo (@leorw)
511
+ * @since 2.3.0
512
+ */
513
+ private function maybe_adjust_storage() {
514
+ $install_timestamp = null;
515
+ $prev_is_premium = null;
516
+
517
+ $options_to_update = array();
518
+
519
+ $is_network_admin = fs_is_network_admin();
520
+
521
+ $network_install_timestamp = $this->_storage->get( 'install_timestamp', null, true );
522
+
523
+ if ( ! $is_network_admin ) {
524
+ if ( is_null( $network_install_timestamp ) ) {
525
+ // Plugin was not network-activated before.
526
+ return;
527
+ }
528
+
529
+ if ( is_null( $this->_storage->get( 'install_timestamp', null, false ) ) ) {
530
+ // Set the `install_timestamp` only if it's not yet set.
531
+ $install_timestamp = $network_install_timestamp;
532
+ }
533
+
534
+ $prev_is_premium = $this->_storage->get( 'prev_is_premium', null, true );
535
+ } else {
536
+ $current_wp_user = self::_get_current_wp_user();
537
+ $current_fs_user = self::_get_user_by_email( $current_wp_user->user_email );
538
+ $network_user_info = array();
539
+
540
+ $skips_count = 0;
541
+
542
+ $sites = self::get_sites();
543
+ $sites_count = count( $sites );
544
+
545
+ $blog_id_2_install_map = array();
546
+
547
+ $is_first_non_ignored_blog = true;
548
+
549
+ foreach ( $sites as $site ) {
550
+ $blog_id = self::get_site_blog_id( $site );
551
+
552
+ $blog_install_timestamp = $this->_storage->get( 'install_timestamp', null, $blog_id );
553
+
554
+ if ( is_null( $blog_install_timestamp ) ) {
555
+ // Plugin has not been installed on this blog.
556
+ continue;
557
+ }
558
+
559
+ $is_earlier_install = (
560
+ ! is_null( $install_timestamp ) &&
561
+ $blog_install_timestamp < $install_timestamp
562
+ );
563
+
564
+ $install = $this->get_install_by_blog_id( $blog_id );
565
+
566
+ $update_network_user_info = false;
567
+
568
+ if ( ! is_object( $install ) ) {
569
+ if ( ! $this->_storage->get( 'is_anonymous', false, $blog_id ) ) {
570
+ // The opt-in decision (whether to skip or opt in) is yet to be made.
571
+ continue;
572
+ }
573
+
574
+ $skips_count ++;
575
+ } else {
576
+ $blog_id_2_install_map[ $blog_id ] = $install;
577
+
578
+ if ( empty( $network_user_info ) ) {
579
+ // Set the network user info for the 1st time. Choose any user information whether or not it is for the current WP user.
580
+ $update_network_user_info = true;
581
+ }
582
+
583
+ if ( ! $update_network_user_info &&
584
+ is_object( $current_fs_user ) &&
585
+ $network_user_info['user_id'] != $current_fs_user->id &&
586
+ $install->user_id == $current_fs_user->id
587
+ ) {
588
+ // If an install that is owned by the current WP user is found, use its user information instead.
589
+ $update_network_user_info = true;
590
+ }
591
+
592
+ if ( ! $update_network_user_info &&
593
+ $is_earlier_install &&
594
+ ( ! is_object( $current_fs_user ) || $current_fs_user->id == $install->user_id )
595
+ ) {
596
+ // Update to the earliest install info if there's no install found so far that is owned by the current WP user; OR only if the found install is owned by the current WP user.
597
+ $update_network_user_info = true;
598
+ }
599
+ }
600
+
601
+ if ( $update_network_user_info ) {
602
+ $network_user_info = array(
603
+ 'user_id' => $install->user_id,
604
+ 'blog_id' => $blog_id
605
+ );
606
+ }
607
+
608
+ $site_prev_is_premium = $this->_storage->get( 'prev_is_premium', null, $blog_id );
609
+
610
+ if ( $is_first_non_ignored_blog ) {
611
+ $prev_is_premium = $site_prev_is_premium;
612
+
613
+ if ( is_null( $network_install_timestamp ) ) {
614
+ $install_timestamp = $blog_install_timestamp;
615
+ }
616
+
617
+ $is_first_non_ignored_blog = false;
618
+
619
+ continue;
620
+ }
621
+
622
+ if ( ! is_null( $prev_is_premium ) && $prev_is_premium !== $site_prev_is_premium ) {
623
+ // If a different `$site_prev_is_premium` value is found, do not include the option in the collection of options to update.
624
+ $prev_is_premium = null;
625
+ }
626
+
627
+ if ( $is_earlier_install ) {
628
+ // If an earlier install timestamp is found.
629
+ $install_timestamp = $blog_install_timestamp;
630
+ }
631
+ }
632
+
633
+ $installs_count = count( $blog_id_2_install_map );
634
+
635
+ if ( $sites_count === ( $installs_count + $skips_count ) ) {
636
+ if ( ! empty( $network_user_info ) ) {
637
+ $options_to_update['network_user_id'] = $network_user_info['user_id'];
638
+ $options_to_update['network_install_blog_id'] = $network_user_info['blog_id'];
639
+
640
+ foreach ( $blog_id_2_install_map as $blog_id => $install ) {
641
+ if ( $install->user_id == $network_user_info['user_id'] ) {
642
+ continue;
643
+ }
644
+
645
+ $this->_storage->store( 'is_delegated_connection', true, $blog_id );
646
+ }
647
+ }
648
+
649
+ if ( $sites_count === $skips_count ) {
650
+ /**
651
+ * Assume network-level skipping as the intended action if all actions identified were only
652
+ * skipping of the connection (i.e., no opt-ins and delegated connections so far).
653
+ */
654
+ $options_to_update['is_anonymous_ms'] = true;
655
+ } else if ( $sites_count === $installs_count ) {
656
+ /**
657
+ * Assume network-level opt-in as the intended action if all actions identified were only opt-ins
658
+ * (i.e., no delegation and skipping of the connections so far).
659
+ */
660
+ $options_to_update['is_network_connected'] = true;
661
+ }
662
+ }
663
+ }
664
+
665
+ if ( ! is_null( $install_timestamp ) ) {
666
+ $options_to_update['install_timestamp'] = $install_timestamp;
667
+ }
668
+
669
+ if ( ! is_null( $prev_is_premium ) ) {
670
+ $options_to_update['prev_is_premium'] = $prev_is_premium;
671
+ }
672
+
673
+ if ( ! empty( $options_to_update ) ) {
674
+ $this->adjust_storage( $options_to_update, $is_network_admin );
675
+ }
676
+ }
677
+
678
+ /**
679
+ * @author Leo Fajardo (@leorw)
680
+ * @since 2.3.0
681
+ *
682
+ * @param array $options
683
+ * @param bool $is_network_admin
684
+ */
685
+ private function adjust_storage( $options, $is_network_admin ) {
686
+ foreach ( $options as $name => $value ) {
687
+ $this->_storage->store( $name, $value, $is_network_admin ? true : null );
688
+ }
689
+ }
690
+
691
  /**
692
  * Checks whether this module has a settings menu.
693
  *
1470
  add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1471
  } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1472
  /**
1473
+ * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can determine if the plugin information dialog should show information from Freemius.
 
 
1474
  *
1475
  * @author Leo Fajardo (@leorw)
1476
  * @since 2.2.3
1601
 
1602
  add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1603
  add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1604
+ add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
1605
 
1606
  $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1607
  $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
1661
  static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1662
  if ( is_object( $updates ) && isset( $updates->response ) ) {
1663
  foreach ( $updates->response as $file => $plugin ) {
1664
+ if ( isset( $plugin->package ) && false !== strpos( $plugin->package, 'api.freemius' ) ) {
1665
  unset( $updates->response[ $file ] );
1666
  }
1667
  }
1724
  <?php
1725
  }
1726
 
1727
+ /**
1728
+ * @author Leo Fajardo (@leorw)
1729
+ * @since 2.3.0
1730
+ */
1731
+ static function _maybe_add_beta_label_styles() {
1732
+ $has_any_beta_version = false;
1733
+
1734
+ foreach ( self::$_instances as $instance ) {
1735
+ if ( $instance->is_beta() ) {
1736
+ $has_any_beta_version = true;
1737
+ break;
1738
+ }
1739
+ }
1740
+
1741
+ if ( $has_any_beta_version ) {
1742
+ fs_enqueue_local_style( 'fs_plugins', '/admin/plugins.css' );
1743
+ }
1744
+ }
1745
+
1746
+ /**
1747
+ * @author Leo Fajardo (@leorw)
1748
+ * @since 2.3.0
1749
+ */
1750
+ static function _maybe_add_beta_label_to_plugins_and_handle_confirmation() {
1751
+ $beta_data = array();
1752
+
1753
+ foreach ( self::$_instances as $instance ) {
1754
+ if ( ! $instance->is_premium() ) {
1755
+ continue;
1756
+ }
1757
+
1758
+ /**
1759
+ * If there's an available beta version update, a confirmation message will be shown when the
1760
+ * "Update now" link on the "Plugins" or "Themes" page is clicked.
1761
+ */
1762
+ $has_beta_update = $instance->has_beta_update();
1763
+
1764
+ $is_beta = (
1765
+ // The "Beta" label is added separately for themes.
1766
+ $instance->is_plugin() &&
1767
+ $instance->is_beta()
1768
+ );
1769
+
1770
+ if ( ! $is_beta && ! $has_beta_update ) {
1771
+ continue;
1772
+ }
1773
+
1774
+ $beta_data[ $instance->get_plugin_basename() ] = array( 'is_installed_version_beta' => $is_beta );
1775
+
1776
+ if ( ! $has_beta_update ) {
1777
+ continue;
1778
+ }
1779
+
1780
+ $beta_data[ $instance->get_plugin_basename() ]['beta_version_update_confirmation_message'] = sprintf(
1781
+ '%s %s',
1782
+ sprintf(
1783
+ fs_esc_attr_inline(
1784
+ 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.',
1785
+ 'beta-version-update-caution',
1786
+ $instance->get_slug()
1787
+ ),
1788
+ $instance->get_plugin_title()
1789
+ ),
1790
+ fs_esc_attr_inline( 'Would you like to proceed with the update?', 'update-confirmation', $instance->get_slug() )
1791
+ );
1792
+ }
1793
+
1794
+ if ( empty( $beta_data ) ) {
1795
+ return;
1796
+ }
1797
+ ?>
1798
+ <script type="text/javascript">
1799
+ ( function( $ ) {
1800
+ var betaData = <?php echo json_encode( $beta_data ) ?>;
1801
+
1802
+ for ( var pluginBasename in betaData ) {
1803
+ if ( ! betaData.hasOwnProperty( pluginBasename ) ) {
1804
+ continue;
1805
+ }
1806
+
1807
+ if ( ! betaData[ pluginBasename ].is_installed_version_beta ) {
1808
+ continue;
1809
+ }
1810
+
1811
+ var $parentContainer = $( '.wp-list-table.plugins tr[data-plugin="' + pluginBasename + '"]' );
1812
+ if ( 0 === $parentContainer.length ) {
1813
+ continue;
1814
+ }
1815
+
1816
+ $parentContainer.find( '.plugin-title > strong:first-child').append(
1817
+ '<span class="fs-tag fs-info"><?php fs_esc_js_echo_inline( 'Beta', 'beta' ) ?></span>'
1818
+ );
1819
+ }
1820
+
1821
+ setTimeout( function() {
1822
+ // Wait a little bit before adding the event handler, otherwise, it will be overridden by the core WP logic.
1823
+ $( '.plugins .update-message .update-link, .themes .theme .update-message' ).on( 'click', function() {
1824
+ var $parentContainer = $( this ).parents( 'tr:first' );
1825
+ pluginBasename = ( 0 !== $parentContainer.length ) ?
1826
+ $parentContainer.data( 'plugin' ) :
1827
+ $( this ).parents( '.theme:first' ).data( 'slug' );
1828
+
1829
+ if (
1830
+ betaData[ pluginBasename ] &&
1831
+ betaData[ pluginBasename ].beta_version_update_confirmation_message &&
1832
+ ! confirm( betaData[ pluginBasename ].beta_version_update_confirmation_message )
1833
+ ) {
1834
+ return false;
1835
+ }
1836
+ } );
1837
+ }, 20 );
1838
+ } )( jQuery );
1839
+ </script>
1840
+ <?php
1841
+ }
1842
+
1843
  /**
1844
  * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1845
  * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
1965
  // Try to load the cached value of the file path.
1966
  if ( isset( $this->_storage->plugin_main_file ) ) {
1967
  $plugin_main_file = $this->_storage->plugin_main_file;
1968
+ if ( ! empty( $plugin_main_file->path ) ) {
1969
  $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
1970
  if ( file_exists( $absolute_path ) ) {
1971
  return $absolute_path;
1986
  if ( ! $is_init ) {
1987
  // Fetch prev path cache.
1988
  if ( isset( $this->_storage->plugin_main_file ) &&
1989
+ ! empty( $this->_storage->plugin_main_file->prev_path )
1990
  ) {
1991
  $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
1992
  if ( file_exists( $absolute_path ) ) {
2090
  $store_option = true;
2091
  }
2092
 
2093
+ if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
2094
  /**
2095
  * This verification is for cases when suddenly the same module
2096
  * is installed but with a different folder name.
2154
  $caller_map = array();
2155
  $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2156
  $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
2157
+ $plugin_dir_to_skip = false;
2158
 
2159
  for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
2160
  if ( empty( $bt[ $i ]['file'] ) ) {
2180
  'activate_plugin'
2181
  ) )
2182
  ) {
2183
+ if ( 'activate_plugin' === $bt[ $i ]['function'] ) {
2184
+ /**
2185
+ * Store the directory of the activator plugin so that any other file that starts with it
2186
+ * cannot be mistakenly chosen as a candidate caller file.
2187
+ *
2188
+ * @author Leo Fajardo
2189
+ *
2190
+ * @since 2.3.0
2191
+ */
2192
+ $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2193
+
2194
+ foreach ( $all_plugins_paths as $plugin_path ) {
2195
+ $plugin_dir = fs_normalize_path( dirname( $plugin_path ) . '/' );
2196
+ if ( false !== strpos( $caller_file_path, $plugin_dir ) ) {
2197
+ $plugin_dir_to_skip = $plugin_dir;
2198
+
2199
+ break;
2200
+ }
2201
+ }
2202
+ }
2203
+
2204
  // Ignore call stack hooks and files inclusion.
2205
  continue;
2206
  }
2207
 
2208
  $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2209
 
2210
+ if ( ! empty( $plugin_dir_to_skip ) ) {
2211
+ /**
2212
+ * Skip if it's an activator plugin file to avoid mistakenly choosing it as a candidate caller file.
2213
+ *
2214
+ * @author Leo Fajardo
2215
+ *
2216
+ * @since 2.3.0
2217
+ */
2218
+ if ( 0 === strpos( $caller_file_path, $plugin_dir_to_skip ) ) {
2219
+ continue;
2220
+ }
2221
+ }
2222
+
2223
  if ( 'functions.php' === basename( $caller_file_path ) ) {
2224
  /**
2225
  * 1. Assumes that theme's starting execution file is functions.php.
2279
  *
2280
  * @author Vova Feldman (@svovaf)
2281
  * @author Leo Fajardo (@leorw)
2282
+ *
2283
  * @since 1.1.2
2284
  */
2285
  function _add_deactivation_feedback_dialog_box() {
2286
+ $subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
2287
+ $this->_get_subscription_cancellation_dialog_box_template_params() :
2288
+ array();
 
 
 
 
 
 
2289
 
2290
+ /**
2291
+ * @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
2292
+ */
2293
+ $show_deactivation_feedback_form = true;
2294
+ if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
2295
+ $show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
2296
+ } else if ( $this->is_addon() ) {
2297
+ /**
2298
+ * If the add-on's 'show_deactivation_feedback_form' is not set, try to inherit the value from the parent.
2299
+ */
2300
+ $show_deactivation_feedback_form = $this->get_parent_instance()->apply_filters( 'show_deactivation_feedback_form', true );
2301
+ }
2302
 
2303
+ $uninstall_confirmation_message = $this->apply_filters( 'uninstall_confirmation_message', '' );
 
2304
 
2305
+ if (
2306
+ empty( $subscription_cancellation_dialog_box_template_params ) &&
2307
+ ! $show_deactivation_feedback_form &&
2308
+ empty( $uninstall_confirmation_message )
2309
+ ) {
2310
+ return;
2311
  }
2312
 
2313
+ $vars = array( 'id' => $this->_module_id );
2314
 
2315
+ if ( $show_deactivation_feedback_form ) {
2316
+ /* Check the type of user:
2317
+ * 1. Long-term (long-term)
2318
+ * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
2319
+ * 3. Short-term (short-term)
2320
+ */
2321
+ $is_long_term_user = true;
2322
+
2323
+ // Check if the site is at least 2 days old.
2324
+ $time_installed = $this->_storage->install_timestamp;
2325
+
2326
+ // Difference in seconds.
2327
+ $date_diff = time() - $time_installed;
2328
+
2329
+ // Convert seconds to days.
2330
+ $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
2331
+
2332
+ if ( $date_diff_days < 2 ) {
2333
+ $is_long_term_user = false;
2334
+ }
2335
+
2336
+ $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
2337
+
2338
+ if ( $is_long_term_user ) {
2339
+ $user_type = 'long-term';
2340
  } else {
2341
+ if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
2342
+ $user_type = 'non-registered-and-non-anonymous-short-term';
2343
+ } else {
2344
+ $user_type = 'short-term';
2345
+ }
2346
  }
 
2347
 
2348
+ $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
2349
 
2350
+ $vars['reasons'] = $uninstall_reasons;
2351
+ }
2352
+
2353
+ $vars['subscription_cancellation_dialog_box_template_params'] = &$subscription_cancellation_dialog_box_template_params;
2354
+ $vars['show_deactivation_feedback_form'] = $show_deactivation_feedback_form;
2355
+ $vars['uninstall_confirmation_message'] = $uninstall_confirmation_message;
2356
 
2357
  /**
2358
+ * Load the HTML template for the deactivation feedback dialog box.
2359
+ *
2360
  * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
2361
  */
2362
  fs_require_template( 'forms/deactivation/form.php', $vars );
2863
  function is_site_activation_mode( $and_on = true ) {
2864
  return (
2865
  ( $this->is_on() || ! $and_on ) &&
 
2866
  (
2867
+ ( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
2868
+ (
2869
+ ( ! $this->is_registered() ||
2870
+ ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
2871
+ ( ! $this->is_enable_anonymous() ||
2872
+ ( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
2873
+ )
2874
  )
2875
  );
2876
  }
3002
  $active_basenames = get_option( 'active_plugins' );
3003
  }
3004
 
3005
+ if ( ! is_array( $active_basenames ) ) {
3006
+ $active_basenames = array();
3007
+ }
3008
+
3009
  if ( is_multisite() ) {
3010
  $network_active_basenames = get_site_option( 'active_sitewide_plugins' );
3011
 
3012
  if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
3013
+ $active_basenames = array_merge( $active_basenames, array_keys( $network_active_basenames ) );
3014
  }
3015
  }
3016
 
3017
  return $active_basenames;
3018
  }
3019
 
3020
+ /**
3021
+ * @author Leo Fajardo (@leorw)
3022
+ * @since 2.3.0
3023
+ *
3024
+ * @param int $blog_id
3025
+ *
3026
+ * @return array
3027
+ */
3028
+ static function get_active_plugins_directories_map( $blog_id = 0 ) {
3029
+ $active_basenames = self::get_active_plugins_basenames( $blog_id );
3030
+
3031
+ $map = array();
3032
+
3033
+ foreach ( $active_basenames as $active_basename ) {
3034
+ $active_basename = fs_normalize_path( $active_basename );
3035
+
3036
+ if ( false === strpos( $active_basename, '/' ) ) {
3037
+ continue;
3038
+ }
3039
+
3040
+ $map[ dirname( $active_basename ) ] = true;
3041
+ }
3042
+
3043
+ return $map;
3044
+ }
3045
+
3046
  /**
3047
  * Get collection of all active plugins. Including network activated plugins.
3048
  *
3290
  add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
3291
  add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
3292
 
3293
+ if ( self::is_plugins_page() || self::is_themes_page() ) {
3294
+ add_action( 'admin_print_footer_scripts', array( 'Freemius', '_maybe_add_beta_label_styles' ), 9 );
3295
+
3296
+ /**
3297
+ * Specifically use this hook so that the JS event handlers will work properly on the "Themes"
3298
+ * page.
3299
+ *
3300
+ * @author Leo Fajardo (@leorw)
3301
+ * @since 2.3.0
3302
+ */
3303
+ add_action( 'admin_footer-' . self::get_current_page(), array( 'Freemius', '_maybe_add_beta_label_to_plugins_and_handle_confirmation') );
3304
+ }
3305
 
3306
  self::$_statics_loaded = true;
3307
  }
3898
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
3899
 
3900
  $secure_auth = SECURE_AUTH_KEY;
3901
+ if ( empty( $secure_auth ) ||
3902
+ false !== strpos( $secure_auth, ' ' ) ||
3903
+ 'put your unique phrase here' === $secure_auth
3904
+ ) {
3905
  // Protect against default auth key.
3906
  $secure_auth = md5( microtime() );
3907
  }
4798
 
4799
  return;
4800
  } else {
4801
+ $is_network_admin = fs_is_network_admin();
4802
+
4803
+ if (
4804
+ $this->_parent->is_registered() &&
4805
+ ! $this->is_registered() &&
4806
+ /**
4807
+ * If not registered for add-on and the following conditions for the add-on are met, activate add-on account.
4808
+ * * Network active and in network admin - network activate add-on account.
4809
+ * * Network active and not in network admin - activate add-on account for the current blog.
4810
+ * * Not network active and not in network admin - activate add-on account for the current blog.
4811
+ *
4812
+ * If not registered for add-on, not network active, and in network admin, do not handle the add-on activation.
4813
+ *
4814
+ * @author Leo Fajardo (@leorw)
4815
+ * @since 2.3.0
4816
+ */
4817
+ ( $this->is_network_active() || ! $is_network_admin )
4818
+ ) {
4819
  // If parent plugin activated, automatically install add-on for the user.
4820
+ $this->_activate_addon_account(
4821
+ $this->_parent,
4822
+ ( $this->is_network_active() && $is_network_admin ) ?
4823
+ true :
4824
+ get_current_blog_id()
4825
+ );
4826
  } else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4827
  // If add-on activated and parent not, automatically install parent for the user.
4828
  $this->activate_parent_account( $this->_parent );
4928
  private function should_use_freemius_updater_and_dialog() {
4929
  return (
4930
  /**
4931
+ * Allow updater and dialog when the `fs_allow_updater_and_dialog` URL query param exists and has `true`
4932
+ * value, or when the current page is not the "Add Plugins" page (/plugin-install.php) and the `action`
4933
+ * URL query param doesn't exist or its value is not `install-plugin` so that there will be no conflicts
4934
+ * with the .org plugins' functionalities (e.g. installation from the "Add Plugins" page and viewing
4935
+ * plugin details from .org).
4936
  */
4937
+ ( true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) ||
4938
+ (
4939
+ ! self::is_plugin_install_page() &&
4940
+ // Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
4941
+ ( 'install-plugin' !== fs_request_get( 'action' ) )
4942
+ )
4943
  );
4944
  }
4945
 
5395
  'premium_suffix' => $premium_suffix,
5396
  'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
5397
  'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
5398
+ 'bundle_id' => $this->get_option( $plugin_info, 'bundle_id', null ),
5399
  ) );
5400
 
5401
  if ( $plugin->is_updated() ) {
5405
  // Set the secret key after storing the plugin, we don't want to store the key in the storage.
5406
  $this->_plugin->secret_key = $secret_key;
5407
 
5408
+ /**
5409
+ * If the product is network integrated and activated and the current view is in the network level Admin dashboard, if the product's network-level menu located differently from the sub-site level, then use the network menu details (when set).
5410
+ *
5411
+ * @author Vova Feldman
5412
+ * @since 2.4.5
5413
+ */
5414
+ if ( $this->is_network_active() && fs_is_network_admin() ) {
5415
+ if ( isset( $plugin_info['menu_network'] ) &&
5416
+ is_array( $plugin_info['menu_network'] ) &&
5417
+ ! empty( $plugin_info['menu_network'] )
5418
+ ) {
5419
+ $plugin_info['menu'] = $plugin_info['menu_network'];
5420
+ }
5421
+ }
5422
+
5423
  if ( ! isset( $plugin_info['menu'] ) ) {
5424
  $plugin_info['menu'] = array();
5425
 
6534
  }
6535
 
6536
  if ( is_multisite() ) {
6537
+ $this->switch_to_blog( $current_blog_id, fs_is_network_admin() ? $this->get_network_install() : null );
6538
 
6539
  $this->do_action( "after_{$name}_cron_multisite" );
6540
  }
6614
  */
6615
  function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
6616
  if ( $this->is_registered() ) {
6617
+ $this->sync_user_beta_mode();
6618
+
6619
  if ( $this->has_paid_plan() ) {
6620
  // Initiate background plan sync.
6621
  $this->_sync_license( true, false, $current_blog_id );
6956
  * @author Leo Fajardo (@leorw)
6957
  * @since 1.2.2
6958
  */
6959
+ if ( $this->is_theme() &&
6960
+ ! $this->has_settings_menu() &&
6961
+ ! isset( $_REQUEST['fs_action'] ) &&
6962
+ $this->can_activate_previous_theme()
6963
  ) {
6964
  if ( $this->is_only_premium() ) {
6965
  $this->activate_previous_theme();
7274
  foreach ( $plans_ids_to_keep as $plan_id ) {
7275
  $plan = self::_get_plan_by_id( $plan_id );
7276
  if ( is_object( $plan ) ) {
7277
+ $plans_to_keep[] = self::_encrypt_entity( $plan );
7278
  }
7279
  }
7280
  }
7443
  // Clear API cache on activation.
7444
  FS_Api::clear_cache();
7445
 
7446
+ $is_premium_version_activation = $this->is_plugin() ?
7447
+ ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ) :
7448
+ $this->is_premium();
7449
 
7450
  $this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
7451
 
7452
+ if ( $this->is_plugin() ) {
7453
+ // This logic is relevant only to plugins since both the free and premium versions of a plugin can be active at the same time.
7454
+ // 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
7455
+ // 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
7456
+ $other_version_basename = $is_premium_version_activation ?
7457
+ $this->_free_plugin_basename :
7458
+ $this->premium_plugin_basename();
7459
+
7460
+ if ( ! $this->_is_network_active ) {
7461
+ /**
7462
+ * Themes are always network activated, but the ACTUAL activation is per site.
7463
+ *
7464
+ * During the activation, the plugin isn't yet active, therefore,
7465
+ * _is_network_active will be set to false even if it's a network level
7466
+ * activation. So we need to fix that by looking at the is_network_admin() value.
7467
+ *
7468
+ * @author Vova Feldman
7469
+ */
7470
+ $this->_is_network_active = (
7471
+ $this->_is_multisite_integrated &&
7472
+ fs_is_network_admin()
7473
+ );
7474
+ }
7475
 
 
7476
  /**
7477
+ * If the other module version is active, deactivate it.
 
 
7478
  *
7479
+ * is_plugin_active() checks if the plugin is active on the site or the network level and
7480
+ * deactivate_plugins() deactivates the plugin whether it's activated on the site or network level.
7481
+ *
7482
+ * @author Leo Fajardo (@leorw)
7483
+ * @since 1.2.2
7484
  */
7485
+ if ( is_plugin_active( $other_version_basename ) ) {
7486
+ deactivate_plugins( $other_version_basename );
7487
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7488
  }
7489
 
7490
  if ( $this->is_registered() ) {
7534
  }
7535
  }
7536
 
7537
+ $is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
7538
+
7539
+ if ( $this->is_addon() && ! $is_trial_or_has_features_enabled_license ) {
7540
+ /**
7541
+ * When activating an add-on, try to also activate a license.
7542
+ *
7543
+ * @author Leo Fajardo (@leorw)
7544
+ * @since 2.3.0
7545
+ */
7546
+ if ( ! $this->_is_network_active ) {
7547
+ $this->maybe_activate_addon_license();
7548
+ } else {
7549
+ $this->maybe_network_activate_addon_license();
7550
+ }
7551
+
7552
+ /**
7553
+ * Avoid redirecting to the license activation screen after automatically activating an add-on license.
7554
+ *
7555
+ * @author Leo Fajardo (@leorw)
7556
+ * @since 2.3.0
7557
+ */
7558
+ $is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
7559
+
7560
+ if ( $is_trial_or_has_features_enabled_license && true === $this->_storage->require_license_activation ) {
7561
+ $this->_storage->require_license_activation = false;
7562
+ }
7563
+ }
7564
+
7565
  if (
7566
  $is_premium_version_activation &&
7567
  (
7568
  ( ! $this->is_registered() && $this->is_anonymous() ) ||
7569
  (
7570
  $this->is_registered() &&
7571
+ ! $is_trial_or_has_features_enabled_license
 
7572
  )
7573
  )
7574
  ) {
7610
  $this->_storage->was_plugin_loaded = true;
7611
  }
7612
 
7613
+ /**
7614
+ * @author Leo Fajardo (@leorw)
7615
+ * @since 2.3.0
7616
+ */
7617
+ private function maybe_activate_addon_license() {
7618
+ $parent_fs = $this->get_parent_instance();
7619
+
7620
+ if (
7621
+ ! is_object( $parent_fs ) ||
7622
+ ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() )
7623
+ ) {
7624
+ // Try to activate a license only if the parent plugin is active and has a valid `install`.
7625
+ return;
7626
+ }
7627
+
7628
+ $license = $this->get_addon_active_parent_license();
7629
+ if ( ! is_object( $license ) ) {
7630
+ return;
7631
+ }
7632
+
7633
+ if ( ! $this->is_registered() ) {
7634
+ // Opt in with a license key.
7635
+ $this->opt_in(
7636
+ $parent_fs->get_current_or_network_user()->email,
7637
+ false,
7638
+ false,
7639
+ $license->secret_key
7640
+ );
7641
+ } else {
7642
+ // Activate the license.
7643
+ $install = $this->get_api_site_scope()->call(
7644
+ '/',
7645
+ 'put',
7646
+ array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
7647
+ );
7648
+
7649
+ if ( ! FS_Api::is_api_error( $install ) ) {
7650
+ $this->_sync_addon_license( $this->get_id(), true );
7651
+ }
7652
+ }
7653
+ }
7654
+
7655
+
7656
+ /**
7657
+ * @author Leo Fajardo (@leorw)
7658
+ * @since 2.3.0
7659
+ *
7660
+ * @param FS_Plugin_License $license
7661
+ */
7662
+ private function maybe_network_activate_addon_license( $license = null ) {
7663
+ $parent_fs = $this->get_parent_instance();
7664
+ if ( ! is_object( $parent_fs ) || ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() ) ) {
7665
+ // Try to activate a license only if the parent plugin is active and has a valid `install`.
7666
+ return;
7667
+ }
7668
+
7669
+ $license = ( ! is_null( $license ) ) ?
7670
+ $license :
7671
+ $this->get_addon_active_parent_license();
7672
+
7673
+ if ( ! is_object( $license ) ) {
7674
+ return;
7675
+ }
7676
+
7677
+ if ( ! $this->is_network_registered() ) {
7678
+ $sites = $this->get_sites_for_network_level_optin();
7679
+
7680
+ if ( count( $sites ) > $license->left() ) {
7681
+ // If the add-on is network active, try to activate the license only if it can be activated on all sites.
7682
+ return;
7683
+ }
7684
+
7685
+ // Opt in with a license key.
7686
+ $this->opt_in(
7687
+ $parent_fs->get_user()->email,
7688
+ false,
7689
+ false,
7690
+ $license->secret_key,
7691
+ false,
7692
+ false,
7693
+ false,
7694
+ null,
7695
+ $sites
7696
+ );
7697
+ } else {
7698
+ $blog_2_install_map = array();
7699
+ $site_ids = array();
7700
+
7701
+ $all_sites = Freemius::get_sites();
7702
+
7703
+ foreach ( $all_sites as $site ) {
7704
+ $blog_id = Freemius::get_site_blog_id( $site );
7705
+ $install = $this->get_install_by_blog_id( $blog_id );
7706
+
7707
+ if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
7708
+ // Skip license activation for installs that are already associated with a license.
7709
+ continue;
7710
+ }
7711
+
7712
+ if ( is_object( $install ) ) {
7713
+ $blog_2_install_map[ $blog_id ] = $install;
7714
+ } else {
7715
+ $site_ids[] = $blog_id;
7716
+ }
7717
+ }
7718
+
7719
+ if ( ( count( $blog_2_install_map ) + count( $site_ids ) ) > $license->left() ) {
7720
+ return;
7721
+ }
7722
+
7723
+ $user = $this->get_current_or_network_user();
7724
+
7725
+ if ( ! empty( $blog_2_install_map ) ) {
7726
+ $result = $this->activate_license_on_many_installs( $user, $license->secret_key, $blog_2_install_map );
7727
+
7728
+ if ( true !== $result ) {
7729
+ return;
7730
+ }
7731
+ }
7732
+
7733
+ if ( ! empty( $site_ids ) ) {
7734
+ $this->activate_license_on_many_sites( $user, $license->secret_key, $site_ids );
7735
+ }
7736
+ }
7737
+ }
7738
+
7739
+ /**
7740
+ * @author Leo Fajardo (@leorw)
7741
+ * @since 2.3.0
7742
+ *
7743
+ * @return FS_Plugin_License
7744
+ */
7745
+ private function get_addon_active_parent_license() {
7746
+ $parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
7747
+ $parent_instance = $this->get_parent_instance();
7748
+
7749
+ $foreign_licenses = $parent_instance->get_foreign_licenses_info(
7750
+ self::get_all_licenses( $this->get_parent_id() )
7751
+ );
7752
+
7753
+ if ( ! empty ( $foreign_licenses ) ) {
7754
+ $foreign_licenses = array(
7755
+ // Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
7756
+ 'ids' => ( urlencode( '+' ) . implode( ',', $foreign_licenses['ids'] ) ),
7757
+ 'license_keys' => implode( ',', array_map( 'urlencode', $foreign_licenses['license_keys'] ) )
7758
+ );
7759
+
7760
+ $parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
7761
+ }
7762
+
7763
+ $result = $parent_instance->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, true );
7764
+
7765
+ if (
7766
+ ! $this->is_api_result_object( $result, 'licenses' ) ||
7767
+ ! is_array( $result->licenses ) ||
7768
+ empty( $result->licenses )
7769
+ ) {
7770
+ return null;
7771
+ }
7772
+
7773
+ $license = new FS_Plugin_License( $result->licenses[ 0 ] );
7774
+
7775
+ return $license;
7776
+ }
7777
+
7778
+ /**
7779
+ * @author Leo Fajardo (@leorw)
7780
+ * @since 2.3.0
7781
+ *
7782
+ * @return array
7783
+ */
7784
+ private function get_sites_for_network_level_optin() {
7785
+ $sites = array();
7786
+ $all_sites = self::get_sites();
7787
+
7788
+ foreach ( $all_sites as $site ) {
7789
+ $blog_id = self::get_site_blog_id( $site );
7790
+
7791
+ if ( ! $this->is_site_delegated_connection( $blog_id ) &&
7792
+ ! $this->is_installed_on_site( $blog_id )
7793
+ ) {
7794
+ $sites[] = $this->get_site_info( $site );
7795
+ }
7796
+ }
7797
+
7798
+ return $sites;
7799
+ }
7800
+
7801
  /**
7802
  * Delete account.
7803
  *
7855
 
7856
  // Clear all storage data.
7857
  $this->_storage->clear_all( true, array(
7858
+ 'is_delegated_connection',
7859
  'connectivity_test',
7860
  'is_on',
7861
  ), false );
8211
  get_current_blog_id() == $network_or_blog_id ||
8212
  ( true === $network_or_blog_id && fs_is_network_admin() )
8213
  ) {
8214
+ $this->_is_anonymous = null;
8215
  }
8216
  }
8217
 
8675
  * @author Vova Feldman (@svovaf)
8676
  * @since 1.1.2
8677
  *
8678
+ * @param string[] $override
8679
+ * @param bool $include_plugins Since 1.1.8 by default include plugin changes.
8680
+ * @param bool $include_themes Since 1.1.8 by default include plugin changes.
8681
+ * @param bool $include_blog_data Since 2.3.0 by default include the current blog's data (language, charset, title, and URL).
8682
  *
8683
  * @return array
8684
  */
8685
  private function get_install_data_for_api(
8686
  array $override,
8687
  $include_plugins = true,
8688
+ $include_themes = true,
8689
+ $include_blog_data = true
8690
  ) {
8691
  if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
8692
  /**
8714
 
8715
  $versions = $this->get_versions();
8716
 
8717
+ $blog_data = $include_blog_data ?
8718
+ array(
8719
+ 'language' => get_bloginfo( 'language' ),
8720
+ 'charset' => get_bloginfo( 'charset' ),
8721
+ 'title' => get_bloginfo( 'name' ),
8722
+ 'url' => get_site_url(),
8723
+ ) :
8724
+ array();
8725
+
8726
+ return array_merge( $versions, $blog_data, array(
8727
  'version' => $this->get_plugin_version(),
8728
  'is_premium' => $this->is_premium(),
 
 
 
 
8729
  // Special params.
8730
  'is_active' => true,
8731
  'is_disconnected' => $this->is_tracking_prohibited(),
9493
  return $this->_plugin->id;
9494
  }
9495
 
9496
+ /**
9497
+ * @author Leo Fajardo (@leorw)
9498
+ * @since 2.2.4
9499
+ *
9500
+ * @return number|null Bundle ID.
9501
+ */
9502
+ function get_bundle_id() {
9503
+ return ( isset( $this->_plugin->bundle_id ) && FS_Plugin::is_valid_id( $this->_plugin->bundle_id ) ) ?
9504
+ $this->_plugin->bundle_id :
9505
+ null;
9506
+ }
9507
+
9508
  /**
9509
  * @author Vova Feldman (@svovaf)
9510
  * @since 1.2.1.5
10248
  return false;
10249
  }
10250
 
10251
+ /**
10252
+ * @var array<number,object[]> {
10253
+ * @key number Add-on ID.
10254
+ * @val object[] The add-on's plans and prices object.
10255
+ * }
10256
+ */
10257
+ private $plans_and_pricing_by_addon_id;
10258
+
10259
+ /**
10260
+ * @author Leo Fajardo (@leorw)
10261
+ * @since 2.3.0
10262
+ *
10263
+ * @return array<number,object[]> {
10264
+ * @key number Add-on ID.
10265
+ * @val object[] The add-on's plans and prices object.
10266
+ * }
10267
+ */
10268
+ function _get_addons_plans_and_pricing_map_by_id() {
10269
+ if ( ! isset( $this->plans_and_pricing_by_addon_id ) ) {
10270
+ $result = $this->get_api_plugin_scope()->get( $this->add_show_pending( "/addons/pricing.json?type=visible" ) );
10271
+
10272
+ $plans_and_pricing_by_addon_id = array();
10273
+ if ( $this->is_api_result_object( $result, 'addons' ) ) {
10274
+ foreach ( $result->addons as $addon ) {
10275
+ $plans_and_pricing_by_addon_id[ $addon->id ] = $addon->plans;
10276
+ }
10277
+ }
10278
+
10279
+ $this->plans_and_pricing_by_addon_id = $plans_and_pricing_by_addon_id;
10280
+ }
10281
+
10282
+ return $this->plans_and_pricing_by_addon_id;
10283
+ }
10284
+
10285
+ /**
10286
+ * @author Leo Fajardo (@leorw)
10287
+ * @since 2.3.0
10288
+ *
10289
+ * @param number $addon_id
10290
+ * @param bool $is_installed
10291
+ *
10292
+ * @return array
10293
+ */
10294
+ function _get_addon_info( $addon_id, $is_installed ) {
10295
+ $addon = $this->get_addon( $addon_id );
10296
+
10297
+ if ( ! is_object( $addon ) ) {
10298
+ // Unexpected call.
10299
+ return array();
10300
+ }
10301
+
10302
+ $slug = $addon->slug;
10303
+
10304
+ $addon_storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
10305
+
10306
+ if ( ! fs_is_network_admin() ) {
10307
+ // Get blog-level activated installations.
10308
+ $sites = self::$_accounts->get_option( 'sites', array() );
10309
+ } else {
10310
+ $sites = null;
10311
+
10312
+ if ( $this->is_addon_activated( $addon_id ) &&
10313
+ $this->get_addon_instance( $addon_id )->is_network_active()
10314
+ ) {
10315
+ if ( FS_Site::is_valid_id( $addon_storage->network_install_blog_id ) ) {
10316
+ // Get network-level activated installations.
10317
+ $sites = self::$_accounts->get_option(
10318
+ 'sites',
10319
+ array(),
10320
+ $addon_storage->network_install_blog_id
10321
+ );
10322
+ }
10323
+ }
10324
+ }
10325
+
10326
+ $addon_info = array(
10327
+ 'is_connected' => false,
10328
+ 'slug' => $slug,
10329
+ 'title' => $addon->title
10330
+ );
10331
+
10332
+ if ( ! $is_installed ) {
10333
+ $plans_and_pricing_by_addon_id = $this->_get_addons_plans_and_pricing_map_by_id();
10334
+
10335
+ if ( isset( $plans_and_pricing_by_addon_id[ $addon_id ] ) ) {
10336
+ $has_paid_plan = false;
10337
+ $plans = $plans_and_pricing_by_addon_id[ $addon_id ];
10338
+
10339
+ if ( is_array( $plans ) && count( $plans ) > 0 ) {
10340
+ foreach ( $plans as $plan ) {
10341
+ if ( isset( $plan->pricing ) &&
10342
+ is_array( $plan->pricing ) &&
10343
+ count( $plan->pricing ) > 0
10344
+ ) {
10345
+ $has_paid_plan = true;
10346
+ break;
10347
+ }
10348
+ }
10349
+ }
10350
+
10351
+ $addon_info['has_paid_plan'] = $has_paid_plan;
10352
+ }
10353
+ }
10354
+
10355
+ if ( ! is_array( $sites ) || ! isset( $sites[ $slug ] ) ) {
10356
+ return $addon_info;
10357
+ }
10358
+
10359
+ $site = $sites[ $slug ];
10360
+
10361
+ $addon_info['is_connected'] = (
10362
+ ( $addon->parent_plugin_id == $this->get_id() ) &&
10363
+ is_object( $site ) &&
10364
+ FS_Site::is_valid_id( $site->id ) &&
10365
+ FS_User::is_valid_id( $site->user_id ) &&
10366
+ FS_Plugin_Plan::is_valid_id( $site->plan_id )
10367
+ );
10368
+
10369
+ if ( $addon_info['is_connected'] && $is_installed ) {
10370
+ return $addon_info;
10371
+ }
10372
+
10373
+ $addon_info['site'] = $site;
10374
+
10375
+ $plugins_data = self::$_accounts->get_option( WP_FS__MODULE_TYPE_PLUGIN . 's', array() );
10376
+ if ( isset( $plugins_data[ $slug ] ) ) {
10377
+ $plugin_data = $plugins_data[ $slug ];
10378
+
10379
+ $addon_info['version'] = $plugin_data->version;
10380
+ }
10381
+
10382
+ $all_plans = self::$_accounts->get_option( 'plans', array() );
10383
+ if ( isset( $all_plans[ $slug ] ) ) {
10384
+ $plans = $all_plans[ $slug ];
10385
+
10386
+ foreach ( $plans as $plan ) {
10387
+ if ( $site->plan_id == Freemius::_decrypt( $plan->id ) ) {
10388
+ $addon_info['plan_name'] = Freemius::_decrypt( $plan->name );
10389
+ $addon_info['plan_title'] = Freemius::_decrypt( $plan->title );
10390
+ break;
10391
+ }
10392
+ }
10393
+ }
10394
+
10395
+ $licenses = self::$_accounts->get_option( 'all_licenses', array() );
10396
+ if ( is_array( $licenses ) && isset( $licenses[ $addon_id ] ) ) {
10397
+ foreach ( $licenses[ $addon_id ] as $license ) {
10398
+ if ( $license->id == $site->license_id ) {
10399
+ $addon_info['license'] = $license;
10400
+ break;
10401
+ }
10402
+ }
10403
+ }
10404
+
10405
+ if ( isset( $addon_info['license'] ) ) {
10406
+ if ( isset( $addon_storage->subscriptions ) &&
10407
+ ! empty( $addon_storage->subscriptions )
10408
+ ) {
10409
+ foreach ( $addon_storage->subscriptions as $subscription ) {
10410
+ if ( $subscription->license_id == $site->license_id ) {
10411
+ $addon_info['subscription'] = $subscription;
10412
+ break;
10413
+ }
10414
+ }
10415
+ }
10416
+ }
10417
+
10418
+ return $addon_info;
10419
+ }
10420
+
10421
  /**
10422
  * @author Vova Feldman (@svovaf)
10423
  * @since 2.0.0
10896
  * @return number[]
10897
  */
10898
  private function get_plans_ids_associated_with_installs() {
10899
+ if ( ! is_multisite() ) {
10900
  if ( ! is_object( $this->_site ) ||
10901
  ! FS_Plugin_Plan::is_valid_id( $this->_site->plan_id )
10902
  ) {
11031
  $all_licenses = $this->get_user_licenses( $this->_user->id );
11032
  }
11033
 
11034
+ $foreign_licenses = $this->get_foreign_licenses_info( $all_licenses, $site_license_id );
 
 
 
11035
 
11036
  $all_licenses_map = array();
11037
  foreach ( $all_licenses as $license ) {
11038
  $all_licenses_map[ $license->id ] = true;
 
 
 
 
 
 
 
 
 
 
11039
  }
11040
 
11041
  $licenses = $this->_fetch_licenses( false, $site_license_id, $foreign_licenses, $blog_id );
11767
  return true;
11768
  }
11769
 
11770
+ return ( 1 === ( count( $this->_plans ) - ( $this->has_free_plan() ? 1 : 0 ) ) );
11771
  }
11772
 
11773
  /**
11891
  * @since 2.2.1
11892
  *
11893
  * @param bool $is_license_deactivation
11894
+ *
11895
+ * @return array
11896
  */
11897
+ function _get_subscription_cancellation_dialog_box_template_params( $is_license_deactivation = false ) {
11898
  if ( fs_is_network_admin() ) {
11899
  // Subscription cancellation dialog box is currently not supported for multisite networks.
11900
+ return array();
11901
  }
11902
 
11903
  $license = $this->_get_license();
11912
  $license->is_lifetime() ||
11913
  ( ! $license->is_single_site() && $license->activated > 1 )
11914
  ) {
11915
+ return array();
11916
  }
11917
 
11918
  /**
11920
  */
11921
  $subscription = $this->_get_subscription( $license->id );
11922
  if ( ! is_object( $subscription ) || ! $subscription->is_active() ) {
11923
+ return array();
11924
  }
11925
 
11926
+ return array(
11927
  'id' => $this->_module_id,
11928
  'license' => $license,
11929
  'has_trial' => $this->is_paid_trial(),
11930
  'is_license_deactivation' => $is_license_deactivation,
11931
  );
 
 
11932
  }
11933
 
11934
  /**
11993
 
11994
  // Add license activation link and AJAX request handler.
11995
  if ( self::is_plugins_page() ) {
11996
+ $is_network_admin = fs_is_network_admin();
11997
+
11998
+ if (
11999
+ ( $is_network_admin && $this->is_network_active() && ! $this->is_network_delegated_connection() ) ||
12000
+ ( ! $is_network_admin && ( ! $this->is_network_active() || $this->is_delegated_connection() ) )
12001
+ ) {
12002
+ /**
12003
+ * @since 1.2.0 Add license action link only on plugins page.
12004
+ */
12005
+ $this->_add_license_action_link();
12006
+ }
12007
  }
12008
 
12009
  // Add license activation AJAX callback.
12034
 
12035
  /**
12036
  * @author Leo Fajardo (@leorw)
12037
+ * @since 2.3.0
12038
+ */
12039
+ function _add_beta_mode_update_handler() {
12040
+ if ( ! $this->is_user_admin() ) {
12041
+ return;
12042
+ }
12043
+
12044
+ if ( ! $this->is_premium() ) {
12045
+ return;
12046
+ }
12047
+
12048
+ $this->add_ajax_action( 'set_beta_mode', array( &$this, '_set_beta_mode_ajax_handler' ) );
12049
+ }
12050
+
12051
+ /**
12052
+ * @author Leo Fajardo (@leorw)
12053
+ * @since 2.3.0
12054
+ */
12055
+ function _set_beta_mode_ajax_handler() {
12056
+ $this->_logger->entrance();
12057
+
12058
+ $this->check_ajax_referer( 'set_beta_mode' );
12059
+
12060
+ if ( ! $this->is_user_admin() ) {
12061
+ // Only for admins.
12062
+ self::shoot_ajax_failure();
12063
+ }
12064
+
12065
+ $is_beta = trim( fs_request_get( 'is_beta', '', 'post' ) );
12066
+
12067
+ if ( empty( $is_beta ) || ! in_array( $is_beta, array( 'true', 'false' ) ) ) {
12068
+ self::shoot_ajax_failure();
12069
+ }
12070
+
12071
+ $user = $this->get_api_user_scope()->call(
12072
+ '',
12073
+ 'put',
12074
+ array(
12075
+ 'plugin_id' => $this->get_id(),
12076
+ 'is_beta' => ( 'true' == $is_beta ),
12077
+ 'fields' => 'is_beta'
12078
+ )
12079
+ );
12080
+
12081
+ if ( ! $this->is_api_result_entity( $user ) ) {
12082
+ self::shoot_ajax_failure(
12083
+ FS_Api::is_api_error_object( $user ) ?
12084
+ $user->error->message :
12085
+ fs_text_inline( "An unknown error has occurred while trying to set the user's beta mode.", 'unknown-error-occurred', $this->get_slug() )
12086
+ );
12087
+ }
12088
+
12089
+ $this->_user->is_beta = $user->is_beta;
12090
+ $this->_store_user();
12091
+
12092
+ self::shoot_ajax_response( array( 'success' => true ) );
12093
+ }
12094
+
12095
+ /**
12096
+ * License activation WP AJAX handler.
12097
  *
12098
+ * @author Leo Fajardo (@leorw)
12099
  * @since 1.1.9
12100
+ *
12101
+ * @uses Freemius::activate_license()
12102
+ */
12103
+ function _activate_license_ajax_action() {
12104
+ $this->_logger->entrance();
12105
+
12106
+ $this->check_ajax_referer( 'activate_license' );
12107
+
12108
+ $license_key = trim( fs_request_get( 'license_key' ) );
12109
+
12110
+ if ( empty( $license_key ) ) {
12111
+ exit;
12112
+ }
12113
+
12114
+ $result = $this->activate_license(
12115
+ $license_key,
12116
+ fs_is_network_admin() ?
12117
+ fs_request_get( 'sites', array(), 'post' ) :
12118
+ array(),
12119
+ fs_request_get_bool( 'is_marketing_allowed', null ),
12120
+ fs_request_get( 'blog_id', null ),
12121
+ fs_request_get( 'module_id', null, 'post' )
12122
+ );
12123
+
12124
+ echo json_encode( $result );
12125
+
12126
+ exit;
12127
+ }
12128
+
12129
+ /**
12130
+ * A helper method to activate migrated licenses. If the product is network activated and integrated, the method will network activate the license.
12131
+ *
12132
+ * @author Vova Feldman (@svovaf)
12133
+ * @since 2.3.0
12134
+ *
12135
+ * @param string $license_key
12136
+ * @param null|bool $is_marketing_allowed
12137
+ * @param null|number $plugin_id
12138
+ *
12139
+ * @return array {
12140
+ * @var bool $success
12141
+ * @var string $error
12142
+ * @var string $next_page
12143
+ * }
12144
+ *
12145
+ * @uses Freemius::activate_license()
12146
+ */
12147
+ function activate_migrated_license(
12148
+ $license_key,
12149
+ $is_marketing_allowed = null,
12150
+ $plugin_id = null
12151
+ ) {
12152
+ return $this->activate_license(
12153
+ $license_key,
12154
+ $this->is_network_active() ?
12155
+ $this->get_sites_for_network_level_optin() :
12156
+ array(),
12157
+ $is_marketing_allowed,
12158
+ null,
12159
+ $plugin_id
12160
+ );
12161
+ }
12162
+
12163
+ /**
12164
+ * The implementation of this method was previously in `_activate_license_ajax_action()`.
12165
+ *
12166
+ * @author Vova Feldman (@svovaf)
12167
+ * @since 2.2.4
12168
  * @since 2.0.0 When a super-admin that hasn't connected before is network activating a license and excluding some of the sites for the license activation, go over the unselected sites in the network and if a site is not connected, skipped, nor delegated, if it's a freemium product then just skip the connection for the site, if it's a premium only product, delegate the connection and license activation to the site admin (Vova Feldman @svovaf).
12169
+ * @param string $license_key
12170
+ * @param array $sites
12171
+ * @param null|bool $is_marketing_allowed
12172
+ * @param null|int $blog_id
12173
+ * @param null|number $plugin_id
12174
+ *
12175
+ * @return array {
12176
+ * @var bool $success
12177
+ * @var string $error
12178
+ * @var string $next_page
12179
+ * }
12180
  */
12181
+ private function activate_license(
12182
+ $license_key,
12183
+ $sites = array(),
12184
+ $is_marketing_allowed = null,
12185
+ $blog_id = null,
12186
+ $plugin_id = null
12187
+ ) {
12188
  $this->_logger->entrance();
 
 
12189
 
12190
+ $license_key = trim( $license_key );
12191
 
12192
+ if ( ! fs_is_network_admin() ) {
12193
+ // If the license activation is executed outside the context of a network admin, ignore the sites collection.
12194
+ $sites = array();
12195
  }
12196
 
12197
+ $fs = ( empty($plugin_id) || $plugin_id == $this->_module_id ) ?
 
12198
  $this :
12199
  $this->get_addon_instance( $plugin_id );
12200
 
12201
  $error = false;
12202
  $next_page = false;
12203
 
 
 
 
 
 
12204
  $has_valid_blog_id = is_numeric( $blog_id );
12205
 
12206
  if ( $fs->is_registered() ) {
12290
  false,
12291
  false,
12292
  false,
12293
+ $is_marketing_allowed,
12294
  $sites
12295
  );
12296
 
12344
  }
12345
 
12346
  if ( ! empty( $pending_sites ) ) {
12347
+ if ( $this->is_freemium() && $this->is_enable_anonymous() ) {
12348
  $this->skip_connection( $pending_sites );
12349
  } else {
12350
  $this->delegate_connection( $pending_sites );
12363
  );
12364
 
12365
  if ( false !== $error ) {
12366
+ $result['error'] = $this->apply_filters( 'opt_in_error_message', $error );
12367
  } else {
12368
+ if ( $this->is_addon() || $this->has_addons() ) {
12369
+ /**
12370
+ * Purge the valid user licenses cache so that when the "Account" or the "Add-Ons" page is loaded,
12371
+ * an updated valid user licenses collection will be fetched from the server which is used to also
12372
+ * update the account add-ons (add-ons the user has licenses for).
12373
+ *
12374
+ * @author Leo Fajardo (@leorw)
12375
+ * @since 2.2.4
12376
+ */
12377
+ $this->purge_valid_user_licenses_cache();
12378
+ }
12379
+
12380
  $result['next_page'] = $next_page;
12381
  }
12382
 
12383
+ return $result;
 
 
12384
  }
12385
 
12386
  /**
12415
  $total_sites_to_delegate = count( $sites_by_action['delegate'] );
12416
 
12417
  $next_page = '';
12418
+
12419
+ $has_any_install = fs_request_get_bool( 'has_any_install' );
12420
+
12421
  if ( $total_sites === $total_sites_to_delegate &&
12422
+ ! $this->is_network_upgrade_mode() &&
12423
+ ! $has_any_install
12424
  ) {
12425
  $this->delegate_connection();
12426
  } else {
12432
  $this->skip_connection( $sites_by_action['skip'] );
12433
  }
12434
 
12435
+ if ( empty( $sites_by_action['allow'] ) ) {
12436
+ if ( $has_any_install ) {
12437
+ $first_install = $fs->find_first_install();
12438
+
12439
+ if ( ! is_null( $first_install ) ) {
12440
+ $fs->_site = $first_install['install'];
12441
+ $fs->_storage->network_install_blog_id = $first_install['blog_id'];
12442
+
12443
+ $fs->_user = self::_get_user_by_id( $fs->_site->user_id );
12444
+ $fs->_storage->network_user_id = $fs->_user->id;
12445
+ }
12446
+ }
12447
+ } else {
12448
  if ( ! $fs->is_registered() || ! $this->_is_network_active ) {
12449
  $next_page = $fs->opt_in(
12450
  false,
13031
  $params['trial'] = 'true';
13032
  }
13033
 
13034
+ $url = $this->is_addon() ?
13035
+ $this->_parent->addon_url( $this->_slug ) :
13036
+ $this->_get_admin_page_url( 'pricing', $params );
13037
 
13038
+ return $this->apply_filters( 'pricing_url', $url );
13039
  }
13040
 
13041
  /**
13044
  * @author Vova Feldman (@svovaf)
13045
  * @since 1.0.6
13046
  *
13047
+ * @param string $billing_cycle Billing cycle
13048
+ * @param bool $is_trial
13049
+ * @param array $extra (optional) Extra parameters, override other query params.
13050
+ * @param bool|null $network
13051
  *
13052
  * @return string
13053
  */
13054
  function checkout_url(
13055
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
13056
  $is_trial = false,
13057
+ $extra = array(),
13058
+ $network = null
13059
  ) {
13060
  $this->_logger->entrance();
13061
 
13073
  */
13074
  $params = array_merge( $params, $extra );
13075
 
13076
+ return $this->_get_admin_page_url( 'pricing', $params, $network );
13077
  }
13078
 
13079
  /**
13082
  * @author Vova Feldman (@svovaf)
13083
  * @since 1.1.7
13084
  *
13085
+ * @param number $addon_id
13086
+ * @param number $pricing_id
13087
+ * @param string $billing_cycle
13088
+ * @param bool $is_trial
13089
+ * @param bool|null $network
13090
  *
13091
  * @return string
13092
  */
13094
  $addon_id,
13095
  $pricing_id,
13096
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
13097
+ $is_trial = false,
13098
+ $network = null
13099
  ) {
13100
  return $this->checkout_url( $billing_cycle, $is_trial, array(
13101
  'plugin_id' => $addon_id,
13102
  'pricing_id' => $pricing_id,
13103
+ ), $network );
13104
  }
13105
 
13106
  #endregion
13640
  * @return array Active & public sites collection.
13641
  */
13642
  static function get_sites() {
13643
+ if ( ! is_multisite() ) {
13644
+ return array();
13645
+ }
13646
+
13647
  /**
13648
  * For consistency with get_blog_list() which only return active public sites.
13649
  *
13815
  * 'blog_id' => string The associated blog ID.
13816
  * }
13817
  */
13818
+ function find_first_install() {
13819
  $sites = self::get_sites();
13820
 
13821
  foreach ( $sites as $site ) {
14491
  ) );
14492
  }
14493
 
14494
+ /**
14495
+ * Add-ons URL.
14496
+ *
14497
+ * @author Vova Feldman (@svovaf)
14498
+ * @since 2.4.5
14499
+ *
14500
+ * @return string
14501
+ */
14502
+ function get_addons_url() {
14503
+ return $this->_get_admin_page_url( 'addons' );
14504
+ }
14505
+
14506
  /* Logger
14507
  ------------------------------------------------------------------------------------------------------------------*/
14508
  /**
14728
  $this->get_install_by_blog_id();
14729
 
14730
  if ( fs_is_network_admin() &&
14731
+ $this->is_network_active() &&
14732
+ ! is_object( $site ) &&
14733
+ FS_Site::is_valid_id( $this->_storage->network_install_blog_id )
14734
  ) {
14735
  $first_install = $this->find_first_install();
14736
 
14909
  return $versions;
14910
  }
14911
 
14912
+ /**
14913
+ * @author Leo Fajardo (@leorw)
14914
+ * @since 2.3.0
14915
+ *
14916
+ * @return bool
14917
+ */
14918
+ function has_beta_update() {
14919
+ return (
14920
+ ! empty( $this->_storage->beta_data ) &&
14921
+ ( true === $this->_storage->beta_data['is_beta'] ) &&
14922
+ version_compare( $this->_storage->beta_data['version'], $this->get_plugin_version(), '>' )
14923
+ );
14924
+ }
14925
+
14926
+ /**
14927
+ * @author Leo Fajardo (@leorw)
14928
+ * @since 2.3.0
14929
+ *
14930
+ * @return bool
14931
+ */
14932
+ function is_beta() {
14933
+ return (
14934
+ ! empty( $this->_storage->beta_data ) &&
14935
+ ( true === $this->_storage->beta_data['is_beta'] ) &&
14936
+ ( $this->get_plugin_version() === $this->_storage->beta_data['version'] )
14937
+ );
14938
+ }
14939
+
14940
+ /**
14941
+ * @author Leo Fajardo (@leorw)
14942
+ * @since 2.3.0
14943
+ */
14944
+ private function sync_user_beta_mode() {
14945
+ $user = $this->get_api_user_scope()->get( '/?plugin_id=' . $this->get_id() . '&fields=is_beta' );
14946
+
14947
+ if ( $this->is_api_result_entity( $user ) ) {
14948
+ $this->_user->is_beta = $user->is_beta;
14949
+ $this->_store_user();
14950
+ }
14951
+ }
14952
+
14953
  /**
14954
  * @author Vova Feldman (@svovaf)
14955
  * @since 1.1.7.4
14995
 
14996
  if ( true === $network_level_or_blog_id ) {
14997
  if ( ! isset( $override_with['sites'] ) ) {
14998
+ $params['sites'] = $this->get_sites_for_network_level_optin();
 
 
 
 
 
 
 
 
 
 
 
14999
  }
15000
  } else {
15001
  $site = is_numeric( $network_level_or_blog_id ) ?
15355
  // If Freemius was OFF before, turn it on.
15356
  $this->turn_on();
15357
 
15358
+ $this->handle_account_connection(
15359
+ $installs,
15360
+ ( ! $this->_is_network_active || ! $is_network_level_opt_in )
15361
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15362
 
15363
  if ( is_numeric( $first_install->license_id ) ) {
15364
  $this->_license = $this->_get_license_by_id( $first_install->license_id );
16003
  * @author Vova Feldman (@svovaf)
16004
  * @since 1.0.6
16005
  *
16006
+ * @param Freemius $parent_fs
16007
+ * @param bool|int|null $network_level_or_blog_id True for network level opt-in and integer for opt-in for specified blog in the network.
16008
  */
16009
+ private function _activate_addon_account( Freemius $parent_fs, $network_level_or_blog_id = null ) {
16010
  if ( $this->is_registered() ) {
16011
  // Already activated.
16012
  return;
16013
  }
16014
 
16015
+ /**
16016
+ * Do not override the `uid` if network-level opt-in since the call to `get_sites_for_network_level_optin()`
16017
+ * already returns the data for the current blog.
16018
+ *
16019
+ * @author Leo Fajardo (@leorw)
16020
+ * @since 2.3.0
16021
+ */
16022
+ $uid_param_to_override = ( true === $network_level_or_blog_id ) ?
16023
+ array() :
16024
+ array( 'uid' => $this->get_anonymous_id() );
16025
+
16026
+ $params = $this->get_install_data_for_api(
16027
+ $uid_param_to_override,
16028
+ false,
16029
+ false,
16030
+ /**
16031
+ * Do not include the data for the current blog if network-level opt-in since the call to `get_sites_for_network_level_optin`
16032
+ * already includes the data for it.
16033
+ *
16034
+ * @author Leo Fajardo (@leorw)
16035
+ * @since 2.3.0
16036
+ */
16037
+ ( true !== $network_level_or_blog_id )
16038
+ );
16039
+
16040
+ if ( true === $network_level_or_blog_id ) {
16041
+ $params['sites'] = $this->get_sites_for_network_level_optin();
16042
+
16043
+ if ( empty( $params['sites'] ) ) {
16044
+ return;
16045
+ }
16046
+ }
16047
+
16048
  // Activate add-on with parent plugin credentials.
16049
+ $result = $parent_fs->get_api_site_scope()->call(
16050
  "/addons/{$this->_plugin->id}/installs.json",
16051
  'post',
16052
+ $params
 
 
16053
  );
16054
 
16055
+ if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
16056
+ $error_message = FS_Api::is_api_error_object( $result ) ?
16057
+ $result->error->message :
16058
+ $this->get_text_inline( 'An unknown error has occurred.', 'unknown-error' );
16059
+
16060
  $this->_admin_notices->add(
16061
  sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
16062
+ $this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $error_message . '</b>',
16063
  $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
16064
  'error'
16065
  );
16067
  return;
16068
  }
16069
 
16070
+ $addon_installs = $result->installs;
16071
+ foreach ( $addon_installs as $key => $addon_install ) {
16072
+ $addon_installs[ $key ] = new FS_Site( $addon_install );
16073
+ }
16074
+
16075
+ $first_install = $addon_installs[0];
16076
+
16077
  // Get user information based on parent's plugin.
16078
  $user = $parent_fs->get_user();
16079
 
16080
  // First of all, set site and user info - otherwise we won't
16081
  // be able to invoke API calls.
16082
+ $this->_site = $first_install;
16083
  $this->_user = $user;
16084
 
16085
  // Sync add-on plans.
16086
  $this->_sync_plans();
16087
 
16088
+ $this->handle_account_connection( $addon_installs, ! fs_is_network_admin() );
16089
+
16090
+ // Get site's current plan.
16091
+ //$this->_site->plan = $this->_get_plan_by_id( $this->_site->plan->id );
16092
+
16093
+ // Sync licenses.
16094
+ $this->_sync_licenses();
16095
+
16096
+ if ( ! fs_is_network_admin() ) {
16097
+ // Try to activate premium license.
16098
+ $this->_activate_license( true );
16099
+ } else {
16100
+ $license_id = fs_request_get( 'license_id' );
16101
+
16102
+ if ( is_object( $this->_site ) &&
16103
+ FS_Plugin_License::is_valid_id( $license_id ) &&
16104
+ $license_id == $this->_site->license_id
16105
+ ) {
16106
+ // License is already activated.
16107
+ return;
16108
+ }
16109
+
16110
+ $premium_license = FS_Plugin_License::is_valid_id( $license_id ) ?
16111
+ $this->_get_license_by_id( $license_id ) :
16112
+ $this->_get_available_premium_license();
16113
+
16114
+ if ( is_object( $premium_license ) ) {
16115
+ $this->maybe_network_activate_addon_license( $premium_license );
16116
+ }
16117
+ }
16118
+ }
16119
+
16120
+ /**
16121
+ * @author Leo Fajardo (@leorw)
16122
+ * @since 2.3.0
16123
+ *
16124
+ * @param FS_Site[] $installs
16125
+ * @param bool $is_site_level
16126
+ */
16127
+ private function handle_account_connection( $installs, $is_site_level ) {
16128
+ $first_install = $installs[0];
16129
+
16130
+ if ( $is_site_level ) {
16131
+ $this->_set_account( $this->_user, $first_install );
16132
+
16133
+ $this->do_action( 'after_account_connection', $this->_user, $first_install );
16134
+ } else {
16135
+ $this->_store_user();
16136
+
16137
+ // Map site addresses to their blog IDs.
16138
+ $address_to_blog_map = $this->get_address_to_blog_map();
16139
+
16140
+ $first_blog_id = null;
16141
+ $blog_2_install_map = array();
16142
+ foreach ( $installs as $install ) {
16143
+ $address = trailingslashit( fs_strip_url_protocol( $install->url ) );
16144
+ $blog_id = $address_to_blog_map[ $address ];
16145
+
16146
+ $this->_store_site( true, $blog_id, $install );
16147
+
16148
+ if ( is_null( $first_blog_id ) ) {
16149
+ $first_blog_id = $blog_id;
16150
+ }
16151
+
16152
+ $blog_2_install_map[ $blog_id ] = $install;
16153
+ }
16154
+
16155
+ if ( ! FS_User::is_valid_id( $this->_storage->network_user_id ) ||
16156
+ ! is_object( self::_get_user_by_id( $this->_storage->network_user_id ) )
16157
+ ) {
16158
+ // Store network user.
16159
+ $this->_storage->network_user_id = $this->_user->id;
16160
+ }
16161
+
16162
+ if ( ! FS_Site::is_valid_id( $this->_storage->network_install_blog_id ) ) {
16163
+ $this->_storage->network_install_blog_id = $first_blog_id;
16164
+ }
16165
+
16166
+ if ( count( $installs ) === count( $address_to_blog_map ) ) {
16167
+ // Super admin opted in for all sites in the network.
16168
+ $this->_storage->is_network_connected = true;
16169
+ }
16170
+
16171
+ $this->_store_licenses( false );
16172
+
16173
+ self::$_accounts->store();
16174
+
16175
+ // Don't sync the installs data on network upgrade
16176
+ if ( ! $this->network_upgrade_mode_completed() ) {
16177
+ $this->send_installs_update();
16178
+ }
16179
+
16180
+ // Switch install context back to the first install.
16181
+ $this->_site = $first_install;
16182
+
16183
+ $current_blog = get_current_blog_id();
16184
+
16185
+ foreach ( $blog_2_install_map as $blog_id => $install ) {
16186
+ $this->switch_to_blog( $blog_id );
16187
 
16188
+ $this->do_action( 'after_account_connection', $this->_user, $install );
16189
+ }
16190
 
16191
+ $this->switch_to_blog( $current_blog );
 
16192
 
16193
+ $this->do_action( 'after_network_account_connection', $this->_user, $blog_2_install_map );
16194
+ }
16195
  }
16196
 
16197
  /**
16308
  ! $this->is_registered()
16309
  );
16310
 
16311
+ $should_hide_site_admin_settings = $this->apply_filters( 'should_hide_site_admin_settings_on_network_activation_mode', $should_hide_site_admin_settings );
16312
+
16313
  if ( ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) ||
16314
  $should_hide_site_admin_settings
16315
  ) {
16516
  }
16517
 
16518
  if ( ! $this->_menu->has_menu() || $this->_menu->is_top_level() ) {
16519
+
16520
+ if ( $this->_menu->has_menu() ||
16521
+ ! $this->is_addon() ||
16522
+ $this->is_activation_mode()
16523
+ ) {
16524
+ $this->_dynamically_added_top_level_page_hook_name = $this->_menu->add_page_and_update(
16525
+ $this->get_plugin_name(),
16526
+ $this->get_plugin_name(),
16527
+ 'manage_options',
16528
+ $this->_menu->has_menu() ? $this->_menu->get_slug() : $this->_slug
16529
+ );
16530
+ }
16531
  } else {
16532
  $this->_menu->add_subpage_and_update(
16533
  $this->_menu->get_parent_slug(),
16613
  );
16614
  }
16615
 
16616
+ /**
16617
+ * @author Leo Fajardo (@leorw)
16618
+ * @since 2.3.0
16619
+ *
16620
+ * @param bool $is_activation_mode
16621
+ *
16622
+ * @return bool
16623
+ */
16624
+ private function should_add_submenu_or_action_links( $is_activation_mode ) {
16625
+ if ( $this->is_addon() ) {
16626
+ // No submenu items or action links for add-ons.
16627
+ return false;
16628
+ }
16629
+
16630
+ if ( $this->is_free_wp_org_theme() && ! fs_is_network_admin() ) {
16631
+ // Also add action links or submenu items when running in a free .org theme so the tabs will be visible.
16632
+ return true;
16633
+ }
16634
+
16635
+ if ( $is_activation_mode && ! $this->is_free_wp_org_theme() ) {
16636
+ return false;
16637
+ }
16638
+
16639
+ if ( fs_is_network_admin() ) {
16640
+ /**
16641
+ * Add submenu items or action links to network level when plugin was network activated and the super
16642
+ * admin did NOT delegate the connection of all sites to site admins.
16643
+ */
16644
+ return (
16645
+ $this->_is_network_active &&
16646
+ ( WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED ||
16647
+ ! $this->is_network_delegated_connection() )
16648
+ );
16649
+ }
16650
+
16651
+ return ( ! $this->_is_network_active || $this->is_delegated_connection() );
16652
+ }
16653
+
16654
  /**
16655
  * Add default Freemius menu items.
16656
  *
16663
 
16664
  $is_activation_mode = $this->is_activation_mode();
16665
 
16666
+ $add_submenu_items = $this->should_add_submenu_or_action_links( $is_activation_mode );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16667
 
16668
  if ( $add_submenu_items ) {
16669
  if ( $this->has_affiliate_program() ) {
17714
  self::$_accounts->set_option( 'account_addons', $all_addons, $store );
17715
  }
17716
 
17717
+ /**
17718
+ * Purges the cache for the valid user licenses API call so that when the `Account` or `Add-Ons` page is loaded,
17719
+ * the valid user licenses will be fetched again and the account add-ons may be updated.
17720
+ *
17721
+ * @author Leo Fajardo (@leorw)
17722
+ * @since 2.2.4
17723
+ */
17724
+ private function purge_valid_user_licenses_cache() {
17725
+ $this->get_api_user_scope()->purge_cache( $this->get_valid_user_licenses_endpoint() );
17726
+ }
17727
+
17728
+ /**
17729
+ * @author Leo Fajardo (@leorw)
17730
+ * @since 2.3.0
17731
+ *
17732
+ * @param array $all_licenses
17733
+ * @param number|null $site_license_id
17734
+ * @param bool $include_parent_licenses
17735
+ *
17736
+ * @return array
17737
+ */
17738
+ private function get_foreign_licenses_info( $all_licenses, $site_license_id = null, $include_parent_licenses = false ) {
17739
+ $foreign_licenses = array(
17740
+ 'ids' => array(),
17741
+ 'license_keys' => array()
17742
+ );
17743
+
17744
+ $parent_license_ids_map = array();
17745
+
17746
+ foreach ( $all_licenses as $license ) {
17747
+ if ( $license->user_id == $this->_user->id || $license->id == $site_license_id ) {
17748
+ continue;
17749
+ }
17750
+
17751
+ $foreign_licenses['ids'][] = $license->id;
17752
+ $foreign_licenses['license_keys'][] = $license->secret_key;
17753
+
17754
+ if (
17755
+ $include_parent_licenses &&
17756
+ is_object( $this->_license ) &&
17757
+ FS_Plugin_License::is_valid_id( $this->_license->parent_license_id ) &&
17758
+ ! isset( $parent_license_ids_map[ $this->_license->parent_license_id ] )
17759
+ ) {
17760
+ /**
17761
+ * Include the parent license's info only if it has not been included before since child licenses
17762
+ * can have the same parent license.
17763
+ */
17764
+ $foreign_licenses['ids'][] = $this->_license->parent_license_id;
17765
+ $foreign_licenses['license_keys'][] = $license->secret_key;
17766
+
17767
+ $parent_license_ids_map[ $this->_license->parent_license_id ] = true;
17768
+ }
17769
+ }
17770
+
17771
+ if ( empty( $foreign_licenses['ids'] ) ) {
17772
+ $foreign_licenses = array();
17773
+ }
17774
+
17775
+ return $foreign_licenses;
17776
+ }
17777
+
17778
+ /**
17779
+ * @author Leo Fajardo (@leorw)
17780
+ * @since 2.3.0
17781
+ *
17782
+ * @return string
17783
+ */
17784
+ private function get_valid_user_licenses_endpoint() {
17785
+ $user_licenses_endpoint = '/licenses.json?type=active' .
17786
+ ( FS_Plugin::is_valid_id( $this->get_bundle_id() ) ? '&is_enriched=true' : '' );
17787
+
17788
+ $foreign_licenses = $this->get_foreign_licenses_info( self::get_all_licenses( $this->_module_id ), null, true );
17789
+
17790
+ if ( ! empty ( $foreign_licenses ) ) {
17791
+ $foreign_licenses = array(
17792
+ // Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
17793
+ 'ids' => ( urlencode( '+' ) . implode( ',', $foreign_licenses['ids'] ) ),
17794
+ 'license_keys' => implode( ',', array_map( 'urlencode', $foreign_licenses['license_keys'] ) )
17795
+ );
17796
+
17797
+ $user_licenses_endpoint = add_query_arg( $foreign_licenses, $user_licenses_endpoint );
17798
+ }
17799
+
17800
+ return $user_licenses_endpoint;
17801
+ }
17802
+
17803
+ /**
17804
+ * Fetches active licenses that are enriched with product type if there's a context `bundle_id` and bundle
17805
+ * licenses enriched with product IDs if there are any. From the licenses, the `get_updated_account_addons`
17806
+ * method filters out non–add-on product IDs and stores the add-on IDs.
17807
+ *
17808
+ * @author Leo Fajardo (@leorw)
17809
+ * @since 2.2.4
17810
+ *
17811
+ * @return stdClass[] array
17812
+ */
17813
+ private function fetch_valid_user_licenses() {
17814
+ $this->_logger->entrance();
17815
+
17816
+ $result = $this->get_api_user_scope()->get( $this->get_valid_user_licenses_endpoint() );
17817
+
17818
+ if ( ! $this->is_api_result_object( $result, 'licenses' ) ||
17819
+ ! is_array( $result->licenses )
17820
+ ) {
17821
+ return array();
17822
+ }
17823
+
17824
+ return $result->licenses;
17825
+ }
17826
+
17827
+ /**
17828
+ * @author Leo Fajardo (@leorw)
17829
+ * @since 2.2.4
17830
+ *
17831
+ * @return number[] Account add-on IDs.
17832
+ */
17833
+ function get_updated_account_addons() {
17834
+ $addons = $this->get_addons();
17835
+ if ( empty( $addons ) ) {
17836
+ return array();
17837
+ }
17838
+
17839
+ $account_addons = $this->get_account_addons();
17840
+ if ( ! is_array( $account_addons ) ) {
17841
+ $account_addons = array();
17842
+ }
17843
+
17844
+ $user_licenses = $this->is_registered() ?
17845
+ $this->fetch_valid_user_licenses() :
17846
+ array();
17847
+
17848
+ if ( empty( $user_licenses ) ) {
17849
+ return $account_addons;
17850
+ }
17851
+
17852
+ $addon_ids = array();
17853
+ foreach ( $addons as $addon ) {
17854
+ $addon_ids[] = $addon->id;
17855
+ }
17856
+
17857
+ $license_product_ids = array();
17858
+
17859
+ foreach ( $user_licenses as $license ) {
17860
+ if ( isset( $license->plugin_type ) && 'bundle' === $license->plugin_type ) {
17861
+ $license_product_ids = array_merge( $license_product_ids, $license->products );
17862
+ } else {
17863
+ $license_product_ids[] = $license->plugin_id;
17864
+ }
17865
+ }
17866
+
17867
+ // Filter out non–add-on IDs.
17868
+ $new_account_addons = array_intersect( $addon_ids, $license_product_ids );
17869
+ if ( count( $new_account_addons ) !== count( $account_addons ) ) {
17870
+ $this->_store_account_addons( array_unique( $new_account_addons ) );
17871
+ }
17872
+
17873
+ return $new_account_addons;
17874
+ }
17875
+
17876
  /**
17877
  * Store account params in the Database.
17878
  *
17967
  $api = $this->get_api_site_scope();
17968
 
17969
  if ( ! is_numeric( $license_id ) ) {
17970
+ $license_id = FS_Plugin_License::is_valid_id( $this->_license->parent_license_id ) ?
17971
+ $this->_license->parent_license_id :
17972
+ $this->_license->id;
17973
  }
17974
 
17975
  $result = $api->get( "/licenses/{$license_id}/subscriptions.json", true );
18076
  $plugin_id = $this->_plugin->id;
18077
  }
18078
 
18079
+ $user_licenses_endpoint = "/plugins/{$plugin_id}/licenses.json?is_enriched=true";
18080
  if ( ! empty ( $foreign_licenses ) ) {
18081
  $foreign_licenses = array(
18082
  // Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
18125
 
18126
  if ( is_numeric( $site_license_id ) ) {
18127
  // Try to retrieve a foreign license that is linked to the install.
18128
+ $api_result = $api->call( '/licenses.json?is_enriched=true' );
18129
 
18130
  if ( $this->is_api_result_object( $api_result, 'licenses' ) &&
18131
  is_array( $api_result->licenses )
18138
  } else {
18139
  $api_errors[] = $api_result;
18140
  }
18141
+ } else if (
18142
+ is_object( $this->_license ) &&
18143
+ /**
18144
+ * Sync only if the license belongs to the context plugin. `$plugin_id` can be an add-on ID while
18145
+ * the FS instance that does the syncing is the parent FS instance.
18146
+ *
18147
+ * @author Leo Fajardo (@leorw)
18148
+ * @since 2.3.0
18149
+ */
18150
+ $this->_license->plugin_id == $plugin_id
18151
+ ) {
18152
  $is_license_in_result = false;
18153
  if ( ! empty( $result ) ) {
18154
  foreach ( $result as $license ) {
18162
  if ( ! $is_license_in_result ) {
18163
  // Fetch foreign license by ID and license key.
18164
  $license = $api->get( "/licenses/{$this->_license->id}.json?license_key=" .
18165
+ urlencode( $this->_license->secret_key ) . '&is_enriched=true' );
18166
 
18167
  if ( $this->is_api_result_entity( $license ) ) {
18168
  $result[] = new FS_Plugin_License( $license );
18231
  $plugin_id = $this->_plugin->id;
18232
  }
18233
 
18234
+ $include_bundles = (
18235
+ is_object( $this->_plugin ) &&
18236
+ FS_Plugin::is_valid_id( $this->_plugin->bundle_id )
18237
+ );
18238
+
18239
+ $result = $api->get(
18240
+ "/plugins/{$plugin_id}/payments.json?include_addons=true" . ($include_bundles ? '&include_bundles=true' : ''),
18241
+ $flush
18242
+ );
18243
 
18244
  if ( ! isset( $result->error ) ) {
18245
  for ( $i = 0, $len = count( $result->payments ); $i < $len; $i ++ ) {
18309
  return false;
18310
  }
18311
 
18312
+ $plugin_version = $this->get_plugin_version();
18313
+
18314
  // Check if version is actually newer.
18315
  $has_new_version =
18316
  // If it's an non-installed add-on then always return latest.
18317
  ( $this->_is_addon_id( $plugin_id ) && ! $this->is_addon_activated( $plugin_id ) ) ||
18318
  // Compare versions.
18319
+ version_compare( $plugin_version, $latest_tag->version, '<' );
18320
 
18321
  $this->_logger->departure( $has_new_version ? 'Found newer plugin version ' . $latest_tag->version : 'No new version' );
18322
 
18323
+ $is_latest_version_beta = ( 'beta' === $latest_tag->release_mode );
18324
+
18325
+ $this->_storage->beta_data = array(
18326
+ 'is_beta' => $is_latest_version_beta,
18327
+ 'version' => $latest_tag->version
18328
+ );
18329
+
18330
  return $has_new_version ? $latest_tag : false;
18331
  }
18332
 
18537
  if ( $this->is_addon_activated( $addon_id ) ) {
18538
  // If already installed, use add-on sync.
18539
  $fs_addon = self::get_instance_by_id( $addon_id );
 
18540
 
18541
+ if (
18542
+ // Add-on is network activated and network integrated.
18543
+ $fs_addon->is_network_active() ||
18544
+ // Background sync cron.
18545
+ self::is_cron() ||
18546
+ // Add-on is not network activated or not network integrated.
18547
+ ! fs_is_network_admin()
18548
+ ) {
18549
+ $fs_addon->_sync_license( $background );
18550
+
18551
+ return;
18552
+ }
18553
  }
18554
 
18555
  // Validate add-on exists.
18678
  if ( ! self::$_global_admin_notices->has_sticky( 'api_blocked' ) ) {
18679
  self::$_global_admin_notices->add(
18680
  sprintf(
18681
+ $this->get_text_inline( 'Your server is blocking the access to Freemius\' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s', 'server-blocking-access' ),
18682
  $this->get_plugin_name(),
18683
+ '<b>' . implode( ', ', $this->apply_filters( 'api_domains', array(
18684
+ 'api.freemius.com',
18685
+ 'wp.freemius.com'
18686
+ ) ) ) . '</b>'
18687
  ) . '<br> ' . $this->get_text_inline( 'Error received from the server:', 'server-error-message' ) . var_export( $result->error, true ),
18688
  $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
18689
  'error',
18846
  $this->_store_licenses();
18847
 
18848
  $plan_change = $is_free ?
18849
+ ( $this->is_only_premium() ? 'activated' : 'upgraded' ) :
18850
  ( is_object( $new_license ) ?
18851
  'changed' :
18852
  'downgraded' );
18874
  $this->_sync_site_subscription( $this->_license );
18875
  }
18876
  }
18877
+
18878
+ if ( $this->is_addon() || $this->has_addons() ) {
18879
+ /**
18880
+ * Purge the valid user licenses cache so that when the "Account" or the "Add-Ons" page is loaded,
18881
+ * an updated valid user licenses collection will be fetched from the server which is used to also
18882
+ * update the account add-ons (add-ons the user has licenses for).
18883
+ *
18884
+ * @author Leo Fajardo (@leorw)
18885
+ * @since 2.2.4
18886
+ */
18887
+ $this->purge_valid_user_licenses_cache();
18888
+ }
18889
  }
18890
 
18891
  $hmm_text = $this->get_text_x_inline( 'Hmm', 'something somebody says when they are thinking about what you have just said.', 'hmm' ) . '...';
18919
  }
18920
  break;
18921
  case 'upgraded':
18922
+ case 'activated':
18923
  $this->_admin_notices->add_sticky(
18924
+ ( 'activated' === $plan_change ) ?
18925
+ $this->get_text_inline( 'Your plan was successfully activated.', 'plan-activated-message' ) :
18926
+ $this->get_text_inline( 'Your plan was successfully upgraded.', 'plan-upgraded-message' ) .
18927
+ $this->get_complete_upgrade_instructions(),
18928
  'plan_upgraded',
18929
  $this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
18930
  );
19039
  *
19040
  * @param bool $background
19041
  */
19042
+ protected function _activate_license( $background = false, $premium_license = null ) {
19043
  $this->_logger->entrance();
19044
 
19045
+ if ( is_null( $premium_license ) ) {
19046
+ $license_id = fs_request_get( 'license_id' );
19047
 
19048
+ if ( is_object( $this->_site ) &&
19049
+ FS_Plugin_License::is_valid_id( $license_id ) &&
19050
+ $license_id == $this->_site->license_id
19051
+ ) {
19052
+ // License is already activated.
19053
+ return;
19054
+ }
19055
 
19056
+ $premium_license = FS_Plugin_License::is_valid_id( $license_id ) ?
19057
+ $this->_get_license_by_id( $license_id ) :
19058
+ $this->_get_available_premium_license();
19059
+ }
19060
 
19061
  if ( ! is_object( $premium_license ) ) {
19062
  return;
19105
  }
19106
 
19107
  $api = $this->get_api_site_scope();
19108
+ $license = $api->call( "/licenses/{$premium_license->id}.json?is_enriched=true", 'put', $api_request_params );
19109
 
19110
  if ( ! $this->is_api_result_entity( $license ) ) {
19111
  if ( ! $background ) {
19139
 
19140
  $this->_store_account();
19141
 
19142
+ if ( $this->is_addon() || $this->has_addons() ) {
19143
+ /**
19144
+ * Purge the valid user licenses cache so that when the "Account" or the "Add-Ons" page is loaded,
19145
+ * an updated valid user licenses collection will be fetched from the server which is used to also
19146
+ * update the account add-ons (add-ons the user has licenses for).
19147
+ *
19148
+ * @author Leo Fajardo (@leorw)
19149
+ * @since 2.2.4
19150
+ */
19151
+ $this->purge_valid_user_licenses_cache();
19152
+ }
19153
+
19154
  if ( ! $background ) {
19155
  $this->_admin_notices->add_sticky(
19156
  $this->get_text_inline( 'Your license was successfully activated.', 'license-activated-message' ) .
19553
 
19554
  if ( $this->has_secret_key() ) {
19555
  $endpoint = add_query_arg( 'type', 'all', $endpoint );
19556
+ } else if ( $this->is_registered() && $this->_user->is_beta() ) {
19557
+ $endpoint = add_query_arg( 'type', 'beta', $endpoint );
19558
  }
19559
 
19560
  return $endpoint;
19711
  function _get_invoice_api_url( $payment_id = false ) {
19712
  $this->_logger->entrance();
19713
 
19714
+ $url = $this->get_api_user_scope()->get_signed_url(
19715
  "/payments/{$payment_id}/invoice.pdf"
19716
  );
19717
+
19718
+ if ( ! fs_starts_with( $url, 'https://' ) ) {
19719
+ // Always use HTTPS for invoices.
19720
+ $url = 'https' . substr( $url, 4 );
19721
+ }
19722
+
19723
+ return $url;
19724
  }
19725
 
19726
  /**
19766
  $this->get_parent_instance() :
19767
  $this;
19768
 
19769
+ return $this->apply_filters( 'download_latest_url', $fs->get_account_url( 'download_latest', $params ) );
19770
  }
19771
 
19772
  #endregion Download Plugin ------------------------------------------------------------------
19855
  if ( ! $flush && $api->is_cached( $path ) ) {
19856
  $addons = self::get_all_addons();
19857
 
19858
+ return isset( $addons[ $this->_plugin->id ] ) ?
19859
+ $addons[ $this->_plugin->id ] :
19860
+ array();
19861
  }
19862
 
19863
  $result = $api->get( $path, $flush );
20093
  if ( ! isset( $result->error ) ) {
20094
  $this->_admin_notices->add( sprintf(
20095
  $this->get_text_inline( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.', 'verification-email-sent-message' ),
20096
+ sprintf( '<a href="mailto:%1$s">%2$s</a>', esc_url( $this->_user->email ), $this->_user->email )
20097
  ) );
20098
  } else {
20099
  // handle different error cases.
20158
  ) {
20159
  $first_time_path = '';
20160
  } else {
20161
+ $first_time_path = $this->_menu->get_first_time_path(
20162
+ fs_is_network_admin() && $this->_is_network_active
20163
+ );
20164
  }
20165
 
20166
  if ( $this->_is_network_active &&
20805
  $user->id,
20806
  $user->public_key,
20807
  ! $this->is_live(),
20808
+ $user->secret_key,
20809
+ $this->get_sdk_version()
20810
  );
20811
  }
20812
 
20834
  $user->id,
20835
  $user->public_key,
20836
  ! $this->is_live(),
20837
+ $user->secret_key,
20838
+ $this->get_sdk_version()
20839
  );
20840
 
20841
  return $this->_user_api;
20860
  $this->_site->id,
20861
  $this->_site->public_key,
20862
  ! $this->is_live(),
20863
+ $this->_site->secret_key,
20864
+ $this->get_sdk_version()
20865
  );
20866
  }
20867
 
20885
  'plugin',
20886
  $this->_plugin->id,
20887
  $this->_plugin->public_key,
20888
+ ! $this->is_live(),
20889
+ false,
20890
+ $this->get_sdk_version()
20891
  );
20892
  }
20893
 
20927
  $plans = array( $plans );
20928
  }
20929
 
20930
+ if ( ! $this->is_array_instanceof( $plans, 'FS_Plugin_Plan' ) ) {
20931
+ $plans = array();
20932
+ }
20933
+
20934
  $this->_storage->has_trial_plan = FS_Plan_Manager::instance()->has_trial_plan( $plans );
20935
  }
20936
 
21308
  function _add_upgrade_action_link() {
21309
  $this->_logger->entrance();
21310
 
21311
+ $is_activation_mode = $this->is_activation_mode();
21312
+
21313
+ $add_action_links = $this->should_add_submenu_or_action_links( $is_activation_mode );
21314
+
21315
+ /**
21316
+ * The following logic is based on the logic in `add_submenu_items()` method that decides when the "Upgrade"
21317
+ * and "Add-Ons" menus should be added.
21318
+ *
21319
+ * @author Leo Fajardo (@leorw)
21320
+ * @since 2.3.0
21321
+ */
21322
+ $add_upgrade_link = (
21323
+ $add_action_links ||
21324
+ ( $is_activation_mode && $this->is_only_premium() )
21325
+ ) && ! WP_FS__DEMO_MODE;
21326
+
21327
+ $add_addons_link = ( $add_action_links && $this->has_addons() );
21328
+
21329
+ if ( ! $add_upgrade_link && ! $add_addons_link ) {
21330
+ return;
21331
+ }
21332
+
21333
+ if (
21334
+ $add_upgrade_link &&
21335
+ $this->is_pricing_page_visible() &&
21336
+ $this->is_submenu_item_visible( 'pricing' )
21337
+ ) {
21338
  $this->add_plugin_action_link(
21339
  $this->get_text_inline( 'Upgrade', 'upgrade' ),
21340
  $this->get_upgrade_url(),
21344
  );
21345
  }
21346
 
21347
+ if (
21348
+ $add_addons_link &&
21349
+ $this->has_addons() &&
21350
+ $this->is_submenu_item_visible( 'addons' )
21351
+ ) {
21352
  $this->add_plugin_action_link(
21353
  $this->get_text_inline( 'Add-Ons', 'add-ons' ),
21354
  $this->_get_admin_page_url( 'addons' ),
21399
  }
21400
 
21401
  /**
21402
+ * Adds "Opt In" or "Opt Out" link to the main "Plugins" page link actions collection.
21403
  *
21404
  * @author Leo Fajardo (@leorw)
21405
  * @since 1.2.1.5
21411
 
21412
  $this->_logger->entrance();
21413
 
21414
+ if ( fs_is_network_admin() ) {
21415
+ if ( ! $this->_is_network_active ) {
21416
+ // Don't add tracking links when browsing the network WP Admin and the plugin is not network active.
21417
+ return;
21418
+ } else if ( $this->is_network_delegated_connection() ) {
21419
+ // Don't add tracking links when browsing the network WP Admin and the activation has been delegated to site admins.
21420
+ return;
21421
+ }
21422
+ } else {
21423
+ if ( $this->_is_network_active && ! $this->is_delegated_connection() ) {
21424
+ // Don't add tracking links when browsing the sub-site WP Admin, the plugin is network active, and the connection was not delegated.
21425
+ return;
21426
+ }
21427
  }
21428
 
21429
  if ( fs_request_is_action_secure( $this->get_unique_affix() . '_reconnect' ) ) {
21441
  return;
21442
  }
21443
 
21444
+ if ( $this->is_registered() && $this->is_tracking_allowed() ) {
21445
+ if ( ! $this->is_enable_anonymous() ) {
21446
+ // If opted in and tracking is allowed, don't allow to opt out if anonymous mode is disabled.
21447
+ return;
21448
+ }
21449
 
21450
+ if ( ! $this->is_free_plan() ) {
21451
+ // Don't allow to opt out if running in paid plan.
21452
+ return;
21453
+ }
21454
  }
21455
 
21456
  if ( $this->add_ajax_action( 'stop_tracking', array( &$this, '_stop_tracking_callback' ) ) ) {
21461
  return;
21462
  }
21463
 
21464
+ $link_text_id = '';
21465
+ $url = '#';
21466
 
21467
  if ( $this->is_registered() ) {
21468
  if ( $this->is_tracking_allowed() ) {
21472
  }
21473
 
21474
  add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
21475
+ } else if ( $this->is_anonymous() || $this->is_activation_mode() ) {
21476
+ /**
21477
+ * Show opt-in link only if skipped or in activation mode.
21478
+ */
21479
  $link_text_id = $this->get_text_inline( 'Opt In', 'opt-in' );
21480
 
21481
  $params = ! $this->is_anonymous() ?
21488
  $url = $this->get_activation_url( $params );
21489
  }
21490
 
21491
+ if ( ! empty( $link_text_id ) && $this->is_plugin() && self::is_plugins_page() ) {
21492
  $this->add_plugin_action_link(
21493
  $link_text_id,
21494
  $url,
21511
  $url = false;
21512
 
21513
  if ( ! $this->is_addon() || ! $this->has_free_plan() ) {
21514
+ $first_time_path = $this->_menu->get_first_time_path(
21515
+ fs_is_network_admin() && $this->_is_network_active
21516
+ );
21517
 
21518
  if ( $this->is_activation_mode() ) {
21519
  $url = $this->get_activation_url();
21701
  $premium_plugin_basename = $this->premium_plugin_basename();
21702
 
21703
  return sprintf(
21704
+ /* translators: %1$s: Product title; %2$s: Plan title */
21705
+ $this->get_text_inline( ' The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s', 'activate-premium-version' ),
21706
  sprintf( '<em>%s</em>', esc_html( $this->get_plugin_title() ) ),
21707
  $plan_title,
21708
  sprintf(
21732
  ) ),
21733
  $deactivation_step,
21734
  $this->get_text_inline( 'Upload and activate the downloaded version', 'upload-and-activate' ),
21735
+ $this->apply_filters( 'upload_and_install_video_url', '//bit.ly/upload-wp-' . $this->_module_type . 's' ),
21736
  $this->get_text_inline( 'How to upload and activate?', 'howto-upload-activate' )
21737
  );
21738
  }
22715
  'plugin',
22716
  $user_plugin->id,
22717
  $user_plugin->public_key,
22718
+ ! $user_plugin->is_live,
22719
+ false,
22720
+ $this->get_sdk_version()
22721
  );
22722
 
22723
  $addons_result = $plugin_api->get( '/addons.json?enriched=true', true );
22807
  '%s %s %s',
22808
  $thank_you,
22809
  $already_opted_in,
22810
+ sprintf( $this->get_text_inline( 'Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard :-)', 'due-to-gdpr-compliance-requirements' ), '<a href="https://eugdpr.org/" target="_blank" rel="noopener noreferrer">', '</a>' ) .
22811
  '<br><br>' .
22812
  '<b>' . $this->get_text_inline( "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:", 'contact-for-updates' ) . '</b>' .
22813
  $actions .
vendor/freemius/includes/class-fs-api.php CHANGED
@@ -56,23 +56,40 @@
56
  */
57
  private $_logger;
58
 
59
- /**
 
 
 
 
 
 
 
 
60
  * @param string $slug
61
  * @param string $scope 'app', 'developer', 'user' or 'install'.
62
  * @param number $id Element's id.
63
  * @param string $public_key Public key.
64
  * @param bool $is_sandbox
65
  * @param bool|string $secret_key Element's secret key.
 
66
  *
67
  * @return FS_Api
68
  */
69
- static function instance( $slug, $scope, $id, $public_key, $is_sandbox, $secret_key = false ) {
 
 
 
 
 
 
 
 
70
  $identifier = md5( $slug . $scope . $id . $public_key . ( is_string( $secret_key ) ? $secret_key : '' ) . json_encode( $is_sandbox ) );
71
 
72
  if ( ! isset( self::$_instances[ $identifier ] ) ) {
73
  self::_init();
74
 
75
- self::$_instances[ $identifier ] = new FS_Api( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox );
76
  }
77
 
78
  return self::$_instances[ $identifier ];
@@ -105,12 +122,22 @@
105
  * @param string $public_key Public key.
106
  * @param bool|string $secret_key Element's secret key.
107
  * @param bool $is_sandbox
 
108
  */
109
- private function __construct( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox ) {
 
 
 
 
 
 
 
 
110
  $this->_api = new Freemius_Api_WordPress( $scope, $id, $public_key, $secret_key, $is_sandbox );
111
 
112
- $this->_slug = $slug;
113
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug . '_api', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
 
114
  }
115
 
116
  /**
@@ -154,39 +181,51 @@
154
  * @return array|mixed|string|void
155
  */
156
  private function _call( $path, $method = 'GET', $params = array(), $retry = false ) {
157
- $this->_logger->entrance( $method . ':' . $path );
158
-
159
- if ( self::is_temporary_down() ) {
160
- $result = $this->get_temporary_unavailable_error();
161
- } else {
162
- $result = $this->_api->Api( $path, $method, $params );
163
-
164
- if ( null !== $result &&
165
- isset( $result->error ) &&
166
- isset( $result->error->code ) &&
167
- 'request_expired' === $result->error->code
168
- ) {
169
- if ( ! $retry ) {
170
- $diff = isset( $result->error->timestamp ) ?
171
- ( time() - strtotime( $result->error->timestamp ) ) :
172
- false;
173
-
174
- // Try to sync clock diff.
175
- if ( false !== $this->_sync_clock_diff( $diff ) ) {
176
- // Retry call with new synced clock.
177
- return $this->_call( $path, $method, $params, true );
178
- }
179
- }
180
- }
181
- }
 
 
 
 
 
 
 
 
 
 
 
 
182
 
183
- if ( $this->_logger->is_on() && self::is_api_error( $result ) ) {
184
- // Log API errors.
185
- $this->_logger->api_error( $result );
186
- }
187
 
188
- return $result;
189
- }
190
 
191
  /**
192
  * Override API call to wrap it in servers' clock sync method.
@@ -253,7 +292,7 @@
253
  * If the response code is 404, cache the result for half of the `$expiration`.
254
  *
255
  * @author Leo Fajardo (@leorw)
256
- * @since 2.2.3.1
257
  */
258
  $expiration /= 2;
259
  } else {
56
  */
57
  private $_logger;
58
 
59
+ /**
60
+ * @author Leo Fajardo (@leorw)
61
+ * @since 2.3.0
62
+ *
63
+ * @var string
64
+ */
65
+ private $_sdk_version;
66
+
67
+ /**
68
  * @param string $slug
69
  * @param string $scope 'app', 'developer', 'user' or 'install'.
70
  * @param number $id Element's id.
71
  * @param string $public_key Public key.
72
  * @param bool $is_sandbox
73
  * @param bool|string $secret_key Element's secret key.
74
+ * @param null|string $sdk_version
75
  *
76
  * @return FS_Api
77
  */
78
+ static function instance(
79
+ $slug,
80
+ $scope,
81
+ $id,
82
+ $public_key,
83
+ $is_sandbox,
84
+ $secret_key = false,
85
+ $sdk_version = null
86
+ ) {
87
  $identifier = md5( $slug . $scope . $id . $public_key . ( is_string( $secret_key ) ? $secret_key : '' ) . json_encode( $is_sandbox ) );
88
 
89
  if ( ! isset( self::$_instances[ $identifier ] ) ) {
90
  self::_init();
91
 
92
+ self::$_instances[ $identifier ] = new FS_Api( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox, $sdk_version );
93
  }
94
 
95
  return self::$_instances[ $identifier ];
122
  * @param string $public_key Public key.
123
  * @param bool|string $secret_key Element's secret key.
124
  * @param bool $is_sandbox
125
+ * @param null|string $sdk_version
126
  */
127
+ private function __construct(
128
+ $slug,
129
+ $scope,
130
+ $id,
131
+ $public_key,
132
+ $secret_key,
133
+ $is_sandbox,
134
+ $sdk_version
135
+ ) {
136
  $this->_api = new Freemius_Api_WordPress( $scope, $id, $public_key, $secret_key, $is_sandbox );
137
 
138
+ $this->_slug = $slug;
139
+ $this->_sdk_version = $sdk_version;
140
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug . '_api', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
141
  }
142
 
143
  /**
181
  * @return array|mixed|string|void
182
  */
183
  private function _call( $path, $method = 'GET', $params = array(), $retry = false ) {
184
+ $this->_logger->entrance( $method . ':' . $path );
185
+
186
+ if ( self::is_temporary_down() ) {
187
+ $result = $this->get_temporary_unavailable_error();
188
+ } else {
189
+ /**
190
+ * @since 2.3.0 Include the SDK version with all API requests that going through the API manager. IMPORTANT: Only pass the SDK version if the caller didn't include it yet.
191
+ */
192
+ if ( ! empty( $this->_sdk_version ) ) {
193
+ if ( false === strpos( $path, 'sdk_version=' ) &&
194
+ ! isset( $params['sdk_version'] )
195
+ ) {
196
+ // Always add the sdk_version param in the querystring. DO NOT INCLUDE IT IN THE BODY PARAMS, OTHERWISE, IT MAY LEAD TO AN UNEXPECTED PARAMS PARSING IN CASES WHERE THE $params IS A REGULAR NON-ASSOCIATIVE ARRAY.
197
+ $path = add_query_arg( 'sdk_version', $this->_sdk_version, $path );
198
+ }
199
+ }
200
+
201
+ $result = $this->_api->Api( $path, $method, $params );
202
+
203
+ if ( null !== $result &&
204
+ isset( $result->error ) &&
205
+ isset( $result->error->code ) &&
206
+ 'request_expired' === $result->error->code
207
+ ) {
208
+ if ( ! $retry ) {
209
+ $diff = isset( $result->error->timestamp ) ?
210
+ ( time() - strtotime( $result->error->timestamp ) ) :
211
+ false;
212
+
213
+ // Try to sync clock diff.
214
+ if ( false !== $this->_sync_clock_diff( $diff ) ) {
215
+ // Retry call with new synced clock.
216
+ return $this->_call( $path, $method, $params, true );
217
+ }
218
+ }
219
+ }
220
+ }
221
 
222
+ if ( $this->_logger->is_on() && self::is_api_error( $result ) ) {
223
+ // Log API errors.
224
+ $this->_logger->api_error( $result );
225
+ }
226
 
227
+ return $result;
228
+ }
229
 
230
  /**
231
  * Override API call to wrap it in servers' clock sync method.
292
  * If the response code is 404, cache the result for half of the `$expiration`.
293
  *
294
  * @author Leo Fajardo (@leorw)
295
+ * @since 2.2.4
296
  */
297
  $expiration /= 2;
298
  } else {
vendor/freemius/includes/class-fs-plugin-updater.php CHANGED
@@ -164,32 +164,71 @@
164
 
165
  $contents = ob_get_clean();
166
 
167
- /**
168
- * Replace the plugin information dialog's "Install Update Now" button's text and URL. If there's a license,
169
- * the text will be "Renew license" and will link to the checkout page with the license's billing cycle
170
- * and quota. If there's no license, the text will be "Buy license" and will link to the pricing page.
171
- */
172
- $contents = preg_replace(
173
- '/(.+\<a.+)(id="plugin_update_from_iframe")(.+href=")([^\s]+)(".+\>)(.+)(\<\/a.+)/is',
174
- is_object( $license ) ?
175
- sprintf(
176
- '$1$3%s$5%s$7',
177
- $this->_fs->checkout_url(
178
- is_object( $subscription ) ?
179
- ( 1 == $subscription->billing_cycle ? WP_FS__PERIOD_MONTHLY : WP_FS__PERIOD_ANNUALLY ) :
180
- WP_FS__PERIOD_LIFETIME,
181
- false,
182
- array( 'licenses' => $license->quota )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  ),
184
- fs_text_inline( 'Renew license', 'renew-license', $this->_fs->get_slug() )
185
- ) :
186
- sprintf(
187
- '$1$3%s$5%s$7',
188
- $this->_fs->pricing_url(),
189
- fs_text_inline( 'Buy license', 'buy-license', $this->_fs->get_slug() )
190
- ),
191
- $contents
192
- );
 
 
 
 
 
 
 
 
 
 
 
 
193
 
194
  echo $contents;
195
  }
@@ -257,7 +296,40 @@
257
 
258
  $r = $current->response[ $file ];
259
 
260
- if ( ! $this->_fs->has_any_active_valid_license() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  /**
262
  * Turn the "new version" text into a link that opens the plugin information dialog when clicked and
263
  * make the "View version x details" text link to the checkout page instead of opening the plugin
@@ -267,6 +339,8 @@
267
  * There is a new version of Awesome Plugin available. <a href="...>View version x.y.z details</a> or <a href="...>update now</a>.
268
  * Output:
269
  * There is a <a href="...>new version</a> of Awesome Plugin available. <a href="...>Buy a license now</a> to access version x.y.z security & feature updates, and support.
 
 
270
  *
271
  * @author Leo Fajardo (@leorw)
272
  */
@@ -279,7 +353,9 @@
279
  sprintf(
280
  '<a href="$4"%s>%s</a>',
281
  '$5',
282
- fs_text_inline( 'new version', 'new-version', $this->_fs->get_slug() )
 
 
283
  ),
284
  $this->_fs->get_plugin_title()
285
  ) .
@@ -299,7 +375,7 @@
299
  $slug = $this->_fs->get_slug();
300
 
301
  $upgrade_notice_html = sprintf(
302
- '<p class="notice fs-upgrade-notice fs-slug-%1s fs-type-%2s" data-slug="%1s" data-type="%2s"><strong>%3s</strong> %4s</p>',
303
  $slug,
304
  $this->_fs->get_module_type(),
305
  fs_text_inline( 'Important Upgrade Notice:', 'upgrade_notice', $slug ),
@@ -422,7 +498,7 @@
422
 
423
  $this->_update_details = false;
424
 
425
- if ( is_object( $new_version ) ) {
426
  $this->_logger->log( 'Found newer plugin version ' . $new_version->version );
427
 
428
  /**
@@ -437,10 +513,22 @@
437
  }
438
 
439
  if ( is_object( $this->_update_details ) ) {
 
 
 
 
440
  // Add plugin to transient data.
441
- $transient_data->response[ $this->_fs->get_plugin_basename() ] = $this->_fs->is_plugin() ?
442
  $this->_update_details :
443
  (array) $this->_update_details;
 
 
 
 
 
 
 
 
444
  }
445
 
446
  $slug = $this->_fs->get_slug();
@@ -532,6 +620,25 @@
532
  return $update;
533
  }
534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  /**
536
  * Update the updates transient with the module's update information.
537
  *
@@ -550,6 +657,10 @@
550
  function set_update_data( FS_Plugin_Tag $new_version ) {
551
  $this->_logger->entrance();
552
 
 
 
 
 
553
  $transient_key = "update_{$this->_fs->get_module_type()}s";
554
 
555
  $transient_data = get_site_transient( $transient_key );
@@ -834,8 +945,9 @@
834
  return $data;
835
  }
836
 
837
- $addon = false;
838
- $is_addon = false;
 
839
 
840
  if ( $this->_fs->get_slug() !== $args->slug ) {
841
  $addon = $this->_fs->get_addon_by_slug( $args->slug );
@@ -844,6 +956,20 @@
844
  return $data;
845
  }
846
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
847
  $is_addon = true;
848
  }
849
 
@@ -874,7 +1000,9 @@ if ( !isset($info->error) ) {
874
  }*/
875
  }
876
 
877
- $plugin_version = $this->_fs->get_plugin_version();
 
 
878
 
879
  // Get plugin's newest update.
880
  $new_version = $this->get_latest_download_details( $is_addon ? $addon->id : false, $plugin_version );
@@ -1002,8 +1130,8 @@ if ( !isset($info->error) ) {
1002
 
1003
  $active_plugins_basenames = get_option( 'active_plugins' );
1004
 
1005
- for ( $i = 0, $len = count( $active_plugins_basenames ); $i < $len; $i ++ ) {
1006
- if ( $basename === $active_plugins_basenames[ $i ] ) {
1007
  // Get filename including extension.
1008
  $filename = basename( $basename );
1009
 
@@ -1015,7 +1143,7 @@ if ( !isset($info->error) ) {
1015
  // Verify that the expected correct path exists.
1016
  if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $new_basename ) ) ) {
1017
  // Override active plugin name.
1018
- $active_plugins_basenames[ $i ] = $new_basename;
1019
  update_option( 'active_plugins', $active_plugins_basenames );
1020
  }
1021
 
164
 
165
  $contents = ob_get_clean();
166
 
167
+ $update_button_id_attribute_pos = strpos( $contents, 'id="plugin_update_from_iframe"' );
168
+
169
+ if ( false !== $update_button_id_attribute_pos ) {
170
+ $update_button_start_pos = strrpos(
171
+ substr( $contents, 0, $update_button_id_attribute_pos ),
172
+ '<a'
173
+ );
174
+
175
+ $update_button_end_pos = ( strpos( $contents, '</a>', $update_button_id_attribute_pos ) + strlen( '</a>' ) );
176
+
177
+ /**
178
+ * The part of the contents without the update button.
179
+ *
180
+ * @author Leo Fajardo (@leorw)
181
+ * @since 2.2.5
182
+ */
183
+ $modified_contents = substr( $contents, 0, $update_button_start_pos );
184
+
185
+ $update_button = substr( $contents, $update_button_start_pos, ( $update_button_end_pos - $update_button_start_pos ) );
186
+
187
+ /**
188
+ * Replace the plugin information dialog's "Install Update Now" button's text and URL. If there's a license,
189
+ * the text will be "Renew license" and will link to the checkout page with the license's billing cycle
190
+ * and quota. If there's no license, the text will be "Buy license" and will link to the pricing page.
191
+ */
192
+ $update_button = preg_replace(
193
+ '/(\<a.+)(id="plugin_update_from_iframe")(.+href=")([^\s]+)(".*\>)(.+)(\<\/a>)/is',
194
+ is_object( $license ) ?
195
+ sprintf(
196
+ '$1$3%s$5%s$7',
197
+ $this->_fs->checkout_url(
198
+ is_object( $subscription ) ?
199
+ ( 1 == $subscription->billing_cycle ? WP_FS__PERIOD_MONTHLY : WP_FS__PERIOD_ANNUALLY ) :
200
+ WP_FS__PERIOD_LIFETIME,
201
+ false,
202
+ array( 'licenses' => $license->quota )
203
+ ),
204
+ fs_text_inline( 'Renew license', 'renew-license', $this->_fs->get_slug() )
205
+ ) :
206
+ sprintf(
207
+ '$1$3%s$5%s$7',
208
+ $this->_fs->pricing_url(),
209
+ fs_text_inline( 'Buy license', 'buy-license', $this->_fs->get_slug() )
210
  ),
211
+ $update_button
212
+ );
213
+
214
+ /**
215
+ * Append the modified button.
216
+ *
217
+ * @author Leo Fajardo (@leorw)
218
+ * @since 2.2.5
219
+ */
220
+ $modified_contents .= $update_button;
221
+
222
+ /**
223
+ * Append the remaining part of the contents after the update button.
224
+ *
225
+ * @author Leo Fajardo (@leorw)
226
+ * @since 2.2.5
227
+ */
228
+ $modified_contents .= substr( $contents, $update_button_end_pos );
229
+
230
+ $contents = $modified_contents;
231
+ }
232
 
233
  echo $contents;
234
  }
296
 
297
  $r = $current->response[ $file ];
298
 
299
+ $has_beta_update = $this->_fs->has_beta_update();
300
+
301
+ if ( $this->_fs->has_any_active_valid_license() ) {
302
+ if ( $has_beta_update ) {
303
+ /**
304
+ * Turn the "new version" text into "new Beta version".
305
+ *
306
+ * Sample input:
307
+ * There is a new version of Awesome Plugin available. <a href="...>View version x.y.z details</a> or <a href="...>update now</a>.
308
+ * Output:
309
+ * There is a new Beta version of Awesome Plugin available. <a href="...>View version x.y.z details</a> or <a href="...>update now</a>.
310
+ *
311
+ * @author Leo Fajardo (@leorw)
312
+ * @since 2.3.0
313
+ */
314
+ $plugin_update_row = preg_replace(
315
+ '/(\<div.+>)(.+)(\<a.+href="([^\s]+)"([^\<]+)\>.+\<a.+)(\<\/div\>)/is',
316
+ (
317
+ '$1' .
318
+ sprintf(
319
+ fs_text_inline( 'There is a %s of %s available.', 'new-version-available', $this->_fs->get_slug() ),
320
+ $has_beta_update ?
321
+ fs_text_inline( 'new Beta version', 'new-beta-version', $this->_fs->get_slug() ) :
322
+ fs_text_inline( 'new version', 'new-version', $this->_fs->get_slug() ),
323
+ $this->_fs->get_plugin_title()
324
+ ) .
325
+ ' ' .
326
+ '$3' .
327
+ '$6'
328
+ ),
329
+ $plugin_update_row
330
+ );
331
+ }
332
+ } else {
333
  /**
334
  * Turn the "new version" text into a link that opens the plugin information dialog when clicked and
335
  * make the "View version x details" text link to the checkout page instead of opening the plugin
339
  * There is a new version of Awesome Plugin available. <a href="...>View version x.y.z details</a> or <a href="...>update now</a>.
340
  * Output:
341
  * There is a <a href="...>new version</a> of Awesome Plugin available. <a href="...>Buy a license now</a> to access version x.y.z security & feature updates, and support.
342
+ * OR
343
+ * There is a <a href="...>new Beta version</a> of Awesome Plugin available. <a href="...>Buy a license now</a> to access version x.y.z security & feature updates, and support.
344
  *
345
  * @author Leo Fajardo (@leorw)
346
  */
353
  sprintf(
354
  '<a href="$4"%s>%s</a>',
355
  '$5',
356
+ $has_beta_update ?
357
+ fs_text_inline( 'new Beta version', 'new-beta-version', $this->_fs->get_slug() ) :
358
+ fs_text_inline( 'new version', 'new-version', $this->_fs->get_slug() )
359
  ),
360
  $this->_fs->get_plugin_title()
361
  ) .
375
  $slug = $this->_fs->get_slug();
376
 
377
  $upgrade_notice_html = sprintf(
378
+ '<p class="notice fs-upgrade-notice fs-slug-%1$s fs-type-%2$s" data-slug="%1$s" data-type="%2$s"><strong>%3$s</strong> %4$s</p>',
379
  $slug,
380
  $this->_fs->get_module_type(),
381
  fs_text_inline( 'Important Upgrade Notice:', 'upgrade_notice', $slug ),
498
 
499
  $this->_update_details = false;
500
 
501
+ if ( is_object( $new_version ) && $this->is_new_version_premium( $new_version ) ) {
502
  $this->_logger->log( 'Found newer plugin version ' . $new_version->version );
503
 
504
  /**
513
  }
514
 
515
  if ( is_object( $this->_update_details ) ) {
516
+ if ( ! isset( $transient_data->response ) ) {
517
+ $transient_data->response = array();
518
+ }
519
+
520
  // Add plugin to transient data.
521
+ $transient_data->response[ $this->_fs->premium_plugin_basename() ] = $this->_fs->is_plugin() ?
522
  $this->_update_details :
523
  (array) $this->_update_details;
524
+ } else if ( isset( $transient_data->response ) ) {
525
+ /**
526
+ * Ensure that there's no update data for the plugin to prevent upgrading the premium version to the latest free version.
527
+ *
528
+ * @author Leo Fajardo (@leorw)
529
+ * @since 2.3.0
530
+ */
531
+ unset( $transient_data->response[ $this->_fs->premium_plugin_basename() ] );
532
  }
533
 
534
  $slug = $this->_fs->get_slug();
620
  return $update;
621
  }
622
 
623
+ /**
624
+ * @author Leo Fajardo (@leorw)
625
+ * @since 2.3.0
626
+ *
627
+ * @param FS_Plugin_Tag $new_version
628
+ *
629
+ * @return bool
630
+ */
631
+ private function is_new_version_premium( FS_Plugin_Tag $new_version ) {
632
+ $query_str = parse_url( $new_version->url, PHP_URL_QUERY );
633
+ if ( empty( $query_str ) ) {
634
+ return false;
635
+ }
636
+
637
+ parse_str( $query_str, $params );
638
+
639
+ return ( isset( $params['is_premium'] ) && 'true' == $params['is_premium'] );
640
+ }
641
+
642
  /**
643
  * Update the updates transient with the module's update information.
644
  *
657
  function set_update_data( FS_Plugin_Tag $new_version ) {
658
  $this->_logger->entrance();
659
 
660
+ if ( ! $this->is_new_version_premium( $new_version ) ) {
661
+ return;
662
+ }
663
+
664
  $transient_key = "update_{$this->_fs->get_module_type()}s";
665
 
666
  $transient_data = get_site_transient( $transient_key );
945
  return $data;
946
  }
947
 
948
+ $addon = false;
949
+ $is_addon = false;
950
+ $addon_version = false;
951
 
952
  if ( $this->_fs->get_slug() !== $args->slug ) {
953
  $addon = $this->_fs->get_addon_by_slug( $args->slug );
956
  return $data;
957
  }
958
 
959
+ if ( $this->_fs->is_addon_activated( $addon->id ) ) {
960
+ $addon_version = $this->_fs->get_addon_instance( $addon->id )->get_plugin_version();
961
+ } else if ( $this->_fs->is_addon_installed( $addon->id ) ) {
962
+ $addon_plugin_data = get_plugin_data(
963
+ ( WP_PLUGIN_DIR . '/' . $this->_fs->get_addon_basename( $addon->id ) ),
964
+ false,
965
+ false
966
+ );
967
+
968
+ if ( ! empty( $addon_plugin_data ) ) {
969
+ $addon_version = $addon_plugin_data['Version'];
970
+ }
971
+ }
972
+
973
  $is_addon = true;
974
  }
975
 
1000
  }*/
1001
  }
1002
 
1003
+ $plugin_version = $is_addon ?
1004
+ $addon_version :
1005
+ $this->_fs->get_plugin_version();
1006
 
1007
  // Get plugin's newest update.
1008
  $new_version = $this->get_latest_download_details( $is_addon ? $addon->id : false, $plugin_version );
1130
 
1131
  $active_plugins_basenames = get_option( 'active_plugins' );
1132
 
1133
+ foreach ( $active_plugins_basenames as $key => $active_plugin_basename ) {
1134
+ if ( $basename === $active_plugin_basename ) {
1135
  // Get filename including extension.
1136
  $filename = basename( $basename );
1137
 
1143
  // Verify that the expected correct path exists.
1144
  if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $new_basename ) ) ) {
1145
  // Override active plugin name.
1146
+ $active_plugins_basenames[ $key ] = $new_basename;
1147
  update_option( 'active_plugins', $active_plugins_basenames );
1148
  }
1149
 
vendor/freemius/includes/class-fs-storage.php CHANGED
@@ -337,12 +337,14 @@
337
  self::$_NETWORK_OPTIONS_MAP = array(
338
  // Network level options.
339
  'affiliate_application_data' => 0,
 
340
  'connectivity_test' => 0,
341
  'handle_gdpr_admin_notice' => 0,
342
  'has_trial_plan' => 0,
343
  'install_sync_timestamp' => 0,
344
  'install_sync_cron' => 0,
345
  'is_anonymous_ms' => 0,
 
346
  'is_on' => 0,
347
  'is_plugin_new_install' => 0,
348
  'network_install_blog_id' => 0,
337
  self::$_NETWORK_OPTIONS_MAP = array(
338
  // Network level options.
339
  'affiliate_application_data' => 0,
340
+ 'beta_data' => 0,
341
  'connectivity_test' => 0,
342
  'handle_gdpr_admin_notice' => 0,
343
  'has_trial_plan' => 0,
344
  'install_sync_timestamp' => 0,
345
  'install_sync_cron' => 0,
346
  'is_anonymous_ms' => 0,
347
+ 'is_network_activated' => 0,
348
  'is_on' => 0,
349
  'is_plugin_new_install' => 0,
350
  'network_install_blog_id' => 0,
vendor/freemius/includes/entities/class-fs-payment.php CHANGED
@@ -42,6 +42,13 @@
42
  * @var float
43
  */
44
  public $gross;
 
 
 
 
 
 
 
45
  /**
46
  * @var number
47
  */
@@ -75,6 +82,10 @@
75
 
76
  #endregion Properties
77
 
 
 
 
 
78
  /**
79
  * @param object|bool $payment
80
  */
@@ -107,4 +118,51 @@
107
  function is_migrated() {
108
  return ( 0 != $this->source );
109
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
42
  * @var float
43
  */
44
  public $gross;
45
+ /**
46
+ * @author Leo Fajardo (@leorw)
47
+ * @since 2.3.0
48
+ *
49
+ * @var string One of the following: `usd`, `gbp`, `eur`.
50
+ */
51
+ public $currency;
52
  /**
53
  * @var number
54
  */
82
 
83
  #endregion Properties
84
 
85
+ const CURRENCY_USD = 'usd';
86
+ const CURRENCY_GBP = 'gbp';
87
+ const CURRENCY_EUR = 'eur';
88
+
89
  /**
90
  * @param object|bool $payment
91
  */
118
  function is_migrated() {
119
  return ( 0 != $this->source );
120
  }
121
+
122
+ /**
123
+ * Returns the gross in this format:
124
+ * `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
125
+ *
126
+ * Examples: £9.99 GBP, -£9.99 GBP.
127
+ *
128
+ * @author Leo Fajardo (@leorw)
129
+ * @since 2.3.0
130
+ *
131
+ * @return string
132
+ */
133
+ function formatted_gross()
134
+ {
135
+ return (
136
+ ( $this->gross < 0 ? '-' : '' ) .
137
+ $this->get_symbol() .
138
+ number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
139
+ strtoupper( $this->currency )
140
+ );
141
+ }
142
+
143
+ /**
144
+ * A map between supported currencies with their symbols.
145
+ *
146
+ * @var array<string,string>
147
+ */
148
+ static $CURRENCY_2_SYMBOL;
149
+
150
+ /**
151
+ * @author Leo Fajardo (@leorw)
152
+ * @since 2.3.0
153
+ *
154
+ * @return string
155
+ */
156
+ private function get_symbol() {
157
+ if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
158
+ // Lazy load.
159
+ self::$CURRENCY_2_SYMBOL = array(
160
+ self::CURRENCY_USD => '$',
161
+ self::CURRENCY_GBP => '£',
162
+ self::CURRENCY_EUR => '€',
163
+ );
164
+ }
165
+
166
+ return self::$CURRENCY_2_SYMBOL[ $this->currency ];
167
+ }
168
  }
vendor/freemius/includes/entities/class-fs-plugin-license.php CHANGED
@@ -29,6 +29,27 @@
29
  * @var number
30
  */
31
  public $plan_id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * @var number
34
  */
@@ -95,7 +116,7 @@
95
  * @return int
96
  */
97
  function left() {
98
- if ( ! $this->is_active() || $this->is_expired() ) {
99
  return 0;
100
  }
101
 
29
  * @var number
30
  */
31
  public $plan_id;
32
+ /**
33
+ * @author Leo Fajardo (@leorw)
34
+ * @since 2.3.0
35
+ *
36
+ * @var string
37
+ */
38
+ public $parent_plan_name;
39
+ /**
40
+ * @author Leo Fajardo (@leorw)
41
+ * @since 2.3.0
42
+ *
43
+ * @var string
44
+ */
45
+ public $parent_plan_title;
46
+ /**
47
+ * @author Leo Fajardo (@leorw)
48
+ * @since 2.3.0
49
+ *
50
+ * @var number
51
+ */
52
+ public $parent_license_id;
53
  /**
54
  * @var number
55
  */
116
  * @return int
117
  */
118
  function left() {
119
+ if ( ! $this->is_features_enabled() ) {
120
  return 0;
121
  }
122
 
vendor/freemius/includes/entities/class-fs-plugin-tag.php CHANGED
@@ -36,9 +36,9 @@
36
  */
37
  public $has_premium;
38
  /**
39
- * @var bool
40
  */
41
- public $is_released;
42
 
43
  function __construct( $tag = false ) {
44
  parent::__construct( $tag );
@@ -47,4 +47,14 @@
47
  static function get_type() {
48
  return 'tag';
49
  }
 
 
 
 
 
 
 
 
 
 
50
  }
36
  */
37
  public $has_premium;
38
  /**
39
+ * @var string One of the following: `pending`, `beta`, `unreleased`.
40
  */
41
+ public $release_mode;
42
 
43
  function __construct( $tag = false ) {
44
  parent::__construct( $tag );
47
  static function get_type() {
48
  return 'tag';
49
  }
50
+
51
+ /**
52
+ * @author Leo Fajardo (@leorw)
53
+ * @since 2.3.0
54
+ *
55
+ * @return bool
56
+ */
57
+ function is_beta() {
58
+ return ( 'beta' === $this->release_mode );
59
+ }
60
  }
vendor/freemius/includes/entities/class-fs-plugin.php CHANGED
@@ -49,6 +49,13 @@
49
  * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50
  */
51
  public $is_wp_org_compliant = true;
 
 
 
 
 
 
 
52
 
53
  #region Install Specific Properties
54
 
@@ -87,6 +94,11 @@
87
  * @var bool
88
  */
89
  public $is_live;
 
 
 
 
 
90
 
91
  const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
92
 
49
  * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50
  */
51
  public $is_wp_org_compliant = true;
52
+ /**
53
+ * @author Leo Fajardo (@leorw)
54
+ * @since 2.2.5
55
+ *
56
+ * @var int
57
+ */
58
+ public $premium_releases_count;
59
 
60
  #region Install Specific Properties
61
 
94
  * @var bool
95
  */
96
  public $is_live;
97
+ /**
98
+ * @since 2.2.3
99
+ * @var null|number
100
+ */
101
+ public $bundle_id;
102
 
103
  const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
104
 
vendor/freemius/includes/entities/class-fs-site.php CHANGED
@@ -170,13 +170,16 @@
170
  fs_starts_with( $subdomain, 'staging' ) ||
171
  // WPEngine staging.
172
  fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
 
173
  // Pantheon
174
  ( fs_ends_with($subdomain, 'pantheonsite.io') &&
175
  (fs_starts_with($subdomain, 'test-') || fs_starts_with($subdomain, 'dev-'))) ||
176
  // Cloudways
177
  fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
178
  // Kinsta
179
- (fs_ends_with($subdomain, '.kinsta.com') && fs_starts_with($subdomain, 'staging-'))
 
 
180
  );
181
  }
182
 
170
  fs_starts_with( $subdomain, 'staging' ) ||
171
  // WPEngine staging.
172
  fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
173
+ fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
174
  // Pantheon
175
  ( fs_ends_with($subdomain, 'pantheonsite.io') &&
176
  (fs_starts_with($subdomain, 'test-') || fs_starts_with($subdomain, 'dev-'))) ||
177
  // Cloudways
178
  fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
179
  // Kinsta
180
+ (fs_ends_with($subdomain, '.kinsta.com') && fs_starts_with($subdomain, 'staging-')) ||
181
+ // DesktopServer
182
+ fs_ends_with( $subdomain, '.dev.cc' )
183
  );
184
  }
185
 
vendor/freemius/includes/entities/class-fs-user.php CHANGED
@@ -31,6 +31,13 @@
31
  */
32
  public $is_verified;
33
  /**
 
 
 
 
 
 
 
34
  * @var string|null
35
  */
36
  public $customer_id;
@@ -56,6 +63,16 @@
56
  return ( isset( $this->is_verified ) && true === $this->is_verified );
57
  }
58
 
 
 
 
 
 
 
 
 
 
 
59
  static function get_type() {
60
  return 'user';
61
  }
31
  */
32
  public $is_verified;
33
  /**
34
+ * @author Leo Fajardo (@leorw)
35
+ * @since 2.3.0
36
+ *
37
+ * @var bool
38
+ */
39
+ public $is_beta;
40
+ /**
41
  * @var string|null
42
  */
43
  public $customer_id;
63
  return ( isset( $this->is_verified ) && true === $this->is_verified );
64
  }
65
 
66
+ /**
67
+ * @author Leo Fajardo (@leorw)
68
+ * @since 2.3.0
69
+ *
70
+ * @return bool
71
+ */
72
+ function is_beta() {
73
+ return ( isset( $this->is_beta ) && true === $this->is_beta );
74
+ }
75
+
76
  static function get_type() {
77
  return 'user';
78
  }
vendor/freemius/includes/fs-core-functions.php CHANGED
@@ -127,6 +127,9 @@
127
 
128
  if ( ! function_exists( 'fs_request_get' ) ) {
129
  /**
 
 
 
130
  * @param string $key
131
  * @param mixed $def
132
  * @param string|bool $type Since 1.2.1.7 - when set to 'get' will look for the value passed via querystring, when
@@ -140,6 +143,10 @@
140
  $type = strtolower( $type );
141
  }
142
 
 
 
 
 
143
  switch ( $type ) {
144
  case 'post':
145
  $value = isset( $_POST[ $key ] ) ? $_POST[ $key ] : $def;
@@ -163,17 +170,39 @@
163
  }
164
 
165
  if ( ! function_exists( 'fs_request_get_bool' ) ) {
 
 
 
 
 
 
 
 
 
 
166
  function fs_request_get_bool( $key, $def = false ) {
167
- if ( ! isset( $_REQUEST[ $key ] ) ) {
 
 
168
  return $def;
169
  }
170
 
171
- if ( 1 == $_REQUEST[ $key ] || 'true' === strtolower( $_REQUEST[ $key ] ) ) {
172
- return true;
173
- }
 
 
 
 
 
 
 
174
 
175
- if ( 0 == $_REQUEST[ $key ] || 'false' === strtolower( $_REQUEST[ $key ] ) ) {
176
- return false;
 
 
 
177
  }
178
 
179
  return $def;
127
 
128
  if ( ! function_exists( 'fs_request_get' ) ) {
129
  /**
130
+ * A helper method to fetch GET/POST user input with an optional default value when the input is not set.
131
+ * @author Vova Feldman (@svovaf)
132
+ *
133
  * @param string $key
134
  * @param mixed $def
135
  * @param string|bool $type Since 1.2.1.7 - when set to 'get' will look for the value passed via querystring, when
143
  $type = strtolower( $type );
144
  }
145
 
146
+ /**
147
+ * Note to WordPress.org Reviewers:
148
+ * This is a helper method to fetch GET/POST user input with an optional default value when the input is not set. The actual sanitization is done in the scope of the function's usage.
149
+ */
150
  switch ( $type ) {
151
  case 'post':
152
  $value = isset( $_POST[ $key ] ) ? $_POST[ $key ] : $def;
170
  }
171
 
172
  if ( ! function_exists( 'fs_request_get_bool' ) ) {
173
+ /**
174
+ * A helper method to fetch GET/POST user boolean input with an optional default value when the input is not set.
175
+ *
176
+ * @author Vova Feldman (@svovaf)
177
+ *
178
+ * @param string $key
179
+ * @param bool $def
180
+ *
181
+ * @return bool|mixed
182
+ */
183
  function fs_request_get_bool( $key, $def = false ) {
184
+ $val = fs_request_get( $key, null );
185
+
186
+ if ( is_null( $val ) ) {
187
  return $def;
188
  }
189
 
190
+ if ( is_bool( $val ) ) {
191
+ return $val;
192
+ } else if ( is_numeric( $val ) ) {
193
+ if ( 1 == $val ) {
194
+ return true;
195
+ } else if ( 0 == $val ) {
196
+ return false;
197
+ }
198
+ } else if ( is_string( $val ) ) {
199
+ $val = strtolower( $val );
200
 
201
+ if ( 'true' === $val ) {
202
+ return true;
203
+ } else if ( 'false' === $val ) {
204
+ return false;
205
+ }
206
  }
207
 
208
  return $def;
vendor/freemius/includes/fs-plugin-info-dialog.php CHANGED
@@ -31,6 +31,29 @@
31
  */
32
  private $_fs;
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  function __construct( Freemius $fs ) {
35
  $this->_fs = $fs;
36
 
@@ -170,11 +193,14 @@
170
 
171
  $data->fs_missing = ( ! $has_free_plan || $data->wp_org_missing );
172
  } else {
173
- $data->wp_org_missing = false;
 
174
 
 
175
  $current_addon_version = false;
176
  if ( $this->_fs->is_addon_activated( $selected_addon->id ) ) {
177
- $current_addon_version = $this->_fs->get_addon_instance( $selected_addon->id )->get_plugin_version();
 
178
  } else if ( $this->_fs->is_addon_installed( $selected_addon->id ) ) {
179
  $addon_plugin_data = get_plugin_data(
180
  ( WP_PLUGIN_DIR . '/' . $this->_fs->get_addon_basename( $selected_addon->id ) ),
@@ -196,14 +222,45 @@
196
  );
197
 
198
  if ( $has_paid_plan ) {
199
- $data->checkout_link = $this->_fs->checkout_url();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
- if ( $has_free_plan ) {
 
202
  $data->download_link = $this->_fs->_get_latest_download_local_url( $selected_addon->id );
203
  }
204
 
205
- $data->fs_missing = ( false === $latest );
206
-
 
 
 
 
 
207
 
208
  // Fetch as much as possible info from local files.
209
  $plugin_local_data = $this->_fs->get_plugin_data();
@@ -228,6 +285,8 @@
228
  $data->last_updated = $latest->created;
229
  $data->requires = $latest->requires_platform_version;
230
  $data->tested = $latest->tested_up_to_version;
 
 
231
  } else {
232
  // Add dummy version.
233
  $data->version = '1.0.0';
@@ -267,6 +326,12 @@
267
  $data->has_paid_plan = $has_paid_plan;
268
  $data->is_paid = $has_paid_plan;
269
  $data->is_wp_org_compliant = $selected_addon->is_wp_org_compliant;
 
 
 
 
 
 
270
 
271
  return $data;
272
  }
@@ -332,6 +397,70 @@
332
  return '$' . $price_tag;
333
  }
334
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  /**
336
  * @author Vova Feldman (@svovaf)
337
  * @since 1.1.7
@@ -359,14 +488,32 @@
359
  }
360
  }
361
 
362
- return '<a class="button button-primary fs-checkout-button right" href="' . $this->_fs->addon_checkout_url(
 
 
 
 
 
 
 
363
  $plan->plugin_id,
364
  $plan->pricing[0]->id,
365
  $this->get_billing_cycle( $plan ),
366
- $plan->has_trial()
367
- ) . '" target="_parent">' .
368
- ( ! $plan->has_trial() ?
369
- fs_text_x_inline( 'Purchase', 'verb', 'purchase', $api->slug ) :
 
 
 
 
 
 
 
 
 
 
 
370
  sprintf(
371
  /* translators: %s: N-days trial */
372
  fs_text_inline( 'Start my free %s', 'start-free-x', $api->slug ),
@@ -377,92 +524,305 @@
377
  }
378
 
379
  /**
380
- * @author Vova Feldman (@svovaf)
381
- * @since 2.0.0
382
  *
383
  * @param object $api
384
- * @param bool $is_primary
385
  *
386
- * @return string
387
  */
388
- private function get_download_cta( $api, $is_primary = true ) {
389
- if ( empty( $api->download_link ) ) {
390
- return '';
 
 
 
 
 
 
391
  }
392
 
393
- $status = install_plugin_install_status( $api );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
 
395
- $has_paid_version = $api->has_paid_plan;
 
 
 
 
 
 
 
 
 
 
 
 
396
 
397
- // Hosted on WordPress.org.
398
- switch ( $status['status'] ) {
399
- case 'install':
400
- if ( $api->is_wp_org_compliant ||
401
- ! $this->_fs->is_org_repo_compliant() ||
402
- $this->_fs->is_premium()
403
- ) {
404
- /**
405
- * Allow immediate installation if one of the following:
406
- * 1. WordPress.org add-on.
407
- * 2. The core module is NOT wp.org compliant.
408
- * 3. The core module is running the premium version which is not wp.org compliant.
409
- */
410
- if ( $status['url'] ) {
411
- return $this->get_cta(
412
- ( $has_paid_version ?
413
- fs_esc_html_inline( 'Install Free Version Now', 'install-free-version-now', $api->slug ) :
414
- fs_esc_html_inline( 'Install Now', 'install-now', $api->slug ) ),
415
- $is_primary,
416
- false,
417
- $status['url'],
418
- '_parent'
419
- );
420
  }
421
  }
 
422
 
423
- return $this->get_cta(
424
- ( $has_paid_version ?
425
- fs_esc_html_x_inline( 'Download Latest Free Version', 'as download latest version', 'download-latest-free-version', $api->slug ) :
426
- fs_esc_html_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $api->slug ) ),
427
- $is_primary,
428
- false,
429
- esc_url( $api->download_link )
430
- );
431
- break;
432
- case 'update_available':
433
- if ( $status['url'] ) {
434
- return $this->get_cta(
435
- ( $has_paid_version ?
436
- fs_esc_html_inline( 'Install Free Version Update Now', 'install-free-version-update-now', $api->slug ) :
437
- fs_esc_html_inline( 'Install Update Now', 'install-update-now', $api->slug ) ),
438
- $is_primary,
439
- false,
440
- $status['url'],
441
- '_parent'
442
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  }
444
- break;
445
- case 'newer_installed':
446
- return $this->get_cta(
447
- ( $has_paid_version ?
448
- esc_html( sprintf( fs_text_inline( 'Newer Free Version (%s) Installed', 'newer-free-installed', $api->slug ), $status['version'] ) ) :
449
- esc_html( sprintf( fs_text_inline( 'Newer Version (%s) Installed', 'newer-installed', $api->slug ), $status['version'] ) ) ),
450
- $is_primary,
451
- true
452
- );
453
- break;
454
- case 'latest_installed':
455
- return $this->get_cta(
456
- ( $has_paid_version ?
457
- fs_esc_html_inline( 'Latest Free Version Installed', 'latest-free-installed', $api->slug ) :
458
- fs_esc_html_inline( 'Latest Version Installed', 'latest-installed', $api->slug ) ),
459
- $is_primary,
460
- true
461
- );
462
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  }
464
 
465
- return '';
 
 
 
 
 
 
 
466
  }
467
 
468
  /**
@@ -815,7 +1175,7 @@
815
  }?>;
816
  },
817
  _updateCtaUrl = function (plan, pricing, cycle) {
818
- $('.plugin-information-pricing .button, #plugin-information-footer .button.fs-checkout-button').attr('href', _checkoutUrl(plan, pricing, cycle));
819
  };
820
 
821
  $(document).ready(function () {
@@ -902,7 +1262,7 @@
902
  <?php endif ?>
903
  <ul class="fs-licenses">
904
  </ul>
905
- <?php echo $this->get_checkout_cta( $api, $plan, false ) ?>
906
  <div style="clear:both"></div>
907
  <?php if ( $plan->has_trial() ) : ?>
908
  <?php $trial_period = $this->get_trial_period( $plan ) ?>
@@ -1127,16 +1487,123 @@
1127
  echo "</div>\n"; // #plugin-information-scrollable
1128
  echo "<div id='$tab-footer'>\n";
1129
 
1130
- if ( $api->has_paid_plan && ! empty( $api->checkout_link ) ) {
1131
- echo $this->get_checkout_cta( $api );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1132
  }
1133
 
1134
- if ( ! empty( $api->download_link ) ) {
1135
- echo $this->get_download_cta( $api, empty( $api->checkout_link ) );
1136
- }
1137
 
1138
  echo "</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1140
  iframe_footer();
1141
  exit;
1142
  }
31
  */
32
  private $_fs;
33
 
34
+ /**
35
+ * Collection of plugin installation, update, download, activation, and purchase actions. This is used in
36
+ * populating the actions dropdown list when there are at least 2 actions. If there's only 1 action, a button
37
+ * is used instead.
38
+ *
39
+ * @author Leo Fajardo (@leorw)
40
+ * @since 2.3.0
41
+ *
42
+ * @var string[]
43
+ */
44
+ private $actions;
45
+
46
+ /**
47
+ * Contains plugin status information that is used to determine which actions should be part of the actions
48
+ * dropdown list.
49
+ *
50
+ * @author Leo Fajardo (@leorw)
51
+ * @since 2.3.0
52
+ *
53
+ * @var string[]
54
+ */
55
+ private $status;
56
+
57
  function __construct( Freemius $fs ) {
58
  $this->_fs = $fs;
59
 
193
 
194
  $data->fs_missing = ( ! $has_free_plan || $data->wp_org_missing );
195
  } else {
196
+ $data->has_purchased_license = false;
197
+ $data->wp_org_missing = false;
198
 
199
+ $fs_addon = null;
200
  $current_addon_version = false;
201
  if ( $this->_fs->is_addon_activated( $selected_addon->id ) ) {
202
+ $fs_addon = $this->_fs->get_addon_instance( $selected_addon->id );
203
+ $current_addon_version = $fs_addon->get_plugin_version();
204
  } else if ( $this->_fs->is_addon_installed( $selected_addon->id ) ) {
205
  $addon_plugin_data = get_plugin_data(
206
  ( WP_PLUGIN_DIR . '/' . $this->_fs->get_addon_basename( $selected_addon->id ) ),
222
  );
223
 
224
  if ( $has_paid_plan ) {
225
+ $blog_id = fs_request_get( 'fs_blog_id' );
226
+ $has_valid_blog_id = is_numeric( $blog_id );
227
+
228
+ if ( $has_valid_blog_id ) {
229
+ switch_to_blog( $blog_id );
230
+ }
231
+
232
+ $data->checkout_link = $this->_fs->checkout_url(
233
+ WP_FS__PERIOD_ANNUALLY,
234
+ false,
235
+ array(),
236
+ ( $has_valid_blog_id ? false : null )
237
+ );
238
+
239
+ if ( $has_valid_blog_id ) {
240
+ restore_current_blog();
241
+ }
242
+
243
+ if ( is_object( $fs_addon ) ) {
244
+ $data->has_purchased_license = $fs_addon->has_active_valid_license();
245
+ } else {
246
+ $account_addons = $this->_fs->get_account_addons();
247
+ if ( ! empty( $account_addons ) && in_array( $selected_addon->id, $account_addons ) ) {
248
+ $data->has_purchased_license = true;
249
+ }
250
+ }
251
  }
252
+
253
+ if ( $has_free_plan || $data->has_purchased_license ) {
254
  $data->download_link = $this->_fs->_get_latest_download_local_url( $selected_addon->id );
255
  }
256
 
257
+ $data->fs_missing = (
258
+ false === $latest &&
259
+ (
260
+ empty( $selected_addon->premium_releases_count ) ||
261
+ ! ( $selected_addon->premium_releases_count > 0 )
262
+ )
263
+ );
264
 
265
  // Fetch as much as possible info from local files.
266
  $plugin_local_data = $this->_fs->get_plugin_data();
285
  $data->last_updated = $latest->created;
286
  $data->requires = $latest->requires_platform_version;
287
  $data->tested = $latest->tested_up_to_version;
288
+ } else if ( ! empty( $current_addon_version ) ) {
289
+ $data->version = $current_addon_version;
290
  } else {
291
  // Add dummy version.
292
  $data->version = '1.0.0';
326
  $data->has_paid_plan = $has_paid_plan;
327
  $data->is_paid = $has_paid_plan;
328
  $data->is_wp_org_compliant = $selected_addon->is_wp_org_compliant;
329
+ $data->premium_slug = $selected_addon->premium_slug;
330
+ $data->addon_id = $selected_addon->id;
331
+
332
+ if ( ! isset( $data->has_purchased_license ) ) {
333
+ $data->has_purchased_license = false;
334
+ }
335
 
336
  return $data;
337
  }
397
  return '$' . $price_tag;
398
  }
399
 
400
+ /**
401
+ * @author Leo Fajardo (@leorw)
402
+ * @since 2.3.0
403
+ *
404
+ * @param object $api
405
+ * @param FS_Plugin_Plan $plan
406
+ *
407
+ * @return string
408
+ */
409
+ private function get_actions_dropdown( $api, $plan = null ) {
410
+ $this->actions = isset( $this->actions ) ?
411
+ $this->actions :
412
+ $this->get_plugin_actions( $api );
413
+
414
+ $actions = $this->actions;
415
+
416
+ $checkout_cta = $this->get_checkout_cta( $api, $plan );
417
+ if ( ! empty( $checkout_cta ) ) {
418
+ /**
419
+ * If there's no license yet, make the checkout button the main CTA. Otherwise, make it the last item in
420
+ * the actions dropdown.
421
+ *
422
+ * @author Leo Fajardo (@leorw)
423
+ * @since 2.3.0
424
+ */
425
+ if ( ! $api->has_purchased_license ) {
426
+ array_unshift( $actions, $checkout_cta );
427
+ } else {
428
+ $actions[] = $checkout_cta;
429
+ }
430
+ }
431
+
432
+ if ( empty( $actions ) ) {
433
+ return '';
434
+ }
435
+
436
+ $total_actions = count( $actions );
437
+ if ( 1 === $total_actions ) {
438
+ return $actions[0];
439
+ }
440
+
441
+ ob_start();
442
+
443
+ ?>
444
+ <div class="fs-cta fs-dropdown">
445
+ <div class="button-group">
446
+ <?php
447
+ // This should NOT be sanitized as the $actions are HTML buttons already.
448
+ echo $actions[0] ?>
449
+ <div class="button button-primary fs-dropdown-arrow-button">
450
+ <span class="fs-dropdown-arrow"></span>
451
+ <ul class="fs-dropdown-list" style="display: none">
452
+ <?php for ( $i = 1; $i < $total_actions; $i ++ ) : ?>
453
+ <li><?php echo str_replace( 'button button-primary', '', $actions[ $i ] ) ?></li>
454
+ <?php endfor ?>
455
+ </ul>
456
+ </div>
457
+ </div>
458
+ </div>
459
+ <?php
460
+
461
+ return ob_get_clean();
462
+ }
463
+
464
  /**
465
  * @author Vova Feldman (@svovaf)
466
  * @since 1.1.7
488
  }
489
  }
490
 
491
+ $blog_id = fs_request_get( 'fs_blog_id' );
492
+ $has_valid_blog_id = is_numeric( $blog_id );
493
+
494
+ if ( $has_valid_blog_id ) {
495
+ switch_to_blog( $blog_id );
496
+ }
497
+
498
+ $addon_checkout_url = $this->_fs->addon_checkout_url(
499
  $plan->plugin_id,
500
  $plan->pricing[0]->id,
501
  $this->get_billing_cycle( $plan ),
502
+ $plan->has_trial(),
503
+ ( $has_valid_blog_id ? false : null )
504
+ );
505
+
506
+ if ( $has_valid_blog_id ) {
507
+ restore_current_blog();
508
+ }
509
+
510
+ return '<a class="button button-primary fs-checkout-button right" href="' . $addon_checkout_url . '" target="_parent">' .
511
+ esc_html( ! $plan->has_trial() ?
512
+ (
513
+ $api->has_purchased_license ?
514
+ fs_text_inline( 'Purchase More', 'purchase-more', $api->slug ) :
515
+ fs_text_x_inline( 'Purchase', 'verb', 'purchase', $api->slug )
516
+ ) :
517
  sprintf(
518
  /* translators: %s: N-days trial */
519
  fs_text_inline( 'Start my free %s', 'start-free-x', $api->slug ),
524
  }
525
 
526
  /**
527
+ * @author Leo Fajardo (@leorw)
528
+ * @since 2.3.0
529
  *
530
  * @param object $api
 
531
  *
532
+ * @return string[]
533
  */
534
+ private function get_plugin_actions( $api ) {
535
+ $this->status = isset( $this->status ) ?
536
+ $this->status :
537
+ install_plugin_install_status( $api );
538
+
539
+ $is_update_available = ( 'update_available' === $this->status['status'] );
540
+
541
+ if ( $is_update_available && empty( $this->status['url'] ) ) {
542
+ return array();
543
  }
544
 
545
+ $blog_id = fs_request_get( 'fs_blog_id' );
546
+
547
+ $active_plugins_directories_map = Freemius::get_active_plugins_directories_map( $blog_id );
548
+
549
+ $actions = array();
550
+
551
+ $is_addon_activated = $this->_fs->is_addon_activated( $api->slug );
552
+ $fs_addon = null;
553
+
554
+ $is_free_installed = null;
555
+ $is_premium_installed = null;
556
+
557
+ $has_installed_version = ( 'install' !== $this->status['status'] );
558
+
559
+ if ( ! $api->has_paid_plan ) {
560
+ /**
561
+ * Free-only add-on.
562
+ *
563
+ * @author Leo Fajardo (@leorw)
564
+ * @since 2.3.0
565
+ */
566
+ $is_free_installed = $has_installed_version;
567
+ $is_premium_installed = false;
568
+ } else if ( ! $api->has_free_plan ) {
569
+ /**
570
+ * Premium-only add-on.
571
+ *
572
+ * @author Leo Fajardo (@leorw)
573
+ * @since 2.3.0
574
+ */
575
+ $is_free_installed = false;
576
+ $is_premium_installed = $has_installed_version;
577
+ } else {
578
+ /**
579
+ * Freemium add-on.
580
+ *
581
+ * @author Leo Fajardo (@leorw)
582
+ * @since 2.3.0
583
+ */
584
+ if ( ! $has_installed_version ) {
585
+ $is_free_installed = false;
586
+ $is_premium_installed = false;
587
+ } else {
588
+ $fs_addon = $is_addon_activated ?
589
+ $this->_fs->get_addon_instance( $api->slug ) :
590
+ null;
591
+
592
+ if ( is_object( $fs_addon ) ) {
593
+ if ( $fs_addon->is_premium() ) {
594
+ $is_premium_installed = true;
595
+ } else {
596
+ $is_free_installed = true;
597
+ }
598
+ }
599
 
600
+ if ( is_null( $is_free_installed ) ) {
601
+ $is_free_installed = file_exists( fs_normalize_path( WP_PLUGIN_DIR . "/{$api->slug}/{$api->slug}.php" ) );
602
+ if ( ! $is_free_installed ) {
603
+ /**
604
+ * Check if there's a plugin installed in a directory named `$api->slug`.
605
+ *
606
+ * @author Leo Fajardo (@leorw)
607
+ * @since 2.3.0
608
+ */
609
+ $installed_plugins = get_plugins( '/' . $api->slug );
610
+ $is_free_installed = ( ! empty( $installed_plugins ) );
611
+ }
612
+ }
613
 
614
+ if ( is_null( $is_premium_installed ) ) {
615
+ $is_premium_installed = file_exists( fs_normalize_path( WP_PLUGIN_DIR . "/{$api->premium_slug}/{$api->slug}.php" ) );
616
+ if ( ! $is_premium_installed ) {
617
+ /**
618
+ * Check if there's a plugin installed in a directory named `$api->premium_slug`.
619
+ *
620
+ * @author Leo Fajardo (@leorw)
621
+ * @since 2.3.0
622
+ */
623
+ $installed_plugins = get_plugins( '/' . $api->premium_slug );
624
+ $is_premium_installed = ( ! empty( $installed_plugins ) );
 
 
 
 
 
 
 
 
 
 
 
 
625
  }
626
  }
627
+ }
628
 
629
+ $has_installed_version = ( $is_free_installed || $is_premium_installed );
630
+ }
631
+
632
+ $this->status['is_free_installed'] = $is_free_installed;
633
+ $this->status['is_premium_installed'] = $is_premium_installed;
634
+
635
+ $can_install_free_version = false;
636
+ $can_install_free_version_update = false;
637
+ $can_download_free_version = false;
638
+ $can_activate_free_version = false;
639
+ $can_install_premium_version = false;
640
+ $can_install_premium_version_update = false;
641
+ $can_download_premium_version = false;
642
+ $can_activate_premium_version = false;
643
+
644
+ if ( ! $api->has_purchased_license ) {
645
+ if ( $api->has_free_plan ) {
646
+ if ( $has_installed_version ) {
647
+ if ( $is_update_available ) {
648
+ $can_install_free_version_update = true;
649
+ } else if ( ! $is_premium_installed && ! isset( $active_plugins_directories_map[ dirname( $this->status['file'] ) ] ) ) {
650
+ $can_activate_free_version = true;
651
+ }
652
+ } else {
653
+ if (
654
+ $this->_fs->is_premium() ||
655
+ ! $this->_fs->is_org_repo_compliant() ||
656
+ $api->is_wp_org_compliant
657
+ ) {
658
+ $can_install_free_version = true;
659
+ } else {
660
+ $can_download_free_version = true;
661
+ }
662
  }
663
+ }
664
+ } else {
665
+ if ( ! is_object( $fs_addon ) && $is_addon_activated ) {
666
+ $fs_addon = $this->_fs->get_addon_instance( $api->slug );
667
+ }
668
+
669
+ $can_download_premium_version = true;
670
+
671
+ if ( ! isset( $active_plugins_directories_map[ dirname( $this->status['file'] ) ] ) ) {
672
+ if ( $is_premium_installed ) {
673
+ $can_activate_premium_version = ( ! $is_addon_activated || ! $fs_addon->is_premium() );
674
+ } else if ( $is_free_installed ) {
675
+ $can_activate_free_version = ( ! $is_addon_activated );
676
+ }
677
+ }
678
+
679
+ if ( $this->_fs->is_premium() || ! $this->_fs->is_org_repo_compliant() ) {
680
+ if ( $is_update_available ) {
681
+ $can_install_premium_version_update = true;
682
+ } else if ( ! $is_premium_installed ) {
683
+ $can_install_premium_version = true;
684
+ }
685
+ }
686
+ }
687
+
688
+ if (
689
+ $can_install_premium_version ||
690
+ $can_install_premium_version_update
691
+ ) {
692
+ if ( is_numeric( $blog_id ) ) {
693
+ /**
694
+ * Replace the network status URL with a blog admin–based status URL if the `Add-Ons` page is loaded
695
+ * from a specific blog admin page (when `fs_blog_id` is valid) in order for plugin installation/update
696
+ * to work.
697
+ *
698
+ * @author Leo Fajardo (@leorw)
699
+ * @since 2.3.0
700
+ */
701
+ $this->status['url'] = self::get_blog_status_url( $blog_id, $this->status['url'], $this->status['status'] );
702
+ }
703
+
704
+ /**
705
+ * Add the `fs_allow_updater_and_dialog` param to the install/update URL so that the add-on can be
706
+ * installed/updated.
707
+ *
708
+ * @author Leo Fajardo (@leorw)
709
+ * @since 2.3.0
710
+ */
711
+ $this->status['url'] = str_replace( '?', '?fs_allow_updater_and_dialog=true&amp;', $this->status['url'] );
712
+ }
713
+
714
+ if ( $can_install_free_version_update || $can_install_premium_version_update ) {
715
+ $actions[] = $this->get_cta(
716
+ ( $can_install_free_version_update ?
717
+ fs_esc_html_inline( 'Install Free Version Update Now', 'install-free-version-update-now', $api->slug ) :
718
+ fs_esc_html_inline( 'Install Update Now', 'install-update-now', $api->slug ) ),
719
+ true,
720
+ false,
721
+ $this->status['url'],
722
+ '_parent'
723
+ );
724
+ } else if ( $can_install_free_version || $can_install_premium_version ) {
725
+ $actions[] = $this->get_cta(
726
+ ( $can_install_free_version ?
727
+ fs_esc_html_inline( 'Install Free Version Now', 'install-free-version-now', $api->slug ) :
728
+ fs_esc_html_inline( 'Install Now', 'install-now', $api->slug ) ),
729
+ true,
730
+ false,
731
+ $this->status['url'],
732
+ '_parent'
733
+ );
734
+ }
735
+
736
+ $download_latest_action = '';
737
+
738
+ if (
739
+ ! empty( $api->download_link ) &&
740
+ ( $can_download_free_version || $can_download_premium_version )
741
+ ) {
742
+ $download_latest_action = $this->get_cta(
743
+ ( $can_download_free_version ?
744
+ fs_esc_html_x_inline( 'Download Latest Free Version', 'as download latest version', 'download-latest-free-version', $api->slug ) :
745
+ fs_esc_html_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $api->slug ) ),
746
+ true,
747
+ false,
748
+ esc_url( $api->download_link )
749
+ );
750
+ }
751
+
752
+ if ( ! $can_activate_free_version && ! $can_activate_premium_version ) {
753
+ if ( ! empty( $download_latest_action ) ) {
754
+ $actions[] = $download_latest_action;
755
+ }
756
+ } else {
757
+ $activate_action = sprintf(
758
+ '<a class="button button-primary edit" href="%s" title="%s" target="_parent">%s</a>',
759
+ wp_nonce_url( ( is_numeric( $blog_id ) ? trailingslashit( get_admin_url( $blog_id ) ) : '' ) . 'plugins.php?action=activate&amp;plugin=' . $this->status['file'], 'activate-plugin_' . $this->status['file'] ),
760
+ fs_esc_attr_inline( 'Activate this add-on', 'activate-this-addon', $api->slug ),
761
+ $can_activate_free_version ?
762
+ fs_text_inline( 'Activate Free Version', 'activate-free', $api->slug ) :
763
+ fs_text_inline( 'Activate', 'activate', $api->slug )
764
+ );
765
+
766
+ if ( ! $can_download_premium_version && ! empty( $download_latest_action ) ) {
767
+ $actions[] = $download_latest_action;
768
+
769
+ $download_latest_action = '';
770
+ }
771
+
772
+ if ( $can_install_premium_version || $can_install_premium_version_update ) {
773
+ if ( $can_download_premium_version && ! empty( $download_latest_action ) ) {
774
+ $actions[] = $download_latest_action;
775
+
776
+ $download_latest_action = '';
777
+ }
778
+
779
+ $actions[] = $activate_action;
780
+ } else {
781
+ array_unshift( $actions, $activate_action );
782
+ }
783
+
784
+ if ( ! empty ($download_latest_action ) ) {
785
+ $actions[] = $download_latest_action;
786
+ }
787
+ }
788
+
789
+ return $actions;
790
+ }
791
+
792
+ /**
793
+ * Rebuilds the status URL based on the admin URL.
794
+ *
795
+ * @author Leo Fajardo (@leorw)
796
+ * @since 2.3.0
797
+ *
798
+ * @param int $blog_id
799
+ * @param string $network_status_url
800
+ * @param string $status
801
+ *
802
+ * @return string
803
+ */
804
+ private static function get_blog_status_url( $blog_id, $network_status_url, $status ) {
805
+ if ( ! in_array( $status, array( 'install', 'update_available' ) ) ) {
806
+ return $network_status_url;
807
+ }
808
+
809
+ $action = ( 'install' === $status ) ?
810
+ 'install-plugin' :
811
+ 'upgrade-plugin';
812
+
813
+ $query = parse_url( $network_status_url, PHP_URL_QUERY );
814
+ if ( empty( $query ) ) {
815
+ return $network_status_url;
816
  }
817
 
818
+ parse_str( html_entity_decode( $query ), $url_params );
819
+ if ( empty( $url_params ) || ! isset( $url_params['plugin'] ) ) {
820
+ return $network_status_url;
821
+ }
822
+
823
+ $plugin = $url_params['plugin'];
824
+
825
+ return wp_nonce_url( get_admin_url( $blog_id,"update.php?action={$action}&plugin={$plugin}"), "{$action}_{$plugin}");
826
  }
827
 
828
  /**
1175
  }?>;
1176
  },
1177
  _updateCtaUrl = function (plan, pricing, cycle) {
1178
+ $('.plugin-information-pricing .fs-checkout-button, #plugin-information-footer .fs-checkout-button').attr('href', _checkoutUrl(plan, pricing, cycle));
1179
  };
1180
 
1181
  $(document).ready(function () {
1262
  <?php endif ?>
1263
  <ul class="fs-licenses">
1264
  </ul>
1265
+ <?php echo $this->get_actions_dropdown( $api, $plan ) ?>
1266
  <div style="clear:both"></div>
1267
  <?php if ( $plan->has_trial() ) : ?>
1268
  <?php $trial_period = $this->get_trial_period( $plan ) ?>
1487
  echo "</div>\n"; // #plugin-information-scrollable
1488
  echo "<div id='$tab-footer'>\n";
1489
 
1490
+ if (
1491
+ ! empty( $api->download_link ) &&
1492
+ ! empty( $this->status ) &&
1493
+ in_array( $this->status['status'], array( 'newer_installed', 'latest_installed' ) )
1494
+ ) {
1495
+ if ( 'newer_installed' === $this->status['status'] ) {
1496
+ echo $this->get_cta(
1497
+ ( $this->status['is_premium_installed'] ?
1498
+ esc_html( sprintf( fs_text_inline( 'Newer Version (%s) Installed', 'newer-installed', $api->slug ), $this->status['version'] ) ) :
1499
+ esc_html( sprintf( fs_text_inline( 'Newer Free Version (%s) Installed', 'newer-free-installed', $api->slug ), $this->status['version'] ) ) ),
1500
+ false,
1501
+ true
1502
+ );
1503
+ } else {
1504
+ echo $this->get_cta(
1505
+ ( $this->status['is_premium_installed'] ?
1506
+ fs_esc_html_inline( 'Latest Version Installed', 'latest-installed', $api->slug ) :
1507
+ fs_esc_html_inline( 'Latest Free Version Installed', 'latest-free-installed', $api->slug ) ),
1508
+ false,
1509
+ true
1510
+ );
1511
+ }
1512
  }
1513
 
1514
+ echo $this->get_actions_dropdown( $api, null );
 
 
1515
 
1516
  echo "</div>\n";
1517
+ ?>
1518
+ <script type="text/javascript">
1519
+ ( function( $, undef ) {
1520
+ var $dropdowns = $( '.fs-dropdown' );
1521
+
1522
+ $( '#plugin-information' )
1523
+ .click( function( evt ) {
1524
+ var $target = $( evt.target );
1525
+
1526
+ if (
1527
+ $target.hasClass( 'fs-dropdown-arrow-button' ) ||
1528
+ ( 0 !== $target.parents( '.fs-dropdown-arrow-button' ).length )
1529
+ ) {
1530
+ var $dropdown = $target.parents( '.fs-dropdown' ),
1531
+ isActive = $dropdown.hasClass( 'active' );
1532
+
1533
+ if ( ! isActive ) {
1534
+ /**
1535
+ * Close the other dropdown if it's active.
1536
+ *
1537
+ * @author Leo Fajardo (@leorw)
1538
+ * @since 2.3.0
1539
+ */
1540
+ $( '.fs-dropdown.active' ).each( function() {
1541
+ toggleDropdown( $( this ), false );
1542
+ } );
1543
+ }
1544
+
1545
+ /**
1546
+ * Toggle the current dropdown.
1547
+ *
1548
+ * @author Leo Fajardo (@leorw)
1549
+ * @since 2.3.0
1550
+ */
1551
+ toggleDropdown( $dropdown, ! isActive );
1552
+
1553
+ return true;
1554
+ }
1555
+
1556
+ /**
1557
+ * Close all dropdowns.
1558
+ *
1559
+ * @author Leo Fajardo (@leorw)
1560
+ * @since 2.3.0
1561
+ */
1562
+ toggleDropdown( $( this ).find( '.fs-dropdown' ), false );
1563
+ });
1564
+
1565
+ if ( 0 !== $dropdowns.length ) {
1566
+ /**
1567
+ * Add the `up` class so that the bottom dropdown's content will be shown above its buttons.
1568
+ *
1569
+ * @author Leo Fajardo (@leorw)
1570
+ * @since 2.3.0
1571
+ */
1572
+ $( '#plugin-information-footer' ).find( '.fs-dropdown' ).addClass( 'up' );
1573
+ }
1574
+
1575
+ /**
1576
+ * Returns the default state of the dropdown arrow button and hides the dropdown list.
1577
+ *
1578
+ * @author Leo Fajardo (@leorw)
1579
+ * @since 2.3.0
1580
+ *
1581
+ * @param {Object} [$dropdown]
1582
+ * @param {Boolean} [state]
1583
+ */
1584
+ function toggleDropdown( $dropdown, state ) {
1585
+ if ( undef === $dropdown ) {
1586
+ var $activeDropdown = $dropdowns.find( '.active' );
1587
+ if ( 0 !== $activeDropdown.length ) {
1588
+ $dropdown = $activeDropdown;
1589
+ }
1590
+ }
1591
 
1592
+ if ( undef === $dropdown ) {
1593
+ return;
1594
+ }
1595
+
1596
+ if ( undef === state ) {
1597
+ state = false;
1598
+ }
1599
+
1600
+ $dropdown.toggleClass( 'active', state );
1601
+ $dropdown.find( '.fs-dropdown-list' ).toggle( state );
1602
+ $dropdown.find( '.fs-dropdown-arrow-button' ).toggleClass( 'active', state );
1603
+ }
1604
+ } )( jQuery );
1605
+ </script>
1606
+ <?php
1607
  iframe_footer();
1608
  exit;
1609
  }
vendor/freemius/includes/i18n.php CHANGED
@@ -465,8 +465,8 @@
465
  'deactivate-plugin-title' => _fs_text( 'That\'s exhausting, please deactivate' ),
466
  'deactivate-plugin-desc' => _fs_text( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.' ),
467
  'fix-request-sent-message' => _fs_text( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.' ),
468
- 'server-blocking-access' => _fs_x( 'Your server is blocking the access to Freemius\' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s',
469
- '%1s - plugin title, %2s - API domain' ),
470
  'wrong-authentication-param-message' => _fs_text( 'It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again.' ),
471
  #endregion Connectivity Issues
472
  #region Change Owner
465
  'deactivate-plugin-title' => _fs_text( 'That\'s exhausting, please deactivate' ),
466
  'deactivate-plugin-desc' => _fs_text( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.' ),
467
  'fix-request-sent-message' => _fs_text( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.' ),
468
+ 'server-blocking-access' => _fs_x( 'Your server is blocking the access to Freemius\' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s',
469
+ '%1$s - plugin title, %2$s - API domain' ),
470
  'wrong-authentication-param-message' => _fs_text( 'It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again.' ),
471
  #endregion Connectivity Issues
472
  #region Change Owner
vendor/freemius/includes/managers/class-fs-admin-menu-manager.php CHANGED
@@ -204,9 +204,10 @@
204
  // ) );
205
  }
206
 
207
- $this->_first_time_path = $this->get_option( $menu, 'first-path', false );
208
- if ( ! empty( $this->_first_time_path ) && is_string( $this->_first_time_path ) ) {
209
- $this->_first_time_path = admin_url( $this->_first_time_path, 'admin' );
 
210
  }
211
  }
212
  }
@@ -236,17 +237,27 @@
236
  }
237
 
238
 
239
- /**
240
- * Get the path of the page the user should be forwarded to after first activation.
241
- *
242
- * @author Vova Feldman (@svovaf)
243
- * @since 1.1.3
244
- *
245
- * @return string
246
- */
247
- function get_first_time_path() {
248
- return $this->_first_time_path;
249
- }
 
 
 
 
 
 
 
 
 
 
250
 
251
  /**
252
  * Check if plugin's menu item is part of a custom top level menu.
204
  // ) );
205
  }
206
 
207
+ $first_path = $this->get_option( $menu, 'first-path', false );
208
+
209
+ if ( ! empty( $first_path ) && is_string( $first_path ) ) {
210
+ $this->_first_time_path = $first_path;
211
  }
212
  }
213
  }
237
  }
238
 
239
 
240
+ /**
241
+ * Get the path of the page the user should be forwarded to after first activation.
242
+ *
243
+ * @author Vova Feldman (@svovaf)
244
+ * @since 1.1.3
245
+ *
246
+ * @param bool $is_network Since 2.4.5
247
+ *
248
+ * @return string
249
+ */
250
+ function get_first_time_path( $is_network = false ) {
251
+ if ( empty ( $this->_first_time_path ) ) {
252
+ return $this->_first_time_path;
253
+ }
254
+
255
+ if ( $is_network ) {
256
+ return network_admin_url( $this->_first_time_path );
257
+ } else {
258
+ return admin_url( $this->_first_time_path );
259
+ }
260
+ }
261
 
262
  /**
263
  * Check if plugin's menu item is part of a custom top level menu.
vendor/freemius/includes/managers/class-fs-option-manager.php CHANGED
@@ -143,17 +143,24 @@
143
 
144
  $cache_group = $this->get_cache_group();
145
 
146
- if ( ! WP_FS__DEBUG_SDK ) {
 
 
 
 
 
147
 
148
  $this->_options = wp_cache_get(
149
  $option_name,
150
  $cache_group
151
  );
 
 
152
  }
153
 
154
  $cached = true;
155
 
156
- if ( empty( $this->_options ) ) {
157
  if ( $this->_is_network_storage ) {
158
  $this->_options = get_site_option( $option_name );
159
  } else if ( $this->_blog_id > 0 ) {
@@ -487,4 +494,4 @@
487
  }
488
 
489
  #endregion
490
- }
143
 
144
  $cache_group = $this->get_cache_group();
145
 
146
+ if ( WP_FS__DEBUG_SDK ) {
147
+
148
+ // Don't use cache layer in DEBUG mode.
149
+ $load_options = empty( $this->_options );
150
+
151
+ } else {
152
 
153
  $this->_options = wp_cache_get(
154
  $option_name,
155
  $cache_group
156
  );
157
+
158
+ $load_options = ( false === $this->_options );
159
  }
160
 
161
  $cached = true;
162
 
163
+ if ( $load_options ) {
164
  if ( $this->_is_network_storage ) {
165
  $this->_options = get_site_option( $option_name );
166
  } else if ( $this->_blog_id > 0 ) {
494
  }
495
 
496
  #endregion
497
+ }
vendor/freemius/languages/freemius.pot CHANGED
@@ -16,1317 +16,1382 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
- #: includes/class-freemius.php:1688
 
 
 
 
 
 
 
 
20
  msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
21
  msgstr ""
22
 
23
- #: includes/class-freemius.php:1690
24
  msgid "Error"
25
  msgstr ""
26
 
27
- #: includes/class-freemius.php:2011
28
  msgid "I found a better %s"
29
  msgstr ""
30
 
31
- #: includes/class-freemius.php:2013
32
  msgid "What's the %s's name?"
33
  msgstr ""
34
 
35
- #: includes/class-freemius.php:2019
36
  msgid "It's a temporary %s. I'm just debugging an issue."
37
  msgstr ""
38
 
39
- #: includes/class-freemius.php:2021
40
  msgid "Deactivation"
41
  msgstr ""
42
 
43
- #: includes/class-freemius.php:2022
44
  msgid "Theme Switch"
45
  msgstr ""
46
 
47
- #: includes/class-freemius.php:2031, templates/forms/resend-key.php:24
48
  msgid "Other"
49
  msgstr ""
50
 
51
- #: includes/class-freemius.php:2039
52
  msgid "I no longer need the %s"
53
  msgstr ""
54
 
55
- #: includes/class-freemius.php:2046
56
  msgid "I only needed the %s for a short period"
57
  msgstr ""
58
 
59
- #: includes/class-freemius.php:2052
60
  msgid "The %s broke my site"
61
  msgstr ""
62
 
63
- #: includes/class-freemius.php:2059
64
  msgid "The %s suddenly stopped working"
65
  msgstr ""
66
 
67
- #: includes/class-freemius.php:2069
68
  msgid "I can't pay for it anymore"
69
  msgstr ""
70
 
71
- #: includes/class-freemius.php:2071
72
  msgid "What price would you feel comfortable paying?"
73
  msgstr ""
74
 
75
- #: includes/class-freemius.php:2077
76
  msgid "I don't like to share my information with you"
77
  msgstr ""
78
 
79
- #: includes/class-freemius.php:2098
80
  msgid "The %s didn't work"
81
  msgstr ""
82
 
83
- #: includes/class-freemius.php:2108
84
  msgid "I couldn't understand how to make it work"
85
  msgstr ""
86
 
87
- #: includes/class-freemius.php:2116
88
  msgid "The %s is great, but I need specific feature that you don't support"
89
  msgstr ""
90
 
91
- #: includes/class-freemius.php:2118
92
  msgid "What feature?"
93
  msgstr ""
94
 
95
- #: includes/class-freemius.php:2122
96
  msgid "The %s is not working"
97
  msgstr ""
98
 
99
- #: includes/class-freemius.php:2124
100
  msgid "Kindly share what didn't work so we can fix it for future users..."
101
  msgstr ""
102
 
103
- #: includes/class-freemius.php:2128
104
  msgid "It's not what I was looking for"
105
  msgstr ""
106
 
107
- #: includes/class-freemius.php:2130
108
  msgid "What you've been looking for?"
109
  msgstr ""
110
 
111
- #: includes/class-freemius.php:2134
112
  msgid "The %s didn't work as expected"
113
  msgstr ""
114
 
115
- #: includes/class-freemius.php:2136
116
  msgid "What did you expect?"
117
  msgstr ""
118
 
119
- #: includes/class-freemius.php:2947, templates/debug.php:20
120
  msgid "Freemius Debug"
121
  msgstr ""
122
 
123
- #: includes/class-freemius.php:3675
124
  msgid "I don't know what is cURL or how to install it, help me!"
125
  msgstr ""
126
 
127
- #: includes/class-freemius.php:3677
128
  msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
129
  msgstr ""
130
 
131
- #: includes/class-freemius.php:3684
132
  msgid "Great, please install cURL and enable it in your php.ini file. In addition, search for the 'disable_functions' directive in your php.ini file and remove any disabled methods starting with 'curl_'. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the %s and reactivate it back again."
133
  msgstr ""
134
 
135
- #: includes/class-freemius.php:3789
136
  msgid "Yes - do your thing"
137
  msgstr ""
138
 
139
- #: includes/class-freemius.php:3794
140
  msgid "No - just deactivate"
141
  msgstr ""
142
 
143
- #: includes/class-freemius.php:3839, includes/class-freemius.php:4348, includes/class-freemius.php:5447, includes/class-freemius.php:11555, includes/class-freemius.php:14926, includes/class-freemius.php:14978, includes/class-freemius.php:15040, includes/class-freemius.php:17273, includes/class-freemius.php:17283, includes/class-freemius.php:17892, includes/class-freemius.php:18752, includes/class-freemius.php:18867, includes/class-freemius.php:19011, templates/add-ons.php:43
144
  msgctxt "exclamation"
145
  msgid "Oops"
146
  msgstr ""
147
 
148
- #: includes/class-freemius.php:3908
149
  msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
150
  msgstr ""
151
 
152
- #: includes/class-freemius.php:4345
153
  msgctxt "addonX cannot run without pluginY"
154
  msgid "%s cannot run without %s."
155
  msgstr ""
156
 
157
- #: includes/class-freemius.php:4346
158
  msgctxt "addonX cannot run..."
159
  msgid "%s cannot run without the plugin."
160
  msgstr ""
161
 
162
- #: includes/class-freemius.php:4492, includes/class-freemius.php:4517, includes/class-freemius.php:17963
163
  msgid "Unexpected API error. Please contact the %s's author with the following error."
164
  msgstr ""
165
 
166
- #: includes/class-freemius.php:5135
167
  msgid "Premium %s version was successfully activated."
168
  msgstr ""
169
 
170
- #: includes/class-freemius.php:5147, includes/class-freemius.php:7009
171
  msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
172
  msgid "W00t"
173
  msgstr ""
174
 
175
- #: includes/class-freemius.php:5162
176
  msgid "You have a %s license."
177
  msgstr ""
178
 
179
- #: includes/class-freemius.php:5166, includes/class-freemius.php:14347, includes/class-freemius.php:14358, includes/class-freemius.php:17187, includes/class-freemius.php:17501, includes/class-freemius.php:17567, includes/class-freemius.php:17717
180
  msgctxt "interjection expressing joy or exuberance"
181
  msgid "Yee-haw"
182
  msgstr ""
183
 
184
- #: includes/class-freemius.php:5430
185
  msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
186
  msgstr ""
187
 
188
- #: includes/class-freemius.php:5434
189
  msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
190
  msgstr ""
191
 
192
- #: includes/class-freemius.php:5443, templates/add-ons.php:103, templates/account/partials/addon.php:288
193
  msgid "More information about %s"
194
  msgstr ""
195
 
196
- #: includes/class-freemius.php:5444
197
  msgid "Purchase License"
198
  msgstr ""
199
 
200
- #: includes/class-freemius.php:6377, templates/connect.php:163
201
  msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s."
202
  msgstr ""
203
 
204
- #: includes/class-freemius.php:6381
205
  msgid "start the trial"
206
  msgstr ""
207
 
208
- #: includes/class-freemius.php:6382, templates/connect.php:167
209
  msgid "complete the install"
210
  msgstr ""
211
 
212
- #: includes/class-freemius.php:6495
213
  msgid "You are just one step away - %s"
214
  msgstr ""
215
 
216
- #: includes/class-freemius.php:6498
217
  msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
218
  msgid "Complete \"%s\" Activation Now"
219
  msgstr ""
220
 
221
- #: includes/class-freemius.php:6576
222
  msgid "We made a few tweaks to the %s, %s"
223
  msgstr ""
224
 
225
- #: includes/class-freemius.php:6580
226
  msgid "Opt in to make \"%s\" better!"
227
  msgstr ""
228
 
229
- #: includes/class-freemius.php:7008
230
  msgid "The upgrade of %s was successfully completed."
231
  msgstr ""
232
 
233
- #: includes/class-freemius.php:8935, includes/class-fs-plugin-updater.php:886, includes/class-fs-plugin-updater.php:1081, includes/class-fs-plugin-updater.php:1088, templates/auto-installation.php:32
234
  msgid "Add-On"
235
  msgstr ""
236
 
237
- #: includes/class-freemius.php:8937, templates/debug.php:359, templates/debug.php:520
238
  msgid "Plugin"
239
  msgstr ""
240
 
241
- #: includes/class-freemius.php:8938, templates/debug.php:359, templates/debug.php:520, templates/forms/deactivation/form.php:67
242
  msgid "Theme"
243
  msgstr ""
244
 
245
- #: includes/class-freemius.php:11422
 
 
 
 
246
  msgid "Invalid site details collection."
247
  msgstr ""
248
 
249
- #: includes/class-freemius.php:11542
250
  msgid "We couldn't find your email address in the system, are you sure it's the right address?"
251
  msgstr ""
252
 
253
- #: includes/class-freemius.php:11544
254
  msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
255
  msgstr ""
256
 
257
- #: includes/class-freemius.php:11818
258
  msgid "Account is pending activation."
259
  msgstr ""
260
 
261
- #: includes/class-freemius.php:11930, templates/forms/premium-versions-upgrade-handler.php:47
262
  msgid "Buy a license now"
263
  msgstr ""
264
 
265
- #: includes/class-freemius.php:11942, templates/forms/premium-versions-upgrade-handler.php:46
266
  msgid "Renew your license now"
267
  msgstr ""
268
 
269
- #: includes/class-freemius.php:11946
270
  msgid "%s to access version %s security & feature updates, and support."
271
  msgstr ""
272
 
273
- #: includes/class-freemius.php:14329
274
  msgid "%s activation was successfully completed."
275
  msgstr ""
276
 
277
- #: includes/class-freemius.php:14343
278
  msgid "Your account was successfully activated with the %s plan."
279
  msgstr ""
280
 
281
- #: includes/class-freemius.php:14354, includes/class-freemius.php:17563
282
  msgid "Your trial has been successfully started."
283
  msgstr ""
284
 
285
- #: includes/class-freemius.php:14924, includes/class-freemius.php:14976, includes/class-freemius.php:15038
286
  msgid "Couldn't activate %s."
287
  msgstr ""
288
 
289
- #: includes/class-freemius.php:14925, includes/class-freemius.php:14977, includes/class-freemius.php:15039
290
  msgid "Please contact us with the following message:"
291
  msgstr ""
292
 
293
- #: includes/class-freemius.php:15388, includes/class-freemius.php:19849
 
 
 
 
294
  msgid "Upgrade"
295
  msgstr ""
296
 
297
- #: includes/class-freemius.php:15394
298
  msgid "Start Trial"
299
  msgstr ""
300
 
301
- #: includes/class-freemius.php:15396
302
  msgid "Pricing"
303
  msgstr ""
304
 
305
- #: includes/class-freemius.php:15458, includes/class-freemius.php:15460
306
  msgid "Affiliation"
307
  msgstr ""
308
 
309
- #: includes/class-freemius.php:15488, includes/class-freemius.php:15490, templates/account.php:150, templates/debug.php:324
310
  msgid "Account"
311
  msgstr ""
312
 
313
- #: includes/class-freemius.php:15503, includes/class-freemius.php:15505, includes/customizer/class-fs-customizer-support-section.php:60
314
  msgid "Contact Us"
315
  msgstr ""
316
 
317
- #: includes/class-freemius.php:15515, includes/class-freemius.php:15517, includes/class-freemius.php:19859, templates/account.php:100, templates/account/partials/addon.php:41
318
  msgid "Add-Ons"
319
  msgstr ""
320
 
321
- #: includes/class-freemius.php:15551
322
  msgctxt "ASCII arrow left icon"
323
  msgid "&#x2190;"
324
  msgstr ""
325
 
326
- #: includes/class-freemius.php:15551
327
  msgctxt "ASCII arrow right icon"
328
  msgid "&#x27a4;"
329
  msgstr ""
330
 
331
- #: includes/class-freemius.php:15553, templates/pricing.php:97
332
  msgctxt "noun"
333
  msgid "Pricing"
334
  msgstr ""
335
 
336
- #: includes/class-freemius.php:15766, includes/customizer/class-fs-customizer-support-section.php:67
337
  msgid "Support Forum"
338
  msgstr ""
339
 
340
- #: includes/class-freemius.php:16552
341
  msgid "Your email has been successfully verified - you are AWESOME!"
342
  msgstr ""
343
 
344
- #: includes/class-freemius.php:16553
345
  msgctxt "a positive response"
346
  msgid "Right on"
347
  msgstr ""
348
 
349
- #: includes/class-freemius.php:17178
350
  msgid "Your %s Add-on plan was successfully upgraded."
351
  msgstr ""
352
 
353
- #: includes/class-freemius.php:17180
354
  msgid "%s Add-on was successfully purchased."
355
  msgstr ""
356
 
357
- #: includes/class-freemius.php:17183
358
  msgid "Download the latest version"
359
  msgstr ""
360
 
361
- #: includes/class-freemius.php:17269
362
- msgctxt "%1s - plugin title, %2s - API domain"
363
- msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
364
  msgstr ""
365
 
366
- #: includes/class-freemius.php:17272, includes/class-freemius.php:17688, includes/class-freemius.php:17765
367
  msgid "Error received from the server:"
368
  msgstr ""
369
 
370
- #: includes/class-freemius.php:17282
371
  msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
372
  msgstr ""
373
 
374
- #: includes/class-freemius.php:17464, includes/class-freemius.php:17693, includes/class-freemius.php:17736, includes/class-freemius.php:17839
375
  msgctxt "something somebody says when they are thinking about what you have just said."
376
  msgid "Hmm"
377
  msgstr ""
378
 
379
- #: includes/class-freemius.php:17477
380
  msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
381
  msgstr ""
382
 
383
- #: includes/class-freemius.php:17478, templates/account.php:102, templates/add-ons.php:134, templates/account/partials/addon.php:43
384
  msgctxt "trial period"
385
  msgid "Trial"
386
  msgstr ""
387
 
388
- #: includes/class-freemius.php:17483
389
  msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
390
  msgstr ""
391
 
392
- #: includes/class-freemius.php:17487, includes/class-freemius.php:17545
393
  msgid "Please contact us here"
394
  msgstr ""
395
 
396
- #: includes/class-freemius.php:17497
 
 
 
 
397
  msgid "Your plan was successfully upgraded."
398
  msgstr ""
399
 
400
- #: includes/class-freemius.php:17515
401
  msgid "Your plan was successfully changed to %s."
402
  msgstr ""
403
 
404
- #: includes/class-freemius.php:17531
405
  msgid "Your license has expired. You can still continue using the free %s forever."
406
  msgstr ""
407
 
408
- #: includes/class-freemius.php:17533
409
  msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
410
  msgstr ""
411
 
412
- #: includes/class-freemius.php:17541
413
  msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
414
  msgstr ""
415
 
416
- #: includes/class-freemius.php:17554
417
  msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
418
  msgstr ""
419
 
420
- #: includes/class-freemius.php:17577
421
  msgid "Your free trial has expired. You can still continue using all our free features."
422
  msgstr ""
423
 
424
- #: includes/class-freemius.php:17579
425
  msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
426
  msgstr ""
427
 
428
- #: includes/class-freemius.php:17684
429
  msgid "It looks like the license could not be activated."
430
  msgstr ""
431
 
432
- #: includes/class-freemius.php:17714
433
  msgid "Your license was successfully activated."
434
  msgstr ""
435
 
436
- #: includes/class-freemius.php:17740
437
  msgid "It looks like your site currently doesn't have an active license."
438
  msgstr ""
439
 
440
- #: includes/class-freemius.php:17764
441
  msgid "It looks like the license deactivation failed."
442
  msgstr ""
443
 
444
- #: includes/class-freemius.php:17792
445
  msgid "Your license was successfully deactivated, you are back to the %s plan."
446
  msgstr ""
447
 
448
- #: includes/class-freemius.php:17793
449
  msgid "O.K"
450
  msgstr ""
451
 
452
- #: includes/class-freemius.php:17846
453
  msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
454
  msgstr ""
455
 
456
- #: includes/class-freemius.php:17855
457
  msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
458
  msgstr ""
459
 
460
- #: includes/class-freemius.php:17897
461
  msgid "You are already running the %s in a trial mode."
462
  msgstr ""
463
 
464
- #: includes/class-freemius.php:17908
465
  msgid "You already utilized a trial before."
466
  msgstr ""
467
 
468
- #: includes/class-freemius.php:17922
469
  msgid "Plan %s do not exist, therefore, can't start a trial."
470
  msgstr ""
471
 
472
- #: includes/class-freemius.php:17933
473
  msgid "Plan %s does not support a trial period."
474
  msgstr ""
475
 
476
- #: includes/class-freemius.php:17944
477
  msgid "None of the %s's plans supports a trial period."
478
  msgstr ""
479
 
480
- #: includes/class-freemius.php:17994
481
  msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
482
  msgstr ""
483
 
484
- #: includes/class-freemius.php:18030
485
  msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
486
  msgstr ""
487
 
488
- #: includes/class-freemius.php:18049
489
  msgid "Your %s free trial was successfully cancelled."
490
  msgstr ""
491
 
492
- #: includes/class-freemius.php:18356
493
  msgid "Version %s was released."
494
  msgstr ""
495
 
496
- #: includes/class-freemius.php:18356
497
  msgid "Please download %s."
498
  msgstr ""
499
 
500
- #: includes/class-freemius.php:18363
501
  msgid "the latest %s version here"
502
  msgstr ""
503
 
504
- #: includes/class-freemius.php:18368
505
  msgid "New"
506
  msgstr ""
507
 
508
- #: includes/class-freemius.php:18373
509
  msgid "Seems like you got the latest release."
510
  msgstr ""
511
 
512
- #: includes/class-freemius.php:18374
513
  msgid "You are all good!"
514
  msgstr ""
515
 
516
- #: includes/class-freemius.php:18642
517
  msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
518
  msgstr ""
519
 
520
- #: includes/class-freemius.php:18779
521
  msgid "Site successfully opted in."
522
  msgstr ""
523
 
524
- #: includes/class-freemius.php:18780, includes/class-freemius.php:19591
525
  msgid "Awesome"
526
  msgstr ""
527
 
528
- #: includes/class-freemius.php:18796, templates/forms/optout.php:32
529
  msgid "We appreciate your help in making the %s better by letting us track some usage data."
530
  msgstr ""
531
 
532
- #: includes/class-freemius.php:18797
533
  msgid "Thank you!"
534
  msgstr ""
535
 
536
- #: includes/class-freemius.php:18804
537
  msgid "We will no longer be sending any usage data of %s on %s to %s."
538
  msgstr ""
539
 
540
- #: includes/class-freemius.php:18933
541
  msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
542
  msgstr ""
543
 
544
- #: includes/class-freemius.php:18939
545
  msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
546
  msgstr ""
547
 
548
- #: includes/class-freemius.php:18944
549
  msgid "%s is the new owner of the account."
550
  msgstr ""
551
 
552
- #: includes/class-freemius.php:18946
553
  msgctxt "as congratulations"
554
  msgid "Congrats"
555
  msgstr ""
556
 
557
- #: includes/class-freemius.php:18966
558
  msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
559
  msgstr ""
560
 
561
- #: includes/class-freemius.php:18967
562
  msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
563
  msgstr ""
564
 
565
- #: includes/class-freemius.php:18974
566
  msgid "Change Ownership"
567
  msgstr ""
568
 
569
- #: includes/class-freemius.php:18982
570
  msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
571
  msgstr ""
572
 
573
- #: includes/class-freemius.php:18994
574
  msgid "Please provide your full name."
575
  msgstr ""
576
 
577
- #: includes/class-freemius.php:18999
578
  msgid "Your name was successfully updated."
579
  msgstr ""
580
 
581
- #: includes/class-freemius.php:19060
582
  msgid "You have successfully updated your %s."
583
  msgstr ""
584
 
585
- #: includes/class-freemius.php:19200
586
  msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
587
  msgstr ""
588
 
589
- #: includes/class-freemius.php:19201
590
  msgctxt "advance notice of something that will need attention."
591
  msgid "Heads up"
592
  msgstr ""
593
 
594
- #: includes/class-freemius.php:19631
595
  msgctxt "exclamation"
596
  msgid "Hey"
597
  msgstr ""
598
 
599
- #: includes/class-freemius.php:19631
600
  msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
601
  msgstr ""
602
 
603
- #: includes/class-freemius.php:19639
604
  msgid "No commitment for %s days - cancel anytime!"
605
  msgstr ""
606
 
607
- #: includes/class-freemius.php:19640
608
  msgid "No credit card required"
609
  msgstr ""
610
 
611
- #: includes/class-freemius.php:19647, templates/forms/trial-start.php:53
612
  msgctxt "call to action"
613
  msgid "Start free trial"
614
  msgstr ""
615
 
616
- #: includes/class-freemius.php:19724
617
  msgid "Hey there, did you know that %s has an affiliate program? If you like the %s you can become our ambassador and earn some cash!"
618
  msgstr ""
619
 
620
- #: includes/class-freemius.php:19733
621
  msgid "Learn more"
622
  msgstr ""
623
 
624
- #: includes/class-freemius.php:19883, templates/account.php:406, templates/account.php:509, templates/connect.php:171, templates/connect.php:421, templates/forms/license-activation.php:24, templates/account/partials/addon.php:235
625
  msgid "Activate License"
626
  msgstr ""
627
 
628
- #: includes/class-freemius.php:19884, templates/account.php:469, templates/account.php:508, templates/account/partials/site.php:256
629
  msgid "Change License"
630
  msgstr ""
631
 
632
- #: includes/class-freemius.php:19966, templates/account/partials/site.php:161
633
  msgid "Opt Out"
634
  msgstr ""
635
 
636
- #: includes/class-freemius.php:19968, includes/class-freemius.php:19973, templates/account/partials/site.php:43, templates/account/partials/site.php:161
637
  msgid "Opt In"
638
  msgstr ""
639
 
640
- #: includes/class-freemius.php:20197
641
- msgid " The paid version of %1s is already installed. Please activate it to start benefiting the %2s features. %3s"
642
  msgstr ""
643
 
644
- #: includes/class-freemius.php:20205
645
  msgid "Activate %s features"
646
  msgstr ""
647
 
648
- #: includes/class-freemius.php:20218
649
  msgid "Please follow these steps to complete the upgrade"
650
  msgstr ""
651
 
652
- #: includes/class-freemius.php:20222
653
  msgid "Download the latest %s version"
654
  msgstr ""
655
 
656
- #: includes/class-freemius.php:20226
657
  msgid "Upload and activate the downloaded version"
658
  msgstr ""
659
 
660
- #: includes/class-freemius.php:20228
661
  msgid "How to upload and activate?"
662
  msgstr ""
663
 
664
- #: includes/class-freemius.php:20362
665
  msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
666
  msgstr ""
667
 
668
- #: includes/class-freemius.php:20523
669
  msgid "Auto installation only works for opted-in users."
670
  msgstr ""
671
 
672
- #: includes/class-freemius.php:20533, includes/class-freemius.php:20566, includes/class-fs-plugin-updater.php:1060, includes/class-fs-plugin-updater.php:1074
673
  msgid "Invalid module ID."
674
  msgstr ""
675
 
676
- #: includes/class-freemius.php:20542, includes/class-fs-plugin-updater.php:1096
677
  msgid "Premium version already active."
678
  msgstr ""
679
 
680
- #: includes/class-freemius.php:20549
681
  msgid "You do not have a valid license to access the premium version."
682
  msgstr ""
683
 
684
- #: includes/class-freemius.php:20556
685
  msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
686
  msgstr ""
687
 
688
- #: includes/class-freemius.php:20574, includes/class-fs-plugin-updater.php:1095
689
  msgid "Premium add-on version already installed."
690
  msgstr ""
691
 
692
- #: includes/class-freemius.php:20919
693
  msgid "View paid features"
694
  msgstr ""
695
 
696
- #: includes/class-freemius.php:21239
697
  msgid "Thank you so much for using %s and its add-ons!"
698
  msgstr ""
699
 
700
- #: includes/class-freemius.php:21240
701
  msgid "Thank you so much for using %s!"
702
  msgstr ""
703
 
704
- #: includes/class-freemius.php:21246
705
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
706
  msgstr ""
707
 
708
- #: includes/class-freemius.php:21250
709
  msgid "Thank you so much for using our products!"
710
  msgstr ""
711
 
712
- #: includes/class-freemius.php:21251
713
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
714
  msgstr ""
715
 
716
- #: includes/class-freemius.php:21270
717
  msgid "%s and its add-ons"
718
  msgstr ""
719
 
720
- #: includes/class-freemius.php:21279
721
  msgid "Products"
722
  msgstr ""
723
 
724
- #: includes/class-freemius.php:21286, templates/connect.php:272
725
  msgid "Yes"
726
  msgstr ""
727
 
728
- #: includes/class-freemius.php:21287, templates/connect.php:273
729
  msgid "send me security & feature updates, educational content and offers."
730
  msgstr ""
731
 
732
- #: includes/class-freemius.php:21288, templates/connect.php:278
733
  msgid "No"
734
  msgstr ""
735
 
736
- #: includes/class-freemius.php:21290, templates/connect.php:280
737
  msgid "do %sNOT%s send me security & feature updates, educational content and offers."
738
  msgstr ""
739
 
740
- #: includes/class-freemius.php:21300
741
- msgid "Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard 🙂"
742
  msgstr ""
743
 
744
- #: includes/class-freemius.php:21302, templates/connect.php:287
745
  msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
746
  msgstr ""
747
 
748
- #: includes/class-freemius.php:21584
749
  msgid "License key is empty."
750
  msgstr ""
751
 
752
- #: includes/class-fs-plugin-updater.php:184, templates/forms/premium-versions-upgrade-handler.php:57
753
  msgid "Renew license"
754
  msgstr ""
755
 
756
- #: includes/class-fs-plugin-updater.php:189, templates/forms/premium-versions-upgrade-handler.php:58
757
  msgid "Buy license"
758
  msgstr ""
759
 
760
- #: includes/class-fs-plugin-updater.php:278
761
  msgid "There is a %s of %s available."
762
  msgstr ""
763
 
764
- #: includes/class-fs-plugin-updater.php:282
 
 
 
 
765
  msgid "new version"
766
  msgstr ""
767
 
768
- #: includes/class-fs-plugin-updater.php:305
769
  msgid "Important Upgrade Notice:"
770
  msgstr ""
771
 
772
- #: includes/class-fs-plugin-updater.php:1125
773
  msgid "Installing plugin: %s"
774
  msgstr ""
775
 
776
- #: includes/class-fs-plugin-updater.php:1166
777
  msgid "Unable to connect to the filesystem. Please confirm your credentials."
778
  msgstr ""
779
 
780
- #: includes/class-fs-plugin-updater.php:1348
781
  msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
782
  msgstr ""
783
 
784
- #: includes/fs-plugin-info-dialog.php:369, templates/account/partials/addon.php:292
 
 
 
 
785
  msgctxt "verb"
786
  msgid "Purchase"
787
  msgstr ""
788
 
789
- #: includes/fs-plugin-info-dialog.php:372
790
  msgid "Start my free %s"
791
  msgstr ""
792
 
793
- #: includes/fs-plugin-info-dialog.php:413
 
 
 
 
 
 
 
 
794
  msgid "Install Free Version Now"
795
  msgstr ""
796
 
797
- #: includes/fs-plugin-info-dialog.php:414, templates/auto-installation.php:111, templates/account/partials/addon.php:272, templates/account/partials/addon.php:322
798
  msgid "Install Now"
799
  msgstr ""
800
 
801
- #: includes/fs-plugin-info-dialog.php:425
802
  msgctxt "as download latest version"
803
  msgid "Download Latest Free Version"
804
  msgstr ""
805
 
806
- #: includes/fs-plugin-info-dialog.php:426, templates/account.php:80, templates/account/partials/addon.php:21
807
  msgctxt "as download latest version"
808
  msgid "Download Latest"
809
  msgstr ""
810
 
811
- #: includes/fs-plugin-info-dialog.php:436
812
- msgid "Install Free Version Update Now"
813
- msgstr ""
814
-
815
- #: includes/fs-plugin-info-dialog.php:437, templates/account.php:460
816
- msgid "Install Update Now"
817
- msgstr ""
818
-
819
- #: includes/fs-plugin-info-dialog.php:448
820
- msgid "Newer Free Version (%s) Installed"
821
- msgstr ""
822
-
823
- #: includes/fs-plugin-info-dialog.php:449
824
- msgid "Newer Version (%s) Installed"
825
  msgstr ""
826
 
827
- #: includes/fs-plugin-info-dialog.php:457
828
- msgid "Latest Free Version Installed"
829
  msgstr ""
830
 
831
- #: includes/fs-plugin-info-dialog.php:458
832
- msgid "Latest Version Installed"
833
  msgstr ""
834
 
835
- #: includes/fs-plugin-info-dialog.php:613
836
  msgctxt "Plugin installer section title"
837
  msgid "Description"
838
  msgstr ""
839
 
840
- #: includes/fs-plugin-info-dialog.php:614
841
  msgctxt "Plugin installer section title"
842
  msgid "Installation"
843
  msgstr ""
844
 
845
- #: includes/fs-plugin-info-dialog.php:615
846
  msgctxt "Plugin installer section title"
847
  msgid "FAQ"
848
  msgstr ""
849
 
850
- #: includes/fs-plugin-info-dialog.php:616, templates/plugin-info/description.php:55
851
  msgid "Screenshots"
852
  msgstr ""
853
 
854
- #: includes/fs-plugin-info-dialog.php:617
855
  msgctxt "Plugin installer section title"
856
  msgid "Changelog"
857
  msgstr ""
858
 
859
- #: includes/fs-plugin-info-dialog.php:618
860
  msgctxt "Plugin installer section title"
861
  msgid "Reviews"
862
  msgstr ""
863
 
864
- #: includes/fs-plugin-info-dialog.php:619
865
  msgctxt "Plugin installer section title"
866
  msgid "Other Notes"
867
  msgstr ""
868
 
869
- #: includes/fs-plugin-info-dialog.php:634
870
  msgctxt "Plugin installer section title"
871
  msgid "Features & Pricing"
872
  msgstr ""
873
 
874
- #: includes/fs-plugin-info-dialog.php:644
875
  msgid "Plugin Install"
876
  msgstr ""
877
 
878
- #: includes/fs-plugin-info-dialog.php:716
879
  msgctxt "e.g. Professional Plan"
880
  msgid "%s Plan"
881
  msgstr ""
882
 
883
- #: includes/fs-plugin-info-dialog.php:742
884
  msgctxt "e.g. the best product"
885
  msgid "Best"
886
  msgstr ""
887
 
888
- #: includes/fs-plugin-info-dialog.php:748, includes/fs-plugin-info-dialog.php:768
889
  msgctxt "as every month"
890
  msgid "Monthly"
891
  msgstr ""
892
 
893
- #: includes/fs-plugin-info-dialog.php:751
894
  msgctxt "as once a year"
895
  msgid "Annual"
896
  msgstr ""
897
 
898
- #: includes/fs-plugin-info-dialog.php:754
899
  msgid "Lifetime"
900
  msgstr ""
901
 
902
- #: includes/fs-plugin-info-dialog.php:768, includes/fs-plugin-info-dialog.php:770, includes/fs-plugin-info-dialog.php:772
903
  msgctxt "e.g. billed monthly"
904
  msgid "Billed %s"
905
  msgstr ""
906
 
907
- #: includes/fs-plugin-info-dialog.php:770
908
  msgctxt "as once a year"
909
  msgid "Annually"
910
  msgstr ""
911
 
912
- #: includes/fs-plugin-info-dialog.php:772
913
  msgctxt "as once a year"
914
  msgid "Once"
915
  msgstr ""
916
 
917
- #: includes/fs-plugin-info-dialog.php:778
918
  msgid "Single Site License"
919
  msgstr ""
920
 
921
- #: includes/fs-plugin-info-dialog.php:780
922
  msgid "Unlimited Licenses"
923
  msgstr ""
924
 
925
- #: includes/fs-plugin-info-dialog.php:782
926
  msgid "Up to %s Sites"
927
  msgstr ""
928
 
929
- #: includes/fs-plugin-info-dialog.php:792, templates/plugin-info/features.php:82
930
  msgctxt "as monthly period"
931
  msgid "mo"
932
  msgstr ""
933
 
934
- #: includes/fs-plugin-info-dialog.php:799, templates/plugin-info/features.php:80
935
  msgctxt "as annual period"
936
  msgid "year"
937
  msgstr ""
938
 
939
- #: includes/fs-plugin-info-dialog.php:853
940
  msgctxt "noun"
941
  msgid "Price"
942
  msgstr ""
943
 
944
- #: includes/fs-plugin-info-dialog.php:901
945
  msgid "Save %s"
946
  msgstr ""
947
 
948
- #: includes/fs-plugin-info-dialog.php:911
949
  msgid "No commitment for %s - cancel anytime"
950
  msgstr ""
951
 
952
- #: includes/fs-plugin-info-dialog.php:914
953
  msgid "After your free %s, pay as little as %s"
954
  msgstr ""
955
 
956
- #: includes/fs-plugin-info-dialog.php:925
957
  msgid "Details"
958
  msgstr ""
959
 
960
- #: includes/fs-plugin-info-dialog.php:929, templates/account.php:91, templates/debug.php:201, templates/debug.php:238, templates/debug.php:452, templates/account/partials/addon.php:32
961
  msgctxt "product version"
962
  msgid "Version"
963
  msgstr ""
964
 
965
- #: includes/fs-plugin-info-dialog.php:936
966
  msgctxt "as the plugin author"
967
  msgid "Author"
968
  msgstr ""
969
 
970
- #: includes/fs-plugin-info-dialog.php:943
971
  msgid "Last Updated"
972
  msgstr ""
973
 
974
- #: includes/fs-plugin-info-dialog.php:948, templates/account.php:376
975
  msgctxt "x-ago"
976
  msgid "%s ago"
977
  msgstr ""
978
 
979
- #: includes/fs-plugin-info-dialog.php:957
980
  msgid "Requires WordPress Version"
981
  msgstr ""
982
 
983
- #: includes/fs-plugin-info-dialog.php:958
984
  msgid "%s or higher"
985
  msgstr ""
986
 
987
- #: includes/fs-plugin-info-dialog.php:965
988
  msgid "Compatible up to"
989
  msgstr ""
990
 
991
- #: includes/fs-plugin-info-dialog.php:973
992
  msgid "Downloaded"
993
  msgstr ""
994
 
995
- #: includes/fs-plugin-info-dialog.php:977
996
  msgid "%s time"
997
  msgstr ""
998
 
999
- #: includes/fs-plugin-info-dialog.php:979
1000
  msgid "%s times"
1001
  msgstr ""
1002
 
1003
- #: includes/fs-plugin-info-dialog.php:989
1004
  msgid "WordPress.org Plugin Page"
1005
  msgstr ""
1006
 
1007
- #: includes/fs-plugin-info-dialog.php:997
1008
  msgid "Plugin Homepage"
1009
  msgstr ""
1010
 
1011
- #: includes/fs-plugin-info-dialog.php:1005, includes/fs-plugin-info-dialog.php:1087
1012
  msgid "Donate to this plugin"
1013
  msgstr ""
1014
 
1015
- #: includes/fs-plugin-info-dialog.php:1012
1016
  msgid "Average Rating"
1017
  msgstr ""
1018
 
1019
- #: includes/fs-plugin-info-dialog.php:1019
1020
  msgid "based on %s"
1021
  msgstr ""
1022
 
1023
- #: includes/fs-plugin-info-dialog.php:1023
1024
  msgid "%s rating"
1025
  msgstr ""
1026
 
1027
- #: includes/fs-plugin-info-dialog.php:1025
1028
  msgid "%s ratings"
1029
  msgstr ""
1030
 
1031
- #: includes/fs-plugin-info-dialog.php:1040
1032
  msgid "%s star"
1033
  msgstr ""
1034
 
1035
- #: includes/fs-plugin-info-dialog.php:1042
1036
  msgid "%s stars"
1037
  msgstr ""
1038
 
1039
- #: includes/fs-plugin-info-dialog.php:1053
1040
  msgid "Click to see reviews that provided a rating of %s"
1041
  msgstr ""
1042
 
1043
- #: includes/fs-plugin-info-dialog.php:1066
1044
  msgid "Contributors"
1045
  msgstr ""
1046
 
1047
- #: includes/fs-plugin-info-dialog.php:1095, includes/fs-plugin-info-dialog.php:1097
1048
  msgid "Warning"
1049
  msgstr ""
1050
 
1051
- #: includes/fs-plugin-info-dialog.php:1095
1052
  msgid "This plugin has not been tested with your current version of WordPress."
1053
  msgstr ""
1054
 
1055
- #: includes/fs-plugin-info-dialog.php:1097
1056
  msgid "This plugin has not been marked as compatible with your version of WordPress."
1057
  msgstr ""
1058
 
1059
- #: includes/fs-plugin-info-dialog.php:1116
1060
  msgid "Paid add-on must be deployed to Freemius."
1061
  msgstr ""
1062
 
1063
- #: includes/fs-plugin-info-dialog.php:1117
1064
  msgid "Add-on must be deployed to WordPress.org or Freemius."
1065
  msgstr ""
1066
 
1067
- #: templates/account.php:81, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:22, templates/account/partials/site.php:295
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1068
  msgid "Downgrading your plan"
1069
  msgstr ""
1070
 
1071
- #: templates/account.php:82, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:23, templates/account/partials/site.php:296
1072
  msgid "Cancelling the subscription"
1073
  msgstr ""
1074
 
1075
- #. translators: %1s: Either 'Downgrading your plan' or 'Cancelling the subscription'
1076
- #: templates/account.php:84, templates/forms/subscription-cancellation.php:99, templates/account/partials/addon.php:25, templates/account/partials/site.php:298
1077
- msgid "%1s will immediately stop all future recurring payments and your %s plan license will expire in %s."
1078
  msgstr ""
1079
 
1080
- #: templates/account.php:85, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:26, templates/account/partials/site.php:299
1081
  msgid "Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price."
1082
  msgstr ""
1083
 
1084
- #: templates/account.php:86, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:27
1085
  msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
1086
  msgstr ""
1087
 
1088
- #: templates/account.php:87, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:28, templates/account/partials/site.php:300
1089
  msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
1090
  msgstr ""
1091
 
1092
- #: templates/account.php:88, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:29, templates/account/partials/site.php:301
1093
  msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
1094
  msgstr ""
1095
 
1096
  #. translators: %s: Plan title (e.g. "Professional")
1097
- #: templates/account.php:90, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:31
1098
  msgid "Activate %s Plan"
1099
  msgstr ""
1100
 
1101
  #. translators: %s: Time period (e.g. Auto renews in "2 months")
1102
- #: templates/account.php:93, templates/account/partials/addon.php:34, templates/account/partials/site.php:275
1103
  msgid "Auto renews in %s"
1104
  msgstr ""
1105
 
1106
  #. translators: %s: Time period (e.g. Expires in "2 months")
1107
- #: templates/account.php:95, templates/account/partials/addon.php:36, templates/account/partials/site.php:277
1108
  msgid "Expires in %s"
1109
  msgstr ""
1110
 
1111
- #: templates/account.php:96, templates/account/partials/addon.php:37
1112
  msgctxt "as synchronize license"
1113
  msgid "Sync License"
1114
  msgstr ""
1115
 
1116
- #: templates/account.php:97, templates/account/partials/addon.php:38
1117
  msgid "Cancel Trial"
1118
  msgstr ""
1119
 
1120
- #: templates/account.php:98, templates/account/partials/addon.php:39
1121
  msgid "Change Plan"
1122
  msgstr ""
1123
 
1124
- #: templates/account.php:99, templates/account/partials/addon.php:40
1125
  msgctxt "verb"
1126
  msgid "Upgrade"
1127
  msgstr ""
1128
 
1129
- #: templates/account.php:101, templates/account/partials/addon.php:42, templates/account/partials/site.php:302
1130
  msgctxt "verb"
1131
  msgid "Downgrade"
1132
  msgstr ""
1133
 
1134
- #: templates/account.php:103, templates/add-ons.php:130, templates/plugin-info/features.php:72, templates/account/partials/addon.php:44, templates/account/partials/site.php:31
1135
  msgid "Free"
1136
  msgstr ""
1137
 
1138
- #: templates/account.php:104, templates/account/partials/addon.php:45
1139
- msgid "Activate"
1140
- msgstr ""
1141
-
1142
- #: templates/account.php:105, templates/debug.php:371, includes/customizer/class-fs-customizer-upsell-control.php:106, templates/account/partials/addon.php:46
1143
  msgctxt "as product pricing plan"
1144
  msgid "Plan"
1145
  msgstr ""
1146
 
1147
- #: templates/account.php:158
 
 
 
 
1148
  msgid "Free Trial"
1149
  msgstr ""
1150
 
1151
- #: templates/account.php:169
1152
  msgid "Account Details"
1153
  msgstr ""
1154
 
1155
- #: templates/account.php:179
 
 
 
 
1156
  msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
1157
  msgstr ""
1158
 
1159
- #: templates/account.php:181
1160
  msgid "Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?"
1161
  msgstr ""
1162
 
1163
- #: templates/account.php:184
1164
  msgid "Delete Account"
1165
  msgstr ""
1166
 
1167
- #: templates/account.php:196, templates/account/partials/addon.php:159, templates/account/partials/deactivate-license-button.php:35
1168
  msgid "Deactivate License"
1169
  msgstr ""
1170
 
1171
- #: templates/account.php:219, templates/forms/subscription-cancellation.php:125
1172
  msgid "Are you sure you want to proceed?"
1173
  msgstr ""
1174
 
1175
- #: templates/account.php:219, templates/account/partials/addon.php:182
1176
  msgid "Cancel Subscription"
1177
  msgstr ""
1178
 
1179
- #: templates/account.php:247
1180
  msgctxt "as synchronize"
1181
  msgid "Sync"
1182
  msgstr ""
1183
 
1184
- #: templates/account.php:261, templates/debug.php:487
1185
  msgid "Name"
1186
  msgstr ""
1187
 
1188
- #: templates/account.php:267, templates/debug.php:488
1189
  msgid "Email"
1190
  msgstr ""
1191
 
1192
- #: templates/account.php:274, templates/debug.php:370, templates/debug.php:526
1193
  msgid "User ID"
1194
  msgstr ""
1195
 
1196
- #: templates/account.php:282
 
 
 
 
1197
  msgid "Site ID"
1198
  msgstr ""
1199
 
1200
- #: templates/account.php:285
1201
  msgid "No ID"
1202
  msgstr ""
1203
 
1204
- #: templates/account.php:290, templates/debug.php:243, templates/debug.php:372, templates/debug.php:453, templates/debug.php:490, templates/account/partials/site.php:219
1205
  msgid "Public Key"
1206
  msgstr ""
1207
 
1208
- #: templates/account.php:296, templates/debug.php:373, templates/debug.php:454, templates/debug.php:491, templates/account/partials/site.php:231
1209
  msgid "Secret Key"
1210
  msgstr ""
1211
 
1212
- #: templates/account.php:299
1213
  msgctxt "as secret encryption key missing"
1214
  msgid "No Secret"
1215
  msgstr ""
1216
 
1217
- #: templates/account.php:318, templates/account/partials/site.php:112, templates/account/partials/site.php:114
1218
  msgid "Trial"
1219
  msgstr ""
1220
 
1221
- #: templates/account.php:337, templates/debug.php:531, templates/account/partials/site.php:248
1222
  msgid "License Key"
1223
  msgstr ""
1224
 
1225
- #: templates/account.php:367
 
 
 
 
1226
  msgid "not verified"
1227
  msgstr ""
1228
 
1229
- #: templates/account.php:376, templates/account/partials/addon.php:120
1230
  msgid "Expired"
1231
  msgstr ""
1232
 
1233
- #: templates/account.php:428
1234
  msgid "Premium version"
1235
  msgstr ""
1236
 
1237
- #: templates/account.php:430
1238
  msgid "Free version"
1239
  msgstr ""
1240
 
1241
- #: templates/account.php:442
1242
  msgid "Verify Email"
1243
  msgstr ""
1244
 
1245
- #: templates/account.php:453
1246
  msgid "Download %s Version"
1247
  msgstr ""
1248
 
1249
- #: templates/account.php:467, templates/account.php:649, templates/account/partials/site.php:237, templates/account/partials/site.php:255
1250
  msgctxt "verb"
1251
  msgid "Show"
1252
  msgstr ""
1253
 
1254
- #: templates/account.php:481
1255
  msgid "What is your %s?"
1256
  msgstr ""
1257
 
1258
- #: templates/account.php:489, templates/account/billing.php:27
1259
  msgctxt "verb"
1260
  msgid "Edit"
1261
  msgstr ""
1262
 
1263
- #: templates/account.php:502
1264
  msgid "Sites"
1265
  msgstr ""
1266
 
1267
- #: templates/account.php:513
1268
  msgid "Search by address"
1269
  msgstr ""
1270
 
1271
- #: templates/account.php:522, templates/account.php:570, templates/debug.php:236, templates/debug.php:364, templates/debug.php:449, templates/debug.php:486, templates/debug.php:524, templates/debug.php:597, templates/account/payments.php:35, templates/debug/logger.php:21
1272
- msgid "ID"
1273
- msgstr ""
1274
-
1275
- #: templates/account.php:523, templates/debug.php:367
1276
  msgid "Address"
1277
  msgstr ""
1278
 
1279
- #: templates/account.php:524
1280
  msgid "License"
1281
  msgstr ""
1282
 
1283
- #: templates/account.php:525
1284
  msgid "Plan"
1285
  msgstr ""
1286
 
1287
- #: templates/account.php:573
1288
  msgctxt "as software license"
1289
  msgid "License"
1290
  msgstr ""
1291
 
1292
- #: templates/account.php:643
1293
  msgctxt "verb"
1294
  msgid "Hide"
1295
  msgstr ""
1296
 
1297
- #: templates/account.php:686
 
 
 
 
 
 
 
 
1298
  msgid "Cancelling %s"
1299
  msgstr ""
1300
 
1301
- #: templates/account.php:686, templates/account.php:703, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:117
1302
  msgid "trial"
1303
  msgstr ""
1304
 
1305
- #: templates/account.php:701, templates/forms/deactivation/form.php:134
1306
  msgid "Cancelling %s..."
1307
  msgstr ""
1308
 
1309
- #: templates/account.php:704, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:118
1310
  msgid "subscription"
1311
  msgstr ""
1312
 
1313
- #: templates/account.php:718
1314
  msgid "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
1315
  msgstr ""
1316
 
1317
- #: templates/add-ons.php:36
 
 
 
 
1318
  msgid "Add Ons for %s"
1319
  msgstr ""
1320
 
1321
- #: templates/add-ons.php:44
1322
  msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
1323
  msgstr ""
1324
 
1325
- #: templates/add-ons.php:139
1326
- msgid "View details"
 
 
 
 
 
 
1327
  msgstr ""
1328
 
1329
- #: templates/admin-notice.php:13, templates/forms/license-activation.php:208, templates/forms/resend-key.php:77
1330
  msgctxt "as close a window"
1331
  msgid "Dismiss"
1332
  msgstr ""
@@ -1351,11 +1416,11 @@ msgstr ""
1351
  msgid "Cancel Installation"
1352
  msgstr ""
1353
 
1354
- #: templates/checkout.php:172
1355
  msgid "Checkout"
1356
  msgstr ""
1357
 
1358
- #: templates/checkout.php:172
1359
  msgid "PCI compliant"
1360
  msgstr ""
1361
 
@@ -1377,7 +1442,7 @@ msgstr ""
1377
  msgid "Thanks %s!"
1378
  msgstr ""
1379
 
1380
- #: templates/connect.php:172, templates/forms/license-activation.php:43
1381
  msgid "Agree & Activate License"
1382
  msgstr ""
1383
 
@@ -1425,15 +1490,15 @@ msgstr ""
1425
  msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
1426
  msgstr ""
1427
 
1428
- #: templates/connect.php:253, templates/forms/license-activation.php:46
1429
  msgid "License key"
1430
  msgstr ""
1431
 
1432
- #: templates/connect.php:256, templates/forms/license-activation.php:19
1433
  msgid "Can't find your license key?"
1434
  msgstr ""
1435
 
1436
- #: templates/connect.php:315, templates/connect.php:630, templates/forms/deactivation/retry-skip.php:20
1437
  msgctxt "verb"
1438
  msgid "Skip"
1439
  msgstr ""
@@ -1482,7 +1547,7 @@ msgstr ""
1482
  msgid "Newsletter"
1483
  msgstr ""
1484
 
1485
- #: templates/connect.php:391, templates/forms/license-activation.php:38
1486
  msgid "The %1$s will be periodically sending data to %2$s to check for security and feature updates, and verify the validity of your license."
1487
  msgstr ""
1488
 
@@ -1494,10 +1559,6 @@ msgstr ""
1494
  msgid "Don't have a license key?"
1495
  msgstr ""
1496
 
1497
- #: templates/connect.php:418
1498
- msgid "Activate Free Version"
1499
- msgstr ""
1500
-
1501
  #: templates/connect.php:420
1502
  msgid "Have a license key?"
1503
  msgstr ""
@@ -1514,12 +1575,12 @@ msgstr ""
1514
  msgid "Terms of Service"
1515
  msgstr ""
1516
 
1517
- #: templates/connect.php:766
1518
  msgctxt "as in the process of sending an email"
1519
  msgid "Sending email"
1520
  msgstr ""
1521
 
1522
- #: templates/connect.php:767
1523
  msgctxt "as activating plugin"
1524
  msgid "Activating"
1525
  msgstr ""
@@ -1547,7 +1608,7 @@ msgctxt "as code debugging"
1547
  msgid "Debugging"
1548
  msgstr ""
1549
 
1550
- #: templates/debug.php:54, templates/debug.php:248, templates/debug.php:374, templates/debug.php:492
1551
  msgid "Actions"
1552
  msgstr ""
1553
 
@@ -1583,186 +1644,186 @@ msgstr ""
1583
  msgid "Set DB Option"
1584
  msgstr ""
1585
 
1586
- #: templates/debug.php:180
1587
  msgid "Key"
1588
  msgstr ""
1589
 
1590
- #: templates/debug.php:181
1591
  msgid "Value"
1592
  msgstr ""
1593
 
1594
- #: templates/debug.php:197
1595
  msgctxt "as software development kit versions"
1596
  msgid "SDK Versions"
1597
  msgstr ""
1598
 
1599
- #: templates/debug.php:202
1600
  msgid "SDK Path"
1601
  msgstr ""
1602
 
1603
- #: templates/debug.php:203, templates/debug.php:242
1604
  msgid "Module Path"
1605
  msgstr ""
1606
 
1607
- #: templates/debug.php:204
1608
  msgid "Is Active"
1609
  msgstr ""
1610
 
1611
- #: templates/debug.php:232, templates/debug/plugins-themes-sync.php:35
1612
  msgid "Plugins"
1613
  msgstr ""
1614
 
1615
- #: templates/debug.php:232, templates/debug/plugins-themes-sync.php:56
1616
  msgid "Themes"
1617
  msgstr ""
1618
 
1619
- #: templates/debug.php:237, templates/debug.php:369, templates/debug.php:451, templates/debug/scheduled-crons.php:80
1620
  msgid "Slug"
1621
  msgstr ""
1622
 
1623
- #: templates/debug.php:239, templates/debug.php:450
1624
  msgid "Title"
1625
  msgstr ""
1626
 
1627
- #: templates/debug.php:240
1628
  msgctxt "as application program interface"
1629
  msgid "API"
1630
  msgstr ""
1631
 
1632
- #: templates/debug.php:241
1633
  msgid "Freemius State"
1634
  msgstr ""
1635
 
1636
- #: templates/debug.php:245
1637
  msgid "Network Blog"
1638
  msgstr ""
1639
 
1640
- #: templates/debug.php:246
1641
  msgid "Network User"
1642
  msgstr ""
1643
 
1644
- #: templates/debug.php:283
1645
  msgctxt "as connection was successful"
1646
  msgid "Connected"
1647
  msgstr ""
1648
 
1649
- #: templates/debug.php:284
1650
  msgctxt "as connection blocked"
1651
  msgid "Blocked"
1652
  msgstr ""
1653
 
1654
- #: templates/debug.php:320
1655
  msgid "Simulate Trial Promotion"
1656
  msgstr ""
1657
 
1658
- #: templates/debug.php:332
1659
  msgid "Simulate Network Upgrade"
1660
  msgstr ""
1661
 
1662
- #: templates/debug.php:358
1663
  msgid "%s Installs"
1664
  msgstr ""
1665
 
1666
- #: templates/debug.php:360
1667
  msgctxt "like websites"
1668
  msgid "Sites"
1669
  msgstr ""
1670
 
1671
- #: templates/debug.php:366, templates/account/partials/site.php:148
1672
  msgid "Blog ID"
1673
  msgstr ""
1674
 
1675
- #: templates/debug.php:431, templates/debug.php:509, templates/account/partials/addon.php:339
1676
  msgctxt "verb"
1677
  msgid "Delete"
1678
  msgstr ""
1679
 
1680
- #: templates/debug.php:445
1681
  msgid "Add Ons of module %s"
1682
  msgstr ""
1683
 
1684
- #: templates/debug.php:482
1685
  msgid "Users"
1686
  msgstr ""
1687
 
1688
- #: templates/debug.php:489
1689
  msgid "Verified"
1690
  msgstr ""
1691
 
1692
- #: templates/debug.php:520
1693
  msgid "%s Licenses"
1694
  msgstr ""
1695
 
1696
- #: templates/debug.php:525
1697
  msgid "Plugin ID"
1698
  msgstr ""
1699
 
1700
- #: templates/debug.php:527
1701
  msgid "Plan ID"
1702
  msgstr ""
1703
 
1704
- #: templates/debug.php:528
1705
  msgid "Quota"
1706
  msgstr ""
1707
 
1708
- #: templates/debug.php:529
1709
  msgid "Activated"
1710
  msgstr ""
1711
 
1712
- #: templates/debug.php:530
1713
  msgid "Blocking"
1714
  msgstr ""
1715
 
1716
- #: templates/debug.php:532
1717
  msgctxt "as expiration date"
1718
  msgid "Expiration"
1719
  msgstr ""
1720
 
1721
- #: templates/debug.php:555
1722
  msgid "Debug Log"
1723
  msgstr ""
1724
 
1725
- #: templates/debug.php:559
1726
  msgid "All Types"
1727
  msgstr ""
1728
 
1729
- #: templates/debug.php:566
1730
  msgid "All Requests"
1731
  msgstr ""
1732
 
1733
- #: templates/debug.php:571, templates/debug.php:600, templates/debug/logger.php:25
1734
  msgid "File"
1735
  msgstr ""
1736
 
1737
- #: templates/debug.php:572, templates/debug.php:598, templates/debug/logger.php:23
1738
  msgid "Function"
1739
  msgstr ""
1740
 
1741
- #: templates/debug.php:573
1742
  msgid "Process ID"
1743
  msgstr ""
1744
 
1745
- #: templates/debug.php:574
1746
  msgid "Logger"
1747
  msgstr ""
1748
 
1749
- #: templates/debug.php:575, templates/debug.php:599, templates/debug/logger.php:24
1750
  msgid "Message"
1751
  msgstr ""
1752
 
1753
- #: templates/debug.php:577
1754
  msgid "Filter"
1755
  msgstr ""
1756
 
1757
- #: templates/debug.php:585
1758
  msgid "Download"
1759
  msgstr ""
1760
 
1761
- #: templates/debug.php:596, templates/debug/logger.php:22
1762
  msgid "Type"
1763
  msgstr ""
1764
 
1765
- #: templates/debug.php:601, templates/debug/logger.php:26
1766
  msgid "Timestamp"
1767
  msgstr ""
1768
 
@@ -1787,52 +1848,52 @@ msgstr ""
1787
  msgid "Requests"
1788
  msgstr ""
1789
 
1790
- #: templates/account/billing.php:28
1791
  msgctxt "verb"
1792
  msgid "Update"
1793
  msgstr ""
1794
 
1795
- #: templates/account/billing.php:39
1796
  msgid "Billing"
1797
  msgstr ""
1798
 
1799
- #: templates/account/billing.php:44, templates/account/billing.php:44
1800
  msgid "Business name"
1801
  msgstr ""
1802
 
1803
- #: templates/account/billing.php:45, templates/account/billing.php:45
1804
  msgid "Tax / VAT ID"
1805
  msgstr ""
1806
 
1807
- #: templates/account/billing.php:48, templates/account/billing.php:48, templates/account/billing.php:49, templates/account/billing.php:49
1808
  msgid "Address Line %d"
1809
  msgstr ""
1810
 
1811
- #: templates/account/billing.php:52, templates/account/billing.php:52
1812
  msgid "City"
1813
  msgstr ""
1814
 
1815
- #: templates/account/billing.php:52, templates/account/billing.php:52
1816
  msgid "Town"
1817
  msgstr ""
1818
 
1819
- #: templates/account/billing.php:53, templates/account/billing.php:53
1820
  msgid "ZIP / Postal Code"
1821
  msgstr ""
1822
 
1823
- #: templates/account/billing.php:308
1824
  msgid "Country"
1825
  msgstr ""
1826
 
1827
- #: templates/account/billing.php:310
1828
  msgid "Select Country"
1829
  msgstr ""
1830
 
1831
- #: templates/account/billing.php:317, templates/account/billing.php:318
1832
  msgid "State"
1833
  msgstr ""
1834
 
1835
- #: templates/account/billing.php:317, templates/account/billing.php:318
1836
  msgid "Province"
1837
  msgstr ""
1838
 
@@ -2080,11 +2141,11 @@ msgstr ""
2080
  msgid "Become an affiliate"
2081
  msgstr ""
2082
 
2083
- #: templates/forms/license-activation.php:20
2084
  msgid "Please enter the license key that you received in the email right after the purchase:"
2085
  msgstr ""
2086
 
2087
- #: templates/forms/license-activation.php:25
2088
  msgid "Update License"
2089
  msgstr ""
2090
 
@@ -2151,6 +2212,11 @@ msgstr ""
2151
  msgid "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
2152
  msgstr ""
2153
 
 
 
 
 
 
2154
  #: templates/forms/subscription-cancellation.php:103
2155
  msgid "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
2156
  msgstr ""
@@ -2163,7 +2229,7 @@ msgstr ""
2163
  msgid "Proceed"
2164
  msgstr ""
2165
 
2166
- #: templates/forms/subscription-cancellation.php:191, templates/forms/deactivation/form.php:150
2167
  msgid "Cancel %s & Proceed"
2168
  msgstr ""
2169
 
@@ -2175,35 +2241,39 @@ msgstr ""
2175
  msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt in with your user and non-sensitive site information, allowing the %s to periodically send data to %s to check for version updates and to validate your trial."
2176
  msgstr ""
2177
 
2178
- #: templates/js/style-premium-theme.php:37
2179
  msgid "Premium"
2180
  msgstr ""
2181
 
2182
- #: templates/partials/network-activation.php:23
 
 
 
 
2183
  msgid "Activate license on all sites in the network."
2184
  msgstr ""
2185
 
2186
- #: templates/partials/network-activation.php:24
2187
  msgid "Apply on all sites in the network."
2188
  msgstr ""
2189
 
2190
- #: templates/partials/network-activation.php:27
2191
  msgid "Activate license on all pending sites."
2192
  msgstr ""
2193
 
2194
- #: templates/partials/network-activation.php:28
2195
  msgid "Apply on all pending sites."
2196
  msgstr ""
2197
 
2198
- #: templates/partials/network-activation.php:36, templates/partials/network-activation.php:68
2199
  msgid "allow"
2200
  msgstr ""
2201
 
2202
- #: templates/partials/network-activation.php:38, templates/partials/network-activation.php:70
2203
  msgid "delegate"
2204
  msgstr ""
2205
 
2206
- #: templates/partials/network-activation.php:41, templates/partials/network-activation.php:73
2207
  msgid "skip"
2208
  msgstr ""
2209
 
@@ -2228,18 +2298,14 @@ msgstr ""
2228
  msgid "Last license"
2229
  msgstr ""
2230
 
2231
- #: templates/account/partials/addon.php:115
2232
  msgid "Cancelled"
2233
  msgstr ""
2234
 
2235
- #: templates/account/partials/addon.php:125
2236
  msgid "No expiration"
2237
  msgstr ""
2238
 
2239
- #: templates/account/partials/addon.php:264, templates/account/partials/addon.php:317
2240
- msgid "Activate this add-on"
2241
- msgstr ""
2242
-
2243
  #: templates/account/partials/site.php:181
2244
  msgid "Owner Name"
2245
  msgstr ""
@@ -2264,47 +2330,47 @@ msgstr ""
2264
  msgid "Contact Support"
2265
  msgstr ""
2266
 
2267
- #: templates/forms/deactivation/form.php:59
2268
  msgid "Anonymous feedback"
2269
  msgstr ""
2270
 
2271
- #: templates/forms/deactivation/form.php:66
2272
  msgid "Deactivate"
2273
  msgstr ""
2274
 
2275
- #: templates/forms/deactivation/form.php:68
2276
  msgid "Activate %s"
2277
  msgstr ""
2278
 
2279
- #: templates/forms/deactivation/form.php:80
2280
  msgid "Quick Feedback"
2281
  msgstr ""
2282
 
2283
- #: templates/forms/deactivation/form.php:84
2284
  msgid "If you have a moment, please let us know why you are %s"
2285
  msgstr ""
2286
 
2287
- #: templates/forms/deactivation/form.php:84
2288
  msgid "deactivating"
2289
  msgstr ""
2290
 
2291
- #: templates/forms/deactivation/form.php:84
2292
  msgid "switching"
2293
  msgstr ""
2294
 
2295
- #: templates/forms/deactivation/form.php:332
2296
  msgid "Submit & %s"
2297
  msgstr ""
2298
 
2299
- #: templates/forms/deactivation/form.php:353
2300
  msgid "Kindly tell us the reason so we can improve."
2301
  msgstr ""
2302
 
2303
- #: templates/forms/deactivation/form.php:478
2304
  msgid "Yes - %s"
2305
  msgstr ""
2306
 
2307
- #: templates/forms/deactivation/form.php:485
2308
  msgid "Skip & %s"
2309
  msgstr ""
2310
 
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
+ #: includes/class-freemius.php:1783, templates/account.php:769
20
+ msgid "An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned."
21
+ msgstr ""
22
+
23
+ #: includes/class-freemius.php:1790
24
+ msgid "Would you like to proceed with the update?"
25
+ msgstr ""
26
+
27
+ #: includes/class-freemius.php:1998
28
  msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
29
  msgstr ""
30
 
31
+ #: includes/class-freemius.php:2000
32
  msgid "Error"
33
  msgstr ""
34
 
35
+ #: includes/class-freemius.php:2390
36
  msgid "I found a better %s"
37
  msgstr ""
38
 
39
+ #: includes/class-freemius.php:2392
40
  msgid "What's the %s's name?"
41
  msgstr ""
42
 
43
+ #: includes/class-freemius.php:2398
44
  msgid "It's a temporary %s. I'm just debugging an issue."
45
  msgstr ""
46
 
47
+ #: includes/class-freemius.php:2400
48
  msgid "Deactivation"
49
  msgstr ""
50
 
51
+ #: includes/class-freemius.php:2401
52
  msgid "Theme Switch"
53
  msgstr ""
54
 
55
+ #: includes/class-freemius.php:2410, templates/forms/resend-key.php:24
56
  msgid "Other"
57
  msgstr ""
58
 
59
+ #: includes/class-freemius.php:2418
60
  msgid "I no longer need the %s"
61
  msgstr ""
62
 
63
+ #: includes/class-freemius.php:2425
64
  msgid "I only needed the %s for a short period"
65
  msgstr ""
66
 
67
+ #: includes/class-freemius.php:2431
68
  msgid "The %s broke my site"
69
  msgstr ""
70
 
71
+ #: includes/class-freemius.php:2438
72
  msgid "The %s suddenly stopped working"
73
  msgstr ""
74
 
75
+ #: includes/class-freemius.php:2448
76
  msgid "I can't pay for it anymore"
77
  msgstr ""
78
 
79
+ #: includes/class-freemius.php:2450
80
  msgid "What price would you feel comfortable paying?"
81
  msgstr ""
82
 
83
+ #: includes/class-freemius.php:2456
84
  msgid "I don't like to share my information with you"
85
  msgstr ""
86
 
87
+ #: includes/class-freemius.php:2477
88
  msgid "The %s didn't work"
89
  msgstr ""
90
 
91
+ #: includes/class-freemius.php:2487
92
  msgid "I couldn't understand how to make it work"
93
  msgstr ""
94
 
95
+ #: includes/class-freemius.php:2495
96
  msgid "The %s is great, but I need specific feature that you don't support"
97
  msgstr ""
98
 
99
+ #: includes/class-freemius.php:2497
100
  msgid "What feature?"
101
  msgstr ""
102
 
103
+ #: includes/class-freemius.php:2501
104
  msgid "The %s is not working"
105
  msgstr ""
106
 
107
+ #: includes/class-freemius.php:2503
108
  msgid "Kindly share what didn't work so we can fix it for future users..."
109
  msgstr ""
110
 
111
+ #: includes/class-freemius.php:2507
112
  msgid "It's not what I was looking for"
113
  msgstr ""
114
 
115
+ #: includes/class-freemius.php:2509
116
  msgid "What you've been looking for?"
117
  msgstr ""
118
 
119
+ #: includes/class-freemius.php:2513
120
  msgid "The %s didn't work as expected"
121
  msgstr ""
122
 
123
+ #: includes/class-freemius.php:2515
124
  msgid "What did you expect?"
125
  msgstr ""
126
 
127
+ #: includes/class-freemius.php:3370, templates/debug.php:20
128
  msgid "Freemius Debug"
129
  msgstr ""
130
 
131
+ #: includes/class-freemius.php:4122
132
  msgid "I don't know what is cURL or how to install it, help me!"
133
  msgstr ""
134
 
135
+ #: includes/class-freemius.php:4124
136
  msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
137
  msgstr ""
138
 
139
+ #: includes/class-freemius.php:4131
140
  msgid "Great, please install cURL and enable it in your php.ini file. In addition, search for the 'disable_functions' directive in your php.ini file and remove any disabled methods starting with 'curl_'. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the %s and reactivate it back again."
141
  msgstr ""
142
 
143
+ #: includes/class-freemius.php:4236
144
  msgid "Yes - do your thing"
145
  msgstr ""
146
 
147
+ #: includes/class-freemius.php:4241
148
  msgid "No - just deactivate"
149
  msgstr ""
150
 
151
+ #: includes/class-freemius.php:4286, includes/class-freemius.php:4795, includes/class-freemius.php:5936, includes/class-freemius.php:12614, includes/class-freemius.php:15975, includes/class-freemius.php:16063, includes/class-freemius.php:16229, includes/class-freemius.php:18688, includes/class-freemius.php:18698, includes/class-freemius.php:19334, includes/class-freemius.php:20207, includes/class-freemius.php:20322, includes/class-freemius.php:20466, templates/add-ons.php:54
152
  msgctxt "exclamation"
153
  msgid "Oops"
154
  msgstr ""
155
 
156
+ #: includes/class-freemius.php:4355
157
  msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
158
  msgstr ""
159
 
160
+ #: includes/class-freemius.php:4792
161
  msgctxt "addonX cannot run without pluginY"
162
  msgid "%s cannot run without %s."
163
  msgstr ""
164
 
165
+ #: includes/class-freemius.php:4793
166
  msgctxt "addonX cannot run..."
167
  msgid "%s cannot run without the plugin."
168
  msgstr ""
169
 
170
+ #: includes/class-freemius.php:4965, includes/class-freemius.php:4990, includes/class-freemius.php:19405
171
  msgid "Unexpected API error. Please contact the %s's author with the following error."
172
  msgstr ""
173
 
174
+ #: includes/class-freemius.php:5624
175
  msgid "Premium %s version was successfully activated."
176
  msgstr ""
177
 
178
+ #: includes/class-freemius.php:5636, includes/class-freemius.php:7504
179
  msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
180
  msgid "W00t"
181
  msgstr ""
182
 
183
+ #: includes/class-freemius.php:5651
184
  msgid "You have a %s license."
185
  msgstr ""
186
 
187
+ #: includes/class-freemius.php:5655, includes/class-freemius.php:15396, includes/class-freemius.php:15407, includes/class-freemius.php:18599, includes/class-freemius.php:18929, includes/class-freemius.php:18995, includes/class-freemius.php:19159
188
  msgctxt "interjection expressing joy or exuberance"
189
  msgid "Yee-haw"
190
  msgstr ""
191
 
192
+ #: includes/class-freemius.php:5919
193
  msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
194
  msgstr ""
195
 
196
+ #: includes/class-freemius.php:5923
197
  msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
198
  msgstr ""
199
 
200
+ #: includes/class-freemius.php:5932, templates/add-ons.php:130, templates/account/partials/addon.php:343
201
  msgid "More information about %s"
202
  msgstr ""
203
 
204
+ #: includes/class-freemius.php:5933
205
  msgid "Purchase License"
206
  msgstr ""
207
 
208
+ #: includes/class-freemius.php:6868, templates/connect.php:163
209
  msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s."
210
  msgstr ""
211
 
212
+ #: includes/class-freemius.php:6872
213
  msgid "start the trial"
214
  msgstr ""
215
 
216
+ #: includes/class-freemius.php:6873, templates/connect.php:167
217
  msgid "complete the install"
218
  msgstr ""
219
 
220
+ #: includes/class-freemius.php:6986
221
  msgid "You are just one step away - %s"
222
  msgstr ""
223
 
224
+ #: includes/class-freemius.php:6989
225
  msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
226
  msgid "Complete \"%s\" Activation Now"
227
  msgstr ""
228
 
229
+ #: includes/class-freemius.php:7067
230
  msgid "We made a few tweaks to the %s, %s"
231
  msgstr ""
232
 
233
+ #: includes/class-freemius.php:7071
234
  msgid "Opt in to make \"%s\" better!"
235
  msgstr ""
236
 
237
+ #: includes/class-freemius.php:7503
238
  msgid "The upgrade of %s was successfully completed."
239
  msgstr ""
240
 
241
+ #: includes/class-freemius.php:9665, includes/class-fs-plugin-updater.php:1014, includes/class-fs-plugin-updater.php:1209, includes/class-fs-plugin-updater.php:1216, templates/auto-installation.php:32
242
  msgid "Add-On"
243
  msgstr ""
244
 
245
+ #: includes/class-freemius.php:9667, templates/account.php:313, templates/account.php:321, templates/debug.php:361, templates/debug.php:522
246
  msgid "Plugin"
247
  msgstr ""
248
 
249
+ #: includes/class-freemius.php:9668, templates/account.php:314, templates/account.php:322, templates/debug.php:361, templates/debug.php:522, templates/forms/deactivation/form.php:71
250
  msgid "Theme"
251
  msgstr ""
252
 
253
+ #: includes/class-freemius.php:12085
254
+ msgid "An unknown error has occurred while trying to set the user's beta mode."
255
+ msgstr ""
256
+
257
+ #: includes/class-freemius.php:12481
258
  msgid "Invalid site details collection."
259
  msgstr ""
260
 
261
+ #: includes/class-freemius.php:12601
262
  msgid "We couldn't find your email address in the system, are you sure it's the right address?"
263
  msgstr ""
264
 
265
+ #: includes/class-freemius.php:12603
266
  msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
267
  msgstr ""
268
 
269
+ #: includes/class-freemius.php:12877
270
  msgid "Account is pending activation."
271
  msgstr ""
272
 
273
+ #: includes/class-freemius.php:12989, templates/forms/premium-versions-upgrade-handler.php:47
274
  msgid "Buy a license now"
275
  msgstr ""
276
 
277
+ #: includes/class-freemius.php:13001, templates/forms/premium-versions-upgrade-handler.php:46
278
  msgid "Renew your license now"
279
  msgstr ""
280
 
281
+ #: includes/class-freemius.php:13005
282
  msgid "%s to access version %s security & feature updates, and support."
283
  msgstr ""
284
 
285
+ #: includes/class-freemius.php:15378
286
  msgid "%s activation was successfully completed."
287
  msgstr ""
288
 
289
+ #: includes/class-freemius.php:15392
290
  msgid "Your account was successfully activated with the %s plan."
291
  msgstr ""
292
 
293
+ #: includes/class-freemius.php:15403, includes/class-freemius.php:18991
294
  msgid "Your trial has been successfully started."
295
  msgstr ""
296
 
297
+ #: includes/class-freemius.php:15973, includes/class-freemius.php:16061, includes/class-freemius.php:16227
298
  msgid "Couldn't activate %s."
299
  msgstr ""
300
 
301
+ #: includes/class-freemius.php:15974, includes/class-freemius.php:16062, includes/class-freemius.php:16228
302
  msgid "Please contact us with the following message:"
303
  msgstr ""
304
 
305
+ #: includes/class-freemius.php:16058
306
+ msgid "An unknown error has occurred."
307
+ msgstr ""
308
+
309
+ #: includes/class-freemius.php:16585, includes/class-freemius.php:21339
310
  msgid "Upgrade"
311
  msgstr ""
312
 
313
+ #: includes/class-freemius.php:16591
314
  msgid "Start Trial"
315
  msgstr ""
316
 
317
+ #: includes/class-freemius.php:16593
318
  msgid "Pricing"
319
  msgstr ""
320
 
321
+ #: includes/class-freemius.php:16672, includes/class-freemius.php:16674
322
  msgid "Affiliation"
323
  msgstr ""
324
 
325
+ #: includes/class-freemius.php:16702, includes/class-freemius.php:16704, templates/account.php:177, templates/debug.php:326
326
  msgid "Account"
327
  msgstr ""
328
 
329
+ #: includes/class-freemius.php:16717, includes/class-freemius.php:16719, includes/customizer/class-fs-customizer-support-section.php:60
330
  msgid "Contact Us"
331
  msgstr ""
332
 
333
+ #: includes/class-freemius.php:16729, includes/class-freemius.php:16731, includes/class-freemius.php:21353, templates/account.php:105, templates/account/partials/addon.php:45
334
  msgid "Add-Ons"
335
  msgstr ""
336
 
337
+ #: includes/class-freemius.php:16765
338
  msgctxt "ASCII arrow left icon"
339
  msgid "&#x2190;"
340
  msgstr ""
341
 
342
+ #: includes/class-freemius.php:16765
343
  msgctxt "ASCII arrow right icon"
344
  msgid "&#x27a4;"
345
  msgstr ""
346
 
347
+ #: includes/class-freemius.php:16767, templates/pricing.php:102
348
  msgctxt "noun"
349
  msgid "Pricing"
350
  msgstr ""
351
 
352
+ #: includes/class-freemius.php:16980, includes/customizer/class-fs-customizer-support-section.php:67
353
  msgid "Support Forum"
354
  msgstr ""
355
 
356
+ #: includes/class-freemius.php:17925
357
  msgid "Your email has been successfully verified - you are AWESOME!"
358
  msgstr ""
359
 
360
+ #: includes/class-freemius.php:17926
361
  msgctxt "a positive response"
362
  msgid "Right on"
363
  msgstr ""
364
 
365
+ #: includes/class-freemius.php:18590
366
  msgid "Your %s Add-on plan was successfully upgraded."
367
  msgstr ""
368
 
369
+ #: includes/class-freemius.php:18592
370
  msgid "%s Add-on was successfully purchased."
371
  msgstr ""
372
 
373
+ #: includes/class-freemius.php:18595
374
  msgid "Download the latest version"
375
  msgstr ""
376
 
377
+ #: includes/class-freemius.php:18681
378
+ msgid "Your server is blocking the access to Freemius' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s"
 
379
  msgstr ""
380
 
381
+ #: includes/class-freemius.php:18687, includes/class-freemius.php:19118, includes/class-freemius.php:19207
382
  msgid "Error received from the server:"
383
  msgstr ""
384
 
385
+ #: includes/class-freemius.php:18697
386
  msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
387
  msgstr ""
388
 
389
+ #: includes/class-freemius.php:18891, includes/class-freemius.php:19123, includes/class-freemius.php:19178, includes/class-freemius.php:19281
390
  msgctxt "something somebody says when they are thinking about what you have just said."
391
  msgid "Hmm"
392
  msgstr ""
393
 
394
+ #: includes/class-freemius.php:18904
395
  msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
396
  msgstr ""
397
 
398
+ #: includes/class-freemius.php:18905, templates/account.php:107, templates/add-ons.php:191, templates/account/partials/addon.php:47
399
  msgctxt "trial period"
400
  msgid "Trial"
401
  msgstr ""
402
 
403
+ #: includes/class-freemius.php:18910
404
  msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
405
  msgstr ""
406
 
407
+ #: includes/class-freemius.php:18914, includes/class-freemius.php:18973
408
  msgid "Please contact us here"
409
  msgstr ""
410
 
411
+ #: includes/class-freemius.php:18925
412
+ msgid "Your plan was successfully activated."
413
+ msgstr ""
414
+
415
+ #: includes/class-freemius.php:18926
416
  msgid "Your plan was successfully upgraded."
417
  msgstr ""
418
 
419
+ #: includes/class-freemius.php:18943
420
  msgid "Your plan was successfully changed to %s."
421
  msgstr ""
422
 
423
+ #: includes/class-freemius.php:18959
424
  msgid "Your license has expired. You can still continue using the free %s forever."
425
  msgstr ""
426
 
427
+ #: includes/class-freemius.php:18961
428
  msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
429
  msgstr ""
430
 
431
+ #: includes/class-freemius.php:18969
432
  msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
433
  msgstr ""
434
 
435
+ #: includes/class-freemius.php:18982
436
  msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
437
  msgstr ""
438
 
439
+ #: includes/class-freemius.php:19005
440
  msgid "Your free trial has expired. You can still continue using all our free features."
441
  msgstr ""
442
 
443
+ #: includes/class-freemius.php:19007
444
  msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
445
  msgstr ""
446
 
447
+ #: includes/class-freemius.php:19114
448
  msgid "It looks like the license could not be activated."
449
  msgstr ""
450
 
451
+ #: includes/class-freemius.php:19156
452
  msgid "Your license was successfully activated."
453
  msgstr ""
454
 
455
+ #: includes/class-freemius.php:19182
456
  msgid "It looks like your site currently doesn't have an active license."
457
  msgstr ""
458
 
459
+ #: includes/class-freemius.php:19206
460
  msgid "It looks like the license deactivation failed."
461
  msgstr ""
462
 
463
+ #: includes/class-freemius.php:19234
464
  msgid "Your license was successfully deactivated, you are back to the %s plan."
465
  msgstr ""
466
 
467
+ #: includes/class-freemius.php:19235
468
  msgid "O.K"
469
  msgstr ""
470
 
471
+ #: includes/class-freemius.php:19288
472
  msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
473
  msgstr ""
474
 
475
+ #: includes/class-freemius.php:19297
476
  msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
477
  msgstr ""
478
 
479
+ #: includes/class-freemius.php:19339
480
  msgid "You are already running the %s in a trial mode."
481
  msgstr ""
482
 
483
+ #: includes/class-freemius.php:19350
484
  msgid "You already utilized a trial before."
485
  msgstr ""
486
 
487
+ #: includes/class-freemius.php:19364
488
  msgid "Plan %s do not exist, therefore, can't start a trial."
489
  msgstr ""
490
 
491
+ #: includes/class-freemius.php:19375
492
  msgid "Plan %s does not support a trial period."
493
  msgstr ""
494
 
495
+ #: includes/class-freemius.php:19386
496
  msgid "None of the %s's plans supports a trial period."
497
  msgstr ""
498
 
499
+ #: includes/class-freemius.php:19436
500
  msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
501
  msgstr ""
502
 
503
+ #: includes/class-freemius.php:19472
504
  msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
505
  msgstr ""
506
 
507
+ #: includes/class-freemius.php:19491
508
  msgid "Your %s free trial was successfully cancelled."
509
  msgstr ""
510
 
511
+ #: includes/class-freemius.php:19807
512
  msgid "Version %s was released."
513
  msgstr ""
514
 
515
+ #: includes/class-freemius.php:19807
516
  msgid "Please download %s."
517
  msgstr ""
518
 
519
+ #: includes/class-freemius.php:19814
520
  msgid "the latest %s version here"
521
  msgstr ""
522
 
523
+ #: includes/class-freemius.php:19819
524
  msgid "New"
525
  msgstr ""
526
 
527
+ #: includes/class-freemius.php:19824
528
  msgid "Seems like you got the latest release."
529
  msgstr ""
530
 
531
+ #: includes/class-freemius.php:19825
532
  msgid "You are all good!"
533
  msgstr ""
534
 
535
+ #: includes/class-freemius.php:20095
536
  msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
537
  msgstr ""
538
 
539
+ #: includes/class-freemius.php:20234
540
  msgid "Site successfully opted in."
541
  msgstr ""
542
 
543
+ #: includes/class-freemius.php:20235, includes/class-freemius.php:21055
544
  msgid "Awesome"
545
  msgstr ""
546
 
547
+ #: includes/class-freemius.php:20251, templates/forms/optout.php:32
548
  msgid "We appreciate your help in making the %s better by letting us track some usage data."
549
  msgstr ""
550
 
551
+ #: includes/class-freemius.php:20252
552
  msgid "Thank you!"
553
  msgstr ""
554
 
555
+ #: includes/class-freemius.php:20259
556
  msgid "We will no longer be sending any usage data of %s on %s to %s."
557
  msgstr ""
558
 
559
+ #: includes/class-freemius.php:20388
560
  msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
561
  msgstr ""
562
 
563
+ #: includes/class-freemius.php:20394
564
  msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
565
  msgstr ""
566
 
567
+ #: includes/class-freemius.php:20399
568
  msgid "%s is the new owner of the account."
569
  msgstr ""
570
 
571
+ #: includes/class-freemius.php:20401
572
  msgctxt "as congratulations"
573
  msgid "Congrats"
574
  msgstr ""
575
 
576
+ #: includes/class-freemius.php:20421
577
  msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
578
  msgstr ""
579
 
580
+ #: includes/class-freemius.php:20422
581
  msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
582
  msgstr ""
583
 
584
+ #: includes/class-freemius.php:20429
585
  msgid "Change Ownership"
586
  msgstr ""
587
 
588
+ #: includes/class-freemius.php:20437
589
  msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
590
  msgstr ""
591
 
592
+ #: includes/class-freemius.php:20449
593
  msgid "Please provide your full name."
594
  msgstr ""
595
 
596
+ #: includes/class-freemius.php:20454
597
  msgid "Your name was successfully updated."
598
  msgstr ""
599
 
600
+ #: includes/class-freemius.php:20515
601
  msgid "You have successfully updated your %s."
602
  msgstr ""
603
 
604
+ #: includes/class-freemius.php:20655
605
  msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
606
  msgstr ""
607
 
608
+ #: includes/class-freemius.php:20656
609
  msgctxt "advance notice of something that will need attention."
610
  msgid "Heads up"
611
  msgstr ""
612
 
613
+ #: includes/class-freemius.php:21095
614
  msgctxt "exclamation"
615
  msgid "Hey"
616
  msgstr ""
617
 
618
+ #: includes/class-freemius.php:21095
619
  msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
620
  msgstr ""
621
 
622
+ #: includes/class-freemius.php:21103
623
  msgid "No commitment for %s days - cancel anytime!"
624
  msgstr ""
625
 
626
+ #: includes/class-freemius.php:21104
627
  msgid "No credit card required"
628
  msgstr ""
629
 
630
+ #: includes/class-freemius.php:21111, templates/forms/trial-start.php:53
631
  msgctxt "call to action"
632
  msgid "Start free trial"
633
  msgstr ""
634
 
635
+ #: includes/class-freemius.php:21188
636
  msgid "Hey there, did you know that %s has an affiliate program? If you like the %s you can become our ambassador and earn some cash!"
637
  msgstr ""
638
 
639
+ #: includes/class-freemius.php:21197
640
  msgid "Learn more"
641
  msgstr ""
642
 
643
+ #: includes/class-freemius.php:21377, templates/account.php:474, templates/account.php:595, templates/connect.php:171, templates/connect.php:421, templates/forms/license-activation.php:25, templates/account/partials/addon.php:287
644
  msgid "Activate License"
645
  msgstr ""
646
 
647
+ #: includes/class-freemius.php:21378, templates/account.php:543, templates/account.php:594, templates/account/partials/site.php:256
648
  msgid "Change License"
649
  msgstr ""
650
 
651
+ #: includes/class-freemius.php:21469, templates/account/partials/site.php:161
652
  msgid "Opt Out"
653
  msgstr ""
654
 
655
+ #: includes/class-freemius.php:21471, includes/class-freemius.php:21479, templates/account/partials/site.php:43, templates/account/partials/site.php:161
656
  msgid "Opt In"
657
  msgstr ""
658
 
659
+ #: includes/class-freemius.php:21705
660
+ msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
661
  msgstr ""
662
 
663
+ #: includes/class-freemius.php:21713
664
  msgid "Activate %s features"
665
  msgstr ""
666
 
667
+ #: includes/class-freemius.php:21726
668
  msgid "Please follow these steps to complete the upgrade"
669
  msgstr ""
670
 
671
+ #: includes/class-freemius.php:21730
672
  msgid "Download the latest %s version"
673
  msgstr ""
674
 
675
+ #: includes/class-freemius.php:21734
676
  msgid "Upload and activate the downloaded version"
677
  msgstr ""
678
 
679
+ #: includes/class-freemius.php:21736
680
  msgid "How to upload and activate?"
681
  msgstr ""
682
 
683
+ #: includes/class-freemius.php:21870
684
  msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
685
  msgstr ""
686
 
687
+ #: includes/class-freemius.php:22031
688
  msgid "Auto installation only works for opted-in users."
689
  msgstr ""
690
 
691
+ #: includes/class-freemius.php:22041, includes/class-freemius.php:22074, includes/class-fs-plugin-updater.php:1188, includes/class-fs-plugin-updater.php:1202
692
  msgid "Invalid module ID."
693
  msgstr ""
694
 
695
+ #: includes/class-freemius.php:22050, includes/class-fs-plugin-updater.php:1224
696
  msgid "Premium version already active."
697
  msgstr ""
698
 
699
+ #: includes/class-freemius.php:22057
700
  msgid "You do not have a valid license to access the premium version."
701
  msgstr ""
702
 
703
+ #: includes/class-freemius.php:22064
704
  msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
705
  msgstr ""
706
 
707
+ #: includes/class-freemius.php:22082, includes/class-fs-plugin-updater.php:1223
708
  msgid "Premium add-on version already installed."
709
  msgstr ""
710
 
711
+ #: includes/class-freemius.php:22427
712
  msgid "View paid features"
713
  msgstr ""
714
 
715
+ #: includes/class-freemius.php:22749
716
  msgid "Thank you so much for using %s and its add-ons!"
717
  msgstr ""
718
 
719
+ #: includes/class-freemius.php:22750
720
  msgid "Thank you so much for using %s!"
721
  msgstr ""
722
 
723
+ #: includes/class-freemius.php:22756
724
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
725
  msgstr ""
726
 
727
+ #: includes/class-freemius.php:22760
728
  msgid "Thank you so much for using our products!"
729
  msgstr ""
730
 
731
+ #: includes/class-freemius.php:22761
732
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
733
  msgstr ""
734
 
735
+ #: includes/class-freemius.php:22780
736
  msgid "%s and its add-ons"
737
  msgstr ""
738
 
739
+ #: includes/class-freemius.php:22789
740
  msgid "Products"
741
  msgstr ""
742
 
743
+ #: includes/class-freemius.php:22796, templates/connect.php:272
744
  msgid "Yes"
745
  msgstr ""
746
 
747
+ #: includes/class-freemius.php:22797, templates/connect.php:273
748
  msgid "send me security & feature updates, educational content and offers."
749
  msgstr ""
750
 
751
+ #: includes/class-freemius.php:22798, templates/connect.php:278
752
  msgid "No"
753
  msgstr ""
754
 
755
+ #: includes/class-freemius.php:22800, templates/connect.php:280
756
  msgid "do %sNOT%s send me security & feature updates, educational content and offers."
757
  msgstr ""
758
 
759
+ #: includes/class-freemius.php:22810
760
+ msgid "Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard :-)"
761
  msgstr ""
762
 
763
+ #: includes/class-freemius.php:22812, templates/connect.php:287
764
  msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
765
  msgstr ""
766
 
767
+ #: includes/class-freemius.php:23094
768
  msgid "License key is empty."
769
  msgstr ""
770
 
771
+ #: includes/class-fs-plugin-updater.php:204, templates/forms/premium-versions-upgrade-handler.php:57
772
  msgid "Renew license"
773
  msgstr ""
774
 
775
+ #: includes/class-fs-plugin-updater.php:209, templates/forms/premium-versions-upgrade-handler.php:58
776
  msgid "Buy license"
777
  msgstr ""
778
 
779
+ #: includes/class-fs-plugin-updater.php:319, includes/class-fs-plugin-updater.php:352
780
  msgid "There is a %s of %s available."
781
  msgstr ""
782
 
783
+ #: includes/class-fs-plugin-updater.php:321, includes/class-fs-plugin-updater.php:357
784
+ msgid "new Beta version"
785
+ msgstr ""
786
+
787
+ #: includes/class-fs-plugin-updater.php:322, includes/class-fs-plugin-updater.php:358
788
  msgid "new version"
789
  msgstr ""
790
 
791
+ #: includes/class-fs-plugin-updater.php:381
792
  msgid "Important Upgrade Notice:"
793
  msgstr ""
794
 
795
+ #: includes/class-fs-plugin-updater.php:1253
796
  msgid "Installing plugin: %s"
797
  msgstr ""
798
 
799
+ #: includes/class-fs-plugin-updater.php:1294
800
  msgid "Unable to connect to the filesystem. Please confirm your credentials."
801
  msgstr ""
802
 
803
+ #: includes/class-fs-plugin-updater.php:1476
804
  msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
805
  msgstr ""
806
 
807
+ #: includes/fs-plugin-info-dialog.php:514
808
+ msgid "Purchase More"
809
+ msgstr ""
810
+
811
+ #: includes/fs-plugin-info-dialog.php:515, templates/account/partials/addon.php:347
812
  msgctxt "verb"
813
  msgid "Purchase"
814
  msgstr ""
815
 
816
+ #: includes/fs-plugin-info-dialog.php:519
817
  msgid "Start my free %s"
818
  msgstr ""
819
 
820
+ #: includes/fs-plugin-info-dialog.php:717
821
+ msgid "Install Free Version Update Now"
822
+ msgstr ""
823
+
824
+ #: includes/fs-plugin-info-dialog.php:718, templates/account.php:534
825
+ msgid "Install Update Now"
826
+ msgstr ""
827
+
828
+ #: includes/fs-plugin-info-dialog.php:727
829
  msgid "Install Free Version Now"
830
  msgstr ""
831
 
832
+ #: includes/fs-plugin-info-dialog.php:728, templates/add-ons.php:262, templates/auto-installation.php:111, templates/account/partials/addon.php:327, templates/account/partials/addon.php:379
833
  msgid "Install Now"
834
  msgstr ""
835
 
836
+ #: includes/fs-plugin-info-dialog.php:744
837
  msgctxt "as download latest version"
838
  msgid "Download Latest Free Version"
839
  msgstr ""
840
 
841
+ #: includes/fs-plugin-info-dialog.php:745, templates/account.php:85, templates/add-ons.php:34, templates/account/partials/addon.php:25
842
  msgctxt "as download latest version"
843
  msgid "Download Latest"
844
  msgstr ""
845
 
846
+ #: includes/fs-plugin-info-dialog.php:760, templates/add-ons.php:268, templates/account/partials/addon.php:318, templates/account/partials/addon.php:373
847
+ msgid "Activate this add-on"
 
 
 
 
 
 
 
 
 
 
 
 
848
  msgstr ""
849
 
850
+ #: includes/fs-plugin-info-dialog.php:762, templates/connect.php:418
851
+ msgid "Activate Free Version"
852
  msgstr ""
853
 
854
+ #: includes/fs-plugin-info-dialog.php:763, templates/account.php:109, templates/add-ons.php:269, templates/account/partials/addon.php:49
855
+ msgid "Activate"
856
  msgstr ""
857
 
858
+ #: includes/fs-plugin-info-dialog.php:973
859
  msgctxt "Plugin installer section title"
860
  msgid "Description"
861
  msgstr ""
862
 
863
+ #: includes/fs-plugin-info-dialog.php:974
864
  msgctxt "Plugin installer section title"
865
  msgid "Installation"
866
  msgstr ""
867
 
868
+ #: includes/fs-plugin-info-dialog.php:975
869
  msgctxt "Plugin installer section title"
870
  msgid "FAQ"
871
  msgstr ""
872
 
873
+ #: includes/fs-plugin-info-dialog.php:976, templates/plugin-info/description.php:55
874
  msgid "Screenshots"
875
  msgstr ""
876
 
877
+ #: includes/fs-plugin-info-dialog.php:977
878
  msgctxt "Plugin installer section title"
879
  msgid "Changelog"
880
  msgstr ""
881
 
882
+ #: includes/fs-plugin-info-dialog.php:978
883
  msgctxt "Plugin installer section title"
884
  msgid "Reviews"
885
  msgstr ""
886
 
887
+ #: includes/fs-plugin-info-dialog.php:979
888
  msgctxt "Plugin installer section title"
889
  msgid "Other Notes"
890
  msgstr ""
891
 
892
+ #: includes/fs-plugin-info-dialog.php:994
893
  msgctxt "Plugin installer section title"
894
  msgid "Features & Pricing"
895
  msgstr ""
896
 
897
+ #: includes/fs-plugin-info-dialog.php:1004
898
  msgid "Plugin Install"
899
  msgstr ""
900
 
901
+ #: includes/fs-plugin-info-dialog.php:1076
902
  msgctxt "e.g. Professional Plan"
903
  msgid "%s Plan"
904
  msgstr ""
905
 
906
+ #: includes/fs-plugin-info-dialog.php:1102
907
  msgctxt "e.g. the best product"
908
  msgid "Best"
909
  msgstr ""
910
 
911
+ #: includes/fs-plugin-info-dialog.php:1108, includes/fs-plugin-info-dialog.php:1128
912
  msgctxt "as every month"
913
  msgid "Monthly"
914
  msgstr ""
915
 
916
+ #: includes/fs-plugin-info-dialog.php:1111
917
  msgctxt "as once a year"
918
  msgid "Annual"
919
  msgstr ""
920
 
921
+ #: includes/fs-plugin-info-dialog.php:1114
922
  msgid "Lifetime"
923
  msgstr ""
924
 
925
+ #: includes/fs-plugin-info-dialog.php:1128, includes/fs-plugin-info-dialog.php:1130, includes/fs-plugin-info-dialog.php:1132
926
  msgctxt "e.g. billed monthly"
927
  msgid "Billed %s"
928
  msgstr ""
929
 
930
+ #: includes/fs-plugin-info-dialog.php:1130
931
  msgctxt "as once a year"
932
  msgid "Annually"
933
  msgstr ""
934
 
935
+ #: includes/fs-plugin-info-dialog.php:1132
936
  msgctxt "as once a year"
937
  msgid "Once"
938
  msgstr ""
939
 
940
+ #: includes/fs-plugin-info-dialog.php:1138
941
  msgid "Single Site License"
942
  msgstr ""
943
 
944
+ #: includes/fs-plugin-info-dialog.php:1140
945
  msgid "Unlimited Licenses"
946
  msgstr ""
947
 
948
+ #: includes/fs-plugin-info-dialog.php:1142
949
  msgid "Up to %s Sites"
950
  msgstr ""
951
 
952
+ #: includes/fs-plugin-info-dialog.php:1152, templates/plugin-info/features.php:82
953
  msgctxt "as monthly period"
954
  msgid "mo"
955
  msgstr ""
956
 
957
+ #: includes/fs-plugin-info-dialog.php:1159, templates/plugin-info/features.php:80
958
  msgctxt "as annual period"
959
  msgid "year"
960
  msgstr ""
961
 
962
+ #: includes/fs-plugin-info-dialog.php:1213
963
  msgctxt "noun"
964
  msgid "Price"
965
  msgstr ""
966
 
967
+ #: includes/fs-plugin-info-dialog.php:1261
968
  msgid "Save %s"
969
  msgstr ""
970
 
971
+ #: includes/fs-plugin-info-dialog.php:1271
972
  msgid "No commitment for %s - cancel anytime"
973
  msgstr ""
974
 
975
+ #: includes/fs-plugin-info-dialog.php:1274
976
  msgid "After your free %s, pay as little as %s"
977
  msgstr ""
978
 
979
+ #: includes/fs-plugin-info-dialog.php:1285
980
  msgid "Details"
981
  msgstr ""
982
 
983
+ #: includes/fs-plugin-info-dialog.php:1289, templates/account.php:96, templates/debug.php:203, templates/debug.php:240, templates/debug.php:454, templates/account/partials/addon.php:36
984
  msgctxt "product version"
985
  msgid "Version"
986
  msgstr ""
987
 
988
+ #: includes/fs-plugin-info-dialog.php:1296
989
  msgctxt "as the plugin author"
990
  msgid "Author"
991
  msgstr ""
992
 
993
+ #: includes/fs-plugin-info-dialog.php:1303
994
  msgid "Last Updated"
995
  msgstr ""
996
 
997
+ #: includes/fs-plugin-info-dialog.php:1308, templates/account.php:444
998
  msgctxt "x-ago"
999
  msgid "%s ago"
1000
  msgstr ""
1001
 
1002
+ #: includes/fs-plugin-info-dialog.php:1317
1003
  msgid "Requires WordPress Version"
1004
  msgstr ""
1005
 
1006
+ #: includes/fs-plugin-info-dialog.php:1318
1007
  msgid "%s or higher"
1008
  msgstr ""
1009
 
1010
+ #: includes/fs-plugin-info-dialog.php:1325
1011
  msgid "Compatible up to"
1012
  msgstr ""
1013
 
1014
+ #: includes/fs-plugin-info-dialog.php:1333
1015
  msgid "Downloaded"
1016
  msgstr ""
1017
 
1018
+ #: includes/fs-plugin-info-dialog.php:1337
1019
  msgid "%s time"
1020
  msgstr ""
1021
 
1022
+ #: includes/fs-plugin-info-dialog.php:1339
1023
  msgid "%s times"
1024
  msgstr ""
1025
 
1026
+ #: includes/fs-plugin-info-dialog.php:1349
1027
  msgid "WordPress.org Plugin Page"
1028
  msgstr ""
1029
 
1030
+ #: includes/fs-plugin-info-dialog.php:1357
1031
  msgid "Plugin Homepage"
1032
  msgstr ""
1033
 
1034
+ #: includes/fs-plugin-info-dialog.php:1365, includes/fs-plugin-info-dialog.php:1447
1035
  msgid "Donate to this plugin"
1036
  msgstr ""
1037
 
1038
+ #: includes/fs-plugin-info-dialog.php:1372
1039
  msgid "Average Rating"
1040
  msgstr ""
1041
 
1042
+ #: includes/fs-plugin-info-dialog.php:1379
1043
  msgid "based on %s"
1044
  msgstr ""
1045
 
1046
+ #: includes/fs-plugin-info-dialog.php:1383
1047
  msgid "%s rating"
1048
  msgstr ""
1049
 
1050
+ #: includes/fs-plugin-info-dialog.php:1385
1051
  msgid "%s ratings"
1052
  msgstr ""
1053
 
1054
+ #: includes/fs-plugin-info-dialog.php:1400
1055
  msgid "%s star"
1056
  msgstr ""
1057
 
1058
+ #: includes/fs-plugin-info-dialog.php:1402
1059
  msgid "%s stars"
1060
  msgstr ""
1061
 
1062
+ #: includes/fs-plugin-info-dialog.php:1413
1063
  msgid "Click to see reviews that provided a rating of %s"
1064
  msgstr ""
1065
 
1066
+ #: includes/fs-plugin-info-dialog.php:1426
1067
  msgid "Contributors"
1068
  msgstr ""
1069
 
1070
+ #: includes/fs-plugin-info-dialog.php:1455, includes/fs-plugin-info-dialog.php:1457
1071
  msgid "Warning"
1072
  msgstr ""
1073
 
1074
+ #: includes/fs-plugin-info-dialog.php:1455
1075
  msgid "This plugin has not been tested with your current version of WordPress."
1076
  msgstr ""
1077
 
1078
+ #: includes/fs-plugin-info-dialog.php:1457
1079
  msgid "This plugin has not been marked as compatible with your version of WordPress."
1080
  msgstr ""
1081
 
1082
+ #: includes/fs-plugin-info-dialog.php:1476
1083
  msgid "Paid add-on must be deployed to Freemius."
1084
  msgstr ""
1085
 
1086
+ #: includes/fs-plugin-info-dialog.php:1477
1087
  msgid "Add-on must be deployed to WordPress.org or Freemius."
1088
  msgstr ""
1089
 
1090
+ #: includes/fs-plugin-info-dialog.php:1498
1091
+ msgid "Newer Version (%s) Installed"
1092
+ msgstr ""
1093
+
1094
+ #: includes/fs-plugin-info-dialog.php:1499
1095
+ msgid "Newer Free Version (%s) Installed"
1096
+ msgstr ""
1097
+
1098
+ #: includes/fs-plugin-info-dialog.php:1506
1099
+ msgid "Latest Version Installed"
1100
+ msgstr ""
1101
+
1102
+ #: includes/fs-plugin-info-dialog.php:1507
1103
+ msgid "Latest Free Version Installed"
1104
+ msgstr ""
1105
+
1106
+ #: templates/account.php:86, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:26, templates/account/partials/site.php:295
1107
  msgid "Downgrading your plan"
1108
  msgstr ""
1109
 
1110
+ #: templates/account.php:87, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:27, templates/account/partials/site.php:296
1111
  msgid "Cancelling the subscription"
1112
  msgstr ""
1113
 
1114
+ #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
1115
+ #: templates/account.php:89
1116
+ msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
1117
  msgstr ""
1118
 
1119
+ #: templates/account.php:90, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:30, templates/account/partials/site.php:299
1120
  msgid "Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price."
1121
  msgstr ""
1122
 
1123
+ #: templates/account.php:91, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:31
1124
  msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
1125
  msgstr ""
1126
 
1127
+ #: templates/account.php:92, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:32, templates/account/partials/site.php:300
1128
  msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
1129
  msgstr ""
1130
 
1131
+ #: templates/account.php:93, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:33, templates/account/partials/site.php:301
1132
  msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
1133
  msgstr ""
1134
 
1135
  #. translators: %s: Plan title (e.g. "Professional")
1136
+ #: templates/account.php:95, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:35
1137
  msgid "Activate %s Plan"
1138
  msgstr ""
1139
 
1140
  #. translators: %s: Time period (e.g. Auto renews in "2 months")
1141
+ #: templates/account.php:98, templates/account/partials/addon.php:38, templates/account/partials/site.php:275
1142
  msgid "Auto renews in %s"
1143
  msgstr ""
1144
 
1145
  #. translators: %s: Time period (e.g. Expires in "2 months")
1146
+ #: templates/account.php:100, templates/account/partials/addon.php:40, templates/account/partials/site.php:277
1147
  msgid "Expires in %s"
1148
  msgstr ""
1149
 
1150
+ #: templates/account.php:101, templates/account/partials/addon.php:41
1151
  msgctxt "as synchronize license"
1152
  msgid "Sync License"
1153
  msgstr ""
1154
 
1155
+ #: templates/account.php:102, templates/account/partials/addon.php:42
1156
  msgid "Cancel Trial"
1157
  msgstr ""
1158
 
1159
+ #: templates/account.php:103, templates/account/partials/addon.php:43
1160
  msgid "Change Plan"
1161
  msgstr ""
1162
 
1163
+ #: templates/account.php:104, templates/account/partials/addon.php:44
1164
  msgctxt "verb"
1165
  msgid "Upgrade"
1166
  msgstr ""
1167
 
1168
+ #: templates/account.php:106, templates/account/partials/addon.php:46, templates/account/partials/site.php:302
1169
  msgctxt "verb"
1170
  msgid "Downgrade"
1171
  msgstr ""
1172
 
1173
+ #: templates/account.php:108, templates/add-ons.php:187, templates/plugin-info/features.php:72, templates/account/partials/addon.php:48, templates/account/partials/site.php:31
1174
  msgid "Free"
1175
  msgstr ""
1176
 
1177
+ #: templates/account.php:110, templates/debug.php:373, includes/customizer/class-fs-customizer-upsell-control.php:106, templates/account/partials/addon.php:50
 
 
 
 
1178
  msgctxt "as product pricing plan"
1179
  msgid "Plan"
1180
  msgstr ""
1181
 
1182
+ #: templates/account.php:111
1183
+ msgid "Bundle Plan"
1184
+ msgstr ""
1185
+
1186
+ #: templates/account.php:185
1187
  msgid "Free Trial"
1188
  msgstr ""
1189
 
1190
+ #: templates/account.php:196
1191
  msgid "Account Details"
1192
  msgstr ""
1193
 
1194
+ #: templates/account.php:200
1195
+ msgid "Billing & Invoices"
1196
+ msgstr ""
1197
+
1198
+ #: templates/account.php:210
1199
  msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
1200
  msgstr ""
1201
 
1202
+ #: templates/account.php:212
1203
  msgid "Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?"
1204
  msgstr ""
1205
 
1206
+ #: templates/account.php:215
1207
  msgid "Delete Account"
1208
  msgstr ""
1209
 
1210
+ #: templates/account.php:227, templates/account/partials/addon.php:211, templates/account/partials/deactivate-license-button.php:35
1211
  msgid "Deactivate License"
1212
  msgstr ""
1213
 
1214
+ #: templates/account.php:250, templates/forms/subscription-cancellation.php:125
1215
  msgid "Are you sure you want to proceed?"
1216
  msgstr ""
1217
 
1218
+ #: templates/account.php:250, templates/account/partials/addon.php:234
1219
  msgid "Cancel Subscription"
1220
  msgstr ""
1221
 
1222
+ #: templates/account.php:278
1223
  msgctxt "as synchronize"
1224
  msgid "Sync"
1225
  msgstr ""
1226
 
1227
+ #: templates/account.php:292, templates/debug.php:489
1228
  msgid "Name"
1229
  msgstr ""
1230
 
1231
+ #: templates/account.php:298, templates/debug.php:490
1232
  msgid "Email"
1233
  msgstr ""
1234
 
1235
+ #: templates/account.php:305, templates/debug.php:372, templates/debug.php:528
1236
  msgid "User ID"
1237
  msgstr ""
1238
 
1239
+ #: templates/account.php:322, templates/account.php:608, templates/account.php:653, templates/debug.php:238, templates/debug.php:366, templates/debug.php:451, templates/debug.php:488, templates/debug.php:526, templates/debug.php:599, templates/account/payments.php:35, templates/debug/logger.php:21
1240
+ msgid "ID"
1241
+ msgstr ""
1242
+
1243
+ #: templates/account.php:329
1244
  msgid "Site ID"
1245
  msgstr ""
1246
 
1247
+ #: templates/account.php:332
1248
  msgid "No ID"
1249
  msgstr ""
1250
 
1251
+ #: templates/account.php:337, templates/debug.php:245, templates/debug.php:374, templates/debug.php:455, templates/debug.php:492, templates/account/partials/site.php:219
1252
  msgid "Public Key"
1253
  msgstr ""
1254
 
1255
+ #: templates/account.php:343, templates/debug.php:375, templates/debug.php:456, templates/debug.php:493, templates/account/partials/site.php:231
1256
  msgid "Secret Key"
1257
  msgstr ""
1258
 
1259
+ #: templates/account.php:346
1260
  msgctxt "as secret encryption key missing"
1261
  msgid "No Secret"
1262
  msgstr ""
1263
 
1264
+ #: templates/account.php:373, templates/account/partials/site.php:112, templates/account/partials/site.php:114
1265
  msgid "Trial"
1266
  msgstr ""
1267
 
1268
+ #: templates/account.php:400, templates/debug.php:533, templates/account/partials/site.php:248
1269
  msgid "License Key"
1270
  msgstr ""
1271
 
1272
+ #: templates/account.php:429
1273
+ msgid "Join the Beta program"
1274
+ msgstr ""
1275
+
1276
+ #: templates/account.php:435
1277
  msgid "not verified"
1278
  msgstr ""
1279
 
1280
+ #: templates/account.php:444, templates/account/partials/addon.php:172
1281
  msgid "Expired"
1282
  msgstr ""
1283
 
1284
+ #: templates/account.php:502
1285
  msgid "Premium version"
1286
  msgstr ""
1287
 
1288
+ #: templates/account.php:504
1289
  msgid "Free version"
1290
  msgstr ""
1291
 
1292
+ #: templates/account.php:516
1293
  msgid "Verify Email"
1294
  msgstr ""
1295
 
1296
+ #: templates/account.php:527
1297
  msgid "Download %s Version"
1298
  msgstr ""
1299
 
1300
+ #: templates/account.php:541, templates/account.php:749, templates/account/partials/site.php:237, templates/account/partials/site.php:255
1301
  msgctxt "verb"
1302
  msgid "Show"
1303
  msgstr ""
1304
 
1305
+ #: templates/account.php:555
1306
  msgid "What is your %s?"
1307
  msgstr ""
1308
 
1309
+ #: templates/account.php:563, templates/account/billing.php:21
1310
  msgctxt "verb"
1311
  msgid "Edit"
1312
  msgstr ""
1313
 
1314
+ #: templates/account.php:588
1315
  msgid "Sites"
1316
  msgstr ""
1317
 
1318
+ #: templates/account.php:599
1319
  msgid "Search by address"
1320
  msgstr ""
1321
 
1322
+ #: templates/account.php:609, templates/debug.php:369
 
 
 
 
1323
  msgid "Address"
1324
  msgstr ""
1325
 
1326
+ #: templates/account.php:610
1327
  msgid "License"
1328
  msgstr ""
1329
 
1330
+ #: templates/account.php:611
1331
  msgid "Plan"
1332
  msgstr ""
1333
 
1334
+ #: templates/account.php:656
1335
  msgctxt "as software license"
1336
  msgid "License"
1337
  msgstr ""
1338
 
1339
+ #: templates/account.php:743
1340
  msgctxt "verb"
1341
  msgid "Hide"
1342
  msgstr ""
1343
 
1344
+ #: templates/account.php:765
1345
+ msgid "Processing"
1346
+ msgstr ""
1347
+
1348
+ #: templates/account.php:768
1349
+ msgid "Get updates for bleeding edge Beta versions of %s."
1350
+ msgstr ""
1351
+
1352
+ #: templates/account.php:826
1353
  msgid "Cancelling %s"
1354
  msgstr ""
1355
 
1356
+ #: templates/account.php:826, templates/account.php:843, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:133
1357
  msgid "trial"
1358
  msgstr ""
1359
 
1360
+ #: templates/account.php:841, templates/forms/deactivation/form.php:150
1361
  msgid "Cancelling %s..."
1362
  msgstr ""
1363
 
1364
+ #: templates/account.php:844, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:134
1365
  msgid "subscription"
1366
  msgstr ""
1367
 
1368
+ #: templates/account.php:858
1369
  msgid "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
1370
  msgstr ""
1371
 
1372
+ #: templates/add-ons.php:35
1373
+ msgid "View details"
1374
+ msgstr ""
1375
+
1376
+ #: templates/add-ons.php:45
1377
  msgid "Add Ons for %s"
1378
  msgstr ""
1379
 
1380
+ #: templates/add-ons.php:55
1381
  msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
1382
  msgstr ""
1383
 
1384
+ #: templates/add-ons.php:173
1385
+ msgctxt "active add-on"
1386
+ msgid "Active"
1387
+ msgstr ""
1388
+
1389
+ #: templates/add-ons.php:174
1390
+ msgctxt "installed add-on"
1391
+ msgid "Installed"
1392
  msgstr ""
1393
 
1394
+ #: templates/admin-notice.php:13, templates/forms/license-activation.php:209, templates/forms/resend-key.php:77
1395
  msgctxt "as close a window"
1396
  msgid "Dismiss"
1397
  msgstr ""
1416
  msgid "Cancel Installation"
1417
  msgstr ""
1418
 
1419
+ #: templates/checkout.php:180
1420
  msgid "Checkout"
1421
  msgstr ""
1422
 
1423
+ #: templates/checkout.php:180
1424
  msgid "PCI compliant"
1425
  msgstr ""
1426
 
1442
  msgid "Thanks %s!"
1443
  msgstr ""
1444
 
1445
+ #: templates/connect.php:172, templates/forms/license-activation.php:44
1446
  msgid "Agree & Activate License"
1447
  msgstr ""
1448
 
1490
  msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
1491
  msgstr ""
1492
 
1493
+ #: templates/connect.php:253, templates/forms/license-activation.php:47
1494
  msgid "License key"
1495
  msgstr ""
1496
 
1497
+ #: templates/connect.php:256, templates/forms/license-activation.php:20
1498
  msgid "Can't find your license key?"
1499
  msgstr ""
1500
 
1501
+ #: templates/connect.php:315, templates/connect.php:652, templates/forms/deactivation/retry-skip.php:20
1502
  msgctxt "verb"
1503
  msgid "Skip"
1504
  msgstr ""
1547
  msgid "Newsletter"
1548
  msgstr ""
1549
 
1550
+ #: templates/connect.php:391, templates/forms/license-activation.php:39
1551
  msgid "The %1$s will be periodically sending data to %2$s to check for security and feature updates, and verify the validity of your license."
1552
  msgstr ""
1553
 
1559
  msgid "Don't have a license key?"
1560
  msgstr ""
1561
 
 
 
 
 
1562
  #: templates/connect.php:420
1563
  msgid "Have a license key?"
1564
  msgstr ""
1575
  msgid "Terms of Service"
1576
  msgstr ""
1577
 
1578
+ #: templates/connect.php:805
1579
  msgctxt "as in the process of sending an email"
1580
  msgid "Sending email"
1581
  msgstr ""
1582
 
1583
+ #: templates/connect.php:806
1584
  msgctxt "as activating plugin"
1585
  msgid "Activating"
1586
  msgstr ""
1608
  msgid "Debugging"
1609
  msgstr ""
1610
 
1611
+ #: templates/debug.php:54, templates/debug.php:250, templates/debug.php:376, templates/debug.php:494
1612
  msgid "Actions"
1613
  msgstr ""
1614
 
1644
  msgid "Set DB Option"
1645
  msgstr ""
1646
 
1647
+ #: templates/debug.php:182
1648
  msgid "Key"
1649
  msgstr ""
1650
 
1651
+ #: templates/debug.php:183
1652
  msgid "Value"
1653
  msgstr ""
1654
 
1655
+ #: templates/debug.php:199
1656
  msgctxt "as software development kit versions"
1657
  msgid "SDK Versions"
1658
  msgstr ""
1659
 
1660
+ #: templates/debug.php:204
1661
  msgid "SDK Path"
1662
  msgstr ""
1663
 
1664
+ #: templates/debug.php:205, templates/debug.php:244
1665
  msgid "Module Path"
1666
  msgstr ""
1667
 
1668
+ #: templates/debug.php:206
1669
  msgid "Is Active"
1670
  msgstr ""
1671
 
1672
+ #: templates/debug.php:234, templates/debug/plugins-themes-sync.php:35
1673
  msgid "Plugins"
1674
  msgstr ""
1675
 
1676
+ #: templates/debug.php:234, templates/debug/plugins-themes-sync.php:56
1677
  msgid "Themes"
1678
  msgstr ""
1679
 
1680
+ #: templates/debug.php:239, templates/debug.php:371, templates/debug.php:453, templates/debug/scheduled-crons.php:80
1681
  msgid "Slug"
1682
  msgstr ""
1683
 
1684
+ #: templates/debug.php:241, templates/debug.php:452
1685
  msgid "Title"
1686
  msgstr ""
1687
 
1688
+ #: templates/debug.php:242
1689
  msgctxt "as application program interface"
1690
  msgid "API"
1691
  msgstr ""
1692
 
1693
+ #: templates/debug.php:243
1694
  msgid "Freemius State"
1695
  msgstr ""
1696
 
1697
+ #: templates/debug.php:247
1698
  msgid "Network Blog"
1699
  msgstr ""
1700
 
1701
+ #: templates/debug.php:248
1702
  msgid "Network User"
1703
  msgstr ""
1704
 
1705
+ #: templates/debug.php:285
1706
  msgctxt "as connection was successful"
1707
  msgid "Connected"
1708
  msgstr ""
1709
 
1710
+ #: templates/debug.php:286
1711
  msgctxt "as connection blocked"
1712
  msgid "Blocked"
1713
  msgstr ""
1714
 
1715
+ #: templates/debug.php:322
1716
  msgid "Simulate Trial Promotion"
1717
  msgstr ""
1718
 
1719
+ #: templates/debug.php:334
1720
  msgid "Simulate Network Upgrade"
1721
  msgstr ""
1722
 
1723
+ #: templates/debug.php:360
1724
  msgid "%s Installs"
1725
  msgstr ""
1726
 
1727
+ #: templates/debug.php:362
1728
  msgctxt "like websites"
1729
  msgid "Sites"
1730
  msgstr ""
1731
 
1732
+ #: templates/debug.php:368, templates/account/partials/site.php:148
1733
  msgid "Blog ID"
1734
  msgstr ""
1735
 
1736
+ #: templates/debug.php:433, templates/debug.php:511, templates/account/partials/addon.php:396
1737
  msgctxt "verb"
1738
  msgid "Delete"
1739
  msgstr ""
1740
 
1741
+ #: templates/debug.php:447
1742
  msgid "Add Ons of module %s"
1743
  msgstr ""
1744
 
1745
+ #: templates/debug.php:484
1746
  msgid "Users"
1747
  msgstr ""
1748
 
1749
+ #: templates/debug.php:491
1750
  msgid "Verified"
1751
  msgstr ""
1752
 
1753
+ #: templates/debug.php:522
1754
  msgid "%s Licenses"
1755
  msgstr ""
1756
 
1757
+ #: templates/debug.php:527
1758
  msgid "Plugin ID"
1759
  msgstr ""
1760
 
1761
+ #: templates/debug.php:529
1762
  msgid "Plan ID"
1763
  msgstr ""
1764
 
1765
+ #: templates/debug.php:530
1766
  msgid "Quota"
1767
  msgstr ""
1768
 
1769
+ #: templates/debug.php:531
1770
  msgid "Activated"
1771
  msgstr ""
1772
 
1773
+ #: templates/debug.php:532
1774
  msgid "Blocking"
1775
  msgstr ""
1776
 
1777
+ #: templates/debug.php:534
1778
  msgctxt "as expiration date"
1779
  msgid "Expiration"
1780
  msgstr ""
1781
 
1782
+ #: templates/debug.php:557
1783
  msgid "Debug Log"
1784
  msgstr ""
1785
 
1786
+ #: templates/debug.php:561
1787
  msgid "All Types"
1788
  msgstr ""
1789
 
1790
+ #: templates/debug.php:568
1791
  msgid "All Requests"
1792
  msgstr ""
1793
 
1794
+ #: templates/debug.php:573, templates/debug.php:602, templates/debug/logger.php:25
1795
  msgid "File"
1796
  msgstr ""
1797
 
1798
+ #: templates/debug.php:574, templates/debug.php:600, templates/debug/logger.php:23
1799
  msgid "Function"
1800
  msgstr ""
1801
 
1802
+ #: templates/debug.php:575
1803
  msgid "Process ID"
1804
  msgstr ""
1805
 
1806
+ #: templates/debug.php:576
1807
  msgid "Logger"
1808
  msgstr ""
1809
 
1810
+ #: templates/debug.php:577, templates/debug.php:601, templates/debug/logger.php:24
1811
  msgid "Message"
1812
  msgstr ""
1813
 
1814
+ #: templates/debug.php:579
1815
  msgid "Filter"
1816
  msgstr ""
1817
 
1818
+ #: templates/debug.php:587
1819
  msgid "Download"
1820
  msgstr ""
1821
 
1822
+ #: templates/debug.php:598, templates/debug/logger.php:22
1823
  msgid "Type"
1824
  msgstr ""
1825
 
1826
+ #: templates/debug.php:603, templates/debug/logger.php:26
1827
  msgid "Timestamp"
1828
  msgstr ""
1829
 
1848
  msgid "Requests"
1849
  msgstr ""
1850
 
1851
+ #: templates/account/billing.php:22
1852
  msgctxt "verb"
1853
  msgid "Update"
1854
  msgstr ""
1855
 
1856
+ #: templates/account/billing.php:33
1857
  msgid "Billing"
1858
  msgstr ""
1859
 
1860
+ #: templates/account/billing.php:38, templates/account/billing.php:38
1861
  msgid "Business name"
1862
  msgstr ""
1863
 
1864
+ #: templates/account/billing.php:39, templates/account/billing.php:39
1865
  msgid "Tax / VAT ID"
1866
  msgstr ""
1867
 
1868
+ #: templates/account/billing.php:42, templates/account/billing.php:42, templates/account/billing.php:43, templates/account/billing.php:43
1869
  msgid "Address Line %d"
1870
  msgstr ""
1871
 
1872
+ #: templates/account/billing.php:46, templates/account/billing.php:46
1873
  msgid "City"
1874
  msgstr ""
1875
 
1876
+ #: templates/account/billing.php:46, templates/account/billing.php:46
1877
  msgid "Town"
1878
  msgstr ""
1879
 
1880
+ #: templates/account/billing.php:47, templates/account/billing.php:47
1881
  msgid "ZIP / Postal Code"
1882
  msgstr ""
1883
 
1884
+ #: templates/account/billing.php:302
1885
  msgid "Country"
1886
  msgstr ""
1887
 
1888
+ #: templates/account/billing.php:304
1889
  msgid "Select Country"
1890
  msgstr ""
1891
 
1892
+ #: templates/account/billing.php:311, templates/account/billing.php:312
1893
  msgid "State"
1894
  msgstr ""
1895
 
1896
+ #: templates/account/billing.php:311, templates/account/billing.php:312
1897
  msgid "Province"
1898
  msgstr ""
1899
 
2141
  msgid "Become an affiliate"
2142
  msgstr ""
2143
 
2144
+ #: templates/forms/license-activation.php:21
2145
  msgid "Please enter the license key that you received in the email right after the purchase:"
2146
  msgstr ""
2147
 
2148
+ #: templates/forms/license-activation.php:26
2149
  msgid "Update License"
2150
  msgstr ""
2151
 
2212
  msgid "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
2213
  msgstr ""
2214
 
2215
+ #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
2216
+ #: templates/forms/subscription-cancellation.php:99, templates/account/partials/addon.php:29, templates/account/partials/site.php:298
2217
+ msgid "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
2218
+ msgstr ""
2219
+
2220
  #: templates/forms/subscription-cancellation.php:103
2221
  msgid "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
2222
  msgstr ""
2229
  msgid "Proceed"
2230
  msgstr ""
2231
 
2232
+ #: templates/forms/subscription-cancellation.php:191, templates/forms/deactivation/form.php:171
2233
  msgid "Cancel %s & Proceed"
2234
  msgstr ""
2235
 
2241
  msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt in with your user and non-sensitive site information, allowing the %s to periodically send data to %s to check for version updates and to validate your trial."
2242
  msgstr ""
2243
 
2244
+ #: templates/js/style-premium-theme.php:39
2245
  msgid "Premium"
2246
  msgstr ""
2247
 
2248
+ #: templates/js/style-premium-theme.php:42
2249
+ msgid "Beta"
2250
+ msgstr ""
2251
+
2252
+ #: templates/partials/network-activation.php:27
2253
  msgid "Activate license on all sites in the network."
2254
  msgstr ""
2255
 
2256
+ #: templates/partials/network-activation.php:28
2257
  msgid "Apply on all sites in the network."
2258
  msgstr ""
2259
 
2260
+ #: templates/partials/network-activation.php:31
2261
  msgid "Activate license on all pending sites."
2262
  msgstr ""
2263
 
2264
+ #: templates/partials/network-activation.php:32
2265
  msgid "Apply on all pending sites."
2266
  msgstr ""
2267
 
2268
+ #: templates/partials/network-activation.php:40, templates/partials/network-activation.php:74
2269
  msgid "allow"
2270
  msgstr ""
2271
 
2272
+ #: templates/partials/network-activation.php:43, templates/partials/network-activation.php:77
2273
  msgid "delegate"
2274
  msgstr ""
2275
 
2276
+ #: templates/partials/network-activation.php:47, templates/partials/network-activation.php:81
2277
  msgid "skip"
2278
  msgstr ""
2279
 
2298
  msgid "Last license"
2299
  msgstr ""
2300
 
2301
+ #: templates/account/partials/addon.php:167
2302
  msgid "Cancelled"
2303
  msgstr ""
2304
 
2305
+ #: templates/account/partials/addon.php:177
2306
  msgid "No expiration"
2307
  msgstr ""
2308
 
 
 
 
 
2309
  #: templates/account/partials/site.php:181
2310
  msgid "Owner Name"
2311
  msgstr ""
2330
  msgid "Contact Support"
2331
  msgstr ""
2332
 
2333
+ #: templates/forms/deactivation/form.php:64
2334
  msgid "Anonymous feedback"
2335
  msgstr ""
2336
 
2337
+ #: templates/forms/deactivation/form.php:70
2338
  msgid "Deactivate"
2339
  msgstr ""
2340
 
2341
+ #: templates/forms/deactivation/form.php:72
2342
  msgid "Activate %s"
2343
  msgstr ""
2344
 
2345
+ #: templates/forms/deactivation/form.php:87
2346
  msgid "Quick Feedback"
2347
  msgstr ""
2348
 
2349
+ #: templates/forms/deactivation/form.php:91
2350
  msgid "If you have a moment, please let us know why you are %s"
2351
  msgstr ""
2352
 
2353
+ #: templates/forms/deactivation/form.php:91
2354
  msgid "deactivating"
2355
  msgstr ""
2356
 
2357
+ #: templates/forms/deactivation/form.php:91
2358
  msgid "switching"
2359
  msgstr ""
2360
 
2361
+ #: templates/forms/deactivation/form.php:365
2362
  msgid "Submit & %s"
2363
  msgstr ""
2364
 
2365
+ #: templates/forms/deactivation/form.php:386
2366
  msgid "Kindly tell us the reason so we can improve."
2367
  msgstr ""
2368
 
2369
+ #: templates/forms/deactivation/form.php:511
2370
  msgid "Yes - %s"
2371
  msgstr ""
2372
 
2373
+ #: templates/forms/deactivation/form.php:518
2374
  msgid "Skip & %s"
2375
  msgstr ""
2376
 
vendor/freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '2.2.4';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '2.3.0';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
vendor/freemius/templates/account.php CHANGED
@@ -70,6 +70,11 @@
70
  ) );
71
  }
72
 
 
 
 
 
 
73
  $has_tabs = $fs->_add_tabs_before_content();
74
 
75
  if ( $has_tabs ) {
@@ -80,8 +85,8 @@
80
  $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug );
81
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
82
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
83
- /* translators: %1s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
84
- $downgrade_x_confirm_text = fs_text_inline( '%1s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
85
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
86
  $cancel_trial_confirm_text = fs_text_inline( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'cancel-trial-confirm', $slug );
87
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
@@ -103,6 +108,7 @@
103
  $free_text = fs_text_inline( 'Free', 'free', $slug );
104
  $activate_text = fs_text_inline( 'Activate', 'activate', $slug );
105
  $plan_text = fs_text_x_inline( 'Plan', 'as product pricing plan', 'plan', $slug );
 
106
 
107
  $show_plan_row = true;
108
  $show_license_row = is_object( $license );
@@ -142,6 +148,27 @@
142
  }
143
  }
144
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  ?>
146
  <div class="wrap fs-section">
147
  <?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?>
@@ -169,6 +196,10 @@
169
  <h3><span class="dashicons dashicons-businessman"></span> <?php fs_esc_html_echo_inline( 'Account Details', 'account-details', $slug ) ?></h3>
170
  <div class="fs-header-actions">
171
  <ul>
 
 
 
 
172
  <?php if ( ! $is_paying ) : ?>
173
  <li>
174
  <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
@@ -276,6 +307,22 @@
276
  );
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  if ( ! fs_is_network_admin()) {
280
  $profile[] = array(
281
  'id' => 'site_id',
@@ -307,6 +354,14 @@
307
  'value' => $fs->get_plugin_version()
308
  );
309
 
 
 
 
 
 
 
 
 
310
  if ( $has_paid_plan ) {
311
  if ( $fs->is_trial() ) {
312
  if ( $show_plan_row ) {
@@ -322,12 +377,20 @@
322
  if ( $show_plan_row ) {
323
  $profile[] = array(
324
  'id' => 'plan',
325
- 'title' => $plan_text,
326
  'value' => strtoupper( is_string( $plan->name ) ?
327
  $plan->title :
328
  strtoupper( $free_text )
329
  )
330
  );
 
 
 
 
 
 
 
 
331
  }
332
 
333
  if ( is_object( $license ) ) {
@@ -353,13 +416,18 @@
353
  ?>
354
  <tr class="fs-field-<?php echo $p['id'] ?><?php if ( $odd ) : ?> alternate<?php endif ?>">
355
  <td>
356
- <nobr><?php echo $p['title'] ?>:</nobr>
357
  </td>
358
- <td<?php if ( 'plan' === $p['id'] ) { echo ' colspan="2"'; }?>>
359
  <?php if ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
360
  <code><?php echo htmlspecialchars( substr( $p['value'], 0, 6 ) ) . str_pad( '', 23 * 6, '&bull;' ) . htmlspecialchars( substr( $p['value'], - 3 ) ) ?></code>
361
  <input type="text" value="<?php echo htmlspecialchars( $p['value'] ) ?>" style="display: none"
362
  readonly/>
 
 
 
 
 
363
  <?php else : ?>
364
  <code><?php echo htmlspecialchars( $p['value'] ) ?></code>
365
  <?php endif ?>
@@ -371,7 +439,7 @@
371
  <label class="fs-tag fs-success"><?php echo esc_html( $trial_text ) ?></label>
372
  <?php endif ?>
373
  <?php if ( is_object( $license ) && ! $license->is_lifetime() ) : ?>
374
- <?php if ( ! $is_active_subscription && ! $license->is_first_payment_pending() ) : ?>
375
  <?php $is_license_expired = $license->is_expired() ?>
376
  <?php $expired_ago_text = ( fs_text_inline( 'Expired', 'expired', $slug ) . ' ' . fs_text_x_inline( '%s ago', 'x-ago', $slug ) ) ?>
377
  <label
@@ -402,7 +470,7 @@
402
  <?php else : ?>
403
  <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
404
  method="POST" class="button-group">
405
- <?php if ( $show_upgrade && $fs->is_premium() ) : ?>
406
  <a class="button activate-license-trigger <?php echo $fs->get_unique_affix() ?>" href="#"><?php fs_esc_html_echo_inline( 'Activate License', 'activate-license', $slug ) ?></a>
407
  <?php endif ?>
408
  <input type="submit" class="button"
@@ -421,9 +489,15 @@
421
  </form>
422
  <?php endif ?>
423
  </div>
 
 
 
 
 
 
424
  <?php elseif ( 'version' === $p['id'] && $has_paid_plan ) : ?>
425
  <?php if ( $fs->has_premium_version() ) : ?>
426
- <?php if ( $fs->is_premium() ) : ?>
427
  <label
428
  class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"><?php fs_esc_html_echo_inline( 'Premium version', 'premium-version', $slug ) ?></label>
429
  <?php elseif ( $fs->can_use_premium_code() ) : ?>
@@ -432,7 +506,7 @@
432
  <?php endif ?>
433
  <?php endif ?>
434
  </td>
435
- <?php if ( 'plan' !== $p['id'] ) : ?>
436
  <td class="fs-right">
437
  <?php if ( 'email' === $p['id'] && ! $user->is_verified() ) : ?>
438
  <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
@@ -492,8 +566,20 @@
492
  </td>
493
  <?php endif ?>
494
  </tr>
495
- <?php $odd = ! $odd;
496
- endforeach ?>
 
 
 
 
 
 
 
 
 
 
 
 
497
  </table>
498
  </div>
499
  </div>
@@ -502,7 +588,7 @@
502
  <h3><span class="dashicons dashicons-networking"></span> <?php fs_esc_html_echo_inline( 'Sites', 'sites', $slug ) ?></h3>
503
  <div class="fs-header-actions">
504
  <?php $has_license = is_object( $license ) ?>
505
- <?php if ( $has_license || ( $show_upgrade && $fs->is_premium() ) ) : ?>
506
  <?php
507
  $activate_license_button_text = $has_license ?
508
  fs_esc_html_inline( 'Change License', 'change-license', $slug ) :
@@ -545,10 +631,7 @@
545
  <?php endif ?>
546
 
547
  <?php
548
- $account_addons = $fs->get_account_addons();
549
- if ( ! is_array( $account_addons ) ) {
550
- $account_addons = array();
551
- }
552
 
553
  $installed_addons = $fs->get_installed_addons();
554
  $installed_addons_ids = array();
@@ -578,12 +661,22 @@
578
  </tr>
579
  </thead>
580
  <tbody>
581
- <?php $odd = true;
 
 
 
 
582
  foreach ( $addons_to_show as $addon_id ) {
 
 
583
  $addon_view_params = array(
584
- 'parent_fs' => $fs,
585
- 'addon_id' => $addon_id,
586
- 'odd' => $odd,
 
 
 
 
587
  );
588
 
589
  fs_require_template(
@@ -602,16 +695,23 @@
602
  <?php $fs->do_action( 'after_account_details' ) ?>
603
 
604
  <?php
605
- $view_params = array( 'id' => $VARS['id'] );
606
- fs_require_once_template( 'account/billing.php', $view_params );
607
- fs_require_once_template( 'account/payments.php', $view_params );
 
 
608
  ?>
609
  </div>
610
  </div>
611
  </div>
612
  </div>
613
  </div>
614
- <?php $fs->_maybe_add_subscription_cancellation_dialog_box( true ) ?>
 
 
 
 
 
615
  <script type="text/javascript">
616
  (function ($) {
617
  var setLoading = function ($this, label) {
@@ -660,6 +760,46 @@
660
  );
661
  });
662
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663
  $('.fs-opt-in').click(function () {
664
  setLoading($(this), '<?php fs_esc_js_echo_inline('Opting in', 'opting-in' ) ?>...');
665
  });
70
  ) );
71
  }
72
 
73
+ $payments = $fs->_fetch_payments();
74
+
75
+ $show_billing = ( is_array( $payments ) && 0 < count( $payments ) );
76
+
77
+
78
  $has_tabs = $fs->_add_tabs_before_content();
79
 
80
  if ( $has_tabs ) {
85
  $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug );
86
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
87
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
88
+ /* translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
89
+ $downgrade_x_confirm_text = fs_text_inline( '%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s.', 'downgrade-x-confirm', $slug );
90
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
91
  $cancel_trial_confirm_text = fs_text_inline( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'cancel-trial-confirm', $slug );
92
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
108
  $free_text = fs_text_inline( 'Free', 'free', $slug );
109
  $activate_text = fs_text_inline( 'Activate', 'activate', $slug );
110
  $plan_text = fs_text_x_inline( 'Plan', 'as product pricing plan', 'plan', $slug );
111
+ $bundle_plan_text = fs_text_inline( 'Bundle Plan', 'bundle-plan', $slug );
112
 
113
  $show_plan_row = true;
114
  $show_license_row = is_object( $license );
148
  }
149
  }
150
  }
151
+
152
+ $is_child_license = ( is_object( $license ) && FS_Plugin_License::is_valid_id( $license->parent_license_id ) );
153
+ $bundle_subscription = null;
154
+
155
+ if (
156
+ $show_plan_row &&
157
+ is_object( $license ) &&
158
+ FS_Plugin_License::is_valid_id( $license->parent_license_id )
159
+ ) {
160
+ $bundle_subscription = $fs->_get_subscription( $license->parent_license_id );
161
+ }
162
+
163
+ $is_active_bundle_subscription = ( is_object( $bundle_subscription ) && $bundle_subscription->is_active() );
164
+
165
+ $fs_blog_id = ( is_multisite() && ! is_network_admin() ) ?
166
+ get_current_blog_id() :
167
+ 0;
168
+
169
+ $active_plugins_directories_map = Freemius::get_active_plugins_directories_map( $fs_blog_id );
170
+
171
+ $is_premium = $fs->is_premium();
172
  ?>
173
  <div class="wrap fs-section">
174
  <?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?>
196
  <h3><span class="dashicons dashicons-businessman"></span> <?php fs_esc_html_echo_inline( 'Account Details', 'account-details', $slug ) ?></h3>
197
  <div class="fs-header-actions">
198
  <ul>
199
+ <?php if ( $show_billing ) : ?>
200
+ <li><a href="#fs_billing"><i class="dashicons dashicons-portfolio"></i> <?php fs_esc_html_echo_inline( 'Billing & Invoices', 'billing-invoices', $slug ) ?></li>
201
+ <li>&nbsp;&bull;&nbsp;</li>
202
+ <?php endif ?>
203
  <?php if ( ! $is_paying ) : ?>
204
  <li>
205
  <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
307
  );
308
  }
309
 
310
+ $profile[] = array(
311
+ 'id' => 'product',
312
+ 'title' => ( $fs->is_plugin() ?
313
+ fs_text_inline( 'Plugin', 'plugin', $slug ) :
314
+ fs_text_inline( 'Theme', 'theme', $slug ) ),
315
+ 'value' => $fs->get_plugin_title()
316
+ );
317
+
318
+ $profile[] = array(
319
+ 'id' => 'product_id',
320
+ 'title' => ( $fs->is_plugin() ?
321
+ fs_text_inline( 'Plugin', 'plugin', $slug ) :
322
+ fs_text_inline( 'Theme', 'theme', $slug ) ) . ' ' . fs_text_inline( 'ID', 'id', $slug ),
323
+ 'value' => $fs->get_id()
324
+ );
325
+
326
  if ( ! fs_is_network_admin()) {
327
  $profile[] = array(
328
  'id' => 'site_id',
354
  'value' => $fs->get_plugin_version()
355
  );
356
 
357
+ if ( $is_premium ) {
358
+ $profile[] = array(
359
+ 'id' => 'beta_program',
360
+ 'title' => '',
361
+ 'value' => $user->is_beta
362
+ );
363
+ }
364
+
365
  if ( $has_paid_plan ) {
366
  if ( $fs->is_trial() ) {
367
  if ( $show_plan_row ) {
377
  if ( $show_plan_row ) {
378
  $profile[] = array(
379
  'id' => 'plan',
380
+ 'title' => ( $is_child_license ? ucfirst( $fs->get_module_type() ) . ' ' : '' ) . $plan_text,
381
  'value' => strtoupper( is_string( $plan->name ) ?
382
  $plan->title :
383
  strtoupper( $free_text )
384
  )
385
  );
386
+
387
+ if ( $is_child_license ) {
388
+ $profile[] = array(
389
+ 'id' => 'bundle_plan',
390
+ 'title' => $bundle_plan_text,
391
+ 'value' => strtoupper( $license->parent_plan_title )
392
+ );
393
+ }
394
  }
395
 
396
  if ( is_object( $license ) ) {
416
  ?>
417
  <tr class="fs-field-<?php echo $p['id'] ?><?php if ( $odd ) : ?> alternate<?php endif ?>">
418
  <td>
419
+ <nobr><?php echo $p['title'] ?><?php echo ( ! empty( $p['title'] ) ) ? ':' : '' ?></nobr>
420
  </td>
421
+ <td<?php if ( 'plan' === $p['id'] || 'bundle_plan' === $p['id'] ) { echo ' colspan="2"'; }?>>
422
  <?php if ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
423
  <code><?php echo htmlspecialchars( substr( $p['value'], 0, 6 ) ) . str_pad( '', 23 * 6, '&bull;' ) . htmlspecialchars( substr( $p['value'], - 3 ) ) ?></code>
424
  <input type="text" value="<?php echo htmlspecialchars( $p['value'] ) ?>" style="display: none"
425
  readonly/>
426
+ <?php elseif ( 'beta_program' === $p['id'] ) : ?>
427
+ <label>
428
+ <input type="checkbox" class="fs-toggle-beta-mode" <?php checked( true, $p['value'] ) ?>/><span><?php
429
+ fs_esc_html_echo_inline( 'Join the Beta program', 'join-beta', $slug )
430
+ ?></span></label>
431
  <?php else : ?>
432
  <code><?php echo htmlspecialchars( $p['value'] ) ?></code>
433
  <?php endif ?>
439
  <label class="fs-tag fs-success"><?php echo esc_html( $trial_text ) ?></label>
440
  <?php endif ?>
441
  <?php if ( is_object( $license ) && ! $license->is_lifetime() ) : ?>
442
+ <?php if ( ! $is_active_subscription && ! $is_active_bundle_subscription && ! $license->is_first_payment_pending() ) : ?>
443
  <?php $is_license_expired = $license->is_expired() ?>
444
  <?php $expired_ago_text = ( fs_text_inline( 'Expired', 'expired', $slug ) . ' ' . fs_text_x_inline( '%s ago', 'x-ago', $slug ) ) ?>
445
  <label
470
  <?php else : ?>
471
  <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
472
  method="POST" class="button-group">
473
+ <?php if ( $show_upgrade && $is_premium ) : ?>
474
  <a class="button activate-license-trigger <?php echo $fs->get_unique_affix() ?>" href="#"><?php fs_esc_html_echo_inline( 'Activate License', 'activate-license', $slug ) ?></a>
475
  <?php endif ?>
476
  <input type="submit" class="button"
489
  </form>
490
  <?php endif ?>
491
  </div>
492
+ <?php elseif ( 'bundle_plan' === $p['id'] ) : ?>
493
+ <?php if ( is_object( $bundle_subscription ) ) : ?>
494
+ <?php if ( $is_active_bundle_subscription && ! $license->is_first_payment_pending() ) : ?>
495
+ <label class="fs-tag fs-success"><?php echo esc_html( sprintf( $renews_in_text, human_time_diff( time(), strtotime( $bundle_subscription->next_payment ) ) ) ) ?></label>
496
+ <?php endif ?>
497
+ <?php endif ?>
498
  <?php elseif ( 'version' === $p['id'] && $has_paid_plan ) : ?>
499
  <?php if ( $fs->has_premium_version() ) : ?>
500
+ <?php if ( $is_premium ) : ?>
501
  <label
502
  class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"><?php fs_esc_html_echo_inline( 'Premium version', 'premium-version', $slug ) ?></label>
503
  <?php elseif ( $fs->can_use_premium_code() ) : ?>
506
  <?php endif ?>
507
  <?php endif ?>
508
  </td>
509
+ <?php if ( 'plan' !== $p['id'] && 'bundle_plan' !== $p['id'] ) : ?>
510
  <td class="fs-right">
511
  <?php if ( 'email' === $p['id'] && ! $user->is_verified() ) : ?>
512
  <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
566
  </td>
567
  <?php endif ?>
568
  </tr>
569
+ <?php
570
+ if ( 'version' === $p['id'] && $is_premium ) {
571
+ /**
572
+ * If there's a row for the beta program, keep its background color
573
+ * the same as the version info row.
574
+ *
575
+ * @author Leo Fajardo (@leorw)
576
+ * @since 2.3.0
577
+ */
578
+ continue;
579
+ }
580
+
581
+ $odd = ! $odd;
582
+ endforeach ?>
583
  </table>
584
  </div>
585
  </div>
588
  <h3><span class="dashicons dashicons-networking"></span> <?php fs_esc_html_echo_inline( 'Sites', 'sites', $slug ) ?></h3>
589
  <div class="fs-header-actions">
590
  <?php $has_license = is_object( $license ) ?>
591
+ <?php if ( $has_license || ( $show_upgrade && $is_premium ) ) : ?>
592
  <?php
593
  $activate_license_button_text = $has_license ?
594
  fs_esc_html_inline( 'Change License', 'change-license', $slug ) :
631
  <?php endif ?>
632
 
633
  <?php
634
+ $account_addons = $fs->get_updated_account_addons();
 
 
 
635
 
636
  $installed_addons = $fs->get_installed_addons();
637
  $installed_addons_ids = array();
661
  </tr>
662
  </thead>
663
  <tbody>
664
+ <?php
665
+ $odd = true;
666
+
667
+ $installed_addons_ids_map = array_flip( $installed_addons_ids );
668
+
669
  foreach ( $addons_to_show as $addon_id ) {
670
+ $is_addon_installed = isset( $installed_addons_ids_map[ $addon_id ] );
671
+
672
  $addon_view_params = array(
673
+ 'parent_fs' => $fs,
674
+ 'addon_id' => $addon_id,
675
+ 'odd' => $odd,
676
+ 'fs_blog_id' => $fs_blog_id,
677
+ 'active_plugins_directories_map' => &$active_plugins_directories_map,
678
+ 'is_addon_installed' => $is_addon_installed,
679
+ 'addon_info' => $fs->_get_addon_info( $addon_id, $is_addon_installed )
680
  );
681
 
682
  fs_require_template(
695
  <?php $fs->do_action( 'after_account_details' ) ?>
696
 
697
  <?php
698
+ if ( $show_billing ) {
699
+ $view_params = array( 'id' => $VARS['id'] );
700
+ fs_require_once_template( 'account/billing.php', $view_params );
701
+ fs_require_once_template( 'account/payments.php', $view_params );
702
+ }
703
  ?>
704
  </div>
705
  </div>
706
  </div>
707
  </div>
708
  </div>
709
+ <?php
710
+ $subscription_cancellation_dialog_box_template_params = $fs->_get_subscription_cancellation_dialog_box_template_params( true );
711
+ if ( ! empty( $subscription_cancellation_dialog_box_template_params ) ) {
712
+ fs_require_template( 'forms/subscription-cancellation.php', $subscription_cancellation_dialog_box_template_params );
713
+ }
714
+ ?>
715
  <script type="text/javascript">
716
  (function ($) {
717
  var setLoading = function ($this, label) {
760
  );
761
  });
762
 
763
+ <?php
764
+ $plugin_title = $fs->get_plugin_title();
765
+ $processing_text = fs_esc_js_inline( 'Processing', 'processing' );
766
+ $confirmation_message = sprintf(
767
+ '%s %s',
768
+ sprintf( fs_esc_attr_inline( 'Get updates for bleeding edge Beta versions of %s.', 'get-beta-versions', $slug ), $plugin_title ),
769
+ sprintf( fs_esc_attr_inline( 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.', 'beta-version-update-caution', $slug ), $plugin_title )
770
+ );
771
+ ?>
772
+
773
+ $( '.fs-toggle-beta-mode' ).click( function () {
774
+ var $checkbox = $( this ),
775
+ isChecked = $checkbox.is( ':checked' );
776
+
777
+ if ( ! isChecked || confirm( '<?php echo $confirmation_message ?>' ) ) {
778
+ $.ajax( {
779
+ url : ajaxurl,
780
+ method: 'POST',
781
+ data : {
782
+ action : '<?php echo $fs->get_ajax_action( 'set_beta_mode' ) ?>',
783
+ security : '<?php echo $fs->get_ajax_security( 'set_beta_mode' ) ?>',
784
+ is_beta : isChecked,
785
+ module_id: <?php echo $fs->get_id() ?>
786
+ },
787
+ beforeSend: function () {
788
+ $checkbox.prop( 'disabled', true );
789
+ $checkbox.parent().find( 'span' ).text( '<?php echo $processing_text ?>' + '...' );
790
+ },
791
+ complete: function () {
792
+ $checkbox.prop( 'disabled', false );
793
+ $checkbox.parent().find( 'span' ).text( '<?php fs_esc_js_echo_inline( 'Join the Beta Program', 'join-beta', $slug ) ?>' );
794
+ }
795
+ } );
796
+
797
+ return true;
798
+ }
799
+
800
+ return false;
801
+ });
802
+
803
  $('.fs-opt-in').click(function () {
804
  setLoading($(this), '<?php fs_esc_js_echo_inline('Opting in', 'opting-in' ) ?>...');
805
  });
vendor/freemius/templates/account/billing.php CHANGED
@@ -18,20 +18,14 @@
18
 
19
  $slug = $fs->get_slug();
20
 
21
- $payments = $fs->_fetch_payments();
 
22
 
23
- $show_billing = ( is_array( $payments ) && 0 < count( $payments ) );
24
-
25
- if ( $show_billing ) :
26
-
27
- $edit_text = fs_text_x_inline( 'Edit', 'verb', 'edit', $slug );
28
- $update_text = fs_text_x_inline( 'Update', 'verb', 'update', $slug );
29
-
30
- $billing = $fs->_fetch_billing();
31
- $has_billing = ( $billing instanceof FS_Billing );
32
- if ( ! $has_billing ) {
33
- $billing = new FS_Billing();
34
- }
35
  ?>
36
  <!-- Billing -->
37
  <div class="postbox">
@@ -426,6 +420,4 @@
426
  }
427
  });
428
  })(jQuery);
429
- </script>
430
- <?php
431
- endif;
18
 
19
  $slug = $fs->get_slug();
20
 
21
+ $edit_text = fs_text_x_inline( 'Edit', 'verb', 'edit', $slug );
22
+ $update_text = fs_text_x_inline( 'Update', 'verb', 'update', $slug );
23
 
24
+ $billing = $fs->_fetch_billing();
25
+ $has_billing = ( $billing instanceof FS_Billing );
26
+ if ( ! $has_billing ) {
27
+ $billing = new FS_Billing();
28
+ }
 
 
 
 
 
 
 
29
  ?>
30
  <!-- Billing -->
31
  <div class="postbox">
420
  }
421
  });
422
  })(jQuery);
423
+ </script>
 
 
vendor/freemius/templates/account/partials/addon.php CHANGED
@@ -8,12 +8,16 @@
8
  $odd = $VARS['odd'];
9
  $slug = $fs->get_slug();
10
 
 
11
 
12
- $addon = $fs->get_addon( $addon_id );
 
 
13
  $is_addon_activated = $fs->is_addon_activated( $addon_id );
14
- $is_addon_connected = $fs->is_addon_connected( $addon_id );
 
15
 
16
- $fs_addon = $is_addon_connected ?
17
  freemius( $addon_id ) :
18
  false;
19
 
@@ -21,8 +25,8 @@
21
  $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug );
22
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
23
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
24
- /* translators: %1s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
25
- $downgrade_x_confirm_text = fs_text_inline( '%1s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
26
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
27
  $cancel_trial_confirm_text = fs_text_inline( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'cancel-trial-confirm', $slug );
28
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
@@ -48,11 +52,15 @@
48
  // Defaults.
49
  $plan = null;
50
  $is_paid_trial = false;
 
 
 
51
  $license = null;
52
  $site = null;
53
  $is_active_subscription = false;
54
  $subscription = null;
55
  $is_paying = false;
 
56
 
57
  if ( is_object( $fs_addon ) ) {
58
  $is_paying = $fs_addon->is_paying();
@@ -63,18 +71,62 @@
63
  $fs_addon->_get_subscription( $license->id ) :
64
  null );
65
  $plan = $fs_addon->get_plan();
66
- $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
 
67
  $is_paid_trial = $fs_addon->is_paid_trial();
68
  $show_upgrade = ( $fs_addon->has_paid_plan() && ! $is_paying && ! $is_paid_trial && ! $fs_addon->_has_premium_license() );
69
- $is_current_license_expired = is_object( $license ) && $license->is_expired();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
 
 
71
  ?>
72
  <tr<?php if ( $odd ) {
73
  echo ' class="alternate"';
74
  } ?>>
75
  <td>
76
  <!-- Title -->
77
- <?php echo $addon->title ?>
78
  </td>
79
  <?php if ( $is_addon_connected ) : ?>
80
  <!-- ID -->
@@ -82,21 +134,21 @@
82
  <!--/ ID -->
83
 
84
  <!-- Version -->
85
- <td><?php echo $fs_addon->get_plugin_version() ?></td>
86
  <!--/ Version -->
87
 
88
  <!-- Plan Title -->
89
- <td><?php echo strtoupper( is_string( $plan->name ) ? $plan->title : $free_text ) ?></td>
90
  <!--/ Plan Title -->
91
 
92
- <?php if ( $fs_addon->is_trial() || is_object( $license ) ) : ?>
93
 
94
  <!-- Expiration -->
95
  <td>
96
  <?php
97
  $tags = array();
98
 
99
- if ( $fs_addon->is_trial() ) {
100
  $tags[] = array( 'label' => $trial_text, 'type' => 'success' );
101
 
102
  $tags[] = array(
@@ -203,7 +255,7 @@
203
  $cancel_trial_confirm_text,
204
  'POST'
205
  );
206
- } else {
207
  $premium_license = $fs_addon->_get_available_premium_license();
208
 
209
  if ( is_object( $premium_license ) ) {
@@ -258,17 +310,20 @@
258
  } else if ( ! $show_upgrade ) {
259
  if ( $fs->is_addon_installed( $addon_id ) ) {
260
  $addon_file = $fs->get_addon_basename( $addon_id );
261
- $buttons[] = sprintf(
262
- '<a class="button button-primary edit" href="%s" title="%s">%s</a>',
263
- wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file ),
264
- fs_esc_attr_inline( 'Activate this add-on', 'activate-this-addon', $slug ),
265
- $activate_text
266
- );
 
 
 
267
  } else {
268
  if ( $fs->is_allowed_to_install() ) {
269
  $buttons[] = sprintf(
270
  '<a class="button button-primary edit" href="%s">%s</a>',
271
- wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $addon->slug ), 'install-plugin_' . $addon->slug ),
272
  fs_text_inline( 'Install Now', 'install-now', $slug )
273
  );
274
  } else {
@@ -283,10 +338,10 @@
283
 
284
  if ( $show_upgrade ) {
285
  $buttons[] = sprintf( '<a href="%s" class="thickbox button button-small button-primary" aria-label="%s" data-title="%s"><i class="dashicons dashicons-cart"></i> %s</a>',
286
- esc_url( network_admin_url( 'plugin-install.php?fs_allow_updater_and_dialog=true&tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug .
287
  '&TB_iframe=true&width=600&height=550' ) ),
288
- esc_attr( sprintf( fs_text_inline( 'More information about %s', 'more-information-about-x', $slug ), $addon->title ) ),
289
- esc_attr( $addon->title ),
290
  ( $fs_addon->has_free_plan() ?
291
  $upgrade_text :
292
  fs_text_x_inline( 'Purchase', 'verb', 'purchase', $slug ) )
@@ -312,14 +367,16 @@
312
  <td colspan="4">
313
  <?php if ( $fs->is_addon_installed( $addon_id ) ) : ?>
314
  <?php $addon_file = $fs->get_addon_basename( $addon_id ) ?>
 
315
  <a class="button button-primary"
316
  href="<?php echo wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file ) ?>"
317
  title="<?php fs_esc_attr_echo_inline( 'Activate this add-on', 'activate-this-addon', $slug ) ?>"
318
  class="edit"><?php echo esc_html( $activate_text ) ?></a>
 
319
  <?php else : ?>
320
  <?php if ( $fs->is_allowed_to_install() ) : ?>
321
  <a class="button button-primary"
322
- href="<?php echo wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $addon->slug ), 'install-plugin_' . $addon->slug ) ?>"><?php fs_esc_html_echo_inline( 'Install Now', 'install-now', $slug ) ?></a>
323
  <?php else : ?>
324
  <a target="_blank" class="button button-primary"
325
  href="<?php echo $fs->_get_latest_download_local_url( $addon_id ) ?>"><?php echo esc_html( $download_latest_text ) ?></a>
8
  $odd = $VARS['odd'];
9
  $slug = $fs->get_slug();
10
 
11
+ $fs_blog_id = $VARS['fs_blog_id'];
12
 
13
+ $active_plugins_directories_map = $VARS['active_plugins_directories_map'];
14
+
15
+ $addon_info = $VARS['addon_info'];
16
  $is_addon_activated = $fs->is_addon_activated( $addon_id );
17
+ $is_addon_connected = $addon_info['is_connected'];
18
+ $is_addon_installed = $VARS['is_addon_installed'];
19
 
20
+ $fs_addon = ( $is_addon_connected && $is_addon_installed ) ?
21
  freemius( $addon_id ) :
22
  false;
23
 
25
  $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug );
26
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
27
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
28
+ /* translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
29
+ $downgrade_x_confirm_text = fs_text_inline( '%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
30
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
31
  $cancel_trial_confirm_text = fs_text_inline( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'cancel-trial-confirm', $slug );
32
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
52
  // Defaults.
53
  $plan = null;
54
  $is_paid_trial = false;
55
+ /**
56
+ * @var FS_Plugin_License $license
57
+ */
58
  $license = null;
59
  $site = null;
60
  $is_active_subscription = false;
61
  $subscription = null;
62
  $is_paying = false;
63
+ $show_upgrade = false;
64
 
65
  if ( is_object( $fs_addon ) ) {
66
  $is_paying = $fs_addon->is_paying();
71
  $fs_addon->_get_subscription( $license->id ) :
72
  null );
73
  $plan = $fs_addon->get_plan();
74
+ $plan_name = $plan->name;
75
+ $plan_title = $plan->title;
76
  $is_paid_trial = $fs_addon->is_paid_trial();
77
  $show_upgrade = ( $fs_addon->has_paid_plan() && ! $is_paying && ! $is_paid_trial && ! $fs_addon->_has_premium_license() );
78
+ $version = $fs_addon->get_plugin_version();
79
+ } else if ( $is_addon_connected ) {
80
+ if (
81
+ empty( $addon_info ) ||
82
+ ! isset( $addon_info['site'] )
83
+ ) {
84
+ $is_addon_connected = false;
85
+ } else {
86
+ /**
87
+ * @var FS_Site $site
88
+ */
89
+ $site = $addon_info['site'];
90
+ $version = $addon_info['version'];
91
+
92
+ $plan_name = isset( $addon_info['plan_name'] ) ?
93
+ $addon_info['plan_name'] :
94
+ '';
95
+
96
+ $plan_title = isset( $addon_info['plan_title'] ) ?
97
+ $addon_info['plan_title'] :
98
+ '';
99
+
100
+ if ( isset( $addon_info['license'] ) ) {
101
+ $license = $addon_info['license'];
102
+ }
103
+
104
+ if ( isset( $addon_info['subscription'] ) ) {
105
+ $subscription = $addon_info['subscription'];
106
+ }
107
+
108
+ $has_valid_and_active_license = (
109
+ is_object( $license ) &&
110
+ $license->is_active() &&
111
+ $license->is_valid()
112
+ );
113
+
114
+ $is_paid_trial = (
115
+ $site->is_trial() &&
116
+ $has_valid_and_active_license &&
117
+ ( $site->trial_plan_id == $license->plan_id )
118
+ );
119
+ }
120
  }
121
+
122
+ $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
123
  ?>
124
  <tr<?php if ( $odd ) {
125
  echo ' class="alternate"';
126
  } ?>>
127
  <td>
128
  <!-- Title -->
129
+ <?php echo $addon_info['title'] ?>
130
  </td>
131
  <?php if ( $is_addon_connected ) : ?>
132
  <!-- ID -->
134
  <!--/ ID -->
135
 
136
  <!-- Version -->
137
+ <td><?php echo $version ?></td>
138
  <!--/ Version -->
139
 
140
  <!-- Plan Title -->
141
+ <td><?php echo strtoupper( is_string( $plan_name ) ? $plan_title : $free_text ) ?></td>
142
  <!--/ Plan Title -->
143
 
144
+ <?php if ( $site->is_trial() || is_object( $license ) ) : ?>
145
 
146
  <!-- Expiration -->
147
  <td>
148
  <?php
149
  $tags = array();
150
 
151
+ if ( $site->is_trial() ) {
152
  $tags[] = array( 'label' => $trial_text, 'type' => 'success' );
153
 
154
  $tags[] = array(
255
  $cancel_trial_confirm_text,
256
  'POST'
257
  );
258
+ } else if ( ! is_object( $license ) || ! $license->is_features_enabled() ) {
259
  $premium_license = $fs_addon->_get_available_premium_license();
260
 
261
  if ( is_object( $premium_license ) ) {
310
  } else if ( ! $show_upgrade ) {
311
  if ( $fs->is_addon_installed( $addon_id ) ) {
312
  $addon_file = $fs->get_addon_basename( $addon_id );
313
+
314
+ if ( ! isset( $active_plugins_directories_map[ dirname( $addon_file ) ] ) ) {
315
+ $buttons[] = sprintf(
316
+ '<a class="button button-primary edit" href="%s" title="%s">%s</a>',
317
+ wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file ),
318
+ fs_esc_attr_inline( 'Activate this add-on', 'activate-this-addon', $slug ),
319
+ $activate_text
320
+ );
321
+ }
322
  } else {
323
  if ( $fs->is_allowed_to_install() ) {
324
  $buttons[] = sprintf(
325
  '<a class="button button-primary edit" href="%s">%s</a>',
326
+ wp_nonce_url( self_admin_url( 'update.php?' . ( ( isset( $addon_info['has_paid_plan'] ) && $addon_info['has_paid_plan'] ) ? 'fs_allow_updater_and_dialog=true&' : '' ) . 'action=install-plugin&plugin=' . $addon_info['slug'] ), 'install-plugin_' . $addon_info['slug'] ),
327
  fs_text_inline( 'Install Now', 'install-now', $slug )
328
  );
329
  } else {
338
 
339
  if ( $show_upgrade ) {
340
  $buttons[] = sprintf( '<a href="%s" class="thickbox button button-small button-primary" aria-label="%s" data-title="%s"><i class="dashicons dashicons-cart"></i> %s</a>',
341
+ esc_url( network_admin_url( 'plugin-install.php?fs_allow_updater_and_dialog=true' . ( ! empty( $fs_blog_id ) ? '&fs_blog_id=' . $fs_blog_id : '' ) . '&tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon_info['slug'] .
342
  '&TB_iframe=true&width=600&height=550' ) ),
343
+ esc_attr( sprintf( fs_text_inline( 'More information about %s', 'more-information-about-x', $slug ), $addon_info['title'] ) ),
344
+ esc_attr( $addon_info['title'] ),
345
  ( $fs_addon->has_free_plan() ?
346
  $upgrade_text :
347
  fs_text_x_inline( 'Purchase', 'verb', 'purchase', $slug ) )
367
  <td colspan="4">
368
  <?php if ( $fs->is_addon_installed( $addon_id ) ) : ?>
369
  <?php $addon_file = $fs->get_addon_basename( $addon_id ) ?>
370
+ <?php if ( ! isset( $active_plugins_directories_map[ dirname( $addon_file ) ] ) ) : ?>
371
  <a class="button button-primary"
372
  href="<?php echo wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file ) ?>"
373
  title="<?php fs_esc_attr_echo_inline( 'Activate this add-on', 'activate-this-addon', $slug ) ?>"
374
  class="edit"><?php echo esc_html( $activate_text ) ?></a>
375
+ <?php endif ?>
376
  <?php else : ?>
377
  <?php if ( $fs->is_allowed_to_install() ) : ?>
378
  <a class="button button-primary"
379
+ href="<?php echo wp_nonce_url( self_admin_url( 'update.php?' . ( ( isset( $addon_info['has_paid_plan'] ) && $addon_info['has_paid_plan'] ) ? 'fs_allow_updater_and_dialog=true&' : '' ) . 'action=install-plugin&plugin=' . $addon_info['slug'] ), 'install-plugin_' . $addon_info['slug'] ) ?>"><?php fs_esc_html_echo_inline( 'Install Now', 'install-now', $slug ) ?></a>
380
  <?php else : ?>
381
  <a target="_blank" class="button button-primary"
382
  href="<?php echo $fs->_get_latest_download_local_url( $addon_id ) ?>"><?php echo esc_html( $download_latest_text ) ?></a>
vendor/freemius/templates/account/partials/site.php CHANGED
@@ -294,8 +294,8 @@
294
  <?php
295
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
296
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
297
- /* translators: %1s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
298
- $downgrade_x_confirm_text = fs_text_inline( '%1s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
299
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
300
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
301
  $after_downgrade_blocking_text = fs_text_inline( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.', 'after-downgrade-blocking', $slug );
294
  <?php
295
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
296
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
297
+ /* translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
298
+ $downgrade_x_confirm_text = fs_text_inline( '%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
299
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
300
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
301
  $after_downgrade_blocking_text = fs_text_inline( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.', 'after-downgrade-blocking', $slug );
vendor/freemius/templates/account/payments.php CHANGED
@@ -44,7 +44,7 @@
44
  <tr<?php echo $odd ? ' class="alternate"' : '' ?>>
45
  <td><?php echo $payment->id ?></td>
46
  <td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
47
- <td>$<?php echo $payment->gross ?></td>
48
  <td><?php if (! $payment->is_migrated() ) : ?><a href="<?php echo $fs->_get_invoice_api_url( $payment->id ) ?>"
49
  class="button button-small"
50
  target="_blank"><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></a><?php endif ?></td>
44
  <tr<?php echo $odd ? ' class="alternate"' : '' ?>>
45
  <td><?php echo $payment->id ?></td>
46
  <td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
47
+ <td><?php echo $payment->formatted_gross() ?></td>
48
  <td><?php if (! $payment->is_migrated() ) : ?><a href="<?php echo $fs->_get_invoice_api_url( $payment->id ) ?>"
49
  class="button button-small"
50
  target="_blank"><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></a><?php endif ?></td>
vendor/freemius/templates/add-ons.php CHANGED
@@ -29,13 +29,24 @@
29
 
30
  $has_addons = ( is_array( $addons ) && 0 < count( $addons ) );
31
 
 
 
 
 
 
32
  $has_tabs = $fs->_add_tabs_before_content();
 
 
 
 
33
  ?>
34
  <div id="fs_addons" class="wrap fs-section">
35
  <?php if ( ! $has_tabs ) : ?>
36
  <h2><?php echo esc_html( sprintf( fs_text_inline( 'Add Ons for %s', 'add-ons-for-x', $slug ), $fs->get_plugin_name() ) ) ?></h2>
37
  <?php endif ?>
38
 
 
 
39
  <div id="poststuff">
40
  <?php if ( ! $has_addons ) : ?>
41
  <h3><?php echo esc_html( sprintf(
@@ -46,8 +57,25 @@
46
  <?php endif ?>
47
  <ul class="fs-cards-list">
48
  <?php if ( $has_addons ) : ?>
 
 
 
 
 
49
  <?php foreach ( $addons as $addon ) : ?>
50
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
51
  $open_addon = ( $open_addon || ( $open_addon_slug === $addon->slug ) );
52
 
53
  $price = 0;
@@ -55,9 +83,8 @@
55
  $has_free_plan = false;
56
  $has_paid_plan = false;
57
 
58
- $result = $fs->get_api_plugin_scope()->get( $fs->add_show_pending( "/addons/{$addon->id}/pricing.json?type=visible" ) );
59
- if ( ! isset( $result->error ) ) {
60
- $plans = $result->plans;
61
 
62
  if ( is_array( $plans ) && 0 < count( $plans ) ) {
63
  foreach ( $plans as $plan ) {
@@ -97,12 +124,32 @@
97
  ?>
98
  <li class="fs-card fs-addon" data-slug="<?php echo $addon->slug ?>">
99
  <?php
100
- echo sprintf( '<a href="%s" class="thickbox fs-overlay" aria-label="%s" data-title="%s"></a>',
101
- esc_url( network_admin_url( 'plugin-install.php?fs_allow_updater_and_dialog=true&tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug .
102
  '&TB_iframe=true&width=600&height=550' ) ),
103
  esc_attr( sprintf( fs_text_inline( 'More information about %s', 'more-information-about-x', $slug ), $addon->title ) ),
104
  esc_attr( $addon->title )
105
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  ?>
107
  <?php
108
  if ( is_null( $addon->info ) ) {
@@ -118,7 +165,17 @@
118
  <div class="fs-inner">
119
  <ul>
120
  <li class="fs-card-banner"
121
- style="background-image: url('<?php echo $addon->info->card_banner_url ?>');"></li>
 
 
 
 
 
 
 
 
 
 
122
  <!-- <li class="fs-tag"></li> -->
123
  <li class="fs-title"><?php echo $addon->title ?></li>
124
  <li class="fs-offer">
@@ -136,7 +193,114 @@
136
  echo implode(' - ', $descriptors) ?></span>
137
  </li>
138
  <li class="fs-description"><?php echo ! empty( $addon->info->short_description ) ? $addon->info->short_description : 'SHORT DESCRIPTION' ?></li>
139
- <li class="fs-cta"><a class="button"><?php fs_esc_html_echo_inline( 'View details', 'view-details', $slug ) ?></a></li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  </ul>
141
  </div>
142
  </li>
@@ -144,9 +308,11 @@
144
  <?php endif ?>
145
  </ul>
146
  </div>
 
 
147
  </div>
148
  <script type="text/javascript">
149
- (function ($) {
150
  <?php if ( $open_addon ) : ?>
151
 
152
  var interval = setInterval(function () {
@@ -171,16 +337,94 @@
171
 
172
  <?php else : ?>
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
- $('.fs-card.fs-addon')
176
- .mouseover(function () {
177
- $(this).find('.fs-cta .button').addClass('button-primary');
178
- }).mouseout(function () {
179
- $(this).find('.fs-cta .button').removeClass('button-primary');
180
- });
 
 
 
 
181
 
182
  <?php endif ?>
183
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  </script>
185
  <?php
186
  if ( $has_tabs ) {
29
 
30
  $has_addons = ( is_array( $addons ) && 0 < count( $addons ) );
31
 
32
+ $account_addon_ids = $fs->get_updated_account_addons();
33
+
34
+ $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug );
35
+ $view_details_text = fs_text_inline( 'View details', 'view-details', $slug );
36
+
37
  $has_tabs = $fs->_add_tabs_before_content();
38
+
39
+ $fs_blog_id = ( is_multisite() && ! is_network_admin() ) ?
40
+ get_current_blog_id() :
41
+ 0;
42
  ?>
43
  <div id="fs_addons" class="wrap fs-section">
44
  <?php if ( ! $has_tabs ) : ?>
45
  <h2><?php echo esc_html( sprintf( fs_text_inline( 'Add Ons for %s', 'add-ons-for-x', $slug ), $fs->get_plugin_name() ) ) ?></h2>
46
  <?php endif ?>
47
 
48
+ <?php $fs->do_action( 'addons/after_title' ) ?>
49
+
50
  <div id="poststuff">
51
  <?php if ( ! $has_addons ) : ?>
52
  <h3><?php echo esc_html( sprintf(
57
  <?php endif ?>
58
  <ul class="fs-cards-list">
59
  <?php if ( $has_addons ) : ?>
60
+ <?php
61
+ $plans_and_pricing_by_addon_id = $fs->_get_addons_plans_and_pricing_map_by_id();
62
+
63
+ $active_plugins_directories_map = Freemius::get_active_plugins_directories_map( $fs_blog_id );
64
+ ?>
65
  <?php foreach ( $addons as $addon ) : ?>
66
  <?php
67
+ $basename = $fs->get_addon_basename( $addon->id );
68
+
69
+ $is_addon_installed = file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $basename ) );
70
+ $is_addon_activated = $is_addon_installed ?
71
+ $fs->is_addon_activated( $addon->id ) :
72
+ false;
73
+
74
+ $is_plugin_active = (
75
+ $is_addon_activated ||
76
+ isset( $active_plugins_directories_map[ dirname( $basename ) ] )
77
+ );
78
+
79
  $open_addon = ( $open_addon || ( $open_addon_slug === $addon->slug ) );
80
 
81
  $price = 0;
83
  $has_free_plan = false;
84
  $has_paid_plan = false;
85
 
86
+ if ( isset( $plans_and_pricing_by_addon_id[$addon->id] ) ) {
87
+ $plans = $plans_and_pricing_by_addon_id[$addon->id];
 
88
 
89
  if ( is_array( $plans ) && 0 < count( $plans ) ) {
90
  foreach ( $plans as $plan ) {
124
  ?>
125
  <li class="fs-card fs-addon" data-slug="<?php echo $addon->slug ?>">
126
  <?php
127
+ $view_details_link = sprintf( '<a href="%s" aria-label="%s" data-title="%s"',
128
+ esc_url( network_admin_url( 'plugin-install.php?fs_allow_updater_and_dialog=true' . ( ! empty( $fs_blog_id ) ? '&fs_blog_id=' . $fs_blog_id : '' ) . '&tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug .
129
  '&TB_iframe=true&width=600&height=550' ) ),
130
  esc_attr( sprintf( fs_text_inline( 'More information about %s', 'more-information-about-x', $slug ), $addon->title ) ),
131
  esc_attr( $addon->title )
132
+ ) . ' class="thickbox%s">%s</a>';
133
+
134
+ echo sprintf(
135
+ $view_details_link,
136
+ /**
137
+ * Additional class.
138
+ *
139
+ * @author Leo Fajardo (@leorw)
140
+ * @since 2.2.4
141
+ */
142
+ ' fs-overlay',
143
+ /**
144
+ * Set the view details link text to an empty string since it is an overlay that
145
+ * doesn't really need a text and whose purpose is to open the details dialog when
146
+ * the card is clicked.
147
+ *
148
+ * @author Leo Fajardo (@leorw)
149
+ * @since 2.2.4
150
+ */
151
+ ''
152
+ );
153
  ?>
154
  <?php
155
  if ( is_null( $addon->info ) ) {
165
  <div class="fs-inner">
166
  <ul>
167
  <li class="fs-card-banner"
168
+ style="background-image: url('<?php echo $addon->info->card_banner_url ?>');"><?php
169
+ if ( $is_plugin_active || $is_addon_installed ) {
170
+ echo sprintf(
171
+ '<span class="fs-badge fs-installed-addon-badge">%s</span>',
172
+ esc_html( $is_plugin_active ?
173
+ fs_text_x_inline( 'Active', 'active add-on', 'active-addon', $slug ) :
174
+ fs_text_x_inline( 'Installed', 'installed add-on', 'installed-addon', $slug )
175
+ )
176
+ );
177
+ }
178
+ ?></li>
179
  <!-- <li class="fs-tag"></li> -->
180
  <li class="fs-title"><?php echo $addon->title ?></li>
181
  <li class="fs-offer">
193
  echo implode(' - ', $descriptors) ?></span>
194
  </li>
195
  <li class="fs-description"><?php echo ! empty( $addon->info->short_description ) ? $addon->info->short_description : 'SHORT DESCRIPTION' ?></li>
196
+ <?php
197
+ $is_free_only_wp_org_compliant = ( ! $has_paid_plan && $addon->is_wp_org_compliant );
198
+
199
+ $is_allowed_to_install = (
200
+ $fs->is_allowed_to_install() ||
201
+ $is_free_only_wp_org_compliant
202
+ );
203
+
204
+ $show_premium_activation_or_installation_action = true;
205
+
206
+ if ( ! in_array( $addon->id, $account_addon_ids ) ) {
207
+ $show_premium_activation_or_installation_action = false;
208
+ } else if ( $is_addon_installed ) {
209
+ /**
210
+ * If any add-on's version (free or premium) is installed, check if the
211
+ * premium version can be activated and show the relevant action. Otherwise,
212
+ * show the relevant action for the free version.
213
+ *
214
+ * @author Leo Fajardo (@leorw)
215
+ * @since 2.4.5
216
+ */
217
+ $fs_addon = $is_addon_activated ?
218
+ $fs->get_addon_instance( $addon->id ) :
219
+ null;
220
+
221
+ $premium_plugin_basename = is_object( $fs_addon ) ?
222
+ $fs_addon->premium_plugin_basename() :
223
+ "{$addon->premium_slug}/{$addon->slug}.php";
224
+
225
+ if (
226
+ ( $is_addon_activated && $fs_addon->is_premium() ) ||
227
+ file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_plugin_basename ) )
228
+ ) {
229
+ $basename = $premium_plugin_basename;
230
+ }
231
+
232
+ $show_premium_activation_or_installation_action = (
233
+ ( ! $is_addon_activated || ! $fs_addon->is_premium() ) &&
234
+ /**
235
+ * This check is needed for cases when an active add-on doesn't have an
236
+ * associated Freemius instance.
237
+ *
238
+ * @author Leo Fajardo (@leorw)
239
+ * @since 2.4.5
240
+ */
241
+ ( ! $is_plugin_active )
242
+ );
243
+ }
244
+ ?>
245
+ <?php if ( ! $show_premium_activation_or_installation_action ) : ?>
246
+ <li class="fs-cta"><a class="button"><?php echo esc_html( $view_details_text ) ?></a></li>
247
+ <?php else : ?>
248
+ <?php
249
+ $latest_download_local_url = $is_free_only_wp_org_compliant ?
250
+ null :
251
+ $fs->_get_latest_download_local_url( $addon->id );
252
+ ?>
253
+
254
+ <li class="fs-cta fs-dropdown">
255
+ <div class="button-group">
256
+ <?php if ( $is_allowed_to_install ) : ?>
257
+ <?php
258
+ if ( ! $is_addon_installed ) {
259
+ echo sprintf(
260
+ '<a class="button button-primary" href="%s">%s</a>',
261
+ wp_nonce_url( self_admin_url( 'update.php?' . ( ( $has_paid_plan || ! $addon->is_wp_org_compliant ) ? 'fs_allow_updater_and_dialog=true&' : '' ) . 'action=install-plugin&plugin=' . $addon->slug ), 'install-plugin_' . $addon->slug ),
262
+ fs_esc_html_inline( 'Install Now', 'install-now', $slug )
263
+ );
264
+ } else {
265
+ echo sprintf(
266
+ '<a class="button button-primary edit" href="%s" title="%s" target="_parent">%s</a>',
267
+ wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $basename, 'activate-plugin_' . $basename ),
268
+ fs_esc_attr_inline( 'Activate this add-on', 'activate-this-addon', $addon->slug ),
269
+ fs_text_inline( 'Activate', 'activate', $addon->slug )
270
+ );
271
+ }
272
+ ?>
273
+ <?php else : ?>
274
+ <a target="_blank" class="button button-primary" href="<?php echo $latest_download_local_url ?>"><?php echo esc_html( $download_latest_text ) ?></a>
275
+ <?php endif ?>
276
+ <div class="button button-primary fs-dropdown-arrow-button"><span class="fs-dropdown-arrow"></span><ul class="fs-dropdown-list" style="display: none">
277
+ <?php if ( $is_allowed_to_install && ! empty( $latest_download_local_url ) ) : ?>
278
+ <li><a target="_blank" href="<?php echo $latest_download_local_url ?>"><?php echo esc_html( $download_latest_text ) ?></a></li>
279
+ <?php endif ?>
280
+ <li><?php
281
+ echo sprintf(
282
+ $view_details_link,
283
+ /**
284
+ * No additional class.
285
+ *
286
+ * @author Leo Fajardo (@leorw)
287
+ * @since 2.2.4
288
+ */
289
+ '',
290
+ /**
291
+ * Set the view details link text to a non-empty string since it is an
292
+ * item in the dropdown list and the text should be visible.
293
+ *
294
+ * @author Leo Fajardo (@leorw)
295
+ * @since 2.2.4
296
+ */
297
+ esc_html( $view_details_text )
298
+ );
299
+ ?></li>
300
+ </ul></div>
301
+ </div>
302
+ </li>
303
+ <?php endif ?>
304
  </ul>
305
  </div>
306
  </li>
308
  <?php endif ?>
309
  </ul>
310
  </div>
311
+
312
+ <?php $fs->do_action( 'addons/after_addons' ) ?>
313
  </div>
314
  <script type="text/javascript">
315
+ (function( $, undef ) {
316
  <?php if ( $open_addon ) : ?>
317
 
318
  var interval = setInterval(function () {
337
 
338
  <?php else : ?>
339
 
340
+ $( '.fs-card.fs-addon' )
341
+ .mouseover(function() {
342
+ var $this = $( this );
343
+
344
+ $this.find( '.fs-cta .button' ).addClass( 'button-primary' );
345
+
346
+ if ( 0 === $this.find( '.fs-dropdown-arrow-button.active' ).length ) {
347
+ /**
348
+ * When hovering over a card, close the dropdown on any other card.
349
+ *
350
+ * @author Leo Fajardo (@leorw)
351
+ * @since 2.2.4
352
+ */
353
+ toggleDropdown();
354
+ }
355
+ }).mouseout(function( evt ) {
356
+ var $relatedTarget = $( evt.relatedTarget );
357
+
358
+ if ( 0 !== $relatedTarget.parents( '.fs-addon' ).length ) {
359
+ return true;
360
+ }
361
+
362
+ var $this = $( this );
363
+
364
+ /**
365
+ * Set the color of the "View details" button to "secondary".
366
+ *
367
+ * @author Leo Fajardo (@leorw)
368
+ * @since 2.2.4
369
+ */
370
+ $this.find( '.fs-cta .button' ).filter(function() {
371
+ /**
372
+ * Keep the "primary" color of the dropdown arrow button, "Install Now" button, and
373
+ * "Download Latest" button.
374
 
375
+ * @author Leo Fajardo (@leorw)
376
+ * @since 2.2.4
377
+ */
378
+ return $( this ).parent().is( ':not(.button-group)' );
379
+ }).removeClass('button-primary');
380
+
381
+ toggleDropdown( $this.find( '.fs-dropdown' ), false );
382
+ }).find( 'a.thickbox, .button:not(.fs-dropdown-arrow-button)' ).click(function() {
383
+ toggleDropdown();
384
+ });
385
 
386
  <?php endif ?>
387
+
388
+ var $dropdowns = $( '.fs-dropdown' );
389
+ if ( 0 !== $dropdowns.length ) {
390
+ $dropdowns.find( '.fs-dropdown-arrow-button' ).click(function() {
391
+ var $this = $( this ),
392
+ $dropdown = $this.parents( '.fs-dropdown' );
393
+
394
+ toggleDropdown( $dropdown, ! $dropdown.hasClass( 'active' ) );
395
+ });
396
+ }
397
+
398
+ /**
399
+ * Returns the default state of the dropdown arrow button and hides the dropdown list.
400
+ *
401
+ * @author Leo Fajardo (@leorw)
402
+ * @since 2.2.4
403
+ *
404
+ * @param {(Object|undefined)} [$dropdown]
405
+ * @param {(Boolean|undefined)} [state]
406
+ */
407
+ function toggleDropdown( $dropdown, state ) {
408
+ if ( undef === $dropdown ) {
409
+ var $activeDropdown = $dropdowns.find( '.active' );
410
+ if ( 0 !== $activeDropdown.length ) {
411
+ $dropdown = $activeDropdown;
412
+ }
413
+ }
414
+
415
+ if ( undef === $dropdown ) {
416
+ return;
417
+ }
418
+
419
+ if ( undef === state ) {
420
+ state = false;
421
+ }
422
+
423
+ $dropdown.toggleClass( 'active', state );
424
+ $dropdown.find( '.fs-dropdown-list' ).toggle( state );
425
+ $dropdown.find( '.fs-dropdown-arrow-button' ).toggleClass( 'active', state );
426
+ }
427
+ })( jQuery );
428
  </script>
429
  <?php
430
  if ( $has_tabs ) {
vendor/freemius/templates/checkout.php CHANGED
@@ -79,7 +79,12 @@
79
 
80
  if ( $plugin_id == $fs->get_id() ) {
81
  $is_premium = $fs->is_premium();
82
- } else {
 
 
 
 
 
83
  // Identify the module code version of the checkout context module.
84
  if ( $fs->is_addon_activated( $plugin_id ) ) {
85
  $fs_addon = Freemius::get_instance_by_id( $plugin_id );
@@ -96,8 +101,11 @@
96
 
97
  if ( $plugin_id != $fs->get_id() ) {
98
  if ( $fs->is_addon_activated( $plugin_id ) ) {
99
- $fs_addon = Freemius::get_instance_by_id( $plugin_id );
100
- $site = $fs_addon->get_site();
 
 
 
101
  }
102
  }
103
 
79
 
80
  if ( $plugin_id == $fs->get_id() ) {
81
  $is_premium = $fs->is_premium();
82
+
83
+ $bundle_id = $fs->get_bundle_id();
84
+ if ( ! is_null( $bundle_id ) ) {
85
+ $context_params['bundle_id'] = $bundle_id;
86
+ }
87
+ } else {
88
  // Identify the module code version of the checkout context module.
89
  if ( $fs->is_addon_activated( $plugin_id ) ) {
90
  $fs_addon = Freemius::get_instance_by_id( $plugin_id );
101
 
102
  if ( $plugin_id != $fs->get_id() ) {
103
  if ( $fs->is_addon_activated( $plugin_id ) ) {
104
+ $fs_addon = Freemius::get_instance_by_id( $plugin_id );
105
+ $addon_site = $fs_addon->get_site();
106
+ if ( is_object( $addon_site ) ) {
107
+ $site = $addon_site;
108
+ }
109
  }
110
  }
111
 
vendor/freemius/templates/connect.php CHANGED
@@ -314,7 +314,7 @@
314
  <a id="skip_activation" href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $fs->get_unique_affix() . '_skip_activation' ), $is_network_level_activation ), $fs->get_unique_affix() . '_skip_activation' ) ?>"
315
  class="button button-secondary" tabindex="2"><?php fs_esc_html_echo_x_inline( 'Skip', 'verb', 'skip', $slug ) ?></a>
316
  <?php endif ?>
317
- <?php if ( $is_network_level_activation ) : ?>
318
  <a id="delegate_to_site_admins" class="fs-tooltip-trigger <?php echo is_rtl() ? ' rtl' : '' ?>" href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $fs->get_unique_affix() . '_delegate_activation' ) ), $fs->get_unique_affix() . '_delegate_activation' ) ?>"><?php fs_esc_html_echo_inline( 'Delegate to Site Admins', 'delegate-to-site-admins', $slug ) ?><span class="fs-tooltip"><?php fs_esc_html_echo_inline( 'If you click it, this decision will be delegated to the sites administrators.', 'delegate-sites-tooltip', $slug ) ?></span></a>
319
  <?php endif ?>
320
  <?php if ( $activate_with_current_user ) : ?>
@@ -474,6 +474,7 @@
474
  $licenseSecret,
475
  $licenseKeyInput = $('#fs_license_key'),
476
  pauseCtaLabelUpdate = false,
 
477
  /**
478
  * @author Leo Fajardo (@leorw)
479
  * @since 2.1.0
@@ -505,14 +506,15 @@
505
 
506
  if ( isNetworkActive ) {
507
  var
508
- $multisiteOptionsContainer = $( '#multisite_options_container' ),
509
- $allSitesOptions = $( '#all_sites_options' ),
510
- $applyOnAllSites = $( '#apply_on_all_sites' ),
511
- $sitesListContainer = $( '#sites_list_container' ),
512
  totalSites = <?php echo count( $sites ) ?>,
513
  maxSitesListHeight = null,
514
  $skipActivationButton = $( '#skip_activation' ),
515
- $delegateToSiteAdminsButton = $( '#delegate_to_site_admins' );
 
516
 
517
  $applyOnAllSites.click(function() {
518
  var isChecked = $( this ).is( ':checked' );
@@ -528,7 +530,7 @@
528
 
529
  $delegateToSiteAdminsButton.toggle();
530
 
531
- $multisiteOptionsContainer.toggleClass( 'apply-on-all-sites', isChecked );
532
 
533
  $sitesListContainer.toggle( ! isChecked );
534
  if ( ! isChecked && null === maxSitesListHeight ) {
@@ -575,7 +577,7 @@
575
  }
576
  });
577
 
578
- if (isNetworkUpgradeMode) {
579
  $skipActivationButton.click(function(){
580
  $delegateToSiteAdminsButton.hide();
581
 
@@ -598,6 +600,16 @@
598
 
599
  pauseCtaLabelUpdate = true;
600
 
 
 
 
 
 
 
 
 
 
 
601
  // Check all sites to be skipped.
602
  $allSitesOptions.find('.action.action-delegate').click();
603
 
@@ -605,6 +617,16 @@
605
 
606
  pauseCtaLabelUpdate = false;
607
 
 
 
 
 
 
 
 
 
 
 
608
  return false;
609
  });
610
  }
@@ -643,20 +665,31 @@
643
  */
644
  if ( ajaxOptin ) {
645
  if (!hasContextUser || isNetworkUpgradeMode) {
646
- <?php $action = $require_license_key ? 'activate_license' : 'network_activate' ?>
 
 
 
 
 
 
 
 
 
647
 
648
  $('.fs-error').remove();
649
 
650
  var
651
  licenseKey = $licenseKeyInput.val(),
652
  data = {
653
- action : '<?php echo $fs->get_ajax_action( $action ) ?>',
654
- security : '<?php echo $fs->get_ajax_security( $action ) ?>',
655
  license_key: licenseKey,
656
  module_id : '<?php echo $fs->get_id() ?>'
657
  };
658
 
659
- if (requireLicenseKey &&
 
 
660
  isMarketingAllowedByLicense.hasOwnProperty(licenseKey)
661
  ) {
662
  var
@@ -706,12 +739,18 @@
706
 
707
  if ( ! requireLicenseKey) {
708
  site.action = $this.find('.action.selected').data('action-type');
 
 
709
  }
710
 
711
  sites.push( site );
712
  });
713
 
714
  data.sites = sites;
 
 
 
 
715
  }
716
 
717
  /**
314
  <a id="skip_activation" href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $fs->get_unique_affix() . '_skip_activation' ), $is_network_level_activation ), $fs->get_unique_affix() . '_skip_activation' ) ?>"
315
  class="button button-secondary" tabindex="2"><?php fs_esc_html_echo_x_inline( 'Skip', 'verb', 'skip', $slug ) ?></a>
316
  <?php endif ?>
317
+ <?php if ( $is_network_level_activation && $fs->apply_filters( 'show_delegation_option', true ) ) : ?>
318
  <a id="delegate_to_site_admins" class="fs-tooltip-trigger <?php echo is_rtl() ? ' rtl' : '' ?>" href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $fs->get_unique_affix() . '_delegate_activation' ) ), $fs->get_unique_affix() . '_delegate_activation' ) ?>"><?php fs_esc_html_echo_inline( 'Delegate to Site Admins', 'delegate-to-site-admins', $slug ) ?><span class="fs-tooltip"><?php fs_esc_html_echo_inline( 'If you click it, this decision will be delegated to the sites administrators.', 'delegate-sites-tooltip', $slug ) ?></span></a>
319
  <?php endif ?>
320
  <?php if ( $activate_with_current_user ) : ?>
474
  $licenseSecret,
475
  $licenseKeyInput = $('#fs_license_key'),
476
  pauseCtaLabelUpdate = false,
477
+ isNetworkDelegating = false,
478
  /**
479
  * @author Leo Fajardo (@leorw)
480
  * @since 2.1.0
506
 
507
  if ( isNetworkActive ) {
508
  var
509
+ $multisiteOptionsContainer = $( '.fs-multisite-options-container' ),
510
+ $allSitesOptions = $( '.fs-all-sites-options' ),
511
+ $applyOnAllSites = $( '.fs-apply-on-all-sites-checkbox' ),
512
+ $sitesListContainer = $( '.fs-sites-list-container' ),
513
  totalSites = <?php echo count( $sites ) ?>,
514
  maxSitesListHeight = null,
515
  $skipActivationButton = $( '#skip_activation' ),
516
+ $delegateToSiteAdminsButton = $( '#delegate_to_site_admins' ),
517
+ hasAnyInstall = <?php echo ! is_null( $fs->find_first_install() ) ? 'true' : 'false' ?>;
518
 
519
  $applyOnAllSites.click(function() {
520
  var isChecked = $( this ).is( ':checked' );
530
 
531
  $delegateToSiteAdminsButton.toggle();
532
 
533
+ $multisiteOptionsContainer.toggleClass( 'fs-apply-on-all-sites', isChecked );
534
 
535
  $sitesListContainer.toggle( ! isChecked );
536
  if ( ! isChecked && null === maxSitesListHeight ) {
577
  }
578
  });
579
 
580
+ if ( isNetworkUpgradeMode || hasAnyInstall ) {
581
  $skipActivationButton.click(function(){
582
  $delegateToSiteAdminsButton.hide();
583
 
600
 
601
  pauseCtaLabelUpdate = true;
602
 
603
+ /**
604
+ * Set to true so that the form submission handler can differentiate delegation from license
605
+ * activation and the proper AJAX action will be used (when delegating, the action should be
606
+ * `network_activate` and not `activate_license`).
607
+ *
608
+ * @author Leo Fajardo (@leorw)
609
+ * @since 2.3.0
610
+ */
611
+ isNetworkDelegating = true;
612
+
613
  // Check all sites to be skipped.
614
  $allSitesOptions.find('.action.action-delegate').click();
615
 
617
 
618
  pauseCtaLabelUpdate = false;
619
 
620
+ /**
621
+ * Set to false so that in case the previous AJAX request has failed, the form submission handler
622
+ * can differentiate license activation from delegation and the proper AJAX action will be used
623
+ * (when activating a license, the action should be `activate_license` and not `network_activate`).
624
+ *
625
+ * @author Leo Fajardo (@leorw)
626
+ * @since 2.3.0
627
+ */
628
+ isNetworkDelegating = false;
629
+
630
  return false;
631
  });
632
  }
665
  */
666
  if ( ajaxOptin ) {
667
  if (!hasContextUser || isNetworkUpgradeMode) {
668
+ var action = null,
669
+ security = null;
670
+
671
+ if ( requireLicenseKey && ! isNetworkDelegating ) {
672
+ action = '<?php echo $fs->get_ajax_action( 'activate_license' ) ?>';
673
+ security = '<?php echo $fs->get_ajax_security( 'activate_license' ) ?>';
674
+ } else {
675
+ action = '<?php echo $fs->get_ajax_action( 'network_activate' ) ?>';
676
+ security = '<?php echo $fs->get_ajax_security( 'network_activate' ) ?>';
677
+ }
678
 
679
  $('.fs-error').remove();
680
 
681
  var
682
  licenseKey = $licenseKeyInput.val(),
683
  data = {
684
+ action : action,
685
+ security : security,
686
  license_key: licenseKey,
687
  module_id : '<?php echo $fs->get_id() ?>'
688
  };
689
 
690
+ if (
691
+ requireLicenseKey &&
692
+ ! isNetworkDelegating &&
693
  isMarketingAllowedByLicense.hasOwnProperty(licenseKey)
694
  ) {
695
  var
739
 
740
  if ( ! requireLicenseKey) {
741
  site.action = $this.find('.action.selected').data('action-type');
742
+ } else if ( isNetworkDelegating ) {
743
+ site.action = 'delegate';
744
  }
745
 
746
  sites.push( site );
747
  });
748
 
749
  data.sites = sites;
750
+
751
+ if ( hasAnyInstall ) {
752
+ data.has_any_install = hasAnyInstall;
753
+ }
754
  }
755
 
756
  /**
vendor/freemius/templates/forms/deactivation/form.php CHANGED
@@ -16,51 +16,55 @@
16
  $fs = freemius( $VARS['id'] );
17
  $slug = $fs->get_slug();
18
 
19
- $confirmation_message = $fs->apply_filters( 'uninstall_confirmation_message', '' );
 
 
20
 
21
- $reasons = $VARS['reasons'];
 
22
 
23
- $reasons_list_items_html = '';
24
 
25
- foreach ( $reasons as $reason ) {
26
- $list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
27
 
28
- if ( isset( $reason['internal_message'] ) && ! empty( $reason['internal_message'] ) ) {
29
- $list_item_classes .= ' has-internal-message';
30
- $reason_internal_message = $reason['internal_message'];
31
- } else {
32
- $reason_internal_message = '';
33
- }
34
-
35
- $reason_input_type = ( ! empty( $reason['input_type'] ) ? $reason['input_type'] : '' );
36
- $reason_input_placeholder = ( ! empty( $reason['input_placeholder'] ) ? $reason['input_placeholder'] : '' );
37
-
38
- $reason_list_item_html = <<< HTML
39
- <li class="{$list_item_classes}"
40
- data-input-type="{$reason_input_type}"
41
- data-input-placeholder="{$reason_input_placeholder}">
42
- <label>
43
- <span>
44
- <input type="radio" name="selected-reason" value="{$reason['id']}"/>
45
- </span>
46
- <span>{$reason['text']}</span>
47
- </label>
48
- <div class="internal-message">{$reason_internal_message}</div>
49
- </li>
 
 
 
50
  HTML;
51
 
52
- $reasons_list_items_html .= $reason_list_item_html;
53
- }
54
 
55
- $is_anonymous = ( ! $fs->is_registered() );
56
- if ( $is_anonymous ) {
57
- $anonymous_feedback_checkbox_html = sprintf(
58
- '<label class="anonymous-feedback-label"><input type="checkbox" class="anonymous-feedback-checkbox"> %s</label>',
59
- fs_esc_html_inline( 'Anonymous feedback', 'anonymous-feedback', $slug )
60
- );
61
- } else {
62
- $anonymous_feedback_checkbox_html = '';
63
- }
64
 
65
  // Aliases.
66
  $deactivate_text = fs_text_inline( 'Deactivate', 'deactivate', $slug );
@@ -68,8 +72,11 @@ HTML;
68
  $activate_x_text = fs_text_inline( 'Activate %s', 'activate-x', $slug );
69
 
70
  fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
 
 
 
 
71
  ?>
72
- <?php $fs->_maybe_add_subscription_cancellation_dialog_box() ?>
73
  <script type="text/javascript">
74
  (function ($) {
75
  var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
@@ -99,16 +106,25 @@ HTML;
99
  otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
100
  dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
101
  deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
102
- $subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' );
 
103
 
104
  $modal.appendTo($('body'));
105
 
106
  if ( 0 !== $subscriptionCancellationModal.length ) {
107
  $subscriptionCancellationModal.on( '<?php echo $fs->get_action_tag( 'subscription_cancellation_action' ) ?>', function( evt, cancelSubscription ) {
 
 
108
  if ( false === cancelSubscription ) {
109
- showModal();
 
 
110
 
111
  $subscriptionCancellationModal.trigger( 'closeModal' );
 
 
 
 
112
  } else {
113
  var $errorMessage = $subscriptionCancellationModal.find( '.notice-error' );
114
 
@@ -140,7 +156,12 @@ HTML;
140
  $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).removeClass( 'warn' );
141
 
142
  $subscriptionCancellationModal.remove();
143
- showModal();
 
 
 
 
 
144
  } else {
145
  $errorMessage.find( '> p' ).html( result.error );
146
  $errorMessage.show();
@@ -191,7 +212,15 @@ HTML;
191
 
192
  redirectLink = $(this).attr('href');
193
 
194
- showModal();
 
 
 
 
 
 
 
 
195
  });
196
  <?php
197
  } ?>
@@ -243,7 +272,7 @@ HTML;
243
  var _this = $(this);
244
 
245
  if (_this.hasClass('allow-deactivate')) {
246
- var $radio = $('input[type="radio"]:checked');
247
 
248
  if (0 === $radio.length) {
249
  if ( ! deleteThemeUpdateData ) {
@@ -303,7 +332,11 @@ HTML;
303
  // Change the Deactivate button's text and show the reasons panel.
304
  _parent.find('.button-deactivate').addClass('allow-deactivate');
305
 
306
- showPanel('reasons');
 
 
 
 
307
  }
308
  });
309
 
@@ -344,7 +377,7 @@ HTML;
344
  if (_parent.hasClass('has-input')) {
345
  var inputType = _parent.data('input-type'),
346
  inputPlaceholder = _parent.data('input-placeholder'),
347
- reasonInputHtml = '<div class="reason-input"><span class="message"></span>' + ( ( 'textfield' === inputType ) ? '<input type="text" />' : '<textarea rows="5"></textarea>' ) + '</div>';
348
 
349
  _parent.append($(reasonInputHtml));
350
  _parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
@@ -493,5 +526,14 @@ HTML;
493
  function getCurrentPanel() {
494
  return $modal.find('.fs-modal-panel.active').attr('data-panel-id');
495
  }
 
 
 
 
 
 
 
 
 
496
  })(jQuery);
497
  </script>
16
  $fs = freemius( $VARS['id'] );
17
  $slug = $fs->get_slug();
18
 
19
+ $subscription_cancellation_dialog_box_template_params = $VARS['subscription_cancellation_dialog_box_template_params'];
20
+ $show_deactivation_feedback_form = $VARS['show_deactivation_feedback_form'];
21
+ $confirmation_message = $VARS['uninstall_confirmation_message'];
22
 
23
+ $is_anonymous = ( ! $fs->is_registered() );
24
+ $anonymous_feedback_checkbox_html = '';
25
 
26
+ $reasons_list_items_html = '';
27
 
28
+ if ( $show_deactivation_feedback_form ) {
29
+ $reasons = $VARS['reasons'];
30
 
31
+ foreach ( $reasons as $reason ) {
32
+ $list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
33
+
34
+ if ( isset( $reason['internal_message'] ) && ! empty( $reason['internal_message'] ) ) {
35
+ $list_item_classes .= ' has-internal-message';
36
+ $reason_internal_message = $reason['internal_message'];
37
+ } else {
38
+ $reason_internal_message = '';
39
+ }
40
+
41
+ $reason_input_type = ( ! empty( $reason['input_type'] ) ? $reason['input_type'] : '' );
42
+ $reason_input_placeholder = ( ! empty( $reason['input_placeholder'] ) ? $reason['input_placeholder'] : '' );
43
+
44
+ $reason_list_item_html = <<< HTML
45
+ <li class="{$list_item_classes}"
46
+ data-input-type="{$reason_input_type}"
47
+ data-input-placeholder="{$reason_input_placeholder}">
48
+ <label>
49
+ <span>
50
+ <input type="radio" name="selected-reason" value="{$reason['id']}"/>
51
+ </span>
52
+ <span>{$reason['text']}</span>
53
+ </label>
54
+ <div class="internal-message">{$reason_internal_message}</div>
55
+ </li>
56
  HTML;
57
 
58
+ $reasons_list_items_html .= $reason_list_item_html;
59
+ }
60
 
61
+ if ( $is_anonymous ) {
62
+ $anonymous_feedback_checkbox_html = sprintf(
63
+ '<label class="anonymous-feedback-label"><input type="checkbox" class="anonymous-feedback-checkbox"> %s</label>',
64
+ fs_esc_html_inline( 'Anonymous feedback', 'anonymous-feedback', $slug )
65
+ );
66
+ }
67
+ }
 
 
68
 
69
  // Aliases.
70
  $deactivate_text = fs_text_inline( 'Deactivate', 'deactivate', $slug );
72
  $activate_x_text = fs_text_inline( 'Activate %s', 'activate-x', $slug );
73
 
74
  fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
75
+
76
+ if ( ! empty( $subscription_cancellation_dialog_box_template_params ) ) {
77
+ fs_require_template( 'forms/subscription-cancellation.php', $subscription_cancellation_dialog_box_template_params );
78
+ }
79
  ?>
 
80
  <script type="text/javascript">
81
  (function ($) {
82
  var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
106
  otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
107
  dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
108
  deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
109
+ $subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' ),
110
+ showDeactivationFeedbackForm = <?php echo ( $show_deactivation_feedback_form ? 'true' : 'false' ) ?>;
111
 
112
  $modal.appendTo($('body'));
113
 
114
  if ( 0 !== $subscriptionCancellationModal.length ) {
115
  $subscriptionCancellationModal.on( '<?php echo $fs->get_action_tag( 'subscription_cancellation_action' ) ?>', function( evt, cancelSubscription ) {
116
+ var shouldDeactivateModule = ( $modal.hasClass( 'no-confirmation-message' ) && ! showDeactivationFeedbackForm );
117
+
118
  if ( false === cancelSubscription ) {
119
+ if ( ! shouldDeactivateModule ) {
120
+ showModal();
121
+ }
122
 
123
  $subscriptionCancellationModal.trigger( 'closeModal' );
124
+
125
+ if ( shouldDeactivateModule ) {
126
+ deactivateModule();
127
+ }
128
  } else {
129
  var $errorMessage = $subscriptionCancellationModal.find( '.notice-error' );
130
 
156
  $subscriptionCancellationModal.find( '.fs-modal-footer .button-primary' ).removeClass( 'warn' );
157
 
158
  $subscriptionCancellationModal.remove();
159
+
160
+ if ( ! shouldDeactivateModule ) {
161
+ showModal();
162
+ } else {
163
+ deactivateModule();
164
+ }
165
  } else {
166
  $errorMessage.find( '> p' ).html( result.error );
167
  $errorMessage.show();
212
 
213
  redirectLink = $(this).attr('href');
214
 
215
+ if ( 0 != $subscriptionCancellationModal.length ) {
216
+ $subscriptionCancellationModal.trigger( 'showModal' );
217
+ } else {
218
+ if ( $modal.hasClass( 'no-confirmation-message' ) && ! showDeactivationFeedbackForm ) {
219
+ deactivateModule();
220
+ } else {
221
+ showModal();
222
+ }
223
+ }
224
  });
225
  <?php
226
  } ?>
272
  var _this = $(this);
273
 
274
  if (_this.hasClass('allow-deactivate')) {
275
+ var $radio = $modal.find('input[type="radio"]:checked');
276
 
277
  if (0 === $radio.length) {
278
  if ( ! deleteThemeUpdateData ) {
332
  // Change the Deactivate button's text and show the reasons panel.
333
  _parent.find('.button-deactivate').addClass('allow-deactivate');
334
 
335
+ if ( showDeactivationFeedbackForm ) {
336
+ showPanel('reasons');
337
+ } else {
338
+ deactivateModule();
339
+ }
340
  }
341
  });
342
 
377
  if (_parent.hasClass('has-input')) {
378
  var inputType = _parent.data('input-type'),
379
  inputPlaceholder = _parent.data('input-placeholder'),
380
+ reasonInputHtml = '<div class="reason-input"><span class="message"></span>' + ( ( 'textfield' === inputType ) ? '<input type="text" maxlength="128" />' : '<textarea rows="5" maxlength="128"></textarea>' ) + '</div>';
381
 
382
  _parent.append($(reasonInputHtml));
383
  _parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
526
  function getCurrentPanel() {
527
  return $modal.find('.fs-modal-panel.active').attr('data-panel-id');
528
  }
529
+
530
+ /**
531
+ * @author Leo Fajardo (@leorw)
532
+ *
533
+ * @since 2.3.0
534
+ */
535
+ function deactivateModule() {
536
+ window.location.href = redirectLink;
537
+ }
538
  })(jQuery);
539
  </script>
vendor/freemius/templates/forms/license-activation.php CHANGED
@@ -13,8 +13,9 @@
13
  /**
14
  * @var Freemius $fs
15
  */
16
- $fs = freemius( $VARS['id'] );
17
- $slug = $fs->get_slug();
 
18
 
19
  $cant_find_license_key_text = fs_text_inline( "Can't find your license key?", 'cant-find-license-key', $slug );
20
  $message_above_input_field = fs_text_inline( 'Please enter the license key that you received in the email right after the purchase:', 'activate-license-message', $slug );
@@ -94,10 +95,10 @@
94
  $total_available_licenses = count( $available_licenses );
95
  if ( $total_available_licenses > 0 ) {
96
  $license_input_html = <<< HTML
97
- <div id="license_options_container">
98
  <table>
99
  <tbody>
100
- <tr id="available_license_key_container">
101
  <td><input type="radio" name="license_type" value="available"></td>
102
  <td>
103
  HTML;
@@ -106,7 +107,7 @@ HTML;
106
  // Sort the licenses by number of activations left in descending order.
107
  krsort( $available_licenses );
108
 
109
- $license_input_html .= '<select id="licenses">';
110
 
111
  /**
112
  * @var FS_Plugin_License $license
@@ -116,7 +117,7 @@ HTML;
116
  "%s-Site %s License - %s",
117
  ( 1 == $license->quota ?
118
  'Single' :
119
- $license->quota
120
  ),
121
  $fs->_get_plan_by_id( $license->plan_id )->title,
122
  ( htmlspecialchars( substr( $license->secret_key, 0, 6 ) ) .
@@ -149,7 +150,7 @@ HTML;
149
 
150
  $license_input_html .= <<< HTML
151
  <input
152
- id="available_license_key"
153
  type="text"
154
  value="{$value}"
155
  data-id="{$available_license->id}"
@@ -164,10 +165,10 @@ HTML;
164
  </tr>
165
  <tr>
166
  <td><input type="radio" name="license_type" value="other"></td>
167
- <td id="other_license_key_container">
168
- <label for="other_license_key">Other: </label>
169
  <div>
170
- <input id="other_license_key" class="license_key" type="text" placeholder="Enter license key" tabindex="1">
171
  </div>
172
  </td>
173
  </tr>
@@ -176,7 +177,7 @@ HTML;
176
  </div>
177
  HTML;
178
  } else {
179
- $license_input_html = "<input class='license_key' type='text' placeholder='{$license_key_text}' tabindex='1' />";
180
  }
181
 
182
  /**
@@ -201,7 +202,7 @@ HTML;
201
  $( document ).ready(function() {
202
  var modalContentHtml = <?php echo json_encode($modal_content_html); ?>,
203
  modalHtml =
204
- '<div class="fs-modal fs-modal-license-activation">'
205
  + ' <div class="fs-modal-dialog">'
206
  + ' <div class="fs-modal-header">'
207
  + ' <h4><?php echo esc_js($header_title) ?></h4>'
@@ -217,22 +218,22 @@ HTML;
217
  + ' </div>'
218
  + '</div>',
219
  $modal = $(modalHtml),
220
- $activateLicenseLink = $('span.activate-license.<?php echo $fs->get_unique_affix() ?> a, .activate-license-trigger.<?php echo $fs->get_unique_affix() ?>'),
221
  $activateLicenseButton = $modal.find('.button-activate-license'),
222
- $licenseKeyInput = $modal.find('input.license_key'),
223
  $licenseActivationMessage = $modal.find( '.license-activation-message' ),
224
  isNetworkActivation = <?php echo $is_network_activation ? 'true' : 'false' ?>;
225
 
226
  $modal.appendTo($('body'));
227
 
228
  var
229
- $licensesDropdown = $( '#licenses' ),
230
- $licenseTypes = $( 'input[type="radio"][name="license_type"]' ),
231
- $applyOnAllSites = $( '#apply_on_all_sites' ),
232
- $sitesListContainer = $( '#sites_list_container' ),
233
- $availableLicenseKey = $( '#available_license_key' ),
234
- $otherLicenseKey = $( '#other_license_key' ),
235
- $multisiteOptionsContainer = $( '#multisite_options_container' ),
236
  $activationsLeft = null,
237
  hasLicensesDropdown = ( $licensesDropdown.length > 0 ),
238
  hasLicenseTypes = ( $licenseTypes.length > 0 ),
@@ -242,13 +243,13 @@ HTML;
242
 
243
  function registerEventHandlers() {
244
  var
245
- $otherLicenseKeyContainer = $( '#other_license_key_container' );
246
 
247
  if ( isNetworkActivation ) {
248
  $applyOnAllSites.click(function() {
249
  var applyOnAllSites = $( this ).is( ':checked' );
250
 
251
- $multisiteOptionsContainer.toggleClass( 'apply-on-all-sites', applyOnAllSites );
252
 
253
  showSites( ! applyOnAllSites );
254
 
@@ -292,7 +293,7 @@ HTML;
292
  if ( hasLicenseTypes ) {
293
  $licenseTypes.change(function() {
294
  var
295
- licenseKey = $( 'input.license_key' ).val().trim(),
296
  otherLicenseKeySelected = isOtherLicenseKeySelected();
297
 
298
  if ( ( licenseKey.length > 0 || ( hasLicenseTypes && ! otherLicenseKeySelected ) ) &&
@@ -339,7 +340,7 @@ HTML;
339
  showModal( evt );
340
  });
341
 
342
- $modal.on('input propertychange', 'input.license_key', function () {
343
 
344
  var licenseKey = $(this).val().trim();
345
 
@@ -351,11 +352,11 @@ HTML;
351
  }
352
  });
353
 
354
- $modal.on( 'blur', 'input.license_key', function( evt ) {
355
  var
356
  licenseKey = $(this).val().trim(),
357
  $focusedElement = $( evt.relatedTarget ),
358
- hasSelectedAvailableLicense = ( hasLicenseTypes && $focusedElement.parents( '#available_license_key_container' ).length > 0 );
359
 
360
  /**
361
  * If license key is empty, disable the license activation button.
@@ -522,7 +523,7 @@ HTML;
522
  licenseKey = $otherLicenseKey.val();
523
  }
524
  } else {
525
- licenseKey = $( 'input.license_key' ).val();
526
  }
527
 
528
  return ( licenseKey.trim().length > 0 );
@@ -557,11 +558,11 @@ HTML;
557
  }
558
 
559
  // Cleanup previously auto-selected site.
560
- $('#sites_list_container input[type=checkbox]:disabled')
561
  .attr('disabled', false)
562
  .attr('checked', false);
563
 
564
- var $blogsWithActiveLicense = $('#sites_list_container tr[data-license-id=' + licenseID + '] input[type=checkbox]');
565
 
566
  if ($blogsWithActiveLicense.length > 0) {
567
  $blogsWithActiveLicense.attr('checked', true)
@@ -591,7 +592,7 @@ HTML;
591
 
592
  // Update the label of the "Activate license on all sites" checkbox.
593
  $applyOnAllSites.parent().find( 'span' ).html( activateLicenseCheckboxLabel );
594
- $activationsLeft = $( '.activations-left' );
595
 
596
  if ( hasSelectedSite() ) {
597
  enableActivateLicenseButton();
13
  /**
14
  * @var Freemius $fs
15
  */
16
+ $fs = freemius( $VARS['id'] );
17
+ $slug = $fs->get_slug();
18
+ $unique_affix = $fs->get_unique_affix();
19
 
20
  $cant_find_license_key_text = fs_text_inline( "Can't find your license key?", 'cant-find-license-key', $slug );
21
  $message_above_input_field = fs_text_inline( 'Please enter the license key that you received in the email right after the purchase:', 'activate-license-message', $slug );
95
  $total_available_licenses = count( $available_licenses );
96
  if ( $total_available_licenses > 0 ) {
97
  $license_input_html = <<< HTML
98
+ <div class="fs-license-options-container">
99
  <table>
100
  <tbody>
101
+ <tr class="fs-available-license-key-container">
102
  <td><input type="radio" name="license_type" value="available"></td>
103
  <td>
104
  HTML;
107
  // Sort the licenses by number of activations left in descending order.
108
  krsort( $available_licenses );
109
 
110
+ $license_input_html .= '<select class="fs-licenses">';
111
 
112
  /**
113
  * @var FS_Plugin_License $license
117
  "%s-Site %s License - %s",
118
  ( 1 == $license->quota ?
119
  'Single' :
120
+ ( $license->is_unlimited() ? 'Unlimited' : $license->quota )
121
  ),
122
  $fs->_get_plan_by_id( $license->plan_id )->title,
123
  ( htmlspecialchars( substr( $license->secret_key, 0, 6 ) ) .
150
 
151
  $license_input_html .= <<< HTML
152
  <input
153
+ class="fs-available-license-key"
154
  type="text"
155
  value="{$value}"
156
  data-id="{$available_license->id}"
165
  </tr>
166
  <tr>
167
  <td><input type="radio" name="license_type" value="other"></td>
168
+ <td class="fs-other-license-key-container">
169
+ <label for="other_license_key_{$unique_affix}">Other: </label>
170
  <div>
171
+ <input id="other_license_key_{$unique_affix}" class="fs-license-key" type="text" placeholder="Enter license key" tabindex="1">
172
  </div>
173
  </td>
174
  </tr>
177
  </div>
178
  HTML;
179
  } else {
180
+ $license_input_html = "<input class='fs-license-key' type='text' placeholder='{$license_key_text}' tabindex='1' />";
181
  }
182
 
183
  /**
202
  $( document ).ready(function() {
203
  var modalContentHtml = <?php echo json_encode($modal_content_html); ?>,
204
  modalHtml =
205
+ '<div class="fs-modal fs-modal-license-activation fs-modal-license-activation-<?php echo $unique_affix ?>">'
206
  + ' <div class="fs-modal-dialog">'
207
  + ' <div class="fs-modal-header">'
208
  + ' <h4><?php echo esc_js($header_title) ?></h4>'
218
  + ' </div>'
219
  + '</div>',
220
  $modal = $(modalHtml),
221
+ $activateLicenseLink = $('span.activate-license.<?php echo $unique_affix ?> a, .activate-license-trigger.<?php echo $unique_affix ?>'),
222
  $activateLicenseButton = $modal.find('.button-activate-license'),
223
+ $licenseKeyInput = $modal.find( 'input.fs-license-key' ),
224
  $licenseActivationMessage = $modal.find( '.license-activation-message' ),
225
  isNetworkActivation = <?php echo $is_network_activation ? 'true' : 'false' ?>;
226
 
227
  $modal.appendTo($('body'));
228
 
229
  var
230
+ $licensesDropdown = $modal.find( '.fs-licenses' ),
231
+ $licenseTypes = $modal.find( 'input[type="radio"][name="license_type"]' ),
232
+ $applyOnAllSites = $modal.find( '.fs-apply-on-all-sites-checkbox' ),
233
+ $sitesListContainer = $modal.find( '.fs-sites-list-container' ),
234
+ $availableLicenseKey = $modal.find( '.fs-available-license-key' ),
235
+ $otherLicenseKey = $modal.find( '#other_license_key_<?php echo $unique_affix ?>' ),
236
+ $multisiteOptionsContainer = $modal.find( '.fs-multisite-options-container' ),
237
  $activationsLeft = null,
238
  hasLicensesDropdown = ( $licensesDropdown.length > 0 ),
239
  hasLicenseTypes = ( $licenseTypes.length > 0 ),
243
 
244
  function registerEventHandlers() {
245
  var
246
+ $otherLicenseKeyContainer = $modal.find( '.fs-other-license-key-container' );
247
 
248
  if ( isNetworkActivation ) {
249
  $applyOnAllSites.click(function() {
250
  var applyOnAllSites = $( this ).is( ':checked' );
251
 
252
+ $multisiteOptionsContainer.toggleClass( 'fs-apply-on-all-sites', applyOnAllSites );
253
 
254
  showSites( ! applyOnAllSites );
255
 
293
  if ( hasLicenseTypes ) {
294
  $licenseTypes.change(function() {
295
  var
296
+ licenseKey = $modal.find( 'input.fs-license-key' ).val().trim(),
297
  otherLicenseKeySelected = isOtherLicenseKeySelected();
298
 
299
  if ( ( licenseKey.length > 0 || ( hasLicenseTypes && ! otherLicenseKeySelected ) ) &&
340
  showModal( evt );
341
  });
342
 
343
+ $modal.on('input propertychange', 'input.fs-license-key', function () {
344
 
345
  var licenseKey = $(this).val().trim();
346
 
352
  }
353
  });
354
 
355
+ $modal.on( 'blur', 'input.fs-license-key', function( evt ) {
356
  var
357
  licenseKey = $(this).val().trim(),
358
  $focusedElement = $( evt.relatedTarget ),
359
+ hasSelectedAvailableLicense = ( hasLicenseTypes && $focusedElement.parents( '.fs-available-license-key-container' ).length > 0 );
360
 
361
  /**
362
  * If license key is empty, disable the license activation button.
523
  licenseKey = $otherLicenseKey.val();
524
  }
525
  } else {
526
+ licenseKey = $modal.find( 'input.fs-license-key' ).val();
527
  }
528
 
529
  return ( licenseKey.trim().length > 0 );
558
  }
559
 
560
  // Cleanup previously auto-selected site.
561
+ $modal.find( '.fs-sites-list-container input[type=checkbox]:disabled' )
562
  .attr('disabled', false)
563
  .attr('checked', false);
564
 
565
+ var $blogsWithActiveLicense = $modal.find( '.fs-sites-list-container tr[data-license-id=' + licenseID + '] input[type=checkbox]' );
566
 
567
  if ($blogsWithActiveLicense.length > 0) {
568
  $blogsWithActiveLicense.attr('checked', true)
592
 
593
  // Update the label of the "Activate license on all sites" checkbox.
594
  $applyOnAllSites.parent().find( 'span' ).html( activateLicenseCheckboxLabel );
595
+ $activationsLeft = $modal.find( '.activations-left' );
596
 
597
  if ( hasSelectedSite() ) {
598
  enableActivateLicenseButton();
vendor/freemius/templates/forms/premium-versions-upgrade-metadata.php CHANGED
@@ -30,6 +30,8 @@
30
  array( 'licenses' => $license->quota )
31
  );
32
  }
 
 
33
  ?>
34
  <script type="text/javascript">
35
  (function( $ ) {
@@ -37,7 +39,7 @@
37
  var $premiumVersionCheckbox = $( 'input[type="checkbox"][value="<?php echo $fs->get_plugin_basename() ?>"]' );
38
 
39
  $premiumVersionCheckbox.addClass( 'license-expired' );
40
- $premiumVersionCheckbox.data( 'plugin-name', <?php echo json_encode( $fs->get_plugin_data()['Name'] ) ?> );
41
  $premiumVersionCheckbox.data( 'pricing-url', <?php echo json_encode( $purchase_url ) ?> );
42
  $premiumVersionCheckbox.data( 'new-version', <?php echo json_encode( $VARS['new_version'] ) ?> );
43
  });
30
  array( 'licenses' => $license->quota )
31
  );
32
  }
33
+
34
+ $plugin_data = $fs->get_plugin_data();
35
  ?>
36
  <script type="text/javascript">
37
  (function( $ ) {
39
  var $premiumVersionCheckbox = $( 'input[type="checkbox"][value="<?php echo $fs->get_plugin_basename() ?>"]' );
40
 
41
  $premiumVersionCheckbox.addClass( 'license-expired' );
42
+ $premiumVersionCheckbox.data( 'plugin-name', <?php echo json_encode( $plugin_data['Name'] ) ?> );
43
  $premiumVersionCheckbox.data( 'pricing-url', <?php echo json_encode( $purchase_url ) ?> );
44
  $premiumVersionCheckbox.data( 'new-version', <?php echo json_encode( $VARS['new_version'] ) ?> );
45
  });
vendor/freemius/templates/forms/subscription-cancellation.php CHANGED
@@ -95,8 +95,8 @@ HTML;
95
 
96
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
97
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
98
- /* translators: %1s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
99
- $downgrade_x_confirm_text = fs_text_inline( '%1s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
100
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
101
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
102
  $after_downgrade_blocking_text = fs_text_inline( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.', 'after-downgrade-blocking', $slug );
@@ -170,7 +170,7 @@ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
170
  subscriptionCancellationActionEventName = <?php echo json_encode( $fs->get_action_tag( 'subscription_cancellation_action' ) ) ?>;
171
 
172
  if ( _this.hasClass( 'button-primary' ) ) {
173
- if ( 'true' !== $( 'input[name="cancel-subscription"]:checked' ).val() ) {
174
  $modal.trigger( subscriptionCancellationActionEventName, false );
175
  } else {
176
  if ( confirm( <?php echo json_encode( $subscription_cancellation_confirmation_message ) ?> ) ) {
95
 
96
  $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
97
  $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
98
+ /* translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
99
+ $downgrade_x_confirm_text = fs_text_inline( '%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
100
  $prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
101
  $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
102
  $after_downgrade_blocking_text = fs_text_inline( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.', 'after-downgrade-blocking', $slug );
170
  subscriptionCancellationActionEventName = <?php echo json_encode( $fs->get_action_tag( 'subscription_cancellation_action' ) ) ?>;
171
 
172
  if ( _this.hasClass( 'button-primary' ) ) {
173
+ if ( 'true' !== $modal.find( 'input[name="cancel-subscription"]:checked' ).val() ) {
174
  $modal.trigger( subscriptionCancellationActionEventName, false );
175
  } else {
176
  if ( confirm( <?php echo json_encode( $subscription_cancellation_confirmation_message ) ?> ) ) {
vendor/freemius/templates/js/open-license-activation.php CHANGED
@@ -20,7 +20,7 @@
20
  $($('.activate-license-trigger')[0]).click();
21
 
22
  // setTimeout(function(){
23
- $dialog.find('select#licenses option[data-id=<?php echo $license_id ?>]')
24
  .prop('selected', true)
25
  .change();
26
  // }, 100);
20
  $($('.activate-license-trigger')[0]).click();
21
 
22
  // setTimeout(function(){
23
+ $dialog.find('select.fs-licenses option[data-id=<?php echo $license_id ?>]')
24
  .prop('selected', true)
25
  .change();
26
  // }, 100);
vendor/freemius/templates/js/style-premium-theme.php CHANGED
@@ -31,10 +31,18 @@
31
  $theme = $('#<?php echo $slug ?>-premium-name').parents('.theme');
32
  }
33
 
34
- if (0 === $theme.find('.fs-premium-theme-badge').length) {
35
  $theme.addClass('fs-premium');
36
 
37
- $theme.append('<span class="fs-premium-theme-badge">' + <?php echo json_encode( $fs->get_text_inline( 'Premium', 'premium' ) ) ?> +'</span>');
 
 
 
 
 
 
 
 
38
  }
39
  };
40
 
31
  $theme = $('#<?php echo $slug ?>-premium-name').parents('.theme');
32
  }
33
 
34
+ if (0 === $theme.find('.fs-premium-theme-badge-container').length) {
35
  $theme.addClass('fs-premium');
36
 
37
+ var $themeBadgeContainer = $( '<div class="fs-premium-theme-badge-container"></div>' );
38
+
39
+ $themeBadgeContainer.append( '<div class="fs-badge fs-premium-theme-badge">' + <?php echo json_encode( $fs->get_text_inline( 'Premium', 'premium' ) ) ?> + '</div>' );
40
+
41
+ <?php if ( $fs->is_beta() ) : ?>
42
+ $themeBadgeContainer.append( '<div class="fs-badge fs-beta-theme-badge">' + <?php echo json_encode( $fs->get_text_inline( 'Beta', 'beta' ) ) ?> + '</div>' );
43
+ <?php endif ?>
44
+
45
+ $theme.append( $themeBadgeContainer );
46
  }
47
  };
48
 
vendor/freemius/templates/partials/network-activation.php CHANGED
@@ -9,10 +9,14 @@
9
 
10
  $sites = $VARS['sites'];
11
  $require_license_key = $VARS['require_license_key'];
 
 
 
12
  ?>
13
  <?php $separator = '<td>|</td>' ?>
14
- <div id="multisite_options_container" class="apply-on-all-sites">
15
- <table id="all_sites_options">
 
16
  <tbody>
17
  <tr>
18
  <td width="600">
@@ -29,13 +33,15 @@
29
 
30
  }
31
  ?>
32
- <input id="apply_on_all_sites" type="checkbox" value="true" checked><span><?php echo esc_html( $apply_checkbox_label ) ?></span>
33
  </label>
34
  </td>
35
  <?php if ( ! $require_license_key ) : ?>
36
  <td><a class="action action-allow" data-action-type="allow" href="#"><?php fs_esc_html_echo_inline( 'allow', 'allow', $slug ) ?></a></td>
37
  <?php echo $separator ?>
 
38
  <td><a class="action action-delegate" data-action-type="delegate" href="#"><?php fs_esc_html_echo_inline( 'delegate', 'delegate', $slug ) ?></a></td>
 
39
  <?php if ( $fs->is_enable_anonymous() ) : ?>
40
  <?php echo $separator ?>
41
  <td><a class="action action-skip" data-action-type="skip" href="#"><?php echo strtolower( fs_esc_html_inline( 'skip', 'skip', $slug ) ) ?></a></td>
@@ -44,7 +50,7 @@
44
  </tr>
45
  </tbody>
46
  </table>
47
- <div id="sites_list_container">
48
  <table cellspacing="0">
49
  <tbody>
50
  <?php $site_props = array('uid', 'url', 'title', 'charset', 'language') ?>
@@ -67,7 +73,9 @@
67
  <?php if ( ! $require_license_key ) : ?>
68
  <td><a class="action action-allow selected" data-action-type="allow" href="#"><?php fs_esc_html_echo_inline( 'allow', 'allow', $slug ) ?></a></td>
69
  <?php echo $separator ?>
 
70
  <td><a class="action action-delegate" data-action-type="delegate" href="#"><?php fs_esc_html_echo_inline( 'delegate', 'delegate', $slug ) ?></a></td>
 
71
  <?php if ( $fs->is_enable_anonymous() ) : ?>
72
  <?php echo $separator ?>
73
  <td><a class="action action-skip" data-action-type="skip" href="#"><?php echo strtolower( fs_esc_html_inline( 'skip', 'skip', $slug ) ) ?></a></td>
9
 
10
  $sites = $VARS['sites'];
11
  $require_license_key = $VARS['require_license_key'];
12
+
13
+ $show_delegation_option = $fs->apply_filters( 'show_delegation_option', true );
14
+ $enable_per_site_activation = $fs->apply_filters( 'enable_per_site_activation', true );
15
  ?>
16
  <?php $separator = '<td>|</td>' ?>
17
+ <div class="fs-multisite-options-container fs-apply-on-all-sites"<?php if ( ! $enable_per_site_activation )
18
+ echo ' style="display: none;"' ?>>
19
+ <table class="fs-all-sites-options">
20
  <tbody>
21
  <tr>
22
  <td width="600">
33
 
34
  }
35
  ?>
36
+ <input class="fs-apply-on-all-sites-checkbox" type="checkbox" value="true" checked><span><?php echo esc_html( $apply_checkbox_label ) ?></span>
37
  </label>
38
  </td>
39
  <?php if ( ! $require_license_key ) : ?>
40
  <td><a class="action action-allow" data-action-type="allow" href="#"><?php fs_esc_html_echo_inline( 'allow', 'allow', $slug ) ?></a></td>
41
  <?php echo $separator ?>
42
+ <?php if ( $show_delegation_option ) : ?>
43
  <td><a class="action action-delegate" data-action-type="delegate" href="#"><?php fs_esc_html_echo_inline( 'delegate', 'delegate', $slug ) ?></a></td>
44
+ <?php endif ?>
45
  <?php if ( $fs->is_enable_anonymous() ) : ?>
46
  <?php echo $separator ?>
47
  <td><a class="action action-skip" data-action-type="skip" href="#"><?php echo strtolower( fs_esc_html_inline( 'skip', 'skip', $slug ) ) ?></a></td>
50
  </tr>
51
  </tbody>
52
  </table>
53
+ <div class="fs-sites-list-container">
54
  <table cellspacing="0">
55
  <tbody>
56
  <?php $site_props = array('uid', 'url', 'title', 'charset', 'language') ?>
73
  <?php if ( ! $require_license_key ) : ?>
74
  <td><a class="action action-allow selected" data-action-type="allow" href="#"><?php fs_esc_html_echo_inline( 'allow', 'allow', $slug ) ?></a></td>
75
  <?php echo $separator ?>
76
+ <?php if ( $show_delegation_option ) : ?>
77
  <td><a class="action action-delegate" data-action-type="delegate" href="#"><?php fs_esc_html_echo_inline( 'delegate', 'delegate', $slug ) ?></a></td>
78
+ <?php endif ?>
79
  <?php if ( $fs->is_enable_anonymous() ) : ?>
80
  <?php echo $separator ?>
81
  <td><a class="action action-skip" data-action-type="skip" href="#"><?php echo strtolower( fs_esc_html_inline( 'skip', 'skip', $slug ) ) ?></a></td>
vendor/freemius/templates/pricing.php CHANGED
@@ -57,6 +57,11 @@
57
  'plugin_version' => $fs->get_plugin_version(),
58
  );
59
 
 
 
 
 
 
60
  // Get site context secure params.
61
  if ( $fs->is_registered() ) {
62
  $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
57
  'plugin_version' => $fs->get_plugin_version(),
58
  );
59
 
60
+ $bundle_id = $fs->get_bundle_id();
61
+ if ( ! is_null( $bundle_id ) ) {
62
+ $context_params['bundle_id'] = $bundle_id;
63
+ }
64
+
65
  // Get site context secure params.
66
  if ( $fs->is_registered() ) {
67
  $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(