PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
← All changes | libraries/freemius/templates/connect.php +30 -12 2.1.7 → 3.4 View file →
@@ -160,9 +160,8 @@
160 160 );
161 161
162 162 fs_require_once_template( 'plugin-icon.php', $vars );
163 163 ?>
164 - <!-- <img class="fs-connect-logo" width="--><?php //echo $size ?><!--" height="--><?php //echo $size ?><!--" src="//img.freemius.com/logo/connect.svg"/>-->
165 164 </div>
166 165 <div class="fs-box-container">
167 166 <div class="fs-content">
168 167 <?php $fs->do_action( 'connect/before_message', $activation_state ) ?>
@@ -336,8 +335,11 @@
336 335 <span class="fs-input-label"><?php echo $do_not_send_updates_text ?></span>
337 336 </label>
338 337 </div>
339 338 </div>
339 + <div id="fs_orphan_license_message">
340 + <span class="fs-message"><?php fs_echo_inline( "A user has not yet been associated with the license, which is necessary to prevent unauthorized activation. To assign the license to your user, you agree to share your WordPress user's full name and email address." ) ?></span>
341 + </div>
340 342 <?php endif ?>
341 343 <?php if ( $is_network_level_activation ) : ?>
342 344 <?php
343 345 $vars = array(
@@ -739,12 +741,13 @@
739 741
740 742 var
741 743 licenseKey = $licenseKeyInput.val(),
742 744 data = {
743 - action : action,
744 - security : security,
745 - license_key: licenseKey,
746 - module_id : '<?php echo $fs->get_id() ?>'
745 + action : action,
746 + security : security,
747 + license_key : licenseKey,
748 + module_id : '<?php echo $fs->get_id() ?>',
749 + license_owner_id: licenseOwnerIDByLicense[ licenseKey ]
747 750 };
748 751
749 752 if (
750 753 requireLicenseKey &&
@@ -915,9 +918,9 @@
915 918 }
916 919
917 920 if ('' === key) {
918 921 $primaryCta.attr('disabled', 'disabled');
919 - $marketingOptin.hide();
922 + hideOptinAndLicenseMessage();
920 923 } else {
921 924 $primaryCta.prop('disabled', false);
922 925
923 926 if (32 <= key.length){
@@ -922,9 +925,9 @@
922 925
923 926 if (32 <= key.length){
924 927 fetchIsMarketingAllowedFlagAndToggleOptin();
925 928 } else {
926 - $marketingOptin.hide();
929 + hideOptinAndLicenseMessage();
927 930 }
928 931 }
929 932
930 933 previousLicenseKey = key;
@@ -958,10 +961,12 @@
958 961 //--------------------------------------------------------------------------------
959 962 //region GDPR
960 963 //--------------------------------------------------------------------------------
961 964 var isMarketingAllowedByLicense = {},
962 - $marketingOptin = $('#fs_marketing_optin'),
963 - previousLicenseKey = null;
965 + licenseOwnerIDByLicense = {},
966 + $marketingOptin = $( '#fs_marketing_optin' ),
967 + $orphanLicenseMessage = $( '#fs_orphan_license_message' ),
968 + previousLicenseKey = null;
964 969
965 970 if (requireLicenseKey) {
966 971
967 972 var
@@ -981,8 +986,16 @@
981 986 } else {
982 987 $marketingOptin.hide();
983 988 $primaryCta.focus();
984 989 }
990 +
991 + $orphanLicenseMessage.toggle( false === licenseOwnerIDByLicense[ licenseKey ] );
992 +
993 + if ( false !== licenseOwnerIDByLicense[ licenseKey ] ) {
994 + $( 'input[name=user_firstname]' ).remove();
995 + $( 'input[name=user_lastname]' ).remove();
996 + $( 'input[name=user_email]' ).remove();
997 + }
985 998 },
986 999 /**
987 1000 * @author Leo Fajardo (@leorw)
988 1001 * @since 2.1.0
@@ -990,9 +1003,10 @@
990 1003 fetchIsMarketingAllowedFlagAndToggleOptin = function () {
991 1004 var licenseKey = $licenseKeyInput.val();
992 1005
993 1006 if (licenseKey.length < 32) {
994 - $marketingOptin.hide();
1007 + hideOptinAndLicenseMessage();
1008 +
995 1009 return;
996 1010 }
997 1011
998 1012 if (isMarketingAllowedByLicense.hasOwnProperty(licenseKey)) {
@@ -999,10 +1013,9 @@
999 1013 afterMarketingFlagLoaded();
1000 1014 return;
1001 1015 }
1002 1016
1003 - $marketingOptin.hide();
1004 -
1017 + hideOptinAndLicenseMessage();
1005 1018 setLoadingMode();
1006 1019
1007 1020 $primaryCta.addClass('fs-loading');
1008 1021 $primaryCta.attr('disabled', 'disabled');
@@ -1024,13 +1037,18 @@
1024 1037 result = result.data;
1025 1038
1026 1039 // Cache result.
1027 1040 isMarketingAllowedByLicense[licenseKey] = result.is_marketing_allowed;
1041 + licenseOwnerIDByLicense[ licenseKey ] = result.license_owner_id;
1028 1042 }
1029 1043
1030 1044 afterMarketingFlagLoaded();
1031 1045 }
1032 1046 });
1047 + },
1048 + hideOptinAndLicenseMessage = function() {
1049 + $marketingOptin.hide();
1050 + $orphanLicenseMessage.hide();
1033 1051 };
1034 1052
1035 1053 $marketingOptin.find( 'input' ).click(function() {
1036 1054 $marketingOptin.removeClass( 'error' );