Contact Form 7 Multi-Step Forms - Version 4.0.8

Version Description

  • fixed values being saved when form submission is invalid.
Download this release

Release Info

Developer webheadllc
Plugin Icon 128x128 Contact Form 7 Multi-Step Forms
Version 4.0.8
Comparing to
See all releases

Code changes from version 4.0.7 to 4.0.8

Files changed (57) hide show
  1. cf7msm.php +27 -7
  2. contact-form-7-multi-step-module.php +120 -113
  3. freemius/assets/css/admin/account.css +1 -1
  4. freemius/assets/css/admin/add-ons.css +1 -1
  5. freemius/assets/css/admin/common.css +2 -2
  6. freemius/assets/css/admin/connect.css +1 -1
  7. freemius/assets/css/admin/debug.css +1 -1
  8. freemius/assets/css/admin/dialog-boxes.css +1 -1
  9. freemius/includes/class-freemius.php +1349 -160
  10. freemius/includes/class-fs-api.php +1 -1
  11. freemius/includes/class-fs-plugin-updater.php +6 -0
  12. freemius/includes/class-fs-storage.php +12 -10
  13. freemius/includes/customizer/class-fs-customizer-support-section.php +2 -2
  14. freemius/includes/entities/class-fs-payment.php +2 -2
  15. freemius/includes/entities/class-fs-plugin-license.php +7 -0
  16. freemius/includes/entities/class-fs-site.php +4 -1
  17. freemius/includes/fs-essential-functions.php +42 -21
  18. freemius/includes/fs-plugin-info-dialog.php +20 -13
  19. freemius/includes/managers/class-fs-admin-menu-manager.php +6 -1
  20. freemius/includes/sdk/FreemiusBase.php +1 -1
  21. freemius/includes/sdk/FreemiusWordPress.php +15 -11
  22. freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +1 -1
  23. freemius/languages/freemius-cs_CZ.mo +0 -0
  24. freemius/languages/freemius-da_DK.mo +0 -0
  25. freemius/languages/freemius-en.mo +0 -0
  26. freemius/languages/freemius-es_ES.mo +0 -0
  27. freemius/languages/freemius-fr_FR.mo +0 -0
  28. freemius/languages/freemius-he_IL.mo +0 -0
  29. freemius/languages/freemius-hu_HU.mo +0 -0
  30. freemius/languages/freemius-it_IT.mo +0 -0
  31. freemius/languages/freemius-ja.mo +0 -0
  32. freemius/languages/freemius-nl_NL.mo +0 -0
  33. freemius/languages/freemius-ru_RU.mo +0 -0
  34. freemius/languages/freemius-ta.mo +0 -0
  35. freemius/languages/freemius-zh_CN.mo +0 -0
  36. freemius/languages/freemius.pot +527 -454
  37. freemius/start.php +529 -521
  38. freemius/templates/account.php +98 -28
  39. freemius/templates/account/partials/addon.php +2 -2
  40. freemius/templates/account/payments.php +1 -1
  41. freemius/templates/add-ons.php +2 -2
  42. freemius/templates/auto-installation.php +1 -1
  43. freemius/templates/connect.php +82 -27
  44. freemius/templates/debug.php +13 -13
  45. freemius/templates/forms/affiliation.php +26 -5
  46. freemius/templates/forms/deactivation/form.php +19 -15
  47. freemius/templates/forms/license-activation.php +867 -698
  48. freemius/templates/forms/optout.php +336 -269
  49. freemius/templates/forms/subscription-cancellation.php +1 -1
  50. freemius/templates/forms/trial-start.php +1 -1
  51. freemius/templates/forms/user-change.php +296 -0
  52. freemius/templates/partials/index.php +2 -0
  53. freemius/templates/pricing.php +208 -176
  54. freemius/templates/secure-https-header.php +1 -1
  55. js_src/cf7msm.js +8 -4
  56. readme.txt +4 -1
  57. resources/cf7msm.min.js +1 -1
cf7msm.php CHANGED
@@ -343,7 +343,7 @@ add_action( 'wpcf7_contact_form', 'cf7msm_step_2' );
343
  /**
344
  * Handle a multi-step cf7 form for cf7 3.9+
345
  */
346
- function cf7msm_store_data_steps_filter( $cf7_posted_data )
347
  {
348
  $curr_step = '';
349
  $last_step = '';
@@ -422,21 +422,41 @@ function cf7msm_store_data_steps_filter( $cf7_posted_data )
422
  unset( $prev_data[$free_text_key] );
423
  }
424
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
 
426
  if ( !$is_last_step ) {
427
- $cf7_posted_data = array_merge( $prev_data, $cf7_posted_data );
428
  cf7msm_track_big_cookie( $curr_step, $cf7_posted_data );
429
  cf7msm_set( 'cf7msm_posted_data', $cf7_posted_data );
430
- } else {
431
- $cf7_posted_data = array_merge( $prev_data, $cf7_posted_data );
432
  }
433
 
434
  }
435
-
436
- return $cf7_posted_data;
437
  }
438
 
439
- add_filter( 'wpcf7_posted_data', 'cf7msm_store_data_steps_filter', 9 );
440
  /**
441
  * Skip sending the mail if this is a multi step form and not the last step.
442
  */
343
  /**
344
  * Handle a multi-step cf7 form for cf7 3.9+
345
  */
346
+ function cf7msm_add_other_steps_filter( $cf7_posted_data )
347
  {
348
  $curr_step = '';
349
  $last_step = '';
422
  unset( $prev_data[$free_text_key] );
423
  }
424
  }
425
+ $cf7_posted_data = array_merge( $prev_data, $cf7_posted_data );
426
+ }
427
+
428
+ return $cf7_posted_data;
429
+ }
430
+
431
+ add_filter( 'wpcf7_posted_data', 'cf7msm_add_other_steps_filter', 9 );
432
+ /**
433
+ * If use cookies and not the last step, store the values here after it's been validated.
434
+ */
435
+ function cf7msm_store_data_steps()
436
+ {
437
+ $use_cookies = true;
438
+
439
+ if ( $use_cookies ) {
440
+ $cf7_posted_data = WPCF7_Submission::get_instance()->get_posted_data();
441
+ $is_last_step = false;
442
+
443
+ if ( !empty($cf7_posted_data['cf7msm_options']) ) {
444
+ $options = json_decode( stripslashes( $cf7_posted_data['cf7msm_options'] ), true );
445
+ $is_last_step = !empty($options['last_step']);
446
+ }
447
+
448
 
449
  if ( !$is_last_step ) {
450
+ // don't track big cookies on last step bc submitting on the last step doesn't use the cookie.
451
  cf7msm_track_big_cookie( $curr_step, $cf7_posted_data );
452
  cf7msm_set( 'cf7msm_posted_data', $cf7_posted_data );
 
 
453
  }
454
 
455
  }
456
+
 
457
  }
458
 
459
+ add_action( 'wpcf7_before_send_mail', 'cf7msm_store_data_steps' );
460
  /**
461
  * Skip sending the mail if this is a multi step form and not the last step.
462
  */
contact-form-7-multi-step-module.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://www.mymonkeydo.com/contact-form-7-multi-step-module/
6
  Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
7
  Author: Webhead LLC.
8
  Author URI: http://webheadcoder.com
9
- Version: 4.0.7
10
  Text Domain: contact-form-7-multi-step-module
11
  */
12
  /* Copyright 2018 Webhead LLC (email: info at webheadcoder.com)
@@ -29,125 +29,132 @@ if ( !defined( 'ABSPATH' ) ) {
29
  exit;
30
  }
31
 
32
- if ( !function_exists( 'cf7msm_fs' ) ) {
33
- // Create a helper function for easy SDK access.
34
- function cf7msm_fs()
35
- {
36
- global $cf7msm_fs ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- if ( !isset( $cf7msm_fs ) ) {
39
- // Include Freemius SDK.
40
- require_once dirname( __FILE__ ) . '/freemius/start.php';
41
- $cf7msm_fs = fs_dynamic_init( array(
42
- 'id' => '1614',
43
- 'slug' => 'contact-form-7-multi-step-module',
44
- 'type' => 'plugin',
45
- 'public_key' => 'pk_b445061ad8b540f6a89c2c4f4df19',
46
- 'is_premium' => false,
47
- 'premium_suffix' => 'Pro',
48
- 'has_addons' => false,
49
- 'has_paid_plans' => true,
50
- 'menu' => array(
51
- 'first-path' => 'plugins.php',
52
- 'contact' => false,
53
- 'support' => false,
54
- ),
55
- 'is_live' => true,
56
- ) );
 
 
 
 
 
 
 
57
  }
58
 
59
- return $cf7msm_fs;
60
- }
61
-
62
- // Init Freemius.
63
- cf7msm_fs();
64
- // Signal that SDK was initiated.
65
- do_action( 'cf7msm_fs_loaded' );
66
- define( 'CF7MSM_VERSION', '4.0.7' );
67
- define( 'CF7MSM_PLUGIN', __FILE__ );
68
- define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
69
- define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
70
- define( 'CF7MSM_MIN_CF7_VERSION', '4.8' );
71
- define( 'CF7MSM_LEARN_MORE_URL', 'https://webheadcoder.com/contact-form-7-multi-step-forms/#pro' );
72
- define( 'CF7MSM_COOKIE_SIZE_THRESHOLD', 3684 );
73
- //4093 * 90%
74
- /**
75
- * Change update message
76
- */
77
- function cf7msm_fs_custom_connect_message_on_update(
78
- $message,
79
- $user_first_name,
80
- $plugin_title,
81
- $user_login,
82
- $site_link,
83
- $freemius_link
84
- )
85
- {
86
- $limited_time = '';
87
- return cf7msm_kses( sprintf( __( 'Please help improve the %1$s plugin! I have chosen to use %2$s to get an idea of how users use my plugin.<br><br> If you opt-in, the administrator email and some data about your usage of %1$s will be sent to %2$s. If you skip this, that\'s okay! The plugin will still work just fine.', 'contact-form-7-multi-step-module' ), '<strong>' . $plugin_title . '</strong>', $freemius_link ) ) . $limited_time;
88
- }
89
-
90
- cf7msm_fs()->add_filter(
91
- 'connect_message_on_update',
92
- 'cf7msm_fs_custom_connect_message_on_update',
93
- 10,
94
- 6
95
- );
96
- /**
97
- * Add account link if paying.
98
- */
99
- function cf7msm_plugin_action_links( $links )
100
- {
101
- if ( cf7msm_fs()->is_not_paying() ) {
102
- $links[] = '<a href="' . CF7MSM_LEARN_MORE_URL . '" target="_blank">' . __( 'Learn about PRO' ) . '</a>';
103
  }
104
- return $links;
105
- }
106
-
107
- add_filter( "plugin_action_links_" . plugin_basename( CF7MSM_PLUGIN ), 'cf7msm_plugin_action_links' );
108
- /**
109
- * Run on activation
110
- */
111
- function cf7msm_activation()
112
- {
113
- $stats = get_option( '_cf7msm_stats', array() );
114
- $install_date = ( !empty($stats['install_date']) ? $stats['install_date'] : 0 );
115
 
116
- if ( empty($install_date) ) {
117
- $stats['install_date'] = time();
118
- update_option( '_cf7msm_stats', $stats );
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
 
121
- update_option( '_cf7msm_version', CF7MSM_VERSION );
122
- }
123
-
124
- register_activation_hook( CF7MSM_PLUGIN, 'cf7msm_activation' );
125
- /**
126
- * Check if everything is up to date.
127
- */
128
- function cf7msm_plugin_check()
129
- {
130
- $version = get_option( '_cf7msm_version', '' );
131
- if ( $version !== CF7MSM_PLUGIN ) {
132
- cf7msm_activation();
133
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
135
-
136
- add_action( 'plugins_loaded', 'cf7msm_plugin_check' );
137
- /**
138
- * Run on deactivation
139
- */
140
- function cf7msm_deactivation()
141
- {
142
- delete_option( '_cf7msm_stats' );
143
- delete_option( '_cf7msm_version' );
144
- }
145
-
146
- register_deactivation_hook( CF7MSM_PLUGIN, 'cf7msm_deactivation' );
147
- require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'cf7msm.php';
148
- require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'cf7msm-admin.php';
149
- require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/common.php';
150
- require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/module-multistep.php';
151
- require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/module-session.php';
152
- require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/module-back.php';
153
  }
6
  Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
7
  Author: Webhead LLC.
8
  Author URI: http://webheadcoder.com
9
+ Version: 4.0.8
10
  Text Domain: contact-form-7-multi-step-module
11
  */
12
  /* Copyright 2018 Webhead LLC (email: info at webheadcoder.com)
29
  exit;
30
  }
31
 
32
+ if ( function_exists( 'cf7msm_fs' ) ) {
33
+ cf7msm_fs()->set_basename( false, __FILE__ );
34
+ } else {
35
+ // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
36
+
37
+ if ( !function_exists( 'cf7msm_fs' ) ) {
38
+ // Create a helper function for easy SDK access.
39
+ function cf7msm_fs()
40
+ {
41
+ global $cf7msm_fs ;
42
+
43
+ if ( !isset( $cf7msm_fs ) ) {
44
+ // Include Freemius SDK.
45
+ require_once dirname( __FILE__ ) . '/freemius/start.php';
46
+ $cf7msm_fs = fs_dynamic_init( array(
47
+ 'id' => '1614',
48
+ 'slug' => 'contact-form-7-multi-step-module',
49
+ 'type' => 'plugin',
50
+ 'public_key' => 'pk_b445061ad8b540f6a89c2c4f4df19',
51
+ 'is_premium' => false,
52
+ 'premium_suffix' => '(Pro)',
53
+ 'has_addons' => false,
54
+ 'has_paid_plans' => true,
55
+ 'menu' => array(
56
+ 'first-path' => 'plugins.php',
57
+ 'contact' => false,
58
+ 'support' => false,
59
+ ),
60
+ 'is_live' => true,
61
+ ) );
62
+ }
63
+
64
+ return $cf7msm_fs;
65
+ }
66
 
67
+ // Init Freemius.
68
+ cf7msm_fs();
69
+ // Signal that SDK was initiated.
70
+ do_action( 'cf7msm_fs_loaded' );
71
+ define( 'CF7MSM_VERSION', '4.0.8' );
72
+ define( 'CF7MSM_PLUGIN', __FILE__ );
73
+ define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
74
+ define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
75
+ define( 'CF7MSM_MIN_CF7_VERSION', '4.8' );
76
+ define( 'CF7MSM_LEARN_MORE_URL', 'https://webheadcoder.com/contact-form-7-multi-step-forms/#pro' );
77
+ define( 'CF7MSM_COOKIE_SIZE_THRESHOLD', 3684 );
78
+ //4093 * 90%
79
+ /**
80
+ * Change update message
81
+ */
82
+ function cf7msm_fs_custom_connect_message_on_update(
83
+ $message,
84
+ $user_first_name,
85
+ $plugin_title,
86
+ $user_login,
87
+ $site_link,
88
+ $freemius_link
89
+ )
90
+ {
91
+ $limited_time = '';
92
+ return cf7msm_kses( sprintf( __( 'Please help improve the %1$s plugin! I have chosen to use %2$s to get an idea of how users use my plugin.<br><br> If you opt-in, the administrator email and some data about your usage of %1$s will be sent to %2$s. If you skip this, that\'s okay! The plugin will still work just fine.', 'contact-form-7-multi-step-module' ), '<strong>' . $plugin_title . '</strong>', $freemius_link ) ) . $limited_time;
93
  }
94
 
95
+ cf7msm_fs()->add_filter(
96
+ 'connect_message_on_update',
97
+ 'cf7msm_fs_custom_connect_message_on_update',
98
+ 10,
99
+ 6
100
+ );
101
+ /**
102
+ * Add account link if paying.
103
+ */
104
+ function cf7msm_plugin_action_links( $links )
105
+ {
106
+ if ( cf7msm_fs()->is_not_paying() ) {
107
+ $links[] = '<a href="' . CF7MSM_LEARN_MORE_URL . '" target="_blank">' . __( 'Learn about PRO' ) . '</a>';
108
+ }
109
+ return $links;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
 
 
 
 
 
 
 
 
 
 
 
111
 
112
+ add_filter( "plugin_action_links_" . plugin_basename( CF7MSM_PLUGIN ), 'cf7msm_plugin_action_links' );
113
+ /**
114
+ * Run on activation
115
+ */
116
+ function cf7msm_activation()
117
+ {
118
+ $stats = get_option( '_cf7msm_stats', array() );
119
+ $install_date = ( !empty($stats['install_date']) ? $stats['install_date'] : 0 );
120
+
121
+ if ( empty($install_date) ) {
122
+ $stats['install_date'] = time();
123
+ update_option( '_cf7msm_stats', $stats );
124
+ }
125
+
126
+ update_option( '_cf7msm_version', CF7MSM_VERSION );
127
  }
128
 
129
+ register_activation_hook( CF7MSM_PLUGIN, 'cf7msm_activation' );
130
+ /**
131
+ * Check if everything is up to date.
132
+ */
133
+ function cf7msm_plugin_check()
134
+ {
135
+ $version = get_option( '_cf7msm_version', '' );
136
+ if ( $version !== CF7MSM_PLUGIN ) {
137
+ cf7msm_activation();
138
+ }
 
 
139
  }
140
+
141
+ add_action( 'plugins_loaded', 'cf7msm_plugin_check' );
142
+ /**
143
+ * Run on deactivation
144
+ */
145
+ function cf7msm_deactivation()
146
+ {
147
+ delete_option( '_cf7msm_stats' );
148
+ delete_option( '_cf7msm_version' );
149
+ }
150
+
151
+ register_deactivation_hook( CF7MSM_PLUGIN, 'cf7msm_deactivation' );
152
+ require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'cf7msm.php';
153
+ require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'cf7msm-admin.php';
154
+ require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/common.php';
155
+ require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/module-multistep.php';
156
+ require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/module-session.php';
157
+ require_once plugin_dir_path( CF7MSM_PLUGIN ) . 'form-tags/module-back.php';
158
  }
159
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  }
freemius/assets/css/admin/account.css CHANGED
@@ -1 +1 @@
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%}
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:800px}#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%}
freemius/assets/css/admin/add-ons.css CHANGED
@@ -1,2 +1,2 @@
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}}
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 iframe{max-width:100%}#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}}
freemius/assets/css/admin/common.css CHANGED
@@ -1,2 +1,2 @@
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}
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-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,0.1),inset 0 1px 3px 0 rgba(0,0,0,0.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,0.5);z-index:999;-moz-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}.fs-switch-feedback{margin-left:10px}.fs-switch-feedback.success{color:#71ae00}.rtl .fs-switch-feedback{margin-left:0;margin-right:10px}#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;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
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 .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}
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 .fs-switch{float:right}#fs_connect .fs-permissions ul li .fs-permission-description{margin-left:55px}#fs_connect .fs-permissions ul li .fs-permission-description span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li .fs-permission-description 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 .fs-permission-description{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li .fs-switch{float:left}.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}
freemius/assets/css/admin/debug.css CHANGED
@@ -1 +1 @@
1
- .switch{position:relative;display:inline-block;font-size:1.6em;font-weight:bold;color:#ccc;text-shadow:0px 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:4px;background:#ececec;box-shadow:0px 0px 4px rgba(0,0,0,0.1),inset 0px 1px 3px 0px rgba(0,0,0,0.1);cursor:pointer}.switch span{display:inline-block;width:35px;text-transform:uppercase}.switch span.on{color:#6bc406}.switch .toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background:-moz-linear-gradient(top, #ececec 0%, #fff 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #fff));background:-webkit-linear-gradient(top, #ececec 0%, #fff 100%);background:-o-linear-gradient(top, #ececec 0%, #fff 100%);background:-ms-linear-gradient(top, #ececec 0%, #fff 100%);background:linear-gradient(top, #ececec 0%, #fff 100%);box-shadow:inset 0px 1px 0px 0px rgba(255,255,255,0.5);z-index:999;-moz-transition:all 0.15s ease-in-out;-o-transition:all 0.15s ease-in-out;-ms-transition:all 0.15s ease-in-out;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out}.switch.on .toggle{left:2%}.switch.off .toggle{left:54%}.switch.round{padding:0px 20px;border-radius:40px}.switch.round .toggle{border-radius:40px;width:14px;height:14px}.switch.round.on .toggle{left:3%;background:#6bc406}.switch.round.off .toggle{left:58%}.switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
1
+ .fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
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.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-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.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}
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 .dashicons{vertical-align:middle}.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-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.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}
freemius/includes/class-freemius.php CHANGED
@@ -351,6 +351,14 @@
351
  */
352
  private $is_whitelabeled;
353
 
 
 
 
 
 
 
 
 
354
  #region Uninstall Reasons IDs
355
 
356
  const REASON_NO_LONGER_NEEDED = 1;
@@ -369,6 +377,14 @@
369
  const REASON_DIDNT_WORK_AS_EXPECTED = 14;
370
  const REASON_TEMPORARY_DEACTIVATION = 15;
371
 
 
 
 
 
 
 
 
 
372
  #endregion
373
 
374
  /* Ctor
@@ -816,7 +832,11 @@
816
  return false;
817
  }
818
 
819
- if ( ! $is_tabs_visibility_check && $this->show_settings_with_tabs() ) {
 
 
 
 
820
  /**
821
  * wp.org themes are limited to a single submenu item, and
822
  * sub-submenu items are most likely not allowed (never verified).
@@ -1457,7 +1477,10 @@
1457
  if ( $this->is_plugin() &&
1458
  ! isset( $this->_storage->is_plugin_new_install )
1459
  ) {
1460
- $this->_storage->is_plugin_new_install = false;
 
 
 
1461
  }
1462
  }
1463
 
@@ -1480,6 +1503,13 @@
1480
  -1 < settings.url.indexOf('admin-ajax.php') &&
1481
  ! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
1482
  ) {
 
 
 
 
 
 
 
1483
  if (settings.url.indexOf('?') > 0) {
1484
  settings.url += '&';
1485
  } else {
@@ -1487,7 +1517,6 @@
1487
  }
1488
 
1489
  settings.url += '<?php echo $admin_param ?>=true';
1490
-
1491
  }
1492
  });
1493
  })(jQuery);
@@ -1505,7 +1534,7 @@
1505
  ?>
1506
  <script type="text/javascript">
1507
  (function ($) {
1508
- $('.fs-submenu-item.wp-support-forum').parent().attr('target', '_blank');
1509
  })(jQuery);
1510
  </script>
1511
  <?php
@@ -1601,6 +1630,7 @@
1601
  }
1602
 
1603
  add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
 
1604
  }
1605
 
1606
  if ( $this->is_plugin() ) {
@@ -1632,13 +1662,14 @@
1632
 
1633
  add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
1634
 
1635
- if ( $this->is_theme() ) {
1636
  add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
1637
  }
1638
 
1639
  add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1640
  add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1641
  add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
 
1642
 
1643
  $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1644
  $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
@@ -2005,6 +2036,10 @@
2005
  * @since 2.0.0
2006
  */
2007
  function _hook_action_links_and_register_account_hooks() {
 
 
 
 
2008
  $this->_add_tracking_links();
2009
 
2010
  if ( self::is_plugins_page() && $this->is_plugin() ) {
@@ -2185,6 +2220,12 @@
2185
  );
2186
 
2187
  $store_option = true;
 
 
 
 
 
 
2188
  }
2189
 
2190
  if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
@@ -4258,7 +4299,7 @@
4258
  )
4259
  ),
4260
  sprintf(
4261
- '<a href="%s" target="_blank"><b>%s</b></a> - %s',
4262
  sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4263
  $install_previous_title,
4264
  $install_previous_desc
@@ -4365,7 +4406,7 @@
4365
  )
4366
  ),
4367
  sprintf(
4368
- '<a href="%s" target="_blank"><b>%s</b></a> - %s',
4369
  sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4370
  $install_previous_title,
4371
  $install_previous_desc
@@ -4886,10 +4927,12 @@
4886
  } else {
4887
  $is_network_admin = fs_is_network_admin();
4888
 
4889
- if (
 
 
 
4890
  $this->_parent->is_registered() &&
4891
  ! $this->is_registered() &&
4892
- $this->has_free_plan() &&
4893
  /**
4894
  * If not registered for add-on and the following conditions for the add-on are met, activate add-on account.
4895
  * * Network active and in network admin - network activate add-on account.
@@ -4903,16 +4946,40 @@
4903
  */
4904
  ( $this->is_network_active() || ! $is_network_admin )
4905
  ) {
4906
- // If parent plugin activated, automatically install add-on for the user.
4907
- $this->_activate_addon_account(
4908
- $this->_parent,
4909
- ( $this->is_network_active() && $is_network_admin ) ?
4910
- true :
4911
- get_current_blog_id()
4912
- );
4913
- } else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4914
- // If add-on activated and parent not, automatically install parent for the user.
4915
- $this->activate_parent_account( $this->_parent );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4916
  }
4917
 
4918
  // @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
@@ -5407,6 +5474,65 @@
5407
  }
5408
  }
5409
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5410
  /**
5411
  * Parse plugin's settings (as defined by the plugin dev).
5412
  *
@@ -5544,6 +5670,7 @@
5544
  $this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
5545
  }
5546
  $this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
 
5547
 
5548
  if ( ! empty( $plugin_info['trial'] ) ) {
5549
  $this->_trial_days = $this->get_numeric_option(
@@ -5915,12 +6042,16 @@
5915
  * @return Freemius[]
5916
  */
5917
  function get_installed_addons() {
 
 
 
 
 
5918
  $installed_addons = array();
 
5919
  foreach ( self::$_instances as $instance ) {
5920
- if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
5921
- if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
5922
- $installed_addons[] = $instance;
5923
- }
5924
  }
5925
  }
5926
 
@@ -5970,7 +6101,25 @@
5970
  * @return bool
5971
  */
5972
  function is_addon() {
5973
- return isset( $this->_plugin->parent_plugin_id ) && is_numeric( $this->_plugin->parent_plugin_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5974
  }
5975
 
5976
  /**
@@ -6727,6 +6876,8 @@
6727
  } else {
6728
  $this->sync_install();
6729
  }
 
 
6730
  }
6731
  }
6732
  }
@@ -6939,6 +7090,8 @@
6939
  } else {
6940
  $this->sync_install( array(), true );
6941
  }
 
 
6942
  }
6943
  }
6944
 
@@ -6995,6 +7148,8 @@
6995
  * @since 1.0.7
6996
  */
6997
  function _admin_init_action() {
 
 
6998
  /**
6999
  * Automatically redirect to connect/activation page after plugin activation.
7000
  *
@@ -7007,12 +7162,16 @@
7007
  /**
7008
  * Don't redirect if activating multiple plugins at once (bulk activation).
7009
  */
7010
- } else {
7011
  $this->_redirect_on_activation_hook();
7012
  return;
7013
  }
7014
  }
7015
 
 
 
 
 
7016
  if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
7017
  check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
7018
 
@@ -7043,7 +7202,7 @@
7043
  )
7044
  ) {
7045
  if ( ! $this->is_pending_activation() ) {
7046
- if ( ! $this->_menu->is_activation_page( $this->show_opt_in_on_themes_page() ) ) {
7047
  /**
7048
  * If a user visits any other admin page before activating the premium-only theme with a valid
7049
  * license, reactivate the previous theme.
@@ -7686,8 +7845,17 @@
7686
  $this->_storage->is_plugin_new_install = empty( $this->_storage->plugin_last_version );
7687
  }
7688
 
 
 
 
 
 
 
 
 
 
7689
  if ( ! $this->_anonymous_mode &&
7690
- $this->has_api_connectivity( WP_FS__DEV_MODE ) &&
7691
  ! $this->_isAutoInstall
7692
  ) {
7693
  // Store hint that the plugin was just activated to enable auto-redirection to settings.
@@ -7720,11 +7888,20 @@
7720
  return;
7721
  }
7722
 
7723
- $license = $this->get_addon_active_parent_license();
7724
  if ( ! is_object( $license ) ) {
7725
  return;
7726
  }
7727
 
 
 
 
 
 
 
 
 
 
7728
  if ( ! $this->is_registered() ) {
7729
  // Opt in with a license key.
7730
  $this->opt_in(
@@ -7747,7 +7924,6 @@
7747
  }
7748
  }
7749
 
7750
-
7751
  /**
7752
  * @author Leo Fajardo (@leorw)
7753
  * @since 2.3.0
@@ -7763,12 +7939,21 @@
7763
 
7764
  $license = ( ! is_null( $license ) ) ?
7765
  $license :
7766
- $this->get_addon_active_parent_license();
7767
 
7768
  if ( ! is_object( $license ) ) {
7769
  return;
7770
  }
7771
 
 
 
 
 
 
 
 
 
 
7772
  if ( ! $this->is_network_registered() ) {
7773
  $sites = $this->get_sites_for_network_level_optin();
7774
 
@@ -7832,16 +8017,217 @@
7832
  }
7833
 
7834
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7835
  * @author Leo Fajardo (@leorw)
7836
  * @since 2.3.0
7837
  *
 
 
 
7838
  * @return FS_Plugin_License
7839
  */
7840
- private function get_addon_active_parent_license() {
7841
  $parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
7842
- $parent_instance = $this->get_parent_instance();
7843
 
7844
- $foreign_licenses = $parent_instance->get_foreign_licenses_info(
 
 
 
 
 
 
 
 
 
 
7845
  self::get_all_licenses( $this->get_parent_id() )
7846
  );
7847
 
@@ -7855,7 +8241,7 @@
7855
  $parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
7856
  }
7857
 
7858
- $result = $parent_instance->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, true );
7859
 
7860
  if (
7861
  ! $this->is_api_result_object( $result, 'licenses' ) ||
@@ -7865,9 +8251,24 @@
7865
  return null;
7866
  }
7867
 
7868
- $license = new FS_Plugin_License( $result->licenses[ 0 ] );
7869
 
7870
- return $license;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7871
  }
7872
 
7873
  /**
@@ -8006,6 +8407,10 @@
8006
  foreach ( $sites as $site ) {
8007
  $blog_id = self::get_site_blog_id( $site );
8008
 
 
 
 
 
8009
  $install_id = $this->_delete_site( true, $blog_id );
8010
 
8011
  // Clear all storage data.
@@ -8783,26 +9188,28 @@
8783
  $include_themes = true,
8784
  $include_blog_data = true
8785
  ) {
8786
- if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
8787
- /**
8788
- * @since 1.1.8 Also send plugin updates.
8789
- */
8790
- if ( $include_plugins && ! isset( $override['plugins'] ) ) {
8791
- $plugins = $this->get_plugins_data_for_api();
8792
- if ( ! empty( $plugins ) ) {
8793
- $override['plugins'] = $plugins;
 
 
8794
  }
8795
  }
8796
- }
8797
 
8798
- if ( ! defined( 'WP_FS__TRACK_THEMES' ) || false !== WP_FS__TRACK_THEMES ) {
8799
- /**
8800
- * @since 1.1.8 Also send themes updates.
8801
- */
8802
- if ( $include_themes && ! isset( $override['themes'] ) ) {
8803
- $themes = $this->get_themes_data_for_api();
8804
- if ( ! empty( $themes ) ) {
8805
- $override['themes'] = $themes;
 
8806
  }
8807
  }
8808
  }
@@ -9158,6 +9565,21 @@
9158
  }
9159
  }
9160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9161
  /**
9162
  * Update install only if changed.
9163
  *
@@ -9441,6 +9863,8 @@
9441
  $fs = self::get_instance_by_file( $plugin_file );
9442
 
9443
  if ( is_object( $fs ) ) {
 
 
9444
  self::require_plugin_essentials();
9445
 
9446
  if ( is_plugin_active( $fs->_free_plugin_basename ) ||
@@ -10002,6 +10426,10 @@
10002
 
10003
  $class_name = '';
10004
 
 
 
 
 
10005
  switch ( $option_name ) {
10006
  case 'plugins':
10007
  case 'themes':
@@ -10286,6 +10714,18 @@
10286
  return ( is_object( $this->_site ) && $this->_site->is_tracking_allowed() );
10287
  }
10288
 
 
 
 
 
 
 
 
 
 
 
 
 
10289
  /**
10290
  * @author Vova Feldman (@svovaf)
10291
  * @since 1.0.4
@@ -11322,7 +11762,22 @@
11322
 
11323
  // Update current license.
11324
  if ( is_object( $this->_license ) ) {
11325
- $this->set_license( $this->_get_license_by_id( $this->_license->id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11326
  }
11327
 
11328
  return $this->_licenses;
@@ -11771,6 +12226,14 @@
11771
  function _update_site_license( $new_license ) {
11772
  $this->_logger->entrance();
11773
 
 
 
 
 
 
 
 
 
11774
  $this->set_license( $new_license );
11775
 
11776
  if ( ! is_object( $new_license ) ) {
@@ -12219,7 +12682,7 @@
12219
  }
12220
 
12221
  $current_plan_order = - 1;
12222
- $required_plan_order = - 1;
12223
  for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
12224
  if ( $plan === $this->_plans[ $i ]->name ) {
12225
  $required_plan_order = $i;
@@ -12376,6 +12839,65 @@
12376
  fs_require_template( 'forms/resend-key.php', $vars );
12377
  }
12378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12379
  /**
12380
  * @author Leo Fajardo (@leorw)
12381
  * @since 2.3.1
@@ -12487,6 +13009,10 @@
12487
  * @since 1.2.0
12488
  */
12489
  function _add_license_activation() {
 
 
 
 
12490
  if ( ! $this->is_user_admin() ) {
12491
  // Only admins can activate a license.
12492
  return;
@@ -12497,7 +13023,17 @@
12497
  return;
12498
  }
12499
 
12500
- if ( $this->has_premium_version() && ! $this->is_premium() ) {
 
 
 
 
 
 
 
 
 
 
12501
  // Only add license activation logic to the premium version, or in case of a serviceware plugin, also in the free version.
12502
  return;
12503
  }
@@ -12524,6 +13060,57 @@
12524
  $this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
12525
  }
12526
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12527
  /**
12528
  * @author Leo Fajardo (@leorw)
12529
  * @since 2.0.2
@@ -12622,22 +13209,156 @@
12622
  exit;
12623
  }
12624
 
 
 
 
 
12625
  $result = $this->activate_license(
12626
  $license_key,
12627
- fs_is_network_admin() ?
12628
- fs_request_get( 'sites', array(), 'post' ) :
12629
- array(),
12630
  fs_request_get_bool( 'is_marketing_allowed', null ),
12631
  fs_request_get( 'blog_id', null ),
12632
- fs_request_get( 'module_id', null, 'post' )
 
 
12633
  );
12634
 
 
 
 
 
 
 
 
 
 
 
12635
  echo json_encode( $result );
12636
 
12637
  exit;
12638
  }
12639
 
12640
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12641
  * A helper method to activate migrated licenses. If the product is network activated and integrated, the method will network activate the license.
12642
  *
12643
  * @author Vova Feldman (@svovaf)
@@ -12646,6 +13367,8 @@
12646
  * @param string $license_key
12647
  * @param null|bool $is_marketing_allowed
12648
  * @param null|number $plugin_id
 
 
12649
  *
12650
  * @return array {
12651
  * @var bool $success
@@ -12658,17 +13381,19 @@
12658
  function activate_migrated_license(
12659
  $license_key,
12660
  $is_marketing_allowed = null,
12661
- $plugin_id = null
 
 
12662
  ) {
12663
  $this->_logger->entrance();
12664
 
12665
  $result = $this->activate_license(
12666
  $license_key,
12667
- $this->is_network_active() ?
12668
  $this->get_sites_for_network_level_optin() :
12669
- array(),
12670
  $is_marketing_allowed,
12671
- null,
12672
  $plugin_id
12673
  );
12674
 
@@ -12678,6 +13403,32 @@
12678
  return $result;
12679
  }
12680
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12681
  /**
12682
  * The implementation of this method was previously in `_activate_license_ajax_action()`.
12683
  *
@@ -12689,6 +13440,7 @@
12689
  * @param null|bool $is_marketing_allowed
12690
  * @param null|int $blog_id
12691
  * @param null|number $plugin_id
 
12692
  *
12693
  * @return array {
12694
  * @var bool $success
@@ -12701,13 +13453,20 @@
12701
  $sites = array(),
12702
  $is_marketing_allowed = null,
12703
  $blog_id = null,
12704
- $plugin_id = null
 
 
12705
  ) {
12706
  $this->_logger->entrance();
12707
 
12708
  $license_key = trim( $license_key );
12709
 
12710
- if ( ! fs_is_network_admin() ) {
 
 
 
 
 
12711
  // If the license activation is executed outside the context of a network admin, ignore the sites collection.
12712
  $sites = array();
12713
  }
@@ -12716,6 +13475,8 @@
12716
  $this :
12717
  $this->get_addon_instance( $plugin_id );
12718
 
 
 
12719
  $error = false;
12720
  $next_page = false;
12721
 
@@ -12734,8 +13495,17 @@
12734
  $user = $fs->get_current_or_network_user();
12735
  }
12736
 
 
 
 
 
 
 
 
 
 
12737
  if ( is_object( $user ) ) {
12738
- if ( fs_is_network_admin() && ! $has_valid_blog_id ) {
12739
  // If no specific blog ID was provided, activate the license for all sites in the network.
12740
  $blog_2_install_map = array();
12741
  $site_ids = array();
@@ -12774,21 +13544,27 @@
12774
  }
12775
  }
12776
  } else {
12777
- if ( $has_valid_blog_id ) {
12778
- /**
12779
- * If a specific blog ID was provided, activate the license only for the install that is
12780
- * associated with the given blog ID.
12781
- *
12782
- * @author Leo Fajardo (@leorw)
12783
- */
12784
- $fs->switch_to_blog( $blog_id );
12785
- }
12786
-
12787
  if ( $fs->is_registered() ) {
12788
  $params = array(
12789
  'license_key' => $fs->apply_filters( 'license_key', $license_key )
12790
  );
12791
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12792
  $api = $fs->get_api_site_scope();
12793
 
12794
  $install = $api->call( $fs->add_show_pending( '/' ), 'put', $params );
@@ -12799,6 +13575,14 @@
12799
  var_export( $install->error, true );
12800
  } else {
12801
  $fs->reconnect_locally( $has_valid_blog_id );
 
 
 
 
 
 
 
 
12802
  }
12803
  } else /* ( $fs->is_addon() && $fs->get_parent_instance()->is_registered() ) */ {
12804
  $result = $fs->activate_license_on_site( $user, $license_key );
@@ -12814,11 +13598,19 @@
12814
  if ( empty( $error ) ) {
12815
  $fs->network_upgrade_mode_completed();
12816
 
 
 
 
 
 
 
12817
  $fs->_sync_license( true, $has_valid_blog_id );
12818
 
 
 
12819
  $next_page = $fs->is_addon() ?
12820
  $fs->get_parent_instance()->get_account_url() :
12821
- $fs->get_account_url();
12822
  }
12823
  } else {
12824
  $next_page = $fs->opt_in(
@@ -12836,7 +13628,7 @@
12836
  if ( isset( $next_page->error ) ) {
12837
  $error = $next_page->error;
12838
  } else {
12839
- if ( fs_is_network_admin() ) {
12840
  /**
12841
  * Get the list of sites that were just opted-in (and license activated).
12842
  * This is an optimization for the next part below saving some DB queries.
@@ -12922,6 +13714,64 @@
12922
  return $result;
12923
  }
12924
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12925
  /**
12926
  * @author Leo Fajardo (@leorw)
12927
  * @since 1.2.3.1
@@ -13892,7 +14742,12 @@
13892
  * @return bool
13893
  */
13894
  function is_user_in_admin() {
13895
- return is_admin() && ! self::is_ajax() && ! self::is_cron();
 
 
 
 
 
13896
  }
13897
 
13898
  /**
@@ -14204,9 +15059,18 @@
14204
  if ( function_exists( 'get_sites' ) ) {
14205
  // For WP 4.6 and above.
14206
  return get_sites( $args );
14207
- } else if ( function_exists( 'wp_get_sites' ) ) {
14208
  // For WP 3.7 to WP 4.5.
14209
- return wp_get_sites( $args );
 
 
 
 
 
 
 
 
 
14210
  } else {
14211
  // For WP 3.6 and below.
14212
  return get_blog_list( 0, 'all' );
@@ -14383,7 +15247,7 @@
14383
  * @return bool Since 2.3.1 returns if a switch was made.
14384
  */
14385
  function switch_to_blog( $blog_id, FS_Site $install = null ) {
14386
- if ( $blog_id == $this->_context_is_network_or_blog_id ) {
14387
  return false;
14388
  }
14389
 
@@ -15360,7 +16224,7 @@
15360
  /**
15361
  * This is a special fault tolerance mechanism to handle a scenario that the user data is missing.
15362
  */
15363
- $user = $this->fetch_user_by_install();
15364
  }
15365
 
15366
  $this->_user = ( $user instanceof FS_User ) ?
@@ -15400,13 +16264,19 @@
15400
  * @author Vova Feldman (@svovaf)
15401
  * @since 2.0.0
15402
  *
 
 
15403
  * @return \FS_User|mixed
15404
  */
15405
- private function fetch_user_by_install() {
 
 
 
 
15406
  $api = $this->get_api_site_scope();
15407
 
15408
  $uid = $this->get_anonymous_id();
15409
- $request_path = "/users/{$this->_site->user_id}.json?uid={$uid}";
15410
 
15411
  $result = $api->get( $request_path, false, WP_FS__TIME_10_MIN_IN_SEC );
15412
 
@@ -15764,6 +16634,8 @@
15764
  'http' => 402
15765
  );
15766
 
 
 
15767
  return $result;
15768
  }
15769
 
@@ -15836,6 +16708,9 @@
15836
  ( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
15837
  $decoded->is_marketing_allowed :
15838
  null ),
 
 
 
15839
  $decoded->install_id,
15840
  $decoded->install_public_key,
15841
  $decoded->install_secret_key,
@@ -15849,6 +16724,9 @@
15849
  ( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
15850
  $decoded->is_marketing_allowed :
15851
  null ),
 
 
 
15852
  $decoded->installs,
15853
  false
15854
  );
@@ -16075,6 +16953,7 @@
16075
  fs_request_get( 'user_public_key' ),
16076
  fs_request_get( 'user_secret_key' ),
16077
  fs_request_get_bool( 'is_marketing_allowed', null ),
 
16078
  $pending_sites_info['blog_ids'],
16079
  $pending_sites_info['license_key'],
16080
  $pending_sites_info['trial_plan_id']
@@ -16085,6 +16964,7 @@
16085
  fs_request_get( 'user_public_key' ),
16086
  fs_request_get( 'user_secret_key' ),
16087
  fs_request_get_bool( 'is_marketing_allowed', null ),
 
16088
  fs_request_get( 'install_id' ),
16089
  fs_request_get( 'install_public_key' ),
16090
  fs_request_get( 'install_secret_key' ),
@@ -16140,13 +17020,12 @@
16140
  * @param string $user_public_key
16141
  * @param string $user_secret_key
16142
  * @param bool|null $is_marketing_allowed
 
16143
  * @param number $install_id
16144
  * @param string $install_public_key
16145
  * @param string $install_secret_key
16146
  * @param bool $redirect
16147
- * @param bool $auto_install Since 1.2.1.7 If `true` and setting up an account with a valid license, will
16148
- * redirect (or return a URL) to the account page with a special parameter to
16149
- * trigger the auto installation processes.
16150
  *
16151
  * @return string If redirect is `false`, returns the next page the user should be redirected to.
16152
  */
@@ -16155,6 +17034,7 @@
16155
  $user_public_key,
16156
  $user_secret_key,
16157
  $is_marketing_allowed,
 
16158
  $install_id,
16159
  $install_public_key,
16160
  $install_secret_key,
@@ -16196,6 +17076,10 @@
16196
  $this->disable_opt_in_notice_and_lock_user();
16197
  }
16198
 
 
 
 
 
16199
  return $this->setup_account(
16200
  $this->_user,
16201
  $this->_site,
@@ -16214,6 +17098,7 @@
16214
  * @param string $user_public_key
16215
  * @param string $user_secret_key
16216
  * @param bool|null $is_marketing_allowed
 
16217
  * @param array $site_ids
16218
  * @param bool $license_key
16219
  * @param bool $trial_plan_id
@@ -16226,6 +17111,7 @@
16226
  $user_public_key,
16227
  $user_secret_key,
16228
  $is_marketing_allowed,
 
16229
  $site_ids,
16230
  $license_key = false,
16231
  $trial_plan_id = false,
@@ -16237,6 +17123,10 @@
16237
  $this->disable_opt_in_notice_and_lock_user();
16238
  }
16239
 
 
 
 
 
16240
  $sites = array();
16241
  foreach ( $site_ids as $site_id ) {
16242
  $sites[] = $this->get_site_info( array( 'blog_id' => $site_id ) );
@@ -16255,11 +17145,10 @@
16255
  * @param string $user_public_key
16256
  * @param string $user_secret_key
16257
  * @param bool|null $is_marketing_allowed
 
16258
  * @param object[] $installs
16259
  * @param bool $redirect
16260
- * @param bool $auto_install Since 1.2.1.7 If `true` and setting up an account with a valid license, will
16261
- * redirect (or return a URL) to the account page with a special parameter to
16262
- * trigger the auto installation processes.
16263
  *
16264
  * @return string If redirect is `false`, returns the next page the user should be redirected to.
16265
  */
@@ -16268,6 +17157,7 @@
16268
  $user_public_key,
16269
  $user_secret_key,
16270
  $is_marketing_allowed,
 
16271
  array $installs,
16272
  $redirect = true,
16273
  $auto_install = false
@@ -16278,6 +17168,10 @@
16278
  $this->disable_opt_in_notice_and_lock_user();
16279
  }
16280
 
 
 
 
 
16281
  $install_ids = array();
16282
 
16283
  foreach ( $installs as $install ) {
@@ -16387,6 +17281,8 @@
16387
  */
16388
  $license_key = fs_request_get( 'license_secret_key' );
16389
 
 
 
16390
  $this->install_with_current_user( $license_key );
16391
  }
16392
  }
@@ -16586,10 +17482,15 @@
16586
  * @author Vova Feldman (@svovaf)
16587
  * @since 1.0.6
16588
  *
16589
- * @param Freemius $parent_fs
16590
- * @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.
 
16591
  */
16592
- private function _activate_addon_account( Freemius $parent_fs, $network_level_or_blog_id = null ) {
 
 
 
 
16593
  if ( $this->is_registered() ) {
16594
  // Already activated.
16595
  return;
@@ -16628,6 +17529,10 @@
16628
  }
16629
  }
16630
 
 
 
 
 
16631
  // Activate add-on with parent plugin credentials.
16632
  $result = $parent_fs->get_api_site_scope()->call(
16633
  "/addons/{$this->_plugin->id}/installs.json",
@@ -16636,16 +17541,25 @@
16636
  );
16637
 
16638
  if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
16639
- $error_message = FS_Api::is_api_error_object( $result ) ?
16640
- $result->error->message :
16641
- $this->get_text_inline( 'An unknown error has occurred.', 'unknown-error' );
 
 
 
 
 
 
 
 
16642
 
16643
- $this->_admin_notices->add(
16644
- sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
16645
- $this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $error_message . '</b>',
16646
- $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
16647
- 'error'
16648
- );
 
16649
 
16650
  return;
16651
  }
@@ -16678,21 +17592,29 @@
16678
 
16679
  if ( ! fs_is_network_admin() ) {
16680
  // Try to activate premium license.
16681
- $this->_activate_license( true );
16682
- } else {
16683
- $license_id = fs_request_get( 'license_id' );
16684
 
16685
- if ( is_object( $this->_site ) &&
16686
- FS_Plugin_License::is_valid_id( $license_id ) &&
16687
- $license_id == $this->_site->license_id
16688
- ) {
16689
- // License is already activated.
16690
- return;
16691
  }
 
 
 
 
 
16692
 
16693
- $premium_license = FS_Plugin_License::is_valid_id( $license_id ) ?
16694
- $this->_get_license_by_id( $license_id ) :
16695
- $this->_get_available_premium_license();
 
 
 
 
 
 
 
 
 
16696
 
16697
  if ( is_object( $premium_license ) ) {
16698
  $this->maybe_network_activate_addon_license( $premium_license );
@@ -18100,23 +19022,27 @@
18100
 
18101
  $sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );
18102
 
18103
- $prev_stored_user_id = $this->_storage->get( 'prev_user_id', false, $network_level_or_blog_id );
 
18104
 
18105
- if ( empty( $prev_stored_user_id ) &&
18106
- is_object($this->_user) && $this->_user->id != $site->user_id
18107
- ) {
18108
- /**
18109
- * Store the current user ID as the previous user ID so that the previous user can be used
18110
- * as the install's owner while the new owner's details are not yet available.
18111
- *
18112
- * This will be executed only in the `replica` site. For example, there are 2 sites, namely `original`
18113
- * and `replica`, then an ownership change was initiated and completed in the `original`, the `replica`
18114
- * will be using the previous user until it is updated again (e.g.: until the next clone of `original`
18115
- * into `replica`.
18116
- *
18117
- * @author Leo Fajardo (@leorw)
18118
- */
18119
- $this->_storage->store( 'prev_user_id', $sites[ $this->_slug ]->user_id, $network_level_or_blog_id );
 
 
 
18120
  }
18121
 
18122
  $sites[ $this->_slug ] = $site_clone;
@@ -18986,9 +19912,11 @@
18986
  *
18987
  * @author Vova Feldman (@svovaf)
18988
  * @since 1.2.1
 
 
18989
  */
18990
- function has_active_valid_license() {
18991
- return self::is_active_valid_license( $this->_license );
18992
  }
18993
 
18994
  /**
@@ -19080,15 +20008,16 @@
19080
  * @since 2.1.3
19081
  *
19082
  * @param FS_Plugin_License $license
 
19083
  *
19084
  * @return bool
19085
  */
19086
- private static function is_active_valid_license( $license ) {
19087
  return (
19088
  is_object( $license ) &&
19089
  FS_Plugin_License::is_valid_id( $license->id ) &&
19090
  $license->is_active() &&
19091
- $license->is_valid()
19092
  );
19093
  }
19094
 
@@ -19142,6 +20071,22 @@
19142
  );
19143
  }
19144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19145
  /**
19146
  * Check if user is a trial or have feature enabled license.
19147
  *
@@ -19948,7 +20893,11 @@
19948
 
19949
  if ( $show_notice ) {
19950
  $this->_admin_notices->add(
19951
- sprintf( $this->get_text_inline( 'Your license was successfully deactivated, you are back to the %s plan.', 'license-deactivation-message' ), $this->get_plan_title() ),
 
 
 
 
19952
  $this->get_text_inline( 'O.K', 'ok' )
19953
  );
19954
  }
@@ -20453,7 +21402,7 @@
20453
  */
20454
  private function get_latest_download_link( $label, $plugin_id = false ) {
20455
  return sprintf(
20456
- '<a target="_blank" href="%s">%s</a>',
20457
  $this->_get_latest_download_local_url( $plugin_id ),
20458
  $label
20459
  );
@@ -20524,7 +21473,7 @@
20524
  $this->get_text_inline( 'Version %s was released.', 'version-x-released' ) . ' ' . $this->get_text_inline( 'Please download %s.', 'please-download-x' ),
20525
  $update->version,
20526
  sprintf(
20527
- '<a href="%s" target="_blank">%s</a>',
20528
  $this->get_account_url( 'download_latest' ),
20529
  sprintf(
20530
  /* translators: %s: plan name (e.g. latest "Professional" version) */
@@ -20755,6 +21704,39 @@
20755
  return true;
20756
  }
20757
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20758
  /**
20759
  * Handle user name update.
20760
  *
@@ -20923,8 +21905,9 @@
20923
  // Alias.
20924
  $oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
20925
 
20926
- $is_network_action = $this->is_network_level_action();
20927
- $blog_id = $this->is_network_level_site_specific_action();
 
20928
 
20929
  if ( is_numeric( $blog_id ) ) {
20930
  $this->switch_to_blog( $blog_id );
@@ -20936,7 +21919,7 @@
20936
  case 'opt_in':
20937
  check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
20938
 
20939
- if ( $plugin_id == $this->get_id() ) {
20940
  if ( $is_network_action && ! empty( $blog_id ) ) {
20941
  if ( ! $this->is_registered() ) {
20942
  $this->install_with_user(
@@ -20959,7 +21942,7 @@
20959
  case 'toggle_tracking':
20960
  check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
20961
 
20962
- if ( $plugin_id == $this->get_id() ) {
20963
  if ( $is_network_action && ! empty( $blog_id ) ) {
20964
  if ( $this->is_registered() ) {
20965
  if ( $this->is_tracking_prohibited() ) {
@@ -20977,7 +21960,7 @@
20977
  $this->get_plugin_title(),
20978
  fs_strip_url_protocol( get_site_url( $blog_id ) ),
20979
  sprintf(
20980
- '<a href="%s" target="_blank">%s</a>',
20981
  'https://freemius.com',
20982
  'freemius.com'
20983
  )
@@ -20994,8 +21977,20 @@
20994
  case 'delete_account':
20995
  check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
20996
 
20997
- if ( $plugin_id == $this->get_id() ) {
20998
- if ( $is_network_action && empty( $blog_id ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
20999
  $this->delete_network_account_event();
21000
  } else {
21001
  $this->delete_account_event();
@@ -21011,7 +22006,12 @@
21011
  } else {
21012
  if ( $this->is_addon_activated( $plugin_id ) ) {
21013
  $fs_addon = self::get_instance_by_id( $plugin_id );
21014
- $fs_addon->delete_account_event();
 
 
 
 
 
21015
 
21016
  fs_redirect( $this->_get_admin_page_url( 'account' ) );
21017
  }
@@ -21059,6 +22059,18 @@
21059
 
21060
  if ( is_object( $fs ) ) {
21061
  $fs->_activate_license();
 
 
 
 
 
 
 
 
 
 
 
 
21062
  }
21063
 
21064
  return;
@@ -21417,6 +22429,86 @@
21417
  }
21418
  }
21419
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21420
  #----------------------------------------------------------------------------------
21421
  #region Contact Us
21422
  #----------------------------------------------------------------------------------
@@ -21645,6 +22737,43 @@
21645
  $this->get_api_plugin_scope();
21646
  }
21647
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21648
  /**
21649
  * Show trial promotional notice (if any trial exist).
21650
  *
@@ -22154,9 +23283,18 @@
22154
 
22155
  $this->_logger->entrance();
22156
 
22157
- if ( $this->is_premium() ) {
 
 
 
 
22158
  // Don't add opt-in/out for premium code base.
22159
  return;
 
 
 
 
 
22160
  }
22161
 
22162
  if ( fs_is_network_admin() ) {
@@ -22189,14 +23327,18 @@
22189
  return;
22190
  }
22191
 
22192
- if ( $this->is_registered() && $this->is_tracking_allowed() ) {
22193
- if ( ! $this->is_enable_anonymous() ) {
22194
- // If opted in and tracking is allowed, don't allow to opt out if anonymous mode is disabled.
22195
- return;
22196
- }
 
 
 
22197
 
22198
- if ( ! $this->is_free_plan() ) {
22199
- // Don't allow to opt out if running in paid plan.
 
22200
  return;
22201
  }
22202
  }
@@ -22209,6 +23351,10 @@
22209
  return;
22210
  }
22211
 
 
 
 
 
22212
  $link_text_id = '';
22213
  $url = '#';
22214
 
@@ -22272,7 +23418,7 @@
22272
  if ( ! empty( $this->_dynamically_added_top_level_page_hook_name ) ) {
22273
  if ( $this->is_network_registered() ) {
22274
  $page = 'account';
22275
- } else if ( $this->is_network_anonymous() ) {
22276
  $this->maybe_set_slug_and_network_menu_exists_flag();
22277
  }
22278
  }
@@ -22350,7 +23496,7 @@
22350
 
22351
  foreach ( $this->_action_links as $new_links ) {
22352
  foreach ( $new_links as $link ) {
22353
- $before_deactivate[ $link['key'] ] = '<a href="' . $link['href'] . '"' . ( $link['external'] ? ' target="_blank"' : '' ) . '>' . $link['label'] . '</a>';
22354
  }
22355
  }
22356
 
@@ -22470,7 +23616,7 @@
22470
  '';
22471
 
22472
  return sprintf(
22473
- ' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
22474
  $this->get_text_inline( 'Please follow these steps to complete the upgrade', 'follow-steps-to-complete-upgrade' ),
22475
  ( empty( $activate_license_string ) ? '' : $activate_license_string . '</li><li>' ) .
22476
  $this->get_latest_download_link( sprintf(
@@ -22723,6 +23869,14 @@
22723
  */
22724
  function set_plugin_upgrade_complete() {
22725
  $this->_storage->plugin_upgrade_mode = false;
 
 
 
 
 
 
 
 
22726
  }
22727
 
22728
  #endregion
@@ -23863,10 +25017,45 @@
23863
  *
23864
  * @author Vova Feldman (@svovaf)
23865
  */
23866
- self::shoot_ajax_success( array( 'is_marketing_allowed' => null ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23867
  }
23868
 
23869
- self::shoot_ajax_success( array( 'is_marketing_allowed' => $user_plugins[0]->is_marketing_allowed ) );
23870
  }
23871
 
23872
  /**
351
  */
352
  private $is_whitelabeled;
353
 
354
+ /**
355
+ * @author Leo Fajardo (@leorw)
356
+ * @since 2.4.0
357
+ *
358
+ * @var bool
359
+ */
360
+ private $_is_bundle_license_auto_activation_enabled = false;
361
+
362
  #region Uninstall Reasons IDs
363
 
364
  const REASON_NO_LONGER_NEEDED = 1;
377
  const REASON_DIDNT_WORK_AS_EXPECTED = 14;
378
  const REASON_TEMPORARY_DEACTIVATION = 15;
379
 
380
+ /**
381
+ * @author Leo Fajardo (@leorw)
382
+ * @since 2.3.1
383
+ *
384
+ * @var boolean|null
385
+ */
386
+ private $_use_external_pricing = null;
387
+
388
  #endregion
389
 
390
  /* Ctor
832
  return false;
833
  }
834
 
835
+ if (
836
+ ! $is_tabs_visibility_check &&
837
+ $this->is_org_repo_compliant() &&
838
+ $this->show_settings_with_tabs()
839
+ ) {
840
  /**
841
  * wp.org themes are limited to a single submenu item, and
842
  * sub-submenu items are most likely not allowed (never verified).
1477
  if ( $this->is_plugin() &&
1478
  ! isset( $this->_storage->is_plugin_new_install )
1479
  ) {
1480
+ $this->_storage->is_plugin_new_install = (
1481
+ ! is_plugin_active( $this->_plugin_basename ) &&
1482
+ empty( $this->_storage->plugin_last_version )
1483
+ );
1484
  }
1485
  }
1486
 
1503
  -1 < settings.url.indexOf('admin-ajax.php') &&
1504
  ! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
1505
  ) {
1506
+ if (
1507
+ 'string' === typeof settings.data &&
1508
+ settings.data.indexOf( 'action=heartbeat' ) > 0
1509
+ ) {
1510
+ return;
1511
+ }
1512
+
1513
  if (settings.url.indexOf('?') > 0) {
1514
  settings.url += '&';
1515
  } else {
1517
  }
1518
 
1519
  settings.url += '<?php echo $admin_param ?>=true';
 
1520
  }
1521
  });
1522
  })(jQuery);
1534
  ?>
1535
  <script type="text/javascript">
1536
  (function ($) {
1537
+ $('.fs-submenu-item.wp-support-forum').parent().attr( { target: '_blank', rel: 'noopener noreferrer' } );
1538
  })(jQuery);
1539
  </script>
1540
  <?php
1630
  }
1631
 
1632
  add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
1633
+ add_action( 'init', array( &$this, '_maybe_add_pricing_ajax_handler' ) );
1634
  }
1635
 
1636
  if ( $this->is_plugin() ) {
1662
 
1663
  add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
1664
 
1665
+ if ( $this->is_theme() && ! $this->is_migration() ) {
1666
  add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
1667
  }
1668
 
1669
  add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1670
  add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1671
  add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
1672
+ add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
1673
 
1674
  $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1675
  $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
2036
  * @since 2.0.0
2037
  */
2038
  function _hook_action_links_and_register_account_hooks() {
2039
+ if ( $this->is_migration() ) {
2040
+ return;
2041
+ }
2042
+
2043
  $this->_add_tracking_links();
2044
 
2045
  if ( self::is_plugins_page() && $this->is_plugin() ) {
2220
  );
2221
 
2222
  $store_option = true;
2223
+ } else if (
2224
+ isset( $id_slug_type_path_map[ $module_id ]['slug'] ) &&
2225
+ $slug !== $id_slug_type_path_map[ $module_id ]['slug']
2226
+ ) {
2227
+ $id_slug_type_path_map[ $module_id ]['slug'] = $slug;
2228
+ $store_option = true;
2229
  }
2230
 
2231
  if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
4299
  )
4300
  ),
4301
  sprintf(
4302
+ '<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
4303
  sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4304
  $install_previous_title,
4305
  $install_previous_desc
4406
  )
4407
  ),
4408
  sprintf(
4409
+ '<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
4410
  sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
4411
  $install_previous_title,
4412
  $install_previous_desc
4927
  } else {
4928
  $is_network_admin = fs_is_network_admin();
4929
 
4930
+ if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4931
+ // If add-on activated and parent not, automatically install parent for the user.
4932
+ $this->activate_parent_account( $this->_parent );
4933
+ } else if (
4934
  $this->_parent->is_registered() &&
4935
  ! $this->is_registered() &&
 
4936
  /**
4937
  * If not registered for add-on and the following conditions for the add-on are met, activate add-on account.
4938
  * * Network active and in network admin - network activate add-on account.
4946
  */
4947
  ( $this->is_network_active() || ! $is_network_admin )
4948
  ) {
4949
+ $premium_license = null;
4950
+
4951
+ if (
4952
+ ! $this->has_free_plan() &&
4953
+ $this->is_bundle_license_auto_activation_enabled() &&
4954
+ $this->_parent->is_activated_with_bundle_license()
4955
+ ) {
4956
+ /**
4957
+ * If the add-on has no free plan, try to activate the account only when there's a bundle license.
4958
+ *
4959
+ * @author Leo Fajardo (@leorw)
4960
+ * @since 2.4.0
4961
+ */
4962
+ $bundle_license = $this->get_active_parent_license( $this->_parent->_get_license()->secret_key, false );
4963
+
4964
+ if (
4965
+ is_object( $bundle_license ) &&
4966
+ ! empty( $bundle_license->products ) &&
4967
+ in_array( $this->get_id(), $bundle_license->products )
4968
+ ) {
4969
+ $premium_license = $bundle_license;
4970
+ }
4971
+ }
4972
+
4973
+ if ( $this->has_free_plan() || is_object( $premium_license) ) {
4974
+ // If parent plugin activated, automatically install add-on for the user.
4975
+ $this->_activate_addon_account(
4976
+ $this->_parent,
4977
+ ( $this->is_network_active() && $is_network_admin ) ?
4978
+ true :
4979
+ get_current_blog_id(),
4980
+ $premium_license
4981
+ );
4982
+ }
4983
  }
4984
 
4985
  // @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
5474
  }
5475
  }
5476
 
5477
+ /**
5478
+ * @author Vova Feldman (@svovaf)
5479
+ * @since 2.3.2
5480
+ *
5481
+ * @return bool
5482
+ */
5483
+ function is_extensions_tracking_allowed() {
5484
+ return ( true === $this->apply_filters(
5485
+ 'is_extensions_tracking_allowed',
5486
+ $this->_storage->get( 'is_extensions_tracking_allowed', true )
5487
+ ) );
5488
+ }
5489
+
5490
+ /**
5491
+ * @author Vova Feldman (@svovaf)
5492
+ * @since 2.3.2
5493
+ */
5494
+ function _update_tracking_permission_callback() {
5495
+ $this->_logger->entrance();
5496
+
5497
+ $this->check_ajax_referer( 'update_tracking_permission' );
5498
+
5499
+ $is_enabled = fs_request_get_bool( 'is_enabled', null );
5500
+
5501
+ if ( ! is_bool( $is_enabled ) ) {
5502
+ self::shoot_ajax_failure();
5503
+ }
5504
+
5505
+ $permission = fs_request_get( 'permission' );
5506
+
5507
+ switch ( $permission ) {
5508
+ case 'extensions':
5509
+ $this->update_extensions_tracking_flag( $is_enabled );
5510
+ break;
5511
+ default:
5512
+ $permission = 'no_match';
5513
+ }
5514
+
5515
+ if ( 'no_match' === $permission ) {
5516
+ self::shoot_ajax_failure();
5517
+ }
5518
+
5519
+ self::shoot_ajax_success( array(
5520
+ 'permissions' => array(
5521
+ $permission => $is_enabled,
5522
+ )
5523
+ ) );
5524
+ }
5525
+
5526
+ /**
5527
+ * @author Leo Fajardo (@leorw)
5528
+ * @since 2.3.2
5529
+ *
5530
+ * @param bool $is_enabled
5531
+ */
5532
+ private function update_extensions_tracking_flag( $is_enabled ) {
5533
+ $this->_storage->store( 'is_extensions_tracking_allowed', $is_enabled );
5534
+ }
5535
+
5536
  /**
5537
  * Parse plugin's settings (as defined by the plugin dev).
5538
  *
5670
  $this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
5671
  }
5672
  $this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
5673
+ $this->_is_bundle_license_auto_activation_enabled = $this->get_option( $plugin_info, 'bundle_license_auto_activation', false );
5674
 
5675
  if ( ! empty( $plugin_info['trial'] ) ) {
5676
  $this->_trial_days = $this->get_numeric_option(
6042
  * @return Freemius[]
6043
  */
6044
  function get_installed_addons() {
6045
+ if ( $this->is_addon() ) {
6046
+ // Add-on cannot have add-ons.
6047
+ return array();
6048
+ }
6049
+
6050
  $installed_addons = array();
6051
+
6052
  foreach ( self::$_instances as $instance ) {
6053
+ if ( $instance->is_addon_of( $this->_plugin->id ) ) {
6054
+ $installed_addons[] = $instance;
 
 
6055
  }
6056
  }
6057
 
6101
  * @return bool
6102
  */
6103
  function is_addon() {
6104
+ return (
6105
+ isset( $this->_plugin->parent_plugin_id ) &&
6106
+ is_numeric( $this->_plugin->parent_plugin_id )
6107
+ );
6108
+ }
6109
+
6110
+ /**
6111
+ * @author Vova Feldman (@svovaf)
6112
+ * @since 2.3.2
6113
+ *
6114
+ * @param number $parent_product_id
6115
+ *
6116
+ * @return bool
6117
+ */
6118
+ function is_addon_of( $parent_product_id ) {
6119
+ return (
6120
+ $this->is_addon() &&
6121
+ $parent_product_id == $this->_plugin->parent_plugin_id
6122
+ );
6123
  }
6124
 
6125
  /**
6876
  } else {
6877
  $this->sync_install();
6878
  }
6879
+
6880
+ $this->maybe_sync_install_user();
6881
  }
6882
  }
6883
  }
7090
  } else {
7091
  $this->sync_install( array(), true );
7092
  }
7093
+
7094
+ $this->maybe_sync_install_user();
7095
  }
7096
  }
7097
 
7148
  * @since 1.0.7
7149
  */
7150
  function _admin_init_action() {
7151
+ $is_migration = $this->is_migration();
7152
+
7153
  /**
7154
  * Automatically redirect to connect/activation page after plugin activation.
7155
  *
7162
  /**
7163
  * Don't redirect if activating multiple plugins at once (bulk activation).
7164
  */
7165
+ } else if ( ! $is_migration ) {
7166
  $this->_redirect_on_activation_hook();
7167
  return;
7168
  }
7169
  }
7170
 
7171
+ if ( $is_migration ) {
7172
+ return;
7173
+ }
7174
+
7175
  if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
7176
  check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
7177
 
7202
  )
7203
  ) {
7204
  if ( ! $this->is_pending_activation() ) {
7205
+ if ( ! $this->is_activation_page() ) {
7206
  /**
7207
  * If a user visits any other admin page before activating the premium-only theme with a valid
7208
  * license, reactivate the previous theme.
7845
  $this->_storage->is_plugin_new_install = empty( $this->_storage->plugin_last_version );
7846
  }
7847
 
7848
+ /**
7849
+ * Also flush when activating the premium version so that even if Freemius was off before, the API
7850
+ * connectivity test can be run again.
7851
+ *
7852
+ * @author Leo Fajardo (@leorw)
7853
+ * @since 2.2.3.1
7854
+ */
7855
+ $has_api_connectivity = $this->has_api_connectivity( WP_FS__DEV_MODE || $is_premium_version_activation );
7856
+
7857
  if ( ! $this->_anonymous_mode &&
7858
+ $has_api_connectivity &&
7859
  ! $this->_isAutoInstall
7860
  ) {
7861
  // Store hint that the plugin was just activated to enable auto-redirection to settings.
7888
  return;
7889
  }
7890
 
7891
+ $license = $this->get_active_parent_license();
7892
  if ( ! is_object( $license ) ) {
7893
  return;
7894
  }
7895
 
7896
+ if (
7897
+ $this->is_bundle_license_auto_activation_enabled() &&
7898
+ ! empty( $license->products )
7899
+ ) {
7900
+ $this->activate_bundle_license( $license );
7901
+
7902
+ return;
7903
+ }
7904
+
7905
  if ( ! $this->is_registered() ) {
7906
  // Opt in with a license key.
7907
  $this->opt_in(
7924
  }
7925
  }
7926
 
 
7927
  /**
7928
  * @author Leo Fajardo (@leorw)
7929
  * @since 2.3.0
7939
 
7940
  $license = ( ! is_null( $license ) ) ?
7941
  $license :
7942
+ $this->get_active_parent_license();
7943
 
7944
  if ( ! is_object( $license ) ) {
7945
  return;
7946
  }
7947
 
7948
+ if (
7949
+ $this->is_bundle_license_auto_activation_enabled() &&
7950
+ ! empty( $license->products )
7951
+ ) {
7952
+ $this->activate_bundle_license( $license );
7953
+
7954
+ return;
7955
+ }
7956
+
7957
  if ( ! $this->is_network_registered() ) {
7958
  $sites = $this->get_sites_for_network_level_optin();
7959
 
8017
  }
8018
 
8019
  /**
8020
+ * Tries to activate a bundle license for all supported products if the current product is activated with a bundle license. This is called after activating an available license (not via the license activation dialog but by clicking on a license activation button) for a product via its "Account" page.
8021
+ *
8022
+ * @author Leo Fajardo (@leorw)
8023
+ * @since 2.4.0
8024
+ *
8025
+ * @param FS_Plugin_License $license
8026
+ * @param array $sites
8027
+ * @param int $blog_id
8028
+ */
8029
+ private function maybe_activate_bundle_license( FS_Plugin_License $license = null, $sites = array(), $blog_id = 0 ) {
8030
+ if ( ! is_object( $license ) && $this->has_active_valid_license() ) {
8031
+ $license = $this->_license;
8032
+ }
8033
+
8034
+ if ( ! is_object( $license ) ) {
8035
+ return;
8036
+ }
8037
+
8038
+ $parent_license = ( ! empty( $license->products ) ) ?
8039
+ $license :
8040
+ $this->get_active_parent_license( $license->secret_key );
8041
+
8042
+ if ( is_object( $parent_license ) ) {
8043
+ $this->activate_bundle_license( $parent_license, $sites, $blog_id );
8044
+ }
8045
+ }
8046
+
8047
+ /**
8048
+ * Try to activate a bundle license for all the bundle products installed on the site.
8049
+ * (1) If a child product install already has a license, the bundle license won't be activated.
8050
+ * (2) On multi-site networks, if the attempt to activate the bundle license is triggered from the network admin, the bundle license activation will only work for non-delegated sites and only if none of them is associated with a license. Even if one of the sites has the product installed with a license key, skip the bundle license activation for the product.
8051
+ * (3) On multi-site networks, if the attempt to activate the bundle license is triggered from a site-level admin, only activate the license if the product is site-level activated or delegated, and the product installation is not yet associated with a license.
8052
+ *
8053
+ * @author Leo Fajardo (@leorw)
8054
+ * @since 2.4.0
8055
+ *
8056
+ * @param FS_Plugin_License $license
8057
+ * @param array $sites
8058
+ * @param int $current_blog_id
8059
+ */
8060
+ private function activate_bundle_license( $license, $sites = array(), $current_blog_id = 0 ) {
8061
+ $is_network_admin = fs_is_network_admin();
8062
+
8063
+ $installs_by_blog_map = array();
8064
+ $site_info_by_blog_map = array();
8065
+
8066
+ /**
8067
+ * Try to activate the license for all supported products.
8068
+ *
8069
+ * @author Leo Fajardo
8070
+ */
8071
+ foreach ( $license->products as $product_id ) {
8072
+ $fs = self::get_instance_by_id( $product_id );
8073
+
8074
+ if ( ! is_object( $fs ) ) {
8075
+ continue;
8076
+ }
8077
+
8078
+ if ( ! $fs->has_paid_plan() ) {
8079
+ continue;
8080
+ }
8081
+
8082
+ if (
8083
+ ! $fs->is_addon() &&
8084
+ ! FS_Plan_Manager::instance()->has_paid_plan( $fs->_plans )
8085
+ ) {
8086
+ /**
8087
+ * The parent product can be free-only but can have its `has_paid_plan` flag set to `true` when
8088
+ * there is a context bundle.
8089
+ */
8090
+ continue;
8091
+ }
8092
+
8093
+ if ( $current_blog_id > 0 ) {
8094
+ $fs->switch_to_blog( $current_blog_id );
8095
+ }
8096
+
8097
+ if ( $fs->has_active_valid_license() ) {
8098
+ continue;
8099
+ }
8100
+
8101
+ if ( ! $is_network_admin || $current_blog_id > 0 ) {
8102
+ if ( $fs->is_network_active() && ! $fs->is_delegated_connection( $current_blog_id ) ) {
8103
+ // Do not try to activate the license in the site level if the product is network active and the connection was not delegated.
8104
+ continue;
8105
+ }
8106
+ } else {
8107
+ if ( ! $fs->is_network_active() ) {
8108
+ // Do not try to activate the license in the network level if the product is not network active.
8109
+ continue;
8110
+ }
8111
+
8112
+ if ( $fs->is_network_delegated_connection() ) {
8113
+ // Do not try to activate the license in the network level if the activation has been delegated to site admins.
8114
+ continue;
8115
+ }
8116
+
8117
+ $has_install_with_license = false;
8118
+
8119
+ // Collection of sites that have an install entity that is not activated with a license or non-delegated sites that have no install entity, or both types of site.
8120
+ $filtered_sites = array();
8121
+
8122
+ if ( empty( $sites ) ) {
8123
+ $all_sites = self::get_sites();
8124
+
8125
+ foreach ( $all_sites as $site ) {
8126
+ $sites[] = array( 'blog_id' => self::get_site_blog_id( $site ) );
8127
+ }
8128
+ } else {
8129
+ // Populate the map here to avoid calling `$fs->get_site_info( $site );` in the other `for` loop below.
8130
+ foreach ( $sites as $site ) {
8131
+ if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
8132
+ continue;
8133
+ }
8134
+
8135
+ $site_info_by_blog_map[ $site['blog_id'] ] = $site;
8136
+ }
8137
+ }
8138
+
8139
+ foreach ( $sites as $site ) {
8140
+ if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
8141
+ continue;
8142
+ }
8143
+
8144
+ $blog_id = $site['blog_id'];
8145
+
8146
+ if ( ! isset( $installs_by_blog_map[ $blog_id ] ) ) {
8147
+ $installs_by_blog_map[ $blog_id ] = self::get_all_sites( $fs->get_module_type(), $blog_id );
8148
+ }
8149
+
8150
+ $installs = $installs_by_blog_map[ $blog_id ];
8151
+ $install = null;
8152
+
8153
+ if ( isset( $installs[ $fs->get_slug() ] ) ) {
8154
+ $install = $installs[ $fs->get_slug() ];
8155
+
8156
+ if (
8157
+ is_object( $install ) &&
8158
+ (
8159
+ ! FS_Site::is_valid_id( $install->id ) ||
8160
+ ! FS_User::is_valid_id( $install->user_id ) ||
8161
+ ! FS_Plugin_Plan::is_valid_id( $install->plan_id )
8162
+ )
8163
+ ) {
8164
+ $install = null;
8165
+ }
8166
+ }
8167
+
8168
+ if (
8169
+ is_object( $install ) &&
8170
+ FS_Plugin_License::is_valid_id( $install->license_id )
8171
+ ) {
8172
+ $has_install_with_license = true;
8173
+ break;
8174
+ }
8175
+
8176
+ if ( $fs->is_site_delegated_connection( $blog_id ) ) {
8177
+ // Site activation delegated, don't activate bundle license on the site in the network admin.
8178
+ continue;
8179
+ }
8180
+
8181
+ if ( ! isset( $site_info_by_blog_map[ $blog_id ] ) ) {
8182
+ $site_info_by_blog_map[ $blog_id ] = $fs->get_site_info( $site );
8183
+ }
8184
+
8185
+ $filtered_sites[] = $site_info_by_blog_map[ $blog_id ];
8186
+ }
8187
+
8188
+ if ( $has_install_with_license || empty( $filtered_sites ) ) {
8189
+ // Do not try to activate the license at the network level if there's any install with a license or there's no site to activate the license on.
8190
+ continue;
8191
+ }
8192
+
8193
+ $sites = $filtered_sites;
8194
+ }
8195
+
8196
+ $fs->activate_migrated_license(
8197
+ $license->secret_key,
8198
+ null,
8199
+ null,
8200
+ $sites,
8201
+ ( $current_blog_id > 0 ? $current_blog_id : null )
8202
+ );
8203
+ }
8204
+ }
8205
+
8206
+ /**
8207
+ * Returns a parent license that can be activated for the context product.
8208
+ *
8209
  * @author Leo Fajardo (@leorw)
8210
  * @since 2.3.0
8211
  *
8212
+ * @param string|null $license_key
8213
+ * @param bool $flush
8214
+ *
8215
  * @return FS_Plugin_License
8216
  */
8217
+ function get_active_parent_license( $license_key = null, $flush = true ) {
8218
  $parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
 
8219
 
8220
+ $fs = $this;
8221
+
8222
+ if ( $this->is_addon() ) {
8223
+ $parent_instance = $this->get_parent_instance();
8224
+
8225
+ if ( is_object( $parent_instance ) && $parent_instance->is_registered() ) {
8226
+ $fs = $parent_instance;
8227
+ }
8228
+ }
8229
+
8230
+ $foreign_licenses = $fs->get_foreign_licenses_info(
8231
  self::get_all_licenses( $this->get_parent_id() )
8232
  );
8233
 
8241
  $parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
8242
  }
8243
 
8244
+ $result = $fs->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, $flush );
8245
 
8246
  if (
8247
  ! $this->is_api_result_object( $result, 'licenses' ) ||
8251
  return null;
8252
  }
8253
 
8254
+ $parent_license = null;
8255
 
8256
+ if ( empty( $license_key ) ) {
8257
+ $parent_license = $result->licenses[0];
8258
+ } else {
8259
+ foreach ( $result->licenses as $license ) {
8260
+ if ( $license_key === $license->secret_key ) {
8261
+ $parent_license = $license;
8262
+ break;
8263
+ }
8264
+ }
8265
+ }
8266
+
8267
+ if ( ! is_null( $parent_license ) ) {
8268
+ $parent_license = new FS_Plugin_License( $parent_license );
8269
+ }
8270
+
8271
+ return $parent_license;
8272
  }
8273
 
8274
  /**
8407
  foreach ( $sites as $site ) {
8408
  $blog_id = self::get_site_blog_id( $site );
8409
 
8410
+ if ( $this->is_site_delegated_connection( $blog_id ) ) {
8411
+ continue;
8412
+ }
8413
+
8414
  $install_id = $this->_delete_site( true, $blog_id );
8415
 
8416
  // Clear all storage data.
9188
  $include_themes = true,
9189
  $include_blog_data = true
9190
  ) {
9191
+ if ( $this->is_extensions_tracking_allowed() ) {
9192
+ if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
9193
+ /**
9194
+ * @since 1.1.8 Also send plugin updates.
9195
+ */
9196
+ if ( $include_plugins && ! isset( $override['plugins'] ) ) {
9197
+ $plugins = $this->get_plugins_data_for_api();
9198
+ if ( ! empty( $plugins ) ) {
9199
+ $override['plugins'] = $plugins;
9200
+ }
9201
  }
9202
  }
 
9203
 
9204
+ if ( ! defined( 'WP_FS__TRACK_THEMES' ) || false !== WP_FS__TRACK_THEMES ) {
9205
+ /**
9206
+ * @since 1.1.8 Also send themes updates.
9207
+ */
9208
+ if ( $include_themes && ! isset( $override['themes'] ) ) {
9209
+ $themes = $this->get_themes_data_for_api();
9210
+ if ( ! empty( $themes ) ) {
9211
+ $override['themes'] = $themes;
9212
+ }
9213
  }
9214
  }
9215
  }
9565
  }
9566
  }
9567
 
9568
+ /**
9569
+ * Syncs the install owner's data if needed (i.e., if the install owner is different from the loaded user).
9570
+ *
9571
+ * @author Leo Fajardo (@leorw)
9572
+ * @since 2.3.2
9573
+ */
9574
+ private function maybe_sync_install_user() {
9575
+ if ( $this->_user->id == $this->_site->user_id ) {
9576
+ return;
9577
+ }
9578
+
9579
+ // Fetch user data and store if found.
9580
+ $this->sync_user_by_current_install();
9581
+ }
9582
+
9583
  /**
9584
  * Update install only if changed.
9585
  *
9863
  $fs = self::get_instance_by_file( $plugin_file );
9864
 
9865
  if ( is_object( $fs ) ) {
9866
+ $fs->remove_sdk_reference();
9867
+
9868
  self::require_plugin_essentials();
9869
 
9870
  if ( is_plugin_active( $fs->_free_plugin_basename ) ||
10426
 
10427
  $class_name = '';
10428
 
10429
+ if ( fs_starts_with( $option_name, WP_FS__MODULE_TYPE_THEME . '_' ) ) {
10430
+ $option_name = str_replace( WP_FS__MODULE_TYPE_THEME . '_', '', $option_name );
10431
+ }
10432
+
10433
  switch ( $option_name ) {
10434
  case 'plugins':
10435
  case 'themes':
10714
  return ( is_object( $this->_site ) && $this->_site->is_tracking_allowed() );
10715
  }
10716
 
10717
+ /**
10718
+ * @author Leo Fajardo (@leorw)
10719
+ * @since 2.4.0
10720
+ *
10721
+ * @return bool
10722
+ */
10723
+ function is_bundle_license_auto_activation_enabled() {
10724
+ return $this->is_addon() ?
10725
+ ( is_object( $this->_parent ) && $this->_parent->is_bundle_license_auto_activation_enabled() ) :
10726
+ $this->_is_bundle_license_auto_activation_enabled;
10727
+ }
10728
+
10729
  /**
10730
  * @author Vova Feldman (@svovaf)
10731
  * @since 1.0.4
11762
 
11763
  // Update current license.
11764
  if ( is_object( $this->_license ) ) {
11765
+ $license = $this->_get_license_by_id( $this->_license->id );
11766
+
11767
+ if ( is_object( $license ) ) {
11768
+ /**
11769
+ * `$license` can be `false` in case a user change action has just been completed and this method
11770
+ * has synced the `$this->_licenses` collection for the new user. In this case, the
11771
+ * `$this->_licenses` collection may have only the newly activated license that is associated with
11772
+ * the new user. `set_license` will eventually be called in the same request by the logic that
11773
+ * follows outside this method which will detect that the install's license has been updated, and
11774
+ * then `_update_site_license` will be called which in turn will call `set_license`.
11775
+ *
11776
+ * @author Leo Fajardo (@leorw)
11777
+ * @since 2.3.2
11778
+ */
11779
+ $this->set_license( $license );
11780
+ }
11781
  }
11782
 
11783
  return $this->_licenses;
12226
  function _update_site_license( $new_license ) {
12227
  $this->_logger->entrance();
12228
 
12229
+ /**
12230
+ * In case this call will be removed in the future, the `_sync_licenses()` method needs to be updated
12231
+ * accordingly so that it will also handle the case when an ownership change is done via license
12232
+ * activation.
12233
+ *
12234
+ * @author Leo Fajardo (@leorw)
12235
+ * @since 2.3.2
12236
+ */
12237
  $this->set_license( $new_license );
12238
 
12239
  if ( ! is_object( $new_license ) ) {
12682
  }
12683
 
12684
  $current_plan_order = - 1;
12685
+ $required_plan_order = PHP_INT_MAX;
12686
  for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
12687
  if ( $plan === $this->_plans[ $i ]->name ) {
12688
  $required_plan_order = $i;
12839
  fs_require_template( 'forms/resend-key.php', $vars );
12840
  }
12841
 
12842
+ /**
12843
+ * Returns a collection of IDs of installs that are associated with the context product and its add-ons, and activated with foreign licenses.
12844
+ *
12845
+ * @author Leo Fajardo (@leorw)
12846
+ * @since 2.3.2
12847
+ *
12848
+ * @return number[]
12849
+ */
12850
+ function get_installs_ids_with_foreign_licenses() {
12851
+ $installs = array();
12852
+
12853
+ if (
12854
+ is_object( $this->_license ) &&
12855
+ $this->_site->user_id != $this->_license->user_id
12856
+ ) {
12857
+ $installs[] = $this->_site->id;
12858
+ }
12859
+
12860
+ /**
12861
+ * Also try to get foreign licenses for the context product's add-ons.
12862
+ */
12863
+ $installs_by_slug_map = $this->get_parent_and_addons_installs_info();
12864
+
12865
+ foreach ( $installs_by_slug_map as $slug => $install_info ) {
12866
+ if ( $slug == $this->get_slug() ) {
12867
+ continue;
12868
+ }
12869
+
12870
+ $install = $install_info['install'];
12871
+ $license = $install_info['license'];
12872
+
12873
+ if (
12874
+ is_object( $license ) &&
12875
+ $install->user_id != $license->user_id
12876
+ ) {
12877
+ $installs[] = $install->id;
12878
+ }
12879
+ }
12880
+
12881
+ return $installs;
12882
+ }
12883
+
12884
+ /**
12885
+ * Displays the "Change User" dialog box when the user clicks on the "Change User" button on the "Account" page.
12886
+ *
12887
+ * @author Leo Fajardo (@leorw)
12888
+ * @since 2.3.2
12889
+ *
12890
+ * @param number[] $install_ids
12891
+ */
12892
+ function _add_user_change_dialog_box( $install_ids ) {
12893
+ $vars = array(
12894
+ 'id' => $this->_module_id,
12895
+ 'license_owners' => $this->fetch_installs_licenses_owners_data( $install_ids )
12896
+ );
12897
+
12898
+ fs_require_template( 'forms/user-change.php', $vars );
12899
+ }
12900
+
12901
  /**
12902
  * @author Leo Fajardo (@leorw)
12903
  * @since 2.3.1
13009
  * @since 1.2.0
13010
  */
13011
  function _add_license_activation() {
13012
+ if ( $this->is_migration() ) {
13013
+ return;
13014
+ }
13015
+
13016
  if ( ! $this->is_user_admin() ) {
13017
  // Only admins can activate a license.
13018
  return;
13023
  return;
13024
  }
13025
 
13026
+ if (
13027
+ $this->has_premium_version() &&
13028
+ ! $this->is_premium() &&
13029
+ /**
13030
+ * Also handle the case when an upgrade was made using the free version.
13031
+ *
13032
+ * @author Leo Fajardo (@leorw)
13033
+ * @since 2.3.2
13034
+ */
13035
+ ! is_object( $this->_get_license() )
13036
+ ) {
13037
  // Only add license activation logic to the premium version, or in case of a serviceware plugin, also in the free version.
13038
  return;
13039
  }
13060
  $this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
13061
  }
13062
 
13063
+ /**
13064
+ * Prepares page to include all required UI and logic for the "Change User" dialog.
13065
+ *
13066
+ * @author Leo Fajardo (@leorw)
13067
+ * @since 2.3.2
13068
+ */
13069
+ function _add_user_change_option() {
13070
+ if ( ! $this->should_handle_user_change() ) {
13071
+ return;
13072
+ }
13073
+
13074
+ $installs_ids_with_foreign_licenses = $this->get_installs_ids_with_foreign_licenses();
13075
+
13076
+ if ( empty( $installs_ids_with_foreign_licenses ) ) {
13077
+ // Handle user change only when the parent product or one of its add-ons is activated with a foreign license.
13078
+ return;
13079
+ }
13080
+
13081
+ // Add user change AJAX handler.
13082
+ $this->add_ajax_action( 'change_user', array( &$this, '_user_change_ajax_action' ) );
13083
+ }
13084
+
13085
+ /**
13086
+ * @author Leo Fajardo (@leorw)
13087
+ * @since 2.3.2
13088
+ */
13089
+ function should_handle_user_change() {
13090
+ if ( ! $this->is_user_admin() ) {
13091
+ // Only admins can change user.
13092
+ return false;
13093
+ }
13094
+
13095
+ if ( $this->is_addon() ) {
13096
+ return false;
13097
+ }
13098
+
13099
+ if ( ! $this->is_registered() ) {
13100
+ return false;
13101
+ }
13102
+
13103
+ if (
13104
+ $this->is_network_active() &&
13105
+ ( fs_is_network_admin() || ! $this->is_site_delegated_connection() )
13106
+ ) {
13107
+ // Handle only on site-level "Account" section for now.
13108
+ return false;
13109
+ }
13110
+
13111
+ return true;
13112
+ }
13113
+
13114
  /**
13115
  * @author Leo Fajardo (@leorw)
13116
  * @since 2.0.2
13209
  exit;
13210
  }
13211
 
13212
+ $sites = fs_is_network_admin() ?
13213
+ fs_request_get( 'sites', array(), 'post' ) :
13214
+ array();
13215
+
13216
  $result = $this->activate_license(
13217
  $license_key,
13218
+ $sites,
 
 
13219
  fs_request_get_bool( 'is_marketing_allowed', null ),
13220
  fs_request_get( 'blog_id', null ),
13221
+ fs_request_get( 'module_id', null, 'post' ),
13222
+ fs_request_get( 'user_id', null ),
13223
+ fs_request_get_bool( 'is_extensions_tracking_allowed', true )
13224
  );
13225
 
13226
+ if (
13227
+ $result['success'] &&
13228
+ $this->is_bundle_license_auto_activation_enabled()
13229
+ ) {
13230
+ $license = new FS_Plugin_License();
13231
+ $license->secret_key = $license_key;
13232
+
13233
+ $this->maybe_activate_bundle_license( $license, $sites );
13234
+ }
13235
+
13236
  echo json_encode( $result );
13237
 
13238
  exit;
13239
  }
13240
 
13241
  /**
13242
+ * User change WP AJAX handler.
13243
+ *
13244
+ * @author Leo Fajardo (@leorw)
13245
+ * @since 2.3.2
13246
+ */
13247
+ function _user_change_ajax_action() {
13248
+ $this->_logger->entrance();
13249
+
13250
+ $this->check_ajax_referer( 'change_user' );
13251
+
13252
+ $new_email_address = trim( fs_request_get( 'email_address', '' ) );
13253
+ $new_user_id = fs_request_get( 'user_id' );
13254
+
13255
+ if ( empty( $new_email_address ) && ! FS_User::is_valid_id( $new_user_id ) ) {
13256
+ self::shoot_ajax_failure( fs_text_inline( 'Invalid new user ID or email address.', 'invalid-new-user-id-or-email', $this->get_slug() ) );
13257
+ }
13258
+
13259
+ $params = array();
13260
+
13261
+ if ( ! empty( $new_email_address ) ) {
13262
+ $params['user_email'] = $new_email_address;
13263
+ } else {
13264
+ $params['user_id'] = $new_user_id;
13265
+ }
13266
+
13267
+ $installs_info_by_slug_map = $this->get_parent_and_addons_installs_info();
13268
+ $install_ids = array();
13269
+
13270
+ foreach ( $installs_info_by_slug_map as $slug => $install_info ) {
13271
+ $install_ids[ $slug ] = $install_info['install']->id;
13272
+ }
13273
+
13274
+ $params['install_ids'] = implode( ',', array_values( $install_ids ) );
13275
+
13276
+ $install = $this->get_api_site_scope()->call( $this->add_show_pending( '/' ), 'put', $params );
13277
+
13278
+ if ( FS_Api::is_api_error( $install ) ) {
13279
+ $error = '';
13280
+
13281
+ if ( is_object( $install ) ) {
13282
+ switch ( $install->error->code ) {
13283
+ case 'user_exist':
13284
+ $error = (
13285
+ $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...' .
13286
+ $this->get_text_inline( 'Sorry, we could not complete the email update. Another user with the same email is already registered.', 'user-exist-message' ) . ' ' .
13287
+ sprintf( $this->get_text_inline( 'If you would like to give up the ownership of the %s\'s account to %s click the Change Ownership button.', 'user-exist-message_ownership' ), $this->_module_type, '<b>' . $new_email_address . '</b>' ) .
13288
+ sprintf(
13289
+ '<a style="line-height: 40px;" href="%s"><button class="button button-primary">%s &nbsp;&#10140;</button></a>',
13290
+ $this->get_account_url( 'change_owner', array(
13291
+ 'state' => 'init',
13292
+ 'candidate_email' => $new_email_address
13293
+ ) ),
13294
+ $this->get_text_inline( 'Change Ownership', 'change-ownership' )
13295
+ )
13296
+ );
13297
+ break;
13298
+ }
13299
+ }
13300
+
13301
+ if ( empty( $error ) ) {
13302
+ $error = FS_Api::is_api_error_object( $install ) ?
13303
+ $install->error->message :
13304
+ var_export( $install->error, true );
13305
+ }
13306
+
13307
+ self::shoot_ajax_failure( $error );
13308
+ } else {
13309
+ if (
13310
+ // If successful ownership change.
13311
+ $this->get_user()->id != $install->user_id ||
13312
+ ! empty( $new_email_address )
13313
+ ) {
13314
+ $this->complete_ownership_change_by_license( $install->user_id, $install_ids );
13315
+ }
13316
+ }
13317
+
13318
+ self::shoot_ajax_success();
13319
+ }
13320
+
13321
+ /**
13322
+ * @author Leo Fajardo (@leorw)
13323
+ * @since 2.3.2.14
13324
+ */
13325
+ function starting_migration() {
13326
+ if ( ! empty( $this->_storage->license_migration ) ) {
13327
+ // Do not overwrite the data if already set.
13328
+ return;
13329
+ }
13330
+
13331
+ $this->_storage->license_migration = array(
13332
+ 'is_migrating' => true,
13333
+ 'start_timestamp' => time()
13334
+ );
13335
+ }
13336
+
13337
+ /**
13338
+ * @author Leo Fajardo (@leorw)
13339
+ * @since 2.3.2.14
13340
+ */
13341
+ function is_migration() {
13342
+ if ( $this->is_addon() ) {
13343
+ return $this->get_parent_instance()->is_migration();
13344
+ }
13345
+
13346
+ if ( empty( $this->_storage->license_migration ) ) {
13347
+ return false;
13348
+ }
13349
+
13350
+ if ( ! $this->_storage->license_migration['is_migrating'] ) {
13351
+ return false;
13352
+ }
13353
+
13354
+ return (
13355
+ // Return `true` if the migration is within 5 minutes from the starting time.
13356
+ ( time() - $this->_storage->license_migration['start_timestamp'] ) <= WP_FS__TIME_5_MIN_IN_SEC
13357
+ );
13358
+ }
13359
+
13360
+ /**
13361
+ *
13362
  * A helper method to activate migrated licenses. If the product is network activated and integrated, the method will network activate the license.
13363
  *
13364
  * @author Vova Feldman (@svovaf)
13367
  * @param string $license_key
13368
  * @param null|bool $is_marketing_allowed
13369
  * @param null|number $plugin_id
13370
+ * @param array $sites
13371
+ * @param int $blog_id
13372
  *
13373
  * @return array {
13374
  * @var bool $success
13381
  function activate_migrated_license(
13382
  $license_key,
13383
  $is_marketing_allowed = null,
13384
+ $plugin_id = null,
13385
+ $sites = array(),
13386
+ $blog_id = null
13387
  ) {
13388
  $this->_logger->entrance();
13389
 
13390
  $result = $this->activate_license(
13391
  $license_key,
13392
+ ( empty( $sites ) && is_null( $blog_id ) && $this->is_network_active() ) ?
13393
  $this->get_sites_for_network_level_optin() :
13394
+ $sites,
13395
  $is_marketing_allowed,
13396
+ $blog_id,
13397
  $plugin_id
13398
  );
13399
 
13403
  return $result;
13404
  }
13405
 
13406
+ /**
13407
+ * @author Leo Fajardo (@leorw)
13408
+ * @since 2.3.1
13409
+ *
13410
+ * @return string
13411
+ */
13412
+ function get_pricing_js_path() {
13413
+ return $this->apply_filters( 'freemius_pricing_js_path', WP_FS__DIR_INCLUDES . '/freemius-pricing/freemius-pricing.js' );
13414
+ }
13415
+
13416
+ /**
13417
+ * @author Leo Fajardo (@leorw)
13418
+ * @since 2.3.1
13419
+ *
13420
+ * @return bool
13421
+ */
13422
+ function should_use_external_pricing() {
13423
+ if ( is_null( $this->_use_external_pricing ) ) {
13424
+ $pricing_js_path = $this->get_pricing_js_path();
13425
+
13426
+ $this->_use_external_pricing = ( empty( $pricing_js_path ) || ! file_exists( $pricing_js_path ) );
13427
+ }
13428
+
13429
+ return $this->_use_external_pricing;
13430
+ }
13431
+
13432
  /**
13433
  * The implementation of this method was previously in `_activate_license_ajax_action()`.
13434
  *
13440
  * @param null|bool $is_marketing_allowed
13441
  * @param null|int $blog_id
13442
  * @param null|number $plugin_id
13443
+ * @param null|number $license_owner_id
13444
  *
13445
  * @return array {
13446
  * @var bool $success
13453
  $sites = array(),
13454
  $is_marketing_allowed = null,
13455
  $blog_id = null,
13456
+ $plugin_id = null,
13457
+ $license_owner_id = null,
13458
+ $is_extensions_tracking_allowed = true
13459
  ) {
13460
  $this->_logger->entrance();
13461
 
13462
  $license_key = trim( $license_key );
13463
 
13464
+ $is_network_activation_or_migration = (
13465
+ fs_is_network_admin() ||
13466
+ ( ! empty( $sites ) && $this->is_migration() )
13467
+ );
13468
+
13469
+ if ( ! $is_network_activation_or_migration ) {
13470
  // If the license activation is executed outside the context of a network admin, ignore the sites collection.
13471
  $sites = array();
13472
  }
13475
  $this :
13476
  $this->get_addon_instance( $plugin_id );
13477
 
13478
+ $this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
13479
+
13480
  $error = false;
13481
  $next_page = false;
13482
 
13495
  $user = $fs->get_current_or_network_user();
13496
  }
13497
 
13498
+ if ( $has_valid_blog_id ) {
13499
+ /**
13500
+ * If a specific blog ID was provided, activate the license only on the specific blog that is associated with the given blog ID.
13501
+ *
13502
+ * @author Leo Fajardo (@leorw)
13503
+ */
13504
+ $fs->switch_to_blog( $blog_id );
13505
+ }
13506
+
13507
  if ( is_object( $user ) ) {
13508
+ if ( $is_network_activation_or_migration && ! $has_valid_blog_id ) {
13509
  // If no specific blog ID was provided, activate the license for all sites in the network.
13510
  $blog_2_install_map = array();
13511
  $site_ids = array();
13544
  }
13545
  }
13546
  } else {
 
 
 
 
 
 
 
 
 
 
13547
  if ( $fs->is_registered() ) {
13548
  $params = array(
13549
  'license_key' => $fs->apply_filters( 'license_key', $license_key )
13550
  );
13551
 
13552
+ $install_ids = array();
13553
+
13554
+ $change_owner = FS_User::is_valid_id( $license_owner_id );
13555
+
13556
+ if ( $change_owner ) {
13557
+ $params['user_id'] = $license_owner_id;
13558
+
13559
+ $installs_info_by_slug_map = $fs->get_parent_and_addons_installs_info();
13560
+
13561
+ foreach ( $installs_info_by_slug_map as $slug => $install_info ) {
13562
+ $install_ids[ $slug ] = $install_info['install']->id;
13563
+ }
13564
+
13565
+ $params['install_ids'] = implode( ',', array_values( $install_ids ) );
13566
+ }
13567
+
13568
  $api = $fs->get_api_site_scope();
13569
 
13570
  $install = $api->call( $fs->add_show_pending( '/' ), 'put', $params );
13575
  var_export( $install->error, true );
13576
  } else {
13577
  $fs->reconnect_locally( $has_valid_blog_id );
13578
+
13579
+ if (
13580
+ $change_owner &&
13581
+ // If successful ownership change.
13582
+ $fs->get_user()->id != $install->user_id
13583
+ ) {
13584
+ $fs->complete_ownership_change_by_license( $install->user_id, $install_ids );
13585
+ }
13586
  }
13587
  } else /* ( $fs->is_addon() && $fs->get_parent_instance()->is_registered() ) */ {
13588
  $result = $fs->activate_license_on_site( $user, $license_key );
13598
  if ( empty( $error ) ) {
13599
  $fs->network_upgrade_mode_completed();
13600
 
13601
+ $fs->_user = $user;
13602
+
13603
+ if ( fs_is_network_admin() && ! $has_valid_blog_id ) {
13604
+ $fs->_site = $fs->get_network_install();
13605
+ }
13606
+
13607
  $fs->_sync_license( true, $has_valid_blog_id );
13608
 
13609
+ $this->maybe_sync_install_user();
13610
+
13611
  $next_page = $fs->is_addon() ?
13612
  $fs->get_parent_instance()->get_account_url() :
13613
+ $fs->get_after_activation_url( 'after_connect_url' );
13614
  }
13615
  } else {
13616
  $next_page = $fs->opt_in(
13628
  if ( isset( $next_page->error ) ) {
13629
  $error = $next_page->error;
13630
  } else {
13631
+ if ( $is_network_activation_or_migration ) {
13632
  /**
13633
  * Get the list of sites that were just opted-in (and license activated).
13634
  * This is an optimization for the next part below saving some DB queries.
13714
  return $result;
13715
  }
13716
 
13717
+ /**
13718
+ * @author Leo Fajardo (@leorw)
13719
+ * @since 2.3.2
13720
+ *
13721
+ * @return array {
13722
+ * @key string Product slug.
13723
+ * @value array {
13724
+ * @property FS_Site $site
13725
+ * @property FS_Plugin_License $license
13726
+ * }
13727
+ * }
13728
+ */
13729
+ private function get_parent_and_addons_installs_info() {
13730
+ $fs = $this->is_addon() ?
13731
+ $this->get_parent_instance() :
13732
+ $this;
13733
+
13734
+ $installed_addons_ids = array();
13735
+
13736
+ $installed_addons_instances = $fs->get_installed_addons();
13737
+ foreach ( $installed_addons_instances as $instance ) {
13738
+ $installed_addons_ids[] = $instance->get_id();
13739
+ }
13740
+
13741
+ $addons_ids = array_unique( array_merge(
13742
+ $installed_addons_ids,
13743
+ $fs->get_updated_account_addons()
13744
+ ) );
13745
+
13746
+ // Add parent product info.
13747
+ $installs_info_by_slug_map = array(
13748
+ $fs->get_slug() => array(
13749
+ 'install' => $fs->get_site(),
13750
+ 'license' => $fs->_get_license()
13751
+ )
13752
+ );
13753
+
13754
+ foreach ( $addons_ids as $addon_id ) {
13755
+ $is_installed = isset( $installed_addons_ids_map[ $addon_id ] );
13756
+
13757
+ $addon_info = $fs->_get_addon_info( $addon_id, $is_installed );
13758
+
13759
+ if ( ! $addon_info['is_connected'] ) {
13760
+ // Add-on is not associated with an install entity.
13761
+ continue;
13762
+ }
13763
+
13764
+ $installs_info_by_slug_map[ $addon_info['slug'] ] = array(
13765
+ 'install' => $addon_info['site'],
13766
+ 'license' => isset( $addon_info['license'] ) ?
13767
+ $addon_info['license'] :
13768
+ null
13769
+ );
13770
+ }
13771
+
13772
+ return $installs_info_by_slug_map;
13773
+ }
13774
+
13775
  /**
13776
  * @author Leo Fajardo (@leorw)
13777
  * @since 1.2.3.1
14742
  * @return bool
14743
  */
14744
  function is_user_in_admin() {
14745
+ return (
14746
+ is_admin() &&
14747
+ ! self::is_ajax() &&
14748
+ ! self::is_cron() &&
14749
+ ( 'admin-post.php' !== self::get_current_page() )
14750
+ );
14751
  }
14752
 
14753
  /**
15059
  if ( function_exists( 'get_sites' ) ) {
15060
  // For WP 4.6 and above.
15061
  return get_sites( $args );
15062
+ } else if ( function_exists( 'wp_' . 'get_sites' ) ) {
15063
  // For WP 3.7 to WP 4.5.
15064
+ /**
15065
+ * This is a hack suggested previously proposed by the TRT. Our SDK is compliant with older WP versions and we'd like to keep it that way.
15066
+ *
15067
+ * @todo Remove this hack once this false-positive error is removed from the Theme Sniffer.
15068
+ *
15069
+ * @since 2.3.3
15070
+ * @author Vova Feldman (@svovaf)
15071
+ */
15072
+ $fn = 'wp_' . 'get_sites';
15073
+ return $fn( $args );
15074
  } else {
15075
  // For WP 3.6 and below.
15076
  return get_blog_list( 0, 'all' );
15247
  * @return bool Since 2.3.1 returns if a switch was made.
15248
  */
15249
  function switch_to_blog( $blog_id, FS_Site $install = null ) {
15250
+ if ( ! is_numeric( $blog_id ) || $blog_id == $this->_context_is_network_or_blog_id ) {
15251
  return false;
15252
  }
15253
 
16224
  /**
16225
  * This is a special fault tolerance mechanism to handle a scenario that the user data is missing.
16226
  */
16227
+ $user = $this->sync_user_by_current_install();
16228
  }
16229
 
16230
  $this->_user = ( $user instanceof FS_User ) ?
16264
  * @author Vova Feldman (@svovaf)
16265
  * @since 2.0.0
16266
  *
16267
+ * @param number|null $site_user_id
16268
+ *
16269
  * @return \FS_User|mixed
16270
  */
16271
+ private function sync_user_by_current_install( $site_user_id = null ) {
16272
+ $site_user_id = FS_Site::is_valid_id( $site_user_id ) ?
16273
+ $site_user_id :
16274
+ $this->_site->user_id;
16275
+
16276
  $api = $this->get_api_site_scope();
16277
 
16278
  $uid = $this->get_anonymous_id();
16279
+ $request_path = "/users/{$site_user_id}.json?uid={$uid}";
16280
 
16281
  $result = $api->get( $request_path, false, WP_FS__TIME_10_MIN_IN_SEC );
16282
 
16634
  'http' => 402
16635
  );
16636
 
16637
+ $this->maybe_modify_api_curl_error_message( $result );
16638
+
16639
  return $result;
16640
  }
16641
 
16708
  ( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
16709
  $decoded->is_marketing_allowed :
16710
  null ),
16711
+ ( isset( $decoded->is_extensions_tracking_allowed ) && ! is_null( $decoded->is_extensions_tracking_allowed ) ?
16712
+ $decoded->is_extensions_tracking_allowed :
16713
+ null ),
16714
  $decoded->install_id,
16715
  $decoded->install_public_key,
16716
  $decoded->install_secret_key,
16724
  ( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
16725
  $decoded->is_marketing_allowed :
16726
  null ),
16727
+ ( isset( $decoded->is_extensions_tracking_allowed ) && ! is_null( $decoded->is_extensions_tracking_allowed ) ?
16728
+ $decoded->is_extensions_tracking_allowed :
16729
+ null ),
16730
  $decoded->installs,
16731
  false
16732
  );
16953
  fs_request_get( 'user_public_key' ),
16954
  fs_request_get( 'user_secret_key' ),
16955
  fs_request_get_bool( 'is_marketing_allowed', null ),
16956
+ fs_request_get_bool( 'is_extensions_tracking_allowed', null ),
16957
  $pending_sites_info['blog_ids'],
16958
  $pending_sites_info['license_key'],
16959
  $pending_sites_info['trial_plan_id']
16964
  fs_request_get( 'user_public_key' ),
16965
  fs_request_get( 'user_secret_key' ),
16966
  fs_request_get_bool( 'is_marketing_allowed', null ),
16967
+ fs_request_get_bool( 'is_extensions_tracking_allowed', null ),
16968
  fs_request_get( 'install_id' ),
16969
  fs_request_get( 'install_public_key' ),
16970
  fs_request_get( 'install_secret_key' ),
17020
  * @param string $user_public_key
17021
  * @param string $user_secret_key
17022
  * @param bool|null $is_marketing_allowed
17023
+ * @param bool|null $is_extensions_tracking_allowed Since 2.3.2
17024
  * @param number $install_id
17025
  * @param string $install_public_key
17026
  * @param string $install_secret_key
17027
  * @param bool $redirect
17028
+ * @param bool $auto_install Since 1.2.1.7 If `true` and setting up an account with a valid license, will redirect (or return a URL) to the account page with a special parameter to trigger the auto installation processes.
 
 
17029
  *
17030
  * @return string If redirect is `false`, returns the next page the user should be redirected to.
17031
  */
17034
  $user_public_key,
17035
  $user_secret_key,
17036
  $is_marketing_allowed,
17037
+ $is_extensions_tracking_allowed,
17038
  $install_id,
17039
  $install_public_key,
17040
  $install_secret_key,
17076
  $this->disable_opt_in_notice_and_lock_user();
17077
  }
17078
 
17079
+ if ( ! is_null( $is_extensions_tracking_allowed ) ) {
17080
+ $this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
17081
+ }
17082
+
17083
  return $this->setup_account(
17084
  $this->_user,
17085
  $this->_site,
17098
  * @param string $user_public_key
17099
  * @param string $user_secret_key
17100
  * @param bool|null $is_marketing_allowed
17101
+ * @param bool|null $is_extensions_tracking_allowed Since 2.3.2
17102
  * @param array $site_ids
17103
  * @param bool $license_key
17104
  * @param bool $trial_plan_id
17111
  $user_public_key,
17112
  $user_secret_key,
17113
  $is_marketing_allowed,
17114
+ $is_extensions_tracking_allowed,
17115
  $site_ids,
17116
  $license_key = false,
17117
  $trial_plan_id = false,
17123
  $this->disable_opt_in_notice_and_lock_user();
17124
  }
17125
 
17126
+ if ( ! is_null( $is_extensions_tracking_allowed ) ) {
17127
+ $this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
17128
+ }
17129
+
17130
  $sites = array();
17131
  foreach ( $site_ids as $site_id ) {
17132
  $sites[] = $this->get_site_info( array( 'blog_id' => $site_id ) );
17145
  * @param string $user_public_key
17146
  * @param string $user_secret_key
17147
  * @param bool|null $is_marketing_allowed
17148
+ * @param bool|null $is_extensions_tracking_allowed Since 2.3.2
17149
  * @param object[] $installs
17150
  * @param bool $redirect
17151
+ * @param bool $auto_install Since 1.2.1.7 If `true` and setting up an account with a valid license, will redirect (or return a URL) to the account page with a special parameter to trigger the auto installation processes.
 
 
17152
  *
17153
  * @return string If redirect is `false`, returns the next page the user should be redirected to.
17154
  */
17157
  $user_public_key,
17158
  $user_secret_key,
17159
  $is_marketing_allowed,
17160
+ $is_extensions_tracking_allowed,
17161
  array $installs,
17162
  $redirect = true,
17163
  $auto_install = false
17168
  $this->disable_opt_in_notice_and_lock_user();
17169
  }
17170
 
17171
+ if ( ! is_null( $is_extensions_tracking_allowed ) ) {
17172
+ $this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
17173
+ }
17174
+
17175
  $install_ids = array();
17176
 
17177
  foreach ( $installs as $install ) {
17281
  */
17282
  $license_key = fs_request_get( 'license_secret_key' );
17283
 
17284
+ $this->update_extensions_tracking_flag( fs_request_get_bool( 'is_extensions_tracking_allowed', true ) );
17285
+
17286
  $this->install_with_current_user( $license_key );
17287
  }
17288
  }
17482
  * @author Vova Feldman (@svovaf)
17483
  * @since 1.0.6
17484
  *
17485
+ * @param Freemius $parent_fs
17486
+ * @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.
17487
+ * @param FS_Plugin_License $bundle_license Since 2.4.0. If provided, this license will be activated for the add-on.
17488
  */
17489
+ private function _activate_addon_account(
17490
+ Freemius $parent_fs,
17491
+ $network_level_or_blog_id = null,
17492
+ FS_Plugin_License $bundle_license = null
17493
+ ) {
17494
  if ( $this->is_registered() ) {
17495
  // Already activated.
17496
  return;
17529
  }
17530
  }
17531
 
17532
+ if ( is_object( $bundle_license ) ) {
17533
+ $params['license_key'] = $bundle_license->secret_key;
17534
+ }
17535
+
17536
  // Activate add-on with parent plugin credentials.
17537
  $result = $parent_fs->get_api_site_scope()->call(
17538
  "/addons/{$this->_plugin->id}/installs.json",
17541
  );
17542
 
17543
  if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
17544
+ if ( is_object( $bundle_license ) ) {
17545
+ /**
17546
+ * When a license object is provided, it's an attempt by the SDK to activate a bundle license and not a user-initiated action, therefore, do not show any admin notice to avoid confusion (e.g.: the notice will show up just above the opt-in link). If the license activation fails, the admin will see an opt-in link instead.
17547
+ *
17548
+ * @author Leo Fajardo (@leorw)
17549
+ * @since 2.4.0
17550
+ */
17551
+ } else {
17552
+ $error_message = FS_Api::is_api_error_object( $result ) ?
17553
+ $result->error->message :
17554
+ $this->get_text_inline( 'An unknown error has occurred.', 'unknown-error' );
17555
 
17556
+ $this->_admin_notices->add(
17557
+ sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
17558
+ $this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $error_message . '</b>',
17559
+ $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
17560
+ 'error'
17561
+ );
17562
+ }
17563
 
17564
  return;
17565
  }
17592
 
17593
  if ( ! fs_is_network_admin() ) {
17594
  // Try to activate premium license.
17595
+ $this->_activate_license( true, $bundle_license );
 
 
17596
 
17597
+ if ( is_object( $bundle_license ) ) {
17598
+ $this->maybe_activate_bundle_license( $bundle_license );
 
 
 
 
17599
  }
17600
+ } else {
17601
+ if ( is_object( $bundle_license ) ) {
17602
+ $premium_license = $bundle_license;
17603
+ } else {
17604
+ $license_id = fs_request_get( 'license_id' );
17605
 
17606
+ if ( is_object( $this->_site ) &&
17607
+ FS_Plugin_License::is_valid_id( $license_id ) &&
17608
+ $license_id == $this->_site->license_id
17609
+ ) {
17610
+ // License is already activated.
17611
+ return;
17612
+ }
17613
+
17614
+ $premium_license = FS_Plugin_License::is_valid_id( $license_id ) ?
17615
+ $this->_get_license_by_id( $license_id ) :
17616
+ $this->_get_available_premium_license();
17617
+ }
17618
 
17619
  if ( is_object( $premium_license ) ) {
17620
  $this->maybe_network_activate_addon_license( $premium_license );
19022
 
19023
  $sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );
19024
 
19025
+ if ( is_object( $this->_user ) && $this->_user->id != $site->user_id ) {
19026
+ $this->sync_user_by_current_install( $site->user_id );
19027
 
19028
+ $prev_stored_user_id = $this->_storage->get( 'prev_user_id', false, $network_level_or_blog_id );
19029
+
19030
+ if ( empty( $prev_stored_user_id ) &&
19031
+ is_object($this->_user) && $this->_user->id != $site->user_id
19032
+ ) {
19033
+ /**
19034
+ * Store the current user ID as the previous user ID so that the previous user can be used
19035
+ * as the install's owner while the new owner's details are not yet available.
19036
+ *
19037
+ * This will be executed only in the `replica` site. For example, there are 2 sites, namely `original`
19038
+ * and `replica`, then an ownership change was initiated and completed in the `original`, the `replica`
19039
+ * will be using the previous user until it is updated again (e.g.: until the next clone of `original`
19040
+ * into `replica`.
19041
+ *
19042
+ * @author Leo Fajardo (@leorw)
19043
+ */
19044
+ $this->_storage->store( 'prev_user_id', $sites[ $this->_slug ]->user_id, $network_level_or_blog_id );
19045
+ }
19046
  }
19047
 
19048
  $sites[ $this->_slug ] = $site_clone;
19912
  *
19913
  * @author Vova Feldman (@svovaf)
19914
  * @since 1.2.1
19915
+ *
19916
+ * @param bool $check_expiration
19917
  */
19918
+ function has_active_valid_license( $check_expiration = true ) {
19919
+ return self::is_active_valid_license( $this->_license, $check_expiration );
19920
  }
19921
 
19922
  /**
20008
  * @since 2.1.3
20009
  *
20010
  * @param FS_Plugin_License $license
20011
+ * @param bool $check_expiration
20012
  *
20013
  * @return bool
20014
  */
20015
+ private static function is_active_valid_license( $license, $check_expiration = true ) {
20016
  return (
20017
  is_object( $license ) &&
20018
  FS_Plugin_License::is_valid_id( $license->id ) &&
20019
  $license->is_active() &&
20020
+ ( ! $check_expiration || $license->is_valid() )
20021
  );
20022
  }
20023
 
20071
  );
20072
  }
20073
 
20074
+ /**
20075
+ * Checks if the product is activated with a bundle license.
20076
+ *
20077
+ * @author Leo Fajardo (@leorw)
20078
+ * @since 2.4.0
20079
+ *
20080
+ * @return bool
20081
+ */
20082
+ function is_activated_with_bundle_license() {
20083
+ if ( ! $this->has_features_enabled_license() ) {
20084
+ return false;
20085
+ }
20086
+
20087
+ return FS_Plugin_License::is_valid_id( $this->_license->parent_license_id );
20088
+ }
20089
+
20090
  /**
20091
  * Check if user is a trial or have feature enabled license.
20092
  *
20893
 
20894
  if ( $show_notice ) {
20895
  $this->_admin_notices->add(
20896
+ sprintf( $this->is_only_premium() ?
20897
+ $this->get_text_inline( 'Your %s license was successfully deactivated.', 'license-deactivation-message_premium-only' ) :
20898
+ $this->get_text_inline( 'Your license was successfully deactivated, you are back to the %s plan.', 'license-deactivation-message' ),
20899
+ $this->get_plan_title()
20900
+ ),
20901
  $this->get_text_inline( 'O.K', 'ok' )
20902
  );
20903
  }
21402
  */
21403
  private function get_latest_download_link( $label, $plugin_id = false ) {
21404
  return sprintf(
21405
+ '<a target="_blank" rel="noopener" href="%s">%s</a>',
21406
  $this->_get_latest_download_local_url( $plugin_id ),
21407
  $label
21408
  );
21473
  $this->get_text_inline( 'Version %s was released.', 'version-x-released' ) . ' ' . $this->get_text_inline( 'Please download %s.', 'please-download-x' ),
21474
  $update->version,
21475
  sprintf(
21476
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
21477
  $this->get_account_url( 'download_latest' ),
21478
  sprintf(
21479
  /* translators: %s: plan name (e.g. latest "Professional" version) */
21704
  return true;
21705
  }
21706
 
21707
+ /**
21708
+ * Completes ownership change by license.
21709
+ *
21710
+ * @author Leo Fajardo (@leorw)
21711
+ * @since 2.3.2
21712
+ *
21713
+ * @param number $user_id
21714
+ * @param array[string]number $install_ids_by_slug_map
21715
+ *
21716
+ */
21717
+ private function complete_ownership_change_by_license( $user_id, $install_ids_by_slug_map ) {
21718
+ $this->_logger->entrance();
21719
+
21720
+ $this->sync_user_by_current_install( $user_id );
21721
+
21722
+ $result = $this->get_api_user_scope( true )->get(
21723
+ "/installs.json?install_ids=" . implode( ',', $install_ids_by_slug_map )
21724
+ );
21725
+
21726
+ if ( $this->is_api_result_object( $result, 'installs' ) ) {
21727
+ $sites = self::get_all_sites( $this->get_module_type() );
21728
+ $install_ids_by_slug_map = array_flip( $install_ids_by_slug_map );
21729
+
21730
+ foreach ( $result->installs as $install ) {
21731
+ $site = new FS_Site( $install );
21732
+
21733
+ $sites[ $install_ids_by_slug_map[ $site->id ] ] = clone $site;
21734
+ }
21735
+
21736
+ $this->set_account_option( 'sites', $sites, true );
21737
+ }
21738
+ }
21739
+
21740
  /**
21741
  * Handle user name update.
21742
  *
21905
  // Alias.
21906
  $oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
21907
 
21908
+ $is_network_action = $this->is_network_level_action();
21909
+ $blog_id = $this->is_network_level_site_specific_action();
21910
+ $is_parent_plugin_action = ( $plugin_id == $this->get_id() );
21911
 
21912
  if ( is_numeric( $blog_id ) ) {
21913
  $this->switch_to_blog( $blog_id );
21919
  case 'opt_in':
21920
  check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
21921
 
21922
+ if ( $is_parent_plugin_action ) {
21923
  if ( $is_network_action && ! empty( $blog_id ) ) {
21924
  if ( ! $this->is_registered() ) {
21925
  $this->install_with_user(
21942
  case 'toggle_tracking':
21943
  check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
21944
 
21945
+ if ( $is_parent_plugin_action ) {
21946
  if ( $is_network_action && ! empty( $blog_id ) ) {
21947
  if ( $this->is_registered() ) {
21948
  if ( $this->is_tracking_prohibited() ) {
21960
  $this->get_plugin_title(),
21961
  fs_strip_url_protocol( get_site_url( $blog_id ) ),
21962
  sprintf(
21963
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
21964
  'https://freemius.com',
21965
  'freemius.com'
21966
  )
21977
  case 'delete_account':
21978
  check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
21979
 
21980
+ $is_network_deletion = $is_network_action && empty( $blog_id );
21981
+
21982
+ if ( $is_parent_plugin_action ) {
21983
+ // Delete add-on installs if have any.
21984
+ $installed_addons = $this->get_installed_addons();
21985
+ foreach ( $installed_addons as $fs_addon ) {
21986
+ if ( $is_network_deletion ) {
21987
+ $fs_addon->delete_network_account_event();
21988
+ } else {
21989
+ $fs_addon->delete_account_event();
21990
+ }
21991
+ }
21992
+
21993
+ if ( $is_network_deletion ) {
21994
  $this->delete_network_account_event();
21995
  } else {
21996
  $this->delete_account_event();
22006
  } else {
22007
  if ( $this->is_addon_activated( $plugin_id ) ) {
22008
  $fs_addon = self::get_instance_by_id( $plugin_id );
22009
+
22010
+ if ( $is_network_deletion ) {
22011
+ $fs_addon->delete_network_account_event();
22012
+ } else {
22013
+ $fs_addon->delete_account_event();
22014
+ }
22015
 
22016
  fs_redirect( $this->_get_admin_page_url( 'account' ) );
22017
  }
22059
 
22060
  if ( is_object( $fs ) ) {
22061
  $fs->_activate_license();
22062
+
22063
+ /**
22064
+ * Remove the product ID from `$_REQUEST` so that the syncing of the license for the other products will work properly.
22065
+ *
22066
+ * @author Leo Fajardo (@leorw)
22067
+ * @since 2.4.0
22068
+ */
22069
+ unset( $_REQUEST['plugin_id'] );
22070
+
22071
+ if ( $this->is_bundle_license_auto_activation_enabled() ) {
22072
+ $fs->maybe_activate_bundle_license( null, array(), is_numeric( $blog_id ) ? $blog_id : 0 );
22073
+ }
22074
  }
22075
 
22076
  return;
22429
  }
22430
  }
22431
 
22432
+ /**
22433
+ * @author Leo Fajardo (@leorw)
22434
+ * @since 2.3.1
22435
+ */
22436
+ function _maybe_add_pricing_ajax_handler() {
22437
+ if ( ! $this->should_use_external_pricing() ) {
22438
+ $this->add_ajax_action( 'pricing_ajax_action', array( &$this, '_fs_pricing_ajax_action_handler' ) );
22439
+ }
22440
+ }
22441
+
22442
+ /**
22443
+ * @author Leo Fajardo (@leorw)
22444
+ * @since 2.3.1
22445
+ */
22446
+ function _fs_pricing_ajax_action_handler() {
22447
+ $this->check_ajax_referer( 'pricing_ajax_action' );
22448
+
22449
+ $result = null;
22450
+ $pricing_action = fs_request_get( 'pricing_action' );
22451
+
22452
+ switch ( $pricing_action ) {
22453
+ case 'fetch_pricing_data':
22454
+ $params = array(
22455
+ 'is_enriched' => true,
22456
+ 'trial' => fs_request_get_bool( 'trial' ),
22457
+ 'sandbox' => fs_request_get( 'sandbox' ),
22458
+ 's_ctx_type' => fs_request_get( 's_ctx_type' ),
22459
+ 's_ctx_id' => fs_request_get( 's_ctx_id' ),
22460
+ 's_ctx_ts' => fs_request_get( 's_ctx_ts' ),
22461
+ 's_ctx_secure' => fs_request_get( 's_ctx_secure' ),
22462
+ );
22463
+
22464
+ $bundle_id = $this->get_bundle_id();
22465
+ $bundle_public_key = $this->get_bundle_public_key();
22466
+
22467
+ $has_bundle_context = ( FS_Plugin::is_valid_id( $bundle_id ) && ! empty( $bundle_public_key ) );
22468
+
22469
+ if ( ! $has_bundle_context ) {
22470
+ $api = $this->get_api_plugin_scope();
22471
+ } else {
22472
+ $api = FS_Api::instance(
22473
+ $bundle_id,
22474
+ 'plugin',
22475
+ $bundle_id,
22476
+ $bundle_public_key,
22477
+ ! $this->is_live(),
22478
+ false,
22479
+ $this->get_sdk_version()
22480
+ );
22481
+
22482
+ $params['plugin_id'] = $this->get_id();
22483
+ $params['plugin_public_key'] = $this->get_public_key();
22484
+ }
22485
+
22486
+ $result = $api->get( 'pricing.json?' . http_build_query( $params ) );
22487
+ break;
22488
+ case 'start_trial':
22489
+ $result = $this->opt_in(
22490
+ false,
22491
+ false,
22492
+ false,
22493
+ false,
22494
+ false,
22495
+ fs_request_get( 'plan_id' )
22496
+ );
22497
+ }
22498
+
22499
+ if ( is_object( $result ) && $this->is_api_error( $result ) ) {
22500
+ $this->_logger->api_error( $result );
22501
+
22502
+ self::shoot_ajax_failure(
22503
+ isset( $result->error ) ?
22504
+ ( is_string( $result->error ) ? $result->error : $result->error->message ) :
22505
+ var_export( $result, true )
22506
+ );
22507
+ }
22508
+
22509
+ $this->shoot_ajax_success( $result );
22510
+ }
22511
+
22512
  #----------------------------------------------------------------------------------
22513
  #region Contact Us
22514
  #----------------------------------------------------------------------------------
22737
  $this->get_api_plugin_scope();
22738
  }
22739
 
22740
+ /**
22741
+ * @author Leo Fajardo (@leorw)
22742
+ * @since 2.2.3.1
22743
+ *
22744
+ * @param object $result
22745
+ */
22746
+ private function maybe_modify_api_curl_error_message( $result ) {
22747
+ if (
22748
+ 'cUrlMissing' !== $result->error->type &&
22749
+ ( 'CurlException' !== $result->error->type || CURLE_COULDNT_CONNECT != $result->error->code ) &&
22750
+ ( 'HttpRequestFailed' !== $result->error->type || false === strpos( $result->error->message, 'cURL error ' . CURLE_COULDNT_CONNECT ) )
22751
+ ) {
22752
+ return;
22753
+ }
22754
+
22755
+ $result->error->message = $this->esc_html_inline( 'We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server.', 'curl-missing-message' ) .
22756
+ ' ' .
22757
+ $this->esc_html_inline(
22758
+ sprintf(
22759
+ 'Please contact your hosting provider and ask them to whitelist %s for external connection.',
22760
+ implode(
22761
+ ', ',
22762
+ $this->apply_filters( 'api_domains', array(
22763
+ 'api.freemius.com',
22764
+ 'wp.freemius.com'
22765
+ ) )
22766
+ )
22767
+ ),
22768
+ 'connectivity-whitelist'
22769
+ ) .
22770
+ ' ' .
22771
+ sprintf(
22772
+ $this->esc_html_inline( 'Once you are done, deactivate the %s and activate it again.', 'connectivity-reactivate-module' ),
22773
+ $this->get_module_type()
22774
+ );
22775
+ }
22776
+
22777
  /**
22778
  * Show trial promotional notice (if any trial exist).
22779
  *
23283
 
23284
  $this->_logger->entrance();
23285
 
23286
+ /**
23287
+ * @author Vova Feldman (@svovaf)
23288
+ * @since 2.3.2 Allow opting out from usage-tracking for paid products too by giving the appropriate warning letting the user know the automatic updates mechanism cannot function without an ongoing connection to the licensing and updates engine.
23289
+ */
23290
+ /*if ( $this->is_premium() ) {
23291
  // Don't add opt-in/out for premium code base.
23292
  return;
23293
+ }*/
23294
+
23295
+ if ( $this->is_only_premium() && $this->is_free_plan() ) {
23296
+ // Don't add tracking links for premium-only products that were opted-in by relation (add-on or a parent product) before activating any license.
23297
+ return;
23298
  }
23299
 
23300
  if ( fs_is_network_admin() ) {
23327
  return;
23328
  }
23329
 
23330
+ if (
23331
+ $this->is_activation_mode() &&
23332
+ $this->is_premium() &&
23333
+ ! $this->is_registered()
23334
+ ) {
23335
+ // If not yet registered and running the premium code base, a license activation link will already be shown.
23336
+ return;
23337
+ }
23338
 
23339
+ if ( $this->is_registered() && $this->is_tracking_allowed() ) {
23340
+ if ( ! $this->is_premium() && ! $this->is_enable_anonymous() ) {
23341
+ // If opted in and tracking is allowed, don't allow to opt out if not premium and anonymous mode is disabled.
23342
  return;
23343
  }
23344
  }
23351
  return;
23352
  }
23353
 
23354
+ if ( $this->add_ajax_action( 'update_tracking_permission', array( &$this, '_update_tracking_permission_callback' ) ) ) {
23355
+ return;
23356
+ }
23357
+
23358
  $link_text_id = '';
23359
  $url = '#';
23360
 
23418
  if ( ! empty( $this->_dynamically_added_top_level_page_hook_name ) ) {
23419
  if ( $this->is_network_registered() ) {
23420
  $page = 'account';
23421
+ } else if ( $this->is_pending_activation() || $this->is_network_anonymous() ) {
23422
  $this->maybe_set_slug_and_network_menu_exists_flag();
23423
  }
23424
  }
23496
 
23497
  foreach ( $this->_action_links as $new_links ) {
23498
  foreach ( $new_links as $link ) {
23499
+ $before_deactivate[ $link['key'] ] = '<a href="' . $link['href'] . '"' . ( $link['external'] ? ' target="_blank" rel="noopener"' : '' ) . '>' . $link['label'] . '</a>';
23500
  }
23501
  }
23502
 
23616
  '';
23617
 
23618
  return sprintf(
23619
+ ' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank" rel="noopener">%s</a>).</li></ol>',
23620
  $this->get_text_inline( 'Please follow these steps to complete the upgrade', 'follow-steps-to-complete-upgrade' ),
23621
  ( empty( $activate_license_string ) ? '' : $activate_license_string . '</li><li>' ) .
23622
  $this->get_latest_download_link( sprintf(
23869
  */
23870
  function set_plugin_upgrade_complete() {
23871
  $this->_storage->plugin_upgrade_mode = false;
23872
+
23873
+ $license_migration = ! empty( $this->_storage->license_migration ) ?
23874
+ $this->_storage->license_migration :
23875
+ array();
23876
+
23877
+ $license_migration['is_migrating'] = false;
23878
+
23879
+ $this->_storage->license_migration = $license_migration;
23880
  }
23881
 
23882
  #endregion
25017
  *
25018
  * @author Vova Feldman (@svovaf)
25019
  */
25020
+ self::shoot_ajax_success( array(
25021
+ 'is_marketing_allowed' => null,
25022
+ 'license_owner_id' => null
25023
+ ) );
25024
+ }
25025
+
25026
+ self::shoot_ajax_success( array(
25027
+ 'is_marketing_allowed' => $user_plugins[0]->is_marketing_allowed,
25028
+ 'license_owner_id' => ( isset( $user_plugins[0]->license_owner_id ) ? $user_plugins[0]->license_owner_id : null )
25029
+ ) );
25030
+ }
25031
+
25032
+ /**
25033
+ * @author Leo Fajardo (@leorw)
25034
+ * @since 2.3.2
25035
+ *
25036
+ * @param number[] $install_ids
25037
+ *
25038
+ * @return array {
25039
+ * An array of objects containing the installs' licenses owners data.
25040
+ *
25041
+ * @property number $id User ID.
25042
+ * @property string $email User email (can be masked email).
25043
+ * }
25044
+ */
25045
+ private function fetch_installs_licenses_owners_data( $install_ids ) {
25046
+ $this->_logger->entrance();
25047
+
25048
+ $response = $this->get_api_user_scope()->get(
25049
+ '/licenses_owners.json?install_ids=' . implode( ',', $install_ids )
25050
+ );
25051
+
25052
+ $license_owners = null;
25053
+
25054
+ if ( $this->is_api_result_object( $response, 'owners' ) ) {
25055
+ $license_owners = $response->owners;
25056
  }
25057
 
25058
+ return $license_owners;
25059
  }
25060
 
25061
  /**
freemius/includes/class-fs-api.php CHANGED
@@ -287,7 +287,7 @@
287
  $this->_logger->warn( 'Fallback to cached API result: ' . var_export( $cached_result, true ) );
288
  }
289
  } else {
290
- if ( is_object( $result ) && 404 == $result->error->http ) {
291
  /**
292
  * If the response code is 404, cache the result for half of the `$expiration`.
293
  *
287
  $this->_logger->warn( 'Fallback to cached API result: ' . var_export( $cached_result, true ) );
288
  }
289
  } else {
290
+ if ( is_object( $result ) && isset( $result->error->http ) && 404 == $result->error->http ) {
291
  /**
292
  * If the response code is 404, cache the result for half of the `$expiration`.
293
  *
freemius/includes/class-fs-plugin-updater.php CHANGED
@@ -240,6 +240,12 @@
240
  * @since 2.0.0
241
  */
242
  private function add_transient_filters() {
 
 
 
 
 
 
243
  add_filter( 'pre_set_site_transient_update_plugins', array(
244
  &$this,
245
  'pre_set_site_transient_update_plugins_filter'
240
  * @since 2.0.0
241
  */
242
  private function add_transient_filters() {
243
+ if ( $this->_fs->is_premium() && ! $this->_fs->is_tracking_allowed() ) {
244
+ $this->_logger->log( 'Opted out sites cannot receive automatic software updates.' );
245
+
246
+ return;
247
+ }
248
+
249
  add_filter( 'pre_set_site_transient_update_plugins', array(
250
  &$this,
251
  'pre_set_site_transient_update_plugins_filter'
freemius/includes/class-fs-storage.php CHANGED
@@ -371,6 +371,7 @@
371
  * sites in the network.
372
  */
373
  'is_network_activation' => 0,
 
374
 
375
  // When network activated, then network level.
376
  'install_timestamp' => 1,
@@ -378,16 +379,17 @@
378
  'require_license_activation' => 1,
379
 
380
  // If not network activated OR delegated, then site level.
381
- 'activation_timestamp' => 2,
382
- 'expired_license_notice_shown' => 2,
383
- 'is_whitelabeled' => 2,
384
- 'last_license_key' => 2,
385
- 'last_license_user_id' => 2,
386
- 'prev_user_id' => 2,
387
- 'sticky_optin_added' => 2,
388
- 'uninstall_reason' => 2,
389
- 'is_pending_activation' => 2,
390
- 'pending_license_key' => 2,
 
391
 
392
  // Site level options.
393
  'is_anonymous' => 3,
371
  * sites in the network.
372
  */
373
  'is_network_activation' => 0,
374
+ 'license_migration' => 0,
375
 
376
  // When network activated, then network level.
377
  'install_timestamp' => 1,
379
  'require_license_activation' => 1,
380
 
381
  // If not network activated OR delegated, then site level.
382
+ 'activation_timestamp' => 2,
383
+ 'expired_license_notice_shown' => 2,
384
+ 'is_whitelabeled' => 2,
385
+ 'last_license_key' => 2,
386
+ 'last_license_user_id' => 2,
387
+ 'prev_user_id' => 2,
388
+ 'sticky_optin_added' => 2,
389
+ 'uninstall_reason' => 2,
390
+ 'is_pending_activation' => 2,
391
+ 'pending_license_key' => 2,
392
+ 'is_extensions_tracking_allowed' => 2,
393
 
394
  // Site level options.
395
  'is_anonymous' => 3,
freemius/includes/customizer/class-fs-customizer-support-section.php CHANGED
@@ -87,10 +87,10 @@
87
  <div class="button-group">
88
  <# } #>
89
  <# if ( data.contact ) { #>
90
- <a class="button" href="{{ data.contact.url }}" target="_blank">{{ data.contact.label }} </a>
91
  <# } #>
92
  <# if ( data.support ) { #>
93
- <a class="button" href="{{ data.support.url }}" target="_blank">{{ data.support.label }} </a>
94
  <# } #>
95
  <# if ( data.contact && data.support ) { #>
96
  </div>
87
  <div class="button-group">
88
  <# } #>
89
  <# if ( data.contact ) { #>
90
+ <a class="button" href="{{ data.contact.url }}" target="_blank" rel="noopener noreferrer">{{ data.contact.label }} </a>
91
  <# } #>
92
  <# if ( data.support ) { #>
93
+ <a class="button" href="{{ data.support.url }}" target="_blank" rel="noopener noreferrer">{{ data.support.label }} </a>
94
  <# } #>
95
  <# if ( data.contact && data.support ) { #>
96
  </div>
freemius/includes/entities/class-fs-payment.php CHANGED
@@ -158,8 +158,8 @@
158
  // Lazy load.
159
  self::$CURRENCY_2_SYMBOL = array(
160
  self::CURRENCY_USD => '$',
161
- self::CURRENCY_GBP => '£',
162
- self::CURRENCY_EUR => '',
163
  );
164
  }
165
 
158
  // Lazy load.
159
  self::$CURRENCY_2_SYMBOL = array(
160
  self::CURRENCY_USD => '$',
161
+ self::CURRENCY_GBP => '&pound;',
162
+ self::CURRENCY_EUR => '&euro;',
163
  );
164
  }
165
 
freemius/includes/entities/class-fs-plugin-license.php CHANGED
@@ -50,6 +50,13 @@
50
  * @var number
51
  */
52
  public $parent_license_id;
 
 
 
 
 
 
 
53
  /**
54
  * @var number
55
  */
50
  * @var number
51
  */
52
  public $parent_license_id;
53
+ /**
54
+ * @author Leo Fajardo (@leorw)
55
+ * @since 2.4.0
56
+ *
57
+ * @var array
58
+ */
59
+ public $products;
60
  /**
61
  * @var number
62
  */
freemius/includes/entities/class-fs-site.php CHANGED
@@ -171,6 +171,7 @@
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-' ) ) ) ||
@@ -179,7 +180,9 @@
179
  // Kinsta
180
  ( fs_starts_with( $subdomain, 'staging-' ) && ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) ) ||
181
  // DesktopServer
182
- fs_ends_with( $subdomain, '.dev.cc' )
 
 
183
  );
184
  }
185
 
171
  // WPEngine staging.
172
  fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
173
  fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
174
+ fs_ends_with( $subdomain, '.wpengine.com' ) ||
175
  // Pantheon
176
  ( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
177
  ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
180
  // Kinsta
181
  ( fs_starts_with( $subdomain, 'staging-' ) && ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) ) ||
182
  // DesktopServer
183
+ fs_ends_with( $subdomain, '.dev.cc' ) ||
184
+ // Pressable
185
+ fs_ends_with( $subdomain, '.mystagingwebsite.com' )
186
  );
187
  }
188
 
freemius/includes/fs-essential-functions.php CHANGED
@@ -344,7 +344,11 @@
344
  }
345
 
346
  if ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) {
347
- $in_activation = ( ! is_plugin_active( $plugin_file ) );
 
 
 
 
348
  } else {
349
  $theme = wp_get_theme();
350
  $in_activation = ( $newest_sdk->plugin_path == $theme->stylesheet );
@@ -376,45 +380,62 @@
376
  global $fs_active_plugins;
377
 
378
  /**
379
- * @todo Multi-site network activated plugin are always loaded prior to site plugins so if there's a a plugin activated in the network mode that has an older version of the SDK of another plugin which is site activated that has new SDK version, the fs-essential-functions.php will be loaded from the older SDK. Same thing about MU plugins (loaded even before network activated plugins).
380
  *
381
  * @link https://github.com/Freemius/wordpress-sdk/issues/26
382
  */
383
 
384
  $newest_sdk_plugin_path = $fs_active_plugins->newest->plugin_path;
385
 
386
- $active_plugins = get_option( 'active_plugins', array() );
387
- $newest_sdk_plugin_key = array_search( $newest_sdk_plugin_path, $active_plugins );
388
- if ( 0 === $newest_sdk_plugin_key ) {
389
- // if it's 0 it's the first plugin already, no need to continue
390
- return false;
391
- } else if ( is_numeric( $newest_sdk_plugin_key ) ) {
392
- // Remove plugin from its current position.
393
- array_splice( $active_plugins, $newest_sdk_plugin_key, 1 );
 
 
 
 
 
 
394
 
395
- // Set it to be included first.
396
- array_unshift( $active_plugins, $newest_sdk_plugin_path );
 
 
 
397
 
398
- update_option( 'active_plugins', $active_plugins );
 
 
 
 
 
 
399
 
400
  return true;
401
- } else if ( is_multisite() && false === $newest_sdk_plugin_key ) {
 
 
402
  // Plugin is network active.
403
  $network_active_plugins = get_site_option( 'active_sitewide_plugins', array() );
404
 
405
- if (isset($network_active_plugins[$newest_sdk_plugin_path])) {
406
- reset($network_active_plugins);
407
- if ( $newest_sdk_plugin_path === key($network_active_plugins) ) {
408
  // Plugin is already activated first on the network level.
409
  return false;
410
- } else if ( is_numeric( $newest_sdk_plugin_key ) ) {
411
- $time = $network_active_plugins[$newest_sdk_plugin_path];
412
 
413
  // Remove plugin from its current position.
414
- unset($network_active_plugins[$newest_sdk_plugin_path]);
415
 
416
  // Set it to be included first.
417
- $network_active_plugins = array($newest_sdk_plugin_path => $time) + $network_active_plugins;
418
 
419
  update_site_option( 'active_sitewide_plugins', $network_active_plugins );
420
 
344
  }
345
 
346
  if ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) {
347
+ if ( ! function_exists( 'is_plugin_active' ) ) {
348
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
349
+ }
350
+
351
+ $in_activation = ( ! is_plugin_active( $plugin_file ) );
352
  } else {
353
  $theme = wp_get_theme();
354
  $in_activation = ( $newest_sdk->plugin_path == $theme->stylesheet );
380
  global $fs_active_plugins;
381
 
382
  /**
383
+ * @todo Multi-site network activated plugin are always loaded prior to site plugins so if there's a plugin activated in the network mode that has an older version of the SDK of another plugin which is site activated that has new SDK version, the fs-essential-functions.php will be loaded from the older SDK. Same thing about MU plugins (loaded even before network activated plugins).
384
  *
385
  * @link https://github.com/Freemius/wordpress-sdk/issues/26
386
  */
387
 
388
  $newest_sdk_plugin_path = $fs_active_plugins->newest->plugin_path;
389
 
390
+ $active_plugins = get_option( 'active_plugins', array() );
391
+ $updated_active_plugins = array( $newest_sdk_plugin_path );
392
+
393
+ $plugin_found = false;
394
+ $is_first_path = true;
395
+
396
+ foreach ( $active_plugins as $key => $plugin_path ) {
397
+ if ( $plugin_path === $newest_sdk_plugin_path ) {
398
+ if ( $is_first_path ) {
399
+ // if it's the first plugin already, no need to continue
400
+ return false;
401
+ }
402
+
403
+ $plugin_found = true;
404
 
405
+ // Skip the plugin (it is already added as the 1st item of $updated_active_plugins).
406
+ continue;
407
+ }
408
+
409
+ $updated_active_plugins[] = $plugin_path;
410
 
411
+ if ( $is_first_path ) {
412
+ $is_first_path = false;
413
+ }
414
+ }
415
+
416
+ if ( $plugin_found ) {
417
+ update_option( 'active_plugins', $updated_active_plugins );
418
 
419
  return true;
420
+ }
421
+
422
+ if ( is_multisite() ) {
423
  // Plugin is network active.
424
  $network_active_plugins = get_site_option( 'active_sitewide_plugins', array() );
425
 
426
+ if ( isset( $network_active_plugins[ $newest_sdk_plugin_path ] ) ) {
427
+ reset( $network_active_plugins );
428
+ if ( $newest_sdk_plugin_path === key( $network_active_plugins ) ) {
429
  // Plugin is already activated first on the network level.
430
  return false;
431
+ } else {
432
+ $time = $network_active_plugins[ $newest_sdk_plugin_path ];
433
 
434
  // Remove plugin from its current position.
435
+ unset( $network_active_plugins[ $newest_sdk_plugin_path ] );
436
 
437
  // Set it to be included first.
438
+ $network_active_plugins = array( $newest_sdk_plugin_path => $time ) + $network_active_plugins;
439
 
440
  update_site_option( 'active_sitewide_plugins', $network_active_plugins );
441
 
freemius/includes/fs-plugin-info-dialog.php CHANGED
@@ -880,9 +880,11 @@
880
  $classes[] = 'disabled';
881
  }
882
 
 
 
883
  return sprintf(
884
  '<a %s class="button %s">%s</a>',
885
- empty( $href ) ? '' : 'href="' . $href . '" target="' . $target . '"',
886
  implode( ' ', $classes ),
887
  $label
888
  );
@@ -1367,6 +1369,7 @@
1367
  if ( ! empty( $api->slug ) && true == $api->is_wp_org_compliant ) {
1368
  ?>
1369
  <li><a target="_blank"
 
1370
  href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php fs_esc_html_echo_inline( 'WordPress.org Plugin Page', 'wp-org-plugin-page', $api->slug ) ?>
1371
  &#187;</a>
1372
  </li>
@@ -1375,6 +1378,7 @@
1375
  if ( ! empty( $api->homepage ) ) {
1376
  ?>
1377
  <li><a target="_blank"
 
1378
  href="<?php echo esc_url( $api->homepage ); ?>"><?php fs_esc_html_echo_inline( 'Plugin Homepage', 'plugin-homepage', $api->slug ) ?>
1379
  &#187;</a>
1380
  </li>
@@ -1383,6 +1387,7 @@
1383
  if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
1384
  ?>
1385
  <li><a target="_blank"
 
1386
  href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_esc_html_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?>
1387
  &#187;</a>
1388
  </li>
@@ -1426,18 +1431,19 @@
1426
  );
1427
  ?>
1428
  <div class="counter-container">
1429
- <span class="counter-label"><a
1430
- href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
1431
- target="_blank"
1432
- title="<?php echo esc_attr( sprintf(
1433
- /* translators: %s: # of stars (e.g. 5 stars) */
1434
- fs_text_inline( 'Click to see reviews that provided a rating of %s', 'click-to-reviews', $api->slug ),
1435
- $stars_label
1436
- ) ) ?>"><?php echo $stars_label ?></a></span>
 
1437
  <span class="counter-back">
1438
- <span class="counter-bar" style="width: <?php echo absint(92 * $_rating); ?>px;"></span>
1439
- </span>
1440
- <span class="counter-count"><?php echo number_format_i18n( $ratecount ); ?></span>
1441
  </div>
1442
  <?php
1443
  }
@@ -1458,13 +1464,14 @@
1458
  if ( empty( $contrib_profile ) ) {
1459
  echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&amp;s=36' width='18' height='18' />{$contrib_username}</li>";
1460
  } else {
1461
- echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&amp;s=36' width='18' height='18' />{$contrib_username}</a></li>";
1462
  }
1463
  }
1464
  ?>
1465
  </ul>
1466
  <?php if ( ! empty( $api->donate_link ) ) { ?>
1467
  <a target="_blank"
 
1468
  href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?>
1469
  &#187;</a>
1470
  <?php } ?>
880
  $classes[] = 'disabled';
881
  }
882
 
883
+ $rel = ( '_blank' === $target ) ? ' rel="noopener noreferrer"' : '';
884
+
885
  return sprintf(
886
  '<a %s class="button %s">%s</a>',
887
+ empty( $href ) ? '' : 'href="' . $href . '" target="' . $target . '"' . $rel,
888
  implode( ' ', $classes ),
889
  $label
890
  );
1369
  if ( ! empty( $api->slug ) && true == $api->is_wp_org_compliant ) {
1370
  ?>
1371
  <li><a target="_blank"
1372
+ rel="noopener noreferrer"
1373
  href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php fs_esc_html_echo_inline( 'WordPress.org Plugin Page', 'wp-org-plugin-page', $api->slug ) ?>
1374
  &#187;</a>
1375
  </li>
1378
  if ( ! empty( $api->homepage ) ) {
1379
  ?>
1380
  <li><a target="_blank"
1381
+ rel="noopener noreferrer"
1382
  href="<?php echo esc_url( $api->homepage ); ?>"><?php fs_esc_html_echo_inline( 'Plugin Homepage', 'plugin-homepage', $api->slug ) ?>
1383
  &#187;</a>
1384
  </li>
1387
  if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
1388
  ?>
1389
  <li><a target="_blank"
1390
+ rel="noopener noreferrer"
1391
  href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_esc_html_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?>
1392
  &#187;</a>
1393
  </li>
1431
  );
1432
  ?>
1433
  <div class="counter-container">
1434
+ <span class="counter-label"><a
1435
+ href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
1436
+ target="_blank"
1437
+ rel="noopener noreferrer"
1438
+ title="<?php echo esc_attr( sprintf(
1439
+ /* translators: %s: # of stars (e.g. 5 stars) */
1440
+ fs_text_inline( 'Click to see reviews that provided a rating of %s', 'click-to-reviews', $api->slug ),
1441
+ $stars_label
1442
+ ) ) ?>"><?php echo $stars_label ?></a></span>
1443
  <span class="counter-back">
1444
+ <span class="counter-bar" style="width: <?php echo absint(92 * $_rating); ?>px;"></span>
1445
+ </span>
1446
+ <span class="counter-count"><?php echo number_format_i18n( $ratecount ); ?></span>
1447
  </div>
1448
  <?php
1449
  }
1464
  if ( empty( $contrib_profile ) ) {
1465
  echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&amp;s=36' width='18' height='18' />{$contrib_username}</li>";
1466
  } else {
1467
+ echo "<li><a href='{$contrib_profile}' target='_blank' rel='noopener noreferrer'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&amp;s=36' width='18' height='18' />{$contrib_username}</a></li>";
1468
  }
1469
  }
1470
  ?>
1471
  </ul>
1472
  <?php if ( ! empty( $api->donate_link ) ) { ?>
1473
  <a target="_blank"
1474
+ rel="noopener noreferrer"
1475
  href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?>
1476
  &#187;</a>
1477
  <?php } ?>
freemius/includes/managers/class-fs-admin-menu-manager.php CHANGED
@@ -703,7 +703,12 @@
703
  $menu['parent_slug'] :
704
  'admin.php';
705
 
706
- return admin_url( $parent_slug . '?page=' . $menu['menu'][2] );
 
 
 
 
 
707
  }
708
 
709
  /**
703
  $menu['parent_slug'] :
704
  'admin.php';
705
 
706
+ return admin_url(
707
+ $parent_slug .
708
+ ( false === strpos( $parent_slug, '?' ) ? '?' : '&' ) .
709
+ 'page=' .
710
+ $menu['menu'][2]
711
+ );
712
  }
713
 
714
  /**
freemius/includes/sdk/FreemiusBase.php CHANGED
@@ -137,7 +137,7 @@
137
  } catch ( Exception $e ) {
138
  // Map to error object.
139
  $result = (object) array(
140
- 'error' => array(
141
  'type' => 'Unknown',
142
  'message' => $e->getMessage() . ' (' . $e->getFile() . ': ' . $e->getLine() . ')',
143
  'code' => 'unknown',
137
  } catch ( Exception $e ) {
138
  // Map to error object.
139
  $result = (object) array(
140
+ 'error' => (object) array(
141
  'type' => 'Unknown',
142
  'message' => $e->getMessage() . ' (' . $e->getFile() . ': ' . $e->getLine() . ')',
143
  'code' => 'unknown',
freemius/includes/sdk/FreemiusWordPress.php CHANGED
@@ -228,10 +228,13 @@
228
  $now = ( time() - self::$_clock_diff );
229
  $date = date( 'r', $now );
230
 
231
- if ( in_array( $pMethod, array( 'POST', 'PUT' ) ) && ! empty( $pPostParams ) ) {
232
- $content_md5 = md5( $pPostParams );
233
- $content_type = 'application/json';
234
- }
 
 
 
235
 
236
  $string_to_sign = implode( $eol, array(
237
  $pMethod,
@@ -380,10 +383,11 @@
380
  }
381
 
382
  if ( in_array( $pMethod, array( 'POST', 'PUT' ) ) ) {
383
- if ( is_array( $pParams ) && 0 < count( $pParams ) ) {
384
- $pWPRemoteArgs['headers']['Content-type'] = 'application/json';
385
- $pWPRemoteArgs['body'] = json_encode( $pParams );
386
- }
 
387
  }
388
 
389
  $request_url = self::GetUrl( $pCanonizedPath, $pIsSandbox );
@@ -570,7 +574,7 @@
570
  } catch ( Exception $e ) {
571
  // Map to error object.
572
  $result = (object) array(
573
- 'error' => array(
574
  'type' => 'Unknown',
575
  'message' => $e->getMessage() . ' (' . $e->getFile() . ': ' . $e->getLine() . ')',
576
  'code' => 'unknown',
@@ -649,7 +653,7 @@
649
  $message = ( 1 < count( $parts ) ) ? $parts[1] : $message;
650
 
651
  $e = new Freemius_Exception( array(
652
- 'error' => array(
653
  'code' => $code,
654
  'message' => $message,
655
  'type' => 'CurlException',
@@ -657,7 +661,7 @@
657
  ) );
658
  } else {
659
  $e = new Freemius_Exception( array(
660
- 'error' => array(
661
  'code' => $pError->get_error_code(),
662
  'message' => $pError->get_error_message(),
663
  'type' => 'WPRemoteException',
228
  $now = ( time() - self::$_clock_diff );
229
  $date = date( 'r', $now );
230
 
231
+ if ( in_array( $pMethod, array( 'POST', 'PUT' ) ) ) {
232
+ $content_type = 'application/json';
233
+
234
+ if ( ! empty( $pPostParams ) ) {
235
+ $content_md5 = md5( $pPostParams );
236
+ }
237
+ }
238
 
239
  $string_to_sign = implode( $eol, array(
240
  $pMethod,
383
  }
384
 
385
  if ( in_array( $pMethod, array( 'POST', 'PUT' ) ) ) {
386
+ $pWPRemoteArgs['headers']['Content-type'] = 'application/json';
387
+
388
+ if ( is_array( $pParams ) && 0 < count( $pParams ) ) {
389
+ $pWPRemoteArgs['body'] = json_encode( $pParams );
390
+ }
391
  }
392
 
393
  $request_url = self::GetUrl( $pCanonizedPath, $pIsSandbox );
574
  } catch ( Exception $e ) {
575
  // Map to error object.
576
  $result = (object) array(
577
+ 'error' => (object) array(
578
  'type' => 'Unknown',
579
  'message' => $e->getMessage() . ' (' . $e->getFile() . ': ' . $e->getLine() . ')',
580
  'code' => 'unknown',
653
  $message = ( 1 < count( $parts ) ) ? $parts[1] : $message;
654
 
655
  $e = new Freemius_Exception( array(
656
+ 'error' => (object) array(
657
  'code' => $code,
658
  'message' => $message,
659
  'type' => 'CurlException',
661
  ) );
662
  } else {
663
  $e = new Freemius_Exception( array(
664
+ 'error' => (object) array(
665
  'code' => $pError->get_error_code(),
666
  'message' => $pError->get_error_message(),
667
  'type' => 'WPRemoteException',
freemius/includes/supplements/fs-essential-functions-1.1.7.1.php CHANGED
@@ -32,7 +32,7 @@
32
 
33
  // Get active plugin's main files real full names (might be symlinks).
34
  foreach ( $all_plugins as $relative_path => $data ) {
35
- if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) ) ) ) {
36
  if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) {
37
  return $relative_path;
38
  }
32
 
33
  // Get active plugin's main files real full names (might be symlinks).
34
  foreach ( $all_plugins as $relative_path => $data ) {
35
+ if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) . '/' ) ) ) {
36
  if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) {
37
  return $relative_path;
38
  }
freemius/languages/freemius-cs_CZ.mo CHANGED
Binary file
freemius/languages/freemius-da_DK.mo CHANGED
Binary file
freemius/languages/freemius-en.mo CHANGED
Binary file
freemius/languages/freemius-es_ES.mo CHANGED
Binary file
freemius/languages/freemius-fr_FR.mo CHANGED
Binary file
freemius/languages/freemius-he_IL.mo CHANGED
Binary file
freemius/languages/freemius-hu_HU.mo CHANGED
Binary file
freemius/languages/freemius-it_IT.mo CHANGED
Binary file
freemius/languages/freemius-ja.mo ADDED
Binary file
freemius/languages/freemius-nl_NL.mo CHANGED
Binary file
freemius/languages/freemius-ru_RU.mo CHANGED
Binary file
freemius/languages/freemius-ta.mo CHANGED
Binary file
freemius/languages/freemius-zh_CN.mo ADDED
Binary file
freemius/languages/freemius.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2019 freemius
2
  # This file is distributed under the same license as the freemius package.
3
  msgid ""
4
  msgstr ""
@@ -16,763 +16,771 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
- #: includes/class-freemius.php:1880, templates/account.php:840
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:1887
24
  msgid "Would you like to proceed with the update?"
25
  msgstr ""
26
 
27
- #: includes/class-freemius.php:2095
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:2097
32
  msgid "Error"
33
  msgstr ""
34
 
35
- #: includes/class-freemius.php:2491
36
  msgid "I found a better %s"
37
  msgstr ""
38
 
39
- #: includes/class-freemius.php:2493
40
  msgid "What's the %s's name?"
41
  msgstr ""
42
 
43
- #: includes/class-freemius.php:2499
44
  msgid "It's a temporary %s. I'm just debugging an issue."
45
  msgstr ""
46
 
47
- #: includes/class-freemius.php:2501
48
  msgid "Deactivation"
49
  msgstr ""
50
 
51
- #: includes/class-freemius.php:2502
52
  msgid "Theme Switch"
53
  msgstr ""
54
 
55
- #: includes/class-freemius.php:2511, templates/forms/resend-key.php:24
56
  msgid "Other"
57
  msgstr ""
58
 
59
- #: includes/class-freemius.php:2519
60
  msgid "I no longer need the %s"
61
  msgstr ""
62
 
63
- #: includes/class-freemius.php:2526
64
  msgid "I only needed the %s for a short period"
65
  msgstr ""
66
 
67
- #: includes/class-freemius.php:2532
68
  msgid "The %s broke my site"
69
  msgstr ""
70
 
71
- #: includes/class-freemius.php:2539
72
  msgid "The %s suddenly stopped working"
73
  msgstr ""
74
 
75
- #: includes/class-freemius.php:2549
76
  msgid "I can't pay for it anymore"
77
  msgstr ""
78
 
79
- #: includes/class-freemius.php:2551
80
  msgid "What price would you feel comfortable paying?"
81
  msgstr ""
82
 
83
- #: includes/class-freemius.php:2557
84
  msgid "I don't like to share my information with you"
85
  msgstr ""
86
 
87
- #: includes/class-freemius.php:2578
88
  msgid "The %s didn't work"
89
  msgstr ""
90
 
91
- #: includes/class-freemius.php:2588
92
  msgid "I couldn't understand how to make it work"
93
  msgstr ""
94
 
95
- #: includes/class-freemius.php:2596
96
  msgid "The %s is great, but I need specific feature that you don't support"
97
  msgstr ""
98
 
99
- #: includes/class-freemius.php:2598
100
  msgid "What feature?"
101
  msgstr ""
102
 
103
- #: includes/class-freemius.php:2602
104
  msgid "The %s is not working"
105
  msgstr ""
106
 
107
- #: includes/class-freemius.php:2604
108
  msgid "Kindly share what didn't work so we can fix it for future users..."
109
  msgstr ""
110
 
111
- #: includes/class-freemius.php:2608
112
  msgid "It's not what I was looking for"
113
  msgstr ""
114
 
115
- #: includes/class-freemius.php:2610
116
  msgid "What you've been looking for?"
117
  msgstr ""
118
 
119
- #: includes/class-freemius.php:2614
120
  msgid "The %s didn't work as expected"
121
  msgstr ""
122
 
123
- #: includes/class-freemius.php:2616
124
  msgid "What did you expect?"
125
  msgstr ""
126
 
127
- #: includes/class-freemius.php:3471, templates/debug.php:20
128
  msgid "Freemius Debug"
129
  msgstr ""
130
 
131
- #: includes/class-freemius.php:4223
132
  msgid "I don't know what is cURL or how to install it, help me!"
133
  msgstr ""
134
 
135
- #: includes/class-freemius.php:4225
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:4232
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:4337
144
  msgid "Yes - do your thing"
145
  msgstr ""
146
 
147
- #: includes/class-freemius.php:4342
148
  msgid "No - just deactivate"
149
  msgstr ""
150
 
151
- #: includes/class-freemius.php:4387, includes/class-freemius.php:4881, includes/class-freemius.php:6032, includes/class-freemius.php:13153, includes/class-freemius.php:16558, includes/class-freemius.php:16646, includes/class-freemius.php:16812, includes/class-freemius.php:19040, includes/class-freemius.php:19381, includes/class-freemius.php:19391, includes/class-freemius.php:20051, includes/class-freemius.php:20924, includes/class-freemius.php:21039, includes/class-freemius.php:21183, templates/add-ons.php:57
152
  msgctxt "exclamation"
153
  msgid "Oops"
154
  msgstr ""
155
 
156
- #: includes/class-freemius.php:4456
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:4878
161
  msgctxt "addonX cannot run without pluginY"
162
  msgid "%s cannot run without %s."
163
  msgstr ""
164
 
165
- #: includes/class-freemius.php:4879
166
  msgctxt "addonX cannot run..."
167
  msgid "%s cannot run without the plugin."
168
  msgstr ""
169
 
170
- #: includes/class-freemius.php:5052, includes/class-freemius.php:5077, includes/class-freemius.php:20122
171
  msgid "Unexpected API error. Please contact the %s's author with the following error."
172
  msgstr ""
173
 
174
- #: includes/class-freemius.php:5720
175
  msgid "Premium %s version was successfully activated."
176
  msgstr ""
177
 
178
- #: includes/class-freemius.php:5732, includes/class-freemius.php:7599
179
  msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
180
  msgid "W00t"
181
  msgstr ""
182
 
183
- #: includes/class-freemius.php:5747
184
  msgid "You have a %s license."
185
  msgstr ""
186
 
187
- #: includes/class-freemius.php:5751, includes/class-freemius.php:15975, includes/class-freemius.php:15986, includes/class-freemius.php:19292, includes/class-freemius.php:19642, includes/class-freemius.php:19711, includes/class-freemius.php:19876
188
  msgctxt "interjection expressing joy or exuberance"
189
  msgid "Yee-haw"
190
  msgstr ""
191
 
192
- #: includes/class-freemius.php:6015
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:6019
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:6028, templates/add-ons.php:186, templates/account/partials/addon.php:381
201
  msgid "More information about %s"
202
  msgstr ""
203
 
204
- #: includes/class-freemius.php:6029
205
  msgid "Purchase License"
206
  msgstr ""
207
 
208
- #: includes/class-freemius.php:6964, 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:6968
213
  msgid "start the trial"
214
  msgstr ""
215
 
216
- #: includes/class-freemius.php:6969, templates/connect.php:167
217
  msgid "complete the install"
218
  msgstr ""
219
 
220
- #: includes/class-freemius.php:7081
221
  msgid "You are just one step away - %s"
222
  msgstr ""
223
 
224
- #: includes/class-freemius.php:7084
225
  msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
226
  msgid "Complete \"%s\" Activation Now"
227
  msgstr ""
228
 
229
- #: includes/class-freemius.php:7162
230
  msgid "We made a few tweaks to the %s, %s"
231
  msgstr ""
232
 
233
- #: includes/class-freemius.php:7166
234
  msgid "Opt in to make \"%s\" better!"
235
  msgstr ""
236
 
237
- #: includes/class-freemius.php:7598
238
  msgid "The upgrade of %s was successfully completed."
239
  msgstr ""
240
 
241
- #: includes/class-freemius.php:9802, includes/class-fs-plugin-updater.php:1038, includes/class-fs-plugin-updater.php:1233, includes/class-fs-plugin-updater.php:1240, templates/auto-installation.php:32
242
  msgid "Add-On"
243
  msgstr ""
244
 
245
- #: includes/class-freemius.php:9804, templates/account.php:335, templates/account.php:343, templates/debug.php:360, templates/debug.php:551
246
  msgid "Plugin"
247
  msgstr ""
248
 
249
- #: includes/class-freemius.php:9805, templates/account.php:336, templates/account.php:344, templates/debug.php:360, templates/debug.php:551, templates/forms/deactivation/form.php:71
250
  msgid "Theme"
251
  msgstr ""
252
 
253
- #: includes/class-freemius.php:12596
254
  msgid "An unknown error has occurred while trying to set the user's beta mode."
255
  msgstr ""
256
 
257
- #: includes/class-freemius.php:13020
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  msgid "Invalid site details collection."
259
  msgstr ""
260
 
261
- #: includes/class-freemius.php:13140
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:13142
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:13416
270
  msgid "Account is pending activation."
271
  msgstr ""
272
 
273
- #: includes/class-freemius.php:13528, templates/forms/premium-versions-upgrade-handler.php:47
274
  msgid "Buy a license now"
275
  msgstr ""
276
 
277
- #: includes/class-freemius.php:13540, templates/forms/premium-versions-upgrade-handler.php:46
278
  msgid "Renew your license now"
279
  msgstr ""
280
 
281
- #: includes/class-freemius.php:13544
282
  msgid "%s to access version %s security & feature updates, and support."
283
  msgstr ""
284
 
285
- #: includes/class-freemius.php:15957
286
  msgid "%s activation was successfully completed."
287
  msgstr ""
288
 
289
- #: includes/class-freemius.php:15971
290
  msgid "Your account was successfully activated with the %s plan."
291
  msgstr ""
292
 
293
- #: includes/class-freemius.php:15982, includes/class-freemius.php:19707
294
  msgid "Your trial has been successfully started."
295
  msgstr ""
296
 
297
- #: includes/class-freemius.php:16556, includes/class-freemius.php:16644, includes/class-freemius.php:16810
298
  msgid "Couldn't activate %s."
299
  msgstr ""
300
 
301
- #: includes/class-freemius.php:16557, includes/class-freemius.php:16645, includes/class-freemius.php:16811
302
  msgid "Please contact us with the following message:"
303
  msgstr ""
304
 
305
- #: includes/class-freemius.php:16641, templates/forms/data-debug-mode.php:162
306
  msgid "An unknown error has occurred."
307
  msgstr ""
308
 
309
- #: includes/class-freemius.php:17168, includes/class-freemius.php:22082
310
  msgid "Upgrade"
311
  msgstr ""
312
 
313
- #: includes/class-freemius.php:17174
314
  msgid "Start Trial"
315
  msgstr ""
316
 
317
- #: includes/class-freemius.php:17176
318
  msgid "Pricing"
319
  msgstr ""
320
 
321
- #: includes/class-freemius.php:17256, includes/class-freemius.php:17258
322
  msgid "Affiliation"
323
  msgstr ""
324
 
325
- #: includes/class-freemius.php:17286, includes/class-freemius.php:17288, templates/account.php:183, templates/debug.php:326
326
  msgid "Account"
327
  msgstr ""
328
 
329
- #: includes/class-freemius.php:17302, includes/class-freemius.php:17304, includes/customizer/class-fs-customizer-support-section.php:60
330
  msgid "Contact Us"
331
  msgstr ""
332
 
333
- #: includes/class-freemius.php:17315, includes/class-freemius.php:17317, includes/class-freemius.php:22096, templates/account.php:111, templates/account/partials/addon.php:44
334
  msgid "Add-Ons"
335
  msgstr ""
336
 
337
- #: includes/class-freemius.php:17351
338
  msgctxt "ASCII arrow left icon"
339
  msgid "&#x2190;"
340
  msgstr ""
341
 
342
- #: includes/class-freemius.php:17351
343
  msgctxt "ASCII arrow right icon"
344
  msgid "&#x27a4;"
345
  msgstr ""
346
 
347
- #: includes/class-freemius.php:17353, templates/pricing.php:103
348
  msgctxt "noun"
349
  msgid "Pricing"
350
  msgstr ""
351
 
352
- #: includes/class-freemius.php:17566, includes/customizer/class-fs-customizer-support-section.php:67
353
  msgid "Support Forum"
354
  msgstr ""
355
 
356
- #: includes/class-freemius.php:18536
357
  msgid "Your email has been successfully verified - you are AWESOME!"
358
  msgstr ""
359
 
360
- #: includes/class-freemius.php:18537
361
  msgctxt "a positive response"
362
  msgid "Right on"
363
  msgstr ""
364
 
365
- #: includes/class-freemius.php:19041
366
  msgid "seems like the key you entered doesn't match our records."
367
  msgstr ""
368
 
369
- #: includes/class-freemius.php:19065
370
  msgid "Debug mode was successfully enabled and will be automatically disabled in 60 min. You can also disable it earlier by clicking the \"Stop Debug\" link."
371
  msgstr ""
372
 
373
- #: includes/class-freemius.php:19283
374
  msgid "Your %s Add-on plan was successfully upgraded."
375
  msgstr ""
376
 
377
- #: includes/class-freemius.php:19285
378
  msgid "%s Add-on was successfully purchased."
379
  msgstr ""
380
 
381
- #: includes/class-freemius.php:19288
382
  msgid "Download the latest version"
383
  msgstr ""
384
 
385
- #: includes/class-freemius.php:19374
386
  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"
387
  msgstr ""
388
 
389
- #: includes/class-freemius.php:19380, includes/class-freemius.php:19390, includes/class-freemius.php:19835, includes/class-freemius.php:19924
390
  msgid "Error received from the server:"
391
  msgstr ""
392
 
393
- #: includes/class-freemius.php:19390
394
  msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
395
  msgstr ""
396
 
397
- #: includes/class-freemius.php:19604, includes/class-freemius.php:19840, includes/class-freemius.php:19895, includes/class-freemius.php:19998
398
  msgctxt "something somebody says when they are thinking about what you have just said."
399
  msgid "Hmm"
400
  msgstr ""
401
 
402
- #: includes/class-freemius.php:19617
403
  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."
404
  msgstr ""
405
 
406
- #: includes/class-freemius.php:19618, templates/account.php:113, templates/add-ons.php:250, templates/account/partials/addon.php:46
407
  msgctxt "trial period"
408
  msgid "Trial"
409
  msgstr ""
410
 
411
- #: includes/class-freemius.php:19623
412
  msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
413
  msgstr ""
414
 
415
- #: includes/class-freemius.php:19627, includes/class-freemius.php:19686
416
  msgid "Please contact us here"
417
  msgstr ""
418
 
419
- #: includes/class-freemius.php:19638
420
  msgid "Your plan was successfully activated."
421
  msgstr ""
422
 
423
- #: includes/class-freemius.php:19639
424
  msgid "Your plan was successfully upgraded."
425
  msgstr ""
426
 
427
- #: includes/class-freemius.php:19656
428
  msgid "Your plan was successfully changed to %s."
429
  msgstr ""
430
 
431
- #: includes/class-freemius.php:19672
432
  msgid "Your license has expired. You can still continue using the free %s forever."
433
  msgstr ""
434
 
435
- #: includes/class-freemius.php:19674
436
  msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
437
  msgstr ""
438
 
439
- #: includes/class-freemius.php:19682
440
  msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
441
  msgstr ""
442
 
443
- #: includes/class-freemius.php:19695
444
  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."
445
  msgstr ""
446
 
447
- #: includes/class-freemius.php:19721
448
  msgid "Your free trial has expired. You can still continue using all our free features."
449
  msgstr ""
450
 
451
- #: includes/class-freemius.php:19723
452
  msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
453
  msgstr ""
454
 
455
- #: includes/class-freemius.php:19831
456
  msgid "It looks like the license could not be activated."
457
  msgstr ""
458
 
459
- #: includes/class-freemius.php:19873
460
  msgid "Your license was successfully activated."
461
  msgstr ""
462
 
463
- #: includes/class-freemius.php:19899
464
  msgid "It looks like your site currently doesn't have an active license."
465
  msgstr ""
466
 
467
- #: includes/class-freemius.php:19923
468
  msgid "It looks like the license deactivation failed."
469
  msgstr ""
470
 
471
- #: includes/class-freemius.php:19951
 
 
 
 
472
  msgid "Your license was successfully deactivated, you are back to the %s plan."
473
  msgstr ""
474
 
475
- #: includes/class-freemius.php:19952
476
  msgid "O.K"
477
  msgstr ""
478
 
479
- #: includes/class-freemius.php:20005
480
  msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
481
  msgstr ""
482
 
483
- #: includes/class-freemius.php:20014
484
  msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
485
  msgstr ""
486
 
487
- #: includes/class-freemius.php:20056
488
  msgid "You are already running the %s in a trial mode."
489
  msgstr ""
490
 
491
- #: includes/class-freemius.php:20067
492
  msgid "You already utilized a trial before."
493
  msgstr ""
494
 
495
- #: includes/class-freemius.php:20081
496
  msgid "Plan %s do not exist, therefore, can't start a trial."
497
  msgstr ""
498
 
499
- #: includes/class-freemius.php:20092
500
  msgid "Plan %s does not support a trial period."
501
  msgstr ""
502
 
503
- #: includes/class-freemius.php:20103
504
  msgid "None of the %s's plans supports a trial period."
505
  msgstr ""
506
 
507
- #: includes/class-freemius.php:20153
508
  msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
509
  msgstr ""
510
 
511
- #: includes/class-freemius.php:20189
512
  msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
513
  msgstr ""
514
 
515
- #: includes/class-freemius.php:20208
516
  msgid "Your %s free trial was successfully cancelled."
517
  msgstr ""
518
 
519
- #: includes/class-freemius.php:20524
520
  msgid "Version %s was released."
521
  msgstr ""
522
 
523
- #: includes/class-freemius.php:20524
524
  msgid "Please download %s."
525
  msgstr ""
526
 
527
- #: includes/class-freemius.php:20531
528
  msgid "the latest %s version here"
529
  msgstr ""
530
 
531
- #: includes/class-freemius.php:20536
532
  msgid "New"
533
  msgstr ""
534
 
535
- #: includes/class-freemius.php:20541
536
  msgid "Seems like you got the latest release."
537
  msgstr ""
538
 
539
- #: includes/class-freemius.php:20542
540
  msgid "You are all good!"
541
  msgstr ""
542
 
543
- #: includes/class-freemius.php:20812
544
  msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
545
  msgstr ""
546
 
547
- #: includes/class-freemius.php:20951
548
  msgid "Site successfully opted in."
549
  msgstr ""
550
 
551
- #: includes/class-freemius.php:20952, includes/class-freemius.php:21792
552
  msgid "Awesome"
553
  msgstr ""
554
 
555
- #: includes/class-freemius.php:20968, templates/forms/optout.php:32
556
  msgid "We appreciate your help in making the %s better by letting us track some usage data."
557
  msgstr ""
558
 
559
- #: includes/class-freemius.php:20969
560
  msgid "Thank you!"
561
  msgstr ""
562
 
563
- #: includes/class-freemius.php:20976
564
  msgid "We will no longer be sending any usage data of %s on %s to %s."
565
  msgstr ""
566
 
567
- #: includes/class-freemius.php:21105
568
  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."
569
  msgstr ""
570
 
571
- #: includes/class-freemius.php:21111
572
  msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
573
  msgstr ""
574
 
575
- #: includes/class-freemius.php:21116
576
  msgid "%s is the new owner of the account."
577
  msgstr ""
578
 
579
- #: includes/class-freemius.php:21118
580
  msgctxt "as congratulations"
581
  msgid "Congrats"
582
  msgstr ""
583
 
584
- #: includes/class-freemius.php:21138
585
- msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
586
- msgstr ""
587
-
588
- #: includes/class-freemius.php:21139
589
- msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
590
- msgstr ""
591
-
592
- #: includes/class-freemius.php:21146
593
- msgid "Change Ownership"
594
- msgstr ""
595
-
596
- #: includes/class-freemius.php:21154
597
  msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
598
  msgstr ""
599
 
600
- #: includes/class-freemius.php:21166
601
  msgid "Please provide your full name."
602
  msgstr ""
603
 
604
- #: includes/class-freemius.php:21171
605
  msgid "Your name was successfully updated."
606
  msgstr ""
607
 
608
- #: includes/class-freemius.php:21232
609
  msgid "You have successfully updated your %s."
610
  msgstr ""
611
 
612
- #: includes/class-freemius.php:21372
613
  msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
614
  msgstr ""
615
 
616
- #: includes/class-freemius.php:21373
617
  msgctxt "advance notice of something that will need attention."
618
  msgid "Heads up"
619
  msgstr ""
620
 
621
- #: includes/class-freemius.php:21832
622
  msgctxt "exclamation"
623
  msgid "Hey"
624
  msgstr ""
625
 
626
- #: includes/class-freemius.php:21832
627
  msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
628
  msgstr ""
629
 
630
- #: includes/class-freemius.php:21840
631
  msgid "No commitment for %s days - cancel anytime!"
632
  msgstr ""
633
 
634
- #: includes/class-freemius.php:21841
635
  msgid "No credit card required"
636
  msgstr ""
637
 
638
- #: includes/class-freemius.php:21848, templates/forms/trial-start.php:53
639
  msgctxt "call to action"
640
  msgid "Start free trial"
641
  msgstr ""
642
 
643
- #: includes/class-freemius.php:21925
644
  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!"
645
  msgstr ""
646
 
647
- #: includes/class-freemius.php:21934
648
  msgid "Learn more"
649
  msgstr ""
650
 
651
- #: includes/class-freemius.php:22120, templates/account.php:499, templates/account.php:624, templates/connect.php:171, templates/connect.php:421, templates/forms/license-activation.php:27, templates/account/partials/addon.php:321
652
  msgid "Activate License"
653
  msgstr ""
654
 
655
- #: includes/class-freemius.php:22121, templates/account.php:571, templates/account.php:623, templates/account/partials/addon.php:322, templates/account/partials/site.php:271
656
  msgid "Change License"
657
  msgstr ""
658
 
659
- #: includes/class-freemius.php:22217, templates/account/partials/site.php:169
660
  msgid "Opt Out"
661
  msgstr ""
662
 
663
- #: includes/class-freemius.php:22219, includes/class-freemius.php:22225, templates/account/partials/site.php:49, templates/account/partials/site.php:169
664
  msgid "Opt In"
665
  msgstr ""
666
 
667
- #: includes/class-freemius.php:22453
668
  msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
669
  msgstr ""
670
 
671
- #: includes/class-freemius.php:22461
672
  msgid "Activate %s features"
673
  msgstr ""
674
 
675
- #: includes/class-freemius.php:22474
676
  msgid "Please follow these steps to complete the upgrade"
677
  msgstr ""
678
 
679
- #: includes/class-freemius.php:22478
680
  msgid "Download the latest %s version"
681
  msgstr ""
682
 
683
- #: includes/class-freemius.php:22482
684
  msgid "Upload and activate the downloaded version"
685
  msgstr ""
686
 
687
- #: includes/class-freemius.php:22484
688
  msgid "How to upload and activate?"
689
  msgstr ""
690
 
691
- #: includes/class-freemius.php:22618
692
  msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
693
  msgstr ""
694
 
695
- #: includes/class-freemius.php:22779
696
  msgid "Auto installation only works for opted-in users."
697
  msgstr ""
698
 
699
- #: includes/class-freemius.php:22789, includes/class-freemius.php:22822, includes/class-fs-plugin-updater.php:1212, includes/class-fs-plugin-updater.php:1226
700
  msgid "Invalid module ID."
701
  msgstr ""
702
 
703
- #: includes/class-freemius.php:22798, includes/class-fs-plugin-updater.php:1248
704
  msgid "Premium version already active."
705
  msgstr ""
706
 
707
- #: includes/class-freemius.php:22805
708
  msgid "You do not have a valid license to access the premium version."
709
  msgstr ""
710
 
711
- #: includes/class-freemius.php:22812
712
  msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
713
  msgstr ""
714
 
715
- #: includes/class-freemius.php:22830, includes/class-fs-plugin-updater.php:1247
716
  msgid "Premium add-on version already installed."
717
  msgstr ""
718
 
719
- #: includes/class-freemius.php:23180
720
  msgid "View paid features"
721
  msgstr ""
722
 
723
- #: includes/class-freemius.php:23502
724
  msgid "Thank you so much for using %s and its add-ons!"
725
  msgstr ""
726
 
727
- #: includes/class-freemius.php:23503
728
  msgid "Thank you so much for using %s!"
729
  msgstr ""
730
 
731
- #: includes/class-freemius.php:23509
732
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
733
  msgstr ""
734
 
735
- #: includes/class-freemius.php:23513
736
  msgid "Thank you so much for using our products!"
737
  msgstr ""
738
 
739
- #: includes/class-freemius.php:23514
740
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
741
  msgstr ""
742
 
743
- #: includes/class-freemius.php:23533
744
  msgid "%s and its add-ons"
745
  msgstr ""
746
 
747
- #: includes/class-freemius.php:23542
748
  msgid "Products"
749
  msgstr ""
750
 
751
- #: includes/class-freemius.php:23549, templates/connect.php:272
752
  msgid "Yes"
753
  msgstr ""
754
 
755
- #: includes/class-freemius.php:23550, templates/connect.php:273
756
  msgid "send me security & feature updates, educational content and offers."
757
  msgstr ""
758
 
759
- #: includes/class-freemius.php:23551, templates/connect.php:278
760
  msgid "No"
761
  msgstr ""
762
 
763
- #: includes/class-freemius.php:23553, templates/connect.php:280
764
  msgid "do %sNOT%s send me security & feature updates, educational content and offers."
765
  msgstr ""
766
 
767
- #: includes/class-freemius.php:23563
768
  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 :-)"
769
  msgstr ""
770
 
771
- #: includes/class-freemius.php:23565, templates/connect.php:287
772
  msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
773
  msgstr ""
774
 
775
- #: includes/class-freemius.php:23847
776
  msgid "License key is empty."
777
  msgstr ""
778
 
@@ -784,31 +792,31 @@ msgstr ""
784
  msgid "Buy license"
785
  msgstr ""
786
 
787
- #: includes/class-fs-plugin-updater.php:321, includes/class-fs-plugin-updater.php:354
788
  msgid "There is a %s of %s available."
789
  msgstr ""
790
 
791
- #: includes/class-fs-plugin-updater.php:323, includes/class-fs-plugin-updater.php:359
792
  msgid "new Beta version"
793
  msgstr ""
794
 
795
- #: includes/class-fs-plugin-updater.php:324, includes/class-fs-plugin-updater.php:360
796
  msgid "new version"
797
  msgstr ""
798
 
799
- #: includes/class-fs-plugin-updater.php:383
800
  msgid "Important Upgrade Notice:"
801
  msgstr ""
802
 
803
- #: includes/class-fs-plugin-updater.php:1277
804
  msgid "Installing plugin: %s"
805
  msgstr ""
806
 
807
- #: includes/class-fs-plugin-updater.php:1318
808
  msgid "Unable to connect to the filesystem. Please confirm your credentials."
809
  msgstr ""
810
 
811
- #: includes/class-fs-plugin-updater.php:1500
812
  msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
813
  msgstr ""
814
 
@@ -829,7 +837,7 @@ msgstr ""
829
  msgid "Install Free Version Update Now"
830
  msgstr ""
831
 
832
- #: includes/fs-plugin-info-dialog.php:739, templates/account.php:560
833
  msgid "Install Update Now"
834
  msgstr ""
835
 
@@ -846,7 +854,7 @@ msgctxt "as download latest version"
846
  msgid "Download Latest Free Version"
847
  msgstr ""
848
 
849
- #: includes/fs-plugin-info-dialog.php:766, templates/account.php:91, templates/add-ons.php:37, templates/account/partials/addon.php:25
850
  msgctxt "as download latest version"
851
  msgid "Download Latest"
852
  msgstr ""
@@ -855,533 +863,541 @@ msgstr ""
855
  msgid "Activate this add-on"
856
  msgstr ""
857
 
858
- #: includes/fs-plugin-info-dialog.php:783, templates/connect.php:418
859
  msgid "Activate Free Version"
860
  msgstr ""
861
 
862
- #: includes/fs-plugin-info-dialog.php:784, templates/account.php:115, templates/add-ons.php:330, templates/account/partials/addon.php:48
863
  msgid "Activate"
864
  msgstr ""
865
 
866
- #: includes/fs-plugin-info-dialog.php:994
867
  msgctxt "Plugin installer section title"
868
  msgid "Description"
869
  msgstr ""
870
 
871
- #: includes/fs-plugin-info-dialog.php:995
872
  msgctxt "Plugin installer section title"
873
  msgid "Installation"
874
  msgstr ""
875
 
876
- #: includes/fs-plugin-info-dialog.php:996
877
  msgctxt "Plugin installer section title"
878
  msgid "FAQ"
879
  msgstr ""
880
 
881
- #: includes/fs-plugin-info-dialog.php:997, templates/plugin-info/description.php:55
882
  msgid "Screenshots"
883
  msgstr ""
884
 
885
- #: includes/fs-plugin-info-dialog.php:998
886
  msgctxt "Plugin installer section title"
887
  msgid "Changelog"
888
  msgstr ""
889
 
890
- #: includes/fs-plugin-info-dialog.php:999
891
  msgctxt "Plugin installer section title"
892
  msgid "Reviews"
893
  msgstr ""
894
 
895
- #: includes/fs-plugin-info-dialog.php:1000
896
  msgctxt "Plugin installer section title"
897
  msgid "Other Notes"
898
  msgstr ""
899
 
900
- #: includes/fs-plugin-info-dialog.php:1015
901
  msgctxt "Plugin installer section title"
902
  msgid "Features & Pricing"
903
  msgstr ""
904
 
905
- #: includes/fs-plugin-info-dialog.php:1025
906
  msgid "Plugin Install"
907
  msgstr ""
908
 
909
- #: includes/fs-plugin-info-dialog.php:1097
910
  msgctxt "e.g. Professional Plan"
911
  msgid "%s Plan"
912
  msgstr ""
913
 
914
- #: includes/fs-plugin-info-dialog.php:1123
915
  msgctxt "e.g. the best product"
916
  msgid "Best"
917
  msgstr ""
918
 
919
- #: includes/fs-plugin-info-dialog.php:1129, includes/fs-plugin-info-dialog.php:1149
920
  msgctxt "as every month"
921
  msgid "Monthly"
922
  msgstr ""
923
 
924
- #: includes/fs-plugin-info-dialog.php:1132
925
  msgctxt "as once a year"
926
  msgid "Annual"
927
  msgstr ""
928
 
929
- #: includes/fs-plugin-info-dialog.php:1135
930
  msgid "Lifetime"
931
  msgstr ""
932
 
933
- #: includes/fs-plugin-info-dialog.php:1149, includes/fs-plugin-info-dialog.php:1151, includes/fs-plugin-info-dialog.php:1153
934
  msgctxt "e.g. billed monthly"
935
  msgid "Billed %s"
936
  msgstr ""
937
 
938
- #: includes/fs-plugin-info-dialog.php:1151
939
  msgctxt "as once a year"
940
  msgid "Annually"
941
  msgstr ""
942
 
943
- #: includes/fs-plugin-info-dialog.php:1153
944
  msgctxt "as once a year"
945
  msgid "Once"
946
  msgstr ""
947
 
948
- #: includes/fs-plugin-info-dialog.php:1159
949
  msgid "Single Site License"
950
  msgstr ""
951
 
952
- #: includes/fs-plugin-info-dialog.php:1161
953
  msgid "Unlimited Licenses"
954
  msgstr ""
955
 
956
- #: includes/fs-plugin-info-dialog.php:1163
957
  msgid "Up to %s Sites"
958
  msgstr ""
959
 
960
- #: includes/fs-plugin-info-dialog.php:1173, templates/plugin-info/features.php:82
961
  msgctxt "as monthly period"
962
  msgid "mo"
963
  msgstr ""
964
 
965
- #: includes/fs-plugin-info-dialog.php:1180, templates/plugin-info/features.php:80
966
  msgctxt "as annual period"
967
  msgid "year"
968
  msgstr ""
969
 
970
- #: includes/fs-plugin-info-dialog.php:1234
971
  msgctxt "noun"
972
  msgid "Price"
973
  msgstr ""
974
 
975
- #: includes/fs-plugin-info-dialog.php:1282
976
  msgid "Save %s"
977
  msgstr ""
978
 
979
- #: includes/fs-plugin-info-dialog.php:1292
980
  msgid "No commitment for %s - cancel anytime"
981
  msgstr ""
982
 
983
- #: includes/fs-plugin-info-dialog.php:1295
984
  msgid "After your free %s, pay as little as %s"
985
  msgstr ""
986
 
987
- #: includes/fs-plugin-info-dialog.php:1306
988
  msgid "Details"
989
  msgstr ""
990
 
991
- #: includes/fs-plugin-info-dialog.php:1310, templates/account.php:102, templates/debug.php:203, templates/debug.php:240, templates/debug.php:457, templates/account/partials/addon.php:36
992
  msgctxt "product version"
993
  msgid "Version"
994
  msgstr ""
995
 
996
- #: includes/fs-plugin-info-dialog.php:1317
997
  msgctxt "as the plugin author"
998
  msgid "Author"
999
  msgstr ""
1000
 
1001
- #: includes/fs-plugin-info-dialog.php:1324
1002
  msgid "Last Updated"
1003
  msgstr ""
1004
 
1005
- #: includes/fs-plugin-info-dialog.php:1329, templates/account.php:468
1006
  msgctxt "x-ago"
1007
  msgid "%s ago"
1008
  msgstr ""
1009
 
1010
- #: includes/fs-plugin-info-dialog.php:1338
1011
  msgid "Requires WordPress Version"
1012
  msgstr ""
1013
 
1014
- #: includes/fs-plugin-info-dialog.php:1339
1015
  msgid "%s or higher"
1016
  msgstr ""
1017
 
1018
- #: includes/fs-plugin-info-dialog.php:1346
1019
  msgid "Compatible up to"
1020
  msgstr ""
1021
 
1022
- #: includes/fs-plugin-info-dialog.php:1354
1023
  msgid "Downloaded"
1024
  msgstr ""
1025
 
1026
- #: includes/fs-plugin-info-dialog.php:1358
1027
  msgid "%s time"
1028
  msgstr ""
1029
 
1030
- #: includes/fs-plugin-info-dialog.php:1360
1031
  msgid "%s times"
1032
  msgstr ""
1033
 
1034
- #: includes/fs-plugin-info-dialog.php:1370
1035
  msgid "WordPress.org Plugin Page"
1036
  msgstr ""
1037
 
1038
- #: includes/fs-plugin-info-dialog.php:1378
1039
  msgid "Plugin Homepage"
1040
  msgstr ""
1041
 
1042
- #: includes/fs-plugin-info-dialog.php:1386, includes/fs-plugin-info-dialog.php:1468
1043
  msgid "Donate to this plugin"
1044
  msgstr ""
1045
 
1046
- #: includes/fs-plugin-info-dialog.php:1393
1047
  msgid "Average Rating"
1048
  msgstr ""
1049
 
1050
- #: includes/fs-plugin-info-dialog.php:1400
1051
  msgid "based on %s"
1052
  msgstr ""
1053
 
1054
- #: includes/fs-plugin-info-dialog.php:1404
1055
  msgid "%s rating"
1056
  msgstr ""
1057
 
1058
- #: includes/fs-plugin-info-dialog.php:1406
1059
  msgid "%s ratings"
1060
  msgstr ""
1061
 
1062
- #: includes/fs-plugin-info-dialog.php:1421
1063
  msgid "%s star"
1064
  msgstr ""
1065
 
1066
- #: includes/fs-plugin-info-dialog.php:1423
1067
  msgid "%s stars"
1068
  msgstr ""
1069
 
1070
- #: includes/fs-plugin-info-dialog.php:1434
1071
  msgid "Click to see reviews that provided a rating of %s"
1072
  msgstr ""
1073
 
1074
- #: includes/fs-plugin-info-dialog.php:1447
1075
  msgid "Contributors"
1076
  msgstr ""
1077
 
1078
- #: includes/fs-plugin-info-dialog.php:1476, includes/fs-plugin-info-dialog.php:1478
1079
  msgid "Warning"
1080
  msgstr ""
1081
 
1082
- #: includes/fs-plugin-info-dialog.php:1476
1083
  msgid "This plugin has not been tested with your current version of WordPress."
1084
  msgstr ""
1085
 
1086
- #: includes/fs-plugin-info-dialog.php:1478
1087
  msgid "This plugin has not been marked as compatible with your version of WordPress."
1088
  msgstr ""
1089
 
1090
- #: includes/fs-plugin-info-dialog.php:1497
1091
  msgid "Paid add-on must be deployed to Freemius."
1092
  msgstr ""
1093
 
1094
- #: includes/fs-plugin-info-dialog.php:1498
1095
  msgid "Add-on must be deployed to WordPress.org or Freemius."
1096
  msgstr ""
1097
 
1098
- #: includes/fs-plugin-info-dialog.php:1519
1099
  msgid "Newer Version (%s) Installed"
1100
  msgstr ""
1101
 
1102
- #: includes/fs-plugin-info-dialog.php:1520
1103
  msgid "Newer Free Version (%s) Installed"
1104
  msgstr ""
1105
 
1106
- #: includes/fs-plugin-info-dialog.php:1527
1107
  msgid "Latest Version Installed"
1108
  msgstr ""
1109
 
1110
- #: includes/fs-plugin-info-dialog.php:1528
1111
  msgid "Latest Free Version Installed"
1112
  msgstr ""
1113
 
1114
- #: templates/account.php:92, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:26, templates/account/partials/site.php:311
1115
  msgid "Downgrading your plan"
1116
  msgstr ""
1117
 
1118
- #: templates/account.php:93, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:27, templates/account/partials/site.php:312
1119
  msgid "Cancelling the subscription"
1120
  msgstr ""
1121
 
1122
  #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
1123
- #: templates/account.php:95, templates/forms/subscription-cancellation.php:99, templates/account/partials/site.php:314
1124
  msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
1125
  msgstr ""
1126
 
1127
- #: templates/account.php:96, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:30, templates/account/partials/site.php:315
1128
  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."
1129
  msgstr ""
1130
 
1131
- #: templates/account.php:97, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:31
1132
  msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
1133
  msgstr ""
1134
 
1135
- #: templates/account.php:98, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:32, templates/account/partials/site.php:316
1136
  msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
1137
  msgstr ""
1138
 
1139
- #: templates/account.php:99, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:33, templates/account/partials/site.php:317
1140
  msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
1141
  msgstr ""
1142
 
1143
  #. translators: %s: Plan title (e.g. "Professional")
1144
- #: templates/account.php:101, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:35
1145
  msgid "Activate %s Plan"
1146
  msgstr ""
1147
 
1148
  #. translators: %s: Time period (e.g. Auto renews in "2 months")
1149
- #: templates/account.php:104, templates/account/partials/addon.php:38, templates/account/partials/site.php:291
1150
  msgid "Auto renews in %s"
1151
  msgstr ""
1152
 
1153
  #. translators: %s: Time period (e.g. Expires in "2 months")
1154
- #: templates/account.php:106, templates/account/partials/addon.php:40, templates/account/partials/site.php:293
1155
  msgid "Expires in %s"
1156
  msgstr ""
1157
 
1158
- #: templates/account.php:107
1159
  msgctxt "as synchronize license"
1160
  msgid "Sync License"
1161
  msgstr ""
1162
 
1163
- #: templates/account.php:108, templates/account/partials/addon.php:41
1164
  msgid "Cancel Trial"
1165
  msgstr ""
1166
 
1167
- #: templates/account.php:109, templates/account/partials/addon.php:42
1168
  msgid "Change Plan"
1169
  msgstr ""
1170
 
1171
- #: templates/account.php:110, templates/account/partials/addon.php:43
1172
  msgctxt "verb"
1173
  msgid "Upgrade"
1174
  msgstr ""
1175
 
1176
- #: templates/account.php:112, templates/account/partials/addon.php:45, templates/account/partials/site.php:318
1177
  msgctxt "verb"
1178
  msgid "Downgrade"
1179
  msgstr ""
1180
 
1181
- #: templates/account.php:114, templates/add-ons.php:246, templates/plugin-info/features.php:72, templates/account/partials/addon.php:47, templates/account/partials/site.php:33
1182
  msgid "Free"
1183
  msgstr ""
1184
 
1185
- #: templates/account.php:116, templates/debug.php:373, includes/customizer/class-fs-customizer-upsell-control.php:110, templates/account/partials/addon.php:49
1186
  msgctxt "as product pricing plan"
1187
  msgid "Plan"
1188
  msgstr ""
1189
 
1190
- #: templates/account.php:117
1191
  msgid "Bundle Plan"
1192
  msgstr ""
1193
 
1194
- #: templates/account.php:191
1195
  msgid "Free Trial"
1196
  msgstr ""
1197
 
1198
- #: templates/account.php:202
1199
  msgid "Account Details"
1200
  msgstr ""
1201
 
1202
- #: templates/account.php:209, templates/forms/data-debug-mode.php:33
1203
  msgid "Start Debug"
1204
  msgstr ""
1205
 
1206
- #: templates/account.php:211
1207
  msgid "Stop Debug"
1208
  msgstr ""
1209
 
1210
- #: templates/account.php:218
1211
  msgid "Billing & Invoices"
1212
  msgstr ""
1213
 
1214
- #: templates/account.php:229
1215
  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?"
1216
  msgstr ""
1217
 
1218
- #: templates/account.php:231
1219
  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?"
1220
  msgstr ""
1221
 
1222
- #: templates/account.php:234
1223
  msgid "Delete Account"
1224
  msgstr ""
1225
 
1226
- #: templates/account.php:246, templates/account/partials/addon.php:231, templates/account/partials/deactivate-license-button.php:35
1227
  msgid "Deactivate License"
1228
  msgstr ""
1229
 
1230
- #: templates/account.php:269, templates/forms/subscription-cancellation.php:125
1231
  msgid "Are you sure you want to proceed?"
1232
  msgstr ""
1233
 
1234
- #: templates/account.php:269, templates/account/partials/addon.php:255
1235
  msgid "Cancel Subscription"
1236
  msgstr ""
1237
 
1238
- #: templates/account.php:298, templates/account/partials/addon.php:340
1239
  msgctxt "as synchronize"
1240
  msgid "Sync"
1241
  msgstr ""
1242
 
1243
- #: templates/account.php:313, templates/debug.php:507
1244
  msgid "Name"
1245
  msgstr ""
1246
 
1247
- #: templates/account.php:319, templates/debug.php:508
1248
  msgid "Email"
1249
  msgstr ""
1250
 
1251
- #: templates/account.php:326, templates/debug.php:371, templates/debug.php:557
1252
  msgid "User ID"
1253
  msgstr ""
1254
 
1255
- #: templates/account.php:344, templates/account.php:637, templates/account.php:682, templates/debug.php:238, templates/debug.php:365, templates/debug.php:454, templates/debug.php:506, templates/debug.php:555, templates/debug.php:632, templates/account/payments.php:35, templates/debug/logger.php:21
1256
  msgid "ID"
1257
  msgstr ""
1258
 
1259
- #: templates/account.php:351
1260
  msgid "Site ID"
1261
  msgstr ""
1262
 
1263
- #: templates/account.php:354
1264
  msgid "No ID"
1265
  msgstr ""
1266
 
1267
- #: templates/account.php:359, templates/debug.php:245, templates/debug.php:374, templates/debug.php:458, templates/debug.php:510, templates/account/partials/site.php:227
1268
  msgid "Public Key"
1269
  msgstr ""
1270
 
1271
- #: templates/account.php:365, templates/debug.php:375, templates/debug.php:459, templates/debug.php:511, templates/account/partials/site.php:239
1272
  msgid "Secret Key"
1273
  msgstr ""
1274
 
1275
- #: templates/account.php:368
1276
  msgctxt "as secret encryption key missing"
1277
  msgid "No Secret"
1278
  msgstr ""
1279
 
1280
- #: templates/account.php:395, templates/account/partials/site.php:120, templates/account/partials/site.php:122
1281
  msgid "Trial"
1282
  msgstr ""
1283
 
1284
- #: templates/account.php:422, templates/debug.php:562, templates/account/partials/site.php:260
1285
  msgid "License Key"
1286
  msgstr ""
1287
 
1288
- #: templates/account.php:453
1289
  msgid "Join the Beta program"
1290
  msgstr ""
1291
 
1292
- #: templates/account.php:459
1293
  msgid "not verified"
1294
  msgstr ""
1295
 
1296
- #: templates/account.php:468, templates/account/partials/addon.php:190
1297
  msgid "Expired"
1298
  msgstr ""
1299
 
1300
- #: templates/account.php:528
1301
  msgid "Premium version"
1302
  msgstr ""
1303
 
1304
- #: templates/account.php:530
1305
  msgid "Free version"
1306
  msgstr ""
1307
 
1308
- #: templates/account.php:542
1309
  msgid "Verify Email"
1310
  msgstr ""
1311
 
1312
- #: templates/account.php:553
1313
  msgid "Download %s Version"
1314
  msgstr ""
1315
 
1316
- #: templates/account.php:568, templates/account.php:820, templates/account/partials/site.php:248, templates/account/partials/site.php:270
 
 
 
 
1317
  msgctxt "verb"
1318
  msgid "Show"
1319
  msgstr ""
1320
 
1321
- #: templates/account.php:583
1322
  msgid "What is your %s?"
1323
  msgstr ""
1324
 
1325
- #: templates/account.php:591, templates/account/billing.php:21
1326
  msgctxt "verb"
1327
  msgid "Edit"
1328
  msgstr ""
1329
 
1330
- #: templates/account.php:616
 
 
 
 
1331
  msgid "Sites"
1332
  msgstr ""
1333
 
1334
- #: templates/account.php:629
1335
  msgid "Search by address"
1336
  msgstr ""
1337
 
1338
- #: templates/account.php:638, templates/debug.php:368
1339
  msgid "Address"
1340
  msgstr ""
1341
 
1342
- #: templates/account.php:639
1343
  msgid "License"
1344
  msgstr ""
1345
 
1346
- #: templates/account.php:640
1347
  msgid "Plan"
1348
  msgstr ""
1349
 
1350
- #: templates/account.php:685
1351
  msgctxt "as software license"
1352
  msgid "License"
1353
  msgstr ""
1354
 
1355
- #: templates/account.php:814
1356
  msgctxt "verb"
1357
  msgid "Hide"
1358
  msgstr ""
1359
 
1360
- #: templates/account.php:836, templates/forms/data-debug-mode.php:31
1361
  msgid "Processing"
1362
  msgstr ""
1363
 
1364
- #: templates/account.php:839
1365
  msgid "Get updates for bleeding edge Beta versions of %s."
1366
  msgstr ""
1367
 
1368
- #: templates/account.php:897
1369
  msgid "Cancelling %s"
1370
  msgstr ""
1371
 
1372
- #: templates/account.php:897, templates/account.php:914, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:133
1373
  msgid "trial"
1374
  msgstr ""
1375
 
1376
- #: templates/account.php:912, templates/forms/deactivation/form.php:150
1377
  msgid "Cancelling %s..."
1378
  msgstr ""
1379
 
1380
- #: templates/account.php:915, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:134
1381
  msgid "subscription"
1382
  msgstr ""
1383
 
1384
- #: templates/account.php:929
1385
  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?"
1386
  msgstr ""
1387
 
@@ -1407,7 +1423,7 @@ msgctxt "installed add-on"
1407
  msgid "Installed"
1408
  msgstr ""
1409
 
1410
- #: templates/admin-notice.php:13, templates/forms/license-activation.php:207, templates/forms/resend-key.php:77
1411
  msgctxt "as close a window"
1412
  msgid "Dismiss"
1413
  msgstr ""
@@ -1446,157 +1462,165 @@ msgctxt "greeting"
1446
  msgid "Hey %s,"
1447
  msgstr ""
1448
 
1449
- #: templates/connect.php:154
1450
  msgid "Allow & Continue"
1451
  msgstr ""
1452
 
1453
- #: templates/connect.php:158
1454
  msgid "Re-send activation email"
1455
  msgstr ""
1456
 
1457
- #: templates/connect.php:162
1458
  msgid "Thanks %s!"
1459
  msgstr ""
1460
 
1461
- #: templates/connect.php:172, templates/forms/license-activation.php:46
1462
  msgid "Agree & Activate License"
1463
  msgstr ""
1464
 
1465
- #: templates/connect.php:181
1466
  msgid "Thanks for purchasing %s! To get started, please enter your license key:"
1467
  msgstr ""
1468
 
1469
- #: templates/connect.php:188
1470
  msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
1471
  msgstr ""
1472
 
1473
- #: templates/connect.php:189
1474
  msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
1475
  msgstr ""
1476
 
1477
- #: templates/connect.php:195
1478
  msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
1479
  msgstr ""
1480
 
1481
- #: templates/connect.php:196
1482
  msgid "Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
1483
  msgstr ""
1484
 
1485
- #: templates/connect.php:230
1486
  msgid "We're excited to introduce the Freemius network-level integration."
1487
  msgstr ""
1488
 
1489
- #: templates/connect.php:233
1490
  msgid "During the update process we detected %d site(s) that are still pending license activation."
1491
  msgstr ""
1492
 
1493
- #: templates/connect.php:235
1494
  msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
1495
  msgstr ""
1496
 
1497
- #: templates/connect.php:237
1498
  msgid "%s's paid features"
1499
  msgstr ""
1500
 
1501
- #: templates/connect.php:242
1502
  msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
1503
  msgstr ""
1504
 
1505
- #: templates/connect.php:244
1506
  msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
1507
  msgstr ""
1508
 
1509
- #: templates/connect.php:253, templates/forms/data-debug-mode.php:35, templates/forms/license-activation.php:49
1510
  msgid "License key"
1511
  msgstr ""
1512
 
1513
- #: templates/connect.php:256, templates/forms/license-activation.php:22
1514
  msgid "Can't find your license key?"
1515
  msgstr ""
1516
 
1517
- #: templates/connect.php:315, templates/connect.php:652, templates/forms/deactivation/retry-skip.php:20
1518
  msgctxt "verb"
1519
  msgid "Skip"
1520
  msgstr ""
1521
 
1522
- #: templates/connect.php:318
1523
  msgid "Delegate to Site Admins"
1524
  msgstr ""
1525
 
1526
- #: templates/connect.php:318
1527
  msgid "If you click it, this decision will be delegated to the sites administrators."
1528
  msgstr ""
1529
 
1530
- #: templates/connect.php:346
1531
  msgid "Your Profile Overview"
1532
  msgstr ""
1533
 
1534
- #: templates/connect.php:347
1535
  msgid "Name and email address"
1536
  msgstr ""
1537
 
1538
- #: templates/connect.php:352
1539
  msgid "Your Site Overview"
1540
  msgstr ""
1541
 
1542
- #: templates/connect.php:353
1543
- msgid "Site URL, WP version, PHP info, plugins & themes"
1544
  msgstr ""
1545
 
1546
- #: templates/connect.php:358
1547
  msgid "Admin Notices"
1548
  msgstr ""
1549
 
1550
- #: templates/connect.php:359, templates/connect.php:375
1551
  msgid "Updates, announcements, marketing, no spam"
1552
  msgstr ""
1553
 
1554
- #: templates/connect.php:364
1555
  msgid "Current %s Events"
1556
  msgstr ""
1557
 
1558
- #: templates/connect.php:365
1559
  msgid "Activation, deactivation and uninstall"
1560
  msgstr ""
1561
 
1562
- #: templates/connect.php:374
1563
  msgid "Newsletter"
1564
  msgstr ""
1565
 
1566
- #: templates/connect.php:391, templates/forms/license-activation.php:41
 
 
 
 
 
 
 
 
1567
  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."
1568
  msgstr ""
1569
 
1570
- #: templates/connect.php:396
1571
  msgid "What permissions are being granted?"
1572
  msgstr ""
1573
 
1574
- #: templates/connect.php:417
1575
  msgid "Don't have a license key?"
1576
  msgstr ""
1577
 
1578
- #: templates/connect.php:420
1579
  msgid "Have a license key?"
1580
  msgstr ""
1581
 
1582
- #: templates/connect.php:428
1583
  msgid "Privacy Policy"
1584
  msgstr ""
1585
 
1586
- #: templates/connect.php:430
1587
  msgid "License Agreement"
1588
  msgstr ""
1589
 
1590
- #: templates/connect.php:430
1591
  msgid "Terms of Service"
1592
  msgstr ""
1593
 
1594
- #: templates/connect.php:805
1595
  msgctxt "as in the process of sending an email"
1596
  msgid "Sending email"
1597
  msgstr ""
1598
 
1599
- #: templates/connect.php:806
1600
  msgctxt "as activating plugin"
1601
  msgid "Activating"
1602
  msgstr ""
@@ -1624,177 +1648,181 @@ msgctxt "as code debugging"
1624
  msgid "Debugging"
1625
  msgstr ""
1626
 
1627
- #: templates/debug.php:54, templates/debug.php:250, templates/debug.php:376, templates/debug.php:512
1628
  msgid "Actions"
1629
  msgstr ""
1630
 
1631
- #: templates/debug.php:64
1632
  msgid "Are you sure you want to delete all Freemius data?"
1633
  msgstr ""
1634
 
1635
- #: templates/debug.php:64
1636
  msgid "Delete All Accounts"
1637
  msgstr ""
1638
 
1639
- #: templates/debug.php:71
1640
  msgid "Clear API Cache"
1641
  msgstr ""
1642
 
1643
- #: templates/debug.php:79
1644
  msgid "Clear Updates Transients"
1645
  msgstr ""
1646
 
1647
- #: templates/debug.php:86
1648
  msgid "Sync Data From Server"
1649
  msgstr ""
1650
 
1651
- #: templates/debug.php:95
1652
  msgid "Migrate Options to Network"
1653
  msgstr ""
1654
 
1655
- #: templates/debug.php:100
1656
  msgid "Load DB Option"
1657
  msgstr ""
1658
 
1659
- #: templates/debug.php:103
1660
  msgid "Set DB Option"
1661
  msgstr ""
1662
 
1663
- #: templates/debug.php:182
1664
  msgid "Key"
1665
  msgstr ""
1666
 
1667
- #: templates/debug.php:183
1668
  msgid "Value"
1669
  msgstr ""
1670
 
1671
- #: templates/debug.php:199
1672
  msgctxt "as software development kit versions"
1673
  msgid "SDK Versions"
1674
  msgstr ""
1675
 
1676
- #: templates/debug.php:204
1677
  msgid "SDK Path"
1678
  msgstr ""
1679
 
1680
- #: templates/debug.php:205, templates/debug.php:244
1681
  msgid "Module Path"
1682
  msgstr ""
1683
 
1684
- #: templates/debug.php:206
1685
  msgid "Is Active"
1686
  msgstr ""
1687
 
1688
- #: templates/debug.php:234, templates/debug/plugins-themes-sync.php:35
1689
  msgid "Plugins"
1690
  msgstr ""
1691
 
1692
- #: templates/debug.php:234, templates/debug/plugins-themes-sync.php:56
1693
  msgid "Themes"
1694
  msgstr ""
1695
 
1696
- #: templates/debug.php:239, templates/debug.php:370, templates/debug.php:456, templates/debug/scheduled-crons.php:80
1697
  msgid "Slug"
1698
  msgstr ""
1699
 
1700
- #: templates/debug.php:241, templates/debug.php:455
1701
  msgid "Title"
1702
  msgstr ""
1703
 
1704
- #: templates/debug.php:242
1705
  msgctxt "as application program interface"
1706
  msgid "API"
1707
  msgstr ""
1708
 
1709
- #: templates/debug.php:243
1710
  msgid "Freemius State"
1711
  msgstr ""
1712
 
1713
- #: templates/debug.php:247
1714
  msgid "Network Blog"
1715
  msgstr ""
1716
 
1717
- #: templates/debug.php:248
1718
  msgid "Network User"
1719
  msgstr ""
1720
 
1721
- #: templates/debug.php:285
1722
  msgctxt "as connection was successful"
1723
  msgid "Connected"
1724
  msgstr ""
1725
 
1726
- #: templates/debug.php:286
1727
  msgctxt "as connection blocked"
1728
  msgid "Blocked"
1729
  msgstr ""
1730
 
1731
- #: templates/debug.php:322
1732
  msgid "Simulate Trial Promotion"
1733
  msgstr ""
1734
 
1735
- #: templates/debug.php:334
1736
  msgid "Simulate Network Upgrade"
1737
  msgstr ""
1738
 
1739
- #: templates/debug.php:359
1740
  msgid "%s Installs"
1741
  msgstr ""
1742
 
1743
- #: templates/debug.php:361
1744
  msgctxt "like websites"
1745
  msgid "Sites"
1746
  msgstr ""
1747
 
1748
- #: templates/debug.php:367, templates/account/partials/site.php:156
1749
  msgid "Blog ID"
1750
  msgstr ""
1751
 
1752
- #: templates/debug.php:372
1753
  msgid "License ID"
1754
  msgstr ""
1755
 
1756
- #: templates/debug.php:436, templates/debug.php:535, templates/account/partials/addon.php:435
1757
  msgctxt "verb"
1758
  msgid "Delete"
1759
  msgstr ""
1760
 
1761
- #: templates/debug.php:450
1762
  msgid "Add Ons of module %s"
1763
  msgstr ""
1764
 
1765
- #: templates/debug.php:502
1766
  msgid "Users"
1767
  msgstr ""
1768
 
1769
- #: templates/debug.php:509
1770
  msgid "Verified"
1771
  msgstr ""
1772
 
1773
- #: templates/debug.php:551
1774
  msgid "%s Licenses"
1775
  msgstr ""
1776
 
1777
- #: templates/debug.php:556
1778
  msgid "Plugin ID"
1779
  msgstr ""
1780
 
1781
- #: templates/debug.php:558
1782
  msgid "Plan ID"
1783
  msgstr ""
1784
 
1785
- #: templates/debug.php:559
1786
  msgid "Quota"
1787
  msgstr ""
1788
 
1789
- #: templates/debug.php:560
1790
  msgid "Activated"
1791
  msgstr ""
1792
 
1793
- #: templates/debug.php:561
1794
  msgid "Blocking"
1795
  msgstr ""
1796
 
1797
- #: templates/debug.php:563
 
 
 
 
1798
  msgctxt "as expiration date"
1799
  msgid "Expiration"
1800
  msgstr ""
@@ -1839,10 +1867,6 @@ msgstr ""
1839
  msgid "Download"
1840
  msgstr ""
1841
 
1842
- #: templates/debug.php:631, templates/debug/logger.php:22
1843
- msgid "Type"
1844
- msgstr ""
1845
-
1846
  #: templates/debug.php:636, templates/debug/logger.php:26
1847
  msgid "Timestamp"
1848
  msgstr ""
@@ -2029,135 +2053,135 @@ msgstr ""
2029
  msgid "Apply to become an affiliate"
2030
  msgstr ""
2031
 
2032
- #: templates/forms/affiliation.php:104
2033
  msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
2034
  msgstr ""
2035
 
2036
- #: templates/forms/affiliation.php:119
2037
  msgid "Thank you for applying for our affiliate program, we'll review your details during the next 14 days and will get back to you with further information."
2038
  msgstr ""
2039
 
2040
- #: templates/forms/affiliation.php:122
2041
  msgid "Your affiliation account was temporarily suspended."
2042
  msgstr ""
2043
 
2044
- #: templates/forms/affiliation.php:125
2045
  msgid "Thank you for applying for our affiliate program, unfortunately, we've decided at this point to reject your application. Please try again in 30 days."
2046
  msgstr ""
2047
 
2048
- #: templates/forms/affiliation.php:128
2049
  msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
2050
  msgstr ""
2051
 
2052
- #: templates/forms/affiliation.php:141
2053
  msgid "Like the %s? Become our ambassador and earn cash ;-)"
2054
  msgstr ""
2055
 
2056
- #: templates/forms/affiliation.php:142
2057
  msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
2058
  msgstr ""
2059
 
2060
- #: templates/forms/affiliation.php:145
2061
  msgid "Program Summary"
2062
  msgstr ""
2063
 
2064
- #: templates/forms/affiliation.php:147
2065
  msgid "%s commission when a customer purchases a new license."
2066
  msgstr ""
2067
 
2068
- #: templates/forms/affiliation.php:149
2069
  msgid "Get commission for automated subscription renewals."
2070
  msgstr ""
2071
 
2072
- #: templates/forms/affiliation.php:152
2073
  msgid "%s tracking cookie after the first visit to maximize earnings potential."
2074
  msgstr ""
2075
 
2076
- #: templates/forms/affiliation.php:155
2077
  msgid "Unlimited commissions."
2078
  msgstr ""
2079
 
2080
- #: templates/forms/affiliation.php:157
2081
  msgid "%s minimum payout amount."
2082
  msgstr ""
2083
 
2084
- #: templates/forms/affiliation.php:158
2085
  msgid "Payouts are in USD and processed monthly via PayPal."
2086
  msgstr ""
2087
 
2088
- #: templates/forms/affiliation.php:159
2089
  msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
2090
  msgstr ""
2091
 
2092
- #: templates/forms/affiliation.php:162
2093
  msgid "Affiliate"
2094
  msgstr ""
2095
 
2096
- #: templates/forms/affiliation.php:165, templates/forms/resend-key.php:23
2097
  msgid "Email address"
2098
  msgstr ""
2099
 
2100
- #: templates/forms/affiliation.php:169
2101
  msgid "Full name"
2102
  msgstr ""
2103
 
2104
- #: templates/forms/affiliation.php:173
2105
  msgid "PayPal account email address"
2106
  msgstr ""
2107
 
2108
- #: templates/forms/affiliation.php:177
2109
  msgid "Where are you going to promote the %s?"
2110
  msgstr ""
2111
 
2112
- #: templates/forms/affiliation.php:179
2113
  msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
2114
  msgstr ""
2115
 
2116
- #: templates/forms/affiliation.php:181
2117
  msgid "Add another domain"
2118
  msgstr ""
2119
 
2120
- #: templates/forms/affiliation.php:185
2121
  msgid "Extra Domains"
2122
  msgstr ""
2123
 
2124
- #: templates/forms/affiliation.php:186
2125
  msgid "Extra domains where you will be marketing the product from."
2126
  msgstr ""
2127
 
2128
- #: templates/forms/affiliation.php:196
2129
  msgid "Promotion methods"
2130
  msgstr ""
2131
 
2132
- #: templates/forms/affiliation.php:199
2133
  msgid "Social media (Facebook, Twitter, etc.)"
2134
  msgstr ""
2135
 
2136
- #: templates/forms/affiliation.php:203
2137
  msgid "Mobile apps"
2138
  msgstr ""
2139
 
2140
- #: templates/forms/affiliation.php:207
2141
  msgid "Website, email, and social media statistics (optional)"
2142
  msgstr ""
2143
 
2144
- #: templates/forms/affiliation.php:210
2145
  msgid "Please feel free to provide any relevant website or social media statistics, e.g. monthly unique site visits, number of email subscribers, followers, etc. (we will keep this information confidential)."
2146
  msgstr ""
2147
 
2148
- #: templates/forms/affiliation.php:214
2149
  msgid "How will you promote us?"
2150
  msgstr ""
2151
 
2152
- #: templates/forms/affiliation.php:217
2153
  msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
2154
  msgstr ""
2155
 
2156
- #: templates/forms/affiliation.php:223, templates/forms/resend-key.php:22
2157
  msgid "Cancel"
2158
  msgstr ""
2159
 
2160
- #: templates/forms/affiliation.php:225
2161
  msgid "Become an affiliate"
2162
  msgstr ""
2163
 
@@ -2185,6 +2209,10 @@ msgstr ""
2185
  msgid "Update License"
2186
  msgstr ""
2187
 
 
 
 
 
2188
  #: templates/forms/optout.php:30
2189
  msgctxt "verb"
2190
  msgid "Opt Out"
@@ -2195,14 +2223,42 @@ msgctxt "verb"
2195
  msgid "Opt In"
2196
  msgstr ""
2197
 
2198
- #: templates/forms/optout.php:33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2199
  msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking."
2200
  msgstr ""
2201
 
2202
- #: templates/forms/optout.php:35
 
 
 
 
2203
  msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
2204
  msgstr ""
2205
 
 
 
 
 
 
 
 
 
2206
  #: templates/forms/premium-versions-upgrade-handler.php:40
2207
  msgid "There is a new version of %s available."
2208
  msgstr ""
@@ -2272,6 +2328,23 @@ msgstr ""
2272
  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."
2273
  msgstr ""
2274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2275
  #: templates/js/style-premium-theme.php:39
2276
  msgid "Premium"
2277
  msgstr ""
@@ -2394,19 +2467,19 @@ msgstr ""
2394
  msgid "switching"
2395
  msgstr ""
2396
 
2397
- #: templates/forms/deactivation/form.php:365
2398
  msgid "Submit & %s"
2399
  msgstr ""
2400
 
2401
- #: templates/forms/deactivation/form.php:386
2402
  msgid "Kindly tell us the reason so we can improve."
2403
  msgstr ""
2404
 
2405
- #: templates/forms/deactivation/form.php:511
2406
  msgid "Yes - %s"
2407
  msgstr ""
2408
 
2409
- #: templates/forms/deactivation/form.php:518
2410
  msgid "Skip & %s"
2411
  msgstr ""
2412
 
1
+ # Copyright (C) 2020 freemius
2
  # This file is distributed under the same license as the freemius package.
3
  msgid ""
4
  msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
+ #: includes/class-freemius.php:1911, templates/account.php:910
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:1918
24
  msgid "Would you like to proceed with the update?"
25
  msgstr ""
26
 
27
+ #: includes/class-freemius.php:2130
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:2132
32
  msgid "Error"
33
  msgstr ""
34
 
35
+ #: includes/class-freemius.php:2532
36
  msgid "I found a better %s"
37
  msgstr ""
38
 
39
+ #: includes/class-freemius.php:2534
40
  msgid "What's the %s's name?"
41
  msgstr ""
42
 
43
+ #: includes/class-freemius.php:2540
44
  msgid "It's a temporary %s. I'm just debugging an issue."
45
  msgstr ""
46
 
47
+ #: includes/class-freemius.php:2542
48
  msgid "Deactivation"
49
  msgstr ""
50
 
51
+ #: includes/class-freemius.php:2543
52
  msgid "Theme Switch"
53
  msgstr ""
54
 
55
+ #: includes/class-freemius.php:2552, templates/forms/resend-key.php:24, templates/forms/user-change.php:29
56
  msgid "Other"
57
  msgstr ""
58
 
59
+ #: includes/class-freemius.php:2560
60
  msgid "I no longer need the %s"
61
  msgstr ""
62
 
63
+ #: includes/class-freemius.php:2567
64
  msgid "I only needed the %s for a short period"
65
  msgstr ""
66
 
67
+ #: includes/class-freemius.php:2573
68
  msgid "The %s broke my site"
69
  msgstr ""
70
 
71
+ #: includes/class-freemius.php:2580
72
  msgid "The %s suddenly stopped working"
73
  msgstr ""
74
 
75
+ #: includes/class-freemius.php:2590
76
  msgid "I can't pay for it anymore"
77
  msgstr ""
78
 
79
+ #: includes/class-freemius.php:2592
80
  msgid "What price would you feel comfortable paying?"
81
  msgstr ""
82
 
83
+ #: includes/class-freemius.php:2598
84
  msgid "I don't like to share my information with you"
85
  msgstr ""
86
 
87
+ #: includes/class-freemius.php:2619
88
  msgid "The %s didn't work"
89
  msgstr ""
90
 
91
+ #: includes/class-freemius.php:2629
92
  msgid "I couldn't understand how to make it work"
93
  msgstr ""
94
 
95
+ #: includes/class-freemius.php:2637
96
  msgid "The %s is great, but I need specific feature that you don't support"
97
  msgstr ""
98
 
99
+ #: includes/class-freemius.php:2639
100
  msgid "What feature?"
101
  msgstr ""
102
 
103
+ #: includes/class-freemius.php:2643
104
  msgid "The %s is not working"
105
  msgstr ""
106
 
107
+ #: includes/class-freemius.php:2645
108
  msgid "Kindly share what didn't work so we can fix it for future users..."
109
  msgstr ""
110
 
111
+ #: includes/class-freemius.php:2649
112
  msgid "It's not what I was looking for"
113
  msgstr ""
114
 
115
+ #: includes/class-freemius.php:2651
116
  msgid "What you've been looking for?"
117
  msgstr ""
118
 
119
+ #: includes/class-freemius.php:2655
120
  msgid "The %s didn't work as expected"
121
  msgstr ""
122
 
123
+ #: includes/class-freemius.php:2657
124
  msgid "What did you expect?"
125
  msgstr ""
126
 
127
+ #: includes/class-freemius.php:3512, templates/debug.php:20
128
  msgid "Freemius Debug"
129
  msgstr ""
130
 
131
+ #: includes/class-freemius.php:4264
132
  msgid "I don't know what is cURL or how to install it, help me!"
133
  msgstr ""
134
 
135
+ #: includes/class-freemius.php:4266
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:4273
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:4378
144
  msgid "Yes - do your thing"
145
  msgstr ""
146
 
147
+ #: includes/class-freemius.php:4383
148
  msgid "No - just deactivate"
149
  msgstr ""
150
 
151
+ #: includes/class-freemius.php:4428, includes/class-freemius.php:4922, includes/class-freemius.php:6178, includes/class-freemius.php:13282, includes/class-freemius.php:14000, includes/class-freemius.php:17451, includes/class-freemius.php:17556, includes/class-freemius.php:17731, includes/class-freemius.php:19965, includes/class-freemius.php:20323, includes/class-freemius.php:20333, includes/class-freemius.php:20997, includes/class-freemius.php:21903, includes/class-freemius.php:22036, includes/class-freemius.php:22192, templates/add-ons.php:57
152
  msgctxt "exclamation"
153
  msgid "Oops"
154
  msgstr ""
155
 
156
+ #: includes/class-freemius.php:4497
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:4919
161
  msgctxt "addonX cannot run without pluginY"
162
  msgid "%s cannot run without %s."
163
  msgstr ""
164
 
165
+ #: includes/class-freemius.php:4920
166
  msgctxt "addonX cannot run..."
167
  msgid "%s cannot run without the plugin."
168
  msgstr ""
169
 
170
+ #: includes/class-freemius.php:5119, includes/class-freemius.php:5144, includes/class-freemius.php:21068
171
  msgid "Unexpected API error. Please contact the %s's author with the following error."
172
  msgstr ""
173
 
174
+ #: includes/class-freemius.php:5844
175
  msgid "Premium %s version was successfully activated."
176
  msgstr ""
177
 
178
+ #: includes/class-freemius.php:5856, includes/class-freemius.php:7755
179
  msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
180
  msgid "W00t"
181
  msgstr ""
182
 
183
+ #: includes/class-freemius.php:5871
184
  msgid "You have a %s license."
185
  msgstr ""
186
 
187
+ #: includes/class-freemius.php:5875, includes/class-freemius.php:16850, includes/class-freemius.php:16861, includes/class-freemius.php:20234, includes/class-freemius.php:20584, includes/class-freemius.php:20653, includes/class-freemius.php:20818
188
  msgctxt "interjection expressing joy or exuberance"
189
  msgid "Yee-haw"
190
  msgstr ""
191
 
192
+ #: includes/class-freemius.php:6161
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:6165
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:6174, templates/add-ons.php:186, templates/account/partials/addon.php:381
201
  msgid "More information about %s"
202
  msgstr ""
203
 
204
+ #: includes/class-freemius.php:6175
205
  msgid "Purchase License"
206
  msgstr ""
207
 
208
+ #: includes/class-freemius.php:7114, templates/connect.php:171
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:7118
213
  msgid "start the trial"
214
  msgstr ""
215
 
216
+ #: includes/class-freemius.php:7119, templates/connect.php:175
217
  msgid "complete the install"
218
  msgstr ""
219
 
220
+ #: includes/class-freemius.php:7237
221
  msgid "You are just one step away - %s"
222
  msgstr ""
223
 
224
+ #: includes/class-freemius.php:7240
225
  msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
226
  msgid "Complete \"%s\" Activation Now"
227
  msgstr ""
228
 
229
+ #: includes/class-freemius.php:7318
230
  msgid "We made a few tweaks to the %s, %s"
231
  msgstr ""
232
 
233
+ #: includes/class-freemius.php:7322
234
  msgid "Opt in to make \"%s\" better!"
235
  msgstr ""
236
 
237
+ #: includes/class-freemius.php:7754
238
  msgid "The upgrade of %s was successfully completed."
239
  msgstr ""
240
 
241
+ #: includes/class-freemius.php:10223, includes/class-fs-plugin-updater.php:1044, includes/class-fs-plugin-updater.php:1239, includes/class-fs-plugin-updater.php:1246, templates/auto-installation.php:32
242
  msgid "Add-On"
243
  msgstr ""
244
 
245
+ #: includes/class-freemius.php:10225, templates/account.php:392, templates/account.php:400, templates/debug.php:358, templates/debug.php:549
246
  msgid "Plugin"
247
  msgstr ""
248
 
249
+ #: includes/class-freemius.php:10226, templates/account.php:393, templates/account.php:401, templates/debug.php:358, templates/debug.php:549, templates/forms/deactivation/form.php:71
250
  msgid "Theme"
251
  msgstr ""
252
 
253
+ #: includes/class-freemius.php:13180
254
  msgid "An unknown error has occurred while trying to set the user's beta mode."
255
  msgstr ""
256
 
257
+ #: includes/class-freemius.php:13253
258
+ msgid "Invalid new user ID or email address."
259
+ msgstr ""
260
+
261
+ #: includes/class-freemius.php:13283, includes/class-freemius.php:22147
262
+ msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
263
+ msgstr ""
264
+
265
+ #: includes/class-freemius.php:13284, includes/class-freemius.php:22148
266
+ msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
267
+ msgstr ""
268
+
269
+ #: includes/class-freemius.php:13291, includes/class-freemius.php:22155
270
+ msgid "Change Ownership"
271
+ msgstr ""
272
+
273
+ #: includes/class-freemius.php:13867
274
  msgid "Invalid site details collection."
275
  msgstr ""
276
 
277
+ #: includes/class-freemius.php:13987
278
  msgid "We couldn't find your email address in the system, are you sure it's the right address?"
279
  msgstr ""
280
 
281
+ #: includes/class-freemius.php:13989
282
  msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
283
  msgstr ""
284
 
285
+ #: includes/class-freemius.php:14263
286
  msgid "Account is pending activation."
287
  msgstr ""
288
 
289
+ #: includes/class-freemius.php:14375, templates/forms/premium-versions-upgrade-handler.php:47
290
  msgid "Buy a license now"
291
  msgstr ""
292
 
293
+ #: includes/class-freemius.php:14387, templates/forms/premium-versions-upgrade-handler.php:46
294
  msgid "Renew your license now"
295
  msgstr ""
296
 
297
+ #: includes/class-freemius.php:14391
298
  msgid "%s to access version %s security & feature updates, and support."
299
  msgstr ""
300
 
301
+ #: includes/class-freemius.php:16832
302
  msgid "%s activation was successfully completed."
303
  msgstr ""
304
 
305
+ #: includes/class-freemius.php:16846
306
  msgid "Your account was successfully activated with the %s plan."
307
  msgstr ""
308
 
309
+ #: includes/class-freemius.php:16857, includes/class-freemius.php:20649
310
  msgid "Your trial has been successfully started."
311
  msgstr ""
312
 
313
+ #: includes/class-freemius.php:17449, includes/class-freemius.php:17554, includes/class-freemius.php:17729
314
  msgid "Couldn't activate %s."
315
  msgstr ""
316
 
317
+ #: includes/class-freemius.php:17450, includes/class-freemius.php:17555, includes/class-freemius.php:17730
318
  msgid "Please contact us with the following message:"
319
  msgstr ""
320
 
321
+ #: includes/class-freemius.php:17551, templates/forms/data-debug-mode.php:162
322
  msgid "An unknown error has occurred."
323
  msgstr ""
324
 
325
+ #: includes/class-freemius.php:18087, includes/class-freemius.php:23208
326
  msgid "Upgrade"
327
  msgstr ""
328
 
329
+ #: includes/class-freemius.php:18093
330
  msgid "Start Trial"
331
  msgstr ""
332
 
333
+ #: includes/class-freemius.php:18095
334
  msgid "Pricing"
335
  msgstr ""
336
 
337
+ #: includes/class-freemius.php:18175, includes/class-freemius.php:18177
338
  msgid "Affiliation"
339
  msgstr ""
340
 
341
+ #: includes/class-freemius.php:18205, includes/class-freemius.php:18207, templates/account.php:240, templates/debug.php:324
342
  msgid "Account"
343
  msgstr ""
344
 
345
+ #: includes/class-freemius.php:18221, includes/class-freemius.php:18223, includes/customizer/class-fs-customizer-support-section.php:60
346
  msgid "Contact Us"
347
  msgstr ""
348
 
349
+ #: includes/class-freemius.php:18234, includes/class-freemius.php:18236, includes/class-freemius.php:23222, templates/account.php:119, templates/account/partials/addon.php:44
350
  msgid "Add-Ons"
351
  msgstr ""
352
 
353
+ #: includes/class-freemius.php:18270
354
  msgctxt "ASCII arrow left icon"
355
  msgid "&#x2190;"
356
  msgstr ""
357
 
358
+ #: includes/class-freemius.php:18270
359
  msgctxt "ASCII arrow right icon"
360
  msgid "&#x27a4;"
361
  msgstr ""
362
 
363
+ #: includes/class-freemius.php:18272, templates/pricing.php:109
364
  msgctxt "noun"
365
  msgid "Pricing"
366
  msgstr ""
367
 
368
+ #: includes/class-freemius.php:18485, includes/customizer/class-fs-customizer-support-section.php:67
369
  msgid "Support Forum"
370
  msgstr ""
371
 
372
+ #: includes/class-freemius.php:19459
373
  msgid "Your email has been successfully verified - you are AWESOME!"
374
  msgstr ""
375
 
376
+ #: includes/class-freemius.php:19460
377
  msgctxt "a positive response"
378
  msgid "Right on"
379
  msgstr ""
380
 
381
+ #: includes/class-freemius.php:19966
382
  msgid "seems like the key you entered doesn't match our records."
383
  msgstr ""
384
 
385
+ #: includes/class-freemius.php:19990
386
  msgid "Debug mode was successfully enabled and will be automatically disabled in 60 min. You can also disable it earlier by clicking the \"Stop Debug\" link."
387
  msgstr ""
388
 
389
+ #: includes/class-freemius.php:20225
390
  msgid "Your %s Add-on plan was successfully upgraded."
391
  msgstr ""
392
 
393
+ #: includes/class-freemius.php:20227
394
  msgid "%s Add-on was successfully purchased."
395
  msgstr ""
396
 
397
+ #: includes/class-freemius.php:20230
398
  msgid "Download the latest version"
399
  msgstr ""
400
 
401
+ #: includes/class-freemius.php:20316
402
  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"
403
  msgstr ""
404
 
405
+ #: includes/class-freemius.php:20322, includes/class-freemius.php:20332, includes/class-freemius.php:20777, includes/class-freemius.php:20866
406
  msgid "Error received from the server:"
407
  msgstr ""
408
 
409
+ #: includes/class-freemius.php:20332
410
  msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
411
  msgstr ""
412
 
413
+ #: includes/class-freemius.php:20546, includes/class-freemius.php:20782, includes/class-freemius.php:20837, includes/class-freemius.php:20944
414
  msgctxt "something somebody says when they are thinking about what you have just said."
415
  msgid "Hmm"
416
  msgstr ""
417
 
418
+ #: includes/class-freemius.php:20559
419
  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."
420
  msgstr ""
421
 
422
+ #: includes/class-freemius.php:20560, templates/account.php:121, templates/add-ons.php:250, templates/account/partials/addon.php:46
423
  msgctxt "trial period"
424
  msgid "Trial"
425
  msgstr ""
426
 
427
+ #: includes/class-freemius.php:20565
428
  msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
429
  msgstr ""
430
 
431
+ #: includes/class-freemius.php:20569, includes/class-freemius.php:20628
432
  msgid "Please contact us here"
433
  msgstr ""
434
 
435
+ #: includes/class-freemius.php:20580
436
  msgid "Your plan was successfully activated."
437
  msgstr ""
438
 
439
+ #: includes/class-freemius.php:20581
440
  msgid "Your plan was successfully upgraded."
441
  msgstr ""
442
 
443
+ #: includes/class-freemius.php:20598
444
  msgid "Your plan was successfully changed to %s."
445
  msgstr ""
446
 
447
+ #: includes/class-freemius.php:20614
448
  msgid "Your license has expired. You can still continue using the free %s forever."
449
  msgstr ""
450
 
451
+ #: includes/class-freemius.php:20616
452
  msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
453
  msgstr ""
454
 
455
+ #: includes/class-freemius.php:20624
456
  msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
457
  msgstr ""
458
 
459
+ #: includes/class-freemius.php:20637
460
  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."
461
  msgstr ""
462
 
463
+ #: includes/class-freemius.php:20663
464
  msgid "Your free trial has expired. You can still continue using all our free features."
465
  msgstr ""
466
 
467
+ #: includes/class-freemius.php:20665
468
  msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
469
  msgstr ""
470
 
471
+ #: includes/class-freemius.php:20773
472
  msgid "It looks like the license could not be activated."
473
  msgstr ""
474
 
475
+ #: includes/class-freemius.php:20815
476
  msgid "Your license was successfully activated."
477
  msgstr ""
478
 
479
+ #: includes/class-freemius.php:20841
480
  msgid "It looks like your site currently doesn't have an active license."
481
  msgstr ""
482
 
483
+ #: includes/class-freemius.php:20865
484
  msgid "It looks like the license deactivation failed."
485
  msgstr ""
486
 
487
+ #: includes/class-freemius.php:20894
488
+ msgid "Your %s license was successfully deactivated."
489
+ msgstr ""
490
+
491
+ #: includes/class-freemius.php:20895
492
  msgid "Your license was successfully deactivated, you are back to the %s plan."
493
  msgstr ""
494
 
495
+ #: includes/class-freemius.php:20898
496
  msgid "O.K"
497
  msgstr ""
498
 
499
+ #: includes/class-freemius.php:20951
500
  msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
501
  msgstr ""
502
 
503
+ #: includes/class-freemius.php:20960
504
  msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
505
  msgstr ""
506
 
507
+ #: includes/class-freemius.php:21002
508
  msgid "You are already running the %s in a trial mode."
509
  msgstr ""
510
 
511
+ #: includes/class-freemius.php:21013
512
  msgid "You already utilized a trial before."
513
  msgstr ""
514
 
515
+ #: includes/class-freemius.php:21027
516
  msgid "Plan %s do not exist, therefore, can't start a trial."
517
  msgstr ""
518
 
519
+ #: includes/class-freemius.php:21038
520
  msgid "Plan %s does not support a trial period."
521
  msgstr ""
522
 
523
+ #: includes/class-freemius.php:21049
524
  msgid "None of the %s's plans supports a trial period."
525
  msgstr ""
526
 
527
+ #: includes/class-freemius.php:21099
528
  msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
529
  msgstr ""
530
 
531
+ #: includes/class-freemius.php:21135
532
  msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
533
  msgstr ""
534
 
535
+ #: includes/class-freemius.php:21154
536
  msgid "Your %s free trial was successfully cancelled."
537
  msgstr ""
538
 
539
+ #: includes/class-freemius.php:21470
540
  msgid "Version %s was released."
541
  msgstr ""
542
 
543
+ #: includes/class-freemius.php:21470
544
  msgid "Please download %s."
545
  msgstr ""
546
 
547
+ #: includes/class-freemius.php:21477
548
  msgid "the latest %s version here"
549
  msgstr ""
550
 
551
+ #: includes/class-freemius.php:21482
552
  msgid "New"
553
  msgstr ""
554
 
555
+ #: includes/class-freemius.php:21487
556
  msgid "Seems like you got the latest release."
557
  msgstr ""
558
 
559
+ #: includes/class-freemius.php:21488
560
  msgid "You are all good!"
561
  msgstr ""
562
 
563
+ #: includes/class-freemius.php:21791
564
  msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
565
  msgstr ""
566
 
567
+ #: includes/class-freemius.php:21931
568
  msgid "Site successfully opted in."
569
  msgstr ""
570
 
571
+ #: includes/class-freemius.php:21932, includes/class-freemius.php:22918
572
  msgid "Awesome"
573
  msgstr ""
574
 
575
+ #: includes/class-freemius.php:21948, templates/forms/optout.php:41
576
  msgid "We appreciate your help in making the %s better by letting us track some usage data."
577
  msgstr ""
578
 
579
+ #: includes/class-freemius.php:21949
580
  msgid "Thank you!"
581
  msgstr ""
582
 
583
+ #: includes/class-freemius.php:21956
584
  msgid "We will no longer be sending any usage data of %s on %s to %s."
585
  msgstr ""
586
 
587
+ #: includes/class-freemius.php:22114
588
  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."
589
  msgstr ""
590
 
591
+ #: includes/class-freemius.php:22120
592
  msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
593
  msgstr ""
594
 
595
+ #: includes/class-freemius.php:22125
596
  msgid "%s is the new owner of the account."
597
  msgstr ""
598
 
599
+ #: includes/class-freemius.php:22127
600
  msgctxt "as congratulations"
601
  msgid "Congrats"
602
  msgstr ""
603
 
604
+ #: includes/class-freemius.php:22163
 
 
 
 
 
 
 
 
 
 
 
 
605
  msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
606
  msgstr ""
607
 
608
+ #: includes/class-freemius.php:22175
609
  msgid "Please provide your full name."
610
  msgstr ""
611
 
612
+ #: includes/class-freemius.php:22180
613
  msgid "Your name was successfully updated."
614
  msgstr ""
615
 
616
+ #: includes/class-freemius.php:22241
617
  msgid "You have successfully updated your %s."
618
  msgstr ""
619
 
620
+ #: includes/class-freemius.php:22381
621
  msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
622
  msgstr ""
623
 
624
+ #: includes/class-freemius.php:22382
625
  msgctxt "advance notice of something that will need attention."
626
  msgid "Heads up"
627
  msgstr ""
628
 
629
+ #: includes/class-freemius.php:22958
630
  msgctxt "exclamation"
631
  msgid "Hey"
632
  msgstr ""
633
 
634
+ #: includes/class-freemius.php:22958
635
  msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
636
  msgstr ""
637
 
638
+ #: includes/class-freemius.php:22966
639
  msgid "No commitment for %s days - cancel anytime!"
640
  msgstr ""
641
 
642
+ #: includes/class-freemius.php:22967
643
  msgid "No credit card required"
644
  msgstr ""
645
 
646
+ #: includes/class-freemius.php:22974, templates/forms/trial-start.php:53
647
  msgctxt "call to action"
648
  msgid "Start free trial"
649
  msgstr ""
650
 
651
+ #: includes/class-freemius.php:23051
652
  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!"
653
  msgstr ""
654
 
655
+ #: includes/class-freemius.php:23060
656
  msgid "Learn more"
657
  msgstr ""
658
 
659
+ #: includes/class-freemius.php:23246, templates/account.php:556, templates/account.php:706, templates/connect.php:179, templates/connect.php:455, templates/forms/license-activation.php:27, templates/account/partials/addon.php:321
660
  msgid "Activate License"
661
  msgstr ""
662
 
663
+ #: includes/class-freemius.php:23247, templates/account.php:650, templates/account.php:705, templates/account/partials/addon.php:322, templates/account/partials/site.php:271
664
  msgid "Change License"
665
  msgstr ""
666
 
667
+ #: includes/class-freemius.php:23356, templates/account/partials/site.php:169
668
  msgid "Opt Out"
669
  msgstr ""
670
 
671
+ #: includes/class-freemius.php:23358, includes/class-freemius.php:23364, templates/account/partials/site.php:49, templates/account/partials/site.php:169
672
  msgid "Opt In"
673
  msgstr ""
674
 
675
+ #: includes/class-freemius.php:23592
676
  msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
677
  msgstr ""
678
 
679
+ #: includes/class-freemius.php:23600
680
  msgid "Activate %s features"
681
  msgstr ""
682
 
683
+ #: includes/class-freemius.php:23613
684
  msgid "Please follow these steps to complete the upgrade"
685
  msgstr ""
686
 
687
+ #: includes/class-freemius.php:23617
688
  msgid "Download the latest %s version"
689
  msgstr ""
690
 
691
+ #: includes/class-freemius.php:23621
692
  msgid "Upload and activate the downloaded version"
693
  msgstr ""
694
 
695
+ #: includes/class-freemius.php:23623
696
  msgid "How to upload and activate?"
697
  msgstr ""
698
 
699
+ #: includes/class-freemius.php:23757
700
  msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
701
  msgstr ""
702
 
703
+ #: includes/class-freemius.php:23926
704
  msgid "Auto installation only works for opted-in users."
705
  msgstr ""
706
 
707
+ #: includes/class-freemius.php:23936, includes/class-freemius.php:23969, includes/class-fs-plugin-updater.php:1218, includes/class-fs-plugin-updater.php:1232
708
  msgid "Invalid module ID."
709
  msgstr ""
710
 
711
+ #: includes/class-freemius.php:23945, includes/class-fs-plugin-updater.php:1254
712
  msgid "Premium version already active."
713
  msgstr ""
714
 
715
+ #: includes/class-freemius.php:23952
716
  msgid "You do not have a valid license to access the premium version."
717
  msgstr ""
718
 
719
+ #: includes/class-freemius.php:23959
720
  msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
721
  msgstr ""
722
 
723
+ #: includes/class-freemius.php:23977, includes/class-fs-plugin-updater.php:1253
724
  msgid "Premium add-on version already installed."
725
  msgstr ""
726
 
727
+ #: includes/class-freemius.php:24327
728
  msgid "View paid features"
729
  msgstr ""
730
 
731
+ #: includes/class-freemius.php:24649
732
  msgid "Thank you so much for using %s and its add-ons!"
733
  msgstr ""
734
 
735
+ #: includes/class-freemius.php:24650
736
  msgid "Thank you so much for using %s!"
737
  msgstr ""
738
 
739
+ #: includes/class-freemius.php:24656
740
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
741
  msgstr ""
742
 
743
+ #: includes/class-freemius.php:24660
744
  msgid "Thank you so much for using our products!"
745
  msgstr ""
746
 
747
+ #: includes/class-freemius.php:24661
748
  msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
749
  msgstr ""
750
 
751
+ #: includes/class-freemius.php:24680
752
  msgid "%s and its add-ons"
753
  msgstr ""
754
 
755
+ #: includes/class-freemius.php:24689
756
  msgid "Products"
757
  msgstr ""
758
 
759
+ #: includes/class-freemius.php:24696, templates/connect.php:280
760
  msgid "Yes"
761
  msgstr ""
762
 
763
+ #: includes/class-freemius.php:24697, templates/connect.php:281
764
  msgid "send me security & feature updates, educational content and offers."
765
  msgstr ""
766
 
767
+ #: includes/class-freemius.php:24698, templates/connect.php:286
768
  msgid "No"
769
  msgstr ""
770
 
771
+ #: includes/class-freemius.php:24700, templates/connect.php:288
772
  msgid "do %sNOT%s send me security & feature updates, educational content and offers."
773
  msgstr ""
774
 
775
+ #: includes/class-freemius.php:24710
776
  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 :-)"
777
  msgstr ""
778
 
779
+ #: includes/class-freemius.php:24712, templates/connect.php:295
780
  msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
781
  msgstr ""
782
 
783
+ #: includes/class-freemius.php:24994
784
  msgid "License key is empty."
785
  msgstr ""
786
 
792
  msgid "Buy license"
793
  msgstr ""
794
 
795
+ #: includes/class-fs-plugin-updater.php:327, includes/class-fs-plugin-updater.php:360
796
  msgid "There is a %s of %s available."
797
  msgstr ""
798
 
799
+ #: includes/class-fs-plugin-updater.php:329, includes/class-fs-plugin-updater.php:365
800
  msgid "new Beta version"
801
  msgstr ""
802
 
803
+ #: includes/class-fs-plugin-updater.php:330, includes/class-fs-plugin-updater.php:366
804
  msgid "new version"
805
  msgstr ""
806
 
807
+ #: includes/class-fs-plugin-updater.php:389
808
  msgid "Important Upgrade Notice:"
809
  msgstr ""
810
 
811
+ #: includes/class-fs-plugin-updater.php:1283
812
  msgid "Installing plugin: %s"
813
  msgstr ""
814
 
815
+ #: includes/class-fs-plugin-updater.php:1324
816
  msgid "Unable to connect to the filesystem. Please confirm your credentials."
817
  msgstr ""
818
 
819
+ #: includes/class-fs-plugin-updater.php:1506
820
  msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
821
  msgstr ""
822
 
837
  msgid "Install Free Version Update Now"
838
  msgstr ""
839
 
840
+ #: includes/fs-plugin-info-dialog.php:739, templates/account.php:639
841
  msgid "Install Update Now"
842
  msgstr ""
843
 
854
  msgid "Download Latest Free Version"
855
  msgstr ""
856
 
857
+ #: includes/fs-plugin-info-dialog.php:766, templates/account.php:99, templates/add-ons.php:37, templates/account/partials/addon.php:25
858
  msgctxt "as download latest version"
859
  msgid "Download Latest"
860
  msgstr ""
863
  msgid "Activate this add-on"
864
  msgstr ""
865
 
866
+ #: includes/fs-plugin-info-dialog.php:783, templates/connect.php:452
867
  msgid "Activate Free Version"
868
  msgstr ""
869
 
870
+ #: includes/fs-plugin-info-dialog.php:784, templates/account.php:123, templates/add-ons.php:330, templates/account/partials/addon.php:48
871
  msgid "Activate"
872
  msgstr ""
873
 
874
+ #: includes/fs-plugin-info-dialog.php:996
875
  msgctxt "Plugin installer section title"
876
  msgid "Description"
877
  msgstr ""
878
 
879
+ #: includes/fs-plugin-info-dialog.php:997
880
  msgctxt "Plugin installer section title"
881
  msgid "Installation"
882
  msgstr ""
883
 
884
+ #: includes/fs-plugin-info-dialog.php:998
885
  msgctxt "Plugin installer section title"
886
  msgid "FAQ"
887
  msgstr ""
888
 
889
+ #: includes/fs-plugin-info-dialog.php:999, templates/plugin-info/description.php:55
890
  msgid "Screenshots"
891
  msgstr ""
892
 
893
+ #: includes/fs-plugin-info-dialog.php:1000
894
  msgctxt "Plugin installer section title"
895
  msgid "Changelog"
896
  msgstr ""
897
 
898
+ #: includes/fs-plugin-info-dialog.php:1001
899
  msgctxt "Plugin installer section title"
900
  msgid "Reviews"
901
  msgstr ""
902
 
903
+ #: includes/fs-plugin-info-dialog.php:1002
904
  msgctxt "Plugin installer section title"
905
  msgid "Other Notes"
906
  msgstr ""
907
 
908
+ #: includes/fs-plugin-info-dialog.php:1017
909
  msgctxt "Plugin installer section title"
910
  msgid "Features & Pricing"
911
  msgstr ""
912
 
913
+ #: includes/fs-plugin-info-dialog.php:1027
914
  msgid "Plugin Install"
915
  msgstr ""
916
 
917
+ #: includes/fs-plugin-info-dialog.php:1099
918
  msgctxt "e.g. Professional Plan"
919
  msgid "%s Plan"
920
  msgstr ""
921
 
922
+ #: includes/fs-plugin-info-dialog.php:1125
923
  msgctxt "e.g. the best product"
924
  msgid "Best"
925
  msgstr ""
926
 
927
+ #: includes/fs-plugin-info-dialog.php:1131, includes/fs-plugin-info-dialog.php:1151
928
  msgctxt "as every month"
929
  msgid "Monthly"
930
  msgstr ""
931
 
932
+ #: includes/fs-plugin-info-dialog.php:1134
933
  msgctxt "as once a year"
934
  msgid "Annual"
935
  msgstr ""
936
 
937
+ #: includes/fs-plugin-info-dialog.php:1137
938
  msgid "Lifetime"
939
  msgstr ""
940
 
941
+ #: includes/fs-plugin-info-dialog.php:1151, includes/fs-plugin-info-dialog.php:1153, includes/fs-plugin-info-dialog.php:1155
942
  msgctxt "e.g. billed monthly"
943
  msgid "Billed %s"
944
  msgstr ""
945
 
946
+ #: includes/fs-plugin-info-dialog.php:1153
947
  msgctxt "as once a year"
948
  msgid "Annually"
949
  msgstr ""
950
 
951
+ #: includes/fs-plugin-info-dialog.php:1155
952
  msgctxt "as once a year"
953
  msgid "Once"
954
  msgstr ""
955
 
956
+ #: includes/fs-plugin-info-dialog.php:1161
957
  msgid "Single Site License"
958
  msgstr ""
959
 
960
+ #: includes/fs-plugin-info-dialog.php:1163
961
  msgid "Unlimited Licenses"
962
  msgstr ""
963
 
964
+ #: includes/fs-plugin-info-dialog.php:1165
965
  msgid "Up to %s Sites"
966
  msgstr ""
967
 
968
+ #: includes/fs-plugin-info-dialog.php:1175, templates/plugin-info/features.php:82
969
  msgctxt "as monthly period"
970
  msgid "mo"
971
  msgstr ""
972
 
973
+ #: includes/fs-plugin-info-dialog.php:1182, templates/plugin-info/features.php:80
974
  msgctxt "as annual period"
975
  msgid "year"
976
  msgstr ""
977
 
978
+ #: includes/fs-plugin-info-dialog.php:1236
979
  msgctxt "noun"
980
  msgid "Price"
981
  msgstr ""
982
 
983
+ #: includes/fs-plugin-info-dialog.php:1284
984
  msgid "Save %s"
985
  msgstr ""
986
 
987
+ #: includes/fs-plugin-info-dialog.php:1294
988
  msgid "No commitment for %s - cancel anytime"
989
  msgstr ""
990
 
991
+ #: includes/fs-plugin-info-dialog.php:1297
992
  msgid "After your free %s, pay as little as %s"
993
  msgstr ""
994
 
995
+ #: includes/fs-plugin-info-dialog.php:1308
996
  msgid "Details"
997
  msgstr ""
998
 
999
+ #: includes/fs-plugin-info-dialog.php:1312, templates/account.php:110, templates/debug.php:201, templates/debug.php:238, templates/debug.php:455, templates/account/partials/addon.php:36
1000
  msgctxt "product version"
1001
  msgid "Version"
1002
  msgstr ""
1003
 
1004
+ #: includes/fs-plugin-info-dialog.php:1319
1005
  msgctxt "as the plugin author"
1006
  msgid "Author"
1007
  msgstr ""
1008
 
1009
+ #: includes/fs-plugin-info-dialog.php:1326
1010
  msgid "Last Updated"
1011
  msgstr ""
1012
 
1013
+ #: includes/fs-plugin-info-dialog.php:1331, templates/account.php:525
1014
  msgctxt "x-ago"
1015
  msgid "%s ago"
1016
  msgstr ""
1017
 
1018
+ #: includes/fs-plugin-info-dialog.php:1340
1019
  msgid "Requires WordPress Version"
1020
  msgstr ""
1021
 
1022
+ #: includes/fs-plugin-info-dialog.php:1341
1023
  msgid "%s or higher"
1024
  msgstr ""
1025
 
1026
+ #: includes/fs-plugin-info-dialog.php:1348
1027
  msgid "Compatible up to"
1028
  msgstr ""
1029
 
1030
+ #: includes/fs-plugin-info-dialog.php:1356
1031
  msgid "Downloaded"
1032
  msgstr ""
1033
 
1034
+ #: includes/fs-plugin-info-dialog.php:1360
1035
  msgid "%s time"
1036
  msgstr ""
1037
 
1038
+ #: includes/fs-plugin-info-dialog.php:1362
1039
  msgid "%s times"
1040
  msgstr ""
1041
 
1042
+ #: includes/fs-plugin-info-dialog.php:1373
1043
  msgid "WordPress.org Plugin Page"
1044
  msgstr ""
1045
 
1046
+ #: includes/fs-plugin-info-dialog.php:1382
1047
  msgid "Plugin Homepage"
1048
  msgstr ""
1049
 
1050
+ #: includes/fs-plugin-info-dialog.php:1391, includes/fs-plugin-info-dialog.php:1475
1051
  msgid "Donate to this plugin"
1052
  msgstr ""
1053
 
1054
+ #: includes/fs-plugin-info-dialog.php:1398
1055
  msgid "Average Rating"
1056
  msgstr ""
1057
 
1058
+ #: includes/fs-plugin-info-dialog.php:1405
1059
  msgid "based on %s"
1060
  msgstr ""
1061
 
1062
+ #: includes/fs-plugin-info-dialog.php:1409
1063
  msgid "%s rating"
1064
  msgstr ""
1065
 
1066
+ #: includes/fs-plugin-info-dialog.php:1411
1067
  msgid "%s ratings"
1068
  msgstr ""
1069
 
1070
+ #: includes/fs-plugin-info-dialog.php:1426
1071
  msgid "%s star"
1072
  msgstr ""
1073
 
1074
+ #: includes/fs-plugin-info-dialog.php:1428
1075
  msgid "%s stars"
1076
  msgstr ""
1077
 
1078
+ #: includes/fs-plugin-info-dialog.php:1440
1079
  msgid "Click to see reviews that provided a rating of %s"
1080
  msgstr ""
1081
 
1082
+ #: includes/fs-plugin-info-dialog.php:1453
1083
  msgid "Contributors"
1084
  msgstr ""
1085
 
1086
+ #: includes/fs-plugin-info-dialog.php:1483, includes/fs-plugin-info-dialog.php:1485
1087
  msgid "Warning"
1088
  msgstr ""
1089
 
1090
+ #: includes/fs-plugin-info-dialog.php:1483
1091
  msgid "This plugin has not been tested with your current version of WordPress."
1092
  msgstr ""
1093
 
1094
+ #: includes/fs-plugin-info-dialog.php:1485
1095
  msgid "This plugin has not been marked as compatible with your version of WordPress."
1096
  msgstr ""
1097
 
1098
+ #: includes/fs-plugin-info-dialog.php:1504
1099
  msgid "Paid add-on must be deployed to Freemius."
1100
  msgstr ""
1101
 
1102
+ #: includes/fs-plugin-info-dialog.php:1505
1103
  msgid "Add-on must be deployed to WordPress.org or Freemius."
1104
  msgstr ""
1105
 
1106
+ #: includes/fs-plugin-info-dialog.php:1526
1107
  msgid "Newer Version (%s) Installed"
1108
  msgstr ""
1109
 
1110
+ #: includes/fs-plugin-info-dialog.php:1527
1111
  msgid "Newer Free Version (%s) Installed"
1112
  msgstr ""
1113
 
1114
+ #: includes/fs-plugin-info-dialog.php:1534
1115
  msgid "Latest Version Installed"
1116
  msgstr ""
1117
 
1118
+ #: includes/fs-plugin-info-dialog.php:1535
1119
  msgid "Latest Free Version Installed"
1120
  msgstr ""
1121
 
1122
+ #: templates/account.php:100, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:26, templates/account/partials/site.php:311
1123
  msgid "Downgrading your plan"
1124
  msgstr ""
1125
 
1126
+ #: templates/account.php:101, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:27, templates/account/partials/site.php:312
1127
  msgid "Cancelling the subscription"
1128
  msgstr ""
1129
 
1130
  #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
1131
+ #: templates/account.php:103, templates/forms/subscription-cancellation.php:99, templates/account/partials/site.php:314
1132
  msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
1133
  msgstr ""
1134
 
1135
+ #: templates/account.php:104, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:30, templates/account/partials/site.php:315
1136
  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."
1137
  msgstr ""
1138
 
1139
+ #: templates/account.php:105, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:31
1140
  msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
1141
  msgstr ""
1142
 
1143
+ #: templates/account.php:106, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:32, templates/account/partials/site.php:316
1144
  msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
1145
  msgstr ""
1146
 
1147
+ #: templates/account.php:107, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:33, templates/account/partials/site.php:317
1148
  msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
1149
  msgstr ""
1150
 
1151
  #. translators: %s: Plan title (e.g. "Professional")
1152
+ #: templates/account.php:109, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:35
1153
  msgid "Activate %s Plan"
1154
  msgstr ""
1155
 
1156
  #. translators: %s: Time period (e.g. Auto renews in "2 months")
1157
+ #: templates/account.php:112, templates/account/partials/addon.php:38, templates/account/partials/site.php:291
1158
  msgid "Auto renews in %s"
1159
  msgstr ""
1160
 
1161
  #. translators: %s: Time period (e.g. Expires in "2 months")
1162
+ #: templates/account.php:114, templates/account/partials/addon.php:40, templates/account/partials/site.php:293
1163
  msgid "Expires in %s"
1164
  msgstr ""
1165
 
1166
+ #: templates/account.php:115
1167
  msgctxt "as synchronize license"
1168
  msgid "Sync License"
1169
  msgstr ""
1170
 
1171
+ #: templates/account.php:116, templates/account/partials/addon.php:41
1172
  msgid "Cancel Trial"
1173
  msgstr ""
1174
 
1175
+ #: templates/account.php:117, templates/account/partials/addon.php:42
1176
  msgid "Change Plan"
1177
  msgstr ""
1178
 
1179
+ #: templates/account.php:118, templates/account/partials/addon.php:43
1180
  msgctxt "verb"
1181
  msgid "Upgrade"
1182
  msgstr ""
1183
 
1184
+ #: templates/account.php:120, templates/account/partials/addon.php:45, templates/account/partials/site.php:318
1185
  msgctxt "verb"
1186
  msgid "Downgrade"
1187
  msgstr ""
1188
 
1189
+ #: templates/account.php:122, templates/add-ons.php:246, templates/plugin-info/features.php:72, templates/account/partials/addon.php:47, templates/account/partials/site.php:33
1190
  msgid "Free"
1191
  msgstr ""
1192
 
1193
+ #: templates/account.php:124, templates/debug.php:371, includes/customizer/class-fs-customizer-upsell-control.php:110, templates/account/partials/addon.php:49
1194
  msgctxt "as product pricing plan"
1195
  msgid "Plan"
1196
  msgstr ""
1197
 
1198
+ #: templates/account.php:125
1199
  msgid "Bundle Plan"
1200
  msgstr ""
1201
 
1202
+ #: templates/account.php:248
1203
  msgid "Free Trial"
1204
  msgstr ""
1205
 
1206
+ #: templates/account.php:259
1207
  msgid "Account Details"
1208
  msgstr ""
1209
 
1210
+ #: templates/account.php:266, templates/forms/data-debug-mode.php:33
1211
  msgid "Start Debug"
1212
  msgstr ""
1213
 
1214
+ #: templates/account.php:268
1215
  msgid "Stop Debug"
1216
  msgstr ""
1217
 
1218
+ #: templates/account.php:275
1219
  msgid "Billing & Invoices"
1220
  msgstr ""
1221
 
1222
+ #: templates/account.php:286
1223
  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?"
1224
  msgstr ""
1225
 
1226
+ #: templates/account.php:288
1227
  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?"
1228
  msgstr ""
1229
 
1230
+ #: templates/account.php:291
1231
  msgid "Delete Account"
1232
  msgstr ""
1233
 
1234
+ #: templates/account.php:303, templates/account/partials/addon.php:231, templates/account/partials/deactivate-license-button.php:35
1235
  msgid "Deactivate License"
1236
  msgstr ""
1237
 
1238
+ #: templates/account.php:326, templates/forms/subscription-cancellation.php:125
1239
  msgid "Are you sure you want to proceed?"
1240
  msgstr ""
1241
 
1242
+ #: templates/account.php:326, templates/account/partials/addon.php:255
1243
  msgid "Cancel Subscription"
1244
  msgstr ""
1245
 
1246
+ #: templates/account.php:355, templates/account/partials/addon.php:340
1247
  msgctxt "as synchronize"
1248
  msgid "Sync"
1249
  msgstr ""
1250
 
1251
+ #: templates/account.php:370, templates/debug.php:505
1252
  msgid "Name"
1253
  msgstr ""
1254
 
1255
+ #: templates/account.php:376, templates/debug.php:506
1256
  msgid "Email"
1257
  msgstr ""
1258
 
1259
+ #: templates/account.php:383, templates/debug.php:369, templates/debug.php:555
1260
  msgid "User ID"
1261
  msgstr ""
1262
 
1263
+ #: templates/account.php:401, templates/account.php:719, templates/account.php:752, templates/debug.php:236, templates/debug.php:363, templates/debug.php:452, templates/debug.php:504, templates/debug.php:553, templates/debug.php:632, templates/account/payments.php:35, templates/debug/logger.php:21
1264
  msgid "ID"
1265
  msgstr ""
1266
 
1267
+ #: templates/account.php:408
1268
  msgid "Site ID"
1269
  msgstr ""
1270
 
1271
+ #: templates/account.php:411
1272
  msgid "No ID"
1273
  msgstr ""
1274
 
1275
+ #: templates/account.php:416, templates/debug.php:243, templates/debug.php:372, templates/debug.php:456, templates/debug.php:508, templates/account/partials/site.php:227
1276
  msgid "Public Key"
1277
  msgstr ""
1278
 
1279
+ #: templates/account.php:422, templates/debug.php:373, templates/debug.php:457, templates/debug.php:509, templates/account/partials/site.php:239
1280
  msgid "Secret Key"
1281
  msgstr ""
1282
 
1283
+ #: templates/account.php:425
1284
  msgctxt "as secret encryption key missing"
1285
  msgid "No Secret"
1286
  msgstr ""
1287
 
1288
+ #: templates/account.php:452, templates/account/partials/site.php:120, templates/account/partials/site.php:122
1289
  msgid "Trial"
1290
  msgstr ""
1291
 
1292
+ #: templates/account.php:479, templates/debug.php:561, templates/account/partials/site.php:260
1293
  msgid "License Key"
1294
  msgstr ""
1295
 
1296
+ #: templates/account.php:510
1297
  msgid "Join the Beta program"
1298
  msgstr ""
1299
 
1300
+ #: templates/account.php:516
1301
  msgid "not verified"
1302
  msgstr ""
1303
 
1304
+ #: templates/account.php:525, templates/account/partials/addon.php:190
1305
  msgid "Expired"
1306
  msgstr ""
1307
 
1308
+ #: templates/account.php:585
1309
  msgid "Premium version"
1310
  msgstr ""
1311
 
1312
+ #: templates/account.php:587
1313
  msgid "Free version"
1314
  msgstr ""
1315
 
1316
+ #: templates/account.php:599
1317
  msgid "Verify Email"
1318
  msgstr ""
1319
 
1320
+ #: templates/account.php:613
1321
  msgid "Download %s Version"
1322
  msgstr ""
1323
 
1324
+ #: templates/account.php:629
1325
+ msgid "Download Paid Version"
1326
+ msgstr ""
1327
+
1328
+ #: templates/account.php:647, templates/account.php:890, templates/account/partials/site.php:248, templates/account/partials/site.php:270
1329
  msgctxt "verb"
1330
  msgid "Show"
1331
  msgstr ""
1332
 
1333
+ #: templates/account.php:662
1334
  msgid "What is your %s?"
1335
  msgstr ""
1336
 
1337
+ #: templates/account.php:670, templates/account/billing.php:21
1338
  msgctxt "verb"
1339
  msgid "Edit"
1340
  msgstr ""
1341
 
1342
+ #: templates/account.php:674, templates/forms/user-change.php:27
1343
+ msgid "Change User"
1344
+ msgstr ""
1345
+
1346
+ #: templates/account.php:698
1347
  msgid "Sites"
1348
  msgstr ""
1349
 
1350
+ #: templates/account.php:711
1351
  msgid "Search by address"
1352
  msgstr ""
1353
 
1354
+ #: templates/account.php:720, templates/debug.php:366
1355
  msgid "Address"
1356
  msgstr ""
1357
 
1358
+ #: templates/account.php:721
1359
  msgid "License"
1360
  msgstr ""
1361
 
1362
+ #: templates/account.php:722
1363
  msgid "Plan"
1364
  msgstr ""
1365
 
1366
+ #: templates/account.php:755
1367
  msgctxt "as software license"
1368
  msgid "License"
1369
  msgstr ""
1370
 
1371
+ #: templates/account.php:884
1372
  msgctxt "verb"
1373
  msgid "Hide"
1374
  msgstr ""
1375
 
1376
+ #: templates/account.php:906, templates/forms/data-debug-mode.php:31
1377
  msgid "Processing"
1378
  msgstr ""
1379
 
1380
+ #: templates/account.php:909
1381
  msgid "Get updates for bleeding edge Beta versions of %s."
1382
  msgstr ""
1383
 
1384
+ #: templates/account.php:967
1385
  msgid "Cancelling %s"
1386
  msgstr ""
1387
 
1388
+ #: templates/account.php:967, templates/account.php:984, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:133
1389
  msgid "trial"
1390
  msgstr ""
1391
 
1392
+ #: templates/account.php:982, templates/forms/deactivation/form.php:150
1393
  msgid "Cancelling %s..."
1394
  msgstr ""
1395
 
1396
+ #: templates/account.php:985, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:134
1397
  msgid "subscription"
1398
  msgstr ""
1399
 
1400
+ #: templates/account.php:999
1401
  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?"
1402
  msgstr ""
1403
 
1423
  msgid "Installed"
1424
  msgstr ""
1425
 
1426
+ #: templates/admin-notice.php:13, templates/forms/license-activation.php:220, templates/forms/resend-key.php:77
1427
  msgctxt "as close a window"
1428
  msgid "Dismiss"
1429
  msgstr ""
1462
  msgid "Hey %s,"
1463
  msgstr ""
1464
 
1465
+ #: templates/connect.php:162
1466
  msgid "Allow & Continue"
1467
  msgstr ""
1468
 
1469
+ #: templates/connect.php:166
1470
  msgid "Re-send activation email"
1471
  msgstr ""
1472
 
1473
+ #: templates/connect.php:170
1474
  msgid "Thanks %s!"
1475
  msgstr ""
1476
 
1477
+ #: templates/connect.php:180, templates/forms/license-activation.php:46
1478
  msgid "Agree & Activate License"
1479
  msgstr ""
1480
 
1481
+ #: templates/connect.php:189
1482
  msgid "Thanks for purchasing %s! To get started, please enter your license key:"
1483
  msgstr ""
1484
 
1485
+ #: templates/connect.php:196
1486
  msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
1487
  msgstr ""
1488
 
1489
+ #: templates/connect.php:197
1490
  msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
1491
  msgstr ""
1492
 
1493
+ #: templates/connect.php:203
1494
  msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
1495
  msgstr ""
1496
 
1497
+ #: templates/connect.php:204
1498
  msgid "Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
1499
  msgstr ""
1500
 
1501
+ #: templates/connect.php:238
1502
  msgid "We're excited to introduce the Freemius network-level integration."
1503
  msgstr ""
1504
 
1505
+ #: templates/connect.php:241
1506
  msgid "During the update process we detected %d site(s) that are still pending license activation."
1507
  msgstr ""
1508
 
1509
+ #: templates/connect.php:243
1510
  msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
1511
  msgstr ""
1512
 
1513
+ #: templates/connect.php:245
1514
  msgid "%s's paid features"
1515
  msgstr ""
1516
 
1517
+ #: templates/connect.php:250
1518
  msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
1519
  msgstr ""
1520
 
1521
+ #: templates/connect.php:252
1522
  msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
1523
  msgstr ""
1524
 
1525
+ #: templates/connect.php:261, templates/forms/data-debug-mode.php:35, templates/forms/license-activation.php:49
1526
  msgid "License key"
1527
  msgstr ""
1528
 
1529
+ #: templates/connect.php:264, templates/forms/license-activation.php:22
1530
  msgid "Can't find your license key?"
1531
  msgstr ""
1532
 
1533
+ #: templates/connect.php:323, templates/connect.php:694, templates/forms/deactivation/retry-skip.php:20
1534
  msgctxt "verb"
1535
  msgid "Skip"
1536
  msgstr ""
1537
 
1538
+ #: templates/connect.php:326
1539
  msgid "Delegate to Site Admins"
1540
  msgstr ""
1541
 
1542
+ #: templates/connect.php:326
1543
  msgid "If you click it, this decision will be delegated to the sites administrators."
1544
  msgstr ""
1545
 
1546
+ #: templates/connect.php:364
1547
  msgid "Your Profile Overview"
1548
  msgstr ""
1549
 
1550
+ #: templates/connect.php:365
1551
  msgid "Name and email address"
1552
  msgstr ""
1553
 
1554
+ #: templates/connect.php:372
1555
  msgid "Your Site Overview"
1556
  msgstr ""
1557
 
1558
+ #: templates/connect.php:373
1559
+ msgid "Site URL, WP version, PHP info"
1560
  msgstr ""
1561
 
1562
+ #: templates/connect.php:379
1563
  msgid "Admin Notices"
1564
  msgstr ""
1565
 
1566
+ #: templates/connect.php:380, templates/connect.php:396
1567
  msgid "Updates, announcements, marketing, no spam"
1568
  msgstr ""
1569
 
1570
+ #: templates/connect.php:386
1571
  msgid "Current %s Events"
1572
  msgstr ""
1573
 
1574
+ #: templates/connect.php:387
1575
  msgid "Activation, deactivation and uninstall"
1576
  msgstr ""
1577
 
1578
+ #: templates/connect.php:395
1579
  msgid "Newsletter"
1580
  msgstr ""
1581
 
1582
+ #: templates/connect.php:403
1583
+ msgid "Plugins & Themes"
1584
+ msgstr ""
1585
+
1586
+ #: templates/connect.php:404
1587
+ msgid "Title, slug, version, and is active"
1588
+ msgstr ""
1589
+
1590
+ #: templates/connect.php:420, templates/forms/license-activation.php:41
1591
  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."
1592
  msgstr ""
1593
 
1594
+ #: templates/connect.php:425
1595
  msgid "What permissions are being granted?"
1596
  msgstr ""
1597
 
1598
+ #: templates/connect.php:451
1599
  msgid "Don't have a license key?"
1600
  msgstr ""
1601
 
1602
+ #: templates/connect.php:454
1603
  msgid "Have a license key?"
1604
  msgstr ""
1605
 
1606
+ #: templates/connect.php:462
1607
  msgid "Privacy Policy"
1608
  msgstr ""
1609
 
1610
+ #: templates/connect.php:464
1611
  msgid "License Agreement"
1612
  msgstr ""
1613
 
1614
+ #: templates/connect.php:464
1615
  msgid "Terms of Service"
1616
  msgstr ""
1617
 
1618
+ #: templates/connect.php:853
1619
  msgctxt "as in the process of sending an email"
1620
  msgid "Sending email"
1621
  msgstr ""
1622
 
1623
+ #: templates/connect.php:854
1624
  msgctxt "as activating plugin"
1625
  msgid "Activating"
1626
  msgstr ""
1648
  msgid "Debugging"
1649
  msgstr ""
1650
 
1651
+ #: templates/debug.php:52, templates/debug.php:248, templates/debug.php:374, templates/debug.php:510
1652
  msgid "Actions"
1653
  msgstr ""
1654
 
1655
+ #: templates/debug.php:62
1656
  msgid "Are you sure you want to delete all Freemius data?"
1657
  msgstr ""
1658
 
1659
+ #: templates/debug.php:62
1660
  msgid "Delete All Accounts"
1661
  msgstr ""
1662
 
1663
+ #: templates/debug.php:69
1664
  msgid "Clear API Cache"
1665
  msgstr ""
1666
 
1667
+ #: templates/debug.php:77
1668
  msgid "Clear Updates Transients"
1669
  msgstr ""
1670
 
1671
+ #: templates/debug.php:84
1672
  msgid "Sync Data From Server"
1673
  msgstr ""
1674
 
1675
+ #: templates/debug.php:93
1676
  msgid "Migrate Options to Network"
1677
  msgstr ""
1678
 
1679
+ #: templates/debug.php:98
1680
  msgid "Load DB Option"
1681
  msgstr ""
1682
 
1683
+ #: templates/debug.php:101
1684
  msgid "Set DB Option"
1685
  msgstr ""
1686
 
1687
+ #: templates/debug.php:180
1688
  msgid "Key"
1689
  msgstr ""
1690
 
1691
+ #: templates/debug.php:181
1692
  msgid "Value"
1693
  msgstr ""
1694
 
1695
+ #: templates/debug.php:197
1696
  msgctxt "as software development kit versions"
1697
  msgid "SDK Versions"
1698
  msgstr ""
1699
 
1700
+ #: templates/debug.php:202
1701
  msgid "SDK Path"
1702
  msgstr ""
1703
 
1704
+ #: templates/debug.php:203, templates/debug.php:242
1705
  msgid "Module Path"
1706
  msgstr ""
1707
 
1708
+ #: templates/debug.php:204
1709
  msgid "Is Active"
1710
  msgstr ""
1711
 
1712
+ #: templates/debug.php:232, templates/debug/plugins-themes-sync.php:35
1713
  msgid "Plugins"
1714
  msgstr ""
1715
 
1716
+ #: templates/debug.php:232, templates/debug/plugins-themes-sync.php:56
1717
  msgid "Themes"
1718
  msgstr ""
1719
 
1720
+ #: templates/debug.php:237, templates/debug.php:368, templates/debug.php:454, templates/debug/scheduled-crons.php:80
1721
  msgid "Slug"
1722
  msgstr ""
1723
 
1724
+ #: templates/debug.php:239, templates/debug.php:453
1725
  msgid "Title"
1726
  msgstr ""
1727
 
1728
+ #: templates/debug.php:240
1729
  msgctxt "as application program interface"
1730
  msgid "API"
1731
  msgstr ""
1732
 
1733
+ #: templates/debug.php:241
1734
  msgid "Freemius State"
1735
  msgstr ""
1736
 
1737
+ #: templates/debug.php:245
1738
  msgid "Network Blog"
1739
  msgstr ""
1740
 
1741
+ #: templates/debug.php:246
1742
  msgid "Network User"
1743
  msgstr ""
1744
 
1745
+ #: templates/debug.php:283
1746
  msgctxt "as connection was successful"
1747
  msgid "Connected"
1748
  msgstr ""
1749
 
1750
+ #: templates/debug.php:284
1751
  msgctxt "as connection blocked"
1752
  msgid "Blocked"
1753
  msgstr ""
1754
 
1755
+ #: templates/debug.php:320
1756
  msgid "Simulate Trial Promotion"
1757
  msgstr ""
1758
 
1759
+ #: templates/debug.php:332
1760
  msgid "Simulate Network Upgrade"
1761
  msgstr ""
1762
 
1763
+ #: templates/debug.php:357
1764
  msgid "%s Installs"
1765
  msgstr ""
1766
 
1767
+ #: templates/debug.php:359
1768
  msgctxt "like websites"
1769
  msgid "Sites"
1770
  msgstr ""
1771
 
1772
+ #: templates/debug.php:365, templates/account/partials/site.php:156
1773
  msgid "Blog ID"
1774
  msgstr ""
1775
 
1776
+ #: templates/debug.php:370
1777
  msgid "License ID"
1778
  msgstr ""
1779
 
1780
+ #: templates/debug.php:434, templates/debug.php:533, templates/account/partials/addon.php:435
1781
  msgctxt "verb"
1782
  msgid "Delete"
1783
  msgstr ""
1784
 
1785
+ #: templates/debug.php:448
1786
  msgid "Add Ons of module %s"
1787
  msgstr ""
1788
 
1789
+ #: templates/debug.php:500
1790
  msgid "Users"
1791
  msgstr ""
1792
 
1793
+ #: templates/debug.php:507
1794
  msgid "Verified"
1795
  msgstr ""
1796
 
1797
+ #: templates/debug.php:549
1798
  msgid "%s Licenses"
1799
  msgstr ""
1800
 
1801
+ #: templates/debug.php:554
1802
  msgid "Plugin ID"
1803
  msgstr ""
1804
 
1805
+ #: templates/debug.php:556
1806
  msgid "Plan ID"
1807
  msgstr ""
1808
 
1809
+ #: templates/debug.php:557
1810
  msgid "Quota"
1811
  msgstr ""
1812
 
1813
+ #: templates/debug.php:558
1814
  msgid "Activated"
1815
  msgstr ""
1816
 
1817
+ #: templates/debug.php:559
1818
  msgid "Blocking"
1819
  msgstr ""
1820
 
1821
+ #: templates/debug.php:560, templates/debug.php:631, templates/debug/logger.php:22
1822
+ msgid "Type"
1823
+ msgstr ""
1824
+
1825
+ #: templates/debug.php:562
1826
  msgctxt "as expiration date"
1827
  msgid "Expiration"
1828
  msgstr ""
1867
  msgid "Download"
1868
  msgstr ""
1869
 
 
 
 
 
1870
  #: templates/debug.php:636, templates/debug/logger.php:26
1871
  msgid "Timestamp"
1872
  msgstr ""
2053
  msgid "Apply to become an affiliate"
2054
  msgstr ""
2055
 
2056
+ #: templates/forms/affiliation.php:107
2057
  msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
2058
  msgstr ""
2059
 
2060
+ #: templates/forms/affiliation.php:122
2061
  msgid "Thank you for applying for our affiliate program, we'll review your details during the next 14 days and will get back to you with further information."
2062
  msgstr ""
2063
 
2064
+ #: templates/forms/affiliation.php:125
2065
  msgid "Your affiliation account was temporarily suspended."
2066
  msgstr ""
2067
 
2068
+ #: templates/forms/affiliation.php:128
2069
  msgid "Thank you for applying for our affiliate program, unfortunately, we've decided at this point to reject your application. Please try again in 30 days."
2070
  msgstr ""
2071
 
2072
+ #: templates/forms/affiliation.php:131
2073
  msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
2074
  msgstr ""
2075
 
2076
+ #: templates/forms/affiliation.php:144
2077
  msgid "Like the %s? Become our ambassador and earn cash ;-)"
2078
  msgstr ""
2079
 
2080
+ #: templates/forms/affiliation.php:145
2081
  msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
2082
  msgstr ""
2083
 
2084
+ #: templates/forms/affiliation.php:148
2085
  msgid "Program Summary"
2086
  msgstr ""
2087
 
2088
+ #: templates/forms/affiliation.php:150
2089
  msgid "%s commission when a customer purchases a new license."
2090
  msgstr ""
2091
 
2092
+ #: templates/forms/affiliation.php:152
2093
  msgid "Get commission for automated subscription renewals."
2094
  msgstr ""
2095
 
2096
+ #: templates/forms/affiliation.php:155
2097
  msgid "%s tracking cookie after the first visit to maximize earnings potential."
2098
  msgstr ""
2099
 
2100
+ #: templates/forms/affiliation.php:158
2101
  msgid "Unlimited commissions."
2102
  msgstr ""
2103
 
2104
+ #: templates/forms/affiliation.php:160
2105
  msgid "%s minimum payout amount."
2106
  msgstr ""
2107
 
2108
+ #: templates/forms/affiliation.php:161
2109
  msgid "Payouts are in USD and processed monthly via PayPal."
2110
  msgstr ""
2111
 
2112
+ #: templates/forms/affiliation.php:162
2113
  msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
2114
  msgstr ""
2115
 
2116
+ #: templates/forms/affiliation.php:165
2117
  msgid "Affiliate"
2118
  msgstr ""
2119
 
2120
+ #: templates/forms/affiliation.php:168, templates/forms/resend-key.php:23
2121
  msgid "Email address"
2122
  msgstr ""
2123
 
2124
+ #: templates/forms/affiliation.php:172
2125
  msgid "Full name"
2126
  msgstr ""
2127
 
2128
+ #: templates/forms/affiliation.php:176
2129
  msgid "PayPal account email address"
2130
  msgstr ""
2131
 
2132
+ #: templates/forms/affiliation.php:180
2133
  msgid "Where are you going to promote the %s?"
2134
  msgstr ""
2135
 
2136
+ #: templates/forms/affiliation.php:182
2137
  msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
2138
  msgstr ""
2139
 
2140
+ #: templates/forms/affiliation.php:184
2141
  msgid "Add another domain"
2142
  msgstr ""
2143
 
2144
+ #: templates/forms/affiliation.php:188
2145
  msgid "Extra Domains"
2146
  msgstr ""
2147
 
2148
+ #: templates/forms/affiliation.php:189
2149
  msgid "Extra domains where you will be marketing the product from."
2150
  msgstr ""
2151
 
2152
+ #: templates/forms/affiliation.php:199
2153
  msgid "Promotion methods"
2154
  msgstr ""
2155
 
2156
+ #: templates/forms/affiliation.php:202
2157
  msgid "Social media (Facebook, Twitter, etc.)"
2158
  msgstr ""
2159
 
2160
+ #: templates/forms/affiliation.php:206
2161
  msgid "Mobile apps"
2162
  msgstr ""
2163
 
2164
+ #: templates/forms/affiliation.php:210
2165
  msgid "Website, email, and social media statistics (optional)"
2166
  msgstr ""
2167
 
2168
+ #: templates/forms/affiliation.php:213
2169
  msgid "Please feel free to provide any relevant website or social media statistics, e.g. monthly unique site visits, number of email subscribers, followers, etc. (we will keep this information confidential)."
2170
  msgstr ""
2171
 
2172
+ #: templates/forms/affiliation.php:217
2173
  msgid "How will you promote us?"
2174
  msgstr ""
2175
 
2176
+ #: templates/forms/affiliation.php:220
2177
  msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
2178
  msgstr ""
2179
 
2180
+ #: templates/forms/affiliation.php:230, templates/forms/resend-key.php:22
2181
  msgid "Cancel"
2182
  msgstr ""
2183
 
2184
+ #: templates/forms/affiliation.php:232
2185
  msgid "Become an affiliate"
2186
  msgstr ""
2187
 
2209
  msgid "Update License"
2210
  msgstr ""
2211
 
2212
+ #: templates/forms/license-activation.php:181
2213
+ msgid "Associate with the license owner's account."
2214
+ msgstr ""
2215
+
2216
  #: templates/forms/optout.php:30
2217
  msgctxt "verb"
2218
  msgid "Opt Out"
2223
  msgid "Opt In"
2224
  msgstr ""
2225
 
2226
+ #: templates/forms/optout.php:34
2227
+ msgid "Connectivity to the licensing engine was successfully re-established. Automatic security & feature updates are now available through the WP Admin Dashboard."
2228
+ msgstr ""
2229
+
2230
+ #: templates/forms/optout.php:36
2231
+ msgid "Warning: Opting out will block automatic updates"
2232
+ msgstr ""
2233
+
2234
+ #: templates/forms/optout.php:37
2235
+ msgid "Ongoing connectivity with the licensing engine is essential for receiving automatic security & feature updates of the paid product. To receive these updates, data like your license key, %1$s version, and WordPress version, is periodically sent to the server to check for updates. By opting out, you understand that your site won't receive automatic updates for %2$s from within the WP Admin Dashboard. This can put your site at risk, and we highly recommend to keep this connection active. If you do choose to opt-out, you'll need to check for %1$s updates and install them manually."
2236
+ msgstr ""
2237
+
2238
+ #: templates/forms/optout.php:39
2239
+ msgid "I'd like to keep automatic updates"
2240
+ msgstr ""
2241
+
2242
+ #: templates/forms/optout.php:44
2243
  msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking."
2244
  msgstr ""
2245
 
2246
+ #: templates/forms/optout.php:45
2247
+ msgid "On second thought - I want to continue helping"
2248
+ msgstr ""
2249
+
2250
+ #: templates/forms/optout.php:49
2251
  msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
2252
  msgstr ""
2253
 
2254
+ #: templates/forms/optout.php:74
2255
+ msgid "Plugins & themes tracking"
2256
+ msgstr ""
2257
+
2258
+ #: templates/forms/optout.php:261
2259
+ msgid "Saved"
2260
+ msgstr ""
2261
+
2262
  #: templates/forms/premium-versions-upgrade-handler.php:40
2263
  msgid "There is a new version of %s available."
2264
  msgstr ""
2328
  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."
2329
  msgstr ""
2330
 
2331
+ #: templates/forms/user-change.php:26
2332
+ msgid "By changing the user, you agree to transfer the account ownership to:"
2333
+ msgstr ""
2334
+
2335
+ #: templates/forms/user-change.php:28
2336
+ msgid "I Agree - Change User"
2337
+ msgstr ""
2338
+
2339
+ #: templates/forms/user-change.php:30
2340
+ msgid "Enter email address"
2341
+ msgstr ""
2342
+
2343
+ #: templates/forms/user-change.php:81
2344
+ msgctxt "close window"
2345
+ msgid "Dismiss"
2346
+ msgstr ""
2347
+
2348
  #: templates/js/style-premium-theme.php:39
2349
  msgid "Premium"
2350
  msgstr ""
2467
  msgid "switching"
2468
  msgstr ""
2469
 
2470
+ #: templates/forms/deactivation/form.php:369
2471
  msgid "Submit & %s"
2472
  msgstr ""
2473
 
2474
+ #: templates/forms/deactivation/form.php:390
2475
  msgid "Kindly tell us the reason so we can improve."
2476
  msgstr ""
2477
 
2478
+ #: templates/forms/deactivation/form.php:515
2479
  msgid "Yes - %s"
2480
  msgstr ""
2481
 
2482
+ #: templates/forms/deactivation/form.php:522
2483
  msgid "Skip & %s"
2484
  msgstr ""
2485
 
freemius/start.php CHANGED
@@ -1,522 +1,530 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Freemius SDK Version.
15
- *
16
- * @var string
17
- */
18
- $this_sdk_version = '2.3.1';
19
-
20
- #region SDK Selection Logic --------------------------------------------------------------------
21
-
22
- /**
23
- * Special logic added on 1.1.6 to make sure that every Freemius powered plugin
24
- * will ALWAYS be loaded with the newest SDK from the active Freemius powered plugins.
25
- *
26
- * Since Freemius SDK is backward compatible, this will make sure that all Freemius powered
27
- * plugins will run correctly.
28
- *
29
- * @since 1.1.6
30
- */
31
-
32
- global $fs_active_plugins;
33
-
34
- if ( ! function_exists( 'fs_find_caller_plugin_file' ) ) {
35
- // Require SDK essentials.
36
- require_once dirname( __FILE__ ) . '/includes/fs-essential-functions.php';
37
- }
38
-
39
- /**
40
- * This complex logic fixes symlink issues (e.g. with Vargant). The logic assumes
41
- * that if it's a file from an SDK running in a theme, the location of the SDK
42
- * is in the main theme's folder.
43
- *
44
- * @author Vova Feldman (@svovaf)
45
- * @since 1.2.2.6
46
- */
47
- $file_path = fs_normalize_path( __FILE__ );
48
- $fs_root_path = dirname( $file_path );
49
- /**
50
- * Get the themes directory where the active theme is located (not passing the stylesheet will make WordPress
51
- * assume that the themes directory is inside `wp-content`.
52
- *
53
- * @author Leo Fajardo (@leorw)
54
- * @since 2.2.3
55
- */
56
- $themes_directory = get_theme_root( get_stylesheet() );
57
- $themes_directory_name = basename( $themes_directory );
58
- $theme_candidate_basename = basename( dirname( $fs_root_path ) ) . '/' . basename( $fs_root_path );
59
-
60
- if ( $file_path == fs_normalize_path( realpath( trailingslashit( $themes_directory ) . $theme_candidate_basename . '/' . basename( $file_path ) ) )
61
- ) {
62
- $this_sdk_relative_path = '../' . $themes_directory_name . '/' . $theme_candidate_basename;
63
- $is_theme = true;
64
- } else {
65
- $this_sdk_relative_path = plugin_basename( $fs_root_path );
66
- $is_theme = false;
67
- }
68
-
69
- if ( ! isset( $fs_active_plugins ) ) {
70
- // Load all Freemius powered active plugins.
71
- $fs_active_plugins = get_option( 'fs_active_plugins', new stdClass() );
72
-
73
- if ( ! isset( $fs_active_plugins->plugins ) ) {
74
- $fs_active_plugins->plugins = array();
75
- }
76
- }
77
-
78
- if ( empty( $fs_active_plugins->abspath ) ) {
79
- /**
80
- * Store the WP install absolute path reference to identify environment change
81
- * while replicating the storage.
82
- *
83
- * @author Vova Feldman (@svovaf)
84
- * @since 1.2.1.7
85
- */
86
- $fs_active_plugins->abspath = ABSPATH;
87
- } else {
88
- if ( ABSPATH !== $fs_active_plugins->abspath ) {
89
- /**
90
- * WordPress path has changed, cleanup the SDK references cache.
91
- * This resolves issues triggered when spinning a staging environments
92
- * while replicating the database.
93
- *
94
- * @author Vova Feldman (@svovaf)
95
- * @since 1.2.1.7
96
- */
97
- $fs_active_plugins->abspath = ABSPATH;
98
- $fs_active_plugins->plugins = array();
99
- unset( $fs_active_plugins->newest );
100
- } else {
101
- /**
102
- * Make sure SDK references are still valid. This resolves
103
- * issues when users hard delete modules via FTP.
104
- *
105
- * @author Vova Feldman (@svovaf)
106
- * @since 1.2.1.7
107
- */
108
- $has_changes = false;
109
- foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
110
- if ( ! file_exists( ( isset( $data->type ) && 'theme' === $data->type ? $themes_directory : WP_PLUGIN_DIR ) . '/' . $sdk_path ) ) {
111
- unset( $fs_active_plugins->plugins[ $sdk_path ] );
112
- $has_changes = true;
113
- }
114
- }
115
-
116
- if ( $has_changes ) {
117
- if ( empty( $fs_active_plugins->plugins ) ) {
118
- unset( $fs_active_plugins->newest );
119
- }
120
-
121
- update_option( 'fs_active_plugins', $fs_active_plugins );
122
- }
123
- }
124
- }
125
-
126
- if ( ! function_exists( 'fs_find_direct_caller_plugin_file' ) ) {
127
- require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-1.1.7.1.php';
128
- }
129
-
130
- if ( ! function_exists( 'fs_get_plugins' ) ) {
131
- require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-2.2.1.php';
132
- }
133
-
134
- // Update current SDK info based on the SDK path.
135
- if ( ! isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) ||
136
- $this_sdk_version != $fs_active_plugins->plugins[ $this_sdk_relative_path ]->version
137
- ) {
138
- if ( $is_theme ) {
139
- $plugin_path = basename( dirname( $this_sdk_relative_path ) );
140
- } else {
141
- $plugin_path = plugin_basename( fs_find_direct_caller_plugin_file( $file_path ) );
142
- }
143
-
144
- $fs_active_plugins->plugins[ $this_sdk_relative_path ] = (object) array(
145
- 'version' => $this_sdk_version,
146
- 'type' => ( $is_theme ? 'theme' : 'plugin' ),
147
- 'timestamp' => time(),
148
- 'plugin_path' => $plugin_path,
149
- );
150
- }
151
-
152
- $is_current_sdk_newest = isset( $fs_active_plugins->newest ) && ( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path );
153
-
154
- if ( ! isset( $fs_active_plugins->newest ) ) {
155
- /**
156
- * This will be executed only once, for the first time a Freemius powered plugin is activated.
157
- */
158
- fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
159
-
160
- $is_current_sdk_newest = true;
161
- } else if ( version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '<' ) ) {
162
- /**
163
- * Current SDK is newer than the newest stored SDK.
164
- */
165
- fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
166
-
167
- if ( class_exists( 'Freemius' ) ) {
168
- // Older SDK version was already loaded.
169
-
170
- if ( ! $fs_active_plugins->newest->in_activation ) {
171
- // Re-order plugins to load this plugin first.
172
- fs_newest_sdk_plugin_first();
173
- }
174
-
175
- // Refresh page.
176
- fs_redirect( $_SERVER['REQUEST_URI'] );
177
- }
178
- } else {
179
- if ( ! function_exists( 'get_plugins' ) ) {
180
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
181
- }
182
-
183
- $fs_newest_sdk = $fs_active_plugins->newest;
184
- $fs_newest_sdk = $fs_active_plugins->plugins[ $fs_newest_sdk->sdk_path ];
185
-
186
- $is_newest_sdk_type_theme = ( isset( $fs_newest_sdk->type ) && 'theme' === $fs_newest_sdk->type );
187
-
188
- if ( ! $is_newest_sdk_type_theme ) {
189
- $is_newest_sdk_plugin_active = is_plugin_active( $fs_newest_sdk->plugin_path );
190
- } else {
191
- $current_theme = wp_get_theme();
192
- $is_newest_sdk_plugin_active = ( $current_theme->stylesheet === $fs_newest_sdk->plugin_path );
193
-
194
- $current_theme_parent = $current_theme->parent();
195
-
196
- /**
197
- * If the current theme is a child of the theme that has the newest SDK, this prevents a redirects loop
198
- * from happening by keeping the SDK info stored in the `fs_active_plugins` option.
199
- */
200
- if ( ! $is_newest_sdk_plugin_active && $current_theme_parent instanceof WP_Theme ) {
201
- $is_newest_sdk_plugin_active = ( $fs_newest_sdk->plugin_path === $current_theme_parent->stylesheet );
202
- }
203
- }
204
-
205
- if ( $is_current_sdk_newest &&
206
- ! $is_newest_sdk_plugin_active &&
207
- ! $fs_active_plugins->newest->in_activation
208
- ) {
209
- // If current SDK is the newest and the plugin is NOT active, it means
210
- // that the current plugin in activation mode.
211
- $fs_active_plugins->newest->in_activation = true;
212
- update_option( 'fs_active_plugins', $fs_active_plugins );
213
- }
214
-
215
- if ( ! $is_theme ) {
216
- $sdk_starter_path = fs_normalize_path( WP_PLUGIN_DIR . '/' . $this_sdk_relative_path . '/start.php' );
217
- } else {
218
- $sdk_starter_path = fs_normalize_path(
219
- $themes_directory
220
- . '/'
221
- . str_replace( "../{$themes_directory_name}/", '', $this_sdk_relative_path )
222
- . '/start.php' );
223
- }
224
-
225
- $is_newest_sdk_path_valid = ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) && file_exists( $sdk_starter_path );
226
-
227
- if ( ! $is_newest_sdk_path_valid && ! $is_current_sdk_newest ) {
228
- // Plugin with newest SDK is no longer active, or SDK was moved to a different location.
229
- unset( $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ] );
230
- }
231
-
232
- if ( ! ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) ||
233
- ! $is_newest_sdk_path_valid ||
234
- // Is newest SDK downgraded.
235
- ( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
236
- version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '>' ) )
237
- ) {
238
- /**
239
- * Plugin with newest SDK is no longer active.
240
- * OR
241
- * The newest SDK was in the current plugin. BUT, seems like the version of
242
- * the SDK was downgraded to a lower SDK.
243
- */
244
- // Find the active plugin with the newest SDK version and update the newest reference.
245
- fs_fallback_to_newest_active_sdk();
246
- } else {
247
- if ( $is_newest_sdk_plugin_active &&
248
- $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
249
- ( $fs_active_plugins->newest->in_activation ||
250
- ( class_exists( 'Freemius' ) && ( ! defined( 'WP_FS__SDK_VERSION' ) || version_compare( WP_FS__SDK_VERSION, $this_sdk_version, '<' ) ) )
251
- )
252
-
253
- ) {
254
- if ( $fs_active_plugins->newest->in_activation && ! $is_newest_sdk_type_theme ) {
255
- // Plugin no more in activation.
256
- $fs_active_plugins->newest->in_activation = false;
257
- update_option( 'fs_active_plugins', $fs_active_plugins );
258
- }
259
-
260
- // Reorder plugins to load plugin with newest SDK first.
261
- if ( fs_newest_sdk_plugin_first() ) {
262
- // Refresh page after re-order to make sure activated plugin loads newest SDK.
263
- if ( class_exists( 'Freemius' ) ) {
264
- fs_redirect( $_SERVER['REQUEST_URI'] );
265
- }
266
- }
267
- }
268
- }
269
- }
270
-
271
- if ( class_exists( 'Freemius' ) ) {
272
- // SDK was already loaded.
273
- return;
274
- }
275
-
276
- if ( version_compare( $this_sdk_version, $fs_active_plugins->newest->version, '<' ) ) {
277
- $newest_sdk = $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ];
278
-
279
- $plugins_or_theme_dir_path = ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) ?
280
- WP_PLUGIN_DIR :
281
- $themes_directory;
282
-
283
- $newest_sdk_starter = fs_normalize_path(
284
- $plugins_or_theme_dir_path
285
- . '/'
286
- . str_replace( "../{$themes_directory_name}/", '', $fs_active_plugins->newest->sdk_path )
287
- . '/start.php' );
288
-
289
- if ( file_exists( $newest_sdk_starter ) ) {
290
- // Reorder plugins to load plugin with newest SDK first.
291
- fs_newest_sdk_plugin_first();
292
-
293
- // There's a newer SDK version, load it instead of the current one!
294
- require_once $newest_sdk_starter;
295
-
296
- return;
297
- }
298
- }
299
-
300
- #endregion SDK Selection Logic --------------------------------------------------------------------
301
-
302
- #region Hooks & Filters Collection --------------------------------------------------------------------
303
-
304
- /**
305
- * Freemius hooks (actions & filters) tags structure:
306
- *
307
- * fs_{filter/action_name}_{plugin_slug}
308
- *
309
- * --------------------------------------------------------
310
- *
311
- * Usage with WordPress' add_action() / add_filter():
312
- *
313
- * add_action('fs_{filter/action_name}_{plugin_slug}', $callable);
314
- *
315
- * --------------------------------------------------------
316
- *
317
- * Usage with Freemius' instance add_action() / add_filter():
318
- *
319
- * // No need to add 'fs_' prefix nor '_{plugin_slug}' suffix.
320
- * my_freemius()->add_action('{action_name}', $callable);
321
- *
322
- * --------------------------------------------------------
323
- *
324
- * Freemius filters collection:
325
- *
326
- * fs_connect_url_{plugin_slug}
327
- * fs_trial_promotion_message_{plugin_slug}
328
- * fs_is_long_term_user_{plugin_slug}
329
- * fs_uninstall_reasons_{plugin_slug}
330
- * fs_is_plugin_update_{plugin_slug}
331
- * fs_api_domains_{plugin_slug}
332
- * fs_email_template_sections_{plugin_slug}
333
- * fs_support_forum_submenu_{plugin_slug}
334
- * fs_support_forum_url_{plugin_slug}
335
- * fs_connect_message_{plugin_slug}
336
- * fs_connect_message_on_update_{plugin_slug}
337
- * fs_uninstall_confirmation_message_{plugin_slug}
338
- * fs_pending_activation_message_{plugin_slug}
339
- * fs_is_submenu_visible_{plugin_slug}
340
- * fs_plugin_icon_{plugin_slug}
341
- * fs_show_trial_{plugin_slug}
342
- *
343
- * --------------------------------------------------------
344
- *
345
- * Freemius actions collection:
346
- *
347
- * fs_after_license_loaded_{plugin_slug}
348
- * fs_after_license_change_{plugin_slug}
349
- * fs_after_plans_sync_{plugin_slug}
350
- *
351
- * fs_after_account_details_{plugin_slug}
352
- * fs_after_account_user_sync_{plugin_slug}
353
- * fs_after_account_plan_sync_{plugin_slug}
354
- * fs_before_account_load_{plugin_slug}
355
- * fs_after_account_connection_{plugin_slug}
356
- * fs_account_property_edit_{plugin_slug}
357
- * fs_account_email_verified_{plugin_slug}
358
- * fs_account_page_load_before_departure_{plugin_slug}
359
- * fs_before_account_delete_{plugin_slug}
360
- * fs_after_account_delete_{plugin_slug}
361
- *
362
- * fs_sdk_version_update_{plugin_slug}
363
- * fs_plugin_version_update_{plugin_slug}
364
- *
365
- * fs_initiated_{plugin_slug}
366
- * fs_after_init_plugin_registered_{plugin_slug}
367
- * fs_after_init_plugin_anonymous_{plugin_slug}
368
- * fs_after_init_plugin_pending_activations_{plugin_slug}
369
- * fs_after_init_addon_registered_{plugin_slug}
370
- * fs_after_init_addon_anonymous_{plugin_slug}
371
- * fs_after_init_addon_pending_activations_{plugin_slug}
372
- *
373
- * fs_after_premium_version_activation_{plugin_slug}
374
- * fs_after_free_version_reactivation_{plugin_slug}
375
- *
376
- * fs_after_uninstall_{plugin_slug}
377
- * fs_before_admin_menu_init_{plugin_slug}
378
- */
379
-
380
- #endregion Hooks & Filters Collection --------------------------------------------------------------------
381
-
382
- if ( ! class_exists( 'Freemius' ) ) {
383
-
384
- if ( ! defined( 'WP_FS__SDK_VERSION' ) ) {
385
- define( 'WP_FS__SDK_VERSION', $this_sdk_version );
386
- }
387
-
388
- $plugins_or_theme_dir_path = fs_normalize_path( trailingslashit( $is_theme ?
389
- $themes_directory :
390
- WP_PLUGIN_DIR ) );
391
-
392
- if ( 0 === strpos( $file_path, $plugins_or_theme_dir_path ) ) {
393
- // No symlinks
394
- } else {
395
- /**
396
- * This logic finds the SDK symlink and set WP_FS__DIR to use it.
397
- *
398
- * @author Vova Feldman (@svovaf)
399
- * @since 1.2.2.5
400
- */
401
- $sdk_symlink = null;
402
-
403
- // Try to load SDK's symlink from cache.
404
- if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
405
- is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
406
- ! empty( $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink )
407
- ) {
408
- $sdk_symlink = $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink;
409
- if ( 0 === strpos( $sdk_symlink, $plugins_or_theme_dir_path ) ) {
410
- /**
411
- * Make the symlink path relative.
412
- *
413
- * @author Leo Fajardo (@leorw)
414
- */
415
- $sdk_symlink = substr( $sdk_symlink, strlen( $plugins_or_theme_dir_path ) );
416
-
417
- $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
418
- update_option( 'fs_active_plugins', $fs_active_plugins );
419
- }
420
-
421
- $realpath = realpath( $plugins_or_theme_dir_path . $sdk_symlink );
422
- if ( ! is_string( $realpath ) || ! file_exists( $realpath ) ) {
423
- $sdk_symlink = null;
424
- }
425
- }
426
-
427
- if ( empty( $sdk_symlink ) ) // Has symlinks, therefore, we need to configure WP_FS__DIR based on the symlink.
428
- {
429
- $partial_path_right = basename( $file_path );
430
- $partial_path_left = dirname( $file_path );
431
- $realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
432
-
433
- while ( '/' !== $partial_path_left &&
434
- ( false === $realpath || $file_path !== fs_normalize_path( $realpath ) )
435
- ) {
436
- $partial_path_right = trailingslashit( basename( $partial_path_left ) ) . $partial_path_right;
437
- $partial_path_left_prev = $partial_path_left;
438
- $partial_path_left = dirname( $partial_path_left_prev );
439
-
440
- /**
441
- * Avoid infinite loop if for example `$partial_path_left_prev` is `C:/`, in this case,
442
- * `dirname( 'C:/' )` will return `C:/`.
443
- *
444
- * @author Leo Fajardo (@leorw)
445
- */
446
- if ( $partial_path_left === $partial_path_left_prev ) {
447
- $partial_path_left = '';
448
- break;
449
- }
450
-
451
- $realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
452
- }
453
-
454
- if ( ! empty( $partial_path_left ) && '/' !== $partial_path_left ) {
455
- $sdk_symlink = fs_normalize_path( dirname( $partial_path_right ) );
456
-
457
- // Cache value.
458
- if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
459
- is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] )
460
- ) {
461
- $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
462
- update_option( 'fs_active_plugins', $fs_active_plugins );
463
- }
464
- }
465
- }
466
-
467
- if ( ! empty( $sdk_symlink ) ) {
468
- // Set SDK dir to the symlink path.
469
- define( 'WP_FS__DIR', $plugins_or_theme_dir_path . $sdk_symlink );
470
- }
471
- }
472
-
473
- // Load SDK files.
474
- require_once dirname( __FILE__ ) . '/require.php';
475
-
476
- /**
477
- * Quick shortcut to get Freemius for specified plugin.
478
- * Used by various templates.
479
- *
480
- * @param number $module_id
481
- *
482
- * @return Freemius
483
- */
484
- function freemius( $module_id ) {
485
- return Freemius::instance( $module_id );
486
- }
487
-
488
- /**
489
- * @param string $slug
490
- * @param number $plugin_id
491
- * @param string $public_key
492
- * @param bool $is_live Is live or test plugin.
493
- * @param bool $is_premium Hints freemius if running the premium plugin or not.
494
- *
495
- * @return Freemius
496
- *
497
- * @deprecated Please use fs_dynamic_init().
498
- */
499
- function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
500
- $fs = Freemius::instance( $plugin_id, $slug, true );
501
- $fs->init( $plugin_id, $public_key, $is_live, $is_premium );
502
-
503
- return $fs;
504
- }
505
-
506
- /**
507
- * @param array <string,string> $module Plugin or Theme details.
508
- *
509
- * @return Freemius
510
- * @throws Freemius_Exception
511
- */
512
- function fs_dynamic_init( $module ) {
513
- $fs = Freemius::instance( $module['id'], $module['slug'], true );
514
- $fs->dynamic_init( $module );
515
-
516
- return $fs;
517
- }
518
-
519
- function fs_dump_log() {
520
- FS_Logger::dump();
521
- }
 
 
 
 
 
 
 
 
522
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Freemius SDK Version.
15
+ *
16
+ * @var string
17
+ */
18
+ $this_sdk_version = '2.4.0.1';
19
+
20
+ #region SDK Selection Logic --------------------------------------------------------------------
21
+
22
+ /**
23
+ * Special logic added on 1.1.6 to make sure that every Freemius powered plugin
24
+ * will ALWAYS be loaded with the newest SDK from the active Freemius powered plugins.
25
+ *
26
+ * Since Freemius SDK is backward compatible, this will make sure that all Freemius powered
27
+ * plugins will run correctly.
28
+ *
29
+ * @since 1.1.6
30
+ */
31
+
32
+ global $fs_active_plugins;
33
+
34
+ if ( ! function_exists( 'fs_find_caller_plugin_file' ) ) {
35
+ // Require SDK essentials.
36
+ require_once dirname( __FILE__ ) . '/includes/fs-essential-functions.php';
37
+ }
38
+
39
+ /**
40
+ * This complex logic fixes symlink issues (e.g. with Vargant). The logic assumes
41
+ * that if it's a file from an SDK running in a theme, the location of the SDK
42
+ * is in the main theme's folder.
43
+ *
44
+ * @author Vova Feldman (@svovaf)
45
+ * @since 1.2.2.6
46
+ */
47
+ $file_path = fs_normalize_path( __FILE__ );
48
+ $fs_root_path = dirname( $file_path );
49
+ /**
50
+ * Get the themes directory where the active theme is located (not passing the stylesheet will make WordPress
51
+ * assume that the themes directory is inside `wp-content`.
52
+ *
53
+ * @author Leo Fajardo (@leorw)
54
+ * @since 2.2.3
55
+ */
56
+ $themes_directory = get_theme_root( get_stylesheet() );
57
+ $themes_directory_name = basename( $themes_directory );
58
+ $theme_candidate_basename = basename( dirname( $fs_root_path ) ) . '/' . basename( $fs_root_path );
59
+
60
+ if ( $file_path == fs_normalize_path( realpath( trailingslashit( $themes_directory ) . $theme_candidate_basename . '/' . basename( $file_path ) ) )
61
+ ) {
62
+ $this_sdk_relative_path = '../' . $themes_directory_name . '/' . $theme_candidate_basename;
63
+ $is_theme = true;
64
+ } else {
65
+ $this_sdk_relative_path = plugin_basename( $fs_root_path );
66
+ $is_theme = false;
67
+ }
68
+
69
+ if ( ! isset( $fs_active_plugins ) ) {
70
+ // Load all Freemius powered active plugins.
71
+ $fs_active_plugins = get_option( 'fs_active_plugins', new stdClass() );
72
+
73
+ if ( ! isset( $fs_active_plugins->plugins ) ) {
74
+ $fs_active_plugins->plugins = array();
75
+ }
76
+ }
77
+
78
+ if ( empty( $fs_active_plugins->abspath ) ) {
79
+ /**
80
+ * Store the WP install absolute path reference to identify environment change
81
+ * while replicating the storage.
82
+ *
83
+ * @author Vova Feldman (@svovaf)
84
+ * @since 1.2.1.7
85
+ */
86
+ $fs_active_plugins->abspath = ABSPATH;
87
+ } else {
88
+ if ( ABSPATH !== $fs_active_plugins->abspath ) {
89
+ /**
90
+ * WordPress path has changed, cleanup the SDK references cache.
91
+ * This resolves issues triggered when spinning a staging environments
92
+ * while replicating the database.
93
+ *
94
+ * @author Vova Feldman (@svovaf)
95
+ * @since 1.2.1.7
96
+ */
97
+ $fs_active_plugins->abspath = ABSPATH;
98
+ $fs_active_plugins->plugins = array();
99
+ unset( $fs_active_plugins->newest );
100
+ } else {
101
+ /**
102
+ * Make sure SDK references are still valid. This resolves
103
+ * issues when users hard delete modules via FTP.
104
+ *
105
+ * @author Vova Feldman (@svovaf)
106
+ * @since 1.2.1.7
107
+ */
108
+ $has_changes = false;
109
+ foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
110
+ if ( ! file_exists( ( isset( $data->type ) && 'theme' === $data->type ? $themes_directory : WP_PLUGIN_DIR ) . '/' . $sdk_path ) ) {
111
+ unset( $fs_active_plugins->plugins[ $sdk_path ] );
112
+
113
+ if (
114
+ ! empty( $fs_active_plugins->newest ) &&
115
+ $sdk_path === $fs_active_plugins->newest->sdk_path
116
+ ) {
117
+ unset( $fs_active_plugins->newest );
118
+ }
119
+
120
+ $has_changes = true;
121
+ }
122
+ }
123
+
124
+ if ( $has_changes ) {
125
+ if ( empty( $fs_active_plugins->plugins ) ) {
126
+ unset( $fs_active_plugins->newest );
127
+ }
128
+
129
+ update_option( 'fs_active_plugins', $fs_active_plugins );
130
+ }
131
+ }
132
+ }
133
+
134
+ if ( ! function_exists( 'fs_find_direct_caller_plugin_file' ) ) {
135
+ require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-1.1.7.1.php';
136
+ }
137
+
138
+ if ( ! function_exists( 'fs_get_plugins' ) ) {
139
+ require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-2.2.1.php';
140
+ }
141
+
142
+ // Update current SDK info based on the SDK path.
143
+ if ( ! isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) ||
144
+ $this_sdk_version != $fs_active_plugins->plugins[ $this_sdk_relative_path ]->version
145
+ ) {
146
+ if ( $is_theme ) {
147
+ $plugin_path = basename( dirname( $this_sdk_relative_path ) );
148
+ } else {
149
+ $plugin_path = plugin_basename( fs_find_direct_caller_plugin_file( $file_path ) );
150
+ }
151
+
152
+ $fs_active_plugins->plugins[ $this_sdk_relative_path ] = (object) array(
153
+ 'version' => $this_sdk_version,
154
+ 'type' => ( $is_theme ? 'theme' : 'plugin' ),
155
+ 'timestamp' => time(),
156
+ 'plugin_path' => $plugin_path,
157
+ );
158
+ }
159
+
160
+ $is_current_sdk_newest = isset( $fs_active_plugins->newest ) && ( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path );
161
+
162
+ if ( ! isset( $fs_active_plugins->newest ) ) {
163
+ /**
164
+ * This will be executed only once, for the first time a Freemius powered plugin is activated.
165
+ */
166
+ fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
167
+
168
+ $is_current_sdk_newest = true;
169
+ } else if ( version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '<' ) ) {
170
+ /**
171
+ * Current SDK is newer than the newest stored SDK.
172
+ */
173
+ fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
174
+
175
+ if ( class_exists( 'Freemius' ) ) {
176
+ // Older SDK version was already loaded.
177
+
178
+ if ( ! $fs_active_plugins->newest->in_activation ) {
179
+ // Re-order plugins to load this plugin first.
180
+ fs_newest_sdk_plugin_first();
181
+ }
182
+
183
+ // Refresh page.
184
+ fs_redirect( $_SERVER['REQUEST_URI'] );
185
+ }
186
+ } else {
187
+ if ( ! function_exists( 'get_plugins' ) ) {
188
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
189
+ }
190
+
191
+ $fs_newest_sdk = $fs_active_plugins->newest;
192
+ $fs_newest_sdk = $fs_active_plugins->plugins[ $fs_newest_sdk->sdk_path ];
193
+
194
+ $is_newest_sdk_type_theme = ( isset( $fs_newest_sdk->type ) && 'theme' === $fs_newest_sdk->type );
195
+
196
+ if ( ! $is_newest_sdk_type_theme ) {
197
+ $is_newest_sdk_plugin_active = is_plugin_active( $fs_newest_sdk->plugin_path );
198
+ } else {
199
+ $current_theme = wp_get_theme();
200
+ $is_newest_sdk_plugin_active = ( $current_theme->stylesheet === $fs_newest_sdk->plugin_path );
201
+
202
+ $current_theme_parent = $current_theme->parent();
203
+
204
+ /**
205
+ * If the current theme is a child of the theme that has the newest SDK, this prevents a redirects loop
206
+ * from happening by keeping the SDK info stored in the `fs_active_plugins` option.
207
+ */
208
+ if ( ! $is_newest_sdk_plugin_active && $current_theme_parent instanceof WP_Theme ) {
209
+ $is_newest_sdk_plugin_active = ( $fs_newest_sdk->plugin_path === $current_theme_parent->stylesheet );
210
+ }
211
+ }
212
+
213
+ if ( $is_current_sdk_newest &&
214
+ ! $is_newest_sdk_plugin_active &&
215
+ ! $fs_active_plugins->newest->in_activation
216
+ ) {
217
+ // If current SDK is the newest and the plugin is NOT active, it means
218
+ // that the current plugin in activation mode.
219
+ $fs_active_plugins->newest->in_activation = true;
220
+ update_option( 'fs_active_plugins', $fs_active_plugins );
221
+ }
222
+
223
+ if ( ! $is_theme ) {
224
+ $sdk_starter_path = fs_normalize_path( WP_PLUGIN_DIR . '/' . $this_sdk_relative_path . '/start.php' );
225
+ } else {
226
+ $sdk_starter_path = fs_normalize_path(
227
+ $themes_directory
228
+ . '/'
229
+ . str_replace( "../{$themes_directory_name}/", '', $this_sdk_relative_path )
230
+ . '/start.php' );
231
+ }
232
+
233
+ $is_newest_sdk_path_valid = ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) && file_exists( $sdk_starter_path );
234
+
235
+ if ( ! $is_newest_sdk_path_valid && ! $is_current_sdk_newest ) {
236
+ // Plugin with newest SDK is no longer active, or SDK was moved to a different location.
237
+ unset( $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ] );
238
+ }
239
+
240
+ if ( ! ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) ||
241
+ ! $is_newest_sdk_path_valid ||
242
+ // Is newest SDK downgraded.
243
+ ( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
244
+ version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '>' ) )
245
+ ) {
246
+ /**
247
+ * Plugin with newest SDK is no longer active.
248
+ * OR
249
+ * The newest SDK was in the current plugin. BUT, seems like the version of
250
+ * the SDK was downgraded to a lower SDK.
251
+ */
252
+ // Find the active plugin with the newest SDK version and update the newest reference.
253
+ fs_fallback_to_newest_active_sdk();
254
+ } else {
255
+ if ( $is_newest_sdk_plugin_active &&
256
+ $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
257
+ ( $fs_active_plugins->newest->in_activation ||
258
+ ( class_exists( 'Freemius' ) && ( ! defined( 'WP_FS__SDK_VERSION' ) || version_compare( WP_FS__SDK_VERSION, $this_sdk_version, '<' ) ) )
259
+ )
260
+
261
+ ) {
262
+ if ( $fs_active_plugins->newest->in_activation && ! $is_newest_sdk_type_theme ) {
263
+ // Plugin no more in activation.
264
+ $fs_active_plugins->newest->in_activation = false;
265
+ update_option( 'fs_active_plugins', $fs_active_plugins );
266
+ }
267
+
268
+ // Reorder plugins to load plugin with newest SDK first.
269
+ if ( fs_newest_sdk_plugin_first() ) {
270
+ // Refresh page after re-order to make sure activated plugin loads newest SDK.
271
+ if ( class_exists( 'Freemius' ) ) {
272
+ fs_redirect( $_SERVER['REQUEST_URI'] );
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+
279
+ if ( class_exists( 'Freemius' ) ) {
280
+ // SDK was already loaded.
281
+ return;
282
+ }
283
+
284
+ if ( version_compare( $this_sdk_version, $fs_active_plugins->newest->version, '<' ) ) {
285
+ $newest_sdk = $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ];
286
+
287
+ $plugins_or_theme_dir_path = ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) ?
288
+ WP_PLUGIN_DIR :
289
+ $themes_directory;
290
+
291
+ $newest_sdk_starter = fs_normalize_path(
292
+ $plugins_or_theme_dir_path
293
+ . '/'
294
+ . str_replace( "../{$themes_directory_name}/", '', $fs_active_plugins->newest->sdk_path )
295
+ . '/start.php' );
296
+
297
+ if ( file_exists( $newest_sdk_starter ) ) {
298
+ // Reorder plugins to load plugin with newest SDK first.
299
+ fs_newest_sdk_plugin_first();
300
+
301
+ // There's a newer SDK version, load it instead of the current one!
302
+ require_once $newest_sdk_starter;
303
+
304
+ return;
305
+ }
306
+ }
307
+
308
+ #endregion SDK Selection Logic --------------------------------------------------------------------
309
+
310
+ #region Hooks & Filters Collection --------------------------------------------------------------------
311
+
312
+ /**
313
+ * Freemius hooks (actions & filters) tags structure:
314
+ *
315
+ * fs_{filter/action_name}_{plugin_slug}
316
+ *
317
+ * --------------------------------------------------------
318
+ *
319
+ * Usage with WordPress' add_action() / add_filter():
320
+ *
321
+ * add_action('fs_{filter/action_name}_{plugin_slug}', $callable);
322
+ *
323
+ * --------------------------------------------------------
324
+ *
325
+ * Usage with Freemius' instance add_action() / add_filter():
326
+ *
327
+ * // No need to add 'fs_' prefix nor '_{plugin_slug}' suffix.
328
+ * my_freemius()->add_action('{action_name}', $callable);
329
+ *
330
+ * --------------------------------------------------------
331
+ *
332
+ * Freemius filters collection:
333
+ *
334
+ * fs_connect_url_{plugin_slug}
335
+ * fs_trial_promotion_message_{plugin_slug}
336
+ * fs_is_long_term_user_{plugin_slug}
337
+ * fs_uninstall_reasons_{plugin_slug}
338
+ * fs_is_plugin_update_{plugin_slug}
339
+ * fs_api_domains_{plugin_slug}
340
+ * fs_email_template_sections_{plugin_slug}
341
+ * fs_support_forum_submenu_{plugin_slug}
342
+ * fs_support_forum_url_{plugin_slug}
343
+ * fs_connect_message_{plugin_slug}
344
+ * fs_connect_message_on_update_{plugin_slug}
345
+ * fs_uninstall_confirmation_message_{plugin_slug}
346
+ * fs_pending_activation_message_{plugin_slug}
347
+ * fs_is_submenu_visible_{plugin_slug}
348
+ * fs_plugin_icon_{plugin_slug}
349
+ * fs_show_trial_{plugin_slug}
350
+ *
351
+ * --------------------------------------------------------
352
+ *
353
+ * Freemius actions collection:
354
+ *
355
+ * fs_after_license_loaded_{plugin_slug}
356
+ * fs_after_license_change_{plugin_slug}
357
+ * fs_after_plans_sync_{plugin_slug}
358
+ *
359
+ * fs_after_account_details_{plugin_slug}
360
+ * fs_after_account_user_sync_{plugin_slug}
361
+ * fs_after_account_plan_sync_{plugin_slug}
362
+ * fs_before_account_load_{plugin_slug}
363
+ * fs_after_account_connection_{plugin_slug}
364
+ * fs_account_property_edit_{plugin_slug}
365
+ * fs_account_email_verified_{plugin_slug}
366
+ * fs_account_page_load_before_departure_{plugin_slug}
367
+ * fs_before_account_delete_{plugin_slug}
368
+ * fs_after_account_delete_{plugin_slug}
369
+ *
370
+ * fs_sdk_version_update_{plugin_slug}
371
+ * fs_plugin_version_update_{plugin_slug}
372
+ *
373
+ * fs_initiated_{plugin_slug}
374
+ * fs_after_init_plugin_registered_{plugin_slug}
375
+ * fs_after_init_plugin_anonymous_{plugin_slug}
376
+ * fs_after_init_plugin_pending_activations_{plugin_slug}
377
+ * fs_after_init_addon_registered_{plugin_slug}
378
+ * fs_after_init_addon_anonymous_{plugin_slug}
379
+ * fs_after_init_addon_pending_activations_{plugin_slug}
380
+ *
381
+ * fs_after_premium_version_activation_{plugin_slug}
382
+ * fs_after_free_version_reactivation_{plugin_slug}
383
+ *
384
+ * fs_after_uninstall_{plugin_slug}
385
+ * fs_before_admin_menu_init_{plugin_slug}
386
+ */
387
+
388
+ #endregion Hooks & Filters Collection --------------------------------------------------------------------
389
+
390
+ if ( ! class_exists( 'Freemius' ) ) {
391
+
392
+ if ( ! defined( 'WP_FS__SDK_VERSION' ) ) {
393
+ define( 'WP_FS__SDK_VERSION', $this_sdk_version );
394
+ }
395
+
396
+ $plugins_or_theme_dir_path = fs_normalize_path( trailingslashit( $is_theme ?
397
+ $themes_directory :
398
+ WP_PLUGIN_DIR ) );
399
+
400
+ if ( 0 === strpos( $file_path, $plugins_or_theme_dir_path ) ) {
401
+ // No symlinks
402
+ } else {
403
+ /**
404
+ * This logic finds the SDK symlink and set WP_FS__DIR to use it.
405
+ *
406
+ * @author Vova Feldman (@svovaf)
407
+ * @since 1.2.2.5
408
+ */
409
+ $sdk_symlink = null;
410
+
411
+ // Try to load SDK's symlink from cache.
412
+ if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
413
+ is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
414
+ ! empty( $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink )
415
+ ) {
416
+ $sdk_symlink = $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink;
417
+ if ( 0 === strpos( $sdk_symlink, $plugins_or_theme_dir_path ) ) {
418
+ /**
419
+ * Make the symlink path relative.
420
+ *
421
+ * @author Leo Fajardo (@leorw)
422
+ */
423
+ $sdk_symlink = substr( $sdk_symlink, strlen( $plugins_or_theme_dir_path ) );
424
+
425
+ $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
426
+ update_option( 'fs_active_plugins', $fs_active_plugins );
427
+ }
428
+
429
+ $realpath = realpath( $plugins_or_theme_dir_path . $sdk_symlink );
430
+ if ( ! is_string( $realpath ) || ! file_exists( $realpath ) ) {
431
+ $sdk_symlink = null;
432
+ }
433
+ }
434
+
435
+ if ( empty( $sdk_symlink ) ) // Has symlinks, therefore, we need to configure WP_FS__DIR based on the symlink.
436
+ {
437
+ $partial_path_right = basename( $file_path );
438
+ $partial_path_left = dirname( $file_path );
439
+ $realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
440
+
441
+ while ( '/' !== $partial_path_left &&
442
+ ( false === $realpath || $file_path !== fs_normalize_path( $realpath ) )
443
+ ) {
444
+ $partial_path_right = trailingslashit( basename( $partial_path_left ) ) . $partial_path_right;
445
+ $partial_path_left_prev = $partial_path_left;
446
+ $partial_path_left = dirname( $partial_path_left_prev );
447
+
448
+ /**
449
+ * Avoid infinite loop if for example `$partial_path_left_prev` is `C:/`, in this case,
450
+ * `dirname( 'C:/' )` will return `C:/`.
451
+ *
452
+ * @author Leo Fajardo (@leorw)
453
+ */
454
+ if ( $partial_path_left === $partial_path_left_prev ) {
455
+ $partial_path_left = '';
456
+ break;
457
+ }
458
+
459
+ $realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
460
+ }
461
+
462
+ if ( ! empty( $partial_path_left ) && '/' !== $partial_path_left ) {
463
+ $sdk_symlink = fs_normalize_path( dirname( $partial_path_right ) );
464
+
465
+ // Cache value.
466
+ if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
467
+ is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] )
468
+ ) {
469
+ $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
470
+ update_option( 'fs_active_plugins', $fs_active_plugins );
471
+ }
472
+ }
473
+ }
474
+
475
+ if ( ! empty( $sdk_symlink ) ) {
476
+ // Set SDK dir to the symlink path.
477
+ define( 'WP_FS__DIR', $plugins_or_theme_dir_path . $sdk_symlink );
478
+ }
479
+ }
480
+
481
+ // Load SDK files.
482
+ require_once dirname( __FILE__ ) . '/require.php';
483
+
484
+ /**
485
+ * Quick shortcut to get Freemius for specified plugin.
486
+ * Used by various templates.
487
+ *
488
+ * @param number $module_id
489
+ *
490
+ * @return Freemius
491
+ */
492
+ function freemius( $module_id ) {
493
+ return Freemius::instance( $module_id );
494
+ }
495
+
496
+ /**
497
+ * @param string $slug
498
+ * @param number $plugin_id
499
+ * @param string $public_key
500
+ * @param bool $is_live Is live or test plugin.
501
+ * @param bool $is_premium Hints freemius if running the premium plugin or not.
502
+ *
503
+ * @return Freemius
504
+ *
505
+ * @deprecated Please use fs_dynamic_init().
506
+ */
507
+ function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
508
+ $fs = Freemius::instance( $plugin_id, $slug, true );
509
+ $fs->init( $plugin_id, $public_key, $is_live, $is_premium );
510
+
511
+ return $fs;
512
+ }
513
+
514
+ /**
515
+ * @param array <string,string> $module Plugin or Theme details.
516
+ *
517
+ * @return Freemius
518
+ * @throws Freemius_Exception
519
+ */
520
+ function fs_dynamic_init( $module ) {
521
+ $fs = Freemius::instance( $module['id'], $module['slug'], true );
522
+ $fs->dynamic_init( $module );
523
+
524
+ return $fs;
525
+ }
526
+
527
+ function fs_dump_log() {
528
+ FS_Logger::dump();
529
+ }
530
  }
freemius/templates/account.php CHANGED
@@ -60,6 +60,14 @@
60
  $fs->_add_license_activation_dialog_box();
61
  }
62
 
 
 
 
 
 
 
 
 
63
  if ( $fs->is_whitelabeled( true ) || $fs->is_data_debug_mode() ) {
64
  $fs->_add_data_debug_mode_dialog_box();
65
  }
@@ -155,19 +163,28 @@
155
  }
156
  }
157
 
158
- $is_child_license = ( is_object( $license ) && FS_Plugin_License::is_valid_id( $license->parent_license_id ) );
159
- $bundle_subscription = null;
 
 
 
 
 
 
 
 
 
160
 
161
  if (
162
  $show_plan_row &&
163
  is_object( $license ) &&
164
- FS_Plugin_License::is_valid_id( $license->parent_license_id )
165
  ) {
166
- $bundle_subscription = $fs->_get_subscription( $license->parent_license_id );
 
 
167
  }
168
 
169
- $is_active_bundle_subscription = ( is_object( $bundle_subscription ) && $bundle_subscription->is_active() );
170
-
171
  $fs_blog_id = ( is_multisite() && ! is_network_admin() ) ?
172
  get_current_blog_id() :
173
  0;
@@ -175,6 +192,46 @@
175
  $active_plugins_directories_map = Freemius::get_active_plugins_directories_map( $fs_blog_id );
176
 
177
  $is_premium = $fs->is_premium();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  ?>
179
  <div class="wrap fs-section">
180
  <?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?>
@@ -384,7 +441,7 @@
384
  );
385
  }
386
 
387
- if ( $has_paid_plan ) {
388
  if ( $fs->is_trial() ) {
389
  if ( $show_plan_row ) {
390
  $profile[] = array(
@@ -399,18 +456,18 @@
399
  if ( $show_plan_row ) {
400
  $profile[] = array(
401
  'id' => 'plan',
402
- 'title' => ( $is_child_license ? ucfirst( $fs->get_module_type() ) . ' ' : '' ) . $plan_text,
403
  'value' => strtoupper( is_string( $plan->name ) ?
404
  $plan->title :
405
  strtoupper( $free_text )
406
  )
407
  );
408
 
409
- if ( $is_child_license ) {
410
  $profile[] = array(
411
  'id' => 'bundle_plan',
412
  'title' => $bundle_plan_text,
413
- 'value' => strtoupper( $license->parent_plan_title )
414
  );
415
  }
416
  }
@@ -517,7 +574,7 @@
517
  <?php endif ?>
518
  <?php elseif ( 'bundle_plan' === $p['id'] ) : ?>
519
  <?php if ( is_object( $bundle_subscription ) ) : ?>
520
- <?php if ( $is_active_bundle_subscription && ! $license->is_first_payment_pending() ) : ?>
521
  <label class="fs-tag fs-success"><?php echo esc_html( sprintf( $renews_in_text, human_time_diff( time(), strtotime( $bundle_subscription->next_payment ) ) ) ) ?></label>
522
  <?php endif ?>
523
  <?php endif ?>
@@ -547,11 +604,33 @@
547
  <div class="button-group">
548
  <?php if ( $is_paying || $fs->is_trial() ) : ?>
549
  <?php if ( ! $fs->is_allowed_to_install() ) : ?>
550
- <a target="_blank" class="button button-primary"
551
- href="<?php echo $fs->_get_latest_download_local_url() ?>"><?php echo sprintf(
552
- /* translators: %s: plan name (e.g. Download "Professional" Version) */
553
- fs_text_inline( 'Download %s Version', 'download-x-version', $slug ),
554
- ( $fs->is_trial() ? $trial_plan->title : $plan->title ) ) . ( is_object( $update ) ? ' [' . $update->version . ']' : '' ) ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
  <?php elseif ( is_object( $update ) ) : ?>
556
  <?php
557
  $module_type = $fs->get_module_type();
@@ -590,6 +669,9 @@
590
  <input type="submit" class="button button-small"
591
  value="<?php echo fs_esc_attr_x_inline( 'Edit', 'verb', 'edit', $slug ) ?>">
592
  </form>
 
 
 
593
  <?php endif ?>
594
  </td>
595
  <?php endif ?>
@@ -658,18 +740,6 @@
658
  </div>
659
  </div>
660
  <?php endif ?>
661
-
662
- <?php
663
- $account_addons = $fs->get_updated_account_addons();
664
-
665
- $installed_addons = $fs->get_installed_addons();
666
- $installed_addons_ids = array();
667
- foreach ( $installed_addons as $fs_addon ) {
668
- $installed_addons_ids[] = $fs_addon->get_id();
669
- }
670
-
671
- $addons_to_show = array_unique( array_merge( $installed_addons_ids, $account_addons ) );
672
- ?>
673
  <?php if ( 0 < count( $addons_to_show ) ) : ?>
674
  <!-- Add-Ons -->
675
  <div class="postbox">
60
  $fs->_add_license_activation_dialog_box();
61
  }
62
 
63
+ $ids_of_installs_activated_with_foreign_licenses = $fs->should_handle_user_change() ?
64
+ $fs->get_installs_ids_with_foreign_licenses() :
65
+ array();
66
+
67
+ if ( ! empty( $ids_of_installs_activated_with_foreign_licenses ) ) {
68
+ $fs->_add_user_change_dialog_box( $ids_of_installs_activated_with_foreign_licenses );
69
+ }
70
+
71
  if ( $fs->is_whitelabeled( true ) || $fs->is_data_debug_mode() ) {
72
  $fs->_add_data_debug_mode_dialog_box();
73
  }
163
  }
164
  }
165
 
166
+ $has_bundle_license = false;
167
+
168
+ if ( is_object( $license ) &&
169
+ FS_Plugin_License::is_valid_id( $license->parent_license_id )
170
+ ) {
171
+ // Context license has a parent license, therefore, the account has a bundle license.
172
+ $has_bundle_license = true;
173
+ }
174
+
175
+ $bundle_subscription = null;
176
+ $is_bundle_first_payment_pending = false;
177
 
178
  if (
179
  $show_plan_row &&
180
  is_object( $license ) &&
181
+ $has_bundle_license
182
  ) {
183
+ $bundle_plan_title = strtoupper( $license->parent_plan_title );
184
+ $bundle_subscription = $fs->_get_subscription( $license->parent_license_id );
185
+ $is_bundle_first_payment_pending = $license->is_first_payment_pending();
186
  }
187
 
 
 
188
  $fs_blog_id = ( is_multisite() && ! is_network_admin() ) ?
189
  get_current_blog_id() :
190
  0;
192
  $active_plugins_directories_map = Freemius::get_active_plugins_directories_map( $fs_blog_id );
193
 
194
  $is_premium = $fs->is_premium();
195
+
196
+ $account_addons = $fs->get_updated_account_addons();
197
+ $installed_addons = $fs->get_installed_addons();
198
+ $installed_addons_ids = array();
199
+
200
+ /**
201
+ * Store the installed add-ons' IDs into a collection which will be used in determining the add-ons to show on the "Account" page, and at the same time try to find an add-on that is activated with a bundle license if the core product is not.
202
+ *
203
+ * @author Leo Fajardo
204
+ *
205
+ * @since 2.4.0
206
+ */
207
+ foreach ( $installed_addons as $fs_addon ) {
208
+ $installed_addons_ids[] = $fs_addon->get_id();
209
+
210
+ if ( $has_bundle_license ) {
211
+ // We already have the context bundle license details, skip.
212
+ continue;
213
+ }
214
+
215
+ if (
216
+ $show_plan_row &&
217
+ $fs_addon->has_active_valid_license()
218
+ ) {
219
+ $addon_license = $fs_addon->_get_license();
220
+
221
+ if ( FS_Plugin_License::is_valid_id( $addon_license->parent_license_id ) ) {
222
+ // Add-on's license is associated with a parent/bundle license.
223
+ $has_bundle_license = true;
224
+
225
+ $bundle_plan_title = strtoupper( $addon_license->parent_plan_title );
226
+ $bundle_subscription = $fs_addon->_get_subscription( $addon_license->parent_license_id );
227
+ $is_bundle_first_payment_pending = $addon_license->is_first_payment_pending();
228
+ }
229
+ }
230
+ }
231
+
232
+ $addons_to_show = array_unique( array_merge( $installed_addons_ids, $account_addons ) );
233
+
234
+ $is_active_bundle_subscription = ( is_object( $bundle_subscription ) && $bundle_subscription->is_active() );
235
  ?>
236
  <div class="wrap fs-section">
237
  <?php if ( ! $has_tabs && ! $fs->apply_filters( 'hide_account_tabs', false ) ) : ?>
441
  );
442
  }
443
 
444
+ if ( $has_paid_plan || $has_bundle_license ) {
445
  if ( $fs->is_trial() ) {
446
  if ( $show_plan_row ) {
447
  $profile[] = array(
456
  if ( $show_plan_row ) {
457
  $profile[] = array(
458
  'id' => 'plan',
459
+ 'title' => ( $has_bundle_license ? ucfirst( $fs->get_module_type() ) . ' ' : '' ) . $plan_text,
460
  'value' => strtoupper( is_string( $plan->name ) ?
461
  $plan->title :
462
  strtoupper( $free_text )
463
  )
464
  );
465
 
466
+ if ( $has_bundle_license ) {
467
  $profile[] = array(
468
  'id' => 'bundle_plan',
469
  'title' => $bundle_plan_text,
470
+ 'value' => $bundle_plan_title
471
  );
472
  }
473
  }
574
  <?php endif ?>
575
  <?php elseif ( 'bundle_plan' === $p['id'] ) : ?>
576
  <?php if ( is_object( $bundle_subscription ) ) : ?>
577
+ <?php if ( $is_active_bundle_subscription && ! $is_bundle_first_payment_pending ) : ?>
578
  <label class="fs-tag fs-success"><?php echo esc_html( sprintf( $renews_in_text, human_time_diff( time(), strtotime( $bundle_subscription->next_payment ) ) ) ) ?></label>
579
  <?php endif ?>
580
  <?php endif ?>
604
  <div class="button-group">
605
  <?php if ( $is_paying || $fs->is_trial() ) : ?>
606
  <?php if ( ! $fs->is_allowed_to_install() ) : ?>
607
+ <a target="_blank" rel="noopener" class="button button-primary"
608
+ href="<?php echo $fs->_get_latest_download_local_url() ?>"><?php
609
+ $download_version_text_suffix = ( is_object( $update ) ? ' [' . $update->version . ']' : '' );
610
+
611
+ $download_version_text = sprintf(
612
+ /* translators: %s: plan name (e.g. Download "Professional" Version) */
613
+ fs_text_inline( 'Download %s Version', 'download-x-version', $slug ),
614
+ ( $fs->is_trial() ? $trial_plan->title : $plan->title )
615
+ ) .
616
+ $download_version_text_suffix;
617
+
618
+ $download_version_text_length = function_exists( 'mb_strlen' ) ?
619
+ mb_strlen( $download_version_text ) :
620
+ strlen( $download_version_text );
621
+
622
+ if ( $download_version_text_length > 31 ) {
623
+ /**
624
+ * Try to limit the number of characters to 31 for now.
625
+ *
626
+ * @author Leo Fajardo (@leorw)
627
+ * @aince 2.3.2
628
+ */
629
+ $download_version_text = fs_text_inline( 'Download Paid Version', 'download-paid-version', $slug ) . $download_version_text_suffix;
630
+ }
631
+
632
+ echo $download_version_text;
633
+ ?></a>
634
  <?php elseif ( is_object( $update ) ) : ?>
635
  <?php
636
  $module_type = $fs->get_module_type();
669
  <input type="submit" class="button button-small"
670
  value="<?php echo fs_esc_attr_x_inline( 'Edit', 'verb', 'edit', $slug ) ?>">
671
  </form>
672
+ <?php elseif ( 'user_id' === $p['id'] && ! empty( $ids_of_installs_activated_with_foreign_licenses ) ) : ?>
673
+ <input id="fs_change_user" type="submit" class="button button-small"
674
+ value="<?php echo fs_esc_attr_inline( 'Change User', 'change-user', $slug ) ?>">
675
  <?php endif ?>
676
  </td>
677
  <?php endif ?>
740
  </div>
741
  </div>
742
  <?php endif ?>
 
 
 
 
 
 
 
 
 
 
 
 
743
  <?php if ( 0 < count( $addons_to_show ) ) : ?>
744
  <!-- Add-Ons -->
745
  <div class="postbox">
freemius/templates/account/partials/addon.php CHANGED
@@ -366,7 +366,7 @@
366
  );
367
  } else {
368
  $buttons[] = sprintf(
369
- '<a target="_blank" class="button button-primary edit" href="%s">%s</a>',
370
  $fs->_get_latest_download_local_url( $addon_id ),
371
  esc_html( $download_latest_text )
372
  );
@@ -417,7 +417,7 @@
417
  <a class="button button-primary"
418
  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>
419
  <?php else : ?>
420
- <a target="_blank" class="button button-primary"
421
  href="<?php echo $fs->_get_latest_download_local_url( $addon_id ) ?>"><?php echo esc_html( $download_latest_text ) ?></a>
422
  <?php endif ?>
423
  <?php endif ?>
366
  );
367
  } else {
368
  $buttons[] = sprintf(
369
+ '<a target="_blank" rel="noopener" class="button button-primary edit" href="%s">%s</a>',
370
  $fs->_get_latest_download_local_url( $addon_id ),
371
  esc_html( $download_latest_text )
372
  );
417
  <a class="button button-primary"
418
  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>
419
  <?php else : ?>
420
+ <a target="_blank" rel="noopener" class="button button-primary"
421
  href="<?php echo $fs->_get_latest_download_local_url( $addon_id ) ?>"><?php echo esc_html( $download_latest_text ) ?></a>
422
  <?php endif ?>
423
  <?php endif ?>
freemius/templates/account/payments.php CHANGED
@@ -47,7 +47,7 @@
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>
51
  </tr>
52
  <?php $odd = ! $odd; endforeach ?>
53
  </tbody>
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" rel="noopener"><?php fs_esc_html_echo_inline( 'Invoice', 'invoice', $slug ) ?></a><?php endif ?></td>
51
  </tr>
52
  <?php $odd = ! $odd; endforeach ?>
53
  </tbody>
freemius/templates/add-ons.php CHANGED
@@ -332,11 +332,11 @@
332
  }
333
  ?>
334
  <?php else : ?>
335
- <a target="_blank" class="button button-primary" href="<?php echo $latest_download_local_url ?>"><?php echo esc_html( $download_latest_text ) ?></a>
336
  <?php endif ?>
337
  <div class="button button-primary fs-dropdown-arrow-button"><span class="fs-dropdown-arrow"></span><ul class="fs-dropdown-list" style="display: none">
338
  <?php if ( $is_allowed_to_install && ! empty( $latest_download_local_url ) ) : ?>
339
- <li><a target="_blank" href="<?php echo $latest_download_local_url ?>"><?php echo esc_html( $download_latest_text ) ?></a></li>
340
  <?php endif ?>
341
  <li><?php
342
  echo sprintf(
332
  }
333
  ?>
334
  <?php else : ?>
335
+ <a target="_blank" rel="noopener" class="button button-primary" href="<?php echo $latest_download_local_url ?>"><?php echo esc_html( $download_latest_text ) ?></a>
336
  <?php endif ?>
337
  <div class="button button-primary fs-dropdown-arrow-button"><span class="fs-dropdown-arrow"></span><ul class="fs-dropdown-list" style="display: none">
338
  <?php if ( $is_allowed_to_install && ! empty( $latest_download_local_url ) ) : ?>
339
+ <li><a target="_blank" rel="noopener" href="<?php echo $latest_download_local_url ?>"><?php echo esc_html( $download_latest_text ) ?></a></li>
340
  <?php endif ?>
341
  <li><?php
342
  echo sprintf(
freemius/templates/auto-installation.php CHANGED
@@ -93,7 +93,7 @@
93
  fs_esc_html_inline( 'An automated download and installation of %s (paid version) from %s will start in %s. If you would like to do it manually - click the cancellation button now.', 'installing-in-n', $slug ),
94
  $plugin_title,
95
  sprintf(
96
- '<a href="%s" target="_blank">%s</a>',
97
  'https://freemius.com',
98
  'freemius.com'
99
  ),
93
  fs_esc_html_inline( 'An automated download and installation of %s (paid version) from %s will start in %s. If you would like to do it manually - click the cancellation button now.', 'installing-in-n', $slug ),
94
  $plugin_title,
95
  sprintf(
96
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
97
  'https://freemius.com',
98
  'freemius.com'
99
  ),
freemius/templates/connect.php CHANGED
@@ -54,7 +54,7 @@
54
  ) );
55
  }
56
 
57
- $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="1">freemius.com</a>';
58
 
59
  $error = fs_request_get( 'error' );
60
 
@@ -131,6 +131,14 @@
131
  ?>
132
  <?php
133
  }
 
 
 
 
 
 
 
 
134
  ?>
135
  <div id="fs_connect"
136
  class="wrap<?php if ( ! fs_is_network_admin() && ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) ) {
@@ -214,13 +222,13 @@
214
  esc_html( $default_optin_message ),
215
  '<b>' . esc_html( $fs->get_plugin_name() ) . '</b>',
216
  '<b>' . $current_user->user_login . '</b>',
217
- '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>',
218
  $freemius_link
219
  ),
220
  $first_name,
221
  $fs->get_plugin_name(),
222
  $current_user->user_login,
223
- '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>',
224
  $freemius_link,
225
  $is_gdpr_required
226
  );
@@ -322,6 +330,7 @@
322
  <input type="hidden" name="fs_action"
323
  value="<?php echo $fs->get_unique_affix() ?>_activate_existing">
324
  <?php wp_nonce_field( 'activate_existing_' . $fs->get_public_key() ) ?>
 
325
  <button class="button button-primary" tabindex="1"
326
  type="submit"><?php echo esc_html( $button_label ) ?></button>
327
  </form>
@@ -331,6 +340,7 @@
331
  <?php foreach ( $optin_params as $name => $value ) : ?>
332
  <input type="hidden" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>">
333
  <?php endforeach ?>
 
334
  <button class="button button-primary" tabindex="1"
335
  type="submit"<?php if ( $require_license_key ) {
336
  echo ' disabled="disabled"';
@@ -340,31 +350,42 @@
340
  </div><?php
341
 
342
  // Set core permission list items.
343
- $permissions = array(
344
- 'profile' => array(
 
 
 
 
 
 
 
 
345
  'icon-class' => 'dashicons dashicons-admin-users',
346
  'label' => $fs->get_text_inline( 'Your Profile Overview', 'permissions-profile' ),
347
  'desc' => $fs->get_text_inline( 'Name and email address', 'permissions-profile_desc' ),
348
  'priority' => 5,
349
- ),
350
- 'site' => array(
351
- 'icon-class' => 'dashicons dashicons-admin-settings',
352
- 'label' => $fs->get_text_inline( 'Your Site Overview', 'permissions-site' ),
353
- 'desc' => $fs->get_text_inline( 'Site URL, WP version, PHP info, plugins & themes', 'permissions-site_desc' ),
354
- 'priority' => 10,
355
- ),
356
- 'notices' => array(
357
- 'icon-class' => 'dashicons dashicons-testimonial',
358
- 'label' => $fs->get_text_inline( 'Admin Notices', 'permissions-admin-notices' ),
359
- 'desc' => $fs->get_text_inline( 'Updates, announcements, marketing, no spam', 'permissions-newsletter_desc' ),
360
- 'priority' => 13,
361
- ),
362
- 'events' => array(
363
- 'icon-class' => 'dashicons dashicons-admin-plugins',
364
- 'label' => sprintf( $fs->get_text_inline( 'Current %s Events', 'permissions-events' ), ucfirst( $fs->get_module_type() ) ),
365
- 'desc' => $fs->get_text_inline( 'Activation, deactivation and uninstall', 'permissions-events_desc' ),
366
- 'priority' => 20,
367
- ),
 
 
 
368
  );
369
 
370
  // Add newsletter permissions if enabled.
@@ -377,6 +398,15 @@
377
  );
378
  }
379
 
 
 
 
 
 
 
 
 
 
380
  // Allow filtering of the permissions list.
381
  $permissions = $fs->apply_filters( 'permission_list', $permissions );
382
 
@@ -399,8 +429,13 @@
399
  <li id="fs-permission-<?php echo esc_attr( $id ); ?>"
400
  class="fs-permission fs-<?php echo esc_attr( $id ); ?>">
401
  <i class="<?php echo esc_attr( $permission['icon-class'] ); ?>"></i>
 
 
 
 
 
402
 
403
- <div>
404
  <span><?php echo esc_html( $permission['label'] ); ?></span>
405
 
406
  <p><?php echo esc_html( $permission['desc'] ); ?></p>
@@ -424,13 +459,21 @@
424
  </div>
425
  <?php endif ?>
426
  <div class="fs-terms">
427
- <a href="https://freemius.com/privacy/" target="_blank"
428
  tabindex="1"><?php fs_esc_html_echo_inline( 'Privacy Policy', 'privacy-policy', $slug ) ?></a>
429
  &nbsp;&nbsp;-&nbsp;&nbsp;
430
- <a href="<?php echo $require_license_key ? $freemius_plugin_terms_url : $freemius_usage_tracking_url ?>" target="_blank" tabindex="1"><?php $require_license_key ? fs_echo_inline( 'License Agreement', 'license-agreement', $slug ) : fs_echo_inline( 'Terms of Service', 'tos', $slug ) ?></a>
431
  </div>
432
  </div>
433
  <?php
 
 
 
 
 
 
 
 
434
  if ( $is_optin_dialog ) { ?>
435
  </div>
436
  <?php
@@ -659,6 +702,10 @@
659
  var ajaxOptin = ( requireLicenseKey || isNetworkActive );
660
 
661
  $form.on('submit', function () {
 
 
 
 
662
  /**
663
  * @author Vova Feldman (@svovaf)
664
  * @since 1.1.9
@@ -711,6 +758,8 @@
711
  }
712
 
713
  data.is_marketing_allowed = isMarketingAllowed;
 
 
714
  }
715
 
716
  $marketingOptin.removeClass( 'error' );
@@ -813,6 +862,12 @@
813
  return false;
814
  });
815
 
 
 
 
 
 
 
816
  if (requireLicenseKey) {
817
  /**
818
  * Submit license key on enter.
54
  ) );
55
  }
56
 
57
+ $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" rel="noopener" tabindex="1">freemius.com</a>';
58
 
59
  $error = fs_request_get( 'error' );
60
 
131
  ?>
132
  <?php
133
  }
134
+
135
+ /**
136
+ * Allows developers to include custom HTML before the opt-in content.
137
+ *
138
+ * @author Vova Feldman
139
+ * @since 2.3.2
140
+ */
141
+ $fs->do_action( 'connect/before' );
142
  ?>
143
  <div id="fs_connect"
144
  class="wrap<?php if ( ! fs_is_network_admin() && ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) ) {
222
  esc_html( $default_optin_message ),
223
  '<b>' . esc_html( $fs->get_plugin_name() ) . '</b>',
224
  '<b>' . $current_user->user_login . '</b>',
225
+ '<a href="' . $site_url . '" target="_blank" rel="noopener noreferrer">' . $site_url . '</a>',
226
  $freemius_link
227
  ),
228
  $first_name,
229
  $fs->get_plugin_name(),
230
  $current_user->user_login,
231
+ '<a href="' . $site_url . '" target="_blank" rel="noopener noreferrer">' . $site_url . '</a>',
232
  $freemius_link,
233
  $is_gdpr_required
234
  );
330
  <input type="hidden" name="fs_action"
331
  value="<?php echo $fs->get_unique_affix() ?>_activate_existing">
332
  <?php wp_nonce_field( 'activate_existing_' . $fs->get_public_key() ) ?>
333
+ <input type="hidden" name="is_extensions_tracking_allowed" value="1">
334
  <button class="button button-primary" tabindex="1"
335
  type="submit"><?php echo esc_html( $button_label ) ?></button>
336
  </form>
340
  <?php foreach ( $optin_params as $name => $value ) : ?>
341
  <input type="hidden" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>">
342
  <?php endforeach ?>
343
+ <input type="hidden" name="is_extensions_tracking_allowed" value="1">
344
  <button class="button button-primary" tabindex="1"
345
  type="submit"<?php if ( $require_license_key ) {
346
  echo ' disabled="disabled"';
350
  </div><?php
351
 
352
  // Set core permission list items.
353
+ $permissions = array();
354
+
355
+ /**
356
+ * When activating a license key the information of the admin is not collected, we gather the user info from the license.
357
+ *
358
+ * @since 2.3.2
359
+ * @author Vova Feldman
360
+ */
361
+ if ( ! $require_license_key ) {
362
+ $permissions['profile'] = array(
363
  'icon-class' => 'dashicons dashicons-admin-users',
364
  'label' => $fs->get_text_inline( 'Your Profile Overview', 'permissions-profile' ),
365
  'desc' => $fs->get_text_inline( 'Name and email address', 'permissions-profile_desc' ),
366
  'priority' => 5,
367
+ );
368
+ }
369
+
370
+ $permissions['site'] = array(
371
+ 'icon-class' => 'dashicons dashicons-admin-settings',
372
+ 'label' => $fs->get_text_inline( 'Your Site Overview', 'permissions-site' ),
373
+ 'desc' => $fs->get_text_inline( 'Site URL, WP version, PHP info', 'permissions-site_desc' ),
374
+ 'priority' => 10,
375
+ );
376
+
377
+ $permissions['notices'] = array(
378
+ 'icon-class' => 'dashicons dashicons-testimonial',
379
+ 'label' => $fs->get_text_inline( 'Admin Notices', 'permissions-admin-notices' ),
380
+ 'desc' => $fs->get_text_inline( 'Updates, announcements, marketing, no spam', 'permissions-newsletter_desc' ),
381
+ 'priority' => 13,
382
+ );
383
+
384
+ $permissions['events'] = array(
385
+ 'icon-class' => 'dashicons dashicons-admin-' . ( $fs->is_plugin() ? 'plugins' : 'appearance' ),
386
+ 'label' => sprintf( $fs->get_text_inline( 'Current %s Events', 'permissions-events' ), ucfirst( $fs->get_module_type() ) ),
387
+ 'desc' => $fs->get_text_inline( 'Activation, deactivation and uninstall', 'permissions-events_desc' ),
388
+ 'priority' => 20,
389
  );
390
 
391
  // Add newsletter permissions if enabled.
398
  );
399
  }
400
 
401
+ $permissions['extensions'] = array(
402
+ 'icon-class' => 'dashicons dashicons-menu',
403
+ 'label' => $fs->get_text_inline( 'Plugins & Themes', 'permissions-extensions' ),
404
+ 'desc' => $fs->get_text_inline( 'Title, slug, version, and is active', 'permissions-extensions_desc' ),
405
+ 'priority' => 25,
406
+ 'optional' => true,
407
+ 'default' => $fs->apply_filters( 'permission_extensions_default', true )
408
+ );
409
+
410
  // Allow filtering of the permissions list.
411
  $permissions = $fs->apply_filters( 'permission_list', $permissions );
412
 
429
  <li id="fs-permission-<?php echo esc_attr( $id ); ?>"
430
  class="fs-permission fs-<?php echo esc_attr( $id ); ?>">
431
  <i class="<?php echo esc_attr( $permission['icon-class'] ); ?>"></i>
432
+ <?php if ( isset( $permission['optional'] ) && true === $permission['optional'] ) : ?>
433
+ <div class="fs-switch fs-small fs-round fs-<?php echo (! isset( $permission['default'] ) || true === $permission['default'] ) ? 'on' : 'off' ?>">
434
+ <div class="fs-toggle"></div>
435
+ </div>
436
+ <?php endif ?>
437
 
438
+ <div class="fs-permission-description">
439
  <span><?php echo esc_html( $permission['label'] ); ?></span>
440
 
441
  <p><?php echo esc_html( $permission['desc'] ); ?></p>
459
  </div>
460
  <?php endif ?>
461
  <div class="fs-terms">
462
+ <a href="https://freemius.com/privacy/" target="_blank" rel="noopener"
463
  tabindex="1"><?php fs_esc_html_echo_inline( 'Privacy Policy', 'privacy-policy', $slug ) ?></a>
464
  &nbsp;&nbsp;-&nbsp;&nbsp;
465
+ <a href="<?php echo $require_license_key ? $freemius_plugin_terms_url : $freemius_usage_tracking_url ?>" target="_blank" rel="noopener" tabindex="1"><?php $require_license_key ? fs_echo_inline( 'License Agreement', 'license-agreement', $slug ) : fs_echo_inline( 'Terms of Service', 'tos', $slug ) ?></a>
466
  </div>
467
  </div>
468
  <?php
469
+ /**
470
+ * Allows developers to include custom HTML after the opt-in content.
471
+ *
472
+ * @author Vova Feldman
473
+ * @since 2.3.2
474
+ */
475
+ $fs->do_action( 'connect/after' );
476
+
477
  if ( $is_optin_dialog ) { ?>
478
  </div>
479
  <?php
702
  var ajaxOptin = ( requireLicenseKey || isNetworkActive );
703
 
704
  $form.on('submit', function () {
705
+ var isExtensionsTrackingAllowed = $( '#fs-permission-extensions .fs-switch' ).hasClass( 'fs-on' );
706
+
707
+ $( 'input[name=is_extensions_tracking_allowed]' ).val( isExtensionsTrackingAllowed ? 1 : 0 );
708
+
709
  /**
710
  * @author Vova Feldman (@svovaf)
711
  * @since 1.1.9
758
  }
759
 
760
  data.is_marketing_allowed = isMarketingAllowed;
761
+
762
+ data.is_extensions_tracking_allowed = isExtensionsTrackingAllowed;
763
  }
764
 
765
  $marketingOptin.removeClass( 'error' );
862
  return false;
863
  });
864
 
865
+ $( '.fs-switch' ).click( function () {
866
+ $(this)
867
+ .toggleClass( 'fs-on' )
868
+ .toggleClass( 'fs-off' );
869
+ });
870
+
871
  if (requireLicenseKey) {
872
  /**
873
  * Submit license key on enter.
freemius/templates/debug.php CHANGED
@@ -21,27 +21,25 @@
21
  <div>
22
  <!-- Debugging Switch -->
23
  <?php //$debug_mode = get_option( 'fs_debug_mode', null ) ?>
24
- <span class="switch-label"><?php fs_esc_html_echo_x_inline( 'Debugging', 'as code debugging' ) ?></span>
25
 
26
- <div class="switch <?php echo WP_FS__DEBUG_SDK ? 'off' : 'on' ?>">
27
- <div class="toggle"></div>
28
- <span class="on"><?php echo esc_html( $on_text ) ?></span>
29
- <span class="off"><?php echo esc_html( $off_text ) ?></span>
30
  </div>
31
  <script type="text/javascript">
32
  (function ($) {
33
  $(document).ready(function () {
34
  // Switch toggle
35
- $('.switch').click(function () {
36
- $(this)
37
- .toggleClass('on')
38
- .toggleClass('off');
39
 
40
- $.post(ajaxurl, {
41
  action: 'fs_toggle_debug_mode',
42
- is_on : ($(this).hasClass('off') ? 1 : 0)
43
- }, function (response) {
44
- if (1 == response) {
45
  // Refresh page on success.
46
  location.reload();
47
  }
@@ -559,6 +557,7 @@
559
  <th><?php fs_esc_html_echo_inline( 'Quota' ) ?></th>
560
  <th><?php fs_esc_html_echo_inline( 'Activated' ) ?></th>
561
  <th><?php fs_esc_html_echo_inline( 'Blocking' ) ?></th>
 
562
  <th><?php fs_esc_html_echo_inline( 'License Key' ) ?></th>
563
  <th><?php fs_esc_html_echo_x_inline( 'Expiration', 'as expiration date' ) ?></th>
564
  </tr>
@@ -573,6 +572,7 @@
573
  <td><?php echo $license->is_unlimited() ? 'Unlimited' : ( $license->is_single_site() ? 'Single Site' : $license->quota ) ?></td>
574
  <td><?php echo $license->activated ?></td>
575
  <td><?php echo $license->is_block_features ? 'Blocking' : 'Flexible' ?></td>
 
576
  <td><?php
577
  echo $license->is_whitelabeled ?
578
  $license->get_html_escaped_masked_secret_key() :
21
  <div>
22
  <!-- Debugging Switch -->
23
  <?php //$debug_mode = get_option( 'fs_debug_mode', null ) ?>
24
+ <span class="fs-switch-label"><?php fs_esc_html_echo_x_inline( 'Debugging', 'as code debugging' ) ?></span>
25
 
26
+ <div class="fs-switch fs-round <?php echo WP_FS__DEBUG_SDK ? 'fs-on' : 'fs-off' ?>">
27
+ <div class="fs-toggle"></div>
 
 
28
  </div>
29
  <script type="text/javascript">
30
  (function ($) {
31
  $(document).ready(function () {
32
  // Switch toggle
33
+ $( '.fs-switch' ).click( function () {
34
+ $( this )
35
+ .toggleClass( 'fs-on' )
36
+ .toggleClass( 'fs-off' );
37
 
38
+ $.post( ajaxurl, {
39
  action: 'fs_toggle_debug_mode',
40
+ is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0)
41
+ }, function ( response ) {
42
+ if ( 1 == response ) {
43
  // Refresh page on success.
44
  location.reload();
45
  }
557
  <th><?php fs_esc_html_echo_inline( 'Quota' ) ?></th>
558
  <th><?php fs_esc_html_echo_inline( 'Activated' ) ?></th>
559
  <th><?php fs_esc_html_echo_inline( 'Blocking' ) ?></th>
560
+ <th><?php fs_esc_html_echo_inline( 'Type' ) ?></th>
561
  <th><?php fs_esc_html_echo_inline( 'License Key' ) ?></th>
562
  <th><?php fs_esc_html_echo_x_inline( 'Expiration', 'as expiration date' ) ?></th>
563
  </tr>
572
  <td><?php echo $license->is_unlimited() ? 'Unlimited' : ( $license->is_single_site() ? 'Single Site' : $license->quota ) ?></td>
573
  <td><?php echo $license->activated ?></td>
574
  <td><?php echo $license->is_block_features ? 'Blocking' : 'Flexible' ?></td>
575
+ <td><?php echo $license->is_whitelabeled ? 'Whitelabeled' : 'Normal' ?></td>
576
  <td><?php
577
  echo $license->is_whitelabeled ?
578
  $license->get_html_escaped_masked_secret_key() :
freemius/templates/forms/affiliation.php CHANGED
@@ -83,6 +83,9 @@
83
  }
84
 
85
  $apply_to_become_affiliate_text = fs_text_inline( 'Apply to become an affiliate', 'apply-to-become-an-affiliate', $slug );
 
 
 
86
  ?>
87
  <div id="fs_affiliation_content_wrapper" class="wrap">
88
  <form method="post" action="">
@@ -104,7 +107,7 @@
104
  fs_esc_html_inline( "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s.", 'affiliate-application-accepted', $slug ),
105
  $plugin_title,
106
  sprintf(
107
- '<a href="%s" target="_blank">%s</a>',
108
  $members_dashboard_login_url,
109
  $members_dashboard_login_url
110
  )
@@ -217,11 +220,15 @@
217
  <p class="description"><?php echo esc_html( sprintf( fs_text_inline( 'Please provide details on how you intend to promote %s (please be as specific as possible).', 'promotion-method-desc-field-desc', $slug ), $plugin_title ) ) ?></p>
218
  <?php endif ?>
219
  </div>
 
 
 
 
220
  </form>
221
  </div>
222
  <?php if ( ! $is_affiliate ) : ?>
223
  <a id="cancel_button" href="#" class="button button-secondary button-cancel" style="display: none"><?php fs_esc_html_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>
224
- <a id="submit_button" class="button button-primary" href="#" style="display: none"><?php echo esc_html( $apply_to_become_affiliate_text ) ?></a>
225
  <a id="apply_button" class="button button-primary" href="#"><?php fs_esc_html_echo_inline( 'Become an affiliate', 'become-an-affiliate', $slug ) ?></a>
226
  <?php endif ?>
227
  </div>
@@ -242,7 +249,8 @@
242
  $errorMessageContainer = $('#error_message'),
243
  $domain = $('#domain'),
244
  $addDomain = $('#add_domain'),
245
- $extraDomainsContainer = $('#extra_domains_container');
 
246
 
247
  $applyButton.click(function (evt) {
248
  evt.preventDefault();
@@ -360,7 +368,7 @@
360
  data : {
361
  action : '<?php echo $fs->get_ajax_action( 'submit_affiliate_application' ) ?>',
362
  security : '<?php echo $fs->get_ajax_security( 'submit_affiliate_application' ) ?>',
363
- module_id: '<?php echo $fs->get_id() ?>',
364
  affiliate: affiliate
365
  },
366
  beforeSend: function () {
@@ -472,13 +480,26 @@
472
 
473
  window.scrollTo(0, 0);
474
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  });
476
  </script>
477
  </div>
478
  <?php
479
  $params = array(
480
  'page' => 'affiliation',
481
- 'module_id' => $fs->get_id(),
482
  'module_slug' => $slug,
483
  'module_version' => $fs->get_plugin_version(),
484
  );
83
  }
84
 
85
  $apply_to_become_affiliate_text = fs_text_inline( 'Apply to become an affiliate', 'apply-to-become-an-affiliate', $slug );
86
+
87
+ $module_id = $fs->get_id();
88
+ $affiliate_program_terms_url = "https://freemius.com/plugin/{$module_id}/{$slug}/legal/affiliate-program/";
89
  ?>
90
  <div id="fs_affiliation_content_wrapper" class="wrap">
91
  <form method="post" action="">
107
  fs_esc_html_inline( "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s.", 'affiliate-application-accepted', $slug ),
108
  $plugin_title,
109
  sprintf(
110
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
111
  $members_dashboard_login_url,
112
  $members_dashboard_login_url
113
  )
220
  <p class="description"><?php echo esc_html( sprintf( fs_text_inline( 'Please provide details on how you intend to promote %s (please be as specific as possible).', 'promotion-method-desc-field-desc', $slug ), $plugin_title ) ) ?></p>
221
  <?php endif ?>
222
  </div>
223
+ <div>
224
+ <input type="checkbox" id="legal_consent_checkbox">
225
+ <label for="legal_consent_checkbox">I agree to the <a href="<?php echo $affiliate_program_terms_url ?>" target="_blank" rel="noopener">Referrer Program</a>'s terms & conditions.</label>
226
+ </div>
227
  </form>
228
  </div>
229
  <?php if ( ! $is_affiliate ) : ?>
230
  <a id="cancel_button" href="#" class="button button-secondary button-cancel" style="display: none"><?php fs_esc_html_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>
231
+ <a id="submit_button" class="button button-primary disabled" href="#" style="display: none"><?php echo esc_html( $apply_to_become_affiliate_text ) ?></a>
232
  <a id="apply_button" class="button button-primary" href="#"><?php fs_esc_html_echo_inline( 'Become an affiliate', 'become-an-affiliate', $slug ) ?></a>
233
  <?php endif ?>
234
  </div>
249
  $errorMessageContainer = $('#error_message'),
250
  $domain = $('#domain'),
251
  $addDomain = $('#add_domain'),
252
+ $extraDomainsContainer = $('#extra_domains_container'),
253
+ $legalConsentCheckbox = $( '#legal_consent_checkbox' );
254
 
255
  $applyButton.click(function (evt) {
256
  evt.preventDefault();
368
  data : {
369
  action : '<?php echo $fs->get_ajax_action( 'submit_affiliate_application' ) ?>',
370
  security : '<?php echo $fs->get_ajax_security( 'submit_affiliate_application' ) ?>',
371
+ module_id: '<?php echo $module_id ?>',
372
  affiliate: affiliate
373
  },
374
  beforeSend: function () {
480
 
481
  window.scrollTo(0, 0);
482
  }
483
+
484
+ /**
485
+ * @author Xiaheng Chen (@xhchen)
486
+ *
487
+ * @since 2.4.0
488
+ */
489
+ $legalConsentCheckbox.click( function () {
490
+ if ( $( this ).prop( 'checked' ) ) {
491
+ $submitButton.removeClass( 'disabled' );
492
+ } else {
493
+ $submitButton.addClass( 'disabled' );
494
+ }
495
+ } );
496
  });
497
  </script>
498
  </div>
499
  <?php
500
  $params = array(
501
  'page' => 'affiliation',
502
+ 'module_id' => $module_id,
503
  'module_slug' => $slug,
504
  'module_version' => $fs->get_plugin_version(),
505
  );
freemius/templates/forms/deactivation/form.php CHANGED
@@ -79,8 +79,8 @@ HTML;
79
  ?>
80
  <script type="text/javascript">
81
  (function ($) {
82
- var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
83
- modalHtml =
84
  '<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
85
  + ' <div class="fs-modal-dialog">'
86
  + ' <div class="fs-modal-header">'
@@ -93,23 +93,23 @@ HTML;
93
  + ' <div class="fs-modal-footer">'
94
  + ' <?php echo $anonymous_feedback_checkbox_html ?>'
95
  + ' <a href="#" class="button button-secondary button-deactivate"></a>'
96
- + ' <a href="#" class="button button-primary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
97
  + ' </div>'
98
  + ' </div>'
99
  + '</div>',
100
- $modal = $(modalHtml),
101
- $deactivateLink = $('#the-list .deactivate > [data-module-id=<?php echo $fs->get_id() ?>].fs-module-id').prev(),
102
- selectedReasonID = false,
103
- redirectLink = '',
104
- $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
105
- isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
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 ) {
@@ -181,7 +181,11 @@ HTML;
181
  registerEventHandlers();
182
 
183
  function registerEventHandlers() {
184
- $deactivateLink.click(function (evt) {
 
 
 
 
185
  evt.preventDefault();
186
 
187
  redirectLink = $(this).attr('href');
79
  ?>
80
  <script type="text/javascript">
81
  (function ($) {
82
+ var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
83
+ modalHtml =
84
  '<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
85
  + ' <div class="fs-modal-dialog">'
86
  + ' <div class="fs-modal-header">'
93
  + ' <div class="fs-modal-footer">'
94
  + ' <?php echo $anonymous_feedback_checkbox_html ?>'
95
  + ' <a href="#" class="button button-secondary button-deactivate"></a>'
96
+ + ' <a href="#" class="button button-secondary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
97
  + ' </div>'
98
  + ' </div>'
99
  + '</div>',
100
+ $modal = $(modalHtml),
101
+ selectedReasonID = false,
102
+ redirectLink = '',
103
+ $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
104
+ isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
105
+ otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
106
+ dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
107
+ deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
 
108
  $subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' ),
109
+ showDeactivationFeedbackForm = <?php echo ( $show_deactivation_feedback_form ? 'true' : 'false' ) ?>,
110
+ $body = $( 'body' );
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 ) {
181
  registerEventHandlers();
182
 
183
  function registerEventHandlers() {
184
+ $body.on( 'click', '#the-list .deactivate > a', function ( evt ) {
185
+ if ( 0 === $( this ).next( '[data-module-id=<?php echo $fs->get_id() ?>].fs-module-id' ).length ) {
186
+ return true;
187
+ }
188
+
189
  evt.preventDefault();
190
 
191
  redirectLink = $(this).attr('href');
freemius/templates/forms/license-activation.php CHANGED
@@ -1,699 +1,868 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.1.9
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- *
16
- * @var Freemius $fs
17
- */
18
- $fs = freemius( $VARS['id'] );
19
- $slug = $fs->get_slug();
20
- $unique_affix = $fs->get_unique_affix();
21
-
22
- $cant_find_license_key_text = fs_text_inline( "Can't find your license key?", 'cant-find-license-key', $slug );
23
- $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 );
24
- $message_below_input_field = '';
25
-
26
- $header_title = $fs->is_free_plan() ?
27
- fs_text_inline( 'Activate License', 'activate-license', $slug ) :
28
- fs_text_inline( 'Update License', 'update-license', $slug );
29
-
30
- if ( $fs->is_registered() ) {
31
- $activate_button_text = $header_title;
32
- } else {
33
- $freemius_site_url = $fs->has_paid_plan() ?
34
- 'https://freemius.com/' :
35
- // Insights platform information.
36
- $fs->get_usage_tracking_terms_url();
37
-
38
- $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="0">freemius.com</a>';
39
-
40
- $message_below_input_field = sprintf(
41
- fs_text_inline( '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.', 'license-sync-disclaimer', $slug ),
42
- $fs->get_module_label( true ),
43
- $freemius_link
44
- );
45
-
46
- $activate_button_text = fs_text_inline( 'Agree & Activate License', 'agree-activate-license', $slug );
47
- }
48
-
49
- $license_key_text = fs_text_inline( 'License key', 'license-key' , $slug );
50
-
51
- $is_network_activation = (
52
- $fs->is_network_active() &&
53
- fs_is_network_admin() &&
54
- ! $fs->is_delegated_connection()
55
- );
56
- $network_activation_html = '';
57
-
58
- $sites_details = array();
59
- if ( $is_network_activation ) {
60
- $all_sites = Freemius::get_sites();
61
-
62
- foreach ( $all_sites as $site ) {
63
- $site_details = $fs->get_site_info( $site );
64
-
65
- $blog_id = Freemius::get_site_blog_id( $site );
66
- $install = $fs->get_install_by_blog_id($blog_id);
67
-
68
- if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
69
- $site_details['license_id'] = $install->license_id;
70
- }
71
-
72
- $sites_details[] = $site_details;
73
- }
74
-
75
- if ( $is_network_activation ) {
76
- $vars = array(
77
- 'id' => $fs->get_id(),
78
- 'sites' => $sites_details,
79
- 'require_license_key' => true
80
- );
81
-
82
- $network_activation_html = fs_get_template( 'partials/network-activation.php', $vars );
83
- }
84
- }
85
-
86
- $premium_licenses = $fs->get_available_premium_licenses();
87
- $available_licenses = array();
88
- foreach ( $premium_licenses as $premium_license ) {
89
- $activations_left = $premium_license->left();
90
- if ( ! ( $activations_left > 0 ) ) {
91
- continue;
92
- }
93
-
94
- $available_licenses[ $activations_left . '_' . $premium_license->id ] = $premium_license;
95
- }
96
-
97
- $total_available_licenses = count( $available_licenses );
98
- if ( $total_available_licenses > 0 ) {
99
- $license_input_html = <<< HTML
100
- <div class="fs-license-options-container">
101
- <table>
102
- <tbody>
103
- <tr class="fs-available-license-key-container">
104
- <td><input type="radio" name="license_type" value="available"></td>
105
- <td>
106
- HTML;
107
-
108
- if ( $total_available_licenses > 1 ) {
109
- // Sort the licenses by number of activations left in descending order.
110
- krsort( $available_licenses );
111
-
112
- $license_input_html .= '<select class="fs-licenses">';
113
-
114
- /**
115
- * @var FS_Plugin_License $license
116
- */
117
- foreach ( $available_licenses as $license ) {
118
- $label = sprintf(
119
- "%s-Site %s License - %s",
120
- ( 1 == $license->quota ?
121
- 'Single' :
122
- ( $license->is_unlimited() ? 'Unlimited' : $license->quota )
123
- ),
124
- $fs->_get_plan_by_id( $license->plan_id )->title,
125
- $license->get_html_escaped_masked_secret_key()
126
- );
127
-
128
- $license_input_html .= "<option data-id='{$license->id}' value='{$license->secret_key}' data-left='{$license->left()}'>{$label}</option>";
129
- }
130
-
131
- $license_input_html .= '</select>';
132
- } else {
133
- $available_licenses = array_values( $available_licenses );
134
-
135
- /**
136
- * @var FS_Plugin_License $available_license
137
- */
138
- $available_license = $available_licenses[0];
139
- $value = sprintf(
140
- "%s-Site %s License - %s",
141
- ( 1 == $available_license->quota ?
142
- 'Single' :
143
- ( $available_license->is_unlimited() ? 'Unlimited' : $available_license->quota )
144
- ),
145
- $fs->_get_plan_by_id( $available_license->plan_id )->title,
146
- $available_license->get_html_escaped_masked_secret_key()
147
- );
148
-
149
- $license_input_html .= <<< HTML
150
- <input
151
- class="fs-available-license-key"
152
- type="text"
153
- value="{$value}"
154
- data-id="{$available_license->id}"
155
- data-license-key="{$available_license->secret_key}"
156
- data-left="{$available_license->left()}"
157
- readonly />
158
- HTML;
159
- }
160
-
161
- $license_input_html .= <<< HTML
162
- </td>
163
- </tr>
164
- <tr>
165
- <td><input type="radio" name="license_type" value="other"></td>
166
- <td class="fs-other-license-key-container">
167
- <label for="other_license_key_{$unique_affix}">Other: </label>
168
- <div>
169
- <input id="other_license_key_{$unique_affix}" class="fs-license-key" type="text" placeholder="Enter license key" tabindex="1">
170
- </div>
171
- </td>
172
- </tr>
173
- </tbody>
174
- </table>
175
- </div>
176
- HTML;
177
- } else {
178
- $license_input_html = "<input class='fs-license-key' type='text' placeholder='{$license_key_text}' tabindex='1' />";
179
- }
180
-
181
- /**
182
- * IMPORTANT:
183
- * DO NOT ADD MAXLENGTH OR LIMIT THE LICENSE KEY LENGTH SINCE
184
- * WE DO WANT TO ALLOW INPUT OF LONGER KEYS (E.G. WooCommerce Keys)
185
- * FOR MIGRATED MODULES.
186
- */
187
- $modal_content_html = <<< HTML
188
- <div class="notice notice-error inline license-activation-message"><p></p></div>
189
- <p>{$message_above_input_field}</p>
190
- {$license_input_html}
191
- <a class="show-license-resend-modal show-license-resend-modal-{$fs->get_unique_affix()}" href="!#" tabindex="2">{$cant_find_license_key_text}</a>
192
- {$network_activation_html}
193
- <p>{$message_below_input_field}</p>
194
- HTML;
195
-
196
- fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
197
- ?>
198
- <script type="text/javascript">
199
- (function( $ ) {
200
- $( document ).ready(function() {
201
- var modalContentHtml = <?php echo json_encode($modal_content_html); ?>,
202
- modalHtml =
203
- '<div class="fs-modal fs-modal-license-activation fs-modal-license-activation-<?php echo $unique_affix ?>">'
204
- + ' <div class="fs-modal-dialog">'
205
- + ' <div class="fs-modal-header">'
206
- + ' <h4><?php echo esc_js($header_title) ?></h4>'
207
- + ' <a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="<?php echo esc_js( fs_text_x_inline( 'Dismiss', 'as close a window', 'dismiss', $slug ) ) ?>"></i></a>'
208
- + ' </div>'
209
- + ' <div class="fs-modal-body">'
210
- + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
211
- + ' </div>'
212
- + ' <div class="fs-modal-footer">'
213
- + ' <button class="button button-secondary button-close" tabindex="4"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></button>'
214
- + ' <button class="button button-primary button-activate-license" tabindex="3"><?php echo esc_js( $activate_button_text ) ?></button>'
215
- + ' </div>'
216
- + ' </div>'
217
- + '</div>',
218
- $modal = $(modalHtml),
219
- $activateLicenseLink = $('span.activate-license.<?php echo $unique_affix ?> a, .activate-license-trigger.<?php echo $unique_affix ?>'),
220
- $activateLicenseButton = $modal.find('.button-activate-license'),
221
- $licenseKeyInput = $modal.find( 'input.fs-license-key' ),
222
- $licenseActivationMessage = $modal.find( '.license-activation-message' ),
223
- isNetworkActivation = <?php echo $is_network_activation ? 'true' : 'false' ?>;
224
-
225
- $modal.appendTo($('body'));
226
-
227
- var
228
- $licensesDropdown = $modal.find( '.fs-licenses' ),
229
- $licenseTypes = $modal.find( 'input[type="radio"][name="license_type"]' ),
230
- $applyOnAllSites = $modal.find( '.fs-apply-on-all-sites-checkbox' ),
231
- $sitesListContainer = $modal.find( '.fs-sites-list-container' ),
232
- $availableLicenseKey = $modal.find( '.fs-available-license-key' ),
233
- $otherLicenseKey = $modal.find( '#other_license_key_<?php echo $unique_affix ?>' ),
234
- $multisiteOptionsContainer = $modal.find( '.fs-multisite-options-container' ),
235
- $activationsLeft = null,
236
- hasLicensesDropdown = ( $licensesDropdown.length > 0 ),
237
- hasLicenseTypes = ( $licenseTypes.length > 0 ),
238
- maxSitesListHeight = null,
239
- totalSites = <?php echo count( $sites_details ) ?>,
240
- singleBlogID = null;
241
-
242
- function registerEventHandlers() {
243
- var
244
- $otherLicenseKeyContainer = $modal.find( '.fs-other-license-key-container' );
245
-
246
- if ( isNetworkActivation ) {
247
- $applyOnAllSites.click(function() {
248
- var applyOnAllSites = $( this ).is( ':checked' );
249
-
250
- $multisiteOptionsContainer.toggleClass( 'fs-apply-on-all-sites', applyOnAllSites );
251
-
252
- showSites( ! applyOnAllSites );
253
-
254
- if ( hasValidLicenseKey() && ( applyOnAllSites || hasSelectedSite() ) ) {
255
- enableActivateLicenseButton();
256
- } else {
257
- disableActivateLicenseButton();
258
- }
259
- });
260
-
261
- $sitesListContainer.delegate( 'td:not(:first-child)', 'click', function() {
262
- // If a site row is clicked, trigger a click on the checkbox.
263
- $( this ).parent().find( 'td:first-child input' ).click();
264
- });
265
-
266
- $sitesListContainer.delegate( 'input[type="checkbox"]', 'click', function() {
267
- enableDisableSitesSelection();
268
-
269
- if ( hasValidLicenseKey() && hasSelectedSite() ) {
270
- enableActivateLicenseButton();
271
- } else {
272
- disableActivateLicenseButton();
273
- }
274
- });
275
- }
276
-
277
- if ( hasLicensesDropdown ) {
278
- $licensesDropdown.change(function() {
279
- // When a license is selected, select the associated radio button.
280
- $licenseTypes.filter( '[value="available"]' ).attr( 'checked', true );
281
-
282
- if ( ! isNetworkActivation || $modal.hasClass( 'is-single-site-activation' ) ) {
283
- enableActivateLicenseButton();
284
- return true;
285
- }
286
-
287
- toggleActivationOnAllSites();
288
- })
289
- }
290
-
291
- if ( hasLicenseTypes ) {
292
- $licenseTypes.change(function() {
293
- var
294
- licenseKey = $modal.find( 'input.fs-license-key' ).val().trim(),
295
- otherLicenseKeySelected = isOtherLicenseKeySelected();
296
-
297
- if ( ( licenseKey.length > 0 || ( hasLicenseTypes && ! otherLicenseKeySelected ) ) &&
298
- ( $modal.hasClass( 'is-single-site-activation' ) || ! isNetworkActivation || hasSelectedSite() )
299
- ) {
300
- /**
301
- * If the "other" license is not empty or an available license is selected, enable the activate
302
- * button.
303
- *
304
- * @author Leo Fajardo (@leorw)
305
- */
306
- enableActivateLicenseButton();
307
- } else {
308
- disableActivateLicenseButton();
309
- }
310
-
311
- if ( ! isNetworkActivation ) {
312
- return;
313
- }
314
-
315
- if ( otherLicenseKeySelected ) {
316
- $applyOnAllSites.attr( 'disabled', false );
317
- enableDisableSitesSelection();
318
- resetActivateLicenseCheckboxLabel();
319
- } else if ( ! $modal.hasClass( 'is-single-site-activation' ) ) {
320
- toggleActivationOnAllSites();
321
- }
322
- });
323
-
324
- if ( ! hasLicensesDropdown ) {
325
- $availableLicenseKey.click(function() {
326
- $licenseTypes.filter( '[value="available"]' ).click();
327
- });
328
- }
329
-
330
- $otherLicenseKeyContainer.click(function() {
331
- $licenseTypes.filter( '[value="other"]' ).click();
332
- });
333
- }
334
-
335
- $activateLicenseLink.click(function (evt) {
336
- evt.preventDefault();
337
-
338
- showModal( evt );
339
- });
340
-
341
- $modal.on('input propertychange', 'input.fs-license-key', function () {
342
-
343
- var licenseKey = $(this).val().trim();
344
-
345
- /**
346
- * If license key is not empty, enable the license activation button.
347
- */
348
- if ( licenseKey.length > 0 && ( $modal.hasClass( 'is-single-site-activation' ) || ! isNetworkActivation || hasSelectedSite() ) ) {
349
- enableActivateLicenseButton();
350
- }
351
- });
352
-
353
- $modal.on( 'blur', 'input.fs-license-key', function( evt ) {
354
- var
355
- licenseKey = $(this).val().trim(),
356
- $focusedElement = $( evt.relatedTarget ),
357
- hasSelectedAvailableLicense = ( hasLicenseTypes && $focusedElement.parents( '.fs-available-license-key-container' ).length > 0 );
358
-
359
- /**
360
- * If license key is empty, disable the license activation button.
361
- */
362
- if ( ( 0 === licenseKey.length && ( ! hasLicenseTypes || ! hasSelectedAvailableLicense ) ) ||
363
- ( isNetworkActivation && ! hasSelectedSite() )
364
- ) {
365
- disableActivateLicenseButton();
366
- }
367
- });
368
-
369
- $modal.on('click', '.button-activate-license', function (evt) {
370
- evt.preventDefault();
371
-
372
- if ($(this).hasClass('disabled')) {
373
- return;
374
- }
375
-
376
- var
377
- licenseKey = '';
378
-
379
- if ( hasLicenseTypes ) {
380
- if ( isOtherLicenseKeySelected() ) {
381
- licenseKey = $otherLicenseKey.val();
382
- } else {
383
- if ( ! hasLicensesDropdown ) {
384
- licenseKey = $availableLicenseKey.data( 'license-key' );
385
- } else {
386
- licenseKey = $licensesDropdown.val();
387
- }
388
- }
389
- } else {
390
- licenseKey = $licenseKeyInput.val().trim();
391
- }
392
-
393
- disableActivateLicenseButton();
394
-
395
- if (0 === licenseKey.length) {
396
- return;
397
- }
398
-
399
- var data = {
400
- action : '<?php echo $fs->get_ajax_action( 'activate_license' ) ?>',
401
- security : '<?php echo $fs->get_ajax_security( 'activate_license' ) ?>',
402
- license_key: licenseKey,
403
- module_id : '<?php echo $fs->get_id() ?>'
404
- };
405
-
406
- if ( isNetworkActivation ) {
407
- var
408
- sites = [];
409
-
410
- if ( null === singleBlogID ) {
411
- var
412
- applyOnAllSites = $applyOnAllSites.is( ':checked' );
413
-
414
- $sitesListContainer.find( 'tr' ).each(function() {
415
- var
416
- $this = $( this ),
417
- includeSite = ( applyOnAllSites || $this.find( 'input' ).is( ':checked' ) );
418
-
419
- if ( ! includeSite )
420
- return;
421
-
422
- var site = {
423
- uid : $this.find( '.uid' ).val(),
424
- url : $this.find( '.url' ).val(),
425
- title : $this.find( '.title' ).val(),
426
- language: $this.find( '.language' ).val(),
427
- charset : $this.find( '.charset' ).val(),
428
- blog_id : $this.find( '.blog-id' ).find( 'span' ).text()
429
- };
430
-
431
- sites.push( site );
432
- });
433
- } else {
434
- data.blog_id = singleBlogID;
435
- }
436
-
437
- data.sites = sites;
438
- }
439
-
440
- $.ajax({
441
- url: ajaxurl,
442
- method: 'POST',
443
- data: data,
444
- beforeSend: function () {
445
- $activateLicenseButton.text( '<?php fs_esc_js_echo_inline( 'Activating license', 'activating-license', $slug ) ?>...' );
446
- },
447
- success: function( result ) {
448
- var resultObj = $.parseJSON( result );
449
- if ( resultObj.success ) {
450
- closeModal();
451
-
452
- // Redirect to the "Account" page and sync the license.
453
- window.location.href = resultObj.next_page;
454
- } else {
455
- showError( resultObj.error.message ? resultObj.error.message : resultObj.error );
456
- resetActivateLicenseButton();
457
- }
458
- }
459
- });
460
- });
461
-
462
- // If the user has clicked outside the window, close the modal.
463
- $modal.on('click', '.fs-close, .button-secondary', function () {
464
- closeModal();
465
- return false;
466
- });
467
- }
468
-
469
- registerEventHandlers();
470
-
471
- $('body').trigger('licenseActivationLoaded');
472
-
473
- /**
474
- * @author Leo Fajardo (@leorw)
475
- * @since 2.0.0
476
- */
477
- function enableDisableSitesSelection() {
478
- var
479
- canApplyOnAllSites = $applyOnAllSites.is( ':enabled' ),
480
- disableSitesSelection = null;
481
-
482
- if ( ! canApplyOnAllSites ) {
483
- var
484
- selectedSites = $sitesListContainer.find( 'input[type="checkbox"]:checked' ).length,
485
- activationsLeft = Math.max( 0, $activationsLeft.data( 'left' ) - selectedSites );
486
-
487
- disableSitesSelection = ( 0 === activationsLeft );
488
-
489
- $activationsLeft.text( activationsLeft );
490
- } else {
491
- disableSitesSelection = false;
492
- }
493
-
494
- $sitesListContainer
495
- .find( 'input[type="checkbox"]:not(:checked)' )
496
- .attr( 'disabled', disableSitesSelection );
497
- }
498
-
499
- /**
500
- * @author Leo Fajardo (@leorw)
501
- * @since 2.0.0
502
- *
503
- * @returns {Boolean}
504
- */
505
- function isOtherLicenseKeySelected() {
506
- return ( hasLicenseTypes && 'other' === $licenseTypes.filter( ':checked' ).val() );
507
- }
508
-
509
- /**
510
- * @author Leo Fajardo (@leorw)
511
- * @since 2.0.0
512
- *
513
- * @returns {Boolean}
514
- */
515
- function hasValidLicenseKey() {
516
- var licenseKey = '';
517
- if ( hasLicenseTypes ) {
518
- if ( 'available' === $licenseTypes.filter( ':checked' ).val() ) {
519
- return true;
520
- } else {
521
- licenseKey = $otherLicenseKey.val();
522
- }
523
- } else {
524
- licenseKey = $modal.find( 'input.fs-license-key' ).val();
525
- }
526
-
527
- return ( licenseKey.trim().length > 0 );
528
- }
529
-
530
- /**
531
- * @author Leo Fajardo (@leorw)
532
- * @since 2.0.0
533
- *
534
- * @returns {Boolean}
535
- */
536
- function hasSelectedSite() {
537
- return ( $applyOnAllSites.is( ':checked' ) ||
538
- $sitesListContainer.find( 'input[type="checkbox"]:checked:not(:disabled)' ).length > 0 );
539
- }
540
-
541
- /**
542
- * @author Leo Fajardo (@leorw)
543
- * @since 2.0.0
544
- */
545
- function toggleActivationOnAllSites() {
546
- var activationsLeft,
547
- licenseID;
548
-
549
- if (hasLicensesDropdown) {
550
- var $selectedOption = $licensesDropdown.find( ':selected' );
551
- activationsLeft = $selectedOption.data('left');
552
- licenseID = $selectedOption.data('id');
553
- } else {
554
- activationsLeft = $availableLicenseKey.data('left');
555
- licenseID = $availableLicenseKey.data('id');
556
- }
557
-
558
- // Cleanup previously auto-selected site.
559
- $modal.find( '.fs-sites-list-container input[type=checkbox]:disabled' )
560
- .attr('disabled', false)
561
- .attr('checked', false);
562
-
563
- var $blogsWithActiveLicense = $modal.find( '.fs-sites-list-container tr[data-license-id=' + licenseID + '] input[type=checkbox]' );
564
-
565
- if ($blogsWithActiveLicense.length > 0) {
566
- $blogsWithActiveLicense.attr('checked', true)
567
- .attr('disabled', true);
568
-
569
- activationsLeft += $blogsWithActiveLicense.length;
570
- }
571
-
572
- if ( activationsLeft >= totalSites ) {
573
- $applyOnAllSites.attr( 'disabled', false );
574
- enableDisableSitesSelection();
575
-
576
- resetActivateLicenseCheckboxLabel();
577
-
578
- return;
579
- }
580
-
581
- $applyOnAllSites.attr( 'checked', false );
582
- $applyOnAllSites.attr( 'disabled', true );
583
-
584
- showSites( true );
585
-
586
- var
587
- activateLicenseCheckboxLabel = '<?php fs_esc_js_echo_inline( 'Choose up to %s site(s) to activate the license on.', 'choose-up-to-n-sites-to-activate-the-license-on', $slug ) ?>';
588
-
589
- activateLicenseCheckboxLabel = activateLicenseCheckboxLabel.replace( '%s', '<span data-left="' + activationsLeft + '" class="activations-left">' + activationsLeft + '</span>' );
590
-
591
- // Update the label of the "Activate license on all sites" checkbox.
592
- $applyOnAllSites.parent().find( 'span' ).html( activateLicenseCheckboxLabel );
593
- $activationsLeft = $modal.find( '.activations-left' );
594
-
595
- if ( hasSelectedSite() ) {
596
- enableActivateLicenseButton();
597
- enableDisableSitesSelection();
598
- } else {
599
- disableActivateLicenseButton();
600
- }
601
- }
602
-
603
- /**
604
- * @author Leo Fajardo (@leorw)
605
- * @since 2.0.0
606
- */
607
- function resetActivateLicenseCheckboxLabel() {
608
- var activateLicenseCheckboxLabel = '<?php fs_esc_js_echo_inline( 'Activate license on all sites in the network.', 'activate-license-on-all-sites-in-the-network', $slug ) ?>';
609
- $applyOnAllSites.parent().find( 'span' ).text( activateLicenseCheckboxLabel );
610
- }
611
-
612
- /**
613
- * @author Leo Fajardo (@leorw)
614
- * @since 2.0.0
615
- *
616
- * @param {Boolean} show
617
- */
618
- function showSites( show ) {
619
- $sitesListContainer.toggle( show );
620
- if ( show && null === maxSitesListHeight ) {
621
- /**
622
- * Set the visible number of rows to 5 (5 * height of the first row).
623
- *
624
- * @author Leo Fajardo (@leorw)
625
- */
626
- maxSitesListHeight = ( 5 * $sitesListContainer.find( 'tr:first' ).height() );
627
- $sitesListContainer.css( 'max-height', maxSitesListHeight );
628
- }
629
- }
630
-
631
- function showModal( evt ) {
632
- resetModal();
633
-
634
- // Display the dialog box.
635
- $modal.addClass('active');
636
- $('body').addClass('has-fs-modal');
637
-
638
- var
639
- $singleInstallDetails = $( evt.target ).parents( 'tr.fs-install-details' ),
640
- isSingleSiteActivation = ( $singleInstallDetails.length > 0 );
641
-
642
- $modal.toggleClass( 'is-single-site-activation', isSingleSiteActivation );
643
-
644
- singleBlogID = isSingleSiteActivation ?
645
- $singleInstallDetails.prev().data( 'blog-id' ) :
646
- null;
647
-
648
- $multisiteOptionsContainer.toggle( isNetworkActivation && ! isSingleSiteActivation );
649
-
650
- if ( hasLicenseTypes ) {
651
- $licenseTypes.attr( 'checked', false );
652
-
653
- if ( hasLicensesDropdown ) {
654
- $licensesDropdown.find( 'option:first' ).attr( 'selected', true ).trigger( 'change' );
655
- } else {
656
- $licenseTypes.filter( '[value="available"]' ).click();
657
- }
658
-
659
- $otherLicenseKey.val( '' );
660
- } else {
661
- $licenseKeyInput.val( '' );
662
- $licenseKeyInput.focus();
663
- }
664
- }
665
-
666
- function closeModal() {
667
- $modal.removeClass('active');
668
- $('body').removeClass('has-fs-modal');
669
- }
670
-
671
- function resetActivateLicenseButton() {
672
- enableActivateLicenseButton();
673
- $activateLicenseButton.text( <?php echo json_encode( $activate_button_text ) ?> );
674
- }
675
-
676
- function resetModal() {
677
- hideError();
678
- resetActivateLicenseButton();
679
- }
680
-
681
- function enableActivateLicenseButton() {
682
- $activateLicenseButton.removeClass( 'disabled' );
683
- }
684
-
685
- function disableActivateLicenseButton() {
686
- $activateLicenseButton.addClass( 'disabled' );
687
- }
688
-
689
- function hideError() {
690
- $licenseActivationMessage.hide();
691
- }
692
-
693
- function showError( msg ) {
694
- $licenseActivationMessage.find( ' > p' ).html( msg );
695
- $licenseActivationMessage.show();
696
- }
697
- });
698
- })( jQuery );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
  </script>
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.1.9
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ *
16
+ * @var Freemius $fs
17
+ */
18
+ $fs = freemius( $VARS['id'] );
19
+ $slug = $fs->get_slug();
20
+ $unique_affix = $fs->get_unique_affix();
21
+
22
+ $cant_find_license_key_text = fs_text_inline( "Can't find your license key?", 'cant-find-license-key', $slug );
23
+ $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 );
24
+ $message_below_input_field = '';
25
+
26
+ $header_title = $fs->is_free_plan() ?
27
+ fs_text_inline( 'Activate License', 'activate-license', $slug ) :
28
+ fs_text_inline( 'Update License', 'update-license', $slug );
29
+
30
+ if ( $fs->is_registered() ) {
31
+ $activate_button_text = $header_title;
32
+ } else {
33
+ $freemius_site_url = $fs->has_paid_plan() ?
34
+ 'https://freemius.com/' :
35
+ // Insights platform information.
36
+ $fs->get_usage_tracking_terms_url();
37
+
38
+ $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" rel="noopener" tabindex="0">freemius.com</a>';
39
+
40
+ $message_below_input_field = sprintf(
41
+ fs_text_inline( '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.', 'license-sync-disclaimer', $slug ),
42
+ $fs->get_module_label( true ),
43
+ $freemius_link
44
+ );
45
+
46
+ $activate_button_text = fs_text_inline( 'Agree & Activate License', 'agree-activate-license', $slug );
47
+ }
48
+
49
+ $license_key_text = fs_text_inline( 'License key', 'license-key' , $slug );
50
+
51
+ $is_network_activation = (
52
+ $fs->is_network_active() &&
53
+ fs_is_network_admin() &&
54
+ ! $fs->is_delegated_connection()
55
+ );
56
+ $network_activation_html = '';
57
+
58
+ $sites_details = array();
59
+ if ( $is_network_activation ) {
60
+ $all_sites = Freemius::get_sites();
61
+
62
+ foreach ( $all_sites as $site ) {
63
+ $site_details = $fs->get_site_info( $site );
64
+
65
+ $blog_id = Freemius::get_site_blog_id( $site );
66
+ $install = $fs->get_install_by_blog_id($blog_id);
67
+
68
+ if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
69
+ $site_details['license_id'] = $install->license_id;
70
+ }
71
+
72
+ $sites_details[] = $site_details;
73
+ }
74
+
75
+ if ( $is_network_activation ) {
76
+ $vars = array(
77
+ 'id' => $fs->get_id(),
78
+ 'sites' => $sites_details,
79
+ 'require_license_key' => true
80
+ );
81
+
82
+ $network_activation_html = fs_get_template( 'partials/network-activation.php', $vars );
83
+ }
84
+ }
85
+
86
+ $premium_licenses = $fs->get_available_premium_licenses();
87
+ $available_licenses = array();
88
+ foreach ( $premium_licenses as $premium_license ) {
89
+ $activations_left = $premium_license->left();
90
+ if ( ! ( $activations_left > 0 ) ) {
91
+ continue;
92
+ }
93
+
94
+ $available_licenses[ $activations_left . '_' . $premium_license->id ] = $premium_license;
95
+ }
96
+
97
+ $total_available_licenses = count( $available_licenses );
98
+ if ( $total_available_licenses > 0 ) {
99
+ $license_input_html = <<< HTML
100
+ <div class="fs-license-options-container">
101
+ <table>
102
+ <tbody>
103
+ <tr class="fs-available-license-key-container">
104
+ <td><input type="radio" name="license_type" value="available"></td>
105
+ <td>
106
+ HTML;
107
+
108
+ if ( $total_available_licenses > 1 ) {
109
+ // Sort the licenses by number of activations left in descending order.
110
+ krsort( $available_licenses );
111
+
112
+ $license_input_html .= '<select class="fs-licenses">';
113
+
114
+ /**
115
+ * @var FS_Plugin_License $license
116
+ */
117
+ foreach ( $available_licenses as $license ) {
118
+ $label = sprintf(
119
+ "%s-Site %s License - %s",
120
+ ( 1 == $license->quota ?
121
+ 'Single' :
122
+ ( $license->is_unlimited() ? 'Unlimited' : $license->quota )
123
+ ),
124
+ $fs->_get_plan_by_id( $license->plan_id )->title,
125
+ $license->get_html_escaped_masked_secret_key()
126
+ );
127
+
128
+ $license_input_html .= "<option data-id='{$license->id}' value='{$license->secret_key}' data-left='{$license->left()}'>{$label}</option>";
129
+ }
130
+
131
+ $license_input_html .= '</select>';
132
+ } else {
133
+ $available_licenses = array_values( $available_licenses );
134
+
135
+ /**
136
+ * @var FS_Plugin_License $available_license
137
+ */
138
+ $available_license = $available_licenses[0];
139
+ $value = sprintf(
140
+ "%s-Site %s License - %s",
141
+ ( 1 == $available_license->quota ?
142
+ 'Single' :
143
+ ( $available_license->is_unlimited() ? 'Unlimited' : $available_license->quota )
144
+ ),
145
+ $fs->_get_plan_by_id( $available_license->plan_id )->title,
146
+ $available_license->get_html_escaped_masked_secret_key()
147
+ );
148
+
149
+ $license_input_html .= <<< HTML
150
+ <input
151
+ class="fs-available-license-key"
152
+ type="text"
153
+ value="{$value}"
154
+ data-id="{$available_license->id}"
155
+ data-license-key="{$available_license->secret_key}"
156
+ data-left="{$available_license->left()}"
157
+ readonly />
158
+ HTML;
159
+ }
160
+
161
+ $license_input_html .= <<< HTML
162
+ </td>
163
+ </tr>
164
+ <tr>
165
+ <td><input type="radio" name="license_type" value="other"></td>
166
+ <td class="fs-other-license-key-container">
167
+ <label for="other_license_key_{$unique_affix}">Other: </label>
168
+ <div>
169
+ <input id="other_license_key_{$unique_affix}" class="fs-license-key" type="text" placeholder="Enter license key" tabindex="1">
170
+ </div>
171
+ </td>
172
+ </tr>
173
+ </tbody>
174
+ </table>
175
+ </div>
176
+ HTML;
177
+ } else {
178
+ $license_input_html = "<input class='fs-license-key' type='text' placeholder='{$license_key_text}' tabindex='1' />";
179
+ }
180
+
181
+ $ownership_change_option_text = fs_text_inline( "Associate with the license owner's account.", 'associate-account-with-license-owner', $slug );
182
+ $ownership_change_option_html = "<div class='ownership-change-option-container' style='display: none'><label><input type='checkbox' /> <strong>{$ownership_change_option_text}</strong></label></div>";
183
+
184
+ /**
185
+ * IMPORTANT:
186
+ * DO NOT ADD MAXLENGTH OR LIMIT THE LICENSE KEY LENGTH SINCE
187
+ * WE DO WANT TO ALLOW INPUT OF LONGER KEYS (E.G. WooCommerce Keys)
188
+ * FOR MIGRATED MODULES.
189
+ */
190
+ $modal_content_html = <<< HTML
191
+ <div class="notice notice-error inline license-activation-message"><p></p></div>
192
+ <p>{$message_above_input_field}</p>
193
+ {$license_input_html}
194
+ <a class="show-license-resend-modal show-license-resend-modal-{$fs->get_unique_affix()}" href="!#" tabindex="2">{$cant_find_license_key_text}</a>
195
+ {$network_activation_html}
196
+ <p>{$message_below_input_field}</p>
197
+ {$ownership_change_option_html}
198
+ HTML;
199
+
200
+ /**
201
+ * Handle the ownership change option if not an add-on or if no license yet is activated for the
202
+ * parent product in case of an add-on.
203
+ *
204
+ * @author Leo Fajardo (@leorw)
205
+ * @since 2.3.2
206
+ */
207
+ $is_user_change_supported = ( ! $fs->is_addon() || ! $fs->get_parent_instance()->has_active_valid_license() );
208
+
209
+ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
210
+ ?>
211
+ <script type="text/javascript">
212
+ (function( $ ) {
213
+ $( document ).ready(function() {
214
+ var modalContentHtml = <?php echo json_encode($modal_content_html); ?>,
215
+ modalHtml =
216
+ '<div class="fs-modal fs-modal-license-activation fs-modal-license-activation-<?php echo $unique_affix ?>">'
217
+ + ' <div class="fs-modal-dialog">'
218
+ + ' <div class="fs-modal-header">'
219
+ + ' <h4><?php echo esc_js($header_title) ?></h4>'
220
+ + ' <a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="<?php echo esc_js( fs_text_x_inline( 'Dismiss', 'as close a window', 'dismiss', $slug ) ) ?>"></i></a>'
221
+ + ' </div>'
222
+ + ' <div class="fs-modal-body">'
223
+ + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
224
+ + ' </div>'
225
+ + ' <div class="fs-modal-footer">'
226
+ + ' <button class="button button-secondary button-close" tabindex="4"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></button>'
227
+ + ' <button class="button button-primary button-activate-license" tabindex="3"><?php echo esc_js( $activate_button_text ) ?></button>'
228
+ + ' </div>'
229
+ + ' </div>'
230
+ + '</div>',
231
+ $modal = $(modalHtml),
232
+ $activateLicenseButton = $modal.find('.button-activate-license'),
233
+ $licenseKeyInput = $modal.find( 'input.fs-license-key' ),
234
+ $licenseActivationMessage = $modal.find( '.license-activation-message' ),
235
+ isNetworkActivation = <?php echo $is_network_activation ? 'true' : 'false' ?>,
236
+ isUserChangeSupported = <?php echo $is_user_change_supported ? 'true' : 'false' ?>,
237
+ isSingleSiteActivation = false,
238
+ $ownershipChangeOptionContainer = $modal.find( '.ownership-change-option-container' ),
239
+ $body = $( 'body' );
240
+
241
+ $modal.appendTo( $body );
242
+
243
+ var
244
+ $licensesDropdown = $modal.find( '.fs-licenses' ),
245
+ $licenseTypes = $modal.find( 'input[type="radio"][name="license_type"]' ),
246
+ $applyOnAllSites = $modal.find( '.fs-apply-on-all-sites-checkbox' ),
247
+ $sitesListContainer = $modal.find( '.fs-sites-list-container' ),
248
+ $availableLicenseKey = $modal.find( '.fs-available-license-key' ),
249
+ $otherLicenseKey = $modal.find( '#other_license_key_<?php echo $unique_affix ?>' ),
250
+ $multisiteOptionsContainer = $modal.find( '.fs-multisite-options-container' ),
251
+ $activationsLeft = null,
252
+ hasLicensesDropdown = ( $licensesDropdown.length > 0 ),
253
+ hasLicenseTypes = ( $licenseTypes.length > 0 ),
254
+ maxSitesListHeight = null,
255
+ totalSites = <?php echo count( $sites_details ) ?>,
256
+ singleBlogID = null;
257
+
258
+ var
259
+ previousLicenseKey = null,
260
+ otherLicenseOwnerID = null,
261
+ /**
262
+ * @author Leo Fajardo (@leorw)
263
+ * @since 2.3.2
264
+ */
265
+ resetLoadingMode = function () {
266
+ // Reset loading mode.
267
+ $activateLicenseButton.text( <?php echo json_encode( $activate_button_text ) ?> );
268
+ $activateLicenseButton.prop( 'disabled', false );
269
+ $( document.body ).css( { 'cursor': 'auto' } );
270
+ $( '.fs-loading' ).removeClass( 'fs-loading' );
271
+
272
+ console.log( 'resetLoadingMode - Primary button was enabled' );
273
+ },
274
+ /**
275
+ * @author Leo Fajardo (@leorw)
276
+ * @since 2.3.2
277
+ */
278
+ setLoadingMode = function () {
279
+ $( document.body ).css( { 'cursor': 'wait' } );
280
+ },
281
+ /**
282
+ * @author Leo Fajardo (@leorw)
283
+ * @since 2.3.2
284
+ */
285
+ afterLicenseUserDataLoaded = function () {
286
+ if (
287
+ null !== otherLicenseOwnerID &&
288
+ otherLicenseOwnerID != <?php echo $fs->is_registered() ? $fs->get_user()->id : 'null' ?>
289
+ ) {
290
+ $ownershipChangeOptionContainer.show();
291
+ } else {
292
+ $ownershipChangeOptionContainer.hide();
293
+ $activateLicenseButton.focus();
294
+ }
295
+ },
296
+ /**
297
+ * @author Leo Fajardo (@leorw)
298
+ * @since 2.3.2
299
+ */
300
+ fetchLicenseUserData = function () {
301
+ var hideAndUncheckUserChangeCheckbox = ( ! isUserChangeSupported ),
302
+ otherLicenseKeyIsSelected = isOtherLicenseKeySelected();
303
+
304
+ if ( ! hideAndUncheckUserChangeCheckbox ) {
305
+ // User change is supported only on the site level.
306
+ hideAndUncheckUserChangeCheckbox = ( isNetworkActivation || isSingleSiteActivation );
307
+ }
308
+
309
+ if ( ! hideAndUncheckUserChangeCheckbox ) {
310
+ hideAndUncheckUserChangeCheckbox = ( hasLicenseTypes && ! otherLicenseKeyIsSelected );
311
+ }
312
+
313
+ var licenseKey = $licenseKeyInput.val().trim();
314
+
315
+ if ( ! hideAndUncheckUserChangeCheckbox && otherLicenseKeyIsSelected ) {
316
+ hideAndUncheckUserChangeCheckbox = ( licenseKey.length < 32 );
317
+ }
318
+
319
+ if ( licenseKey !== previousLicenseKey ) {
320
+ // If the license key has not been changed, keep the owner ID in order to prevent another API call.
321
+ otherLicenseOwnerID = null;
322
+ }
323
+
324
+ if ( hideAndUncheckUserChangeCheckbox ) {
325
+ $ownershipChangeOptionContainer.hide().find( 'input' ).attr( 'checked', false );
326
+
327
+ return;
328
+ }
329
+
330
+ if ( null !== otherLicenseOwnerID ) {
331
+ afterLicenseUserDataLoaded();
332
+ return;
333
+ }
334
+
335
+ setLoadingMode();
336
+
337
+ $activateLicenseButton.addClass( 'fs-loading' );
338
+ $activateLicenseButton.attr( 'disabled', 'disabled' );
339
+ $activateLicenseButton.html( '<?php fs_esc_js_echo_inline( 'Please wait', 'please-wait', $slug ) ?>...' );
340
+
341
+ $.ajax( {
342
+ url : ajaxurl,
343
+ method : 'POST',
344
+ data : {
345
+ action : '<?php echo $fs->get_ajax_action( 'fetch_is_marketing_required_flag_value' ) ?>',
346
+ security : '<?php echo $fs->get_ajax_security( 'fetch_is_marketing_required_flag_value' ) ?>',
347
+ license_key: licenseKey,
348
+ module_id : '<?php echo $fs->get_id() ?>'
349
+ },
350
+ success: function ( result ) {
351
+ resetLoadingMode();
352
+
353
+ if ( result.success ) {
354
+ result = result.data;
355
+
356
+ // Cache license owner's ID.
357
+ otherLicenseOwnerID = result.license_owner_id;
358
+ }
359
+
360
+ afterLicenseUserDataLoaded();
361
+ }
362
+ } );
363
+ };
364
+
365
+ function registerEventHandlers() {
366
+ var
367
+ $otherLicenseKeyContainer = $modal.find( '.fs-other-license-key-container' );
368
+
369
+ if ( isNetworkActivation ) {
370
+ $applyOnAllSites.click(function() {
371
+ var applyOnAllSites = $( this ).is( ':checked' );
372
+
373
+ $multisiteOptionsContainer.toggleClass( 'fs-apply-on-all-sites', applyOnAllSites );
374
+
375
+ showSites( ! applyOnAllSites );
376
+
377
+ if ( hasValidLicenseKey() && ( applyOnAllSites || hasSelectedSite() ) ) {
378
+ enableActivateLicenseButton();
379
+ } else {
380
+ disableActivateLicenseButton();
381
+ }
382
+ });
383
+
384
+ $sitesListContainer.delegate( 'td:not(:first-child)', 'click', function() {
385
+ // If a site row is clicked, trigger a click on the checkbox.
386
+ $( this ).parent().find( 'td:first-child input' ).click();
387
+ });
388
+
389
+ $sitesListContainer.delegate( 'input[type="checkbox"]', 'click', function() {
390
+ enableDisableSitesSelection();
391
+
392
+ if ( hasValidLicenseKey() && hasSelectedSite() ) {
393
+ enableActivateLicenseButton();
394
+ } else {
395
+ disableActivateLicenseButton();
396
+ }
397
+ });
398
+ }
399
+
400
+ if ( hasLicensesDropdown ) {
401
+ $licensesDropdown.change(function() {
402
+ // When a license is selected, select the associated radio button.
403
+ $licenseTypes.filter( '[value="available"]' ).attr( 'checked', true );
404
+
405
+ if ( ! isNetworkActivation || $modal.hasClass( 'is-single-site-activation' ) ) {
406
+ enableActivateLicenseButton();
407
+ return true;
408
+ }
409
+
410
+ toggleActivationOnAllSites();
411
+ })
412
+ }
413
+
414
+ if ( hasLicenseTypes ) {
415
+ $licenseTypes.change(function() {
416
+ var
417
+ licenseKey = $modal.find( 'input.fs-license-key' ).val().trim(),
418
+ otherLicenseKeySelected = isOtherLicenseKeySelected();
419
+
420
+ if ( ( licenseKey.length > 0 || ( hasLicenseTypes && ! otherLicenseKeySelected ) ) &&
421
+ ( $modal.hasClass( 'is-single-site-activation' ) || ! isNetworkActivation || hasSelectedSite() )
422
+ ) {
423
+ /**
424
+ * If the "other" license is not empty or an available license is selected, enable the activate
425
+ * button.
426
+ *
427
+ * @author Leo Fajardo (@leorw)
428
+ */
429
+ enableActivateLicenseButton();
430
+ } else {
431
+ disableActivateLicenseButton();
432
+ }
433
+
434
+ if ( '' !== licenseKey ) {
435
+ fetchLicenseUserData();
436
+ }
437
+
438
+ if ( ! isNetworkActivation ) {
439
+ return;
440
+ }
441
+
442
+ if ( otherLicenseKeySelected ) {
443
+ $applyOnAllSites.attr( 'disabled', false );
444
+ enableDisableSitesSelection();
445
+ resetActivateLicenseCheckboxLabel();
446
+ } else if ( ! $modal.hasClass( 'is-single-site-activation' ) ) {
447
+ toggleActivationOnAllSites();
448
+ }
449
+ });
450
+
451
+ if ( ! hasLicensesDropdown ) {
452
+ $availableLicenseKey.click(function() {
453
+ $licenseTypes.filter( '[value="available"]' ).click();
454
+ });
455
+ }
456
+
457
+ $otherLicenseKeyContainer.click(function() {
458
+ $licenseTypes.filter( '[value="other"]' ).click();
459
+ });
460
+ }
461
+
462
+ $body.on( 'click', 'span.activate-license.<?php echo $unique_affix ?> a, .activate-license-trigger.<?php echo $unique_affix ?>', function (evt) {
463
+ evt.preventDefault();
464
+
465
+ showModal( evt );
466
+ });
467
+
468
+ var licenseTimeout = null;
469
+
470
+ /**
471
+ * Disable activation button when license key is empty.
472
+ *
473
+ * @author Leo Fajardo (@leorw)
474
+ * @since 2.3.2
475
+ */
476
+ $modal.on( 'keyup paste delete cut', 'input.fs-license-key', function () {
477
+ clearTimeout(licenseTimeout);
478
+
479
+ licenseTimeout = setTimeout( function () {
480
+ var licenseKey = $licenseKeyInput.val().trim();
481
+
482
+ if ( licenseKey == previousLicenseKey ) {
483
+ afterLicenseUserDataLoaded();
484
+ return;
485
+ }
486
+
487
+ if ( '' === licenseKey ) {
488
+ disableActivateLicenseButton();
489
+ $ownershipChangeOptionContainer.hide();
490
+ } else {
491
+ enableActivateLicenseButton();
492
+
493
+ if ( 32 <= licenseKey.length ) {
494
+ fetchLicenseUserData();
495
+ } else {
496
+ $ownershipChangeOptionContainer.hide();
497
+ }
498
+ }
499
+
500
+ previousLicenseKey = licenseKey;
501
+ }, 200 );
502
+ } ).focus();
503
+
504
+ $modal.on('input propertychange', 'input.fs-license-key', function () {
505
+
506
+ var licenseKey = $(this).val().trim();
507
+
508
+ /**
509
+ * If license key is not empty, enable the license activation button.
510
+ */
511
+ if ( licenseKey.length > 0 && ( $modal.hasClass( 'is-single-site-activation' ) || ! isNetworkActivation || hasSelectedSite() ) ) {
512
+ enableActivateLicenseButton();
513
+ }
514
+ });
515
+
516
+ $modal.on( 'blur', 'input.fs-license-key', function( evt ) {
517
+ var
518
+ licenseKey = $(this).val().trim(),
519
+ $focusedElement = $( evt.relatedTarget ),
520
+ hasSelectedAvailableLicense = ( hasLicenseTypes && $focusedElement.parents( '.fs-available-license-key-container' ).length > 0 );
521
+
522
+ /**
523
+ * If license key is empty, disable the license activation button.
524
+ */
525
+ if ( ( 0 === licenseKey.length && ( ! hasLicenseTypes || ! hasSelectedAvailableLicense ) ) ||
526
+ ( isNetworkActivation && ! hasSelectedSite() )
527
+ ) {
528
+ disableActivateLicenseButton();
529
+ }
530
+ });
531
+
532
+ $modal.on('click', '.button-activate-license', function (evt) {
533
+ evt.preventDefault();
534
+
535
+ if ($(this).hasClass('disabled')) {
536
+ return;
537
+ }
538
+
539
+ var
540
+ licenseKey = '';
541
+
542
+ if ( hasLicenseTypes ) {
543
+ if ( isOtherLicenseKeySelected() ) {
544
+ licenseKey = $otherLicenseKey.val();
545
+ } else {
546
+ if ( ! hasLicensesDropdown ) {
547
+ licenseKey = $availableLicenseKey.data( 'license-key' );
548
+ } else {
549
+ licenseKey = $licensesDropdown.val();
550
+ }
551
+ }
552
+ } else {
553
+ licenseKey = $licenseKeyInput.val().trim();
554
+ }
555
+
556
+ disableActivateLicenseButton();
557
+
558
+ if (0 === licenseKey.length) {
559
+ return;
560
+ }
561
+
562
+ var data = {
563
+ action : '<?php echo $fs->get_ajax_action( 'activate_license' ) ?>',
564
+ security : '<?php echo $fs->get_ajax_security( 'activate_license' ) ?>',
565
+ license_key: licenseKey,
566
+ module_id : '<?php echo $fs->get_id() ?>'
567
+ };
568
+
569
+ if ( isNetworkActivation ) {
570
+ var
571
+ sites = [];
572
+
573
+ if ( null === singleBlogID ) {
574
+ var
575
+ applyOnAllSites = $applyOnAllSites.is( ':checked' );
576
+
577
+ $sitesListContainer.find( 'tr' ).each(function() {
578
+ var
579
+ $this = $( this ),
580
+ includeSite = ( applyOnAllSites || $this.find( 'input' ).is( ':checked' ) );
581
+
582
+ if ( ! includeSite )
583
+ return;
584
+
585
+ var site = {
586
+ uid : $this.find( '.uid' ).val(),
587
+ url : $this.find( '.url' ).val(),
588
+ title : $this.find( '.title' ).val(),
589
+ language: $this.find( '.language' ).val(),
590
+ charset : $this.find( '.charset' ).val(),
591
+ blog_id : $this.find( '.blog-id' ).find( 'span' ).text()
592
+ };
593
+
594
+ sites.push( site );
595
+ });
596
+ } else {
597
+ data.blog_id = singleBlogID;
598
+ }
599
+
600
+ data.sites = sites;
601
+ }
602
+
603
+ if ( $ownershipChangeOptionContainer.find( 'input:checked' ).length > 0 ) {
604
+ data.user_id = otherLicenseOwnerID;
605
+ }
606
+
607
+ $.ajax({
608
+ url: ajaxurl,
609
+ method: 'POST',
610
+ data: data,
611
+ beforeSend: function () {
612
+ $activateLicenseButton.text( '<?php fs_esc_js_echo_inline( 'Activating license', 'activating-license', $slug ) ?>...' );
613
+ },
614
+ success: function( result ) {
615
+ var resultObj = $.parseJSON( result );
616
+ if ( resultObj.success ) {
617
+ closeModal();
618
+
619
+ // Redirect to the "Account" page and sync the license.
620
+ window.location.href = resultObj.next_page;
621
+ } else {
622
+ showError( resultObj.error.message ? resultObj.error.message : resultObj.error );
623
+ resetActivateLicenseButton();
624
+ }
625
+ }
626
+ });
627
+ });
628
+
629
+ // If the user has clicked outside the window, close the modal.
630
+ $modal.on('click', '.fs-close, .button-secondary', function () {
631
+ closeModal();
632
+ return false;
633
+ });
634
+ }
635
+
636
+ registerEventHandlers();
637
+
638
+ $body.trigger('licenseActivationLoaded');
639
+
640
+ /**
641
+ * @author Leo Fajardo (@leorw)
642
+ * @since 2.0.0
643
+ */
644
+ function enableDisableSitesSelection() {
645
+ var
646
+ canApplyOnAllSites = $applyOnAllSites.is( ':enabled' ),
647
+ disableSitesSelection = null;
648
+
649
+ if ( ! canApplyOnAllSites ) {
650
+ var
651
+ selectedSites = $sitesListContainer.find( 'input[type="checkbox"]:checked' ).length,
652
+ activationsLeft = Math.max( 0, $activationsLeft.data( 'left' ) - selectedSites );
653
+
654
+ disableSitesSelection = ( 0 === activationsLeft );
655
+
656
+ $activationsLeft.text( activationsLeft );
657
+ } else {
658
+ disableSitesSelection = false;
659
+ }
660
+
661
+ $sitesListContainer
662
+ .find( 'input[type="checkbox"]:not(:checked)' )
663
+ .attr( 'disabled', disableSitesSelection );
664
+ }
665
+
666
+ /**
667
+ * @author Leo Fajardo (@leorw)
668
+ * @since 2.0.0
669
+ *
670
+ * @returns {Boolean}
671
+ */
672
+ function isOtherLicenseKeySelected() {
673
+ return ( hasLicenseTypes && 'other' === $licenseTypes.filter( ':checked' ).val() );
674
+ }
675
+
676
+ /**
677
+ * @author Leo Fajardo (@leorw)
678
+ * @since 2.0.0
679
+ *
680
+ * @returns {Boolean}
681
+ */
682
+ function hasValidLicenseKey() {
683
+ var licenseKey = '';
684
+ if ( hasLicenseTypes ) {
685
+ if ( 'available' === $licenseTypes.filter( ':checked' ).val() ) {
686
+ return true;
687
+ } else {
688
+ licenseKey = $otherLicenseKey.val();
689
+ }
690
+ } else {
691
+ licenseKey = $modal.find( 'input.fs-license-key' ).val();
692
+ }
693
+
694
+ return ( licenseKey.trim().length > 0 );
695
+ }
696
+
697
+ /**
698
+ * @author Leo Fajardo (@leorw)
699
+ * @since 2.0.0
700
+ *
701
+ * @returns {Boolean}
702
+ */
703
+ function hasSelectedSite() {
704
+ return ( $applyOnAllSites.is( ':checked' ) ||
705
+ $sitesListContainer.find( 'input[type="checkbox"]:checked:not(:disabled)' ).length > 0 );
706
+ }
707
+
708
+ /**
709
+ * @author Leo Fajardo (@leorw)
710
+ * @since 2.0.0
711
+ */
712
+ function toggleActivationOnAllSites() {
713
+ var activationsLeft,
714
+ licenseID;
715
+
716
+ if (hasLicensesDropdown) {
717
+ var $selectedOption = $licensesDropdown.find( ':selected' );
718
+ activationsLeft = $selectedOption.data('left');
719
+ licenseID = $selectedOption.data('id');
720
+ } else {
721
+ activationsLeft = $availableLicenseKey.data('left');
722
+ licenseID = $availableLicenseKey.data('id');
723
+ }
724
+
725
+ // Cleanup previously auto-selected site.
726
+ $modal.find( '.fs-sites-list-container input[type=checkbox]:disabled' )
727
+ .attr('disabled', false)
728
+ .attr('checked', false);
729
+
730
+ var $blogsWithActiveLicense = $modal.find( '.fs-sites-list-container tr[data-license-id=' + licenseID + '] input[type=checkbox]' );
731
+
732
+ if ($blogsWithActiveLicense.length > 0) {
733
+ $blogsWithActiveLicense.attr('checked', true)
734
+ .attr('disabled', true);
735
+
736
+ activationsLeft += $blogsWithActiveLicense.length;
737
+ }
738
+
739
+ if ( activationsLeft >= totalSites ) {
740
+ $applyOnAllSites.attr( 'disabled', false );
741
+ enableDisableSitesSelection();
742
+
743
+ resetActivateLicenseCheckboxLabel();
744
+
745
+ return;
746
+ }
747
+
748
+ $applyOnAllSites.attr( 'checked', false );
749
+ $applyOnAllSites.attr( 'disabled', true );
750
+
751
+ showSites( true );
752
+
753
+ var
754
+ activateLicenseCheckboxLabel = '<?php fs_esc_js_echo_inline( 'Choose up to %s site(s) to activate the license on.', 'choose-up-to-n-sites-to-activate-the-license-on', $slug ) ?>';
755
+
756
+ activateLicenseCheckboxLabel = activateLicenseCheckboxLabel.replace( '%s', '<span data-left="' + activationsLeft + '" class="activations-left">' + activationsLeft + '</span>' );
757
+
758
+ // Update the label of the "Activate license on all sites" checkbox.
759
+ $applyOnAllSites.parent().find( 'span' ).html( activateLicenseCheckboxLabel );
760
+ $activationsLeft = $modal.find( '.activations-left' );
761
+
762
+ if ( hasSelectedSite() ) {
763
+ enableActivateLicenseButton();
764
+ enableDisableSitesSelection();
765
+ } else {
766
+ disableActivateLicenseButton();
767
+ }
768
+ }
769
+
770
+ /**
771
+ * @author Leo Fajardo (@leorw)
772
+ * @since 2.0.0
773
+ */
774
+ function resetActivateLicenseCheckboxLabel() {
775
+ var activateLicenseCheckboxLabel = '<?php fs_esc_js_echo_inline( 'Activate license on all sites in the network.', 'activate-license-on-all-sites-in-the-network', $slug ) ?>';
776
+ $applyOnAllSites.parent().find( 'span' ).text( activateLicenseCheckboxLabel );
777
+ }
778
+
779
+ /**
780
+ * @author Leo Fajardo (@leorw)
781
+ * @since 2.0.0
782
+ *
783
+ * @param {Boolean} show
784
+ */
785
+ function showSites( show ) {
786
+ $sitesListContainer.toggle( show );
787
+ if ( show && null === maxSitesListHeight ) {
788
+ /**
789
+ * Set the visible number of rows to 5 (5 * height of the first row).
790
+ *
791
+ * @author Leo Fajardo (@leorw)
792
+ */
793
+ maxSitesListHeight = ( 5 * $sitesListContainer.find( 'tr:first' ).height() );
794
+ $sitesListContainer.css( 'max-height', maxSitesListHeight );
795
+ }
796
+ }
797
+
798
+ function showModal( evt ) {
799
+ resetModal();
800
+
801
+ // Display the dialog box.
802
+ $modal.addClass('active');
803
+ $body.addClass('has-fs-modal');
804
+
805
+ var
806
+ $singleInstallDetails = $( evt.target ).parents( 'tr.fs-install-details' ),
807
+ isSingleSiteActivation = ( $singleInstallDetails.length > 0 );
808
+
809
+ $modal.toggleClass( 'is-single-site-activation', isSingleSiteActivation );
810
+
811
+ singleBlogID = isSingleSiteActivation ?
812
+ $singleInstallDetails.prev().data( 'blog-id' ) :
813
+ null;
814
+
815
+ <?php if ( $fs->apply_filters( 'enable_per_site_activation', true ) ) : ?>
816
+ $multisiteOptionsContainer.toggle( isNetworkActivation && ! isSingleSiteActivation );
817
+ <?php endif ?>
818
+
819
+ if ( hasLicenseTypes ) {
820
+ $licenseTypes.attr( 'checked', false );
821
+
822
+ if ( hasLicensesDropdown ) {
823
+ $licensesDropdown.find( 'option:first' ).attr( 'selected', true ).trigger( 'change' );
824
+ } else {
825
+ $licenseTypes.filter( '[value="available"]' ).click();
826
+ }
827
+
828
+ $otherLicenseKey.val( '' );
829
+ } else {
830
+ $licenseKeyInput.val( '' );
831
+ $licenseKeyInput.focus();
832
+ }
833
+ }
834
+
835
+ function closeModal() {
836
+ $modal.removeClass('active');
837
+ $body.removeClass('has-fs-modal');
838
+ }
839
+
840
+ function resetActivateLicenseButton() {
841
+ enableActivateLicenseButton();
842
+ $activateLicenseButton.text( <?php echo json_encode( $activate_button_text ) ?> );
843
+ }
844
+
845
+ function resetModal() {
846
+ hideError();
847
+ resetActivateLicenseButton();
848
+ }
849
+
850
+ function enableActivateLicenseButton() {
851
+ $activateLicenseButton.removeClass( 'disabled' );
852
+ }
853
+
854
+ function disableActivateLicenseButton() {
855
+ $activateLicenseButton.addClass( 'disabled' );
856
+ }
857
+
858
+ function hideError() {
859
+ $licenseActivationMessage.hide();
860
+ }
861
+
862
+ function showError( msg ) {
863
+ $licenseActivationMessage.find( ' > p' ).html( msg );
864
+ $licenseActivationMessage.show();
865
+ }
866
+ });
867
+ })( jQuery );
868
  </script>
freemius/templates/forms/optout.php CHANGED
@@ -1,269 +1,336 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.1.5
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * @var array $VARS
15
- * @var Freemius $fs
16
- */
17
- $fs = freemius( $VARS['id'] );
18
- $slug = $fs->get_slug();
19
-
20
- $action = $fs->is_tracking_allowed() ?
21
- 'stop_tracking' :
22
- 'allow_tracking';
23
-
24
- $reconnect_url = $fs->get_activation_url( array(
25
- 'nonce' => wp_create_nonce( $fs->get_unique_affix() . '_reconnect' ),
26
- 'fs_action' => ( $fs->get_unique_affix() . '_reconnect' ),
27
- ) );
28
-
29
- $plugin_title = "<strong>{$fs->get_plugin()->title}</strong>";
30
- $opt_out_text = fs_text_x_inline( 'Opt Out', 'verb', 'opt-out', $slug );
31
- $opt_in_text = fs_text_x_inline( 'Opt In', 'verb', 'opt-in', $slug );
32
- $opt_out_message_appreciation = sprintf( fs_text_inline( 'We appreciate your help in making the %s better by letting us track some usage data.', 'opt-out-message-appreciation', $slug ), $fs->get_module_type() );
33
- $opt_out_message_usage_tracking = sprintf( fs_text_inline( "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking.", 'opt-out-message-usage-tracking', $slug ), $plugin_title );
34
- $opt_out_message_clicking_opt_out = sprintf(
35
- fs_text_inline( 'By clicking "Opt Out", we will no longer be sending any data from %s to %s.', 'opt-out-message-clicking-opt-out', $slug ),
36
- $plugin_title,
37
- sprintf(
38
- '<a href="%s" target="_blank">%s</a>',
39
- 'https://freemius.com',
40
- 'freemius.com'
41
- )
42
- );
43
-
44
- $admin_notice_params = array(
45
- 'id' => '',
46
- 'slug' => $fs->get_id(),
47
- 'type' => 'success',
48
- 'sticky' => false,
49
- 'plugin' => $fs->get_plugin()->title,
50
- 'message' => $opt_out_message_appreciation
51
- );
52
-
53
- $admin_notice_html = fs_get_template( 'admin-notice.php', $admin_notice_params );
54
-
55
- $modal_content_html = <<< HTML
56
- <h2>{$opt_out_message_appreciation}</h2>
57
- <div class="notice notice-error inline opt-out-error-message"><p></p></div>
58
- <p>{$opt_out_message_usage_tracking}</p>
59
- <p>{$opt_out_message_clicking_opt_out}</p>
60
- HTML;
61
-
62
- fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
63
- fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
64
- ?>
65
- <script type="text/javascript">
66
- (function( $ ) {
67
- $( document ).ready(function() {
68
- var modalContentHtml = <?php echo json_encode( $modal_content_html ) ?>,
69
- modalHtml =
70
- '<div class="fs-modal fs-modal-opt-out">'
71
- + ' <div class="fs-modal-dialog">'
72
- + ' <div class="fs-modal-header">'
73
- + ' <h4><?php echo esc_js( $opt_out_text ) ?></h4>'
74
- + ' </div>'
75
- + ' <div class="fs-modal-body">'
76
- + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
77
- + ' </div>'
78
- + ' <div class="fs-modal-footer">'
79
- + ' <button class="button button-secondary button-opt-out" tabindex="1"><?php echo esc_js( $opt_out_text ) ?></button>'
80
- + ' <button class="button button-primary button-close" tabindex="2"><?php fs_esc_js_echo_inline( 'On second thought - I want to continue helping', 'opt-out-cancel', $slug ) ?></button>'
81
- + ' </div>'
82
- + ' </div>'
83
- + '</div>',
84
- $modal = $( modalHtml ),
85
- $adminNotice = $( <?php echo json_encode( $admin_notice_html ) ?> ),
86
- action = '<?php echo $action ?>',
87
- $actionLink = $( 'span.opt-in-or-opt-out.<?php echo $slug ?> a' ),
88
- $optOutButton = $modal.find( '.button-opt-out' ),
89
- $optOutErrorMessage = $modal.find( '.opt-out-error-message' ),
90
- moduleID = '<?php echo $fs->get_id() ?>';
91
-
92
- $actionLink.attr( 'data-action', action );
93
- $modal.appendTo( $( 'body' ) );
94
-
95
- function registerActionLinkClick() {
96
- $actionLink.click(function( evt ) {
97
- evt.preventDefault();
98
-
99
- if ( 'stop_tracking' == $actionLink.attr( 'data-action' ) ) {
100
- showModal();
101
- } else {
102
- optIn();
103
- }
104
-
105
- return false;
106
- });
107
- }
108
-
109
- function registerEventHandlers() {
110
- registerActionLinkClick();
111
-
112
- $modal.on( 'click', '.button-opt-out', function( evt ) {
113
- evt.preventDefault();
114
-
115
- if ( $( this ).hasClass( 'disabled' ) ) {
116
- return;
117
- }
118
-
119
- disableOptOutButton();
120
- optOut();
121
- });
122
-
123
- // If the user has clicked outside the window, close the modal.
124
- $modal.on( 'click', '.fs-close, .button-close', function() {
125
- closeModal();
126
- return false;
127
- });
128
- }
129
-
130
- registerEventHandlers();
131
-
132
- function showModal() {
133
- resetModal();
134
-
135
- // Display the dialog box.
136
- $modal.addClass( 'active' );
137
- $( 'body' ).addClass( 'has-fs-modal' );
138
- }
139
-
140
- function closeModal() {
141
- $modal.removeClass( 'active' );
142
- $( 'body' ).removeClass( 'has-fs-modal' );
143
- }
144
-
145
- function resetOptOutButton() {
146
- enableOptOutButton();
147
- $optOutButton.text( <?php echo json_encode( $opt_out_text ) ?> );
148
- }
149
-
150
- function resetModal() {
151
- hideError();
152
- resetOptOutButton();
153
- }
154
-
155
- function optIn() {
156
- sendRequest();
157
- }
158
-
159
- function optOut() {
160
- sendRequest();
161
- }
162
-
163
- function sendRequest() {
164
- $.ajax({
165
- url: ajaxurl,
166
- method: 'POST',
167
- data: {
168
- action : ( 'stop_tracking' == action ?
169
- '<?php echo $fs->get_ajax_action( 'stop_tracking' ) ?>' :
170
- '<?php echo $fs->get_ajax_action( 'allow_tracking' ) ?>'
171
- ),
172
- security : ( 'stop_tracking' == action ?
173
- '<?php echo $fs->get_ajax_security( 'stop_tracking' ) ?>' :
174
- '<?php echo $fs->get_ajax_security( 'allow_tracking' ) ?>'
175
- ),
176
- module_id: moduleID
177
- },
178
- beforeSend: function() {
179
- if ( 'opt-in' == action ) {
180
- $actionLink.text( '<?php fs_esc_js_echo_inline( 'Opting in', 'opting-in', $slug ) ?>...' );
181
- } else {
182
- $optOutButton.text( '<?php fs_esc_js_echo_inline( 'Opting out', 'opting-out', $slug ) ?>...' );
183
- }
184
- },
185
- success: function( resultObj ) {
186
- if ( resultObj.success ) {
187
- if ( 'allow_tracking' == action ) {
188
- action = 'stop_tracking';
189
- $actionLink.text( '<?php echo esc_js( $opt_out_text ) ?>' );
190
- showOptInAppreciationMessageAndScrollToTop();
191
- } else {
192
- action = 'allow_tracking';
193
- $actionLink.text( '<?php echo esc_js( $opt_in_text ) ?>' );
194
- closeModal();
195
-
196
- if ( $adminNotice.length > 0 ) {
197
- $adminNotice.remove();
198
- }
199
- }
200
-
201
- $actionLink.attr( 'data-action', action );
202
- } else {
203
- showError( resultObj.error );
204
- resetOptOutButton();
205
- }
206
- }
207
- });
208
- }
209
-
210
- function enableOptOutButton() {
211
- $optOutButton.removeClass( 'disabled' );
212
- }
213
-
214
- function disableOptOutButton() {
215
- $optOutButton.addClass( 'disabled' );
216
- }
217
-
218
- function hideError() {
219
- $optOutErrorMessage.hide();
220
- }
221
-
222
- function showOptInAppreciationMessageAndScrollToTop() {
223
- $adminNotice.insertAfter( $( '#wpbody-content' ).find( ' > .wrap > h1' ) );
224
- window.scrollTo(0, 0);
225
- }
226
-
227
- function showError( msg ) {
228
- $optOutErrorMessage.find( ' > p' ).html( msg );
229
- $optOutErrorMessage.show();
230
- }
231
-
232
- <?php if ( $fs->is_theme() ) : ?>
233
- /**
234
- * Add opt-in/out button to the active theme's buttons collection
235
- * in the theme's extended details overlay.
236
- *
237
- * @author Vova Feldman (@svovaf)
238
- * @since 1.2.2.7
239
- */
240
- $('.theme-overlay').contentChange(function () {
241
- if (0 === $('.theme-overlay.active').length) {
242
- // Add opt-in/out button only to the currently active theme.
243
- return;
244
- }
245
-
246
- if ($('#fs_theme_opt_in_out').length > 0){
247
- // Button already there.
248
- return;
249
- }
250
-
251
- var label = (('stop_tracking' == action) ?
252
- '<?php echo esc_js( $opt_out_text ) ?>' :
253
- '<?php echo esc_js( $opt_in_text ) ?>'),
254
- href = (('stop_tracking' != action) ?
255
- '<?php echo esc_js( $reconnect_url ) ?>' :
256
- '');
257
-
258
- $actionLink = $('<a id="fs_theme_opt_in_out" href="' + encodeURI(href) + '" class="button" data-action="' + action + '">' + label + '</a>');
259
-
260
- $('.theme-wrap .theme-actions .active-theme').append($actionLink);
261
-
262
- if ('' === href) {
263
- registerActionLinkClick();
264
- }
265
- });
266
- <?php endif ?>
267
- });
268
- })( jQuery );
269
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.1.5
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ * @var Freemius $fs
16
+ */
17
+ $fs = freemius( $VARS['id'] );
18
+ $slug = $fs->get_slug();
19
+
20
+ $action = $fs->is_tracking_allowed() ?
21
+ 'stop_tracking' :
22
+ 'allow_tracking';
23
+
24
+ $reconnect_url = $fs->get_activation_url( array(
25
+ 'nonce' => wp_create_nonce( $fs->get_unique_affix() . '_reconnect' ),
26
+ 'fs_action' => ( $fs->get_unique_affix() . '_reconnect' ),
27
+ ) );
28
+
29
+ $plugin_title = "<strong>{$fs->get_plugin()->title}</strong>";
30
+ $opt_out_text = fs_text_x_inline( 'Opt Out', 'verb', 'opt-out', $slug );
31
+ $opt_in_text = fs_text_x_inline( 'Opt In', 'verb', 'opt-in', $slug );
32
+
33
+ if ( $fs->is_premium() ) {
34
+ $opt_in_message_appreciation = fs_text_inline( 'Connectivity to the licensing engine was successfully re-established. Automatic security & feature updates are now available through the WP Admin Dashboard.', 'premium-opt-in-message-appreciation', $slug );
35
+
36
+ $opt_out_message_subtitle = sprintf( fs_text_inline( 'Warning: Opting out will block automatic updates', 'premium-opt-out-message-appreciation', $slug ), $fs->get_module_type() );
37
+ $opt_out_message_usage_tracking = sprintf( fs_text_inline( 'Ongoing connectivity with the licensing engine is essential for receiving automatic security & feature updates of the paid product. To receive these updates, data like your license key, %1$s version, and WordPress version, is periodically sent to the server to check for updates. By opting out, you understand that your site won\'t receive automatic updates for %2$s from within the WP Admin Dashboard. This can put your site at risk, and we highly recommend to keep this connection active. If you do choose to opt-out, you\'ll need to check for %1$s updates and install them manually.', 'premium-opt-out-message-usage-tracking', $slug ), $fs->get_module_type(), $plugin_title );
38
+
39
+ $primary_cta_label = fs_text_inline( 'I\'d like to keep automatic updates', 'premium-opt-out-cancel', $slug );
40
+ } else {
41
+ $opt_in_message_appreciation = sprintf( fs_text_inline( 'We appreciate your help in making the %s better by letting us track some usage data.', 'opt-in-message-appreciation', $slug ), $fs->get_module_type() );
42
+
43
+ $opt_out_message_subtitle = $opt_in_message_appreciation;
44
+ $opt_out_message_usage_tracking = sprintf( fs_text_inline( "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking.", 'opt-out-message-usage-tracking', $slug ), $plugin_title );
45
+ $primary_cta_label = fs_text_inline( 'On second thought - I want to continue helping', 'opt-out-cancel', $slug );
46
+ }
47
+
48
+ $opt_out_message_clicking_opt_out = sprintf(
49
+ fs_text_inline( 'By clicking "Opt Out", we will no longer be sending any data from %s to %s.', 'opt-out-message-clicking-opt-out', $slug ),
50
+ $plugin_title,
51
+ sprintf(
52
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
53
+ 'https://freemius.com',
54
+ 'freemius.com'
55
+ )
56
+ );
57
+
58
+ $admin_notice_params = array(
59
+ 'id' => '',
60
+ 'slug' => $fs->get_id(),
61
+ 'type' => 'success',
62
+ 'sticky' => false,
63
+ 'plugin' => $fs->get_plugin()->title,
64
+ 'message' => $opt_in_message_appreciation
65
+ );
66
+
67
+ $admin_notice_html = fs_get_template( 'admin-notice.php', $admin_notice_params );
68
+
69
+ $modal_content_html = "
70
+ <h2" . ( $fs->is_premium() ? ' style="color: red"' : '' ) . ">{$opt_out_message_subtitle}</h2>
71
+ <div class=\"notice notice-error inline opt-out-error-message\"><p></p></div>
72
+ <p>{$opt_out_message_usage_tracking}</p>
73
+ <p>{$opt_out_message_clicking_opt_out}</p>
74
+ <label class=\"fs-permission-extensions\"><div class=\"fs-switch fs-small fs-round fs-" . ( $fs->is_extensions_tracking_allowed() ? 'on' : 'off' ) . "\"><div class=\"fs-toggle\"></div></div> " . fs_text_inline( 'Plugins & themes tracking' ) . " <span class=\"fs-switch-feedback success\"></span></label>";
75
+
76
+ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
77
+ fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
78
+ ?>
79
+ <script type="text/javascript">
80
+ (function( $ ) {
81
+ $( document ).ready(function() {
82
+ var modalContentHtml = <?php echo json_encode( $modal_content_html ) ?>,
83
+ modalHtml =
84
+ '<div class="fs-modal fs-modal-opt-out">'
85
+ + ' <div class="fs-modal-dialog">'
86
+ + ' <div class="fs-modal-header">'
87
+ + ' <h4><?php echo esc_js( $opt_out_text ) ?></h4>'
88
+ + ' </div>'
89
+ + ' <div class="fs-modal-body">'
90
+ + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
91
+ + ' </div>'
92
+ + ' <div class="fs-modal-footer">'
93
+ + ' <button class="button <?php echo $fs->is_premium() ? 'button-primary warn' : 'button-secondary' ?> button-opt-out" tabindex="1"><?php echo esc_js( $opt_out_text ) ?></button>'
94
+ + ' <button class="button <?php echo $fs->is_premium() ? 'button-secondary' : 'button-primary' ?> button-close" tabindex="2"><?php echo esc_js( $primary_cta_label ) ?></button>'
95
+ + ' </div>'
96
+ + ' </div>'
97
+ + '</div>',
98
+ $modal = $(modalHtml),
99
+ $adminNotice = $( <?php echo json_encode( $admin_notice_html ) ?> ),
100
+ action = '<?php echo $action ?>',
101
+ actionLinkSelector = 'span.opt-in-or-opt-out.<?php echo $slug ?> a',
102
+ $optOutButton = $modal.find( '.button-opt-out' ),
103
+ $optOutErrorMessage = $modal.find( '.opt-out-error-message' ),
104
+ $extensionsTracking = $modal.find( '.fs-permission-extensions' ),
105
+ $body = $( 'body' ),
106
+ moduleID = '<?php echo $fs->get_id() ?>';
107
+
108
+ $modal.data( 'action', action );
109
+ $modal.appendTo( $body );
110
+
111
+ function registerActionLinkClick() {
112
+ $body.on( 'click', actionLinkSelector, function( evt ) {
113
+ evt.preventDefault();
114
+
115
+ if ( 'stop_tracking' == $modal.data( 'action' ) ) {
116
+ showModal();
117
+ } else {
118
+ optIn();
119
+ }
120
+
121
+ return false;
122
+ });
123
+ }
124
+
125
+ function registerEventHandlers() {
126
+ registerActionLinkClick();
127
+
128
+ $modal.on( 'click', '.button-opt-out', function( evt ) {
129
+ evt.preventDefault();
130
+
131
+ if ( $( this ).hasClass( 'disabled' ) ) {
132
+ return;
133
+ }
134
+
135
+ disableOptOutButton();
136
+ optOut();
137
+ });
138
+
139
+ // If the user has clicked outside the window, close the modal.
140
+ $modal.on( 'click', '.fs-close, .button-close', function() {
141
+ closeModal();
142
+ return false;
143
+ });
144
+ }
145
+
146
+ <?php if ( $fs->is_registered() ) : ?>
147
+ registerEventHandlers();
148
+ <?php endif ?>
149
+
150
+ function showModal() {
151
+ resetModal();
152
+
153
+ // Display the dialog box.
154
+ $modal.addClass( 'active' );
155
+ $body.addClass( 'has-fs-modal' );
156
+ }
157
+
158
+ function closeModal() {
159
+ $modal.removeClass( 'active' );
160
+ $body.removeClass( 'has-fs-modal' );
161
+ }
162
+
163
+ function resetOptOutButton() {
164
+ enableOptOutButton();
165
+ $optOutButton.text( <?php echo json_encode( $opt_out_text ) ?> );
166
+ }
167
+
168
+ function resetModal() {
169
+ hideError();
170
+ resetOptOutButton();
171
+ }
172
+
173
+ function optIn() {
174
+ sendRequest();
175
+ }
176
+
177
+ function optOut() {
178
+ sendRequest();
179
+ }
180
+
181
+ function sendRequest() {
182
+ var $actionLink = $( actionLinkSelector );
183
+
184
+ $.ajax({
185
+ url: ajaxurl,
186
+ method: 'POST',
187
+ data: {
188
+ action : ( 'stop_tracking' == action ?
189
+ '<?php echo $fs->get_ajax_action( 'stop_tracking' ) ?>' :
190
+ '<?php echo $fs->get_ajax_action( 'allow_tracking' ) ?>'
191
+ ),
192
+ security : ( 'stop_tracking' == action ?
193
+ '<?php echo $fs->get_ajax_security( 'stop_tracking' ) ?>' :
194
+ '<?php echo $fs->get_ajax_security( 'allow_tracking' ) ?>'
195
+ ),
196
+ module_id: moduleID,
197
+ _wp_http_referer: '<?php echo $fs->current_page_url() ?>'
198
+ },
199
+ beforeSend: function() {
200
+ if ( 'allow_tracking' == action ) {
201
+ $actionLink.text( '<?php fs_esc_js_echo_inline( 'Opting in', 'opting-in', $slug ) ?>...' );
202
+ } else {
203
+ $optOutButton.text( '<?php fs_esc_js_echo_inline( 'Opting out', 'opting-out', $slug ) ?>...' );
204
+ }
205
+ },
206
+ success: function( resultObj ) {
207
+ if ( resultObj.success ) {
208
+ if ( 'allow_tracking' == action ) {
209
+ action = 'stop_tracking';
210
+ $actionLink.text( '<?php echo esc_js( $opt_out_text ) ?>' );
211
+ showOptInAppreciationMessageAndScrollToTop();
212
+ } else {
213
+ action = 'allow_tracking';
214
+ $actionLink.text( '<?php echo esc_js( $opt_in_text ) ?>' );
215
+ closeModal();
216
+
217
+ if ( $adminNotice.length > 0 ) {
218
+ $adminNotice.remove();
219
+ }
220
+ }
221
+
222
+ $modal.data( 'action', action );
223
+ } else {
224
+ showError( resultObj.error );
225
+ resetOptOutButton();
226
+ }
227
+ }
228
+ });
229
+ }
230
+
231
+ var isUpdatingPermission = false;
232
+ $extensionsTracking.on('click', function() {
233
+ if (isUpdatingPermission) {
234
+ return false;
235
+ }
236
+
237
+ isUpdatingPermission = true;
238
+
239
+ var $switch = $extensionsTracking.find( '.fs-switch' ),
240
+ $switchFeedback = $extensionsTracking.find( '.fs-switch-feedback' );
241
+
242
+ $switch
243
+ .toggleClass( 'fs-on' )
244
+ .toggleClass( 'fs-off' );
245
+
246
+ $switchFeedback.html( '<i class="fs-ajax-spinner"></i>' );
247
+
248
+ $.ajax({
249
+ url: ajaxurl,
250
+ method: 'POST',
251
+ data: {
252
+ action : '<?php echo $fs->get_ajax_action( 'update_tracking_permission' ) ?>',
253
+ security : '<?php echo $fs->get_ajax_security( 'update_tracking_permission' ) ?>',
254
+ module_id : moduleID,
255
+ _wp_http_referer: '<?php echo $fs->current_page_url() ?>',
256
+ permission: 'extensions',
257
+ is_enabled: $switch.hasClass('fs-on')
258
+ },
259
+ success: function( resultObj ) {
260
+ if ( resultObj.success ) {
261
+ $switchFeedback.html( '<i class="dashicons dashicons-yes"></i> <?php echo esc_js( fs_text_inline( 'Saved', 'saved', $slug ) ) ?>' )
262
+ } else {
263
+ $switch
264
+ .toggleClass( 'fs-on' )
265
+ .toggleClass( 'fs-off' );
266
+ }
267
+
268
+ isUpdatingPermission = false;
269
+ }
270
+ });
271
+ });
272
+
273
+ function enableOptOutButton() {
274
+ $optOutButton.removeClass( 'disabled' );
275
+ }
276
+
277
+ function disableOptOutButton() {
278
+ $optOutButton.addClass( 'disabled' );
279
+ }
280
+
281
+ function hideError() {
282
+ $optOutErrorMessage.hide();
283
+ }
284
+
285
+ function showOptInAppreciationMessageAndScrollToTop() {
286
+ $adminNotice.insertAfter( $( '#wpbody-content' ).find( ' > .wrap > h1' ) );
287
+ window.scrollTo(0, 0);
288
+ }
289
+
290
+ function showError( msg ) {
291
+ $optOutErrorMessage.find( ' > p' ).html( msg );
292
+ $optOutErrorMessage.show();
293
+ }
294
+
295
+ <?php if ( $fs->is_theme() ) : ?>
296
+ /**
297
+ * Add opt-in/out button to the active theme's buttons collection
298
+ * in the theme's extended details overlay.
299
+ *
300
+ * @author Vova Feldman (@svovaf)
301
+ * @since 1.2.2.7
302
+ */
303
+ $('.theme-overlay').contentChange(function () {
304
+ if (0 === $('.theme-overlay.active').length) {
305
+ // Add opt-in/out button only to the currently active theme.
306
+ return;
307
+ }
308
+
309
+ if ($('#fs_theme_opt_in_out').length > 0){
310
+ // Button already there.
311
+ return;
312
+ }
313
+
314
+ var label = (('stop_tracking' == action) ?
315
+ '<?php echo esc_js( $opt_out_text ) ?>' :
316
+ '<?php echo esc_js( $opt_in_text ) ?>'),
317
+ href = (('stop_tracking' != action) ?
318
+ '<?php echo ( $fs->is_registered() ? '' : esc_js( $reconnect_url ) ) ?>' :
319
+ '');
320
+
321
+ var $actionLink = $('<a id="fs_theme_opt_in_out" href="' + encodeURI(href) + '" class="button">' + label + '</a>');
322
+
323
+ actionLinkSelector = '#fs_theme_opt_in_out';
324
+
325
+ $modal.data( 'action', action );
326
+
327
+ $('.theme-wrap .theme-actions .active-theme').append($actionLink);
328
+
329
+ if ('' === href) {
330
+ registerActionLinkClick();
331
+ }
332
+ });
333
+ <?php endif ?>
334
+ });
335
+ })( jQuery );
336
+ </script>
freemius/templates/forms/subscription-cancellation.php CHANGED
@@ -133,7 +133,7 @@ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
133
  '<div class="fs-modal fs-modal-subscription-cancellation fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>">'
134
  + ' <div class="fs-modal-dialog">'
135
  + ' <div class="fs-modal-header">'
136
- + ' <h4><?php echo esc_attr( sprintf( fs_text_inline( 'Cancel %s?', 'cancel-x', $slug ), ucfirst( $subscription_cancellation_context ) ) ) ?></h4>'
137
  + ' </div>'
138
  + ' <div class="fs-modal-body">'
139
  + ' <div class="fs-modal-panel active">' + <?php echo json_encode( $subscription_cancellation_html ) ?> + '<p class="fs-price-increase-warning" style="display: none;">' + <?php echo json_encode( $prices_increase_text ) ?> + '</p></div>'
133
  '<div class="fs-modal fs-modal-subscription-cancellation fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>">'
134
  + ' <div class="fs-modal-dialog">'
135
  + ' <div class="fs-modal-header">'
136
+ + ' <h4><?php echo esc_html( sprintf( fs_text_inline( 'Cancel %s?', 'cancel-x', $slug ), ucfirst( $subscription_cancellation_context ) ) ) ?></h4>'
137
  + ' </div>'
138
  + ' <div class="fs-modal-body">'
139
  + ' <div class="fs-modal-panel active">' + <?php echo json_encode( $subscription_cancellation_html ) ?> + '<p class="fs-price-increase-warning" style="display: none;">' + <?php echo json_encode( $prices_increase_text ) ?> + '</p></div>'
freemius/templates/forms/trial-start.php CHANGED
@@ -28,7 +28,7 @@
28
  fs_text_inline( '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.', 'start-trial-prompt-message', $slug ),
29
  $fs->get_module_type(),
30
  sprintf(
31
- '<a href="%s" target="_blank">%s</a>',
32
  'https://freemius.com',
33
  'freemius.com'
34
  )
28
  fs_text_inline( '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.', 'start-trial-prompt-message', $slug ),
29
  $fs->get_module_type(),
30
  sprintf(
31
+ '<a href="%s" target="_blank" rel="noopener">%s</a>',
32
  'https://freemius.com',
33
  'freemius.com'
34
  )
freemius/templates/forms/user-change.php ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 2.3.2
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ *
16
+ * @var Freemius $fs
17
+ */
18
+ $fs = freemius( $VARS['id'] );
19
+ $slug = $fs->get_slug();
20
+
21
+ /**
22
+ * @var object[] $license_owners
23
+ */
24
+ $license_owners = $VARS['license_owners'];
25
+
26
+ $change_user_message = fs_text_inline( 'By changing the user, you agree to transfer the account ownership to:', 'change-user--message', $slug );
27
+ $header_title = fs_text_inline( 'Change User', 'change-user', $slug );
28
+ $user_change_button_text = fs_text_inline( 'I Agree - Change User', 'agree-change-user', $slug );
29
+ $other_text = fs_text_inline( 'Other', 'other', $slug );
30
+ $enter_email_address_placeholder_text = fs_text_inline( 'Enter email address', 'enter-email-address', $slug );
31
+
32
+ $user_change_options_html = <<< HTML
33
+ <div class="fs-user-change-options-container">
34
+ <table>
35
+ <tbody>
36
+ HTML;
37
+
38
+ foreach ( $license_owners as $license_owner ) {
39
+ $user_change_options_html .= <<< HTML
40
+ <tr class="fs-email-address-container">
41
+ <td><input id="fs_email_address_{$license_owner->id}" type="radio" name="fs_email_address" value="{$license_owner->id}"></td>
42
+ <td><label for="fs_email_address_{$license_owner->id}">{$license_owner->email}</label></td>
43
+ </tr>
44
+ HTML;
45
+ }
46
+
47
+ $user_change_options_html .= <<< HTML
48
+ <tr>
49
+ <td><input id="fs_other_email_address_radio" type="radio" name="fs_email_address" value="other"></td>
50
+ <td class="fs-other-email-address-container">
51
+ <div>
52
+ <label for="fs_email_address">{$other_text}: </label>
53
+ <div>
54
+ <input id="fs_other_email_address_text_field" class="fs-email-address" type="text" placeholder="{$enter_email_address_placeholder_text}" tabindex="1">
55
+ </div>
56
+ </div>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+ </div>
62
+ HTML;
63
+
64
+ $modal_content_html = <<< HTML
65
+ <div class="notice notice-error inline fs-change-user-result-message"><p></p></div>
66
+ <p>{$change_user_message}</p>
67
+ {$user_change_options_html}
68
+ HTML;
69
+
70
+ fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
71
+ ?>
72
+ <script type="text/javascript">
73
+ (function( $ ) {
74
+ $( document ).ready(function() {
75
+ var modalContentHtml = <?php echo json_encode( $modal_content_html ) ?>,
76
+ modalHtml =
77
+ '<div class="fs-modal fs-modal-change-user fs-modal-change-user-<?php echo $fs->get_unique_affix() ?>">'
78
+ + ' <div class="fs-modal-dialog">'
79
+ + ' <div class="fs-modal-header">'
80
+ + ' <h4><?php echo esc_js( $header_title ) ?></h4>'
81
+ + ' <a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="<?php echo esc_js( fs_text_x_inline( 'Dismiss', 'close window', 'dismiss', $slug ) ) ?>"></i></a>'
82
+ + ' </div>'
83
+ + ' <div class="fs-modal-body">'
84
+ + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
85
+ + ' </div>'
86
+ + ' <div class="fs-modal-footer">'
87
+ + ' <button class="button button-secondary button-close" tabindex="4"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></button>'
88
+ + ' <button class="button button-primary fs-user-change-button" tabindex="3"><?php echo esc_js( $user_change_button_text ) ?></button>'
89
+ + ' </div>'
90
+ + ' </div>'
91
+ + '</div>',
92
+ $modal = $( modalHtml ),
93
+ $userChangeButton = $modal.find( '.fs-user-change-button' ),
94
+ $otherEmailAddressRadio = $modal.find( '#fs_other_email_address_radio' ),
95
+ $changeUserResultMessage = $modal.find( '.fs-change-user-result-message' ),
96
+ $otherEmailAddressContainer = $modal.find( '.fs-other-email-address-container' ),
97
+ $otherEmailAddressTextField = $modal.find( '#fs_other_email_address_text_field' ),
98
+ $licenseOwners = $modal.find( 'input[type="radio"][name="fs_email_address"]' );
99
+
100
+ $modal.appendTo( $( 'body' ) );
101
+
102
+ var previousEmailAddress = null;
103
+
104
+ function registerEventHandlers() {
105
+ $licenseOwners.change( function() {
106
+ var otherEmailAddress = $otherEmailAddressTextField.val().trim(),
107
+ otherEmailAddressIsSelected = isOtherEmailAddressSelected();
108
+
109
+ if ( otherEmailAddressIsSelected ) {
110
+ $otherEmailAddressTextField.focus();
111
+ }
112
+
113
+ if ( otherEmailAddress.length > 0 || ! otherEmailAddressIsSelected ) {
114
+ enableUserChangeButton();
115
+ } else {
116
+ disableUserChangeButton();
117
+ }
118
+ } );
119
+
120
+ $otherEmailAddressContainer.click( function () {
121
+ $otherEmailAddressRadio.click();
122
+ } );
123
+
124
+ // Handle for the "Change User" button on the "Account" page.
125
+ $( '#fs_change_user' ).click( function ( evt ) {
126
+ evt.preventDefault();
127
+
128
+ showModal( evt );
129
+ } );
130
+
131
+ /**
132
+ * Disables the "Change User" button when the email address is empty.
133
+ */
134
+ $modal.on( 'keyup paste delete cut', 'input#fs_other_email_address_text_field', function () {
135
+ setTimeout( function () {
136
+ var emailAddress = $otherEmailAddressRadio.val().trim();
137
+
138
+ if ( emailAddress === previousEmailAddress ) {
139
+ return;
140
+ }
141
+
142
+ if ( '' === emailAddress ) {
143
+ disableUserChangeButton();
144
+ } else {
145
+ enableUserChangeButton();
146
+ }
147
+
148
+ previousEmailAddress = emailAddress;
149
+ }, 100 );
150
+ } ).focus();
151
+
152
+ $modal.on( 'input propertychange', 'input#fs_other_email_address_text_field', function () {
153
+ var emailAddress = $( this ).val().trim();
154
+
155
+ /**
156
+ * If email address is not empty, enable the "Change User" button.
157
+ */
158
+ if ( emailAddress.length > 0 ) {
159
+ enableUserChangeButton();
160
+ }
161
+ } );
162
+
163
+ $modal.on( 'blur', 'input#fs_other_email_address_text_field', function( evt ) {
164
+ var emailAddress = $( this ).val().trim();
165
+
166
+ /**
167
+ * If email address is empty, disable the "Change User" button.
168
+ */
169
+ if ( 0 === emailAddress.length ) {
170
+ disableUserChangeButton();
171
+ }
172
+ } );
173
+
174
+ $modal.on( 'click', '.fs-user-change-button', function ( evt ) {
175
+ evt.preventDefault();
176
+
177
+ if ( $( this ).hasClass( 'disabled' ) ) {
178
+ return;
179
+ }
180
+
181
+ var emailAddress = '',
182
+ licenseOwnerID = null;
183
+
184
+ if ( ! isOtherEmailAddressSelected() ) {
185
+ licenseOwnerID = $licenseOwners.filter( ':checked' ).val();
186
+ } else {
187
+ emailAddress = $otherEmailAddressTextField.val().trim();
188
+
189
+ if ( 0 === emailAddress.length ) {
190
+ return;
191
+ }
192
+ }
193
+
194
+ disableUserChangeButton();
195
+
196
+ $.ajax( {
197
+ url : ajaxurl,
198
+ method : 'POST',
199
+ data : {
200
+ action : '<?php echo $fs->get_ajax_action( 'change_user' ) ?>',
201
+ security : '<?php echo $fs->get_ajax_security( 'change_user' ) ?>',
202
+ email_address: emailAddress,
203
+ user_id : licenseOwnerID,
204
+ module_id : '<?php echo $fs->get_id() ?>'
205
+ },
206
+ beforeSend: function () {
207
+ $userChangeButton
208
+ .text( '<?php fs_esc_js_echo_inline( 'Changing user, please wait', 'changing-user-please-wait', $slug ) ?>...' )
209
+ .prepend('<i class="fs-ajax-spinner"></i>');
210
+
211
+ $(document.body).css({'cursor': 'wait'});
212
+ },
213
+ success : function( result ) {
214
+ if ( result.success ) {
215
+ // Redirect to the "Account" page.
216
+ window.location.reload();
217
+ } else {
218
+ $(document.body).css({'cursor': 'auto'});
219
+
220
+ showError( result.error.message ? result.error.message : result.error );
221
+ resetUserChangeButton();
222
+ }
223
+ },
224
+ error : function () {
225
+ $(document.body).css({'cursor': 'auto'});
226
+
227
+ showError( '<?php fs_esc_js_echo_inline( 'Unexpected error, try again in 5 minutes. If the error persists, please contact support.', 'unexpected-error', $slug ) ?>' );
228
+
229
+ resetUserChangeButton();
230
+ }
231
+ } );
232
+ } );
233
+
234
+ // If the user has clicked outside the window, close the modal.
235
+ $modal.on( 'click', '.fs-close, .button-secondary', function () {
236
+ closeModal();
237
+ return false;
238
+ } );
239
+ }
240
+
241
+ registerEventHandlers();
242
+
243
+ /**
244
+ * @returns {Boolean}
245
+ */
246
+ function isOtherEmailAddressSelected() {
247
+ return ( 'other' === $licenseOwners.filter( ':checked' ).val() );
248
+ }
249
+
250
+ function showModal() {
251
+ resetModal();
252
+
253
+ // Display the dialog box.
254
+ $modal.addClass( 'active' );
255
+ $( 'body' ).addClass( 'has-fs-modal' );
256
+
257
+ // Select the first radio button.
258
+ $licenseOwners.get( 0 ).click();
259
+
260
+ $otherEmailAddressTextField.val( '' );
261
+ }
262
+
263
+ function closeModal() {
264
+ $modal.removeClass( 'active' );
265
+ $( 'body' ).removeClass( 'has-fs-modal' );
266
+ }
267
+
268
+ function resetUserChangeButton() {
269
+ enableUserChangeButton();
270
+ $userChangeButton.text( <?php echo json_encode( $user_change_button_text ) ?> );
271
+ }
272
+
273
+ function resetModal() {
274
+ hideError();
275
+ resetUserChangeButton();
276
+ }
277
+
278
+ function enableUserChangeButton() {
279
+ $userChangeButton.removeClass( 'disabled' );
280
+ }
281
+
282
+ function disableUserChangeButton() {
283
+ $userChangeButton.addClass( 'disabled' );
284
+ }
285
+
286
+ function hideError() {
287
+ $changeUserResultMessage.hide();
288
+ }
289
+
290
+ function showError( msg ) {
291
+ $changeUserResultMessage.find( ' > p' ).html( msg );
292
+ $changeUserResultMessage.show();
293
+ }
294
+ });
295
+ })( jQuery );
296
+ </script>
freemius/templates/partials/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ //Silence is golden
freemius/templates/pricing.php CHANGED
@@ -1,177 +1,209 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- /**
10
- * Note for WordPress.org Theme/Plugin reviewer:
11
- * Freemius is an SDK for plugin and theme developers. Since the core
12
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
13
- * we only develop and maintain one code base.
14
- *
15
- * This code (and page) will not run for wp.org themes (only plugins).
16
- *
17
- * In addition, this page loads an i-frame. We intentionally named it 'frame'
18
- * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
19
- *
20
- * UPDATE:
21
- * After ongoing conversations with the WordPress.org TRT we received
22
- * an official approval for including i-frames in the theme's WP Admin setting's
23
- * page tab (the SDK will never add any i-frames on the sitefront). i-frames
24
- * were never against the guidelines, but we wanted to get the team's blessings
25
- * before we move forward. For the record, I got the final approval from
26
- * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
27
- * Europe 2017 (June 16th, 2017).
28
- *
29
- * If you have any questions or need clarifications, please don't hesitate
30
- * pinging me on slack, my username is @svovaf.
31
- *
32
- * @author Vova Feldman (@svovaf)
33
- * @since 1.2.2
34
- */
35
-
36
- if ( ! defined( 'ABSPATH' ) ) {
37
- exit;
38
- }
39
-
40
- wp_enqueue_script( 'jquery' );
41
- wp_enqueue_script( 'json2' );
42
- fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
43
- fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
44
- fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
45
-
46
- /**
47
- * @var array $VARS
48
- * @var Freemius $fs
49
- */
50
- $fs = freemius( $VARS['id'] );
51
- $slug = $fs->get_slug();
52
- $timestamp = time();
53
-
54
- $context_params = array(
55
- 'plugin_id' => $fs->get_id(),
56
- 'plugin_public_key' => $fs->get_public_key(),
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(
68
- $fs->get_site(),
69
- $timestamp,
70
- 'upgrade'
71
- ) );
72
- } else {
73
- $context_params['home_url'] = home_url();
74
- }
75
-
76
- if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.)
77
- {
78
- $context_params['sandbox'] = FS_Security::instance()->get_secure_token(
79
- $fs->get_plugin(),
80
- $timestamp,
81
- 'checkout'
82
- );
83
- }
84
-
85
- $query_params = array_merge( $context_params, $_GET, array(
86
- 'next' => $fs->_get_sync_license_url( false, false ),
87
- 'plugin_version' => $fs->get_plugin_version(),
88
- // Billing cycle.
89
- 'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
90
- 'is_network_admin' => fs_is_network_admin() ? 'true' : 'false',
91
- 'currency' => $fs->apply_filters( 'default_currency', 'usd' ),
92
- ) );
93
-
94
- if ( ! $fs->is_registered() ) {
95
- $template_data = array(
96
- 'id' => $fs->get_id(),
97
- );
98
- fs_require_template( 'forms/trial-start.php', $template_data);
99
- }
100
-
101
- $view_params = array(
102
- 'id' => $VARS['id'],
103
- 'page' => strtolower( $fs->get_text_x_inline( 'Pricing', 'noun', 'pricing' ) ),
104
- );
105
- fs_require_once_template('secure-https-header.php', $view_params);
106
-
107
- $has_tabs = $fs->_add_tabs_before_content();
108
-
109
- if ( $has_tabs ) {
110
- $query_params['tabs'] = 'true';
111
- }
112
- ?>
113
- <div id="fs_pricing" class="wrap fs-section fs-full-size-wrapper">
114
- <div id="fs_frame"></div>
115
- <form action="" method="POST">
116
- <input type="hidden" name="user_id"/>
117
- <input type="hidden" name="user_email"/>
118
- <input type="hidden" name="site_id"/>
119
- <input type="hidden" name="public_key"/>
120
- <input type="hidden" name="secret_key"/>
121
- <input type="hidden" name="action" value="account"/>
122
- </form>
123
-
124
- <script type="text/javascript">
125
- (function ($, undef) {
126
- $(function () {
127
- var
128
- // Keep track of the i-frame height.
129
- frame_height = 800,
130
- base_url = '<?php echo WP_FS__ADDRESS ?>',
131
- // Pass the parent page URL into the i-frame in a meaningful way (this URL could be
132
- // passed via query string or hard coded into the child page, it depends on your needs).
133
- src = base_url + '/pricing/?<?php echo http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href),
134
-
135
- // Append the I-frame into the DOM.
136
- frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
137
- .appendTo('#fs_frame');
138
-
139
- FS.PostMessage.init(base_url, [frame[0]]);
140
-
141
- FS.PostMessage.receive('height', function (data) {
142
- var h = data.height;
143
- if (!isNaN(h) && h > 0 && h != frame_height) {
144
- frame_height = h;
145
- frame.height(frame_height + 'px');
146
-
147
- FS.PostMessage.postScroll(frame[0]);
148
- }
149
- });
150
-
151
- FS.PostMessage.receive('get_dimensions', function (data) {
152
- FS.PostMessage.post('dimensions', {
153
- height : $(document.body).height(),
154
- scrollTop: $(document).scrollTop()
155
- }, frame[0]);
156
- });
157
-
158
- FS.PostMessage.receive('start_trial', function (data) {
159
- openTrialConfirmationModal(data);
160
- });
161
- });
162
- })(jQuery);
163
- </script>
164
- </div>
165
- <?php
166
- if ( $has_tabs ) {
167
- $fs->_add_tabs_after_content();
168
- }
169
-
170
- $params = array(
171
- 'page' => 'pricing',
172
- 'module_id' => $fs->get_id(),
173
- 'module_type' => $fs->get_module_type(),
174
- 'module_slug' => $slug,
175
- 'module_version' => $fs->get_plugin_version(),
176
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  fs_require_template( 'powered-by.php', $params );
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ /**
10
+ * Note for WordPress.org Theme/Plugin reviewer:
11
+ * Freemius is an SDK for plugin and theme developers. Since the core
12
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
13
+ * we only develop and maintain one code base.
14
+ *
15
+ * This code (and page) will not run for wp.org themes (only plugins).
16
+ *
17
+ * In addition, this page loads an i-frame. We intentionally named it 'frame'
18
+ * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
19
+ *
20
+ * UPDATE:
21
+ * After ongoing conversations with the WordPress.org TRT we received
22
+ * an official approval for including i-frames in the theme's WP Admin setting's
23
+ * page tab (the SDK will never add any i-frames on the sitefront). i-frames
24
+ * were never against the guidelines, but we wanted to get the team's blessings
25
+ * before we move forward. For the record, I got the final approval from
26
+ * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
27
+ * Europe 2017 (June 16th, 2017).
28
+ *
29
+ * If you have any questions or need clarifications, please don't hesitate
30
+ * pinging me on slack, my username is @svovaf.
31
+ *
32
+ * @author Vova Feldman (@svovaf)
33
+ * @since 1.2.2
34
+ */
35
+
36
+ if ( ! defined( 'ABSPATH' ) ) {
37
+ exit;
38
+ }
39
+
40
+ wp_enqueue_script( 'jquery' );
41
+ wp_enqueue_script( 'json2' );
42
+ fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
43
+ fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
44
+ fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
45
+
46
+ /**
47
+ * @var array $VARS
48
+ * @var Freemius $fs
49
+ */
50
+ $fs = freemius( $VARS['id'] );
51
+ $slug = $fs->get_slug();
52
+ $timestamp = time();
53
+
54
+ $context_params = array(
55
+ 'plugin_id' => $fs->get_id(),
56
+ 'plugin_public_key' => $fs->get_public_key(),
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(
68
+ $fs->get_site(),
69
+ $timestamp,
70
+ 'upgrade'
71
+ ) );
72
+ } else {
73
+ $context_params['home_url'] = home_url();
74
+ }
75
+
76
+ if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.)
77
+ {
78
+ $context_params['sandbox'] = FS_Security::instance()->get_secure_token(
79
+ $fs->get_plugin(),
80
+ $timestamp,
81
+ 'checkout'
82
+ );
83
+ }
84
+
85
+ $query_params = array_merge( $context_params, $_GET, array(
86
+ 'next' => $fs->_get_sync_license_url( false, false ),
87
+ 'plugin_version' => $fs->get_plugin_version(),
88
+ // Billing cycle.
89
+ 'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
90
+ 'is_network_admin' => fs_is_network_admin() ? 'true' : 'false',
91
+ 'currency' => $fs->apply_filters( 'default_currency', 'usd' ),
92
+ ) );
93
+
94
+ $use_external_pricing = $fs->should_use_external_pricing();
95
+
96
+ if ( ! $use_external_pricing ) {
97
+ $pricing_js_url = fs_asset_url( $fs->get_pricing_js_path() );
98
+ wp_enqueue_script( 'freemius-pricing', $pricing_js_url );
99
+ } else {
100
+ if ( ! $fs->is_registered() ) {
101
+ $template_data = array(
102
+ 'id' => $fs->get_id(),
103
+ );
104
+ fs_require_template( 'forms/trial-start.php', $template_data);
105
+ }
106
+
107
+ $view_params = array(
108
+ 'id' => $VARS['id'],
109
+ 'page' => strtolower( $fs->get_text_x_inline( 'Pricing', 'noun', 'pricing' ) ),
110
+ );
111
+ fs_require_once_template('secure-https-header.php', $view_params);
112
+ }
113
+
114
+ $has_tabs = $fs->_add_tabs_before_content();
115
+
116
+ if ( $has_tabs ) {
117
+ $query_params['tabs'] = 'true';
118
+ }
119
+ ?>
120
+ <div id="fs_pricing" class="wrap fs-section fs-full-size-wrapper">
121
+ <?php if ( ! $use_external_pricing ) : ?>
122
+ <div id="fs_pricing_wrapper" data-public-url="<?php echo trailingslashit( dirname( $pricing_js_url ) ) ?>"></div>
123
+ <?php
124
+ $pricing_config = array_merge( array(
125
+ 'contact_url' => $fs->contact_url(),
126
+ 'is_network_admin' => fs_is_network_admin(),
127
+ 'is_production' => ( defined( 'WP_FS__IS_PRODUCTION_MODE' ) ? WP_FS__IS_PRODUCTION_MODE : null ),
128
+ 'menu_slug' => $fs->get_menu_slug(),
129
+ 'mode' => 'dashboard',
130
+ 'fs_wp_endpoint_url' => WP_FS__ADDRESS,
131
+ 'request_handler_url' => admin_url(
132
+ 'admin-ajax.php?' . http_build_query( array(
133
+ 'module_id' => $fs->get_id(),
134
+ 'action' => $fs->get_ajax_action( 'pricing_ajax_action' ),
135
+ 'security' => $fs->get_ajax_security( 'pricing_ajax_action' )
136
+ ) )
137
+ ),
138
+ 'selector' => '#fs_pricing_wrapper',
139
+ 'unique_affix' => $fs->get_unique_affix(),
140
+ ), $query_params );
141
+
142
+ wp_add_inline_script( 'freemius-pricing', 'Freemius.pricing.new( ' . json_encode( $pricing_config ) . ' )' );
143
+ ?>
144
+ <?php else : ?>
145
+ <div id="fs_frame"></div>
146
+ <form action="" method="POST">
147
+ <input type="hidden" name="user_id"/>
148
+ <input type="hidden" name="user_email"/>
149
+ <input type="hidden" name="site_id"/>
150
+ <input type="hidden" name="public_key"/>
151
+ <input type="hidden" name="secret_key"/>
152
+ <input type="hidden" name="action" value="account"/>
153
+ </form>
154
+
155
+ <script type="text/javascript">
156
+ (function ($, undef) {
157
+ $(function () {
158
+ var
159
+ // Keep track of the i-frame height.
160
+ frame_height = 800,
161
+ base_url = '<?php echo WP_FS__ADDRESS ?>',
162
+ // Pass the parent page URL into the i-frame in a meaningful way (this URL could be
163
+ // passed via query string or hard coded into the child page, it depends on your needs).
164
+ src = base_url + '/pricing/?<?php echo http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href),
165
+
166
+ // Append the I-frame into the DOM.
167
+ frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
168
+ .appendTo('#fs_frame');
169
+
170
+ FS.PostMessage.init(base_url, [frame[0]]);
171
+
172
+ FS.PostMessage.receive('height', function (data) {
173
+ var h = data.height;
174
+ if (!isNaN(h) && h > 0 && h != frame_height) {
175
+ frame_height = h;
176
+ frame.height(frame_height + 'px');
177
+
178
+ FS.PostMessage.postScroll(frame[0]);
179
+ }
180
+ });
181
+
182
+ FS.PostMessage.receive('get_dimensions', function (data) {
183
+ FS.PostMessage.post('dimensions', {
184
+ height : $(document.body).height(),
185
+ scrollTop: $(document).scrollTop()
186
+ }, frame[0]);
187
+ });
188
+
189
+ FS.PostMessage.receive('start_trial', function (data) {
190
+ openTrialConfirmationModal(data);
191
+ });
192
+ });
193
+ })(jQuery);
194
+ </script>
195
+ <?php endif ?>
196
+ </div>
197
+ <?php
198
+ if ( $has_tabs ) {
199
+ $fs->_add_tabs_after_content();
200
+ }
201
+
202
+ $params = array(
203
+ 'page' => 'pricing',
204
+ 'module_id' => $fs->get_id(),
205
+ 'module_type' => $fs->get_module_type(),
206
+ 'module_slug' => $slug,
207
+ 'module_version' => $fs->get_plugin_version(),
208
+ );
209
  fs_require_template( 'powered-by.php', $params );
freemius/templates/secure-https-header.php CHANGED
@@ -30,7 +30,7 @@
30
  ) ) .
31
  ' - ' .
32
  sprintf(
33
- '<a class="fs-security-proof" href="%s" target="_blank">%s</a>',
34
  'https://www.mcafeesecure.com/verify?host=' . WP_FS__ROOT_DOMAIN_PRODUCTION,
35
  'Freemius Inc. [US]'
36
  );
30
  ) ) .
31
  ' - ' .
32
  sprintf(
33
+ '<a class="fs-security-proof" href="%s" target="_blank" rel="noopener">%s</a>',
34
  'https://www.mcafeesecure.com/verify?host=' . WP_FS__ROOT_DOMAIN_PRODUCTION,
35
  'Freemius Inc. [US]'
36
  );
js_src/cf7msm.js CHANGED
@@ -37,19 +37,23 @@ jQuery(document).ready(function($) {
37
  if (key == 'cf7msm_prev_urls') {
38
  var backButton = cf7msm_form.find('.wpcf7-back, .wpcf7-previous');
39
  var url = window.location.href;
 
40
  var maybeHideButton = (!val.hasOwnProperty(url) || val[url] == '' );
41
  if (maybeHideButton) {
42
  // also check w/o trailing slash since it's sometimes added in the url.
43
- maybeHideButton = (!val.hasOwnProperty(url.replace(/\/$/, "")) || val[url.replace(/\/$/, "")] == '' )
44
  }
45
  if (maybeHideButton) {
46
  backButton.hide();
47
  }
48
  else {
49
  backButton.click(function(e) {
50
- if (val.hasOwnProperty(window.location.href) && val[window.location.href] != '' ) {
51
- window.location.href = val[window.location.href];
52
- }
 
 
 
53
  else {
54
  window.history.go(-1);
55
  }
37
  if (key == 'cf7msm_prev_urls') {
38
  var backButton = cf7msm_form.find('.wpcf7-back, .wpcf7-previous');
39
  var url = window.location.href;
40
+ var url_no_slash = url.replace(/\/$/, ""); // w/o trailing slash
41
  var maybeHideButton = (!val.hasOwnProperty(url) || val[url] == '' );
42
  if (maybeHideButton) {
43
  // also check w/o trailing slash since it's sometimes added in the url.
44
+ maybeHideButton = (!val.hasOwnProperty(url_no_slash) || val[url_no_slash] == '' )
45
  }
46
  if (maybeHideButton) {
47
  backButton.hide();
48
  }
49
  else {
50
  backButton.click(function(e) {
51
+ if (val.hasOwnProperty(url) && val[url] != '') {
52
+ window.location.href = val[url];
53
+ }
54
+ else if (val.hasOwnProperty(url_no_slash) && val[url_no_slash] != '') {
55
+ window.location.href = val[url_no_slash];
56
+ }
57
  else {
58
  window.history.go(-1);
59
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate Link: https://webheadcoder.com/donate-cf7-multi-step-forms
4
  Tags: contact form 7, multistep form, form, multiple pages, contact, multi, step
5
  Requires at least: 4.7
6
  Tested up to: 5.5
7
- Stable tag: 4.0.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -132,6 +132,9 @@ Make sure to check the "Skip Save" checkbox or have the skip_save attribute in t
132
 
133
  == Changelog ==
134
 
 
 
 
135
  = 4.0.7 =
136
  * fixed success message showing when not on the last step due to a change in Contact Form 7 v5.2.1.
137
  * added Skip Save for Advanced Contact form 7 DB plugin. Thanks to @undersound.
4
  Tags: contact form 7, multistep form, form, multiple pages, contact, multi, step
5
  Requires at least: 4.7
6
  Tested up to: 5.5
7
+ Stable tag: 4.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
132
 
133
  == Changelog ==
134
 
135
+ = 4.0.8 =
136
+ * fixed values being saved when form submission is invalid.
137
+
138
  = 4.0.7 =
139
  * fixed success message showing when not on the last step due to a change in Contact Form 7 v5.2.1.
140
  * added Skip Save for Advanced Contact form 7 DB plugin. Thanks to @undersound.
resources/cf7msm.min.js CHANGED
@@ -1 +1 @@
1
- function cf7msm_uniqueArray(e,t){for(var n={},s=[],r=2;r--;e=t)e.map((function(e){n[e]=n[e]||s.push(e)}));return s}function cf7msm_hasSS(){var e="test";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function quoteattr(e,t){return t=t?"&#13;":"\n",(""+e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r\n/g,t).replace(/[\r\n]/g,t)}function escapeattr(e){return(""+e).replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\u00A0/g,"\\u00A0").replace(/&/g,"\\x26").replace(/'/g,"\\x27").replace(/"/g,"\\x22").replace(/</g,"\\x3C").replace(/>/g,"\\x3E")}var cf7msm_ss;jQuery(document).ready((function(e){function t(e){n(e)}function n(t){var n=t.find("input[name='_cf7msm_multistep_tag']");0!=n.length&&(n.length>1&&(n=n.last()),e("<input />",{type:"hidden",name:"cf7msm_options",value:n.val()}).appendTo(t))}var s=cf7msm_posted_data,r=e("input[name='_cf7msm_multistep_tag']"),i,c=r.length>0;if(c||(c=(r=e("input[name='cf7msm-step']")).length>0),c){var a=r.closest("form"),o=a.find('input[name="_wpcf7"]').val();cf7msm_hasSS()?null!=(cf7msm_ss=sessionStorage.getObject("cf7msm"))&&e.each(cf7msm_ss,(function(e,t){if("cf7msm_prev_urls"==e){var n=a.find(".wpcf7-back, .wpcf7-previous"),s=window.location.href,r=!t.hasOwnProperty(s)||""==t[s];r&&(r=!t.hasOwnProperty(s.replace(/\/$/,""))||""==t[s.replace(/\/$/,"")]),r?n.hide():n.click((function(e){t.hasOwnProperty(window.location.href)&&""!=t[window.location.href]?window.location.href=t[window.location.href]:window.history.go(-1),e.preventDefault()}))}})):(e("input[name='cf7msm-no-ss']").val(1),e(".wpcf7-previous").hide()),s&&e.each(s,(function(t,n){if(t.indexOf("[]")===t.length-2&&(t=t.substring(0,t.length-2)),(0!=t.indexOf("_")||0==t.indexOf("_wpcf7_radio_free_text_")||0==t.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=t&&"cf7msm_options"!=t){var s=a.find('*[name="'+t+'"]:not([data-cf7msm-previous])'),r=a.find('input[name="'+t+'[]"]:not([data-cf7msm-previous])'),i=a.find('select[name="'+t+'[]"]:not([data-cf7msm-previous])');s.length>0?"radio"==s.prop("type")||"checkbox"==s.prop("type")?s.filter((function(){return e(this).val()==n})).prop("checked",!0):s.is("select")?s.find("option").filter((function(){return this.value==n})).attr("selected","selected"):s.val(n):r.length>0&&n.constructor===Array?""!=n&&n.length>0&&e.each(n,(function(t,n){r.filter((function(){return e(this).val()==n})).prop("checked",!0)})):i.length>0&&n.constructor===Array&&""!=n&&n.length>0&&e.each(n,(function(e,t){i.find("option").filter((function(){return this.value==t})).attr("selected","selected")}))}}));var f=wpcf7.submit;wpcf7.submit=function(e){t(e),f(e)},document.addEventListener("wpcf7mailsent",(function(t){if(cf7msm_hasSS()){var n=0,s=0,r=[],i={};(cf7msm_ss=sessionStorage.getObject("cf7msm"))||(cf7msm_ss={});var c=!1,a=!1,f=!0,m=!1,p=null,l=!1;if(e.each(t.detail.inputs,(function(u){var d=t.detail.inputs[u].name,h=t.detail.inputs[u].value;if(d.indexOf("[]")===d.length-2?(-1===e.inArray(d,r)&&(i[d]=[]),i[d].push(h)):i[d]=h,"cf7msm-step"===d){if(-1!==h.indexOf("-")){c=!0,a=!1;var _=h.split("-");n=parseInt(_[0]),s=parseInt(_[1]),void 0!==cf7msm_redirect_urls[o]&&(p=cf7msm_redirect_urls[o]),n<s?f=!1:n===s&&(m=!0)}}else if("cf7msm_options"===d){c=!0,a=!0,f=!1;var g=JSON.parse(h);g.hasOwnProperty("next_url")&&(p=g.next_url),g.hasOwnProperty("last_step")&&(l=!0,p&&""!==p||(m=!0,f=!0))}else r.push(d)})),!c)return;if(!f){var u=e("#"+t.detail.unitTag).find("div.wpcf7-mail-sent-ok");0==u.length&&(u=e("#"+t.detail.unitTag).find(".wpcf7-response-output")),u.remove()}if(m){var d=e("#"+t.detail.unitTag+" form");d.find("*").not("div.wpcf7-response-output").hide(),d.find("div.wpcf7-response-output").parentsUntil("form").show()}if(a?l&&(cf7msm_ss={}):0!=n&&n===s&&(cf7msm_ss={}),p&&""!=p){var h={};cf7msm_ss&&cf7msm_ss.cf7msm_prev_urls&&(h=cf7msm_ss.cf7msm_prev_urls);var _=window.location.protocol+"//"+window.location.host;0!==p.indexOf(_)&&(0!==p.indexOf("/")&&(_+="/"),p=_+p),h[p]=window.location.href,cf7msm_ss.cf7msm_prev_urls=h}sessionStorage.setObject("cf7msm",cf7msm_ss),p&&""!=p&&(window.location.href=p)}}),!1)}})),Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)};
1
+ var cf7msm_ss;function cf7msm_uniqueArray(e,t){for(var n={},s=[],r=2;r--;e=t)e.map((function(e){n[e]=n[e]||s.push(e)}));return s}function cf7msm_hasSS(){try{return sessionStorage.setItem("test","test"),sessionStorage.removeItem("test"),!0}catch(e){return!1}}function quoteattr(e,t){return t=t?"&#13;":"\n",(""+e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r\n/g,t).replace(/[\r\n]/g,t)}function escapeattr(e){return(""+e).replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\u00A0/g,"\\u00A0").replace(/&/g,"\\x26").replace(/'/g,"\\x27").replace(/"/g,"\\x22").replace(/</g,"\\x3C").replace(/>/g,"\\x3E")}jQuery(document).ready((function(e){var t=cf7msm_posted_data,n=e("input[name='_cf7msm_multistep_tag']"),s=n.length>0;if(s||(s=(n=e("input[name='cf7msm-step']")).length>0),s){var r=n.closest("form"),i=r.find('input[name="_wpcf7"]').val();cf7msm_hasSS()?null!=(cf7msm_ss=sessionStorage.getObject("cf7msm"))&&e.each(cf7msm_ss,(function(e,t){if("cf7msm_prev_urls"==e){var n=r.find(".wpcf7-back, .wpcf7-previous"),s=window.location.href,i=s.replace(/\/$/,""),c=!t.hasOwnProperty(s)||""==t[s];c&&(c=!t.hasOwnProperty(i)||""==t[i]),c?n.hide():n.click((function(e){t.hasOwnProperty(s)&&""!=t[s]?window.location.href=t[s]:t.hasOwnProperty(i)&&""!=t[i]?window.location.href=t[i]:window.history.go(-1),e.preventDefault()}))}})):(e("input[name='cf7msm-no-ss']").val(1),e(".wpcf7-previous").hide()),t&&e.each(t,(function(t,n){if(t.indexOf("[]")===t.length-2&&(t=t.substring(0,t.length-2)),(0!=t.indexOf("_")||0==t.indexOf("_wpcf7_radio_free_text_")||0==t.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=t&&"cf7msm_options"!=t){var s=r.find('*[name="'+t+'"]:not([data-cf7msm-previous])'),i=r.find('input[name="'+t+'[]"]:not([data-cf7msm-previous])'),c=r.find('select[name="'+t+'[]"]:not([data-cf7msm-previous])');s.length>0?"radio"==s.prop("type")||"checkbox"==s.prop("type")?s.filter((function(){return e(this).val()==n})).prop("checked",!0):s.is("select")?s.find("option").filter((function(){return this.value==n})).attr("selected","selected"):s.val(n):i.length>0&&n.constructor===Array?""!=n&&n.length>0&&e.each(n,(function(t,n){i.filter((function(){return e(this).val()==n})).prop("checked",!0)})):c.length>0&&n.constructor===Array&&""!=n&&n.length>0&&e.each(n,(function(e,t){c.find("option").filter((function(){return this.value==t})).attr("selected","selected")}))}}));var c=wpcf7.submit;wpcf7.submit=function(t){!function(t){!function(t){var n=t.find("input[name='_cf7msm_multistep_tag']");if(0==n.length)return;n.length>1&&(n=n.last());e("<input />",{type:"hidden",name:"cf7msm_options",value:n.val()}).appendTo(t)}(t)}(t),c(t)},document.addEventListener("wpcf7mailsent",(function(t){if(cf7msm_hasSS()){var n=0,s=0,r=[],c={};(cf7msm_ss=sessionStorage.getObject("cf7msm"))||(cf7msm_ss={});var a=!1,o=!1,f=!0,m=!1,p=null,u=!1;if(e.each(t.detail.inputs,(function(l){var d=t.detail.inputs[l].name,_=t.detail.inputs[l].value;if(d.indexOf("[]")===d.length-2?(-1===e.inArray(d,r)&&(c[d]=[]),c[d].push(_)):c[d]=_,"cf7msm-step"===d){if(-1!==_.indexOf("-")){a=!0,o=!1;var h=_.split("-");n=parseInt(h[0]),s=parseInt(h[1]),void 0!==cf7msm_redirect_urls[i]&&(p=cf7msm_redirect_urls[i]),n<s?f=!1:n===s&&(m=!0)}}else if("cf7msm_options"===d){a=!0,o=!0,f=!1;var g=JSON.parse(_);g.hasOwnProperty("next_url")&&(p=g.next_url),g.hasOwnProperty("last_step")&&(u=!0,p&&""!==p||(m=!0,f=!0))}else r.push(d)})),!a)return;if(!f){var l=e("#"+t.detail.unitTag).find("div.wpcf7-mail-sent-ok");0==l.length&&(l=e("#"+t.detail.unitTag).find(".wpcf7-response-output")),l.remove()}if(m){var d=e("#"+t.detail.unitTag+" form");d.find("*").not("div.wpcf7-response-output").hide(),d.find("div.wpcf7-response-output").parentsUntil("form").show()}if(o?u&&(cf7msm_ss={}):0!=n&&n===s&&(cf7msm_ss={}),p&&""!=p){var _={};cf7msm_ss&&cf7msm_ss.cf7msm_prev_urls&&(_=cf7msm_ss.cf7msm_prev_urls);var h=window.location.protocol+"//"+window.location.host;0!==p.indexOf(h)&&(0!==p.indexOf("/")&&(h+="/"),p=h+p),_[p]=window.location.href,cf7msm_ss.cf7msm_prev_urls=_}sessionStorage.setObject("cf7msm",cf7msm_ss),p&&""!=p&&(window.location.href=p)}}),!1)}})),Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)};