Version Description
- Updated: Freemius SDK for better account and license management.
- Fixed: [oceanwp_nav] shortcode mobile menu issue.
- Fixed: Theme Panel > Scripts & Styles - PHP7.4 Warning message after disabling/enabling styles & scripts.
- Fixed: Replaced get_woocommerce_term_meta (deprecated) by get_term_meta.
- Added: Accessibility Improvement - Added 'aria-hidden' labels to the social icon widget.
Download this release
Release Info
Developer | oceanwp |
Plugin | Ocean Extra |
Version | 1.6.0 |
Comparing to | |
See all releases |
Code changes from version 1.5.20 to 1.6.0
- assets/js/cookie.js +147 -0
- includes/client-migration/class-fs-client-migration-abstract.php +72 -6
- includes/freemius/LICENSE.txt +673 -673
- includes/freemius/README.md +253 -253
- includes/freemius/assets/css/admin/account.css +1 -1
- includes/freemius/assets/css/admin/add-ons.css +2 -2
- includes/freemius/assets/css/admin/affiliation.css +1 -1
- includes/freemius/assets/css/admin/checkout.css +1 -1
- includes/freemius/assets/css/admin/common.css +2 -2
- includes/freemius/assets/css/admin/connect.css +1 -1
- includes/freemius/assets/css/admin/debug.css +1 -1
- includes/freemius/assets/css/admin/dialog-boxes.css +2 -2
- includes/freemius/assets/css/admin/gdpr-optin-notice.css +1 -1
- includes/freemius/assets/css/admin/index.php +2 -2
- includes/freemius/assets/css/admin/plugins.css +1 -1
- includes/freemius/assets/css/customizer.css +1 -1
- includes/freemius/assets/css/index.php +2 -2
- includes/freemius/assets/img/index.php +2 -2
- includes/freemius/assets/index.php +2 -2
- includes/freemius/assets/js/index.php +2 -2
- includes/freemius/assets/js/nojquery.ba-postmessage.js +139 -139
- includes/freemius/assets/js/nojquery.ba-postmessage.min.js +11 -11
- includes/freemius/assets/js/postmessage.js +134 -134
- includes/freemius/config.php +387 -387
- includes/freemius/includes/class-freemius-abstract.php +596 -596
- includes/freemius/includes/class-freemius.php +923 -109
- includes/freemius/includes/class-fs-admin-notices.php +320 -320
- includes/freemius/includes/class-fs-logger.php +690 -690
- includes/freemius/includes/class-fs-plugin-updater.php +6 -0
- includes/freemius/includes/class-fs-security.php +85 -85
- includes/freemius/includes/class-fs-storage.php +11 -10
- includes/freemius/includes/class-fs-user-lock.php +125 -125
- includes/freemius/includes/customizer/class-fs-customizer-support-section.php +101 -101
- includes/freemius/includes/customizer/class-fs-customizer-upsell-control.php +160 -160
- includes/freemius/includes/customizer/index.php +2 -2
- includes/freemius/includes/debug/class-fs-debug-bar-panel.php +64 -64
- includes/freemius/includes/debug/debug-bar-start.php +51 -51
- includes/freemius/includes/debug/index.php +2 -2
- includes/freemius/includes/entities/class-fs-affiliate-terms.php +127 -127
- includes/freemius/includes/entities/class-fs-affiliate.php +83 -83
- includes/freemius/includes/entities/class-fs-billing.php +94 -94
- includes/freemius/includes/entities/class-fs-entity.php +158 -148
- includes/freemius/includes/entities/class-fs-payment.php +167 -167
- includes/freemius/includes/entities/class-fs-plugin-info.php +33 -33
- includes/freemius/includes/entities/class-fs-plugin-license.php +301 -323
- includes/freemius/includes/entities/class-fs-plugin-plan.php +144 -144
- includes/freemius/includes/entities/class-fs-plugin-tag.php +59 -59
- includes/freemius/includes/entities/class-fs-plugin.php +158 -158
- includes/freemius/includes/entities/class-fs-pricing.php +156 -140
- includes/freemius/includes/entities/class-fs-scope-entity.php +28 -28
- includes/freemius/includes/entities/class-fs-site.php +232 -232
- includes/freemius/includes/entities/class-fs-subscription.php +146 -146
- includes/freemius/includes/entities/class-fs-user.php +78 -78
- includes/freemius/includes/entities/index.php +2 -2
- includes/freemius/includes/fs-core-functions.php +72 -0
- includes/freemius/includes/fs-essential-functions.php +5 -1
- includes/freemius/includes/fs-plugin-info-dialog.php +25 -4
- includes/freemius/includes/index.php +2 -2
- includes/freemius/includes/l10n.php +48 -48
- includes/freemius/includes/managers/class-fs-admin-menu-manager.php +1000 -1000
- includes/freemius/includes/managers/class-fs-cache-manager.php +325 -325
- includes/freemius/includes/managers/class-fs-gdpr-manager.php +201 -201
- includes/freemius/includes/managers/class-fs-key-value-storage.php +391 -391
- includes/freemius/includes/managers/class-fs-license-manager.php +103 -103
- includes/freemius/includes/managers/class-fs-option-manager.php +521 -497
- includes/freemius/includes/managers/class-fs-plan-manager.php +161 -161
- includes/freemius/includes/managers/class-fs-plugin-manager.php +3 -3
- includes/freemius/includes/managers/index.php +2 -2
- includes/freemius/includes/sdk/Exceptions/index.php +2 -2
- includes/freemius/includes/sdk/LICENSE.txt +340 -340
- includes/freemius/includes/sdk/index.php +2 -2
- includes/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +43 -43
- includes/freemius/includes/supplements/fs-essential-functions-2.2.1.php +44 -44
- includes/freemius/includes/supplements/index.php +2 -2
- includes/freemius/index.php +2 -2
- includes/freemius/languages/freemius-cs_CZ.mo +0 -0
- includes/freemius/languages/freemius-cs_CZ.po +2546 -2717
- includes/freemius/languages/freemius-da_DK.mo +0 -0
- includes/freemius/languages/freemius-da_DK.po +321 -2504
assets/js/cookie.js
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Javascript Cookie v1.5.1
|
3 |
+
* https://github.com/js-cookie/js-cookie
|
4 |
+
*
|
5 |
+
* Copyright 2006, 2014 Klaus Hartl
|
6 |
+
* Released under the MIT license
|
7 |
+
*/
|
8 |
+
(function (factory) {
|
9 |
+
var jQuery;
|
10 |
+
if (typeof define === 'function' && define.amd) {
|
11 |
+
// AMD (Register as an anonymous module)
|
12 |
+
define(['jquery'], factory);
|
13 |
+
} else if (typeof exports === 'object') {
|
14 |
+
// Node/CommonJS
|
15 |
+
try {
|
16 |
+
jQuery = require('jquery');
|
17 |
+
} catch(e) {}
|
18 |
+
module.exports = factory(jQuery);
|
19 |
+
} else {
|
20 |
+
// Browser globals
|
21 |
+
var _OldCookies = window.Cookies;
|
22 |
+
var api = window.Cookies = factory(window.jQuery);
|
23 |
+
api.noConflict = function() {
|
24 |
+
window.Cookies = _OldCookies;
|
25 |
+
return api;
|
26 |
+
};
|
27 |
+
}
|
28 |
+
}(function ($) {
|
29 |
+
|
30 |
+
var pluses = /\+/g;
|
31 |
+
|
32 |
+
function encode(s) {
|
33 |
+
return api.raw ? s : encodeURIComponent(s);
|
34 |
+
}
|
35 |
+
|
36 |
+
function decode(s) {
|
37 |
+
return api.raw ? s : decodeURIComponent(s);
|
38 |
+
}
|
39 |
+
|
40 |
+
function stringifyCookieValue(value) {
|
41 |
+
return encode(api.json ? JSON.stringify(value) : String(value));
|
42 |
+
}
|
43 |
+
|
44 |
+
function parseCookieValue(s) {
|
45 |
+
if (s.indexOf('"') === 0) {
|
46 |
+
// This is a quoted cookie as according to RFC2068, unescape...
|
47 |
+
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
48 |
+
}
|
49 |
+
|
50 |
+
try {
|
51 |
+
// Replace server-side written pluses with spaces.
|
52 |
+
// If we can't decode the cookie, ignore it, it's unusable.
|
53 |
+
// If we can't parse the cookie, ignore it, it's unusable.
|
54 |
+
s = decodeURIComponent(s.replace(pluses, ' '));
|
55 |
+
return api.json ? JSON.parse(s) : s;
|
56 |
+
} catch(e) {}
|
57 |
+
}
|
58 |
+
|
59 |
+
function read(s, converter) {
|
60 |
+
var value = api.raw ? s : parseCookieValue(s);
|
61 |
+
return isFunction(converter) ? converter(value) : value;
|
62 |
+
}
|
63 |
+
|
64 |
+
function extend() {
|
65 |
+
var key, options;
|
66 |
+
var i = 0;
|
67 |
+
var result = {};
|
68 |
+
for (; i < arguments.length; i++) {
|
69 |
+
options = arguments[ i ];
|
70 |
+
for (key in options) {
|
71 |
+
result[key] = options[key];
|
72 |
+
}
|
73 |
+
}
|
74 |
+
return result;
|
75 |
+
}
|
76 |
+
|
77 |
+
function isFunction(obj) {
|
78 |
+
return Object.prototype.toString.call(obj) === '[object Function]';
|
79 |
+
}
|
80 |
+
|
81 |
+
var api = function (key, value, options) {
|
82 |
+
|
83 |
+
// Write
|
84 |
+
|
85 |
+
if (arguments.length > 1 && !isFunction(value)) {
|
86 |
+
options = extend(api.defaults, options);
|
87 |
+
|
88 |
+
if (typeof options.expires === 'number') {
|
89 |
+
var days = options.expires, t = options.expires = new Date();
|
90 |
+
t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
|
91 |
+
}
|
92 |
+
|
93 |
+
return (document.cookie = [
|
94 |
+
encode(key), '=', stringifyCookieValue(value),
|
95 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
96 |
+
options.path ? '; path=' + options.path : '',
|
97 |
+
options.domain ? '; domain=' + options.domain : '',
|
98 |
+
options.secure ? '; secure' : ''
|
99 |
+
].join(''));
|
100 |
+
}
|
101 |
+
|
102 |
+
// Read
|
103 |
+
|
104 |
+
var result = key ? undefined : {},
|
105 |
+
// To prevent the for loop in the first place assign an empty array
|
106 |
+
// in case there are no cookies at all. Also prevents odd result when
|
107 |
+
// calling "get()".
|
108 |
+
cookies = document.cookie ? document.cookie.split('; ') : [],
|
109 |
+
i = 0,
|
110 |
+
l = cookies.length;
|
111 |
+
|
112 |
+
for (; i < l; i++) {
|
113 |
+
var parts = cookies[i].split('='),
|
114 |
+
name = decode(parts.shift()),
|
115 |
+
cookie = parts.join('=');
|
116 |
+
|
117 |
+
if (key === name) {
|
118 |
+
// If second argument (value) is a function it's a converter...
|
119 |
+
result = read(cookie, value);
|
120 |
+
break;
|
121 |
+
}
|
122 |
+
|
123 |
+
// Prevent storing a cookie that we couldn't decode.
|
124 |
+
if (!key && (cookie = read(cookie)) !== undefined) {
|
125 |
+
result[name] = cookie;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
return result;
|
130 |
+
};
|
131 |
+
|
132 |
+
api.get = api.set = api;
|
133 |
+
api.defaults = {};
|
134 |
+
|
135 |
+
api.remove = function (key, options) {
|
136 |
+
// Must not alter options, thus extending a fresh object...
|
137 |
+
api(key, '', extend(options, { expires: -1 }));
|
138 |
+
return !api(key);
|
139 |
+
};
|
140 |
+
|
141 |
+
if ( $ ) {
|
142 |
+
$.cookie = api;
|
143 |
+
$.removeCookie = api.remove;
|
144 |
+
}
|
145 |
+
|
146 |
+
return api;
|
147 |
+
}));
|
includes/client-migration/class-fs-client-migration-abstract.php
CHANGED
@@ -407,7 +407,7 @@
|
|
407 |
);
|
408 |
|
409 |
// Cache result (15-min).
|
410 |
-
set_transient( $transient_key, $response, 15 * MINUTE_IN_SECONDS );
|
411 |
}
|
412 |
|
413 |
set_transient( "fs_license_migration_{$this->_product_id}_last_response", $response, WP_FS__TIME_24_HOURS_IN_SEC * 30 );
|
@@ -445,7 +445,7 @@
|
|
445 |
case 'invalid_license_key':
|
446 |
case 'license_expired':
|
447 |
case 'license_disabled':
|
448 |
-
set_transient( $should_migrate_transient, 'no', WP_FS__TIME_24_HOURS_IN_SEC * 365 );
|
449 |
break;
|
450 |
default:
|
451 |
// Unexpected error.
|
@@ -461,7 +461,7 @@
|
|
461 |
}
|
462 |
|
463 |
// Delete transient on successful migration.
|
464 |
-
|
465 |
|
466 |
if ( $this->_was_freemius_in_prev_version && $this->_fs->is_registered() ) {
|
467 |
if ( $this->_license_accessor->is_network_migration() ) {
|
@@ -548,7 +548,7 @@
|
|
548 |
}
|
549 |
|
550 |
// Upon successful migration, store the no-migration flag for 5 years.
|
551 |
-
set_transient( $should_migrate_transient, 'no', WP_FS__TIME_24_HOURS_IN_SEC * 365 * 5 );
|
552 |
|
553 |
do_action( 'fs_after_client_migration', $this->_license_accessor );
|
554 |
|
@@ -774,7 +774,7 @@
|
|
774 |
$all_licenses = $result['licenses'];
|
775 |
|
776 |
$transient_key = 'fs_license_migration_' . $this->_product_id . '_' . md5( implode( '', $all_licenses ) );
|
777 |
-
$response =
|
778 |
|
779 |
$response->error->message = 'Migration error: ' . var_export( $response, true );
|
780 |
}
|
@@ -1087,7 +1087,7 @@
|
|
1087 |
protected function should_try_migrate() {
|
1088 |
$key = $this->get_should_migrate_transient_key();
|
1089 |
|
1090 |
-
$should_migrate =
|
1091 |
|
1092 |
return ( ! is_string( $should_migrate ) || 'no' !== $should_migrate );
|
1093 |
}
|
@@ -1125,6 +1125,35 @@
|
|
1125 |
return $value;
|
1126 |
}
|
1127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1128 |
/**
|
1129 |
* Not like `set_transient()`, this function will only ADD
|
1130 |
* a transient if it's not yet exist.
|
@@ -1165,6 +1194,43 @@
|
|
1165 |
return false;
|
1166 |
}
|
1167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1168 |
#endregion
|
1169 |
|
1170 |
#--------------------------------------------------------------------------------
|
407 |
);
|
408 |
|
409 |
// Cache result (15-min).
|
410 |
+
$this->set_transient( $transient_key, $response, 15 * MINUTE_IN_SECONDS );
|
411 |
}
|
412 |
|
413 |
set_transient( "fs_license_migration_{$this->_product_id}_last_response", $response, WP_FS__TIME_24_HOURS_IN_SEC * 30 );
|
445 |
case 'invalid_license_key':
|
446 |
case 'license_expired':
|
447 |
case 'license_disabled':
|
448 |
+
$this->set_transient( $should_migrate_transient, 'no', WP_FS__TIME_24_HOURS_IN_SEC * 365 );
|
449 |
break;
|
450 |
default:
|
451 |
// Unexpected error.
|
461 |
}
|
462 |
|
463 |
// Delete transient on successful migration.
|
464 |
+
$this->delete_transient_mixed( $transient_key );
|
465 |
|
466 |
if ( $this->_was_freemius_in_prev_version && $this->_fs->is_registered() ) {
|
467 |
if ( $this->_license_accessor->is_network_migration() ) {
|
548 |
}
|
549 |
|
550 |
// Upon successful migration, store the no-migration flag for 5 years.
|
551 |
+
$this->set_transient( $should_migrate_transient, 'no', WP_FS__TIME_24_HOURS_IN_SEC * 365 * 5 );
|
552 |
|
553 |
do_action( 'fs_after_client_migration', $this->_license_accessor );
|
554 |
|
774 |
$all_licenses = $result['licenses'];
|
775 |
|
776 |
$transient_key = 'fs_license_migration_' . $this->_product_id . '_' . md5( implode( '', $all_licenses ) );
|
777 |
+
$response = $this->get_transient_mixed( $transient_key );
|
778 |
|
779 |
$response->error->message = 'Migration error: ' . var_export( $response, true );
|
780 |
}
|
1087 |
protected function should_try_migrate() {
|
1088 |
$key = $this->get_should_migrate_transient_key();
|
1089 |
|
1090 |
+
$should_migrate = $this->get_transient_mixed( $key );
|
1091 |
|
1092 |
return ( ! is_string( $should_migrate ) || 'no' !== $should_migrate );
|
1093 |
}
|
1125 |
return $value;
|
1126 |
}
|
1127 |
|
1128 |
+
/**
|
1129 |
+
* @author Leo Fajardo (@leorw)
|
1130 |
+
* @since 1.1.2.1
|
1131 |
+
*
|
1132 |
+
* @param string $transient
|
1133 |
+
*
|
1134 |
+
* @return mixed
|
1135 |
+
*/
|
1136 |
+
private function get_transient_mixed( $transient ) {
|
1137 |
+
$value = get_transient( $transient );
|
1138 |
+
|
1139 |
+
if ( false === $value ) {
|
1140 |
+
$value = $this->get_transient( $transient );
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
return $value;
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
/**
|
1147 |
+
* @author Leo Fajardo (@leorw)
|
1148 |
+
* @since 1.1.2.1
|
1149 |
+
*
|
1150 |
+
* @param string $transient
|
1151 |
+
*/
|
1152 |
+
private function delete_transient_mixed( $transient ) {
|
1153 |
+
delete_transient( $transient );
|
1154 |
+
$this->delete_transient( $transient );
|
1155 |
+
}
|
1156 |
+
|
1157 |
/**
|
1158 |
* Not like `set_transient()`, this function will only ADD
|
1159 |
* a transient if it's not yet exist.
|
1194 |
return false;
|
1195 |
}
|
1196 |
|
1197 |
+
/**
|
1198 |
+
* @author Leo Fajardo (@leorw)
|
1199 |
+
* @since 1.1.2.1
|
1200 |
+
*
|
1201 |
+
* @param string $transient
|
1202 |
+
* @param mixed $value
|
1203 |
+
* @param int $expiration
|
1204 |
+
*
|
1205 |
+
* @return bool true if successfully updated a transient.
|
1206 |
+
*/
|
1207 |
+
private function set_transient( $transient, $value, $expiration = 0 ) {
|
1208 |
+
$this->delete_transient( $transient );
|
1209 |
+
|
1210 |
+
return $this->add_transient( $transient, $value, $expiration );
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
/**
|
1214 |
+
* @author Leo Fajardo (@leorw)
|
1215 |
+
* @since 1.1.2.1
|
1216 |
+
*
|
1217 |
+
* @param string $transient
|
1218 |
+
*
|
1219 |
+
* @return bool true if successfully removed.
|
1220 |
+
*/
|
1221 |
+
private function delete_transient( $transient ) {
|
1222 |
+
$transient_option = '_fs_transient_' . $transient;
|
1223 |
+
$transient_timeout = '_fs_transient_timeout_' . $transient;
|
1224 |
+
|
1225 |
+
$result = delete_option( $transient_option );
|
1226 |
+
|
1227 |
+
if ( false !== $result ) {
|
1228 |
+
delete_option( $transient_timeout );
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
return $result;
|
1232 |
+
}
|
1233 |
+
|
1234 |
#endregion
|
1235 |
|
1236 |
#--------------------------------------------------------------------------------
|
includes/freemius/LICENSE.txt
CHANGED
@@ -1,674 +1,674 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
Preamble
|
9 |
-
|
10 |
-
The GNU General Public License is a free, copyleft license for
|
11 |
-
software and other kinds of works.
|
12 |
-
|
13 |
-
The licenses for most software and other practical works are designed
|
14 |
-
to take away your freedom to share and change the works. By contrast,
|
15 |
-
the GNU General Public License is intended to guarantee your freedom to
|
16 |
-
share and change all versions of a program--to make sure it remains free
|
17 |
-
software for all its users. We, the Free Software Foundation, use the
|
18 |
-
GNU General Public License for most of our software; it applies also to
|
19 |
-
any other work released this way by its authors. You can apply it to
|
20 |
-
your programs, too.
|
21 |
-
|
22 |
-
When we speak of free software, we are referring to freedom, not
|
23 |
-
price. Our General Public Licenses are designed to make sure that you
|
24 |
-
have the freedom to distribute copies of free software (and charge for
|
25 |
-
them if you wish), that you receive source code or can get it if you
|
26 |
-
want it, that you can change the software or use pieces of it in new
|
27 |
-
free programs, and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to prevent others from denying you
|
30 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
-
certain responsibilities if you distribute copies of the software, or if
|
32 |
-
you modify it: responsibilities to respect the freedom of others.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must pass on to the recipients the same
|
36 |
-
freedoms that you received. You must make sure that they, too, receive
|
37 |
-
or can get the source code. And you must show them these terms so they
|
38 |
-
know their rights.
|
39 |
-
|
40 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
-
(1) assert copyright on the software, and (2) offer you this License
|
42 |
-
giving you legal permission to copy, distribute and/or modify it.
|
43 |
-
|
44 |
-
For the developers' and authors' protection, the GPL clearly explains
|
45 |
-
that there is no warranty for this free software. For both users' and
|
46 |
-
authors' sake, the GPL requires that modified versions be marked as
|
47 |
-
changed, so that their problems will not be attributed erroneously to
|
48 |
-
authors of previous versions.
|
49 |
-
|
50 |
-
Some devices are designed to deny users access to install or run
|
51 |
-
modified versions of the software inside them, although the manufacturer
|
52 |
-
can do so. This is fundamentally incompatible with the aim of
|
53 |
-
protecting users' freedom to change the software. The systematic
|
54 |
-
pattern of such abuse occurs in the area of products for individuals to
|
55 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
-
have designed this version of the GPL to prohibit the practice for those
|
57 |
-
products. If such problems arise substantially in other domains, we
|
58 |
-
stand ready to extend this provision to those domains in future versions
|
59 |
-
of the GPL, as needed to protect the freedom of users.
|
60 |
-
|
61 |
-
Finally, every program is threatened constantly by software patents.
|
62 |
-
States should not allow patents to restrict development and use of
|
63 |
-
software on general-purpose computers, but in those that do, we wish to
|
64 |
-
avoid the special danger that patents applied to a free program could
|
65 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
-
patents cannot be used to render the program non-free.
|
67 |
-
|
68 |
-
The precise terms and conditions for copying, distribution and
|
69 |
-
modification follow.
|
70 |
-
|
71 |
-
TERMS AND CONDITIONS
|
72 |
-
|
73 |
-
0. Definitions.
|
74 |
-
|
75 |
-
"This License" refers to version 3 of the GNU General Public License.
|
76 |
-
|
77 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
-
works, such as semiconductor masks.
|
79 |
-
|
80 |
-
"The Program" refers to any copyrightable work licensed under this
|
81 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
-
"recipients" may be individuals or organizations.
|
83 |
-
|
84 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
-
in a fashion requiring copyright permission, other than the making of an
|
86 |
-
exact copy. The resulting work is called a "modified version" of the
|
87 |
-
earlier work or a work "based on" the earlier work.
|
88 |
-
|
89 |
-
A "covered work" means either the unmodified Program or a work based
|
90 |
-
on the Program.
|
91 |
-
|
92 |
-
To "propagate" a work means to do anything with it that, without
|
93 |
-
permission, would make you directly or secondarily liable for
|
94 |
-
infringement under applicable copyright law, except executing it on a
|
95 |
-
computer or modifying a private copy. Propagation includes copying,
|
96 |
-
distribution (with or without modification), making available to the
|
97 |
-
public, and in some countries other activities as well.
|
98 |
-
|
99 |
-
To "convey" a work means any kind of propagation that enables other
|
100 |
-
parties to make or receive copies. Mere interaction with a user through
|
101 |
-
a computer network, with no transfer of a copy, is not conveying.
|
102 |
-
|
103 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
-
to the extent that it includes a convenient and prominently visible
|
105 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
-
tells the user that there is no warranty for the work (except to the
|
107 |
-
extent that warranties are provided), that licensees may convey the
|
108 |
-
work under this License, and how to view a copy of this License. If
|
109 |
-
the interface presents a list of user commands or options, such as a
|
110 |
-
menu, a prominent item in the list meets this criterion.
|
111 |
-
|
112 |
-
1. Source Code.
|
113 |
-
|
114 |
-
The "source code" for a work means the preferred form of the work
|
115 |
-
for making modifications to it. "Object code" means any non-source
|
116 |
-
form of a work.
|
117 |
-
|
118 |
-
A "Standard Interface" means an interface that either is an official
|
119 |
-
standard defined by a recognized standards body, or, in the case of
|
120 |
-
interfaces specified for a particular programming language, one that
|
121 |
-
is widely used among developers working in that language.
|
122 |
-
|
123 |
-
The "System Libraries" of an executable work include anything, other
|
124 |
-
than the work as a whole, that (a) is included in the normal form of
|
125 |
-
packaging a Major Component, but which is not part of that Major
|
126 |
-
Component, and (b) serves only to enable use of the work with that
|
127 |
-
Major Component, or to implement a Standard Interface for which an
|
128 |
-
implementation is available to the public in source code form. A
|
129 |
-
"Major Component", in this context, means a major essential component
|
130 |
-
(kernel, window system, and so on) of the specific operating system
|
131 |
-
(if any) on which the executable work runs, or a compiler used to
|
132 |
-
produce the work, or an object code interpreter used to run it.
|
133 |
-
|
134 |
-
The "Corresponding Source" for a work in object code form means all
|
135 |
-
the source code needed to generate, install, and (for an executable
|
136 |
-
work) run the object code and to modify the work, including scripts to
|
137 |
-
control those activities. However, it does not include the work's
|
138 |
-
System Libraries, or general-purpose tools or generally available free
|
139 |
-
programs which are used unmodified in performing those activities but
|
140 |
-
which are not part of the work. For example, Corresponding Source
|
141 |
-
includes interface definition files associated with source files for
|
142 |
-
the work, and the source code for shared libraries and dynamically
|
143 |
-
linked subprograms that the work is specifically designed to require,
|
144 |
-
such as by intimate data communication or control flow between those
|
145 |
-
subprograms and other parts of the work.
|
146 |
-
|
147 |
-
The Corresponding Source need not include anything that users
|
148 |
-
can regenerate automatically from other parts of the Corresponding
|
149 |
-
Source.
|
150 |
-
|
151 |
-
The Corresponding Source for a work in source code form is that
|
152 |
-
same work.
|
153 |
-
|
154 |
-
2. Basic Permissions.
|
155 |
-
|
156 |
-
All rights granted under this License are granted for the term of
|
157 |
-
copyright on the Program, and are irrevocable provided the stated
|
158 |
-
conditions are met. This License explicitly affirms your unlimited
|
159 |
-
permission to run the unmodified Program. The output from running a
|
160 |
-
covered work is covered by this License only if the output, given its
|
161 |
-
content, constitutes a covered work. This License acknowledges your
|
162 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
-
|
164 |
-
You may make, run and propagate covered works that you do not
|
165 |
-
convey, without conditions so long as your license otherwise remains
|
166 |
-
in force. You may convey covered works to others for the sole purpose
|
167 |
-
of having them make modifications exclusively for you, or provide you
|
168 |
-
with facilities for running those works, provided that you comply with
|
169 |
-
the terms of this License in conveying all material for which you do
|
170 |
-
not control copyright. Those thus making or running the covered works
|
171 |
-
for you must do so exclusively on your behalf, under your direction
|
172 |
-
and control, on terms that prohibit them from making any copies of
|
173 |
-
your copyrighted material outside their relationship with you.
|
174 |
-
|
175 |
-
Conveying under any other circumstances is permitted solely under
|
176 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
-
makes it unnecessary.
|
178 |
-
|
179 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
-
|
181 |
-
No covered work shall be deemed part of an effective technological
|
182 |
-
measure under any applicable law fulfilling obligations under article
|
183 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
-
similar laws prohibiting or restricting circumvention of such
|
185 |
-
measures.
|
186 |
-
|
187 |
-
When you convey a covered work, you waive any legal power to forbid
|
188 |
-
circumvention of technological measures to the extent such circumvention
|
189 |
-
is effected by exercising rights under this License with respect to
|
190 |
-
the covered work, and you disclaim any intention to limit operation or
|
191 |
-
modification of the work as a means of enforcing, against the work's
|
192 |
-
users, your or third parties' legal rights to forbid circumvention of
|
193 |
-
technological measures.
|
194 |
-
|
195 |
-
4. Conveying Verbatim Copies.
|
196 |
-
|
197 |
-
You may convey verbatim copies of the Program's source code as you
|
198 |
-
receive it, in any medium, provided that you conspicuously and
|
199 |
-
appropriately publish on each copy an appropriate copyright notice;
|
200 |
-
keep intact all notices stating that this License and any
|
201 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
-
keep intact all notices of the absence of any warranty; and give all
|
203 |
-
recipients a copy of this License along with the Program.
|
204 |
-
|
205 |
-
You may charge any price or no price for each copy that you convey,
|
206 |
-
and you may offer support or warranty protection for a fee.
|
207 |
-
|
208 |
-
5. Conveying Modified Source Versions.
|
209 |
-
|
210 |
-
You may convey a work based on the Program, or the modifications to
|
211 |
-
produce it from the Program, in the form of source code under the
|
212 |
-
terms of section 4, provided that you also meet all of these conditions:
|
213 |
-
|
214 |
-
a) The work must carry prominent notices stating that you modified
|
215 |
-
it, and giving a relevant date.
|
216 |
-
|
217 |
-
b) The work must carry prominent notices stating that it is
|
218 |
-
released under this License and any conditions added under section
|
219 |
-
7. This requirement modifies the requirement in section 4 to
|
220 |
-
"keep intact all notices".
|
221 |
-
|
222 |
-
c) You must license the entire work, as a whole, under this
|
223 |
-
License to anyone who comes into possession of a copy. This
|
224 |
-
License will therefore apply, along with any applicable section 7
|
225 |
-
additional terms, to the whole of the work, and all its parts,
|
226 |
-
regardless of how they are packaged. This License gives no
|
227 |
-
permission to license the work in any other way, but it does not
|
228 |
-
invalidate such permission if you have separately received it.
|
229 |
-
|
230 |
-
d) If the work has interactive user interfaces, each must display
|
231 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
-
interfaces that do not display Appropriate Legal Notices, your
|
233 |
-
work need not make them do so.
|
234 |
-
|
235 |
-
A compilation of a covered work with other separate and independent
|
236 |
-
works, which are not by their nature extensions of the covered work,
|
237 |
-
and which are not combined with it such as to form a larger program,
|
238 |
-
in or on a volume of a storage or distribution medium, is called an
|
239 |
-
"aggregate" if the compilation and its resulting copyright are not
|
240 |
-
used to limit the access or legal rights of the compilation's users
|
241 |
-
beyond what the individual works permit. Inclusion of a covered work
|
242 |
-
in an aggregate does not cause this License to apply to the other
|
243 |
-
parts of the aggregate.
|
244 |
-
|
245 |
-
6. Conveying Non-Source Forms.
|
246 |
-
|
247 |
-
You may convey a covered work in object code form under the terms
|
248 |
-
of sections 4 and 5, provided that you also convey the
|
249 |
-
machine-readable Corresponding Source under the terms of this License,
|
250 |
-
in one of these ways:
|
251 |
-
|
252 |
-
a) Convey the object code in, or embodied in, a physical product
|
253 |
-
(including a physical distribution medium), accompanied by the
|
254 |
-
Corresponding Source fixed on a durable physical medium
|
255 |
-
customarily used for software interchange.
|
256 |
-
|
257 |
-
b) Convey the object code in, or embodied in, a physical product
|
258 |
-
(including a physical distribution medium), accompanied by a
|
259 |
-
written offer, valid for at least three years and valid for as
|
260 |
-
long as you offer spare parts or customer support for that product
|
261 |
-
model, to give anyone who possesses the object code either (1) a
|
262 |
-
copy of the Corresponding Source for all the software in the
|
263 |
-
product that is covered by this License, on a durable physical
|
264 |
-
medium customarily used for software interchange, for a price no
|
265 |
-
more than your reasonable cost of physically performing this
|
266 |
-
conveying of source, or (2) access to copy the
|
267 |
-
Corresponding Source from a network server at no charge.
|
268 |
-
|
269 |
-
c) Convey individual copies of the object code with a copy of the
|
270 |
-
written offer to provide the Corresponding Source. This
|
271 |
-
alternative is allowed only occasionally and noncommercially, and
|
272 |
-
only if you received the object code with such an offer, in accord
|
273 |
-
with subsection 6b.
|
274 |
-
|
275 |
-
d) Convey the object code by offering access from a designated
|
276 |
-
place (gratis or for a charge), and offer equivalent access to the
|
277 |
-
Corresponding Source in the same way through the same place at no
|
278 |
-
further charge. You need not require recipients to copy the
|
279 |
-
Corresponding Source along with the object code. If the place to
|
280 |
-
copy the object code is a network server, the Corresponding Source
|
281 |
-
may be on a different server (operated by you or a third party)
|
282 |
-
that supports equivalent copying facilities, provided you maintain
|
283 |
-
clear directions next to the object code saying where to find the
|
284 |
-
Corresponding Source. Regardless of what server hosts the
|
285 |
-
Corresponding Source, you remain obligated to ensure that it is
|
286 |
-
available for as long as needed to satisfy these requirements.
|
287 |
-
|
288 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
-
you inform other peers where the object code and Corresponding
|
290 |
-
Source of the work are being offered to the general public at no
|
291 |
-
charge under subsection 6d.
|
292 |
-
|
293 |
-
A separable portion of the object code, whose source code is excluded
|
294 |
-
from the Corresponding Source as a System Library, need not be
|
295 |
-
included in conveying the object code work.
|
296 |
-
|
297 |
-
A "User Product" is either (1) a "consumer product", which means any
|
298 |
-
tangible personal property which is normally used for personal, family,
|
299 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
-
into a dwelling. In determining whether a product is a consumer product,
|
301 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
-
product received by a particular user, "normally used" refers to a
|
303 |
-
typical or common use of that class of product, regardless of the status
|
304 |
-
of the particular user or of the way in which the particular user
|
305 |
-
actually uses, or expects or is expected to use, the product. A product
|
306 |
-
is a consumer product regardless of whether the product has substantial
|
307 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
-
the only significant mode of use of the product.
|
309 |
-
|
310 |
-
"Installation Information" for a User Product means any methods,
|
311 |
-
procedures, authorization keys, or other information required to install
|
312 |
-
and execute modified versions of a covered work in that User Product from
|
313 |
-
a modified version of its Corresponding Source. The information must
|
314 |
-
suffice to ensure that the continued functioning of the modified object
|
315 |
-
code is in no case prevented or interfered with solely because
|
316 |
-
modification has been made.
|
317 |
-
|
318 |
-
If you convey an object code work under this section in, or with, or
|
319 |
-
specifically for use in, a User Product, and the conveying occurs as
|
320 |
-
part of a transaction in which the right of possession and use of the
|
321 |
-
User Product is transferred to the recipient in perpetuity or for a
|
322 |
-
fixed term (regardless of how the transaction is characterized), the
|
323 |
-
Corresponding Source conveyed under this section must be accompanied
|
324 |
-
by the Installation Information. But this requirement does not apply
|
325 |
-
if neither you nor any third party retains the ability to install
|
326 |
-
modified object code on the User Product (for example, the work has
|
327 |
-
been installed in ROM).
|
328 |
-
|
329 |
-
The requirement to provide Installation Information does not include a
|
330 |
-
requirement to continue to provide support service, warranty, or updates
|
331 |
-
for a work that has been modified or installed by the recipient, or for
|
332 |
-
the User Product in which it has been modified or installed. Access to a
|
333 |
-
network may be denied when the modification itself materially and
|
334 |
-
adversely affects the operation of the network or violates the rules and
|
335 |
-
protocols for communication across the network.
|
336 |
-
|
337 |
-
Corresponding Source conveyed, and Installation Information provided,
|
338 |
-
in accord with this section must be in a format that is publicly
|
339 |
-
documented (and with an implementation available to the public in
|
340 |
-
source code form), and must require no special password or key for
|
341 |
-
unpacking, reading or copying.
|
342 |
-
|
343 |
-
7. Additional Terms.
|
344 |
-
|
345 |
-
"Additional permissions" are terms that supplement the terms of this
|
346 |
-
License by making exceptions from one or more of its conditions.
|
347 |
-
Additional permissions that are applicable to the entire Program shall
|
348 |
-
be treated as though they were included in this License, to the extent
|
349 |
-
that they are valid under applicable law. If additional permissions
|
350 |
-
apply only to part of the Program, that part may be used separately
|
351 |
-
under those permissions, but the entire Program remains governed by
|
352 |
-
this License without regard to the additional permissions.
|
353 |
-
|
354 |
-
When you convey a copy of a covered work, you may at your option
|
355 |
-
remove any additional permissions from that copy, or from any part of
|
356 |
-
it. (Additional permissions may be written to require their own
|
357 |
-
removal in certain cases when you modify the work.) You may place
|
358 |
-
additional permissions on material, added by you to a covered work,
|
359 |
-
for which you have or can give appropriate copyright permission.
|
360 |
-
|
361 |
-
Notwithstanding any other provision of this License, for material you
|
362 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
-
that material) supplement the terms of this License with terms:
|
364 |
-
|
365 |
-
a) Disclaiming warranty or limiting liability differently from the
|
366 |
-
terms of sections 15 and 16 of this License; or
|
367 |
-
|
368 |
-
b) Requiring preservation of specified reasonable legal notices or
|
369 |
-
author attributions in that material or in the Appropriate Legal
|
370 |
-
Notices displayed by works containing it; or
|
371 |
-
|
372 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
-
requiring that modified versions of such material be marked in
|
374 |
-
reasonable ways as different from the original version; or
|
375 |
-
|
376 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
-
authors of the material; or
|
378 |
-
|
379 |
-
e) Declining to grant rights under trademark law for use of some
|
380 |
-
trade names, trademarks, or service marks; or
|
381 |
-
|
382 |
-
f) Requiring indemnification of licensors and authors of that
|
383 |
-
material by anyone who conveys the material (or modified versions of
|
384 |
-
it) with contractual assumptions of liability to the recipient, for
|
385 |
-
any liability that these contractual assumptions directly impose on
|
386 |
-
those licensors and authors.
|
387 |
-
|
388 |
-
All other non-permissive additional terms are considered "further
|
389 |
-
restrictions" within the meaning of section 10. If the Program as you
|
390 |
-
received it, or any part of it, contains a notice stating that it is
|
391 |
-
governed by this License along with a term that is a further
|
392 |
-
restriction, you may remove that term. If a license document contains
|
393 |
-
a further restriction but permits relicensing or conveying under this
|
394 |
-
License, you may add to a covered work material governed by the terms
|
395 |
-
of that license document, provided that the further restriction does
|
396 |
-
not survive such relicensing or conveying.
|
397 |
-
|
398 |
-
If you add terms to a covered work in accord with this section, you
|
399 |
-
must place, in the relevant source files, a statement of the
|
400 |
-
additional terms that apply to those files, or a notice indicating
|
401 |
-
where to find the applicable terms.
|
402 |
-
|
403 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
-
form of a separately written license, or stated as exceptions;
|
405 |
-
the above requirements apply either way.
|
406 |
-
|
407 |
-
8. Termination.
|
408 |
-
|
409 |
-
You may not propagate or modify a covered work except as expressly
|
410 |
-
provided under this License. Any attempt otherwise to propagate or
|
411 |
-
modify it is void, and will automatically terminate your rights under
|
412 |
-
this License (including any patent licenses granted under the third
|
413 |
-
paragraph of section 11).
|
414 |
-
|
415 |
-
However, if you cease all violation of this License, then your
|
416 |
-
license from a particular copyright holder is reinstated (a)
|
417 |
-
provisionally, unless and until the copyright holder explicitly and
|
418 |
-
finally terminates your license, and (b) permanently, if the copyright
|
419 |
-
holder fails to notify you of the violation by some reasonable means
|
420 |
-
prior to 60 days after the cessation.
|
421 |
-
|
422 |
-
Moreover, your license from a particular copyright holder is
|
423 |
-
reinstated permanently if the copyright holder notifies you of the
|
424 |
-
violation by some reasonable means, this is the first time you have
|
425 |
-
received notice of violation of this License (for any work) from that
|
426 |
-
copyright holder, and you cure the violation prior to 30 days after
|
427 |
-
your receipt of the notice.
|
428 |
-
|
429 |
-
Termination of your rights under this section does not terminate the
|
430 |
-
licenses of parties who have received copies or rights from you under
|
431 |
-
this License. If your rights have been terminated and not permanently
|
432 |
-
reinstated, you do not qualify to receive new licenses for the same
|
433 |
-
material under section 10.
|
434 |
-
|
435 |
-
9. Acceptance Not Required for Having Copies.
|
436 |
-
|
437 |
-
You are not required to accept this License in order to receive or
|
438 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
-
to receive a copy likewise does not require acceptance. However,
|
441 |
-
nothing other than this License grants you permission to propagate or
|
442 |
-
modify any covered work. These actions infringe copyright if you do
|
443 |
-
not accept this License. Therefore, by modifying or propagating a
|
444 |
-
covered work, you indicate your acceptance of this License to do so.
|
445 |
-
|
446 |
-
10. Automatic Licensing of Downstream Recipients.
|
447 |
-
|
448 |
-
Each time you convey a covered work, the recipient automatically
|
449 |
-
receives a license from the original licensors, to run, modify and
|
450 |
-
propagate that work, subject to this License. You are not responsible
|
451 |
-
for enforcing compliance by third parties with this License.
|
452 |
-
|
453 |
-
An "entity transaction" is a transaction transferring control of an
|
454 |
-
organization, or substantially all assets of one, or subdividing an
|
455 |
-
organization, or merging organizations. If propagation of a covered
|
456 |
-
work results from an entity transaction, each party to that
|
457 |
-
transaction who receives a copy of the work also receives whatever
|
458 |
-
licenses to the work the party's predecessor in interest had or could
|
459 |
-
give under the previous paragraph, plus a right to possession of the
|
460 |
-
Corresponding Source of the work from the predecessor in interest, if
|
461 |
-
the predecessor has it or can get it with reasonable efforts.
|
462 |
-
|
463 |
-
You may not impose any further restrictions on the exercise of the
|
464 |
-
rights granted or affirmed under this License. For example, you may
|
465 |
-
not impose a license fee, royalty, or other charge for exercise of
|
466 |
-
rights granted under this License, and you may not initiate litigation
|
467 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
-
any patent claim is infringed by making, using, selling, offering for
|
469 |
-
sale, or importing the Program or any portion of it.
|
470 |
-
|
471 |
-
11. Patents.
|
472 |
-
|
473 |
-
A "contributor" is a copyright holder who authorizes use under this
|
474 |
-
License of the Program or a work on which the Program is based. The
|
475 |
-
work thus licensed is called the contributor's "contributor version".
|
476 |
-
|
477 |
-
A contributor's "essential patent claims" are all patent claims
|
478 |
-
owned or controlled by the contributor, whether already acquired or
|
479 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
-
by this License, of making, using, or selling its contributor version,
|
481 |
-
but do not include claims that would be infringed only as a
|
482 |
-
consequence of further modification of the contributor version. For
|
483 |
-
purposes of this definition, "control" includes the right to grant
|
484 |
-
patent sublicenses in a manner consistent with the requirements of
|
485 |
-
this License.
|
486 |
-
|
487 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
-
patent license under the contributor's essential patent claims, to
|
489 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
-
propagate the contents of its contributor version.
|
491 |
-
|
492 |
-
In the following three paragraphs, a "patent license" is any express
|
493 |
-
agreement or commitment, however denominated, not to enforce a patent
|
494 |
-
(such as an express permission to practice a patent or covenant not to
|
495 |
-
sue for patent infringement). To "grant" such a patent license to a
|
496 |
-
party means to make such an agreement or commitment not to enforce a
|
497 |
-
patent against the party.
|
498 |
-
|
499 |
-
If you convey a covered work, knowingly relying on a patent license,
|
500 |
-
and the Corresponding Source of the work is not available for anyone
|
501 |
-
to copy, free of charge and under the terms of this License, through a
|
502 |
-
publicly available network server or other readily accessible means,
|
503 |
-
then you must either (1) cause the Corresponding Source to be so
|
504 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
-
patent license for this particular work, or (3) arrange, in a manner
|
506 |
-
consistent with the requirements of this License, to extend the patent
|
507 |
-
license to downstream recipients. "Knowingly relying" means you have
|
508 |
-
actual knowledge that, but for the patent license, your conveying the
|
509 |
-
covered work in a country, or your recipient's use of the covered work
|
510 |
-
in a country, would infringe one or more identifiable patents in that
|
511 |
-
country that you have reason to believe are valid.
|
512 |
-
|
513 |
-
If, pursuant to or in connection with a single transaction or
|
514 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
-
covered work, and grant a patent license to some of the parties
|
516 |
-
receiving the covered work authorizing them to use, propagate, modify
|
517 |
-
or convey a specific copy of the covered work, then the patent license
|
518 |
-
you grant is automatically extended to all recipients of the covered
|
519 |
-
work and works based on it.
|
520 |
-
|
521 |
-
A patent license is "discriminatory" if it does not include within
|
522 |
-
the scope of its coverage, prohibits the exercise of, or is
|
523 |
-
conditioned on the non-exercise of one or more of the rights that are
|
524 |
-
specifically granted under this License. You may not convey a covered
|
525 |
-
work if you are a party to an arrangement with a third party that is
|
526 |
-
in the business of distributing software, under which you make payment
|
527 |
-
to the third party based on the extent of your activity of conveying
|
528 |
-
the work, and under which the third party grants, to any of the
|
529 |
-
parties who would receive the covered work from you, a discriminatory
|
530 |
-
patent license (a) in connection with copies of the covered work
|
531 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
-
for and in connection with specific products or compilations that
|
533 |
-
contain the covered work, unless you entered into that arrangement,
|
534 |
-
or that patent license was granted, prior to 28 March 2007.
|
535 |
-
|
536 |
-
Nothing in this License shall be construed as excluding or limiting
|
537 |
-
any implied license or other defenses to infringement that may
|
538 |
-
otherwise be available to you under applicable patent law.
|
539 |
-
|
540 |
-
12. No Surrender of Others' Freedom.
|
541 |
-
|
542 |
-
If conditions are imposed on you (whether by court order, agreement or
|
543 |
-
otherwise) that contradict the conditions of this License, they do not
|
544 |
-
excuse you from the conditions of this License. If you cannot convey a
|
545 |
-
covered work so as to satisfy simultaneously your obligations under this
|
546 |
-
License and any other pertinent obligations, then as a consequence you may
|
547 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
-
to collect a royalty for further conveying from those to whom you convey
|
549 |
-
the Program, the only way you could satisfy both those terms and this
|
550 |
-
License would be to refrain entirely from conveying the Program.
|
551 |
-
|
552 |
-
13. Use with the GNU Affero General Public License.
|
553 |
-
|
554 |
-
Notwithstanding any other provision of this License, you have
|
555 |
-
permission to link or combine any covered work with a work licensed
|
556 |
-
under version 3 of the GNU Affero General Public License into a single
|
557 |
-
combined work, and to convey the resulting work. The terms of this
|
558 |
-
License will continue to apply to the part which is the covered work,
|
559 |
-
but the special requirements of the GNU Affero General Public License,
|
560 |
-
section 13, concerning interaction through a network will apply to the
|
561 |
-
combination as such.
|
562 |
-
|
563 |
-
14. Revised Versions of this License.
|
564 |
-
|
565 |
-
The Free Software Foundation may publish revised and/or new versions of
|
566 |
-
the GNU General Public License from time to time. Such new versions will
|
567 |
-
be similar in spirit to the present version, but may differ in detail to
|
568 |
-
address new problems or concerns.
|
569 |
-
|
570 |
-
Each version is given a distinguishing version number. If the
|
571 |
-
Program specifies that a certain numbered version of the GNU General
|
572 |
-
Public License "or any later version" applies to it, you have the
|
573 |
-
option of following the terms and conditions either of that numbered
|
574 |
-
version or of any later version published by the Free Software
|
575 |
-
Foundation. If the Program does not specify a version number of the
|
576 |
-
GNU General Public License, you may choose any version ever published
|
577 |
-
by the Free Software Foundation.
|
578 |
-
|
579 |
-
If the Program specifies that a proxy can decide which future
|
580 |
-
versions of the GNU General Public License can be used, that proxy's
|
581 |
-
public statement of acceptance of a version permanently authorizes you
|
582 |
-
to choose that version for the Program.
|
583 |
-
|
584 |
-
Later license versions may give you additional or different
|
585 |
-
permissions. However, no additional obligations are imposed on any
|
586 |
-
author or copyright holder as a result of your choosing to follow a
|
587 |
-
later version.
|
588 |
-
|
589 |
-
15. Disclaimer of Warranty.
|
590 |
-
|
591 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
-
|
600 |
-
16. Limitation of Liability.
|
601 |
-
|
602 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
-
SUCH DAMAGES.
|
611 |
-
|
612 |
-
17. Interpretation of Sections 15 and 16.
|
613 |
-
|
614 |
-
If the disclaimer of warranty and limitation of liability provided
|
615 |
-
above cannot be given local legal effect according to their terms,
|
616 |
-
reviewing courts shall apply local law that most closely approximates
|
617 |
-
an absolute waiver of all civil liability in connection with the
|
618 |
-
Program, unless a warranty or assumption of liability accompanies a
|
619 |
-
copy of the Program in return for a fee.
|
620 |
-
|
621 |
-
END OF TERMS AND CONDITIONS
|
622 |
-
|
623 |
-
How to Apply These Terms to Your New Programs
|
624 |
-
|
625 |
-
If you develop a new program, and you want it to be of the greatest
|
626 |
-
possible use to the public, the best way to achieve this is to make it
|
627 |
-
free software which everyone can redistribute and change under these terms.
|
628 |
-
|
629 |
-
To do so, attach the following notices to the program. It is safest
|
630 |
-
to attach them to the start of each source file to most effectively
|
631 |
-
state the exclusion of warranty; and each file should have at least
|
632 |
-
the "copyright" line and a pointer to where the full notice is found.
|
633 |
-
|
634 |
-
{one line to give the program's name and a brief idea of what it does.}
|
635 |
-
Copyright (C) {year} {name of author}
|
636 |
-
|
637 |
-
This program is free software: you can redistribute it and/or modify
|
638 |
-
it under the terms of the GNU General Public License as published by
|
639 |
-
the Free Software Foundation, either version 3 of the License, or
|
640 |
-
(at your option) any later version.
|
641 |
-
|
642 |
-
This program is distributed in the hope that it will be useful,
|
643 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
-
GNU General Public License for more details.
|
646 |
-
|
647 |
-
You should have received a copy of the GNU General Public License
|
648 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
-
|
650 |
-
Also add information on how to contact you by electronic and paper mail.
|
651 |
-
|
652 |
-
If the program does terminal interaction, make it output a short
|
653 |
-
notice like this when it starts in an interactive mode:
|
654 |
-
|
655 |
-
{project} Copyright (C) {year} {fullname}
|
656 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
-
This is free software, and you are welcome to redistribute it
|
658 |
-
under certain conditions; type `show c' for details.
|
659 |
-
|
660 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
-
parts of the General Public License. Of course, your program's commands
|
662 |
-
might be different; for a GUI interface, you would use an "about box".
|
663 |
-
|
664 |
-
You should also get your employer (if you work as a programmer) or school,
|
665 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
-
<http://www.gnu.org/licenses/>.
|
668 |
-
|
669 |
-
The GNU General Public License does not permit incorporating your program
|
670 |
-
into proprietary programs. If your program is a subroutine library, you
|
671 |
-
may consider it more useful to permit linking proprietary applications with
|
672 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
-
Public License instead of this License. But first, please read
|
674 |
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
635 |
+
Copyright (C) {year} {name of author}
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
{project} Copyright (C) {year} {fullname}
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
includes/freemius/README.md
CHANGED
@@ -1,253 +1,253 @@
|
|
1 |
-
Freemius WordPress SDK
|
2 |
-
======================
|
3 |
-
|
4 |
-
[Monetization](https://freemius.com/wordpress/), [analytics](https://freemius.com/wordpress/insights/), and marketing automation platform for plugin & theme developers. Freemius empower developers to create prosperous subscription based businesses.
|
5 |
-
|
6 |
-
You can see some of the WordPress.org plugins & themes that are utilizing the power of Freemius here:
|
7 |
-
|
8 |
-
https://includewp.com/freemius/#focus
|
9 |
-
|
10 |
-
If you are a WordPress plugin or theme developer and you are interested to monetize with Freemius you can [sign-up here for free](https://dashboard.freemius.com/register/):
|
11 |
-
|
12 |
-
https://dashboard.freemius.com/register/
|
13 |
-
|
14 |
-
**Below you'll find the integration instructions for our WordPress SDK.**
|
15 |
-
|
16 |
-
## Code Documentation
|
17 |
-
|
18 |
-
You can find the SDK's documentation here:
|
19 |
-
https://freemius.com/help/documentation/wordpress-sdk/
|
20 |
-
|
21 |
-
## Initializing the SDK
|
22 |
-
|
23 |
-
Copy the code below and paste it into the top of your main plugin's PHP file, right after the plugin's header comment:
|
24 |
-
|
25 |
-
```php
|
26 |
-
<?php
|
27 |
-
// Create a helper function for easy SDK access.
|
28 |
-
function my_prefix_fs() {
|
29 |
-
global $my_prefix_fs;
|
30 |
-
if ( ! isset( $my_prefix_fs ) ) {
|
31 |
-
// Include Freemius SDK.
|
32 |
-
require_once dirname(__FILE__) . '/freemius/start.php';
|
33 |
-
|
34 |
-
$my_prefix_fs = fs_dynamic_init( array(
|
35 |
-
'id' => '1234',
|
36 |
-
'slug' => 'my-plugin-slug',
|
37 |
-
'menu_slug' => 'my_menu_slug', // You can also use __FILE__
|
38 |
-
'public_key' => 'pk_MY_PUBLIC_KEY',
|
39 |
-
'is_live' => true,
|
40 |
-
'is_premium' => true,
|
41 |
-
'has_addons' => false,
|
42 |
-
'has_paid_plans' => false,
|
43 |
-
// Set the SDK to work in a sandbox mode (for development & testing).
|
44 |
-
// IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
|
45 |
-
'secret_key' => 'sk_MY_SECRET_KEY',
|
46 |
-
) );
|
47 |
-
}
|
48 |
-
|
49 |
-
return $my_prefix_fs;
|
50 |
-
}
|
51 |
-
|
52 |
-
// Init Freemius.
|
53 |
-
my_prefix_fs();
|
54 |
-
?>
|
55 |
-
```
|
56 |
-
|
57 |
-
- **1234** - Replace with your plugin's ID.
|
58 |
-
- **pk_MY_PUBLIC_KEY** - Replace with your plugin's public key.
|
59 |
-
- **sk_MY_SECRET_KEY** - Replace with your plugin's secret key.
|
60 |
-
- **my-plugin-slug** - Replace with your plugin's WordPress.org slug.
|
61 |
-
- **my_menu_slug** - Replace with your admin dashboard settings menu slug.
|
62 |
-
|
63 |
-
|
64 |
-
## Usage example
|
65 |
-
|
66 |
-
You can call the SDK by using the shortcode function:
|
67 |
-
|
68 |
-
```php
|
69 |
-
<?php my_prefix_fs()->get_upgrade_url(); ?>
|
70 |
-
```
|
71 |
-
|
72 |
-
Or when calling Freemius multiple times in a scope, it's recommended to use it with the global variable:
|
73 |
-
|
74 |
-
```php
|
75 |
-
<?php
|
76 |
-
global $my_prefix_fs;
|
77 |
-
$my_prefix_fs->get_account_url();
|
78 |
-
?>
|
79 |
-
```
|
80 |
-
|
81 |
-
## Adding license based logic examples
|
82 |
-
|
83 |
-
Add marketing content to encourage your users to upgrade for your paid version:
|
84 |
-
|
85 |
-
```php
|
86 |
-
<?php
|
87 |
-
if ( my_prefix_fs()->is_not_paying() ) {
|
88 |
-
echo '<section><h1>' . esc_html__('Awesome Premium Features', 'my-plugin-slug') . '</h1>';
|
89 |
-
echo '<a href="' . my_prefix_fs()->get_upgrade_url() . '">' .
|
90 |
-
esc_html__('Upgrade Now!', 'my-plugin-slug') .
|
91 |
-
'</a>';
|
92 |
-
echo '</section>';
|
93 |
-
}
|
94 |
-
?>
|
95 |
-
```
|
96 |
-
|
97 |
-
Add logic which will only be available in your premium plugin version:
|
98 |
-
|
99 |
-
```php
|
100 |
-
<?php
|
101 |
-
// This "if" block will be auto removed from the Free version.
|
102 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
103 |
-
|
104 |
-
// ... premium only logic ...
|
105 |
-
|
106 |
-
}
|
107 |
-
?>
|
108 |
-
```
|
109 |
-
|
110 |
-
To add a function which will only be available in your premium plugin version, simply add __premium_only as the suffix of the function name. Just make sure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:
|
111 |
-
|
112 |
-
```php
|
113 |
-
<?php
|
114 |
-
class My_Plugin {
|
115 |
-
function init() {
|
116 |
-
...
|
117 |
-
|
118 |
-
// This "if" block will be auto removed from the free version.
|
119 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
120 |
-
// Init premium version.
|
121 |
-
$this->admin_init__premium_only();
|
122 |
-
|
123 |
-
add_action( 'admin_init', array( &$this, 'admin_init_hook__premium_only' );
|
124 |
-
}
|
125 |
-
|
126 |
-
...
|
127 |
-
}
|
128 |
-
|
129 |
-
// This method will be only included in the premium version.
|
130 |
-
function admin_init__premium_only() {
|
131 |
-
...
|
132 |
-
}
|
133 |
-
|
134 |
-
// This method will be only included in the premium version.
|
135 |
-
function admin_init_hook__premium_only() {
|
136 |
-
...
|
137 |
-
}
|
138 |
-
}
|
139 |
-
?>
|
140 |
-
```
|
141 |
-
|
142 |
-
Add logic which will only be executed for customers in your 'professional' plan:
|
143 |
-
|
144 |
-
```php
|
145 |
-
<?php
|
146 |
-
if ( my_prefix_fs()->is_plan('professional', true) ) {
|
147 |
-
// .. logic related to Professional plan only ...
|
148 |
-
}
|
149 |
-
?>
|
150 |
-
```
|
151 |
-
|
152 |
-
Add logic which will only be executed for customers in your 'professional' plan or higher plans:
|
153 |
-
|
154 |
-
```php
|
155 |
-
<?php
|
156 |
-
if ( my_prefix_fs()->is_plan('professional') ) {
|
157 |
-
// ... logic related to Professional plan and higher plans ...
|
158 |
-
}
|
159 |
-
?>
|
160 |
-
```
|
161 |
-
|
162 |
-
Add logic which will only be available in your premium plugin version AND will only be executed for customers in your 'professional' plan (and higher plans):
|
163 |
-
|
164 |
-
```php
|
165 |
-
<?php
|
166 |
-
// This "if" block will be auto removed from the Free version.
|
167 |
-
if ( my_prefix_fs()->is_plan__premium_only('professional') ) {
|
168 |
-
// ... logic related to Professional plan and higher plans ...
|
169 |
-
}
|
170 |
-
?>
|
171 |
-
```
|
172 |
-
|
173 |
-
Add logic only for users in trial:
|
174 |
-
|
175 |
-
```php
|
176 |
-
<?php
|
177 |
-
if ( my_prefix_fs()->is_trial() ) {
|
178 |
-
// ... logic for users in trial ...
|
179 |
-
}
|
180 |
-
?>
|
181 |
-
```
|
182 |
-
|
183 |
-
Add logic for specified paid plan:
|
184 |
-
|
185 |
-
```php
|
186 |
-
<?php
|
187 |
-
// This "if" block will be auto removed from the Free version.
|
188 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
189 |
-
if ( my_prefix_fs()->is_plan( 'professional', true ) ) {
|
190 |
-
|
191 |
-
// ... logic related to Professional plan only ...
|
192 |
-
|
193 |
-
} else if ( my_prefix_fs()->is_plan( 'business' ) ) {
|
194 |
-
|
195 |
-
// ... logic related to Business plan and higher plans ...
|
196 |
-
|
197 |
-
}
|
198 |
-
}
|
199 |
-
?>
|
200 |
-
```
|
201 |
-
|
202 |
-
## Excluding files and folders from the free plugin version
|
203 |
-
There are two ways to exclude files from your free version.
|
204 |
-
|
205 |
-
1. Add `__premium_only` just before the file extension. For example, functions__premium_only.php will be only included in the premium plugin version. This works for all type of files, not only PHP.
|
206 |
-
2. Add `@fs_premium_only` a sepcial meta tag to the plugin's main PHP file header. Example:
|
207 |
-
```php
|
208 |
-
<?php
|
209 |
-
/**
|
210 |
-
* Plugin Name: My Very Awesome Plugin
|
211 |
-
* Plugin URI: http://my-awesome-plugin.com
|
212 |
-
* Description: Create and manage Awesomeness right in WordPress.
|
213 |
-
* Version: 1.0.0
|
214 |
-
* Author: Awesomattic
|
215 |
-
* Author URI: http://my-awesome-plugin.com/me/
|
216 |
-
* License: GPLv2
|
217 |
-
* Text Domain: myplugin
|
218 |
-
* Domain Path: /langs
|
219 |
-
*
|
220 |
-
* @fs_premium_only /lib/functions.php, /premium-files/
|
221 |
-
*/
|
222 |
-
|
223 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
224 |
-
exit;
|
225 |
-
}
|
226 |
-
|
227 |
-
// ... my code ...
|
228 |
-
?>
|
229 |
-
```
|
230 |
-
The file `/lib/functions.php` and the directory `/premium-files/` will be removed from the free plugin version.
|
231 |
-
|
232 |
-
# WordPress.org Compliance
|
233 |
-
Based on [WordPress.org Guidelines](https://wordpress.org/plugins/about/guidelines/) you are not allowed to submit a plugin that has premium code in it:
|
234 |
-
> All code hosted by WordPress.org servers must be free and fully-functional. If you want to sell advanced features for a plugin (such as a "pro" version), then you must sell and serve that code from your own site, we will not host it on our servers.
|
235 |
-
|
236 |
-
Therefore, if you want to deploy your free plugin's version to WordPress.org, make sure you wrap all your premium code with `if ( my_prefix_fs()->{{ method }}__premium_only() )` or the other methods provided to exclude premium features & files from the free version.
|
237 |
-
|
238 |
-
## Deployment
|
239 |
-
Zip your plugin's root folder and upload it in the Deployment section in the *Freemius Developer's Dashboard*.
|
240 |
-
The plugin will be scanned and processed by a custom developed *PHP Processor* which will auto-generate two versions of your plugin:
|
241 |
-
|
242 |
-
1. **Premium version**: Identical to your uploaded version, including all code (except your `secret_key`). Will be enabled for download ONLY for your paying or in trial customers.
|
243 |
-
2. **Free version**: The code stripped from all your paid features (based on the logic added wrapped in `{ method }__premium_only()`).
|
244 |
-
|
245 |
-
The free version is the one that you should give your users to download. Therefore, download the free generated version and upload to your site. Or, if your plugin was WordPress.org complaint and you made sure to exclude all your premium code with the different provided techniques, you can deploy the downloaded free version to the .org repo.
|
246 |
-
|
247 |
-
## Reporting Bugs
|
248 |
-
Email dev [at] freemius [dot] com
|
249 |
-
|
250 |
-
## FAQ
|
251 |
-
|
252 |
-
## Copyright
|
253 |
-
Freemius, Inc.
|
1 |
+
Freemius WordPress SDK
|
2 |
+
======================
|
3 |
+
|
4 |
+
[Monetization](https://freemius.com/wordpress/), [analytics](https://freemius.com/wordpress/insights/), and marketing automation platform for plugin & theme developers. Freemius empower developers to create prosperous subscription based businesses.
|
5 |
+
|
6 |
+
You can see some of the WordPress.org plugins & themes that are utilizing the power of Freemius here:
|
7 |
+
|
8 |
+
https://includewp.com/freemius/#focus
|
9 |
+
|
10 |
+
If you are a WordPress plugin or theme developer and you are interested to monetize with Freemius you can [sign-up here for free](https://dashboard.freemius.com/register/):
|
11 |
+
|
12 |
+
https://dashboard.freemius.com/register/
|
13 |
+
|
14 |
+
**Below you'll find the integration instructions for our WordPress SDK.**
|
15 |
+
|
16 |
+
## Code Documentation
|
17 |
+
|
18 |
+
You can find the SDK's documentation here:
|
19 |
+
https://freemius.com/help/documentation/wordpress-sdk/
|
20 |
+
|
21 |
+
## Initializing the SDK
|
22 |
+
|
23 |
+
Copy the code below and paste it into the top of your main plugin's PHP file, right after the plugin's header comment:
|
24 |
+
|
25 |
+
```php
|
26 |
+
<?php
|
27 |
+
// Create a helper function for easy SDK access.
|
28 |
+
function my_prefix_fs() {
|
29 |
+
global $my_prefix_fs;
|
30 |
+
if ( ! isset( $my_prefix_fs ) ) {
|
31 |
+
// Include Freemius SDK.
|
32 |
+
require_once dirname(__FILE__) . '/freemius/start.php';
|
33 |
+
|
34 |
+
$my_prefix_fs = fs_dynamic_init( array(
|
35 |
+
'id' => '1234',
|
36 |
+
'slug' => 'my-plugin-slug',
|
37 |
+
'menu_slug' => 'my_menu_slug', // You can also use __FILE__
|
38 |
+
'public_key' => 'pk_MY_PUBLIC_KEY',
|
39 |
+
'is_live' => true,
|
40 |
+
'is_premium' => true,
|
41 |
+
'has_addons' => false,
|
42 |
+
'has_paid_plans' => false,
|
43 |
+
// Set the SDK to work in a sandbox mode (for development & testing).
|
44 |
+
// IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
|
45 |
+
'secret_key' => 'sk_MY_SECRET_KEY',
|
46 |
+
) );
|
47 |
+
}
|
48 |
+
|
49 |
+
return $my_prefix_fs;
|
50 |
+
}
|
51 |
+
|
52 |
+
// Init Freemius.
|
53 |
+
my_prefix_fs();
|
54 |
+
?>
|
55 |
+
```
|
56 |
+
|
57 |
+
- **1234** - Replace with your plugin's ID.
|
58 |
+
- **pk_MY_PUBLIC_KEY** - Replace with your plugin's public key.
|
59 |
+
- **sk_MY_SECRET_KEY** - Replace with your plugin's secret key.
|
60 |
+
- **my-plugin-slug** - Replace with your plugin's WordPress.org slug.
|
61 |
+
- **my_menu_slug** - Replace with your admin dashboard settings menu slug.
|
62 |
+
|
63 |
+
|
64 |
+
## Usage example
|
65 |
+
|
66 |
+
You can call the SDK by using the shortcode function:
|
67 |
+
|
68 |
+
```php
|
69 |
+
<?php my_prefix_fs()->get_upgrade_url(); ?>
|
70 |
+
```
|
71 |
+
|
72 |
+
Or when calling Freemius multiple times in a scope, it's recommended to use it with the global variable:
|
73 |
+
|
74 |
+
```php
|
75 |
+
<?php
|
76 |
+
global $my_prefix_fs;
|
77 |
+
$my_prefix_fs->get_account_url();
|
78 |
+
?>
|
79 |
+
```
|
80 |
+
|
81 |
+
## Adding license based logic examples
|
82 |
+
|
83 |
+
Add marketing content to encourage your users to upgrade for your paid version:
|
84 |
+
|
85 |
+
```php
|
86 |
+
<?php
|
87 |
+
if ( my_prefix_fs()->is_not_paying() ) {
|
88 |
+
echo '<section><h1>' . esc_html__('Awesome Premium Features', 'my-plugin-slug') . '</h1>';
|
89 |
+
echo '<a href="' . my_prefix_fs()->get_upgrade_url() . '">' .
|
90 |
+
esc_html__('Upgrade Now!', 'my-plugin-slug') .
|
91 |
+
'</a>';
|
92 |
+
echo '</section>';
|
93 |
+
}
|
94 |
+
?>
|
95 |
+
```
|
96 |
+
|
97 |
+
Add logic which will only be available in your premium plugin version:
|
98 |
+
|
99 |
+
```php
|
100 |
+
<?php
|
101 |
+
// This "if" block will be auto removed from the Free version.
|
102 |
+
if ( my_prefix_fs()->is__premium_only() ) {
|
103 |
+
|
104 |
+
// ... premium only logic ...
|
105 |
+
|
106 |
+
}
|
107 |
+
?>
|
108 |
+
```
|
109 |
+
|
110 |
+
To add a function which will only be available in your premium plugin version, simply add __premium_only as the suffix of the function name. Just make sure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:
|
111 |
+
|
112 |
+
```php
|
113 |
+
<?php
|
114 |
+
class My_Plugin {
|
115 |
+
function init() {
|
116 |
+
...
|
117 |
+
|
118 |
+
// This "if" block will be auto removed from the free version.
|
119 |
+
if ( my_prefix_fs()->is__premium_only() ) {
|
120 |
+
// Init premium version.
|
121 |
+
$this->admin_init__premium_only();
|
122 |
+
|
123 |
+
add_action( 'admin_init', array( &$this, 'admin_init_hook__premium_only' );
|
124 |
+
}
|
125 |
+
|
126 |
+
...
|
127 |
+
}
|
128 |
+
|
129 |
+
// This method will be only included in the premium version.
|
130 |
+
function admin_init__premium_only() {
|
131 |
+
...
|
132 |
+
}
|
133 |
+
|
134 |
+
// This method will be only included in the premium version.
|
135 |
+
function admin_init_hook__premium_only() {
|
136 |
+
...
|
137 |
+
}
|
138 |
+
}
|
139 |
+
?>
|
140 |
+
```
|
141 |
+
|
142 |
+
Add logic which will only be executed for customers in your 'professional' plan:
|
143 |
+
|
144 |
+
```php
|
145 |
+
<?php
|
146 |
+
if ( my_prefix_fs()->is_plan('professional', true) ) {
|
147 |
+
// .. logic related to Professional plan only ...
|
148 |
+
}
|
149 |
+
?>
|
150 |
+
```
|
151 |
+
|
152 |
+
Add logic which will only be executed for customers in your 'professional' plan or higher plans:
|
153 |
+
|
154 |
+
```php
|
155 |
+
<?php
|
156 |
+
if ( my_prefix_fs()->is_plan('professional') ) {
|
157 |
+
// ... logic related to Professional plan and higher plans ...
|
158 |
+
}
|
159 |
+
?>
|
160 |
+
```
|
161 |
+
|
162 |
+
Add logic which will only be available in your premium plugin version AND will only be executed for customers in your 'professional' plan (and higher plans):
|
163 |
+
|
164 |
+
```php
|
165 |
+
<?php
|
166 |
+
// This "if" block will be auto removed from the Free version.
|
167 |
+
if ( my_prefix_fs()->is_plan__premium_only('professional') ) {
|
168 |
+
// ... logic related to Professional plan and higher plans ...
|
169 |
+
}
|
170 |
+
?>
|
171 |
+
```
|
172 |
+
|
173 |
+
Add logic only for users in trial:
|
174 |
+
|
175 |
+
```php
|
176 |
+
<?php
|
177 |
+
if ( my_prefix_fs()->is_trial() ) {
|
178 |
+
// ... logic for users in trial ...
|
179 |
+
}
|
180 |
+
?>
|
181 |
+
```
|
182 |
+
|
183 |
+
Add logic for specified paid plan:
|
184 |
+
|
185 |
+
```php
|
186 |
+
<?php
|
187 |
+
// This "if" block will be auto removed from the Free version.
|
188 |
+
if ( my_prefix_fs()->is__premium_only() ) {
|
189 |
+
if ( my_prefix_fs()->is_plan( 'professional', true ) ) {
|
190 |
+
|
191 |
+
// ... logic related to Professional plan only ...
|
192 |
+
|
193 |
+
} else if ( my_prefix_fs()->is_plan( 'business' ) ) {
|
194 |
+
|
195 |
+
// ... logic related to Business plan and higher plans ...
|
196 |
+
|
197 |
+
}
|
198 |
+
}
|
199 |
+
?>
|
200 |
+
```
|
201 |
+
|
202 |
+
## Excluding files and folders from the free plugin version
|
203 |
+
There are two ways to exclude files from your free version.
|
204 |
+
|
205 |
+
1. Add `__premium_only` just before the file extension. For example, functions__premium_only.php will be only included in the premium plugin version. This works for all type of files, not only PHP.
|
206 |
+
2. Add `@fs_premium_only` a sepcial meta tag to the plugin's main PHP file header. Example:
|
207 |
+
```php
|
208 |
+
<?php
|
209 |
+
/**
|
210 |
+
* Plugin Name: My Very Awesome Plugin
|
211 |
+
* Plugin URI: http://my-awesome-plugin.com
|
212 |
+
* Description: Create and manage Awesomeness right in WordPress.
|
213 |
+
* Version: 1.0.0
|
214 |
+
* Author: Awesomattic
|
215 |
+
* Author URI: http://my-awesome-plugin.com/me/
|
216 |
+
* License: GPLv2
|
217 |
+
* Text Domain: myplugin
|
218 |
+
* Domain Path: /langs
|
219 |
+
*
|
220 |
+
* @fs_premium_only /lib/functions.php, /premium-files/
|
221 |
+
*/
|
222 |
+
|
223 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
224 |
+
exit;
|
225 |
+
}
|
226 |
+
|
227 |
+
// ... my code ...
|
228 |
+
?>
|
229 |
+
```
|
230 |
+
The file `/lib/functions.php` and the directory `/premium-files/` will be removed from the free plugin version.
|
231 |
+
|
232 |
+
# WordPress.org Compliance
|
233 |
+
Based on [WordPress.org Guidelines](https://wordpress.org/plugins/about/guidelines/) you are not allowed to submit a plugin that has premium code in it:
|
234 |
+
> All code hosted by WordPress.org servers must be free and fully-functional. If you want to sell advanced features for a plugin (such as a "pro" version), then you must sell and serve that code from your own site, we will not host it on our servers.
|
235 |
+
|
236 |
+
Therefore, if you want to deploy your free plugin's version to WordPress.org, make sure you wrap all your premium code with `if ( my_prefix_fs()->{{ method }}__premium_only() )` or the other methods provided to exclude premium features & files from the free version.
|
237 |
+
|
238 |
+
## Deployment
|
239 |
+
Zip your plugin's root folder and upload it in the Deployment section in the *Freemius Developer's Dashboard*.
|
240 |
+
The plugin will be scanned and processed by a custom developed *PHP Processor* which will auto-generate two versions of your plugin:
|
241 |
+
|
242 |
+
1. **Premium version**: Identical to your uploaded version, including all code (except your `secret_key`). Will be enabled for download ONLY for your paying or in trial customers.
|
243 |
+
2. **Free version**: The code stripped from all your paid features (based on the logic added wrapped in `{ method }__premium_only()`).
|
244 |
+
|
245 |
+
The free version is the one that you should give your users to download. Therefore, download the free generated version and upload to your site. Or, if your plugin was WordPress.org complaint and you made sure to exclude all your premium code with the different provided techniques, you can deploy the downloaded free version to the .org repo.
|
246 |
+
|
247 |
+
## Reporting Bugs
|
248 |
+
Email dev [at] freemius [dot] com
|
249 |
+
|
250 |
+
## FAQ
|
251 |
+
|
252 |
+
## Copyright
|
253 |
+
Freemius, Inc.
|
includes/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:
|
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%}
|
includes/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 .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}}
|
includes/freemius/assets/css/admin/affiliation.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
|
1 |
+
@charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
|
includes/freemius/assets/css/admin/checkout.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
|
1 |
+
@media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
|
includes/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}
|
includes/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
|
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}
|
includes/freemius/assets/css/admin/debug.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.
|
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}
|
includes/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}
|
includes/freemius/assets/css/admin/gdpr-optin-notice.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
|
1 |
+
.fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
|
includes/freemius/assets/css/admin/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/assets/css/admin/plugins.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}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
|
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}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
|
includes/freemius/assets/css/customizer.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{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:#000;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_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
|
1 |
+
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{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:#000;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_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
|
includes/freemius/assets/css/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/assets/img/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/assets/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/assets/js/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/assets/js/nojquery.ba-postmessage.js
CHANGED
@@ -1,140 +1,140 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery postMessage - v0.5 - 9/11/2009
|
3 |
-
* http://benalman.com/projects/jquery-postmessage-plugin/
|
4 |
-
*
|
5 |
-
* Copyright (c) 2009 "Cowboy" Ben Alman
|
6 |
-
* Dual licensed under the MIT and GPL licenses.
|
7 |
-
* http://benalman.com/about/license/
|
8 |
-
*
|
9 |
-
* Non-jQuery fork by Jeff Lee
|
10 |
-
*
|
11 |
-
* This fork consists of the following changes:
|
12 |
-
* 1. Basic code cleanup and restructuring, for legibility.
|
13 |
-
* 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
|
14 |
-
* in terms of both function names and object scope. Scope is specified by
|
15 |
-
* the the "this" context of NoJQueryPostMessageMixin();
|
16 |
-
* 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
|
17 |
-
* at least three different GitHub users requesting the removal of this
|
18 |
-
* "Opera sniff" on the original project's Issues page, so I figured this
|
19 |
-
* would be a relatively safe change.
|
20 |
-
* 4. `postMessage` no longer uses `$.param` to serialize messages that are not
|
21 |
-
* strings. I actually prefer this structure anyway. `receiveMessage` does
|
22 |
-
* not implement a corresponding deserialization step, and as such it seems
|
23 |
-
* cleaner and more symmetric to leave both data serialization and
|
24 |
-
* deserialization to the client.
|
25 |
-
* 5. The use of `$.isFunction` is replaced by a functionally-identical check.
|
26 |
-
* 6. The `$:nomunge` YUI option is no longer necessary.
|
27 |
-
*/
|
28 |
-
|
29 |
-
function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
|
30 |
-
|
31 |
-
var setMessageCallback, unsetMessageCallback, currentMsgCallback,
|
32 |
-
intervalId, lastHash, cacheBust = 1;
|
33 |
-
|
34 |
-
if (window.postMessage) {
|
35 |
-
|
36 |
-
if (window.addEventListener) {
|
37 |
-
setMessageCallback = function(callback) {
|
38 |
-
window.addEventListener('message', callback, false);
|
39 |
-
}
|
40 |
-
|
41 |
-
unsetMessageCallback = function(callback) {
|
42 |
-
window.removeEventListener('message', callback, false);
|
43 |
-
}
|
44 |
-
} else {
|
45 |
-
setMessageCallback = function(callback) {
|
46 |
-
window.attachEvent('onmessage', callback);
|
47 |
-
}
|
48 |
-
|
49 |
-
unsetMessageCallback = function(callback) {
|
50 |
-
window.detachEvent('onmessage', callback);
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
this[postBinding] = function(message, targetUrl, target) {
|
55 |
-
if (!targetUrl) {
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
|
59 |
-
// The browser supports window.postMessage, so call it with a targetOrigin
|
60 |
-
// set appropriately, based on the targetUrl parameter.
|
61 |
-
target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
|
62 |
-
}
|
63 |
-
|
64 |
-
// Since the browser supports window.postMessage, the callback will be
|
65 |
-
// bound to the actual event associated with window.postMessage.
|
66 |
-
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
67 |
-
// Unbind an existing callback if it exists.
|
68 |
-
if (currentMsgCallback) {
|
69 |
-
unsetMessageCallback(currentMsgCallback);
|
70 |
-
currentMsgCallback = null;
|
71 |
-
}
|
72 |
-
|
73 |
-
if (!callback) {
|
74 |
-
return false;
|
75 |
-
}
|
76 |
-
|
77 |
-
// Bind the callback. A reference to the callback is stored for ease of
|
78 |
-
// unbinding.
|
79 |
-
currentMsgCallback = setMessageCallback(function(e) {
|
80 |
-
switch(Object.prototype.toString.call(sourceOrigin)) {
|
81 |
-
case '[object String]':
|
82 |
-
if (sourceOrigin !== e.origin) {
|
83 |
-
return false;
|
84 |
-
}
|
85 |
-
break;
|
86 |
-
case '[object Function]':
|
87 |
-
if (sourceOrigin(e.origin)) {
|
88 |
-
return false;
|
89 |
-
}
|
90 |
-
break;
|
91 |
-
}
|
92 |
-
|
93 |
-
callback(e);
|
94 |
-
});
|
95 |
-
};
|
96 |
-
|
97 |
-
} else {
|
98 |
-
|
99 |
-
this[postBinding] = function(message, targetUrl, target) {
|
100 |
-
if (!targetUrl) {
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
|
104 |
-
// The browser does not support window.postMessage, so set the location
|
105 |
-
// of the target to targetUrl#message. A bit ugly, but it works! A cache
|
106 |
-
// bust parameter is added to ensure that repeat messages trigger the
|
107 |
-
// callback.
|
108 |
-
target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Since the browser sucks, a polling loop will be started, and the
|
112 |
-
// callback will be called whenever the location.hash changes.
|
113 |
-
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
114 |
-
if (intervalId) {
|
115 |
-
clearInterval(intervalId);
|
116 |
-
intervalId = null;
|
117 |
-
}
|
118 |
-
|
119 |
-
if (callback) {
|
120 |
-
delay = typeof sourceOrigin === 'number'
|
121 |
-
? sourceOrigin
|
122 |
-
: typeof delay === 'number'
|
123 |
-
? delay
|
124 |
-
: 100;
|
125 |
-
|
126 |
-
intervalId = setInterval(function(){
|
127 |
-
var hash = document.location.hash,
|
128 |
-
re = /^#?\d+&/;
|
129 |
-
if ( hash !== lastHash && re.test( hash ) ) {
|
130 |
-
lastHash = hash;
|
131 |
-
callback({ data: hash.replace( re, '' ) });
|
132 |
-
}
|
133 |
-
}, delay );
|
134 |
-
}
|
135 |
-
};
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
return this;
|
140 |
}
|
1 |
+
/*!
|
2 |
+
* jQuery postMessage - v0.5 - 9/11/2009
|
3 |
+
* http://benalman.com/projects/jquery-postmessage-plugin/
|
4 |
+
*
|
5 |
+
* Copyright (c) 2009 "Cowboy" Ben Alman
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* http://benalman.com/about/license/
|
8 |
+
*
|
9 |
+
* Non-jQuery fork by Jeff Lee
|
10 |
+
*
|
11 |
+
* This fork consists of the following changes:
|
12 |
+
* 1. Basic code cleanup and restructuring, for legibility.
|
13 |
+
* 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
|
14 |
+
* in terms of both function names and object scope. Scope is specified by
|
15 |
+
* the the "this" context of NoJQueryPostMessageMixin();
|
16 |
+
* 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
|
17 |
+
* at least three different GitHub users requesting the removal of this
|
18 |
+
* "Opera sniff" on the original project's Issues page, so I figured this
|
19 |
+
* would be a relatively safe change.
|
20 |
+
* 4. `postMessage` no longer uses `$.param` to serialize messages that are not
|
21 |
+
* strings. I actually prefer this structure anyway. `receiveMessage` does
|
22 |
+
* not implement a corresponding deserialization step, and as such it seems
|
23 |
+
* cleaner and more symmetric to leave both data serialization and
|
24 |
+
* deserialization to the client.
|
25 |
+
* 5. The use of `$.isFunction` is replaced by a functionally-identical check.
|
26 |
+
* 6. The `$:nomunge` YUI option is no longer necessary.
|
27 |
+
*/
|
28 |
+
|
29 |
+
function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
|
30 |
+
|
31 |
+
var setMessageCallback, unsetMessageCallback, currentMsgCallback,
|
32 |
+
intervalId, lastHash, cacheBust = 1;
|
33 |
+
|
34 |
+
if (window.postMessage) {
|
35 |
+
|
36 |
+
if (window.addEventListener) {
|
37 |
+
setMessageCallback = function(callback) {
|
38 |
+
window.addEventListener('message', callback, false);
|
39 |
+
}
|
40 |
+
|
41 |
+
unsetMessageCallback = function(callback) {
|
42 |
+
window.removeEventListener('message', callback, false);
|
43 |
+
}
|
44 |
+
} else {
|
45 |
+
setMessageCallback = function(callback) {
|
46 |
+
window.attachEvent('onmessage', callback);
|
47 |
+
}
|
48 |
+
|
49 |
+
unsetMessageCallback = function(callback) {
|
50 |
+
window.detachEvent('onmessage', callback);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
this[postBinding] = function(message, targetUrl, target) {
|
55 |
+
if (!targetUrl) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
// The browser supports window.postMessage, so call it with a targetOrigin
|
60 |
+
// set appropriately, based on the targetUrl parameter.
|
61 |
+
target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
// Since the browser supports window.postMessage, the callback will be
|
65 |
+
// bound to the actual event associated with window.postMessage.
|
66 |
+
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
67 |
+
// Unbind an existing callback if it exists.
|
68 |
+
if (currentMsgCallback) {
|
69 |
+
unsetMessageCallback(currentMsgCallback);
|
70 |
+
currentMsgCallback = null;
|
71 |
+
}
|
72 |
+
|
73 |
+
if (!callback) {
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
// Bind the callback. A reference to the callback is stored for ease of
|
78 |
+
// unbinding.
|
79 |
+
currentMsgCallback = setMessageCallback(function(e) {
|
80 |
+
switch(Object.prototype.toString.call(sourceOrigin)) {
|
81 |
+
case '[object String]':
|
82 |
+
if (sourceOrigin !== e.origin) {
|
83 |
+
return false;
|
84 |
+
}
|
85 |
+
break;
|
86 |
+
case '[object Function]':
|
87 |
+
if (sourceOrigin(e.origin)) {
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
|
93 |
+
callback(e);
|
94 |
+
});
|
95 |
+
};
|
96 |
+
|
97 |
+
} else {
|
98 |
+
|
99 |
+
this[postBinding] = function(message, targetUrl, target) {
|
100 |
+
if (!targetUrl) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
// The browser does not support window.postMessage, so set the location
|
105 |
+
// of the target to targetUrl#message. A bit ugly, but it works! A cache
|
106 |
+
// bust parameter is added to ensure that repeat messages trigger the
|
107 |
+
// callback.
|
108 |
+
target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
|
109 |
+
}
|
110 |
+
|
111 |
+
// Since the browser sucks, a polling loop will be started, and the
|
112 |
+
// callback will be called whenever the location.hash changes.
|
113 |
+
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
114 |
+
if (intervalId) {
|
115 |
+
clearInterval(intervalId);
|
116 |
+
intervalId = null;
|
117 |
+
}
|
118 |
+
|
119 |
+
if (callback) {
|
120 |
+
delay = typeof sourceOrigin === 'number'
|
121 |
+
? sourceOrigin
|
122 |
+
: typeof delay === 'number'
|
123 |
+
? delay
|
124 |
+
: 100;
|
125 |
+
|
126 |
+
intervalId = setInterval(function(){
|
127 |
+
var hash = document.location.hash,
|
128 |
+
re = /^#?\d+&/;
|
129 |
+
if ( hash !== lastHash && re.test( hash ) ) {
|
130 |
+
lastHash = hash;
|
131 |
+
callback({ data: hash.replace( re, '' ) });
|
132 |
+
}
|
133 |
+
}, delay );
|
134 |
+
}
|
135 |
+
};
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
return this;
|
140 |
}
|
includes/freemius/assets/js/nojquery.ba-postmessage.min.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
/*
|
2 |
-
* nojquery-postmessage by Jeff Lee
|
3 |
-
* a non-jQuery fork of:
|
4 |
-
*
|
5 |
-
* jQuery postMessage - v0.5 - 9/11/2009
|
6 |
-
* http://benalman.com/projects/jquery-postmessage-plugin/
|
7 |
-
*
|
8 |
-
* Copyright (c) 2009 "Cowboy" Ben Alman
|
9 |
-
* Dual licensed under the MIT and GPL licenses.
|
10 |
-
* http://benalman.com/about/license/
|
11 |
-
*/
|
12 |
function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
|
1 |
+
/*
|
2 |
+
* nojquery-postmessage by Jeff Lee
|
3 |
+
* a non-jQuery fork of:
|
4 |
+
*
|
5 |
+
* jQuery postMessage - v0.5 - 9/11/2009
|
6 |
+
* http://benalman.com/projects/jquery-postmessage-plugin/
|
7 |
+
*
|
8 |
+
* Copyright (c) 2009 "Cowboy" Ben Alman
|
9 |
+
* Dual licensed under the MIT and GPL licenses.
|
10 |
+
* http://benalman.com/about/license/
|
11 |
+
*/
|
12 |
function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
|
includes/freemius/assets/js/postmessage.js
CHANGED
@@ -1,135 +1,135 @@
|
|
1 |
-
(function ($, undef) {
|
2 |
-
var global = this;
|
3 |
-
|
4 |
-
// Namespace.
|
5 |
-
global.FS = global.FS || {};
|
6 |
-
|
7 |
-
global.FS.PostMessage = function ()
|
8 |
-
{
|
9 |
-
var
|
10 |
-
_is_child = false,
|
11 |
-
_postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
|
12 |
-
_callbacks = {},
|
13 |
-
_base_url,
|
14 |
-
_parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
|
15 |
-
_parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
|
16 |
-
_init = function () {
|
17 |
-
_postman.receiveMessage(function (e) {
|
18 |
-
var data = JSON.parse(e.data);
|
19 |
-
|
20 |
-
if (_callbacks[data.type]) {
|
21 |
-
for (var i = 0; i < _callbacks[data.type].length; i++) {
|
22 |
-
// Execute type callbacks.
|
23 |
-
_callbacks[data.type][i](data.data);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}, _base_url);
|
27 |
-
},
|
28 |
-
_hasParent = ('' !== _parent_url),
|
29 |
-
$window = $(window),
|
30 |
-
$html = $('html');
|
31 |
-
|
32 |
-
return {
|
33 |
-
init : function (url, iframes)
|
34 |
-
{
|
35 |
-
_base_url = url;
|
36 |
-
_init();
|
37 |
-
|
38 |
-
// Automatically receive forward messages.
|
39 |
-
FS.PostMessage.receiveOnce('forward', function (data){
|
40 |
-
window.location = data.url;
|
41 |
-
});
|
42 |
-
|
43 |
-
iframes = iframes || [];
|
44 |
-
|
45 |
-
if (iframes.length > 0) {
|
46 |
-
$window.on('scroll', function () {
|
47 |
-
for (var i = 0; i < iframes.length; i++) {
|
48 |
-
FS.PostMessage.postScroll(iframes[i]);
|
49 |
-
}
|
50 |
-
});
|
51 |
-
}
|
52 |
-
},
|
53 |
-
init_child : function ()
|
54 |
-
{
|
55 |
-
this.init(_parent_subdomain);
|
56 |
-
|
57 |
-
_is_child = true;
|
58 |
-
|
59 |
-
// Post height of a child right after window is loaded.
|
60 |
-
$(window).bind('load', function () {
|
61 |
-
FS.PostMessage.postHeight();
|
62 |
-
|
63 |
-
// Post message that window was loaded.
|
64 |
-
FS.PostMessage.post('loaded');
|
65 |
-
});
|
66 |
-
},
|
67 |
-
hasParent : function ()
|
68 |
-
{
|
69 |
-
return _hasParent;
|
70 |
-
},
|
71 |
-
postHeight : function (diff, wrapper) {
|
72 |
-
diff = diff || 0;
|
73 |
-
wrapper = wrapper || '#wrap_section';
|
74 |
-
this.post('height', {
|
75 |
-
height: diff + $(wrapper).outerHeight(true)
|
76 |
-
});
|
77 |
-
},
|
78 |
-
postScroll : function (iframe) {
|
79 |
-
this.post('scroll', {
|
80 |
-
top: $window.scrollTop(),
|
81 |
-
height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
|
82 |
-
}, iframe);
|
83 |
-
},
|
84 |
-
post : function (type, data, iframe)
|
85 |
-
{
|
86 |
-
console.debug('PostMessage.post', type);
|
87 |
-
|
88 |
-
if (iframe)
|
89 |
-
{
|
90 |
-
// Post to iframe.
|
91 |
-
_postman.postMessage(JSON.stringify({
|
92 |
-
type: type,
|
93 |
-
data: data
|
94 |
-
}), iframe.src, iframe.contentWindow);
|
95 |
-
}
|
96 |
-
else {
|
97 |
-
// Post to parent.
|
98 |
-
_postman.postMessage(JSON.stringify({
|
99 |
-
type: type,
|
100 |
-
data: data
|
101 |
-
}), _parent_url, window.parent);
|
102 |
-
}
|
103 |
-
},
|
104 |
-
receive: function (type, callback)
|
105 |
-
{
|
106 |
-
console.debug('PostMessage.receive', type);
|
107 |
-
|
108 |
-
if (undef === _callbacks[type])
|
109 |
-
_callbacks[type] = [];
|
110 |
-
|
111 |
-
_callbacks[type].push(callback);
|
112 |
-
},
|
113 |
-
receiveOnce: function (type, callback)
|
114 |
-
{
|
115 |
-
if (this.is_set(type))
|
116 |
-
return;
|
117 |
-
|
118 |
-
this.receive(type, callback);
|
119 |
-
},
|
120 |
-
// Check if any callbacks assigned to a specified message type.
|
121 |
-
is_set: function (type)
|
122 |
-
{
|
123 |
-
return (undef != _callbacks[type]);
|
124 |
-
},
|
125 |
-
parent_url: function ()
|
126 |
-
{
|
127 |
-
return _parent_url;
|
128 |
-
},
|
129 |
-
parent_subdomain: function ()
|
130 |
-
{
|
131 |
-
return _parent_subdomain;
|
132 |
-
}
|
133 |
-
};
|
134 |
-
}();
|
135 |
})(jQuery);
|
1 |
+
(function ($, undef) {
|
2 |
+
var global = this;
|
3 |
+
|
4 |
+
// Namespace.
|
5 |
+
global.FS = global.FS || {};
|
6 |
+
|
7 |
+
global.FS.PostMessage = function ()
|
8 |
+
{
|
9 |
+
var
|
10 |
+
_is_child = false,
|
11 |
+
_postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
|
12 |
+
_callbacks = {},
|
13 |
+
_base_url,
|
14 |
+
_parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
|
15 |
+
_parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
|
16 |
+
_init = function () {
|
17 |
+
_postman.receiveMessage(function (e) {
|
18 |
+
var data = JSON.parse(e.data);
|
19 |
+
|
20 |
+
if (_callbacks[data.type]) {
|
21 |
+
for (var i = 0; i < _callbacks[data.type].length; i++) {
|
22 |
+
// Execute type callbacks.
|
23 |
+
_callbacks[data.type][i](data.data);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
}, _base_url);
|
27 |
+
},
|
28 |
+
_hasParent = ('' !== _parent_url),
|
29 |
+
$window = $(window),
|
30 |
+
$html = $('html');
|
31 |
+
|
32 |
+
return {
|
33 |
+
init : function (url, iframes)
|
34 |
+
{
|
35 |
+
_base_url = url;
|
36 |
+
_init();
|
37 |
+
|
38 |
+
// Automatically receive forward messages.
|
39 |
+
FS.PostMessage.receiveOnce('forward', function (data){
|
40 |
+
window.location = data.url;
|
41 |
+
});
|
42 |
+
|
43 |
+
iframes = iframes || [];
|
44 |
+
|
45 |
+
if (iframes.length > 0) {
|
46 |
+
$window.on('scroll', function () {
|
47 |
+
for (var i = 0; i < iframes.length; i++) {
|
48 |
+
FS.PostMessage.postScroll(iframes[i]);
|
49 |
+
}
|
50 |
+
});
|
51 |
+
}
|
52 |
+
},
|
53 |
+
init_child : function ()
|
54 |
+
{
|
55 |
+
this.init(_parent_subdomain);
|
56 |
+
|
57 |
+
_is_child = true;
|
58 |
+
|
59 |
+
// Post height of a child right after window is loaded.
|
60 |
+
$(window).bind('load', function () {
|
61 |
+
FS.PostMessage.postHeight();
|
62 |
+
|
63 |
+
// Post message that window was loaded.
|
64 |
+
FS.PostMessage.post('loaded');
|
65 |
+
});
|
66 |
+
},
|
67 |
+
hasParent : function ()
|
68 |
+
{
|
69 |
+
return _hasParent;
|
70 |
+
},
|
71 |
+
postHeight : function (diff, wrapper) {
|
72 |
+
diff = diff || 0;
|
73 |
+
wrapper = wrapper || '#wrap_section';
|
74 |
+
this.post('height', {
|
75 |
+
height: diff + $(wrapper).outerHeight(true)
|
76 |
+
});
|
77 |
+
},
|
78 |
+
postScroll : function (iframe) {
|
79 |
+
this.post('scroll', {
|
80 |
+
top: $window.scrollTop(),
|
81 |
+
height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
|
82 |
+
}, iframe);
|
83 |
+
},
|
84 |
+
post : function (type, data, iframe)
|
85 |
+
{
|
86 |
+
console.debug('PostMessage.post', type);
|
87 |
+
|
88 |
+
if (iframe)
|
89 |
+
{
|
90 |
+
// Post to iframe.
|
91 |
+
_postman.postMessage(JSON.stringify({
|
92 |
+
type: type,
|
93 |
+
data: data
|
94 |
+
}), iframe.src, iframe.contentWindow);
|
95 |
+
}
|
96 |
+
else {
|
97 |
+
// Post to parent.
|
98 |
+
_postman.postMessage(JSON.stringify({
|
99 |
+
type: type,
|
100 |
+
data: data
|
101 |
+
}), _parent_url, window.parent);
|
102 |
+
}
|
103 |
+
},
|
104 |
+
receive: function (type, callback)
|
105 |
+
{
|
106 |
+
console.debug('PostMessage.receive', type);
|
107 |
+
|
108 |
+
if (undef === _callbacks[type])
|
109 |
+
_callbacks[type] = [];
|
110 |
+
|
111 |
+
_callbacks[type].push(callback);
|
112 |
+
},
|
113 |
+
receiveOnce: function (type, callback)
|
114 |
+
{
|
115 |
+
if (this.is_set(type))
|
116 |
+
return;
|
117 |
+
|
118 |
+
this.receive(type, callback);
|
119 |
+
},
|
120 |
+
// Check if any callbacks assigned to a specified message type.
|
121 |
+
is_set: function (type)
|
122 |
+
{
|
123 |
+
return (undef != _callbacks[type]);
|
124 |
+
},
|
125 |
+
parent_url: function ()
|
126 |
+
{
|
127 |
+
return _parent_url;
|
128 |
+
},
|
129 |
+
parent_subdomain: function ()
|
130 |
+
{
|
131 |
+
return _parent_subdomain;
|
132 |
+
}
|
133 |
+
};
|
134 |
+
}();
|
135 |
})(jQuery);
|
includes/freemius/config.php
CHANGED
@@ -1,388 +1,388 @@
|
|
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.4
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
if ( ! defined( 'WP_FS__SLUG' ) ) {
|
14 |
-
define( 'WP_FS__SLUG', 'freemius' );
|
15 |
-
}
|
16 |
-
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
17 |
-
define( 'WP_FS__DEV_MODE', false );
|
18 |
-
}
|
19 |
-
|
20 |
-
#--------------------------------------------------------------------------------
|
21 |
-
#region API Connectivity Issues Simulation
|
22 |
-
#--------------------------------------------------------------------------------
|
23 |
-
|
24 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
25 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
26 |
-
}
|
27 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
|
28 |
-
define( 'WP_FS__SIMULATE_NO_CURL', false );
|
29 |
-
}
|
30 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
|
31 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
|
32 |
-
}
|
33 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
|
34 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
35 |
-
}
|
36 |
-
if ( WP_FS__SIMULATE_NO_CURL ) {
|
37 |
-
define( 'FS_SDK__SIMULATE_NO_CURL', true );
|
38 |
-
}
|
39 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
40 |
-
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
|
41 |
-
}
|
42 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
|
43 |
-
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
44 |
-
}
|
45 |
-
|
46 |
-
#endregion
|
47 |
-
|
48 |
-
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
49 |
-
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
50 |
-
}
|
51 |
-
|
52 |
-
if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
|
53 |
-
/**
|
54 |
-
* @since 1.1.7.3
|
55 |
-
* @author Vova Feldman (@svovaf)
|
56 |
-
*
|
57 |
-
* I'm not sure if shared servers periodically change IP, or the subdomain of the
|
58 |
-
* admin dashboard. Also, I've seen sites that have strange loop of switching
|
59 |
-
* between domains on a daily basis. Therefore, to eliminate the risk of
|
60 |
-
* multiple unwanted connectivity test pings, temporary ignore domain or
|
61 |
-
* server IP changes.
|
62 |
-
*/
|
63 |
-
define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* If your dev environment supports custom public network IP setup
|
68 |
-
* like VVV, please update WP_FS__LOCALHOST_IP with your public IP
|
69 |
-
* and uncomment it during dev.
|
70 |
-
*/
|
71 |
-
if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
72 |
-
// VVV default public network IP.
|
73 |
-
define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
|
74 |
-
|
75 |
-
// define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* If true and running with secret key, the opt-in process
|
80 |
-
* will skip the email activation process which is invoked
|
81 |
-
* when the email of the context user already exist in Freemius
|
82 |
-
* database (as a security precaution, to prevent sharing user
|
83 |
-
* secret with unauthorized entity).
|
84 |
-
*
|
85 |
-
* IMPORTANT:
|
86 |
-
* AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
|
87 |
-
* THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
|
88 |
-
* CLOCK IS SYNCED.
|
89 |
-
*/
|
90 |
-
if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
|
91 |
-
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
#--------------------------------------------------------------------------------
|
96 |
-
#region Directories
|
97 |
-
#--------------------------------------------------------------------------------
|
98 |
-
|
99 |
-
if ( ! defined( 'WP_FS__DIR' ) ) {
|
100 |
-
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
101 |
-
}
|
102 |
-
if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
|
103 |
-
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
104 |
-
}
|
105 |
-
if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
|
106 |
-
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
107 |
-
}
|
108 |
-
if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
|
109 |
-
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
110 |
-
}
|
111 |
-
if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
|
112 |
-
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
113 |
-
}
|
114 |
-
if ( ! defined( 'WP_FS__DIR_JS' ) ) {
|
115 |
-
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
116 |
-
}
|
117 |
-
if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
|
118 |
-
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
119 |
-
}
|
120 |
-
if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
|
121 |
-
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
122 |
-
}
|
123 |
-
|
124 |
-
#endregion
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Domain / URL / Address
|
128 |
-
*/
|
129 |
-
define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
|
130 |
-
define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
|
131 |
-
define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
|
132 |
-
|
133 |
-
if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
|
134 |
-
define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
|
135 |
-
}
|
136 |
-
if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
|
137 |
-
define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
|
138 |
-
}
|
139 |
-
|
140 |
-
if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
|
141 |
-
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
142 |
-
}
|
143 |
-
|
144 |
-
#--------------------------------------------------------------------------------
|
145 |
-
#region HTTP
|
146 |
-
#--------------------------------------------------------------------------------
|
147 |
-
|
148 |
-
if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
|
149 |
-
define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
|
150 |
-
}
|
151 |
-
|
152 |
-
if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
|
153 |
-
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
154 |
-
// Checks if CloudFlare's HTTPS (Flexible SSL support).
|
155 |
-
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
|
156 |
-
'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
157 |
-
) ||
|
158 |
-
// Check if HTTPS request.
|
159 |
-
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
160 |
-
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
161 |
-
);
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
|
165 |
-
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
166 |
-
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
167 |
-
}
|
168 |
-
|
169 |
-
if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
|
170 |
-
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
171 |
-
}
|
172 |
-
|
173 |
-
if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
|
174 |
-
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
175 |
-
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
176 |
-
} else {
|
177 |
-
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
178 |
-
is_string( WP_FS__REMOTE_ADDR ) &&
|
179 |
-
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
|
180 |
-
WP_FS__REMOTE_ADDR === '::1' )
|
181 |
-
);
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
186 |
-
define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
|
187 |
-
false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
|
188 |
-
}
|
189 |
-
|
190 |
-
#endregion
|
191 |
-
|
192 |
-
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
193 |
-
// By default, run with Freemius production servers.
|
194 |
-
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
195 |
-
}
|
196 |
-
|
197 |
-
if ( ! defined( 'WP_FS__ADDRESS' ) ) {
|
198 |
-
define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
#--------------------------------------------------------------------------------
|
203 |
-
#region API
|
204 |
-
#--------------------------------------------------------------------------------
|
205 |
-
|
206 |
-
if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
|
207 |
-
define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' );
|
208 |
-
}
|
209 |
-
if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
|
210 |
-
define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
|
211 |
-
}
|
212 |
-
|
213 |
-
// Set API address for local testing.
|
214 |
-
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
215 |
-
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
216 |
-
define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
|
217 |
-
}
|
218 |
-
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
219 |
-
define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
#endregion
|
224 |
-
|
225 |
-
#--------------------------------------------------------------------------------
|
226 |
-
#region Checkout
|
227 |
-
#--------------------------------------------------------------------------------
|
228 |
-
|
229 |
-
if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
|
230 |
-
define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
|
231 |
-
}
|
232 |
-
|
233 |
-
if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
|
234 |
-
define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
|
235 |
-
}
|
236 |
-
|
237 |
-
if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
|
238 |
-
define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
|
239 |
-
}
|
240 |
-
|
241 |
-
#endregion
|
242 |
-
|
243 |
-
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
244 |
-
|
245 |
-
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
246 |
-
define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
|
247 |
-
}
|
248 |
-
if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
|
249 |
-
define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
|
250 |
-
}
|
251 |
-
if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
|
252 |
-
define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
|
253 |
-
}
|
254 |
-
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Module types
|
258 |
-
*
|
259 |
-
* @since 1.2.2
|
260 |
-
*/
|
261 |
-
define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
|
262 |
-
define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Billing Frequencies
|
266 |
-
*/
|
267 |
-
define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
|
268 |
-
define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
|
269 |
-
define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Plans
|
273 |
-
*/
|
274 |
-
define( 'WP_FS__PLAN_DEFAULT_PAID', false );
|
275 |
-
define( 'WP_FS__PLAN_FREE', 'free' );
|
276 |
-
define( 'WP_FS__PLAN_TRIAL', 'trial' );
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Times in seconds
|
280 |
-
*/
|
281 |
-
if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
|
282 |
-
define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
|
283 |
-
}
|
284 |
-
if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
|
285 |
-
define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
|
286 |
-
}
|
287 |
-
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
288 |
-
if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
|
289 |
-
define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
|
290 |
-
}
|
291 |
-
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
292 |
-
define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
|
293 |
-
}
|
294 |
-
if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
|
295 |
-
define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
296 |
-
}
|
297 |
-
|
298 |
-
#--------------------------------------------------------------------------------
|
299 |
-
#region Debugging
|
300 |
-
#--------------------------------------------------------------------------------
|
301 |
-
|
302 |
-
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
303 |
-
$debug_mode = get_option( 'fs_debug_mode', null );
|
304 |
-
|
305 |
-
if ( $debug_mode === null ) {
|
306 |
-
$debug_mode = false;
|
307 |
-
add_option( 'fs_debug_mode', $debug_mode );
|
308 |
-
}
|
309 |
-
|
310 |
-
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
311 |
-
}
|
312 |
-
|
313 |
-
if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
|
314 |
-
define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
|
315 |
-
}
|
316 |
-
if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
|
317 |
-
define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
|
318 |
-
}
|
319 |
-
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
320 |
-
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
321 |
-
}
|
322 |
-
|
323 |
-
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
324 |
-
error_reporting( E_ALL );
|
325 |
-
}
|
326 |
-
|
327 |
-
#endregion
|
328 |
-
|
329 |
-
if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
|
330 |
-
define( 'WP_FS__SCRIPT_START_TIME', time() );
|
331 |
-
}
|
332 |
-
if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
|
333 |
-
define( 'WP_FS__DEFAULT_PRIORITY', 10 );
|
334 |
-
}
|
335 |
-
if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
|
336 |
-
define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
|
337 |
-
}
|
338 |
-
|
339 |
-
#--------------------------------------------------------------------------------
|
340 |
-
#region Multisite Network
|
341 |
-
#--------------------------------------------------------------------------------
|
342 |
-
|
343 |
-
/**
|
344 |
-
* Do not use this define directly, it will have the wrong value
|
345 |
-
* during plugin uninstall/deletion when the inclusion of the plugin
|
346 |
-
* is triggered due to registration with register_uninstall_hook().
|
347 |
-
*
|
348 |
-
* Instead, use fs_is_network_admin().
|
349 |
-
*
|
350 |
-
* @author Vova Feldman (@svovaf)
|
351 |
-
*/
|
352 |
-
if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
|
353 |
-
define( 'WP_FS__IS_NETWORK_ADMIN',
|
354 |
-
is_multisite() &&
|
355 |
-
( is_network_admin() ||
|
356 |
-
( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
|
357 |
-
( isset( $_REQUEST['_fs_network_admin'] ) /*||
|
358 |
-
( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
|
359 |
-
) ||
|
360 |
-
// Plugin uninstall.
|
361 |
-
defined( 'WP_UNINSTALL_PLUGIN' ) )
|
362 |
-
)
|
363 |
-
);
|
364 |
-
}
|
365 |
-
|
366 |
-
/**
|
367 |
-
* Do not use this define directly, it will have the wrong value
|
368 |
-
* during plugin uninstall/deletion when the inclusion of the plugin
|
369 |
-
* is triggered due to registration with register_uninstall_hook().
|
370 |
-
*
|
371 |
-
* Instead, use fs_is_blog_admin().
|
372 |
-
*
|
373 |
-
* @author Vova Feldman (@svovaf)
|
374 |
-
*/
|
375 |
-
if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
|
376 |
-
define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
|
377 |
-
}
|
378 |
-
|
379 |
-
if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
|
380 |
-
// Set to true to show network level settings even if delegated to site admins.
|
381 |
-
define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
|
382 |
-
}
|
383 |
-
|
384 |
-
#endregion
|
385 |
-
|
386 |
-
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
-
define( 'WP_FS__DEMO_MODE', false );
|
388 |
}
|
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.4
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( ! defined( 'WP_FS__SLUG' ) ) {
|
14 |
+
define( 'WP_FS__SLUG', 'freemius' );
|
15 |
+
}
|
16 |
+
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
17 |
+
define( 'WP_FS__DEV_MODE', false );
|
18 |
+
}
|
19 |
+
|
20 |
+
#--------------------------------------------------------------------------------
|
21 |
+
#region API Connectivity Issues Simulation
|
22 |
+
#--------------------------------------------------------------------------------
|
23 |
+
|
24 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
25 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
26 |
+
}
|
27 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
|
28 |
+
define( 'WP_FS__SIMULATE_NO_CURL', false );
|
29 |
+
}
|
30 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
|
31 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
|
32 |
+
}
|
33 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
|
34 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
35 |
+
}
|
36 |
+
if ( WP_FS__SIMULATE_NO_CURL ) {
|
37 |
+
define( 'FS_SDK__SIMULATE_NO_CURL', true );
|
38 |
+
}
|
39 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
40 |
+
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
|
41 |
+
}
|
42 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
|
43 |
+
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
44 |
+
}
|
45 |
+
|
46 |
+
#endregion
|
47 |
+
|
48 |
+
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
49 |
+
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
|
53 |
+
/**
|
54 |
+
* @since 1.1.7.3
|
55 |
+
* @author Vova Feldman (@svovaf)
|
56 |
+
*
|
57 |
+
* I'm not sure if shared servers periodically change IP, or the subdomain of the
|
58 |
+
* admin dashboard. Also, I've seen sites that have strange loop of switching
|
59 |
+
* between domains on a daily basis. Therefore, to eliminate the risk of
|
60 |
+
* multiple unwanted connectivity test pings, temporary ignore domain or
|
61 |
+
* server IP changes.
|
62 |
+
*/
|
63 |
+
define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* If your dev environment supports custom public network IP setup
|
68 |
+
* like VVV, please update WP_FS__LOCALHOST_IP with your public IP
|
69 |
+
* and uncomment it during dev.
|
70 |
+
*/
|
71 |
+
if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
72 |
+
// VVV default public network IP.
|
73 |
+
define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
|
74 |
+
|
75 |
+
// define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* If true and running with secret key, the opt-in process
|
80 |
+
* will skip the email activation process which is invoked
|
81 |
+
* when the email of the context user already exist in Freemius
|
82 |
+
* database (as a security precaution, to prevent sharing user
|
83 |
+
* secret with unauthorized entity).
|
84 |
+
*
|
85 |
+
* IMPORTANT:
|
86 |
+
* AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
|
87 |
+
* THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
|
88 |
+
* CLOCK IS SYNCED.
|
89 |
+
*/
|
90 |
+
if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
|
91 |
+
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
#--------------------------------------------------------------------------------
|
96 |
+
#region Directories
|
97 |
+
#--------------------------------------------------------------------------------
|
98 |
+
|
99 |
+
if ( ! defined( 'WP_FS__DIR' ) ) {
|
100 |
+
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
101 |
+
}
|
102 |
+
if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
|
103 |
+
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
104 |
+
}
|
105 |
+
if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
|
106 |
+
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
107 |
+
}
|
108 |
+
if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
|
109 |
+
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
110 |
+
}
|
111 |
+
if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
|
112 |
+
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
113 |
+
}
|
114 |
+
if ( ! defined( 'WP_FS__DIR_JS' ) ) {
|
115 |
+
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
116 |
+
}
|
117 |
+
if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
|
118 |
+
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
119 |
+
}
|
120 |
+
if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
|
121 |
+
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
122 |
+
}
|
123 |
+
|
124 |
+
#endregion
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Domain / URL / Address
|
128 |
+
*/
|
129 |
+
define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
|
130 |
+
define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
|
131 |
+
define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
|
132 |
+
|
133 |
+
if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
|
134 |
+
define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
|
135 |
+
}
|
136 |
+
if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
|
137 |
+
define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
|
141 |
+
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
142 |
+
}
|
143 |
+
|
144 |
+
#--------------------------------------------------------------------------------
|
145 |
+
#region HTTP
|
146 |
+
#--------------------------------------------------------------------------------
|
147 |
+
|
148 |
+
if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
|
149 |
+
define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
|
150 |
+
}
|
151 |
+
|
152 |
+
if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
|
153 |
+
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
154 |
+
// Checks if CloudFlare's HTTPS (Flexible SSL support).
|
155 |
+
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
|
156 |
+
'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
157 |
+
) ||
|
158 |
+
// Check if HTTPS request.
|
159 |
+
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
160 |
+
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
161 |
+
);
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
|
165 |
+
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
166 |
+
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
167 |
+
}
|
168 |
+
|
169 |
+
if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
|
170 |
+
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
171 |
+
}
|
172 |
+
|
173 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
|
174 |
+
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
175 |
+
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
176 |
+
} else {
|
177 |
+
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
178 |
+
is_string( WP_FS__REMOTE_ADDR ) &&
|
179 |
+
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
|
180 |
+
WP_FS__REMOTE_ADDR === '::1' )
|
181 |
+
);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
186 |
+
define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
|
187 |
+
false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
|
188 |
+
}
|
189 |
+
|
190 |
+
#endregion
|
191 |
+
|
192 |
+
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
193 |
+
// By default, run with Freemius production servers.
|
194 |
+
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! defined( 'WP_FS__ADDRESS' ) ) {
|
198 |
+
define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
#--------------------------------------------------------------------------------
|
203 |
+
#region API
|
204 |
+
#--------------------------------------------------------------------------------
|
205 |
+
|
206 |
+
if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
|
207 |
+
define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' );
|
208 |
+
}
|
209 |
+
if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
|
210 |
+
define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
|
211 |
+
}
|
212 |
+
|
213 |
+
// Set API address for local testing.
|
214 |
+
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
215 |
+
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
216 |
+
define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
|
217 |
+
}
|
218 |
+
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
219 |
+
define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
#endregion
|
224 |
+
|
225 |
+
#--------------------------------------------------------------------------------
|
226 |
+
#region Checkout
|
227 |
+
#--------------------------------------------------------------------------------
|
228 |
+
|
229 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
|
230 |
+
define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
|
234 |
+
define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
|
235 |
+
}
|
236 |
+
|
237 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
|
238 |
+
define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
|
239 |
+
}
|
240 |
+
|
241 |
+
#endregion
|
242 |
+
|
243 |
+
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
244 |
+
|
245 |
+
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
246 |
+
define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
|
247 |
+
}
|
248 |
+
if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
|
249 |
+
define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
|
250 |
+
}
|
251 |
+
if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
|
252 |
+
define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
|
253 |
+
}
|
254 |
+
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Module types
|
258 |
+
*
|
259 |
+
* @since 1.2.2
|
260 |
+
*/
|
261 |
+
define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
|
262 |
+
define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Billing Frequencies
|
266 |
+
*/
|
267 |
+
define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
|
268 |
+
define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
|
269 |
+
define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Plans
|
273 |
+
*/
|
274 |
+
define( 'WP_FS__PLAN_DEFAULT_PAID', false );
|
275 |
+
define( 'WP_FS__PLAN_FREE', 'free' );
|
276 |
+
define( 'WP_FS__PLAN_TRIAL', 'trial' );
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Times in seconds
|
280 |
+
*/
|
281 |
+
if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
|
282 |
+
define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
|
283 |
+
}
|
284 |
+
if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
|
285 |
+
define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
|
286 |
+
}
|
287 |
+
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
288 |
+
if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
|
289 |
+
define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
|
290 |
+
}
|
291 |
+
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
292 |
+
define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
|
293 |
+
}
|
294 |
+
if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
|
295 |
+
define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
296 |
+
}
|
297 |
+
|
298 |
+
#--------------------------------------------------------------------------------
|
299 |
+
#region Debugging
|
300 |
+
#--------------------------------------------------------------------------------
|
301 |
+
|
302 |
+
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
303 |
+
$debug_mode = get_option( 'fs_debug_mode', null );
|
304 |
+
|
305 |
+
if ( $debug_mode === null ) {
|
306 |
+
$debug_mode = false;
|
307 |
+
add_option( 'fs_debug_mode', $debug_mode );
|
308 |
+
}
|
309 |
+
|
310 |
+
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
311 |
+
}
|
312 |
+
|
313 |
+
if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
|
314 |
+
define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
|
315 |
+
}
|
316 |
+
if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
|
317 |
+
define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
|
318 |
+
}
|
319 |
+
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
320 |
+
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
321 |
+
}
|
322 |
+
|
323 |
+
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
324 |
+
error_reporting( E_ALL );
|
325 |
+
}
|
326 |
+
|
327 |
+
#endregion
|
328 |
+
|
329 |
+
if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
|
330 |
+
define( 'WP_FS__SCRIPT_START_TIME', time() );
|
331 |
+
}
|
332 |
+
if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
|
333 |
+
define( 'WP_FS__DEFAULT_PRIORITY', 10 );
|
334 |
+
}
|
335 |
+
if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
|
336 |
+
define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
|
337 |
+
}
|
338 |
+
|
339 |
+
#--------------------------------------------------------------------------------
|
340 |
+
#region Multisite Network
|
341 |
+
#--------------------------------------------------------------------------------
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Do not use this define directly, it will have the wrong value
|
345 |
+
* during plugin uninstall/deletion when the inclusion of the plugin
|
346 |
+
* is triggered due to registration with register_uninstall_hook().
|
347 |
+
*
|
348 |
+
* Instead, use fs_is_network_admin().
|
349 |
+
*
|
350 |
+
* @author Vova Feldman (@svovaf)
|
351 |
+
*/
|
352 |
+
if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
|
353 |
+
define( 'WP_FS__IS_NETWORK_ADMIN',
|
354 |
+
is_multisite() &&
|
355 |
+
( is_network_admin() ||
|
356 |
+
( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
|
357 |
+
( isset( $_REQUEST['_fs_network_admin'] ) /*||
|
358 |
+
( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
|
359 |
+
) ||
|
360 |
+
// Plugin uninstall.
|
361 |
+
defined( 'WP_UNINSTALL_PLUGIN' ) )
|
362 |
+
)
|
363 |
+
);
|
364 |
+
}
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Do not use this define directly, it will have the wrong value
|
368 |
+
* during plugin uninstall/deletion when the inclusion of the plugin
|
369 |
+
* is triggered due to registration with register_uninstall_hook().
|
370 |
+
*
|
371 |
+
* Instead, use fs_is_blog_admin().
|
372 |
+
*
|
373 |
+
* @author Vova Feldman (@svovaf)
|
374 |
+
*/
|
375 |
+
if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
|
376 |
+
define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
|
377 |
+
}
|
378 |
+
|
379 |
+
if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
|
380 |
+
// Set to true to show network level settings even if delegated to site admins.
|
381 |
+
define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
|
382 |
+
}
|
383 |
+
|
384 |
+
#endregion
|
385 |
+
|
386 |
+
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
+
define( 'WP_FS__DEMO_MODE', false );
|
388 |
}
|
includes/freemius/includes/class-freemius-abstract.php
CHANGED
@@ -1,597 +1,597 @@
|
|
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.7
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
|
14 |
-
/**
|
15 |
-
* - Each instance of Freemius class represents a single plugin
|
16 |
-
* install by a single user (the installer of the plugin).
|
17 |
-
*
|
18 |
-
* - Each website can only have one install of the same plugin.
|
19 |
-
*
|
20 |
-
* - Install entity is only created after a user connects his account with Freemius.
|
21 |
-
*
|
22 |
-
* Class Freemius_Abstract
|
23 |
-
*/
|
24 |
-
abstract class Freemius_Abstract {
|
25 |
-
|
26 |
-
#----------------------------------------------------------------------------------
|
27 |
-
#region Identity
|
28 |
-
#----------------------------------------------------------------------------------
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Check if user has connected his account (opted-in).
|
32 |
-
*
|
33 |
-
* Note:
|
34 |
-
* If the user opted-in and opted-out on a later stage,
|
35 |
-
* this will still return true. If you want to check if the
|
36 |
-
* user is currently opted-in, use:
|
37 |
-
* `$fs->is_registered() && $fs->is_tracking_allowed()`
|
38 |
-
*
|
39 |
-
* @since 1.0.1
|
40 |
-
* @return bool
|
41 |
-
*/
|
42 |
-
abstract function is_registered();
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Check if the user skipped connecting the account with Freemius.
|
46 |
-
*
|
47 |
-
* @since 1.0.7
|
48 |
-
*
|
49 |
-
* @return bool
|
50 |
-
*/
|
51 |
-
abstract function is_anonymous();
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Check if the user currently in activation mode.
|
55 |
-
*
|
56 |
-
* @since 1.0.7
|
57 |
-
*
|
58 |
-
* @return bool
|
59 |
-
*/
|
60 |
-
abstract function is_activation_mode();
|
61 |
-
|
62 |
-
#endregion
|
63 |
-
|
64 |
-
#----------------------------------------------------------------------------------
|
65 |
-
#region Usage Tracking
|
66 |
-
#----------------------------------------------------------------------------------
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
70 |
-
*
|
71 |
-
* @author Leo Fajardo (@leorw)
|
72 |
-
* @since 1.2.1.5
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
abstract function is_tracking_allowed();
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Returns TRUE if the user never opted-in or manually opted-out.
|
80 |
-
*
|
81 |
-
* @author Vova Feldman (@svovaf)
|
82 |
-
* @since 1.2.1.5
|
83 |
-
*
|
84 |
-
* @return bool
|
85 |
-
*/
|
86 |
-
function is_tracking_prohibited() {
|
87 |
-
return ! $this->is_registered() || ! $this->is_tracking_allowed();
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Opt-out from usage tracking.
|
92 |
-
*
|
93 |
-
* Note: This will not delete the account information but will stop all tracking.
|
94 |
-
*
|
95 |
-
* Returns:
|
96 |
-
* 1. FALSE - If the user never opted-in.
|
97 |
-
* 2. TRUE - If successfully opted-out.
|
98 |
-
* 3. object - API Result on failure.
|
99 |
-
*
|
100 |
-
* @author Leo Fajardo (@leorw)
|
101 |
-
* @since 1.2.1.5
|
102 |
-
*
|
103 |
-
* @return bool|object
|
104 |
-
*/
|
105 |
-
abstract function stop_tracking();
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Opt-in back into usage tracking.
|
109 |
-
*
|
110 |
-
* Note: This will only work if the user opted-in previously.
|
111 |
-
*
|
112 |
-
* Returns:
|
113 |
-
* 1. FALSE - If the user never opted-in.
|
114 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
115 |
-
* 3. object - API result on failure.
|
116 |
-
*
|
117 |
-
* @author Leo Fajardo (@leorw)
|
118 |
-
* @since 1.2.1.5
|
119 |
-
*
|
120 |
-
* @return bool|object
|
121 |
-
*/
|
122 |
-
abstract function allow_tracking();
|
123 |
-
|
124 |
-
#endregion
|
125 |
-
|
126 |
-
#----------------------------------------------------------------------------------
|
127 |
-
#region Module Type
|
128 |
-
#----------------------------------------------------------------------------------
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Checks if the plugin's type is "plugin". The other type is "theme".
|
132 |
-
*
|
133 |
-
* @author Leo Fajardo (@leorw)
|
134 |
-
* @since 1.2.2
|
135 |
-
*
|
136 |
-
* @return bool
|
137 |
-
*/
|
138 |
-
abstract function is_plugin();
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Checks if the module type is "theme". The other type is "plugin".
|
142 |
-
*
|
143 |
-
* @author Leo Fajardo (@leorw)
|
144 |
-
* @since 1.2.2
|
145 |
-
*
|
146 |
-
* @return bool
|
147 |
-
*/
|
148 |
-
function is_theme() {
|
149 |
-
return ( ! $this->is_plugin() );
|
150 |
-
}
|
151 |
-
|
152 |
-
#endregion
|
153 |
-
|
154 |
-
#----------------------------------------------------------------------------------
|
155 |
-
#region Permissions
|
156 |
-
#----------------------------------------------------------------------------------
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Check if plugin must be WordPress.org compliant.
|
160 |
-
*
|
161 |
-
* @since 1.0.7
|
162 |
-
*
|
163 |
-
* @return bool
|
164 |
-
*/
|
165 |
-
abstract function is_org_repo_compliant();
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Check if plugin is allowed to install executable files.
|
169 |
-
*
|
170 |
-
* @author Vova Feldman (@svovaf)
|
171 |
-
* @since 1.0.5
|
172 |
-
*
|
173 |
-
* @return bool
|
174 |
-
*/
|
175 |
-
function is_allowed_to_install() {
|
176 |
-
return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
|
177 |
-
}
|
178 |
-
|
179 |
-
#endregion
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Check if user in trial or in free plan (not paying).
|
183 |
-
*
|
184 |
-
* @author Vova Feldman (@svovaf)
|
185 |
-
* @since 1.0.4
|
186 |
-
*
|
187 |
-
* @return bool
|
188 |
-
*/
|
189 |
-
function is_not_paying() {
|
190 |
-
return ( $this->is_trial() || $this->is_free_plan() );
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Check if the user has an activated and valid paid license on current plugin's install.
|
195 |
-
*
|
196 |
-
* @since 1.0.9
|
197 |
-
*
|
198 |
-
* @return bool
|
199 |
-
*/
|
200 |
-
abstract function is_paying();
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Check if the user is paying or in trial.
|
204 |
-
*
|
205 |
-
* @since 1.0.9
|
206 |
-
*
|
207 |
-
* @return bool
|
208 |
-
*/
|
209 |
-
function is_paying_or_trial() {
|
210 |
-
return ( $this->is_paying() || $this->is_trial() );
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Check if user in a trial or have feature enabled license.
|
215 |
-
*
|
216 |
-
* @author Vova Feldman (@svovaf)
|
217 |
-
* @since 1.1.7
|
218 |
-
*
|
219 |
-
* @return bool
|
220 |
-
*/
|
221 |
-
abstract function can_use_premium_code();
|
222 |
-
|
223 |
-
#----------------------------------------------------------------------------------
|
224 |
-
#region Premium Only
|
225 |
-
#----------------------------------------------------------------------------------
|
226 |
-
|
227 |
-
/**
|
228 |
-
* All logic wrapped in methods with "__premium_only()" suffix will be only
|
229 |
-
* included in the premium code.
|
230 |
-
*
|
231 |
-
* Example:
|
232 |
-
* if ( freemius()->is__premium_only() ) {
|
233 |
-
* ...
|
234 |
-
* }
|
235 |
-
*/
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Returns true when running premium plugin code.
|
239 |
-
*
|
240 |
-
* @since 1.0.9
|
241 |
-
*
|
242 |
-
* @return bool
|
243 |
-
*/
|
244 |
-
function is__premium_only() {
|
245 |
-
return $this->is_premium();
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Check if the user has an activated and valid paid license on current plugin's install.
|
250 |
-
*
|
251 |
-
* @since 1.0.9
|
252 |
-
*
|
253 |
-
* @return bool
|
254 |
-
*
|
255 |
-
*/
|
256 |
-
function is_paying__premium_only() {
|
257 |
-
return ( $this->is__premium_only() && $this->is_paying() );
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* All code wrapped in this statement will be only included in the premium code.
|
262 |
-
*
|
263 |
-
* @since 1.0.9
|
264 |
-
*
|
265 |
-
* @param string $plan Plan name.
|
266 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
267 |
-
*
|
268 |
-
* @return bool
|
269 |
-
*/
|
270 |
-
function is_plan__premium_only( $plan, $exact = false ) {
|
271 |
-
return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Check if plan matches active license' plan or active trial license' plan.
|
276 |
-
*
|
277 |
-
* All code wrapped in this statement will be only included in the premium code.
|
278 |
-
*
|
279 |
-
* @since 1.0.9
|
280 |
-
*
|
281 |
-
* @param string $plan Plan name.
|
282 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
283 |
-
*
|
284 |
-
* @return bool
|
285 |
-
*/
|
286 |
-
function is_plan_or_trial__premium_only( $plan, $exact = false ) {
|
287 |
-
return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Check if the user is paying or in trial.
|
292 |
-
*
|
293 |
-
* All code wrapped in this statement will be only included in the premium code.
|
294 |
-
*
|
295 |
-
* @since 1.0.9
|
296 |
-
*
|
297 |
-
* @return bool
|
298 |
-
*/
|
299 |
-
function is_paying_or_trial__premium_only() {
|
300 |
-
return $this->is_premium() && $this->is_paying_or_trial();
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Check if the user has an activated and valid paid license on current plugin's install.
|
305 |
-
*
|
306 |
-
* @since 1.0.4
|
307 |
-
*
|
308 |
-
* @return bool
|
309 |
-
*
|
310 |
-
* @deprecated Method name is confusing since it's not clear from the name the code will be removed.
|
311 |
-
* @using Alias to is_paying__premium_only()
|
312 |
-
*/
|
313 |
-
function is_paying__fs__() {
|
314 |
-
return $this->is_paying__premium_only();
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* Check if user in a trial or have feature enabled license.
|
319 |
-
*
|
320 |
-
* All code wrapped in this statement will be only included in the premium code.
|
321 |
-
*
|
322 |
-
* @author Vova Feldman (@svovaf)
|
323 |
-
* @since 1.1.9
|
324 |
-
*
|
325 |
-
* @return bool
|
326 |
-
*/
|
327 |
-
function can_use_premium_code__premium_only() {
|
328 |
-
return $this->is_premium() && $this->can_use_premium_code();
|
329 |
-
}
|
330 |
-
|
331 |
-
#endregion
|
332 |
-
|
333 |
-
#----------------------------------------------------------------------------------
|
334 |
-
#region Trial
|
335 |
-
#----------------------------------------------------------------------------------
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Check if the user in a trial.
|
339 |
-
*
|
340 |
-
* @since 1.0.3
|
341 |
-
*
|
342 |
-
* @return bool
|
343 |
-
*/
|
344 |
-
abstract function is_trial();
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Check if trial already utilized.
|
348 |
-
*
|
349 |
-
* @since 1.0.9
|
350 |
-
*
|
351 |
-
* @return bool
|
352 |
-
*/
|
353 |
-
abstract function is_trial_utilized();
|
354 |
-
|
355 |
-
#endregion
|
356 |
-
|
357 |
-
#----------------------------------------------------------------------------------
|
358 |
-
#region Plans
|
359 |
-
#----------------------------------------------------------------------------------
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Check if the user is on the free plan of the product.
|
363 |
-
*
|
364 |
-
* @since 1.0.4
|
365 |
-
*
|
366 |
-
* @return bool
|
367 |
-
*/
|
368 |
-
abstract function is_free_plan();
|
369 |
-
|
370 |
-
/**
|
371 |
-
* @since 1.0.2
|
372 |
-
*
|
373 |
-
* @param string $plan Plan name.
|
374 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
375 |
-
*
|
376 |
-
* @return bool
|
377 |
-
*/
|
378 |
-
abstract function is_plan( $plan, $exact = false );
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Check if plan based on trial. If not in trial mode, should return false.
|
382 |
-
*
|
383 |
-
* @since 1.0.9
|
384 |
-
*
|
385 |
-
* @param string $plan Plan name.
|
386 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
387 |
-
*
|
388 |
-
* @return bool
|
389 |
-
*/
|
390 |
-
abstract function is_trial_plan( $plan, $exact = false );
|
391 |
-
|
392 |
-
/**
|
393 |
-
* Check if plan matches active license' plan or active trial license' plan.
|
394 |
-
*
|
395 |
-
* @since 1.0.9
|
396 |
-
*
|
397 |
-
* @param string $plan Plan name.
|
398 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
399 |
-
*
|
400 |
-
* @return bool
|
401 |
-
*/
|
402 |
-
function is_plan_or_trial( $plan, $exact = false ) {
|
403 |
-
return $this->is_plan( $plan, $exact ) ||
|
404 |
-
$this->is_trial_plan( $plan, $exact );
|
405 |
-
}
|
406 |
-
|
407 |
-
/**
|
408 |
-
* Check if plugin has any paid plans.
|
409 |
-
*
|
410 |
-
* @author Vova Feldman (@svovaf)
|
411 |
-
* @since 1.0.7
|
412 |
-
*
|
413 |
-
* @return bool
|
414 |
-
*/
|
415 |
-
abstract function has_paid_plan();
|
416 |
-
|
417 |
-
/**
|
418 |
-
* Check if plugin has any free plan, or is it premium only.
|
419 |
-
*
|
420 |
-
* Note: If no plans configured, assume plugin is free.
|
421 |
-
*
|
422 |
-
* @author Vova Feldman (@svovaf)
|
423 |
-
* @since 1.0.7
|
424 |
-
*
|
425 |
-
* @return bool
|
426 |
-
*/
|
427 |
-
abstract function has_free_plan();
|
428 |
-
|
429 |
-
/**
|
430 |
-
* Check if plugin is premium only (no free plans).
|
431 |
-
*
|
432 |
-
* NOTE: is__premium_only() is very different method, don't get confused.
|
433 |
-
*
|
434 |
-
* @author Vova Feldman (@svovaf)
|
435 |
-
* @since 1.1.9
|
436 |
-
*
|
437 |
-
* @return bool
|
438 |
-
*/
|
439 |
-
abstract function is_only_premium();
|
440 |
-
|
441 |
-
/**
|
442 |
-
* Check if module has a premium code version.
|
443 |
-
*
|
444 |
-
* Serviceware module might be freemium without any
|
445 |
-
* premium code version, where the paid features
|
446 |
-
* are all part of the service.
|
447 |
-
*
|
448 |
-
* @author Vova Feldman (@svovaf)
|
449 |
-
* @since 1.2.1.6
|
450 |
-
*
|
451 |
-
* @return bool
|
452 |
-
*/
|
453 |
-
abstract function has_premium_version();
|
454 |
-
|
455 |
-
/**
|
456 |
-
* Check if module has any release on Freemius,
|
457 |
-
* or all plugin's code is on WordPress.org (Serviceware).
|
458 |
-
*
|
459 |
-
* @return bool
|
460 |
-
*/
|
461 |
-
function has_release_on_freemius() {
|
462 |
-
return ! $this->is_org_repo_compliant() ||
|
463 |
-
$this->has_premium_version();
|
464 |
-
}
|
465 |
-
|
466 |
-
/**
|
467 |
-
* Checks if it's a freemium plugin.
|
468 |
-
*
|
469 |
-
* @author Vova Feldman (@svovaf)
|
470 |
-
* @since 1.1.9
|
471 |
-
*
|
472 |
-
* @return bool
|
473 |
-
*/
|
474 |
-
function is_freemium() {
|
475 |
-
return $this->has_paid_plan() &&
|
476 |
-
$this->has_free_plan();
|
477 |
-
}
|
478 |
-
|
479 |
-
/**
|
480 |
-
* Check if module has only one plan.
|
481 |
-
*
|
482 |
-
* @author Vova Feldman (@svovaf)
|
483 |
-
* @since 1.2.1.7
|
484 |
-
*
|
485 |
-
* @return bool
|
486 |
-
*/
|
487 |
-
abstract function is_single_plan();
|
488 |
-
|
489 |
-
#endregion
|
490 |
-
|
491 |
-
/**
|
492 |
-
* Check if running payments in sandbox mode.
|
493 |
-
*
|
494 |
-
* @since 1.0.4
|
495 |
-
*
|
496 |
-
* @return bool
|
497 |
-
*/
|
498 |
-
abstract function is_payments_sandbox();
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Check if running test vs. live plugin.
|
502 |
-
*
|
503 |
-
* @since 1.0.5
|
504 |
-
*
|
505 |
-
* @return bool
|
506 |
-
*/
|
507 |
-
abstract function is_live();
|
508 |
-
|
509 |
-
/**
|
510 |
-
* Check if running premium plugin code.
|
511 |
-
*
|
512 |
-
* @since 1.0.5
|
513 |
-
*
|
514 |
-
* @return bool
|
515 |
-
*/
|
516 |
-
abstract function is_premium();
|
517 |
-
|
518 |
-
/**
|
519 |
-
* Get upgrade URL.
|
520 |
-
*
|
521 |
-
* @author Vova Feldman (@svovaf)
|
522 |
-
* @since 1.0.2
|
523 |
-
*
|
524 |
-
* @param string $period Billing cycle.
|
525 |
-
*
|
526 |
-
* @return string
|
527 |
-
*/
|
528 |
-
abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
|
529 |
-
|
530 |
-
/**
|
531 |
-
* Check if Freemius was first added in a plugin update.
|
532 |
-
*
|
533 |
-
* @author Vova Feldman (@svovaf)
|
534 |
-
* @since 1.1.5
|
535 |
-
*
|
536 |
-
* @return bool
|
537 |
-
*/
|
538 |
-
function is_plugin_update() {
|
539 |
-
return ! $this->is_plugin_new_install();
|
540 |
-
}
|
541 |
-
|
542 |
-
/**
|
543 |
-
* Check if Freemius was part of the plugin when the user installed it first.
|
544 |
-
*
|
545 |
-
* @author Vova Feldman (@svovaf)
|
546 |
-
* @since 1.1.5
|
547 |
-
*
|
548 |
-
* @return bool
|
549 |
-
*/
|
550 |
-
abstract function is_plugin_new_install();
|
551 |
-
|
552 |
-
#----------------------------------------------------------------------------------
|
553 |
-
#region Marketing
|
554 |
-
#----------------------------------------------------------------------------------
|
555 |
-
|
556 |
-
/**
|
557 |
-
* Check if current user purchased any other plugins before.
|
558 |
-
*
|
559 |
-
* @author Vova Feldman (@svovaf)
|
560 |
-
* @since 1.0.9
|
561 |
-
*
|
562 |
-
* @return bool
|
563 |
-
*/
|
564 |
-
abstract function has_purchased_before();
|
565 |
-
|
566 |
-
/**
|
567 |
-
* Check if current user classified as an agency.
|
568 |
-
*
|
569 |
-
* @author Vova Feldman (@svovaf)
|
570 |
-
* @since 1.0.9
|
571 |
-
*
|
572 |
-
* @return bool
|
573 |
-
*/
|
574 |
-
abstract function is_agency();
|
575 |
-
|
576 |
-
/**
|
577 |
-
* Check if current user classified as a developer.
|
578 |
-
*
|
579 |
-
* @author Vova Feldman (@svovaf)
|
580 |
-
* @since 1.0.9
|
581 |
-
*
|
582 |
-
* @return bool
|
583 |
-
*/
|
584 |
-
abstract function is_developer();
|
585 |
-
|
586 |
-
/**
|
587 |
-
* Check if current user classified as a business.
|
588 |
-
*
|
589 |
-
* @author Vova Feldman (@svovaf)
|
590 |
-
* @since 1.0.9
|
591 |
-
*
|
592 |
-
* @return bool
|
593 |
-
*/
|
594 |
-
abstract function is_business();
|
595 |
-
|
596 |
-
#endregion
|
597 |
}
|
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.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* - Each instance of Freemius class represents a single plugin
|
16 |
+
* install by a single user (the installer of the plugin).
|
17 |
+
*
|
18 |
+
* - Each website can only have one install of the same plugin.
|
19 |
+
*
|
20 |
+
* - Install entity is only created after a user connects his account with Freemius.
|
21 |
+
*
|
22 |
+
* Class Freemius_Abstract
|
23 |
+
*/
|
24 |
+
abstract class Freemius_Abstract {
|
25 |
+
|
26 |
+
#----------------------------------------------------------------------------------
|
27 |
+
#region Identity
|
28 |
+
#----------------------------------------------------------------------------------
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Check if user has connected his account (opted-in).
|
32 |
+
*
|
33 |
+
* Note:
|
34 |
+
* If the user opted-in and opted-out on a later stage,
|
35 |
+
* this will still return true. If you want to check if the
|
36 |
+
* user is currently opted-in, use:
|
37 |
+
* `$fs->is_registered() && $fs->is_tracking_allowed()`
|
38 |
+
*
|
39 |
+
* @since 1.0.1
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
abstract function is_registered();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Check if the user skipped connecting the account with Freemius.
|
46 |
+
*
|
47 |
+
* @since 1.0.7
|
48 |
+
*
|
49 |
+
* @return bool
|
50 |
+
*/
|
51 |
+
abstract function is_anonymous();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Check if the user currently in activation mode.
|
55 |
+
*
|
56 |
+
* @since 1.0.7
|
57 |
+
*
|
58 |
+
* @return bool
|
59 |
+
*/
|
60 |
+
abstract function is_activation_mode();
|
61 |
+
|
62 |
+
#endregion
|
63 |
+
|
64 |
+
#----------------------------------------------------------------------------------
|
65 |
+
#region Usage Tracking
|
66 |
+
#----------------------------------------------------------------------------------
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
70 |
+
*
|
71 |
+
* @author Leo Fajardo (@leorw)
|
72 |
+
* @since 1.2.1.5
|
73 |
+
*
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
abstract function is_tracking_allowed();
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Returns TRUE if the user never opted-in or manually opted-out.
|
80 |
+
*
|
81 |
+
* @author Vova Feldman (@svovaf)
|
82 |
+
* @since 1.2.1.5
|
83 |
+
*
|
84 |
+
* @return bool
|
85 |
+
*/
|
86 |
+
function is_tracking_prohibited() {
|
87 |
+
return ! $this->is_registered() || ! $this->is_tracking_allowed();
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Opt-out from usage tracking.
|
92 |
+
*
|
93 |
+
* Note: This will not delete the account information but will stop all tracking.
|
94 |
+
*
|
95 |
+
* Returns:
|
96 |
+
* 1. FALSE - If the user never opted-in.
|
97 |
+
* 2. TRUE - If successfully opted-out.
|
98 |
+
* 3. object - API Result on failure.
|
99 |
+
*
|
100 |
+
* @author Leo Fajardo (@leorw)
|
101 |
+
* @since 1.2.1.5
|
102 |
+
*
|
103 |
+
* @return bool|object
|
104 |
+
*/
|
105 |
+
abstract function stop_tracking();
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Opt-in back into usage tracking.
|
109 |
+
*
|
110 |
+
* Note: This will only work if the user opted-in previously.
|
111 |
+
*
|
112 |
+
* Returns:
|
113 |
+
* 1. FALSE - If the user never opted-in.
|
114 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
115 |
+
* 3. object - API result on failure.
|
116 |
+
*
|
117 |
+
* @author Leo Fajardo (@leorw)
|
118 |
+
* @since 1.2.1.5
|
119 |
+
*
|
120 |
+
* @return bool|object
|
121 |
+
*/
|
122 |
+
abstract function allow_tracking();
|
123 |
+
|
124 |
+
#endregion
|
125 |
+
|
126 |
+
#----------------------------------------------------------------------------------
|
127 |
+
#region Module Type
|
128 |
+
#----------------------------------------------------------------------------------
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Checks if the plugin's type is "plugin". The other type is "theme".
|
132 |
+
*
|
133 |
+
* @author Leo Fajardo (@leorw)
|
134 |
+
* @since 1.2.2
|
135 |
+
*
|
136 |
+
* @return bool
|
137 |
+
*/
|
138 |
+
abstract function is_plugin();
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Checks if the module type is "theme". The other type is "plugin".
|
142 |
+
*
|
143 |
+
* @author Leo Fajardo (@leorw)
|
144 |
+
* @since 1.2.2
|
145 |
+
*
|
146 |
+
* @return bool
|
147 |
+
*/
|
148 |
+
function is_theme() {
|
149 |
+
return ( ! $this->is_plugin() );
|
150 |
+
}
|
151 |
+
|
152 |
+
#endregion
|
153 |
+
|
154 |
+
#----------------------------------------------------------------------------------
|
155 |
+
#region Permissions
|
156 |
+
#----------------------------------------------------------------------------------
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Check if plugin must be WordPress.org compliant.
|
160 |
+
*
|
161 |
+
* @since 1.0.7
|
162 |
+
*
|
163 |
+
* @return bool
|
164 |
+
*/
|
165 |
+
abstract function is_org_repo_compliant();
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if plugin is allowed to install executable files.
|
169 |
+
*
|
170 |
+
* @author Vova Feldman (@svovaf)
|
171 |
+
* @since 1.0.5
|
172 |
+
*
|
173 |
+
* @return bool
|
174 |
+
*/
|
175 |
+
function is_allowed_to_install() {
|
176 |
+
return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
|
177 |
+
}
|
178 |
+
|
179 |
+
#endregion
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Check if user in trial or in free plan (not paying).
|
183 |
+
*
|
184 |
+
* @author Vova Feldman (@svovaf)
|
185 |
+
* @since 1.0.4
|
186 |
+
*
|
187 |
+
* @return bool
|
188 |
+
*/
|
189 |
+
function is_not_paying() {
|
190 |
+
return ( $this->is_trial() || $this->is_free_plan() );
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Check if the user has an activated and valid paid license on current plugin's install.
|
195 |
+
*
|
196 |
+
* @since 1.0.9
|
197 |
+
*
|
198 |
+
* @return bool
|
199 |
+
*/
|
200 |
+
abstract function is_paying();
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Check if the user is paying or in trial.
|
204 |
+
*
|
205 |
+
* @since 1.0.9
|
206 |
+
*
|
207 |
+
* @return bool
|
208 |
+
*/
|
209 |
+
function is_paying_or_trial() {
|
210 |
+
return ( $this->is_paying() || $this->is_trial() );
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Check if user in a trial or have feature enabled license.
|
215 |
+
*
|
216 |
+
* @author Vova Feldman (@svovaf)
|
217 |
+
* @since 1.1.7
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
*/
|
221 |
+
abstract function can_use_premium_code();
|
222 |
+
|
223 |
+
#----------------------------------------------------------------------------------
|
224 |
+
#region Premium Only
|
225 |
+
#----------------------------------------------------------------------------------
|
226 |
+
|
227 |
+
/**
|
228 |
+
* All logic wrapped in methods with "__premium_only()" suffix will be only
|
229 |
+
* included in the premium code.
|
230 |
+
*
|
231 |
+
* Example:
|
232 |
+
* if ( freemius()->is__premium_only() ) {
|
233 |
+
* ...
|
234 |
+
* }
|
235 |
+
*/
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Returns true when running premium plugin code.
|
239 |
+
*
|
240 |
+
* @since 1.0.9
|
241 |
+
*
|
242 |
+
* @return bool
|
243 |
+
*/
|
244 |
+
function is__premium_only() {
|
245 |
+
return $this->is_premium();
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Check if the user has an activated and valid paid license on current plugin's install.
|
250 |
+
*
|
251 |
+
* @since 1.0.9
|
252 |
+
*
|
253 |
+
* @return bool
|
254 |
+
*
|
255 |
+
*/
|
256 |
+
function is_paying__premium_only() {
|
257 |
+
return ( $this->is__premium_only() && $this->is_paying() );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* All code wrapped in this statement will be only included in the premium code.
|
262 |
+
*
|
263 |
+
* @since 1.0.9
|
264 |
+
*
|
265 |
+
* @param string $plan Plan name.
|
266 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
267 |
+
*
|
268 |
+
* @return bool
|
269 |
+
*/
|
270 |
+
function is_plan__premium_only( $plan, $exact = false ) {
|
271 |
+
return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Check if plan matches active license' plan or active trial license' plan.
|
276 |
+
*
|
277 |
+
* All code wrapped in this statement will be only included in the premium code.
|
278 |
+
*
|
279 |
+
* @since 1.0.9
|
280 |
+
*
|
281 |
+
* @param string $plan Plan name.
|
282 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
283 |
+
*
|
284 |
+
* @return bool
|
285 |
+
*/
|
286 |
+
function is_plan_or_trial__premium_only( $plan, $exact = false ) {
|
287 |
+
return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Check if the user is paying or in trial.
|
292 |
+
*
|
293 |
+
* All code wrapped in this statement will be only included in the premium code.
|
294 |
+
*
|
295 |
+
* @since 1.0.9
|
296 |
+
*
|
297 |
+
* @return bool
|
298 |
+
*/
|
299 |
+
function is_paying_or_trial__premium_only() {
|
300 |
+
return $this->is_premium() && $this->is_paying_or_trial();
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Check if the user has an activated and valid paid license on current plugin's install.
|
305 |
+
*
|
306 |
+
* @since 1.0.4
|
307 |
+
*
|
308 |
+
* @return bool
|
309 |
+
*
|
310 |
+
* @deprecated Method name is confusing since it's not clear from the name the code will be removed.
|
311 |
+
* @using Alias to is_paying__premium_only()
|
312 |
+
*/
|
313 |
+
function is_paying__fs__() {
|
314 |
+
return $this->is_paying__premium_only();
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Check if user in a trial or have feature enabled license.
|
319 |
+
*
|
320 |
+
* All code wrapped in this statement will be only included in the premium code.
|
321 |
+
*
|
322 |
+
* @author Vova Feldman (@svovaf)
|
323 |
+
* @since 1.1.9
|
324 |
+
*
|
325 |
+
* @return bool
|
326 |
+
*/
|
327 |
+
function can_use_premium_code__premium_only() {
|
328 |
+
return $this->is_premium() && $this->can_use_premium_code();
|
329 |
+
}
|
330 |
+
|
331 |
+
#endregion
|
332 |
+
|
333 |
+
#----------------------------------------------------------------------------------
|
334 |
+
#region Trial
|
335 |
+
#----------------------------------------------------------------------------------
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Check if the user in a trial.
|
339 |
+
*
|
340 |
+
* @since 1.0.3
|
341 |
+
*
|
342 |
+
* @return bool
|
343 |
+
*/
|
344 |
+
abstract function is_trial();
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Check if trial already utilized.
|
348 |
+
*
|
349 |
+
* @since 1.0.9
|
350 |
+
*
|
351 |
+
* @return bool
|
352 |
+
*/
|
353 |
+
abstract function is_trial_utilized();
|
354 |
+
|
355 |
+
#endregion
|
356 |
+
|
357 |
+
#----------------------------------------------------------------------------------
|
358 |
+
#region Plans
|
359 |
+
#----------------------------------------------------------------------------------
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Check if the user is on the free plan of the product.
|
363 |
+
*
|
364 |
+
* @since 1.0.4
|
365 |
+
*
|
366 |
+
* @return bool
|
367 |
+
*/
|
368 |
+
abstract function is_free_plan();
|
369 |
+
|
370 |
+
/**
|
371 |
+
* @since 1.0.2
|
372 |
+
*
|
373 |
+
* @param string $plan Plan name.
|
374 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
375 |
+
*
|
376 |
+
* @return bool
|
377 |
+
*/
|
378 |
+
abstract function is_plan( $plan, $exact = false );
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Check if plan based on trial. If not in trial mode, should return false.
|
382 |
+
*
|
383 |
+
* @since 1.0.9
|
384 |
+
*
|
385 |
+
* @param string $plan Plan name.
|
386 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
387 |
+
*
|
388 |
+
* @return bool
|
389 |
+
*/
|
390 |
+
abstract function is_trial_plan( $plan, $exact = false );
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Check if plan matches active license' plan or active trial license' plan.
|
394 |
+
*
|
395 |
+
* @since 1.0.9
|
396 |
+
*
|
397 |
+
* @param string $plan Plan name.
|
398 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
399 |
+
*
|
400 |
+
* @return bool
|
401 |
+
*/
|
402 |
+
function is_plan_or_trial( $plan, $exact = false ) {
|
403 |
+
return $this->is_plan( $plan, $exact ) ||
|
404 |
+
$this->is_trial_plan( $plan, $exact );
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Check if plugin has any paid plans.
|
409 |
+
*
|
410 |
+
* @author Vova Feldman (@svovaf)
|
411 |
+
* @since 1.0.7
|
412 |
+
*
|
413 |
+
* @return bool
|
414 |
+
*/
|
415 |
+
abstract function has_paid_plan();
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Check if plugin has any free plan, or is it premium only.
|
419 |
+
*
|
420 |
+
* Note: If no plans configured, assume plugin is free.
|
421 |
+
*
|
422 |
+
* @author Vova Feldman (@svovaf)
|
423 |
+
* @since 1.0.7
|
424 |
+
*
|
425 |
+
* @return bool
|
426 |
+
*/
|
427 |
+
abstract function has_free_plan();
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Check if plugin is premium only (no free plans).
|
431 |
+
*
|
432 |
+
* NOTE: is__premium_only() is very different method, don't get confused.
|
433 |
+
*
|
434 |
+
* @author Vova Feldman (@svovaf)
|
435 |
+
* @since 1.1.9
|
436 |
+
*
|
437 |
+
* @return bool
|
438 |
+
*/
|
439 |
+
abstract function is_only_premium();
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Check if module has a premium code version.
|
443 |
+
*
|
444 |
+
* Serviceware module might be freemium without any
|
445 |
+
* premium code version, where the paid features
|
446 |
+
* are all part of the service.
|
447 |
+
*
|
448 |
+
* @author Vova Feldman (@svovaf)
|
449 |
+
* @since 1.2.1.6
|
450 |
+
*
|
451 |
+
* @return bool
|
452 |
+
*/
|
453 |
+
abstract function has_premium_version();
|
454 |
+
|
455 |
+
/**
|
456 |
+
* Check if module has any release on Freemius,
|
457 |
+
* or all plugin's code is on WordPress.org (Serviceware).
|
458 |
+
*
|
459 |
+
* @return bool
|
460 |
+
*/
|
461 |
+
function has_release_on_freemius() {
|
462 |
+
return ! $this->is_org_repo_compliant() ||
|
463 |
+
$this->has_premium_version();
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Checks if it's a freemium plugin.
|
468 |
+
*
|
469 |
+
* @author Vova Feldman (@svovaf)
|
470 |
+
* @since 1.1.9
|
471 |
+
*
|
472 |
+
* @return bool
|
473 |
+
*/
|
474 |
+
function is_freemium() {
|
475 |
+
return $this->has_paid_plan() &&
|
476 |
+
$this->has_free_plan();
|
477 |
+
}
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Check if module has only one plan.
|
481 |
+
*
|
482 |
+
* @author Vova Feldman (@svovaf)
|
483 |
+
* @since 1.2.1.7
|
484 |
+
*
|
485 |
+
* @return bool
|
486 |
+
*/
|
487 |
+
abstract function is_single_plan();
|
488 |
+
|
489 |
+
#endregion
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Check if running payments in sandbox mode.
|
493 |
+
*
|
494 |
+
* @since 1.0.4
|
495 |
+
*
|
496 |
+
* @return bool
|
497 |
+
*/
|
498 |
+
abstract function is_payments_sandbox();
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Check if running test vs. live plugin.
|
502 |
+
*
|
503 |
+
* @since 1.0.5
|
504 |
+
*
|
505 |
+
* @return bool
|
506 |
+
*/
|
507 |
+
abstract function is_live();
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Check if running premium plugin code.
|
511 |
+
*
|
512 |
+
* @since 1.0.5
|
513 |
+
*
|
514 |
+
* @return bool
|
515 |
+
*/
|
516 |
+
abstract function is_premium();
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Get upgrade URL.
|
520 |
+
*
|
521 |
+
* @author Vova Feldman (@svovaf)
|
522 |
+
* @since 1.0.2
|
523 |
+
*
|
524 |
+
* @param string $period Billing cycle.
|
525 |
+
*
|
526 |
+
* @return string
|
527 |
+
*/
|
528 |
+
abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Check if Freemius was first added in a plugin update.
|
532 |
+
*
|
533 |
+
* @author Vova Feldman (@svovaf)
|
534 |
+
* @since 1.1.5
|
535 |
+
*
|
536 |
+
* @return bool
|
537 |
+
*/
|
538 |
+
function is_plugin_update() {
|
539 |
+
return ! $this->is_plugin_new_install();
|
540 |
+
}
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Check if Freemius was part of the plugin when the user installed it first.
|
544 |
+
*
|
545 |
+
* @author Vova Feldman (@svovaf)
|
546 |
+
* @since 1.1.5
|
547 |
+
*
|
548 |
+
* @return bool
|
549 |
+
*/
|
550 |
+
abstract function is_plugin_new_install();
|
551 |
+
|
552 |
+
#----------------------------------------------------------------------------------
|
553 |
+
#region Marketing
|
554 |
+
#----------------------------------------------------------------------------------
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Check if current user purchased any other plugins before.
|
558 |
+
*
|
559 |
+
* @author Vova Feldman (@svovaf)
|
560 |
+
* @since 1.0.9
|
561 |
+
*
|
562 |
+
* @return bool
|
563 |
+
*/
|
564 |
+
abstract function has_purchased_before();
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Check if current user classified as an agency.
|
568 |
+
*
|
569 |
+
* @author Vova Feldman (@svovaf)
|
570 |
+
* @since 1.0.9
|
571 |
+
*
|
572 |
+
* @return bool
|
573 |
+
*/
|
574 |
+
abstract function is_agency();
|
575 |
+
|
576 |
+
/**
|
577 |
+
* Check if current user classified as a developer.
|
578 |
+
*
|
579 |
+
* @author Vova Feldman (@svovaf)
|
580 |
+
* @since 1.0.9
|
581 |
+
*
|
582 |
+
* @return bool
|
583 |
+
*/
|
584 |
+
abstract function is_developer();
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Check if current user classified as a business.
|
588 |
+
*
|
589 |
+
* @author Vova Feldman (@svovaf)
|
590 |
+
* @since 1.0.9
|
591 |
+
*
|
592 |
+
* @return bool
|
593 |
+
*/
|
594 |
+
abstract function is_business();
|
595 |
+
|
596 |
+
#endregion
|
597 |
}
|
includes/freemius/includes/class-freemius.php
CHANGED
@@ -1042,7 +1042,7 @@
|
|
1042 |
}
|
1043 |
|
1044 |
if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
|
1045 |
-
$this->_storage->subscriptions = array( $this->_storage->subscription );
|
1046 |
}
|
1047 |
}
|
1048 |
|
@@ -1639,6 +1639,7 @@
|
|
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' ) );
|
@@ -5407,6 +5408,62 @@
|
|
5407 |
}
|
5408 |
}
|
5409 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5410 |
/**
|
5411 |
* Parse plugin's settings (as defined by the plugin dev).
|
5412 |
*
|
@@ -5915,12 +5972,16 @@
|
|
5915 |
* @return Freemius[]
|
5916 |
*/
|
5917 |
function get_installed_addons() {
|
|
|
|
|
|
|
|
|
|
|
5918 |
$installed_addons = array();
|
|
|
5919 |
foreach ( self::$_instances as $instance ) {
|
5920 |
-
if ( $instance->
|
5921 |
-
|
5922 |
-
$installed_addons[] = $instance;
|
5923 |
-
}
|
5924 |
}
|
5925 |
}
|
5926 |
|
@@ -5970,7 +6031,25 @@
|
|
5970 |
* @return bool
|
5971 |
*/
|
5972 |
function is_addon() {
|
5973 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5974 |
}
|
5975 |
|
5976 |
/**
|
@@ -6727,6 +6806,8 @@
|
|
6727 |
} else {
|
6728 |
$this->sync_install();
|
6729 |
}
|
|
|
|
|
6730 |
}
|
6731 |
}
|
6732 |
}
|
@@ -6939,6 +7020,8 @@
|
|
6939 |
} else {
|
6940 |
$this->sync_install( array(), true );
|
6941 |
}
|
|
|
|
|
6942 |
}
|
6943 |
}
|
6944 |
|
@@ -7720,11 +7803,16 @@
|
|
7720 |
return;
|
7721 |
}
|
7722 |
|
7723 |
-
$license = $this->
|
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(
|
@@ -7740,11 +7828,11 @@
|
|
7740 |
'put',
|
7741 |
array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
|
7742 |
);
|
7743 |
-
|
7744 |
if ( ! FS_Api::is_api_error( $install ) ) {
|
7745 |
$this->_sync_addon_license( $this->get_id(), true );
|
7746 |
}
|
7747 |
}
|
|
|
7748 |
}
|
7749 |
|
7750 |
|
@@ -7763,20 +7851,22 @@
|
|
7763 |
|
7764 |
$license = ( ! is_null( $license ) ) ?
|
7765 |
$license :
|
7766 |
-
$this->
|
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 |
-
|
7775 |
if ( count( $sites ) > $license->left() ) {
|
7776 |
// If the add-on is network active, try to activate the license only if it can be activated on all sites.
|
7777 |
return;
|
7778 |
}
|
7779 |
-
|
7780 |
// Opt in with a license key.
|
7781 |
$this->opt_in(
|
7782 |
$parent_fs->get_user()->email,
|
@@ -7792,56 +7882,207 @@
|
|
7792 |
} else {
|
7793 |
$blog_2_install_map = array();
|
7794 |
$site_ids = array();
|
7795 |
-
|
7796 |
$all_sites = Freemius::get_sites();
|
7797 |
-
|
7798 |
foreach ( $all_sites as $site ) {
|
7799 |
$blog_id = Freemius::get_site_blog_id( $site );
|
7800 |
$install = $this->get_install_by_blog_id( $blog_id );
|
7801 |
-
|
7802 |
if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
|
7803 |
// Skip license activation for installs that are already associated with a license.
|
7804 |
continue;
|
7805 |
}
|
7806 |
-
|
7807 |
if ( is_object( $install ) ) {
|
7808 |
$blog_2_install_map[ $blog_id ] = $install;
|
7809 |
} else {
|
7810 |
$site_ids[] = $blog_id;
|
7811 |
}
|
7812 |
}
|
7813 |
-
|
7814 |
if ( ( count( $blog_2_install_map ) + count( $site_ids ) ) > $license->left() ) {
|
7815 |
return;
|
7816 |
}
|
7817 |
-
|
7818 |
$user = $this->get_current_or_network_user();
|
7819 |
-
|
7820 |
if ( ! empty( $blog_2_install_map ) ) {
|
7821 |
$result = $this->activate_license_on_many_installs( $user, $license->secret_key, $blog_2_install_map );
|
7822 |
-
|
7823 |
if ( true !== $result ) {
|
7824 |
return;
|
7825 |
}
|
7826 |
}
|
7827 |
-
|
7828 |
if ( ! empty( $site_ids ) ) {
|
7829 |
$this->activate_license_on_many_sites( $user, $license->secret_key, $site_ids );
|
7830 |
}
|
7831 |
}
|
7832 |
}
|
7833 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7834 |
/**
|
7835 |
* @author Leo Fajardo (@leorw)
|
7836 |
* @since 2.3.0
|
7837 |
*
|
|
|
|
|
7838 |
* @return FS_Plugin_License
|
7839 |
*/
|
7840 |
-
|
7841 |
$parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
|
7842 |
-
$parent_instance = $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
7843 |
|
7844 |
-
$foreign_licenses = $
|
7845 |
self::get_all_licenses( $this->get_parent_id() )
|
7846 |
);
|
7847 |
|
@@ -7855,7 +8096,7 @@
|
|
7855 |
$parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
|
7856 |
}
|
7857 |
|
7858 |
-
$result = $
|
7859 |
|
7860 |
if (
|
7861 |
! $this->is_api_result_object( $result, 'licenses' ) ||
|
@@ -7865,9 +8106,30 @@
|
|
7865 |
return null;
|
7866 |
}
|
7867 |
|
7868 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7869 |
|
7870 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7871 |
}
|
7872 |
|
7873 |
/**
|
@@ -8006,6 +8268,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 +9049,28 @@
|
|
8783 |
$include_themes = true,
|
8784 |
$include_blog_data = true
|
8785 |
) {
|
8786 |
-
if (
|
8787 |
-
|
8788 |
-
|
8789 |
-
|
8790 |
-
|
8791 |
-
$
|
8792 |
-
|
8793 |
-
$
|
|
|
|
|
8794 |
}
|
8795 |
}
|
8796 |
-
}
|
8797 |
|
8798 |
-
|
8799 |
-
|
8800 |
-
|
8801 |
-
|
8802 |
-
|
8803 |
-
|
8804 |
-
|
8805 |
-
|
|
|
8806 |
}
|
8807 |
}
|
8808 |
}
|
@@ -9158,6 +9426,21 @@
|
|
9158 |
}
|
9159 |
}
|
9160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9161 |
/**
|
9162 |
* Update install only if changed.
|
9163 |
*
|
@@ -9441,6 +9724,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 ) ||
|
@@ -9893,7 +10178,7 @@
|
|
9893 |
* @return array[number]FS_User
|
9894 |
*/
|
9895 |
static function get_all_users() {
|
9896 |
-
$users = self
|
9897 |
|
9898 |
if ( ! is_array( $users ) ) {
|
9899 |
$users = array();
|
@@ -9937,7 +10222,7 @@
|
|
9937 |
$option_name = $module_type . '_' . $option_name;
|
9938 |
}
|
9939 |
|
9940 |
-
return self
|
9941 |
}
|
9942 |
|
9943 |
/**
|
@@ -9985,6 +10270,54 @@
|
|
9985 |
self::$_accounts->set_option( $option_name, $option_value, $store, $network_level_or_blog_id );
|
9986 |
}
|
9987 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9988 |
/**
|
9989 |
* @author Vova Feldman (@svovaf)
|
9990 |
* @since 1.0.6
|
@@ -10168,7 +10501,7 @@
|
|
10168 |
* @return FS_Plugin_Tag[]
|
10169 |
*/
|
10170 |
private static function get_all_updates() {
|
10171 |
-
$updates = self
|
10172 |
|
10173 |
if ( ! is_array( $updates ) ) {
|
10174 |
$updates = array();
|
@@ -10184,7 +10517,7 @@
|
|
10184 |
* @return array<number,FS_Plugin[]>|false
|
10185 |
*/
|
10186 |
private static function get_all_addons() {
|
10187 |
-
$addons = self
|
10188 |
|
10189 |
if ( ! is_array( $addons ) ) {
|
10190 |
$addons = array();
|
@@ -10197,7 +10530,7 @@
|
|
10197 |
* @author Vova Feldman (@svovaf)
|
10198 |
* @since 1.0.6
|
10199 |
*
|
10200 |
-
* @return
|
10201 |
*/
|
10202 |
private static function get_all_account_addons() {
|
10203 |
$addons = self::$_accounts->get_option( 'account_addons', array() );
|
@@ -10442,7 +10775,7 @@
|
|
10442 |
|
10443 |
if ( ! fs_is_network_admin() ) {
|
10444 |
// Get blog-level activated installations.
|
10445 |
-
$sites = self
|
10446 |
} else {
|
10447 |
$sites = null;
|
10448 |
|
@@ -10451,7 +10784,7 @@
|
|
10451 |
) {
|
10452 |
if ( FS_Site::is_valid_id( $addon_storage->network_install_blog_id ) ) {
|
10453 |
// Get network-level activated installations.
|
10454 |
-
$sites = self
|
10455 |
'sites',
|
10456 |
array(),
|
10457 |
$addon_storage->network_install_blog_id
|
@@ -10510,14 +10843,14 @@
|
|
10510 |
|
10511 |
$addon_info['site'] = $site;
|
10512 |
|
10513 |
-
$plugins_data = self
|
10514 |
if ( isset( $plugins_data[ $slug ] ) ) {
|
10515 |
$plugin_data = $plugins_data[ $slug ];
|
10516 |
|
10517 |
$addon_info['version'] = $plugin_data->version;
|
10518 |
}
|
10519 |
|
10520 |
-
$all_plans = self
|
10521 |
if ( isset( $all_plans[ $slug ] ) ) {
|
10522 |
$plans = $all_plans[ $slug ];
|
10523 |
|
@@ -10530,7 +10863,7 @@
|
|
10530 |
}
|
10531 |
}
|
10532 |
|
10533 |
-
$licenses = self
|
10534 |
if ( is_array( $licenses ) && isset( $licenses[ $addon_id ] ) ) {
|
10535 |
foreach ( $licenses[ $addon_id ] as $license ) {
|
10536 |
if ( $license->id == $site->license_id ) {
|
@@ -10544,7 +10877,9 @@
|
|
10544 |
if ( isset( $addon_storage->subscriptions ) &&
|
10545 |
! empty( $addon_storage->subscriptions )
|
10546 |
) {
|
10547 |
-
|
|
|
|
|
10548 |
if ( $subscription->license_id == $site->license_id ) {
|
10549 |
$addon_info['subscription'] = $subscription;
|
10550 |
break;
|
@@ -11272,7 +11607,22 @@
|
|
11272 |
|
11273 |
// Update current license.
|
11274 |
if ( is_object( $this->_license ) ) {
|
11275 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11276 |
}
|
11277 |
|
11278 |
return $this->_licenses;
|
@@ -11721,6 +12071,14 @@
|
|
11721 |
function _update_site_license( $new_license ) {
|
11722 |
$this->_logger->entrance();
|
11723 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11724 |
$this->set_license( $new_license );
|
11725 |
|
11726 |
if ( ! is_object( $new_license ) ) {
|
@@ -12048,7 +12406,7 @@
|
|
12048 |
return null;
|
12049 |
}
|
12050 |
|
12051 |
-
foreach ( $this->_storage->subscriptions as $subscription ) {
|
12052 |
if ( $subscription->license_id == $license_id ) {
|
12053 |
return $subscription;
|
12054 |
}
|
@@ -12074,7 +12432,7 @@
|
|
12074 |
return;
|
12075 |
}
|
12076 |
|
12077 |
-
$subscriptions = $this->_storage->subscriptions;
|
12078 |
|
12079 |
$updated_subscription = false;
|
12080 |
foreach ( $subscriptions as $key => $existing_subscription ) {
|
@@ -12169,7 +12527,7 @@
|
|
12169 |
}
|
12170 |
|
12171 |
$current_plan_order = - 1;
|
12172 |
-
$required_plan_order =
|
12173 |
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
12174 |
if ( $plan === $this->_plans[ $i ]->name ) {
|
12175 |
$required_plan_order = $i;
|
@@ -12326,6 +12684,65 @@
|
|
12326 |
fs_require_template( 'forms/resend-key.php', $vars );
|
12327 |
}
|
12328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12329 |
/**
|
12330 |
* @author Leo Fajardo (@leorw)
|
12331 |
* @since 2.3.1
|
@@ -12447,7 +12864,17 @@
|
|
12447 |
return;
|
12448 |
}
|
12449 |
|
12450 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12451 |
// Only add license activation logic to the premium version, or in case of a serviceware plugin, also in the free version.
|
12452 |
return;
|
12453 |
}
|
@@ -12474,6 +12901,55 @@
|
|
12474 |
$this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
|
12475 |
}
|
12476 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12477 |
/**
|
12478 |
* @author Leo Fajardo (@leorw)
|
12479 |
* @since 2.0.2
|
@@ -12563,7 +13039,7 @@
|
|
12563 |
*/
|
12564 |
function _activate_license_ajax_action() {
|
12565 |
$this->_logger->entrance();
|
12566 |
-
|
12567 |
$this->check_ajax_referer( 'activate_license' );
|
12568 |
|
12569 |
$license_key = trim( fs_request_get( 'license_key' ) );
|
@@ -12572,21 +13048,109 @@
|
|
12572 |
exit;
|
12573 |
}
|
12574 |
|
|
|
|
|
|
|
|
|
12575 |
$result = $this->activate_license(
|
12576 |
$license_key,
|
12577 |
-
|
12578 |
-
fs_request_get( 'sites', array(), 'post' ) :
|
12579 |
-
array(),
|
12580 |
fs_request_get_bool( 'is_marketing_allowed', null ),
|
12581 |
fs_request_get( 'blog_id', null ),
|
12582 |
-
fs_request_get( 'module_id', null, 'post' )
|
|
|
|
|
12583 |
);
|
12584 |
|
|
|
|
|
|
|
|
|
12585 |
echo json_encode( $result );
|
12586 |
|
12587 |
exit;
|
12588 |
}
|
12589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12590 |
/**
|
12591 |
* A helper method to activate migrated licenses. If the product is network activated and integrated, the method will network activate the license.
|
12592 |
*
|
@@ -12596,6 +13160,8 @@
|
|
12596 |
* @param string $license_key
|
12597 |
* @param null|bool $is_marketing_allowed
|
12598 |
* @param null|number $plugin_id
|
|
|
|
|
12599 |
*
|
12600 |
* @return array {
|
12601 |
* @var bool $success
|
@@ -12608,17 +13174,19 @@
|
|
12608 |
function activate_migrated_license(
|
12609 |
$license_key,
|
12610 |
$is_marketing_allowed = null,
|
12611 |
-
$plugin_id = null
|
|
|
|
|
12612 |
) {
|
12613 |
$this->_logger->entrance();
|
12614 |
|
12615 |
$result = $this->activate_license(
|
12616 |
$license_key,
|
12617 |
-
$this->is_network_active() ?
|
12618 |
$this->get_sites_for_network_level_optin() :
|
12619 |
-
|
12620 |
$is_marketing_allowed,
|
12621 |
-
|
12622 |
$plugin_id
|
12623 |
);
|
12624 |
|
@@ -12639,6 +13207,7 @@
|
|
12639 |
* @param null|bool $is_marketing_allowed
|
12640 |
* @param null|int $blog_id
|
12641 |
* @param null|number $plugin_id
|
|
|
12642 |
*
|
12643 |
* @return array {
|
12644 |
* @var bool $success
|
@@ -12651,7 +13220,9 @@
|
|
12651 |
$sites = array(),
|
12652 |
$is_marketing_allowed = null,
|
12653 |
$blog_id = null,
|
12654 |
-
$plugin_id = null
|
|
|
|
|
12655 |
) {
|
12656 |
$this->_logger->entrance();
|
12657 |
|
@@ -12666,6 +13237,8 @@
|
|
12666 |
$this :
|
12667 |
$this->get_addon_instance( $plugin_id );
|
12668 |
|
|
|
|
|
12669 |
$error = false;
|
12670 |
$next_page = false;
|
12671 |
|
@@ -12739,6 +13312,22 @@
|
|
12739 |
'license_key' => $fs->apply_filters( 'license_key', $license_key )
|
12740 |
);
|
12741 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12742 |
$api = $fs->get_api_site_scope();
|
12743 |
|
12744 |
$install = $api->call( $fs->add_show_pending( '/' ), 'put', $params );
|
@@ -12749,6 +13338,14 @@
|
|
12749 |
var_export( $install->error, true );
|
12750 |
} else {
|
12751 |
$fs->reconnect_locally( $has_valid_blog_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12752 |
}
|
12753 |
} else /* ( $fs->is_addon() && $fs->get_parent_instance()->is_registered() ) */ {
|
12754 |
$result = $fs->activate_license_on_site( $user, $license_key );
|
@@ -12764,8 +13361,15 @@
|
|
12764 |
if ( empty( $error ) ) {
|
12765 |
$fs->network_upgrade_mode_completed();
|
12766 |
|
|
|
|
|
|
|
|
|
|
|
12767 |
$fs->_sync_license( true, $has_valid_blog_id );
|
12768 |
|
|
|
|
|
12769 |
$next_page = $fs->is_addon() ?
|
12770 |
$fs->get_parent_instance()->get_account_url() :
|
12771 |
$fs->get_account_url();
|
@@ -12872,6 +13476,64 @@
|
|
12872 |
return $result;
|
12873 |
}
|
12874 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12875 |
/**
|
12876 |
* @author Leo Fajardo (@leorw)
|
12877 |
* @since 1.2.3.1
|
@@ -15310,7 +15972,7 @@
|
|
15310 |
/**
|
15311 |
* This is a special fault tolerance mechanism to handle a scenario that the user data is missing.
|
15312 |
*/
|
15313 |
-
$user = $this->
|
15314 |
}
|
15315 |
|
15316 |
$this->_user = ( $user instanceof FS_User ) ?
|
@@ -15350,13 +16012,19 @@
|
|
15350 |
* @author Vova Feldman (@svovaf)
|
15351 |
* @since 2.0.0
|
15352 |
*
|
|
|
|
|
15353 |
* @return \FS_User|mixed
|
15354 |
*/
|
15355 |
-
private function
|
|
|
|
|
|
|
|
|
15356 |
$api = $this->get_api_site_scope();
|
15357 |
|
15358 |
$uid = $this->get_anonymous_id();
|
15359 |
-
$request_path = "/users/{$
|
15360 |
|
15361 |
$result = $api->get( $request_path, false, WP_FS__TIME_10_MIN_IN_SEC );
|
15362 |
|
@@ -15786,6 +16454,9 @@
|
|
15786 |
( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
|
15787 |
$decoded->is_marketing_allowed :
|
15788 |
null ),
|
|
|
|
|
|
|
15789 |
$decoded->install_id,
|
15790 |
$decoded->install_public_key,
|
15791 |
$decoded->install_secret_key,
|
@@ -15799,6 +16470,9 @@
|
|
15799 |
( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
|
15800 |
$decoded->is_marketing_allowed :
|
15801 |
null ),
|
|
|
|
|
|
|
15802 |
$decoded->installs,
|
15803 |
false
|
15804 |
);
|
@@ -16025,6 +16699,7 @@
|
|
16025 |
fs_request_get( 'user_public_key' ),
|
16026 |
fs_request_get( 'user_secret_key' ),
|
16027 |
fs_request_get_bool( 'is_marketing_allowed', null ),
|
|
|
16028 |
$pending_sites_info['blog_ids'],
|
16029 |
$pending_sites_info['license_key'],
|
16030 |
$pending_sites_info['trial_plan_id']
|
@@ -16035,6 +16710,7 @@
|
|
16035 |
fs_request_get( 'user_public_key' ),
|
16036 |
fs_request_get( 'user_secret_key' ),
|
16037 |
fs_request_get_bool( 'is_marketing_allowed', null ),
|
|
|
16038 |
fs_request_get( 'install_id' ),
|
16039 |
fs_request_get( 'install_public_key' ),
|
16040 |
fs_request_get( 'install_secret_key' ),
|
@@ -16090,13 +16766,12 @@
|
|
16090 |
* @param string $user_public_key
|
16091 |
* @param string $user_secret_key
|
16092 |
* @param bool|null $is_marketing_allowed
|
|
|
16093 |
* @param number $install_id
|
16094 |
* @param string $install_public_key
|
16095 |
* @param string $install_secret_key
|
16096 |
* @param bool $redirect
|
16097 |
-
* @param bool $auto_install
|
16098 |
-
* redirect (or return a URL) to the account page with a special parameter to
|
16099 |
-
* trigger the auto installation processes.
|
16100 |
*
|
16101 |
* @return string If redirect is `false`, returns the next page the user should be redirected to.
|
16102 |
*/
|
@@ -16105,6 +16780,7 @@
|
|
16105 |
$user_public_key,
|
16106 |
$user_secret_key,
|
16107 |
$is_marketing_allowed,
|
|
|
16108 |
$install_id,
|
16109 |
$install_public_key,
|
16110 |
$install_secret_key,
|
@@ -16146,6 +16822,10 @@
|
|
16146 |
$this->disable_opt_in_notice_and_lock_user();
|
16147 |
}
|
16148 |
|
|
|
|
|
|
|
|
|
16149 |
return $this->setup_account(
|
16150 |
$this->_user,
|
16151 |
$this->_site,
|
@@ -16164,6 +16844,7 @@
|
|
16164 |
* @param string $user_public_key
|
16165 |
* @param string $user_secret_key
|
16166 |
* @param bool|null $is_marketing_allowed
|
|
|
16167 |
* @param array $site_ids
|
16168 |
* @param bool $license_key
|
16169 |
* @param bool $trial_plan_id
|
@@ -16176,6 +16857,7 @@
|
|
16176 |
$user_public_key,
|
16177 |
$user_secret_key,
|
16178 |
$is_marketing_allowed,
|
|
|
16179 |
$site_ids,
|
16180 |
$license_key = false,
|
16181 |
$trial_plan_id = false,
|
@@ -16187,6 +16869,10 @@
|
|
16187 |
$this->disable_opt_in_notice_and_lock_user();
|
16188 |
}
|
16189 |
|
|
|
|
|
|
|
|
|
16190 |
$sites = array();
|
16191 |
foreach ( $site_ids as $site_id ) {
|
16192 |
$sites[] = $this->get_site_info( array( 'blog_id' => $site_id ) );
|
@@ -16205,11 +16891,10 @@
|
|
16205 |
* @param string $user_public_key
|
16206 |
* @param string $user_secret_key
|
16207 |
* @param bool|null $is_marketing_allowed
|
|
|
16208 |
* @param object[] $installs
|
16209 |
* @param bool $redirect
|
16210 |
-
* @param bool $auto_install
|
16211 |
-
* redirect (or return a URL) to the account page with a special parameter to
|
16212 |
-
* trigger the auto installation processes.
|
16213 |
*
|
16214 |
* @return string If redirect is `false`, returns the next page the user should be redirected to.
|
16215 |
*/
|
@@ -16218,6 +16903,7 @@
|
|
16218 |
$user_public_key,
|
16219 |
$user_secret_key,
|
16220 |
$is_marketing_allowed,
|
|
|
16221 |
array $installs,
|
16222 |
$redirect = true,
|
16223 |
$auto_install = false
|
@@ -16228,6 +16914,10 @@
|
|
16228 |
$this->disable_opt_in_notice_and_lock_user();
|
16229 |
}
|
16230 |
|
|
|
|
|
|
|
|
|
16231 |
$install_ids = array();
|
16232 |
|
16233 |
foreach ( $installs as $install ) {
|
@@ -16337,6 +17027,8 @@
|
|
16337 |
*/
|
16338 |
$license_key = fs_request_get( 'license_secret_key' );
|
16339 |
|
|
|
|
|
16340 |
$this->install_with_current_user( $license_key );
|
16341 |
}
|
16342 |
}
|
@@ -16629,6 +17321,9 @@
|
|
16629 |
if ( ! fs_is_network_admin() ) {
|
16630 |
// Try to activate premium license.
|
16631 |
$this->_activate_license( true );
|
|
|
|
|
|
|
16632 |
} else {
|
16633 |
$license_id = fs_request_get( 'license_id' );
|
16634 |
|
@@ -18050,23 +18745,27 @@
|
|
18050 |
|
18051 |
$sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );
|
18052 |
|
18053 |
-
$
|
|
|
18054 |
|
18055 |
-
|
18056 |
-
|
18057 |
-
|
18058 |
-
|
18059 |
-
|
18060 |
-
|
18061 |
-
|
18062 |
-
|
18063 |
-
|
18064 |
-
|
18065 |
-
|
18066 |
-
|
18067 |
-
|
18068 |
-
|
18069 |
-
|
|
|
|
|
|
|
18070 |
}
|
18071 |
|
18072 |
$sites[ $this->_slug ] = $site_clone;
|
@@ -19898,7 +20597,11 @@
|
|
19898 |
|
19899 |
if ( $show_notice ) {
|
19900 |
$this->_admin_notices->add(
|
19901 |
-
sprintf( $this->
|
|
|
|
|
|
|
|
|
19902 |
$this->get_text_inline( 'O.K', 'ok' )
|
19903 |
);
|
19904 |
}
|
@@ -20705,6 +21408,39 @@
|
|
20705 |
return true;
|
20706 |
}
|
20707 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20708 |
/**
|
20709 |
* Handle user name update.
|
20710 |
*
|
@@ -20873,8 +21609,9 @@
|
|
20873 |
// Alias.
|
20874 |
$oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
|
20875 |
|
20876 |
-
$is_network_action
|
20877 |
-
$blog_id
|
|
|
20878 |
|
20879 |
if ( is_numeric( $blog_id ) ) {
|
20880 |
$this->switch_to_blog( $blog_id );
|
@@ -20886,7 +21623,7 @@
|
|
20886 |
case 'opt_in':
|
20887 |
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
|
20888 |
|
20889 |
-
if ( $
|
20890 |
if ( $is_network_action && ! empty( $blog_id ) ) {
|
20891 |
if ( ! $this->is_registered() ) {
|
20892 |
$this->install_with_user(
|
@@ -20909,7 +21646,7 @@
|
|
20909 |
case 'toggle_tracking':
|
20910 |
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
|
20911 |
|
20912 |
-
if ( $
|
20913 |
if ( $is_network_action && ! empty( $blog_id ) ) {
|
20914 |
if ( $this->is_registered() ) {
|
20915 |
if ( $this->is_tracking_prohibited() ) {
|
@@ -20944,8 +21681,20 @@
|
|
20944 |
case 'delete_account':
|
20945 |
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
|
20946 |
|
20947 |
-
|
20948 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20949 |
$this->delete_network_account_event();
|
20950 |
} else {
|
20951 |
$this->delete_account_event();
|
@@ -20961,7 +21710,12 @@
|
|
20961 |
} else {
|
20962 |
if ( $this->is_addon_activated( $plugin_id ) ) {
|
20963 |
$fs_addon = self::get_instance_by_id( $plugin_id );
|
20964 |
-
|
|
|
|
|
|
|
|
|
|
|
20965 |
|
20966 |
fs_redirect( $this->_get_admin_page_url( 'account' ) );
|
20967 |
}
|
@@ -21009,6 +21763,18 @@
|
|
21009 |
|
21010 |
if ( is_object( $fs ) ) {
|
21011 |
$fs->_activate_license();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21012 |
}
|
21013 |
|
21014 |
return;
|
@@ -22104,9 +22870,18 @@
|
|
22104 |
|
22105 |
$this->_logger->entrance();
|
22106 |
|
22107 |
-
|
|
|
|
|
|
|
|
|
22108 |
// Don't add opt-in/out for premium code base.
|
22109 |
return;
|
|
|
|
|
|
|
|
|
|
|
22110 |
}
|
22111 |
|
22112 |
if ( fs_is_network_admin() ) {
|
@@ -22159,6 +22934,10 @@
|
|
22159 |
return;
|
22160 |
}
|
22161 |
|
|
|
|
|
|
|
|
|
22162 |
$link_text_id = '';
|
22163 |
$url = '#';
|
22164 |
|
@@ -23707,8 +24486,8 @@
|
|
23707 |
}
|
23708 |
|
23709 |
$modules = array_merge(
|
23710 |
-
array_values( self
|
23711 |
-
array_values( self
|
23712 |
);
|
23713 |
|
23714 |
foreach ( $modules as $module ) {
|
@@ -23813,10 +24592,45 @@
|
|
23813 |
*
|
23814 |
* @author Vova Feldman (@svovaf)
|
23815 |
*/
|
23816 |
-
self::shoot_ajax_success( array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23817 |
}
|
23818 |
|
23819 |
-
|
23820 |
}
|
23821 |
|
23822 |
/**
|
@@ -23852,8 +24666,8 @@
|
|
23852 |
}
|
23853 |
|
23854 |
$modules = array_merge(
|
23855 |
-
array_values( self
|
23856 |
-
array_values( self
|
23857 |
);
|
23858 |
|
23859 |
foreach ( $modules as $key => $module ) {
|
1042 |
}
|
1043 |
|
1044 |
if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
|
1045 |
+
$this->_storage->subscriptions = array( fs_get_entity( $this->_storage->subscription, FS_Subscription::get_class_name() ) );
|
1046 |
}
|
1047 |
}
|
1048 |
|
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 |
+
add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
|
1643 |
|
1644 |
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1645 |
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
5408 |
}
|
5409 |
}
|
5410 |
|
5411 |
+
/**
|
5412 |
+
* @author Vova Feldman (@svovaf)
|
5413 |
+
* @since 2.3.2
|
5414 |
+
*
|
5415 |
+
* @return bool
|
5416 |
+
*/
|
5417 |
+
function is_extensions_tracking_allowed() {
|
5418 |
+
return (true === $this->_storage->get( 'is_extensions_tracking_allowed', true ) );
|
5419 |
+
}
|
5420 |
+
|
5421 |
+
/**
|
5422 |
+
* @author Vova Feldman (@svovaf)
|
5423 |
+
* @since 2.3.2
|
5424 |
+
*/
|
5425 |
+
function _update_tracking_permission_callback() {
|
5426 |
+
$this->_logger->entrance();
|
5427 |
+
|
5428 |
+
$this->check_ajax_referer( 'update_tracking_permission' );
|
5429 |
+
|
5430 |
+
$is_enabled = fs_request_get_bool( 'is_enabled', null );
|
5431 |
+
|
5432 |
+
if ( ! is_bool( $is_enabled ) ) {
|
5433 |
+
self::shoot_ajax_failure();
|
5434 |
+
}
|
5435 |
+
|
5436 |
+
$permission = fs_request_get( 'permission' );
|
5437 |
+
|
5438 |
+
switch ( $permission ) {
|
5439 |
+
case 'extensions':
|
5440 |
+
$this->update_extensions_tracking_flag( $is_enabled );
|
5441 |
+
break;
|
5442 |
+
default:
|
5443 |
+
$permission = 'no_match';
|
5444 |
+
}
|
5445 |
+
|
5446 |
+
if ( 'no_match' === $permission ) {
|
5447 |
+
self::shoot_ajax_failure();
|
5448 |
+
}
|
5449 |
+
|
5450 |
+
self::shoot_ajax_success( array(
|
5451 |
+
'permissions' => array(
|
5452 |
+
$permission => $is_enabled,
|
5453 |
+
)
|
5454 |
+
) );
|
5455 |
+
}
|
5456 |
+
|
5457 |
+
/**
|
5458 |
+
* @author Leo Fajardo (@leorw)
|
5459 |
+
* @since 2.3.2
|
5460 |
+
*
|
5461 |
+
* @param bool $is_enabled
|
5462 |
+
*/
|
5463 |
+
private function update_extensions_tracking_flag( $is_enabled ) {
|
5464 |
+
$this->_storage->store( 'is_extensions_tracking_allowed', $is_enabled );
|
5465 |
+
}
|
5466 |
+
|
5467 |
/**
|
5468 |
* Parse plugin's settings (as defined by the plugin dev).
|
5469 |
*
|
5972 |
* @return Freemius[]
|
5973 |
*/
|
5974 |
function get_installed_addons() {
|
5975 |
+
if ( $this->is_addon() ) {
|
5976 |
+
// Add-on cannot have add-ons.
|
5977 |
+
return array();
|
5978 |
+
}
|
5979 |
+
|
5980 |
$installed_addons = array();
|
5981 |
+
|
5982 |
foreach ( self::$_instances as $instance ) {
|
5983 |
+
if ( $instance->is_addon_of( $this->_plugin->id ) ) {
|
5984 |
+
$installed_addons[] = $instance;
|
|
|
|
|
5985 |
}
|
5986 |
}
|
5987 |
|
6031 |
* @return bool
|
6032 |
*/
|
6033 |
function is_addon() {
|
6034 |
+
return (
|
6035 |
+
isset( $this->_plugin->parent_plugin_id ) &&
|
6036 |
+
is_numeric( $this->_plugin->parent_plugin_id )
|
6037 |
+
);
|
6038 |
+
}
|
6039 |
+
|
6040 |
+
/**
|
6041 |
+
* @author Vova Feldman (@svovaf)
|
6042 |
+
* @since 2.3.2
|
6043 |
+
*
|
6044 |
+
* @param number $parent_product_id
|
6045 |
+
*
|
6046 |
+
* @return bool
|
6047 |
+
*/
|
6048 |
+
function is_addon_of( $parent_product_id ) {
|
6049 |
+
return (
|
6050 |
+
$this->is_addon() &&
|
6051 |
+
$parent_product_id == $this->_plugin->parent_plugin_id
|
6052 |
+
);
|
6053 |
}
|
6054 |
|
6055 |
/**
|
6806 |
} else {
|
6807 |
$this->sync_install();
|
6808 |
}
|
6809 |
+
|
6810 |
+
$this->maybe_sync_install_user();
|
6811 |
}
|
6812 |
}
|
6813 |
}
|
7020 |
} else {
|
7021 |
$this->sync_install( array(), true );
|
7022 |
}
|
7023 |
+
|
7024 |
+
$this->maybe_sync_install_user();
|
7025 |
}
|
7026 |
}
|
7027 |
|
7803 |
return;
|
7804 |
}
|
7805 |
|
7806 |
+
$license = $this->get_active_parent_license();
|
7807 |
if ( ! is_object( $license ) ) {
|
7808 |
return;
|
7809 |
}
|
7810 |
|
7811 |
+
if ( ! empty( $license->products ) ) {
|
7812 |
+
$this->activate_bundle_license( $license );
|
7813 |
+
return;
|
7814 |
+
}
|
7815 |
+
|
7816 |
if ( ! $this->is_registered() ) {
|
7817 |
// Opt in with a license key.
|
7818 |
$this->opt_in(
|
7828 |
'put',
|
7829 |
array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
|
7830 |
);
|
|
|
7831 |
if ( ! FS_Api::is_api_error( $install ) ) {
|
7832 |
$this->_sync_addon_license( $this->get_id(), true );
|
7833 |
}
|
7834 |
}
|
7835 |
+
|
7836 |
}
|
7837 |
|
7838 |
|
7851 |
|
7852 |
$license = ( ! is_null( $license ) ) ?
|
7853 |
$license :
|
7854 |
+
$this->get_active_parent_license();
|
7855 |
|
7856 |
if ( ! is_object( $license ) ) {
|
7857 |
return;
|
7858 |
}
|
7859 |
|
7860 |
+
if ( ! empty( $license->products ) ) {
|
7861 |
+
$this->activate_bundle_license( $license );
|
7862 |
+
return;
|
7863 |
+
}
|
7864 |
if ( ! $this->is_network_registered() ) {
|
7865 |
$sites = $this->get_sites_for_network_level_optin();
|
|
|
7866 |
if ( count( $sites ) > $license->left() ) {
|
7867 |
// If the add-on is network active, try to activate the license only if it can be activated on all sites.
|
7868 |
return;
|
7869 |
}
|
|
|
7870 |
// Opt in with a license key.
|
7871 |
$this->opt_in(
|
7872 |
$parent_fs->get_user()->email,
|
7882 |
} else {
|
7883 |
$blog_2_install_map = array();
|
7884 |
$site_ids = array();
|
|
|
7885 |
$all_sites = Freemius::get_sites();
|
|
|
7886 |
foreach ( $all_sites as $site ) {
|
7887 |
$blog_id = Freemius::get_site_blog_id( $site );
|
7888 |
$install = $this->get_install_by_blog_id( $blog_id );
|
|
|
7889 |
if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
|
7890 |
// Skip license activation for installs that are already associated with a license.
|
7891 |
continue;
|
7892 |
}
|
|
|
7893 |
if ( is_object( $install ) ) {
|
7894 |
$blog_2_install_map[ $blog_id ] = $install;
|
7895 |
} else {
|
7896 |
$site_ids[] = $blog_id;
|
7897 |
}
|
7898 |
}
|
|
|
7899 |
if ( ( count( $blog_2_install_map ) + count( $site_ids ) ) > $license->left() ) {
|
7900 |
return;
|
7901 |
}
|
|
|
7902 |
$user = $this->get_current_or_network_user();
|
|
|
7903 |
if ( ! empty( $blog_2_install_map ) ) {
|
7904 |
$result = $this->activate_license_on_many_installs( $user, $license->secret_key, $blog_2_install_map );
|
|
|
7905 |
if ( true !== $result ) {
|
7906 |
return;
|
7907 |
}
|
7908 |
}
|
|
|
7909 |
if ( ! empty( $site_ids ) ) {
|
7910 |
$this->activate_license_on_many_sites( $user, $license->secret_key, $site_ids );
|
7911 |
}
|
7912 |
}
|
7913 |
}
|
7914 |
|
7915 |
+
/**
|
7916 |
+
* Tries to activate a bundle license for all supported products if the current product is activated with a
|
7917 |
+
* bundle license. This is called after activating an available license (not via the license activation dialog
|
7918 |
+
* but by clicking on a license activation button) for a product via its "Account" page.
|
7919 |
+
*
|
7920 |
+
* @author Leo Fajardo (@leorw)
|
7921 |
+
* @since 2.3.0.4
|
7922 |
+
*
|
7923 |
+
* @param string $license_key
|
7924 |
+
* @param array $sites
|
7925 |
+
* @param int $blog_id
|
7926 |
+
*/
|
7927 |
+
private function maybe_activate_bundle_license( $license_key = null, $sites = array(), $blog_id = 0 ) {
|
7928 |
+
if ( is_null( $license_key ) && $this->has_active_valid_license() ) {
|
7929 |
+
$license_key = $this->_license->secret_key;
|
7930 |
+
}
|
7931 |
+
if ( is_null( $license_key ) ) {
|
7932 |
+
return;
|
7933 |
+
}
|
7934 |
+
$parent_license = $this->get_active_parent_license( $license_key );
|
7935 |
+
if ( is_object( $parent_license ) ) {
|
7936 |
+
$this->activate_bundle_license( $parent_license, $sites, $blog_id );
|
7937 |
+
}
|
7938 |
+
}
|
7939 |
+
|
7940 |
+
/**
|
7941 |
+
* @author Leo Fajardo (@leorw)
|
7942 |
+
* @since 2.3.0.4
|
7943 |
+
*
|
7944 |
+
* @param FS_Plugin_License $license
|
7945 |
+
*
|
7946 |
+
* @param array $sites
|
7947 |
+
* @param int $current_blog_id
|
7948 |
+
*/
|
7949 |
+
private function activate_bundle_license( $license, $sites = array(), $current_blog_id = 0 ) {
|
7950 |
+
$is_network_admin = fs_is_network_admin();
|
7951 |
+
|
7952 |
+
$installs_by_blog_map = array();
|
7953 |
+
$site_info_by_blog_map = array();
|
7954 |
+
|
7955 |
+
|
7956 |
+
/**
|
7957 |
+
* Try to activate the license for all supported products.
|
7958 |
+
*
|
7959 |
+
* @author Leo Fajardo
|
7960 |
+
*/
|
7961 |
+
foreach ( $license->products as $product_id ) {
|
7962 |
+
|
7963 |
+
if ( $this->get_id() == $product_id ) {
|
7964 |
+
continue;
|
7965 |
+
}
|
7966 |
+
|
7967 |
+
$fs = self::get_instance_by_id( $product_id );
|
7968 |
+
|
7969 |
+
if ( ! is_object( $fs ) ) {
|
7970 |
+
continue;
|
7971 |
+
}
|
7972 |
+
|
7973 |
+
if ( ! $fs->has_paid_plan() ) {
|
7974 |
+
continue;
|
7975 |
+
}
|
7976 |
+
|
7977 |
+
if (
|
7978 |
+
! $fs->is_addon() &&
|
7979 |
+
! FS_Plan_Manager::instance()->has_paid_plan( $fs->_plans )
|
7980 |
+
) {
|
7981 |
+
/**
|
7982 |
+
* The parent product can be free-only but can have its `has_paid_plan` flag set to `true` when
|
7983 |
+
* there is a context bundle.
|
7984 |
+
*
|
7985 |
+
* @author Leo Fajardo (@leorw)
|
7986 |
+
* @since 2.3.2
|
7987 |
+
*/
|
7988 |
+
continue;
|
7989 |
+
}
|
7990 |
+
|
7991 |
+
if ( $current_blog_id > 0 ) {
|
7992 |
+
$fs->switch_to_blog( $current_blog_id );
|
7993 |
+
}
|
7994 |
+
|
7995 |
+
if ( $fs->has_active_valid_license() ) {
|
7996 |
+
continue;
|
7997 |
+
}
|
7998 |
+
if ( ! $is_network_admin || $current_blog_id > 0 ) {
|
7999 |
+
if ( $fs->is_network_active() && ! $fs->is_delegated_connection( $current_blog_id ) ) {
|
8000 |
+
// Do not try to activate the license in the site level if the product is network active and the connection was not delegated.
|
8001 |
+
continue;
|
8002 |
+
}
|
8003 |
+
} else {
|
8004 |
+
if ( empty( $sites ) ) {
|
8005 |
+
$sites = self::get_sites();
|
8006 |
+
}
|
8007 |
+
|
8008 |
+
if ( ! $fs->is_network_active() ) {
|
8009 |
+
// Do not try to activate the license in the network level if the product is not network active.
|
8010 |
+
continue;
|
8011 |
+
} else if ( $fs->is_network_delegated_connection() ) {
|
8012 |
+
// Do not try to activate the license in the network level if the activation has been delegated to site admins.
|
8013 |
+
continue;
|
8014 |
+
} else {
|
8015 |
+
$has_install_with_license = false;
|
8016 |
+
foreach ( $sites as $site ) {
|
8017 |
+
if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
|
8018 |
+
continue;
|
8019 |
+
}
|
8020 |
+
$blog_id = $site['blog_id'];
|
8021 |
+
if ( ! isset( $installs_by_blog_map[ $blog_id ] ) ) {
|
8022 |
+
$installs_by_blog_map[ $blog_id ] = self::get_all_sites( $fs->get_module_type(), $blog_id );
|
8023 |
+
}
|
8024 |
+
$installs = $installs_by_blog_map[ $blog_id ];
|
8025 |
+
$install = null;
|
8026 |
+
if ( isset( $installs[ $fs->get_slug() ] ) ) {
|
8027 |
+
$install = $installs[ $fs->get_slug() ];
|
8028 |
+
if ( is_object( $install ) &&
|
8029 |
+
is_numeric( $install->id ) &&
|
8030 |
+
is_numeric( $install->user_id ) &&
|
8031 |
+
FS_Plugin_Plan::is_valid_id( $install->plan_id )
|
8032 |
+
) {
|
8033 |
+
// Load site.
|
8034 |
+
$install = clone $install;
|
8035 |
+
} else {
|
8036 |
+
$install = null;
|
8037 |
+
}
|
8038 |
+
}
|
8039 |
+
if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
|
8040 |
+
$has_install_with_license = true;
|
8041 |
+
break;
|
8042 |
+
}
|
8043 |
+
if ( ! $fs->is_site_delegated_connection( $blog_id ) && ! is_object( $install ) ) {
|
8044 |
+
if ( ! isset( $site_info_by_blog_map[ $blog_id ] ) ) {
|
8045 |
+
$site_info_by_blog_map[ $blog_id ] = $fs->get_site_info( $site );
|
8046 |
+
}
|
8047 |
+
$product_sites[] = $site_info_by_blog_map[ $blog_id ];
|
8048 |
+
}
|
8049 |
+
}
|
8050 |
+
if ( $has_install_with_license ) {
|
8051 |
+
// Do not try to activate the license in the network level if there's any install with a license.
|
8052 |
+
continue;
|
8053 |
+
}
|
8054 |
+
}
|
8055 |
+
}
|
8056 |
+
|
8057 |
+
$fs->activate_migrated_license(
|
8058 |
+
$license->secret_key,
|
8059 |
+
null,
|
8060 |
+
null,
|
8061 |
+
$sites,
|
8062 |
+
( $current_blog_id > 0 ? $current_blog_id : null )
|
8063 |
+
);
|
8064 |
+
}
|
8065 |
+
}
|
8066 |
+
|
8067 |
/**
|
8068 |
* @author Leo Fajardo (@leorw)
|
8069 |
* @since 2.3.0
|
8070 |
*
|
8071 |
+
* @param string|null $license_key
|
8072 |
+
*
|
8073 |
* @return FS_Plugin_License
|
8074 |
*/
|
8075 |
+
function get_active_parent_license( $license_key = null ) {
|
8076 |
$parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
|
8077 |
+
$parent_instance = $this->is_addon() ?
|
8078 |
+
$this->get_parent_instance() :
|
8079 |
+
null;
|
8080 |
+
|
8081 |
+
$fs = ( ! is_null( $parent_instance ) && $parent_instance->is_registered() ) ?
|
8082 |
+
$parent_instance :
|
8083 |
+
$this;
|
8084 |
|
8085 |
+
$foreign_licenses = $fs->get_foreign_licenses_info(
|
8086 |
self::get_all_licenses( $this->get_parent_id() )
|
8087 |
);
|
8088 |
|
8096 |
$parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
|
8097 |
}
|
8098 |
|
8099 |
+
$result = $fs->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, true );
|
8100 |
|
8101 |
if (
|
8102 |
! $this->is_api_result_object( $result, 'licenses' ) ||
|
8106 |
return null;
|
8107 |
}
|
8108 |
|
8109 |
+
if (
|
8110 |
+
! $this->is_api_result_object( $result, 'licenses' ) ||
|
8111 |
+
! is_array( $result->licenses ) ||
|
8112 |
+
empty( $result->licenses )
|
8113 |
+
) {
|
8114 |
+
return null;
|
8115 |
+
}
|
8116 |
|
8117 |
+
$parent_license = null;
|
8118 |
+
if ( empty( $license_key ) ) {
|
8119 |
+
$parent_license = $result->licenses[ 0 ];
|
8120 |
+
} else {
|
8121 |
+
foreach ( $result->licenses as $license ) {
|
8122 |
+
if ( $license_key === $license->secret_key ) {
|
8123 |
+
$parent_license = $license;
|
8124 |
+
break;
|
8125 |
+
}
|
8126 |
+
}
|
8127 |
+
}
|
8128 |
+
if ( ! is_null( $parent_license ) ) {
|
8129 |
+
$parent_license = new FS_Plugin_License( $parent_license );
|
8130 |
+
}
|
8131 |
+
|
8132 |
+
return $parent_license;
|
8133 |
}
|
8134 |
|
8135 |
/**
|
8268 |
foreach ( $sites as $site ) {
|
8269 |
$blog_id = self::get_site_blog_id( $site );
|
8270 |
|
8271 |
+
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
8272 |
+
continue;
|
8273 |
+
}
|
8274 |
+
|
8275 |
$install_id = $this->_delete_site( true, $blog_id );
|
8276 |
|
8277 |
// Clear all storage data.
|
9049 |
$include_themes = true,
|
9050 |
$include_blog_data = true
|
9051 |
) {
|
9052 |
+
if ( $this->is_extensions_tracking_allowed() ) {
|
9053 |
+
if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
|
9054 |
+
/**
|
9055 |
+
* @since 1.1.8 Also send plugin updates.
|
9056 |
+
*/
|
9057 |
+
if ( $include_plugins && ! isset( $override['plugins'] ) ) {
|
9058 |
+
$plugins = $this->get_plugins_data_for_api();
|
9059 |
+
if ( ! empty( $plugins ) ) {
|
9060 |
+
$override['plugins'] = $plugins;
|
9061 |
+
}
|
9062 |
}
|
9063 |
}
|
|
|
9064 |
|
9065 |
+
if ( ! defined( 'WP_FS__TRACK_THEMES' ) || false !== WP_FS__TRACK_THEMES ) {
|
9066 |
+
/**
|
9067 |
+
* @since 1.1.8 Also send themes updates.
|
9068 |
+
*/
|
9069 |
+
if ( $include_themes && ! isset( $override['themes'] ) ) {
|
9070 |
+
$themes = $this->get_themes_data_for_api();
|
9071 |
+
if ( ! empty( $themes ) ) {
|
9072 |
+
$override['themes'] = $themes;
|
9073 |
+
}
|
9074 |
}
|
9075 |
}
|
9076 |
}
|
9426 |
}
|
9427 |
}
|
9428 |
|
9429 |
+
/**
|
9430 |
+
* Syncs the install owner's data if needed (i.e., if the install owner is different from the loaded user).
|
9431 |
+
*
|
9432 |
+
* @author Leo Fajardo (@leorw)
|
9433 |
+
* @since 2.3.2
|
9434 |
+
*/
|
9435 |
+
private function maybe_sync_install_user() {
|
9436 |
+
if ( $this->_user->id == $this->_site->user_id ) {
|
9437 |
+
return;
|
9438 |
+
}
|
9439 |
+
|
9440 |
+
// Fetch user data and store if found.
|
9441 |
+
$this->sync_user_by_current_install();
|
9442 |
+
}
|
9443 |
+
|
9444 |
/**
|
9445 |
* Update install only if changed.
|
9446 |
*
|
9724 |
$fs = self::get_instance_by_file( $plugin_file );
|
9725 |
|
9726 |
if ( is_object( $fs ) ) {
|
9727 |
+
$fs->remove_sdk_reference();
|
9728 |
+
|
9729 |
self::require_plugin_essentials();
|
9730 |
|
9731 |
if ( is_plugin_active( $fs->_free_plugin_basename ) ||
|
10178 |
* @return array[number]FS_User
|
10179 |
*/
|
10180 |
static function get_all_users() {
|
10181 |
+
$users = self::maybe_get_entities_account_option( 'users', array() );
|
10182 |
|
10183 |
if ( ! is_array( $users ) ) {
|
10184 |
$users = array();
|
10222 |
$option_name = $module_type . '_' . $option_name;
|
10223 |
}
|
10224 |
|
10225 |
+
return self::maybe_get_entities_account_option( $option_name, array(), $network_level_or_blog_id );
|
10226 |
}
|
10227 |
|
10228 |
/**
|
10270 |
self::$_accounts->set_option( $option_name, $option_value, $store, $network_level_or_blog_id );
|
10271 |
}
|
10272 |
|
10273 |
+
/**
|
10274 |
+
* This method can also return non-entity or non-entities collection option like the `user_id_license_ids_map` option.
|
10275 |
+
*
|
10276 |
+
* @author Leo Fajardo (@leorw)
|
10277 |
+
* @since 2.3.1
|
10278 |
+
*
|
10279 |
+
* @param string $option_name
|
10280 |
+
* @param mixed $default
|
10281 |
+
* @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite storage (if there's a network). When `false`, use the current context blog storage. When `null`, the decision which storage to use (MS vs. Current S) will be handled internally and determined based on the $option (based on self::$_SITE_LEVEL_PARAMS).
|
10282 |
+
*
|
10283 |
+
* @return mixed|FS_Plugin[]|FS_User[]|FS_Site[]|FS_Plugin_License[]|FS_Plugin_Plan[]|FS_Plugin_Tag[]
|
10284 |
+
*/
|
10285 |
+
private static function maybe_get_entities_account_option( $option_name, $default = null, $network_level_or_blog_id = null ) {
|
10286 |
+
$option = self::$_accounts->get_option( $option_name, $default, $network_level_or_blog_id );
|
10287 |
+
|
10288 |
+
$class_name = '';
|
10289 |
+
|
10290 |
+
switch ( $option_name ) {
|
10291 |
+
case 'plugins':
|
10292 |
+
case 'themes':
|
10293 |
+
case 'addons':
|
10294 |
+
$class_name = FS_Plugin::get_class_name();
|
10295 |
+
break;
|
10296 |
+
case 'users':
|
10297 |
+
$class_name = FS_User::get_class_name();
|
10298 |
+
break;
|
10299 |
+
case 'sites':
|
10300 |
+
$class_name = FS_Site::get_class_name();
|
10301 |
+
break;
|
10302 |
+
case 'licenses':
|
10303 |
+
case 'all_licenses':
|
10304 |
+
$class_name = FS_Plugin_License::get_class_name();
|
10305 |
+
break;
|
10306 |
+
case 'plans':
|
10307 |
+
$class_name = FS_Plugin_Plan::get_class_name();
|
10308 |
+
break;
|
10309 |
+
case 'updates':
|
10310 |
+
$class_name = FS_Plugin_Tag::get_class_name();
|
10311 |
+
break;
|
10312 |
+
}
|
10313 |
+
|
10314 |
+
if ( empty( $class_name ) ) {
|
10315 |
+
return $option;
|
10316 |
+
}
|
10317 |
+
|
10318 |
+
return fs_get_entities( $option, $class_name );
|
10319 |
+
}
|
10320 |
+
|
10321 |
/**
|
10322 |
* @author Vova Feldman (@svovaf)
|
10323 |
* @since 1.0.6
|
10501 |
* @return FS_Plugin_Tag[]
|
10502 |
*/
|
10503 |
private static function get_all_updates() {
|
10504 |
+
$updates = self::maybe_get_entities_account_option( 'updates', array() );
|
10505 |
|
10506 |
if ( ! is_array( $updates ) ) {
|
10507 |
$updates = array();
|
10517 |
* @return array<number,FS_Plugin[]>|false
|
10518 |
*/
|
10519 |
private static function get_all_addons() {
|
10520 |
+
$addons = self::maybe_get_entities_account_option( 'addons', array() );
|
10521 |
|
10522 |
if ( ! is_array( $addons ) ) {
|
10523 |
$addons = array();
|
10530 |
* @author Vova Feldman (@svovaf)
|
10531 |
* @since 1.0.6
|
10532 |
*
|
10533 |
+
* @return number[]|false
|
10534 |
*/
|
10535 |
private static function get_all_account_addons() {
|
10536 |
$addons = self::$_accounts->get_option( 'account_addons', array() );
|
10775 |
|
10776 |
if ( ! fs_is_network_admin() ) {
|
10777 |
// Get blog-level activated installations.
|
10778 |
+
$sites = self::maybe_get_entities_account_option( 'sites', array() );
|
10779 |
} else {
|
10780 |
$sites = null;
|
10781 |
|
10784 |
) {
|
10785 |
if ( FS_Site::is_valid_id( $addon_storage->network_install_blog_id ) ) {
|
10786 |
// Get network-level activated installations.
|
10787 |
+
$sites = self::maybe_get_entities_account_option(
|
10788 |
'sites',
|
10789 |
array(),
|
10790 |
$addon_storage->network_install_blog_id
|
10843 |
|
10844 |
$addon_info['site'] = $site;
|
10845 |
|
10846 |
+
$plugins_data = self::maybe_get_entities_account_option( WP_FS__MODULE_TYPE_PLUGIN . 's', array() );
|
10847 |
if ( isset( $plugins_data[ $slug ] ) ) {
|
10848 |
$plugin_data = $plugins_data[ $slug ];
|
10849 |
|
10850 |
$addon_info['version'] = $plugin_data->version;
|
10851 |
}
|
10852 |
|
10853 |
+
$all_plans = self::maybe_get_entities_account_option( 'plans', array() );
|
10854 |
if ( isset( $all_plans[ $slug ] ) ) {
|
10855 |
$plans = $all_plans[ $slug ];
|
10856 |
|
10863 |
}
|
10864 |
}
|
10865 |
|
10866 |
+
$licenses = self::maybe_get_entities_account_option( 'all_licenses', array() );
|
10867 |
if ( is_array( $licenses ) && isset( $licenses[ $addon_id ] ) ) {
|
10868 |
foreach ( $licenses[ $addon_id ] as $license ) {
|
10869 |
if ( $license->id == $site->license_id ) {
|
10877 |
if ( isset( $addon_storage->subscriptions ) &&
|
10878 |
! empty( $addon_storage->subscriptions )
|
10879 |
) {
|
10880 |
+
$addon_subscriptions = fs_get_entities( $addon_storage->subscriptions, FS_Subscription::get_class_name() );
|
10881 |
+
|
10882 |
+
foreach ( $addon_subscriptions as $subscription ) {
|
10883 |
if ( $subscription->license_id == $site->license_id ) {
|
10884 |
$addon_info['subscription'] = $subscription;
|
10885 |
break;
|
11607 |
|
11608 |
// Update current license.
|
11609 |
if ( is_object( $this->_license ) ) {
|
11610 |
+
$license = $this->_get_license_by_id( $this->_license->id );
|
11611 |
+
|
11612 |
+
if ( is_object( $license ) ) {
|
11613 |
+
/**
|
11614 |
+
* `$license` can be `false` in case a user change action has just been completed and this method
|
11615 |
+
* has synced the `$this->_licenses` collection for the new user. In this case, the
|
11616 |
+
* `$this->_licenses` collection may have only the newly activated license that is associated with
|
11617 |
+
* the new user. `set_license` will eventually be called in the same request by the logic that
|
11618 |
+
* follows outside this method which will detect that the install's license has been updated, and
|
11619 |
+
* then `_update_site_license` will be called which in turn will call `set_license`.
|
11620 |
+
*
|
11621 |
+
* @author Leo Fajardo (@leorw)
|
11622 |
+
* @since 2.3.2
|
11623 |
+
*/
|
11624 |
+
$this->set_license( $license );
|
11625 |
+
}
|
11626 |
}
|
11627 |
|
11628 |
return $this->_licenses;
|
12071 |
function _update_site_license( $new_license ) {
|
12072 |
$this->_logger->entrance();
|
12073 |
|
12074 |
+
/**
|
12075 |
+
* In case this call will be removed in the future, the `_sync_licenses()` method needs to be updated
|
12076 |
+
* accordingly so that it will also handle the case when an ownership change is done via license
|
12077 |
+
* activation.
|
12078 |
+
*
|
12079 |
+
* @author Leo Fajardo (@leorw)
|
12080 |
+
* @since 2.3.2
|
12081 |
+
*/
|
12082 |
$this->set_license( $new_license );
|
12083 |
|
12084 |
if ( ! is_object( $new_license ) ) {
|
12406 |
return null;
|
12407 |
}
|
12408 |
|
12409 |
+
foreach ( fs_get_entities( $this->_storage->subscriptions, FS_Subscription::get_class_name() ) as $subscription ) {
|
12410 |
if ( $subscription->license_id == $license_id ) {
|
12411 |
return $subscription;
|
12412 |
}
|
12432 |
return;
|
12433 |
}
|
12434 |
|
12435 |
+
$subscriptions = fs_get_entities( $this->_storage->subscriptions, FS_Subscription::get_class_name() );
|
12436 |
|
12437 |
$updated_subscription = false;
|
12438 |
foreach ( $subscriptions as $key => $existing_subscription ) {
|
12527 |
}
|
12528 |
|
12529 |
$current_plan_order = - 1;
|
12530 |
+
$required_plan_order = PHP_INT_MAX;
|
12531 |
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
12532 |
if ( $plan === $this->_plans[ $i ]->name ) {
|
12533 |
$required_plan_order = $i;
|
12684 |
fs_require_template( 'forms/resend-key.php', $vars );
|
12685 |
}
|
12686 |
|
12687 |
+
/**
|
12688 |
+
* Returns a collection of IDs of installs that are associated with the context product and its add-ons, and activated with foreign licenses.
|
12689 |
+
*
|
12690 |
+
* @author Leo Fajardo (@leorw)
|
12691 |
+
* @since 2.3.2
|
12692 |
+
*
|
12693 |
+
* @return number[]
|
12694 |
+
*/
|
12695 |
+
function get_installs_ids_with_foreign_licenses() {
|
12696 |
+
$installs = array();
|
12697 |
+
|
12698 |
+
if (
|
12699 |
+
is_object( $this->_license ) &&
|
12700 |
+
$this->_site->user_id != $this->_license->user_id
|
12701 |
+
) {
|
12702 |
+
$installs[] = $this->_site->id;
|
12703 |
+
}
|
12704 |
+
|
12705 |
+
/**
|
12706 |
+
* Also try to get foreign licenses for the context product's add-ons.
|
12707 |
+
*/
|
12708 |
+
$installs_by_slug_map = $this->get_parent_and_addons_installs_info();
|
12709 |
+
|
12710 |
+
foreach ( $installs_by_slug_map as $slug => $install_info ) {
|
12711 |
+
if ( $slug == $this->get_slug() ) {
|
12712 |
+
continue;
|
12713 |
+
}
|
12714 |
+
|
12715 |
+
$install = $install_info['install'];
|
12716 |
+
$license = $install_info['license'];
|
12717 |
+
|
12718 |
+
if (
|
12719 |
+
is_object( $license ) &&
|
12720 |
+
$install->user_id != $license->user_id
|
12721 |
+
) {
|
12722 |
+
$installs[] = $install->id;
|
12723 |
+
}
|
12724 |
+
}
|
12725 |
+
|
12726 |
+
return $installs;
|
12727 |
+
}
|
12728 |
+
|
12729 |
+
/**
|
12730 |
+
* Displays the "Change User" dialog box when the user clicks on the "Change User" button on the "Account" page.
|
12731 |
+
*
|
12732 |
+
* @author Leo Fajardo (@leorw)
|
12733 |
+
* @since 2.3.2
|
12734 |
+
*
|
12735 |
+
* @param number[] $install_ids
|
12736 |
+
*/
|
12737 |
+
function _add_user_change_dialog_box( $install_ids ) {
|
12738 |
+
$vars = array(
|
12739 |
+
'id' => $this->_module_id,
|
12740 |
+
'license_owners' => $this->fetch_installs_licenses_owners_data( $install_ids )
|
12741 |
+
);
|
12742 |
+
|
12743 |
+
fs_require_template( 'forms/user-change.php', $vars );
|
12744 |
+
}
|
12745 |
+
|
12746 |
/**
|
12747 |
* @author Leo Fajardo (@leorw)
|
12748 |
* @since 2.3.1
|
12864 |
return;
|
12865 |
}
|
12866 |
|
12867 |
+
if (
|
12868 |
+
$this->has_premium_version() &&
|
12869 |
+
! $this->is_premium() &&
|
12870 |
+
/**
|
12871 |
+
* Also handle the case when an upgrade was made using the free version.
|
12872 |
+
*
|
12873 |
+
* @author Leo Fajardo (@leorw)
|
12874 |
+
* @since 2.3.2
|
12875 |
+
*/
|
12876 |
+
! is_object( $this->_get_license() )
|
12877 |
+
) {
|
12878 |
// Only add license activation logic to the premium version, or in case of a serviceware plugin, also in the free version.
|
12879 |
return;
|
12880 |
}
|
12901 |
$this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
|
12902 |
}
|
12903 |
|
12904 |
+
/**
|
12905 |
+
* Prepares page to include all required UI and logic for the "Change User" dialog.
|
12906 |
+
*
|
12907 |
+
* @author Leo Fajardo (@leorw)
|
12908 |
+
* @since 2.3.2
|
12909 |
+
*/
|
12910 |
+
function _add_user_change_option() {
|
12911 |
+
if ( ! $this->should_handle_user_change() ) {
|
12912 |
+
return;
|
12913 |
+
}
|
12914 |
+
|
12915 |
+
if ( empty( $this->get_installs_ids_with_foreign_licenses() ) ) {
|
12916 |
+
// Handle user change only when the parent product or one of its add-ons is activated with a foreign license.
|
12917 |
+
return;
|
12918 |
+
}
|
12919 |
+
|
12920 |
+
// Add user change AJAX handler.
|
12921 |
+
$this->add_ajax_action( 'change_user', array( &$this, '_user_change_ajax_action' ) );
|
12922 |
+
}
|
12923 |
+
|
12924 |
+
/**
|
12925 |
+
* @author Leo Fajardo (@leorw)
|
12926 |
+
* @since 2.3.2
|
12927 |
+
*/
|
12928 |
+
function should_handle_user_change() {
|
12929 |
+
if ( ! $this->is_user_admin() ) {
|
12930 |
+
// Only admins can change user.
|
12931 |
+
return false;
|
12932 |
+
}
|
12933 |
+
|
12934 |
+
if ( $this->is_addon() ) {
|
12935 |
+
return false;
|
12936 |
+
}
|
12937 |
+
|
12938 |
+
if ( ! $this->is_registered() ) {
|
12939 |
+
return false;
|
12940 |
+
}
|
12941 |
+
|
12942 |
+
if (
|
12943 |
+
$this->is_network_active() &&
|
12944 |
+
( fs_is_network_admin() || ! $this->is_site_delegated_connection() )
|
12945 |
+
) {
|
12946 |
+
// Handle only on site-level "Account" section for now.
|
12947 |
+
return false;
|
12948 |
+
}
|
12949 |
+
|
12950 |
+
return true;
|
12951 |
+
}
|
12952 |
+
|
12953 |
/**
|
12954 |
* @author Leo Fajardo (@leorw)
|
12955 |
* @since 2.0.2
|
13039 |
*/
|
13040 |
function _activate_license_ajax_action() {
|
13041 |
$this->_logger->entrance();
|
13042 |
+
|
13043 |
$this->check_ajax_referer( 'activate_license' );
|
13044 |
|
13045 |
$license_key = trim( fs_request_get( 'license_key' ) );
|
13048 |
exit;
|
13049 |
}
|
13050 |
|
13051 |
+
$sites = fs_is_network_admin() ?
|
13052 |
+
fs_request_get( 'sites', array(), 'post' ) :
|
13053 |
+
array();
|
13054 |
+
|
13055 |
$result = $this->activate_license(
|
13056 |
$license_key,
|
13057 |
+
$sites,
|
|
|
|
|
13058 |
fs_request_get_bool( 'is_marketing_allowed', null ),
|
13059 |
fs_request_get( 'blog_id', null ),
|
13060 |
+
fs_request_get( 'module_id', null, 'post' ),
|
13061 |
+
fs_request_get( 'user_id', null ),
|
13062 |
+
fs_request_get_bool( 'is_extensions_tracking_allowed', true )
|
13063 |
);
|
13064 |
|
13065 |
+
if ( $result['success'] ) {
|
13066 |
+
$this->maybe_activate_bundle_license( $license_key, $sites );
|
13067 |
+
}
|
13068 |
+
|
13069 |
echo json_encode( $result );
|
13070 |
|
13071 |
exit;
|
13072 |
}
|
13073 |
|
13074 |
+
/**
|
13075 |
+
* User change WP AJAX handler.
|
13076 |
+
*
|
13077 |
+
* @author Leo Fajardo (@leorw)
|
13078 |
+
* @since 2.3.2
|
13079 |
+
*/
|
13080 |
+
function _user_change_ajax_action() {
|
13081 |
+
$this->_logger->entrance();
|
13082 |
+
|
13083 |
+
$this->check_ajax_referer( 'change_user' );
|
13084 |
+
|
13085 |
+
$new_email_address = trim( fs_request_get( 'email_address', '' ) );
|
13086 |
+
$new_user_id = fs_request_get( 'user_id' );
|
13087 |
+
|
13088 |
+
if ( empty( $new_email_address ) && ! FS_User::is_valid_id( $new_user_id ) ) {
|
13089 |
+
self::shoot_ajax_failure( fs_text_inline( 'Invalid new user ID or email address.', 'invalid-new-user-id-or-email', $this->get_slug() ) );
|
13090 |
+
}
|
13091 |
+
|
13092 |
+
$params = array();
|
13093 |
+
|
13094 |
+
if ( ! empty( $new_email_address ) ) {
|
13095 |
+
$params['user_email'] = $new_email_address;
|
13096 |
+
} else {
|
13097 |
+
$params['user_id'] = $new_user_id;
|
13098 |
+
}
|
13099 |
+
|
13100 |
+
$installs_info_by_slug_map = $this->get_parent_and_addons_installs_info();
|
13101 |
+
$install_ids = array();
|
13102 |
+
|
13103 |
+
foreach ( $installs_info_by_slug_map as $slug => $install_info ) {
|
13104 |
+
$install_ids[ $slug ] = $install_info['install']->id;
|
13105 |
+
}
|
13106 |
+
|
13107 |
+
$params['install_ids'] = implode( ',', array_values( $install_ids ) );
|
13108 |
+
|
13109 |
+
$install = $this->get_api_site_scope()->call( $this->add_show_pending( '/' ), 'put', $params );
|
13110 |
+
|
13111 |
+
if ( FS_Api::is_api_error( $install ) ) {
|
13112 |
+
$error = '';
|
13113 |
+
|
13114 |
+
if ( is_object( $install ) ) {
|
13115 |
+
switch ( $install->error->code ) {
|
13116 |
+
case 'user_exist':
|
13117 |
+
$error = (
|
13118 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...' .
|
13119 |
+
$this->get_text_inline( 'Sorry, we could not complete the email update. Another user with the same email is already registered.', 'user-exist-message' ) . ' ' .
|
13120 |
+
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>' ) .
|
13121 |
+
sprintf(
|
13122 |
+
'<a style="line-height: 40px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
13123 |
+
$this->get_account_url( 'change_owner', array(
|
13124 |
+
'state' => 'init',
|
13125 |
+
'candidate_email' => $new_email_address
|
13126 |
+
) ),
|
13127 |
+
$this->get_text_inline( 'Change Ownership', 'change-ownership' )
|
13128 |
+
)
|
13129 |
+
);
|
13130 |
+
break;
|
13131 |
+
}
|
13132 |
+
}
|
13133 |
+
|
13134 |
+
if ( empty( $error ) ) {
|
13135 |
+
$error = FS_Api::is_api_error_object( $install ) ?
|
13136 |
+
$install->error->message :
|
13137 |
+
var_export( $install->error, true );
|
13138 |
+
}
|
13139 |
+
|
13140 |
+
self::shoot_ajax_failure( $error );
|
13141 |
+
} else {
|
13142 |
+
if (
|
13143 |
+
// If successful ownership change.
|
13144 |
+
$this->get_user()->id != $install->user_id ||
|
13145 |
+
! empty( $new_email_address )
|
13146 |
+
) {
|
13147 |
+
$this->complete_ownership_change_by_license( $install->user_id, $install_ids );
|
13148 |
+
}
|
13149 |
+
}
|
13150 |
+
|
13151 |
+
self::shoot_ajax_success();
|
13152 |
+
}
|
13153 |
+
|
13154 |
/**
|
13155 |
* A helper method to activate migrated licenses. If the product is network activated and integrated, the method will network activate the license.
|
13156 |
*
|
13160 |
* @param string $license_key
|
13161 |
* @param null|bool $is_marketing_allowed
|
13162 |
* @param null|number $plugin_id
|
13163 |
+
* @param array $sites
|
13164 |
+
* @param int $blog_id
|
13165 |
*
|
13166 |
* @return array {
|
13167 |
* @var bool $success
|
13174 |
function activate_migrated_license(
|
13175 |
$license_key,
|
13176 |
$is_marketing_allowed = null,
|
13177 |
+
$plugin_id = null,
|
13178 |
+
$sites = array(),
|
13179 |
+
$blog_id = null
|
13180 |
) {
|
13181 |
$this->_logger->entrance();
|
13182 |
|
13183 |
$result = $this->activate_license(
|
13184 |
$license_key,
|
13185 |
+
( empty( $sites ) && is_null( $blog_id ) && $this->is_network_active() ) ?
|
13186 |
$this->get_sites_for_network_level_optin() :
|
13187 |
+
$sites,
|
13188 |
$is_marketing_allowed,
|
13189 |
+
$blog_id,
|
13190 |
$plugin_id
|
13191 |
);
|
13192 |
|
13207 |
* @param null|bool $is_marketing_allowed
|
13208 |
* @param null|int $blog_id
|
13209 |
* @param null|number $plugin_id
|
13210 |
+
* @param null|number $license_owner_id
|
13211 |
*
|
13212 |
* @return array {
|
13213 |
* @var bool $success
|
13220 |
$sites = array(),
|
13221 |
$is_marketing_allowed = null,
|
13222 |
$blog_id = null,
|
13223 |
+
$plugin_id = null,
|
13224 |
+
$license_owner_id = null,
|
13225 |
+
$is_extensions_tracking_allowed = true
|
13226 |
) {
|
13227 |
$this->_logger->entrance();
|
13228 |
|
13237 |
$this :
|
13238 |
$this->get_addon_instance( $plugin_id );
|
13239 |
|
13240 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
13241 |
+
|
13242 |
$error = false;
|
13243 |
$next_page = false;
|
13244 |
|
13312 |
'license_key' => $fs->apply_filters( 'license_key', $license_key )
|
13313 |
);
|
13314 |
|
13315 |
+
$install_ids = array();
|
13316 |
+
|
13317 |
+
$change_owner = FS_User::is_valid_id( $license_owner_id );
|
13318 |
+
|
13319 |
+
if ( $change_owner ) {
|
13320 |
+
$params['user_id'] = $license_owner_id;
|
13321 |
+
|
13322 |
+
$installs_info_by_slug_map = $fs->get_parent_and_addons_installs_info();
|
13323 |
+
|
13324 |
+
foreach ( $installs_info_by_slug_map as $slug => $install_info ) {
|
13325 |
+
$install_ids[ $slug ] = $install_info['install']->id;
|
13326 |
+
}
|
13327 |
+
|
13328 |
+
$params['install_ids'] = implode( ',', array_values( $install_ids ) );
|
13329 |
+
}
|
13330 |
+
|
13331 |
$api = $fs->get_api_site_scope();
|
13332 |
|
13333 |
$install = $api->call( $fs->add_show_pending( '/' ), 'put', $params );
|
13338 |
var_export( $install->error, true );
|
13339 |
} else {
|
13340 |
$fs->reconnect_locally( $has_valid_blog_id );
|
13341 |
+
|
13342 |
+
if (
|
13343 |
+
$change_owner &&
|
13344 |
+
// If successful ownership change.
|
13345 |
+
$fs->get_user()->id != $install->user_id
|
13346 |
+
) {
|
13347 |
+
$fs->complete_ownership_change_by_license( $install->user_id, $install_ids );
|
13348 |
+
}
|
13349 |
}
|
13350 |
} else /* ( $fs->is_addon() && $fs->get_parent_instance()->is_registered() ) */ {
|
13351 |
$result = $fs->activate_license_on_site( $user, $license_key );
|
13361 |
if ( empty( $error ) ) {
|
13362 |
$fs->network_upgrade_mode_completed();
|
13363 |
|
13364 |
+
$fs->_user = $user;
|
13365 |
+
if ( fs_is_network_admin() && ! $has_valid_blog_id ) {
|
13366 |
+
$fs->_site = $fs->get_network_install();
|
13367 |
+
}
|
13368 |
+
|
13369 |
$fs->_sync_license( true, $has_valid_blog_id );
|
13370 |
|
13371 |
+
$this->maybe_sync_install_user();
|
13372 |
+
|
13373 |
$next_page = $fs->is_addon() ?
|
13374 |
$fs->get_parent_instance()->get_account_url() :
|
13375 |
$fs->get_account_url();
|
13476 |
return $result;
|
13477 |
}
|
13478 |
|
13479 |
+
/**
|
13480 |
+
* @author Leo Fajardo (@leorw)
|
13481 |
+
* @since 2.3.2
|
13482 |
+
*
|
13483 |
+
* @return array {
|
13484 |
+
* @key string Product slug.
|
13485 |
+
* @value array {
|
13486 |
+
* @property FS_Site $site
|
13487 |
+
* @property FS_Plugin_License $license
|
13488 |
+
* }
|
13489 |
+
* }
|
13490 |
+
*/
|
13491 |
+
private function get_parent_and_addons_installs_info() {
|
13492 |
+
$fs = $this->is_addon() ?
|
13493 |
+
$this->get_parent_instance() :
|
13494 |
+
$this;
|
13495 |
+
|
13496 |
+
$installed_addons_ids = array();
|
13497 |
+
|
13498 |
+
$installed_addons_instances = $fs->get_installed_addons();
|
13499 |
+
foreach ( $installed_addons_instances as $instance ) {
|
13500 |
+
$installed_addons_ids[] = $instance->get_id();
|
13501 |
+
}
|
13502 |
+
|
13503 |
+
$addons_ids = array_unique( array_merge(
|
13504 |
+
$installed_addons_ids,
|
13505 |
+
$fs->get_updated_account_addons()
|
13506 |
+
) );
|
13507 |
+
|
13508 |
+
// Add parent product info.
|
13509 |
+
$installs_info_by_slug_map = array(
|
13510 |
+
$fs->get_slug() => array(
|
13511 |
+
'install' => $fs->get_site(),
|
13512 |
+
'license' => $fs->_get_license()
|
13513 |
+
)
|
13514 |
+
);
|
13515 |
+
|
13516 |
+
foreach ( $addons_ids as $addon_id ) {
|
13517 |
+
$is_installed = isset( $installed_addons_ids_map[ $addon_id ] );
|
13518 |
+
|
13519 |
+
$addon_info = $fs->_get_addon_info( $addon_id, $is_installed );
|
13520 |
+
|
13521 |
+
if ( ! $addon_info['is_connected'] ) {
|
13522 |
+
// Add-on is not associated with an install entity.
|
13523 |
+
continue;
|
13524 |
+
}
|
13525 |
+
|
13526 |
+
$installs_info_by_slug_map[ $addon_info['slug'] ] = array(
|
13527 |
+
'install' => $addon_info['site'],
|
13528 |
+
'license' => isset( $addon_info['license'] ) ?
|
13529 |
+
$addon_info['license'] :
|
13530 |
+
null
|
13531 |
+
);
|
13532 |
+
}
|
13533 |
+
|
13534 |
+
return $installs_info_by_slug_map;
|
13535 |
+
}
|
13536 |
+
|
13537 |
/**
|
13538 |
* @author Leo Fajardo (@leorw)
|
13539 |
* @since 1.2.3.1
|
15972 |
/**
|
15973 |
* This is a special fault tolerance mechanism to handle a scenario that the user data is missing.
|
15974 |
*/
|
15975 |
+
$user = $this->sync_user_by_current_install();
|
15976 |
}
|
15977 |
|
15978 |
$this->_user = ( $user instanceof FS_User ) ?
|
16012 |
* @author Vova Feldman (@svovaf)
|
16013 |
* @since 2.0.0
|
16014 |
*
|
16015 |
+
* @param number|null $site_user_id
|
16016 |
+
*
|
16017 |
* @return \FS_User|mixed
|
16018 |
*/
|
16019 |
+
private function sync_user_by_current_install( $site_user_id = null ) {
|
16020 |
+
$site_user_id = FS_Site::is_valid_id( $site_user_id ) ?
|
16021 |
+
$site_user_id :
|
16022 |
+
$this->_site->user_id;
|
16023 |
+
|
16024 |
$api = $this->get_api_site_scope();
|
16025 |
|
16026 |
$uid = $this->get_anonymous_id();
|
16027 |
+
$request_path = "/users/{$site_user_id}.json?uid={$uid}";
|
16028 |
|
16029 |
$result = $api->get( $request_path, false, WP_FS__TIME_10_MIN_IN_SEC );
|
16030 |
|
16454 |
( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
|
16455 |
$decoded->is_marketing_allowed :
|
16456 |
null ),
|
16457 |
+
( isset( $decoded->is_extensions_tracking_allowed ) && ! is_null( $decoded->is_extensions_tracking_allowed ) ?
|
16458 |
+
$decoded->is_extensions_tracking_allowed :
|
16459 |
+
null ),
|
16460 |
$decoded->install_id,
|
16461 |
$decoded->install_public_key,
|
16462 |
$decoded->install_secret_key,
|
16470 |
( isset( $decoded->is_marketing_allowed ) && ! is_null( $decoded->is_marketing_allowed ) ?
|
16471 |
$decoded->is_marketing_allowed :
|
16472 |
null ),
|
16473 |
+
( isset( $decoded->is_extensions_tracking_allowed ) && ! is_null( $decoded->is_extensions_tracking_allowed ) ?
|
16474 |
+
$decoded->is_extensions_tracking_allowed :
|
16475 |
+
null ),
|
16476 |
$decoded->installs,
|
16477 |
false
|
16478 |
);
|
16699 |
fs_request_get( 'user_public_key' ),
|
16700 |
fs_request_get( 'user_secret_key' ),
|
16701 |
fs_request_get_bool( 'is_marketing_allowed', null ),
|
16702 |
+
fs_request_get_bool( 'is_extensions_tracking_allowed', null ),
|
16703 |
$pending_sites_info['blog_ids'],
|
16704 |
$pending_sites_info['license_key'],
|
16705 |
$pending_sites_info['trial_plan_id']
|
16710 |
fs_request_get( 'user_public_key' ),
|
16711 |
fs_request_get( 'user_secret_key' ),
|
16712 |
fs_request_get_bool( 'is_marketing_allowed', null ),
|
16713 |
+
fs_request_get_bool( 'is_extensions_tracking_allowed', null ),
|
16714 |
fs_request_get( 'install_id' ),
|
16715 |
fs_request_get( 'install_public_key' ),
|
16716 |
fs_request_get( 'install_secret_key' ),
|
16766 |
* @param string $user_public_key
|
16767 |
* @param string $user_secret_key
|
16768 |
* @param bool|null $is_marketing_allowed
|
16769 |
+
* @param bool|null $is_extensions_tracking_allowed Since 2.3.2
|
16770 |
* @param number $install_id
|
16771 |
* @param string $install_public_key
|
16772 |
* @param string $install_secret_key
|
16773 |
* @param bool $redirect
|
16774 |
+
* @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.
|
|
|
|
|
16775 |
*
|
16776 |
* @return string If redirect is `false`, returns the next page the user should be redirected to.
|
16777 |
*/
|
16780 |
$user_public_key,
|
16781 |
$user_secret_key,
|
16782 |
$is_marketing_allowed,
|
16783 |
+
$is_extensions_tracking_allowed,
|
16784 |
$install_id,
|
16785 |
$install_public_key,
|
16786 |
$install_secret_key,
|
16822 |
$this->disable_opt_in_notice_and_lock_user();
|
16823 |
}
|
16824 |
|
16825 |
+
if ( ! is_null( $is_extensions_tracking_allowed ) ) {
|
16826 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
16827 |
+
}
|
16828 |
+
|
16829 |
return $this->setup_account(
|
16830 |
$this->_user,
|
16831 |
$this->_site,
|
16844 |
* @param string $user_public_key
|
16845 |
* @param string $user_secret_key
|
16846 |
* @param bool|null $is_marketing_allowed
|
16847 |
+
* @param bool|null $is_extensions_tracking_allowed Since 2.3.2
|
16848 |
* @param array $site_ids
|
16849 |
* @param bool $license_key
|
16850 |
* @param bool $trial_plan_id
|
16857 |
$user_public_key,
|
16858 |
$user_secret_key,
|
16859 |
$is_marketing_allowed,
|
16860 |
+
$is_extensions_tracking_allowed,
|
16861 |
$site_ids,
|
16862 |
$license_key = false,
|
16863 |
$trial_plan_id = false,
|
16869 |
$this->disable_opt_in_notice_and_lock_user();
|
16870 |
}
|
16871 |
|
16872 |
+
if ( ! is_null( $is_extensions_tracking_allowed ) ) {
|
16873 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
16874 |
+
}
|
16875 |
+
|
16876 |
$sites = array();
|
16877 |
foreach ( $site_ids as $site_id ) {
|
16878 |
$sites[] = $this->get_site_info( array( 'blog_id' => $site_id ) );
|
16891 |
* @param string $user_public_key
|
16892 |
* @param string $user_secret_key
|
16893 |
* @param bool|null $is_marketing_allowed
|
16894 |
+
* @param bool|null $is_extensions_tracking_allowed Since 2.3.2
|
16895 |
* @param object[] $installs
|
16896 |
* @param bool $redirect
|
16897 |
+
* @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.
|
|
|
|
|
16898 |
*
|
16899 |
* @return string If redirect is `false`, returns the next page the user should be redirected to.
|
16900 |
*/
|
16903 |
$user_public_key,
|
16904 |
$user_secret_key,
|
16905 |
$is_marketing_allowed,
|
16906 |
+
$is_extensions_tracking_allowed,
|
16907 |
array $installs,
|
16908 |
$redirect = true,
|
16909 |
$auto_install = false
|
16914 |
$this->disable_opt_in_notice_and_lock_user();
|
16915 |
}
|
16916 |
|
16917 |
+
if ( ! is_null( $is_extensions_tracking_allowed ) ) {
|
16918 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
16919 |
+
}
|
16920 |
+
|
16921 |
$install_ids = array();
|
16922 |
|
16923 |
foreach ( $installs as $install ) {
|
17027 |
*/
|
17028 |
$license_key = fs_request_get( 'license_secret_key' );
|
17029 |
|
17030 |
+
$this->update_extensions_tracking_flag( fs_request_get_bool( 'is_extensions_tracking_allowed', true ) );
|
17031 |
+
|
17032 |
$this->install_with_current_user( $license_key );
|
17033 |
}
|
17034 |
}
|
17321 |
if ( ! fs_is_network_admin() ) {
|
17322 |
// Try to activate premium license.
|
17323 |
$this->_activate_license( true );
|
17324 |
+
|
17325 |
+
$this->maybe_activate_bundle_license();
|
17326 |
+
|
17327 |
} else {
|
17328 |
$license_id = fs_request_get( 'license_id' );
|
17329 |
|
18745 |
|
18746 |
$sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );
|
18747 |
|
18748 |
+
if ( is_object( $this->_user ) && $this->_user->id != $site->user_id ) {
|
18749 |
+
$this->sync_user_by_current_install( $site->user_id );
|
18750 |
|
18751 |
+
$prev_stored_user_id = $this->_storage->get( 'prev_user_id', false, $network_level_or_blog_id );
|
18752 |
+
|
18753 |
+
if ( empty( $prev_stored_user_id ) &&
|
18754 |
+
is_object($this->_user) && $this->_user->id != $site->user_id
|
18755 |
+
) {
|
18756 |
+
/**
|
18757 |
+
* Store the current user ID as the previous user ID so that the previous user can be used
|
18758 |
+
* as the install's owner while the new owner's details are not yet available.
|
18759 |
+
*
|
18760 |
+
* This will be executed only in the `replica` site. For example, there are 2 sites, namely `original`
|
18761 |
+
* and `replica`, then an ownership change was initiated and completed in the `original`, the `replica`
|
18762 |
+
* will be using the previous user until it is updated again (e.g.: until the next clone of `original`
|
18763 |
+
* into `replica`.
|
18764 |
+
*
|
18765 |
+
* @author Leo Fajardo (@leorw)
|
18766 |
+
*/
|
18767 |
+
$this->_storage->store( 'prev_user_id', $sites[ $this->_slug ]->user_id, $network_level_or_blog_id );
|
18768 |
+
}
|
18769 |
}
|
18770 |
|
18771 |
$sites[ $this->_slug ] = $site_clone;
|
20597 |
|
20598 |
if ( $show_notice ) {
|
20599 |
$this->_admin_notices->add(
|
20600 |
+
sprintf( $this->is_only_premium() ?
|
20601 |
+
$this->get_text_inline( 'Your %s license was successfully deactivated.', 'license-deactivation-message_premium-only' ) :
|
20602 |
+
$this->get_text_inline( 'Your license was successfully deactivated, you are back to the %s plan.', 'license-deactivation-message' ),
|
20603 |
+
$this->get_plan_title()
|
20604 |
+
),
|
20605 |
$this->get_text_inline( 'O.K', 'ok' )
|
20606 |
);
|
20607 |
}
|
21408 |
return true;
|
21409 |
}
|
21410 |
|
21411 |
+
/**
|
21412 |
+
* Completes ownership change by license.
|
21413 |
+
*
|
21414 |
+
* @author Leo Fajardo (@leorw)
|
21415 |
+
* @since 2.3.2
|
21416 |
+
*
|
21417 |
+
* @param number $user_id
|
21418 |
+
* @param array[string]number $install_ids_by_slug_map
|
21419 |
+
*
|
21420 |
+
*/
|
21421 |
+
private function complete_ownership_change_by_license( $user_id, $install_ids_by_slug_map ) {
|
21422 |
+
$this->_logger->entrance();
|
21423 |
+
|
21424 |
+
$this->sync_user_by_current_install( $user_id );
|
21425 |
+
|
21426 |
+
$result = $this->get_api_user_scope( true )->get(
|
21427 |
+
"/installs.json?install_ids=" . implode( ',', $install_ids_by_slug_map )
|
21428 |
+
);
|
21429 |
+
|
21430 |
+
if ( $this->is_api_result_object( $result, 'installs' ) ) {
|
21431 |
+
$sites = self::get_all_sites( $this->get_module_type() );
|
21432 |
+
$install_ids_by_slug_map = array_flip( $install_ids_by_slug_map );
|
21433 |
+
|
21434 |
+
foreach ( $result->installs as $install ) {
|
21435 |
+
$site = new FS_Site( $install );
|
21436 |
+
|
21437 |
+
$sites[ $install_ids_by_slug_map[ $site->id ] ] = clone $site;
|
21438 |
+
}
|
21439 |
+
|
21440 |
+
$this->set_account_option( 'sites', $sites, true );
|
21441 |
+
}
|
21442 |
+
}
|
21443 |
+
|
21444 |
/**
|
21445 |
* Handle user name update.
|
21446 |
*
|
21609 |
// Alias.
|
21610 |
$oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
|
21611 |
|
21612 |
+
$is_network_action = $this->is_network_level_action();
|
21613 |
+
$blog_id = $this->is_network_level_site_specific_action();
|
21614 |
+
$is_parent_plugin_action = ( $plugin_id == $this->get_id() );
|
21615 |
|
21616 |
if ( is_numeric( $blog_id ) ) {
|
21617 |
$this->switch_to_blog( $blog_id );
|
21623 |
case 'opt_in':
|
21624 |
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
|
21625 |
|
21626 |
+
if ( $is_parent_plugin_action ) {
|
21627 |
if ( $is_network_action && ! empty( $blog_id ) ) {
|
21628 |
if ( ! $this->is_registered() ) {
|
21629 |
$this->install_with_user(
|
21646 |
case 'toggle_tracking':
|
21647 |
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
|
21648 |
|
21649 |
+
if ( $is_parent_plugin_action ) {
|
21650 |
if ( $is_network_action && ! empty( $blog_id ) ) {
|
21651 |
if ( $this->is_registered() ) {
|
21652 |
if ( $this->is_tracking_prohibited() ) {
|
21681 |
case 'delete_account':
|
21682 |
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
|
21683 |
|
21684 |
+
$is_network_deletion = $is_network_action && empty( $blog_id );
|
21685 |
+
|
21686 |
+
if ( $is_parent_plugin_action ) {
|
21687 |
+
// Delete add-on installs if have any.
|
21688 |
+
$installed_addons = $this->get_installed_addons();
|
21689 |
+
foreach ( $installed_addons as $fs_addon ) {
|
21690 |
+
if ( $is_network_deletion ) {
|
21691 |
+
$fs_addon->delete_network_account_event();
|
21692 |
+
} else {
|
21693 |
+
$fs_addon->delete_account_event();
|
21694 |
+
}
|
21695 |
+
}
|
21696 |
+
|
21697 |
+
if ( $is_network_deletion ) {
|
21698 |
$this->delete_network_account_event();
|
21699 |
} else {
|
21700 |
$this->delete_account_event();
|
21710 |
} else {
|
21711 |
if ( $this->is_addon_activated( $plugin_id ) ) {
|
21712 |
$fs_addon = self::get_instance_by_id( $plugin_id );
|
21713 |
+
|
21714 |
+
if ( $is_network_deletion ) {
|
21715 |
+
$fs_addon->delete_network_account_event();
|
21716 |
+
} else {
|
21717 |
+
$fs_addon->delete_account_event();
|
21718 |
+
}
|
21719 |
|
21720 |
fs_redirect( $this->_get_admin_page_url( 'account' ) );
|
21721 |
}
|
21763 |
|
21764 |
if ( is_object( $fs ) ) {
|
21765 |
$fs->_activate_license();
|
21766 |
+
|
21767 |
+
/**
|
21768 |
+
* Remove the product ID from `$_REQUEST` so that the syncing of the license for the other
|
21769 |
+
* products will work properly.
|
21770 |
+
*
|
21771 |
+
* @author Leo Fajardo (@leorw)
|
21772 |
+
* @since 2.3.0.4
|
21773 |
+
*/
|
21774 |
+
unset( $_REQUEST['plugin_id'] );
|
21775 |
+
|
21776 |
+
$fs->maybe_activate_bundle_license( null, array(), is_numeric( $blog_id ) ? $blog_id : 0 );
|
21777 |
+
|
21778 |
}
|
21779 |
|
21780 |
return;
|
22870 |
|
22871 |
$this->_logger->entrance();
|
22872 |
|
22873 |
+
/**
|
22874 |
+
* @author Vova Feldman (@svovaf)
|
22875 |
+
* @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.
|
22876 |
+
*/
|
22877 |
+
/*if ( $this->is_premium() ) {
|
22878 |
// Don't add opt-in/out for premium code base.
|
22879 |
return;
|
22880 |
+
}*/
|
22881 |
+
|
22882 |
+
if ( $this->is_only_premium() && $this->is_free_plan() ) {
|
22883 |
+
// 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.
|
22884 |
+
return;
|
22885 |
}
|
22886 |
|
22887 |
if ( fs_is_network_admin() ) {
|
22934 |
return;
|
22935 |
}
|
22936 |
|
22937 |
+
if ( $this->add_ajax_action( 'update_tracking_permission', array( &$this, '_update_tracking_permission_callback' ) ) ) {
|
22938 |
+
return;
|
22939 |
+
}
|
22940 |
+
|
22941 |
$link_text_id = '';
|
22942 |
$url = '#';
|
22943 |
|
24486 |
}
|
24487 |
|
24488 |
$modules = array_merge(
|
24489 |
+
array_values( self::maybe_get_entities_account_option( 'plugins', array() ) ),
|
24490 |
+
array_values( self::maybe_get_entities_account_option( 'themes', array() ) )
|
24491 |
);
|
24492 |
|
24493 |
foreach ( $modules as $module ) {
|
24592 |
*
|
24593 |
* @author Vova Feldman (@svovaf)
|
24594 |
*/
|
24595 |
+
self::shoot_ajax_success( array(
|
24596 |
+
'is_marketing_allowed' => null,
|
24597 |
+
'license_owner_id' => null
|
24598 |
+
) );
|
24599 |
+
}
|
24600 |
+
|
24601 |
+
self::shoot_ajax_success( array(
|
24602 |
+
'is_marketing_allowed' => $user_plugins[0]->is_marketing_allowed,
|
24603 |
+
'license_owner_id' => ( isset( $user_plugins[0]->license_owner_id ) ? $user_plugins[0]->license_owner_id : null )
|
24604 |
+
) );
|
24605 |
+
}
|
24606 |
+
|
24607 |
+
/**
|
24608 |
+
* @author Leo Fajardo (@leorw)
|
24609 |
+
* @since 2.3.2
|
24610 |
+
*
|
24611 |
+
* @param number[] $install_ids
|
24612 |
+
*
|
24613 |
+
* @return array {
|
24614 |
+
* An array of objects containing the installs' licenses owners data.
|
24615 |
+
*
|
24616 |
+
* @property number $id User ID.
|
24617 |
+
* @property string $email User email (can be masked email).
|
24618 |
+
* }
|
24619 |
+
*/
|
24620 |
+
private function fetch_installs_licenses_owners_data( $install_ids ) {
|
24621 |
+
$this->_logger->entrance();
|
24622 |
+
|
24623 |
+
$response = $this->get_api_user_scope()->get(
|
24624 |
+
'/licenses_owners.json?install_ids=' . implode( ',', $install_ids )
|
24625 |
+
);
|
24626 |
+
|
24627 |
+
$license_owners = null;
|
24628 |
+
|
24629 |
+
if ( $this->is_api_result_object( $response, 'owners' ) ) {
|
24630 |
+
$license_owners = $response->owners;
|
24631 |
}
|
24632 |
|
24633 |
+
return $license_owners;
|
24634 |
}
|
24635 |
|
24636 |
/**
|
24666 |
}
|
24667 |
|
24668 |
$modules = array_merge(
|
24669 |
+
array_values( self::maybe_get_entities_account_option( 'plugins', array() ) ),
|
24670 |
+
array_values( self::maybe_get_entities_account_option( 'themes', array() ) )
|
24671 |
);
|
24672 |
|
24673 |
foreach ( $modules as $key => $module ) {
|
includes/freemius/includes/class-fs-admin-notices.php
CHANGED
@@ -1,321 +1,321 @@
|
|
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.0.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* WP Admin notices manager both for site level and network level.
|
15 |
-
*
|
16 |
-
* Class FS_Admin_Notices
|
17 |
-
*/
|
18 |
-
class FS_Admin_Notices {
|
19 |
-
/**
|
20 |
-
* @since 1.2.2
|
21 |
-
*
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
protected $_module_unique_affix;
|
25 |
-
/**
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
protected $_id;
|
29 |
-
/**
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
protected $_title;
|
33 |
-
/**
|
34 |
-
* @var FS_Admin_Notice_Manager
|
35 |
-
*/
|
36 |
-
protected $_notices;
|
37 |
-
/**
|
38 |
-
* @var FS_Admin_Notice_Manager
|
39 |
-
*/
|
40 |
-
protected $_network_notices;
|
41 |
-
/**
|
42 |
-
* @var int The ID of the blog that is associated with the current site level options.
|
43 |
-
*/
|
44 |
-
private $_blog_id = 0;
|
45 |
-
/**
|
46 |
-
* @var bool
|
47 |
-
*/
|
48 |
-
private $_is_multisite;
|
49 |
-
/**
|
50 |
-
* @var FS_Admin_Notices[]
|
51 |
-
*/
|
52 |
-
private static $_instances = array();
|
53 |
-
|
54 |
-
/**
|
55 |
-
* @param string $id
|
56 |
-
* @param string $title
|
57 |
-
* @param string $module_unique_affix
|
58 |
-
* @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
|
59 |
-
* blog admin pages.
|
60 |
-
*
|
61 |
-
* @return FS_Admin_Notices
|
62 |
-
*/
|
63 |
-
static function instance( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
|
64 |
-
if ( ! isset( self::$_instances[ $id ] ) ) {
|
65 |
-
self::$_instances[ $id ] = new FS_Admin_Notices( $id, $title, $module_unique_affix, $is_network_and_blog_admins );
|
66 |
-
}
|
67 |
-
|
68 |
-
return self::$_instances[ $id ];
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @param string $id
|
73 |
-
* @param string $title
|
74 |
-
* @param string $module_unique_affix
|
75 |
-
* @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
|
76 |
-
* blog admin pages.
|
77 |
-
*/
|
78 |
-
protected function __construct( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
|
79 |
-
$this->_id = $id;
|
80 |
-
$this->_title = $title;
|
81 |
-
$this->_module_unique_affix = $module_unique_affix;
|
82 |
-
$this->_is_multisite = is_multisite();
|
83 |
-
|
84 |
-
if ( $this->_is_multisite ) {
|
85 |
-
$this->_blog_id = get_current_blog_id();
|
86 |
-
|
87 |
-
$this->_network_notices = FS_Admin_Notice_Manager::instance(
|
88 |
-
$id,
|
89 |
-
$title,
|
90 |
-
$module_unique_affix,
|
91 |
-
$is_network_and_blog_admins,
|
92 |
-
true
|
93 |
-
);
|
94 |
-
}
|
95 |
-
|
96 |
-
$this->_notices = FS_Admin_Notice_Manager::instance(
|
97 |
-
$id,
|
98 |
-
$title,
|
99 |
-
$module_unique_affix,
|
100 |
-
false,
|
101 |
-
$this->_blog_id
|
102 |
-
);
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
|
107 |
-
*
|
108 |
-
* @author Vova Feldman (@svovaf)
|
109 |
-
* @since 1.0.4
|
110 |
-
*
|
111 |
-
* @param string $message
|
112 |
-
* @param string $title
|
113 |
-
* @param string $type
|
114 |
-
* @param bool $is_sticky
|
115 |
-
* @param string $id Message ID
|
116 |
-
* @param bool $store_if_sticky
|
117 |
-
* @param int|null $network_level_or_blog_id
|
118 |
-
*
|
119 |
-
* @uses add_action()
|
120 |
-
*/
|
121 |
-
function add(
|
122 |
-
$message,
|
123 |
-
$title = '',
|
124 |
-
$type = 'success',
|
125 |
-
$is_sticky = false,
|
126 |
-
$id = '',
|
127 |
-
$store_if_sticky = true,
|
128 |
-
$network_level_or_blog_id = null
|
129 |
-
) {
|
130 |
-
if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
|
131 |
-
$notices = $this->_network_notices;
|
132 |
-
} else {
|
133 |
-
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
134 |
-
}
|
135 |
-
|
136 |
-
$notices->add(
|
137 |
-
$message,
|
138 |
-
$title,
|
139 |
-
$type,
|
140 |
-
$is_sticky,
|
141 |
-
$id,
|
142 |
-
$store_if_sticky
|
143 |
-
);
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* @author Vova Feldman (@svovaf)
|
148 |
-
* @since 1.0.7
|
149 |
-
*
|
150 |
-
* @param string|string[] $ids
|
151 |
-
* @param int|null $network_level_or_blog_id
|
152 |
-
*/
|
153 |
-
function remove_sticky( $ids, $network_level_or_blog_id = null ) {
|
154 |
-
if ( ! is_array( $ids ) ) {
|
155 |
-
$ids = array( $ids );
|
156 |
-
}
|
157 |
-
|
158 |
-
if ( $this->should_use_network_notices( $ids[0], $network_level_or_blog_id ) ) {
|
159 |
-
$notices = $this->_network_notices;
|
160 |
-
} else {
|
161 |
-
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
162 |
-
}
|
163 |
-
|
164 |
-
return $notices->remove_sticky( $ids );
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Check if sticky message exists by id.
|
169 |
-
*
|
170 |
-
* @author Vova Feldman (@svovaf)
|
171 |
-
* @since 1.0.9
|
172 |
-
*
|
173 |
-
* @param string $id
|
174 |
-
* @param int|null $network_level_or_blog_id
|
175 |
-
*
|
176 |
-
* @return bool
|
177 |
-
*/
|
178 |
-
function has_sticky( $id, $network_level_or_blog_id = null ) {
|
179 |
-
if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
|
180 |
-
$notices = $this->_network_notices;
|
181 |
-
} else {
|
182 |
-
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
183 |
-
}
|
184 |
-
|
185 |
-
return $notices->has_sticky( $id );
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Adds sticky admin notification.
|
190 |
-
*
|
191 |
-
* @author Vova Feldman (@svovaf)
|
192 |
-
* @since 1.0.7
|
193 |
-
*
|
194 |
-
* @param string $message
|
195 |
-
* @param string $id Message ID
|
196 |
-
* @param string $title
|
197 |
-
* @param string $type
|
198 |
-
* @param int|null $network_level_or_blog_id
|
199 |
-
* @param number|null $wp_user_id
|
200 |
-
* @param string|null $plugin_title
|
201 |
-
* @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
|
202 |
-
* blog admin pages.
|
203 |
-
*/
|
204 |
-
function add_sticky(
|
205 |
-
$message,
|
206 |
-
$id,
|
207 |
-
$title = '',
|
208 |
-
$type = 'success',
|
209 |
-
$network_level_or_blog_id = null,
|
210 |
-
$wp_user_id = null,
|
211 |
-
$plugin_title = null,
|
212 |
-
$is_network_and_blog_admins = false
|
213 |
-
) {
|
214 |
-
if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
|
215 |
-
$notices = $this->_network_notices;
|
216 |
-
} else {
|
217 |
-
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
218 |
-
}
|
219 |
-
|
220 |
-
$notices->add_sticky( $message, $id, $title, $type, $wp_user_id, $plugin_title, $is_network_and_blog_admins );
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Clear all sticky messages.
|
225 |
-
*
|
226 |
-
* @author Vova Feldman (@svovaf)
|
227 |
-
* @since 2.0.0
|
228 |
-
*
|
229 |
-
* @param int|null $network_level_or_blog_id
|
230 |
-
*/
|
231 |
-
function clear_all_sticky( $network_level_or_blog_id = null ) {
|
232 |
-
if ( ! $this->_is_multisite ||
|
233 |
-
false === $network_level_or_blog_id ||
|
234 |
-
0 == $network_level_or_blog_id ||
|
235 |
-
is_null( $network_level_or_blog_id )
|
236 |
-
) {
|
237 |
-
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
238 |
-
$notices->clear_all_sticky();
|
239 |
-
}
|
240 |
-
|
241 |
-
if ( $this->_is_multisite &&
|
242 |
-
( true === $network_level_or_blog_id || is_null( $network_level_or_blog_id ) )
|
243 |
-
) {
|
244 |
-
$this->_network_notices->clear_all_sticky();
|
245 |
-
}
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
|
250 |
-
*
|
251 |
-
* @author Vova Feldman (@svovaf)
|
252 |
-
* @since 1.0.4
|
253 |
-
*
|
254 |
-
* @param string $message
|
255 |
-
* @param string $title
|
256 |
-
* @param string $type
|
257 |
-
* @param bool $is_sticky
|
258 |
-
* @param string $id Message ID
|
259 |
-
*/
|
260 |
-
function add_all( $message, $title = '', $type = 'success', $is_sticky = false, $id = '' ) {
|
261 |
-
$this->add( $message, $title, $type, $is_sticky, true, $id );
|
262 |
-
}
|
263 |
-
|
264 |
-
#--------------------------------------------------------------------------------
|
265 |
-
#region Helper Methods
|
266 |
-
#--------------------------------------------------------------------------------
|
267 |
-
|
268 |
-
/**
|
269 |
-
* @author Vova Feldman (@svovaf)
|
270 |
-
* @since 2.0.0
|
271 |
-
*
|
272 |
-
* @param int $blog_id
|
273 |
-
*
|
274 |
-
* @return FS_Admin_Notice_Manager
|
275 |
-
*/
|
276 |
-
private function get_site_notices( $blog_id = 0 ) {
|
277 |
-
if ( 0 == $blog_id || $blog_id == $this->_blog_id ) {
|
278 |
-
return $this->_notices;
|
279 |
-
}
|
280 |
-
|
281 |
-
return FS_Admin_Notice_Manager::instance(
|
282 |
-
$this->_id,
|
283 |
-
$this->_title,
|
284 |
-
$this->_module_unique_affix,
|
285 |
-
false,
|
286 |
-
$blog_id
|
287 |
-
);
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Check if the network notices should be used.
|
292 |
-
*
|
293 |
-
* @author Vova Feldman (@svovaf)
|
294 |
-
* @since 2.0.0
|
295 |
-
*
|
296 |
-
* @param string $id
|
297 |
-
* @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin).
|
298 |
-
*
|
299 |
-
* @return bool
|
300 |
-
*/
|
301 |
-
private function should_use_network_notices( $id = '', $network_level_or_blog_id = null ) {
|
302 |
-
if ( ! $this->_is_multisite ) {
|
303 |
-
// Not a multisite environment.
|
304 |
-
return false;
|
305 |
-
}
|
306 |
-
|
307 |
-
if ( is_numeric( $network_level_or_blog_id ) ) {
|
308 |
-
// Explicitly asked to use a specified blog storage.
|
309 |
-
return false;
|
310 |
-
}
|
311 |
-
|
312 |
-
if ( is_bool( $network_level_or_blog_id ) ) {
|
313 |
-
// Explicitly specified whether should use the network or blog level storage.
|
314 |
-
return $network_level_or_blog_id;
|
315 |
-
}
|
316 |
-
|
317 |
-
return fs_is_network_admin();
|
318 |
-
}
|
319 |
-
|
320 |
-
#endregion
|
321 |
}
|
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.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* WP Admin notices manager both for site level and network level.
|
15 |
+
*
|
16 |
+
* Class FS_Admin_Notices
|
17 |
+
*/
|
18 |
+
class FS_Admin_Notices {
|
19 |
+
/**
|
20 |
+
* @since 1.2.2
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
protected $_module_unique_affix;
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
protected $_id;
|
29 |
+
/**
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
protected $_title;
|
33 |
+
/**
|
34 |
+
* @var FS_Admin_Notice_Manager
|
35 |
+
*/
|
36 |
+
protected $_notices;
|
37 |
+
/**
|
38 |
+
* @var FS_Admin_Notice_Manager
|
39 |
+
*/
|
40 |
+
protected $_network_notices;
|
41 |
+
/**
|
42 |
+
* @var int The ID of the blog that is associated with the current site level options.
|
43 |
+
*/
|
44 |
+
private $_blog_id = 0;
|
45 |
+
/**
|
46 |
+
* @var bool
|
47 |
+
*/
|
48 |
+
private $_is_multisite;
|
49 |
+
/**
|
50 |
+
* @var FS_Admin_Notices[]
|
51 |
+
*/
|
52 |
+
private static $_instances = array();
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @param string $id
|
56 |
+
* @param string $title
|
57 |
+
* @param string $module_unique_affix
|
58 |
+
* @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
|
59 |
+
* blog admin pages.
|
60 |
+
*
|
61 |
+
* @return FS_Admin_Notices
|
62 |
+
*/
|
63 |
+
static function instance( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
|
64 |
+
if ( ! isset( self::$_instances[ $id ] ) ) {
|
65 |
+
self::$_instances[ $id ] = new FS_Admin_Notices( $id, $title, $module_unique_affix, $is_network_and_blog_admins );
|
66 |
+
}
|
67 |
+
|
68 |
+
return self::$_instances[ $id ];
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @param string $id
|
73 |
+
* @param string $title
|
74 |
+
* @param string $module_unique_affix
|
75 |
+
* @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
|
76 |
+
* blog admin pages.
|
77 |
+
*/
|
78 |
+
protected function __construct( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
|
79 |
+
$this->_id = $id;
|
80 |
+
$this->_title = $title;
|
81 |
+
$this->_module_unique_affix = $module_unique_affix;
|
82 |
+
$this->_is_multisite = is_multisite();
|
83 |
+
|
84 |
+
if ( $this->_is_multisite ) {
|
85 |
+
$this->_blog_id = get_current_blog_id();
|
86 |
+
|
87 |
+
$this->_network_notices = FS_Admin_Notice_Manager::instance(
|
88 |
+
$id,
|
89 |
+
$title,
|
90 |
+
$module_unique_affix,
|
91 |
+
$is_network_and_blog_admins,
|
92 |
+
true
|
93 |
+
);
|
94 |
+
}
|
95 |
+
|
96 |
+
$this->_notices = FS_Admin_Notice_Manager::instance(
|
97 |
+
$id,
|
98 |
+
$title,
|
99 |
+
$module_unique_affix,
|
100 |
+
false,
|
101 |
+
$this->_blog_id
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
|
107 |
+
*
|
108 |
+
* @author Vova Feldman (@svovaf)
|
109 |
+
* @since 1.0.4
|
110 |
+
*
|
111 |
+
* @param string $message
|
112 |
+
* @param string $title
|
113 |
+
* @param string $type
|
114 |
+
* @param bool $is_sticky
|
115 |
+
* @param string $id Message ID
|
116 |
+
* @param bool $store_if_sticky
|
117 |
+
* @param int|null $network_level_or_blog_id
|
118 |
+
*
|
119 |
+
* @uses add_action()
|
120 |
+
*/
|
121 |
+
function add(
|
122 |
+
$message,
|
123 |
+
$title = '',
|
124 |
+
$type = 'success',
|
125 |
+
$is_sticky = false,
|
126 |
+
$id = '',
|
127 |
+
$store_if_sticky = true,
|
128 |
+
$network_level_or_blog_id = null
|
129 |
+
) {
|
130 |
+
if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
|
131 |
+
$notices = $this->_network_notices;
|
132 |
+
} else {
|
133 |
+
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
134 |
+
}
|
135 |
+
|
136 |
+
$notices->add(
|
137 |
+
$message,
|
138 |
+
$title,
|
139 |
+
$type,
|
140 |
+
$is_sticky,
|
141 |
+
$id,
|
142 |
+
$store_if_sticky
|
143 |
+
);
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @author Vova Feldman (@svovaf)
|
148 |
+
* @since 1.0.7
|
149 |
+
*
|
150 |
+
* @param string|string[] $ids
|
151 |
+
* @param int|null $network_level_or_blog_id
|
152 |
+
*/
|
153 |
+
function remove_sticky( $ids, $network_level_or_blog_id = null ) {
|
154 |
+
if ( ! is_array( $ids ) ) {
|
155 |
+
$ids = array( $ids );
|
156 |
+
}
|
157 |
+
|
158 |
+
if ( $this->should_use_network_notices( $ids[0], $network_level_or_blog_id ) ) {
|
159 |
+
$notices = $this->_network_notices;
|
160 |
+
} else {
|
161 |
+
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
162 |
+
}
|
163 |
+
|
164 |
+
return $notices->remove_sticky( $ids );
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if sticky message exists by id.
|
169 |
+
*
|
170 |
+
* @author Vova Feldman (@svovaf)
|
171 |
+
* @since 1.0.9
|
172 |
+
*
|
173 |
+
* @param string $id
|
174 |
+
* @param int|null $network_level_or_blog_id
|
175 |
+
*
|
176 |
+
* @return bool
|
177 |
+
*/
|
178 |
+
function has_sticky( $id, $network_level_or_blog_id = null ) {
|
179 |
+
if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
|
180 |
+
$notices = $this->_network_notices;
|
181 |
+
} else {
|
182 |
+
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
183 |
+
}
|
184 |
+
|
185 |
+
return $notices->has_sticky( $id );
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Adds sticky admin notification.
|
190 |
+
*
|
191 |
+
* @author Vova Feldman (@svovaf)
|
192 |
+
* @since 1.0.7
|
193 |
+
*
|
194 |
+
* @param string $message
|
195 |
+
* @param string $id Message ID
|
196 |
+
* @param string $title
|
197 |
+
* @param string $type
|
198 |
+
* @param int|null $network_level_or_blog_id
|
199 |
+
* @param number|null $wp_user_id
|
200 |
+
* @param string|null $plugin_title
|
201 |
+
* @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
|
202 |
+
* blog admin pages.
|
203 |
+
*/
|
204 |
+
function add_sticky(
|
205 |
+
$message,
|
206 |
+
$id,
|
207 |
+
$title = '',
|
208 |
+
$type = 'success',
|
209 |
+
$network_level_or_blog_id = null,
|
210 |
+
$wp_user_id = null,
|
211 |
+
$plugin_title = null,
|
212 |
+
$is_network_and_blog_admins = false
|
213 |
+
) {
|
214 |
+
if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
|
215 |
+
$notices = $this->_network_notices;
|
216 |
+
} else {
|
217 |
+
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
218 |
+
}
|
219 |
+
|
220 |
+
$notices->add_sticky( $message, $id, $title, $type, $wp_user_id, $plugin_title, $is_network_and_blog_admins );
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Clear all sticky messages.
|
225 |
+
*
|
226 |
+
* @author Vova Feldman (@svovaf)
|
227 |
+
* @since 2.0.0
|
228 |
+
*
|
229 |
+
* @param int|null $network_level_or_blog_id
|
230 |
+
*/
|
231 |
+
function clear_all_sticky( $network_level_or_blog_id = null ) {
|
232 |
+
if ( ! $this->_is_multisite ||
|
233 |
+
false === $network_level_or_blog_id ||
|
234 |
+
0 == $network_level_or_blog_id ||
|
235 |
+
is_null( $network_level_or_blog_id )
|
236 |
+
) {
|
237 |
+
$notices = $this->get_site_notices( $network_level_or_blog_id );
|
238 |
+
$notices->clear_all_sticky();
|
239 |
+
}
|
240 |
+
|
241 |
+
if ( $this->_is_multisite &&
|
242 |
+
( true === $network_level_or_blog_id || is_null( $network_level_or_blog_id ) )
|
243 |
+
) {
|
244 |
+
$this->_network_notices->clear_all_sticky();
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
|
250 |
+
*
|
251 |
+
* @author Vova Feldman (@svovaf)
|
252 |
+
* @since 1.0.4
|
253 |
+
*
|
254 |
+
* @param string $message
|
255 |
+
* @param string $title
|
256 |
+
* @param string $type
|
257 |
+
* @param bool $is_sticky
|
258 |
+
* @param string $id Message ID
|
259 |
+
*/
|
260 |
+
function add_all( $message, $title = '', $type = 'success', $is_sticky = false, $id = '' ) {
|
261 |
+
$this->add( $message, $title, $type, $is_sticky, true, $id );
|
262 |
+
}
|
263 |
+
|
264 |
+
#--------------------------------------------------------------------------------
|
265 |
+
#region Helper Methods
|
266 |
+
#--------------------------------------------------------------------------------
|
267 |
+
|
268 |
+
/**
|
269 |
+
* @author Vova Feldman (@svovaf)
|
270 |
+
* @since 2.0.0
|
271 |
+
*
|
272 |
+
* @param int $blog_id
|
273 |
+
*
|
274 |
+
* @return FS_Admin_Notice_Manager
|
275 |
+
*/
|
276 |
+
private function get_site_notices( $blog_id = 0 ) {
|
277 |
+
if ( 0 == $blog_id || $blog_id == $this->_blog_id ) {
|
278 |
+
return $this->_notices;
|
279 |
+
}
|
280 |
+
|
281 |
+
return FS_Admin_Notice_Manager::instance(
|
282 |
+
$this->_id,
|
283 |
+
$this->_title,
|
284 |
+
$this->_module_unique_affix,
|
285 |
+
false,
|
286 |
+
$blog_id
|
287 |
+
);
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Check if the network notices should be used.
|
292 |
+
*
|
293 |
+
* @author Vova Feldman (@svovaf)
|
294 |
+
* @since 2.0.0
|
295 |
+
*
|
296 |
+
* @param string $id
|
297 |
+
* @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin).
|
298 |
+
*
|
299 |
+
* @return bool
|
300 |
+
*/
|
301 |
+
private function should_use_network_notices( $id = '', $network_level_or_blog_id = null ) {
|
302 |
+
if ( ! $this->_is_multisite ) {
|
303 |
+
// Not a multisite environment.
|
304 |
+
return false;
|
305 |
+
}
|
306 |
+
|
307 |
+
if ( is_numeric( $network_level_or_blog_id ) ) {
|
308 |
+
// Explicitly asked to use a specified blog storage.
|
309 |
+
return false;
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( is_bool( $network_level_or_blog_id ) ) {
|
313 |
+
// Explicitly specified whether should use the network or blog level storage.
|
314 |
+
return $network_level_or_blog_id;
|
315 |
+
}
|
316 |
+
|
317 |
+
return fs_is_network_admin();
|
318 |
+
}
|
319 |
+
|
320 |
+
#endregion
|
321 |
}
|
includes/freemius/includes/class-fs-logger.php
CHANGED
@@ -1,691 +1,691 @@
|
|
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 |
-
class FS_Logger {
|
14 |
-
private $_id;
|
15 |
-
private $_on = false;
|
16 |
-
private $_echo = false;
|
17 |
-
private $_file_start = 0;
|
18 |
-
/**
|
19 |
-
* @var int PHP Process ID.
|
20 |
-
*/
|
21 |
-
private static $_processID;
|
22 |
-
/**
|
23 |
-
* @var string PHP Script user name.
|
24 |
-
*/
|
25 |
-
private static $_ownerName;
|
26 |
-
/**
|
27 |
-
* @var bool Is storage logging turned on.
|
28 |
-
*/
|
29 |
-
private static $_isStorageLoggingOn;
|
30 |
-
/**
|
31 |
-
* @var int ABSPATH length.
|
32 |
-
*/
|
33 |
-
private static $_abspathLength;
|
34 |
-
|
35 |
-
private static $LOGGERS = array();
|
36 |
-
private static $LOG = array();
|
37 |
-
private static $CNT = 0;
|
38 |
-
private static $_HOOKED_FOOTER = false;
|
39 |
-
|
40 |
-
private function __construct( $id, $on = false, $echo = false ) {
|
41 |
-
$this->_id = $id;
|
42 |
-
|
43 |
-
$bt = debug_backtrace();
|
44 |
-
$caller = $bt[2];
|
45 |
-
|
46 |
-
if ( false !== strpos( $caller['file'], 'plugins' ) ) {
|
47 |
-
$this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
|
48 |
-
} else {
|
49 |
-
$this->_file_start = strpos( $caller['file'], 'themes' ) + strlen( 'themes/' );
|
50 |
-
}
|
51 |
-
|
52 |
-
if ( $on ) {
|
53 |
-
$this->on();
|
54 |
-
}
|
55 |
-
if ( $echo ) {
|
56 |
-
$this->echo_on();
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @param string $id
|
62 |
-
* @param bool $on
|
63 |
-
* @param bool $echo
|
64 |
-
*
|
65 |
-
* @return FS_Logger
|
66 |
-
*/
|
67 |
-
public static function get_logger( $id, $on = false, $echo = false ) {
|
68 |
-
$id = strtolower( $id );
|
69 |
-
|
70 |
-
if ( ! isset( self::$_processID ) ) {
|
71 |
-
self::init();
|
72 |
-
}
|
73 |
-
|
74 |
-
if ( ! isset( self::$LOGGERS[ $id ] ) ) {
|
75 |
-
self::$LOGGERS[ $id ] = new FS_Logger( $id, $on, $echo );
|
76 |
-
}
|
77 |
-
|
78 |
-
return self::$LOGGERS[ $id ];
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Initialize logging global info.
|
83 |
-
*
|
84 |
-
* @author Vova Feldman (@svovaf)
|
85 |
-
* @since 1.2.1.6
|
86 |
-
*/
|
87 |
-
private static function init() {
|
88 |
-
self::$_ownerName = function_exists( 'get_current_user' ) ?
|
89 |
-
get_current_user() :
|
90 |
-
'unknown';
|
91 |
-
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
92 |
-
self::$_abspathLength = strlen( ABSPATH );
|
93 |
-
self::$_processID = mt_rand( 0, 32000 );
|
94 |
-
|
95 |
-
// Process ID may be `false` on errors.
|
96 |
-
if ( ! is_numeric( self::$_processID ) ) {
|
97 |
-
self::$_processID = 0;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
private static function hook_footer() {
|
102 |
-
if ( self::$_HOOKED_FOOTER ) {
|
103 |
-
return;
|
104 |
-
}
|
105 |
-
|
106 |
-
if ( is_admin() ) {
|
107 |
-
add_action( 'admin_footer', 'FS_Logger::dump', 100 );
|
108 |
-
} else {
|
109 |
-
add_action( 'wp_footer', 'FS_Logger::dump', 100 );
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
function is_on() {
|
114 |
-
return $this->_on;
|
115 |
-
}
|
116 |
-
|
117 |
-
function on() {
|
118 |
-
$this->_on = true;
|
119 |
-
|
120 |
-
if ( ! function_exists( 'dbDelta' ) ) {
|
121 |
-
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
122 |
-
}
|
123 |
-
|
124 |
-
self::hook_footer();
|
125 |
-
}
|
126 |
-
|
127 |
-
function echo_on() {
|
128 |
-
$this->on();
|
129 |
-
|
130 |
-
$this->_echo = true;
|
131 |
-
}
|
132 |
-
|
133 |
-
function is_echo_on() {
|
134 |
-
return $this->_echo;
|
135 |
-
}
|
136 |
-
|
137 |
-
function get_id() {
|
138 |
-
return $this->_id;
|
139 |
-
}
|
140 |
-
|
141 |
-
function get_file() {
|
142 |
-
return $this->_file_start;
|
143 |
-
}
|
144 |
-
|
145 |
-
private function _log( &$message, $type = 'log', $wrapper ) {
|
146 |
-
if ( ! $this->is_on() ) {
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
|
150 |
-
$bt = debug_backtrace();
|
151 |
-
$depth = $wrapper ? 3 : 2;
|
152 |
-
while ( $depth < count( $bt ) - 1 && 'eval' === $bt[ $depth ]['function'] ) {
|
153 |
-
$depth ++;
|
154 |
-
}
|
155 |
-
|
156 |
-
$caller = $bt[ $depth ];
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Retrieve the correct call file & line number from backtrace
|
160 |
-
* when logging from a wrapper method.
|
161 |
-
*
|
162 |
-
* @author Vova Feldman
|
163 |
-
* @since 1.2.1.6
|
164 |
-
*/
|
165 |
-
if ( empty( $caller['line'] ) ) {
|
166 |
-
$depth --;
|
167 |
-
|
168 |
-
while ( $depth >= 0 ) {
|
169 |
-
if ( ! empty( $bt[ $depth ]['line'] ) ) {
|
170 |
-
$caller['line'] = $bt[ $depth ]['line'];
|
171 |
-
$caller['file'] = $bt[ $depth ]['file'];
|
172 |
-
break;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
$log = array_merge( $caller, array(
|
178 |
-
'cnt' => self::$CNT ++,
|
179 |
-
'logger' => $this,
|
180 |
-
'timestamp' => microtime( true ),
|
181 |
-
'log_type' => $type,
|
182 |
-
'msg' => $message,
|
183 |
-
) );
|
184 |
-
|
185 |
-
if ( self::$_isStorageLoggingOn ) {
|
186 |
-
$this->db_log( $type, $message, self::$CNT, $caller );
|
187 |
-
}
|
188 |
-
|
189 |
-
self::$LOG[] = $log;
|
190 |
-
|
191 |
-
if ( $this->is_echo_on() && ! Freemius::is_ajax() ) {
|
192 |
-
echo self::format_html( $log ) . "\n";
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
function log( $message, $wrapper = false ) {
|
197 |
-
$this->_log( $message, 'log', $wrapper );
|
198 |
-
}
|
199 |
-
|
200 |
-
function info( $message, $wrapper = false ) {
|
201 |
-
$this->_log( $message, 'info', $wrapper );
|
202 |
-
}
|
203 |
-
|
204 |
-
function warn( $message, $wrapper = false ) {
|
205 |
-
$this->_log( $message, 'warn', $wrapper );
|
206 |
-
}
|
207 |
-
|
208 |
-
function error( $message, $wrapper = false ) {
|
209 |
-
$this->_log( $message, 'error', $wrapper );
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Log API error.
|
214 |
-
*
|
215 |
-
* @author Vova Feldman (@svovaf)
|
216 |
-
* @since 1.2.1.5
|
217 |
-
*
|
218 |
-
* @param mixed $api_result
|
219 |
-
* @param bool $wrapper
|
220 |
-
*/
|
221 |
-
function api_error( $api_result, $wrapper = false ) {
|
222 |
-
$message = '';
|
223 |
-
if ( is_object( $api_result ) &&
|
224 |
-
! empty( $api_result->error ) &&
|
225 |
-
! empty( $api_result->error->message )
|
226 |
-
) {
|
227 |
-
$message = $api_result->error->message;
|
228 |
-
} else if ( is_object( $api_result ) ) {
|
229 |
-
$message = var_export( $api_result, true );
|
230 |
-
} else if ( is_string( $api_result ) ) {
|
231 |
-
$message = $api_result;
|
232 |
-
} else if ( empty( $api_result ) ) {
|
233 |
-
$message = 'Empty API result.';
|
234 |
-
}
|
235 |
-
|
236 |
-
$message = 'API Error: ' . $message;
|
237 |
-
|
238 |
-
$this->_log( $message, 'error', $wrapper );
|
239 |
-
}
|
240 |
-
|
241 |
-
function entrance( $message = '', $wrapper = false ) {
|
242 |
-
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
243 |
-
|
244 |
-
$this->_log( $msg, 'log', $wrapper );
|
245 |
-
}
|
246 |
-
|
247 |
-
function departure( $message = '', $wrapper = false ) {
|
248 |
-
$msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
249 |
-
|
250 |
-
$this->_log( $msg, 'log', $wrapper );
|
251 |
-
}
|
252 |
-
|
253 |
-
#--------------------------------------------------------------------------------
|
254 |
-
#region Log Formatting
|
255 |
-
#--------------------------------------------------------------------------------
|
256 |
-
|
257 |
-
private static function format( $log, $show_type = true ) {
|
258 |
-
return '[' . str_pad( $log['cnt'], strlen( self::$CNT ), '0', STR_PAD_LEFT ) . '] [' . $log['logger']->_id . '] ' . ( $show_type ? '[' . $log['log_type'] . ']' : '' ) . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . ' >> ' . $log['msg'] . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ') ' : '' ) . ' [' . $log['timestamp'] . ']';
|
259 |
-
}
|
260 |
-
|
261 |
-
private static function format_html( $log ) {
|
262 |
-
return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['log_type'] . '] <b><code style="color: #c4b1e0;">' . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html( $log['msg'] ) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>';
|
263 |
-
}
|
264 |
-
|
265 |
-
#endregion
|
266 |
-
|
267 |
-
static function dump() {
|
268 |
-
?>
|
269 |
-
<!-- BEGIN: Freemius PHP Console Log -->
|
270 |
-
<script type="text/javascript">
|
271 |
-
<?php
|
272 |
-
foreach ( self::$LOG as $log ) {
|
273 |
-
echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
|
274 |
-
}
|
275 |
-
?>
|
276 |
-
</script>
|
277 |
-
<!-- END: Freemius PHP Console Log -->
|
278 |
-
<?php
|
279 |
-
}
|
280 |
-
|
281 |
-
static function get_log() {
|
282 |
-
return self::$LOG;
|
283 |
-
}
|
284 |
-
|
285 |
-
#--------------------------------------------------------------------------------
|
286 |
-
#region Database Logging
|
287 |
-
#--------------------------------------------------------------------------------
|
288 |
-
|
289 |
-
/**
|
290 |
-
* @author Vova Feldman (@svovaf)
|
291 |
-
* @since 1.2.1.6
|
292 |
-
*
|
293 |
-
* @return bool
|
294 |
-
*/
|
295 |
-
public static function is_storage_logging_on() {
|
296 |
-
if ( ! isset( self::$_isStorageLoggingOn ) ) {
|
297 |
-
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
298 |
-
}
|
299 |
-
|
300 |
-
return self::$_isStorageLoggingOn;
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Turns on/off database persistent debugging to capture
|
305 |
-
* multi-session logs to debug complex flows like
|
306 |
-
* plugin auto-deactivate on premium version activation.
|
307 |
-
*
|
308 |
-
* @todo Check if Theme Check has issues with DB tables for themes.
|
309 |
-
*
|
310 |
-
* @author Vova Feldman (@svovaf)
|
311 |
-
* @since 1.2.1.6
|
312 |
-
*
|
313 |
-
* @param bool $is_on
|
314 |
-
*
|
315 |
-
* @return bool
|
316 |
-
*/
|
317 |
-
public static function _set_storage_logging( $is_on = true ) {
|
318 |
-
global $wpdb;
|
319 |
-
|
320 |
-
$table = "{$wpdb->prefix}fs_logger";
|
321 |
-
|
322 |
-
if ( $is_on ) {
|
323 |
-
/**
|
324 |
-
* Create logging table.
|
325 |
-
*
|
326 |
-
* NOTE:
|
327 |
-
* dbDelta must use KEY and not INDEX for indexes.
|
328 |
-
*
|
329 |
-
* @link https://core.trac.wordpress.org/ticket/2695
|
330 |
-
*/
|
331 |
-
$result = $wpdb->query( "CREATE TABLE {$table} (
|
332 |
-
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
333 |
-
`process_id` INT UNSIGNED NOT NULL,
|
334 |
-
`user_name` VARCHAR(64) NOT NULL,
|
335 |
-
`logger` VARCHAR(128) NOT NULL,
|
336 |
-
`log_order` INT UNSIGNED NOT NULL,
|
337 |
-
`type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
|
338 |
-
`message` TEXT NOT NULL,
|
339 |
-
`file` VARCHAR(256) NOT NULL,
|
340 |
-
`line` INT UNSIGNED NOT NULL,
|
341 |
-
`function` VARCHAR(256) NOT NULL,
|
342 |
-
`request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
|
343 |
-
`request_url` VARCHAR(1024) NOT NULL,
|
344 |
-
`created` DECIMAL(16, 6) NOT NULL,
|
345 |
-
PRIMARY KEY (`id`),
|
346 |
-
KEY `process_id` (`process_id` ASC),
|
347 |
-
KEY `process_logger` (`process_id` ASC, `logger` ASC),
|
348 |
-
KEY `function` (`function` ASC),
|
349 |
-
KEY `type` (`type` ASC))" );
|
350 |
-
} else {
|
351 |
-
/**
|
352 |
-
* Drop logging table.
|
353 |
-
*/
|
354 |
-
$result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
|
355 |
-
}
|
356 |
-
|
357 |
-
if ( false !== $result ) {
|
358 |
-
update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
|
359 |
-
}
|
360 |
-
|
361 |
-
return ( false !== $result );
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* @author Vova Feldman (@svovaf)
|
366 |
-
* @since 1.2.1.6
|
367 |
-
*
|
368 |
-
* @param string $type
|
369 |
-
* @param string $message
|
370 |
-
* @param int $log_order
|
371 |
-
* @param array $caller
|
372 |
-
*
|
373 |
-
* @return false|int
|
374 |
-
*/
|
375 |
-
private function db_log(
|
376 |
-
&$type,
|
377 |
-
&$message,
|
378 |
-
&$log_order,
|
379 |
-
&$caller
|
380 |
-
) {
|
381 |
-
global $wpdb;
|
382 |
-
|
383 |
-
$request_type = 'call';
|
384 |
-
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
385 |
-
$request_type = 'cron';
|
386 |
-
} else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
387 |
-
$request_type = 'ajax';
|
388 |
-
}
|
389 |
-
|
390 |
-
$request_url = WP_FS__IS_HTTP_REQUEST ?
|
391 |
-
$_SERVER['REQUEST_URI'] :
|
392 |
-
'';
|
393 |
-
|
394 |
-
return $wpdb->insert(
|
395 |
-
"{$wpdb->prefix}fs_logger",
|
396 |
-
array(
|
397 |
-
'process_id' => self::$_processID,
|
398 |
-
'user_name' => self::$_ownerName,
|
399 |
-
'logger' => $this->_id,
|
400 |
-
'log_order' => $log_order,
|
401 |
-
'type' => $type,
|
402 |
-
'request_type' => $request_type,
|
403 |
-
'request_url' => $request_url,
|
404 |
-
'message' => $message,
|
405 |
-
'file' => isset( $caller['file'] ) ?
|
406 |
-
substr( $caller['file'], self::$_abspathLength ) :
|
407 |
-
'',
|
408 |
-
'line' => $caller['line'],
|
409 |
-
'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
|
410 |
-
'created' => microtime( true ),
|
411 |
-
)
|
412 |
-
);
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Persistent DB logger columns.
|
417 |
-
*
|
418 |
-
* @var array
|
419 |
-
*/
|
420 |
-
private static $_log_columns = array(
|
421 |
-
'id',
|
422 |
-
'process_id',
|
423 |
-
'user_name',
|
424 |
-
'logger',
|
425 |
-
'log_order',
|
426 |
-
'type',
|
427 |
-
'message',
|
428 |
-
'file',
|
429 |
-
'line',
|
430 |
-
'function',
|
431 |
-
'request_type',
|
432 |
-
'request_url',
|
433 |
-
'created',
|
434 |
-
);
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Create DB logs query.
|
438 |
-
*
|
439 |
-
* @author Vova Feldman (@svovaf)
|
440 |
-
* @since 1.2.1.6
|
441 |
-
*
|
442 |
-
* @param bool $filters
|
443 |
-
* @param int $limit
|
444 |
-
* @param int $offset
|
445 |
-
* @param bool $order
|
446 |
-
* @param bool $escape_eol
|
447 |
-
*
|
448 |
-
* @return string
|
449 |
-
*/
|
450 |
-
private static function build_db_logs_query(
|
451 |
-
$filters = false,
|
452 |
-
$limit = 200,
|
453 |
-
$offset = 0,
|
454 |
-
$order = false,
|
455 |
-
$escape_eol = false
|
456 |
-
) {
|
457 |
-
global $wpdb;
|
458 |
-
|
459 |
-
$select = '*';
|
460 |
-
|
461 |
-
if ( $escape_eol ) {
|
462 |
-
$select = '';
|
463 |
-
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
464 |
-
if ( $i > 0 ) {
|
465 |
-
$select .= ', ';
|
466 |
-
}
|
467 |
-
|
468 |
-
if ( 'message' !== self::$_log_columns[ $i ] ) {
|
469 |
-
$select .= self::$_log_columns[ $i ];
|
470 |
-
} else {
|
471 |
-
$select .= 'REPLACE(message , \'\n\', \' \') AS message';
|
472 |
-
}
|
473 |
-
}
|
474 |
-
}
|
475 |
-
|
476 |
-
$query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
|
477 |
-
if ( is_array( $filters ) ) {
|
478 |
-
$criteria = array();
|
479 |
-
|
480 |
-
if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
|
481 |
-
$filters['type'] = strtolower( $filters['type'] );
|
482 |
-
|
483 |
-
switch ( $filters['type'] ) {
|
484 |
-
case 'warn_error':
|
485 |
-
$criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
|
486 |
-
break;
|
487 |
-
case 'error':
|
488 |
-
case 'warn':
|
489 |
-
$criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
|
490 |
-
break;
|
491 |
-
case 'info':
|
492 |
-
default:
|
493 |
-
$criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
|
494 |
-
break;
|
495 |
-
}
|
496 |
-
}
|
497 |
-
|
498 |
-
if ( ! empty( $filters['request_type'] ) ) {
|
499 |
-
$filters['request_type'] = strtolower( $filters['request_type'] );
|
500 |
-
|
501 |
-
if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
|
502 |
-
$criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
|
503 |
-
}
|
504 |
-
}
|
505 |
-
|
506 |
-
if ( ! empty( $filters['file'] ) ) {
|
507 |
-
$criteria[] = array(
|
508 |
-
'col' => 'file',
|
509 |
-
'op' => 'LIKE',
|
510 |
-
'val' => '%' . esc_sql( $filters['file'] ),
|
511 |
-
);
|
512 |
-
}
|
513 |
-
|
514 |
-
if ( ! empty( $filters['function'] ) ) {
|
515 |
-
$criteria[] = array(
|
516 |
-
'col' => 'function',
|
517 |
-
'op' => 'LIKE',
|
518 |
-
'val' => '%' . esc_sql( $filters['function'] ),
|
519 |
-
);
|
520 |
-
}
|
521 |
-
|
522 |
-
if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
|
523 |
-
$criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
|
524 |
-
}
|
525 |
-
|
526 |
-
if ( ! empty( $filters['logger'] ) ) {
|
527 |
-
$criteria[] = array(
|
528 |
-
'col' => 'logger',
|
529 |
-
'op' => 'LIKE',
|
530 |
-
'val' => '%' . esc_sql( $filters['logger'] ) . '%',
|
531 |
-
);
|
532 |
-
}
|
533 |
-
|
534 |
-
if ( ! empty( $filters['message'] ) ) {
|
535 |
-
$criteria[] = array(
|
536 |
-
'col' => 'message',
|
537 |
-
'op' => 'LIKE',
|
538 |
-
'val' => '%' . esc_sql( $filters['message'] ) . '%',
|
539 |
-
);
|
540 |
-
}
|
541 |
-
|
542 |
-
if ( 0 < count( $criteria ) ) {
|
543 |
-
$query .= "\nWHERE\n";
|
544 |
-
|
545 |
-
$first = true;
|
546 |
-
foreach ( $criteria as $c ) {
|
547 |
-
if ( ! $first ) {
|
548 |
-
$query .= "AND\n";
|
549 |
-
}
|
550 |
-
|
551 |
-
if ( is_array( $c['val'] ) ) {
|
552 |
-
$operator = 'IN';
|
553 |
-
|
554 |
-
for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
|
555 |
-
$c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
|
556 |
-
}
|
557 |
-
|
558 |
-
$val = '(' . implode( ',', $c['val'] ) . ')';
|
559 |
-
} else {
|
560 |
-
$operator = ! empty( $c['op'] ) ? $c['op'] : '=';
|
561 |
-
$val = "'" . esc_sql( $c['val'] ) . "'";
|
562 |
-
}
|
563 |
-
|
564 |
-
$query .= "`{$c['col']}` {$operator} {$val}\n";
|
565 |
-
|
566 |
-
$first = false;
|
567 |
-
}
|
568 |
-
}
|
569 |
-
}
|
570 |
-
|
571 |
-
if ( ! is_array( $order ) ) {
|
572 |
-
$order = array(
|
573 |
-
'col' => 'id',
|
574 |
-
'order' => 'desc'
|
575 |
-
);
|
576 |
-
}
|
577 |
-
|
578 |
-
$query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
|
579 |
-
|
580 |
-
return $query;
|
581 |
-
}
|
582 |
-
|
583 |
-
/**
|
584 |
-
* Load logs from DB.
|
585 |
-
*
|
586 |
-
* @author Vova Feldman (@svovaf)
|
587 |
-
* @since 1.2.1.6
|
588 |
-
*
|
589 |
-
* @param bool $filters
|
590 |
-
* @param int $limit
|
591 |
-
* @param int $offset
|
592 |
-
* @param bool $order
|
593 |
-
*
|
594 |
-
* @return object[]|null
|
595 |
-
*/
|
596 |
-
public static function load_db_logs(
|
597 |
-
$filters = false,
|
598 |
-
$limit = 200,
|
599 |
-
$offset = 0,
|
600 |
-
$order = false
|
601 |
-
) {
|
602 |
-
global $wpdb;
|
603 |
-
|
604 |
-
$query = self::build_db_logs_query(
|
605 |
-
$filters,
|
606 |
-
$limit,
|
607 |
-
$offset,
|
608 |
-
$order
|
609 |
-
);
|
610 |
-
|
611 |
-
return $wpdb->get_results( $query );
|
612 |
-
}
|
613 |
-
|
614 |
-
/**
|
615 |
-
* Load logs from DB.
|
616 |
-
*
|
617 |
-
* @author Vova Feldman (@svovaf)
|
618 |
-
* @since 1.2.1.6
|
619 |
-
*
|
620 |
-
* @param bool $filters
|
621 |
-
* @param string $filename
|
622 |
-
* @param int $limit
|
623 |
-
* @param int $offset
|
624 |
-
* @param bool $order
|
625 |
-
*
|
626 |
-
* @return false|string File download URL or false on failure.
|
627 |
-
*/
|
628 |
-
public static function download_db_logs(
|
629 |
-
$filters = false,
|
630 |
-
$filename = '',
|
631 |
-
$limit = 10000,
|
632 |
-
$offset = 0,
|
633 |
-
$order = false
|
634 |
-
) {
|
635 |
-
global $wpdb;
|
636 |
-
|
637 |
-
$query = self::build_db_logs_query(
|
638 |
-
$filters,
|
639 |
-
$limit,
|
640 |
-
$offset,
|
641 |
-
$order,
|
642 |
-
true
|
643 |
-
);
|
644 |
-
|
645 |
-
$upload_dir = wp_upload_dir();
|
646 |
-
if ( empty( $filename ) ) {
|
647 |
-
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
648 |
-
}
|
649 |
-
$filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
|
650 |
-
|
651 |
-
$query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
|
652 |
-
|
653 |
-
$columns = '';
|
654 |
-
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
655 |
-
if ( $i > 0 ) {
|
656 |
-
$columns .= ', ';
|
657 |
-
}
|
658 |
-
|
659 |
-
$columns .= "'" . self::$_log_columns[ $i ] . "'";
|
660 |
-
}
|
661 |
-
|
662 |
-
$query = "SELECT {$columns} UNION ALL " . $query;
|
663 |
-
|
664 |
-
$result = $wpdb->query( $query );
|
665 |
-
|
666 |
-
if ( false === $result ) {
|
667 |
-
return false;
|
668 |
-
}
|
669 |
-
|
670 |
-
return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
|
671 |
-
}
|
672 |
-
|
673 |
-
/**
|
674 |
-
* @author Vova Feldman (@svovaf)
|
675 |
-
* @since 1.2.1.6
|
676 |
-
*
|
677 |
-
* @param string $filename
|
678 |
-
*
|
679 |
-
* @return string
|
680 |
-
*/
|
681 |
-
public static function get_logs_download_url( $filename = '' ) {
|
682 |
-
$upload_dir = wp_upload_dir();
|
683 |
-
if ( empty( $filename ) ) {
|
684 |
-
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
685 |
-
}
|
686 |
-
|
687 |
-
return rtrim( $upload_dir['url'], '/' ) . $filename;
|
688 |
-
}
|
689 |
-
|
690 |
-
#endregion
|
691 |
}
|
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 |
+
class FS_Logger {
|
14 |
+
private $_id;
|
15 |
+
private $_on = false;
|
16 |
+
private $_echo = false;
|
17 |
+
private $_file_start = 0;
|
18 |
+
/**
|
19 |
+
* @var int PHP Process ID.
|
20 |
+
*/
|
21 |
+
private static $_processID;
|
22 |
+
/**
|
23 |
+
* @var string PHP Script user name.
|
24 |
+
*/
|
25 |
+
private static $_ownerName;
|
26 |
+
/**
|
27 |
+
* @var bool Is storage logging turned on.
|
28 |
+
*/
|
29 |
+
private static $_isStorageLoggingOn;
|
30 |
+
/**
|
31 |
+
* @var int ABSPATH length.
|
32 |
+
*/
|
33 |
+
private static $_abspathLength;
|
34 |
+
|
35 |
+
private static $LOGGERS = array();
|
36 |
+
private static $LOG = array();
|
37 |
+
private static $CNT = 0;
|
38 |
+
private static $_HOOKED_FOOTER = false;
|
39 |
+
|
40 |
+
private function __construct( $id, $on = false, $echo = false ) {
|
41 |
+
$this->_id = $id;
|
42 |
+
|
43 |
+
$bt = debug_backtrace();
|
44 |
+
$caller = $bt[2];
|
45 |
+
|
46 |
+
if ( false !== strpos( $caller['file'], 'plugins' ) ) {
|
47 |
+
$this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
|
48 |
+
} else {
|
49 |
+
$this->_file_start = strpos( $caller['file'], 'themes' ) + strlen( 'themes/' );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( $on ) {
|
53 |
+
$this->on();
|
54 |
+
}
|
55 |
+
if ( $echo ) {
|
56 |
+
$this->echo_on();
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param string $id
|
62 |
+
* @param bool $on
|
63 |
+
* @param bool $echo
|
64 |
+
*
|
65 |
+
* @return FS_Logger
|
66 |
+
*/
|
67 |
+
public static function get_logger( $id, $on = false, $echo = false ) {
|
68 |
+
$id = strtolower( $id );
|
69 |
+
|
70 |
+
if ( ! isset( self::$_processID ) ) {
|
71 |
+
self::init();
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! isset( self::$LOGGERS[ $id ] ) ) {
|
75 |
+
self::$LOGGERS[ $id ] = new FS_Logger( $id, $on, $echo );
|
76 |
+
}
|
77 |
+
|
78 |
+
return self::$LOGGERS[ $id ];
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Initialize logging global info.
|
83 |
+
*
|
84 |
+
* @author Vova Feldman (@svovaf)
|
85 |
+
* @since 1.2.1.6
|
86 |
+
*/
|
87 |
+
private static function init() {
|
88 |
+
self::$_ownerName = function_exists( 'get_current_user' ) ?
|
89 |
+
get_current_user() :
|
90 |
+
'unknown';
|
91 |
+
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
92 |
+
self::$_abspathLength = strlen( ABSPATH );
|
93 |
+
self::$_processID = mt_rand( 0, 32000 );
|
94 |
+
|
95 |
+
// Process ID may be `false` on errors.
|
96 |
+
if ( ! is_numeric( self::$_processID ) ) {
|
97 |
+
self::$_processID = 0;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
private static function hook_footer() {
|
102 |
+
if ( self::$_HOOKED_FOOTER ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
if ( is_admin() ) {
|
107 |
+
add_action( 'admin_footer', 'FS_Logger::dump', 100 );
|
108 |
+
} else {
|
109 |
+
add_action( 'wp_footer', 'FS_Logger::dump', 100 );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
function is_on() {
|
114 |
+
return $this->_on;
|
115 |
+
}
|
116 |
+
|
117 |
+
function on() {
|
118 |
+
$this->_on = true;
|
119 |
+
|
120 |
+
if ( ! function_exists( 'dbDelta' ) ) {
|
121 |
+
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
122 |
+
}
|
123 |
+
|
124 |
+
self::hook_footer();
|
125 |
+
}
|
126 |
+
|
127 |
+
function echo_on() {
|
128 |
+
$this->on();
|
129 |
+
|
130 |
+
$this->_echo = true;
|
131 |
+
}
|
132 |
+
|
133 |
+
function is_echo_on() {
|
134 |
+
return $this->_echo;
|
135 |
+
}
|
136 |
+
|
137 |
+
function get_id() {
|
138 |
+
return $this->_id;
|
139 |
+
}
|
140 |
+
|
141 |
+
function get_file() {
|
142 |
+
return $this->_file_start;
|
143 |
+
}
|
144 |
+
|
145 |
+
private function _log( &$message, $type = 'log', $wrapper ) {
|
146 |
+
if ( ! $this->is_on() ) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
+
|
150 |
+
$bt = debug_backtrace();
|
151 |
+
$depth = $wrapper ? 3 : 2;
|
152 |
+
while ( $depth < count( $bt ) - 1 && 'eval' === $bt[ $depth ]['function'] ) {
|
153 |
+
$depth ++;
|
154 |
+
}
|
155 |
+
|
156 |
+
$caller = $bt[ $depth ];
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Retrieve the correct call file & line number from backtrace
|
160 |
+
* when logging from a wrapper method.
|
161 |
+
*
|
162 |
+
* @author Vova Feldman
|
163 |
+
* @since 1.2.1.6
|
164 |
+
*/
|
165 |
+
if ( empty( $caller['line'] ) ) {
|
166 |
+
$depth --;
|
167 |
+
|
168 |
+
while ( $depth >= 0 ) {
|
169 |
+
if ( ! empty( $bt[ $depth ]['line'] ) ) {
|
170 |
+
$caller['line'] = $bt[ $depth ]['line'];
|
171 |
+
$caller['file'] = $bt[ $depth ]['file'];
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
$log = array_merge( $caller, array(
|
178 |
+
'cnt' => self::$CNT ++,
|
179 |
+
'logger' => $this,
|
180 |
+
'timestamp' => microtime( true ),
|
181 |
+
'log_type' => $type,
|
182 |
+
'msg' => $message,
|
183 |
+
) );
|
184 |
+
|
185 |
+
if ( self::$_isStorageLoggingOn ) {
|
186 |
+
$this->db_log( $type, $message, self::$CNT, $caller );
|
187 |
+
}
|
188 |
+
|
189 |
+
self::$LOG[] = $log;
|
190 |
+
|
191 |
+
if ( $this->is_echo_on() && ! Freemius::is_ajax() ) {
|
192 |
+
echo self::format_html( $log ) . "\n";
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
function log( $message, $wrapper = false ) {
|
197 |
+
$this->_log( $message, 'log', $wrapper );
|
198 |
+
}
|
199 |
+
|
200 |
+
function info( $message, $wrapper = false ) {
|
201 |
+
$this->_log( $message, 'info', $wrapper );
|
202 |
+
}
|
203 |
+
|
204 |
+
function warn( $message, $wrapper = false ) {
|
205 |
+
$this->_log( $message, 'warn', $wrapper );
|
206 |
+
}
|
207 |
+
|
208 |
+
function error( $message, $wrapper = false ) {
|
209 |
+
$this->_log( $message, 'error', $wrapper );
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Log API error.
|
214 |
+
*
|
215 |
+
* @author Vova Feldman (@svovaf)
|
216 |
+
* @since 1.2.1.5
|
217 |
+
*
|
218 |
+
* @param mixed $api_result
|
219 |
+
* @param bool $wrapper
|
220 |
+
*/
|
221 |
+
function api_error( $api_result, $wrapper = false ) {
|
222 |
+
$message = '';
|
223 |
+
if ( is_object( $api_result ) &&
|
224 |
+
! empty( $api_result->error ) &&
|
225 |
+
! empty( $api_result->error->message )
|
226 |
+
) {
|
227 |
+
$message = $api_result->error->message;
|
228 |
+
} else if ( is_object( $api_result ) ) {
|
229 |
+
$message = var_export( $api_result, true );
|
230 |
+
} else if ( is_string( $api_result ) ) {
|
231 |
+
$message = $api_result;
|
232 |
+
} else if ( empty( $api_result ) ) {
|
233 |
+
$message = 'Empty API result.';
|
234 |
+
}
|
235 |
+
|
236 |
+
$message = 'API Error: ' . $message;
|
237 |
+
|
238 |
+
$this->_log( $message, 'error', $wrapper );
|
239 |
+
}
|
240 |
+
|
241 |
+
function entrance( $message = '', $wrapper = false ) {
|
242 |
+
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
243 |
+
|
244 |
+
$this->_log( $msg, 'log', $wrapper );
|
245 |
+
}
|
246 |
+
|
247 |
+
function departure( $message = '', $wrapper = false ) {
|
248 |
+
$msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
249 |
+
|
250 |
+
$this->_log( $msg, 'log', $wrapper );
|
251 |
+
}
|
252 |
+
|
253 |
+
#--------------------------------------------------------------------------------
|
254 |
+
#region Log Formatting
|
255 |
+
#--------------------------------------------------------------------------------
|
256 |
+
|
257 |
+
private static function format( $log, $show_type = true ) {
|
258 |
+
return '[' . str_pad( $log['cnt'], strlen( self::$CNT ), '0', STR_PAD_LEFT ) . '] [' . $log['logger']->_id . '] ' . ( $show_type ? '[' . $log['log_type'] . ']' : '' ) . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . ' >> ' . $log['msg'] . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ') ' : '' ) . ' [' . $log['timestamp'] . ']';
|
259 |
+
}
|
260 |
+
|
261 |
+
private static function format_html( $log ) {
|
262 |
+
return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['log_type'] . '] <b><code style="color: #c4b1e0;">' . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html( $log['msg'] ) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>';
|
263 |
+
}
|
264 |
+
|
265 |
+
#endregion
|
266 |
+
|
267 |
+
static function dump() {
|
268 |
+
?>
|
269 |
+
<!-- BEGIN: Freemius PHP Console Log -->
|
270 |
+
<script type="text/javascript">
|
271 |
+
<?php
|
272 |
+
foreach ( self::$LOG as $log ) {
|
273 |
+
echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
|
274 |
+
}
|
275 |
+
?>
|
276 |
+
</script>
|
277 |
+
<!-- END: Freemius PHP Console Log -->
|
278 |
+
<?php
|
279 |
+
}
|
280 |
+
|
281 |
+
static function get_log() {
|
282 |
+
return self::$LOG;
|
283 |
+
}
|
284 |
+
|
285 |
+
#--------------------------------------------------------------------------------
|
286 |
+
#region Database Logging
|
287 |
+
#--------------------------------------------------------------------------------
|
288 |
+
|
289 |
+
/**
|
290 |
+
* @author Vova Feldman (@svovaf)
|
291 |
+
* @since 1.2.1.6
|
292 |
+
*
|
293 |
+
* @return bool
|
294 |
+
*/
|
295 |
+
public static function is_storage_logging_on() {
|
296 |
+
if ( ! isset( self::$_isStorageLoggingOn ) ) {
|
297 |
+
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
298 |
+
}
|
299 |
+
|
300 |
+
return self::$_isStorageLoggingOn;
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Turns on/off database persistent debugging to capture
|
305 |
+
* multi-session logs to debug complex flows like
|
306 |
+
* plugin auto-deactivate on premium version activation.
|
307 |
+
*
|
308 |
+
* @todo Check if Theme Check has issues with DB tables for themes.
|
309 |
+
*
|
310 |
+
* @author Vova Feldman (@svovaf)
|
311 |
+
* @since 1.2.1.6
|
312 |
+
*
|
313 |
+
* @param bool $is_on
|
314 |
+
*
|
315 |
+
* @return bool
|
316 |
+
*/
|
317 |
+
public static function _set_storage_logging( $is_on = true ) {
|
318 |
+
global $wpdb;
|
319 |
+
|
320 |
+
$table = "{$wpdb->prefix}fs_logger";
|
321 |
+
|
322 |
+
if ( $is_on ) {
|
323 |
+
/**
|
324 |
+
* Create logging table.
|
325 |
+
*
|
326 |
+
* NOTE:
|
327 |
+
* dbDelta must use KEY and not INDEX for indexes.
|
328 |
+
*
|
329 |
+
* @link https://core.trac.wordpress.org/ticket/2695
|
330 |
+
*/
|
331 |
+
$result = $wpdb->query( "CREATE TABLE {$table} (
|
332 |
+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
333 |
+
`process_id` INT UNSIGNED NOT NULL,
|
334 |
+
`user_name` VARCHAR(64) NOT NULL,
|
335 |
+
`logger` VARCHAR(128) NOT NULL,
|
336 |
+
`log_order` INT UNSIGNED NOT NULL,
|
337 |
+
`type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
|
338 |
+
`message` TEXT NOT NULL,
|
339 |
+
`file` VARCHAR(256) NOT NULL,
|
340 |
+
`line` INT UNSIGNED NOT NULL,
|
341 |
+
`function` VARCHAR(256) NOT NULL,
|
342 |
+
`request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
|
343 |
+
`request_url` VARCHAR(1024) NOT NULL,
|
344 |
+
`created` DECIMAL(16, 6) NOT NULL,
|
345 |
+
PRIMARY KEY (`id`),
|
346 |
+
KEY `process_id` (`process_id` ASC),
|
347 |
+
KEY `process_logger` (`process_id` ASC, `logger` ASC),
|
348 |
+
KEY `function` (`function` ASC),
|
349 |
+
KEY `type` (`type` ASC))" );
|
350 |
+
} else {
|
351 |
+
/**
|
352 |
+
* Drop logging table.
|
353 |
+
*/
|
354 |
+
$result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
|
355 |
+
}
|
356 |
+
|
357 |
+
if ( false !== $result ) {
|
358 |
+
update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
|
359 |
+
}
|
360 |
+
|
361 |
+
return ( false !== $result );
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* @author Vova Feldman (@svovaf)
|
366 |
+
* @since 1.2.1.6
|
367 |
+
*
|
368 |
+
* @param string $type
|
369 |
+
* @param string $message
|
370 |
+
* @param int $log_order
|
371 |
+
* @param array $caller
|
372 |
+
*
|
373 |
+
* @return false|int
|
374 |
+
*/
|
375 |
+
private function db_log(
|
376 |
+
&$type,
|
377 |
+
&$message,
|
378 |
+
&$log_order,
|
379 |
+
&$caller
|
380 |
+
) {
|
381 |
+
global $wpdb;
|
382 |
+
|
383 |
+
$request_type = 'call';
|
384 |
+
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
385 |
+
$request_type = 'cron';
|
386 |
+
} else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
387 |
+
$request_type = 'ajax';
|
388 |
+
}
|
389 |
+
|
390 |
+
$request_url = WP_FS__IS_HTTP_REQUEST ?
|
391 |
+
$_SERVER['REQUEST_URI'] :
|
392 |
+
'';
|
393 |
+
|
394 |
+
return $wpdb->insert(
|
395 |
+
"{$wpdb->prefix}fs_logger",
|
396 |
+
array(
|
397 |
+
'process_id' => self::$_processID,
|
398 |
+
'user_name' => self::$_ownerName,
|
399 |
+
'logger' => $this->_id,
|
400 |
+
'log_order' => $log_order,
|
401 |
+
'type' => $type,
|
402 |
+
'request_type' => $request_type,
|
403 |
+
'request_url' => $request_url,
|
404 |
+
'message' => $message,
|
405 |
+
'file' => isset( $caller['file'] ) ?
|
406 |
+
substr( $caller['file'], self::$_abspathLength ) :
|
407 |
+
'',
|
408 |
+
'line' => $caller['line'],
|
409 |
+
'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
|
410 |
+
'created' => microtime( true ),
|
411 |
+
)
|
412 |
+
);
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Persistent DB logger columns.
|
417 |
+
*
|
418 |
+
* @var array
|
419 |
+
*/
|
420 |
+
private static $_log_columns = array(
|
421 |
+
'id',
|
422 |
+
'process_id',
|
423 |
+
'user_name',
|
424 |
+
'logger',
|
425 |
+
'log_order',
|
426 |
+
'type',
|
427 |
+
'message',
|
428 |
+
'file',
|
429 |
+
'line',
|
430 |
+
'function',
|
431 |
+
'request_type',
|
432 |
+
'request_url',
|
433 |
+
'created',
|
434 |
+
);
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Create DB logs query.
|
438 |
+
*
|
439 |
+
* @author Vova Feldman (@svovaf)
|
440 |
+
* @since 1.2.1.6
|
441 |
+
*
|
442 |
+
* @param bool $filters
|
443 |
+
* @param int $limit
|
444 |
+
* @param int $offset
|
445 |
+
* @param bool $order
|
446 |
+
* @param bool $escape_eol
|
447 |
+
*
|
448 |
+
* @return string
|
449 |
+
*/
|
450 |
+
private static function build_db_logs_query(
|
451 |
+
$filters = false,
|
452 |
+
$limit = 200,
|
453 |
+
$offset = 0,
|
454 |
+
$order = false,
|
455 |
+
$escape_eol = false
|
456 |
+
) {
|
457 |
+
global $wpdb;
|
458 |
+
|
459 |
+
$select = '*';
|
460 |
+
|
461 |
+
if ( $escape_eol ) {
|
462 |
+
$select = '';
|
463 |
+
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
464 |
+
if ( $i > 0 ) {
|
465 |
+
$select .= ', ';
|
466 |
+
}
|
467 |
+
|
468 |
+
if ( 'message' !== self::$_log_columns[ $i ] ) {
|
469 |
+
$select .= self::$_log_columns[ $i ];
|
470 |
+
} else {
|
471 |
+
$select .= 'REPLACE(message , \'\n\', \' \') AS message';
|
472 |
+
}
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
$query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
|
477 |
+
if ( is_array( $filters ) ) {
|
478 |
+
$criteria = array();
|
479 |
+
|
480 |
+
if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
|
481 |
+
$filters['type'] = strtolower( $filters['type'] );
|
482 |
+
|
483 |
+
switch ( $filters['type'] ) {
|
484 |
+
case 'warn_error':
|
485 |
+
$criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
|
486 |
+
break;
|
487 |
+
case 'error':
|
488 |
+
case 'warn':
|
489 |
+
$criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
|
490 |
+
break;
|
491 |
+
case 'info':
|
492 |
+
default:
|
493 |
+
$criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
|
494 |
+
break;
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
if ( ! empty( $filters['request_type'] ) ) {
|
499 |
+
$filters['request_type'] = strtolower( $filters['request_type'] );
|
500 |
+
|
501 |
+
if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
|
502 |
+
$criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
+
if ( ! empty( $filters['file'] ) ) {
|
507 |
+
$criteria[] = array(
|
508 |
+
'col' => 'file',
|
509 |
+
'op' => 'LIKE',
|
510 |
+
'val' => '%' . esc_sql( $filters['file'] ),
|
511 |
+
);
|
512 |
+
}
|
513 |
+
|
514 |
+
if ( ! empty( $filters['function'] ) ) {
|
515 |
+
$criteria[] = array(
|
516 |
+
'col' => 'function',
|
517 |
+
'op' => 'LIKE',
|
518 |
+
'val' => '%' . esc_sql( $filters['function'] ),
|
519 |
+
);
|
520 |
+
}
|
521 |
+
|
522 |
+
if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
|
523 |
+
$criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
|
524 |
+
}
|
525 |
+
|
526 |
+
if ( ! empty( $filters['logger'] ) ) {
|
527 |
+
$criteria[] = array(
|
528 |
+
'col' => 'logger',
|
529 |
+
'op' => 'LIKE',
|
530 |
+
'val' => '%' . esc_sql( $filters['logger'] ) . '%',
|
531 |
+
);
|
532 |
+
}
|
533 |
+
|
534 |
+
if ( ! empty( $filters['message'] ) ) {
|
535 |
+
$criteria[] = array(
|
536 |
+
'col' => 'message',
|
537 |
+
'op' => 'LIKE',
|
538 |
+
'val' => '%' . esc_sql( $filters['message'] ) . '%',
|
539 |
+
);
|
540 |
+
}
|
541 |
+
|
542 |
+
if ( 0 < count( $criteria ) ) {
|
543 |
+
$query .= "\nWHERE\n";
|
544 |
+
|
545 |
+
$first = true;
|
546 |
+
foreach ( $criteria as $c ) {
|
547 |
+
if ( ! $first ) {
|
548 |
+
$query .= "AND\n";
|
549 |
+
}
|
550 |
+
|
551 |
+
if ( is_array( $c['val'] ) ) {
|
552 |
+
$operator = 'IN';
|
553 |
+
|
554 |
+
for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
|
555 |
+
$c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
|
556 |
+
}
|
557 |
+
|
558 |
+
$val = '(' . implode( ',', $c['val'] ) . ')';
|
559 |
+
} else {
|
560 |
+
$operator = ! empty( $c['op'] ) ? $c['op'] : '=';
|
561 |
+
$val = "'" . esc_sql( $c['val'] ) . "'";
|
562 |
+
}
|
563 |
+
|
564 |
+
$query .= "`{$c['col']}` {$operator} {$val}\n";
|
565 |
+
|
566 |
+
$first = false;
|
567 |
+
}
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
if ( ! is_array( $order ) ) {
|
572 |
+
$order = array(
|
573 |
+
'col' => 'id',
|
574 |
+
'order' => 'desc'
|
575 |
+
);
|
576 |
+
}
|
577 |
+
|
578 |
+
$query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
|
579 |
+
|
580 |
+
return $query;
|
581 |
+
}
|
582 |
+
|
583 |
+
/**
|
584 |
+
* Load logs from DB.
|
585 |
+
*
|
586 |
+
* @author Vova Feldman (@svovaf)
|
587 |
+
* @since 1.2.1.6
|
588 |
+
*
|
589 |
+
* @param bool $filters
|
590 |
+
* @param int $limit
|
591 |
+
* @param int $offset
|
592 |
+
* @param bool $order
|
593 |
+
*
|
594 |
+
* @return object[]|null
|
595 |
+
*/
|
596 |
+
public static function load_db_logs(
|
597 |
+
$filters = false,
|
598 |
+
$limit = 200,
|
599 |
+
$offset = 0,
|
600 |
+
$order = false
|
601 |
+
) {
|
602 |
+
global $wpdb;
|
603 |
+
|
604 |
+
$query = self::build_db_logs_query(
|
605 |
+
$filters,
|
606 |
+
$limit,
|
607 |
+
$offset,
|
608 |
+
$order
|
609 |
+
);
|
610 |
+
|
611 |
+
return $wpdb->get_results( $query );
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Load logs from DB.
|
616 |
+
*
|
617 |
+
* @author Vova Feldman (@svovaf)
|
618 |
+
* @since 1.2.1.6
|
619 |
+
*
|
620 |
+
* @param bool $filters
|
621 |
+
* @param string $filename
|
622 |
+
* @param int $limit
|
623 |
+
* @param int $offset
|
624 |
+
* @param bool $order
|
625 |
+
*
|
626 |
+
* @return false|string File download URL or false on failure.
|
627 |
+
*/
|
628 |
+
public static function download_db_logs(
|
629 |
+
$filters = false,
|
630 |
+
$filename = '',
|
631 |
+
$limit = 10000,
|
632 |
+
$offset = 0,
|
633 |
+
$order = false
|
634 |
+
) {
|
635 |
+
global $wpdb;
|
636 |
+
|
637 |
+
$query = self::build_db_logs_query(
|
638 |
+
$filters,
|
639 |
+
$limit,
|
640 |
+
$offset,
|
641 |
+
$order,
|
642 |
+
true
|
643 |
+
);
|
644 |
+
|
645 |
+
$upload_dir = wp_upload_dir();
|
646 |
+
if ( empty( $filename ) ) {
|
647 |
+
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
648 |
+
}
|
649 |
+
$filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
|
650 |
+
|
651 |
+
$query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
|
652 |
+
|
653 |
+
$columns = '';
|
654 |
+
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
655 |
+
if ( $i > 0 ) {
|
656 |
+
$columns .= ', ';
|
657 |
+
}
|
658 |
+
|
659 |
+
$columns .= "'" . self::$_log_columns[ $i ] . "'";
|
660 |
+
}
|
661 |
+
|
662 |
+
$query = "SELECT {$columns} UNION ALL " . $query;
|
663 |
+
|
664 |
+
$result = $wpdb->query( $query );
|
665 |
+
|
666 |
+
if ( false === $result ) {
|
667 |
+
return false;
|
668 |
+
}
|
669 |
+
|
670 |
+
return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
|
671 |
+
}
|
672 |
+
|
673 |
+
/**
|
674 |
+
* @author Vova Feldman (@svovaf)
|
675 |
+
* @since 1.2.1.6
|
676 |
+
*
|
677 |
+
* @param string $filename
|
678 |
+
*
|
679 |
+
* @return string
|
680 |
+
*/
|
681 |
+
public static function get_logs_download_url( $filename = '' ) {
|
682 |
+
$upload_dir = wp_upload_dir();
|
683 |
+
if ( empty( $filename ) ) {
|
684 |
+
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
685 |
+
}
|
686 |
+
|
687 |
+
return rtrim( $upload_dir['url'], '/' ) . $filename;
|
688 |
+
}
|
689 |
+
|
690 |
+
#endregion
|
691 |
}
|
includes/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'
|
includes/freemius/includes/class-fs-security.php
CHANGED
@@ -1,85 +1,85 @@
|
|
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 |
-
define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Class FS_Security
|
17 |
-
*/
|
18 |
-
class FS_Security {
|
19 |
-
/**
|
20 |
-
* @var FS_Security
|
21 |
-
* @since 1.0.3
|
22 |
-
*/
|
23 |
-
private static $_instance;
|
24 |
-
/**
|
25 |
-
* @var FS_Logger
|
26 |
-
* @since 1.0.3
|
27 |
-
*/
|
28 |
-
private static $_logger;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @return \FS_Security
|
32 |
-
*/
|
33 |
-
public static function instance() {
|
34 |
-
if ( ! isset( self::$_instance ) ) {
|
35 |
-
self::$_instance = new FS_Security();
|
36 |
-
self::$_logger = FS_Logger::get_logger(
|
37 |
-
WP_FS__SLUG,
|
38 |
-
WP_FS__DEBUG_SDK,
|
39 |
-
WP_FS__ECHO_DEBUG_SDK
|
40 |
-
);
|
41 |
-
}
|
42 |
-
|
43 |
-
return self::$_instance;
|
44 |
-
}
|
45 |
-
|
46 |
-
private function __construct() {
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* @param \FS_Scope_Entity $entity
|
51 |
-
* @param int $timestamp
|
52 |
-
* @param string $action
|
53 |
-
*
|
54 |
-
* @return string
|
55 |
-
*/
|
56 |
-
function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
|
57 |
-
return md5(
|
58 |
-
$timestamp .
|
59 |
-
$entity->id .
|
60 |
-
$entity->secret_key .
|
61 |
-
$entity->public_key .
|
62 |
-
$action
|
63 |
-
);
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @param \FS_Scope_Entity $entity
|
68 |
-
* @param int|bool $timestamp
|
69 |
-
* @param string $action
|
70 |
-
*
|
71 |
-
* @return array
|
72 |
-
*/
|
73 |
-
function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
|
74 |
-
if ( false === $timestamp ) {
|
75 |
-
$timestamp = time();
|
76 |
-
}
|
77 |
-
|
78 |
-
return array(
|
79 |
-
's_ctx_type' => $entity->get_type(),
|
80 |
-
's_ctx_id' => $entity->id,
|
81 |
-
's_ctx_ts' => $timestamp,
|
82 |
-
's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
|
83 |
-
);
|
84 |
-
}
|
85 |
-
}
|
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 |
+
define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Class FS_Security
|
17 |
+
*/
|
18 |
+
class FS_Security {
|
19 |
+
/**
|
20 |
+
* @var FS_Security
|
21 |
+
* @since 1.0.3
|
22 |
+
*/
|
23 |
+
private static $_instance;
|
24 |
+
/**
|
25 |
+
* @var FS_Logger
|
26 |
+
* @since 1.0.3
|
27 |
+
*/
|
28 |
+
private static $_logger;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @return \FS_Security
|
32 |
+
*/
|
33 |
+
public static function instance() {
|
34 |
+
if ( ! isset( self::$_instance ) ) {
|
35 |
+
self::$_instance = new FS_Security();
|
36 |
+
self::$_logger = FS_Logger::get_logger(
|
37 |
+
WP_FS__SLUG,
|
38 |
+
WP_FS__DEBUG_SDK,
|
39 |
+
WP_FS__ECHO_DEBUG_SDK
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
return self::$_instance;
|
44 |
+
}
|
45 |
+
|
46 |
+
private function __construct() {
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param \FS_Scope_Entity $entity
|
51 |
+
* @param int $timestamp
|
52 |
+
* @param string $action
|
53 |
+
*
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
|
57 |
+
return md5(
|
58 |
+
$timestamp .
|
59 |
+
$entity->id .
|
60 |
+
$entity->secret_key .
|
61 |
+
$entity->public_key .
|
62 |
+
$action
|
63 |
+
);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* @param \FS_Scope_Entity $entity
|
68 |
+
* @param int|bool $timestamp
|
69 |
+
* @param string $action
|
70 |
+
*
|
71 |
+
* @return array
|
72 |
+
*/
|
73 |
+
function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
|
74 |
+
if ( false === $timestamp ) {
|
75 |
+
$timestamp = time();
|
76 |
+
}
|
77 |
+
|
78 |
+
return array(
|
79 |
+
's_ctx_type' => $entity->get_type(),
|
80 |
+
's_ctx_id' => $entity->id,
|
81 |
+
's_ctx_ts' => $timestamp,
|
82 |
+
's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
|
83 |
+
);
|
84 |
+
}
|
85 |
+
}
|
includes/freemius/includes/class-fs-storage.php
CHANGED
@@ -378,16 +378,17 @@
|
|
378 |
'require_license_activation' => 1,
|
379 |
|
380 |
// If not network activated OR delegated, then site level.
|
381 |
-
'activation_timestamp'
|
382 |
-
'expired_license_notice_shown'
|
383 |
-
'is_whitelabeled'
|
384 |
-
'last_license_key'
|
385 |
-
'last_license_user_id'
|
386 |
-
'prev_user_id'
|
387 |
-
'sticky_optin_added'
|
388 |
-
'uninstall_reason'
|
389 |
-
'is_pending_activation'
|
390 |
-
'pending_license_key'
|
|
|
391 |
|
392 |
// Site level options.
|
393 |
'is_anonymous' => 3,
|
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 |
+
'is_extensions_tracking_allowed' => 2,
|
392 |
|
393 |
// Site level options.
|
394 |
'is_anonymous' => 3,
|
includes/freemius/includes/class-fs-user-lock.php
CHANGED
@@ -1,126 +1,126 @@
|
|
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.1.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class FS_User_Lock
|
15 |
-
*/
|
16 |
-
class FS_User_Lock {
|
17 |
-
/**
|
18 |
-
* @var int
|
19 |
-
*/
|
20 |
-
private $_wp_user_id;
|
21 |
-
/**
|
22 |
-
* @var int
|
23 |
-
*/
|
24 |
-
private $_thread_id;
|
25 |
-
|
26 |
-
#--------------------------------------------------------------------------------
|
27 |
-
#region Singleton
|
28 |
-
#--------------------------------------------------------------------------------
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @var FS_User_Lock
|
32 |
-
*/
|
33 |
-
private static $_instance;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @author Vova Feldman (@svovaf)
|
37 |
-
* @since 2.1.0
|
38 |
-
*
|
39 |
-
* @return FS_User_Lock
|
40 |
-
*/
|
41 |
-
static function instance() {
|
42 |
-
if ( ! isset( self::$_instance ) ) {
|
43 |
-
self::$_instance = new self();
|
44 |
-
}
|
45 |
-
|
46 |
-
return self::$_instance;
|
47 |
-
}
|
48 |
-
|
49 |
-
#endregion
|
50 |
-
|
51 |
-
private function __construct() {
|
52 |
-
$this->_wp_user_id = Freemius::get_current_wp_user_id();
|
53 |
-
$this->_thread_id = mt_rand( 0, 32000 );
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Try to acquire lock. If the lock is already set or is being acquired by another locker, don't do anything.
|
59 |
-
*
|
60 |
-
* @author Vova Feldman (@svovaf)
|
61 |
-
* @since 2.1.0
|
62 |
-
*
|
63 |
-
* @param int $expiration
|
64 |
-
*
|
65 |
-
* @return bool TRUE if successfully acquired lock.
|
66 |
-
*/
|
67 |
-
function try_lock( $expiration = 0 ) {
|
68 |
-
if ( $this->is_locked() ) {
|
69 |
-
// Already locked.
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
|
73 |
-
set_site_transient( "locked_{$this->_wp_user_id}", $this->_thread_id, $expiration );
|
74 |
-
|
75 |
-
if ( $this->has_lock() ) {
|
76 |
-
set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
|
77 |
-
|
78 |
-
return true;
|
79 |
-
}
|
80 |
-
|
81 |
-
return false;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Acquire lock regardless if it's already acquired by another locker or not.
|
86 |
-
*
|
87 |
-
* @author Vova Feldman (@svovaf)
|
88 |
-
* @since 2.1.0
|
89 |
-
*
|
90 |
-
* @param int $expiration
|
91 |
-
*/
|
92 |
-
function lock( $expiration = 0 ) {
|
93 |
-
set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Checks if lock is currently acquired.
|
98 |
-
*
|
99 |
-
* @author Vova Feldman (@svovaf)
|
100 |
-
* @since 2.1.0
|
101 |
-
*
|
102 |
-
* @return bool
|
103 |
-
*/
|
104 |
-
function is_locked() {
|
105 |
-
return ( false !== get_site_transient( "locked_{$this->_wp_user_id}" ) );
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Unlock the lock.
|
110 |
-
*
|
111 |
-
* @author Vova Feldman (@svovaf)
|
112 |
-
* @since 2.1.0
|
113 |
-
*/
|
114 |
-
function unlock() {
|
115 |
-
delete_site_transient( "locked_{$this->_wp_user_id}" );
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Checks if lock is currently acquired by the current locker.
|
120 |
-
*
|
121 |
-
* @return bool
|
122 |
-
*/
|
123 |
-
private function has_lock() {
|
124 |
-
return ( $this->_thread_id == get_site_transient( "locked_{$this->_wp_user_id}" ) );
|
125 |
-
}
|
126 |
}
|
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.1.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class FS_User_Lock
|
15 |
+
*/
|
16 |
+
class FS_User_Lock {
|
17 |
+
/**
|
18 |
+
* @var int
|
19 |
+
*/
|
20 |
+
private $_wp_user_id;
|
21 |
+
/**
|
22 |
+
* @var int
|
23 |
+
*/
|
24 |
+
private $_thread_id;
|
25 |
+
|
26 |
+
#--------------------------------------------------------------------------------
|
27 |
+
#region Singleton
|
28 |
+
#--------------------------------------------------------------------------------
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var FS_User_Lock
|
32 |
+
*/
|
33 |
+
private static $_instance;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @author Vova Feldman (@svovaf)
|
37 |
+
* @since 2.1.0
|
38 |
+
*
|
39 |
+
* @return FS_User_Lock
|
40 |
+
*/
|
41 |
+
static function instance() {
|
42 |
+
if ( ! isset( self::$_instance ) ) {
|
43 |
+
self::$_instance = new self();
|
44 |
+
}
|
45 |
+
|
46 |
+
return self::$_instance;
|
47 |
+
}
|
48 |
+
|
49 |
+
#endregion
|
50 |
+
|
51 |
+
private function __construct() {
|
52 |
+
$this->_wp_user_id = Freemius::get_current_wp_user_id();
|
53 |
+
$this->_thread_id = mt_rand( 0, 32000 );
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Try to acquire lock. If the lock is already set or is being acquired by another locker, don't do anything.
|
59 |
+
*
|
60 |
+
* @author Vova Feldman (@svovaf)
|
61 |
+
* @since 2.1.0
|
62 |
+
*
|
63 |
+
* @param int $expiration
|
64 |
+
*
|
65 |
+
* @return bool TRUE if successfully acquired lock.
|
66 |
+
*/
|
67 |
+
function try_lock( $expiration = 0 ) {
|
68 |
+
if ( $this->is_locked() ) {
|
69 |
+
// Already locked.
|
70 |
+
return false;
|
71 |
+
}
|
72 |
+
|
73 |
+
set_site_transient( "locked_{$this->_wp_user_id}", $this->_thread_id, $expiration );
|
74 |
+
|
75 |
+
if ( $this->has_lock() ) {
|
76 |
+
set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
|
77 |
+
|
78 |
+
return true;
|
79 |
+
}
|
80 |
+
|
81 |
+
return false;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Acquire lock regardless if it's already acquired by another locker or not.
|
86 |
+
*
|
87 |
+
* @author Vova Feldman (@svovaf)
|
88 |
+
* @since 2.1.0
|
89 |
+
*
|
90 |
+
* @param int $expiration
|
91 |
+
*/
|
92 |
+
function lock( $expiration = 0 ) {
|
93 |
+
set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Checks if lock is currently acquired.
|
98 |
+
*
|
99 |
+
* @author Vova Feldman (@svovaf)
|
100 |
+
* @since 2.1.0
|
101 |
+
*
|
102 |
+
* @return bool
|
103 |
+
*/
|
104 |
+
function is_locked() {
|
105 |
+
return ( false !== get_site_transient( "locked_{$this->_wp_user_id}" ) );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Unlock the lock.
|
110 |
+
*
|
111 |
+
* @author Vova Feldman (@svovaf)
|
112 |
+
* @since 2.1.0
|
113 |
+
*/
|
114 |
+
function unlock() {
|
115 |
+
delete_site_transient( "locked_{$this->_wp_user_id}" );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Checks if lock is currently acquired by the current locker.
|
120 |
+
*
|
121 |
+
* @return bool
|
122 |
+
*/
|
123 |
+
private function has_lock() {
|
124 |
+
return ( $this->_thread_id == get_site_transient( "locked_{$this->_wp_user_id}" ) );
|
125 |
+
}
|
126 |
}
|
includes/freemius/includes/customizer/class-fs-customizer-support-section.php
CHANGED
@@ -1,102 +1,102 @@
|
|
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.2.7
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class Zerif_Customizer_Theme_Info_Main
|
15 |
-
*
|
16 |
-
* @since 1.0.0
|
17 |
-
* @access public
|
18 |
-
*/
|
19 |
-
class FS_Customizer_Support_Section extends WP_Customize_Section {
|
20 |
-
|
21 |
-
function __construct( $manager, $id, $args = array() ) {
|
22 |
-
$manager->register_section_type( 'FS_Customizer_Support_Section' );
|
23 |
-
|
24 |
-
parent::__construct( $manager, $id, $args );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* The type of customize section being rendered.
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
* @access public
|
32 |
-
* @var string
|
33 |
-
*/
|
34 |
-
public $type = 'freemius-support-section';
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @var Freemius
|
38 |
-
*/
|
39 |
-
public $fs = null;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Add custom parameters to pass to the JS via JSON.
|
43 |
-
*
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
public function json() {
|
47 |
-
$json = parent::json();
|
48 |
-
|
49 |
-
$is_contact_visible = $this->fs->is_page_visible( 'contact' );
|
50 |
-
$is_support_visible = $this->fs->is_page_visible( 'support' );
|
51 |
-
|
52 |
-
$json['theme_title'] = $this->fs->get_plugin_name();
|
53 |
-
|
54 |
-
if ( $is_contact_visible && $is_support_visible ) {
|
55 |
-
$json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
|
56 |
-
}
|
57 |
-
|
58 |
-
if ( $is_contact_visible ) {
|
59 |
-
$json['contact'] = array(
|
60 |
-
'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
|
61 |
-
'url' => $this->fs->contact_url(),
|
62 |
-
);
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( $is_support_visible ) {
|
66 |
-
$json['support'] = array(
|
67 |
-
'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
|
68 |
-
'url' => $this->fs->get_support_forum_url()
|
69 |
-
);
|
70 |
-
}
|
71 |
-
|
72 |
-
return $json;
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Outputs the Underscore.js template.
|
77 |
-
*
|
78 |
-
* @since 1.0.0
|
79 |
-
*/
|
80 |
-
protected function render_template() {
|
81 |
-
?>
|
82 |
-
<li id="fs_customizer_support"
|
83 |
-
class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
|
84 |
-
<h3 class="accordion-section-title">
|
85 |
-
<span>{{ data.theme_title }}</span>
|
86 |
-
<# if ( data.contact && data.support ) { #>
|
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>
|
97 |
-
<# } #>
|
98 |
-
</h3>
|
99 |
-
</li>
|
100 |
-
<?php
|
101 |
-
}
|
102 |
}
|
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.2.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class Zerif_Customizer_Theme_Info_Main
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
* @access public
|
18 |
+
*/
|
19 |
+
class FS_Customizer_Support_Section extends WP_Customize_Section {
|
20 |
+
|
21 |
+
function __construct( $manager, $id, $args = array() ) {
|
22 |
+
$manager->register_section_type( 'FS_Customizer_Support_Section' );
|
23 |
+
|
24 |
+
parent::__construct( $manager, $id, $args );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* The type of customize section being rendered.
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
* @access public
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
public $type = 'freemius-support-section';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var Freemius
|
38 |
+
*/
|
39 |
+
public $fs = null;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Add custom parameters to pass to the JS via JSON.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
*/
|
46 |
+
public function json() {
|
47 |
+
$json = parent::json();
|
48 |
+
|
49 |
+
$is_contact_visible = $this->fs->is_page_visible( 'contact' );
|
50 |
+
$is_support_visible = $this->fs->is_page_visible( 'support' );
|
51 |
+
|
52 |
+
$json['theme_title'] = $this->fs->get_plugin_name();
|
53 |
+
|
54 |
+
if ( $is_contact_visible && $is_support_visible ) {
|
55 |
+
$json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
|
56 |
+
}
|
57 |
+
|
58 |
+
if ( $is_contact_visible ) {
|
59 |
+
$json['contact'] = array(
|
60 |
+
'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
|
61 |
+
'url' => $this->fs->contact_url(),
|
62 |
+
);
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( $is_support_visible ) {
|
66 |
+
$json['support'] = array(
|
67 |
+
'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
|
68 |
+
'url' => $this->fs->get_support_forum_url()
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
+
return $json;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Outputs the Underscore.js template.
|
77 |
+
*
|
78 |
+
* @since 1.0.0
|
79 |
+
*/
|
80 |
+
protected function render_template() {
|
81 |
+
?>
|
82 |
+
<li id="fs_customizer_support"
|
83 |
+
class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
|
84 |
+
<h3 class="accordion-section-title">
|
85 |
+
<span>{{ data.theme_title }}</span>
|
86 |
+
<# if ( data.contact && data.support ) { #>
|
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>
|
97 |
+
<# } #>
|
98 |
+
</h3>
|
99 |
+
</li>
|
100 |
+
<?php
|
101 |
+
}
|
102 |
}
|
includes/freemius/includes/customizer/class-fs-customizer-upsell-control.php
CHANGED
@@ -1,161 +1,161 @@
|
|
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.2.7
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class FS_Customizer_Upsell_Control
|
15 |
-
*/
|
16 |
-
class FS_Customizer_Upsell_Control extends WP_Customize_Control {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Control type
|
20 |
-
*
|
21 |
-
* @var string control type
|
22 |
-
*/
|
23 |
-
public $type = 'freemius-upsell-control';
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @var Freemius
|
27 |
-
*/
|
28 |
-
public $fs = null;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @param WP_Customize_Manager $manager the customize manager class.
|
32 |
-
* @param string $id id.
|
33 |
-
* @param array $args customizer manager parameters.
|
34 |
-
*/
|
35 |
-
public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
|
36 |
-
$manager->register_control_type( 'FS_Customizer_Upsell_Control' );
|
37 |
-
|
38 |
-
parent::__construct( $manager, $id, $args );
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Enqueue resources for the control.
|
43 |
-
*/
|
44 |
-
public function enqueue() {
|
45 |
-
fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Json conversion
|
50 |
-
*/
|
51 |
-
public function to_json() {
|
52 |
-
$pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . ' ' . ( is_rtl() ? '←' : '➤' );
|
53 |
-
|
54 |
-
parent::to_json();
|
55 |
-
|
56 |
-
$this->json['button_text'] = $pricing_cta;
|
57 |
-
$this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
|
58 |
-
$this->fs->get_trial_url() :
|
59 |
-
$this->fs->get_upgrade_url();
|
60 |
-
|
61 |
-
$api = FS_Plugin::is_valid_id( $this->fs->get_bundle_id() ) ?
|
62 |
-
$this->fs->get_api_bundle_scope() :
|
63 |
-
$this->fs->get_api_plugin_scope();
|
64 |
-
|
65 |
-
// Load features.
|
66 |
-
$pricing = $api->get( $this->fs->add_show_pending( "pricing.json" ) );
|
67 |
-
|
68 |
-
if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
|
69 |
-
// Add support features.
|
70 |
-
if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
|
71 |
-
$support_features = array(
|
72 |
-
'kb' => 'Help Center',
|
73 |
-
'forum' => 'Support Forum',
|
74 |
-
'email' => 'Priority Email Support',
|
75 |
-
'phone' => 'Phone Support',
|
76 |
-
'skype' => 'Skype Support',
|
77 |
-
'is_success_manager' => 'Personal Success Manager',
|
78 |
-
);
|
79 |
-
|
80 |
-
for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
|
81 |
-
if ( 'free' == $pricing->plans[$i]->name ) {
|
82 |
-
continue;
|
83 |
-
}
|
84 |
-
|
85 |
-
if ( ! isset( $pricing->plans[ $i ]->features ) ||
|
86 |
-
! is_array( $pricing->plans[ $i ]->features ) ) {
|
87 |
-
$pricing->plans[$i]->features = array();
|
88 |
-
}
|
89 |
-
|
90 |
-
foreach ( $support_features as $key => $label ) {
|
91 |
-
$key = ( 'is_success_manager' !== $key ) ?
|
92 |
-
"support_{$key}" :
|
93 |
-
$key;
|
94 |
-
|
95 |
-
if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
|
96 |
-
|
97 |
-
$support_feature = new stdClass();
|
98 |
-
$support_feature->title = $label;
|
99 |
-
|
100 |
-
$pricing->plans[ $i ]->features[] = $support_feature;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
$this->json['plans'] = $pricing->plans;
|
108 |
-
|
109 |
-
$this->json['strings'] = array(
|
110 |
-
'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
|
111 |
-
);
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Control content
|
116 |
-
*/
|
117 |
-
public function content_template() {
|
118 |
-
?>
|
119 |
-
<div id="fs_customizer_upsell">
|
120 |
-
<# if ( data.plans ) { #>
|
121 |
-
<ul class="fs-customizer-plans">
|
122 |
-
<# for (i in data.plans) { #>
|
123 |
-
<# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
|
124 |
-
<li class="fs-customizer-plan">
|
125 |
-
<div class="fs-accordion-section-open">
|
126 |
-
<h2 class="fs-accordion-section-title menu-item">
|
127 |
-
<span>{{ data.plans[i].title }}</span>
|
128 |
-
<button type="button" class="button-link item-edit" aria-expanded="true">
|
129 |
-
<span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
|
130 |
-
<span class="toggle-indicator" aria-hidden="true"></span>
|
131 |
-
</button>
|
132 |
-
</h2>
|
133 |
-
<div class="fs-accordion-section-content">
|
134 |
-
<# if ( data.plans[i].description ) { #>
|
135 |
-
<h3>{{ data.plans[i].description }}</h3>
|
136 |
-
<# } #>
|
137 |
-
<# if ( data.plans[i].features ) { #>
|
138 |
-
<ul>
|
139 |
-
<# for ( j in data.plans[i].features ) { #>
|
140 |
-
<li><div class="fs-feature">
|
141 |
-
<span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
|
142 |
-
<# if ( data.plans[i].features[j].description ) { #>
|
143 |
-
<span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
|
144 |
-
<# } #>
|
145 |
-
</div></li>
|
146 |
-
<# } #>
|
147 |
-
</ul>
|
148 |
-
<# } #>
|
149 |
-
<# if ( 'free' != data.plans[i].name ) { #>
|
150 |
-
<a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
|
151 |
-
<# } #>
|
152 |
-
</div>
|
153 |
-
</div>
|
154 |
-
</li>
|
155 |
-
<# } #>
|
156 |
-
<# } #>
|
157 |
-
</ul>
|
158 |
-
<# } #>
|
159 |
-
</div>
|
160 |
-
<?php }
|
161 |
}
|
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.2.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class FS_Customizer_Upsell_Control
|
15 |
+
*/
|
16 |
+
class FS_Customizer_Upsell_Control extends WP_Customize_Control {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Control type
|
20 |
+
*
|
21 |
+
* @var string control type
|
22 |
+
*/
|
23 |
+
public $type = 'freemius-upsell-control';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var Freemius
|
27 |
+
*/
|
28 |
+
public $fs = null;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param WP_Customize_Manager $manager the customize manager class.
|
32 |
+
* @param string $id id.
|
33 |
+
* @param array $args customizer manager parameters.
|
34 |
+
*/
|
35 |
+
public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
|
36 |
+
$manager->register_control_type( 'FS_Customizer_Upsell_Control' );
|
37 |
+
|
38 |
+
parent::__construct( $manager, $id, $args );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Enqueue resources for the control.
|
43 |
+
*/
|
44 |
+
public function enqueue() {
|
45 |
+
fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Json conversion
|
50 |
+
*/
|
51 |
+
public function to_json() {
|
52 |
+
$pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . ' ' . ( is_rtl() ? '←' : '➤' );
|
53 |
+
|
54 |
+
parent::to_json();
|
55 |
+
|
56 |
+
$this->json['button_text'] = $pricing_cta;
|
57 |
+
$this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
|
58 |
+
$this->fs->get_trial_url() :
|
59 |
+
$this->fs->get_upgrade_url();
|
60 |
+
|
61 |
+
$api = FS_Plugin::is_valid_id( $this->fs->get_bundle_id() ) ?
|
62 |
+
$this->fs->get_api_bundle_scope() :
|
63 |
+
$this->fs->get_api_plugin_scope();
|
64 |
+
|
65 |
+
// Load features.
|
66 |
+
$pricing = $api->get( $this->fs->add_show_pending( "pricing.json" ) );
|
67 |
+
|
68 |
+
if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
|
69 |
+
// Add support features.
|
70 |
+
if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
|
71 |
+
$support_features = array(
|
72 |
+
'kb' => 'Help Center',
|
73 |
+
'forum' => 'Support Forum',
|
74 |
+
'email' => 'Priority Email Support',
|
75 |
+
'phone' => 'Phone Support',
|
76 |
+
'skype' => 'Skype Support',
|
77 |
+
'is_success_manager' => 'Personal Success Manager',
|
78 |
+
);
|
79 |
+
|
80 |
+
for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
|
81 |
+
if ( 'free' == $pricing->plans[$i]->name ) {
|
82 |
+
continue;
|
83 |
+
}
|
84 |
+
|
85 |
+
if ( ! isset( $pricing->plans[ $i ]->features ) ||
|
86 |
+
! is_array( $pricing->plans[ $i ]->features ) ) {
|
87 |
+
$pricing->plans[$i]->features = array();
|
88 |
+
}
|
89 |
+
|
90 |
+
foreach ( $support_features as $key => $label ) {
|
91 |
+
$key = ( 'is_success_manager' !== $key ) ?
|
92 |
+
"support_{$key}" :
|
93 |
+
$key;
|
94 |
+
|
95 |
+
if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
|
96 |
+
|
97 |
+
$support_feature = new stdClass();
|
98 |
+
$support_feature->title = $label;
|
99 |
+
|
100 |
+
$pricing->plans[ $i ]->features[] = $support_feature;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
$this->json['plans'] = $pricing->plans;
|
108 |
+
|
109 |
+
$this->json['strings'] = array(
|
110 |
+
'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Control content
|
116 |
+
*/
|
117 |
+
public function content_template() {
|
118 |
+
?>
|
119 |
+
<div id="fs_customizer_upsell">
|
120 |
+
<# if ( data.plans ) { #>
|
121 |
+
<ul class="fs-customizer-plans">
|
122 |
+
<# for (i in data.plans) { #>
|
123 |
+
<# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
|
124 |
+
<li class="fs-customizer-plan">
|
125 |
+
<div class="fs-accordion-section-open">
|
126 |
+
<h2 class="fs-accordion-section-title menu-item">
|
127 |
+
<span>{{ data.plans[i].title }}</span>
|
128 |
+
<button type="button" class="button-link item-edit" aria-expanded="true">
|
129 |
+
<span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
|
130 |
+
<span class="toggle-indicator" aria-hidden="true"></span>
|
131 |
+
</button>
|
132 |
+
</h2>
|
133 |
+
<div class="fs-accordion-section-content">
|
134 |
+
<# if ( data.plans[i].description ) { #>
|
135 |
+
<h3>{{ data.plans[i].description }}</h3>
|
136 |
+
<# } #>
|
137 |
+
<# if ( data.plans[i].features ) { #>
|
138 |
+
<ul>
|
139 |
+
<# for ( j in data.plans[i].features ) { #>
|
140 |
+
<li><div class="fs-feature">
|
141 |
+
<span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
|
142 |
+
<# if ( data.plans[i].features[j].description ) { #>
|
143 |
+
<span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
|
144 |
+
<# } #>
|
145 |
+
</div></li>
|
146 |
+
<# } #>
|
147 |
+
</ul>
|
148 |
+
<# } #>
|
149 |
+
<# if ( 'free' != data.plans[i].name ) { #>
|
150 |
+
<a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
|
151 |
+
<# } #>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
</li>
|
155 |
+
<# } #>
|
156 |
+
<# } #>
|
157 |
+
</ul>
|
158 |
+
<# } #>
|
159 |
+
</div>
|
160 |
+
<?php }
|
161 |
}
|
includes/freemius/includes/customizer/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/debug/class-fs-debug-bar-panel.php
CHANGED
@@ -1,64 +1,64 @@
|
|
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.7.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Extends Debug Bar plugin by adding a panel to show all Freemius API requests.
|
15 |
-
*
|
16 |
-
* @author Vova Feldman (@svovaf)
|
17 |
-
* @since 1.1.7.3
|
18 |
-
*
|
19 |
-
* Class Freemius_Debug_Bar_Panel
|
20 |
-
*/
|
21 |
-
class Freemius_Debug_Bar_Panel extends Debug_Bar_Panel {
|
22 |
-
function init() {
|
23 |
-
$this->title( 'Freemius' );
|
24 |
-
}
|
25 |
-
|
26 |
-
static function requests_count() {
|
27 |
-
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
28 |
-
$logger = Freemius_Api_WordPress::GetLogger();
|
29 |
-
} else {
|
30 |
-
$logger = array();
|
31 |
-
}
|
32 |
-
|
33 |
-
return number_format( count( $logger ) );
|
34 |
-
}
|
35 |
-
|
36 |
-
static function total_time() {
|
37 |
-
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
38 |
-
$logger = Freemius_Api_WordPress::GetLogger();
|
39 |
-
} else {
|
40 |
-
$logger = array();
|
41 |
-
}
|
42 |
-
|
43 |
-
$total_time = .0;
|
44 |
-
foreach ( $logger as $l ) {
|
45 |
-
$total_time += $l['total'];
|
46 |
-
}
|
47 |
-
|
48 |
-
return number_format( 100 * $total_time, 2 ) . ' ' . fs_text_x_inline( 'ms', 'milliseconds' );
|
49 |
-
}
|
50 |
-
|
51 |
-
function render() {
|
52 |
-
?>
|
53 |
-
<div id='debug-bar-php'>
|
54 |
-
<?php fs_require_template( '/debug/api-calls.php' ) ?>
|
55 |
-
<br>
|
56 |
-
<?php fs_require_template( '/debug/scheduled-crons.php' ) ?>
|
57 |
-
<br>
|
58 |
-
<?php fs_require_template( '/debug/plugins-themes-sync.php' ) ?>
|
59 |
-
<br>
|
60 |
-
<?php fs_require_template( '/debug/logger.php' ) ?>
|
61 |
-
</div>
|
62 |
-
<?php
|
63 |
-
}
|
64 |
-
}
|
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.7.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Extends Debug Bar plugin by adding a panel to show all Freemius API requests.
|
15 |
+
*
|
16 |
+
* @author Vova Feldman (@svovaf)
|
17 |
+
* @since 1.1.7.3
|
18 |
+
*
|
19 |
+
* Class Freemius_Debug_Bar_Panel
|
20 |
+
*/
|
21 |
+
class Freemius_Debug_Bar_Panel extends Debug_Bar_Panel {
|
22 |
+
function init() {
|
23 |
+
$this->title( 'Freemius' );
|
24 |
+
}
|
25 |
+
|
26 |
+
static function requests_count() {
|
27 |
+
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
28 |
+
$logger = Freemius_Api_WordPress::GetLogger();
|
29 |
+
} else {
|
30 |
+
$logger = array();
|
31 |
+
}
|
32 |
+
|
33 |
+
return number_format( count( $logger ) );
|
34 |
+
}
|
35 |
+
|
36 |
+
static function total_time() {
|
37 |
+
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
38 |
+
$logger = Freemius_Api_WordPress::GetLogger();
|
39 |
+
} else {
|
40 |
+
$logger = array();
|
41 |
+
}
|
42 |
+
|
43 |
+
$total_time = .0;
|
44 |
+
foreach ( $logger as $l ) {
|
45 |
+
$total_time += $l['total'];
|
46 |
+
}
|
47 |
+
|
48 |
+
return number_format( 100 * $total_time, 2 ) . ' ' . fs_text_x_inline( 'ms', 'milliseconds' );
|
49 |
+
}
|
50 |
+
|
51 |
+
function render() {
|
52 |
+
?>
|
53 |
+
<div id='debug-bar-php'>
|
54 |
+
<?php fs_require_template( '/debug/api-calls.php' ) ?>
|
55 |
+
<br>
|
56 |
+
<?php fs_require_template( '/debug/scheduled-crons.php' ) ?>
|
57 |
+
<br>
|
58 |
+
<?php fs_require_template( '/debug/plugins-themes-sync.php' ) ?>
|
59 |
+
<br>
|
60 |
+
<?php fs_require_template( '/debug/logger.php' ) ?>
|
61 |
+
</div>
|
62 |
+
<?php
|
63 |
+
}
|
64 |
+
}
|
includes/freemius/includes/debug/debug-bar-start.php
CHANGED
@@ -1,52 +1,52 @@
|
|
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.7.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
if ( ! WP_FS__DEBUG_SDK ) {
|
14 |
-
return;
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Initialize Freemius custom debug panels.
|
19 |
-
*
|
20 |
-
* @param array $panels Debug bar panels objects
|
21 |
-
*
|
22 |
-
* @return array Debug bar panels with your custom panels
|
23 |
-
*/
|
24 |
-
function fs_custom_panels_init( $panels ) {
|
25 |
-
if ( class_exists( 'Debug_Bar_Panel' ) ) {
|
26 |
-
if ( FS_API__LOGGER_ON ) {
|
27 |
-
require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
|
28 |
-
$panels[] = new Freemius_Debug_Bar_Panel();
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
return $panels;
|
33 |
-
}
|
34 |
-
|
35 |
-
function fs_custom_status_init( $statuses ) {
|
36 |
-
if ( class_exists( 'Debug_Bar_Panel' ) ) {
|
37 |
-
if ( FS_API__LOGGER_ON ) {
|
38 |
-
require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
|
39 |
-
$statuses[] = array(
|
40 |
-
'fs_api_requests',
|
41 |
-
fs_text_inline( 'Freemius API' ),
|
42 |
-
Freemius_Debug_Bar_Panel::requests_count() . ' ' . fs_text_inline( 'Requests' ) .
|
43 |
-
' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
|
44 |
-
);
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
return $statuses;
|
49 |
-
}
|
50 |
-
|
51 |
-
add_filter( 'debug_bar_panels', 'fs_custom_panels_init' );
|
52 |
add_filter( 'debug_bar_statuses', 'fs_custom_status_init' );
|
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.7.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( ! WP_FS__DEBUG_SDK ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Initialize Freemius custom debug panels.
|
19 |
+
*
|
20 |
+
* @param array $panels Debug bar panels objects
|
21 |
+
*
|
22 |
+
* @return array Debug bar panels with your custom panels
|
23 |
+
*/
|
24 |
+
function fs_custom_panels_init( $panels ) {
|
25 |
+
if ( class_exists( 'Debug_Bar_Panel' ) ) {
|
26 |
+
if ( FS_API__LOGGER_ON ) {
|
27 |
+
require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
|
28 |
+
$panels[] = new Freemius_Debug_Bar_Panel();
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
return $panels;
|
33 |
+
}
|
34 |
+
|
35 |
+
function fs_custom_status_init( $statuses ) {
|
36 |
+
if ( class_exists( 'Debug_Bar_Panel' ) ) {
|
37 |
+
if ( FS_API__LOGGER_ON ) {
|
38 |
+
require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
|
39 |
+
$statuses[] = array(
|
40 |
+
'fs_api_requests',
|
41 |
+
fs_text_inline( 'Freemius API' ),
|
42 |
+
Freemius_Debug_Bar_Panel::requests_count() . ' ' . fs_text_inline( 'Requests' ) .
|
43 |
+
' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
|
44 |
+
);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
return $statuses;
|
49 |
+
}
|
50 |
+
|
51 |
+
add_filter( 'debug_bar_panels', 'fs_custom_panels_init' );
|
52 |
add_filter( 'debug_bar_statuses', 'fs_custom_status_init' );
|
includes/freemius/includes/debug/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/entities/class-fs-affiliate-terms.php
CHANGED
@@ -1,128 +1,128 @@
|
|
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.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_AffiliateTerms extends FS_Scope_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var bool
|
19 |
-
*/
|
20 |
-
public $is_active;
|
21 |
-
/**
|
22 |
-
* @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
|
23 |
-
*/
|
24 |
-
public $type;
|
25 |
-
/**
|
26 |
-
* @var string Enum: `payout` or `credit`. Defaults to `payout`.
|
27 |
-
*/
|
28 |
-
public $reward_type;
|
29 |
-
/**
|
30 |
-
* If `first`, the referral will be attributed to the first visited source containing the affiliation link that
|
31 |
-
* was clicked.
|
32 |
-
*
|
33 |
-
* @var string Enum: `first` or `last`. Defaults to `first`.
|
34 |
-
*/
|
35 |
-
public $referral_attribution;
|
36 |
-
/**
|
37 |
-
* @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
|
38 |
-
*/
|
39 |
-
public $cookie_days;
|
40 |
-
/**
|
41 |
-
* @var int
|
42 |
-
*/
|
43 |
-
public $commission;
|
44 |
-
/**
|
45 |
-
* @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
|
46 |
-
*/
|
47 |
-
public $commission_type;
|
48 |
-
/**
|
49 |
-
* @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
|
50 |
-
* greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
|
51 |
-
* the initial upgrade/purchase.
|
52 |
-
*/
|
53 |
-
public $commission_renewals_days;
|
54 |
-
/**
|
55 |
-
* @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
|
56 |
-
*/
|
57 |
-
public $install_commission;
|
58 |
-
/**
|
59 |
-
* @var string Required default target link, e.g.: pricing page.
|
60 |
-
*/
|
61 |
-
public $default_url;
|
62 |
-
/**
|
63 |
-
* @var string One of the following: 'all', 'new_customer', 'new_user'.
|
64 |
-
* If 'all' - reward for any user type.
|
65 |
-
* If 'new_customer' - reward only for new customers.
|
66 |
-
* If 'new_user' - reward only for new users.
|
67 |
-
*/
|
68 |
-
public $reward_customer_type;
|
69 |
-
/**
|
70 |
-
* @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
|
71 |
-
* paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
|
72 |
-
* customer payments for `future_payments_days` days after the initial payment.
|
73 |
-
*/
|
74 |
-
public $future_payments_days;
|
75 |
-
/**
|
76 |
-
* @var bool If `true`, allow referrals from social sites.
|
77 |
-
*/
|
78 |
-
public $is_social_allowed;
|
79 |
-
/**
|
80 |
-
* @var bool If `true`, allow conversions without HTTP referrer header at all.
|
81 |
-
*/
|
82 |
-
public $is_app_allowed;
|
83 |
-
/**
|
84 |
-
* @var bool If `true`, allow referrals from any site.
|
85 |
-
*/
|
86 |
-
public $is_any_site_allowed;
|
87 |
-
|
88 |
-
#endregion Properties
|
89 |
-
|
90 |
-
/**
|
91 |
-
* @author Leo Fajardo (@leorw)
|
92 |
-
*
|
93 |
-
* @return string
|
94 |
-
*/
|
95 |
-
function get_formatted_commission()
|
96 |
-
{
|
97 |
-
return ( 'dollar' === $this->commission_type ) ?
|
98 |
-
( '$' . $this->commission ) :
|
99 |
-
( $this->commission . '%' );
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* @author Leo Fajardo (@leorw)
|
104 |
-
*
|
105 |
-
* @return bool
|
106 |
-
*/
|
107 |
-
function has_lifetime_commission() {
|
108 |
-
return ( 0 !== $this->future_payments_days );
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* @author Leo Fajardo (@leorw)
|
113 |
-
*
|
114 |
-
* @return bool
|
115 |
-
*/
|
116 |
-
function is_session_cookie() {
|
117 |
-
return ( 0 == $this->cookie_days );
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* @author Leo Fajardo (@leorw)
|
122 |
-
*
|
123 |
-
* @return bool
|
124 |
-
*/
|
125 |
-
function has_renewals_commission() {
|
126 |
-
return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
|
127 |
-
}
|
128 |
}
|
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.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_AffiliateTerms extends FS_Scope_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var bool
|
19 |
+
*/
|
20 |
+
public $is_active;
|
21 |
+
/**
|
22 |
+
* @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
|
23 |
+
*/
|
24 |
+
public $type;
|
25 |
+
/**
|
26 |
+
* @var string Enum: `payout` or `credit`. Defaults to `payout`.
|
27 |
+
*/
|
28 |
+
public $reward_type;
|
29 |
+
/**
|
30 |
+
* If `first`, the referral will be attributed to the first visited source containing the affiliation link that
|
31 |
+
* was clicked.
|
32 |
+
*
|
33 |
+
* @var string Enum: `first` or `last`. Defaults to `first`.
|
34 |
+
*/
|
35 |
+
public $referral_attribution;
|
36 |
+
/**
|
37 |
+
* @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
|
38 |
+
*/
|
39 |
+
public $cookie_days;
|
40 |
+
/**
|
41 |
+
* @var int
|
42 |
+
*/
|
43 |
+
public $commission;
|
44 |
+
/**
|
45 |
+
* @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
|
46 |
+
*/
|
47 |
+
public $commission_type;
|
48 |
+
/**
|
49 |
+
* @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
|
50 |
+
* greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
|
51 |
+
* the initial upgrade/purchase.
|
52 |
+
*/
|
53 |
+
public $commission_renewals_days;
|
54 |
+
/**
|
55 |
+
* @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
|
56 |
+
*/
|
57 |
+
public $install_commission;
|
58 |
+
/**
|
59 |
+
* @var string Required default target link, e.g.: pricing page.
|
60 |
+
*/
|
61 |
+
public $default_url;
|
62 |
+
/**
|
63 |
+
* @var string One of the following: 'all', 'new_customer', 'new_user'.
|
64 |
+
* If 'all' - reward for any user type.
|
65 |
+
* If 'new_customer' - reward only for new customers.
|
66 |
+
* If 'new_user' - reward only for new users.
|
67 |
+
*/
|
68 |
+
public $reward_customer_type;
|
69 |
+
/**
|
70 |
+
* @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
|
71 |
+
* paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
|
72 |
+
* customer payments for `future_payments_days` days after the initial payment.
|
73 |
+
*/
|
74 |
+
public $future_payments_days;
|
75 |
+
/**
|
76 |
+
* @var bool If `true`, allow referrals from social sites.
|
77 |
+
*/
|
78 |
+
public $is_social_allowed;
|
79 |
+
/**
|
80 |
+
* @var bool If `true`, allow conversions without HTTP referrer header at all.
|
81 |
+
*/
|
82 |
+
public $is_app_allowed;
|
83 |
+
/**
|
84 |
+
* @var bool If `true`, allow referrals from any site.
|
85 |
+
*/
|
86 |
+
public $is_any_site_allowed;
|
87 |
+
|
88 |
+
#endregion Properties
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @author Leo Fajardo (@leorw)
|
92 |
+
*
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
function get_formatted_commission()
|
96 |
+
{
|
97 |
+
return ( 'dollar' === $this->commission_type ) ?
|
98 |
+
( '$' . $this->commission ) :
|
99 |
+
( $this->commission . '%' );
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* @author Leo Fajardo (@leorw)
|
104 |
+
*
|
105 |
+
* @return bool
|
106 |
+
*/
|
107 |
+
function has_lifetime_commission() {
|
108 |
+
return ( 0 !== $this->future_payments_days );
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @author Leo Fajardo (@leorw)
|
113 |
+
*
|
114 |
+
* @return bool
|
115 |
+
*/
|
116 |
+
function is_session_cookie() {
|
117 |
+
return ( 0 == $this->cookie_days );
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* @author Leo Fajardo (@leorw)
|
122 |
+
*
|
123 |
+
* @return bool
|
124 |
+
*/
|
125 |
+
function has_renewals_commission() {
|
126 |
+
return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
|
127 |
+
}
|
128 |
}
|
includes/freemius/includes/entities/class-fs-affiliate.php
CHANGED
@@ -1,84 +1,84 @@
|
|
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.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Affiliate extends FS_Scope_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
public $paypal_email;
|
21 |
-
/**
|
22 |
-
* @var number
|
23 |
-
*/
|
24 |
-
public $custom_affiliate_terms_id;
|
25 |
-
/**
|
26 |
-
* @var boolean
|
27 |
-
*/
|
28 |
-
public $is_using_custom_terms;
|
29 |
-
/**
|
30 |
-
* @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`.
|
31 |
-
*/
|
32 |
-
public $status;
|
33 |
-
/**
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
public $domain;
|
37 |
-
|
38 |
-
#endregion Properties
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @author Leo Fajardo
|
42 |
-
*
|
43 |
-
* @return bool
|
44 |
-
*/
|
45 |
-
function is_active() {
|
46 |
-
return ( 'active' === $this->status );
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* @author Leo Fajardo
|
51 |
-
*
|
52 |
-
* @return bool
|
53 |
-
*/
|
54 |
-
function is_pending() {
|
55 |
-
return ( 'pending' === $this->status );
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* @author Leo Fajardo
|
60 |
-
*
|
61 |
-
* @return bool
|
62 |
-
*/
|
63 |
-
function is_suspended() {
|
64 |
-
return ( 'suspended' === $this->status );
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* @author Leo Fajardo
|
69 |
-
*
|
70 |
-
* @return bool
|
71 |
-
*/
|
72 |
-
function is_rejected() {
|
73 |
-
return ( 'rejected' === $this->status );
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* @author Leo Fajardo
|
78 |
-
*
|
79 |
-
* @return bool
|
80 |
-
*/
|
81 |
-
function is_blocked() {
|
82 |
-
return ( 'blocked' === $this->status );
|
83 |
-
}
|
84 |
}
|
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.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Affiliate extends FS_Scope_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
public $paypal_email;
|
21 |
+
/**
|
22 |
+
* @var number
|
23 |
+
*/
|
24 |
+
public $custom_affiliate_terms_id;
|
25 |
+
/**
|
26 |
+
* @var boolean
|
27 |
+
*/
|
28 |
+
public $is_using_custom_terms;
|
29 |
+
/**
|
30 |
+
* @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`.
|
31 |
+
*/
|
32 |
+
public $status;
|
33 |
+
/**
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $domain;
|
37 |
+
|
38 |
+
#endregion Properties
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @author Leo Fajardo
|
42 |
+
*
|
43 |
+
* @return bool
|
44 |
+
*/
|
45 |
+
function is_active() {
|
46 |
+
return ( 'active' === $this->status );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @author Leo Fajardo
|
51 |
+
*
|
52 |
+
* @return bool
|
53 |
+
*/
|
54 |
+
function is_pending() {
|
55 |
+
return ( 'pending' === $this->status );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @author Leo Fajardo
|
60 |
+
*
|
61 |
+
* @return bool
|
62 |
+
*/
|
63 |
+
function is_suspended() {
|
64 |
+
return ( 'suspended' === $this->status );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @author Leo Fajardo
|
69 |
+
*
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
function is_rejected() {
|
73 |
+
return ( 'rejected' === $this->status );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @author Leo Fajardo
|
78 |
+
*
|
79 |
+
* @return bool
|
80 |
+
*/
|
81 |
+
function is_blocked() {
|
82 |
+
return ( 'blocked' === $this->status );
|
83 |
+
}
|
84 |
}
|
includes/freemius/includes/entities/class-fs-billing.php
CHANGED
@@ -1,95 +1,95 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius for EDD Add-On
|
4 |
-
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Billing extends FS_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var int
|
19 |
-
*/
|
20 |
-
public $entity_id;
|
21 |
-
/**
|
22 |
-
* @var string (Enum) Linked entity type. One of: developer, plugin, user, install
|
23 |
-
*/
|
24 |
-
public $entity_type;
|
25 |
-
/**
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
public $business_name;
|
29 |
-
/**
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
public $first;
|
33 |
-
/**
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
public $last;
|
37 |
-
/**
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
public $email;
|
41 |
-
/**
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
public $phone;
|
45 |
-
/**
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
public $website;
|
49 |
-
/**
|
50 |
-
* @var string Tax or VAT ID.
|
51 |
-
*/
|
52 |
-
public $tax_id;
|
53 |
-
/**
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
public $address_street;
|
57 |
-
/**
|
58 |
-
* @var string
|
59 |
-
*/
|
60 |
-
public $address_apt;
|
61 |
-
/**
|
62 |
-
* @var string
|
63 |
-
*/
|
64 |
-
public $address_city;
|
65 |
-
/**
|
66 |
-
* @var string
|
67 |
-
*/
|
68 |
-
public $address_country;
|
69 |
-
/**
|
70 |
-
* @var string Two chars country code.
|
71 |
-
*/
|
72 |
-
public $address_country_code;
|
73 |
-
/**
|
74 |
-
* @var string
|
75 |
-
*/
|
76 |
-
public $address_state;
|
77 |
-
/**
|
78 |
-
* @var number Numeric ZIP code (cab be with leading zeros).
|
79 |
-
*/
|
80 |
-
public $address_zip;
|
81 |
-
|
82 |
-
#endregion Properties
|
83 |
-
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @param object|bool $event
|
87 |
-
*/
|
88 |
-
function __construct( $event = false ) {
|
89 |
-
parent::__construct( $event );
|
90 |
-
}
|
91 |
-
|
92 |
-
static function get_type() {
|
93 |
-
return 'billing';
|
94 |
-
}
|
95 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius for EDD Add-On
|
4 |
+
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Billing extends FS_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var int
|
19 |
+
*/
|
20 |
+
public $entity_id;
|
21 |
+
/**
|
22 |
+
* @var string (Enum) Linked entity type. One of: developer, plugin, user, install
|
23 |
+
*/
|
24 |
+
public $entity_type;
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $business_name;
|
29 |
+
/**
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
public $first;
|
33 |
+
/**
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $last;
|
37 |
+
/**
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
public $email;
|
41 |
+
/**
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
public $phone;
|
45 |
+
/**
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
public $website;
|
49 |
+
/**
|
50 |
+
* @var string Tax or VAT ID.
|
51 |
+
*/
|
52 |
+
public $tax_id;
|
53 |
+
/**
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
public $address_street;
|
57 |
+
/**
|
58 |
+
* @var string
|
59 |
+
*/
|
60 |
+
public $address_apt;
|
61 |
+
/**
|
62 |
+
* @var string
|
63 |
+
*/
|
64 |
+
public $address_city;
|
65 |
+
/**
|
66 |
+
* @var string
|
67 |
+
*/
|
68 |
+
public $address_country;
|
69 |
+
/**
|
70 |
+
* @var string Two chars country code.
|
71 |
+
*/
|
72 |
+
public $address_country_code;
|
73 |
+
/**
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
public $address_state;
|
77 |
+
/**
|
78 |
+
* @var number Numeric ZIP code (cab be with leading zeros).
|
79 |
+
*/
|
80 |
+
public $address_zip;
|
81 |
+
|
82 |
+
#endregion Properties
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @param object|bool $event
|
87 |
+
*/
|
88 |
+
function __construct( $event = false ) {
|
89 |
+
parent::__construct( $event );
|
90 |
+
}
|
91 |
+
|
92 |
+
static function get_type() {
|
93 |
+
return 'billing';
|
94 |
+
}
|
95 |
}
|
includes/freemius/includes/entities/class-fs-entity.php
CHANGED
@@ -1,149 +1,159 @@
|
|
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 |
-
* Get object's public variables.
|
15 |
-
*
|
16 |
-
* @author Vova Feldman (@svovaf)
|
17 |
-
* @since 1.0.0
|
18 |
-
*
|
19 |
-
* @param object $object
|
20 |
-
*
|
21 |
-
* @return array
|
22 |
-
*/
|
23 |
-
function fs_get_object_public_vars( $object ) {
|
24 |
-
return get_object_vars( $object );
|
25 |
-
}
|
26 |
-
|
27 |
-
class FS_Entity {
|
28 |
-
/**
|
29 |
-
* @var number
|
30 |
-
*/
|
31 |
-
public $id;
|
32 |
-
/**
|
33 |
-
* @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
|
34 |
-
*/
|
35 |
-
public $updated;
|
36 |
-
/**
|
37 |
-
* @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
|
38 |
-
*/
|
39 |
-
public $created;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @param bool|object $entity
|
43 |
-
*/
|
44 |
-
function __construct( $entity = false ) {
|
45 |
-
if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
|
46 |
-
return;
|
47 |
-
}
|
48 |
-
|
49 |
-
$props = fs_get_object_public_vars( $this );
|
50 |
-
|
51 |
-
foreach ( $props as $key => $def_value ) {
|
52 |
-
$this->{$key} = isset( $entity->{$key} ) ?
|
53 |
-
$entity->{$key} :
|
54 |
-
$def_value;
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
static function get_type() {
|
59 |
-
return 'type';
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* @author Vova Feldman (@svovaf)
|
64 |
-
* @since 1.0.6
|
65 |
-
*
|
66 |
-
* @param FS_Entity $entity1
|
67 |
-
* @param FS_Entity $entity2
|
68 |
-
*
|
69 |
-
* @return bool
|
70 |
-
*/
|
71 |
-
static function equals( $entity1, $entity2 ) {
|
72 |
-
if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
|
73 |
-
return true;
|
74 |
-
} else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
|
75 |
-
return ( $entity1->id == $entity2->id );
|
76 |
-
} else if ( is_object( $entity1 ) ) {
|
77 |
-
return is_null( $entity1->id );
|
78 |
-
} else {
|
79 |
-
return is_null( $entity2->id );
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
private $_is_updated = false;
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Update object property.
|
87 |
-
*
|
88 |
-
* @author Vova Feldman (@svovaf)
|
89 |
-
* @since 1.0.9
|
90 |
-
*
|
91 |
-
* @param string|array[string]mixed $key
|
92 |
-
* @param string|bool $val
|
93 |
-
*
|
94 |
-
* @return bool
|
95 |
-
*/
|
96 |
-
function update( $key, $val = false ) {
|
97 |
-
if ( ! is_array( $key ) ) {
|
98 |
-
$key = array( $key => $val );
|
99 |
-
}
|
100 |
-
|
101 |
-
$is_updated = false;
|
102 |
-
|
103 |
-
foreach ( $key as $k => $v ) {
|
104 |
-
if ( $this->{$k} === $v ) {
|
105 |
-
continue;
|
106 |
-
}
|
107 |
-
|
108 |
-
if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
|
109 |
-
( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
|
110 |
-
$this->{$k} == $v
|
111 |
-
) {
|
112 |
-
continue;
|
113 |
-
}
|
114 |
-
|
115 |
-
// Update value.
|
116 |
-
$this->{$k} = $v;
|
117 |
-
|
118 |
-
$is_updated = true;
|
119 |
-
}
|
120 |
-
|
121 |
-
$this->_is_updated = $is_updated;
|
122 |
-
|
123 |
-
return $is_updated;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Checks if entity was updated.
|
128 |
-
*
|
129 |
-
* @author Vova Feldman (@svovaf)
|
130 |
-
* @since 1.0.9
|
131 |
-
*
|
132 |
-
* @return bool
|
133 |
-
*/
|
134 |
-
function is_updated() {
|
135 |
-
return $this->_is_updated;
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* @param $id
|
140 |
-
*
|
141 |
-
* @author Vova Feldman (@svovaf)
|
142 |
-
* @since 1.1.2
|
143 |
-
*
|
144 |
-
* @return bool
|
145 |
-
*/
|
146 |
-
static function is_valid_id($id){
|
147 |
-
return is_numeric($id);
|
148 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
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 |
+
* Get object's public variables.
|
15 |
+
*
|
16 |
+
* @author Vova Feldman (@svovaf)
|
17 |
+
* @since 1.0.0
|
18 |
+
*
|
19 |
+
* @param object $object
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
function fs_get_object_public_vars( $object ) {
|
24 |
+
return get_object_vars( $object );
|
25 |
+
}
|
26 |
+
|
27 |
+
class FS_Entity {
|
28 |
+
/**
|
29 |
+
* @var number
|
30 |
+
*/
|
31 |
+
public $id;
|
32 |
+
/**
|
33 |
+
* @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
|
34 |
+
*/
|
35 |
+
public $updated;
|
36 |
+
/**
|
37 |
+
* @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
|
38 |
+
*/
|
39 |
+
public $created;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @param bool|object $entity
|
43 |
+
*/
|
44 |
+
function __construct( $entity = false ) {
|
45 |
+
if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
$props = fs_get_object_public_vars( $this );
|
50 |
+
|
51 |
+
foreach ( $props as $key => $def_value ) {
|
52 |
+
$this->{$key} = isset( $entity->{$key} ) ?
|
53 |
+
$entity->{$key} :
|
54 |
+
$def_value;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
static function get_type() {
|
59 |
+
return 'type';
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @author Vova Feldman (@svovaf)
|
64 |
+
* @since 1.0.6
|
65 |
+
*
|
66 |
+
* @param FS_Entity $entity1
|
67 |
+
* @param FS_Entity $entity2
|
68 |
+
*
|
69 |
+
* @return bool
|
70 |
+
*/
|
71 |
+
static function equals( $entity1, $entity2 ) {
|
72 |
+
if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
|
73 |
+
return true;
|
74 |
+
} else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
|
75 |
+
return ( $entity1->id == $entity2->id );
|
76 |
+
} else if ( is_object( $entity1 ) ) {
|
77 |
+
return is_null( $entity1->id );
|
78 |
+
} else {
|
79 |
+
return is_null( $entity2->id );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
private $_is_updated = false;
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Update object property.
|
87 |
+
*
|
88 |
+
* @author Vova Feldman (@svovaf)
|
89 |
+
* @since 1.0.9
|
90 |
+
*
|
91 |
+
* @param string|array[string]mixed $key
|
92 |
+
* @param string|bool $val
|
93 |
+
*
|
94 |
+
* @return bool
|
95 |
+
*/
|
96 |
+
function update( $key, $val = false ) {
|
97 |
+
if ( ! is_array( $key ) ) {
|
98 |
+
$key = array( $key => $val );
|
99 |
+
}
|
100 |
+
|
101 |
+
$is_updated = false;
|
102 |
+
|
103 |
+
foreach ( $key as $k => $v ) {
|
104 |
+
if ( $this->{$k} === $v ) {
|
105 |
+
continue;
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
|
109 |
+
( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
|
110 |
+
$this->{$k} == $v
|
111 |
+
) {
|
112 |
+
continue;
|
113 |
+
}
|
114 |
+
|
115 |
+
// Update value.
|
116 |
+
$this->{$k} = $v;
|
117 |
+
|
118 |
+
$is_updated = true;
|
119 |
+
}
|
120 |
+
|
121 |
+
$this->_is_updated = $is_updated;
|
122 |
+
|
123 |
+
return $is_updated;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Checks if entity was updated.
|
128 |
+
*
|
129 |
+
* @author Vova Feldman (@svovaf)
|
130 |
+
* @since 1.0.9
|
131 |
+
*
|
132 |
+
* @return bool
|
133 |
+
*/
|
134 |
+
function is_updated() {
|
135 |
+
return $this->_is_updated;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* @param $id
|
140 |
+
*
|
141 |
+
* @author Vova Feldman (@svovaf)
|
142 |
+
* @since 1.1.2
|
143 |
+
*
|
144 |
+
* @return bool
|
145 |
+
*/
|
146 |
+
static function is_valid_id($id){
|
147 |
+
return is_numeric($id);
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @author Leo Fajardo (@leorw)
|
152 |
+
* @since 2.3.1
|
153 |
+
*
|
154 |
+
* @return string
|
155 |
+
*/
|
156 |
+
public static function get_class_name() {
|
157 |
+
return get_called_class();
|
158 |
+
}
|
159 |
}
|
includes/freemius/includes/entities/class-fs-payment.php
CHANGED
@@ -1,168 +1,168 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Payment extends FS_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var number
|
19 |
-
*/
|
20 |
-
public $plugin_id;
|
21 |
-
/**
|
22 |
-
* @var number
|
23 |
-
*/
|
24 |
-
public $user_id;
|
25 |
-
/**
|
26 |
-
* @var number
|
27 |
-
*/
|
28 |
-
public $install_id;
|
29 |
-
/**
|
30 |
-
* @var number
|
31 |
-
*/
|
32 |
-
public $subscription_id;
|
33 |
-
/**
|
34 |
-
* @var number
|
35 |
-
*/
|
36 |
-
public $plan_id;
|
37 |
-
/**
|
38 |
-
* @var number
|
39 |
-
*/
|
40 |
-
public $license_id;
|
41 |
-
/**
|
42 |
-
* @var float
|
43 |
-
*/
|
44 |
-
public $gross;
|
45 |
-
/**
|
46 |
-
* @author Leo Fajardo (@leorw)
|
47 |
-
* @since 2.3.0
|
48 |
-
*
|
49 |
-
* @var string One of the following: `usd`, `gbp`, `eur`.
|
50 |
-
*/
|
51 |
-
public $currency;
|
52 |
-
/**
|
53 |
-
* @var number
|
54 |
-
*/
|
55 |
-
public $bound_payment_id;
|
56 |
-
/**
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
public $external_id;
|
60 |
-
/**
|
61 |
-
* @var string
|
62 |
-
*/
|
63 |
-
public $gateway;
|
64 |
-
/**
|
65 |
-
* @var string ISO 3166-1 alpha-2 - two-letter country code.
|
66 |
-
*
|
67 |
-
* @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
|
68 |
-
*/
|
69 |
-
public $country_code;
|
70 |
-
/**
|
71 |
-
* @var string
|
72 |
-
*/
|
73 |
-
public $vat_id;
|
74 |
-
/**
|
75 |
-
* @var float Actual Tax / VAT in $$$
|
76 |
-
*/
|
77 |
-
public $vat;
|
78 |
-
/**
|
79 |
-
* @var int Payment source.
|
80 |
-
*/
|
81 |
-
public $source = 0;
|
82 |
-
|
83 |
-
#endregion Properties
|
84 |
-
|
85 |
-
const CURRENCY_USD = 'usd';
|
86 |
-
const CURRENCY_GBP = 'gbp';
|
87 |
-
const CURRENCY_EUR = 'eur';
|
88 |
-
|
89 |
-
/**
|
90 |
-
* @param object|bool $payment
|
91 |
-
*/
|
92 |
-
function __construct( $payment = false ) {
|
93 |
-
parent::__construct( $payment );
|
94 |
-
}
|
95 |
-
|
96 |
-
static function get_type() {
|
97 |
-
return 'payment';
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* @author Vova Feldman (@svovaf)
|
102 |
-
* @since 1.0.0
|
103 |
-
*
|
104 |
-
* @return bool
|
105 |
-
*/
|
106 |
-
function is_refund() {
|
107 |
-
return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Checks if the payment was migrated from another platform.
|
112 |
-
*
|
113 |
-
* @author Vova Feldman (@svovaf)
|
114 |
-
* @since 2.0.2
|
115 |
-
*
|
116 |
-
* @return bool
|
117 |
-
*/
|
118 |
-
function is_migrated() {
|
119 |
-
return ( 0 != $this->source );
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Returns the gross in this format:
|
124 |
-
* `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
|
125 |
-
*
|
126 |
-
* Examples: £9.99 GBP, -£9.99 GBP.
|
127 |
-
*
|
128 |
-
* @author Leo Fajardo (@leorw)
|
129 |
-
* @since 2.3.0
|
130 |
-
*
|
131 |
-
* @return string
|
132 |
-
*/
|
133 |
-
function formatted_gross()
|
134 |
-
{
|
135 |
-
return (
|
136 |
-
( $this->gross < 0 ? '-' : '' ) .
|
137 |
-
$this->get_symbol() .
|
138 |
-
number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
|
139 |
-
strtoupper( $this->currency )
|
140 |
-
);
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* A map between supported currencies with their symbols.
|
145 |
-
*
|
146 |
-
* @var array<string,string>
|
147 |
-
*/
|
148 |
-
static $CURRENCY_2_SYMBOL;
|
149 |
-
|
150 |
-
/**
|
151 |
-
* @author Leo Fajardo (@leorw)
|
152 |
-
* @since 2.3.0
|
153 |
-
*
|
154 |
-
* @return string
|
155 |
-
*/
|
156 |
-
private function get_symbol() {
|
157 |
-
if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
|
158 |
-
// Lazy load.
|
159 |
-
self::$CURRENCY_2_SYMBOL = array(
|
160 |
-
self::CURRENCY_USD => '$',
|
161 |
-
self::CURRENCY_GBP => '£',
|
162 |
-
self::CURRENCY_EUR => '€',
|
163 |
-
);
|
164 |
-
}
|
165 |
-
|
166 |
-
return self::$CURRENCY_2_SYMBOL[ $this->currency ];
|
167 |
-
}
|
168 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Payment extends FS_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var number
|
19 |
+
*/
|
20 |
+
public $plugin_id;
|
21 |
+
/**
|
22 |
+
* @var number
|
23 |
+
*/
|
24 |
+
public $user_id;
|
25 |
+
/**
|
26 |
+
* @var number
|
27 |
+
*/
|
28 |
+
public $install_id;
|
29 |
+
/**
|
30 |
+
* @var number
|
31 |
+
*/
|
32 |
+
public $subscription_id;
|
33 |
+
/**
|
34 |
+
* @var number
|
35 |
+
*/
|
36 |
+
public $plan_id;
|
37 |
+
/**
|
38 |
+
* @var number
|
39 |
+
*/
|
40 |
+
public $license_id;
|
41 |
+
/**
|
42 |
+
* @var float
|
43 |
+
*/
|
44 |
+
public $gross;
|
45 |
+
/**
|
46 |
+
* @author Leo Fajardo (@leorw)
|
47 |
+
* @since 2.3.0
|
48 |
+
*
|
49 |
+
* @var string One of the following: `usd`, `gbp`, `eur`.
|
50 |
+
*/
|
51 |
+
public $currency;
|
52 |
+
/**
|
53 |
+
* @var number
|
54 |
+
*/
|
55 |
+
public $bound_payment_id;
|
56 |
+
/**
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
public $external_id;
|
60 |
+
/**
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
public $gateway;
|
64 |
+
/**
|
65 |
+
* @var string ISO 3166-1 alpha-2 - two-letter country code.
|
66 |
+
*
|
67 |
+
* @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
|
68 |
+
*/
|
69 |
+
public $country_code;
|
70 |
+
/**
|
71 |
+
* @var string
|
72 |
+
*/
|
73 |
+
public $vat_id;
|
74 |
+
/**
|
75 |
+
* @var float Actual Tax / VAT in $$$
|
76 |
+
*/
|
77 |
+
public $vat;
|
78 |
+
/**
|
79 |
+
* @var int Payment source.
|
80 |
+
*/
|
81 |
+
public $source = 0;
|
82 |
+
|
83 |
+
#endregion Properties
|
84 |
+
|
85 |
+
const CURRENCY_USD = 'usd';
|
86 |
+
const CURRENCY_GBP = 'gbp';
|
87 |
+
const CURRENCY_EUR = 'eur';
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @param object|bool $payment
|
91 |
+
*/
|
92 |
+
function __construct( $payment = false ) {
|
93 |
+
parent::__construct( $payment );
|
94 |
+
}
|
95 |
+
|
96 |
+
static function get_type() {
|
97 |
+
return 'payment';
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @author Vova Feldman (@svovaf)
|
102 |
+
* @since 1.0.0
|
103 |
+
*
|
104 |
+
* @return bool
|
105 |
+
*/
|
106 |
+
function is_refund() {
|
107 |
+
return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Checks if the payment was migrated from another platform.
|
112 |
+
*
|
113 |
+
* @author Vova Feldman (@svovaf)
|
114 |
+
* @since 2.0.2
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
function is_migrated() {
|
119 |
+
return ( 0 != $this->source );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Returns the gross in this format:
|
124 |
+
* `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
|
125 |
+
*
|
126 |
+
* Examples: £9.99 GBP, -£9.99 GBP.
|
127 |
+
*
|
128 |
+
* @author Leo Fajardo (@leorw)
|
129 |
+
* @since 2.3.0
|
130 |
+
*
|
131 |
+
* @return string
|
132 |
+
*/
|
133 |
+
function formatted_gross()
|
134 |
+
{
|
135 |
+
return (
|
136 |
+
( $this->gross < 0 ? '-' : '' ) .
|
137 |
+
$this->get_symbol() .
|
138 |
+
number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
|
139 |
+
strtoupper( $this->currency )
|
140 |
+
);
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* A map between supported currencies with their symbols.
|
145 |
+
*
|
146 |
+
* @var array<string,string>
|
147 |
+
*/
|
148 |
+
static $CURRENCY_2_SYMBOL;
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @author Leo Fajardo (@leorw)
|
152 |
+
* @since 2.3.0
|
153 |
+
*
|
154 |
+
* @return string
|
155 |
+
*/
|
156 |
+
private function get_symbol() {
|
157 |
+
if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
|
158 |
+
// Lazy load.
|
159 |
+
self::$CURRENCY_2_SYMBOL = array(
|
160 |
+
self::CURRENCY_USD => '$',
|
161 |
+
self::CURRENCY_GBP => '£',
|
162 |
+
self::CURRENCY_EUR => '€',
|
163 |
+
);
|
164 |
+
}
|
165 |
+
|
166 |
+
return self::$CURRENCY_2_SYMBOL[ $this->currency ];
|
167 |
+
}
|
168 |
}
|
includes/freemius/includes/entities/class-fs-plugin-info.php
CHANGED
@@ -1,34 +1,34 @@
|
|
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 |
-
class FS_Plugin_Info extends FS_Entity {
|
14 |
-
public $plugin_id;
|
15 |
-
public $description;
|
16 |
-
public $short_description;
|
17 |
-
public $banner_url;
|
18 |
-
public $card_banner_url;
|
19 |
-
public $selling_point_0;
|
20 |
-
public $selling_point_1;
|
21 |
-
public $selling_point_2;
|
22 |
-
public $screenshots;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param stdClass|bool $plugin_info
|
26 |
-
*/
|
27 |
-
function __construct( $plugin_info = false ) {
|
28 |
-
parent::__construct( $plugin_info );
|
29 |
-
}
|
30 |
-
|
31 |
-
static function get_type() {
|
32 |
-
return 'plugin';
|
33 |
-
}
|
34 |
}
|
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 |
+
class FS_Plugin_Info extends FS_Entity {
|
14 |
+
public $plugin_id;
|
15 |
+
public $description;
|
16 |
+
public $short_description;
|
17 |
+
public $banner_url;
|
18 |
+
public $card_banner_url;
|
19 |
+
public $selling_point_0;
|
20 |
+
public $selling_point_1;
|
21 |
+
public $selling_point_2;
|
22 |
+
public $screenshots;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param stdClass|bool $plugin_info
|
26 |
+
*/
|
27 |
+
function __construct( $plugin_info = false ) {
|
28 |
+
parent::__construct( $plugin_info );
|
29 |
+
}
|
30 |
+
|
31 |
+
static function get_type() {
|
32 |
+
return 'plugin';
|
33 |
+
}
|
34 |
}
|
includes/freemius/includes/entities/class-fs-plugin-license.php
CHANGED
@@ -1,323 +1,301 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
*
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
return self::mask_secret_key_for_html( $this->secret_key );
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* @author Vova Feldman (@svovaf)
|
307 |
-
* @since 2.3.1
|
308 |
-
*
|
309 |
-
* @param string $secret_key
|
310 |
-
*
|
311 |
-
* @return string
|
312 |
-
*/
|
313 |
-
static function mask_secret_key_for_html( $secret_key ) {
|
314 |
-
return (
|
315 |
-
// Initial 6 chars - sk_ABC
|
316 |
-
htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
|
317 |
-
// Masking
|
318 |
-
str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '•' ) .
|
319 |
-
// Last 3 chars.
|
320 |
-
htmlspecialchars( substr( $secret_key, - 3 ) )
|
321 |
-
);
|
322 |
-
}
|
323 |
-
}
|
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.5
|
7 |
+
*/
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
/**
|
12 |
+
* Class FS_Plugin_License
|
13 |
+
*/
|
14 |
+
class FS_Plugin_License extends FS_Entity {
|
15 |
+
#region Properties
|
16 |
+
/**
|
17 |
+
* @var number
|
18 |
+
*/
|
19 |
+
public $plugin_id;
|
20 |
+
/**
|
21 |
+
* @var number
|
22 |
+
*/
|
23 |
+
public $user_id;
|
24 |
+
/**
|
25 |
+
* @var number
|
26 |
+
*/
|
27 |
+
public $plan_id;
|
28 |
+
/**
|
29 |
+
* @author Leo Fajardo (@leorw)
|
30 |
+
* @since 2.3.0
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
public $parent_plan_name;
|
35 |
+
/**
|
36 |
+
* @author Leo Fajardo (@leorw)
|
37 |
+
* @since 2.3.0
|
38 |
+
*
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
public $parent_plan_title;
|
42 |
+
/**
|
43 |
+
* @author Leo Fajardo (@leorw)
|
44 |
+
* @since 2.3.0
|
45 |
+
*
|
46 |
+
* @var number
|
47 |
+
*/
|
48 |
+
public $parent_license_id;
|
49 |
+
/**
|
50 |
+
* @author Leo Fajardo (@leorw)
|
51 |
+
* @since 2.3.0.4
|
52 |
+
*
|
53 |
+
* @var array
|
54 |
+
*/
|
55 |
+
public $products;
|
56 |
+
/**
|
57 |
+
* @var number
|
58 |
+
*/
|
59 |
+
public $pricing_id;
|
60 |
+
/**
|
61 |
+
* @var int|null
|
62 |
+
*/
|
63 |
+
public $quota;
|
64 |
+
/**
|
65 |
+
* @var int
|
66 |
+
*/
|
67 |
+
public $activated;
|
68 |
+
/**
|
69 |
+
* @var int
|
70 |
+
*/
|
71 |
+
public $activated_local;
|
72 |
+
/**
|
73 |
+
* @var string
|
74 |
+
*/
|
75 |
+
public $expiration;
|
76 |
+
/**
|
77 |
+
* @var string
|
78 |
+
*/
|
79 |
+
public $secret_key;
|
80 |
+
/**
|
81 |
+
* @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
|
82 |
+
* license.
|
83 |
+
*/
|
84 |
+
public $is_free_localhost;
|
85 |
+
/**
|
86 |
+
* @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
|
87 |
+
* block updates and support.
|
88 |
+
*/
|
89 |
+
public $is_block_features;
|
90 |
+
/**
|
91 |
+
* @var bool
|
92 |
+
*/
|
93 |
+
public $is_cancelled;
|
94 |
+
#endregion Properties
|
95 |
+
/**
|
96 |
+
* @param stdClass|bool $license
|
97 |
+
*/
|
98 |
+
function __construct( $license = false ) {
|
99 |
+
parent::__construct( $license );
|
100 |
+
}
|
101 |
+
/**
|
102 |
+
* Get entity type.
|
103 |
+
*
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
static function get_type() {
|
107 |
+
return 'license';
|
108 |
+
}
|
109 |
+
/**
|
110 |
+
* Check how many site activations left.
|
111 |
+
*
|
112 |
+
* @author Vova Feldman (@svovaf)
|
113 |
+
* @since 1.0.5
|
114 |
+
*
|
115 |
+
* @return int
|
116 |
+
*/
|
117 |
+
function left() {
|
118 |
+
if ( ! $this->is_features_enabled() ) {
|
119 |
+
return 0;
|
120 |
+
}
|
121 |
+
if ( $this->is_unlimited() ) {
|
122 |
+
return 999;
|
123 |
+
}
|
124 |
+
return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
125 |
+
}
|
126 |
+
/**
|
127 |
+
* Check if single site license.
|
128 |
+
*
|
129 |
+
* @author Vova Feldman (@svovaf)
|
130 |
+
* @since 1.1.8.1
|
131 |
+
*
|
132 |
+
* @return bool
|
133 |
+
*/
|
134 |
+
function is_single_site() {
|
135 |
+
return ( is_numeric( $this->quota ) && 1 == $this->quota );
|
136 |
+
}
|
137 |
+
/**
|
138 |
+
* @author Vova Feldman (@svovaf)
|
139 |
+
* @since 1.0.5
|
140 |
+
*
|
141 |
+
* @return bool
|
142 |
+
*/
|
143 |
+
function is_expired() {
|
144 |
+
return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
|
145 |
+
}
|
146 |
+
/**
|
147 |
+
* Check if license is not expired.
|
148 |
+
*
|
149 |
+
* @author Vova Feldman (@svovaf)
|
150 |
+
* @since 1.2.1
|
151 |
+
*
|
152 |
+
* @return bool
|
153 |
+
*/
|
154 |
+
function is_valid() {
|
155 |
+
return ! $this->is_expired();
|
156 |
+
}
|
157 |
+
/**
|
158 |
+
* @author Vova Feldman (@svovaf)
|
159 |
+
* @since 1.0.6
|
160 |
+
*
|
161 |
+
* @return bool
|
162 |
+
*/
|
163 |
+
function is_lifetime() {
|
164 |
+
return is_null( $this->expiration );
|
165 |
+
}
|
166 |
+
/**
|
167 |
+
* @author Vova Feldman (@svovaf)
|
168 |
+
* @since 1.2.0
|
169 |
+
*
|
170 |
+
* @return bool
|
171 |
+
*/
|
172 |
+
function is_unlimited() {
|
173 |
+
return is_null( $this->quota );
|
174 |
+
}
|
175 |
+
/**
|
176 |
+
* Check if license is fully utilized.
|
177 |
+
*
|
178 |
+
* @author Vova Feldman (@svovaf)
|
179 |
+
* @since 1.0.6
|
180 |
+
*
|
181 |
+
* @param bool|null $is_localhost
|
182 |
+
*
|
183 |
+
* @return bool
|
184 |
+
*/
|
185 |
+
function is_utilized( $is_localhost = null ) {
|
186 |
+
if ( is_null( $is_localhost ) ) {
|
187 |
+
$is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
|
188 |
+
}
|
189 |
+
if ( $this->is_unlimited() ) {
|
190 |
+
return false;
|
191 |
+
}
|
192 |
+
return ! ( $this->is_free_localhost && $is_localhost ) &&
|
193 |
+
( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
194 |
+
}
|
195 |
+
/**
|
196 |
+
* Check if license can be activated.
|
197 |
+
*
|
198 |
+
* @author Vova Feldman (@svovaf)
|
199 |
+
* @since 2.0.0
|
200 |
+
*
|
201 |
+
* @param bool|null $is_localhost
|
202 |
+
*
|
203 |
+
* @return bool
|
204 |
+
*/
|
205 |
+
function can_activate( $is_localhost = null ) {
|
206 |
+
return ! $this->is_utilized( $is_localhost ) && $this->is_features_enabled();
|
207 |
+
}
|
208 |
+
/**
|
209 |
+
* Check if license can be activated on a given number of production and localhost sites.
|
210 |
+
*
|
211 |
+
* @author Vova Feldman (@svovaf)
|
212 |
+
* @since 2.0.0
|
213 |
+
*
|
214 |
+
* @param int $production_count
|
215 |
+
* @param int $localhost_count
|
216 |
+
*
|
217 |
+
* @return bool
|
218 |
+
*/
|
219 |
+
function can_activate_bulk( $production_count, $localhost_count ) {
|
220 |
+
if ( $this->is_unlimited() ) {
|
221 |
+
return true;
|
222 |
+
}
|
223 |
+
/**
|
224 |
+
* For simplicity, the logic will work as following: when given X sites to activate the license on, if it's
|
225 |
+
* possible to activate on ALL of them, do the activation. If it's not possible to activate on ALL of them,
|
226 |
+
* do NOT activate on any of them.
|
227 |
+
*/
|
228 |
+
return ( $this->quota >= $this->activated + $production_count + ( $this->is_free_localhost ? 0 : $this->activated_local + $localhost_count ) );
|
229 |
+
}
|
230 |
+
/**
|
231 |
+
* @author Vova Feldman (@svovaf)
|
232 |
+
* @since 1.2.1
|
233 |
+
*
|
234 |
+
* @return bool
|
235 |
+
*/
|
236 |
+
function is_active() {
|
237 |
+
return ( ! $this->is_cancelled );
|
238 |
+
}
|
239 |
+
/**
|
240 |
+
* Check if license's plan features are enabled.
|
241 |
+
*
|
242 |
+
* - Either if plan not expired
|
243 |
+
* - If expired, based on the configuration to block features or not.
|
244 |
+
*
|
245 |
+
* @author Vova Feldman (@svovaf)
|
246 |
+
* @since 1.0.6
|
247 |
+
*
|
248 |
+
* @return bool
|
249 |
+
*/
|
250 |
+
function is_features_enabled() {
|
251 |
+
return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
|
252 |
+
}
|
253 |
+
/**
|
254 |
+
* Subscription considered to be new without any payments
|
255 |
+
* if the license expires in less than 24 hours
|
256 |
+
* from the license creation.
|
257 |
+
*
|
258 |
+
* @author Vova Feldman (@svovaf)
|
259 |
+
* @since 1.0.9
|
260 |
+
*
|
261 |
+
* @return bool
|
262 |
+
*/
|
263 |
+
function is_first_payment_pending() {
|
264 |
+
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
|
265 |
+
}
|
266 |
+
/**
|
267 |
+
* @return int
|
268 |
+
*/
|
269 |
+
function total_activations() {
|
270 |
+
return ( $this->activated + $this->activated_local );
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* @author Vova Feldman (@svovaf)
|
275 |
+
* @since 2.3.1
|
276 |
+
*
|
277 |
+
* @return string
|
278 |
+
*/
|
279 |
+
function get_html_escaped_masked_secret_key() {
|
280 |
+
return self::mask_secret_key_for_html( $this->secret_key );
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* @author Vova Feldman (@svovaf)
|
285 |
+
* @since 2.3.1
|
286 |
+
*
|
287 |
+
* @param string $secret_key
|
288 |
+
*
|
289 |
+
* @return string
|
290 |
+
*/
|
291 |
+
static function mask_secret_key_for_html( $secret_key ) {
|
292 |
+
return (
|
293 |
+
// Initial 6 chars - sk_ABC
|
294 |
+
htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
|
295 |
+
// Masking
|
296 |
+
str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '•' ) .
|
297 |
+
// Last 3 chars.
|
298 |
+
htmlspecialchars( substr( $secret_key, - 3 ) )
|
299 |
+
);
|
300 |
+
}
|
301 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/freemius/includes/entities/class-fs-plugin-plan.php
CHANGED
@@ -1,145 +1,145 @@
|
|
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.5
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class FS_Plugin_Plan
|
15 |
-
*
|
16 |
-
* @property FS_Pricing[] $pricing
|
17 |
-
*/
|
18 |
-
class FS_Plugin_Plan extends FS_Entity {
|
19 |
-
|
20 |
-
#region Properties
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @var number
|
24 |
-
*/
|
25 |
-
public $plugin_id;
|
26 |
-
/**
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
public $name;
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $title;
|
34 |
-
/**
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public $description;
|
38 |
-
/**
|
39 |
-
* @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
|
40 |
-
*/
|
41 |
-
public $is_free_localhost;
|
42 |
-
/**
|
43 |
-
* @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
|
44 |
-
* support.
|
45 |
-
*/
|
46 |
-
public $is_block_features;
|
47 |
-
/**
|
48 |
-
* @var int
|
49 |
-
*/
|
50 |
-
public $license_type;
|
51 |
-
/**
|
52 |
-
* @var bool
|
53 |
-
*/
|
54 |
-
public $is_https_support;
|
55 |
-
/**
|
56 |
-
* @var int Trial days.
|
57 |
-
*/
|
58 |
-
public $trial_period;
|
59 |
-
/**
|
60 |
-
* @var string If true, require payment for trial.
|
61 |
-
*/
|
62 |
-
public $is_require_subscription;
|
63 |
-
/**
|
64 |
-
* @var string Knowledge Base URL.
|
65 |
-
*/
|
66 |
-
public $support_kb;
|
67 |
-
/**
|
68 |
-
* @var string Support Forum URL.
|
69 |
-
*/
|
70 |
-
public $support_forum;
|
71 |
-
/**
|
72 |
-
* @var string Support email address.
|
73 |
-
*/
|
74 |
-
public $support_email;
|
75 |
-
/**
|
76 |
-
* @var string Support phone.
|
77 |
-
*/
|
78 |
-
public $support_phone;
|
79 |
-
/**
|
80 |
-
* @var string Support skype username.
|
81 |
-
*/
|
82 |
-
public $support_skype;
|
83 |
-
/**
|
84 |
-
* @var bool Is personal success manager supported with the plan.
|
85 |
-
*/
|
86 |
-
public $is_success_manager;
|
87 |
-
/**
|
88 |
-
* @var bool Is featured plan.
|
89 |
-
*/
|
90 |
-
public $is_featured;
|
91 |
-
|
92 |
-
#endregion Properties
|
93 |
-
|
94 |
-
/**
|
95 |
-
* @param object|bool $plan
|
96 |
-
*/
|
97 |
-
function __construct( $plan = false ) {
|
98 |
-
parent::__construct( $plan );
|
99 |
-
|
100 |
-
if ( is_object( $plan ) ) {
|
101 |
-
$this->name = strtolower( $plan->name );
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
static function get_type() {
|
106 |
-
return 'plan';
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* @author Vova Feldman (@svovaf)
|
111 |
-
* @since 1.0.9
|
112 |
-
*
|
113 |
-
* @return bool
|
114 |
-
*/
|
115 |
-
function is_free() {
|
116 |
-
return ( 'free' === $this->name );
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Checks if this plan supports "Technical Support".
|
121 |
-
*
|
122 |
-
* @author Leo Fajardo (leorw)
|
123 |
-
* @since 1.2.0
|
124 |
-
*
|
125 |
-
* @return bool
|
126 |
-
*/
|
127 |
-
function has_technical_support() {
|
128 |
-
return ( ! empty( $this->support_email ) ||
|
129 |
-
! empty( $this->support_skype ) ||
|
130 |
-
! empty( $this->support_phone ) ||
|
131 |
-
! empty( $this->is_success_manager )
|
132 |
-
);
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* @author Vova Feldman (@svovaf)
|
137 |
-
* @since 1.0.9
|
138 |
-
*
|
139 |
-
* @return bool
|
140 |
-
*/
|
141 |
-
function has_trial() {
|
142 |
-
return ! $this->is_free() &&
|
143 |
-
is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
|
144 |
-
}
|
145 |
}
|
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.5
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class FS_Plugin_Plan
|
15 |
+
*
|
16 |
+
* @property FS_Pricing[] $pricing
|
17 |
+
*/
|
18 |
+
class FS_Plugin_Plan extends FS_Entity {
|
19 |
+
|
20 |
+
#region Properties
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @var number
|
24 |
+
*/
|
25 |
+
public $plugin_id;
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $name;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $title;
|
34 |
+
/**
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public $description;
|
38 |
+
/**
|
39 |
+
* @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
|
40 |
+
*/
|
41 |
+
public $is_free_localhost;
|
42 |
+
/**
|
43 |
+
* @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
|
44 |
+
* support.
|
45 |
+
*/
|
46 |
+
public $is_block_features;
|
47 |
+
/**
|
48 |
+
* @var int
|
49 |
+
*/
|
50 |
+
public $license_type;
|
51 |
+
/**
|
52 |
+
* @var bool
|
53 |
+
*/
|
54 |
+
public $is_https_support;
|
55 |
+
/**
|
56 |
+
* @var int Trial days.
|
57 |
+
*/
|
58 |
+
public $trial_period;
|
59 |
+
/**
|
60 |
+
* @var string If true, require payment for trial.
|
61 |
+
*/
|
62 |
+
public $is_require_subscription;
|
63 |
+
/**
|
64 |
+
* @var string Knowledge Base URL.
|
65 |
+
*/
|
66 |
+
public $support_kb;
|
67 |
+
/**
|
68 |
+
* @var string Support Forum URL.
|
69 |
+
*/
|
70 |
+
public $support_forum;
|
71 |
+
/**
|
72 |
+
* @var string Support email address.
|
73 |
+
*/
|
74 |
+
public $support_email;
|
75 |
+
/**
|
76 |
+
* @var string Support phone.
|
77 |
+
*/
|
78 |
+
public $support_phone;
|
79 |
+
/**
|
80 |
+
* @var string Support skype username.
|
81 |
+
*/
|
82 |
+
public $support_skype;
|
83 |
+
/**
|
84 |
+
* @var bool Is personal success manager supported with the plan.
|
85 |
+
*/
|
86 |
+
public $is_success_manager;
|
87 |
+
/**
|
88 |
+
* @var bool Is featured plan.
|
89 |
+
*/
|
90 |
+
public $is_featured;
|
91 |
+
|
92 |
+
#endregion Properties
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @param object|bool $plan
|
96 |
+
*/
|
97 |
+
function __construct( $plan = false ) {
|
98 |
+
parent::__construct( $plan );
|
99 |
+
|
100 |
+
if ( is_object( $plan ) ) {
|
101 |
+
$this->name = strtolower( $plan->name );
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
static function get_type() {
|
106 |
+
return 'plan';
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* @author Vova Feldman (@svovaf)
|
111 |
+
* @since 1.0.9
|
112 |
+
*
|
113 |
+
* @return bool
|
114 |
+
*/
|
115 |
+
function is_free() {
|
116 |
+
return ( 'free' === $this->name );
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Checks if this plan supports "Technical Support".
|
121 |
+
*
|
122 |
+
* @author Leo Fajardo (leorw)
|
123 |
+
* @since 1.2.0
|
124 |
+
*
|
125 |
+
* @return bool
|
126 |
+
*/
|
127 |
+
function has_technical_support() {
|
128 |
+
return ( ! empty( $this->support_email ) ||
|
129 |
+
! empty( $this->support_skype ) ||
|
130 |
+
! empty( $this->support_phone ) ||
|
131 |
+
! empty( $this->is_success_manager )
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @author Vova Feldman (@svovaf)
|
137 |
+
* @since 1.0.9
|
138 |
+
*
|
139 |
+
* @return bool
|
140 |
+
*/
|
141 |
+
function has_trial() {
|
142 |
+
return ! $this->is_free() &&
|
143 |
+
is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
|
144 |
+
}
|
145 |
}
|
includes/freemius/includes/entities/class-fs-plugin-tag.php
CHANGED
@@ -1,60 +1,60 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2018, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 2.0.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Plugin_Tag extends FS_Entity {
|
14 |
-
/**
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
public $version;
|
18 |
-
/**
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
public $url;
|
22 |
-
/**
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
public $requires_platform_version;
|
26 |
-
/**
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
public $tested_up_to_version;
|
30 |
-
/**
|
31 |
-
* @var bool
|
32 |
-
*/
|
33 |
-
public $has_free;
|
34 |
-
/**
|
35 |
-
* @var bool
|
36 |
-
*/
|
37 |
-
public $has_premium;
|
38 |
-
/**
|
39 |
-
* @var string One of the following: `pending`, `beta`, `unreleased`.
|
40 |
-
*/
|
41 |
-
public $release_mode;
|
42 |
-
|
43 |
-
function __construct( $tag = false ) {
|
44 |
-
parent::__construct( $tag );
|
45 |
-
}
|
46 |
-
|
47 |
-
static function get_type() {
|
48 |
-
return 'tag';
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @author Leo Fajardo (@leorw)
|
53 |
-
* @since 2.3.0
|
54 |
-
*
|
55 |
-
* @return bool
|
56 |
-
*/
|
57 |
-
function is_beta() {
|
58 |
-
return ( 'beta' === $this->release_mode );
|
59 |
-
}
|
60 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2018, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 2.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Plugin_Tag extends FS_Entity {
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
public $version;
|
18 |
+
/**
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
public $url;
|
22 |
+
/**
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
public $requires_platform_version;
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $tested_up_to_version;
|
30 |
+
/**
|
31 |
+
* @var bool
|
32 |
+
*/
|
33 |
+
public $has_free;
|
34 |
+
/**
|
35 |
+
* @var bool
|
36 |
+
*/
|
37 |
+
public $has_premium;
|
38 |
+
/**
|
39 |
+
* @var string One of the following: `pending`, `beta`, `unreleased`.
|
40 |
+
*/
|
41 |
+
public $release_mode;
|
42 |
+
|
43 |
+
function __construct( $tag = false ) {
|
44 |
+
parent::__construct( $tag );
|
45 |
+
}
|
46 |
+
|
47 |
+
static function get_type() {
|
48 |
+
return 'tag';
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @author Leo Fajardo (@leorw)
|
53 |
+
* @since 2.3.0
|
54 |
+
*
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
function is_beta() {
|
58 |
+
return ( 'beta' === $this->release_mode );
|
59 |
+
}
|
60 |
}
|
includes/freemius/includes/entities/class-fs-plugin.php
CHANGED
@@ -1,159 +1,159 @@
|
|
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 |
-
class FS_Plugin extends FS_Scope_Entity {
|
14 |
-
/**
|
15 |
-
* @since 1.0.6
|
16 |
-
* @var null|number
|
17 |
-
*/
|
18 |
-
public $parent_plugin_id;
|
19 |
-
/**
|
20 |
-
* @var string
|
21 |
-
*/
|
22 |
-
public $title;
|
23 |
-
/**
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
public $slug;
|
27 |
-
/**
|
28 |
-
* @author Leo Fajardo (@leorw)
|
29 |
-
* @since 2.2.1
|
30 |
-
*
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $premium_slug;
|
34 |
-
/**
|
35 |
-
* @since 1.2.2
|
36 |
-
*
|
37 |
-
* @var string 'plugin' or 'theme'
|
38 |
-
*/
|
39 |
-
public $type;
|
40 |
-
/**
|
41 |
-
* @author Leo Fajardo (@leorw)
|
42 |
-
*
|
43 |
-
* @since 1.2.3
|
44 |
-
*
|
45 |
-
* @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
|
46 |
-
*/
|
47 |
-
public $affiliate_moderation;
|
48 |
-
/**
|
49 |
-
* @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
|
50 |
-
*/
|
51 |
-
public $is_wp_org_compliant = true;
|
52 |
-
/**
|
53 |
-
* @author Leo Fajardo (@leorw)
|
54 |
-
* @since 2.2.5
|
55 |
-
*
|
56 |
-
* @var int
|
57 |
-
*/
|
58 |
-
public $premium_releases_count;
|
59 |
-
|
60 |
-
#region Install Specific Properties
|
61 |
-
|
62 |
-
/**
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
public $file;
|
66 |
-
/**
|
67 |
-
* @var string
|
68 |
-
*/
|
69 |
-
public $version;
|
70 |
-
/**
|
71 |
-
* @var bool
|
72 |
-
*/
|
73 |
-
public $auto_update;
|
74 |
-
/**
|
75 |
-
* @var FS_Plugin_Info
|
76 |
-
*/
|
77 |
-
public $info;
|
78 |
-
/**
|
79 |
-
* @since 1.0.9
|
80 |
-
*
|
81 |
-
* @var bool
|
82 |
-
*/
|
83 |
-
public $is_premium;
|
84 |
-
/**
|
85 |
-
* @author Leo Fajardo (@leorw)
|
86 |
-
* @since 2.2.1
|
87 |
-
*
|
88 |
-
* @var string
|
89 |
-
*/
|
90 |
-
public $premium_suffix;
|
91 |
-
/**
|
92 |
-
* @since 1.0.9
|
93 |
-
*
|
94 |
-
* @var bool
|
95 |
-
*/
|
96 |
-
public $is_live;
|
97 |
-
/**
|
98 |
-
* @since 2.2.3
|
99 |
-
* @var null|number
|
100 |
-
*/
|
101 |
-
public $bundle_id;
|
102 |
-
/**
|
103 |
-
* @since 2.3.1
|
104 |
-
* @var null|string
|
105 |
-
*/
|
106 |
-
public $bundle_public_key;
|
107 |
-
|
108 |
-
const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
|
109 |
-
|
110 |
-
#endregion Install Specific Properties
|
111 |
-
|
112 |
-
/**
|
113 |
-
* @param stdClass|bool $plugin
|
114 |
-
*/
|
115 |
-
function __construct( $plugin = false ) {
|
116 |
-
parent::__construct( $plugin );
|
117 |
-
|
118 |
-
$this->is_premium = false;
|
119 |
-
$this->is_live = true;
|
120 |
-
|
121 |
-
if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
|
122 |
-
$this->premium_slug = "{$this->slug}-premium";
|
123 |
-
}
|
124 |
-
|
125 |
-
if ( empty( $this->premium_suffix ) ) {
|
126 |
-
$this->premium_suffix = '(Premium)';
|
127 |
-
}
|
128 |
-
|
129 |
-
if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
|
130 |
-
$this->info = new FS_Plugin_Info( $plugin->info );
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Check if plugin is an add-on (has parent).
|
136 |
-
*
|
137 |
-
* @author Vova Feldman (@svovaf)
|
138 |
-
* @since 1.0.6
|
139 |
-
*
|
140 |
-
* @return bool
|
141 |
-
*/
|
142 |
-
function is_addon() {
|
143 |
-
return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* @author Leo Fajardo (@leorw)
|
148 |
-
* @since 1.2.3
|
149 |
-
*
|
150 |
-
* @return bool
|
151 |
-
*/
|
152 |
-
function has_affiliate_program() {
|
153 |
-
return ( ! empty( $this->affiliate_moderation ) );
|
154 |
-
}
|
155 |
-
|
156 |
-
static function get_type() {
|
157 |
-
return 'plugin';
|
158 |
-
}
|
159 |
}
|
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 |
+
class FS_Plugin extends FS_Scope_Entity {
|
14 |
+
/**
|
15 |
+
* @since 1.0.6
|
16 |
+
* @var null|number
|
17 |
+
*/
|
18 |
+
public $parent_plugin_id;
|
19 |
+
/**
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
public $title;
|
23 |
+
/**
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
public $slug;
|
27 |
+
/**
|
28 |
+
* @author Leo Fajardo (@leorw)
|
29 |
+
* @since 2.2.1
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $premium_slug;
|
34 |
+
/**
|
35 |
+
* @since 1.2.2
|
36 |
+
*
|
37 |
+
* @var string 'plugin' or 'theme'
|
38 |
+
*/
|
39 |
+
public $type;
|
40 |
+
/**
|
41 |
+
* @author Leo Fajardo (@leorw)
|
42 |
+
*
|
43 |
+
* @since 1.2.3
|
44 |
+
*
|
45 |
+
* @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
|
46 |
+
*/
|
47 |
+
public $affiliate_moderation;
|
48 |
+
/**
|
49 |
+
* @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
|
50 |
+
*/
|
51 |
+
public $is_wp_org_compliant = true;
|
52 |
+
/**
|
53 |
+
* @author Leo Fajardo (@leorw)
|
54 |
+
* @since 2.2.5
|
55 |
+
*
|
56 |
+
* @var int
|
57 |
+
*/
|
58 |
+
public $premium_releases_count;
|
59 |
+
|
60 |
+
#region Install Specific Properties
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @var string
|
64 |
+
*/
|
65 |
+
public $file;
|
66 |
+
/**
|
67 |
+
* @var string
|
68 |
+
*/
|
69 |
+
public $version;
|
70 |
+
/**
|
71 |
+
* @var bool
|
72 |
+
*/
|
73 |
+
public $auto_update;
|
74 |
+
/**
|
75 |
+
* @var FS_Plugin_Info
|
76 |
+
*/
|
77 |
+
public $info;
|
78 |
+
/**
|
79 |
+
* @since 1.0.9
|
80 |
+
*
|
81 |
+
* @var bool
|
82 |
+
*/
|
83 |
+
public $is_premium;
|
84 |
+
/**
|
85 |
+
* @author Leo Fajardo (@leorw)
|
86 |
+
* @since 2.2.1
|
87 |
+
*
|
88 |
+
* @var string
|
89 |
+
*/
|
90 |
+
public $premium_suffix;
|
91 |
+
/**
|
92 |
+
* @since 1.0.9
|
93 |
+
*
|
94 |
+
* @var bool
|
95 |
+
*/
|
96 |
+
public $is_live;
|
97 |
+
/**
|
98 |
+
* @since 2.2.3
|
99 |
+
* @var null|number
|
100 |
+
*/
|
101 |
+
public $bundle_id;
|
102 |
+
/**
|
103 |
+
* @since 2.3.1
|
104 |
+
* @var null|string
|
105 |
+
*/
|
106 |
+
public $bundle_public_key;
|
107 |
+
|
108 |
+
const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
|
109 |
+
|
110 |
+
#endregion Install Specific Properties
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @param stdClass|bool $plugin
|
114 |
+
*/
|
115 |
+
function __construct( $plugin = false ) {
|
116 |
+
parent::__construct( $plugin );
|
117 |
+
|
118 |
+
$this->is_premium = false;
|
119 |
+
$this->is_live = true;
|
120 |
+
|
121 |
+
if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
|
122 |
+
$this->premium_slug = "{$this->slug}-premium";
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( empty( $this->premium_suffix ) ) {
|
126 |
+
$this->premium_suffix = '(Premium)';
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
|
130 |
+
$this->info = new FS_Plugin_Info( $plugin->info );
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Check if plugin is an add-on (has parent).
|
136 |
+
*
|
137 |
+
* @author Vova Feldman (@svovaf)
|
138 |
+
* @since 1.0.6
|
139 |
+
*
|
140 |
+
* @return bool
|
141 |
+
*/
|
142 |
+
function is_addon() {
|
143 |
+
return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @author Leo Fajardo (@leorw)
|
148 |
+
* @since 1.2.3
|
149 |
+
*
|
150 |
+
* @return bool
|
151 |
+
*/
|
152 |
+
function has_affiliate_program() {
|
153 |
+
return ( ! empty( $this->affiliate_moderation ) );
|
154 |
+
}
|
155 |
+
|
156 |
+
static function get_type() {
|
157 |
+
return 'plugin';
|
158 |
+
}
|
159 |
}
|
includes/freemius/includes/entities/class-fs-pricing.php
CHANGED
@@ -1,141 +1,157 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius for EDD Add-On
|
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.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Pricing extends FS_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var number
|
19 |
-
*/
|
20 |
-
public $plan_id;
|
21 |
-
/**
|
22 |
-
* @var int
|
23 |
-
*/
|
24 |
-
public $licenses;
|
25 |
-
/**
|
26 |
-
* @var null|float
|
27 |
-
*/
|
28 |
-
public $monthly_price;
|
29 |
-
/**
|
30 |
-
* @var null|float
|
31 |
-
*/
|
32 |
-
public $annual_price;
|
33 |
-
/**
|
34 |
-
* @var null|float
|
35 |
-
*/
|
36 |
-
public $lifetime_price;
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
* @
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
* @
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
*
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
*
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius for EDD Add-On
|
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.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Pricing extends FS_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var number
|
19 |
+
*/
|
20 |
+
public $plan_id;
|
21 |
+
/**
|
22 |
+
* @var int
|
23 |
+
*/
|
24 |
+
public $licenses;
|
25 |
+
/**
|
26 |
+
* @var null|float
|
27 |
+
*/
|
28 |
+
public $monthly_price;
|
29 |
+
/**
|
30 |
+
* @var null|float
|
31 |
+
*/
|
32 |
+
public $annual_price;
|
33 |
+
/**
|
34 |
+
* @var null|float
|
35 |
+
*/
|
36 |
+
public $lifetime_price;
|
37 |
+
/**
|
38 |
+
* @author Leo Fajardo (@leorw)
|
39 |
+
* @since 2.3.1
|
40 |
+
*
|
41 |
+
* @var string One of the following: `usd`, `gbp`, `eur`.
|
42 |
+
*/
|
43 |
+
public $currency;
|
44 |
+
|
45 |
+
#endregion Properties
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @param object|bool $pricing
|
49 |
+
*/
|
50 |
+
function __construct( $pricing = false ) {
|
51 |
+
parent::__construct( $pricing );
|
52 |
+
}
|
53 |
+
|
54 |
+
static function get_type() {
|
55 |
+
return 'pricing';
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @author Vova Feldman (@svovaf)
|
60 |
+
* @since 1.1.8
|
61 |
+
*
|
62 |
+
* @return bool
|
63 |
+
*/
|
64 |
+
function has_monthly() {
|
65 |
+
return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @author Vova Feldman (@svovaf)
|
70 |
+
* @since 1.1.8
|
71 |
+
*
|
72 |
+
* @return bool
|
73 |
+
*/
|
74 |
+
function has_annual() {
|
75 |
+
return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* @author Vova Feldman (@svovaf)
|
80 |
+
* @since 1.1.8
|
81 |
+
*
|
82 |
+
* @return bool
|
83 |
+
*/
|
84 |
+
function has_lifetime() {
|
85 |
+
return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Check if unlimited licenses pricing.
|
90 |
+
*
|
91 |
+
* @author Vova Feldman (@svovaf)
|
92 |
+
* @since 1.1.8
|
93 |
+
*
|
94 |
+
* @return bool
|
95 |
+
*/
|
96 |
+
function is_unlimited() {
|
97 |
+
return is_null( $this->licenses );
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Check if pricing has more than one billing cycle.
|
103 |
+
*
|
104 |
+
* @author Vova Feldman (@svovaf)
|
105 |
+
* @since 1.1.8
|
106 |
+
*
|
107 |
+
* @return bool
|
108 |
+
*/
|
109 |
+
function is_multi_cycle() {
|
110 |
+
$cycles = 0;
|
111 |
+
if ( $this->has_monthly() ) {
|
112 |
+
$cycles ++;
|
113 |
+
}
|
114 |
+
if ( $this->has_annual() ) {
|
115 |
+
$cycles ++;
|
116 |
+
}
|
117 |
+
if ( $this->has_lifetime() ) {
|
118 |
+
$cycles ++;
|
119 |
+
}
|
120 |
+
|
121 |
+
return $cycles > 1;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Get annual over monthly discount.
|
126 |
+
*
|
127 |
+
* @author Vova Feldman (@svovaf)
|
128 |
+
* @since 1.1.8
|
129 |
+
*
|
130 |
+
* @return int
|
131 |
+
*/
|
132 |
+
function annual_discount_percentage() {
|
133 |
+
return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Get annual over monthly savings.
|
138 |
+
*
|
139 |
+
* @author Vova Feldman (@svovaf)
|
140 |
+
* @since 1.1.8
|
141 |
+
*
|
142 |
+
* @return float
|
143 |
+
*/
|
144 |
+
function annual_savings() {
|
145 |
+
return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* @author Leo Fajardo (@leorw)
|
150 |
+
* @since 2.3.1
|
151 |
+
*
|
152 |
+
* @return bool
|
153 |
+
*/
|
154 |
+
function is_usd() {
|
155 |
+
return ( 'usd' === $this->currency );
|
156 |
+
}
|
157 |
}
|
includes/freemius/includes/entities/class-fs-scope-entity.php
CHANGED
@@ -1,29 +1,29 @@
|
|
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.4
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Scope_Entity extends FS_Entity {
|
14 |
-
/**
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
public $public_key;
|
18 |
-
/**
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
public $secret_key;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @param bool|stdClass $scope_entity
|
25 |
-
*/
|
26 |
-
function __construct( $scope_entity = false ) {
|
27 |
-
parent::__construct( $scope_entity );
|
28 |
-
}
|
29 |
}
|
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.4
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Scope_Entity extends FS_Entity {
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
public $public_key;
|
18 |
+
/**
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
public $secret_key;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param bool|stdClass $scope_entity
|
25 |
+
*/
|
26 |
+
function __construct( $scope_entity = false ) {
|
27 |
+
parent::__construct( $scope_entity );
|
28 |
+
}
|
29 |
}
|
includes/freemius/includes/entities/class-fs-site.php
CHANGED
@@ -1,233 +1,233 @@
|
|
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 |
-
class FS_Site extends FS_Scope_Entity {
|
14 |
-
/**
|
15 |
-
* @var number
|
16 |
-
*/
|
17 |
-
public $site_id;
|
18 |
-
/**
|
19 |
-
* @var number
|
20 |
-
*/
|
21 |
-
public $plugin_id;
|
22 |
-
/**
|
23 |
-
* @var number
|
24 |
-
*/
|
25 |
-
public $user_id;
|
26 |
-
/**
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
public $title;
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $url;
|
34 |
-
/**
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public $version;
|
38 |
-
/**
|
39 |
-
* @var string E.g. en-GB
|
40 |
-
*/
|
41 |
-
public $language;
|
42 |
-
/**
|
43 |
-
* @var string E.g. UTF-8
|
44 |
-
*/
|
45 |
-
public $charset;
|
46 |
-
/**
|
47 |
-
* @var string Platform version (e.g WordPress version).
|
48 |
-
*/
|
49 |
-
public $platform_version;
|
50 |
-
/**
|
51 |
-
* Freemius SDK version
|
52 |
-
*
|
53 |
-
* @author Leo Fajardo (@leorw)
|
54 |
-
* @since 1.2.2
|
55 |
-
*
|
56 |
-
* @var string SDK version (e.g.: 1.2.2)
|
57 |
-
*/
|
58 |
-
public $sdk_version;
|
59 |
-
/**
|
60 |
-
* @var string Programming language version (e.g PHP version).
|
61 |
-
*/
|
62 |
-
public $programming_language_version;
|
63 |
-
/**
|
64 |
-
* @var number|null
|
65 |
-
*/
|
66 |
-
public $plan_id;
|
67 |
-
/**
|
68 |
-
* @var number|null
|
69 |
-
*/
|
70 |
-
public $license_id;
|
71 |
-
/**
|
72 |
-
* @var number|null
|
73 |
-
*/
|
74 |
-
public $trial_plan_id;
|
75 |
-
/**
|
76 |
-
* @var string|null
|
77 |
-
*/
|
78 |
-
public $trial_ends;
|
79 |
-
/**
|
80 |
-
* @since 1.0.9
|
81 |
-
*
|
82 |
-
* @var bool
|
83 |
-
*/
|
84 |
-
public $is_premium = false;
|
85 |
-
/**
|
86 |
-
* @author Leo Fajardo (@leorw)
|
87 |
-
*
|
88 |
-
* @since 1.2.1.5
|
89 |
-
*
|
90 |
-
* @var bool
|
91 |
-
*/
|
92 |
-
public $is_disconnected = false;
|
93 |
-
/**
|
94 |
-
* @since 2.0.0
|
95 |
-
*
|
96 |
-
* @var bool
|
97 |
-
*/
|
98 |
-
public $is_active = true;
|
99 |
-
/**
|
100 |
-
* @since 2.0.0
|
101 |
-
*
|
102 |
-
* @var bool
|
103 |
-
*/
|
104 |
-
public $is_uninstalled = false;
|
105 |
-
|
106 |
-
/**
|
107 |
-
* @param stdClass|bool $site
|
108 |
-
*/
|
109 |
-
function __construct( $site = false ) {
|
110 |
-
parent::__construct( $site );
|
111 |
-
|
112 |
-
if ( is_object( $site ) ) {
|
113 |
-
$this->plan_id = $site->plan_id;
|
114 |
-
}
|
115 |
-
|
116 |
-
if ( ! is_bool( $this->is_disconnected ) ) {
|
117 |
-
$this->is_disconnected = false;
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
static function get_type() {
|
122 |
-
return 'install';
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* @author Vova Feldman (@svovaf)
|
127 |
-
* @since 2.0.0
|
128 |
-
*
|
129 |
-
* @param string $url
|
130 |
-
*
|
131 |
-
* @return bool
|
132 |
-
*/
|
133 |
-
static function is_localhost_by_address( $url ) {
|
134 |
-
if ( false !== strpos( $url, '127.0.0.1' ) ||
|
135 |
-
false !== strpos( $url, 'localhost' )
|
136 |
-
) {
|
137 |
-
return true;
|
138 |
-
}
|
139 |
-
|
140 |
-
if ( ! fs_starts_with( $url, 'http' ) ) {
|
141 |
-
$url = 'http://' . $url;
|
142 |
-
}
|
143 |
-
|
144 |
-
$url_parts = parse_url( $url );
|
145 |
-
|
146 |
-
$subdomain = $url_parts['host'];
|
147 |
-
|
148 |
-
return (
|
149 |
-
// Starts with.
|
150 |
-
fs_starts_with( $subdomain, 'local.' ) ||
|
151 |
-
fs_starts_with( $subdomain, 'dev.' ) ||
|
152 |
-
fs_starts_with( $subdomain, 'test.' ) ||
|
153 |
-
fs_starts_with( $subdomain, 'stage.' ) ||
|
154 |
-
fs_starts_with( $subdomain, 'staging.' ) ||
|
155 |
-
|
156 |
-
// Ends with.
|
157 |
-
fs_ends_with( $subdomain, '.dev' ) ||
|
158 |
-
fs_ends_with( $subdomain, '.test' ) ||
|
159 |
-
fs_ends_with( $subdomain, '.staging' ) ||
|
160 |
-
fs_ends_with( $subdomain, '.local' ) ||
|
161 |
-
fs_ends_with( $subdomain, '.example' ) ||
|
162 |
-
fs_ends_with( $subdomain, '.invalid' ) ||
|
163 |
-
// GoDaddy test/dev.
|
164 |
-
fs_ends_with( $subdomain, '.myftpupload.com' ) ||
|
165 |
-
// ngrok tunneling.
|
166 |
-
fs_ends_with( $subdomain, '.ngrok.io' ) ||
|
167 |
-
// wpsandbox.
|
168 |
-
fs_ends_with( $subdomain, '.wpsandbox.pro' ) ||
|
169 |
-
// SiteGround staging.
|
170 |
-
fs_starts_with( $subdomain, 'staging' ) ||
|
171 |
-
// WPEngine staging.
|
172 |
-
fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
|
173 |
-
fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
|
174 |
-
// Pantheon
|
175 |
-
( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
|
176 |
-
( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
|
177 |
-
// Cloudways
|
178 |
-
fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
|
179 |
-
// Kinsta
|
180 |
-
( fs_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 |
-
|
186 |
-
function is_localhost() {
|
187 |
-
return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Check if site in trial.
|
192 |
-
*
|
193 |
-
* @author Vova Feldman (@svovaf)
|
194 |
-
* @since 1.0.9
|
195 |
-
*
|
196 |
-
* @return bool
|
197 |
-
*/
|
198 |
-
function is_trial() {
|
199 |
-
return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Check if user already utilized the trial with the current install.
|
204 |
-
*
|
205 |
-
* @author Vova Feldman (@svovaf)
|
206 |
-
* @since 1.0.9
|
207 |
-
*
|
208 |
-
* @return bool
|
209 |
-
*/
|
210 |
-
function is_trial_utilized() {
|
211 |
-
return is_numeric( $this->trial_plan_id );
|
212 |
-
}
|
213 |
-
|
214 |
-
/**
|
215 |
-
* @author Vova Feldman (@svovaf)
|
216 |
-
* @since 2.0.0
|
217 |
-
*
|
218 |
-
* @return bool
|
219 |
-
*/
|
220 |
-
function is_tracking_allowed() {
|
221 |
-
return ( true !== $this->is_disconnected );
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* @author Vova Feldman (@svovaf)
|
226 |
-
* @since 2.0.0
|
227 |
-
*
|
228 |
-
* @return bool
|
229 |
-
*/
|
230 |
-
function is_tracking_prohibited() {
|
231 |
-
return ! $this->is_tracking_allowed();
|
232 |
-
}
|
233 |
}
|
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 |
+
class FS_Site extends FS_Scope_Entity {
|
14 |
+
/**
|
15 |
+
* @var number
|
16 |
+
*/
|
17 |
+
public $site_id;
|
18 |
+
/**
|
19 |
+
* @var number
|
20 |
+
*/
|
21 |
+
public $plugin_id;
|
22 |
+
/**
|
23 |
+
* @var number
|
24 |
+
*/
|
25 |
+
public $user_id;
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $title;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $url;
|
34 |
+
/**
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public $version;
|
38 |
+
/**
|
39 |
+
* @var string E.g. en-GB
|
40 |
+
*/
|
41 |
+
public $language;
|
42 |
+
/**
|
43 |
+
* @var string E.g. UTF-8
|
44 |
+
*/
|
45 |
+
public $charset;
|
46 |
+
/**
|
47 |
+
* @var string Platform version (e.g WordPress version).
|
48 |
+
*/
|
49 |
+
public $platform_version;
|
50 |
+
/**
|
51 |
+
* Freemius SDK version
|
52 |
+
*
|
53 |
+
* @author Leo Fajardo (@leorw)
|
54 |
+
* @since 1.2.2
|
55 |
+
*
|
56 |
+
* @var string SDK version (e.g.: 1.2.2)
|
57 |
+
*/
|
58 |
+
public $sdk_version;
|
59 |
+
/**
|
60 |
+
* @var string Programming language version (e.g PHP version).
|
61 |
+
*/
|
62 |
+
public $programming_language_version;
|
63 |
+
/**
|
64 |
+
* @var number|null
|
65 |
+
*/
|
66 |
+
public $plan_id;
|
67 |
+
/**
|
68 |
+
* @var number|null
|
69 |
+
*/
|
70 |
+
public $license_id;
|
71 |
+
/**
|
72 |
+
* @var number|null
|
73 |
+
*/
|
74 |
+
public $trial_plan_id;
|
75 |
+
/**
|
76 |
+
* @var string|null
|
77 |
+
*/
|
78 |
+
public $trial_ends;
|
79 |
+
/**
|
80 |
+
* @since 1.0.9
|
81 |
+
*
|
82 |
+
* @var bool
|
83 |
+
*/
|
84 |
+
public $is_premium = false;
|
85 |
+
/**
|
86 |
+
* @author Leo Fajardo (@leorw)
|
87 |
+
*
|
88 |
+
* @since 1.2.1.5
|
89 |
+
*
|
90 |
+
* @var bool
|
91 |
+
*/
|
92 |
+
public $is_disconnected = false;
|
93 |
+
/**
|
94 |
+
* @since 2.0.0
|
95 |
+
*
|
96 |
+
* @var bool
|
97 |
+
*/
|
98 |
+
public $is_active = true;
|
99 |
+
/**
|
100 |
+
* @since 2.0.0
|
101 |
+
*
|
102 |
+
* @var bool
|
103 |
+
*/
|
104 |
+
public $is_uninstalled = false;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* @param stdClass|bool $site
|
108 |
+
*/
|
109 |
+
function __construct( $site = false ) {
|
110 |
+
parent::__construct( $site );
|
111 |
+
|
112 |
+
if ( is_object( $site ) ) {
|
113 |
+
$this->plan_id = $site->plan_id;
|
114 |
+
}
|
115 |
+
|
116 |
+
if ( ! is_bool( $this->is_disconnected ) ) {
|
117 |
+
$this->is_disconnected = false;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
static function get_type() {
|
122 |
+
return 'install';
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* @author Vova Feldman (@svovaf)
|
127 |
+
* @since 2.0.0
|
128 |
+
*
|
129 |
+
* @param string $url
|
130 |
+
*
|
131 |
+
* @return bool
|
132 |
+
*/
|
133 |
+
static function is_localhost_by_address( $url ) {
|
134 |
+
if ( false !== strpos( $url, '127.0.0.1' ) ||
|
135 |
+
false !== strpos( $url, 'localhost' )
|
136 |
+
) {
|
137 |
+
return true;
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( ! fs_starts_with( $url, 'http' ) ) {
|
141 |
+
$url = 'http://' . $url;
|
142 |
+
}
|
143 |
+
|
144 |
+
$url_parts = parse_url( $url );
|
145 |
+
|
146 |
+
$subdomain = $url_parts['host'];
|
147 |
+
|
148 |
+
return (
|
149 |
+
// Starts with.
|
150 |
+
fs_starts_with( $subdomain, 'local.' ) ||
|
151 |
+
fs_starts_with( $subdomain, 'dev.' ) ||
|
152 |
+
fs_starts_with( $subdomain, 'test.' ) ||
|
153 |
+
fs_starts_with( $subdomain, 'stage.' ) ||
|
154 |
+
fs_starts_with( $subdomain, 'staging.' ) ||
|
155 |
+
|
156 |
+
// Ends with.
|
157 |
+
fs_ends_with( $subdomain, '.dev' ) ||
|
158 |
+
fs_ends_with( $subdomain, '.test' ) ||
|
159 |
+
fs_ends_with( $subdomain, '.staging' ) ||
|
160 |
+
fs_ends_with( $subdomain, '.local' ) ||
|
161 |
+
fs_ends_with( $subdomain, '.example' ) ||
|
162 |
+
fs_ends_with( $subdomain, '.invalid' ) ||
|
163 |
+
// GoDaddy test/dev.
|
164 |
+
fs_ends_with( $subdomain, '.myftpupload.com' ) ||
|
165 |
+
// ngrok tunneling.
|
166 |
+
fs_ends_with( $subdomain, '.ngrok.io' ) ||
|
167 |
+
// wpsandbox.
|
168 |
+
fs_ends_with( $subdomain, '.wpsandbox.pro' ) ||
|
169 |
+
// SiteGround staging.
|
170 |
+
fs_starts_with( $subdomain, 'staging' ) ||
|
171 |
+
// WPEngine staging.
|
172 |
+
fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
|
173 |
+
fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
|
174 |
+
// Pantheon
|
175 |
+
( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
|
176 |
+
( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
|
177 |
+
// Cloudways
|
178 |
+
fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
|
179 |
+
// Kinsta
|
180 |
+
( fs_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 |
+
|
186 |
+
function is_localhost() {
|
187 |
+
return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Check if site in trial.
|
192 |
+
*
|
193 |
+
* @author Vova Feldman (@svovaf)
|
194 |
+
* @since 1.0.9
|
195 |
+
*
|
196 |
+
* @return bool
|
197 |
+
*/
|
198 |
+
function is_trial() {
|
199 |
+
return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Check if user already utilized the trial with the current install.
|
204 |
+
*
|
205 |
+
* @author Vova Feldman (@svovaf)
|
206 |
+
* @since 1.0.9
|
207 |
+
*
|
208 |
+
* @return bool
|
209 |
+
*/
|
210 |
+
function is_trial_utilized() {
|
211 |
+
return is_numeric( $this->trial_plan_id );
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* @author Vova Feldman (@svovaf)
|
216 |
+
* @since 2.0.0
|
217 |
+
*
|
218 |
+
* @return bool
|
219 |
+
*/
|
220 |
+
function is_tracking_allowed() {
|
221 |
+
return ( true !== $this->is_disconnected );
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* @author Vova Feldman (@svovaf)
|
226 |
+
* @since 2.0.0
|
227 |
+
*
|
228 |
+
* @return bool
|
229 |
+
*/
|
230 |
+
function is_tracking_prohibited() {
|
231 |
+
return ! $this->is_tracking_allowed();
|
232 |
+
}
|
233 |
}
|
includes/freemius/includes/entities/class-fs-subscription.php
CHANGED
@@ -1,147 +1,147 @@
|
|
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.9
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Subscription extends FS_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var number
|
19 |
-
*/
|
20 |
-
public $user_id;
|
21 |
-
/**
|
22 |
-
* @var number
|
23 |
-
*/
|
24 |
-
public $install_id;
|
25 |
-
/**
|
26 |
-
* @var number
|
27 |
-
*/
|
28 |
-
public $plan_id;
|
29 |
-
/**
|
30 |
-
* @var number
|
31 |
-
*/
|
32 |
-
public $license_id;
|
33 |
-
/**
|
34 |
-
* @var float
|
35 |
-
*/
|
36 |
-
public $total_gross;
|
37 |
-
/**
|
38 |
-
* @var float
|
39 |
-
*/
|
40 |
-
public $amount_per_cycle;
|
41 |
-
/**
|
42 |
-
* @var int # of months
|
43 |
-
*/
|
44 |
-
public $billing_cycle;
|
45 |
-
/**
|
46 |
-
* @var float
|
47 |
-
*/
|
48 |
-
public $outstanding_balance;
|
49 |
-
/**
|
50 |
-
* @var int
|
51 |
-
*/
|
52 |
-
public $failed_payments;
|
53 |
-
/**
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
public $gateway;
|
57 |
-
/**
|
58 |
-
* @var string
|
59 |
-
*/
|
60 |
-
public $external_id;
|
61 |
-
/**
|
62 |
-
* @var string|null
|
63 |
-
*/
|
64 |
-
public $trial_ends;
|
65 |
-
/**
|
66 |
-
* @var string|null Datetime of the next payment, or null if cancelled.
|
67 |
-
*/
|
68 |
-
public $next_payment;
|
69 |
-
/**
|
70 |
-
* @since 2.3.1
|
71 |
-
*
|
72 |
-
* @var string|null Datetime of the cancellation.
|
73 |
-
*/
|
74 |
-
public $canceled_at;
|
75 |
-
/**
|
76 |
-
* @var string|null
|
77 |
-
*/
|
78 |
-
public $vat_id;
|
79 |
-
/**
|
80 |
-
* @var string Two characters country code
|
81 |
-
*/
|
82 |
-
public $country_code;
|
83 |
-
|
84 |
-
#endregion Properties
|
85 |
-
|
86 |
-
/**
|
87 |
-
* @param object|bool $subscription
|
88 |
-
*/
|
89 |
-
function __construct( $subscription = false ) {
|
90 |
-
parent::__construct( $subscription );
|
91 |
-
}
|
92 |
-
|
93 |
-
static function get_type() {
|
94 |
-
return 'subscription';
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Check if subscription is active.
|
99 |
-
*
|
100 |
-
* @author Vova Feldman (@svovaf)
|
101 |
-
* @since 1.0.9
|
102 |
-
*
|
103 |
-
* @return bool
|
104 |
-
*/
|
105 |
-
function is_active() {
|
106 |
-
if ( $this->is_canceled() ) {
|
107 |
-
return false;
|
108 |
-
}
|
109 |
-
|
110 |
-
return (
|
111 |
-
! empty( $this->next_payment ) &&
|
112 |
-
strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME
|
113 |
-
);
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* @author Vova Feldman (@svovaf)
|
118 |
-
* @since 2.3.1
|
119 |
-
*
|
120 |
-
* @return bool
|
121 |
-
*/
|
122 |
-
function is_canceled() {
|
123 |
-
return ! is_null( $this->canceled_at );
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Subscription considered to be new without any payments
|
128 |
-
* if the next payment should be made within less than 24 hours
|
129 |
-
* from the subscription creation.
|
130 |
-
*
|
131 |
-
* @author Vova Feldman (@svovaf)
|
132 |
-
* @since 1.0.9
|
133 |
-
*
|
134 |
-
* @return bool
|
135 |
-
*/
|
136 |
-
function is_first_payment_pending() {
|
137 |
-
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* @author Vova Feldman (@svovaf)
|
142 |
-
* @since 1.1.7
|
143 |
-
*/
|
144 |
-
function has_trial() {
|
145 |
-
return ! is_null( $this->trial_ends );
|
146 |
-
}
|
147 |
}
|
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.9
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Subscription extends FS_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var number
|
19 |
+
*/
|
20 |
+
public $user_id;
|
21 |
+
/**
|
22 |
+
* @var number
|
23 |
+
*/
|
24 |
+
public $install_id;
|
25 |
+
/**
|
26 |
+
* @var number
|
27 |
+
*/
|
28 |
+
public $plan_id;
|
29 |
+
/**
|
30 |
+
* @var number
|
31 |
+
*/
|
32 |
+
public $license_id;
|
33 |
+
/**
|
34 |
+
* @var float
|
35 |
+
*/
|
36 |
+
public $total_gross;
|
37 |
+
/**
|
38 |
+
* @var float
|
39 |
+
*/
|
40 |
+
public $amount_per_cycle;
|
41 |
+
/**
|
42 |
+
* @var int # of months
|
43 |
+
*/
|
44 |
+
public $billing_cycle;
|
45 |
+
/**
|
46 |
+
* @var float
|
47 |
+
*/
|
48 |
+
public $outstanding_balance;
|
49 |
+
/**
|
50 |
+
* @var int
|
51 |
+
*/
|
52 |
+
public $failed_payments;
|
53 |
+
/**
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
public $gateway;
|
57 |
+
/**
|
58 |
+
* @var string
|
59 |
+
*/
|
60 |
+
public $external_id;
|
61 |
+
/**
|
62 |
+
* @var string|null
|
63 |
+
*/
|
64 |
+
public $trial_ends;
|
65 |
+
/**
|
66 |
+
* @var string|null Datetime of the next payment, or null if cancelled.
|
67 |
+
*/
|
68 |
+
public $next_payment;
|
69 |
+
/**
|
70 |
+
* @since 2.3.1
|
71 |
+
*
|
72 |
+
* @var string|null Datetime of the cancellation.
|
73 |
+
*/
|
74 |
+
public $canceled_at;
|
75 |
+
/**
|
76 |
+
* @var string|null
|
77 |
+
*/
|
78 |
+
public $vat_id;
|
79 |
+
/**
|
80 |
+
* @var string Two characters country code
|
81 |
+
*/
|
82 |
+
public $country_code;
|
83 |
+
|
84 |
+
#endregion Properties
|
85 |
+
|
86 |
+
/**
|
87 |
+
* @param object|bool $subscription
|
88 |
+
*/
|
89 |
+
function __construct( $subscription = false ) {
|
90 |
+
parent::__construct( $subscription );
|
91 |
+
}
|
92 |
+
|
93 |
+
static function get_type() {
|
94 |
+
return 'subscription';
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Check if subscription is active.
|
99 |
+
*
|
100 |
+
* @author Vova Feldman (@svovaf)
|
101 |
+
* @since 1.0.9
|
102 |
+
*
|
103 |
+
* @return bool
|
104 |
+
*/
|
105 |
+
function is_active() {
|
106 |
+
if ( $this->is_canceled() ) {
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
|
110 |
+
return (
|
111 |
+
! empty( $this->next_payment ) &&
|
112 |
+
strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME
|
113 |
+
);
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* @author Vova Feldman (@svovaf)
|
118 |
+
* @since 2.3.1
|
119 |
+
*
|
120 |
+
* @return bool
|
121 |
+
*/
|
122 |
+
function is_canceled() {
|
123 |
+
return ! is_null( $this->canceled_at );
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Subscription considered to be new without any payments
|
128 |
+
* if the next payment should be made within less than 24 hours
|
129 |
+
* from the subscription creation.
|
130 |
+
*
|
131 |
+
* @author Vova Feldman (@svovaf)
|
132 |
+
* @since 1.0.9
|
133 |
+
*
|
134 |
+
* @return bool
|
135 |
+
*/
|
136 |
+
function is_first_payment_pending() {
|
137 |
+
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @author Vova Feldman (@svovaf)
|
142 |
+
* @since 1.1.7
|
143 |
+
*/
|
144 |
+
function has_trial() {
|
145 |
+
return ! is_null( $this->trial_ends );
|
146 |
+
}
|
147 |
}
|
includes/freemius/includes/entities/class-fs-user.php
CHANGED
@@ -1,79 +1,79 @@
|
|
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 |
-
class FS_User extends FS_Scope_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
public $email;
|
21 |
-
/**
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
public $first;
|
25 |
-
/**
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
public $last;
|
29 |
-
/**
|
30 |
-
* @var bool
|
31 |
-
*/
|
32 |
-
public $is_verified;
|
33 |
-
/**
|
34 |
-
* @author Leo Fajardo (@leorw)
|
35 |
-
* @since 2.3.0
|
36 |
-
*
|
37 |
-
* @var bool
|
38 |
-
*/
|
39 |
-
public $is_beta;
|
40 |
-
/**
|
41 |
-
* @var string|null
|
42 |
-
*/
|
43 |
-
public $customer_id;
|
44 |
-
/**
|
45 |
-
* @var float
|
46 |
-
*/
|
47 |
-
public $gross;
|
48 |
-
|
49 |
-
#endregion Properties
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @param object|bool $user
|
53 |
-
*/
|
54 |
-
function __construct( $user = false ) {
|
55 |
-
parent::__construct( $user );
|
56 |
-
}
|
57 |
-
|
58 |
-
function get_name() {
|
59 |
-
return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
|
60 |
-
}
|
61 |
-
|
62 |
-
function is_verified() {
|
63 |
-
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @author Leo Fajardo (@leorw)
|
68 |
-
* @since 2.3.0
|
69 |
-
*
|
70 |
-
* @return bool
|
71 |
-
*/
|
72 |
-
function is_beta() {
|
73 |
-
return ( isset( $this->is_beta ) && true === $this->is_beta );
|
74 |
-
}
|
75 |
-
|
76 |
-
static function get_type() {
|
77 |
-
return 'user';
|
78 |
-
}
|
79 |
}
|
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 |
+
class FS_User extends FS_Scope_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
public $email;
|
21 |
+
/**
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
public $first;
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $last;
|
29 |
+
/**
|
30 |
+
* @var bool
|
31 |
+
*/
|
32 |
+
public $is_verified;
|
33 |
+
/**
|
34 |
+
* @author Leo Fajardo (@leorw)
|
35 |
+
* @since 2.3.0
|
36 |
+
*
|
37 |
+
* @var bool
|
38 |
+
*/
|
39 |
+
public $is_beta;
|
40 |
+
/**
|
41 |
+
* @var string|null
|
42 |
+
*/
|
43 |
+
public $customer_id;
|
44 |
+
/**
|
45 |
+
* @var float
|
46 |
+
*/
|
47 |
+
public $gross;
|
48 |
+
|
49 |
+
#endregion Properties
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param object|bool $user
|
53 |
+
*/
|
54 |
+
function __construct( $user = false ) {
|
55 |
+
parent::__construct( $user );
|
56 |
+
}
|
57 |
+
|
58 |
+
function get_name() {
|
59 |
+
return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
|
60 |
+
}
|
61 |
+
|
62 |
+
function is_verified() {
|
63 |
+
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* @author Leo Fajardo (@leorw)
|
68 |
+
* @since 2.3.0
|
69 |
+
*
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
function is_beta() {
|
73 |
+
return ( isset( $this->is_beta ) && true === $this->is_beta );
|
74 |
+
}
|
75 |
+
|
76 |
+
static function get_type() {
|
77 |
+
return 'user';
|
78 |
+
}
|
79 |
}
|
includes/freemius/includes/entities/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/fs-core-functions.php
CHANGED
@@ -437,6 +437,78 @@
|
|
437 |
}
|
438 |
}
|
439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
if ( ! function_exists( 'fs_nonce_url' ) ) {
|
441 |
/**
|
442 |
* Retrieve URL with nonce added to URL query.
|
437 |
}
|
438 |
}
|
439 |
|
440 |
+
if ( ! function_exists( 'fs_get_entity' ) ) {
|
441 |
+
/**
|
442 |
+
* @author Leo Fajardo (@leorw)
|
443 |
+
* @since 2.3.1
|
444 |
+
*
|
445 |
+
* @param mixed $entity
|
446 |
+
* @param string $class
|
447 |
+
*
|
448 |
+
* @return FS_Plugin|FS_User|FS_Site|FS_Plugin_License|FS_Plugin_Plan|FS_Plugin_Tag|FS_Subscription
|
449 |
+
*/
|
450 |
+
function fs_get_entity( $entity, $class ) {
|
451 |
+
if ( ! is_object( $entity ) || $entity instanceof $class ) {
|
452 |
+
return $entity;
|
453 |
+
}
|
454 |
+
|
455 |
+
return new $class( $entity );
|
456 |
+
}
|
457 |
+
}
|
458 |
+
|
459 |
+
if ( ! function_exists( 'fs_get_entities' ) ) {
|
460 |
+
/**
|
461 |
+
* @author Leo Fajardo (@leorw)
|
462 |
+
* @since 2.3.1
|
463 |
+
*
|
464 |
+
* @param mixed $entities
|
465 |
+
* @param string $class_name
|
466 |
+
*
|
467 |
+
* @return FS_Plugin[]|FS_User[]|FS_Site[]|FS_Plugin_License[]|FS_Plugin_Plan[]|FS_Plugin_Tag[]|FS_Subscription[]
|
468 |
+
*/
|
469 |
+
function fs_get_entities( $entities, $class_name ) {
|
470 |
+
if ( ! is_array( $entities ) || empty( $entities ) ) {
|
471 |
+
return $entities;
|
472 |
+
}
|
473 |
+
|
474 |
+
// Get first element.
|
475 |
+
$first_array_element = reset( $entities );
|
476 |
+
|
477 |
+
if ( $first_array_element instanceof $class_name ) {
|
478 |
+
/**
|
479 |
+
* If the first element of the array is an instance of the context class, assume that all other
|
480 |
+
* elements are instances of the class.
|
481 |
+
*/
|
482 |
+
return $entities;
|
483 |
+
}
|
484 |
+
|
485 |
+
if (
|
486 |
+
is_array( $first_array_element ) &&
|
487 |
+
! empty( $first_array_element )
|
488 |
+
) {
|
489 |
+
$first_array_element = reset( $first_array_element );
|
490 |
+
|
491 |
+
if ( $first_array_element instanceof $class_name ) {
|
492 |
+
/**
|
493 |
+
* If the first element of the `$entities` array is an array whose first element is an instance of the
|
494 |
+
* context class, assume that all other objects are instances of the class.
|
495 |
+
*/
|
496 |
+
return $entities;
|
497 |
+
}
|
498 |
+
}
|
499 |
+
|
500 |
+
foreach ( $entities as $key => $entities_or_entity ) {
|
501 |
+
if ( is_array( $entities_or_entity ) ) {
|
502 |
+
$entities[ $key ] = fs_get_entities( $entities_or_entity, $class_name );
|
503 |
+
} else {
|
504 |
+
$entities[ $key ] = fs_get_entity( $entities_or_entity, $class_name );
|
505 |
+
}
|
506 |
+
}
|
507 |
+
|
508 |
+
return $entities;
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
if ( ! function_exists( 'fs_nonce_url' ) ) {
|
513 |
/**
|
514 |
* Retrieve URL with nonce added to URL query.
|
includes/freemius/includes/fs-essential-functions.php
CHANGED
@@ -344,7 +344,11 @@
|
|
344 |
}
|
345 |
|
346 |
if ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) {
|
347 |
-
|
|
|
|
|
|
|
|
|
348 |
} else {
|
349 |
$theme = wp_get_theme();
|
350 |
$in_activation = ( $newest_sdk->plugin_path == $theme->stylesheet );
|
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 );
|
includes/freemius/includes/fs-plugin-info-dialog.php
CHANGED
@@ -145,15 +145,36 @@
|
|
145 |
}
|
146 |
|
147 |
if ( is_array( $pricing ) && 0 < count( $pricing ) ) {
|
148 |
-
$
|
149 |
|
150 |
-
foreach ( $pricing as
|
151 |
$prices = new FS_Pricing( $prices );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
153 |
|
154 |
-
$
|
|
|
155 |
|
156 |
-
|
|
|
|
|
|
|
157 |
}
|
158 |
|
159 |
if ( is_array( $features ) && 0 < count( $features ) ) {
|
145 |
}
|
146 |
|
147 |
if ( is_array( $pricing ) && 0 < count( $pricing ) ) {
|
148 |
+
$filtered_pricing = array();
|
149 |
|
150 |
+
foreach ( $pricing as $prices ) {
|
151 |
$prices = new FS_Pricing( $prices );
|
152 |
+
|
153 |
+
if ( ! $prices->is_usd() ) {
|
154 |
+
/**
|
155 |
+
* Skip non-USD pricing.
|
156 |
+
*
|
157 |
+
* @author Leo Fajardo (@leorw)
|
158 |
+
* @since 2.3.1
|
159 |
+
*/
|
160 |
+
continue;
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( ( $prices->has_monthly() && $prices->monthly_price > 1.0 ) ||
|
164 |
+
( $prices->has_annual() && $prices->annual_price > 1.0 ) ||
|
165 |
+
( $prices->has_lifetime() && $prices->lifetime_price > 1.0 )
|
166 |
+
) {
|
167 |
+
$filtered_pricing[] = $prices;
|
168 |
+
}
|
169 |
}
|
170 |
|
171 |
+
if ( ! empty( $filtered_pricing ) ) {
|
172 |
+
$has_paid_plan = true;
|
173 |
|
174 |
+
$plan->pricing = $filtered_pricing;
|
175 |
+
|
176 |
+
$has_pricing = true;
|
177 |
+
}
|
178 |
}
|
179 |
|
180 |
if ( is_array( $features ) && 0 < count( $features ) ) {
|
includes/freemius/includes/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/l10n.php
CHANGED
@@ -1,48 +1,48 @@
|
|
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.6
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Retrieve the translation of $text.
|
15 |
-
*
|
16 |
-
* @since 1.2.1.6
|
17 |
-
*
|
18 |
-
* @param string $text
|
19 |
-
*
|
20 |
-
* @return string
|
21 |
-
*/
|
22 |
-
function _fs_text( $text ) {
|
23 |
-
// Avoid misleading Theme Check warning.
|
24 |
-
$fn = 'translate';
|
25 |
-
return $fn( $text, 'freemius' );
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Retrieve translated string with gettext context.
|
30 |
-
*
|
31 |
-
* Quite a few times, there will be collisions with similar translatable text
|
32 |
-
* found in more than two places, but with different translated context.
|
33 |
-
*
|
34 |
-
* By including the context in the pot file, translators can translate the two
|
35 |
-
* strings differently.
|
36 |
-
*
|
37 |
-
* @since 1.2.1.6
|
38 |
-
*
|
39 |
-
* @param string $text
|
40 |
-
* @param string $context
|
41 |
-
*
|
42 |
-
* @return string
|
43 |
-
*/
|
44 |
-
function _fs_x( $text, $context ) {
|
45 |
-
// Avoid misleading Theme Check warning.
|
46 |
-
$fn = 'translate_with_gettext_context';
|
47 |
-
return $fn( $text, $context, 'freemius' );
|
48 |
-
}
|
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.6
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Retrieve the translation of $text.
|
15 |
+
*
|
16 |
+
* @since 1.2.1.6
|
17 |
+
*
|
18 |
+
* @param string $text
|
19 |
+
*
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
function _fs_text( $text ) {
|
23 |
+
// Avoid misleading Theme Check warning.
|
24 |
+
$fn = 'translate';
|
25 |
+
return $fn( $text, 'freemius' );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieve translated string with gettext context.
|
30 |
+
*
|
31 |
+
* Quite a few times, there will be collisions with similar translatable text
|
32 |
+
* found in more than two places, but with different translated context.
|
33 |
+
*
|
34 |
+
* By including the context in the pot file, translators can translate the two
|
35 |
+
* strings differently.
|
36 |
+
*
|
37 |
+
* @since 1.2.1.6
|
38 |
+
*
|
39 |
+
* @param string $text
|
40 |
+
* @param string $context
|
41 |
+
*
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
function _fs_x( $text, $context ) {
|
45 |
+
// Avoid misleading Theme Check warning.
|
46 |
+
$fn = 'translate_with_gettext_context';
|
47 |
+
return $fn( $text, $context, 'freemius' );
|
48 |
+
}
|
includes/freemius/includes/managers/class-fs-admin-menu-manager.php
CHANGED
@@ -1,1001 +1,1001 @@
|
|
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.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Admin_Menu_Manager {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @since 1.2.2
|
19 |
-
*
|
20 |
-
* @var string
|
21 |
-
*/
|
22 |
-
protected $_module_unique_affix;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @since 1.2.2
|
26 |
-
*
|
27 |
-
* @var number
|
28 |
-
*/
|
29 |
-
protected $_module_id;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @since 1.2.2
|
33 |
-
*
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
protected $_module_type;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @since 1.0.6
|
40 |
-
*
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
private $_menu_slug;
|
44 |
-
/**
|
45 |
-
* @since 1.1.3
|
46 |
-
*
|
47 |
-
* @var string
|
48 |
-
*/
|
49 |
-
private $_parent_slug;
|
50 |
-
/**
|
51 |
-
* @since 1.1.3
|
52 |
-
*
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
private $_parent_type;
|
56 |
-
/**
|
57 |
-
* @since 1.1.3
|
58 |
-
*
|
59 |
-
* @var string
|
60 |
-
*/
|
61 |
-
private $_type;
|
62 |
-
/**
|
63 |
-
* @since 1.1.3
|
64 |
-
*
|
65 |
-
* @var bool
|
66 |
-
*/
|
67 |
-
private $_is_top_level;
|
68 |
-
/**
|
69 |
-
* @since 1.1.3
|
70 |
-
*
|
71 |
-
* @var bool
|
72 |
-
*/
|
73 |
-
private $_is_override_exact;
|
74 |
-
/**
|
75 |
-
* @since 1.1.3
|
76 |
-
*
|
77 |
-
* @var array<string,bool>
|
78 |
-
*/
|
79 |
-
private $_default_submenu_items;
|
80 |
-
/**
|
81 |
-
* @since 1.1.3
|
82 |
-
*
|
83 |
-
* @var string
|
84 |
-
*/
|
85 |
-
private $_first_time_path;
|
86 |
-
/**
|
87 |
-
* @since 1.2.2
|
88 |
-
*
|
89 |
-
* @var bool
|
90 |
-
*/
|
91 |
-
private $_menu_exists;
|
92 |
-
/**
|
93 |
-
* @since 2.0.0
|
94 |
-
*
|
95 |
-
* @var bool
|
96 |
-
*/
|
97 |
-
private $_network_menu_exists;
|
98 |
-
|
99 |
-
#endregion Properties
|
100 |
-
|
101 |
-
/**
|
102 |
-
* @var FS_Logger
|
103 |
-
*/
|
104 |
-
protected $_logger;
|
105 |
-
|
106 |
-
#region Singleton
|
107 |
-
|
108 |
-
/**
|
109 |
-
* @var FS_Admin_Menu_Manager[]
|
110 |
-
*/
|
111 |
-
private static $_instances = array();
|
112 |
-
|
113 |
-
/**
|
114 |
-
* @param number $module_id
|
115 |
-
* @param string $module_type
|
116 |
-
* @param string $module_unique_affix
|
117 |
-
*
|
118 |
-
* @return FS_Admin_Menu_Manager
|
119 |
-
*/
|
120 |
-
static function instance( $module_id, $module_type, $module_unique_affix ) {
|
121 |
-
$key = 'm_' . $module_id;
|
122 |
-
|
123 |
-
if ( ! isset( self::$_instances[ $key ] ) ) {
|
124 |
-
self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
|
125 |
-
}
|
126 |
-
|
127 |
-
return self::$_instances[ $key ];
|
128 |
-
}
|
129 |
-
|
130 |
-
protected function __construct( $module_id, $module_type, $module_unique_affix ) {
|
131 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
132 |
-
|
133 |
-
$this->_module_id = $module_id;
|
134 |
-
$this->_module_type = $module_type;
|
135 |
-
$this->_module_unique_affix = $module_unique_affix;
|
136 |
-
}
|
137 |
-
|
138 |
-
#endregion Singleton
|
139 |
-
|
140 |
-
#region Helpers
|
141 |
-
|
142 |
-
private function get_option( &$options, $key, $default = false ) {
|
143 |
-
return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
|
144 |
-
}
|
145 |
-
|
146 |
-
private function get_bool_option( &$options, $key, $default = false ) {
|
147 |
-
return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
|
148 |
-
}
|
149 |
-
|
150 |
-
#endregion Helpers
|
151 |
-
|
152 |
-
/**
|
153 |
-
* @param array $menu
|
154 |
-
* @param bool $is_addon
|
155 |
-
*/
|
156 |
-
function init( $menu, $is_addon = false ) {
|
157 |
-
$this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
|
158 |
-
$this->_network_menu_exists = ( ! empty( $menu['network'] ) && true === $menu['network'] );
|
159 |
-
|
160 |
-
$this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
|
161 |
-
|
162 |
-
$this->_default_submenu_items = array();
|
163 |
-
// @deprecated
|
164 |
-
$this->_type = 'page';
|
165 |
-
$this->_is_top_level = true;
|
166 |
-
$this->_is_override_exact = false;
|
167 |
-
$this->_parent_slug = false;
|
168 |
-
// @deprecated
|
169 |
-
$this->_parent_type = 'page';
|
170 |
-
|
171 |
-
if ( isset( $menu ) ) {
|
172 |
-
if ( ! $is_addon ) {
|
173 |
-
$this->_default_submenu_items = array(
|
174 |
-
'contact' => $this->get_bool_option( $menu, 'contact', true ),
|
175 |
-
'support' => $this->get_bool_option( $menu, 'support', true ),
|
176 |
-
'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
|
177 |
-
'account' => $this->get_bool_option( $menu, 'account', true ),
|
178 |
-
'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
|
179 |
-
'addons' => $this->get_bool_option( $menu, 'addons', true ),
|
180 |
-
);
|
181 |
-
|
182 |
-
// @deprecated
|
183 |
-
$this->_type = $this->get_option( $menu, 'type', 'page' );
|
184 |
-
}
|
185 |
-
|
186 |
-
$this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
|
187 |
-
|
188 |
-
if ( isset( $menu['parent'] ) ) {
|
189 |
-
$this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
|
190 |
-
// @deprecated
|
191 |
-
$this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
|
192 |
-
|
193 |
-
// If parent's slug is different, then it's NOT a top level menu item.
|
194 |
-
$this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
|
195 |
-
} else {
|
196 |
-
/**
|
197 |
-
* If no parent then top level if:
|
198 |
-
* - Has custom admin menu ('page')
|
199 |
-
* - CPT menu type ('cpt')
|
200 |
-
*/
|
201 |
-
// $this->_is_top_level = in_array( $this->_type, array(
|
202 |
-
// 'cpt',
|
203 |
-
// 'page'
|
204 |
-
// ) );
|
205 |
-
}
|
206 |
-
|
207 |
-
$first_path = $this->get_option( $menu, 'first-path', false );
|
208 |
-
|
209 |
-
if ( ! empty( $first_path ) && is_string( $first_path ) ) {
|
210 |
-
$this->_first_time_path = $first_path;
|
211 |
-
}
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Check if top level menu.
|
217 |
-
*
|
218 |
-
* @author Vova Feldman (@svovaf)
|
219 |
-
* @since 1.1.3
|
220 |
-
*
|
221 |
-
* @return bool False if submenu item.
|
222 |
-
*/
|
223 |
-
function is_top_level() {
|
224 |
-
return $this->_is_top_level;
|
225 |
-
}
|
226 |
-
|
227 |
-
/**
|
228 |
-
* Check if the page should be override on exact URL match.
|
229 |
-
*
|
230 |
-
* @author Vova Feldman (@svovaf)
|
231 |
-
* @since 1.1.3
|
232 |
-
*
|
233 |
-
* @return bool False if submenu item.
|
234 |
-
*/
|
235 |
-
function is_override_exact() {
|
236 |
-
return $this->_is_override_exact;
|
237 |
-
}
|
238 |
-
|
239 |
-
|
240 |
-
/**
|
241 |
-
* Get the path of the page the user should be forwarded to after first activation.
|
242 |
-
*
|
243 |
-
* @author Vova Feldman (@svovaf)
|
244 |
-
* @since 1.1.3
|
245 |
-
*
|
246 |
-
* @param bool $is_network Since 2.4.5
|
247 |
-
*
|
248 |
-
* @return string
|
249 |
-
*/
|
250 |
-
function get_first_time_path( $is_network = false ) {
|
251 |
-
if ( empty ( $this->_first_time_path ) ) {
|
252 |
-
return $this->_first_time_path;
|
253 |
-
}
|
254 |
-
|
255 |
-
if ( $is_network ) {
|
256 |
-
return network_admin_url( $this->_first_time_path );
|
257 |
-
} else {
|
258 |
-
return admin_url( $this->_first_time_path );
|
259 |
-
}
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* Check if plugin's menu item is part of a custom top level menu.
|
264 |
-
*
|
265 |
-
* @author Vova Feldman (@svovaf)
|
266 |
-
* @since 1.1.3
|
267 |
-
*
|
268 |
-
* @return bool
|
269 |
-
*/
|
270 |
-
function has_custom_parent() {
|
271 |
-
return ! $this->_is_top_level && is_string( $this->_parent_slug );
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* @author Leo Fajardo (@leorw)
|
276 |
-
* @since 1.2.2
|
277 |
-
*
|
278 |
-
* @return bool
|
279 |
-
*/
|
280 |
-
function has_menu() {
|
281 |
-
return $this->_menu_exists;
|
282 |
-
}
|
283 |
-
|
284 |
-
/**
|
285 |
-
* @author Vova Feldman (@svovaf)
|
286 |
-
* @since 2.0.0
|
287 |
-
*
|
288 |
-
* @return bool
|
289 |
-
*/
|
290 |
-
function has_network_menu() {
|
291 |
-
return $this->_network_menu_exists;
|
292 |
-
}
|
293 |
-
|
294 |
-
/**
|
295 |
-
* @author Leo Fajardo (@leorw)
|
296 |
-
*
|
297 |
-
* @param string $menu_slug
|
298 |
-
*
|
299 |
-
* @since 2.1.3
|
300 |
-
*/
|
301 |
-
function set_slug_and_network_menu_exists_flag($menu_slug ) {
|
302 |
-
$this->_menu_slug = $menu_slug;
|
303 |
-
$this->_network_menu_exists = false;
|
304 |
-
}
|
305 |
-
|
306 |
-
/**
|
307 |
-
* @author Vova Feldman (@svovaf)
|
308 |
-
* @since 1.1.3
|
309 |
-
*
|
310 |
-
* @param string $id
|
311 |
-
* @param bool $default
|
312 |
-
* @param bool $ignore_menu_existence Since 1.2.2.7 If true, check if the submenu item visible even if there's no parent menu.
|
313 |
-
*
|
314 |
-
* @return bool
|
315 |
-
*/
|
316 |
-
function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
|
317 |
-
if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
|
318 |
-
return false;
|
319 |
-
}
|
320 |
-
|
321 |
-
return fs_apply_filter(
|
322 |
-
$this->_module_unique_affix,
|
323 |
-
'is_submenu_visible',
|
324 |
-
$this->get_bool_option( $this->_default_submenu_items, $id, $default ),
|
325 |
-
$id
|
326 |
-
);
|
327 |
-
}
|
328 |
-
|
329 |
-
/**
|
330 |
-
* Calculates admin settings menu slug.
|
331 |
-
* If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
|
332 |
-
*
|
333 |
-
* @author Vova Feldman (@svovaf)
|
334 |
-
* @since 1.1.3
|
335 |
-
*
|
336 |
-
* @param string $page
|
337 |
-
*
|
338 |
-
* @return string
|
339 |
-
*/
|
340 |
-
function get_slug( $page = '' ) {
|
341 |
-
return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
|
342 |
-
$this->_menu_slug :
|
343 |
-
$this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* @author Vova Feldman (@svovaf)
|
348 |
-
* @since 1.1.3
|
349 |
-
*
|
350 |
-
* @return string
|
351 |
-
*/
|
352 |
-
function get_parent_slug() {
|
353 |
-
return $this->_parent_slug;
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* @author Vova Feldman (@svovaf)
|
358 |
-
* @since 1.1.3
|
359 |
-
*
|
360 |
-
* @return string
|
361 |
-
*/
|
362 |
-
function get_type() {
|
363 |
-
return $this->_type;
|
364 |
-
}
|
365 |
-
|
366 |
-
/**
|
367 |
-
* @author Vova Feldman (@svovaf)
|
368 |
-
* @since 1.1.3
|
369 |
-
*
|
370 |
-
* @return bool
|
371 |
-
*/
|
372 |
-
function is_cpt() {
|
373 |
-
return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
|
374 |
-
// Back compatibility.
|
375 |
-
'cpt' === $this->_type
|
376 |
-
);
|
377 |
-
}
|
378 |
-
|
379 |
-
/**
|
380 |
-
* @author Vova Feldman (@svovaf)
|
381 |
-
* @since 1.1.3
|
382 |
-
*
|
383 |
-
* @return string
|
384 |
-
*/
|
385 |
-
function get_parent_type() {
|
386 |
-
return $this->_parent_type;
|
387 |
-
}
|
388 |
-
|
389 |
-
/**
|
390 |
-
* @author Vova Feldman (@svovaf)
|
391 |
-
* @since 1.1.3
|
392 |
-
*
|
393 |
-
* @return string
|
394 |
-
*/
|
395 |
-
function get_raw_slug() {
|
396 |
-
return $this->_menu_slug;
|
397 |
-
}
|
398 |
-
|
399 |
-
/**
|
400 |
-
* Get plugin's original menu slug.
|
401 |
-
*
|
402 |
-
* @author Vova Feldman (@svovaf)
|
403 |
-
* @since 1.1.3
|
404 |
-
*
|
405 |
-
* @return string
|
406 |
-
*/
|
407 |
-
function get_original_menu_slug() {
|
408 |
-
if ( 'cpt' === $this->_type ) {
|
409 |
-
return add_query_arg( array(
|
410 |
-
'post_type' => $this->_menu_slug
|
411 |
-
), 'edit.php' );
|
412 |
-
}
|
413 |
-
|
414 |
-
if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
|
415 |
-
return $this->_menu_slug;
|
416 |
-
} else {
|
417 |
-
return $this->_module_unique_affix;
|
418 |
-
}
|
419 |
-
}
|
420 |
-
|
421 |
-
/**
|
422 |
-
* @author Vova Feldman (@svovaf)
|
423 |
-
* @since 1.1.3
|
424 |
-
*
|
425 |
-
* @return string
|
426 |
-
*/
|
427 |
-
function get_top_level_menu_slug() {
|
428 |
-
return $this->has_custom_parent() ?
|
429 |
-
$this->get_parent_slug() :
|
430 |
-
$this->get_raw_slug();
|
431 |
-
}
|
432 |
-
|
433 |
-
/**
|
434 |
-
* Is user on plugin's admin activation page.
|
435 |
-
*
|
436 |
-
* @author Vova Feldman (@svovaf)
|
437 |
-
* @since 1.0.8
|
438 |
-
*
|
439 |
-
* @param bool $show_opt_in_on_themes_page Since 2.3.1
|
440 |
-
*
|
441 |
-
* @return bool
|
442 |
-
*
|
443 |
-
* @deprecated Please use is_activation_page() instead.
|
444 |
-
*/
|
445 |
-
function is_main_settings_page( $show_opt_in_on_themes_page = false ) {
|
446 |
-
return $this->is_activation_page( $show_opt_in_on_themes_page );
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* Is user on product's admin activation page.
|
451 |
-
*
|
452 |
-
* @author Vova Feldman (@svovaf)
|
453 |
-
* @since 2.3.1
|
454 |
-
*
|
455 |
-
* @param bool $show_opt_in_on_themes_page Since 2.3.1
|
456 |
-
*
|
457 |
-
* @return bool
|
458 |
-
*/
|
459 |
-
function is_activation_page( $show_opt_in_on_themes_page = false ) {
|
460 |
-
if ( $show_opt_in_on_themes_page ) {
|
461 |
-
/**
|
462 |
-
* In activation only when show_optin query string param is given.
|
463 |
-
*
|
464 |
-
* @since 1.2.2
|
465 |
-
*/
|
466 |
-
return (
|
467 |
-
( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) &&
|
468 |
-
Freemius::is_themes_page() &&
|
469 |
-
fs_request_get_bool( $this->_module_unique_affix . '_show_optin' )
|
470 |
-
);
|
471 |
-
}
|
472 |
-
|
473 |
-
if ( $this->_menu_exists &&
|
474 |
-
( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
|
475 |
-
) {
|
476 |
-
/**
|
477 |
-
* Module has a settings menu and the context page is the main settings page, so assume it's in
|
478 |
-
* activation (doesn't really check if already opted-in/skipped or not).
|
479 |
-
*
|
480 |
-
* @since 1.2.2
|
481 |
-
*/
|
482 |
-
return true;
|
483 |
-
}
|
484 |
-
|
485 |
-
return false;
|
486 |
-
}
|
487 |
-
|
488 |
-
#region Submenu Override
|
489 |
-
|
490 |
-
/**
|
491 |
-
* Override submenu's action.
|
492 |
-
*
|
493 |
-
* @author Vova Feldman (@svovaf)
|
494 |
-
* @since 1.1.0
|
495 |
-
*
|
496 |
-
* @param string $parent_slug
|
497 |
-
* @param string $menu_slug
|
498 |
-
* @param callable $function
|
499 |
-
*
|
500 |
-
* @return false|string If submenu exist, will return the hook name.
|
501 |
-
*/
|
502 |
-
function override_submenu_action( $parent_slug, $menu_slug, $function ) {
|
503 |
-
global $submenu;
|
504 |
-
|
505 |
-
$menu_slug = plugin_basename( $menu_slug );
|
506 |
-
$parent_slug = plugin_basename( $parent_slug );
|
507 |
-
|
508 |
-
if ( ! isset( $submenu[ $parent_slug ] ) ) {
|
509 |
-
// Parent menu not exist.
|
510 |
-
return false;
|
511 |
-
}
|
512 |
-
|
513 |
-
$found_submenu_item = false;
|
514 |
-
foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
|
515 |
-
if ( $menu_slug === $submenu_item[2] ) {
|
516 |
-
$found_submenu_item = $submenu_item;
|
517 |
-
break;
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
-
if ( false === $found_submenu_item ) {
|
522 |
-
// Submenu item not found.
|
523 |
-
return false;
|
524 |
-
}
|
525 |
-
|
526 |
-
// Remove current function.
|
527 |
-
$hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
|
528 |
-
remove_all_actions( $hookname );
|
529 |
-
|
530 |
-
// Attach new action.
|
531 |
-
add_action( $hookname, $function );
|
532 |
-
|
533 |
-
return $hookname;
|
534 |
-
}
|
535 |
-
|
536 |
-
#endregion Submenu Override
|
537 |
-
|
538 |
-
#region Top level menu Override
|
539 |
-
|
540 |
-
/**
|
541 |
-
* Find plugin's admin dashboard main menu item.
|
542 |
-
*
|
543 |
-
* @author Vova Feldman (@svovaf)
|
544 |
-
* @since 1.0.2
|
545 |
-
*
|
546 |
-
* @return string[]|false
|
547 |
-
*/
|
548 |
-
private function find_top_level_menu() {
|
549 |
-
global $menu;
|
550 |
-
|
551 |
-
$position = - 1;
|
552 |
-
$found_menu = false;
|
553 |
-
|
554 |
-
$menu_slug = $this->get_raw_slug();
|
555 |
-
|
556 |
-
$hook_name = get_plugin_page_hookname( $menu_slug, '' );
|
557 |
-
foreach ( $menu as $pos => $m ) {
|
558 |
-
if ( $menu_slug === $m[2] ) {
|
559 |
-
$position = $pos;
|
560 |
-
$found_menu = $m;
|
561 |
-
break;
|
562 |
-
}
|
563 |
-
}
|
564 |
-
|
565 |
-
if ( false === $found_menu ) {
|
566 |
-
return false;
|
567 |
-
}
|
568 |
-
|
569 |
-
return array(
|
570 |
-
'menu' => $found_menu,
|
571 |
-
'position' => $position,
|
572 |
-
'hook_name' => $hook_name
|
573 |
-
);
|
574 |
-
}
|
575 |
-
|
576 |
-
/**
|
577 |
-
* Find plugin's admin dashboard main submenu item.
|
578 |
-
*
|
579 |
-
* @author Vova Feldman (@svovaf)
|
580 |
-
* @since 1.2.1.6
|
581 |
-
*
|
582 |
-
* @return array|false
|
583 |
-
*/
|
584 |
-
private function find_main_submenu() {
|
585 |
-
global $submenu;
|
586 |
-
|
587 |
-
$top_level_menu_slug = $this->get_top_level_menu_slug();
|
588 |
-
|
589 |
-
if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
|
590 |
-
return false;
|
591 |
-
}
|
592 |
-
|
593 |
-
$submenu_slug = $this->get_raw_slug();
|
594 |
-
|
595 |
-
$position = - 1;
|
596 |
-
$found_submenu = false;
|
597 |
-
|
598 |
-
$hook_name = get_plugin_page_hookname( $submenu_slug, '' );
|
599 |
-
|
600 |
-
foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
|
601 |
-
if ( $submenu_slug === $sub[2] ) {
|
602 |
-
$position = $pos;
|
603 |
-
$found_submenu = $sub;
|
604 |
-
}
|
605 |
-
}
|
606 |
-
|
607 |
-
if ( false === $found_submenu ) {
|
608 |
-
return false;
|
609 |
-
}
|
610 |
-
|
611 |
-
return array(
|
612 |
-
'menu' => $found_submenu,
|
613 |
-
'parent_slug' => $top_level_menu_slug,
|
614 |
-
'position' => $position,
|
615 |
-
'hook_name' => $hook_name
|
616 |
-
);
|
617 |
-
}
|
618 |
-
|
619 |
-
/**
|
620 |
-
* Remove all sub-menu items.
|
621 |
-
*
|
622 |
-
* @author Vova Feldman (@svovaf)
|
623 |
-
* @since 1.0.7
|
624 |
-
*
|
625 |
-
* @return bool If submenu with plugin's menu slug was found.
|
626 |
-
*/
|
627 |
-
private function remove_all_submenu_items() {
|
628 |
-
global $submenu;
|
629 |
-
|
630 |
-
$menu_slug = $this->get_raw_slug();
|
631 |
-
|
632 |
-
if ( ! isset( $submenu[ $menu_slug ] ) ) {
|
633 |
-
return false;
|
634 |
-
}
|
635 |
-
|
636 |
-
/**
|
637 |
-
* This method is NOT executed for WordPress.org themes.
|
638 |
-
* Since we maintain only one version of the SDK we added this small
|
639 |
-
* hack to avoid the error from Theme Check since it's a false-positive.
|
640 |
-
*
|
641 |
-
* @author Vova Feldman (@svovaf)
|
642 |
-
* @since 1.2.2.7
|
643 |
-
*/
|
644 |
-
$submenu_ref = &$submenu;
|
645 |
-
$submenu_ref[ $menu_slug ] = array();
|
646 |
-
|
647 |
-
return true;
|
648 |
-
}
|
649 |
-
|
650 |
-
/**
|
651 |
-
*
|
652 |
-
* @author Vova Feldman (@svovaf)
|
653 |
-
* @since 1.0.9
|
654 |
-
*
|
655 |
-
* @param bool $remove_top_level_menu
|
656 |
-
*
|
657 |
-
* @return false|array[string]mixed
|
658 |
-
*/
|
659 |
-
function remove_menu_item( $remove_top_level_menu = false ) {
|
660 |
-
$this->_logger->entrance();
|
661 |
-
|
662 |
-
// Find main menu item.
|
663 |
-
$top_level_menu = $this->find_top_level_menu();
|
664 |
-
|
665 |
-
if ( false === $top_level_menu ) {
|
666 |
-
return false;
|
667 |
-
}
|
668 |
-
|
669 |
-
// Remove it with its actions.
|
670 |
-
remove_all_actions( $top_level_menu['hook_name'] );
|
671 |
-
|
672 |
-
// Remove all submenu items.
|
673 |
-
$this->remove_all_submenu_items();
|
674 |
-
|
675 |
-
if ( $remove_top_level_menu ) {
|
676 |
-
global $menu;
|
677 |
-
unset( $menu[ $top_level_menu['position'] ] );
|
678 |
-
}
|
679 |
-
|
680 |
-
return $top_level_menu;
|
681 |
-
}
|
682 |
-
|
683 |
-
/**
|
684 |
-
* Get module's main admin setting page URL.
|
685 |
-
*
|
686 |
-
* @todo This method was only tested for wp.org compliant themes with a submenu item. Need to test for plugins with top level, submenu, and CPT top level, menu items.
|
687 |
-
*
|
688 |
-
* @author Vova Feldman (@svovaf)
|
689 |
-
* @since 1.2.2.7
|
690 |
-
*
|
691 |
-
* @return string
|
692 |
-
*/
|
693 |
-
function main_menu_url() {
|
694 |
-
$this->_logger->entrance();
|
695 |
-
|
696 |
-
if ( $this->_is_top_level ) {
|
697 |
-
$menu = $this->find_top_level_menu();
|
698 |
-
} else {
|
699 |
-
$menu = $this->find_main_submenu();
|
700 |
-
}
|
701 |
-
|
702 |
-
$parent_slug = isset( $menu['parent_slug'] ) ?
|
703 |
-
$menu['parent_slug'] :
|
704 |
-
'admin.php';
|
705 |
-
|
706 |
-
return admin_url( $parent_slug . '?page=' . $menu['menu'][2] );
|
707 |
-
}
|
708 |
-
|
709 |
-
/**
|
710 |
-
* @author Vova Feldman (@svovaf)
|
711 |
-
* @since 1.1.4
|
712 |
-
*
|
713 |
-
* @param callable $function
|
714 |
-
*
|
715 |
-
* @return false|array[string]mixed
|
716 |
-
*/
|
717 |
-
function override_menu_item( $function ) {
|
718 |
-
$found_menu = $this->remove_menu_item();
|
719 |
-
|
720 |
-
if ( false === $found_menu ) {
|
721 |
-
return false;
|
722 |
-
}
|
723 |
-
|
724 |
-
if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
|
725 |
-
$menu_slug = plugin_basename( $this->get_slug() );
|
726 |
-
|
727 |
-
$hookname = get_plugin_page_hookname( $menu_slug, '' );
|
728 |
-
|
729 |
-
// Override menu action.
|
730 |
-
add_action( $hookname, $function );
|
731 |
-
} else {
|
732 |
-
global $menu;
|
733 |
-
|
734 |
-
// Remove original CPT menu.
|
735 |
-
unset( $menu[ $found_menu['position'] ] );
|
736 |
-
|
737 |
-
// Create new top-level menu action.
|
738 |
-
$hookname = self::add_page(
|
739 |
-
$found_menu['menu'][3],
|
740 |
-
$found_menu['menu'][0],
|
741 |
-
'manage_options',
|
742 |
-
$this->get_slug(),
|
743 |
-
$function,
|
744 |
-
$found_menu['menu'][6],
|
745 |
-
$found_menu['position']
|
746 |
-
);
|
747 |
-
}
|
748 |
-
|
749 |
-
return $hookname;
|
750 |
-
}
|
751 |
-
|
752 |
-
/**
|
753 |
-
* Adds a counter to the module's top level menu item.
|
754 |
-
*
|
755 |
-
* @author Vova Feldman (@svovaf)
|
756 |
-
* @since 1.2.1.5
|
757 |
-
*
|
758 |
-
* @param int $counter
|
759 |
-
* @param string $class
|
760 |
-
*/
|
761 |
-
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
|
762 |
-
global $menu, $submenu;
|
763 |
-
|
764 |
-
$mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';
|
765 |
-
|
766 |
-
/**
|
767 |
-
* This method is NOT executed for WordPress.org themes.
|
768 |
-
* Since we maintain only one version of the SDK we added this small
|
769 |
-
* hack to avoid the error from Theme Check since it's a false-positive.
|
770 |
-
*
|
771 |
-
* @author Vova Feldman (@svovaf)
|
772 |
-
* @since 1.2.2.7
|
773 |
-
*/
|
774 |
-
$menu_ref = &$menu;
|
775 |
-
$submenu_ref = &$submenu;
|
776 |
-
|
777 |
-
if ( $this->_is_top_level ) {
|
778 |
-
// Find main menu item.
|
779 |
-
$found_menu = $this->find_top_level_menu();
|
780 |
-
|
781 |
-
if ( false !== $found_menu ) {
|
782 |
-
// Override menu label.
|
783 |
-
$menu_ref[ $found_menu['position'] ][0] = sprintf(
|
784 |
-
$mask,
|
785 |
-
$found_menu['menu'][0],
|
786 |
-
$class,
|
787 |
-
$counter
|
788 |
-
);
|
789 |
-
}
|
790 |
-
} else {
|
791 |
-
$found_submenu = $this->find_main_submenu();
|
792 |
-
|
793 |
-
if ( false !== $found_submenu ) {
|
794 |
-
// Override menu label.
|
795 |
-
$submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
|
796 |
-
$mask,
|
797 |
-
$found_submenu['menu'][0],
|
798 |
-
$class,
|
799 |
-
$counter
|
800 |
-
);
|
801 |
-
}
|
802 |
-
}
|
803 |
-
}
|
804 |
-
|
805 |
-
#endregion Top level menu Override
|
806 |
-
|
807 |
-
/**
|
808 |
-
* Add a top-level menu page.
|
809 |
-
*
|
810 |
-
* Note for WordPress.org Theme/Plugin reviewer:
|
811 |
-
*
|
812 |
-
* This is a replication of `add_menu_page()` to avoid Theme Check warning.
|
813 |
-
*
|
814 |
-
* Why?
|
815 |
-
* ====
|
816 |
-
* Freemius is an SDK for plugin and theme developers. Since the core
|
817 |
-
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
818 |
-
* we only develop and maintain one code base.
|
819 |
-
*
|
820 |
-
* This method will not run for wp.org themes (only plugins) since theme
|
821 |
-
* admin settings/options are now only allowed in the customizer.
|
822 |
-
*
|
823 |
-
* If you have any questions or need clarifications, please don't hesitate
|
824 |
-
* pinging me on slack, my username is @svovaf.
|
825 |
-
*
|
826 |
-
* @author Vova Feldman (@svovaf)
|
827 |
-
* @since 1.2.2
|
828 |
-
*
|
829 |
-
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
830 |
-
* selected.
|
831 |
-
* @param string $menu_title The text to be used for the menu.
|
832 |
-
* @param string $capability The capability required for this menu to be displayed to the user.
|
833 |
-
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
834 |
-
* @param callable|string $function The function to be called to output the content for this page.
|
835 |
-
* @param string $icon_url The URL to the icon to be used for this menu.
|
836 |
-
* * Pass a base64-encoded SVG using a data URI, which will be colored to
|
837 |
-
* match the color scheme. This should begin with
|
838 |
-
* 'data:image/svg+xml;base64,'.
|
839 |
-
* * Pass the name of a Dashicons helper class to use a font icon,
|
840 |
-
* e.g. 'dashicons-chart-pie'.
|
841 |
-
* * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
|
842 |
-
* via CSS.
|
843 |
-
* @param int $position The position in the menu order this one should appear.
|
844 |
-
*
|
845 |
-
* @return string The resulting page's hook_suffix.
|
846 |
-
*/
|
847 |
-
static function add_page(
|
848 |
-
$page_title,
|
849 |
-
$menu_title,
|
850 |
-
$capability,
|
851 |
-
$menu_slug,
|
852 |
-
$function = '',
|
853 |
-
$icon_url = '',
|
854 |
-
$position = null
|
855 |
-
) {
|
856 |
-
$fn = 'add_menu' . '_page';
|
857 |
-
|
858 |
-
return $fn(
|
859 |
-
$page_title,
|
860 |
-
$menu_title,
|
861 |
-
$capability,
|
862 |
-
$menu_slug,
|
863 |
-
$function,
|
864 |
-
$icon_url,
|
865 |
-
$position
|
866 |
-
);
|
867 |
-
}
|
868 |
-
|
869 |
-
/**
|
870 |
-
* Add page and update menu instance settings.
|
871 |
-
*
|
872 |
-
* @author Vova Feldman (@svovaf)
|
873 |
-
* @since 2.0.0
|
874 |
-
*
|
875 |
-
* @param string $page_title
|
876 |
-
* @param string $menu_title
|
877 |
-
* @param string $capability
|
878 |
-
* @param string $menu_slug
|
879 |
-
* @param callable|string $function
|
880 |
-
* @param string $icon_url
|
881 |
-
* @param int|null $position
|
882 |
-
*
|
883 |
-
* @return string
|
884 |
-
*/
|
885 |
-
function add_page_and_update(
|
886 |
-
$page_title,
|
887 |
-
$menu_title,
|
888 |
-
$capability,
|
889 |
-
$menu_slug,
|
890 |
-
$function = '',
|
891 |
-
$icon_url = '',
|
892 |
-
$position = null
|
893 |
-
) {
|
894 |
-
$this->_menu_slug = $menu_slug;
|
895 |
-
$this->_is_top_level = true;
|
896 |
-
$this->_menu_exists = true;
|
897 |
-
$this->_network_menu_exists = true;
|
898 |
-
|
899 |
-
return self::add_page(
|
900 |
-
$page_title,
|
901 |
-
$menu_title,
|
902 |
-
$capability,
|
903 |
-
$menu_slug,
|
904 |
-
$function,
|
905 |
-
$icon_url,
|
906 |
-
$position
|
907 |
-
);
|
908 |
-
}
|
909 |
-
|
910 |
-
/**
|
911 |
-
* Add a submenu page.
|
912 |
-
*
|
913 |
-
* Note for WordPress.org Theme/Plugin reviewer:
|
914 |
-
*
|
915 |
-
* This is a replication of `add_submenu_page()` to avoid Theme Check warning.
|
916 |
-
*
|
917 |
-
* Why?
|
918 |
-
* ====
|
919 |
-
* Freemius is an SDK for plugin and theme developers. Since the core
|
920 |
-
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
921 |
-
* we only develop and maintain one code base.
|
922 |
-
*
|
923 |
-
* This method will not run for wp.org themes (only plugins) since theme
|
924 |
-
* admin settings/options are now only allowed in the customizer.
|
925 |
-
*
|
926 |
-
* If you have any questions or need clarifications, please don't hesitate
|
927 |
-
* pinging me on slack, my username is @svovaf.
|
928 |
-
*
|
929 |
-
* @author Vova Feldman (@svovaf)
|
930 |
-
* @since 1.2.2
|
931 |
-
*
|
932 |
-
* @param string $parent_slug The slug name for the parent menu (or the file name of a standard
|
933 |
-
* WordPress admin page).
|
934 |
-
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
935 |
-
* selected.
|
936 |
-
* @param string $menu_title The text to be used for the menu.
|
937 |
-
* @param string $capability The capability required for this menu to be displayed to the user.
|
938 |
-
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
939 |
-
* @param callable|string $function The function to be called to output the content for this page.
|
940 |
-
*
|
941 |
-
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
|
942 |
-
* required.
|
943 |
-
*/
|
944 |
-
static function add_subpage(
|
945 |
-
$parent_slug,
|
946 |
-
$page_title,
|
947 |
-
$menu_title,
|
948 |
-
$capability,
|
949 |
-
$menu_slug,
|
950 |
-
$function = ''
|
951 |
-
) {
|
952 |
-
$fn = 'add_submenu' . '_page';
|
953 |
-
|
954 |
-
return $fn( $parent_slug,
|
955 |
-
$page_title,
|
956 |
-
$menu_title,
|
957 |
-
$capability,
|
958 |
-
$menu_slug,
|
959 |
-
$function
|
960 |
-
);
|
961 |
-
}
|
962 |
-
|
963 |
-
/**
|
964 |
-
* Add sub page and update menu instance settings.
|
965 |
-
*
|
966 |
-
* @author Vova Feldman (@svovaf)
|
967 |
-
* @since 2.0.0
|
968 |
-
*
|
969 |
-
* @param string $parent_slug
|
970 |
-
* @param string $page_title
|
971 |
-
* @param string $menu_title
|
972 |
-
* @param string $capability
|
973 |
-
* @param string $menu_slug
|
974 |
-
* @param callable|string $function
|
975 |
-
*
|
976 |
-
* @return string
|
977 |
-
*/
|
978 |
-
function add_subpage_and_update(
|
979 |
-
$parent_slug,
|
980 |
-
$page_title,
|
981 |
-
$menu_title,
|
982 |
-
$capability,
|
983 |
-
$menu_slug,
|
984 |
-
$function = ''
|
985 |
-
) {
|
986 |
-
$this->_menu_slug = $menu_slug;
|
987 |
-
$this->_parent_slug = $parent_slug;
|
988 |
-
$this->_is_top_level = false;
|
989 |
-
$this->_menu_exists = true;
|
990 |
-
$this->_network_menu_exists = true;
|
991 |
-
|
992 |
-
return self::add_subpage(
|
993 |
-
$parent_slug,
|
994 |
-
$page_title,
|
995 |
-
$menu_title,
|
996 |
-
$capability,
|
997 |
-
$menu_slug,
|
998 |
-
$function
|
999 |
-
);
|
1000 |
-
}
|
1001 |
}
|
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.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Admin_Menu_Manager {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @since 1.2.2
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
protected $_module_unique_affix;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @since 1.2.2
|
26 |
+
*
|
27 |
+
* @var number
|
28 |
+
*/
|
29 |
+
protected $_module_id;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @since 1.2.2
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
protected $_module_type;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @since 1.0.6
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
private $_menu_slug;
|
44 |
+
/**
|
45 |
+
* @since 1.1.3
|
46 |
+
*
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
private $_parent_slug;
|
50 |
+
/**
|
51 |
+
* @since 1.1.3
|
52 |
+
*
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
private $_parent_type;
|
56 |
+
/**
|
57 |
+
* @since 1.1.3
|
58 |
+
*
|
59 |
+
* @var string
|
60 |
+
*/
|
61 |
+
private $_type;
|
62 |
+
/**
|
63 |
+
* @since 1.1.3
|
64 |
+
*
|
65 |
+
* @var bool
|
66 |
+
*/
|
67 |
+
private $_is_top_level;
|
68 |
+
/**
|
69 |
+
* @since 1.1.3
|
70 |
+
*
|
71 |
+
* @var bool
|
72 |
+
*/
|
73 |
+
private $_is_override_exact;
|
74 |
+
/**
|
75 |
+
* @since 1.1.3
|
76 |
+
*
|
77 |
+
* @var array<string,bool>
|
78 |
+
*/
|
79 |
+
private $_default_submenu_items;
|
80 |
+
/**
|
81 |
+
* @since 1.1.3
|
82 |
+
*
|
83 |
+
* @var string
|
84 |
+
*/
|
85 |
+
private $_first_time_path;
|
86 |
+
/**
|
87 |
+
* @since 1.2.2
|
88 |
+
*
|
89 |
+
* @var bool
|
90 |
+
*/
|
91 |
+
private $_menu_exists;
|
92 |
+
/**
|
93 |
+
* @since 2.0.0
|
94 |
+
*
|
95 |
+
* @var bool
|
96 |
+
*/
|
97 |
+
private $_network_menu_exists;
|
98 |
+
|
99 |
+
#endregion Properties
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @var FS_Logger
|
103 |
+
*/
|
104 |
+
protected $_logger;
|
105 |
+
|
106 |
+
#region Singleton
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @var FS_Admin_Menu_Manager[]
|
110 |
+
*/
|
111 |
+
private static $_instances = array();
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @param number $module_id
|
115 |
+
* @param string $module_type
|
116 |
+
* @param string $module_unique_affix
|
117 |
+
*
|
118 |
+
* @return FS_Admin_Menu_Manager
|
119 |
+
*/
|
120 |
+
static function instance( $module_id, $module_type, $module_unique_affix ) {
|
121 |
+
$key = 'm_' . $module_id;
|
122 |
+
|
123 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
124 |
+
self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
|
125 |
+
}
|
126 |
+
|
127 |
+
return self::$_instances[ $key ];
|
128 |
+
}
|
129 |
+
|
130 |
+
protected function __construct( $module_id, $module_type, $module_unique_affix ) {
|
131 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
132 |
+
|
133 |
+
$this->_module_id = $module_id;
|
134 |
+
$this->_module_type = $module_type;
|
135 |
+
$this->_module_unique_affix = $module_unique_affix;
|
136 |
+
}
|
137 |
+
|
138 |
+
#endregion Singleton
|
139 |
+
|
140 |
+
#region Helpers
|
141 |
+
|
142 |
+
private function get_option( &$options, $key, $default = false ) {
|
143 |
+
return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
|
144 |
+
}
|
145 |
+
|
146 |
+
private function get_bool_option( &$options, $key, $default = false ) {
|
147 |
+
return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
|
148 |
+
}
|
149 |
+
|
150 |
+
#endregion Helpers
|
151 |
+
|
152 |
+
/**
|
153 |
+
* @param array $menu
|
154 |
+
* @param bool $is_addon
|
155 |
+
*/
|
156 |
+
function init( $menu, $is_addon = false ) {
|
157 |
+
$this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
|
158 |
+
$this->_network_menu_exists = ( ! empty( $menu['network'] ) && true === $menu['network'] );
|
159 |
+
|
160 |
+
$this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
|
161 |
+
|
162 |
+
$this->_default_submenu_items = array();
|
163 |
+
// @deprecated
|
164 |
+
$this->_type = 'page';
|
165 |
+
$this->_is_top_level = true;
|
166 |
+
$this->_is_override_exact = false;
|
167 |
+
$this->_parent_slug = false;
|
168 |
+
// @deprecated
|
169 |
+
$this->_parent_type = 'page';
|
170 |
+
|
171 |
+
if ( isset( $menu ) ) {
|
172 |
+
if ( ! $is_addon ) {
|
173 |
+
$this->_default_submenu_items = array(
|
174 |
+
'contact' => $this->get_bool_option( $menu, 'contact', true ),
|
175 |
+
'support' => $this->get_bool_option( $menu, 'support', true ),
|
176 |
+
'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
|
177 |
+
'account' => $this->get_bool_option( $menu, 'account', true ),
|
178 |
+
'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
|
179 |
+
'addons' => $this->get_bool_option( $menu, 'addons', true ),
|
180 |
+
);
|
181 |
+
|
182 |
+
// @deprecated
|
183 |
+
$this->_type = $this->get_option( $menu, 'type', 'page' );
|
184 |
+
}
|
185 |
+
|
186 |
+
$this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
|
187 |
+
|
188 |
+
if ( isset( $menu['parent'] ) ) {
|
189 |
+
$this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
|
190 |
+
// @deprecated
|
191 |
+
$this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
|
192 |
+
|
193 |
+
// If parent's slug is different, then it's NOT a top level menu item.
|
194 |
+
$this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
|
195 |
+
} else {
|
196 |
+
/**
|
197 |
+
* If no parent then top level if:
|
198 |
+
* - Has custom admin menu ('page')
|
199 |
+
* - CPT menu type ('cpt')
|
200 |
+
*/
|
201 |
+
// $this->_is_top_level = in_array( $this->_type, array(
|
202 |
+
// 'cpt',
|
203 |
+
// 'page'
|
204 |
+
// ) );
|
205 |
+
}
|
206 |
+
|
207 |
+
$first_path = $this->get_option( $menu, 'first-path', false );
|
208 |
+
|
209 |
+
if ( ! empty( $first_path ) && is_string( $first_path ) ) {
|
210 |
+
$this->_first_time_path = $first_path;
|
211 |
+
}
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Check if top level menu.
|
217 |
+
*
|
218 |
+
* @author Vova Feldman (@svovaf)
|
219 |
+
* @since 1.1.3
|
220 |
+
*
|
221 |
+
* @return bool False if submenu item.
|
222 |
+
*/
|
223 |
+
function is_top_level() {
|
224 |
+
return $this->_is_top_level;
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Check if the page should be override on exact URL match.
|
229 |
+
*
|
230 |
+
* @author Vova Feldman (@svovaf)
|
231 |
+
* @since 1.1.3
|
232 |
+
*
|
233 |
+
* @return bool False if submenu item.
|
234 |
+
*/
|
235 |
+
function is_override_exact() {
|
236 |
+
return $this->_is_override_exact;
|
237 |
+
}
|
238 |
+
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Get the path of the page the user should be forwarded to after first activation.
|
242 |
+
*
|
243 |
+
* @author Vova Feldman (@svovaf)
|
244 |
+
* @since 1.1.3
|
245 |
+
*
|
246 |
+
* @param bool $is_network Since 2.4.5
|
247 |
+
*
|
248 |
+
* @return string
|
249 |
+
*/
|
250 |
+
function get_first_time_path( $is_network = false ) {
|
251 |
+
if ( empty ( $this->_first_time_path ) ) {
|
252 |
+
return $this->_first_time_path;
|
253 |
+
}
|
254 |
+
|
255 |
+
if ( $is_network ) {
|
256 |
+
return network_admin_url( $this->_first_time_path );
|
257 |
+
} else {
|
258 |
+
return admin_url( $this->_first_time_path );
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Check if plugin's menu item is part of a custom top level menu.
|
264 |
+
*
|
265 |
+
* @author Vova Feldman (@svovaf)
|
266 |
+
* @since 1.1.3
|
267 |
+
*
|
268 |
+
* @return bool
|
269 |
+
*/
|
270 |
+
function has_custom_parent() {
|
271 |
+
return ! $this->_is_top_level && is_string( $this->_parent_slug );
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* @author Leo Fajardo (@leorw)
|
276 |
+
* @since 1.2.2
|
277 |
+
*
|
278 |
+
* @return bool
|
279 |
+
*/
|
280 |
+
function has_menu() {
|
281 |
+
return $this->_menu_exists;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* @author Vova Feldman (@svovaf)
|
286 |
+
* @since 2.0.0
|
287 |
+
*
|
288 |
+
* @return bool
|
289 |
+
*/
|
290 |
+
function has_network_menu() {
|
291 |
+
return $this->_network_menu_exists;
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* @author Leo Fajardo (@leorw)
|
296 |
+
*
|
297 |
+
* @param string $menu_slug
|
298 |
+
*
|
299 |
+
* @since 2.1.3
|
300 |
+
*/
|
301 |
+
function set_slug_and_network_menu_exists_flag($menu_slug ) {
|
302 |
+
$this->_menu_slug = $menu_slug;
|
303 |
+
$this->_network_menu_exists = false;
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* @author Vova Feldman (@svovaf)
|
308 |
+
* @since 1.1.3
|
309 |
+
*
|
310 |
+
* @param string $id
|
311 |
+
* @param bool $default
|
312 |
+
* @param bool $ignore_menu_existence Since 1.2.2.7 If true, check if the submenu item visible even if there's no parent menu.
|
313 |
+
*
|
314 |
+
* @return bool
|
315 |
+
*/
|
316 |
+
function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
|
317 |
+
if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
|
318 |
+
return false;
|
319 |
+
}
|
320 |
+
|
321 |
+
return fs_apply_filter(
|
322 |
+
$this->_module_unique_affix,
|
323 |
+
'is_submenu_visible',
|
324 |
+
$this->get_bool_option( $this->_default_submenu_items, $id, $default ),
|
325 |
+
$id
|
326 |
+
);
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Calculates admin settings menu slug.
|
331 |
+
* If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
|
332 |
+
*
|
333 |
+
* @author Vova Feldman (@svovaf)
|
334 |
+
* @since 1.1.3
|
335 |
+
*
|
336 |
+
* @param string $page
|
337 |
+
*
|
338 |
+
* @return string
|
339 |
+
*/
|
340 |
+
function get_slug( $page = '' ) {
|
341 |
+
return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
|
342 |
+
$this->_menu_slug :
|
343 |
+
$this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* @author Vova Feldman (@svovaf)
|
348 |
+
* @since 1.1.3
|
349 |
+
*
|
350 |
+
* @return string
|
351 |
+
*/
|
352 |
+
function get_parent_slug() {
|
353 |
+
return $this->_parent_slug;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* @author Vova Feldman (@svovaf)
|
358 |
+
* @since 1.1.3
|
359 |
+
*
|
360 |
+
* @return string
|
361 |
+
*/
|
362 |
+
function get_type() {
|
363 |
+
return $this->_type;
|
364 |
+
}
|
365 |
+
|
366 |
+
/**
|
367 |
+
* @author Vova Feldman (@svovaf)
|
368 |
+
* @since 1.1.3
|
369 |
+
*
|
370 |
+
* @return bool
|
371 |
+
*/
|
372 |
+
function is_cpt() {
|
373 |
+
return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
|
374 |
+
// Back compatibility.
|
375 |
+
'cpt' === $this->_type
|
376 |
+
);
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* @author Vova Feldman (@svovaf)
|
381 |
+
* @since 1.1.3
|
382 |
+
*
|
383 |
+
* @return string
|
384 |
+
*/
|
385 |
+
function get_parent_type() {
|
386 |
+
return $this->_parent_type;
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* @author Vova Feldman (@svovaf)
|
391 |
+
* @since 1.1.3
|
392 |
+
*
|
393 |
+
* @return string
|
394 |
+
*/
|
395 |
+
function get_raw_slug() {
|
396 |
+
return $this->_menu_slug;
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Get plugin's original menu slug.
|
401 |
+
*
|
402 |
+
* @author Vova Feldman (@svovaf)
|
403 |
+
* @since 1.1.3
|
404 |
+
*
|
405 |
+
* @return string
|
406 |
+
*/
|
407 |
+
function get_original_menu_slug() {
|
408 |
+
if ( 'cpt' === $this->_type ) {
|
409 |
+
return add_query_arg( array(
|
410 |
+
'post_type' => $this->_menu_slug
|
411 |
+
), 'edit.php' );
|
412 |
+
}
|
413 |
+
|
414 |
+
if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
|
415 |
+
return $this->_menu_slug;
|
416 |
+
} else {
|
417 |
+
return $this->_module_unique_affix;
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* @author Vova Feldman (@svovaf)
|
423 |
+
* @since 1.1.3
|
424 |
+
*
|
425 |
+
* @return string
|
426 |
+
*/
|
427 |
+
function get_top_level_menu_slug() {
|
428 |
+
return $this->has_custom_parent() ?
|
429 |
+
$this->get_parent_slug() :
|
430 |
+
$this->get_raw_slug();
|
431 |
+
}
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Is user on plugin's admin activation page.
|
435 |
+
*
|
436 |
+
* @author Vova Feldman (@svovaf)
|
437 |
+
* @since 1.0.8
|
438 |
+
*
|
439 |
+
* @param bool $show_opt_in_on_themes_page Since 2.3.1
|
440 |
+
*
|
441 |
+
* @return bool
|
442 |
+
*
|
443 |
+
* @deprecated Please use is_activation_page() instead.
|
444 |
+
*/
|
445 |
+
function is_main_settings_page( $show_opt_in_on_themes_page = false ) {
|
446 |
+
return $this->is_activation_page( $show_opt_in_on_themes_page );
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Is user on product's admin activation page.
|
451 |
+
*
|
452 |
+
* @author Vova Feldman (@svovaf)
|
453 |
+
* @since 2.3.1
|
454 |
+
*
|
455 |
+
* @param bool $show_opt_in_on_themes_page Since 2.3.1
|
456 |
+
*
|
457 |
+
* @return bool
|
458 |
+
*/
|
459 |
+
function is_activation_page( $show_opt_in_on_themes_page = false ) {
|
460 |
+
if ( $show_opt_in_on_themes_page ) {
|
461 |
+
/**
|
462 |
+
* In activation only when show_optin query string param is given.
|
463 |
+
*
|
464 |
+
* @since 1.2.2
|
465 |
+
*/
|
466 |
+
return (
|
467 |
+
( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) &&
|
468 |
+
Freemius::is_themes_page() &&
|
469 |
+
fs_request_get_bool( $this->_module_unique_affix . '_show_optin' )
|
470 |
+
);
|
471 |
+
}
|
472 |
+
|
473 |
+
if ( $this->_menu_exists &&
|
474 |
+
( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
|
475 |
+
) {
|
476 |
+
/**
|
477 |
+
* Module has a settings menu and the context page is the main settings page, so assume it's in
|
478 |
+
* activation (doesn't really check if already opted-in/skipped or not).
|
479 |
+
*
|
480 |
+
* @since 1.2.2
|
481 |
+
*/
|
482 |
+
return true;
|
483 |
+
}
|
484 |
+
|
485 |
+
return false;
|
486 |
+
}
|
487 |
+
|
488 |
+
#region Submenu Override
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Override submenu's action.
|
492 |
+
*
|
493 |
+
* @author Vova Feldman (@svovaf)
|
494 |
+
* @since 1.1.0
|
495 |
+
*
|
496 |
+
* @param string $parent_slug
|
497 |
+
* @param string $menu_slug
|
498 |
+
* @param callable $function
|
499 |
+
*
|
500 |
+
* @return false|string If submenu exist, will return the hook name.
|
501 |
+
*/
|
502 |
+
function override_submenu_action( $parent_slug, $menu_slug, $function ) {
|
503 |
+
global $submenu;
|
504 |
+
|
505 |
+
$menu_slug = plugin_basename( $menu_slug );
|
506 |
+
$parent_slug = plugin_basename( $parent_slug );
|
507 |
+
|
508 |
+
if ( ! isset( $submenu[ $parent_slug ] ) ) {
|
509 |
+
// Parent menu not exist.
|
510 |
+
return false;
|
511 |
+
}
|
512 |
+
|
513 |
+
$found_submenu_item = false;
|
514 |
+
foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
|
515 |
+
if ( $menu_slug === $submenu_item[2] ) {
|
516 |
+
$found_submenu_item = $submenu_item;
|
517 |
+
break;
|
518 |
+
}
|
519 |
+
}
|
520 |
+
|
521 |
+
if ( false === $found_submenu_item ) {
|
522 |
+
// Submenu item not found.
|
523 |
+
return false;
|
524 |
+
}
|
525 |
+
|
526 |
+
// Remove current function.
|
527 |
+
$hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
|
528 |
+
remove_all_actions( $hookname );
|
529 |
+
|
530 |
+
// Attach new action.
|
531 |
+
add_action( $hookname, $function );
|
532 |
+
|
533 |
+
return $hookname;
|
534 |
+
}
|
535 |
+
|
536 |
+
#endregion Submenu Override
|
537 |
+
|
538 |
+
#region Top level menu Override
|
539 |
+
|
540 |
+
/**
|
541 |
+
* Find plugin's admin dashboard main menu item.
|
542 |
+
*
|
543 |
+
* @author Vova Feldman (@svovaf)
|
544 |
+
* @since 1.0.2
|
545 |
+
*
|
546 |
+
* @return string[]|false
|
547 |
+
*/
|
548 |
+
private function find_top_level_menu() {
|
549 |
+
global $menu;
|
550 |
+
|
551 |
+
$position = - 1;
|
552 |
+
$found_menu = false;
|
553 |
+
|
554 |
+
$menu_slug = $this->get_raw_slug();
|
555 |
+
|
556 |
+
$hook_name = get_plugin_page_hookname( $menu_slug, '' );
|
557 |
+
foreach ( $menu as $pos => $m ) {
|
558 |
+
if ( $menu_slug === $m[2] ) {
|
559 |
+
$position = $pos;
|
560 |
+
$found_menu = $m;
|
561 |
+
break;
|
562 |
+
}
|
563 |
+
}
|
564 |
+
|
565 |
+
if ( false === $found_menu ) {
|
566 |
+
return false;
|
567 |
+
}
|
568 |
+
|
569 |
+
return array(
|
570 |
+
'menu' => $found_menu,
|
571 |
+
'position' => $position,
|
572 |
+
'hook_name' => $hook_name
|
573 |
+
);
|
574 |
+
}
|
575 |
+
|
576 |
+
/**
|
577 |
+
* Find plugin's admin dashboard main submenu item.
|
578 |
+
*
|
579 |
+
* @author Vova Feldman (@svovaf)
|
580 |
+
* @since 1.2.1.6
|
581 |
+
*
|
582 |
+
* @return array|false
|
583 |
+
*/
|
584 |
+
private function find_main_submenu() {
|
585 |
+
global $submenu;
|
586 |
+
|
587 |
+
$top_level_menu_slug = $this->get_top_level_menu_slug();
|
588 |
+
|
589 |
+
if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
|
590 |
+
return false;
|
591 |
+
}
|
592 |
+
|
593 |
+
$submenu_slug = $this->get_raw_slug();
|
594 |
+
|
595 |
+
$position = - 1;
|
596 |
+
$found_submenu = false;
|
597 |
+
|
598 |
+
$hook_name = get_plugin_page_hookname( $submenu_slug, '' );
|
599 |
+
|
600 |
+
foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
|
601 |
+
if ( $submenu_slug === $sub[2] ) {
|
602 |
+
$position = $pos;
|
603 |
+
$found_submenu = $sub;
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
if ( false === $found_submenu ) {
|
608 |
+
return false;
|
609 |
+
}
|
610 |
+
|
611 |
+
return array(
|
612 |
+
'menu' => $found_submenu,
|
613 |
+
'parent_slug' => $top_level_menu_slug,
|
614 |
+
'position' => $position,
|
615 |
+
'hook_name' => $hook_name
|
616 |
+
);
|
617 |
+
}
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Remove all sub-menu items.
|
621 |
+
*
|
622 |
+
* @author Vova Feldman (@svovaf)
|
623 |
+
* @since 1.0.7
|
624 |
+
*
|
625 |
+
* @return bool If submenu with plugin's menu slug was found.
|
626 |
+
*/
|
627 |
+
private function remove_all_submenu_items() {
|
628 |
+
global $submenu;
|
629 |
+
|
630 |
+
$menu_slug = $this->get_raw_slug();
|
631 |
+
|
632 |
+
if ( ! isset( $submenu[ $menu_slug ] ) ) {
|
633 |
+
return false;
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* This method is NOT executed for WordPress.org themes.
|
638 |
+
* Since we maintain only one version of the SDK we added this small
|
639 |
+
* hack to avoid the error from Theme Check since it's a false-positive.
|
640 |
+
*
|
641 |
+
* @author Vova Feldman (@svovaf)
|
642 |
+
* @since 1.2.2.7
|
643 |
+
*/
|
644 |
+
$submenu_ref = &$submenu;
|
645 |
+
$submenu_ref[ $menu_slug ] = array();
|
646 |
+
|
647 |
+
return true;
|
648 |
+
}
|
649 |
+
|
650 |
+
/**
|
651 |
+
*
|
652 |
+
* @author Vova Feldman (@svovaf)
|
653 |
+
* @since 1.0.9
|
654 |
+
*
|
655 |
+
* @param bool $remove_top_level_menu
|
656 |
+
*
|
657 |
+
* @return false|array[string]mixed
|
658 |
+
*/
|
659 |
+
function remove_menu_item( $remove_top_level_menu = false ) {
|
660 |
+
$this->_logger->entrance();
|
661 |
+
|
662 |
+
// Find main menu item.
|
663 |
+
$top_level_menu = $this->find_top_level_menu();
|
664 |
+
|
665 |
+
if ( false === $top_level_menu ) {
|
666 |
+
return false;
|
667 |
+
}
|
668 |
+
|
669 |
+
// Remove it with its actions.
|
670 |
+
remove_all_actions( $top_level_menu['hook_name'] );
|
671 |
+
|
672 |
+
// Remove all submenu items.
|
673 |
+
$this->remove_all_submenu_items();
|
674 |
+
|
675 |
+
if ( $remove_top_level_menu ) {
|
676 |
+
global $menu;
|
677 |
+
unset( $menu[ $top_level_menu['position'] ] );
|
678 |
+
}
|
679 |
+
|
680 |
+
return $top_level_menu;
|
681 |
+
}
|
682 |
+
|
683 |
+
/**
|
684 |
+
* Get module's main admin setting page URL.
|
685 |
+
*
|
686 |
+
* @todo This method was only tested for wp.org compliant themes with a submenu item. Need to test for plugins with top level, submenu, and CPT top level, menu items.
|
687 |
+
*
|
688 |
+
* @author Vova Feldman (@svovaf)
|
689 |
+
* @since 1.2.2.7
|
690 |
+
*
|
691 |
+
* @return string
|
692 |
+
*/
|
693 |
+
function main_menu_url() {
|
694 |
+
$this->_logger->entrance();
|
695 |
+
|
696 |
+
if ( $this->_is_top_level ) {
|
697 |
+
$menu = $this->find_top_level_menu();
|
698 |
+
} else {
|
699 |
+
$menu = $this->find_main_submenu();
|
700 |
+
}
|
701 |
+
|
702 |
+
$parent_slug = isset( $menu['parent_slug'] ) ?
|
703 |
+
$menu['parent_slug'] :
|
704 |
+
'admin.php';
|
705 |
+
|
706 |
+
return admin_url( $parent_slug . '?page=' . $menu['menu'][2] );
|
707 |
+
}
|
708 |
+
|
709 |
+
/**
|
710 |
+
* @author Vova Feldman (@svovaf)
|
711 |
+
* @since 1.1.4
|
712 |
+
*
|
713 |
+
* @param callable $function
|
714 |
+
*
|
715 |
+
* @return false|array[string]mixed
|
716 |
+
*/
|
717 |
+
function override_menu_item( $function ) {
|
718 |
+
$found_menu = $this->remove_menu_item();
|
719 |
+
|
720 |
+
if ( false === $found_menu ) {
|
721 |
+
return false;
|
722 |
+
}
|
723 |
+
|
724 |
+
if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
|
725 |
+
$menu_slug = plugin_basename( $this->get_slug() );
|
726 |
+
|
727 |
+
$hookname = get_plugin_page_hookname( $menu_slug, '' );
|
728 |
+
|
729 |
+
// Override menu action.
|
730 |
+
add_action( $hookname, $function );
|
731 |
+
} else {
|
732 |
+
global $menu;
|
733 |
+
|
734 |
+
// Remove original CPT menu.
|
735 |
+
unset( $menu[ $found_menu['position'] ] );
|
736 |
+
|
737 |
+
// Create new top-level menu action.
|
738 |
+
$hookname = self::add_page(
|
739 |
+
$found_menu['menu'][3],
|
740 |
+
$found_menu['menu'][0],
|
741 |
+
'manage_options',
|
742 |
+
$this->get_slug(),
|
743 |
+
$function,
|
744 |
+
$found_menu['menu'][6],
|
745 |
+
$found_menu['position']
|
746 |
+
);
|
747 |
+
}
|
748 |
+
|
749 |
+
return $hookname;
|
750 |
+
}
|
751 |
+
|
752 |
+
/**
|
753 |
+
* Adds a counter to the module's top level menu item.
|
754 |
+
*
|
755 |
+
* @author Vova Feldman (@svovaf)
|
756 |
+
* @since 1.2.1.5
|
757 |
+
*
|
758 |
+
* @param int $counter
|
759 |
+
* @param string $class
|
760 |
+
*/
|
761 |
+
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
|
762 |
+
global $menu, $submenu;
|
763 |
+
|
764 |
+
$mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';
|
765 |
+
|
766 |
+
/**
|
767 |
+
* This method is NOT executed for WordPress.org themes.
|
768 |
+
* Since we maintain only one version of the SDK we added this small
|
769 |
+
* hack to avoid the error from Theme Check since it's a false-positive.
|
770 |
+
*
|
771 |
+
* @author Vova Feldman (@svovaf)
|
772 |
+
* @since 1.2.2.7
|
773 |
+
*/
|
774 |
+
$menu_ref = &$menu;
|
775 |
+
$submenu_ref = &$submenu;
|
776 |
+
|
777 |
+
if ( $this->_is_top_level ) {
|
778 |
+
// Find main menu item.
|
779 |
+
$found_menu = $this->find_top_level_menu();
|
780 |
+
|
781 |
+
if ( false !== $found_menu ) {
|
782 |
+
// Override menu label.
|
783 |
+
$menu_ref[ $found_menu['position'] ][0] = sprintf(
|
784 |
+
$mask,
|
785 |
+
$found_menu['menu'][0],
|
786 |
+
$class,
|
787 |
+
$counter
|
788 |
+
);
|
789 |
+
}
|
790 |
+
} else {
|
791 |
+
$found_submenu = $this->find_main_submenu();
|
792 |
+
|
793 |
+
if ( false !== $found_submenu ) {
|
794 |
+
// Override menu label.
|
795 |
+
$submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
|
796 |
+
$mask,
|
797 |
+
$found_submenu['menu'][0],
|
798 |
+
$class,
|
799 |
+
$counter
|
800 |
+
);
|
801 |
+
}
|
802 |
+
}
|
803 |
+
}
|
804 |
+
|
805 |
+
#endregion Top level menu Override
|
806 |
+
|
807 |
+
/**
|
808 |
+
* Add a top-level menu page.
|
809 |
+
*
|
810 |
+
* Note for WordPress.org Theme/Plugin reviewer:
|
811 |
+
*
|
812 |
+
* This is a replication of `add_menu_page()` to avoid Theme Check warning.
|
813 |
+
*
|
814 |
+
* Why?
|
815 |
+
* ====
|
816 |
+
* Freemius is an SDK for plugin and theme developers. Since the core
|
817 |
+
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
818 |
+
* we only develop and maintain one code base.
|
819 |
+
*
|
820 |
+
* This method will not run for wp.org themes (only plugins) since theme
|
821 |
+
* admin settings/options are now only allowed in the customizer.
|
822 |
+
*
|
823 |
+
* If you have any questions or need clarifications, please don't hesitate
|
824 |
+
* pinging me on slack, my username is @svovaf.
|
825 |
+
*
|
826 |
+
* @author Vova Feldman (@svovaf)
|
827 |
+
* @since 1.2.2
|
828 |
+
*
|
829 |
+
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
830 |
+
* selected.
|
831 |
+
* @param string $menu_title The text to be used for the menu.
|
832 |
+
* @param string $capability The capability required for this menu to be displayed to the user.
|
833 |
+
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
834 |
+
* @param callable|string $function The function to be called to output the content for this page.
|
835 |
+
* @param string $icon_url The URL to the icon to be used for this menu.
|
836 |
+
* * Pass a base64-encoded SVG using a data URI, which will be colored to
|
837 |
+
* match the color scheme. This should begin with
|
838 |
+
* 'data:image/svg+xml;base64,'.
|
839 |
+
* * Pass the name of a Dashicons helper class to use a font icon,
|
840 |
+
* e.g. 'dashicons-chart-pie'.
|
841 |
+
* * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
|
842 |
+
* via CSS.
|
843 |
+
* @param int $position The position in the menu order this one should appear.
|
844 |
+
*
|
845 |
+
* @return string The resulting page's hook_suffix.
|
846 |
+
*/
|
847 |
+
static function add_page(
|
848 |
+
$page_title,
|
849 |
+
$menu_title,
|
850 |
+
$capability,
|
851 |
+
$menu_slug,
|
852 |
+
$function = '',
|
853 |
+
$icon_url = '',
|
854 |
+
$position = null
|
855 |
+
) {
|
856 |
+
$fn = 'add_menu' . '_page';
|
857 |
+
|
858 |
+
return $fn(
|
859 |
+
$page_title,
|
860 |
+
$menu_title,
|
861 |
+
$capability,
|
862 |
+
$menu_slug,
|
863 |
+
$function,
|
864 |
+
$icon_url,
|
865 |
+
$position
|
866 |
+
);
|
867 |
+
}
|
868 |
+
|
869 |
+
/**
|
870 |
+
* Add page and update menu instance settings.
|
871 |
+
*
|
872 |
+
* @author Vova Feldman (@svovaf)
|
873 |
+
* @since 2.0.0
|
874 |
+
*
|
875 |
+
* @param string $page_title
|
876 |
+
* @param string $menu_title
|
877 |
+
* @param string $capability
|
878 |
+
* @param string $menu_slug
|
879 |
+
* @param callable|string $function
|
880 |
+
* @param string $icon_url
|
881 |
+
* @param int|null $position
|
882 |
+
*
|
883 |
+
* @return string
|
884 |
+
*/
|
885 |
+
function add_page_and_update(
|
886 |
+
$page_title,
|
887 |
+
$menu_title,
|
888 |
+
$capability,
|
889 |
+
$menu_slug,
|
890 |
+
$function = '',
|
891 |
+
$icon_url = '',
|
892 |
+
$position = null
|
893 |
+
) {
|
894 |
+
$this->_menu_slug = $menu_slug;
|
895 |
+
$this->_is_top_level = true;
|
896 |
+
$this->_menu_exists = true;
|
897 |
+
$this->_network_menu_exists = true;
|
898 |
+
|
899 |
+
return self::add_page(
|
900 |
+
$page_title,
|
901 |
+
$menu_title,
|
902 |
+
$capability,
|
903 |
+
$menu_slug,
|
904 |
+
$function,
|
905 |
+
$icon_url,
|
906 |
+
$position
|
907 |
+
);
|
908 |
+
}
|
909 |
+
|
910 |
+
/**
|
911 |
+
* Add a submenu page.
|
912 |
+
*
|
913 |
+
* Note for WordPress.org Theme/Plugin reviewer:
|
914 |
+
*
|
915 |
+
* This is a replication of `add_submenu_page()` to avoid Theme Check warning.
|
916 |
+
*
|
917 |
+
* Why?
|
918 |
+
* ====
|
919 |
+
* Freemius is an SDK for plugin and theme developers. Since the core
|
920 |
+
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
921 |
+
* we only develop and maintain one code base.
|
922 |
+
*
|
923 |
+
* This method will not run for wp.org themes (only plugins) since theme
|
924 |
+
* admin settings/options are now only allowed in the customizer.
|
925 |
+
*
|
926 |
+
* If you have any questions or need clarifications, please don't hesitate
|
927 |
+
* pinging me on slack, my username is @svovaf.
|
928 |
+
*
|
929 |
+
* @author Vova Feldman (@svovaf)
|
930 |
+
* @since 1.2.2
|
931 |
+
*
|
932 |
+
* @param string $parent_slug The slug name for the parent menu (or the file name of a standard
|
933 |
+
* WordPress admin page).
|
934 |
+
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
935 |
+
* selected.
|
936 |
+
* @param string $menu_title The text to be used for the menu.
|
937 |
+
* @param string $capability The capability required for this menu to be displayed to the user.
|
938 |
+
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
939 |
+
* @param callable|string $function The function to be called to output the content for this page.
|
940 |
+
*
|
941 |
+
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
|
942 |
+
* required.
|
943 |
+
*/
|
944 |
+
static function add_subpage(
|
945 |
+
$parent_slug,
|
946 |
+
$page_title,
|
947 |
+
$menu_title,
|
948 |
+
$capability,
|
949 |
+
$menu_slug,
|
950 |
+
$function = ''
|
951 |
+
) {
|
952 |
+
$fn = 'add_submenu' . '_page';
|
953 |
+
|
954 |
+
return $fn( $parent_slug,
|
955 |
+
$page_title,
|
956 |
+
$menu_title,
|
957 |
+
$capability,
|
958 |
+
$menu_slug,
|
959 |
+
$function
|
960 |
+
);
|
961 |
+
}
|
962 |
+
|
963 |
+
/**
|
964 |
+
* Add sub page and update menu instance settings.
|
965 |
+
*
|
966 |
+
* @author Vova Feldman (@svovaf)
|
967 |
+
* @since 2.0.0
|
968 |
+
*
|
969 |
+
* @param string $parent_slug
|
970 |
+
* @param string $page_title
|
971 |
+
* @param string $menu_title
|
972 |
+
* @param string $capability
|
973 |
+
* @param string $menu_slug
|
974 |
+
* @param callable|string $function
|
975 |
+
*
|
976 |
+
* @return string
|
977 |
+
*/
|
978 |
+
function add_subpage_and_update(
|
979 |
+
$parent_slug,
|
980 |
+
$page_title,
|
981 |
+
$menu_title,
|
982 |
+
$capability,
|
983 |
+
$menu_slug,
|
984 |
+
$function = ''
|
985 |
+
) {
|
986 |
+
$this->_menu_slug = $menu_slug;
|
987 |
+
$this->_parent_slug = $parent_slug;
|
988 |
+
$this->_is_top_level = false;
|
989 |
+
$this->_menu_exists = true;
|
990 |
+
$this->_network_menu_exists = true;
|
991 |
+
|
992 |
+
return self::add_subpage(
|
993 |
+
$parent_slug,
|
994 |
+
$page_title,
|
995 |
+
$menu_title,
|
996 |
+
$capability,
|
997 |
+
$menu_slug,
|
998 |
+
$function
|
999 |
+
);
|
1000 |
+
}
|
1001 |
}
|
includes/freemius/includes/managers/class-fs-cache-manager.php
CHANGED
@@ -1,326 +1,326 @@
|
|
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.6
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Cache_Manager {
|
14 |
-
/**
|
15 |
-
* @var FS_Option_Manager
|
16 |
-
*/
|
17 |
-
private $_options;
|
18 |
-
/**
|
19 |
-
* @var FS_Logger
|
20 |
-
*/
|
21 |
-
private $_logger;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var FS_Cache_Manager[]
|
25 |
-
*/
|
26 |
-
private static $_MANAGERS = array();
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @author Vova Feldman (@svovaf)
|
30 |
-
* @since 1.1.3
|
31 |
-
*
|
32 |
-
* @param string $id
|
33 |
-
*/
|
34 |
-
private function __construct( $id ) {
|
35 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
36 |
-
|
37 |
-
$this->_logger->entrance();
|
38 |
-
$this->_logger->log( 'id = ' . $id );
|
39 |
-
|
40 |
-
$this->_options = FS_Option_Manager::get_manager( $id, true, true );
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @author Vova Feldman (@svovaf)
|
45 |
-
* @since 1.1.6
|
46 |
-
*
|
47 |
-
* @param $id
|
48 |
-
*
|
49 |
-
* @return FS_Cache_Manager
|
50 |
-
*/
|
51 |
-
static function get_manager( $id ) {
|
52 |
-
$id = strtolower( $id );
|
53 |
-
|
54 |
-
if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
|
55 |
-
self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
|
56 |
-
}
|
57 |
-
|
58 |
-
return self::$_MANAGERS[ $id ];
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* @author Vova Feldman (@svovaf)
|
63 |
-
* @since 1.1.6
|
64 |
-
*
|
65 |
-
* @return bool
|
66 |
-
*/
|
67 |
-
function is_empty() {
|
68 |
-
$this->_logger->entrance();
|
69 |
-
|
70 |
-
return $this->_options->is_empty();
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* @author Vova Feldman (@svovaf)
|
75 |
-
* @since 1.1.6
|
76 |
-
*/
|
77 |
-
function clear() {
|
78 |
-
$this->_logger->entrance();
|
79 |
-
|
80 |
-
$this->_options->clear( true );
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Delete cache manager from DB.
|
85 |
-
*
|
86 |
-
* @author Vova Feldman (@svovaf)
|
87 |
-
* @since 1.0.9
|
88 |
-
*/
|
89 |
-
function delete() {
|
90 |
-
$this->_options->delete();
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Check if there's a cached item.
|
95 |
-
*
|
96 |
-
* @author Vova Feldman (@svovaf)
|
97 |
-
* @since 1.1.6
|
98 |
-
*
|
99 |
-
* @param string $key
|
100 |
-
*
|
101 |
-
* @return bool
|
102 |
-
*/
|
103 |
-
function has( $key ) {
|
104 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
105 |
-
|
106 |
-
return ( is_object( $cache_entry ) &&
|
107 |
-
isset( $cache_entry->timestamp ) &&
|
108 |
-
is_numeric( $cache_entry->timestamp )
|
109 |
-
);
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Check if there's a valid cached item.
|
114 |
-
*
|
115 |
-
* @author Vova Feldman (@svovaf)
|
116 |
-
* @since 1.1.6
|
117 |
-
*
|
118 |
-
* @param string $key
|
119 |
-
* @param null|int $expiration Since 1.2.2.7
|
120 |
-
*
|
121 |
-
* @return bool
|
122 |
-
*/
|
123 |
-
function has_valid( $key, $expiration = null ) {
|
124 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
125 |
-
|
126 |
-
$is_valid = ( is_object( $cache_entry ) &&
|
127 |
-
isset( $cache_entry->timestamp ) &&
|
128 |
-
is_numeric( $cache_entry->timestamp ) &&
|
129 |
-
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
130 |
-
);
|
131 |
-
|
132 |
-
if ( $is_valid &&
|
133 |
-
is_numeric( $expiration ) &&
|
134 |
-
isset( $cache_entry->created ) &&
|
135 |
-
is_numeric( $cache_entry->created ) &&
|
136 |
-
$cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
|
137 |
-
) {
|
138 |
-
/**
|
139 |
-
* Even if the cache is still valid, since we are checking for validity
|
140 |
-
* with an explicit expiration period, if the period has past, return
|
141 |
-
* `false` as if the cache is invalid.
|
142 |
-
*
|
143 |
-
* @since 1.2.2.7
|
144 |
-
*/
|
145 |
-
$is_valid = false;
|
146 |
-
}
|
147 |
-
|
148 |
-
return $is_valid;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* @author Vova Feldman (@svovaf)
|
153 |
-
* @since 1.1.6
|
154 |
-
*
|
155 |
-
* @param string $key
|
156 |
-
* @param mixed $default
|
157 |
-
*
|
158 |
-
* @return mixed
|
159 |
-
*/
|
160 |
-
function get( $key, $default = null ) {
|
161 |
-
$this->_logger->entrance( 'key = ' . $key );
|
162 |
-
|
163 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
164 |
-
|
165 |
-
if ( is_object( $cache_entry ) &&
|
166 |
-
isset( $cache_entry->timestamp ) &&
|
167 |
-
is_numeric( $cache_entry->timestamp )
|
168 |
-
) {
|
169 |
-
return $cache_entry->result;
|
170 |
-
}
|
171 |
-
|
172 |
-
return is_object( $default ) ? clone $default : $default;
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* @author Vova Feldman (@svovaf)
|
177 |
-
* @since 1.1.6
|
178 |
-
*
|
179 |
-
* @param string $key
|
180 |
-
* @param mixed $default
|
181 |
-
*
|
182 |
-
* @return mixed
|
183 |
-
*/
|
184 |
-
function get_valid( $key, $default = null ) {
|
185 |
-
$this->_logger->entrance( 'key = ' . $key );
|
186 |
-
|
187 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
188 |
-
|
189 |
-
if ( is_object( $cache_entry ) &&
|
190 |
-
isset( $cache_entry->timestamp ) &&
|
191 |
-
is_numeric( $cache_entry->timestamp ) &&
|
192 |
-
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
193 |
-
) {
|
194 |
-
return $cache_entry->result;
|
195 |
-
}
|
196 |
-
|
197 |
-
return is_object( $default ) ? clone $default : $default;
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* @author Vova Feldman (@svovaf)
|
202 |
-
* @since 1.1.6
|
203 |
-
*
|
204 |
-
* @param string $key
|
205 |
-
* @param mixed $value
|
206 |
-
* @param int $expiration
|
207 |
-
* @param int $created Since 2.0.0 Cache creation date.
|
208 |
-
*/
|
209 |
-
function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $created = WP_FS__SCRIPT_START_TIME ) {
|
210 |
-
$this->_logger->entrance( 'key = ' . $key );
|
211 |
-
|
212 |
-
$cache_entry = new stdClass();
|
213 |
-
|
214 |
-
$cache_entry->result = $value;
|
215 |
-
$cache_entry->created = $created;
|
216 |
-
$cache_entry->timestamp = $created + $expiration;
|
217 |
-
$this->_options->set_option( $key, $cache_entry, true );
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Get cached record expiration, or false if not cached or expired.
|
222 |
-
*
|
223 |
-
* @author Vova Feldman (@svovaf)
|
224 |
-
* @since 1.1.7.3
|
225 |
-
*
|
226 |
-
* @param string $key
|
227 |
-
*
|
228 |
-
* @return bool|int
|
229 |
-
*/
|
230 |
-
function get_record_expiration( $key ) {
|
231 |
-
$this->_logger->entrance( 'key = ' . $key );
|
232 |
-
|
233 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
234 |
-
|
235 |
-
if ( is_object( $cache_entry ) &&
|
236 |
-
isset( $cache_entry->timestamp ) &&
|
237 |
-
is_numeric( $cache_entry->timestamp ) &&
|
238 |
-
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
239 |
-
) {
|
240 |
-
return $cache_entry->timestamp;
|
241 |
-
}
|
242 |
-
|
243 |
-
return false;
|
244 |
-
}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* Purge cached item.
|
248 |
-
*
|
249 |
-
* @author Vova Feldman (@svovaf)
|
250 |
-
* @since 1.1.6
|
251 |
-
*
|
252 |
-
* @param string $key
|
253 |
-
*/
|
254 |
-
function purge( $key ) {
|
255 |
-
$this->_logger->entrance( 'key = ' . $key );
|
256 |
-
|
257 |
-
$this->_options->unset_option( $key, true );
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Extend cached item caching period.
|
262 |
-
*
|
263 |
-
* @author Vova Feldman (@svovaf)
|
264 |
-
* @since 2.0.0
|
265 |
-
*
|
266 |
-
* @param string $key
|
267 |
-
* @param int $expiration
|
268 |
-
*
|
269 |
-
* @return bool
|
270 |
-
*/
|
271 |
-
function update_expiration( $key, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
272 |
-
$this->_logger->entrance( 'key = ' . $key );
|
273 |
-
|
274 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
275 |
-
|
276 |
-
if ( ! is_object( $cache_entry ) ||
|
277 |
-
! isset( $cache_entry->timestamp ) ||
|
278 |
-
! is_numeric( $cache_entry->timestamp )
|
279 |
-
) {
|
280 |
-
return false;
|
281 |
-
}
|
282 |
-
|
283 |
-
$this->set( $key, $cache_entry->result, $expiration, $cache_entry->created );
|
284 |
-
|
285 |
-
return true;
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Set cached item as expired.
|
290 |
-
*
|
291 |
-
* @author Vova Feldman (@svovaf)
|
292 |
-
* @since 1.2.2.7
|
293 |
-
*
|
294 |
-
* @param string $key
|
295 |
-
*/
|
296 |
-
function expire( $key ) {
|
297 |
-
$this->_logger->entrance( 'key = ' . $key );
|
298 |
-
|
299 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
300 |
-
|
301 |
-
if ( is_object( $cache_entry ) &&
|
302 |
-
isset( $cache_entry->timestamp ) &&
|
303 |
-
is_numeric( $cache_entry->timestamp )
|
304 |
-
) {
|
305 |
-
// Set to expired.
|
306 |
-
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
|
307 |
-
$this->_options->set_option( $key, $cache_entry, true );
|
308 |
-
}
|
309 |
-
}
|
310 |
-
|
311 |
-
#--------------------------------------------------------------------------------
|
312 |
-
#region Migration
|
313 |
-
#--------------------------------------------------------------------------------
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Migrate options from site level.
|
317 |
-
*
|
318 |
-
* @author Vova Feldman (@svovaf)
|
319 |
-
* @since 2.0.0
|
320 |
-
*/
|
321 |
-
function migrate_to_network() {
|
322 |
-
$this->_options->migrate_to_network();
|
323 |
-
}
|
324 |
-
|
325 |
-
#endregion
|
326 |
}
|
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.6
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Cache_Manager {
|
14 |
+
/**
|
15 |
+
* @var FS_Option_Manager
|
16 |
+
*/
|
17 |
+
private $_options;
|
18 |
+
/**
|
19 |
+
* @var FS_Logger
|
20 |
+
*/
|
21 |
+
private $_logger;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @var FS_Cache_Manager[]
|
25 |
+
*/
|
26 |
+
private static $_MANAGERS = array();
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @author Vova Feldman (@svovaf)
|
30 |
+
* @since 1.1.3
|
31 |
+
*
|
32 |
+
* @param string $id
|
33 |
+
*/
|
34 |
+
private function __construct( $id ) {
|
35 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
36 |
+
|
37 |
+
$this->_logger->entrance();
|
38 |
+
$this->_logger->log( 'id = ' . $id );
|
39 |
+
|
40 |
+
$this->_options = FS_Option_Manager::get_manager( $id, true, true, false );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @author Vova Feldman (@svovaf)
|
45 |
+
* @since 1.1.6
|
46 |
+
*
|
47 |
+
* @param $id
|
48 |
+
*
|
49 |
+
* @return FS_Cache_Manager
|
50 |
+
*/
|
51 |
+
static function get_manager( $id ) {
|
52 |
+
$id = strtolower( $id );
|
53 |
+
|
54 |
+
if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
|
55 |
+
self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
|
56 |
+
}
|
57 |
+
|
58 |
+
return self::$_MANAGERS[ $id ];
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @author Vova Feldman (@svovaf)
|
63 |
+
* @since 1.1.6
|
64 |
+
*
|
65 |
+
* @return bool
|
66 |
+
*/
|
67 |
+
function is_empty() {
|
68 |
+
$this->_logger->entrance();
|
69 |
+
|
70 |
+
return $this->_options->is_empty();
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @author Vova Feldman (@svovaf)
|
75 |
+
* @since 1.1.6
|
76 |
+
*/
|
77 |
+
function clear() {
|
78 |
+
$this->_logger->entrance();
|
79 |
+
|
80 |
+
$this->_options->clear( true );
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Delete cache manager from DB.
|
85 |
+
*
|
86 |
+
* @author Vova Feldman (@svovaf)
|
87 |
+
* @since 1.0.9
|
88 |
+
*/
|
89 |
+
function delete() {
|
90 |
+
$this->_options->delete();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Check if there's a cached item.
|
95 |
+
*
|
96 |
+
* @author Vova Feldman (@svovaf)
|
97 |
+
* @since 1.1.6
|
98 |
+
*
|
99 |
+
* @param string $key
|
100 |
+
*
|
101 |
+
* @return bool
|
102 |
+
*/
|
103 |
+
function has( $key ) {
|
104 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
105 |
+
|
106 |
+
return ( is_object( $cache_entry ) &&
|
107 |
+
isset( $cache_entry->timestamp ) &&
|
108 |
+
is_numeric( $cache_entry->timestamp )
|
109 |
+
);
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Check if there's a valid cached item.
|
114 |
+
*
|
115 |
+
* @author Vova Feldman (@svovaf)
|
116 |
+
* @since 1.1.6
|
117 |
+
*
|
118 |
+
* @param string $key
|
119 |
+
* @param null|int $expiration Since 1.2.2.7
|
120 |
+
*
|
121 |
+
* @return bool
|
122 |
+
*/
|
123 |
+
function has_valid( $key, $expiration = null ) {
|
124 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
125 |
+
|
126 |
+
$is_valid = ( is_object( $cache_entry ) &&
|
127 |
+
isset( $cache_entry->timestamp ) &&
|
128 |
+
is_numeric( $cache_entry->timestamp ) &&
|
129 |
+
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
130 |
+
);
|
131 |
+
|
132 |
+
if ( $is_valid &&
|
133 |
+
is_numeric( $expiration ) &&
|
134 |
+
isset( $cache_entry->created ) &&
|
135 |
+
is_numeric( $cache_entry->created ) &&
|
136 |
+
$cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
|
137 |
+
) {
|
138 |
+
/**
|
139 |
+
* Even if the cache is still valid, since we are checking for validity
|
140 |
+
* with an explicit expiration period, if the period has past, return
|
141 |
+
* `false` as if the cache is invalid.
|
142 |
+
*
|
143 |
+
* @since 1.2.2.7
|
144 |
+
*/
|
145 |
+
$is_valid = false;
|
146 |
+
}
|
147 |
+
|
148 |
+
return $is_valid;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @author Vova Feldman (@svovaf)
|
153 |
+
* @since 1.1.6
|
154 |
+
*
|
155 |
+
* @param string $key
|
156 |
+
* @param mixed $default
|
157 |
+
*
|
158 |
+
* @return mixed
|
159 |
+
*/
|
160 |
+
function get( $key, $default = null ) {
|
161 |
+
$this->_logger->entrance( 'key = ' . $key );
|
162 |
+
|
163 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
164 |
+
|
165 |
+
if ( is_object( $cache_entry ) &&
|
166 |
+
isset( $cache_entry->timestamp ) &&
|
167 |
+
is_numeric( $cache_entry->timestamp )
|
168 |
+
) {
|
169 |
+
return $cache_entry->result;
|
170 |
+
}
|
171 |
+
|
172 |
+
return is_object( $default ) ? clone $default : $default;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* @author Vova Feldman (@svovaf)
|
177 |
+
* @since 1.1.6
|
178 |
+
*
|
179 |
+
* @param string $key
|
180 |
+
* @param mixed $default
|
181 |
+
*
|
182 |
+
* @return mixed
|
183 |
+
*/
|
184 |
+
function get_valid( $key, $default = null ) {
|
185 |
+
$this->_logger->entrance( 'key = ' . $key );
|
186 |
+
|
187 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
188 |
+
|
189 |
+
if ( is_object( $cache_entry ) &&
|
190 |
+
isset( $cache_entry->timestamp ) &&
|
191 |
+
is_numeric( $cache_entry->timestamp ) &&
|
192 |
+
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
193 |
+
) {
|
194 |
+
return $cache_entry->result;
|
195 |
+
}
|
196 |
+
|
197 |
+
return is_object( $default ) ? clone $default : $default;
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* @author Vova Feldman (@svovaf)
|
202 |
+
* @since 1.1.6
|
203 |
+
*
|
204 |
+
* @param string $key
|
205 |
+
* @param mixed $value
|
206 |
+
* @param int $expiration
|
207 |
+
* @param int $created Since 2.0.0 Cache creation date.
|
208 |
+
*/
|
209 |
+
function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $created = WP_FS__SCRIPT_START_TIME ) {
|
210 |
+
$this->_logger->entrance( 'key = ' . $key );
|
211 |
+
|
212 |
+
$cache_entry = new stdClass();
|
213 |
+
|
214 |
+
$cache_entry->result = $value;
|
215 |
+
$cache_entry->created = $created;
|
216 |
+
$cache_entry->timestamp = $created + $expiration;
|
217 |
+
$this->_options->set_option( $key, $cache_entry, true );
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Get cached record expiration, or false if not cached or expired.
|
222 |
+
*
|
223 |
+
* @author Vova Feldman (@svovaf)
|
224 |
+
* @since 1.1.7.3
|
225 |
+
*
|
226 |
+
* @param string $key
|
227 |
+
*
|
228 |
+
* @return bool|int
|
229 |
+
*/
|
230 |
+
function get_record_expiration( $key ) {
|
231 |
+
$this->_logger->entrance( 'key = ' . $key );
|
232 |
+
|
233 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
234 |
+
|
235 |
+
if ( is_object( $cache_entry ) &&
|
236 |
+
isset( $cache_entry->timestamp ) &&
|
237 |
+
is_numeric( $cache_entry->timestamp ) &&
|
238 |
+
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
239 |
+
) {
|
240 |
+
return $cache_entry->timestamp;
|
241 |
+
}
|
242 |
+
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Purge cached item.
|
248 |
+
*
|
249 |
+
* @author Vova Feldman (@svovaf)
|
250 |
+
* @since 1.1.6
|
251 |
+
*
|
252 |
+
* @param string $key
|
253 |
+
*/
|
254 |
+
function purge( $key ) {
|
255 |
+
$this->_logger->entrance( 'key = ' . $key );
|
256 |
+
|
257 |
+
$this->_options->unset_option( $key, true );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Extend cached item caching period.
|
262 |
+
*
|
263 |
+
* @author Vova Feldman (@svovaf)
|
264 |
+
* @since 2.0.0
|
265 |
+
*
|
266 |
+
* @param string $key
|
267 |
+
* @param int $expiration
|
268 |
+
*
|
269 |
+
* @return bool
|
270 |
+
*/
|
271 |
+
function update_expiration( $key, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
272 |
+
$this->_logger->entrance( 'key = ' . $key );
|
273 |
+
|
274 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
275 |
+
|
276 |
+
if ( ! is_object( $cache_entry ) ||
|
277 |
+
! isset( $cache_entry->timestamp ) ||
|
278 |
+
! is_numeric( $cache_entry->timestamp )
|
279 |
+
) {
|
280 |
+
return false;
|
281 |
+
}
|
282 |
+
|
283 |
+
$this->set( $key, $cache_entry->result, $expiration, $cache_entry->created );
|
284 |
+
|
285 |
+
return true;
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Set cached item as expired.
|
290 |
+
*
|
291 |
+
* @author Vova Feldman (@svovaf)
|
292 |
+
* @since 1.2.2.7
|
293 |
+
*
|
294 |
+
* @param string $key
|
295 |
+
*/
|
296 |
+
function expire( $key ) {
|
297 |
+
$this->_logger->entrance( 'key = ' . $key );
|
298 |
+
|
299 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
300 |
+
|
301 |
+
if ( is_object( $cache_entry ) &&
|
302 |
+
isset( $cache_entry->timestamp ) &&
|
303 |
+
is_numeric( $cache_entry->timestamp )
|
304 |
+
) {
|
305 |
+
// Set to expired.
|
306 |
+
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
|
307 |
+
$this->_options->set_option( $key, $cache_entry, true );
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
#--------------------------------------------------------------------------------
|
312 |
+
#region Migration
|
313 |
+
#--------------------------------------------------------------------------------
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Migrate options from site level.
|
317 |
+
*
|
318 |
+
* @author Vova Feldman (@svovaf)
|
319 |
+
* @since 2.0.0
|
320 |
+
*/
|
321 |
+
function migrate_to_network() {
|
322 |
+
$this->_options->migrate_to_network();
|
323 |
+
}
|
324 |
+
|
325 |
+
#endregion
|
326 |
}
|
includes/freemius/includes/managers/class-fs-gdpr-manager.php
CHANGED
@@ -1,202 +1,202 @@
|
|
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.1.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_GDPR_Manager {
|
14 |
-
/**
|
15 |
-
* @var FS_Option_Manager
|
16 |
-
*/
|
17 |
-
private $_storage;
|
18 |
-
/**
|
19 |
-
* @var array {
|
20 |
-
* @type bool $required Are GDPR rules apply on the current context admin.
|
21 |
-
* @type bool $show_opt_in_notice Should the marketing and offers opt-in message be shown to the admin or not. If not set, defaults to `true`.
|
22 |
-
* @type int $notice_shown_at Last time the special GDPR opt-in message was shown to the current admin.
|
23 |
-
* }
|
24 |
-
*/
|
25 |
-
private $_data;
|
26 |
-
/**
|
27 |
-
* @var int
|
28 |
-
*/
|
29 |
-
private $_wp_user_id;
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
private $_option_name;
|
34 |
-
/**
|
35 |
-
* @var FS_Admin_Notices
|
36 |
-
*/
|
37 |
-
private $_notices;
|
38 |
-
|
39 |
-
#--------------------------------------------------------------------------------
|
40 |
-
#region Singleton
|
41 |
-
#--------------------------------------------------------------------------------
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @var FS_GDPR_Manager
|
45 |
-
*/
|
46 |
-
private static $_instance;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* @return FS_GDPR_Manager
|
50 |
-
*/
|
51 |
-
public static function instance() {
|
52 |
-
if ( ! isset( self::$_instance ) ) {
|
53 |
-
self::$_instance = new self();
|
54 |
-
}
|
55 |
-
|
56 |
-
return self::$_instance;
|
57 |
-
}
|
58 |
-
|
59 |
-
#endregion
|
60 |
-
|
61 |
-
private function __construct() {
|
62 |
-
$this->_storage = FS_Option_Manager::get_manager( WP_FS__GDPR_OPTION_NAME, true, true );
|
63 |
-
$this->_wp_user_id = Freemius::get_current_wp_user_id();
|
64 |
-
$this->_option_name = "u{$this->_wp_user_id}";
|
65 |
-
$this->_data = $this->_storage->get_option( $this->_option_name, array() );
|
66 |
-
$this->_notices = FS_Admin_Notices::instance( 'all_admins', '', '', true );
|
67 |
-
|
68 |
-
if ( ! is_array( $this->_data ) ) {
|
69 |
-
$this->_data = array();
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Update a GDPR option for the current admin and store it.
|
75 |
-
*
|
76 |
-
* @author Vova Feldman (@svovaf)
|
77 |
-
* @since 2.1.0
|
78 |
-
*
|
79 |
-
* @param string $name
|
80 |
-
* @param mixed $value
|
81 |
-
*/
|
82 |
-
private function update_option( $name, $value ) {
|
83 |
-
$this->_data[ $name ] = $value;
|
84 |
-
|
85 |
-
$this->_storage->set_option( $this->_option_name, $this->_data, true );
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* @author Leo Fajardo (@leorw)
|
90 |
-
* @since 2.1.0
|
91 |
-
*
|
92 |
-
* @return bool|null
|
93 |
-
*/
|
94 |
-
public function is_required() {
|
95 |
-
return isset( $this->_data['required'] ) ?
|
96 |
-
$this->_data['required'] :
|
97 |
-
null;
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* @author Leo Fajardo (@leorw)
|
102 |
-
* @since 2.1.0
|
103 |
-
*
|
104 |
-
* @param bool $is_required
|
105 |
-
*/
|
106 |
-
public function store_is_required( $is_required ) {
|
107 |
-
$this->update_option( 'required', $is_required );
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Checks if the GDPR opt-in sticky notice is currently shown.
|
112 |
-
*
|
113 |
-
* @author Vova Feldman (@svovaf)
|
114 |
-
* @since 2.1.0
|
115 |
-
*
|
116 |
-
* @return bool
|
117 |
-
*/
|
118 |
-
public function is_opt_in_notice_shown() {
|
119 |
-
return $this->_notices->has_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Remove the GDPR opt-in sticky notice.
|
124 |
-
*
|
125 |
-
* @author Vova Feldman (@svovaf)
|
126 |
-
* @since 2.1.0
|
127 |
-
*/
|
128 |
-
public function remove_opt_in_notice() {
|
129 |
-
$this->_notices->remove_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
|
130 |
-
|
131 |
-
$this->disable_opt_in_notice();
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Prevents the opt-in message from being added/shown.
|
136 |
-
*
|
137 |
-
* @author Leo Fajardo (@leorw)
|
138 |
-
* @since 2.1.0
|
139 |
-
*/
|
140 |
-
public function disable_opt_in_notice() {
|
141 |
-
$this->update_option( 'show_opt_in_notice', false );
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Checks if a GDPR opt-in message needs to be shown to the current admin.
|
146 |
-
*
|
147 |
-
* @author Vova Feldman (@svovaf)
|
148 |
-
* @since 2.1.0
|
149 |
-
*
|
150 |
-
* @return bool
|
151 |
-
*/
|
152 |
-
public function should_show_opt_in_notice() {
|
153 |
-
return (
|
154 |
-
! isset( $this->_data['show_opt_in_notice'] ) ||
|
155 |
-
true === $this->_data['show_opt_in_notice']
|
156 |
-
);
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Get the last time the GDPR opt-in notice was shown.
|
161 |
-
*
|
162 |
-
* @author Vova Feldman (@svovaf)
|
163 |
-
* @since 2.1.0
|
164 |
-
*
|
165 |
-
* @return false|int
|
166 |
-
*/
|
167 |
-
public function last_time_notice_was_shown() {
|
168 |
-
return isset( $this->_data['notice_shown_at'] ) ?
|
169 |
-
$this->_data['notice_shown_at'] :
|
170 |
-
false;
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Update the timestamp of the last time the GDPR opt-in message was shown to now.
|
175 |
-
*
|
176 |
-
* @author Vova Feldman (@svovaf)
|
177 |
-
* @since 2.1.0
|
178 |
-
*/
|
179 |
-
public function notice_was_just_shown() {
|
180 |
-
$this->update_option( 'notice_shown_at', WP_FS__SCRIPT_START_TIME );
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* @param string $message
|
185 |
-
* @param string|null $plugin_title
|
186 |
-
*
|
187 |
-
* @author Vova Feldman (@svovaf)
|
188 |
-
* @since 2.1.0
|
189 |
-
*/
|
190 |
-
public function add_opt_in_sticky_notice( $message, $plugin_title = null ) {
|
191 |
-
$this->_notices->add_sticky(
|
192 |
-
$message,
|
193 |
-
"gdpr_optin_actions_{$this->_wp_user_id}",
|
194 |
-
'',
|
195 |
-
'promotion',
|
196 |
-
true,
|
197 |
-
$this->_wp_user_id,
|
198 |
-
$plugin_title,
|
199 |
-
true
|
200 |
-
);
|
201 |
-
}
|
202 |
}
|
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.1.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_GDPR_Manager {
|
14 |
+
/**
|
15 |
+
* @var FS_Option_Manager
|
16 |
+
*/
|
17 |
+
private $_storage;
|
18 |
+
/**
|
19 |
+
* @var array {
|
20 |
+
* @type bool $required Are GDPR rules apply on the current context admin.
|
21 |
+
* @type bool $show_opt_in_notice Should the marketing and offers opt-in message be shown to the admin or not. If not set, defaults to `true`.
|
22 |
+
* @type int $notice_shown_at Last time the special GDPR opt-in message was shown to the current admin.
|
23 |
+
* }
|
24 |
+
*/
|
25 |
+
private $_data;
|
26 |
+
/**
|
27 |
+
* @var int
|
28 |
+
*/
|
29 |
+
private $_wp_user_id;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $_option_name;
|
34 |
+
/**
|
35 |
+
* @var FS_Admin_Notices
|
36 |
+
*/
|
37 |
+
private $_notices;
|
38 |
+
|
39 |
+
#--------------------------------------------------------------------------------
|
40 |
+
#region Singleton
|
41 |
+
#--------------------------------------------------------------------------------
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @var FS_GDPR_Manager
|
45 |
+
*/
|
46 |
+
private static $_instance;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* @return FS_GDPR_Manager
|
50 |
+
*/
|
51 |
+
public static function instance() {
|
52 |
+
if ( ! isset( self::$_instance ) ) {
|
53 |
+
self::$_instance = new self();
|
54 |
+
}
|
55 |
+
|
56 |
+
return self::$_instance;
|
57 |
+
}
|
58 |
+
|
59 |
+
#endregion
|
60 |
+
|
61 |
+
private function __construct() {
|
62 |
+
$this->_storage = FS_Option_Manager::get_manager( WP_FS__GDPR_OPTION_NAME, true, true );
|
63 |
+
$this->_wp_user_id = Freemius::get_current_wp_user_id();
|
64 |
+
$this->_option_name = "u{$this->_wp_user_id}";
|
65 |
+
$this->_data = $this->_storage->get_option( $this->_option_name, array() );
|
66 |
+
$this->_notices = FS_Admin_Notices::instance( 'all_admins', '', '', true );
|
67 |
+
|
68 |
+
if ( ! is_array( $this->_data ) ) {
|
69 |
+
$this->_data = array();
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Update a GDPR option for the current admin and store it.
|
75 |
+
*
|
76 |
+
* @author Vova Feldman (@svovaf)
|
77 |
+
* @since 2.1.0
|
78 |
+
*
|
79 |
+
* @param string $name
|
80 |
+
* @param mixed $value
|
81 |
+
*/
|
82 |
+
private function update_option( $name, $value ) {
|
83 |
+
$this->_data[ $name ] = $value;
|
84 |
+
|
85 |
+
$this->_storage->set_option( $this->_option_name, $this->_data, true );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @author Leo Fajardo (@leorw)
|
90 |
+
* @since 2.1.0
|
91 |
+
*
|
92 |
+
* @return bool|null
|
93 |
+
*/
|
94 |
+
public function is_required() {
|
95 |
+
return isset( $this->_data['required'] ) ?
|
96 |
+
$this->_data['required'] :
|
97 |
+
null;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @author Leo Fajardo (@leorw)
|
102 |
+
* @since 2.1.0
|
103 |
+
*
|
104 |
+
* @param bool $is_required
|
105 |
+
*/
|
106 |
+
public function store_is_required( $is_required ) {
|
107 |
+
$this->update_option( 'required', $is_required );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Checks if the GDPR opt-in sticky notice is currently shown.
|
112 |
+
*
|
113 |
+
* @author Vova Feldman (@svovaf)
|
114 |
+
* @since 2.1.0
|
115 |
+
*
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
public function is_opt_in_notice_shown() {
|
119 |
+
return $this->_notices->has_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Remove the GDPR opt-in sticky notice.
|
124 |
+
*
|
125 |
+
* @author Vova Feldman (@svovaf)
|
126 |
+
* @since 2.1.0
|
127 |
+
*/
|
128 |
+
public function remove_opt_in_notice() {
|
129 |
+
$this->_notices->remove_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
|
130 |
+
|
131 |
+
$this->disable_opt_in_notice();
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Prevents the opt-in message from being added/shown.
|
136 |
+
*
|
137 |
+
* @author Leo Fajardo (@leorw)
|
138 |
+
* @since 2.1.0
|
139 |
+
*/
|
140 |
+
public function disable_opt_in_notice() {
|
141 |
+
$this->update_option( 'show_opt_in_notice', false );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Checks if a GDPR opt-in message needs to be shown to the current admin.
|
146 |
+
*
|
147 |
+
* @author Vova Feldman (@svovaf)
|
148 |
+
* @since 2.1.0
|
149 |
+
*
|
150 |
+
* @return bool
|
151 |
+
*/
|
152 |
+
public function should_show_opt_in_notice() {
|
153 |
+
return (
|
154 |
+
! isset( $this->_data['show_opt_in_notice'] ) ||
|
155 |
+
true === $this->_data['show_opt_in_notice']
|
156 |
+
);
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get the last time the GDPR opt-in notice was shown.
|
161 |
+
*
|
162 |
+
* @author Vova Feldman (@svovaf)
|
163 |
+
* @since 2.1.0
|
164 |
+
*
|
165 |
+
* @return false|int
|
166 |
+
*/
|
167 |
+
public function last_time_notice_was_shown() {
|
168 |
+
return isset( $this->_data['notice_shown_at'] ) ?
|
169 |
+
$this->_data['notice_shown_at'] :
|
170 |
+
false;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Update the timestamp of the last time the GDPR opt-in message was shown to now.
|
175 |
+
*
|
176 |
+
* @author Vova Feldman (@svovaf)
|
177 |
+
* @since 2.1.0
|
178 |
+
*/
|
179 |
+
public function notice_was_just_shown() {
|
180 |
+
$this->update_option( 'notice_shown_at', WP_FS__SCRIPT_START_TIME );
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* @param string $message
|
185 |
+
* @param string|null $plugin_title
|
186 |
+
*
|
187 |
+
* @author Vova Feldman (@svovaf)
|
188 |
+
* @since 2.1.0
|
189 |
+
*/
|
190 |
+
public function add_opt_in_sticky_notice( $message, $plugin_title = null ) {
|
191 |
+
$this->_notices->add_sticky(
|
192 |
+
$message,
|
193 |
+
"gdpr_optin_actions_{$this->_wp_user_id}",
|
194 |
+
'',
|
195 |
+
'promotion',
|
196 |
+
true,
|
197 |
+
$this->_wp_user_id,
|
198 |
+
$plugin_title,
|
199 |
+
true
|
200 |
+
);
|
201 |
+
}
|
202 |
}
|
includes/freemius/includes/managers/class-fs-key-value-storage.php
CHANGED
@@ -1,392 +1,392 @@
|
|
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.7
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class FS_Key_Value_Storage
|
15 |
-
*
|
16 |
-
* @property int $install_timestamp
|
17 |
-
* @property int $activation_timestamp
|
18 |
-
* @property int $sync_timestamp
|
19 |
-
* @property object $sync_cron
|
20 |
-
* @property int $install_sync_timestamp
|
21 |
-
* @property array $connectivity_test
|
22 |
-
* @property array $is_on
|
23 |
-
* @property object $trial_plan
|
24 |
-
* @property bool $has_trial_plan
|
25 |
-
* @property bool $trial_promotion_shown
|
26 |
-
* @property string $sdk_version
|
27 |
-
* @property string $sdk_last_version
|
28 |
-
* @property bool $sdk_upgrade_mode
|
29 |
-
* @property bool $sdk_downgrade_mode
|
30 |
-
* @property bool $plugin_upgrade_mode
|
31 |
-
* @property bool $plugin_downgrade_mode
|
32 |
-
* @property string $plugin_version
|
33 |
-
* @property string $plugin_last_version
|
34 |
-
* @property bool $is_plugin_new_install
|
35 |
-
* @property bool $was_plugin_loaded
|
36 |
-
* @property object $plugin_main_file
|
37 |
-
* @property bool $prev_is_premium
|
38 |
-
* @property array $is_anonymous
|
39 |
-
* @property bool $is_pending_activation
|
40 |
-
* @property bool $sticky_optin_added
|
41 |
-
* @property object $uninstall_reason
|
42 |
-
* @property object $subscription
|
43 |
-
*/
|
44 |
-
class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
|
45 |
-
/**
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
protected $_id;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* @since 1.2.2
|
52 |
-
*
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
protected $_secondary_id;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* @since 2.0.0
|
59 |
-
* @var int The ID of the blog that is associated with the current site level options.
|
60 |
-
*/
|
61 |
-
private $_blog_id = 0;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @since 2.0.0
|
65 |
-
* @var bool
|
66 |
-
*/
|
67 |
-
private $_is_multisite_storage;
|
68 |
-
|
69 |
-
/**
|
70 |
-
* @var array
|
71 |
-
*/
|
72 |
-
protected $_data;
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @var FS_Key_Value_Storage[]
|
76 |
-
*/
|
77 |
-
private static $_instances = array();
|
78 |
-
|
79 |
-
/**
|
80 |
-
* @var FS_Logger
|
81 |
-
*/
|
82 |
-
protected $_logger;
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @param string $id
|
86 |
-
* @param string $secondary_id
|
87 |
-
* @param bool $network_level_or_blog_id
|
88 |
-
*
|
89 |
-
* @return FS_Key_Value_Storage
|
90 |
-
*/
|
91 |
-
static function instance( $id, $secondary_id, $network_level_or_blog_id = false ) {
|
92 |
-
$key = $id . ':' . $secondary_id;
|
93 |
-
|
94 |
-
if ( is_multisite() ) {
|
95 |
-
if ( true === $network_level_or_blog_id ) {
|
96 |
-
$key .= ':ms';
|
97 |
-
} else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
|
98 |
-
$key .= ":{$network_level_or_blog_id}";
|
99 |
-
} else {
|
100 |
-
$network_level_or_blog_id = get_current_blog_id();
|
101 |
-
|
102 |
-
$key .= ":{$network_level_or_blog_id}";
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
if ( ! isset( self::$_instances[ $key ] ) ) {
|
107 |
-
self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id, $network_level_or_blog_id );
|
108 |
-
}
|
109 |
-
|
110 |
-
return self::$_instances[ $key ];
|
111 |
-
}
|
112 |
-
|
113 |
-
protected function __construct( $id, $secondary_id, $network_level_or_blog_id = false ) {
|
114 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
115 |
-
|
116 |
-
$this->_id = $id;
|
117 |
-
$this->_secondary_id = $secondary_id;
|
118 |
-
|
119 |
-
if ( is_multisite() ) {
|
120 |
-
$this->_is_multisite_storage = ( true === $network_level_or_blog_id );
|
121 |
-
|
122 |
-
if ( is_numeric( $network_level_or_blog_id ) ) {
|
123 |
-
$this->_blog_id = $network_level_or_blog_id;
|
124 |
-
}
|
125 |
-
} else {
|
126 |
-
$this->_is_multisite_storage = false;
|
127 |
-
}
|
128 |
-
|
129 |
-
$this->load();
|
130 |
-
}
|
131 |
-
|
132 |
-
protected function get_option_manager() {
|
133 |
-
return FS_Option_Manager::get_manager(
|
134 |
-
WP_FS__ACCOUNTS_OPTION_NAME,
|
135 |
-
true,
|
136 |
-
$this->_is_multisite_storage ?
|
137 |
-
true :
|
138 |
-
( $this->_blog_id > 0 ? $this->_blog_id : false )
|
139 |
-
);
|
140 |
-
}
|
141 |
-
|
142 |
-
protected function get_all_data() {
|
143 |
-
return $this->get_option_manager()->get_option( $this->_id, array() );
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Load plugin data from local DB.
|
148 |
-
*
|
149 |
-
* @author Vova Feldman (@svovaf)
|
150 |
-
* @since 1.0.7
|
151 |
-
*/
|
152 |
-
function load() {
|
153 |
-
$all_plugins_data = $this->get_all_data();
|
154 |
-
$this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
|
155 |
-
$all_plugins_data[ $this->_secondary_id ] :
|
156 |
-
array();
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* @author Vova Feldman (@svovaf)
|
161 |
-
* @since 1.0.7
|
162 |
-
*
|
163 |
-
* @param string $key
|
164 |
-
* @param mixed $value
|
165 |
-
* @param bool $flush
|
166 |
-
*/
|
167 |
-
function store( $key, $value, $flush = true ) {
|
168 |
-
if ( $this->_logger->is_on() ) {
|
169 |
-
$this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
|
170 |
-
}
|
171 |
-
|
172 |
-
if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
|
173 |
-
// No need to store data if the value wasn't changed.
|
174 |
-
return;
|
175 |
-
}
|
176 |
-
|
177 |
-
$all_data = $this->get_all_data();
|
178 |
-
|
179 |
-
$this->_data[ $key ] = $value;
|
180 |
-
|
181 |
-
$all_data[ $this->_secondary_id ] = $this->_data;
|
182 |
-
|
183 |
-
$options_manager = $this->get_option_manager();
|
184 |
-
$options_manager->set_option( $this->_id, $all_data, $flush );
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* @author Vova Feldman (@svovaf)
|
189 |
-
* @since 2.0.0
|
190 |
-
*/
|
191 |
-
function save() {
|
192 |
-
$this->get_option_manager()->store();
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* @author Vova Feldman (@svovaf)
|
197 |
-
* @since 1.0.7
|
198 |
-
*
|
199 |
-
* @param bool $store
|
200 |
-
* @param string[] $exceptions Set of keys to keep and not clear.
|
201 |
-
*/
|
202 |
-
function clear_all( $store = true, $exceptions = array() ) {
|
203 |
-
$new_data = array();
|
204 |
-
foreach ( $exceptions as $key ) {
|
205 |
-
if ( isset( $this->_data[ $key ] ) ) {
|
206 |
-
$new_data[ $key ] = $this->_data[ $key ];
|
207 |
-
}
|
208 |
-
}
|
209 |
-
|
210 |
-
$this->_data = $new_data;
|
211 |
-
|
212 |
-
if ( $store ) {
|
213 |
-
$all_data = $this->get_all_data();
|
214 |
-
$all_data[ $this->_secondary_id ] = $this->_data;
|
215 |
-
$options_manager = $this->get_option_manager();
|
216 |
-
$options_manager->set_option( $this->_id, $all_data, true );
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Delete key-value storage.
|
222 |
-
*
|
223 |
-
* @author Vova Feldman (@svovaf)
|
224 |
-
* @since 1.0.9
|
225 |
-
*/
|
226 |
-
function delete() {
|
227 |
-
$this->_data = array();
|
228 |
-
|
229 |
-
$all_data = $this->get_all_data();
|
230 |
-
unset( $all_data[ $this->_secondary_id ] );
|
231 |
-
$options_manager = $this->get_option_manager();
|
232 |
-
$options_manager->set_option( $this->_id, $all_data, true );
|
233 |
-
}
|
234 |
-
|
235 |
-
/**
|
236 |
-
* @author Vova Feldman (@svovaf)
|
237 |
-
* @since 1.0.7
|
238 |
-
*
|
239 |
-
* @param string $key
|
240 |
-
* @param bool $store
|
241 |
-
*/
|
242 |
-
function remove( $key, $store = true ) {
|
243 |
-
if ( ! array_key_exists( $key, $this->_data ) ) {
|
244 |
-
return;
|
245 |
-
}
|
246 |
-
|
247 |
-
unset( $this->_data[ $key ] );
|
248 |
-
|
249 |
-
if ( $store ) {
|
250 |
-
$all_data = $this->get_all_data();
|
251 |
-
$all_data[ $this->_secondary_id ] = $this->_data;
|
252 |
-
$options_manager = $this->get_option_manager();
|
253 |
-
$options_manager->set_option( $this->_id, $all_data, true );
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* @author Vova Feldman (@svovaf)
|
259 |
-
* @since 1.0.7
|
260 |
-
*
|
261 |
-
* @param string $key
|
262 |
-
* @param mixed $default
|
263 |
-
*
|
264 |
-
* @return bool|\FS_Plugin
|
265 |
-
*/
|
266 |
-
function get( $key, $default = false ) {
|
267 |
-
return array_key_exists( $key, $this->_data ) ?
|
268 |
-
$this->_data[ $key ] :
|
269 |
-
$default;
|
270 |
-
}
|
271 |
-
|
272 |
-
/**
|
273 |
-
* @author Vova Feldman (@svovaf)
|
274 |
-
* @since 2.0.0
|
275 |
-
*
|
276 |
-
* @return string
|
277 |
-
*/
|
278 |
-
function get_secondary_id() {
|
279 |
-
return $this->_secondary_id;
|
280 |
-
}
|
281 |
-
|
282 |
-
|
283 |
-
/* ArrayAccess + Magic Access (better for refactoring)
|
284 |
-
-----------------------------------------------------------------------------------*/
|
285 |
-
function __set( $k, $v ) {
|
286 |
-
$this->store( $k, $v );
|
287 |
-
}
|
288 |
-
|
289 |
-
function __isset( $k ) {
|
290 |
-
return array_key_exists( $k, $this->_data );
|
291 |
-
}
|
292 |
-
|
293 |
-
function __unset( $k ) {
|
294 |
-
$this->remove( $k );
|
295 |
-
}
|
296 |
-
|
297 |
-
function __get( $k ) {
|
298 |
-
return $this->get( $k, null );
|
299 |
-
}
|
300 |
-
|
301 |
-
function offsetSet( $k, $v ) {
|
302 |
-
if ( is_null( $k ) ) {
|
303 |
-
throw new Exception( 'Can\'t append value to request params.' );
|
304 |
-
} else {
|
305 |
-
$this->{$k} = $v;
|
306 |
-
}
|
307 |
-
}
|
308 |
-
|
309 |
-
function offsetExists( $k ) {
|
310 |
-
return array_key_exists( $k, $this->_data );
|
311 |
-
}
|
312 |
-
|
313 |
-
function offsetUnset( $k ) {
|
314 |
-
unset( $this->$k );
|
315 |
-
}
|
316 |
-
|
317 |
-
function offsetGet( $k ) {
|
318 |
-
return $this->get( $k, null );
|
319 |
-
}
|
320 |
-
|
321 |
-
/**
|
322 |
-
* (PHP 5 >= 5.0.0)<br/>
|
323 |
-
* Return the current element
|
324 |
-
*
|
325 |
-
* @link http://php.net/manual/en/iterator.current.php
|
326 |
-
* @return mixed Can return any type.
|
327 |
-
*/
|
328 |
-
public function current() {
|
329 |
-
return current( $this->_data );
|
330 |
-
}
|
331 |
-
|
332 |
-
/**
|
333 |
-
* (PHP 5 >= 5.0.0)<br/>
|
334 |
-
* Move forward to next element
|
335 |
-
*
|
336 |
-
* @link http://php.net/manual/en/iterator.next.php
|
337 |
-
* @return void Any returned value is ignored.
|
338 |
-
*/
|
339 |
-
public function next() {
|
340 |
-
next( $this->_data );
|
341 |
-
}
|
342 |
-
|
343 |
-
/**
|
344 |
-
* (PHP 5 >= 5.0.0)<br/>
|
345 |
-
* Return the key of the current element
|
346 |
-
*
|
347 |
-
* @link http://php.net/manual/en/iterator.key.php
|
348 |
-
* @return mixed scalar on success, or null on failure.
|
349 |
-
*/
|
350 |
-
public function key() {
|
351 |
-
return key( $this->_data );
|
352 |
-
}
|
353 |
-
|
354 |
-
/**
|
355 |
-
* (PHP 5 >= 5.0.0)<br/>
|
356 |
-
* Checks if current position is valid
|
357 |
-
*
|
358 |
-
* @link http://php.net/manual/en/iterator.valid.php
|
359 |
-
* @return boolean The return value will be casted to boolean and then evaluated.
|
360 |
-
* Returns true on success or false on failure.
|
361 |
-
*/
|
362 |
-
public function valid() {
|
363 |
-
$key = key( $this->_data );
|
364 |
-
|
365 |
-
return ( $key !== null && $key !== false );
|
366 |
-
}
|
367 |
-
|
368 |
-
/**
|
369 |
-
* (PHP 5 >= 5.0.0)<br/>
|
370 |
-
* Rewind the Iterator to the first element
|
371 |
-
*
|
372 |
-
* @link http://php.net/manual/en/iterator.rewind.php
|
373 |
-
* @return void Any returned value is ignored.
|
374 |
-
*/
|
375 |
-
public function rewind() {
|
376 |
-
reset( $this->_data );
|
377 |
-
}
|
378 |
-
|
379 |
-
/**
|
380 |
-
* (PHP 5 >= 5.1.0)<br/>
|
381 |
-
* Count elements of an object
|
382 |
-
*
|
383 |
-
* @link http://php.net/manual/en/countable.count.php
|
384 |
-
* @return int The custom count as an integer.
|
385 |
-
* </p>
|
386 |
-
* <p>
|
387 |
-
* The return value is cast to an integer.
|
388 |
-
*/
|
389 |
-
public function count() {
|
390 |
-
return count( $this->_data );
|
391 |
-
}
|
392 |
}
|
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.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class FS_Key_Value_Storage
|
15 |
+
*
|
16 |
+
* @property int $install_timestamp
|
17 |
+
* @property int $activation_timestamp
|
18 |
+
* @property int $sync_timestamp
|
19 |
+
* @property object $sync_cron
|
20 |
+
* @property int $install_sync_timestamp
|
21 |
+
* @property array $connectivity_test
|
22 |
+
* @property array $is_on
|
23 |
+
* @property object $trial_plan
|
24 |
+
* @property bool $has_trial_plan
|
25 |
+
* @property bool $trial_promotion_shown
|
26 |
+
* @property string $sdk_version
|
27 |
+
* @property string $sdk_last_version
|
28 |
+
* @property bool $sdk_upgrade_mode
|
29 |
+
* @property bool $sdk_downgrade_mode
|
30 |
+
* @property bool $plugin_upgrade_mode
|
31 |
+
* @property bool $plugin_downgrade_mode
|
32 |
+
* @property string $plugin_version
|
33 |
+
* @property string $plugin_last_version
|
34 |
+
* @property bool $is_plugin_new_install
|
35 |
+
* @property bool $was_plugin_loaded
|
36 |
+
* @property object $plugin_main_file
|
37 |
+
* @property bool $prev_is_premium
|
38 |
+
* @property array $is_anonymous
|
39 |
+
* @property bool $is_pending_activation
|
40 |
+
* @property bool $sticky_optin_added
|
41 |
+
* @property object $uninstall_reason
|
42 |
+
* @property object $subscription
|
43 |
+
*/
|
44 |
+
class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
|
45 |
+
/**
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
protected $_id;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @since 1.2.2
|
52 |
+
*
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
protected $_secondary_id;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @since 2.0.0
|
59 |
+
* @var int The ID of the blog that is associated with the current site level options.
|
60 |
+
*/
|
61 |
+
private $_blog_id = 0;
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @since 2.0.0
|
65 |
+
* @var bool
|
66 |
+
*/
|
67 |
+
private $_is_multisite_storage;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @var array
|
71 |
+
*/
|
72 |
+
protected $_data;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @var FS_Key_Value_Storage[]
|
76 |
+
*/
|
77 |
+
private static $_instances = array();
|
78 |
+
|
79 |
+
/**
|
80 |
+
* @var FS_Logger
|
81 |
+
*/
|
82 |
+
protected $_logger;
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @param string $id
|
86 |
+
* @param string $secondary_id
|
87 |
+
* @param bool $network_level_or_blog_id
|
88 |
+
*
|
89 |
+
* @return FS_Key_Value_Storage
|
90 |
+
*/
|
91 |
+
static function instance( $id, $secondary_id, $network_level_or_blog_id = false ) {
|
92 |
+
$key = $id . ':' . $secondary_id;
|
93 |
+
|
94 |
+
if ( is_multisite() ) {
|
95 |
+
if ( true === $network_level_or_blog_id ) {
|
96 |
+
$key .= ':ms';
|
97 |
+
} else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
|
98 |
+
$key .= ":{$network_level_or_blog_id}";
|
99 |
+
} else {
|
100 |
+
$network_level_or_blog_id = get_current_blog_id();
|
101 |
+
|
102 |
+
$key .= ":{$network_level_or_blog_id}";
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
107 |
+
self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id, $network_level_or_blog_id );
|
108 |
+
}
|
109 |
+
|
110 |
+
return self::$_instances[ $key ];
|
111 |
+
}
|
112 |
+
|
113 |
+
protected function __construct( $id, $secondary_id, $network_level_or_blog_id = false ) {
|
114 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
115 |
+
|
116 |
+
$this->_id = $id;
|
117 |
+
$this->_secondary_id = $secondary_id;
|
118 |
+
|
119 |
+
if ( is_multisite() ) {
|
120 |
+
$this->_is_multisite_storage = ( true === $network_level_or_blog_id );
|
121 |
+
|
122 |
+
if ( is_numeric( $network_level_or_blog_id ) ) {
|
123 |
+
$this->_blog_id = $network_level_or_blog_id;
|
124 |
+
}
|
125 |
+
} else {
|
126 |
+
$this->_is_multisite_storage = false;
|
127 |
+
}
|
128 |
+
|
129 |
+
$this->load();
|
130 |
+
}
|
131 |
+
|
132 |
+
protected function get_option_manager() {
|
133 |
+
return FS_Option_Manager::get_manager(
|
134 |
+
WP_FS__ACCOUNTS_OPTION_NAME,
|
135 |
+
true,
|
136 |
+
$this->_is_multisite_storage ?
|
137 |
+
true :
|
138 |
+
( $this->_blog_id > 0 ? $this->_blog_id : false )
|
139 |
+
);
|
140 |
+
}
|
141 |
+
|
142 |
+
protected function get_all_data() {
|
143 |
+
return $this->get_option_manager()->get_option( $this->_id, array() );
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Load plugin data from local DB.
|
148 |
+
*
|
149 |
+
* @author Vova Feldman (@svovaf)
|
150 |
+
* @since 1.0.7
|
151 |
+
*/
|
152 |
+
function load() {
|
153 |
+
$all_plugins_data = $this->get_all_data();
|
154 |
+
$this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
|
155 |
+
$all_plugins_data[ $this->_secondary_id ] :
|
156 |
+
array();
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* @author Vova Feldman (@svovaf)
|
161 |
+
* @since 1.0.7
|
162 |
+
*
|
163 |
+
* @param string $key
|
164 |
+
* @param mixed $value
|
165 |
+
* @param bool $flush
|
166 |
+
*/
|
167 |
+
function store( $key, $value, $flush = true ) {
|
168 |
+
if ( $this->_logger->is_on() ) {
|
169 |
+
$this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
|
170 |
+
}
|
171 |
+
|
172 |
+
if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
|
173 |
+
// No need to store data if the value wasn't changed.
|
174 |
+
return;
|
175 |
+
}
|
176 |
+
|
177 |
+
$all_data = $this->get_all_data();
|
178 |
+
|
179 |
+
$this->_data[ $key ] = $value;
|
180 |
+
|
181 |
+
$all_data[ $this->_secondary_id ] = $this->_data;
|
182 |
+
|
183 |
+
$options_manager = $this->get_option_manager();
|
184 |
+
$options_manager->set_option( $this->_id, $all_data, $flush );
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* @author Vova Feldman (@svovaf)
|
189 |
+
* @since 2.0.0
|
190 |
+
*/
|
191 |
+
function save() {
|
192 |
+
$this->get_option_manager()->store();
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* @author Vova Feldman (@svovaf)
|
197 |
+
* @since 1.0.7
|
198 |
+
*
|
199 |
+
* @param bool $store
|
200 |
+
* @param string[] $exceptions Set of keys to keep and not clear.
|
201 |
+
*/
|
202 |
+
function clear_all( $store = true, $exceptions = array() ) {
|
203 |
+
$new_data = array();
|
204 |
+
foreach ( $exceptions as $key ) {
|
205 |
+
if ( isset( $this->_data[ $key ] ) ) {
|
206 |
+
$new_data[ $key ] = $this->_data[ $key ];
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
$this->_data = $new_data;
|
211 |
+
|
212 |
+
if ( $store ) {
|
213 |
+
$all_data = $this->get_all_data();
|
214 |
+
$all_data[ $this->_secondary_id ] = $this->_data;
|
215 |
+
$options_manager = $this->get_option_manager();
|
216 |
+
$options_manager->set_option( $this->_id, $all_data, true );
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Delete key-value storage.
|
222 |
+
*
|
223 |
+
* @author Vova Feldman (@svovaf)
|
224 |
+
* @since 1.0.9
|
225 |
+
*/
|
226 |
+
function delete() {
|
227 |
+
$this->_data = array();
|
228 |
+
|
229 |
+
$all_data = $this->get_all_data();
|
230 |
+
unset( $all_data[ $this->_secondary_id ] );
|
231 |
+
$options_manager = $this->get_option_manager();
|
232 |
+
$options_manager->set_option( $this->_id, $all_data, true );
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* @author Vova Feldman (@svovaf)
|
237 |
+
* @since 1.0.7
|
238 |
+
*
|
239 |
+
* @param string $key
|
240 |
+
* @param bool $store
|
241 |
+
*/
|
242 |
+
function remove( $key, $store = true ) {
|
243 |
+
if ( ! array_key_exists( $key, $this->_data ) ) {
|
244 |
+
return;
|
245 |
+
}
|
246 |
+
|
247 |
+
unset( $this->_data[ $key ] );
|
248 |
+
|
249 |
+
if ( $store ) {
|
250 |
+
$all_data = $this->get_all_data();
|
251 |
+
$all_data[ $this->_secondary_id ] = $this->_data;
|
252 |
+
$options_manager = $this->get_option_manager();
|
253 |
+
$options_manager->set_option( $this->_id, $all_data, true );
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* @author Vova Feldman (@svovaf)
|
259 |
+
* @since 1.0.7
|
260 |
+
*
|
261 |
+
* @param string $key
|
262 |
+
* @param mixed $default
|
263 |
+
*
|
264 |
+
* @return bool|\FS_Plugin
|
265 |
+
*/
|
266 |
+
function get( $key, $default = false ) {
|
267 |
+
return array_key_exists( $key, $this->_data ) ?
|
268 |
+
$this->_data[ $key ] :
|
269 |
+
$default;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* @author Vova Feldman (@svovaf)
|
274 |
+
* @since 2.0.0
|
275 |
+
*
|
276 |
+
* @return string
|
277 |
+
*/
|
278 |
+
function get_secondary_id() {
|
279 |
+
return $this->_secondary_id;
|
280 |
+
}
|
281 |
+
|
282 |
+
|
283 |
+
/* ArrayAccess + Magic Access (better for refactoring)
|
284 |
+
-----------------------------------------------------------------------------------*/
|
285 |
+
function __set( $k, $v ) {
|
286 |
+
$this->store( $k, $v );
|
287 |
+
}
|
288 |
+
|
289 |
+
function __isset( $k ) {
|
290 |
+
return array_key_exists( $k, $this->_data );
|
291 |
+
}
|
292 |
+
|
293 |
+
function __unset( $k ) {
|
294 |
+
$this->remove( $k );
|
295 |
+
}
|
296 |
+
|
297 |
+
function __get( $k ) {
|
298 |
+
return $this->get( $k, null );
|
299 |
+
}
|
300 |
+
|
301 |
+
function offsetSet( $k, $v ) {
|
302 |
+
if ( is_null( $k ) ) {
|
303 |
+
throw new Exception( 'Can\'t append value to request params.' );
|
304 |
+
} else {
|
305 |
+
$this->{$k} = $v;
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
function offsetExists( $k ) {
|
310 |
+
return array_key_exists( $k, $this->_data );
|
311 |
+
}
|
312 |
+
|
313 |
+
function offsetUnset( $k ) {
|
314 |
+
unset( $this->$k );
|
315 |
+
}
|
316 |
+
|
317 |
+
function offsetGet( $k ) {
|
318 |
+
return $this->get( $k, null );
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* (PHP 5 >= 5.0.0)<br/>
|
323 |
+
* Return the current element
|
324 |
+
*
|
325 |
+
* @link http://php.net/manual/en/iterator.current.php
|
326 |
+
* @return mixed Can return any type.
|
327 |
+
*/
|
328 |
+
public function current() {
|
329 |
+
return current( $this->_data );
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* (PHP 5 >= 5.0.0)<br/>
|
334 |
+
* Move forward to next element
|
335 |
+
*
|
336 |
+
* @link http://php.net/manual/en/iterator.next.php
|
337 |
+
* @return void Any returned value is ignored.
|
338 |
+
*/
|
339 |
+
public function next() {
|
340 |
+
next( $this->_data );
|
341 |
+
}
|
342 |
+
|
343 |
+
/**
|
344 |
+
* (PHP 5 >= 5.0.0)<br/>
|
345 |
+
* Return the key of the current element
|
346 |
+
*
|
347 |
+
* @link http://php.net/manual/en/iterator.key.php
|
348 |
+
* @return mixed scalar on success, or null on failure.
|
349 |
+
*/
|
350 |
+
public function key() {
|
351 |
+
return key( $this->_data );
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* (PHP 5 >= 5.0.0)<br/>
|
356 |
+
* Checks if current position is valid
|
357 |
+
*
|
358 |
+
* @link http://php.net/manual/en/iterator.valid.php
|
359 |
+
* @return boolean The return value will be casted to boolean and then evaluated.
|
360 |
+
* Returns true on success or false on failure.
|
361 |
+
*/
|
362 |
+
public function valid() {
|
363 |
+
$key = key( $this->_data );
|
364 |
+
|
365 |
+
return ( $key !== null && $key !== false );
|
366 |
+
}
|
367 |
+
|
368 |
+
/**
|
369 |
+
* (PHP 5 >= 5.0.0)<br/>
|
370 |
+
* Rewind the Iterator to the first element
|
371 |
+
*
|
372 |
+
* @link http://php.net/manual/en/iterator.rewind.php
|
373 |
+
* @return void Any returned value is ignored.
|
374 |
+
*/
|
375 |
+
public function rewind() {
|
376 |
+
reset( $this->_data );
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* (PHP 5 >= 5.1.0)<br/>
|
381 |
+
* Count elements of an object
|
382 |
+
*
|
383 |
+
* @link http://php.net/manual/en/countable.count.php
|
384 |
+
* @return int The custom count as an integer.
|
385 |
+
* </p>
|
386 |
+
* <p>
|
387 |
+
* The return value is cast to an integer.
|
388 |
+
*/
|
389 |
+
public function count() {
|
390 |
+
return count( $this->_data );
|
391 |
+
}
|
392 |
}
|
includes/freemius/includes/managers/class-fs-license-manager.php
CHANGED
@@ -1,104 +1,104 @@
|
|
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.6
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_License_Manager /*extends FS_Abstract_Manager*/
|
14 |
-
{
|
15 |
-
//
|
16 |
-
//
|
17 |
-
// /**
|
18 |
-
// * @var FS_License_Manager[]
|
19 |
-
// */
|
20 |
-
// private static $_instances = array();
|
21 |
-
//
|
22 |
-
// static function instance( Freemius $fs ) {
|
23 |
-
// $slug = strtolower( $fs->get_slug() );
|
24 |
-
//
|
25 |
-
// if ( ! isset( self::$_instances[ $slug ] ) ) {
|
26 |
-
// self::$_instances[ $slug ] = new FS_License_Manager( $slug, $fs );
|
27 |
-
// }
|
28 |
-
//
|
29 |
-
// return self::$_instances[ $slug ];
|
30 |
-
// }
|
31 |
-
//
|
32 |
-
//// private function __construct($slug) {
|
33 |
-
//// parent::__construct($slug);
|
34 |
-
//// }
|
35 |
-
//
|
36 |
-
// function entry_id() {
|
37 |
-
// return 'licenses';
|
38 |
-
// }
|
39 |
-
//
|
40 |
-
// function sync( $id ) {
|
41 |
-
//
|
42 |
-
// }
|
43 |
-
//
|
44 |
-
// /**
|
45 |
-
// * @author Vova Feldman (@svovaf)
|
46 |
-
// * @since 1.0.5
|
47 |
-
// * @uses FS_Api
|
48 |
-
// *
|
49 |
-
// * @param number|bool $plugin_id
|
50 |
-
// *
|
51 |
-
// * @return FS_Plugin_License[]|stdClass Licenses or API error.
|
52 |
-
// */
|
53 |
-
// function api_get_user_plugin_licenses( $plugin_id = false ) {
|
54 |
-
// $api = $this->_fs->get_api_user_scope();
|
55 |
-
//
|
56 |
-
// if ( ! is_numeric( $plugin_id ) ) {
|
57 |
-
// $plugin_id = $this->_fs->get_id();
|
58 |
-
// }
|
59 |
-
//
|
60 |
-
// $result = $api->call( "/plugins/{$plugin_id}/licenses.json" );
|
61 |
-
//
|
62 |
-
// if ( ! isset( $result->error ) ) {
|
63 |
-
// for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
|
64 |
-
// $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
|
65 |
-
// }
|
66 |
-
//
|
67 |
-
// $result = $result->licenses;
|
68 |
-
// }
|
69 |
-
//
|
70 |
-
// return $result;
|
71 |
-
// }
|
72 |
-
//
|
73 |
-
// function api_get_many() {
|
74 |
-
//
|
75 |
-
// }
|
76 |
-
//
|
77 |
-
// function api_activate( $id ) {
|
78 |
-
//
|
79 |
-
// }
|
80 |
-
//
|
81 |
-
// function api_deactivate( $id ) {
|
82 |
-
//
|
83 |
-
// }
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @param FS_Plugin_License[] $licenses
|
87 |
-
*
|
88 |
-
* @return bool
|
89 |
-
*/
|
90 |
-
static function has_premium_license( $licenses ) {
|
91 |
-
if ( is_array( $licenses ) ) {
|
92 |
-
foreach ( $licenses as $license ) {
|
93 |
-
/**
|
94 |
-
* @var FS_Plugin_License $license
|
95 |
-
*/
|
96 |
-
if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
|
97 |
-
return true;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
return false;
|
103 |
-
}
|
104 |
}
|
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.6
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_License_Manager /*extends FS_Abstract_Manager*/
|
14 |
+
{
|
15 |
+
//
|
16 |
+
//
|
17 |
+
// /**
|
18 |
+
// * @var FS_License_Manager[]
|
19 |
+
// */
|
20 |
+
// private static $_instances = array();
|
21 |
+
//
|
22 |
+
// static function instance( Freemius $fs ) {
|
23 |
+
// $slug = strtolower( $fs->get_slug() );
|
24 |
+
//
|
25 |
+
// if ( ! isset( self::$_instances[ $slug ] ) ) {
|
26 |
+
// self::$_instances[ $slug ] = new FS_License_Manager( $slug, $fs );
|
27 |
+
// }
|
28 |
+
//
|
29 |
+
// return self::$_instances[ $slug ];
|
30 |
+
// }
|
31 |
+
//
|
32 |
+
//// private function __construct($slug) {
|
33 |
+
//// parent::__construct($slug);
|
34 |
+
//// }
|
35 |
+
//
|
36 |
+
// function entry_id() {
|
37 |
+
// return 'licenses';
|
38 |
+
// }
|
39 |
+
//
|
40 |
+
// function sync( $id ) {
|
41 |
+
//
|
42 |
+
// }
|
43 |
+
//
|
44 |
+
// /**
|
45 |
+
// * @author Vova Feldman (@svovaf)
|
46 |
+
// * @since 1.0.5
|
47 |
+
// * @uses FS_Api
|
48 |
+
// *
|
49 |
+
// * @param number|bool $plugin_id
|
50 |
+
// *
|
51 |
+
// * @return FS_Plugin_License[]|stdClass Licenses or API error.
|
52 |
+
// */
|
53 |
+
// function api_get_user_plugin_licenses( $plugin_id = false ) {
|
54 |
+
// $api = $this->_fs->get_api_user_scope();
|
55 |
+
//
|
56 |
+
// if ( ! is_numeric( $plugin_id ) ) {
|
57 |
+
// $plugin_id = $this->_fs->get_id();
|
58 |
+
// }
|
59 |
+
//
|
60 |
+
// $result = $api->call( "/plugins/{$plugin_id}/licenses.json" );
|
61 |
+
//
|
62 |
+
// if ( ! isset( $result->error ) ) {
|
63 |
+
// for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
|
64 |
+
// $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
|
65 |
+
// }
|
66 |
+
//
|
67 |
+
// $result = $result->licenses;
|
68 |
+
// }
|
69 |
+
//
|
70 |
+
// return $result;
|
71 |
+
// }
|
72 |
+
//
|
73 |
+
// function api_get_many() {
|
74 |
+
//
|
75 |
+
// }
|
76 |
+
//
|
77 |
+
// function api_activate( $id ) {
|
78 |
+
//
|
79 |
+
// }
|
80 |
+
//
|
81 |
+
// function api_deactivate( $id ) {
|
82 |
+
//
|
83 |
+
// }
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @param FS_Plugin_License[] $licenses
|
87 |
+
*
|
88 |
+
* @return bool
|
89 |
+
*/
|
90 |
+
static function has_premium_license( $licenses ) {
|
91 |
+
if ( is_array( $licenses ) ) {
|
92 |
+
foreach ( $licenses as $license ) {
|
93 |
+
/**
|
94 |
+
* @var FS_Plugin_License $license
|
95 |
+
*/
|
96 |
+
if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
|
97 |
+
return true;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return false;
|
103 |
+
}
|
104 |
}
|
includes/freemius/includes/managers/class-fs-option-manager.php
CHANGED
@@ -1,497 +1,521 @@
|
|
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 |
-
* 3-layer lazy options manager.
|
15 |
-
* layer 3: Memory
|
16 |
-
* layer 2: Cache (if there's any caching plugin and if WP_FS__DEBUG_SDK is FALSE)
|
17 |
-
* layer 1: Database (options table). All options stored as one option record in the DB to reduce number of DB
|
18 |
-
* queries.
|
19 |
-
*
|
20 |
-
* If load() is not explicitly called, starts as empty manager. Same thing about saving the data - you have to
|
21 |
-
* explicitly call store().
|
22 |
-
*
|
23 |
-
* Class Freemius_Option_Manager
|
24 |
-
*/
|
25 |
-
class FS_Option_Manager {
|
26 |
-
/**
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
private $_id;
|
30 |
-
/**
|
31 |
-
* @var array|object
|
32 |
-
*/
|
33 |
-
private $_options;
|
34 |
-
/**
|
35 |
-
* @var FS_Logger
|
36 |
-
*/
|
37 |
-
private $_logger;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @since 2.0.0
|
41 |
-
* @var int The ID of the blog that is associated with the current site level options.
|
42 |
-
*/
|
43 |
-
private $_blog_id = 0;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @since 2.0.0
|
47 |
-
* @var bool
|
48 |
-
*/
|
49 |
-
private $_is_network_storage;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @var
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
*
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
* @
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
$
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
$
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
$
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
if ( $
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$
|
180 |
-
|
181 |
-
|
182 |
-
$
|
183 |
-
}
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
*
|
230 |
-
*
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
*
|
327 |
-
*
|
328 |
-
*
|
329 |
-
*
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
if ( $this->
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
}
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
*
|
447 |
-
*
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
if (
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* 3-layer lazy options manager.
|
15 |
+
* layer 3: Memory
|
16 |
+
* layer 2: Cache (if there's any caching plugin and if WP_FS__DEBUG_SDK is FALSE)
|
17 |
+
* layer 1: Database (options table). All options stored as one option record in the DB to reduce number of DB
|
18 |
+
* queries.
|
19 |
+
*
|
20 |
+
* If load() is not explicitly called, starts as empty manager. Same thing about saving the data - you have to
|
21 |
+
* explicitly call store().
|
22 |
+
*
|
23 |
+
* Class Freemius_Option_Manager
|
24 |
+
*/
|
25 |
+
class FS_Option_Manager {
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $_id;
|
30 |
+
/**
|
31 |
+
* @var array|object
|
32 |
+
*/
|
33 |
+
private $_options;
|
34 |
+
/**
|
35 |
+
* @var FS_Logger
|
36 |
+
*/
|
37 |
+
private $_logger;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @since 2.0.0
|
41 |
+
* @var int The ID of the blog that is associated with the current site level options.
|
42 |
+
*/
|
43 |
+
private $_blog_id = 0;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @since 2.0.0
|
47 |
+
* @var bool
|
48 |
+
*/
|
49 |
+
private $_is_network_storage;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @var bool|null
|
53 |
+
*/
|
54 |
+
private $_autoload;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @var array[string]FS_Option_Manager {
|
58 |
+
* @key string
|
59 |
+
* @value FS_Option_Manager
|
60 |
+
* }
|
61 |
+
*/
|
62 |
+
private static $_MANAGERS = array();
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @author Vova Feldman (@svovaf)
|
66 |
+
* @since 1.0.3
|
67 |
+
*
|
68 |
+
* @param string $id
|
69 |
+
* @param bool $load
|
70 |
+
* @param bool|int $network_level_or_blog_id Since 2.0.0
|
71 |
+
* @param bool|null $autoload
|
72 |
+
*/
|
73 |
+
private function __construct(
|
74 |
+
$id,
|
75 |
+
$load = false,
|
76 |
+
$network_level_or_blog_id = false,
|
77 |
+
$autoload = null
|
78 |
+
) {
|
79 |
+
$id = strtolower( $id );
|
80 |
+
|
81 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_opt_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
82 |
+
|
83 |
+
$this->_logger->entrance();
|
84 |
+
$this->_logger->log( 'id = ' . $id );
|
85 |
+
|
86 |
+
$this->_id = $id;
|
87 |
+
|
88 |
+
$this->_autoload = $autoload;
|
89 |
+
|
90 |
+
if ( is_multisite() ) {
|
91 |
+
$this->_is_network_storage = ( true === $network_level_or_blog_id );
|
92 |
+
|
93 |
+
if ( is_numeric( $network_level_or_blog_id ) ) {
|
94 |
+
$this->_blog_id = $network_level_or_blog_id;
|
95 |
+
}
|
96 |
+
} else {
|
97 |
+
$this->_is_network_storage = false;
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( $load ) {
|
101 |
+
$this->load();
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @author Vova Feldman (@svovaf)
|
107 |
+
* @since 1.0.3
|
108 |
+
*
|
109 |
+
* @param string $id
|
110 |
+
* @param bool $load
|
111 |
+
* @param bool|int $network_level_or_blog_id Since 2.0.0
|
112 |
+
* @param bool|null $autoload
|
113 |
+
*
|
114 |
+
* @return \FS_Option_Manager
|
115 |
+
*/
|
116 |
+
static function get_manager(
|
117 |
+
$id,
|
118 |
+
$load = false,
|
119 |
+
$network_level_or_blog_id = false,
|
120 |
+
$autoload = null
|
121 |
+
) {
|
122 |
+
$key = strtolower( $id );
|
123 |
+
|
124 |
+
if ( is_multisite() ) {
|
125 |
+
if ( true === $network_level_or_blog_id ) {
|
126 |
+
$key .= ':ms';
|
127 |
+
} else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
|
128 |
+
$key .= ":{$network_level_or_blog_id}";
|
129 |
+
} else {
|
130 |
+
$network_level_or_blog_id = get_current_blog_id();
|
131 |
+
|
132 |
+
$key .= ":{$network_level_or_blog_id}";
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
if ( ! isset( self::$_MANAGERS[ $key ] ) ) {
|
137 |
+
self::$_MANAGERS[ $key ] = new FS_Option_Manager(
|
138 |
+
$id,
|
139 |
+
$load,
|
140 |
+
$network_level_or_blog_id,
|
141 |
+
$autoload
|
142 |
+
);
|
143 |
+
} // If load required but not yet loaded, load.
|
144 |
+
else if ( $load && ! self::$_MANAGERS[ $key ]->is_loaded() ) {
|
145 |
+
self::$_MANAGERS[ $key ]->load();
|
146 |
+
}
|
147 |
+
|
148 |
+
return self::$_MANAGERS[ $key ];
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @author Vova Feldman (@svovaf)
|
153 |
+
* @since 1.0.3
|
154 |
+
*
|
155 |
+
* @param bool $flush
|
156 |
+
*/
|
157 |
+
function load( $flush = false ) {
|
158 |
+
$this->_logger->entrance();
|
159 |
+
|
160 |
+
$option_name = $this->get_option_manager_name();
|
161 |
+
|
162 |
+
if ( $flush || ! isset( $this->_options ) ) {
|
163 |
+
if ( isset( $this->_options ) ) {
|
164 |
+
// Clear prev options.
|
165 |
+
$this->clear();
|
166 |
+
}
|
167 |
+
|
168 |
+
$cache_group = $this->get_cache_group();
|
169 |
+
|
170 |
+
if ( WP_FS__DEBUG_SDK ) {
|
171 |
+
|
172 |
+
// Don't use cache layer in DEBUG mode.
|
173 |
+
$load_options = empty( $this->_options );
|
174 |
+
|
175 |
+
} else {
|
176 |
+
|
177 |
+
$this->_options = wp_cache_get(
|
178 |
+
$option_name,
|
179 |
+
$cache_group
|
180 |
+
);
|
181 |
+
|
182 |
+
$load_options = ( false === $this->_options );
|
183 |
+
}
|
184 |
+
|
185 |
+
$cached = true;
|
186 |
+
|
187 |
+
if ( $load_options ) {
|
188 |
+
if ( $this->_is_network_storage ) {
|
189 |
+
$this->_options = get_site_option( $option_name );
|
190 |
+
} else if ( $this->_blog_id > 0 ) {
|
191 |
+
$this->_options = get_blog_option( $this->_blog_id, $option_name );
|
192 |
+
} else {
|
193 |
+
$this->_options = get_option( $option_name );
|
194 |
+
}
|
195 |
+
|
196 |
+
if ( is_string( $this->_options ) ) {
|
197 |
+
$this->_options = json_decode( $this->_options );
|
198 |
+
}
|
199 |
+
|
200 |
+
// $this->_logger->info('get_option = ' . var_export($this->_options, true));
|
201 |
+
|
202 |
+
if ( false === $this->_options ) {
|
203 |
+
$this->clear();
|
204 |
+
}
|
205 |
+
|
206 |
+
$cached = false;
|
207 |
+
}
|
208 |
+
|
209 |
+
if ( ! WP_FS__DEBUG_SDK && ! $cached ) {
|
210 |
+
// Set non encoded cache.
|
211 |
+
wp_cache_set( $option_name, $this->_options, $cache_group );
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* @author Vova Feldman (@svovaf)
|
218 |
+
* @since 1.0.3
|
219 |
+
*
|
220 |
+
* @return bool
|
221 |
+
*/
|
222 |
+
function is_loaded() {
|
223 |
+
return isset( $this->_options );
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* @author Vova Feldman (@svovaf)
|
228 |
+
* @since 1.0.3
|
229 |
+
*
|
230 |
+
* @return bool
|
231 |
+
*/
|
232 |
+
function is_empty() {
|
233 |
+
return ( $this->is_loaded() && false === $this->_options );
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* @author Vova Feldman (@svovaf)
|
238 |
+
* @since 1.0.6
|
239 |
+
*
|
240 |
+
* @param bool $flush
|
241 |
+
*/
|
242 |
+
function clear( $flush = false ) {
|
243 |
+
$this->_logger->entrance();
|
244 |
+
|
245 |
+
$this->_options = array();
|
246 |
+
|
247 |
+
if ( $flush ) {
|
248 |
+
$this->store();
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Delete options manager from DB.
|
254 |
+
*
|
255 |
+
* @author Vova Feldman (@svovaf)
|
256 |
+
* @since 1.0.9
|
257 |
+
*/
|
258 |
+
function delete() {
|
259 |
+
$option_name = $this->get_option_manager_name();
|
260 |
+
|
261 |
+
if ( $this->_is_network_storage ) {
|
262 |
+
delete_site_option( $option_name );
|
263 |
+
} else if ( $this->_blog_id > 0 ) {
|
264 |
+
delete_blog_option( $this->_blog_id, $option_name );
|
265 |
+
} else {
|
266 |
+
delete_option( $option_name );
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* @author Vova Feldman (@svovaf)
|
272 |
+
* @since 1.0.6
|
273 |
+
*
|
274 |
+
* @param string $option
|
275 |
+
*
|
276 |
+
* @return bool
|
277 |
+
*/
|
278 |
+
function has_option( $option ) {
|
279 |
+
return array_key_exists( $option, $this->_options );
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* @author Vova Feldman (@svovaf)
|
284 |
+
* @since 1.0.3
|
285 |
+
*
|
286 |
+
* @param string $option
|
287 |
+
* @param mixed $default
|
288 |
+
*
|
289 |
+
* @return mixed
|
290 |
+
*/
|
291 |
+
function get_option( $option, $default = null ) {
|
292 |
+
$this->_logger->entrance( 'option = ' . $option );
|
293 |
+
|
294 |
+
if ( ! $this->is_loaded() ) {
|
295 |
+
$this->load();
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( is_array( $this->_options ) ) {
|
299 |
+
$value = isset( $this->_options[ $option ] ) ?
|
300 |
+
$this->_options[ $option ] :
|
301 |
+
$default;
|
302 |
+
} else if ( is_object( $this->_options ) ) {
|
303 |
+
$value = isset( $this->_options->{$option} ) ?
|
304 |
+
$this->_options->{$option} :
|
305 |
+
$default;
|
306 |
+
} else {
|
307 |
+
$value = $default;
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* If it's an object, return a clone of the object, otherwise,
|
312 |
+
* external changes of the object will actually change the value
|
313 |
+
* of the object in the options manager which may lead to an unexpected
|
314 |
+
* behaviour and data integrity when a store() call is triggered.
|
315 |
+
*
|
316 |
+
* Example:
|
317 |
+
* $object1 = $options->get_option( 'object1' );
|
318 |
+
* $object1->x = 123;
|
319 |
+
*
|
320 |
+
* $object2 = $options->get_option( 'object2' );
|
321 |
+
* $object2->y = 'dummy';
|
322 |
+
*
|
323 |
+
* $options->set_option( 'object2', $object2, true );
|
324 |
+
*
|
325 |
+
* If we don't return a clone of option 'object1', setting 'object2'
|
326 |
+
* will also store the updated value of 'object1' which is quite not
|
327 |
+
* an expected behaviour.
|
328 |
+
*
|
329 |
+
* @author Vova Feldman
|
330 |
+
*/
|
331 |
+
return is_object( $value ) ? clone $value : $value;
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* @author Vova Feldman (@svovaf)
|
336 |
+
* @since 1.0.3
|
337 |
+
*
|
338 |
+
* @param string $option
|
339 |
+
* @param mixed $value
|
340 |
+
* @param bool $flush
|
341 |
+
*/
|
342 |
+
function set_option( $option, $value, $flush = false ) {
|
343 |
+
$this->_logger->entrance( 'option = ' . $option );
|
344 |
+
|
345 |
+
if ( ! $this->is_loaded() ) {
|
346 |
+
$this->clear();
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* If it's an object, store a clone of the object, otherwise,
|
351 |
+
* external changes of the object will actually change the value
|
352 |
+
* of the object in the options manager which may lead to an unexpected
|
353 |
+
* behaviour and data integrity when a store() call is triggered.
|
354 |
+
*
|
355 |
+
* Example:
|
356 |
+
* $object1 = new stdClass();
|
357 |
+
* $object1->x = 123;
|
358 |
+
*
|
359 |
+
* $options->set_option( 'object1', $object1 );
|
360 |
+
*
|
361 |
+
* $object1->x = 456;
|
362 |
+
*
|
363 |
+
* $options->set_option( 'object2', $object2, true );
|
364 |
+
*
|
365 |
+
* If we don't set the option as a clone of option 'object1', setting 'object2'
|
366 |
+
* will also store the updated value of 'object1' ($object1->x = 456 instead of
|
367 |
+
* $object1->x = 123) which is quite not an expected behaviour.
|
368 |
+
*
|
369 |
+
* @author Vova Feldman
|
370 |
+
*/
|
371 |
+
$copy = is_object( $value ) ? clone $value : $value;
|
372 |
+
|
373 |
+
if ( is_array( $this->_options ) ) {
|
374 |
+
$this->_options[ $option ] = $copy;
|
375 |
+
} else if ( is_object( $this->_options ) ) {
|
376 |
+
$this->_options->{$option} = $copy;
|
377 |
+
}
|
378 |
+
|
379 |
+
if ( $flush ) {
|
380 |
+
$this->store();
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Unset option.
|
386 |
+
*
|
387 |
+
* @author Vova Feldman (@svovaf)
|
388 |
+
* @since 1.0.3
|
389 |
+
*
|
390 |
+
* @param string $option
|
391 |
+
* @param bool $flush
|
392 |
+
*/
|
393 |
+
function unset_option( $option, $flush = false ) {
|
394 |
+
$this->_logger->entrance( 'option = ' . $option );
|
395 |
+
|
396 |
+
if ( is_array( $this->_options ) ) {
|
397 |
+
if ( ! isset( $this->_options[ $option ] ) ) {
|
398 |
+
return;
|
399 |
+
}
|
400 |
+
|
401 |
+
unset( $this->_options[ $option ] );
|
402 |
+
|
403 |
+
} else if ( is_object( $this->_options ) ) {
|
404 |
+
if ( ! isset( $this->_options->{$option} ) ) {
|
405 |
+
return;
|
406 |
+
}
|
407 |
+
|
408 |
+
unset( $this->_options->{$option} );
|
409 |
+
}
|
410 |
+
|
411 |
+
if ( $flush ) {
|
412 |
+
$this->store();
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Dump options to database.
|
418 |
+
*
|
419 |
+
* @author Vova Feldman (@svovaf)
|
420 |
+
* @since 1.0.3
|
421 |
+
*/
|
422 |
+
function store() {
|
423 |
+
$this->_logger->entrance();
|
424 |
+
|
425 |
+
$option_name = $this->get_option_manager_name();
|
426 |
+
|
427 |
+
if ( $this->_logger->is_on() ) {
|
428 |
+
$this->_logger->info( $option_name . ' = ' . var_export( $this->_options, true ) );
|
429 |
+
}
|
430 |
+
|
431 |
+
// Update DB.
|
432 |
+
if ( $this->_is_network_storage ) {
|
433 |
+
update_site_option( $option_name, $this->_options );
|
434 |
+
} else if ( $this->_blog_id > 0 ) {
|
435 |
+
update_blog_option( $this->_blog_id, $option_name, $this->_options );
|
436 |
+
} else {
|
437 |
+
update_option( $option_name, $this->_options, $this->_autoload );
|
438 |
+
}
|
439 |
+
|
440 |
+
if ( ! WP_FS__DEBUG_SDK ) {
|
441 |
+
wp_cache_set( $option_name, $this->_options, $this->get_cache_group() );
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Get options keys.
|
447 |
+
*
|
448 |
+
* @author Vova Feldman (@svovaf)
|
449 |
+
* @since 1.0.3
|
450 |
+
*
|
451 |
+
* @return string[]
|
452 |
+
*/
|
453 |
+
function get_options_keys() {
|
454 |
+
if ( is_array( $this->_options ) ) {
|
455 |
+
return array_keys( $this->_options );
|
456 |
+
} else if ( is_object( $this->_options ) ) {
|
457 |
+
return array_keys( get_object_vars( $this->_options ) );
|
458 |
+
}
|
459 |
+
|
460 |
+
return array();
|
461 |
+
}
|
462 |
+
|
463 |
+
#--------------------------------------------------------------------------------
|
464 |
+
#region Migration
|
465 |
+
#--------------------------------------------------------------------------------
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Migrate options from site level.
|
469 |
+
*
|
470 |
+
* @author Vova Feldman (@svovaf)
|
471 |
+
* @since 2.0.0
|
472 |
+
*/
|
473 |
+
function migrate_to_network() {
|
474 |
+
$site_options = FS_Option_Manager::get_manager($this->_id, true, false);
|
475 |
+
|
476 |
+
$options = is_object( $site_options->_options ) ?
|
477 |
+
get_object_vars( $site_options->_options ) :
|
478 |
+
$site_options->_options;
|
479 |
+
|
480 |
+
if ( ! empty( $options ) ) {
|
481 |
+
foreach ( $options as $key => $val ) {
|
482 |
+
$this->set_option( $key, $val, false );
|
483 |
+
}
|
484 |
+
|
485 |
+
$this->store();
|
486 |
+
}
|
487 |
+
}
|
488 |
+
|
489 |
+
#endregion
|
490 |
+
|
491 |
+
#--------------------------------------------------------------------------------
|
492 |
+
#region Helper Methods
|
493 |
+
#--------------------------------------------------------------------------------
|
494 |
+
|
495 |
+
/**
|
496 |
+
* @return string
|
497 |
+
*/
|
498 |
+
private function get_option_manager_name() {
|
499 |
+
return $this->_id;
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* @author Vova Feldman (@svovaf)
|
504 |
+
* @since 2.0.0
|
505 |
+
*
|
506 |
+
* @return string
|
507 |
+
*/
|
508 |
+
private function get_cache_group() {
|
509 |
+
$group = WP_FS__SLUG;
|
510 |
+
|
511 |
+
if ( $this->_is_network_storage ) {
|
512 |
+
$group .= '_ms';
|
513 |
+
} else if ( $this->_blog_id > 0 ) {
|
514 |
+
$group .= "_s{$this->_blog_id}";
|
515 |
+
}
|
516 |
+
|
517 |
+
return $group;
|
518 |
+
}
|
519 |
+
|
520 |
+
#endregion
|
521 |
+
}
|
includes/freemius/includes/managers/class-fs-plan-manager.php
CHANGED
@@ -1,162 +1,162 @@
|
|
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.6
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Plan_Manager {
|
14 |
-
/**
|
15 |
-
* @var FS_Plan_Manager
|
16 |
-
*/
|
17 |
-
private static $_instance;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @return FS_Plan_Manager
|
21 |
-
*/
|
22 |
-
static function instance() {
|
23 |
-
if ( ! isset( self::$_instance ) ) {
|
24 |
-
self::$_instance = new FS_Plan_Manager();
|
25 |
-
}
|
26 |
-
|
27 |
-
return self::$_instance;
|
28 |
-
}
|
29 |
-
|
30 |
-
private function __construct() {
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @param FS_Plugin_License[] $licenses
|
35 |
-
*
|
36 |
-
* @return bool
|
37 |
-
*/
|
38 |
-
function has_premium_license( $licenses ) {
|
39 |
-
if ( is_array( $licenses ) ) {
|
40 |
-
/**
|
41 |
-
* @var FS_Plugin_License[] $licenses
|
42 |
-
*/
|
43 |
-
foreach ( $licenses as $license ) {
|
44 |
-
if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
|
45 |
-
return true;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
return false;
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Check if plugin has any paid plans.
|
55 |
-
*
|
56 |
-
* @author Vova Feldman (@svovaf)
|
57 |
-
* @since 1.0.7
|
58 |
-
*
|
59 |
-
* @param FS_Plugin_Plan[] $plans
|
60 |
-
*
|
61 |
-
* @return bool
|
62 |
-
*/
|
63 |
-
function has_paid_plan( $plans ) {
|
64 |
-
if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
|
65 |
-
return false;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* @var FS_Plugin_Plan[] $plans
|
70 |
-
*/
|
71 |
-
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
72 |
-
if ( ! $plans[ $i ]->is_free() ) {
|
73 |
-
return true;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
return false;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Check if plugin has any free plan, or is it premium only.
|
82 |
-
*
|
83 |
-
* Note: If no plans configured, assume plugin is free.
|
84 |
-
*
|
85 |
-
* @author Vova Feldman (@svovaf)
|
86 |
-
* @since 1.0.7
|
87 |
-
*
|
88 |
-
* @param FS_Plugin_Plan[] $plans
|
89 |
-
*
|
90 |
-
* @return bool
|
91 |
-
*/
|
92 |
-
function has_free_plan( $plans ) {
|
93 |
-
if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
|
94 |
-
return true;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @var FS_Plugin_Plan[] $plans
|
99 |
-
*/
|
100 |
-
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
101 |
-
if ( $plans[ $i ]->is_free() ) {
|
102 |
-
return true;
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
return false;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Find all plans that have trial.
|
111 |
-
*
|
112 |
-
* @author Vova Feldman (@svovaf)
|
113 |
-
* @since 1.0.9
|
114 |
-
*
|
115 |
-
* @param FS_Plugin_Plan[] $plans
|
116 |
-
*
|
117 |
-
* @return FS_Plugin_Plan[]
|
118 |
-
*/
|
119 |
-
function get_trial_plans( $plans ) {
|
120 |
-
$trial_plans = array();
|
121 |
-
|
122 |
-
if ( is_array( $plans ) && 0 < count( $plans ) ) {
|
123 |
-
/**
|
124 |
-
* @var FS_Plugin_Plan[] $plans
|
125 |
-
*/
|
126 |
-
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
127 |
-
if ( $plans[ $i ]->has_trial() ) {
|
128 |
-
$trial_plans[] = $plans[ $i ];
|
129 |
-
}
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
return $trial_plans;
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Check if plugin has any trial plan.
|
138 |
-
*
|
139 |
-
* @author Vova Feldman (@svovaf)
|
140 |
-
* @since 1.0.9
|
141 |
-
*
|
142 |
-
* @param FS_Plugin_Plan[] $plans
|
143 |
-
*
|
144 |
-
* @return bool
|
145 |
-
*/
|
146 |
-
function has_trial_plan( $plans ) {
|
147 |
-
if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
|
148 |
-
return true;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* @var FS_Plugin_Plan[] $plans
|
153 |
-
*/
|
154 |
-
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
155 |
-
if ( $plans[ $i ]->has_trial() ) {
|
156 |
-
return true;
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
return false;
|
161 |
-
}
|
162 |
}
|
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.6
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Plan_Manager {
|
14 |
+
/**
|
15 |
+
* @var FS_Plan_Manager
|
16 |
+
*/
|
17 |
+
private static $_instance;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @return FS_Plan_Manager
|
21 |
+
*/
|
22 |
+
static function instance() {
|
23 |
+
if ( ! isset( self::$_instance ) ) {
|
24 |
+
self::$_instance = new FS_Plan_Manager();
|
25 |
+
}
|
26 |
+
|
27 |
+
return self::$_instance;
|
28 |
+
}
|
29 |
+
|
30 |
+
private function __construct() {
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @param FS_Plugin_License[] $licenses
|
35 |
+
*
|
36 |
+
* @return bool
|
37 |
+
*/
|
38 |
+
function has_premium_license( $licenses ) {
|
39 |
+
if ( is_array( $licenses ) ) {
|
40 |
+
/**
|
41 |
+
* @var FS_Plugin_License[] $licenses
|
42 |
+
*/
|
43 |
+
foreach ( $licenses as $license ) {
|
44 |
+
if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
|
45 |
+
return true;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Check if plugin has any paid plans.
|
55 |
+
*
|
56 |
+
* @author Vova Feldman (@svovaf)
|
57 |
+
* @since 1.0.7
|
58 |
+
*
|
59 |
+
* @param FS_Plugin_Plan[] $plans
|
60 |
+
*
|
61 |
+
* @return bool
|
62 |
+
*/
|
63 |
+
function has_paid_plan( $plans ) {
|
64 |
+
if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
|
65 |
+
return false;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @var FS_Plugin_Plan[] $plans
|
70 |
+
*/
|
71 |
+
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
72 |
+
if ( ! $plans[ $i ]->is_free() ) {
|
73 |
+
return true;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Check if plugin has any free plan, or is it premium only.
|
82 |
+
*
|
83 |
+
* Note: If no plans configured, assume plugin is free.
|
84 |
+
*
|
85 |
+
* @author Vova Feldman (@svovaf)
|
86 |
+
* @since 1.0.7
|
87 |
+
*
|
88 |
+
* @param FS_Plugin_Plan[] $plans
|
89 |
+
*
|
90 |
+
* @return bool
|
91 |
+
*/
|
92 |
+
function has_free_plan( $plans ) {
|
93 |
+
if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
|
94 |
+
return true;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @var FS_Plugin_Plan[] $plans
|
99 |
+
*/
|
100 |
+
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
101 |
+
if ( $plans[ $i ]->is_free() ) {
|
102 |
+
return true;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
return false;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Find all plans that have trial.
|
111 |
+
*
|
112 |
+
* @author Vova Feldman (@svovaf)
|
113 |
+
* @since 1.0.9
|
114 |
+
*
|
115 |
+
* @param FS_Plugin_Plan[] $plans
|
116 |
+
*
|
117 |
+
* @return FS_Plugin_Plan[]
|
118 |
+
*/
|
119 |
+
function get_trial_plans( $plans ) {
|
120 |
+
$trial_plans = array();
|
121 |
+
|
122 |
+
if ( is_array( $plans ) && 0 < count( $plans ) ) {
|
123 |
+
/**
|
124 |
+
* @var FS_Plugin_Plan[] $plans
|
125 |
+
*/
|
126 |
+
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
127 |
+
if ( $plans[ $i ]->has_trial() ) {
|
128 |
+
$trial_plans[] = $plans[ $i ];
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
return $trial_plans;
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Check if plugin has any trial plan.
|
138 |
+
*
|
139 |
+
* @author Vova Feldman (@svovaf)
|
140 |
+
* @since 1.0.9
|
141 |
+
*
|
142 |
+
* @param FS_Plugin_Plan[] $plans
|
143 |
+
*
|
144 |
+
* @return bool
|
145 |
+
*/
|
146 |
+
function has_trial_plan( $plans ) {
|
147 |
+
if ( ! is_array( $plans ) || 0 === count( $plans ) ) {
|
148 |
+
return true;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @var FS_Plugin_Plan[] $plans
|
153 |
+
*/
|
154 |
+
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
155 |
+
if ( $plans[ $i ]->has_trial() ) {
|
156 |
+
return true;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
return false;
|
161 |
+
}
|
162 |
}
|
includes/freemius/includes/managers/class-fs-plugin-manager.php
CHANGED
@@ -83,12 +83,12 @@
|
|
83 |
$option_manager = $this->get_option_manager();
|
84 |
|
85 |
if ( false !== $module_type ) {
|
86 |
-
return $option_manager->get_option( $module_type . 's', array() );
|
87 |
}
|
88 |
|
89 |
return array(
|
90 |
-
self::OPTION_NAME_PLUGINS => $option_manager->get_option( self::OPTION_NAME_PLUGINS, array() ),
|
91 |
-
self::OPTION_NAME_THEMES => $option_manager->get_option( self::OPTION_NAME_THEMES, array() ),
|
92 |
);
|
93 |
}
|
94 |
|
83 |
$option_manager = $this->get_option_manager();
|
84 |
|
85 |
if ( false !== $module_type ) {
|
86 |
+
return fs_get_entities( $option_manager->get_option( $module_type . 's', array() ), FS_Plugin::get_class_name() );
|
87 |
}
|
88 |
|
89 |
return array(
|
90 |
+
self::OPTION_NAME_PLUGINS => fs_get_entities( $option_manager->get_option( self::OPTION_NAME_PLUGINS, array() ), FS_Plugin::get_class_name() ),
|
91 |
+
self::OPTION_NAME_THEMES => fs_get_entities( $option_manager->get_option( self::OPTION_NAME_THEMES, array() ), FS_Plugin::get_class_name() ),
|
92 |
);
|
93 |
}
|
94 |
|
includes/freemius/includes/managers/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/sdk/Exceptions/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/sdk/LICENSE.txt
CHANGED
@@ -1,340 +1,340 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
281 |
-
|
282 |
-
How to Apply These Terms to Your New Programs
|
283 |
-
|
284 |
-
If you develop a new program, and you want it to be of the greatest
|
285 |
-
possible use to the public, the best way to achieve this is to make it
|
286 |
-
free software which everyone can redistribute and change under these terms.
|
287 |
-
|
288 |
-
To do so, attach the following notices to the program. It is safest
|
289 |
-
to attach them to the start of each source file to most effectively
|
290 |
-
convey the exclusion of warranty; and each file should have at least
|
291 |
-
the "copyright" line and a pointer to where the full notice is found.
|
292 |
-
|
293 |
-
{description}
|
294 |
-
Copyright (C) {year} {fullname}
|
295 |
-
|
296 |
-
This program is free software; you can redistribute it and/or modify
|
297 |
-
it under the terms of the GNU General Public License as published by
|
298 |
-
the Free Software Foundation; either version 2 of the License, or
|
299 |
-
(at your option) any later version.
|
300 |
-
|
301 |
-
This program is distributed in the hope that it will be useful,
|
302 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
-
GNU General Public License for more details.
|
305 |
-
|
306 |
-
You should have received a copy of the GNU General Public License along
|
307 |
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
-
|
310 |
-
Also add information on how to contact you by electronic and paper mail.
|
311 |
-
|
312 |
-
If the program is interactive, make it output a short notice like this
|
313 |
-
when it starts in an interactive mode:
|
314 |
-
|
315 |
-
Gnomovision version 69, Copyright (C) year name of author
|
316 |
-
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
-
This is free software, and you are welcome to redistribute it
|
318 |
-
under certain conditions; type `show c' for details.
|
319 |
-
|
320 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
-
parts of the General Public License. Of course, the commands you use may
|
322 |
-
be called something other than `show w' and `show c'; they could even be
|
323 |
-
mouse-clicks or menu items--whatever suits your program.
|
324 |
-
|
325 |
-
You should also get your employer (if you work as a programmer) or your
|
326 |
-
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
-
necessary. Here is a sample; alter the names:
|
328 |
-
|
329 |
-
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
-
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
-
|
332 |
-
{signature of Ty Coon}, 1 April 1989
|
333 |
-
Ty Coon, President of Vice
|
334 |
-
|
335 |
-
This General Public License does not permit incorporating your program into
|
336 |
-
proprietary programs. If your program is a subroutine library, you may
|
337 |
-
consider it more useful to permit linking proprietary applications with the
|
338 |
-
library. If this is what you want to do, use the GNU Lesser General
|
339 |
-
Public License instead of this License.
|
340 |
-
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
{description}
|
294 |
+
Copyright (C) {year} {fullname}
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
{signature of Ty Coon}, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
340 |
+
|
includes/freemius/includes/sdk/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php
CHANGED
@@ -1,43 +1,43 @@
|
|
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.7
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Find the plugin main file path based on any given file inside the plugin's folder.
|
15 |
-
*
|
16 |
-
* @author Vova Feldman (@svovaf)
|
17 |
-
* @since 1.1.7.1
|
18 |
-
*
|
19 |
-
* @param string $file Absolute path to a file inside a plugin's folder.
|
20 |
-
*
|
21 |
-
* @return string
|
22 |
-
*/
|
23 |
-
function fs_find_direct_caller_plugin_file( $file ) {
|
24 |
-
/**
|
25 |
-
* All the code below will be executed once on activation.
|
26 |
-
* If the user changes the main plugin's file name, the file_exists()
|
27 |
-
* will catch it.
|
28 |
-
*/
|
29 |
-
$all_plugins = fs_get_plugins( true );
|
30 |
-
|
31 |
-
$file_real_path = fs_normalize_path( realpath( $file ) );
|
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 |
-
}
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
return null;
|
43 |
-
}
|
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.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Find the plugin main file path based on any given file inside the plugin's folder.
|
15 |
+
*
|
16 |
+
* @author Vova Feldman (@svovaf)
|
17 |
+
* @since 1.1.7.1
|
18 |
+
*
|
19 |
+
* @param string $file Absolute path to a file inside a plugin's folder.
|
20 |
+
*
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
function fs_find_direct_caller_plugin_file( $file ) {
|
24 |
+
/**
|
25 |
+
* All the code below will be executed once on activation.
|
26 |
+
* If the user changes the main plugin's file name, the file_exists()
|
27 |
+
* will catch it.
|
28 |
+
*/
|
29 |
+
$all_plugins = fs_get_plugins( true );
|
30 |
+
|
31 |
+
$file_real_path = fs_normalize_path( realpath( $file ) );
|
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 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
return null;
|
43 |
+
}
|
includes/freemius/includes/supplements/fs-essential-functions-2.2.1.php
CHANGED
@@ -1,45 +1,45 @@
|
|
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.2.1
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
if ( ! function_exists( 'fs_get_plugins' ) ) {
|
14 |
-
/**
|
15 |
-
* @author Leo Fajardo (@leorw)
|
16 |
-
* @since 2.2.1
|
17 |
-
*
|
18 |
-
* @param bool $delete_cache
|
19 |
-
*
|
20 |
-
* @return array
|
21 |
-
*/
|
22 |
-
function fs_get_plugins( $delete_cache = false ) {
|
23 |
-
$cached_plugins = wp_cache_get( 'plugins', 'plugins' );
|
24 |
-
if ( ! is_array( $cached_plugins ) ) {
|
25 |
-
$cached_plugins = array();
|
26 |
-
}
|
27 |
-
|
28 |
-
$plugin_folder = '';
|
29 |
-
if ( isset( $cached_plugins[ $plugin_folder ] ) ) {
|
30 |
-
$plugins = $cached_plugins[ $plugin_folder ];
|
31 |
-
} else {
|
32 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
33 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
34 |
-
}
|
35 |
-
|
36 |
-
$plugins = get_plugins();
|
37 |
-
|
38 |
-
if ( $delete_cache && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
39 |
-
wp_cache_delete( 'plugins', 'plugins' );
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
return $plugins;
|
44 |
-
}
|
45 |
}
|
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.2.1
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( ! function_exists( 'fs_get_plugins' ) ) {
|
14 |
+
/**
|
15 |
+
* @author Leo Fajardo (@leorw)
|
16 |
+
* @since 2.2.1
|
17 |
+
*
|
18 |
+
* @param bool $delete_cache
|
19 |
+
*
|
20 |
+
* @return array
|
21 |
+
*/
|
22 |
+
function fs_get_plugins( $delete_cache = false ) {
|
23 |
+
$cached_plugins = wp_cache_get( 'plugins', 'plugins' );
|
24 |
+
if ( ! is_array( $cached_plugins ) ) {
|
25 |
+
$cached_plugins = array();
|
26 |
+
}
|
27 |
+
|
28 |
+
$plugin_folder = '';
|
29 |
+
if ( isset( $cached_plugins[ $plugin_folder ] ) ) {
|
30 |
+
$plugins = $cached_plugins[ $plugin_folder ];
|
31 |
+
} else {
|
32 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
33 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
34 |
+
}
|
35 |
+
|
36 |
+
$plugins = get_plugins();
|
37 |
+
|
38 |
+
if ( $delete_cache && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
39 |
+
wp_cache_delete( 'plugins', 'plugins' );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $plugins;
|
44 |
+
}
|
45 |
}
|
includes/freemius/includes/supplements/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/index.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
// Hide file structure from users on unprotected servers.
|
includes/freemius/languages/freemius-cs_CZ.mo
CHANGED
Binary file
|
includes/freemius/languages/freemius-cs_CZ.po
CHANGED
@@ -1,2717 +1,2546 @@
|
|
1 |
-
# Copyright (C) 2019 freemius
|
2 |
-
# This file is distributed under the same license as the freemius package.
|
3 |
-
# Translators:
|
4 |
-
# Karolína Vyskočilová <karolina@kybernaut.cz>, 2019
|
5 |
-
msgid ""
|
6 |
-
msgstr ""
|
7 |
-
"Project-Id-Version: WordPress SDK\n"
|
8 |
-
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
9 |
-
"POT-Creation-Date: \n"
|
10 |
-
"PO-Revision-Date: 2019-
|
11 |
-
"Last-Translator:
|
12 |
-
"Language
|
13 |
-
"
|
14 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
-
"Content-Transfer-Encoding: 8bit\n"
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"X-Poedit-Basepath: ..\n"
|
19 |
-
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
-
|
24 |
-
#: includes/class-freemius.
|
25 |
-
msgid ""
|
26 |
-
"
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
"
|
154 |
-
"
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
#: includes/class-freemius.
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
msgid "
|
166 |
-
msgstr "
|
167 |
-
|
168 |
-
#: includes/class-freemius.
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
#: includes/class-freemius.
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
msgid "%s
|
189 |
-
msgstr "%s
|
190 |
-
|
191 |
-
#: includes/class-freemius.php:
|
192 |
-
msgctxt "
|
193 |
-
msgid "
|
194 |
-
msgstr "
|
195 |
-
|
196 |
-
#: includes/class-freemius.
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
#: includes/class-freemius.php:
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
"
|
210 |
-
"
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
#: includes/class-freemius.php:
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
"
|
231 |
-
msgstr "
|
232 |
-
|
233 |
-
#: includes/class-freemius.php:
|
234 |
-
msgid ""
|
235 |
-
"
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
"
|
252 |
-
msgstr "
|
253 |
-
|
254 |
-
#: includes/class-freemius.php:
|
255 |
-
msgid "
|
256 |
-
msgstr "
|
257 |
-
|
258 |
-
#: includes/class-freemius.
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
#:
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
#:
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
#: includes/class-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
#:
|
297 |
-
#: templates/forms/
|
298 |
-
msgid "
|
299 |
-
msgstr "
|
300 |
-
|
301 |
-
#: includes/class-freemius.
|
302 |
-
|
303 |
-
"
|
304 |
-
msgstr "
|
305 |
-
|
306 |
-
#: includes/class-freemius.php:
|
307 |
-
msgid "
|
308 |
-
msgstr ""
|
309 |
-
|
310 |
-
#: includes/class-freemius.php:
|
311 |
-
msgid ""
|
312 |
-
"
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
"
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#: includes/class-freemius.
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
#:
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
#: templates/forms/
|
333 |
-
msgid "
|
334 |
-
msgstr "
|
335 |
-
|
336 |
-
#: includes/class-freemius.php:
|
337 |
-
msgid "
|
338 |
-
msgstr "
|
339 |
-
|
340 |
-
#: includes/class-freemius.php:
|
341 |
-
msgid "
|
342 |
-
msgstr "
|
343 |
-
|
344 |
-
#: includes/class-freemius.php:
|
345 |
-
msgid "
|
346 |
-
msgstr "
|
347 |
-
|
348 |
-
#: includes/class-freemius.
|
349 |
-
msgid "
|
350 |
-
msgstr "
|
351 |
-
|
352 |
-
#: includes/class-freemius.
|
353 |
-
#:
|
354 |
-
msgid "
|
355 |
-
msgstr "
|
356 |
-
|
357 |
-
#: includes/class-freemius.
|
358 |
-
#: includes/class-
|
359 |
-
msgid "
|
360 |
-
msgstr "
|
361 |
-
|
362 |
-
#: includes/class-freemius.
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
msgid "
|
376 |
-
msgstr "
|
377 |
-
|
378 |
-
#: includes/class-freemius.
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
#:
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
#: includes/
|
389 |
-
msgid "
|
390 |
-
msgstr "
|
391 |
-
|
392 |
-
#: includes/class-freemius.
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
msgid "
|
411 |
-
msgstr "
|
412 |
-
|
413 |
-
#: includes/class-freemius.
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
#: includes/class-freemius.php:
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
#: includes/class-freemius.php:
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
"
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
#: includes/class-freemius.php:
|
447 |
-
msgid "
|
448 |
-
msgstr "
|
449 |
-
|
450 |
-
#: includes/class-freemius.php:
|
451 |
-
msgid ""
|
452 |
-
"
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
"
|
460 |
-
"
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
"
|
468 |
-
msgstr ""
|
469 |
-
|
470 |
-
#: includes/class-freemius.
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
"
|
480 |
-
msgstr ""
|
481 |
-
|
482 |
-
#: includes/class-freemius.
|
483 |
-
msgid "
|
484 |
-
msgstr "
|
485 |
-
|
486 |
-
#: includes/class-freemius.php:
|
487 |
-
msgid "Your
|
488 |
-
msgstr "
|
489 |
-
|
490 |
-
#: includes/class-freemius.php:
|
491 |
-
msgid "
|
492 |
-
msgstr "
|
493 |
-
|
494 |
-
#: includes/class-freemius.php:
|
495 |
-
msgid "Your
|
496 |
-
msgstr "
|
497 |
-
|
498 |
-
#: includes/class-freemius.php:
|
499 |
-
msgid ""
|
500 |
-
"
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
"
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
"
|
520 |
-
msgstr "Vaše
|
521 |
-
|
522 |
-
#: includes/class-freemius.php:
|
523 |
-
msgid ""
|
524 |
-
"
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
"
|
532 |
-
msgstr ""
|
533 |
-
|
534 |
-
#: includes/class-freemius.php:
|
535 |
-
msgid "
|
536 |
-
msgstr "
|
537 |
-
|
538 |
-
#: includes/class-freemius.php:
|
539 |
-
msgid "
|
540 |
-
msgstr "
|
541 |
-
|
542 |
-
#: includes/class-freemius.php:
|
543 |
-
msgid "It looks like
|
544 |
-
msgstr ""
|
545 |
-
|
546 |
-
#: includes/class-freemius.php:
|
547 |
-
msgid "
|
548 |
-
msgstr "
|
549 |
-
|
550 |
-
#: includes/class-freemius.php:
|
551 |
-
msgid ""
|
552 |
-
"Your
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
"
|
600 |
-
"
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
msgid "
|
617 |
-
msgstr "
|
618 |
-
|
619 |
-
#: includes/class-freemius.php:
|
620 |
-
msgid "
|
621 |
-
msgstr "
|
622 |
-
|
623 |
-
#: includes/class-freemius.php:
|
624 |
-
msgid "
|
625 |
-
msgstr "
|
626 |
-
|
627 |
-
#: includes/class-freemius.php:
|
628 |
-
msgid "
|
629 |
-
msgstr ""
|
630 |
-
|
631 |
-
#: includes/class-freemius.php:
|
632 |
-
msgid ""
|
633 |
-
"
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
"
|
649 |
-
msgstr "
|
650 |
-
|
651 |
-
#: includes/class-freemius.php:
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
"
|
663 |
-
"
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
"
|
671 |
-
msgstr "
|
672 |
-
|
673 |
-
#: includes/class-freemius.php:
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
msgid "
|
680 |
-
msgstr "
|
681 |
-
|
682 |
-
#: includes/class-freemius.php:
|
683 |
-
msgid ""
|
684 |
-
"
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
#:
|
689 |
-
|
690 |
-
"
|
691 |
-
"
|
692 |
-
|
693 |
-
|
694 |
-
#:
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
"
|
701 |
-
"
|
702 |
-
|
703 |
-
|
704 |
-
#:
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
"
|
719 |
-
"
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
"
|
735 |
-
"
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
#: includes/class-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
msgid "
|
749 |
-
msgstr ""
|
750 |
-
|
751 |
-
#: includes/class-freemius.php:
|
752 |
-
msgid ""
|
753 |
-
"
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
#:
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
#:
|
780 |
-
msgid "
|
781 |
-
msgstr "
|
782 |
-
|
783 |
-
#: includes/class-freemius.php:
|
784 |
-
msgid ""
|
785 |
-
"
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
"
|
813 |
-
msgstr ""
|
814 |
-
|
815 |
-
#: includes/class-freemius.php:
|
816 |
-
msgid "
|
817 |
-
msgstr ""
|
818 |
-
|
819 |
-
#: includes/class-freemius.
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
#:
|
830 |
-
msgid "
|
831 |
-
msgstr ""
|
832 |
-
|
833 |
-
#: includes/class-
|
834 |
-
|
835 |
-
"
|
836 |
-
"
|
837 |
-
|
838 |
-
|
839 |
-
#: includes/class-
|
840 |
-
msgid "
|
841 |
-
msgstr ""
|
842 |
-
|
843 |
-
#: includes/class-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
"
|
858 |
-
"
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
#:
|
892 |
-
|
893 |
-
|
894 |
-
"
|
895 |
-
msgstr ""
|
896 |
-
|
897 |
-
#: includes/
|
898 |
-
|
899 |
-
"
|
900 |
-
"
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
msgid ""
|
906 |
-
"
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
#:
|
911 |
-
msgid "
|
912 |
-
msgstr "
|
913 |
-
|
914 |
-
#: includes/
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
#:
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
#:
|
940 |
-
msgid "
|
941 |
-
msgstr ""
|
942 |
-
|
943 |
-
#: includes/
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
"
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
msgid "
|
965 |
-
msgstr "
|
966 |
-
|
967 |
-
#: includes/fs-plugin-info-dialog.php:
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
msgid "
|
981 |
-
msgstr "
|
982 |
-
|
983 |
-
#: includes/fs-plugin-info-dialog.
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
msgid "
|
1019 |
-
msgstr "
|
1020 |
-
|
1021 |
-
#: includes/fs-plugin-info-dialog.
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
msgid "
|
1044 |
-
msgstr "
|
1045 |
-
|
1046 |
-
#: includes/fs-plugin-info-dialog.php:
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
#:
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
msgid "
|
1068 |
-
msgstr "
|
1069 |
-
|
1070 |
-
#: includes/fs-plugin-info-dialog.
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
#: includes/fs-plugin-info-dialog.php:
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
msgid "
|
1118 |
-
msgstr "
|
1119 |
-
|
1120 |
-
#: includes/fs-plugin-info-dialog.
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
#:
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
#:
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
#:
|
1197 |
-
msgid "
|
1198 |
-
msgstr "
|
1199 |
-
|
1200 |
-
#:
|
1201 |
-
#:
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
#:
|
1214 |
-
msgid "%s
|
1215 |
-
msgstr "%s
|
1216 |
-
|
1217 |
-
#:
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
#:
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
#:
|
1238 |
-
#:
|
1239 |
-
msgid "
|
1240 |
-
msgstr "
|
1241 |
-
|
1242 |
-
#:
|
1243 |
-
|
1244 |
-
"
|
1245 |
-
msgstr ""
|
1246 |
-
|
1247 |
-
#:
|
1248 |
-
msgid ""
|
1249 |
-
"
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
#:
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
#:
|
1270 |
-
msgid "
|
1271 |
-
msgstr "
|
1272 |
-
|
1273 |
-
#:
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
#: templates/account
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
"
|
1294 |
-
"
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
"
|
1302 |
-
"
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
#: templates/account
|
1309 |
-
msgid ""
|
1310 |
-
"
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
#: templates/account/partials/
|
1317 |
-
|
1318 |
-
"
|
1319 |
-
"
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
"
|
1327 |
-
"
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
#: templates/account.
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
#: templates/
|
1350 |
-
|
1351 |
-
msgid "
|
1352 |
-
msgstr "
|
1353 |
-
|
1354 |
-
#: templates/account.
|
1355 |
-
msgid "
|
1356 |
-
msgstr "
|
1357 |
-
|
1358 |
-
#: templates/account.
|
1359 |
-
msgid "
|
1360 |
-
msgstr "
|
1361 |
-
|
1362 |
-
#: templates/account.
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
#: templates/account/
|
1369 |
-
|
1370 |
-
msgid "
|
1371 |
-
msgstr "
|
1372 |
-
|
1373 |
-
#: templates/account.
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
"
|
1406 |
-
"
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
"
|
1414 |
-
"
|
1415 |
-
|
1416 |
-
|
1417 |
-
#: templates/account.
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
#: templates/account.
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
#: templates/
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
#: templates/account/
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
#: templates/account
|
1490 |
-
msgid "
|
1491 |
-
msgstr "
|
1492 |
-
|
1493 |
-
#: templates/
|
1494 |
-
msgid "
|
1495 |
-
msgstr ""
|
1496 |
-
|
1497 |
-
#: templates/
|
1498 |
-
msgid "
|
1499 |
-
msgstr "
|
1500 |
-
|
1501 |
-
#: templates/
|
1502 |
-
msgid "
|
1503 |
-
msgstr "
|
1504 |
-
|
1505 |
-
#: templates/
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
msgid "
|
1519 |
-
msgstr "
|
1520 |
-
|
1521 |
-
#: templates/
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
msgid "
|
1535 |
-
msgstr "
|
1536 |
-
|
1537 |
-
#: templates/
|
1538 |
-
msgid "
|
1539 |
-
msgstr "
|
1540 |
-
|
1541 |
-
#: templates/
|
1542 |
-
msgid "
|
1543 |
-
msgstr "
|
1544 |
-
|
1545 |
-
#: templates/
|
1546 |
-
msgid "
|
1547 |
-
msgstr "
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
msgid "
|
1565 |
-
msgstr "
|
1566 |
-
|
1567 |
-
#: templates/
|
1568 |
-
msgid "
|
1569 |
-
msgstr ""
|
1570 |
-
|
1571 |
-
#: templates/
|
1572 |
-
msgid "
|
1573 |
-
msgstr ""
|
1574 |
-
|
1575 |
-
#: templates/
|
1576 |
-
msgid "
|
1577 |
-
msgstr "
|
1578 |
-
|
1579 |
-
#: templates/
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
"
|
1597 |
-
"
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
msgid "
|
1622 |
-
msgstr ""
|
1623 |
-
|
1624 |
-
#: templates/
|
1625 |
-
#: templates/forms/
|
1626 |
-
msgctxt "
|
1627 |
-
msgid "
|
1628 |
-
msgstr "
|
1629 |
-
|
1630 |
-
#: templates/
|
1631 |
-
msgid "
|
1632 |
-
msgstr "
|
1633 |
-
|
1634 |
-
#: templates/
|
1635 |
-
msgid "
|
1636 |
-
msgstr ""
|
1637 |
-
|
1638 |
-
#: templates/
|
1639 |
-
msgid ""
|
1640 |
-
"
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
"
|
1648 |
-
"
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
"
|
1688 |
-
msgstr "
|
1689 |
-
|
1690 |
-
#: templates/connect.php:
|
1691 |
-
msgid ""
|
1692 |
-
"
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
"
|
1700 |
-
"
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
msgid ""
|
1705 |
-
"
|
1706 |
-
|
1707 |
-
|
1708 |
-
"
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
msgid ""
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
"
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
"
|
1742 |
-
msgstr ""
|
1743 |
-
|
1744 |
-
#: templates/
|
1745 |
-
msgid ""
|
1746 |
-
"
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
msgid "
|
1762 |
-
msgstr "
|
1763 |
-
|
1764 |
-
#: templates/
|
1765 |
-
msgid "
|
1766 |
-
msgstr ""
|
1767 |
-
|
1768 |
-
#: templates/
|
1769 |
-
msgid ""
|
1770 |
-
"
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
#: templates/
|
1807 |
-
msgid "
|
1808 |
-
msgstr "
|
1809 |
-
|
1810 |
-
#: templates/
|
1811 |
-
msgid ""
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
msgid "
|
1834 |
-
msgstr "
|
1835 |
-
|
1836 |
-
#: templates/
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
msgid "
|
1843 |
-
msgstr "
|
1844 |
-
|
1845 |
-
#: templates/
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
#: templates/debug.php:
|
1932 |
-
msgid "
|
1933 |
-
msgstr "
|
1934 |
-
|
1935 |
-
#: templates/debug.
|
1936 |
-
msgid "
|
1937 |
-
msgstr "
|
1938 |
-
|
1939 |
-
#: templates/debug.
|
1940 |
-
msgid "
|
1941 |
-
msgstr "
|
1942 |
-
|
1943 |
-
#: templates/debug.
|
1944 |
-
#: templates/debug/
|
1945 |
-
msgid "
|
1946 |
-
msgstr "
|
1947 |
-
|
1948 |
-
#: templates/debug.
|
1949 |
-
msgid "
|
1950 |
-
msgstr "
|
1951 |
-
|
1952 |
-
#: templates/debug.php:
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
#: templates/
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
#: templates/debug.php:
|
1975 |
-
msgctxt "
|
1976 |
-
msgid "
|
1977 |
-
msgstr "
|
1978 |
-
|
1979 |
-
#:
|
1980 |
-
msgid "
|
1981 |
-
msgstr ""
|
1982 |
-
|
1983 |
-
#:
|
1984 |
-
msgid "
|
1985 |
-
msgstr ""
|
1986 |
-
|
1987 |
-
#: templates/
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
msgid "
|
1994 |
-
msgstr "
|
1995 |
-
|
1996 |
-
#: templates/
|
1997 |
-
msgid "
|
1998 |
-
msgstr "
|
1999 |
-
|
2000 |
-
#: templates/
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
#: templates/debug/
|
2066 |
-
msgid "
|
2067 |
-
msgstr "
|
2068 |
-
|
2069 |
-
#: templates/debug.php:
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
#: templates/debug/
|
2079 |
-
msgid "
|
2080 |
-
msgstr "
|
2081 |
-
|
2082 |
-
#: templates/debug.php:
|
2083 |
-
msgid "
|
2084 |
-
msgstr "
|
2085 |
-
|
2086 |
-
#: templates/debug.php:
|
2087 |
-
msgid "
|
2088 |
-
msgstr "
|
2089 |
-
|
2090 |
-
#: templates/debug
|
2091 |
-
msgid "
|
2092 |
-
msgstr "
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
#:
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
#:
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
#: templates/
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
#: templates/
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
#: templates/
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
"
|
2291 |
-
msgstr ""
|
2292 |
-
|
2293 |
-
#: templates/forms/
|
2294 |
-
msgid ""
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
"
|
2307 |
-
"
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
msgid ""
|
2312 |
-
"
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
"
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
"
|
2358 |
-
"are
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
"
|
2419 |
-
"
|
2420 |
-
|
2421 |
-
|
2422 |
-
#: templates/
|
2423 |
-
msgid "
|
2424 |
-
msgstr "
|
2425 |
-
|
2426 |
-
#: templates/
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
#: templates/
|
2433 |
-
msgid "
|
2434 |
-
msgstr "
|
2435 |
-
|
2436 |
-
#: templates/
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
"
|
2443 |
-
"
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
#: templates/
|
2461 |
-
msgid ""
|
2462 |
-
"
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
"
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
"
|
2498 |
-
msgstr "
|
2499 |
-
|
2500 |
-
#: templates/forms/
|
2501 |
-
msgid ""
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
"
|
2510 |
-
msgstr ""
|
2511 |
-
|
2512 |
-
#: templates/forms/
|
2513 |
-
msgid "
|
2514 |
-
msgstr "
|
2515 |
-
|
2516 |
-
#: templates/forms/
|
2517 |
-
msgid ""
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
"
|
2526 |
-
msgstr ""
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
#: templates/
|
2533 |
-
msgid ""
|
2534 |
-
"
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
"
|
2542 |
-
msgstr ""
|
2543 |
-
|
2544 |
-
#: templates/forms/
|
2545 |
-
msgid "
|
2546 |
-
msgstr ""
|
2547 |
-
|
2548 |
-
#: templates/forms/subscription-cancellation.php:143
|
2549 |
-
msgid "Proceed"
|
2550 |
-
msgstr "Pokračovat"
|
2551 |
-
|
2552 |
-
#: templates/forms/subscription-cancellation.php191,
|
2553 |
-
#: templates/forms/deactivation/form.php:171
|
2554 |
-
msgid "Cancel %s & Proceed"
|
2555 |
-
msgstr "Zrušit %s > pokračovat"
|
2556 |
-
|
2557 |
-
#: templates/forms/trial-start.php:22
|
2558 |
-
msgid ""
|
2559 |
-
"You are 1-click away from starting your %1$s-day free trial of the %2$s "
|
2560 |
-
"plan."
|
2561 |
-
msgstr ""
|
2562 |
-
|
2563 |
-
#: templates/forms/trial-start.php:28
|
2564 |
-
msgid ""
|
2565 |
-
"For compliance with the WordPress.org guidelines, before we start the trial "
|
2566 |
-
"we ask that you opt in with your user and non-sensitive site information, "
|
2567 |
-
"allowing the %s to periodically send data to %s to check for version updates"
|
2568 |
-
" and to validate your trial."
|
2569 |
-
msgstr "Aby bylo vyhověno WordPress.org pokynům, před zahájením zkušebního období vás žádáme, abyste se rozhodli pro uživatele a necitlivé informace o webu, aby %s umožňoval periodicky odesílat data do %s za účelem kontroly aktualizací verzí a ověření zkušební verze."
|
2570 |
-
|
2571 |
-
#: templates/js/style-premium-theme.php:39
|
2572 |
-
msgid "Premium"
|
2573 |
-
msgstr "Prémium"
|
2574 |
-
|
2575 |
-
#: templates/js/style-premium-theme.php:42
|
2576 |
-
msgid "Beta"
|
2577 |
-
msgstr ""
|
2578 |
-
|
2579 |
-
#: templates/partials/network-activation.php:27
|
2580 |
-
msgid "Activate license on all sites in the network."
|
2581 |
-
msgstr ""
|
2582 |
-
|
2583 |
-
#: templates/partials/network-activation.php:28
|
2584 |
-
msgid "Apply on all sites in the network."
|
2585 |
-
msgstr ""
|
2586 |
-
|
2587 |
-
#: templates/partials/network-activation.php:31
|
2588 |
-
msgid "Activate license on all pending sites."
|
2589 |
-
msgstr ""
|
2590 |
-
|
2591 |
-
#: templates/partials/network-activation.php:32
|
2592 |
-
msgid "Apply on all pending sites."
|
2593 |
-
msgstr ""
|
2594 |
-
|
2595 |
-
#: templates/partials/network-activation.php40,
|
2596 |
-
#: templates/partials/network-activation.php:74
|
2597 |
-
msgid "allow"
|
2598 |
-
msgstr "povolit"
|
2599 |
-
|
2600 |
-
#: templates/partials/network-activation.php43,
|
2601 |
-
#: templates/partials/network-activation.php:77
|
2602 |
-
msgid "delegate"
|
2603 |
-
msgstr "delegovat"
|
2604 |
-
|
2605 |
-
#: templates/partials/network-activation.php47,
|
2606 |
-
#: templates/partials/network-activation.php:81
|
2607 |
-
msgid "skip"
|
2608 |
-
msgstr "přeskočit"
|
2609 |
-
|
2610 |
-
#: templates/plugin-info/description.php72,
|
2611 |
-
#: templates/plugin-info/screenshots.php:31
|
2612 |
-
msgid "Click to view full-size screenshot %d"
|
2613 |
-
msgstr "Klikněte pro zobrazení plné velikosti snímku obrazovky %d"
|
2614 |
-
|
2615 |
-
#: templates/plugin-info/features.php:56
|
2616 |
-
msgid "Unlimited Updates"
|
2617 |
-
msgstr "Neomezené aktualizace"
|
2618 |
-
|
2619 |
-
#: templates/account/partials/activate-license-button.php:46
|
2620 |
-
msgid "Localhost"
|
2621 |
-
msgstr "Localhost"
|
2622 |
-
|
2623 |
-
#: templates/account/partials/activate-license-button.php:50
|
2624 |
-
msgctxt "as 5 licenses left"
|
2625 |
-
msgid "%s left"
|
2626 |
-
msgstr "Zbývá %s"
|
2627 |
-
|
2628 |
-
#: templates/account/partials/activate-license-button.php:51
|
2629 |
-
msgid "Last license"
|
2630 |
-
msgstr "Poslední licence"
|
2631 |
-
|
2632 |
-
#: templates/account/partials/addon.php:167
|
2633 |
-
msgid "Cancelled"
|
2634 |
-
msgstr "Zrušena"
|
2635 |
-
|
2636 |
-
#: templates/account/partials/addon.php:177
|
2637 |
-
msgid "No expiration"
|
2638 |
-
msgstr "Bez vypršení"
|
2639 |
-
|
2640 |
-
#: templates/account/partials/site.php:181
|
2641 |
-
msgid "Owner Name"
|
2642 |
-
msgstr "Jméno vlastníka"
|
2643 |
-
|
2644 |
-
#: templates/account/partials/site.php:193
|
2645 |
-
msgid "Owner Email"
|
2646 |
-
msgstr "E-mail vlastníka"
|
2647 |
-
|
2648 |
-
#: templates/account/partials/site.php:205
|
2649 |
-
msgid "Owner ID"
|
2650 |
-
msgstr "ID vlastníka"
|
2651 |
-
|
2652 |
-
#: templates/account/partials/site.php:270
|
2653 |
-
msgid "Subscription"
|
2654 |
-
msgstr "Předplatné"
|
2655 |
-
|
2656 |
-
#: templates/forms/deactivation/contact.php:19
|
2657 |
-
msgid ""
|
2658 |
-
"Sorry for the inconvenience and we are here to help if you give us a chance."
|
2659 |
-
msgstr "Omlouváme se za způsobené nepříjemnosti, ale když se nám dáte šanci, tak se vám ze všech sil pokusíme pomoci."
|
2660 |
-
|
2661 |
-
#: templates/forms/deactivation/contact.php:22
|
2662 |
-
msgid "Contact Support"
|
2663 |
-
msgstr "Kontaktovat podporu"
|
2664 |
-
|
2665 |
-
#: templates/forms/deactivation/form.php:64
|
2666 |
-
msgid "Anonymous feedback"
|
2667 |
-
msgstr "Anonymní zpětná vazba"
|
2668 |
-
|
2669 |
-
#: templates/forms/deactivation/form.php:70
|
2670 |
-
msgid "Deactivate"
|
2671 |
-
msgstr "Deaktivovat"
|
2672 |
-
|
2673 |
-
#: templates/forms/deactivation/form.php:72
|
2674 |
-
msgid "Activate %s"
|
2675 |
-
msgstr "Aktivovat %s"
|
2676 |
-
|
2677 |
-
#: templates/forms/deactivation/form.php:87
|
2678 |
-
msgid "Quick Feedback"
|
2679 |
-
msgstr "Rychlá zpětná vazba"
|
2680 |
-
|
2681 |
-
#: templates/forms/deactivation/form.php:91
|
2682 |
-
msgid "If you have a moment, please let us know why you are %s"
|
2683 |
-
msgstr "Máte-li chvilku, dejte nám vědět proč %s"
|
2684 |
-
|
2685 |
-
#: templates/forms/deactivation/form.php:91
|
2686 |
-
msgid "deactivating"
|
2687 |
-
msgstr "deaktivuji"
|
2688 |
-
|
2689 |
-
#: templates/forms/deactivation/form.php:91
|
2690 |
-
msgid "switching"
|
2691 |
-
msgstr "přepínám"
|
2692 |
-
|
2693 |
-
#: templates/forms/deactivation/form.php:365
|
2694 |
-
msgid "Submit & %s"
|
2695 |
-
msgstr "Odeslat & %s"
|
2696 |
-
|
2697 |
-
#: templates/forms/deactivation/form.php:386
|
2698 |
-
msgid "Kindly tell us the reason so we can improve."
|
2699 |
-
msgstr "Dejte nám prosím vědět proč, ať to můžeme zlepšit."
|
2700 |
-
|
2701 |
-
#: templates/forms/deactivation/form.php:511
|
2702 |
-
msgid "Yes - %s"
|
2703 |
-
msgstr "Ano - %s"
|
2704 |
-
|
2705 |
-
#: templates/forms/deactivation/form.php:518
|
2706 |
-
msgid "Skip & %s"
|
2707 |
-
msgstr "Přeskočit & %s"
|
2708 |
-
|
2709 |
-
#: templates/forms/deactivation/retry-skip.php:21
|
2710 |
-
msgid "Click here to use the plugin anonymously"
|
2711 |
-
msgstr "Klikněte zde pro anonymní používání tohoto pluginu"
|
2712 |
-
|
2713 |
-
#: templates/forms/deactivation/retry-skip.php:23
|
2714 |
-
msgid ""
|
2715 |
-
"You might have missed it, but you don't have to share any data and can just "
|
2716 |
-
"%s the opt-in."
|
2717 |
-
msgstr ""
|
1 |
+
# Copyright (C) 2019 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Karolína Vyskočilová <karolina@kybernaut.cz>, 2019
|
5 |
+
msgid ""
|
6 |
+
msgstr ""
|
7 |
+
"Project-Id-Version: WordPress SDK\n"
|
8 |
+
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
9 |
+
"POT-Creation-Date: \n"
|
10 |
+
"PO-Revision-Date: 2019-10-07 15:33+0000\n"
|
11 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
12 |
+
"Language: cs_CZ\n"
|
13 |
+
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/freemius/wordpress-sdk/language/cs_CZ/)\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
|
17 |
+
"MIME-Version: 1.0\n"
|
18 |
+
"X-Poedit-Basepath: ..\n"
|
19 |
+
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
+
|
24 |
+
#: includes/class-freemius.php1880, templates/account.php:840
|
25 |
+
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."
|
26 |
+
msgstr "Aktualizováním na Beta verzi nahradíte nainstalovanou verzi %s nejnovějším vydáním Beta verze - používejte s opatrností a ne na produkčních webech. Varovali jsme vás."
|
27 |
+
|
28 |
+
#: includes/class-freemius.php:1887
|
29 |
+
msgid "Would you like to proceed with the update?"
|
30 |
+
msgstr "Chcete pokračovat v aktualizaci?"
|
31 |
+
|
32 |
+
#: includes/class-freemius.php:2095
|
33 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
34 |
+
msgstr "Freemius SDK nemohlo najít hlavní soubor pluginu. S aktuální chybou se obraťte se na sdk@freemius.com."
|
35 |
+
|
36 |
+
#: includes/class-freemius.php:2097
|
37 |
+
msgid "Error"
|
38 |
+
msgstr "Chyba"
|
39 |
+
|
40 |
+
#: includes/class-freemius.php:2491
|
41 |
+
msgid "I found a better %s"
|
42 |
+
msgstr "Našel jsem lepší %s"
|
43 |
+
|
44 |
+
#: includes/class-freemius.php:2493
|
45 |
+
msgid "What's the %s's name?"
|
46 |
+
msgstr "Jak se %s jmenuje?"
|
47 |
+
|
48 |
+
#: includes/class-freemius.php:2499
|
49 |
+
msgid "It's a temporary %s. I'm just debugging an issue."
|
50 |
+
msgstr "Jen dočasná %s - ladím nějaký problém."
|
51 |
+
|
52 |
+
#: includes/class-freemius.php:2501
|
53 |
+
msgid "Deactivation"
|
54 |
+
msgstr "Deaktivace"
|
55 |
+
|
56 |
+
#: includes/class-freemius.php:2502
|
57 |
+
msgid "Theme Switch"
|
58 |
+
msgstr "Změna šablony"
|
59 |
+
|
60 |
+
#: includes/class-freemius.php2511, templates/forms/resend-key.php:24
|
61 |
+
msgid "Other"
|
62 |
+
msgstr "Jiné"
|
63 |
+
|
64 |
+
#: includes/class-freemius.php:2519
|
65 |
+
msgid "I no longer need the %s"
|
66 |
+
msgstr "Již nepotřebuji %s"
|
67 |
+
|
68 |
+
#: includes/class-freemius.php:2526
|
69 |
+
msgid "I only needed the %s for a short period"
|
70 |
+
msgstr "Potřeboval %s jsem jen krátkou dobu"
|
71 |
+
|
72 |
+
#: includes/class-freemius.php:2532
|
73 |
+
msgid "The %s broke my site"
|
74 |
+
msgstr "%s rozbil můj web"
|
75 |
+
|
76 |
+
#: includes/class-freemius.php:2539
|
77 |
+
msgid "The %s suddenly stopped working"
|
78 |
+
msgstr "%s náhle přestal pracovat"
|
79 |
+
|
80 |
+
#: includes/class-freemius.php:2549
|
81 |
+
msgid "I can't pay for it anymore"
|
82 |
+
msgstr "Už si to nemohu dovolit"
|
83 |
+
|
84 |
+
#: includes/class-freemius.php:2551
|
85 |
+
msgid "What price would you feel comfortable paying?"
|
86 |
+
msgstr "Jakou cenu byste byli ochotni platit?"
|
87 |
+
|
88 |
+
#: includes/class-freemius.php:2557
|
89 |
+
msgid "I don't like to share my information with you"
|
90 |
+
msgstr "Nechci s vámi sdílet své informace"
|
91 |
+
|
92 |
+
#: includes/class-freemius.php:2578
|
93 |
+
msgid "The %s didn't work"
|
94 |
+
msgstr "%s nefungoval"
|
95 |
+
|
96 |
+
#: includes/class-freemius.php:2588
|
97 |
+
msgid "I couldn't understand how to make it work"
|
98 |
+
msgstr "Nedokázal jsem jej zprovoznit"
|
99 |
+
|
100 |
+
#: includes/class-freemius.php:2596
|
101 |
+
msgid "The %s is great, but I need specific feature that you don't support"
|
102 |
+
msgstr "%s je skvělý, ale potřebuji funkci, kterou není podporovaná"
|
103 |
+
|
104 |
+
#: includes/class-freemius.php:2598
|
105 |
+
msgid "What feature?"
|
106 |
+
msgstr "Jaká funkce?"
|
107 |
+
|
108 |
+
#: includes/class-freemius.php:2602
|
109 |
+
msgid "The %s is not working"
|
110 |
+
msgstr "%s nefunguje"
|
111 |
+
|
112 |
+
#: includes/class-freemius.php:2604
|
113 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
114 |
+
msgstr "Dejte nám prosím vědět, co nefungovalo, ať to můžeme opravit pro další uživatele..."
|
115 |
+
|
116 |
+
#: includes/class-freemius.php:2608
|
117 |
+
msgid "It's not what I was looking for"
|
118 |
+
msgstr "Není to to, co jsem hledal"
|
119 |
+
|
120 |
+
#: includes/class-freemius.php:2610
|
121 |
+
msgid "What you've been looking for?"
|
122 |
+
msgstr "Co jste hledali?"
|
123 |
+
|
124 |
+
#: includes/class-freemius.php:2614
|
125 |
+
msgid "The %s didn't work as expected"
|
126 |
+
msgstr "%s nefungoval podle očekávání"
|
127 |
+
|
128 |
+
#: includes/class-freemius.php:2616
|
129 |
+
msgid "What did you expect?"
|
130 |
+
msgstr "Co jste očekávali?"
|
131 |
+
|
132 |
+
#: includes/class-freemius.php3471, templates/debug.php:20
|
133 |
+
msgid "Freemius Debug"
|
134 |
+
msgstr "Freemius Debug"
|
135 |
+
|
136 |
+
#: includes/class-freemius.php:4223
|
137 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
138 |
+
msgstr "Nevím, co je cURL nebo jak jej nainstalovat, pomozte mi!"
|
139 |
+
|
140 |
+
#: includes/class-freemius.php:4225
|
141 |
+
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."
|
142 |
+
msgstr "Zkontaktujeme vaší hostingovou společnost a zkusíme vyřešit tento problém. Na %s dostanete upozornění, jakmile budeme vědět něco nového."
|
143 |
+
|
144 |
+
#: includes/class-freemius.php:4232
|
145 |
+
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."
|
146 |
+
msgstr "Výborně, nainstalujte prosím cURL a povolte ji v souboru php.ini. Dále vyhledejte v souboru php.ini direktivu 'disable_functions ' a odeberte všechny zakázané metody začínající na \"curl_\". Chcete-li se ujistit, že byla úspěšně aktivována, použijte 'phpinfo() '. Jakmile je aktivován, deaktivujte %s a znovu jej aktivujte."
|
147 |
+
|
148 |
+
#: includes/class-freemius.php:4337
|
149 |
+
msgid "Yes - do your thing"
|
150 |
+
msgstr "Ano - udělejte, co potřebujete"
|
151 |
+
|
152 |
+
#: includes/class-freemius.php:4342
|
153 |
+
msgid "No - just deactivate"
|
154 |
+
msgstr "Ne - jen deaktivovat"
|
155 |
+
|
156 |
+
#: includes/class-freemius.php4387, includes/class-freemius.php4881,
|
157 |
+
#: includes/class-freemius.php6032, includes/class-freemius.php13153,
|
158 |
+
#: includes/class-freemius.php16558, includes/class-freemius.php16646,
|
159 |
+
#: includes/class-freemius.php16812, includes/class-freemius.php19040,
|
160 |
+
#: includes/class-freemius.php19381, includes/class-freemius.php19391,
|
161 |
+
#: includes/class-freemius.php20051, includes/class-freemius.php20924,
|
162 |
+
#: includes/class-freemius.php21039, includes/class-freemius.php21183,
|
163 |
+
#: templates/add-ons.php:57
|
164 |
+
msgctxt "exclamation"
|
165 |
+
msgid "Oops"
|
166 |
+
msgstr "Jejda"
|
167 |
+
|
168 |
+
#: includes/class-freemius.php:4456
|
169 |
+
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."
|
170 |
+
msgstr "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."
|
171 |
+
|
172 |
+
#: includes/class-freemius.php:4878
|
173 |
+
msgctxt "addonX cannot run without pluginY"
|
174 |
+
msgid "%s cannot run without %s."
|
175 |
+
msgstr "%s nelze spustit bez %s."
|
176 |
+
|
177 |
+
#: includes/class-freemius.php:4879
|
178 |
+
msgctxt "addonX cannot run..."
|
179 |
+
msgid "%s cannot run without the plugin."
|
180 |
+
msgstr "%s nelze spustit bez tohoto pluginu."
|
181 |
+
|
182 |
+
#: includes/class-freemius.php5052, includes/class-freemius.php5077,
|
183 |
+
#: includes/class-freemius.php:20122
|
184 |
+
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
185 |
+
msgstr "Unexpected API error. Please contact the %s's author with the following error."
|
186 |
+
|
187 |
+
#: includes/class-freemius.php:5720
|
188 |
+
msgid "Premium %s version was successfully activated."
|
189 |
+
msgstr "Premium %s version was successfully activated."
|
190 |
+
|
191 |
+
#: includes/class-freemius.php5732, includes/class-freemius.php:7599
|
192 |
+
msgctxt ""
|
193 |
+
msgid "W00t"
|
194 |
+
msgstr "W00t"
|
195 |
+
|
196 |
+
#: includes/class-freemius.php:5747
|
197 |
+
msgid "You have a %s license."
|
198 |
+
msgstr "Máte licenci „%s“."
|
199 |
+
|
200 |
+
#: includes/class-freemius.php5751, includes/class-freemius.php15975,
|
201 |
+
#: includes/class-freemius.php15986, includes/class-freemius.php19292,
|
202 |
+
#: includes/class-freemius.php19642, includes/class-freemius.php19711,
|
203 |
+
#: includes/class-freemius.php:19876
|
204 |
+
msgctxt "interjection expressing joy or exuberance"
|
205 |
+
msgid "Yee-haw"
|
206 |
+
msgstr "Yee-haw"
|
207 |
+
|
208 |
+
#: includes/class-freemius.php:6015
|
209 |
+
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."
|
210 |
+
msgstr "%s bezplatná zkušební verze byla úspěšně zrušena. Jelikož toto rozšíření nenabízí bezplatnou verzi, bylo automaticky deaktivováno. Chcete-li jej v budoucnu používat, budete si muset zakoupit licenci."
|
211 |
+
|
212 |
+
#: includes/class-freemius.php:6019
|
213 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
214 |
+
msgstr "%s je pouze prémiové rozšíření. Před aktivací pluginu si musíte nejprve zakoupit licenci."
|
215 |
+
|
216 |
+
#: includes/class-freemius.php6028, templates/add-ons.php186,
|
217 |
+
#: templates/account/partials/addon.php:381
|
218 |
+
msgid "More information about %s"
|
219 |
+
msgstr "Více informací o %s"
|
220 |
+
|
221 |
+
#: includes/class-freemius.php:6029
|
222 |
+
msgid "Purchase License"
|
223 |
+
msgstr "Koupit licenci"
|
224 |
+
|
225 |
+
#: includes/class-freemius.php6964, templates/connect.php:163
|
226 |
+
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."
|
227 |
+
msgstr "Aktivační email od %s by měl dorazit do vašeho mailboxu (%s). Ujistěte se, že v emailu kliknete na tlačítko aktivovat, abyste %s."
|
228 |
+
|
229 |
+
#: includes/class-freemius.php:6968
|
230 |
+
msgid "start the trial"
|
231 |
+
msgstr "spustit zkušební verzi"
|
232 |
+
|
233 |
+
#: includes/class-freemius.php6969, templates/connect.php:167
|
234 |
+
msgid "complete the install"
|
235 |
+
msgstr "dokončit installaci"
|
236 |
+
|
237 |
+
#: includes/class-freemius.php:7081
|
238 |
+
msgid "You are just one step away - %s"
|
239 |
+
msgstr "Jste jen na krok od - %s"
|
240 |
+
|
241 |
+
#: includes/class-freemius.php:7084
|
242 |
+
msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
|
243 |
+
msgid "Complete \"%s\" Activation Now"
|
244 |
+
msgstr "Dokončit aktivaci pluginu „%s“"
|
245 |
+
|
246 |
+
#: includes/class-freemius.php:7162
|
247 |
+
msgid "We made a few tweaks to the %s, %s"
|
248 |
+
msgstr "Udělali jsme několik vylepšení %s, %s"
|
249 |
+
|
250 |
+
#: includes/class-freemius.php:7166
|
251 |
+
msgid "Opt in to make \"%s\" better!"
|
252 |
+
msgstr "Zúčastněte se, aby byl \"%s\" ještě lepší!"
|
253 |
+
|
254 |
+
#: includes/class-freemius.php:7598
|
255 |
+
msgid "The upgrade of %s was successfully completed."
|
256 |
+
msgstr "Aktualizace %s byla úspěšně dokončena."
|
257 |
+
|
258 |
+
#: includes/class-freemius.php9802, includes/class-fs-plugin-updater.php1038,
|
259 |
+
#: includes/class-fs-plugin-updater.php1233,
|
260 |
+
#: includes/class-fs-plugin-updater.php1240,
|
261 |
+
#: templates/auto-installation.php:32
|
262 |
+
msgid "Add-On"
|
263 |
+
msgstr "Doplněk"
|
264 |
+
|
265 |
+
#: includes/class-freemius.php9804, templates/account.php335,
|
266 |
+
#: templates/account.php343, templates/debug.php360, templates/debug.php:551
|
267 |
+
msgid "Plugin"
|
268 |
+
msgstr "Plugin"
|
269 |
+
|
270 |
+
#: includes/class-freemius.php9805, templates/account.php336,
|
271 |
+
#: templates/account.php344, templates/debug.php360, templates/debug.php551,
|
272 |
+
#: templates/forms/deactivation/form.php:71
|
273 |
+
msgid "Theme"
|
274 |
+
msgstr "Šablona"
|
275 |
+
|
276 |
+
#: includes/class-freemius.php:12596
|
277 |
+
msgid "An unknown error has occurred while trying to set the user's beta mode."
|
278 |
+
msgstr "Během nastavování uživatelského beta módu došlo k neočekávané chybě."
|
279 |
+
|
280 |
+
#: includes/class-freemius.php:13020
|
281 |
+
msgid "Invalid site details collection."
|
282 |
+
msgstr "Invalid site details collection."
|
283 |
+
|
284 |
+
#: includes/class-freemius.php:13140
|
285 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
286 |
+
msgstr "Nemohli jsme najít vaši e-mailovou adresu v systému, jste si jisti, že je to správná adresa?"
|
287 |
+
|
288 |
+
#: includes/class-freemius.php:13142
|
289 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
290 |
+
msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
291 |
+
|
292 |
+
#: includes/class-freemius.php:13416
|
293 |
+
msgid "Account is pending activation."
|
294 |
+
msgstr "Účet čeká na aktivaci."
|
295 |
+
|
296 |
+
#: includes/class-freemius.php13528,
|
297 |
+
#: templates/forms/premium-versions-upgrade-handler.php:47
|
298 |
+
msgid "Buy a license now"
|
299 |
+
msgstr "Koupit licenci nyní"
|
300 |
+
|
301 |
+
#: includes/class-freemius.php13540,
|
302 |
+
#: templates/forms/premium-versions-upgrade-handler.php:46
|
303 |
+
msgid "Renew your license now"
|
304 |
+
msgstr "Obnovte svou licenci teď"
|
305 |
+
|
306 |
+
#: includes/class-freemius.php:13544
|
307 |
+
msgid "%s to access version %s security & feature updates, and support."
|
308 |
+
msgstr "%s pro přístup k verzi %s zajišťující podporu a nejen bezpečnostní aktualizace."
|
309 |
+
|
310 |
+
#: includes/class-freemius.php:15957
|
311 |
+
msgid "%s activation was successfully completed."
|
312 |
+
msgstr "Aktivace %s byla úspěšně dokončena."
|
313 |
+
|
314 |
+
#: includes/class-freemius.php:15971
|
315 |
+
msgid "Your account was successfully activated with the %s plan."
|
316 |
+
msgstr "Účet byl úspěšně aktivován s plánem %s."
|
317 |
+
|
318 |
+
#: includes/class-freemius.php15982, includes/class-freemius.php:19707
|
319 |
+
msgid "Your trial has been successfully started."
|
320 |
+
msgstr "Vaše zkušebí verze byla úspěšně spuštěna."
|
321 |
+
|
322 |
+
#: includes/class-freemius.php16556, includes/class-freemius.php16644,
|
323 |
+
#: includes/class-freemius.php:16810
|
324 |
+
msgid "Couldn't activate %s."
|
325 |
+
msgstr "Nelze aktivovat %s."
|
326 |
+
|
327 |
+
#: includes/class-freemius.php16557, includes/class-freemius.php16645,
|
328 |
+
#: includes/class-freemius.php:16811
|
329 |
+
msgid "Please contact us with the following message:"
|
330 |
+
msgstr "Kontaktujte nás prosím s následující zprávou:"
|
331 |
+
|
332 |
+
#: includes/class-freemius.php16641, templates/forms/data-debug-mode.php:162
|
333 |
+
msgid "An unknown error has occurred."
|
334 |
+
msgstr "Došlo k neznámé chybě."
|
335 |
+
|
336 |
+
#: includes/class-freemius.php17168, includes/class-freemius.php:22082
|
337 |
+
msgid "Upgrade"
|
338 |
+
msgstr "Upgrade"
|
339 |
+
|
340 |
+
#: includes/class-freemius.php:17174
|
341 |
+
msgid "Start Trial"
|
342 |
+
msgstr "Začít Trial"
|
343 |
+
|
344 |
+
#: includes/class-freemius.php:17176
|
345 |
+
msgid "Pricing"
|
346 |
+
msgstr "Ceník"
|
347 |
+
|
348 |
+
#: includes/class-freemius.php17256, includes/class-freemius.php:17258
|
349 |
+
msgid "Affiliation"
|
350 |
+
msgstr "Affiliation"
|
351 |
+
|
352 |
+
#: includes/class-freemius.php17286, includes/class-freemius.php17288,
|
353 |
+
#: templates/account.php183, templates/debug.php:326
|
354 |
+
msgid "Account"
|
355 |
+
msgstr "Účet"
|
356 |
+
|
357 |
+
#: includes/class-freemius.php17302, includes/class-freemius.php17304,
|
358 |
+
#: includes/customizer/class-fs-customizer-support-section.php:60
|
359 |
+
msgid "Contact Us"
|
360 |
+
msgstr "Support"
|
361 |
+
|
362 |
+
#: includes/class-freemius.php17315, includes/class-freemius.php17317,
|
363 |
+
#: includes/class-freemius.php22096, templates/account.php111,
|
364 |
+
#: templates/account/partials/addon.php:44
|
365 |
+
msgid "Add-Ons"
|
366 |
+
msgstr "Doplňky"
|
367 |
+
|
368 |
+
#: includes/class-freemius.php:17351
|
369 |
+
msgctxt "ASCII arrow left icon"
|
370 |
+
msgid "←"
|
371 |
+
msgstr "←"
|
372 |
+
|
373 |
+
#: includes/class-freemius.php:17351
|
374 |
+
msgctxt "ASCII arrow right icon"
|
375 |
+
msgid "➤"
|
376 |
+
msgstr "➤"
|
377 |
+
|
378 |
+
#: includes/class-freemius.php17353, templates/pricing.php:103
|
379 |
+
msgctxt "noun"
|
380 |
+
msgid "Pricing"
|
381 |
+
msgstr "Ceník"
|
382 |
+
|
383 |
+
#: includes/class-freemius.php17566,
|
384 |
+
#: includes/customizer/class-fs-customizer-support-section.php:67
|
385 |
+
msgid "Support Forum"
|
386 |
+
msgstr "Fórum podpory"
|
387 |
+
|
388 |
+
#: includes/class-freemius.php:18536
|
389 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
390 |
+
msgstr "Your email has been successfully verified - you are AWESOME!"
|
391 |
+
|
392 |
+
#: includes/class-freemius.php:18537
|
393 |
+
msgctxt "a positive response"
|
394 |
+
msgid "Right on"
|
395 |
+
msgstr "Right on"
|
396 |
+
|
397 |
+
#: includes/class-freemius.php:19041
|
398 |
+
msgid "seems like the key you entered doesn't match our records."
|
399 |
+
msgstr "seems like the key you entered doesn't match our records."
|
400 |
+
|
401 |
+
#: includes/class-freemius.php:19065
|
402 |
+
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."
|
403 |
+
msgstr "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."
|
404 |
+
|
405 |
+
#: includes/class-freemius.php:19283
|
406 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
407 |
+
msgstr "Your %s Add-on plan was successfully upgraded."
|
408 |
+
|
409 |
+
#: includes/class-freemius.php:19285
|
410 |
+
msgid "%s Add-on was successfully purchased."
|
411 |
+
msgstr "Rozšíření %s bylo úspěšně zakoupeno."
|
412 |
+
|
413 |
+
#: includes/class-freemius.php:19288
|
414 |
+
msgid "Download the latest version"
|
415 |
+
msgstr "Stáhnout nejnovější verzi"
|
416 |
+
|
417 |
+
#: includes/class-freemius.php:19374
|
418 |
+
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"
|
419 |
+
msgstr "Váš server blokuje přístup k Freemium API, což je zásadní pro synchronizaci %1s. Obraťte se na svého poskytovatele , aby přidal do svého whitelistu %2s"
|
420 |
+
|
421 |
+
#: includes/class-freemius.php19380, includes/class-freemius.php19390,
|
422 |
+
#: includes/class-freemius.php19835, includes/class-freemius.php:19924
|
423 |
+
msgid "Error received from the server:"
|
424 |
+
msgstr "Chyba přijatá ze serveru:"
|
425 |
+
|
426 |
+
#: includes/class-freemius.php:19390
|
427 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
428 |
+
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
429 |
+
|
430 |
+
#: includes/class-freemius.php19604, includes/class-freemius.php19840,
|
431 |
+
#: includes/class-freemius.php19895, includes/class-freemius.php:19998
|
432 |
+
msgctxt ""
|
433 |
+
msgid "Hmm"
|
434 |
+
msgstr "Hmm"
|
435 |
+
|
436 |
+
#: includes/class-freemius.php:19617
|
437 |
+
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."
|
438 |
+
msgstr "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."
|
439 |
+
|
440 |
+
#: includes/class-freemius.php19618, templates/account.php113,
|
441 |
+
#: templates/add-ons.php250, templates/account/partials/addon.php:46
|
442 |
+
msgctxt "trial period"
|
443 |
+
msgid "Trial"
|
444 |
+
msgstr "Trial"
|
445 |
+
|
446 |
+
#: includes/class-freemius.php:19623
|
447 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
448 |
+
msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
449 |
+
|
450 |
+
#: includes/class-freemius.php19627, includes/class-freemius.php:19686
|
451 |
+
msgid "Please contact us here"
|
452 |
+
msgstr "Kontaktujte nás prosím zde"
|
453 |
+
|
454 |
+
#: includes/class-freemius.php:19638
|
455 |
+
msgid "Your plan was successfully activated."
|
456 |
+
msgstr "Vaše licence byla úspěšně aktivována."
|
457 |
+
|
458 |
+
#: includes/class-freemius.php:19639
|
459 |
+
msgid "Your plan was successfully upgraded."
|
460 |
+
msgstr "Váš plán byl úspěšně aktualizován."
|
461 |
+
|
462 |
+
#: includes/class-freemius.php:19656
|
463 |
+
msgid "Your plan was successfully changed to %s."
|
464 |
+
msgstr "Váše předplatné bylo úspěšně změněn na %s."
|
465 |
+
|
466 |
+
#: includes/class-freemius.php:19672
|
467 |
+
msgid "Your license has expired. You can still continue using the free %s forever."
|
468 |
+
msgstr "Vaše licence vypršela. Stále však můžete free verzi %s bez omezení."
|
469 |
+
|
470 |
+
#: includes/class-freemius.php:19674
|
471 |
+
msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
472 |
+
msgstr "Vaše licence vypršela. %1$sObnovte předplatné%2$s, abyste mohli mohli %3$s používat bez omezení."
|
473 |
+
|
474 |
+
#: includes/class-freemius.php:19682
|
475 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
476 |
+
msgstr "Vaše licence byla zrušena. Pokud si myslíte, že je to chyba, obraťte se na naší podporu."
|
477 |
+
|
478 |
+
#: includes/class-freemius.php:19695
|
479 |
+
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."
|
480 |
+
msgstr "Vaše licence vypršela. Stále však můžete používat všechny funkce verze %s, ale pro získání technické podpory a nejnovějších aktualizací budete muset obnovit svou licenci."
|
481 |
+
|
482 |
+
#: includes/class-freemius.php:19721
|
483 |
+
msgid "Your free trial has expired. You can still continue using all our free features."
|
484 |
+
msgstr "Your free trial has expired. You can still continue using all our free features."
|
485 |
+
|
486 |
+
#: includes/class-freemius.php:19723
|
487 |
+
msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
488 |
+
msgstr "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
489 |
+
|
490 |
+
#: includes/class-freemius.php:19831
|
491 |
+
msgid "It looks like the license could not be activated."
|
492 |
+
msgstr "Licenci se nepodařilo aktivovat."
|
493 |
+
|
494 |
+
#: includes/class-freemius.php:19873
|
495 |
+
msgid "Your license was successfully activated."
|
496 |
+
msgstr "Vaše licence byla úspěšně aktivována."
|
497 |
+
|
498 |
+
#: includes/class-freemius.php:19899
|
499 |
+
msgid "It looks like your site currently doesn't have an active license."
|
500 |
+
msgstr "It looks like your site currently doesn't have an active license."
|
501 |
+
|
502 |
+
#: includes/class-freemius.php:19923
|
503 |
+
msgid "It looks like the license deactivation failed."
|
504 |
+
msgstr "Deaktivace licence pravděpodobně selhala."
|
505 |
+
|
506 |
+
#: includes/class-freemius.php:19951
|
507 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
508 |
+
msgstr "Vaše licence byla úspěšně deaktivována, jste zpět na plánu %s."
|
509 |
+
|
510 |
+
#: includes/class-freemius.php:19952
|
511 |
+
msgid "O.K"
|
512 |
+
msgstr "OK"
|
513 |
+
|
514 |
+
#: includes/class-freemius.php:20005
|
515 |
+
msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
|
516 |
+
msgstr "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
|
517 |
+
|
518 |
+
#: includes/class-freemius.php:20014
|
519 |
+
msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
|
520 |
+
msgstr "Vaše předplatné bylo úspěšně zrušeno. Platnost licence %s vyprší za %s."
|
521 |
+
|
522 |
+
#: includes/class-freemius.php:20056
|
523 |
+
msgid "You are already running the %s in a trial mode."
|
524 |
+
msgstr "You are already running the %s in a trial mode."
|
525 |
+
|
526 |
+
#: includes/class-freemius.php:20067
|
527 |
+
msgid "You already utilized a trial before."
|
528 |
+
msgstr "O zkušební licenci nelze žádat dvakrát."
|
529 |
+
|
530 |
+
#: includes/class-freemius.php:20081
|
531 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
532 |
+
msgstr "Plán %s neexistuje, proto nemůžete používt zkušební verzi."
|
533 |
+
|
534 |
+
#: includes/class-freemius.php:20092
|
535 |
+
msgid "Plan %s does not support a trial period."
|
536 |
+
msgstr "Plán %s nepodporuje zkušební období."
|
537 |
+
|
538 |
+
#: includes/class-freemius.php:20103
|
539 |
+
msgid "None of the %s's plans supports a trial period."
|
540 |
+
msgstr "None of the %s's plans supports a trial period."
|
541 |
+
|
542 |
+
#: includes/class-freemius.php:20153
|
543 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
544 |
+
msgstr "Zkuušební režim už vám skončil, takže už není co rušit :)"
|
545 |
+
|
546 |
+
#: includes/class-freemius.php:20189
|
547 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
548 |
+
msgstr "Omlouváme se, ale měli jsme nějaký dočasný problém se zrušením vaší zkušební licence. Zkuste to znovu za několik minut."
|
549 |
+
|
550 |
+
#: includes/class-freemius.php:20208
|
551 |
+
msgid "Your %s free trial was successfully cancelled."
|
552 |
+
msgstr "Your %s free trial was successfully cancelled."
|
553 |
+
|
554 |
+
#: includes/class-freemius.php:20524
|
555 |
+
msgid "Version %s was released."
|
556 |
+
msgstr "Byla vydána verze %s."
|
557 |
+
|
558 |
+
#: includes/class-freemius.php:20524
|
559 |
+
msgid "Please download %s."
|
560 |
+
msgstr "Stáhněte si prosím %s."
|
561 |
+
|
562 |
+
#: includes/class-freemius.php:20531
|
563 |
+
msgid "the latest %s version here"
|
564 |
+
msgstr "nejnovější %s verze zde"
|
565 |
+
|
566 |
+
#: includes/class-freemius.php:20536
|
567 |
+
msgid "New"
|
568 |
+
msgstr "Nový"
|
569 |
+
|
570 |
+
#: includes/class-freemius.php:20541
|
571 |
+
msgid "Seems like you got the latest release."
|
572 |
+
msgstr "Pravděpodobně máte nejnovější verzi."
|
573 |
+
|
574 |
+
#: includes/class-freemius.php:20542
|
575 |
+
msgid "You are all good!"
|
576 |
+
msgstr "You are all good!"
|
577 |
+
|
578 |
+
#: includes/class-freemius.php:20812
|
579 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
580 |
+
msgstr "Ověřovací zpráva byla právě odeslána na email %s. Pokud ji nenajdete do 5 min, zkontrolujte prosím složku pro spam."
|
581 |
+
|
582 |
+
#: includes/class-freemius.php:20951
|
583 |
+
msgid "Site successfully opted in."
|
584 |
+
msgstr "Site successfully opted in."
|
585 |
+
|
586 |
+
#: includes/class-freemius.php20952, includes/class-freemius.php:21792
|
587 |
+
msgid "Awesome"
|
588 |
+
msgstr "Úžasný"
|
589 |
+
|
590 |
+
#: includes/class-freemius.php20968, templates/forms/optout.php:32
|
591 |
+
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
592 |
+
msgstr "Vážíme si vaší pomoci při zlepšování %s tím, že nám umožníte sledovat některá data o jeho používání."
|
593 |
+
|
594 |
+
#: includes/class-freemius.php:20969
|
595 |
+
msgid "Thank you!"
|
596 |
+
msgstr "Děkujeme!"
|
597 |
+
|
598 |
+
#: includes/class-freemius.php:20976
|
599 |
+
msgid "We will no longer be sending any usage data of %s on %s to %s."
|
600 |
+
msgstr "Nebudeme již posílat žádná data o používání %s na %s do %s."
|
601 |
+
|
602 |
+
#: includes/class-freemius.php:21105
|
603 |
+
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."
|
604 |
+
msgstr "Zkontrolujte si prosím emailovou schránku, měli byste obdržet zprávu od %s pro potvrzení změny vlastnictví. Z bezpečnostních důvodů je nutné potvrdit tuto změnu během následujících 15 minut. Pokud email nemůžete najít, zkontrolujte složku se spamem."
|
605 |
+
|
606 |
+
#: includes/class-freemius.php:21111
|
607 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
608 |
+
msgstr "Děkujeme za potvrzení změny vlastnictví. Email byl právě odeslán na adresu %s, ke konečnému schválení."
|
609 |
+
|
610 |
+
#: includes/class-freemius.php:21116
|
611 |
+
msgid "%s is the new owner of the account."
|
612 |
+
msgstr "%s je nový vlastník účtu."
|
613 |
+
|
614 |
+
#: includes/class-freemius.php:21118
|
615 |
+
msgctxt "as congratulations"
|
616 |
+
msgid "Congrats"
|
617 |
+
msgstr "Gratulujeme"
|
618 |
+
|
619 |
+
#: includes/class-freemius.php:21138
|
620 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
621 |
+
msgstr "Omlouváme se, ale aktualizaci emailu jsem nemohli dokončit. Uživatel s vámi zadaným emailem už je registrován."
|
622 |
+
|
623 |
+
#: includes/class-freemius.php:21139
|
624 |
+
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
625 |
+
msgstr "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
626 |
+
|
627 |
+
#: includes/class-freemius.php:21146
|
628 |
+
msgid "Change Ownership"
|
629 |
+
msgstr "Změnit vlastnictví"
|
630 |
+
|
631 |
+
#: includes/class-freemius.php:21154
|
632 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
633 |
+
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
634 |
+
|
635 |
+
#: includes/class-freemius.php:21166
|
636 |
+
msgid "Please provide your full name."
|
637 |
+
msgstr "Zadejte prosím své celé jméno."
|
638 |
+
|
639 |
+
#: includes/class-freemius.php:21171
|
640 |
+
msgid "Your name was successfully updated."
|
641 |
+
msgstr "Vaše jméno bylo úspěšně aktualizováno."
|
642 |
+
|
643 |
+
#: includes/class-freemius.php:21232
|
644 |
+
msgid "You have successfully updated your %s."
|
645 |
+
msgstr "Úspěšně jste aktualizovali %s."
|
646 |
+
|
647 |
+
#: includes/class-freemius.php:21372
|
648 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
649 |
+
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
650 |
+
|
651 |
+
#: includes/class-freemius.php:21373
|
652 |
+
msgctxt "advance notice of something that will need attention."
|
653 |
+
msgid "Heads up"
|
654 |
+
msgstr "Heads up"
|
655 |
+
|
656 |
+
#: includes/class-freemius.php:21832
|
657 |
+
msgctxt "exclamation"
|
658 |
+
msgid "Hey"
|
659 |
+
msgstr "Dobrý den"
|
660 |
+
|
661 |
+
#: includes/class-freemius.php:21832
|
662 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
663 |
+
msgstr "Jak se vám líbí %s? Otestujte všechny naše %s nadstandardní funkce s %d-denní zkušební verze zdarma."
|
664 |
+
|
665 |
+
#: includes/class-freemius.php:21840
|
666 |
+
msgid "No commitment for %s days - cancel anytime!"
|
667 |
+
msgstr "No commitment for %s days - cancel anytime!"
|
668 |
+
|
669 |
+
#: includes/class-freemius.php:21841
|
670 |
+
msgid "No credit card required"
|
671 |
+
msgstr "Kreditní karta není vyžadována"
|
672 |
+
|
673 |
+
#: includes/class-freemius.php21848, templates/forms/trial-start.php:53
|
674 |
+
msgctxt "call to action"
|
675 |
+
msgid "Start free trial"
|
676 |
+
msgstr "Start free trial"
|
677 |
+
|
678 |
+
#: includes/class-freemius.php:21925
|
679 |
+
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!"
|
680 |
+
msgstr "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!"
|
681 |
+
|
682 |
+
#: includes/class-freemius.php:21934
|
683 |
+
msgid "Learn more"
|
684 |
+
msgstr "Přečtěte si více"
|
685 |
+
|
686 |
+
#: includes/class-freemius.php22120, templates/account.php499,
|
687 |
+
#: templates/account.php624, templates/connect.php171,
|
688 |
+
#: templates/connect.php421, templates/forms/license-activation.php27,
|
689 |
+
#: templates/account/partials/addon.php:321
|
690 |
+
msgid "Activate License"
|
691 |
+
msgstr "Aktivovat licenci"
|
692 |
+
|
693 |
+
#: includes/class-freemius.php22121, templates/account.php571,
|
694 |
+
#: templates/account.php623, templates/account/partials/addon.php322,
|
695 |
+
#: templates/account/partials/site.php:271
|
696 |
+
msgid "Change License"
|
697 |
+
msgstr "Změnit licenci"
|
698 |
+
|
699 |
+
#: includes/class-freemius.php22217, templates/account/partials/site.php:169
|
700 |
+
msgid "Opt Out"
|
701 |
+
msgstr "Odhlásit se"
|
702 |
+
|
703 |
+
#: includes/class-freemius.php22219, includes/class-freemius.php22225,
|
704 |
+
#: templates/account/partials/site.php49,
|
705 |
+
#: templates/account/partials/site.php:169
|
706 |
+
msgid "Opt In"
|
707 |
+
msgstr "Zúčastnit se"
|
708 |
+
|
709 |
+
#: includes/class-freemius.php:22453
|
710 |
+
msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
|
711 |
+
msgstr " Placená verze %1s je již nainstalována. Aktivujte jí, abyste mohli těžit z %2s funkcí. %3s"
|
712 |
+
|
713 |
+
#: includes/class-freemius.php:22461
|
714 |
+
msgid "Activate %s features"
|
715 |
+
msgstr "Aktivovat %s funkce"
|
716 |
+
|
717 |
+
#: includes/class-freemius.php:22474
|
718 |
+
msgid "Please follow these steps to complete the upgrade"
|
719 |
+
msgstr "Dokončete upgrade provedením následujících kroků"
|
720 |
+
|
721 |
+
#: includes/class-freemius.php:22478
|
722 |
+
msgid "Download the latest %s version"
|
723 |
+
msgstr "Stáhnout nejnovější verzi %s"
|
724 |
+
|
725 |
+
#: includes/class-freemius.php:22482
|
726 |
+
msgid "Upload and activate the downloaded version"
|
727 |
+
msgstr "Nahrát a aktivovat stáhnutou verzi"
|
728 |
+
|
729 |
+
#: includes/class-freemius.php:22484
|
730 |
+
msgid "How to upload and activate?"
|
731 |
+
msgstr "Jak nahrát a aktivovat?"
|
732 |
+
|
733 |
+
#: includes/class-freemius.php:22618
|
734 |
+
msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
|
735 |
+
msgstr "%sClick here%s to choose the sites where you'd like to activate the license on."
|
736 |
+
|
737 |
+
#: includes/class-freemius.php:22779
|
738 |
+
msgid "Auto installation only works for opted-in users."
|
739 |
+
msgstr "Auto installation only works for opted-in users."
|
740 |
+
|
741 |
+
#: includes/class-freemius.php22789, includes/class-freemius.php22822,
|
742 |
+
#: includes/class-fs-plugin-updater.php1212,
|
743 |
+
#: includes/class-fs-plugin-updater.php:1226
|
744 |
+
msgid "Invalid module ID."
|
745 |
+
msgstr "Invalid module ID."
|
746 |
+
|
747 |
+
#: includes/class-freemius.php22798, includes/class-fs-plugin-updater.php:1248
|
748 |
+
msgid "Premium version already active."
|
749 |
+
msgstr "Prémiová verze je již aktivní."
|
750 |
+
|
751 |
+
#: includes/class-freemius.php:22805
|
752 |
+
msgid "You do not have a valid license to access the premium version."
|
753 |
+
msgstr "You do not have a valid license to access the premium version."
|
754 |
+
|
755 |
+
#: includes/class-freemius.php:22812
|
756 |
+
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
757 |
+
msgstr "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
758 |
+
|
759 |
+
#: includes/class-freemius.php22830, includes/class-fs-plugin-updater.php:1247
|
760 |
+
msgid "Premium add-on version already installed."
|
761 |
+
msgstr "Premium add-on version already installed."
|
762 |
+
|
763 |
+
#: includes/class-freemius.php:23180
|
764 |
+
msgid "View paid features"
|
765 |
+
msgstr "Zobrazit placené funkce"
|
766 |
+
|
767 |
+
#: includes/class-freemius.php:23502
|
768 |
+
msgid "Thank you so much for using %s and its add-ons!"
|
769 |
+
msgstr "Thank you so much for using %s and its add-ons!"
|
770 |
+
|
771 |
+
#: includes/class-freemius.php:23503
|
772 |
+
msgid "Thank you so much for using %s!"
|
773 |
+
msgstr "Thank you so much for using %s!"
|
774 |
+
|
775 |
+
#: includes/class-freemius.php:23509
|
776 |
+
msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
|
777 |
+
msgstr "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
|
778 |
+
|
779 |
+
#: includes/class-freemius.php:23513
|
780 |
+
msgid "Thank you so much for using our products!"
|
781 |
+
msgstr "Thank you so much for using our products!"
|
782 |
+
|
783 |
+
#: includes/class-freemius.php:23514
|
784 |
+
msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
|
785 |
+
msgstr "You've already opted-in to our usage-tracking, which helps us keep improving them."
|
786 |
+
|
787 |
+
#: includes/class-freemius.php:23533
|
788 |
+
msgid "%s and its add-ons"
|
789 |
+
msgstr "%s a jeho doplňky"
|
790 |
+
|
791 |
+
#: includes/class-freemius.php:23542
|
792 |
+
msgid "Products"
|
793 |
+
msgstr "Produkty"
|
794 |
+
|
795 |
+
#: includes/class-freemius.php23549, templates/connect.php:272
|
796 |
+
msgid "Yes"
|
797 |
+
msgstr "Ano"
|
798 |
+
|
799 |
+
#: includes/class-freemius.php23550, templates/connect.php:273
|
800 |
+
msgid "send me security & feature updates, educational content and offers."
|
801 |
+
msgstr "send me security & feature updates, educational content and offers."
|
802 |
+
|
803 |
+
#: includes/class-freemius.php23551, templates/connect.php:278
|
804 |
+
msgid "No"
|
805 |
+
msgstr "Ne"
|
806 |
+
|
807 |
+
#: includes/class-freemius.php23553, templates/connect.php:280
|
808 |
+
msgid "do %sNOT%s send me security & feature updates, educational content and offers."
|
809 |
+
msgstr "do %sNOT%s send me security & feature updates, educational content and offers."
|
810 |
+
|
811 |
+
#: includes/class-freemius.php:23563
|
812 |
+
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 :-)"
|
813 |
+
msgstr "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 :-)"
|
814 |
+
|
815 |
+
#: includes/class-freemius.php23565, templates/connect.php:287
|
816 |
+
msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
|
817 |
+
msgstr "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
|
818 |
+
|
819 |
+
#: includes/class-freemius.php:23847
|
820 |
+
msgid "License key is empty."
|
821 |
+
msgstr "Licenční klíč je prázdný."
|
822 |
+
|
823 |
+
#: includes/class-fs-plugin-updater.php206,
|
824 |
+
#: templates/forms/premium-versions-upgrade-handler.php:57
|
825 |
+
msgid "Renew license"
|
826 |
+
msgstr "Obnovit licenci"
|
827 |
+
|
828 |
+
#: includes/class-fs-plugin-updater.php211,
|
829 |
+
#: templates/forms/premium-versions-upgrade-handler.php:58
|
830 |
+
msgid "Buy license"
|
831 |
+
msgstr "Koupit licenci"
|
832 |
+
|
833 |
+
#: includes/class-fs-plugin-updater.php321,
|
834 |
+
#: includes/class-fs-plugin-updater.php:354
|
835 |
+
msgid "There is a %s of %s available."
|
836 |
+
msgstr "There is a %s of %s available."
|
837 |
+
|
838 |
+
#: includes/class-fs-plugin-updater.php323,
|
839 |
+
#: includes/class-fs-plugin-updater.php:359
|
840 |
+
msgid "new Beta version"
|
841 |
+
msgstr "nová Beta verze"
|
842 |
+
|
843 |
+
#: includes/class-fs-plugin-updater.php324,
|
844 |
+
#: includes/class-fs-plugin-updater.php:360
|
845 |
+
msgid "new version"
|
846 |
+
msgstr "nová verze"
|
847 |
+
|
848 |
+
#: includes/class-fs-plugin-updater.php:383
|
849 |
+
msgid "Important Upgrade Notice:"
|
850 |
+
msgstr "Important Upgrade Notice:"
|
851 |
+
|
852 |
+
#: includes/class-fs-plugin-updater.php:1277
|
853 |
+
msgid "Installing plugin: %s"
|
854 |
+
msgstr "Instaluji plugin: %s"
|
855 |
+
|
856 |
+
#: includes/class-fs-plugin-updater.php:1318
|
857 |
+
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
858 |
+
msgstr "Nelze se připojit k systémovému souboru. Potvrďte prosím svá pověření."
|
859 |
+
|
860 |
+
#: includes/class-fs-plugin-updater.php:1500
|
861 |
+
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
862 |
+
msgstr "Balíček remote pluginů neobsahuje složku s žádoucím \"slug\" a přejmenování nefunguje."
|
863 |
+
|
864 |
+
#: includes/fs-plugin-info-dialog.php:535
|
865 |
+
msgid "Purchase More"
|
866 |
+
msgstr "Zakoupit další"
|
867 |
+
|
868 |
+
#: includes/fs-plugin-info-dialog.php536,
|
869 |
+
#: templates/account/partials/addon.php:385
|
870 |
+
msgctxt "verb"
|
871 |
+
msgid "Purchase"
|
872 |
+
msgstr "Zakoupit"
|
873 |
+
|
874 |
+
#: includes/fs-plugin-info-dialog.php:540
|
875 |
+
msgid "Start my free %s"
|
876 |
+
msgstr "Začít můj bezplatný %s"
|
877 |
+
|
878 |
+
#: includes/fs-plugin-info-dialog.php:738
|
879 |
+
msgid "Install Free Version Update Now"
|
880 |
+
msgstr "Install Free Version Update Now"
|
881 |
+
|
882 |
+
#: includes/fs-plugin-info-dialog.php739, templates/account.php:560
|
883 |
+
msgid "Install Update Now"
|
884 |
+
msgstr "Nainstalovat aktualizaci"
|
885 |
+
|
886 |
+
#: includes/fs-plugin-info-dialog.php:748
|
887 |
+
msgid "Install Free Version Now"
|
888 |
+
msgstr "Nainstalovat verzi zdarma"
|
889 |
+
|
890 |
+
#: includes/fs-plugin-info-dialog.php749, templates/add-ons.php323,
|
891 |
+
#: templates/auto-installation.php111,
|
892 |
+
#: templates/account/partials/addon.php365,
|
893 |
+
#: templates/account/partials/addon.php:418
|
894 |
+
msgid "Install Now"
|
895 |
+
msgstr "Instalovat"
|
896 |
+
|
897 |
+
#: includes/fs-plugin-info-dialog.php:765
|
898 |
+
msgctxt "as download latest version"
|
899 |
+
msgid "Download Latest Free Version"
|
900 |
+
msgstr "Stáhněte si nejnovější bezplatnou verzi"
|
901 |
+
|
902 |
+
#: includes/fs-plugin-info-dialog.php766, templates/account.php91,
|
903 |
+
#: templates/add-ons.php37, templates/account/partials/addon.php:25
|
904 |
+
msgctxt "as download latest version"
|
905 |
+
msgid "Download Latest"
|
906 |
+
msgstr "Stáhněte si nejnovější"
|
907 |
+
|
908 |
+
#: includes/fs-plugin-info-dialog.php781, templates/add-ons.php329,
|
909 |
+
#: templates/account/partials/addon.php356,
|
910 |
+
#: templates/account/partials/addon.php:412
|
911 |
+
msgid "Activate this add-on"
|
912 |
+
msgstr "Aktivovat toto rozšíření"
|
913 |
+
|
914 |
+
#: includes/fs-plugin-info-dialog.php783, templates/connect.php:418
|
915 |
+
msgid "Activate Free Version"
|
916 |
+
msgstr "Aktivovat bezplatnou verzi"
|
917 |
+
|
918 |
+
#: includes/fs-plugin-info-dialog.php784, templates/account.php115,
|
919 |
+
#: templates/add-ons.php330, templates/account/partials/addon.php:48
|
920 |
+
msgid "Activate"
|
921 |
+
msgstr "Aktivovat"
|
922 |
+
|
923 |
+
#: includes/fs-plugin-info-dialog.php:994
|
924 |
+
msgctxt "Plugin installer section title"
|
925 |
+
msgid "Description"
|
926 |
+
msgstr "Popis"
|
927 |
+
|
928 |
+
#: includes/fs-plugin-info-dialog.php:995
|
929 |
+
msgctxt "Plugin installer section title"
|
930 |
+
msgid "Installation"
|
931 |
+
msgstr "Instalace"
|
932 |
+
|
933 |
+
#: includes/fs-plugin-info-dialog.php:996
|
934 |
+
msgctxt "Plugin installer section title"
|
935 |
+
msgid "FAQ"
|
936 |
+
msgstr "FAQ"
|
937 |
+
|
938 |
+
#: includes/fs-plugin-info-dialog.php997,
|
939 |
+
#: templates/plugin-info/description.php:55
|
940 |
+
msgid "Screenshots"
|
941 |
+
msgstr "Snímky obrazovky"
|
942 |
+
|
943 |
+
#: includes/fs-plugin-info-dialog.php:998
|
944 |
+
msgctxt "Plugin installer section title"
|
945 |
+
msgid "Changelog"
|
946 |
+
msgstr "Historie změn"
|
947 |
+
|
948 |
+
#: includes/fs-plugin-info-dialog.php:999
|
949 |
+
msgctxt "Plugin installer section title"
|
950 |
+
msgid "Reviews"
|
951 |
+
msgstr "Vaše hodnocení"
|
952 |
+
|
953 |
+
#: includes/fs-plugin-info-dialog.php:1000
|
954 |
+
msgctxt "Plugin installer section title"
|
955 |
+
msgid "Other Notes"
|
956 |
+
msgstr "Other Notes"
|
957 |
+
|
958 |
+
#: includes/fs-plugin-info-dialog.php:1015
|
959 |
+
msgctxt "Plugin installer section title"
|
960 |
+
msgid "Features & Pricing"
|
961 |
+
msgstr "Vlastnosti a ceník"
|
962 |
+
|
963 |
+
#: includes/fs-plugin-info-dialog.php:1025
|
964 |
+
msgid "Plugin Install"
|
965 |
+
msgstr "Instalace pluginu"
|
966 |
+
|
967 |
+
#: includes/fs-plugin-info-dialog.php:1097
|
968 |
+
msgctxt "e.g. Professional Plan"
|
969 |
+
msgid "%s Plan"
|
970 |
+
msgstr "%s plán"
|
971 |
+
|
972 |
+
#: includes/fs-plugin-info-dialog.php:1123
|
973 |
+
msgctxt "e.g. the best product"
|
974 |
+
msgid "Best"
|
975 |
+
msgstr "Nejlepší"
|
976 |
+
|
977 |
+
#: includes/fs-plugin-info-dialog.php1129,
|
978 |
+
#: includes/fs-plugin-info-dialog.php:1149
|
979 |
+
msgctxt "as every month"
|
980 |
+
msgid "Monthly"
|
981 |
+
msgstr "Měsíčně"
|
982 |
+
|
983 |
+
#: includes/fs-plugin-info-dialog.php:1132
|
984 |
+
msgctxt "as once a year"
|
985 |
+
msgid "Annual"
|
986 |
+
msgstr "Ročně"
|
987 |
+
|
988 |
+
#: includes/fs-plugin-info-dialog.php:1135
|
989 |
+
msgid "Lifetime"
|
990 |
+
msgstr "Doživotní"
|
991 |
+
|
992 |
+
#: includes/fs-plugin-info-dialog.php1149,
|
993 |
+
#: includes/fs-plugin-info-dialog.php1151,
|
994 |
+
#: includes/fs-plugin-info-dialog.php:1153
|
995 |
+
msgctxt "e.g. billed monthly"
|
996 |
+
msgid "Billed %s"
|
997 |
+
msgstr "Účtováno %s"
|
998 |
+
|
999 |
+
#: includes/fs-plugin-info-dialog.php:1151
|
1000 |
+
msgctxt "as once a year"
|
1001 |
+
msgid "Annually"
|
1002 |
+
msgstr "Ročně"
|
1003 |
+
|
1004 |
+
#: includes/fs-plugin-info-dialog.php:1153
|
1005 |
+
msgctxt "as once a year"
|
1006 |
+
msgid "Once"
|
1007 |
+
msgstr "Jedenkrát"
|
1008 |
+
|
1009 |
+
#: includes/fs-plugin-info-dialog.php:1159
|
1010 |
+
msgid "Single Site License"
|
1011 |
+
msgstr "Single Site License"
|
1012 |
+
|
1013 |
+
#: includes/fs-plugin-info-dialog.php:1161
|
1014 |
+
msgid "Unlimited Licenses"
|
1015 |
+
msgstr "Unlimited Licenses"
|
1016 |
+
|
1017 |
+
#: includes/fs-plugin-info-dialog.php:1163
|
1018 |
+
msgid "Up to %s Sites"
|
1019 |
+
msgstr "Až pro %s webů"
|
1020 |
+
|
1021 |
+
#: includes/fs-plugin-info-dialog.php1173,
|
1022 |
+
#: templates/plugin-info/features.php:82
|
1023 |
+
msgctxt "as monthly period"
|
1024 |
+
msgid "mo"
|
1025 |
+
msgstr "po"
|
1026 |
+
|
1027 |
+
#: includes/fs-plugin-info-dialog.php1180,
|
1028 |
+
#: templates/plugin-info/features.php:80
|
1029 |
+
msgctxt "as annual period"
|
1030 |
+
msgid "year"
|
1031 |
+
msgstr "rok"
|
1032 |
+
|
1033 |
+
#: includes/fs-plugin-info-dialog.php:1234
|
1034 |
+
msgctxt "noun"
|
1035 |
+
msgid "Price"
|
1036 |
+
msgstr "Cena"
|
1037 |
+
|
1038 |
+
#: includes/fs-plugin-info-dialog.php:1282
|
1039 |
+
msgid "Save %s"
|
1040 |
+
msgstr "Uložit %s"
|
1041 |
+
|
1042 |
+
#: includes/fs-plugin-info-dialog.php:1292
|
1043 |
+
msgid "No commitment for %s - cancel anytime"
|
1044 |
+
msgstr "No commitment for %s - cancel anytime"
|
1045 |
+
|
1046 |
+
#: includes/fs-plugin-info-dialog.php:1295
|
1047 |
+
msgid "After your free %s, pay as little as %s"
|
1048 |
+
msgstr "Po bezplatné %s platit jen v %s"
|
1049 |
+
|
1050 |
+
#: includes/fs-plugin-info-dialog.php:1306
|
1051 |
+
msgid "Details"
|
1052 |
+
msgstr "Detaily"
|
1053 |
+
|
1054 |
+
#: includes/fs-plugin-info-dialog.php1310, templates/account.php102,
|
1055 |
+
#: templates/debug.php203, templates/debug.php240, templates/debug.php457,
|
1056 |
+
#: templates/account/partials/addon.php:36
|
1057 |
+
msgctxt "product version"
|
1058 |
+
msgid "Version"
|
1059 |
+
msgstr "Verze"
|
1060 |
+
|
1061 |
+
#: includes/fs-plugin-info-dialog.php:1317
|
1062 |
+
msgctxt "as the plugin author"
|
1063 |
+
msgid "Author"
|
1064 |
+
msgstr "Autor"
|
1065 |
+
|
1066 |
+
#: includes/fs-plugin-info-dialog.php:1324
|
1067 |
+
msgid "Last Updated"
|
1068 |
+
msgstr "Poslední aktualizace"
|
1069 |
+
|
1070 |
+
#: includes/fs-plugin-info-dialog.php1329, templates/account.php:468
|
1071 |
+
msgctxt "x-ago"
|
1072 |
+
msgid "%s ago"
|
1073 |
+
msgstr "Před %s"
|
1074 |
+
|
1075 |
+
#: includes/fs-plugin-info-dialog.php:1338
|
1076 |
+
msgid "Requires WordPress Version"
|
1077 |
+
msgstr "Vyžaduje verzi WordPress"
|
1078 |
+
|
1079 |
+
#: includes/fs-plugin-info-dialog.php:1339
|
1080 |
+
msgid "%s or higher"
|
1081 |
+
msgstr "%s nebo vyšší"
|
1082 |
+
|
1083 |
+
#: includes/fs-plugin-info-dialog.php:1346
|
1084 |
+
msgid "Compatible up to"
|
1085 |
+
msgstr "Kompatibilní až po"
|
1086 |
+
|
1087 |
+
#: includes/fs-plugin-info-dialog.php:1354
|
1088 |
+
msgid "Downloaded"
|
1089 |
+
msgstr "Staženo"
|
1090 |
+
|
1091 |
+
#: includes/fs-plugin-info-dialog.php:1358
|
1092 |
+
msgid "%s time"
|
1093 |
+
msgstr "%s krát"
|
1094 |
+
|
1095 |
+
#: includes/fs-plugin-info-dialog.php:1360
|
1096 |
+
msgid "%s times"
|
1097 |
+
msgstr "%s krát"
|
1098 |
+
|
1099 |
+
#: includes/fs-plugin-info-dialog.php:1370
|
1100 |
+
msgid "WordPress.org Plugin Page"
|
1101 |
+
msgstr "Název pluginu na WordPress.org"
|
1102 |
+
|
1103 |
+
#: includes/fs-plugin-info-dialog.php:1378
|
1104 |
+
msgid "Plugin Homepage"
|
1105 |
+
msgstr "Hlavní stránka pluginu"
|
1106 |
+
|
1107 |
+
#: includes/fs-plugin-info-dialog.php1386,
|
1108 |
+
#: includes/fs-plugin-info-dialog.php:1468
|
1109 |
+
msgid "Donate to this plugin"
|
1110 |
+
msgstr "Přispějte na tento plugin"
|
1111 |
+
|
1112 |
+
#: includes/fs-plugin-info-dialog.php:1393
|
1113 |
+
msgid "Average Rating"
|
1114 |
+
msgstr "Průměrné hodnocení"
|
1115 |
+
|
1116 |
+
#: includes/fs-plugin-info-dialog.php:1400
|
1117 |
+
msgid "based on %s"
|
1118 |
+
msgstr "založeno na %s"
|
1119 |
+
|
1120 |
+
#: includes/fs-plugin-info-dialog.php:1404
|
1121 |
+
msgid "%s rating"
|
1122 |
+
msgstr "%s hodnocení"
|
1123 |
+
|
1124 |
+
#: includes/fs-plugin-info-dialog.php:1406
|
1125 |
+
msgid "%s ratings"
|
1126 |
+
msgstr "%s hodnocení"
|
1127 |
+
|
1128 |
+
#: includes/fs-plugin-info-dialog.php:1421
|
1129 |
+
msgid "%s star"
|
1130 |
+
msgstr "%s hvězda"
|
1131 |
+
|
1132 |
+
#: includes/fs-plugin-info-dialog.php:1423
|
1133 |
+
msgid "%s stars"
|
1134 |
+
msgstr "%s hvězd"
|
1135 |
+
|
1136 |
+
#: includes/fs-plugin-info-dialog.php:1434
|
1137 |
+
msgid "Click to see reviews that provided a rating of %s"
|
1138 |
+
msgstr "Click to see reviews that provided a rating of %s"
|
1139 |
+
|
1140 |
+
#: includes/fs-plugin-info-dialog.php:1447
|
1141 |
+
msgid "Contributors"
|
1142 |
+
msgstr "Přispěvatelé"
|
1143 |
+
|
1144 |
+
#: includes/fs-plugin-info-dialog.php1476,
|
1145 |
+
#: includes/fs-plugin-info-dialog.php:1478
|
1146 |
+
msgid "Warning"
|
1147 |
+
msgstr "Varování"
|
1148 |
+
|
1149 |
+
#: includes/fs-plugin-info-dialog.php:1476
|
1150 |
+
msgid "This plugin has not been tested with your current version of WordPress."
|
1151 |
+
msgstr "This plugin has not been tested with your current version of WordPress."
|
1152 |
+
|
1153 |
+
#: includes/fs-plugin-info-dialog.php:1478
|
1154 |
+
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1155 |
+
msgstr "This plugin has not been marked as compatible with your version of WordPress."
|
1156 |
+
|
1157 |
+
#: includes/fs-plugin-info-dialog.php:1497
|
1158 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1159 |
+
msgstr "Placený doplněk musí být nasazen na Freemius."
|
1160 |
+
|
1161 |
+
#: includes/fs-plugin-info-dialog.php:1498
|
1162 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1163 |
+
msgstr "Rozšíření musí být nasazeno na WordPress.org nebo na Freemius."
|
1164 |
+
|
1165 |
+
#: includes/fs-plugin-info-dialog.php:1519
|
1166 |
+
msgid "Newer Version (%s) Installed"
|
1167 |
+
msgstr "Novější verze (%s) nainstalována"
|
1168 |
+
|
1169 |
+
#: includes/fs-plugin-info-dialog.php:1520
|
1170 |
+
msgid "Newer Free Version (%s) Installed"
|
1171 |
+
msgstr "Novější verze zdarma (%s) nainstalována"
|
1172 |
+
|
1173 |
+
#: includes/fs-plugin-info-dialog.php:1527
|
1174 |
+
msgid "Latest Version Installed"
|
1175 |
+
msgstr "Nainstalována nejnovější verze"
|
1176 |
+
|
1177 |
+
#: includes/fs-plugin-info-dialog.php:1528
|
1178 |
+
msgid "Latest Free Version Installed"
|
1179 |
+
msgstr "Nainstalována nejnovější verze zdarma"
|
1180 |
+
|
1181 |
+
#: templates/account.php92, templates/forms/subscription-cancellation.php96,
|
1182 |
+
#: templates/account/partials/addon.php26,
|
1183 |
+
#: templates/account/partials/site.php:311
|
1184 |
+
msgid "Downgrading your plan"
|
1185 |
+
msgstr "Snižuji vaše předplatné"
|
1186 |
+
|
1187 |
+
#: templates/account.php93, templates/forms/subscription-cancellation.php97,
|
1188 |
+
#: templates/account/partials/addon.php27,
|
1189 |
+
#: templates/account/partials/site.php:312
|
1190 |
+
msgid "Cancelling the subscription"
|
1191 |
+
msgstr "Ruším předplatné"
|
1192 |
+
|
1193 |
+
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the
|
1194 |
+
#. subscription'
|
1195 |
+
#: templates/account.php95, templates/forms/subscription-cancellation.php99,
|
1196 |
+
#: templates/account/partials/site.php:314
|
1197 |
+
msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
|
1198 |
+
msgstr "%1s okamžitě zastaví všechny budoucí opakující se platby a licence k plánu %s vyprší za %s."
|
1199 |
+
|
1200 |
+
#: templates/account.php96, templates/forms/subscription-cancellation.php100,
|
1201 |
+
#: templates/account/partials/addon.php30,
|
1202 |
+
#: templates/account/partials/site.php:315
|
1203 |
+
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."
|
1204 |
+
msgstr "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."
|
1205 |
+
|
1206 |
+
#: templates/account.php97, templates/forms/subscription-cancellation.php106,
|
1207 |
+
#: templates/account/partials/addon.php:31
|
1208 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
1209 |
+
msgstr "Zrušení zkušební verze okamžitě zablokuje přístup ke všem prémiovým funkcím. Opravdu chcete pokračovat?"
|
1210 |
+
|
1211 |
+
#: templates/account.php98, templates/forms/subscription-cancellation.php101,
|
1212 |
+
#: templates/account/partials/addon.php32,
|
1213 |
+
#: templates/account/partials/site.php:316
|
1214 |
+
msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
|
1215 |
+
msgstr "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
|
1216 |
+
|
1217 |
+
#: templates/account.php99, templates/forms/subscription-cancellation.php102,
|
1218 |
+
#: templates/account/partials/addon.php33,
|
1219 |
+
#: templates/account/partials/site.php:317
|
1220 |
+
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
1221 |
+
msgstr "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
1222 |
+
|
1223 |
+
#. translators: %s: Plan title (e.g. "Professional")
|
1224 |
+
#: templates/account.php101,
|
1225 |
+
#: templates/account/partials/activate-license-button.php31,
|
1226 |
+
#: templates/account/partials/addon.php:35
|
1227 |
+
msgid "Activate %s Plan"
|
1228 |
+
msgstr "Aktivovat %s plán"
|
1229 |
+
|
1230 |
+
#. translators: %s: Time period (e.g. Auto renews in "2 months")
|
1231 |
+
#: templates/account.php104, templates/account/partials/addon.php38,
|
1232 |
+
#: templates/account/partials/site.php:291
|
1233 |
+
msgid "Auto renews in %s"
|
1234 |
+
msgstr "Automaticky se obnoví za %s"
|
1235 |
+
|
1236 |
+
#. translators: %s: Time period (e.g. Expires in "2 months")
|
1237 |
+
#: templates/account.php106, templates/account/partials/addon.php40,
|
1238 |
+
#: templates/account/partials/site.php:293
|
1239 |
+
msgid "Expires in %s"
|
1240 |
+
msgstr "Vyprší za %s"
|
1241 |
+
|
1242 |
+
#: templates/account.php:107
|
1243 |
+
msgctxt "as synchronize license"
|
1244 |
+
msgid "Sync License"
|
1245 |
+
msgstr "Synchronizovat licence"
|
1246 |
+
|
1247 |
+
#: templates/account.php108, templates/account/partials/addon.php:41
|
1248 |
+
msgid "Cancel Trial"
|
1249 |
+
msgstr "Zrušit zkušební verzi"
|
1250 |
+
|
1251 |
+
#: templates/account.php109, templates/account/partials/addon.php:42
|
1252 |
+
msgid "Change Plan"
|
1253 |
+
msgstr "Změnit plán"
|
1254 |
+
|
1255 |
+
#: templates/account.php110, templates/account/partials/addon.php:43
|
1256 |
+
msgctxt "verb"
|
1257 |
+
msgid "Upgrade"
|
1258 |
+
msgstr "Vylepšit"
|
1259 |
+
|
1260 |
+
#: templates/account.php112, templates/account/partials/addon.php45,
|
1261 |
+
#: templates/account/partials/site.php:318
|
1262 |
+
msgctxt "verb"
|
1263 |
+
msgid "Downgrade"
|
1264 |
+
msgstr "Přejít na nižší verzi"
|
1265 |
+
|
1266 |
+
#: templates/account.php114, templates/add-ons.php246,
|
1267 |
+
#: templates/plugin-info/features.php72,
|
1268 |
+
#: templates/account/partials/addon.php47,
|
1269 |
+
#: templates/account/partials/site.php:33
|
1270 |
+
msgid "Free"
|
1271 |
+
msgstr "Zdarma"
|
1272 |
+
|
1273 |
+
#: templates/account.php116, templates/debug.php373,
|
1274 |
+
#: includes/customizer/class-fs-customizer-upsell-control.php110,
|
1275 |
+
#: templates/account/partials/addon.php:49
|
1276 |
+
msgctxt "as product pricing plan"
|
1277 |
+
msgid "Plan"
|
1278 |
+
msgstr "Druh členství"
|
1279 |
+
|
1280 |
+
#: templates/account.php:117
|
1281 |
+
msgid "Bundle Plan"
|
1282 |
+
msgstr "Bundle Plan"
|
1283 |
+
|
1284 |
+
#: templates/account.php:191
|
1285 |
+
msgid "Free Trial"
|
1286 |
+
msgstr "Zkušební verze zdarma"
|
1287 |
+
|
1288 |
+
#: templates/account.php:202
|
1289 |
+
msgid "Account Details"
|
1290 |
+
msgstr "Detaily účtu"
|
1291 |
+
|
1292 |
+
#: templates/account.php209, templates/forms/data-debug-mode.php:33
|
1293 |
+
msgid "Start Debug"
|
1294 |
+
msgstr "Start Debug"
|
1295 |
+
|
1296 |
+
#: templates/account.php:211
|
1297 |
+
msgid "Stop Debug"
|
1298 |
+
msgstr "Stop Debug"
|
1299 |
+
|
1300 |
+
#: templates/account.php:218
|
1301 |
+
msgid "Billing & Invoices"
|
1302 |
+
msgstr "Billing & Invoices"
|
1303 |
+
|
1304 |
+
#: templates/account.php:229
|
1305 |
+
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?"
|
1306 |
+
msgstr "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?"
|
1307 |
+
|
1308 |
+
#: templates/account.php:231
|
1309 |
+
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?"
|
1310 |
+
msgstr "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?"
|
1311 |
+
|
1312 |
+
#: templates/account.php:234
|
1313 |
+
msgid "Delete Account"
|
1314 |
+
msgstr "Smazat účet"
|
1315 |
+
|
1316 |
+
#: templates/account.php246, templates/account/partials/addon.php231,
|
1317 |
+
#: templates/account/partials/deactivate-license-button.php:35
|
1318 |
+
msgid "Deactivate License"
|
1319 |
+
msgstr "Deaktivovat licenci"
|
1320 |
+
|
1321 |
+
#: templates/account.php269, templates/forms/subscription-cancellation.php:125
|
1322 |
+
msgid "Are you sure you want to proceed?"
|
1323 |
+
msgstr "Opravdu chcete pokračovat?"
|
1324 |
+
|
1325 |
+
#: templates/account.php269, templates/account/partials/addon.php:255
|
1326 |
+
msgid "Cancel Subscription"
|
1327 |
+
msgstr "Zrušit předplatné"
|
1328 |
+
|
1329 |
+
#: templates/account.php298, templates/account/partials/addon.php:340
|
1330 |
+
msgctxt "as synchronize"
|
1331 |
+
msgid "Sync"
|
1332 |
+
msgstr "Synchronizovat"
|
1333 |
+
|
1334 |
+
#: templates/account.php313, templates/debug.php:507
|
1335 |
+
msgid "Name"
|
1336 |
+
msgstr "Jméno"
|
1337 |
+
|
1338 |
+
#: templates/account.php319, templates/debug.php:508
|
1339 |
+
msgid "Email"
|
1340 |
+
msgstr "Email"
|
1341 |
+
|
1342 |
+
#: templates/account.php326, templates/debug.php371, templates/debug.php:557
|
1343 |
+
msgid "User ID"
|
1344 |
+
msgstr "ID uživatele"
|
1345 |
+
|
1346 |
+
#: templates/account.php344, templates/account.php637,
|
1347 |
+
#: templates/account.php682, templates/debug.php238, templates/debug.php365,
|
1348 |
+
#: templates/debug.php454, templates/debug.php506, templates/debug.php555,
|
1349 |
+
#: templates/debug.php632, templates/account/payments.php35,
|
1350 |
+
#: templates/debug/logger.php:21
|
1351 |
+
msgid "ID"
|
1352 |
+
msgstr "ID"
|
1353 |
+
|
1354 |
+
#: templates/account.php:351
|
1355 |
+
msgid "Site ID"
|
1356 |
+
msgstr "ID stránky"
|
1357 |
+
|
1358 |
+
#: templates/account.php:354
|
1359 |
+
msgid "No ID"
|
1360 |
+
msgstr "Žádné ID"
|
1361 |
+
|
1362 |
+
#: templates/account.php359, templates/debug.php245, templates/debug.php374,
|
1363 |
+
#: templates/debug.php458, templates/debug.php510,
|
1364 |
+
#: templates/account/partials/site.php:227
|
1365 |
+
msgid "Public Key"
|
1366 |
+
msgstr "Veřejný klíč"
|
1367 |
+
|
1368 |
+
#: templates/account.php365, templates/debug.php375, templates/debug.php459,
|
1369 |
+
#: templates/debug.php511, templates/account/partials/site.php:239
|
1370 |
+
msgid "Secret Key"
|
1371 |
+
msgstr "Tajný klíč"
|
1372 |
+
|
1373 |
+
#: templates/account.php:368
|
1374 |
+
msgctxt "as secret encryption key missing"
|
1375 |
+
msgid "No Secret"
|
1376 |
+
msgstr "Tajný klíč chybí"
|
1377 |
+
|
1378 |
+
#: templates/account.php395, templates/account/partials/site.php120,
|
1379 |
+
#: templates/account/partials/site.php:122
|
1380 |
+
msgid "Trial"
|
1381 |
+
msgstr "Zkouška"
|
1382 |
+
|
1383 |
+
#: templates/account.php422, templates/debug.php562,
|
1384 |
+
#: templates/account/partials/site.php:260
|
1385 |
+
msgid "License Key"
|
1386 |
+
msgstr "Licenční klíč"
|
1387 |
+
|
1388 |
+
#: templates/account.php:453
|
1389 |
+
msgid "Join the Beta program"
|
1390 |
+
msgstr "Join the Beta program"
|
1391 |
+
|
1392 |
+
#: templates/account.php:459
|
1393 |
+
msgid "not verified"
|
1394 |
+
msgstr "není ověřeno"
|
1395 |
+
|
1396 |
+
#: templates/account.php468, templates/account/partials/addon.php:190
|
1397 |
+
msgid "Expired"
|
1398 |
+
msgstr "Vypršelo"
|
1399 |
+
|
1400 |
+
#: templates/account.php:528
|
1401 |
+
msgid "Premium version"
|
1402 |
+
msgstr "Prémiová verze"
|
1403 |
+
|
1404 |
+
#: templates/account.php:530
|
1405 |
+
msgid "Free version"
|
1406 |
+
msgstr "Verze zdarma"
|
1407 |
+
|
1408 |
+
#: templates/account.php:542
|
1409 |
+
msgid "Verify Email"
|
1410 |
+
msgstr "Ověřit e-mail"
|
1411 |
+
|
1412 |
+
#: templates/account.php:553
|
1413 |
+
msgid "Download %s Version"
|
1414 |
+
msgstr "Stáhnout verzi %s"
|
1415 |
+
|
1416 |
+
#: templates/account.php568, templates/account.php820,
|
1417 |
+
#: templates/account/partials/site.php248,
|
1418 |
+
#: templates/account/partials/site.php:270
|
1419 |
+
msgctxt "verb"
|
1420 |
+
msgid "Show"
|
1421 |
+
msgstr "Zobrazit"
|
1422 |
+
|
1423 |
+
#: templates/account.php:583
|
1424 |
+
msgid "What is your %s?"
|
1425 |
+
msgstr "Jaké je vaše \"%s\"?"
|
1426 |
+
|
1427 |
+
#: templates/account.php591, templates/account/billing.php:21
|
1428 |
+
msgctxt "verb"
|
1429 |
+
msgid "Edit"
|
1430 |
+
msgstr "Upravit"
|
1431 |
+
|
1432 |
+
#: templates/account.php:616
|
1433 |
+
msgid "Sites"
|
1434 |
+
msgstr "Weby"
|
1435 |
+
|
1436 |
+
#: templates/account.php:629
|
1437 |
+
msgid "Search by address"
|
1438 |
+
msgstr "Hledat podle adresy"
|
1439 |
+
|
1440 |
+
#: templates/account.php638, templates/debug.php:368
|
1441 |
+
msgid "Address"
|
1442 |
+
msgstr "Adresa"
|
1443 |
+
|
1444 |
+
#: templates/account.php:639
|
1445 |
+
msgid "License"
|
1446 |
+
msgstr "Licence"
|
1447 |
+
|
1448 |
+
#: templates/account.php:640
|
1449 |
+
msgid "Plan"
|
1450 |
+
msgstr "Druh členství"
|
1451 |
+
|
1452 |
+
#: templates/account.php:685
|
1453 |
+
msgctxt "as software license"
|
1454 |
+
msgid "License"
|
1455 |
+
msgstr "Licence"
|
1456 |
+
|
1457 |
+
#: templates/account.php:814
|
1458 |
+
msgctxt "verb"
|
1459 |
+
msgid "Hide"
|
1460 |
+
msgstr "Skrýt"
|
1461 |
+
|
1462 |
+
#: templates/account.php836, templates/forms/data-debug-mode.php:31
|
1463 |
+
msgid "Processing"
|
1464 |
+
msgstr "Processing"
|
1465 |
+
|
1466 |
+
#: templates/account.php:839
|
1467 |
+
msgid "Get updates for bleeding edge Beta versions of %s."
|
1468 |
+
msgstr "Get updates for bleeding edge Beta versions of %s."
|
1469 |
+
|
1470 |
+
#: templates/account.php:897
|
1471 |
+
msgid "Cancelling %s"
|
1472 |
+
msgstr "Ruším %s"
|
1473 |
+
|
1474 |
+
#: templates/account.php897, templates/account.php914,
|
1475 |
+
#: templates/forms/subscription-cancellation.php27,
|
1476 |
+
#: templates/forms/deactivation/form.php:133
|
1477 |
+
msgid "trial"
|
1478 |
+
msgstr "zkušební"
|
1479 |
+
|
1480 |
+
#: templates/account.php912, templates/forms/deactivation/form.php:150
|
1481 |
+
msgid "Cancelling %s..."
|
1482 |
+
msgstr "Ruším %s..."
|
1483 |
+
|
1484 |
+
#: templates/account.php915, templates/forms/subscription-cancellation.php28,
|
1485 |
+
#: templates/forms/deactivation/form.php:134
|
1486 |
+
msgid "subscription"
|
1487 |
+
msgstr "předplatné"
|
1488 |
+
|
1489 |
+
#: templates/account.php:929
|
1490 |
+
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?"
|
1491 |
+
msgstr "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
|
1492 |
+
|
1493 |
+
#: templates/add-ons.php:38
|
1494 |
+
msgid "View details"
|
1495 |
+
msgstr "Zobrazit podrobnosti"
|
1496 |
+
|
1497 |
+
#: templates/add-ons.php:48
|
1498 |
+
msgid "Add Ons for %s"
|
1499 |
+
msgstr "Rozšíření pro %s"
|
1500 |
+
|
1501 |
+
#: templates/add-ons.php:58
|
1502 |
+
msgid "We couldn't load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
|
1503 |
+
msgstr "We couldn't load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
|
1504 |
+
|
1505 |
+
#: templates/add-ons.php:229
|
1506 |
+
msgctxt "active add-on"
|
1507 |
+
msgid "Active"
|
1508 |
+
msgstr "Active"
|
1509 |
+
|
1510 |
+
#: templates/add-ons.php:230
|
1511 |
+
msgctxt "installed add-on"
|
1512 |
+
msgid "Installed"
|
1513 |
+
msgstr "Installed"
|
1514 |
+
|
1515 |
+
#: templates/admin-notice.php13, templates/forms/license-activation.php207,
|
1516 |
+
#: templates/forms/resend-key.php:77
|
1517 |
+
msgctxt "as close a window"
|
1518 |
+
msgid "Dismiss"
|
1519 |
+
msgstr "Skrýt"
|
1520 |
+
|
1521 |
+
#: templates/auto-installation.php:45
|
1522 |
+
msgid "%s sec"
|
1523 |
+
msgstr "%s s"
|
1524 |
+
|
1525 |
+
#: templates/auto-installation.php:83
|
1526 |
+
msgid "Automatic Installation"
|
1527 |
+
msgstr "Automatic Installation"
|
1528 |
+
|
1529 |
+
#: templates/auto-installation.php:93
|
1530 |
+
msgid "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."
|
1531 |
+
msgstr "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."
|
1532 |
+
|
1533 |
+
#: templates/auto-installation.php:104
|
1534 |
+
msgid "The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page."
|
1535 |
+
msgstr "Proces instalace byl zahájen a může trvat několik minut. Počkejte prosím na dokončení - neobnovujte tuto stránku."
|
1536 |
+
|
1537 |
+
#: templates/auto-installation.php:109
|
1538 |
+
msgid "Cancel Installation"
|
1539 |
+
msgstr "Cancel Installation"
|
1540 |
+
|
1541 |
+
#: templates/checkout.php:180
|
1542 |
+
msgid "Checkout"
|
1543 |
+
msgstr "Pokladna"
|
1544 |
+
|
1545 |
+
#: templates/checkout.php:180
|
1546 |
+
msgid "PCI compliant"
|
1547 |
+
msgstr "Kompatibilní s PCI"
|
1548 |
+
|
1549 |
+
#. translators: %s: name (e.g. Hey John,)
|
1550 |
+
#: templates/connect.php:112
|
1551 |
+
msgctxt "greeting"
|
1552 |
+
msgid "Hey %s,"
|
1553 |
+
msgstr "Dobrý den %s,"
|
1554 |
+
|
1555 |
+
#: templates/connect.php:154
|
1556 |
+
msgid "Allow & Continue"
|
1557 |
+
msgstr "Povolit a pokračovat"
|
1558 |
+
|
1559 |
+
#: templates/connect.php:158
|
1560 |
+
msgid "Re-send activation email"
|
1561 |
+
msgstr "Znovu poslat aktivační email"
|
1562 |
+
|
1563 |
+
#: templates/connect.php:162
|
1564 |
+
msgid "Thanks %s!"
|
1565 |
+
msgstr "Děkujeme %s!"
|
1566 |
+
|
1567 |
+
#: templates/connect.php172, templates/forms/license-activation.php:46
|
1568 |
+
msgid "Agree & Activate License"
|
1569 |
+
msgstr "Aktivovat licenci"
|
1570 |
+
|
1571 |
+
#: templates/connect.php:181
|
1572 |
+
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
1573 |
+
msgstr "Děkujeme za nákup %s! Pro aktivaci zadejte prosím svůj licenční klíč:"
|
1574 |
+
|
1575 |
+
#: templates/connect.php:188
|
1576 |
+
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."
|
1577 |
+
msgstr "Nezmeškejte žádnou důležitou aktualizaci - dovolte nám sbírat anonymní a obecná diagnostická data s %4$s a nechte se upozornit na nové funkce, výukové materiály, nabídky a bezpečnostní aktualizace."
|
1578 |
+
|
1579 |
+
#: templates/connect.php:189
|
1580 |
+
msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1581 |
+
msgstr "Nezmeškejte žádnou důležitou aktualizaci - dovolte nám sbírat anonymní a obecná diagnostická data s %4$s a nechte se upozornit na nové funkce a bezpečnostní aktualizace."
|
1582 |
+
|
1583 |
+
#: templates/connect.php:195
|
1584 |
+
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."
|
1585 |
+
msgstr "Nezmeškejte žádnou důležitou aktualizaci - dovolte nám sbírat anonymní a obecná diagnostická data s %4$s a nechte se upozornit na nové funkce, výukové materiály, nabídky a bezpečnostní aktualizace. Pokud tohle přeskočíte tak se nic neděje. %1$s bude bez problémů dál fungovat."
|
1586 |
+
|
1587 |
+
#: templates/connect.php:196
|
1588 |
+
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."
|
1589 |
+
msgstr "Nezmeškejte žádnou důležitou aktualizaci - dovolte nám sbírat anonymní a obecná diagnostická data s %4$s a nechte se upozornit na nové funkce a bezpečnostní aktualizace. Pokud tohle přeskočíte tak se nic neděje. %1$s bude bez problémů dál fungovat."
|
1590 |
+
|
1591 |
+
#: templates/connect.php:230
|
1592 |
+
msgid "We're excited to introduce the Freemius network-level integration."
|
1593 |
+
msgstr "Jsme rádi, že vám můžeme ukázat integraci Freemiusu i v rámci sítě webů."
|
1594 |
+
|
1595 |
+
#: templates/connect.php:233
|
1596 |
+
msgid "During the update process we detected %d site(s) that are still pending license activation."
|
1597 |
+
msgstr "During the update process we detected %d site(s) that are still pending license activation."
|
1598 |
+
|
1599 |
+
#: templates/connect.php:235
|
1600 |
+
msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
|
1601 |
+
msgstr "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
|
1602 |
+
|
1603 |
+
#: templates/connect.php:237
|
1604 |
+
msgid "%s's paid features"
|
1605 |
+
msgstr "%s's paid features"
|
1606 |
+
|
1607 |
+
#: templates/connect.php:242
|
1608 |
+
msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
|
1609 |
+
msgstr "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
|
1610 |
+
|
1611 |
+
#: templates/connect.php:244
|
1612 |
+
msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
|
1613 |
+
msgstr "During the update process we detected %s site(s) in the network that are still pending your attention."
|
1614 |
+
|
1615 |
+
#: templates/connect.php253, templates/forms/data-debug-mode.php35,
|
1616 |
+
#: templates/forms/license-activation.php:49
|
1617 |
+
msgid "License key"
|
1618 |
+
msgstr "Licenční klíč"
|
1619 |
+
|
1620 |
+
#: templates/connect.php256, templates/forms/license-activation.php:22
|
1621 |
+
msgid "Can't find your license key?"
|
1622 |
+
msgstr "Nemůžete najít svůj licenční klíč?"
|
1623 |
+
|
1624 |
+
#: templates/connect.php315, templates/connect.php652,
|
1625 |
+
#: templates/forms/deactivation/retry-skip.php:20
|
1626 |
+
msgctxt "verb"
|
1627 |
+
msgid "Skip"
|
1628 |
+
msgstr "Přeskočit"
|
1629 |
+
|
1630 |
+
#: templates/connect.php:318
|
1631 |
+
msgid "Delegate to Site Admins"
|
1632 |
+
msgstr "Delegate to Site Admins"
|
1633 |
+
|
1634 |
+
#: templates/connect.php:318
|
1635 |
+
msgid "If you click it, this decision will be delegated to the sites administrators."
|
1636 |
+
msgstr "If you click it, this decision will be delegated to the sites administrators."
|
1637 |
+
|
1638 |
+
#: templates/connect.php:346
|
1639 |
+
msgid "Your Profile Overview"
|
1640 |
+
msgstr "Informace o vašem profilu"
|
1641 |
+
|
1642 |
+
#: templates/connect.php:347
|
1643 |
+
msgid "Name and email address"
|
1644 |
+
msgstr "Jméno a emailová adresa"
|
1645 |
+
|
1646 |
+
#: templates/connect.php:352
|
1647 |
+
msgid "Your Site Overview"
|
1648 |
+
msgstr "Informace o vaší stránce"
|
1649 |
+
|
1650 |
+
#: templates/connect.php:353
|
1651 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
1652 |
+
msgstr "URL webu, verze WP, PHP info, pluginy a šablony"
|
1653 |
+
|
1654 |
+
#: templates/connect.php:358
|
1655 |
+
msgid "Admin Notices"
|
1656 |
+
msgstr "Zobrazení oznámení v adminu"
|
1657 |
+
|
1658 |
+
#: templates/connect.php359, templates/connect.php:375
|
1659 |
+
msgid "Updates, announcements, marketing, no spam"
|
1660 |
+
msgstr "Aktualizace, oznámení, marketing, žádný spam"
|
1661 |
+
|
1662 |
+
#: templates/connect.php:364
|
1663 |
+
msgid "Current %s Events"
|
1664 |
+
msgstr "Informace o událostech pro %s"
|
1665 |
+
|
1666 |
+
#: templates/connect.php:365
|
1667 |
+
msgid "Activation, deactivation and uninstall"
|
1668 |
+
msgstr "Aktivace, deaktivace a odinstalace"
|
1669 |
+
|
1670 |
+
#: templates/connect.php:374
|
1671 |
+
msgid "Newsletter"
|
1672 |
+
msgstr "Newsletter"
|
1673 |
+
|
1674 |
+
#: templates/connect.php391, templates/forms/license-activation.php:41
|
1675 |
+
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."
|
1676 |
+
msgstr "Pro ověření platnosti vaší licence a automatických aktualizací bude tento %1$s periodicky odesílat data do %2$s."
|
1677 |
+
|
1678 |
+
#: templates/connect.php:396
|
1679 |
+
msgid "What permissions are being granted?"
|
1680 |
+
msgstr "Jaká oprávnění budou udělena?"
|
1681 |
+
|
1682 |
+
#: templates/connect.php:417
|
1683 |
+
msgid "Don't have a license key?"
|
1684 |
+
msgstr "Nemáte licenční klíč?"
|
1685 |
+
|
1686 |
+
#: templates/connect.php:420
|
1687 |
+
msgid "Have a license key?"
|
1688 |
+
msgstr "Máte licenční klíč?"
|
1689 |
+
|
1690 |
+
#: templates/connect.php:428
|
1691 |
+
msgid "Privacy Policy"
|
1692 |
+
msgstr "Zásady ochrany osobních údajů"
|
1693 |
+
|
1694 |
+
#: templates/connect.php:430
|
1695 |
+
msgid "License Agreement"
|
1696 |
+
msgstr "Licenční smlouva"
|
1697 |
+
|
1698 |
+
#: templates/connect.php:430
|
1699 |
+
msgid "Terms of Service"
|
1700 |
+
msgstr "Podmínky služby"
|
1701 |
+
|
1702 |
+
#: templates/connect.php:805
|
1703 |
+
msgctxt "as in the process of sending an email"
|
1704 |
+
msgid "Sending email"
|
1705 |
+
msgstr "Probíhá odesílání emailů"
|
1706 |
+
|
1707 |
+
#: templates/connect.php:806
|
1708 |
+
msgctxt "as activating plugin"
|
1709 |
+
msgid "Activating"
|
1710 |
+
msgstr "Probíhá aktivace"
|
1711 |
+
|
1712 |
+
#: templates/contact.php:78
|
1713 |
+
msgid "Contact"
|
1714 |
+
msgstr "Kontakt"
|
1715 |
+
|
1716 |
+
#: templates/debug.php:17
|
1717 |
+
msgctxt "as turned off"
|
1718 |
+
msgid "Off"
|
1719 |
+
msgstr "Vypnuto"
|
1720 |
+
|
1721 |
+
#: templates/debug.php:18
|
1722 |
+
msgctxt "as turned on"
|
1723 |
+
msgid "On"
|
1724 |
+
msgstr "Zapnuto"
|
1725 |
+
|
1726 |
+
#: templates/debug.php:20
|
1727 |
+
msgid "SDK"
|
1728 |
+
msgstr "SDK"
|
1729 |
+
|
1730 |
+
#: templates/debug.php:24
|
1731 |
+
msgctxt "as code debugging"
|
1732 |
+
msgid "Debugging"
|
1733 |
+
msgstr "Debugging"
|
1734 |
+
|
1735 |
+
#: templates/debug.php54, templates/debug.php250, templates/debug.php376,
|
1736 |
+
#: templates/debug.php:512
|
1737 |
+
msgid "Actions"
|
1738 |
+
msgstr "Akce objednávky"
|
1739 |
+
|
1740 |
+
#: templates/debug.php:64
|
1741 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1742 |
+
msgstr "Opravdu chcete smazat veškerá Freemius data?"
|
1743 |
+
|
1744 |
+
#: templates/debug.php:64
|
1745 |
+
msgid "Delete All Accounts"
|
1746 |
+
msgstr "Delete All Accounts"
|
1747 |
+
|
1748 |
+
#: templates/debug.php:71
|
1749 |
+
msgid "Clear API Cache"
|
1750 |
+
msgstr "Vymazat paměť API"
|
1751 |
+
|
1752 |
+
#: templates/debug.php:79
|
1753 |
+
msgid "Clear Updates Transients"
|
1754 |
+
msgstr "Clear Updates Transients"
|
1755 |
+
|
1756 |
+
#: templates/debug.php:86
|
1757 |
+
msgid "Sync Data From Server"
|
1758 |
+
msgstr "Synchronizovat data ze serveru"
|
1759 |
+
|
1760 |
+
#: templates/debug.php:95
|
1761 |
+
msgid "Migrate Options to Network"
|
1762 |
+
msgstr "Migrate Options to Network"
|
1763 |
+
|
1764 |
+
#: templates/debug.php:100
|
1765 |
+
msgid "Load DB Option"
|
1766 |
+
msgstr "Load DB Option"
|
1767 |
+
|
1768 |
+
#: templates/debug.php:103
|
1769 |
+
msgid "Set DB Option"
|
1770 |
+
msgstr "Set DB Option"
|
1771 |
+
|
1772 |
+
#: templates/debug.php:182
|
1773 |
+
msgid "Key"
|
1774 |
+
msgstr "Klíč"
|
1775 |
+
|
1776 |
+
#: templates/debug.php:183
|
1777 |
+
msgid "Value"
|
1778 |
+
msgstr "Hodnota"
|
1779 |
+
|
1780 |
+
#: templates/debug.php:199
|
1781 |
+
msgctxt "as software development kit versions"
|
1782 |
+
msgid "SDK Versions"
|
1783 |
+
msgstr "SDK Versions"
|
1784 |
+
|
1785 |
+
#: templates/debug.php:204
|
1786 |
+
msgid "SDK Path"
|
1787 |
+
msgstr "Cesta l SDK"
|
1788 |
+
|
1789 |
+
#: templates/debug.php205, templates/debug.php:244
|
1790 |
+
msgid "Module Path"
|
1791 |
+
msgstr "Cesta k modulu"
|
1792 |
+
|
1793 |
+
#: templates/debug.php:206
|
1794 |
+
msgid "Is Active"
|
1795 |
+
msgstr "Je aktivní"
|
1796 |
+
|
1797 |
+
#: templates/debug.php234, templates/debug/plugins-themes-sync.php:35
|
1798 |
+
msgid "Plugins"
|
1799 |
+
msgstr "Pluginy"
|
1800 |
+
|
1801 |
+
#: templates/debug.php234, templates/debug/plugins-themes-sync.php:56
|
1802 |
+
msgid "Themes"
|
1803 |
+
msgstr "Šablony"
|
1804 |
+
|
1805 |
+
#: templates/debug.php239, templates/debug.php370, templates/debug.php456,
|
1806 |
+
#: templates/debug/scheduled-crons.php:80
|
1807 |
+
msgid "Slug"
|
1808 |
+
msgstr "Zkratka"
|
1809 |
+
|
1810 |
+
#: templates/debug.php241, templates/debug.php:455
|
1811 |
+
msgid "Title"
|
1812 |
+
msgstr "Nadpis"
|
1813 |
+
|
1814 |
+
#: templates/debug.php:242
|
1815 |
+
msgctxt "as application program interface"
|
1816 |
+
msgid "API"
|
1817 |
+
msgstr "API"
|
1818 |
+
|
1819 |
+
#: templates/debug.php:243
|
1820 |
+
msgid "Freemius State"
|
1821 |
+
msgstr "Stav Freemius"
|
1822 |
+
|
1823 |
+
#: templates/debug.php:247
|
1824 |
+
msgid "Network Blog"
|
1825 |
+
msgstr "Network Blog"
|
1826 |
+
|
1827 |
+
#: templates/debug.php:248
|
1828 |
+
msgid "Network User"
|
1829 |
+
msgstr "Network User"
|
1830 |
+
|
1831 |
+
#: templates/debug.php:285
|
1832 |
+
msgctxt "as connection was successful"
|
1833 |
+
msgid "Connected"
|
1834 |
+
msgstr "Připojeno"
|
1835 |
+
|
1836 |
+
#: templates/debug.php:286
|
1837 |
+
msgctxt "as connection blocked"
|
1838 |
+
msgid "Blocked"
|
1839 |
+
msgstr "Zablokováno"
|
1840 |
+
|
1841 |
+
#: templates/debug.php:322
|
1842 |
+
msgid "Simulate Trial Promotion"
|
1843 |
+
msgstr "Simulate Trial Promotion"
|
1844 |
+
|
1845 |
+
#: templates/debug.php:334
|
1846 |
+
msgid "Simulate Network Upgrade"
|
1847 |
+
msgstr "Simulate Network Upgrade"
|
1848 |
+
|
1849 |
+
#: templates/debug.php:359
|
1850 |
+
msgid "%s Installs"
|
1851 |
+
msgstr "%s instalací"
|
1852 |
+
|
1853 |
+
#: templates/debug.php:361
|
1854 |
+
msgctxt "like websites"
|
1855 |
+
msgid "Sites"
|
1856 |
+
msgstr "Weby"
|
1857 |
+
|
1858 |
+
#: templates/debug.php367, templates/account/partials/site.php:156
|
1859 |
+
msgid "Blog ID"
|
1860 |
+
msgstr "Blog ID"
|
1861 |
+
|
1862 |
+
#: templates/debug.php:372
|
1863 |
+
msgid "License ID"
|
1864 |
+
msgstr "License ID"
|
1865 |
+
|
1866 |
+
#: templates/debug.php436, templates/debug.php535,
|
1867 |
+
#: templates/account/partials/addon.php:435
|
1868 |
+
msgctxt "verb"
|
1869 |
+
msgid "Delete"
|
1870 |
+
msgstr "Smazat"
|
1871 |
+
|
1872 |
+
#: templates/debug.php:450
|
1873 |
+
msgid "Add Ons of module %s"
|
1874 |
+
msgstr "Add Ons of module %s"
|
1875 |
+
|
1876 |
+
#: templates/debug.php:502
|
1877 |
+
msgid "Users"
|
1878 |
+
msgstr "Uživatelé"
|
1879 |
+
|
1880 |
+
#: templates/debug.php:509
|
1881 |
+
msgid "Verified"
|
1882 |
+
msgstr "Ověřeno"
|
1883 |
+
|
1884 |
+
#: templates/debug.php:551
|
1885 |
+
msgid "%s Licenses"
|
1886 |
+
msgstr "%s licencí"
|
1887 |
+
|
1888 |
+
#: templates/debug.php:556
|
1889 |
+
msgid "Plugin ID"
|
1890 |
+
msgstr "ID pluginu"
|
1891 |
+
|
1892 |
+
#: templates/debug.php:558
|
1893 |
+
msgid "Plan ID"
|
1894 |
+
msgstr "ID členství"
|
1895 |
+
|
1896 |
+
#: templates/debug.php:559
|
1897 |
+
msgid "Quota"
|
1898 |
+
msgstr "Quota"
|
1899 |
+
|
1900 |
+
#: templates/debug.php:560
|
1901 |
+
msgid "Activated"
|
1902 |
+
msgstr "Aktivovaný"
|
1903 |
+
|
1904 |
+
#: templates/debug.php:561
|
1905 |
+
msgid "Blocking"
|
1906 |
+
msgstr "Blokování"
|
1907 |
+
|
1908 |
+
#: templates/debug.php:563
|
1909 |
+
msgctxt "as expiration date"
|
1910 |
+
msgid "Expiration"
|
1911 |
+
msgstr "Expirace"
|
1912 |
+
|
1913 |
+
#: templates/debug.php:590
|
1914 |
+
msgid "Debug Log"
|
1915 |
+
msgstr "Ladící log"
|
1916 |
+
|
1917 |
+
#: templates/debug.php:594
|
1918 |
+
msgid "All Types"
|
1919 |
+
msgstr "Všechny typy"
|
1920 |
+
|
1921 |
+
#: templates/debug.php:601
|
1922 |
+
msgid "All Requests"
|
1923 |
+
msgstr "All Requests"
|
1924 |
+
|
1925 |
+
#: templates/debug.php606, templates/debug.php635,
|
1926 |
+
#: templates/debug/logger.php:25
|
1927 |
+
msgid "File"
|
1928 |
+
msgstr "Soubor"
|
1929 |
+
|
1930 |
+
#: templates/debug.php607, templates/debug.php633,
|
1931 |
+
#: templates/debug/logger.php:23
|
1932 |
+
msgid "Function"
|
1933 |
+
msgstr "Funkce"
|
1934 |
+
|
1935 |
+
#: templates/debug.php:608
|
1936 |
+
msgid "Process ID"
|
1937 |
+
msgstr "Process ID"
|
1938 |
+
|
1939 |
+
#: templates/debug.php:609
|
1940 |
+
msgid "Logger"
|
1941 |
+
msgstr "Logger"
|
1942 |
+
|
1943 |
+
#: templates/debug.php610, templates/debug.php634,
|
1944 |
+
#: templates/debug/logger.php:24
|
1945 |
+
msgid "Message"
|
1946 |
+
msgstr "Zpráva"
|
1947 |
+
|
1948 |
+
#: templates/debug.php:612
|
1949 |
+
msgid "Filter"
|
1950 |
+
msgstr "Filtr"
|
1951 |
+
|
1952 |
+
#: templates/debug.php:620
|
1953 |
+
msgid "Download"
|
1954 |
+
msgstr "Stáhnout"
|
1955 |
+
|
1956 |
+
#: templates/debug.php631, templates/debug/logger.php:22
|
1957 |
+
msgid "Type"
|
1958 |
+
msgstr "Typ"
|
1959 |
+
|
1960 |
+
#: templates/debug.php636, templates/debug/logger.php:26
|
1961 |
+
msgid "Timestamp"
|
1962 |
+
msgstr "Datum a čas"
|
1963 |
+
|
1964 |
+
#: templates/secure-https-header.php:28
|
1965 |
+
msgid "Secure HTTPS %s page, running from an external domain"
|
1966 |
+
msgstr "Zabezpečená stránka HTTPS %s spuštěná z externí domény"
|
1967 |
+
|
1968 |
+
#: includes/customizer/class-fs-customizer-support-section.php55,
|
1969 |
+
#: templates/plugin-info/features.php:43
|
1970 |
+
msgid "Support"
|
1971 |
+
msgstr "Podpora"
|
1972 |
+
|
1973 |
+
#: includes/debug/class-fs-debug-bar-panel.php48,
|
1974 |
+
#: templates/debug/api-calls.php54, templates/debug/logger.php:62
|
1975 |
+
msgctxt "milliseconds"
|
1976 |
+
msgid "ms"
|
1977 |
+
msgstr "ms"
|
1978 |
+
|
1979 |
+
#: includes/debug/debug-bar-start.php:41
|
1980 |
+
msgid "Freemius API"
|
1981 |
+
msgstr "Freemius API"
|
1982 |
+
|
1983 |
+
#: includes/debug/debug-bar-start.php:42
|
1984 |
+
msgid "Requests"
|
1985 |
+
msgstr "Žádosti"
|
1986 |
+
|
1987 |
+
#: templates/account/billing.php:22
|
1988 |
+
msgctxt "verb"
|
1989 |
+
msgid "Update"
|
1990 |
+
msgstr "Aktualizovat"
|
1991 |
+
|
1992 |
+
#: templates/account/billing.php:33
|
1993 |
+
msgid "Billing"
|
1994 |
+
msgstr "Fakturace"
|
1995 |
+
|
1996 |
+
#: templates/account/billing.php38, templates/account/billing.php:38
|
1997 |
+
msgid "Business name"
|
1998 |
+
msgstr "Jméno firmy"
|
1999 |
+
|
2000 |
+
#: templates/account/billing.php39, templates/account/billing.php:39
|
2001 |
+
msgid "Tax / VAT ID"
|
2002 |
+
msgstr "Tax / VAT ID"
|
2003 |
+
|
2004 |
+
#: templates/account/billing.php42, templates/account/billing.php42,
|
2005 |
+
#: templates/account/billing.php43, templates/account/billing.php:43
|
2006 |
+
msgid "Address Line %d"
|
2007 |
+
msgstr "Address Line %d"
|
2008 |
+
|
2009 |
+
#: templates/account/billing.php46, templates/account/billing.php:46
|
2010 |
+
msgid "City"
|
2011 |
+
msgstr "Město"
|
2012 |
+
|
2013 |
+
#: templates/account/billing.php46, templates/account/billing.php:46
|
2014 |
+
msgid "Town"
|
2015 |
+
msgstr "Město"
|
2016 |
+
|
2017 |
+
#: templates/account/billing.php47, templates/account/billing.php:47
|
2018 |
+
msgid "ZIP / Postal Code"
|
2019 |
+
msgstr "PSČ / směrovací číslo"
|
2020 |
+
|
2021 |
+
#: templates/account/billing.php:302
|
2022 |
+
msgid "Country"
|
2023 |
+
msgstr "Země"
|
2024 |
+
|
2025 |
+
#: templates/account/billing.php:304
|
2026 |
+
msgid "Select Country"
|
2027 |
+
msgstr "Vyberte zemi"
|
2028 |
+
|
2029 |
+
#: templates/account/billing.php311, templates/account/billing.php:312
|
2030 |
+
msgid "State"
|
2031 |
+
msgstr "Kraj"
|
2032 |
+
|
2033 |
+
#: templates/account/billing.php311, templates/account/billing.php:312
|
2034 |
+
msgid "Province"
|
2035 |
+
msgstr "Okres"
|
2036 |
+
|
2037 |
+
#: templates/account/payments.php:29
|
2038 |
+
msgid "Payments"
|
2039 |
+
msgstr "Platby"
|
2040 |
+
|
2041 |
+
#: templates/account/payments.php:36
|
2042 |
+
msgid "Date"
|
2043 |
+
msgstr "Datum"
|
2044 |
+
|
2045 |
+
#: templates/account/payments.php:37
|
2046 |
+
msgid "Amount"
|
2047 |
+
msgstr "Částka"
|
2048 |
+
|
2049 |
+
#: templates/account/payments.php38, templates/account/payments.php:50
|
2050 |
+
msgid "Invoice"
|
2051 |
+
msgstr "Faktura"
|
2052 |
+
|
2053 |
+
#: templates/debug/api-calls.php:56
|
2054 |
+
msgid "API"
|
2055 |
+
msgstr "API"
|
2056 |
+
|
2057 |
+
#: templates/debug/api-calls.php:68
|
2058 |
+
msgid "Method"
|
2059 |
+
msgstr "Metoda"
|
2060 |
+
|
2061 |
+
#: templates/debug/api-calls.php:69
|
2062 |
+
msgid "Code"
|
2063 |
+
msgstr "Kód"
|
2064 |
+
|
2065 |
+
#: templates/debug/api-calls.php:70
|
2066 |
+
msgid "Length"
|
2067 |
+
msgstr "Délka"
|
2068 |
+
|
2069 |
+
#: templates/debug/api-calls.php:71
|
2070 |
+
msgctxt "as file/folder path"
|
2071 |
+
msgid "Path"
|
2072 |
+
msgstr "Složka"
|
2073 |
+
|
2074 |
+
#: templates/debug/api-calls.php:73
|
2075 |
+
msgid "Body"
|
2076 |
+
msgstr "Tělo"
|
2077 |
+
|
2078 |
+
#: templates/debug/api-calls.php:75
|
2079 |
+
msgid "Result"
|
2080 |
+
msgstr "Výsledek"
|
2081 |
+
|
2082 |
+
#: templates/debug/api-calls.php:76
|
2083 |
+
msgid "Start"
|
2084 |
+
msgstr "Začátek"
|
2085 |
+
|
2086 |
+
#: templates/debug/api-calls.php:77
|
2087 |
+
msgid "End"
|
2088 |
+
msgstr "Konec"
|
2089 |
+
|
2090 |
+
#: templates/debug/logger.php:15
|
2091 |
+
msgid "Log"
|
2092 |
+
msgstr "Záznam"
|
2093 |
+
|
2094 |
+
#. translators: %s: time period (e.g. In "2 hours")
|
2095 |
+
#: templates/debug/plugins-themes-sync.php18,
|
2096 |
+
#: templates/debug/scheduled-crons.php:91
|
2097 |
+
msgid "In %s"
|
2098 |
+
msgstr "Za %s"
|
2099 |
+
|
2100 |
+
#. translators: %s: time period (e.g. "2 hours" ago)
|
2101 |
+
#: templates/debug/plugins-themes-sync.php20,
|
2102 |
+
#: templates/debug/scheduled-crons.php:93
|
2103 |
+
msgid "%s ago"
|
2104 |
+
msgstr "Před %s"
|
2105 |
+
|
2106 |
+
#: templates/debug/plugins-themes-sync.php21,
|
2107 |
+
#: templates/debug/scheduled-crons.php:74
|
2108 |
+
msgctxt "seconds"
|
2109 |
+
msgid "sec"
|
2110 |
+
msgstr "s"
|
2111 |
+
|
2112 |
+
#: templates/debug/plugins-themes-sync.php:23
|
2113 |
+
msgid "Plugins & Themes Sync"
|
2114 |
+
msgstr "Pluginy a synchronizace šablon"
|
2115 |
+
|
2116 |
+
#: templates/debug/plugins-themes-sync.php:28
|
2117 |
+
msgid "Total"
|
2118 |
+
msgstr "Celkem"
|
2119 |
+
|
2120 |
+
#: templates/debug/plugins-themes-sync.php29,
|
2121 |
+
#: templates/debug/scheduled-crons.php:84
|
2122 |
+
msgid "Last"
|
2123 |
+
msgstr "Poslední"
|
2124 |
+
|
2125 |
+
#: templates/debug/scheduled-crons.php:76
|
2126 |
+
msgid "Scheduled Crons"
|
2127 |
+
msgstr "Plánované crony"
|
2128 |
+
|
2129 |
+
#: templates/debug/scheduled-crons.php:81
|
2130 |
+
msgid "Module"
|
2131 |
+
msgstr "Modul"
|
2132 |
+
|
2133 |
+
#: templates/debug/scheduled-crons.php:82
|
2134 |
+
msgid "Module Type"
|
2135 |
+
msgstr "Typ modulu"
|
2136 |
+
|
2137 |
+
#: templates/debug/scheduled-crons.php:83
|
2138 |
+
msgid "Cron Type"
|
2139 |
+
msgstr "Cron Type"
|
2140 |
+
|
2141 |
+
#: templates/debug/scheduled-crons.php:85
|
2142 |
+
msgid "Next"
|
2143 |
+
msgstr "Následující"
|
2144 |
+
|
2145 |
+
#: templates/forms/affiliation.php:82
|
2146 |
+
msgid "Non-expiring"
|
2147 |
+
msgstr "Non-expiring"
|
2148 |
+
|
2149 |
+
#: templates/forms/affiliation.php:85
|
2150 |
+
msgid "Apply to become an affiliate"
|
2151 |
+
msgstr "Apply to become an affiliate"
|
2152 |
+
|
2153 |
+
#: templates/forms/affiliation.php:104
|
2154 |
+
msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
2155 |
+
msgstr "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
2156 |
+
|
2157 |
+
#: templates/forms/affiliation.php:119
|
2158 |
+
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."
|
2159 |
+
msgstr "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."
|
2160 |
+
|
2161 |
+
#: templates/forms/affiliation.php:122
|
2162 |
+
msgid "Your affiliation account was temporarily suspended."
|
2163 |
+
msgstr "Your affiliation account was temporarily suspended."
|
2164 |
+
|
2165 |
+
#: templates/forms/affiliation.php:125
|
2166 |
+
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."
|
2167 |
+
msgstr "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."
|
2168 |
+
|
2169 |
+
#: templates/forms/affiliation.php:128
|
2170 |
+
msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
2171 |
+
msgstr "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
2172 |
+
|
2173 |
+
#: templates/forms/affiliation.php:141
|
2174 |
+
msgid "Like the %s? Become our ambassador and earn cash ;-)"
|
2175 |
+
msgstr "Like the %s? Become our ambassador and earn cash ;-)"
|
2176 |
+
|
2177 |
+
#: templates/forms/affiliation.php:142
|
2178 |
+
msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
2179 |
+
msgstr "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
2180 |
+
|
2181 |
+
#: templates/forms/affiliation.php:145
|
2182 |
+
msgid "Program Summary"
|
2183 |
+
msgstr "Program Summary"
|
2184 |
+
|
2185 |
+
#: templates/forms/affiliation.php:147
|
2186 |
+
msgid "%s commission when a customer purchases a new license."
|
2187 |
+
msgstr "%s provizi, když zákazník zakoupí novou licenci."
|
2188 |
+
|
2189 |
+
#: templates/forms/affiliation.php:149
|
2190 |
+
msgid "Get commission for automated subscription renewals."
|
2191 |
+
msgstr "Get commission for automated subscription renewals."
|
2192 |
+
|
2193 |
+
#: templates/forms/affiliation.php:152
|
2194 |
+
msgid "%s tracking cookie after the first visit to maximize earnings potential."
|
2195 |
+
msgstr "%s tracking cookie after the first visit to maximize earnings potential."
|
2196 |
+
|
2197 |
+
#: templates/forms/affiliation.php:155
|
2198 |
+
msgid "Unlimited commissions."
|
2199 |
+
msgstr "Unlimited commissions."
|
2200 |
+
|
2201 |
+
#: templates/forms/affiliation.php:157
|
2202 |
+
msgid "%s minimum payout amount."
|
2203 |
+
msgstr "%s minimální částka výplaty."
|
2204 |
+
|
2205 |
+
#: templates/forms/affiliation.php:158
|
2206 |
+
msgid "Payouts are in USD and processed monthly via PayPal."
|
2207 |
+
msgstr "Payouts are in USD and processed monthly via PayPal."
|
2208 |
+
|
2209 |
+
#: templates/forms/affiliation.php:159
|
2210 |
+
msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
2211 |
+
msgstr "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
2212 |
+
|
2213 |
+
#: templates/forms/affiliation.php:162
|
2214 |
+
msgid "Affiliate"
|
2215 |
+
msgstr "Partner"
|
2216 |
+
|
2217 |
+
#: templates/forms/affiliation.php165, templates/forms/resend-key.php:23
|
2218 |
+
msgid "Email address"
|
2219 |
+
msgstr "Emailová adresa"
|
2220 |
+
|
2221 |
+
#: templates/forms/affiliation.php:169
|
2222 |
+
msgid "Full name"
|
2223 |
+
msgstr "Celé jméno"
|
2224 |
+
|
2225 |
+
#: templates/forms/affiliation.php:173
|
2226 |
+
msgid "PayPal account email address"
|
2227 |
+
msgstr "E-mailová adresa účtu PayPal"
|
2228 |
+
|
2229 |
+
#: templates/forms/affiliation.php:177
|
2230 |
+
msgid "Where are you going to promote the %s?"
|
2231 |
+
msgstr "Where are you going to promote the %s?"
|
2232 |
+
|
2233 |
+
#: templates/forms/affiliation.php:179
|
2234 |
+
msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
|
2235 |
+
msgstr "Enter the domain of your website or other websites from where you plan to promote the %s."
|
2236 |
+
|
2237 |
+
#: templates/forms/affiliation.php:181
|
2238 |
+
msgid "Add another domain"
|
2239 |
+
msgstr "Add another domain"
|
2240 |
+
|
2241 |
+
#: templates/forms/affiliation.php:185
|
2242 |
+
msgid "Extra Domains"
|
2243 |
+
msgstr "Další domény"
|
2244 |
+
|
2245 |
+
#: templates/forms/affiliation.php:186
|
2246 |
+
msgid "Extra domains where you will be marketing the product from."
|
2247 |
+
msgstr "Extra domains where you will be marketing the product from."
|
2248 |
+
|
2249 |
+
#: templates/forms/affiliation.php:196
|
2250 |
+
msgid "Promotion methods"
|
2251 |
+
msgstr "Promotion methods"
|
2252 |
+
|
2253 |
+
#: templates/forms/affiliation.php:199
|
2254 |
+
msgid "Social media (Facebook, Twitter, etc.)"
|
2255 |
+
msgstr "Social media (Facebook, Twitter, etc.)"
|
2256 |
+
|
2257 |
+
#: templates/forms/affiliation.php:203
|
2258 |
+
msgid "Mobile apps"
|
2259 |
+
msgstr "Mobile apps"
|
2260 |
+
|
2261 |
+
#: templates/forms/affiliation.php:207
|
2262 |
+
msgid "Website, email, and social media statistics (optional)"
|
2263 |
+
msgstr "Statistika o webová stránc, emaiul a sociálních médiích"
|
2264 |
+
|
2265 |
+
#: templates/forms/affiliation.php:210
|
2266 |
+
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)."
|
2267 |
+
msgstr "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)."
|
2268 |
+
|
2269 |
+
#: templates/forms/affiliation.php:214
|
2270 |
+
msgid "How will you promote us?"
|
2271 |
+
msgstr "Jakým způsobem budete mé produkty propagovat?"
|
2272 |
+
|
2273 |
+
#: templates/forms/affiliation.php:217
|
2274 |
+
msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
2275 |
+
msgstr "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
2276 |
+
|
2277 |
+
#: templates/forms/affiliation.php223, templates/forms/resend-key.php:22
|
2278 |
+
msgid "Cancel"
|
2279 |
+
msgstr "Zrušit"
|
2280 |
+
|
2281 |
+
#: templates/forms/affiliation.php:225
|
2282 |
+
msgid "Become an affiliate"
|
2283 |
+
msgstr "Staňte se naším afiliátem"
|
2284 |
+
|
2285 |
+
#: templates/forms/data-debug-mode.php:25
|
2286 |
+
msgid "Please enter the license key to enable the debug mode:"
|
2287 |
+
msgstr "Please enter the license key to enable the debug mode:"
|
2288 |
+
|
2289 |
+
#: templates/forms/data-debug-mode.php:27
|
2290 |
+
msgid "To enter the debug mode, please enter the secret key of the license owner (UserID = %d), which you can find in your \"My Profile\" section of your User Dashboard:"
|
2291 |
+
msgstr "To enter the debug mode, please enter the secret key of the license owner (UserID = %d), which you can find in your \"My Profile\" section of your User Dashboard:"
|
2292 |
+
|
2293 |
+
#: templates/forms/data-debug-mode.php:32
|
2294 |
+
msgid "Submit"
|
2295 |
+
msgstr "Submit"
|
2296 |
+
|
2297 |
+
#: templates/forms/data-debug-mode.php:36
|
2298 |
+
msgid "User key"
|
2299 |
+
msgstr "User key"
|
2300 |
+
|
2301 |
+
#: templates/forms/license-activation.php:23
|
2302 |
+
msgid "Please enter the license key that you received in the email right after the purchase:"
|
2303 |
+
msgstr "Please enter the license key that you received in the email right after the purchase:"
|
2304 |
+
|
2305 |
+
#: templates/forms/license-activation.php:28
|
2306 |
+
msgid "Update License"
|
2307 |
+
msgstr "Aktualizovat licenci"
|
2308 |
+
|
2309 |
+
#: templates/forms/optout.php:30
|
2310 |
+
msgctxt "verb"
|
2311 |
+
msgid "Opt Out"
|
2312 |
+
msgstr "Odhlásit se"
|
2313 |
+
|
2314 |
+
#: templates/forms/optout.php:31
|
2315 |
+
msgctxt "verb"
|
2316 |
+
msgid "Opt In"
|
2317 |
+
msgstr "Zúčastnit se"
|
2318 |
+
|
2319 |
+
#: templates/forms/optout.php:33
|
2320 |
+
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."
|
2321 |
+
msgstr "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."
|
2322 |
+
|
2323 |
+
#: templates/forms/optout.php:35
|
2324 |
+
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
2325 |
+
msgstr "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
2326 |
+
|
2327 |
+
#: templates/forms/premium-versions-upgrade-handler.php:40
|
2328 |
+
msgid "There is a new version of %s available."
|
2329 |
+
msgstr "Je k dispozici nová verze %s."
|
2330 |
+
|
2331 |
+
#: templates/forms/premium-versions-upgrade-handler.php:41
|
2332 |
+
msgid " %s to access version %s security & feature updates, and support."
|
2333 |
+
msgstr " %s pro přístup k verzi %s zajišťující podporu a nejen bezpečnostní aktualizace."
|
2334 |
+
|
2335 |
+
#: templates/forms/premium-versions-upgrade-handler.php:54
|
2336 |
+
msgid "New Version Available"
|
2337 |
+
msgstr "Nová verze k dispozici"
|
2338 |
+
|
2339 |
+
#: templates/forms/premium-versions-upgrade-handler.php:75
|
2340 |
+
msgctxt "close a window"
|
2341 |
+
msgid "Dismiss"
|
2342 |
+
msgstr "Skrýt"
|
2343 |
+
|
2344 |
+
#: templates/forms/resend-key.php:21
|
2345 |
+
msgid "Send License Key"
|
2346 |
+
msgstr "Odeslat licenční klíč"
|
2347 |
+
|
2348 |
+
#: templates/forms/resend-key.php:57
|
2349 |
+
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
2350 |
+
msgstr "Níže zadejte emailovou adresu, kterou jste použili pro koupi pluginu a my vám znovu odešleme váš licenční klíč."
|
2351 |
+
|
2352 |
+
#: templates/forms/subscription-cancellation.php:37
|
2353 |
+
msgid "Deactivating or uninstalling the %s will automatically disable the license, which you'll be able to use on another site."
|
2354 |
+
msgstr "Deactivating or uninstalling the %s will automatically disable the license, which you'll be able to use on another site."
|
2355 |
+
|
2356 |
+
#: templates/forms/subscription-cancellation.php:47
|
2357 |
+
msgid "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
|
2358 |
+
msgstr "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
|
2359 |
+
|
2360 |
+
#: templates/forms/subscription-cancellation.php:52
|
2361 |
+
msgid "license"
|
2362 |
+
msgstr "licence"
|
2363 |
+
|
2364 |
+
#: templates/forms/subscription-cancellation.php:57
|
2365 |
+
msgid "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
|
2366 |
+
msgstr "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
|
2367 |
+
|
2368 |
+
#: templates/forms/subscription-cancellation.php:68
|
2369 |
+
msgid "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
|
2370 |
+
msgstr "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
|
2371 |
+
|
2372 |
+
#: templates/forms/subscription-cancellation.php:103
|
2373 |
+
msgid "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
|
2374 |
+
msgstr "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
|
2375 |
+
|
2376 |
+
#: templates/forms/subscription-cancellation.php:136
|
2377 |
+
msgid "Cancel %s?"
|
2378 |
+
msgstr "Cancel %s?"
|
2379 |
+
|
2380 |
+
#: templates/forms/subscription-cancellation.php:143
|
2381 |
+
msgid "Proceed"
|
2382 |
+
msgstr "Pokračovat"
|
2383 |
+
|
2384 |
+
#: templates/forms/subscription-cancellation.php191,
|
2385 |
+
#: templates/forms/deactivation/form.php:171
|
2386 |
+
msgid "Cancel %s & Proceed"
|
2387 |
+
msgstr "Zrušit %s > pokračovat"
|
2388 |
+
|
2389 |
+
#: templates/forms/trial-start.php:22
|
2390 |
+
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
2391 |
+
msgstr "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
2392 |
+
|
2393 |
+
#: templates/forms/trial-start.php:28
|
2394 |
+
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."
|
2395 |
+
msgstr "Aby bylo vyhověno WordPress.org pokynům, před zahájením zkušebního období vás žádáme, abyste se rozhodli pro uživatele a necitlivé informace o webu, aby %s umožňoval periodicky odesílat data do %s za účelem kontroly aktualizací verzí a ověření zkušební verze."
|
2396 |
+
|
2397 |
+
#: templates/js/style-premium-theme.php:39
|
2398 |
+
msgid "Premium"
|
2399 |
+
msgstr "Prémium"
|
2400 |
+
|
2401 |
+
#: templates/js/style-premium-theme.php:42
|
2402 |
+
msgid "Beta"
|
2403 |
+
msgstr "Beta"
|
2404 |
+
|
2405 |
+
#: templates/partials/network-activation.php:27
|
2406 |
+
msgid "Activate license on all sites in the network."
|
2407 |
+
msgstr "Activate license on all sites in the network."
|
2408 |
+
|
2409 |
+
#: templates/partials/network-activation.php:28
|
2410 |
+
msgid "Apply on all sites in the network."
|
2411 |
+
msgstr "Apply on all sites in the network."
|
2412 |
+
|
2413 |
+
#: templates/partials/network-activation.php:31
|
2414 |
+
msgid "Activate license on all pending sites."
|
2415 |
+
msgstr "Activate license on all pending sites."
|
2416 |
+
|
2417 |
+
#: templates/partials/network-activation.php:32
|
2418 |
+
msgid "Apply on all pending sites."
|
2419 |
+
msgstr "Apply on all pending sites."
|
2420 |
+
|
2421 |
+
#: templates/partials/network-activation.php40,
|
2422 |
+
#: templates/partials/network-activation.php:74
|
2423 |
+
msgid "allow"
|
2424 |
+
msgstr "povolit"
|
2425 |
+
|
2426 |
+
#: templates/partials/network-activation.php43,
|
2427 |
+
#: templates/partials/network-activation.php:77
|
2428 |
+
msgid "delegate"
|
2429 |
+
msgstr "delegovat"
|
2430 |
+
|
2431 |
+
#: templates/partials/network-activation.php47,
|
2432 |
+
#: templates/partials/network-activation.php:81
|
2433 |
+
msgid "skip"
|
2434 |
+
msgstr "přeskočit"
|
2435 |
+
|
2436 |
+
#: templates/plugin-info/description.php72,
|
2437 |
+
#: templates/plugin-info/screenshots.php:31
|
2438 |
+
msgid "Click to view full-size screenshot %d"
|
2439 |
+
msgstr "Klikněte pro zobrazení plné velikosti snímku obrazovky %d"
|
2440 |
+
|
2441 |
+
#: templates/plugin-info/features.php:56
|
2442 |
+
msgid "Unlimited Updates"
|
2443 |
+
msgstr "Neomezené aktualizace"
|
2444 |
+
|
2445 |
+
#: templates/account/partials/activate-license-button.php:46
|
2446 |
+
msgid "Localhost"
|
2447 |
+
msgstr "Localhost"
|
2448 |
+
|
2449 |
+
#: templates/account/partials/activate-license-button.php:50
|
2450 |
+
msgctxt "as 5 licenses left"
|
2451 |
+
msgid "%s left"
|
2452 |
+
msgstr "Zbývá %s"
|
2453 |
+
|
2454 |
+
#: templates/account/partials/activate-license-button.php:51
|
2455 |
+
msgid "Last license"
|
2456 |
+
msgstr "Poslední licence"
|
2457 |
+
|
2458 |
+
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the
|
2459 |
+
#. subscription'
|
2460 |
+
#: templates/account/partials/addon.php:29
|
2461 |
+
msgid "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
2462 |
+
msgstr "%1$s okamžitě zastaví všechny budoucí opakující se platby a licence k plánu %s vyprší za %s."
|
2463 |
+
|
2464 |
+
#: templates/account/partials/addon.php:185
|
2465 |
+
msgid "Cancelled"
|
2466 |
+
msgstr "Zrušena"
|
2467 |
+
|
2468 |
+
#: templates/account/partials/addon.php:195
|
2469 |
+
msgid "No expiration"
|
2470 |
+
msgstr "Bez vypršení"
|
2471 |
+
|
2472 |
+
#: templates/account/partials/site.php:189
|
2473 |
+
msgid "Owner Name"
|
2474 |
+
msgstr "Jméno vlastníka"
|
2475 |
+
|
2476 |
+
#: templates/account/partials/site.php:201
|
2477 |
+
msgid "Owner Email"
|
2478 |
+
msgstr "E-mail vlastníka"
|
2479 |
+
|
2480 |
+
#: templates/account/partials/site.php:213
|
2481 |
+
msgid "Owner ID"
|
2482 |
+
msgstr "ID vlastníka"
|
2483 |
+
|
2484 |
+
#: templates/account/partials/site.php:286
|
2485 |
+
msgid "Subscription"
|
2486 |
+
msgstr "Předplatné"
|
2487 |
+
|
2488 |
+
#: templates/forms/deactivation/contact.php:19
|
2489 |
+
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
2490 |
+
msgstr "Omlouváme se za způsobené nepříjemnosti, ale když se nám dáte šanci, tak se vám ze všech sil pokusíme pomoci."
|
2491 |
+
|
2492 |
+
#: templates/forms/deactivation/contact.php:22
|
2493 |
+
msgid "Contact Support"
|
2494 |
+
msgstr "Kontaktovat podporu"
|
2495 |
+
|
2496 |
+
#: templates/forms/deactivation/form.php:64
|
2497 |
+
msgid "Anonymous feedback"
|
2498 |
+
msgstr "Anonymní zpětná vazba"
|
2499 |
+
|
2500 |
+
#: templates/forms/deactivation/form.php:70
|
2501 |
+
msgid "Deactivate"
|
2502 |
+
msgstr "Deaktivovat"
|
2503 |
+
|
2504 |
+
#: templates/forms/deactivation/form.php:72
|
2505 |
+
msgid "Activate %s"
|
2506 |
+
msgstr "Aktivovat %s"
|
2507 |
+
|
2508 |
+
#: templates/forms/deactivation/form.php:87
|
2509 |
+
msgid "Quick Feedback"
|
2510 |
+
msgstr "Rychlá zpětná vazba"
|
2511 |
+
|
2512 |
+
#: templates/forms/deactivation/form.php:91
|
2513 |
+
msgid "If you have a moment, please let us know why you are %s"
|
2514 |
+
msgstr "Máte-li chvilku, dejte nám vědět, proč %s"
|
2515 |
+
|
2516 |
+
#: templates/forms/deactivation/form.php:91
|
2517 |
+
msgid "deactivating"
|
2518 |
+
msgstr "deaktivujete"
|
2519 |
+
|
2520 |
+
#: templates/forms/deactivation/form.php:91
|
2521 |
+
msgid "switching"
|
2522 |
+
msgstr "přepínám"
|
2523 |
+
|
2524 |
+
#: templates/forms/deactivation/form.php:365
|
2525 |
+
msgid "Submit & %s"
|
2526 |
+
msgstr "Odeslat & %s"
|
2527 |
+
|
2528 |
+
#: templates/forms/deactivation/form.php:386
|
2529 |
+
msgid "Kindly tell us the reason so we can improve."
|
2530 |
+
msgstr "Dejte nám prosím vědět z jakého důvodu, ať to můžeme zlepšit."
|
2531 |
+
|
2532 |
+
#: templates/forms/deactivation/form.php:511
|
2533 |
+
msgid "Yes - %s"
|
2534 |
+
msgstr "Ano - %s"
|
2535 |
+
|
2536 |
+
#: templates/forms/deactivation/form.php:518
|
2537 |
+
msgid "Skip & %s"
|
2538 |
+
msgstr "Přeskočit & %s"
|
2539 |
+
|
2540 |
+
#: templates/forms/deactivation/retry-skip.php:21
|
2541 |
+
msgid "Click here to use the plugin anonymously"
|
2542 |
+
msgstr "Klikněte zde pro anonymní používání tohoto pluginu"
|
2543 |
+
|
2544 |
+
#: templates/forms/deactivation/retry-skip.php:23
|
2545 |
+
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
2546 |
+
msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/freemius/languages/freemius-da_DK.mo
CHANGED
Binary file
|
includes/freemius/languages/freemius-da_DK.po
CHANGED
@@ -1,2504 +1,2548 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
"
|
10 |
-
"
|
11 |
-
"
|
12 |
-
"
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
"
|
18 |
-
"
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
#: includes/class-freemius.
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
#: includes/class-freemius.
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
#: includes/class-freemius.
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
#: includes/class-freemius.php:
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
#: includes/class-freemius.
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
#:
|
257 |
-
msgid "
|
258 |
-
msgstr "
|
259 |
-
|
260 |
-
#: includes/class-freemius.
|
261 |
-
#:
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
#: templates/
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
#: includes/class-freemius.php16044, includes/class-freemius.php16132,
|
323 |
-
#: includes/class-freemius.php:16298
|
324 |
-
msgid "Please contact us with the following message:"
|
325 |
-
msgstr "Kontakt os venligst med følgende besked:"
|
326 |
-
|
327 |
-
#: includes/class-freemius.php:16128
|
328 |
-
msgid "An unknown error has occurred."
|
329 |
-
msgstr "An unknown error has occurred."
|
330 |
-
|
331 |
-
#: includes/class-freemius.php16655, includes/class-freemius.php:21409
|
332 |
-
msgid "Upgrade"
|
333 |
-
msgstr "Opgrader"
|
334 |
-
|
335 |
-
#: includes/class-freemius.php:16661
|
336 |
-
msgid "Start Trial"
|
337 |
-
msgstr "Start prøveperiode"
|
338 |
-
|
339 |
-
#: includes/class-freemius.php:16663
|
340 |
-
msgid "Pricing"
|
341 |
-
msgstr "Priser"
|
342 |
-
|
343 |
-
#: includes/class-freemius.php16742, includes/class-freemius.php:16744
|
344 |
-
msgid "Affiliation"
|
345 |
-
msgstr "Affiliation"
|
346 |
-
|
347 |
-
#: includes/class-freemius.php16772, includes/class-freemius.php16774,
|
348 |
-
#: templates/account.php177, templates/debug.php:326
|
349 |
-
msgid "Account"
|
350 |
-
msgstr "Konto"
|
351 |
-
|
352 |
-
#: includes/class-freemius.php16787, includes/class-freemius.php16789,
|
353 |
-
#: includes/customizer/class-fs-customizer-support-section.php:60
|
354 |
-
msgid "Contact Us"
|
355 |
-
msgstr "Kontakt os"
|
356 |
-
|
357 |
-
#: includes/class-freemius.php16799, includes/class-freemius.php16801,
|
358 |
-
#: includes/class-freemius.php21423, templates/account.php105,
|
359 |
-
#: templates/account/partials/addon.php:45
|
360 |
-
msgid "Add-Ons"
|
361 |
-
msgstr "Tilføjelser"
|
362 |
-
|
363 |
-
#: includes/class-freemius.php:16835
|
364 |
-
msgctxt "ASCII arrow left icon"
|
365 |
-
msgid "←"
|
366 |
-
msgstr "←"
|
367 |
-
|
368 |
-
#: includes/class-freemius.php:16835
|
369 |
-
msgctxt "ASCII arrow right icon"
|
370 |
-
msgid "➤"
|
371 |
-
msgstr "➤"
|
372 |
-
|
373 |
-
#: includes/class-freemius.php16837, templates/pricing.php:102
|
374 |
-
msgctxt "noun"
|
375 |
-
msgid "Pricing"
|
376 |
-
msgstr "Priser"
|
377 |
-
|
378 |
-
#: includes/class-freemius.php17050,
|
379 |
-
#: includes/customizer/class-fs-customizer-support-section.php:67
|
380 |
-
msgid "Support Forum"
|
381 |
-
msgstr "Supportforum"
|
382 |
-
|
383 |
-
#: includes/class-freemius.php:17995
|
384 |
-
msgid "Your email has been successfully verified - you are AWESOME!"
|
385 |
-
msgstr "Din e-mailadresse er blevet verificeret - du er FOR SEJ!"
|
386 |
-
|
387 |
-
#: includes/class-freemius.php:17996
|
388 |
-
msgctxt "a positive response"
|
389 |
-
msgid "Right on"
|
390 |
-
msgstr "Sådan"
|
391 |
-
|
392 |
-
#: includes/class-freemius.php:18660
|
393 |
-
msgid "Your %s Add-on plan was successfully upgraded."
|
394 |
-
msgstr "Your %s Add-on plan was successfully upgraded."
|
395 |
-
|
396 |
-
#: includes/class-freemius.php:18662
|
397 |
-
msgid "%s Add-on was successfully purchased."
|
398 |
-
msgstr "Betalingen for tilføjelsen %s blev gennemført."
|
399 |
-
|
400 |
-
#: includes/class-freemius.php:18665
|
401 |
-
msgid "Download the latest version"
|
402 |
-
msgstr "Download den seneste version"
|
403 |
-
|
404 |
-
#: includes/class-freemius.php:18751
|
405 |
-
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"
|
406 |
-
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s"
|
407 |
-
|
408 |
-
#: includes/class-freemius.php18757, includes/class-freemius.php19188,
|
409 |
-
#: includes/class-freemius.php:19277
|
410 |
-
msgid "Error received from the server:"
|
411 |
-
msgstr "Fejl modtager fra serveren:"
|
412 |
-
|
413 |
-
#: includes/class-freemius.php:18767
|
414 |
-
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
415 |
-
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
416 |
-
|
417 |
-
#: includes/class-freemius.php18961, includes/class-freemius.php19193,
|
418 |
-
#: includes/class-freemius.php19248, includes/class-freemius.php:19351
|
419 |
-
msgctxt ""
|
420 |
-
msgid "Hmm"
|
421 |
-
msgstr "Hmm"
|
422 |
-
|
423 |
-
#: includes/class-freemius.php:18974
|
424 |
-
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."
|
425 |
-
msgstr "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."
|
426 |
-
|
427 |
-
#: includes/class-freemius.php18975, templates/account.php107,
|
428 |
-
#: templates/add-ons.php191, templates/account/partials/addon.php:47
|
429 |
-
msgctxt "trial period"
|
430 |
-
msgid "Trial"
|
431 |
-
msgstr "Prøveperiode"
|
432 |
-
|
433 |
-
#: includes/class-freemius.php:18980
|
434 |
-
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
435 |
-
msgstr "Jeg har opgraderet min konto, men når jeg forsøger at synkronisere licensen, forbliver planen %s."
|
436 |
-
|
437 |
-
#: includes/class-freemius.php18984, includes/class-freemius.php:19043
|
438 |
-
msgid "Please contact us here"
|
439 |
-
msgstr "Kontakt os her"
|
440 |
-
|
441 |
-
#: includes/class-freemius.php:18995
|
442 |
-
msgid "Your plan was successfully activated."
|
443 |
-
msgstr "Your plan was successfully activated."
|
444 |
-
|
445 |
-
#: includes/class-freemius.php:18996
|
446 |
-
msgid "Your plan was successfully upgraded."
|
447 |
-
msgstr "Din plan er blevet opgraderet."
|
448 |
-
|
449 |
-
#: includes/class-freemius.php:19013
|
450 |
-
msgid "Your plan was successfully changed to %s."
|
451 |
-
msgstr "Din plan er blevet ændret til %s."
|
452 |
-
|
453 |
-
#: includes/class-freemius.php:19029
|
454 |
-
msgid "Your license has expired. You can still continue using the free %s forever."
|
455 |
-
msgstr "Din licens er udløbet. Du kan stadig fortsætte med at benytte den gratis udgave af %s."
|
456 |
-
|
457 |
-
#: includes/class-freemius.php:19031
|
458 |
-
msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
459 |
-
msgstr "Din licens er udløbet. %1$sOpgrader nu%2$s for at fortsætte med at benytte %3$s uden forstyrrelser."
|
460 |
-
|
461 |
-
#: includes/class-freemius.php:19039
|
462 |
-
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
463 |
-
msgstr "Din licens er blevet annulleret. Hvis du mener, dette er en fejl, så kontakt venligst support."
|
464 |
-
|
465 |
-
#: includes/class-freemius.php:19052
|
466 |
-
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."
|
467 |
-
msgstr "Din licens er udløbet. Du kan stadig benytte alle funktionerne i %s, men du bliver nødt til at fornye din licens for at få opdateringer og support."
|
468 |
-
|
469 |
-
#: includes/class-freemius.php:19075
|
470 |
-
msgid "Your free trial has expired. You can still continue using all our free features."
|
471 |
-
msgstr "Din gratis prøveperiode er udløbet. Du kan stadig benytte alle de gratis features."
|
472 |
-
|
473 |
-
#: includes/class-freemius.php:19077
|
474 |
-
msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
475 |
-
msgstr "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
476 |
-
|
477 |
-
#: includes/class-freemius.php:19184
|
478 |
-
msgid "It looks like the license could not be activated."
|
479 |
-
msgstr "Det ser ud til, at licensen ikke kunne aktiveres."
|
480 |
-
|
481 |
-
#: includes/class-freemius.php:19226
|
482 |
-
msgid "Your license was successfully activated."
|
483 |
-
msgstr "Din licens er blevet aktiveret."
|
484 |
-
|
485 |
-
#: includes/class-freemius.php:19252
|
486 |
-
msgid "It looks like your site currently doesn't have an active license."
|
487 |
-
msgstr "Det ser ud til, at dit websted endnu ikke har en aktiv licens."
|
488 |
-
|
489 |
-
#: includes/class-freemius.php:19276
|
490 |
-
msgid "It looks like the license deactivation failed."
|
491 |
-
msgstr "Det ser ud til, at licens-deaktiveringen mislykkedes."
|
492 |
-
|
493 |
-
#: includes/class-freemius.php:19304
|
494 |
-
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
495 |
-
msgstr "Din licens blev deaktiveret, du er tilbage på planen %s."
|
496 |
-
|
497 |
-
#: includes/class-freemius.php:19305
|
498 |
-
msgid "O.K"
|
499 |
-
msgstr "O.K"
|
500 |
-
|
501 |
-
#: includes/class-freemius.php:19358
|
502 |
-
msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
|
503 |
-
msgstr "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
|
504 |
-
|
505 |
-
#: includes/class-freemius.php:19367
|
506 |
-
msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
|
507 |
-
msgstr "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
|
508 |
-
|
509 |
-
#: includes/class-freemius.php:19409
|
510 |
-
msgid "You are already running the %s in a trial mode."
|
511 |
-
msgstr "Du benytter allerede %s under en prøveperiode."
|
512 |
-
|
513 |
-
#: includes/class-freemius.php:19420
|
514 |
-
msgid "You already utilized a trial before."
|
515 |
-
msgstr "Du har allerede brugt din prøveperiode."
|
516 |
-
|
517 |
-
#: includes/class-freemius.php:19434
|
518 |
-
msgid "Plan %s do not exist, therefore, can't start a trial."
|
519 |
-
msgstr "Plan %s eksisterer ikke og kan derfor ikke starte prøveperiode."
|
520 |
-
|
521 |
-
#: includes/class-freemius.php:19445
|
522 |
-
msgid "Plan %s does not support a trial period."
|
523 |
-
msgstr "Plan %s understøtter ikke en prøveperiode."
|
524 |
-
|
525 |
-
#: includes/class-freemius.php:19456
|
526 |
-
msgid "None of the %s's plans supports a trial period."
|
527 |
-
msgstr "None of the %s's plans supports a trial period."
|
528 |
-
|
529 |
-
#: includes/class-freemius.php:19506
|
530 |
-
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
531 |
-
msgstr "Det lader ikke til du er i en prøveperiode længere, så der er ikke noget at annullere :-)"
|
532 |
-
|
533 |
-
#: includes/class-freemius.php:19542
|
534 |
-
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
535 |
-
msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
536 |
-
|
537 |
-
#: includes/class-freemius.php:19561
|
538 |
-
msgid "Your %s free trial was successfully cancelled."
|
539 |
-
msgstr "Din gratis prøveperiode for %s er blevet annulleret."
|
540 |
-
|
541 |
-
#: includes/class-freemius.php:19877
|
542 |
-
msgid "Version %s was released."
|
543 |
-
msgstr "Version %s er blevet udgivet."
|
544 |
-
|
545 |
-
#: includes/class-freemius.php:19877
|
546 |
-
msgid "Please download %s."
|
547 |
-
msgstr "Download venligst %s."
|
548 |
-
|
549 |
-
#: includes/class-freemius.php:19884
|
550 |
-
msgid "the latest %s version here"
|
551 |
-
msgstr "den seneste version af %s her"
|
552 |
-
|
553 |
-
#: includes/class-freemius.php:19889
|
554 |
-
msgid "New"
|
555 |
-
msgstr "Ny"
|
556 |
-
|
557 |
-
#: includes/class-freemius.php:19894
|
558 |
-
msgid "Seems like you got the latest release."
|
559 |
-
msgstr "Det ser ud til, at du har den seneste udgivelse."
|
560 |
-
|
561 |
-
#: includes/class-freemius.php:19895
|
562 |
-
msgid "You are all good!"
|
563 |
-
msgstr "Det var det!"
|
564 |
-
|
565 |
-
#: includes/class-freemius.php:20165
|
566 |
-
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
567 |
-
msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
568 |
-
|
569 |
-
#: includes/class-freemius.php:20304
|
570 |
-
msgid "Site successfully opted in."
|
571 |
-
msgstr "Websted er tilmeldt."
|
572 |
-
|
573 |
-
#: includes/class-freemius.php20305, includes/class-freemius.php:21125
|
574 |
-
msgid "Awesome"
|
575 |
-
msgstr "Sejt"
|
576 |
-
|
577 |
-
#: includes/class-freemius.php20321, templates/forms/optout.php:32
|
578 |
-
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
579 |
-
msgstr "Vi sætter pris på din hjælp med at forbedre %s ved at lade os indsamle brugsdata."
|
580 |
-
|
581 |
-
#: includes/class-freemius.php:20322
|
582 |
-
msgid "Thank you!"
|
583 |
-
msgstr "Mange tak!"
|
584 |
-
|
585 |
-
#: includes/class-freemius.php:20329
|
586 |
-
msgid "We will no longer be sending any usage data of %s on %s to %s."
|
587 |
-
msgstr "Vi vil ikke længere indsende brugsdata af %s på %s til %s."
|
588 |
-
|
589 |
-
#: includes/class-freemius.php:20458
|
590 |
-
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."
|
591 |
-
msgstr "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."
|
592 |
-
|
593 |
-
#: includes/class-freemius.php:20464
|
594 |
-
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
595 |
-
msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
596 |
-
|
597 |
-
#: includes/class-freemius.php:20469
|
598 |
-
msgid "%s is the new owner of the account."
|
599 |
-
msgstr "%s er den nye ejer af kontoen."
|
600 |
-
|
601 |
-
#: includes/class-freemius.php:20471
|
602 |
-
msgctxt "as congratulations"
|
603 |
-
msgid "Congrats"
|
604 |
-
msgstr "Tillykke"
|
605 |
-
|
606 |
-
#: includes/class-freemius.php:20491
|
607 |
-
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
608 |
-
msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
609 |
-
|
610 |
-
#: includes/class-freemius.php:20492
|
611 |
-
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
612 |
-
msgstr "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
613 |
-
|
614 |
-
#: includes/class-freemius.php:20499
|
615 |
-
msgid "Change Ownership"
|
616 |
-
msgstr "Skift ejerskab"
|
617 |
-
|
618 |
-
#: includes/class-freemius.php:20507
|
619 |
-
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
620 |
-
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
621 |
-
|
622 |
-
#: includes/class-freemius.php:20519
|
623 |
-
msgid "Please provide your full name."
|
624 |
-
msgstr "Indtast venligst dit fulde navn."
|
625 |
-
|
626 |
-
#: includes/class-freemius.php:20524
|
627 |
-
msgid "Your name was successfully updated."
|
628 |
-
msgstr "Dit navn er blevet opdateret."
|
629 |
-
|
630 |
-
#: includes/class-freemius.php:20585
|
631 |
-
msgid "You have successfully updated your %s."
|
632 |
-
msgstr "Opdatering af %s blev gennemført."
|
633 |
-
|
634 |
-
#: includes/class-freemius.php:20725
|
635 |
-
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
636 |
-
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
637 |
-
|
638 |
-
#: includes/class-freemius.php:20726
|
639 |
-
msgctxt "advance notice of something that will need attention."
|
640 |
-
msgid "Heads up"
|
641 |
-
msgstr "Se her"
|
642 |
-
|
643 |
-
#: includes/class-freemius.php:21165
|
644 |
-
msgctxt "exclamation"
|
645 |
-
msgid "Hey"
|
646 |
-
msgstr "Hey"
|
647 |
-
|
648 |
-
#: includes/class-freemius.php:21165
|
649 |
-
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
650 |
-
msgstr "Hvad syntes du om %s indtil videre? Test alle %s premium funktioner med en %d-dags gratis prøveperiode."
|
651 |
-
|
652 |
-
#: includes/class-freemius.php:21173
|
653 |
-
msgid "No commitment for %s days - cancel anytime!"
|
654 |
-
msgstr "Ingen bindinger i %s dage - annuller når som helst!"
|
655 |
-
|
656 |
-
#: includes/class-freemius.php:21174
|
657 |
-
msgid "No credit card required"
|
658 |
-
msgstr "Betalingskort ikke påkrævet"
|
659 |
-
|
660 |
-
#: includes/class-freemius.php21181, templates/forms/trial-start.php:53
|
661 |
-
msgctxt "call to action"
|
662 |
-
msgid "Start free trial"
|
663 |
-
msgstr "Start gratis prøveperiode"
|
664 |
-
|
665 |
-
#: includes/class-freemius.php:21258
|
666 |
-
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!"
|
667 |
-
msgstr "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!"
|
668 |
-
|
669 |
-
#: includes/class-freemius.php:21267
|
670 |
-
msgid "Learn more"
|
671 |
-
msgstr "Læs mere"
|
672 |
-
|
673 |
-
#: includes/class-freemius.php21447, templates/account.php474,
|
674 |
-
#: templates/account.php595, templates/connect.php171,
|
675 |
-
#: templates/connect.php421, templates/forms/license-activation.php25,
|
676 |
-
#: templates/account/partials/addon.php:287
|
677 |
-
msgid "Activate License"
|
678 |
-
msgstr "Aktiver licens"
|
679 |
-
|
680 |
-
#: includes/class-freemius.php21448, templates/account.php543,
|
681 |
-
#: templates/account.php594, templates/account/partials/site.php:256
|
682 |
-
msgid "Change License"
|
683 |
-
msgstr "Skift licens"
|
684 |
-
|
685 |
-
#: includes/class-freemius.php21539, templates/account/partials/site.php:161
|
686 |
-
msgid "Opt Out"
|
687 |
-
msgstr "Frameld"
|
688 |
-
|
689 |
-
#: includes/class-freemius.php21541, includes/class-freemius.php21547,
|
690 |
-
#: templates/account/partials/site.php43,
|
691 |
-
#: templates/account/partials/site.php:161
|
692 |
-
msgid "Opt In"
|
693 |
-
msgstr "Tilmeld"
|
694 |
-
|
695 |
-
#: includes/class-freemius.php:21775
|
696 |
-
msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
|
697 |
-
msgstr " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
|
698 |
-
|
699 |
-
#: includes/class-freemius.php:21783
|
700 |
-
msgid "Activate %s features"
|
701 |
-
msgstr "Activate %s features"
|
702 |
-
|
703 |
-
#: includes/class-freemius.php:21796
|
704 |
-
msgid "Please follow these steps to complete the upgrade"
|
705 |
-
msgstr "Følg venligst disse trin for at færdiggøre opgraderingen"
|
706 |
-
|
707 |
-
#: includes/class-freemius.php:21800
|
708 |
-
msgid "Download the latest %s version"
|
709 |
-
msgstr "Download den seneste version af %s"
|
710 |
-
|
711 |
-
#: includes/class-freemius.php:21804
|
712 |
-
msgid "Upload and activate the downloaded version"
|
713 |
-
msgstr "Upload og aktiver den downloadede version"
|
714 |
-
|
715 |
-
#: includes/class-freemius.php:21806
|
716 |
-
msgid "How to upload and activate?"
|
717 |
-
msgstr "Upload og aktivering, hvordan?"
|
718 |
-
|
719 |
-
#: includes/class-freemius.php:21940
|
720 |
-
msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
|
721 |
-
msgstr "%sClick here%s to choose the sites where you'd like to activate the license on."
|
722 |
-
|
723 |
-
#: includes/class-freemius.php:22101
|
724 |
-
msgid "Auto installation only works for opted-in users."
|
725 |
-
msgstr "Auto-installation fungerer kun for tilmeldte brugere."
|
726 |
-
|
727 |
-
#: includes/class-freemius.php22111, includes/class-freemius.php22144,
|
728 |
-
#: includes/class-fs-plugin-updater.php1149,
|
729 |
-
#: includes/class-fs-plugin-updater.php:1163
|
730 |
-
msgid "Invalid module ID."
|
731 |
-
msgstr "Ugyldigt modul-ID."
|
732 |
-
|
733 |
-
#: includes/class-freemius.php22120, includes/class-fs-plugin-updater.php:1185
|
734 |
-
msgid "Premium version already active."
|
735 |
-
msgstr "Premium version allerede aktiv."
|
736 |
-
|
737 |
-
#: includes/class-freemius.php:22127
|
738 |
-
msgid "You do not have a valid license to access the premium version."
|
739 |
-
msgstr "Du har ikke en gyldig licens til at benytte premium-versionen."
|
740 |
-
|
741 |
-
#: includes/class-freemius.php:22134
|
742 |
-
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
743 |
-
msgstr "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
744 |
-
|
745 |
-
#: includes/class-freemius.php22152, includes/class-fs-plugin-updater.php:1184
|
746 |
-
msgid "Premium add-on version already installed."
|
747 |
-
msgstr "Premium tilføjelse er allerede installeret."
|
748 |
-
|
749 |
-
#: includes/class-freemius.php:22497
|
750 |
-
msgid "View paid features"
|
751 |
-
msgstr "Vis betalte features"
|
752 |
-
|
753 |
-
#: includes/class-freemius.php:22819
|
754 |
-
msgid "Thank you so much for using %s and its add-ons!"
|
755 |
-
msgstr "Thank you so much for using %s and its add-ons!"
|
756 |
-
|
757 |
-
#: includes/class-freemius.php:22820
|
758 |
-
msgid "Thank you so much for using %s!"
|
759 |
-
msgstr "Tak fordi du benytter %s!"
|
760 |
-
|
761 |
-
#: includes/class-freemius.php:22826
|
762 |
-
msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
|
763 |
-
msgstr "Du er allerede tilmeldt vores brugssporing, hvilket hjælper os med at forbedre %s."
|
764 |
-
|
765 |
-
#: includes/class-freemius.php:22830
|
766 |
-
msgid "Thank you so much for using our products!"
|
767 |
-
msgstr "Mange tak for at benytte vores produkter!"
|
768 |
-
|
769 |
-
#: includes/class-freemius.php:22831
|
770 |
-
msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
|
771 |
-
msgstr "Du er allerede tilmeldt vores brugssporing, hvilket hjælper os med at forbedre dem."
|
772 |
-
|
773 |
-
#: includes/class-freemius.php:22850
|
774 |
-
msgid "%s and its add-ons"
|
775 |
-
msgstr "%s og tilføjelser"
|
776 |
-
|
777 |
-
#: includes/class-freemius.php:22859
|
778 |
-
msgid "Products"
|
779 |
-
msgstr "Produkter"
|
780 |
-
|
781 |
-
#: includes/class-freemius.php22866, templates/connect.php:272
|
782 |
-
msgid "Yes"
|
783 |
-
msgstr "Ja"
|
784 |
-
|
785 |
-
#: includes/class-freemius.php22867, templates/connect.php:273
|
786 |
-
msgid "send me security & feature updates, educational content and offers."
|
787 |
-
msgstr "send mig sikkerheds- og feature-opdateringer, informativt indhold og tilbud."
|
788 |
-
|
789 |
-
#: includes/class-freemius.php22868, templates/connect.php:278
|
790 |
-
msgid "No"
|
791 |
-
msgstr "Nej"
|
792 |
-
|
793 |
-
#: includes/class-freemius.php22870, templates/connect.php:280
|
794 |
-
msgid "do %sNOT%s send me security & feature updates, educational content and offers."
|
795 |
-
msgstr "send %sIKKE%s sikkerheds- og feature-opdateringer, informativt indhold og tilbud."
|
796 |
-
|
797 |
-
#: includes/class-freemius.php:22880
|
798 |
-
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 :-)"
|
799 |
-
msgstr "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 :-)"
|
800 |
-
|
801 |
-
#: includes/class-freemius.php22882, templates/connect.php:287
|
802 |
-
msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
|
803 |
-
msgstr "Lad os vide, om vi har lov til at kontakte dig med sikkerheds- og feature-opdateringer, informativt indhold og lejlighedsvise tilbud:"
|
804 |
-
|
805 |
-
#: includes/class-freemius.php:23164
|
806 |
-
msgid "License key is empty."
|
807 |
-
msgstr "Licensnøglen er tom."
|
808 |
-
|
809 |
-
#: includes/class-fs-plugin-updater.php184,
|
810 |
-
#: templates/forms/premium-versions-upgrade-handler.php:57
|
811 |
-
msgid "Renew license"
|
812 |
-
msgstr "Forny licens"
|
813 |
-
|
814 |
-
#: includes/class-fs-plugin-updater.php189,
|
815 |
-
#: templates/forms/premium-versions-upgrade-handler.php:58
|
816 |
-
msgid "Buy license"
|
817 |
-
msgstr "Buy license"
|
818 |
-
|
819 |
-
#: includes/class-fs-plugin-updater.php280,
|
820 |
-
#: includes/class-fs-plugin-updater.php:313
|
821 |
-
msgid "There is a %s of %s available."
|
822 |
-
msgstr "There is a %s of %s available."
|
823 |
-
|
824 |
-
#: includes/class-fs-plugin-updater.php282,
|
825 |
-
#: includes/class-fs-plugin-updater.php:318
|
826 |
-
msgid "new Beta version"
|
827 |
-
msgstr "new Beta version"
|
828 |
-
|
829 |
-
#: includes/class-fs-plugin-updater.php283,
|
830 |
-
#: includes/class-fs-plugin-updater.php:319
|
831 |
-
msgid "new version"
|
832 |
-
msgstr "new version"
|
833 |
-
|
834 |
-
#: includes/class-fs-plugin-updater.php:342
|
835 |
-
msgid "Important Upgrade Notice:"
|
836 |
-
msgstr "Important Upgrade Notice:"
|
837 |
-
|
838 |
-
#: includes/class-fs-plugin-updater.php:1214
|
839 |
-
msgid "Installing plugin: %s"
|
840 |
-
msgstr "Installerer plugin: %s"
|
841 |
-
|
842 |
-
#: includes/class-fs-plugin-updater.php:1255
|
843 |
-
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
844 |
-
msgstr "Unable to connect to the filesystem. Please confirm your credentials."
|
845 |
-
|
846 |
-
#: includes/class-fs-plugin-updater.php:1437
|
847 |
-
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
848 |
-
msgstr "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
849 |
-
|
850 |
-
#: includes/fs-plugin-info-dialog.php:509
|
851 |
-
msgid "Purchase More"
|
852 |
-
msgstr "Purchase More"
|
853 |
-
|
854 |
-
#: includes/fs-plugin-info-dialog.php510,
|
855 |
-
#: templates/account/partials/addon.php:347
|
856 |
-
msgctxt "verb"
|
857 |
-
msgid "Purchase"
|
858 |
-
msgstr "Køb"
|
859 |
-
|
860 |
-
#: includes/fs-plugin-info-dialog.php:514
|
861 |
-
msgid "Start my free %s"
|
862 |
-
msgstr "Start min gratis %s"
|
863 |
-
|
864 |
-
#: includes/fs-plugin-info-dialog.php:712
|
865 |
-
msgid "Install Free Version Update Now"
|
866 |
-
msgstr "Installer opdatering til gratis version nu"
|
867 |
-
|
868 |
-
#: includes/fs-plugin-info-dialog.php713, templates/account.php:534
|
869 |
-
msgid "Install Update Now"
|
870 |
-
msgstr "Installer opdatering nu"
|
871 |
-
|
872 |
-
#: includes/fs-plugin-info-dialog.php:722
|
873 |
-
msgid "Install Free Version Now"
|
874 |
-
msgstr "Installer gratis version nu"
|
875 |
-
|
876 |
-
#: includes/fs-plugin-info-dialog.php723, templates/add-ons.php262,
|
877 |
-
#: templates/auto-installation.php111,
|
878 |
-
#: templates/account/partials/addon.php327,
|
879 |
-
#: templates/account/partials/addon.php:379
|
880 |
-
msgid "Install Now"
|
881 |
-
msgstr "Installer nu"
|
882 |
-
|
883 |
-
#: includes/fs-plugin-info-dialog.php:739
|
884 |
-
msgctxt "as download latest version"
|
885 |
-
msgid "Download Latest Free Version"
|
886 |
-
msgstr "Download seneste gratis version"
|
887 |
-
|
888 |
-
#: includes/fs-plugin-info-dialog.php740, templates/account.php85,
|
889 |
-
#: templates/add-ons.php34, templates/account/partials/addon.php:25
|
890 |
-
msgctxt "as download latest version"
|
891 |
-
msgid "Download Latest"
|
892 |
-
msgstr "Download seneste"
|
893 |
-
|
894 |
-
#: includes/fs-plugin-info-dialog.php755, templates/add-ons.php268,
|
895 |
-
#: templates/account/partials/addon.php318,
|
896 |
-
#: templates/account/partials/addon.php:373
|
897 |
-
msgid "Activate this add-on"
|
898 |
-
msgstr "Aktiver denne tilføjelse"
|
899 |
-
|
900 |
-
#: includes/fs-plugin-info-dialog.php757, templates/connect.php:418
|
901 |
-
msgid "Activate Free Version"
|
902 |
-
msgstr "Aktiver gratis version"
|
903 |
-
|
904 |
-
#: includes/fs-plugin-info-dialog.php758, templates/account.php109,
|
905 |
-
#: templates/add-ons.php269, templates/account/partials/addon.php:49
|
906 |
-
msgid "Activate"
|
907 |
-
msgstr "Aktiver"
|
908 |
-
|
909 |
-
#: includes/fs-plugin-info-dialog.php:968
|
910 |
-
msgctxt "Plugin installer section title"
|
911 |
-
msgid "Description"
|
912 |
-
msgstr "Beskrivelse"
|
913 |
-
|
914 |
-
#: includes/fs-plugin-info-dialog.php:969
|
915 |
-
msgctxt "Plugin installer section title"
|
916 |
-
msgid "Installation"
|
917 |
-
msgstr "Installering"
|
918 |
-
|
919 |
-
#: includes/fs-plugin-info-dialog.php:970
|
920 |
-
msgctxt "Plugin installer section title"
|
921 |
-
msgid "FAQ"
|
922 |
-
msgstr "FAQ"
|
923 |
-
|
924 |
-
#: includes/fs-plugin-info-dialog.php971,
|
925 |
-
#: templates/plugin-info/description.php:55
|
926 |
-
msgid "Screenshots"
|
927 |
-
msgstr "Skærmbilleder"
|
928 |
-
|
929 |
-
#: includes/fs-plugin-info-dialog.php:972
|
930 |
-
msgctxt "Plugin installer section title"
|
931 |
-
msgid "Changelog"
|
932 |
-
msgstr "Ændringslog"
|
933 |
-
|
934 |
-
#: includes/fs-plugin-info-dialog.php:973
|
935 |
-
msgctxt "Plugin installer section title"
|
936 |
-
msgid "Reviews"
|
937 |
-
msgstr "Anmeldelser"
|
938 |
-
|
939 |
-
#: includes/fs-plugin-info-dialog.php:974
|
940 |
-
msgctxt "Plugin installer section title"
|
941 |
-
msgid "Other Notes"
|
942 |
-
msgstr "Andre noter"
|
943 |
-
|
944 |
-
#: includes/fs-plugin-info-dialog.php:989
|
945 |
-
msgctxt "Plugin installer section title"
|
946 |
-
msgid "Features & Pricing"
|
947 |
-
msgstr "Funktioner og priser"
|
948 |
-
|
949 |
-
#: includes/fs-plugin-info-dialog.php:999
|
950 |
-
msgid "Plugin Install"
|
951 |
-
msgstr "Plugin-installering"
|
952 |
-
|
953 |
-
#: includes/fs-plugin-info-dialog.php:1071
|
954 |
-
msgctxt "e.g. Professional Plan"
|
955 |
-
msgid "%s Plan"
|
956 |
-
msgstr "%s Plan"
|
957 |
-
|
958 |
-
#: includes/fs-plugin-info-dialog.php:1097
|
959 |
-
msgctxt "e.g. the best product"
|
960 |
-
msgid "Best"
|
961 |
-
msgstr "Bedste"
|
962 |
-
|
963 |
-
#: includes/fs-plugin-info-dialog.php1103,
|
964 |
-
#: includes/fs-plugin-info-dialog.php:1123
|
965 |
-
msgctxt "as every month"
|
966 |
-
msgid "Monthly"
|
967 |
-
msgstr "Månedligt"
|
968 |
-
|
969 |
-
#: includes/fs-plugin-info-dialog.php:1106
|
970 |
-
msgctxt "as once a year"
|
971 |
-
msgid "Annual"
|
972 |
-
msgstr "Årligt"
|
973 |
-
|
974 |
-
#: includes/fs-plugin-info-dialog.php:1109
|
975 |
-
msgid "Lifetime"
|
976 |
-
msgstr "Livstid"
|
977 |
-
|
978 |
-
#: includes/fs-plugin-info-dialog.php1123,
|
979 |
-
#: includes/fs-plugin-info-dialog.php1125,
|
980 |
-
#: includes/fs-plugin-info-dialog.php:1127
|
981 |
-
msgctxt "e.g. billed monthly"
|
982 |
-
msgid "Billed %s"
|
983 |
-
msgstr "Faktureret %s"
|
984 |
-
|
985 |
-
#: includes/fs-plugin-info-dialog.php:1125
|
986 |
-
msgctxt "as once a year"
|
987 |
-
msgid "Annually"
|
988 |
-
msgstr "Årligt"
|
989 |
-
|
990 |
-
#: includes/fs-plugin-info-dialog.php:1127
|
991 |
-
msgctxt "as once a year"
|
992 |
-
msgid "Once"
|
993 |
-
msgstr "Engangsbeløb"
|
994 |
-
|
995 |
-
#: includes/fs-plugin-info-dialog.php:1133
|
996 |
-
msgid "Single Site License"
|
997 |
-
msgstr "Single Site License"
|
998 |
-
|
999 |
-
#: includes/fs-plugin-info-dialog.php:1135
|
1000 |
-
msgid "Unlimited Licenses"
|
1001 |
-
msgstr "Ubegrænsede licenser"
|
1002 |
-
|
1003 |
-
#: includes/fs-plugin-info-dialog.php:1137
|
1004 |
-
msgid "Up to %s Sites"
|
1005 |
-
msgstr "Op til %s websteder"
|
1006 |
-
|
1007 |
-
#: includes/fs-plugin-info-dialog.php1147,
|
1008 |
-
#: templates/plugin-info/features.php:82
|
1009 |
-
msgctxt "as monthly period"
|
1010 |
-
msgid "mo"
|
1011 |
-
msgstr "md"
|
1012 |
-
|
1013 |
-
#: includes/fs-plugin-info-dialog.php1154,
|
1014 |
-
#: templates/plugin-info/features.php:80
|
1015 |
-
msgctxt "as annual period"
|
1016 |
-
msgid "year"
|
1017 |
-
msgstr "år"
|
1018 |
-
|
1019 |
-
#: includes/fs-plugin-info-dialog.php:1208
|
1020 |
-
msgctxt "noun"
|
1021 |
-
msgid "Price"
|
1022 |
-
msgstr "Pris"
|
1023 |
-
|
1024 |
-
#: includes/fs-plugin-info-dialog.php:1256
|
1025 |
-
msgid "Save %s"
|
1026 |
-
msgstr "Spar %s"
|
1027 |
-
|
1028 |
-
#: includes/fs-plugin-info-dialog.php:1266
|
1029 |
-
msgid "No commitment for %s - cancel anytime"
|
1030 |
-
msgstr "Ingen bindinger ved %s - annuller når som helst"
|
1031 |
-
|
1032 |
-
#: includes/fs-plugin-info-dialog.php:1269
|
1033 |
-
msgid "After your free %s, pay as little as %s"
|
1034 |
-
msgstr "Efter din gratis %s er prisen kun %s"
|
1035 |
-
|
1036 |
-
#: includes/fs-plugin-info-dialog.php:1280
|
1037 |
-
msgid "Details"
|
1038 |
-
msgstr "Detaljer"
|
1039 |
-
|
1040 |
-
#: includes/fs-plugin-info-dialog.php1284, templates/account.php96,
|
1041 |
-
#: templates/debug.php203, templates/debug.php240, templates/debug.php454,
|
1042 |
-
#: templates/account/partials/addon.php:36
|
1043 |
-
msgctxt "product version"
|
1044 |
-
msgid "Version"
|
1045 |
-
msgstr "Version"
|
1046 |
-
|
1047 |
-
#: includes/fs-plugin-info-dialog.php:1291
|
1048 |
-
msgctxt "as the plugin author"
|
1049 |
-
msgid "Author"
|
1050 |
-
msgstr "Forfatter"
|
1051 |
-
|
1052 |
-
#: includes/fs-plugin-info-dialog.php:1298
|
1053 |
-
msgid "Last Updated"
|
1054 |
-
msgstr "Senest opdateret"
|
1055 |
-
|
1056 |
-
#: includes/fs-plugin-info-dialog.php1303, templates/account.php:444
|
1057 |
-
msgctxt "x-ago"
|
1058 |
-
msgid "%s ago"
|
1059 |
-
msgstr "%s siden"
|
1060 |
-
|
1061 |
-
#: includes/fs-plugin-info-dialog.php:1312
|
1062 |
-
msgid "Requires WordPress Version"
|
1063 |
-
msgstr "Kræver WordPress-version"
|
1064 |
-
|
1065 |
-
#: includes/fs-plugin-info-dialog.php:1313
|
1066 |
-
msgid "%s or higher"
|
1067 |
-
msgstr "%s eller højere"
|
1068 |
-
|
1069 |
-
#: includes/fs-plugin-info-dialog.php:1320
|
1070 |
-
msgid "Compatible up to"
|
1071 |
-
msgstr "Kompatibel op til"
|
1072 |
-
|
1073 |
-
#: includes/fs-plugin-info-dialog.php:1328
|
1074 |
-
msgid "Downloaded"
|
1075 |
-
msgstr "Downloadet"
|
1076 |
-
|
1077 |
-
#: includes/fs-plugin-info-dialog.php:1332
|
1078 |
-
msgid "%s time"
|
1079 |
-
msgstr "%s gang"
|
1080 |
-
|
1081 |
-
#: includes/fs-plugin-info-dialog.php:1334
|
1082 |
-
msgid "%s times"
|
1083 |
-
msgstr "%s gange"
|
1084 |
-
|
1085 |
-
#: includes/fs-plugin-info-dialog.php:1344
|
1086 |
-
msgid "WordPress.org Plugin Page"
|
1087 |
-
msgstr "WordPress.org Plugin-side"
|
1088 |
-
|
1089 |
-
#: includes/fs-plugin-info-dialog.php:1352
|
1090 |
-
msgid "Plugin Homepage"
|
1091 |
-
msgstr "Plugin-websted"
|
1092 |
-
|
1093 |
-
#: includes/fs-plugin-info-dialog.php1360,
|
1094 |
-
#: includes/fs-plugin-info-dialog.php:1442
|
1095 |
-
msgid "Donate to this plugin"
|
1096 |
-
msgstr "Donér til dette plugin"
|
1097 |
-
|
1098 |
-
#: includes/fs-plugin-info-dialog.php:1367
|
1099 |
-
msgid "Average Rating"
|
1100 |
-
msgstr "Gennemsnitlig vurdering"
|
1101 |
-
|
1102 |
-
#: includes/fs-plugin-info-dialog.php:1374
|
1103 |
-
msgid "based on %s"
|
1104 |
-
msgstr "baseret på %s"
|
1105 |
-
|
1106 |
-
#: includes/fs-plugin-info-dialog.php:1378
|
1107 |
-
msgid "%s rating"
|
1108 |
-
msgstr "%s vurdering"
|
1109 |
-
|
1110 |
-
#: includes/fs-plugin-info-dialog.php:1380
|
1111 |
-
msgid "%s ratings"
|
1112 |
-
msgstr "%s vurderinger"
|
1113 |
-
|
1114 |
-
#: includes/fs-plugin-info-dialog.php:1395
|
1115 |
-
msgid "%s star"
|
1116 |
-
msgstr "%s stjerne"
|
1117 |
-
|
1118 |
-
#: includes/fs-plugin-info-dialog.php:1397
|
1119 |
-
msgid "%s stars"
|
1120 |
-
msgstr "%s stjerner"
|
1121 |
-
|
1122 |
-
#: includes/fs-plugin-info-dialog.php:1408
|
1123 |
-
msgid "Click to see reviews that provided a rating of %s"
|
1124 |
-
msgstr "Click to see reviews that provided a rating of %s"
|
1125 |
-
|
1126 |
-
#: includes/fs-plugin-info-dialog.php:1421
|
1127 |
-
msgid "Contributors"
|
1128 |
-
msgstr "Bidragsydere"
|
1129 |
-
|
1130 |
-
#: includes/fs-plugin-info-dialog.php1450,
|
1131 |
-
#: includes/fs-plugin-info-dialog.php:1452
|
1132 |
-
msgid "Warning"
|
1133 |
-
msgstr "Advarsel"
|
1134 |
-
|
1135 |
-
#: includes/fs-plugin-info-dialog.php:1450
|
1136 |
-
msgid "This plugin has not been tested with your current version of WordPress."
|
1137 |
-
msgstr "Dette plugin er ikke blevet testet med din nuværende version af WordPress."
|
1138 |
-
|
1139 |
-
#: includes/fs-plugin-info-dialog.php:1452
|
1140 |
-
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1141 |
-
msgstr "This plugin has not been marked as compatible with your version of WordPress."
|
1142 |
-
|
1143 |
-
#: includes/fs-plugin-info-dialog.php:1471
|
1144 |
-
msgid "Paid add-on must be deployed to Freemius."
|
1145 |
-
msgstr "Paid add-on must be deployed to Freemius."
|
1146 |
-
|
1147 |
-
#: includes/fs-plugin-info-dialog.php:1472
|
1148 |
-
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1149 |
-
msgstr "Add-on must be deployed to WordPress.org or Freemius."
|
1150 |
-
|
1151 |
-
#: includes/fs-plugin-info-dialog.php:1493
|
1152 |
-
msgid "Newer Version (%s) Installed"
|
1153 |
-
msgstr "Nyere version (%s) installeret"
|
1154 |
-
|
1155 |
-
#: includes/fs-plugin-info-dialog.php:1494
|
1156 |
-
msgid "Newer Free Version (%s) Installed"
|
1157 |
-
msgstr "Nyere gratis version (%s) installeret"
|
1158 |
-
|
1159 |
-
#: includes/fs-plugin-info-dialog.php:1501
|
1160 |
-
msgid "Latest Version Installed"
|
1161 |
-
msgstr "Seneste version installeret"
|
1162 |
-
|
1163 |
-
#: includes/fs-plugin-info-dialog.php:1502
|
1164 |
-
msgid "Latest Free Version Installed"
|
1165 |
-
msgstr "Seneste gratis version installeret"
|
1166 |
-
|
1167 |
-
#: templates/account.php86, templates/forms/subscription-cancellation.php96,
|
1168 |
-
#: templates/account/partials/addon.php26,
|
1169 |
-
#: templates/account/partials/site.php:295
|
1170 |
-
msgid "Downgrading your plan"
|
1171 |
-
msgstr "Downgrading your plan"
|
1172 |
-
|
1173 |
-
#: templates/account.php87, templates/forms/subscription-cancellation.php97,
|
1174 |
-
#: templates/account/partials/addon.php27,
|
1175 |
-
#: templates/account/partials/site.php:296
|
1176 |
-
msgid "Cancelling the subscription"
|
1177 |
-
msgstr "Cancelling the subscription"
|
1178 |
-
|
1179 |
-
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the
|
1180 |
-
#. subscription'
|
1181 |
-
#: templates/account.php:89
|
1182 |
-
msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
|
1183 |
-
msgstr "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
|
1184 |
-
|
1185 |
-
#: templates/account.php90, templates/forms/subscription-cancellation.php100,
|
1186 |
-
#: templates/account/partials/addon.php30,
|
1187 |
-
#: templates/account/partials/site.php:299
|
1188 |
-
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."
|
1189 |
-
msgstr "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."
|
1190 |
-
|
1191 |
-
#: templates/account.php91, templates/forms/subscription-cancellation.php106,
|
1192 |
-
#: templates/account/partials/addon.php:31
|
1193 |
-
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
1194 |
-
msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
1195 |
-
|
1196 |
-
#: templates/account.php92, templates/forms/subscription-cancellation.php101,
|
1197 |
-
#: templates/account/partials/addon.php32,
|
1198 |
-
#: templates/account/partials/site.php:300
|
1199 |
-
msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
|
1200 |
-
msgstr "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
|
1201 |
-
|
1202 |
-
#: templates/account.php93, templates/forms/subscription-cancellation.php102,
|
1203 |
-
#: templates/account/partials/addon.php33,
|
1204 |
-
#: templates/account/partials/site.php:301
|
1205 |
-
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
1206 |
-
msgstr "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
1207 |
-
|
1208 |
-
#. translators: %s: Plan title (e.g. "Professional")
|
1209 |
-
#: templates/account.php95,
|
1210 |
-
#: templates/account/partials/activate-license-button.php31,
|
1211 |
-
#: templates/account/partials/addon.php:35
|
1212 |
-
msgid "Activate %s Plan"
|
1213 |
-
msgstr "Aktiver %s plan"
|
1214 |
-
|
1215 |
-
#. translators: %s: Time period (e.g. Auto renews in "2 months")
|
1216 |
-
#: templates/account.php98, templates/account/partials/addon.php38,
|
1217 |
-
#: templates/account/partials/site.php:275
|
1218 |
-
msgid "Auto renews in %s"
|
1219 |
-
msgstr "Auto-fornyer om %s"
|
1220 |
-
|
1221 |
-
#. translators: %s: Time period (e.g. Expires in "2 months")
|
1222 |
-
#: templates/account.php100, templates/account/partials/addon.php40,
|
1223 |
-
#: templates/account/partials/site.php:277
|
1224 |
-
msgid "Expires in %s"
|
1225 |
-
msgstr "Udløber om %s"
|
1226 |
-
|
1227 |
-
#: templates/account.php101, templates/account/partials/addon.php:41
|
1228 |
-
msgctxt "as synchronize license"
|
1229 |
-
msgid "Sync License"
|
1230 |
-
msgstr "Synkroniser licens"
|
1231 |
-
|
1232 |
-
#: templates/account.php102, templates/account/partials/addon.php:42
|
1233 |
-
msgid "Cancel Trial"
|
1234 |
-
msgstr "Annuller prøveperiode"
|
1235 |
-
|
1236 |
-
#: templates/account.php103, templates/account/partials/addon.php:43
|
1237 |
-
msgid "Change Plan"
|
1238 |
-
msgstr "Skift plan"
|
1239 |
-
|
1240 |
-
#: templates/account.php104, templates/account/partials/addon.php:44
|
1241 |
-
msgctxt "verb"
|
1242 |
-
msgid "Upgrade"
|
1243 |
-
msgstr "Opgrader"
|
1244 |
-
|
1245 |
-
#: templates/account.php106, templates/account/partials/addon.php46,
|
1246 |
-
#: templates/account/partials/site.php:302
|
1247 |
-
msgctxt "verb"
|
1248 |
-
msgid "Downgrade"
|
1249 |
-
msgstr "Nedgrader"
|
1250 |
-
|
1251 |
-
#: templates/account.php108, templates/add-ons.php187,
|
1252 |
-
#: templates/plugin-info/features.php72,
|
1253 |
-
#: templates/account/partials/addon.php48,
|
1254 |
-
#: templates/account/partials/site.php:31
|
1255 |
-
msgid "Free"
|
1256 |
-
msgstr "Gratis"
|
1257 |
-
|
1258 |
-
#: templates/account.php110, templates/debug.php373,
|
1259 |
-
#: includes/customizer/class-fs-customizer-upsell-control.php106,
|
1260 |
-
#: templates/account/partials/addon.php:50
|
1261 |
-
msgctxt "as product pricing plan"
|
1262 |
-
msgid "Plan"
|
1263 |
-
msgstr "Plan"
|
1264 |
-
|
1265 |
-
#: templates/account.php:111
|
1266 |
-
msgid "Bundle Plan"
|
1267 |
-
msgstr "Bundle Plan"
|
1268 |
-
|
1269 |
-
#: templates/account.php:185
|
1270 |
-
msgid "Free Trial"
|
1271 |
-
msgstr "Gratis prøveperiode"
|
1272 |
-
|
1273 |
-
#: templates/account.php:196
|
1274 |
-
msgid "Account Details"
|
1275 |
-
msgstr "Kontodetaljer"
|
1276 |
-
|
1277 |
-
#: templates/account.php:200
|
1278 |
-
msgid "Billing & Invoices"
|
1279 |
-
msgstr "Billing & Invoices"
|
1280 |
-
|
1281 |
-
#: templates/account.php:210
|
1282 |
-
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?"
|
1283 |
-
msgstr "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?"
|
1284 |
-
|
1285 |
-
#: templates/account.php:212
|
1286 |
-
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?"
|
1287 |
-
msgstr "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?"
|
1288 |
-
|
1289 |
-
#: templates/account.php:215
|
1290 |
-
msgid "Delete Account"
|
1291 |
-
msgstr "Slet konto"
|
1292 |
-
|
1293 |
-
#: templates/account.php227, templates/account/partials/addon.php211,
|
1294 |
-
#: templates/account/partials/deactivate-license-button.php:35
|
1295 |
-
msgid "Deactivate License"
|
1296 |
-
msgstr "Deaktiver licens"
|
1297 |
-
|
1298 |
-
#: templates/account.php250, templates/forms/subscription-cancellation.php:125
|
1299 |
-
msgid "Are you sure you want to proceed?"
|
1300 |
-
msgstr "Er du sikker på, du vil fortsætte?"
|
1301 |
-
|
1302 |
-
#: templates/account.php250, templates/account/partials/addon.php:234
|
1303 |
-
msgid "Cancel Subscription"
|
1304 |
-
msgstr "Annuller abonnement"
|
1305 |
-
|
1306 |
-
#: templates/account.php:278
|
1307 |
-
msgctxt "as synchronize"
|
1308 |
-
msgid "Sync"
|
1309 |
-
msgstr "Synkroniser"
|
1310 |
-
|
1311 |
-
#: templates/account.php292, templates/debug.php:489
|
1312 |
-
msgid "Name"
|
1313 |
-
msgstr "Navn"
|
1314 |
-
|
1315 |
-
#: templates/account.php298, templates/debug.php:490
|
1316 |
-
msgid "Email"
|
1317 |
-
msgstr "E-mail"
|
1318 |
-
|
1319 |
-
#: templates/account.php305, templates/debug.php372, templates/debug.php:528
|
1320 |
-
msgid "User ID"
|
1321 |
-
msgstr "Bruger-ID"
|
1322 |
-
|
1323 |
-
#: templates/account.php322, templates/account.php608,
|
1324 |
-
#: templates/account.php653, templates/debug.php238, templates/debug.php366,
|
1325 |
-
#: templates/debug.php451, templates/debug.php488, templates/debug.php526,
|
1326 |
-
#: templates/debug.php599, templates/account/payments.php35,
|
1327 |
-
#: templates/debug/logger.php:21
|
1328 |
-
msgid "ID"
|
1329 |
-
msgstr "ID"
|
1330 |
-
|
1331 |
-
#: templates/account.php:329
|
1332 |
-
msgid "Site ID"
|
1333 |
-
msgstr "Websteds-ID"
|
1334 |
-
|
1335 |
-
#: templates/account.php:332
|
1336 |
-
msgid "No ID"
|
1337 |
-
msgstr "Intet ID"
|
1338 |
-
|
1339 |
-
#: templates/account.php337, templates/debug.php245, templates/debug.php374,
|
1340 |
-
#: templates/debug.php455, templates/debug.php492,
|
1341 |
-
#: templates/account/partials/site.php:219
|
1342 |
-
msgid "Public Key"
|
1343 |
-
msgstr "Offentlig nøgle"
|
1344 |
-
|
1345 |
-
#: templates/account.php343, templates/debug.php375, templates/debug.php456,
|
1346 |
-
#: templates/debug.php493, templates/account/partials/site.php:231
|
1347 |
-
msgid "Secret Key"
|
1348 |
-
msgstr "Privat nøgle"
|
1349 |
-
|
1350 |
-
#: templates/account.php:346
|
1351 |
-
msgctxt "as secret encryption key missing"
|
1352 |
-
msgid "No Secret"
|
1353 |
-
msgstr "Ingen privat nøgle"
|
1354 |
-
|
1355 |
-
#: templates/account.php373, templates/account/partials/site.php112,
|
1356 |
-
#: templates/account/partials/site.php:114
|
1357 |
-
msgid "Trial"
|
1358 |
-
msgstr "Prøveperiode"
|
1359 |
-
|
1360 |
-
#: templates/account.php400, templates/debug.php533,
|
1361 |
-
#: templates/account/partials/site.php:248
|
1362 |
-
msgid "License Key"
|
1363 |
-
msgstr "Licensnøgle"
|
1364 |
-
|
1365 |
-
#: templates/account.php:429
|
1366 |
-
msgid "Join the Beta program"
|
1367 |
-
msgstr "Join the Beta program"
|
1368 |
-
|
1369 |
-
#: templates/account.php:435
|
1370 |
-
msgid "not verified"
|
1371 |
-
msgstr "ikke verificeret"
|
1372 |
-
|
1373 |
-
#: templates/account.php444, templates/account/partials/addon.php:172
|
1374 |
-
msgid "Expired"
|
1375 |
-
msgstr "Udløbet"
|
1376 |
-
|
1377 |
-
#: templates/account.php:502
|
1378 |
-
msgid "Premium version"
|
1379 |
-
msgstr "Premium version"
|
1380 |
-
|
1381 |
-
#: templates/account.php:504
|
1382 |
-
msgid "Free version"
|
1383 |
-
msgstr "Gratis version"
|
1384 |
-
|
1385 |
-
#: templates/account.php:516
|
1386 |
-
msgid "Verify Email"
|
1387 |
-
msgstr "Verificer e-mail"
|
1388 |
-
|
1389 |
-
#: templates/account.php:527
|
1390 |
-
msgid "Download %s Version"
|
1391 |
-
msgstr "Download 1%s version"
|
1392 |
-
|
1393 |
-
#: templates/account.php541, templates/account.php749,
|
1394 |
-
#: templates/account/partials/site.php237,
|
1395 |
-
#: templates/account/partials/site.php:255
|
1396 |
-
msgctxt "verb"
|
1397 |
-
msgid "Show"
|
1398 |
-
msgstr "Vis"
|
1399 |
-
|
1400 |
-
#: templates/account.php:555
|
1401 |
-
msgid "What is your %s?"
|
1402 |
-
msgstr "Angiv venligst %s?"
|
1403 |
-
|
1404 |
-
#: templates/account.php563, templates/account/billing.php:21
|
1405 |
-
msgctxt "verb"
|
1406 |
-
msgid "Edit"
|
1407 |
-
msgstr "Rediger"
|
1408 |
-
|
1409 |
-
#: templates/account.php:588
|
1410 |
-
msgid "Sites"
|
1411 |
-
msgstr "Websteder"
|
1412 |
-
|
1413 |
-
#: templates/account.php:599
|
1414 |
-
msgid "Search by address"
|
1415 |
-
msgstr "Søg efter adresse"
|
1416 |
-
|
1417 |
-
#: templates/account.php609, templates/debug.php:369
|
1418 |
-
msgid "Address"
|
1419 |
-
msgstr "Adresse"
|
1420 |
-
|
1421 |
-
#: templates/account.php:610
|
1422 |
-
msgid "License"
|
1423 |
-
msgstr "Licens"
|
1424 |
-
|
1425 |
-
#: templates/account.php:611
|
1426 |
-
msgid "Plan"
|
1427 |
-
msgstr "Plan"
|
1428 |
-
|
1429 |
-
#: templates/account.php:656
|
1430 |
-
msgctxt "as software license"
|
1431 |
-
msgid "License"
|
1432 |
-
msgstr "Licens"
|
1433 |
-
|
1434 |
-
#: templates/account.php:743
|
1435 |
-
msgctxt "verb"
|
1436 |
-
msgid "Hide"
|
1437 |
-
msgstr "Skjul"
|
1438 |
-
|
1439 |
-
#: templates/account.php:765
|
1440 |
-
msgid "Processing"
|
1441 |
-
msgstr "Arbejder"
|
1442 |
-
|
1443 |
-
#: templates/account.php:768
|
1444 |
-
msgid "Get updates for bleeding edge Beta versions of %s."
|
1445 |
-
msgstr "Get updates for bleeding edge Beta versions of %s."
|
1446 |
-
|
1447 |
-
#: templates/account.php:826
|
1448 |
-
msgid "Cancelling %s"
|
1449 |
-
msgstr "Cancelling %s"
|
1450 |
-
|
1451 |
-
#: templates/account.php826, templates/account.php843,
|
1452 |
-
#: templates/forms/subscription-cancellation.php27,
|
1453 |
-
#: templates/forms/deactivation/form.php:133
|
1454 |
-
msgid "trial"
|
1455 |
-
msgstr "trial"
|
1456 |
-
|
1457 |
-
#: templates/account.php841, templates/forms/deactivation/form.php:150
|
1458 |
-
msgid "Cancelling %s..."
|
1459 |
-
msgstr "Cancelling %s..."
|
1460 |
-
|
1461 |
-
#: templates/account.php844, templates/forms/subscription-cancellation.php28,
|
1462 |
-
#: templates/forms/deactivation/form.php:134
|
1463 |
-
msgid "subscription"
|
1464 |
-
msgstr "subscription"
|
1465 |
-
|
1466 |
-
#: templates/account.php:858
|
1467 |
-
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?"
|
1468 |
-
msgstr "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
|
1469 |
-
|
1470 |
-
#: templates/add-ons.php:35
|
1471 |
-
msgid "View details"
|
1472 |
-
msgstr "Vis detaljer"
|
1473 |
-
|
1474 |
-
#: templates/add-ons.php:45
|
1475 |
-
msgid "Add Ons for %s"
|
1476 |
-
msgstr "Tilføjelser til %s"
|
1477 |
-
|
1478 |
-
#: templates/add-ons.php:55
|
1479 |
-
msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
|
1480 |
-
msgstr "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
|
1481 |
-
|
1482 |
-
#: templates/add-ons.php:173
|
1483 |
-
msgctxt "active add-on"
|
1484 |
-
msgid "Active"
|
1485 |
-
msgstr "Aktiv"
|
1486 |
-
|
1487 |
-
#: templates/add-ons.php:174
|
1488 |
-
msgctxt "installed add-on"
|
1489 |
-
msgid "Installed"
|
1490 |
-
msgstr "Installed"
|
1491 |
-
|
1492 |
-
#: templates/admin-notice.php13, templates/forms/license-activation.php209,
|
1493 |
-
#: templates/forms/resend-key.php:77
|
1494 |
-
msgctxt "as close a window"
|
1495 |
-
msgid "Dismiss"
|
1496 |
-
msgstr "Fjern"
|
1497 |
-
|
1498 |
-
#: templates/auto-installation.php:45
|
1499 |
-
msgid "%s sec"
|
1500 |
-
msgstr "1%s sek"
|
1501 |
-
|
1502 |
-
#: templates/auto-installation.php:83
|
1503 |
-
msgid "Automatic Installation"
|
1504 |
-
msgstr "Automatisk installering"
|
1505 |
-
|
1506 |
-
#: templates/auto-installation.php:93
|
1507 |
-
msgid "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."
|
1508 |
-
msgstr "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."
|
1509 |
-
|
1510 |
-
#: templates/auto-installation.php:104
|
1511 |
-
msgid "The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page."
|
1512 |
-
msgstr "The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page."
|
1513 |
-
|
1514 |
-
#: templates/auto-installation.php:109
|
1515 |
-
msgid "Cancel Installation"
|
1516 |
-
msgstr "Annuller installering"
|
1517 |
-
|
1518 |
-
#: templates/checkout.php:180
|
1519 |
-
msgid "Checkout"
|
1520 |
-
msgstr "Udtjekning"
|
1521 |
-
|
1522 |
-
#: templates/checkout.php:180
|
1523 |
-
msgid "PCI compliant"
|
1524 |
-
msgstr "PCI compliant"
|
1525 |
-
|
1526 |
-
#. translators: %s: name (e.g. Hey John,)
|
1527 |
-
#: templates/connect.php:112
|
1528 |
-
msgctxt "greeting"
|
1529 |
-
msgid "Hey %s,"
|
1530 |
-
msgstr "Hey %s,"
|
1531 |
-
|
1532 |
-
#: templates/connect.php:154
|
1533 |
-
msgid "Allow & Continue"
|
1534 |
-
msgstr "Tillad & Fortsæt"
|
1535 |
-
|
1536 |
-
#: templates/connect.php:158
|
1537 |
-
msgid "Re-send activation email"
|
1538 |
-
msgstr "Gensend e-mail om aktivering"
|
1539 |
-
|
1540 |
-
#: templates/connect.php:162
|
1541 |
-
msgid "Thanks %s!"
|
1542 |
-
msgstr "Tak %s!"
|
1543 |
-
|
1544 |
-
#: templates/connect.php172, templates/forms/license-activation.php:44
|
1545 |
-
msgid "Agree & Activate License"
|
1546 |
-
msgstr "Accepter & aktiver licens"
|
1547 |
-
|
1548 |
-
#: templates/connect.php:181
|
1549 |
-
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
1550 |
-
msgstr "Tak for at købe %s! For at komme i gang, venligst indtast din licensnøgle:"
|
1551 |
-
|
1552 |
-
#: templates/connect.php:188
|
1553 |
-
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."
|
1554 |
-
msgstr "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
|
1555 |
-
|
1556 |
-
#: templates/connect.php:189
|
1557 |
-
msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1558 |
-
msgstr "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1559 |
-
|
1560 |
-
#: templates/connect.php:195
|
1561 |
-
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."
|
1562 |
-
msgstr "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."
|
1563 |
-
|
1564 |
-
#: templates/connect.php:196
|
1565 |
-
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."
|
1566 |
-
msgstr "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."
|
1567 |
-
|
1568 |
-
#: templates/connect.php:230
|
1569 |
-
msgid "We're excited to introduce the Freemius network-level integration."
|
1570 |
-
msgstr "We're excited to introduce the Freemius network-level integration."
|
1571 |
-
|
1572 |
-
#: templates/connect.php:233
|
1573 |
-
msgid "During the update process we detected %d site(s) that are still pending license activation."
|
1574 |
-
msgstr "During the update process we detected %d site(s) that are still pending license activation."
|
1575 |
-
|
1576 |
-
#: templates/connect.php:235
|
1577 |
-
msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
|
1578 |
-
msgstr "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
|
1579 |
-
|
1580 |
-
#: templates/connect.php:237
|
1581 |
-
msgid "%s's paid features"
|
1582 |
-
msgstr "%s's paid features"
|
1583 |
-
|
1584 |
-
#: templates/connect.php:242
|
1585 |
-
msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
|
1586 |
-
msgstr "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
|
1587 |
-
|
1588 |
-
#: templates/connect.php:244
|
1589 |
-
msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
|
1590 |
-
msgstr "During the update process we detected %s site(s) in the network that are still pending your attention."
|
1591 |
-
|
1592 |
-
#: templates/connect.php253, templates/forms/license-activation.php:47
|
1593 |
-
msgid "License key"
|
1594 |
-
msgstr "Licensnøgle"
|
1595 |
-
|
1596 |
-
#: templates/connect.php256, templates/forms/license-activation.php:20
|
1597 |
-
msgid "Can't find your license key?"
|
1598 |
-
msgstr "Kan du ikke finde din licensnøgle?"
|
1599 |
-
|
1600 |
-
#: templates/connect.php315, templates/connect.php652,
|
1601 |
-
#: templates/forms/deactivation/retry-skip.php:20
|
1602 |
-
msgctxt "verb"
|
1603 |
-
msgid "Skip"
|
1604 |
-
msgstr "Spring over"
|
1605 |
-
|
1606 |
-
#: templates/connect.php:318
|
1607 |
-
msgid "Delegate to Site Admins"
|
1608 |
-
msgstr "Delegate to Site Admins"
|
1609 |
-
|
1610 |
-
#: templates/connect.php:318
|
1611 |
-
msgid "If you click it, this decision will be delegated to the sites administrators."
|
1612 |
-
msgstr "If you click it, this decision will be delegated to the sites administrators."
|
1613 |
-
|
1614 |
-
#: templates/connect.php:346
|
1615 |
-
msgid "Your Profile Overview"
|
1616 |
-
msgstr "Overblik af din profil"
|
1617 |
-
|
1618 |
-
#: templates/connect.php:347
|
1619 |
-
msgid "Name and email address"
|
1620 |
-
msgstr "Navn og e-mailadresse"
|
1621 |
-
|
1622 |
-
#: templates/connect.php:352
|
1623 |
-
msgid "Your Site Overview"
|
1624 |
-
msgstr "Overblik af dit websted"
|
1625 |
-
|
1626 |
-
#: templates/connect.php:353
|
1627 |
-
msgid "Site URL, WP version, PHP info, plugins & themes"
|
1628 |
-
msgstr "Websteds-URL, WP version, PHP info, plugins og temaer"
|
1629 |
-
|
1630 |
-
#: templates/connect.php:358
|
1631 |
-
msgid "Admin Notices"
|
1632 |
-
msgstr "Admin-meddelelser"
|
1633 |
-
|
1634 |
-
#: templates/connect.php359, templates/connect.php:375
|
1635 |
-
msgid "Updates, announcements, marketing, no spam"
|
1636 |
-
msgstr "Updates, announcements, marketing, no spam"
|
1637 |
-
|
1638 |
-
#: templates/connect.php:364
|
1639 |
-
msgid "Current %s Events"
|
1640 |
-
msgstr "Current %s Events"
|
1641 |
-
|
1642 |
-
#: templates/connect.php:365
|
1643 |
-
msgid "Activation, deactivation and uninstall"
|
1644 |
-
msgstr "Aktivering, deaktivering og afinstallering"
|
1645 |
-
|
1646 |
-
#: templates/connect.php:374
|
1647 |
-
msgid "Newsletter"
|
1648 |
-
msgstr "Nyhedsbrev"
|
1649 |
-
|
1650 |
-
#: templates/connect.php391, templates/forms/license-activation.php:39
|
1651 |
-
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."
|
1652 |
-
msgstr "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."
|
1653 |
-
|
1654 |
-
#: templates/connect.php:396
|
1655 |
-
msgid "What permissions are being granted?"
|
1656 |
-
msgstr "Hvilke tilladelser bliver givet?"
|
1657 |
-
|
1658 |
-
#: templates/connect.php:417
|
1659 |
-
msgid "Don't have a license key?"
|
1660 |
-
msgstr "Har du ikke en licensnøgle?"
|
1661 |
-
|
1662 |
-
#: templates/connect.php:420
|
1663 |
-
msgid "Have a license key?"
|
1664 |
-
msgstr "Har du en licensnøgle?"
|
1665 |
-
|
1666 |
-
#: templates/connect.php:428
|
1667 |
-
msgid "Privacy Policy"
|
1668 |
-
msgstr "Privatlivspolitik"
|
1669 |
-
|
1670 |
-
#: templates/connect.php:430
|
1671 |
-
msgid "License Agreement"
|
1672 |
-
msgstr "License Agreement"
|
1673 |
-
|
1674 |
-
#: templates/connect.php:430
|
1675 |
-
msgid "Terms of Service"
|
1676 |
-
msgstr "Servicevilkår"
|
1677 |
-
|
1678 |
-
#: templates/connect.php:805
|
1679 |
-
msgctxt "as in the process of sending an email"
|
1680 |
-
msgid "Sending email"
|
1681 |
-
msgstr "Sender e-mail"
|
1682 |
-
|
1683 |
-
#: templates/connect.php:806
|
1684 |
-
msgctxt "as activating plugin"
|
1685 |
-
msgid "Activating"
|
1686 |
-
msgstr "Aktiverer"
|
1687 |
-
|
1688 |
-
#: templates/contact.php:78
|
1689 |
-
msgid "Contact"
|
1690 |
-
msgstr "Kontakt"
|
1691 |
-
|
1692 |
-
#: templates/debug.php:17
|
1693 |
-
msgctxt "as turned off"
|
1694 |
-
msgid "Off"
|
1695 |
-
msgstr "Fra"
|
1696 |
-
|
1697 |
-
#: templates/debug.php:18
|
1698 |
-
msgctxt "as turned on"
|
1699 |
-
msgid "On"
|
1700 |
-
msgstr "Til"
|
1701 |
-
|
1702 |
-
#: templates/debug.php:20
|
1703 |
-
msgid "SDK"
|
1704 |
-
msgstr "SDK"
|
1705 |
-
|
1706 |
-
#: templates/debug.php:24
|
1707 |
-
msgctxt "as code debugging"
|
1708 |
-
msgid "Debugging"
|
1709 |
-
msgstr "Fejlfinding"
|
1710 |
-
|
1711 |
-
#: templates/debug.php54, templates/debug.php250, templates/debug.php376,
|
1712 |
-
#: templates/debug.php:494
|
1713 |
-
msgid "Actions"
|
1714 |
-
msgstr "Handlinger"
|
1715 |
-
|
1716 |
-
#: templates/debug.php:64
|
1717 |
-
msgid "Are you sure you want to delete all Freemius data?"
|
1718 |
-
msgstr "Er du sikker på, du vil slette al Freemius data?"
|
1719 |
-
|
1720 |
-
#: templates/debug.php:64
|
1721 |
-
msgid "Delete All Accounts"
|
1722 |
-
msgstr "Slet alle konti"
|
1723 |
-
|
1724 |
-
#: templates/debug.php:71
|
1725 |
-
msgid "Clear API Cache"
|
1726 |
-
msgstr "Ryd API-cache"
|
1727 |
-
|
1728 |
-
#: templates/debug.php:79
|
1729 |
-
msgid "Clear Updates Transients"
|
1730 |
-
msgstr "Clear Updates Transients"
|
1731 |
-
|
1732 |
-
#: templates/debug.php:86
|
1733 |
-
msgid "Sync Data From Server"
|
1734 |
-
msgstr "Synkroniser data fra server"
|
1735 |
-
|
1736 |
-
#: templates/debug.php:95
|
1737 |
-
msgid "Migrate Options to Network"
|
1738 |
-
msgstr "Migrate Options to Network"
|
1739 |
-
|
1740 |
-
#: templates/debug.php:100
|
1741 |
-
msgid "Load DB Option"
|
1742 |
-
msgstr "Hent DB-indstilling"
|
1743 |
-
|
1744 |
-
#: templates/debug.php:103
|
1745 |
-
msgid "Set DB Option"
|
1746 |
-
msgstr "Sæt DB-indstilling"
|
1747 |
-
|
1748 |
-
#: templates/debug.php:182
|
1749 |
-
msgid "Key"
|
1750 |
-
msgstr "Nøgle"
|
1751 |
-
|
1752 |
-
#: templates/debug.php:183
|
1753 |
-
msgid "Value"
|
1754 |
-
msgstr "Værdi"
|
1755 |
-
|
1756 |
-
#: templates/debug.php:199
|
1757 |
-
msgctxt "as software development kit versions"
|
1758 |
-
msgid "SDK Versions"
|
1759 |
-
msgstr "SDK-versioner"
|
1760 |
-
|
1761 |
-
#: templates/debug.php:204
|
1762 |
-
msgid "SDK Path"
|
1763 |
-
msgstr "SDK-sti"
|
1764 |
-
|
1765 |
-
#: templates/debug.php205, templates/debug.php:244
|
1766 |
-
msgid "Module Path"
|
1767 |
-
msgstr "Modul-sti"
|
1768 |
-
|
1769 |
-
#: templates/debug.php:206
|
1770 |
-
msgid "Is Active"
|
1771 |
-
msgstr "Er aktiv"
|
1772 |
-
|
1773 |
-
#: templates/debug.php234, templates/debug/plugins-themes-sync.php:35
|
1774 |
-
msgid "Plugins"
|
1775 |
-
msgstr "Plugins"
|
1776 |
-
|
1777 |
-
#: templates/debug.php234, templates/debug/plugins-themes-sync.php:56
|
1778 |
-
msgid "Themes"
|
1779 |
-
msgstr "Temaer"
|
1780 |
-
|
1781 |
-
#: templates/debug.php239, templates/debug.php371, templates/debug.php453,
|
1782 |
-
#: templates/debug/scheduled-crons.php:80
|
1783 |
-
msgid "Slug"
|
1784 |
-
msgstr "Kortnavn"
|
1785 |
-
|
1786 |
-
#: templates/debug.php241, templates/debug.php:452
|
1787 |
-
msgid "Title"
|
1788 |
-
msgstr "Titel"
|
1789 |
-
|
1790 |
-
#: templates/debug.php:242
|
1791 |
-
msgctxt "as application program interface"
|
1792 |
-
msgid "API"
|
1793 |
-
msgstr "API"
|
1794 |
-
|
1795 |
-
#: templates/debug.php:243
|
1796 |
-
msgid "Freemius State"
|
1797 |
-
msgstr "Freemius tilstand"
|
1798 |
-
|
1799 |
-
#: templates/debug.php:247
|
1800 |
-
msgid "Network Blog"
|
1801 |
-
msgstr "Netværksblog"
|
1802 |
-
|
1803 |
-
#: templates/debug.php:248
|
1804 |
-
msgid "Network User"
|
1805 |
-
msgstr "Netværksbruger"
|
1806 |
-
|
1807 |
-
#: templates/debug.php:285
|
1808 |
-
msgctxt "as connection was successful"
|
1809 |
-
msgid "Connected"
|
1810 |
-
msgstr "Forbundet"
|
1811 |
-
|
1812 |
-
#: templates/debug.php:286
|
1813 |
-
msgctxt "as connection blocked"
|
1814 |
-
msgid "Blocked"
|
1815 |
-
msgstr "Blokeret"
|
1816 |
-
|
1817 |
-
#: templates/debug.php:322
|
1818 |
-
msgid "Simulate Trial Promotion"
|
1819 |
-
msgstr "Simulate Trial Promotion"
|
1820 |
-
|
1821 |
-
#: templates/debug.php:334
|
1822 |
-
msgid "Simulate Network Upgrade"
|
1823 |
-
msgstr "Simuler netværksopgradering"
|
1824 |
-
|
1825 |
-
#: templates/debug.php:360
|
1826 |
-
msgid "%s Installs"
|
1827 |
-
msgstr "%s installeringer"
|
1828 |
-
|
1829 |
-
#: templates/debug.php:362
|
1830 |
-
msgctxt "like websites"
|
1831 |
-
msgid "Sites"
|
1832 |
-
msgstr "Websteder"
|
1833 |
-
|
1834 |
-
#: templates/debug.php368, templates/account/partials/site.php:148
|
1835 |
-
msgid "Blog ID"
|
1836 |
-
msgstr "Blog-ID"
|
1837 |
-
|
1838 |
-
#: templates/debug.php433, templates/debug.php511,
|
1839 |
-
#: templates/account/partials/addon.php:396
|
1840 |
-
msgctxt "verb"
|
1841 |
-
msgid "Delete"
|
1842 |
-
msgstr "Slet"
|
1843 |
-
|
1844 |
-
#: templates/debug.php:447
|
1845 |
-
msgid "Add Ons of module %s"
|
1846 |
-
msgstr "Tilføjelser til modul %s"
|
1847 |
-
|
1848 |
-
#: templates/debug.php:484
|
1849 |
-
msgid "Users"
|
1850 |
-
msgstr "Brugere"
|
1851 |
-
|
1852 |
-
#: templates/debug.php:491
|
1853 |
-
msgid "Verified"
|
1854 |
-
msgstr "Verificeret"
|
1855 |
-
|
1856 |
-
#: templates/debug.php:522
|
1857 |
-
msgid "%s Licenses"
|
1858 |
-
msgstr "1%s licenser"
|
1859 |
-
|
1860 |
-
#: templates/debug.php:527
|
1861 |
-
msgid "Plugin ID"
|
1862 |
-
msgstr "Plugin-ID"
|
1863 |
-
|
1864 |
-
#: templates/debug.php:529
|
1865 |
-
msgid "Plan ID"
|
1866 |
-
msgstr "Plan-ID"
|
1867 |
-
|
1868 |
-
#: templates/debug.php:530
|
1869 |
-
msgid "Quota"
|
1870 |
-
msgstr "Kvote"
|
1871 |
-
|
1872 |
-
#: templates/debug.php:531
|
1873 |
-
msgid "Activated"
|
1874 |
-
msgstr "Aktiveret"
|
1875 |
-
|
1876 |
-
#: templates/debug.php:532
|
1877 |
-
msgid "Blocking"
|
1878 |
-
msgstr "Blokerer"
|
1879 |
-
|
1880 |
-
#: templates/debug.php:534
|
1881 |
-
msgctxt "as expiration date"
|
1882 |
-
msgid "Expiration"
|
1883 |
-
msgstr "Udløber"
|
1884 |
-
|
1885 |
-
#: templates/debug.php:557
|
1886 |
-
msgid "Debug Log"
|
1887 |
-
msgstr "Fejlfindingslog"
|
1888 |
-
|
1889 |
-
#: templates/debug.php:561
|
1890 |
-
msgid "All Types"
|
1891 |
-
msgstr "Alle typer"
|
1892 |
-
|
1893 |
-
#: templates/debug.php:568
|
1894 |
-
msgid "All Requests"
|
1895 |
-
msgstr "Alle forespørgsler"
|
1896 |
-
|
1897 |
-
#: templates/debug.php573, templates/debug.php602,
|
1898 |
-
#: templates/debug/logger.php:25
|
1899 |
-
msgid "File"
|
1900 |
-
msgstr "Fil"
|
1901 |
-
|
1902 |
-
#: templates/debug.php574, templates/debug.php600,
|
1903 |
-
#: templates/debug/logger.php:23
|
1904 |
-
msgid "Function"
|
1905 |
-
msgstr "Funktion"
|
1906 |
-
|
1907 |
-
#: templates/debug.php:575
|
1908 |
-
msgid "Process ID"
|
1909 |
-
msgstr "Proces-ID"
|
1910 |
-
|
1911 |
-
#: templates/debug.php:576
|
1912 |
-
msgid "Logger"
|
1913 |
-
msgstr "Logger"
|
1914 |
-
|
1915 |
-
#: templates/debug.php577, templates/debug.php601,
|
1916 |
-
#: templates/debug/logger.php:24
|
1917 |
-
msgid "Message"
|
1918 |
-
msgstr "Besked"
|
1919 |
-
|
1920 |
-
#: templates/debug.php:579
|
1921 |
-
msgid "Filter"
|
1922 |
-
msgstr "Filter"
|
1923 |
-
|
1924 |
-
#: templates/debug.php:587
|
1925 |
-
msgid "Download"
|
1926 |
-
msgstr "Download"
|
1927 |
-
|
1928 |
-
#: templates/debug.php598, templates/debug/logger.php:22
|
1929 |
-
msgid "Type"
|
1930 |
-
msgstr "Type"
|
1931 |
-
|
1932 |
-
#: templates/debug.php603, templates/debug/logger.php:26
|
1933 |
-
msgid "Timestamp"
|
1934 |
-
msgstr "Tidsstempel"
|
1935 |
-
|
1936 |
-
#: templates/secure-https-header.php:28
|
1937 |
-
msgid "Secure HTTPS %s page, running from an external domain"
|
1938 |
-
msgstr "Secure HTTPS %s page, running from an external domain"
|
1939 |
-
|
1940 |
-
#: includes/customizer/class-fs-customizer-support-section.php55,
|
1941 |
-
#: templates/plugin-info/features.php:43
|
1942 |
-
msgid "Support"
|
1943 |
-
msgstr "Support"
|
1944 |
-
|
1945 |
-
#: includes/debug/class-fs-debug-bar-panel.php48,
|
1946 |
-
#: templates/debug/api-calls.php54, templates/debug/logger.php:62
|
1947 |
-
msgctxt "milliseconds"
|
1948 |
-
msgid "ms"
|
1949 |
-
msgstr "ms"
|
1950 |
-
|
1951 |
-
#: includes/debug/debug-bar-start.php:41
|
1952 |
-
msgid "Freemius API"
|
1953 |
-
msgstr "Freemius API"
|
1954 |
-
|
1955 |
-
#: includes/debug/debug-bar-start.php:42
|
1956 |
-
msgid "Requests"
|
1957 |
-
msgstr "Requests"
|
1958 |
-
|
1959 |
-
#: templates/account/billing.php:22
|
1960 |
-
msgctxt "verb"
|
1961 |
-
msgid "Update"
|
1962 |
-
msgstr "Opdater"
|
1963 |
-
|
1964 |
-
#: templates/account/billing.php:33
|
1965 |
-
msgid "Billing"
|
1966 |
-
msgstr "Betaling"
|
1967 |
-
|
1968 |
-
#: templates/account/billing.php38, templates/account/billing.php:38
|
1969 |
-
msgid "Business name"
|
1970 |
-
msgstr "Firmanavn"
|
1971 |
-
|
1972 |
-
#: templates/account/billing.php39, templates/account/billing.php:39
|
1973 |
-
msgid "Tax / VAT ID"
|
1974 |
-
msgstr "Moms / VAT ID"
|
1975 |
-
|
1976 |
-
#: templates/account/billing.php42, templates/account/billing.php42,
|
1977 |
-
#: templates/account/billing.php43, templates/account/billing.php:43
|
1978 |
-
msgid "Address Line %d"
|
1979 |
-
msgstr "Adresselinje %d"
|
1980 |
-
|
1981 |
-
#: templates/account/billing.php46, templates/account/billing.php:46
|
1982 |
-
msgid "City"
|
1983 |
-
msgstr "By"
|
1984 |
-
|
1985 |
-
#: templates/account/billing.php46, templates/account/billing.php:46
|
1986 |
-
msgid "Town"
|
1987 |
-
msgstr "By"
|
1988 |
-
|
1989 |
-
#: templates/account/billing.php47, templates/account/billing.php:47
|
1990 |
-
msgid "ZIP / Postal Code"
|
1991 |
-
msgstr "ZIP / Postnummer"
|
1992 |
-
|
1993 |
-
#: templates/account/billing.php:302
|
1994 |
-
msgid "Country"
|
1995 |
-
msgstr "Land"
|
1996 |
-
|
1997 |
-
#: templates/account/billing.php:304
|
1998 |
-
msgid "Select Country"
|
1999 |
-
msgstr "Vælg land"
|
2000 |
-
|
2001 |
-
#: templates/account/billing.php311, templates/account/billing.php:312
|
2002 |
-
msgid "State"
|
2003 |
-
msgstr "Stat"
|
2004 |
-
|
2005 |
-
#: templates/account/billing.php311, templates/account/billing.php:312
|
2006 |
-
msgid "Province"
|
2007 |
-
msgstr "Provins"
|
2008 |
-
|
2009 |
-
#: templates/account/payments.php:29
|
2010 |
-
msgid "Payments"
|
2011 |
-
msgstr "Betalinger"
|
2012 |
-
|
2013 |
-
#: templates/account/payments.php:36
|
2014 |
-
msgid "Date"
|
2015 |
-
msgstr "Dato"
|
2016 |
-
|
2017 |
-
#: templates/account/payments.php:37
|
2018 |
-
msgid "Amount"
|
2019 |
-
msgstr "Beløb"
|
2020 |
-
|
2021 |
-
#: templates/account/payments.php38, templates/account/payments.php:50
|
2022 |
-
msgid "Invoice"
|
2023 |
-
msgstr "Faktura"
|
2024 |
-
|
2025 |
-
#: templates/debug/api-calls.php:56
|
2026 |
-
msgid "API"
|
2027 |
-
msgstr "API"
|
2028 |
-
|
2029 |
-
#: templates/debug/api-calls.php:68
|
2030 |
-
msgid "Method"
|
2031 |
-
msgstr "Metode"
|
2032 |
-
|
2033 |
-
#: templates/debug/api-calls.php:69
|
2034 |
-
msgid "Code"
|
2035 |
-
msgstr "Kode"
|
2036 |
-
|
2037 |
-
#: templates/debug/api-calls.php:70
|
2038 |
-
msgid "Length"
|
2039 |
-
msgstr "Længde"
|
2040 |
-
|
2041 |
-
#: templates/debug/api-calls.php:71
|
2042 |
-
msgctxt "as file/folder path"
|
2043 |
-
msgid "Path"
|
2044 |
-
msgstr "Sti"
|
2045 |
-
|
2046 |
-
#: templates/debug/api-calls.php:73
|
2047 |
-
msgid "Body"
|
2048 |
-
msgstr "Body"
|
2049 |
-
|
2050 |
-
#: templates/debug/api-calls.php:75
|
2051 |
-
msgid "Result"
|
2052 |
-
msgstr "Resultat"
|
2053 |
-
|
2054 |
-
#: templates/debug/api-calls.php:76
|
2055 |
-
msgid "Start"
|
2056 |
-
msgstr "Start"
|
2057 |
-
|
2058 |
-
#: templates/debug/api-calls.php:77
|
2059 |
-
msgid "End"
|
2060 |
-
msgstr "Slut"
|
2061 |
-
|
2062 |
-
#: templates/debug/logger.php:15
|
2063 |
-
msgid "Log"
|
2064 |
-
msgstr "Log"
|
2065 |
-
|
2066 |
-
#. translators: %s: time period (e.g. In "2 hours")
|
2067 |
-
#: templates/debug/plugins-themes-sync.php18,
|
2068 |
-
#: templates/debug/scheduled-crons.php:91
|
2069 |
-
msgid "In %s"
|
2070 |
-
msgstr "Om %s"
|
2071 |
-
|
2072 |
-
#. translators: %s: time period (e.g. "2 hours" ago)
|
2073 |
-
#: templates/debug/plugins-themes-sync.php20,
|
2074 |
-
#: templates/debug/scheduled-crons.php:93
|
2075 |
-
msgid "%s ago"
|
2076 |
-
msgstr "%s siden"
|
2077 |
-
|
2078 |
-
#: templates/debug/plugins-themes-sync.php21,
|
2079 |
-
#: templates/debug/scheduled-crons.php:74
|
2080 |
-
msgctxt "seconds"
|
2081 |
-
msgid "sec"
|
2082 |
-
msgstr "sek"
|
2083 |
-
|
2084 |
-
#: templates/debug/plugins-themes-sync.php:23
|
2085 |
-
msgid "Plugins & Themes Sync"
|
2086 |
-
msgstr "Synkronisering af plugins og temaer"
|
2087 |
-
|
2088 |
-
#: templates/debug/plugins-themes-sync.php:28
|
2089 |
-
msgid "Total"
|
2090 |
-
msgstr "Total"
|
2091 |
-
|
2092 |
-
#: templates/debug/plugins-themes-sync.php29,
|
2093 |
-
#: templates/debug/scheduled-crons.php:84
|
2094 |
-
msgid "Last"
|
2095 |
-
msgstr "Sidste"
|
2096 |
-
|
2097 |
-
#: templates/debug/scheduled-crons.php:76
|
2098 |
-
msgid "Scheduled Crons"
|
2099 |
-
msgstr "Planlagte cron jobs"
|
2100 |
-
|
2101 |
-
#: templates/debug/scheduled-crons.php:81
|
2102 |
-
msgid "Module"
|
2103 |
-
msgstr "Modul"
|
2104 |
-
|
2105 |
-
#: templates/debug/scheduled-crons.php:82
|
2106 |
-
msgid "Module Type"
|
2107 |
-
msgstr "Modultype"
|
2108 |
-
|
2109 |
-
#: templates/debug/scheduled-crons.php:83
|
2110 |
-
msgid "Cron Type"
|
2111 |
-
msgstr "Cron Type"
|
2112 |
-
|
2113 |
-
#: templates/debug/scheduled-crons.php:85
|
2114 |
-
msgid "Next"
|
2115 |
-
msgstr "Næste"
|
2116 |
-
|
2117 |
-
#: templates/forms/affiliation.php:82
|
2118 |
-
msgid "Non-expiring"
|
2119 |
-
msgstr "Udløber ikke"
|
2120 |
-
|
2121 |
-
#: templates/forms/affiliation.php:85
|
2122 |
-
msgid "Apply to become an affiliate"
|
2123 |
-
msgstr "Apply to become an affiliate"
|
2124 |
-
|
2125 |
-
#: templates/forms/affiliation.php:104
|
2126 |
-
msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
2127 |
-
msgstr "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
2128 |
-
|
2129 |
-
#: templates/forms/affiliation.php:119
|
2130 |
-
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."
|
2131 |
-
msgstr "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."
|
2132 |
-
|
2133 |
-
#: templates/forms/affiliation.php:122
|
2134 |
-
msgid "Your affiliation account was temporarily suspended."
|
2135 |
-
msgstr "Your affiliation account was temporarily suspended."
|
2136 |
-
|
2137 |
-
#: templates/forms/affiliation.php:125
|
2138 |
-
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."
|
2139 |
-
msgstr "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."
|
2140 |
-
|
2141 |
-
#: templates/forms/affiliation.php:128
|
2142 |
-
msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
2143 |
-
msgstr "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
2144 |
-
|
2145 |
-
#: templates/forms/affiliation.php:141
|
2146 |
-
msgid "Like the %s? Become our ambassador and earn cash ;-)"
|
2147 |
-
msgstr "Like the %s? Become our ambassador and earn cash ;-)"
|
2148 |
-
|
2149 |
-
#: templates/forms/affiliation.php:142
|
2150 |
-
msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
2151 |
-
msgstr "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
2152 |
-
|
2153 |
-
#: templates/forms/affiliation.php:145
|
2154 |
-
msgid "Program Summary"
|
2155 |
-
msgstr "Programoversigt"
|
2156 |
-
|
2157 |
-
#: templates/forms/affiliation.php:147
|
2158 |
-
msgid "%s commission when a customer purchases a new license."
|
2159 |
-
msgstr "%s commission when a customer purchases a new license."
|
2160 |
-
|
2161 |
-
#: templates/forms/affiliation.php:149
|
2162 |
-
msgid "Get commission for automated subscription renewals."
|
2163 |
-
msgstr "Get commission for automated subscription renewals."
|
2164 |
-
|
2165 |
-
#: templates/forms/affiliation.php:152
|
2166 |
-
msgid "%s tracking cookie after the first visit to maximize earnings potential."
|
2167 |
-
msgstr "%s tracking cookie after the first visit to maximize earnings potential."
|
2168 |
-
|
2169 |
-
#: templates/forms/affiliation.php:155
|
2170 |
-
msgid "Unlimited commissions."
|
2171 |
-
msgstr "Unlimited commissions."
|
2172 |
-
|
2173 |
-
#: templates/forms/affiliation.php:157
|
2174 |
-
msgid "%s minimum payout amount."
|
2175 |
-
msgstr "%s minimum payout amount."
|
2176 |
-
|
2177 |
-
#: templates/forms/affiliation.php:158
|
2178 |
-
msgid "Payouts are in USD and processed monthly via PayPal."
|
2179 |
-
msgstr "Payouts are in USD and processed monthly via PayPal."
|
2180 |
-
|
2181 |
-
#: templates/forms/affiliation.php:159
|
2182 |
-
msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
2183 |
-
msgstr "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
2184 |
-
|
2185 |
-
#: templates/forms/affiliation.php:162
|
2186 |
-
msgid "Affiliate"
|
2187 |
-
msgstr "Affiliate"
|
2188 |
-
|
2189 |
-
#: templates/forms/affiliation.php165, templates/forms/resend-key.php:23
|
2190 |
-
msgid "Email address"
|
2191 |
-
msgstr "E-mailadresse"
|
2192 |
-
|
2193 |
-
#: templates/forms/affiliation.php:169
|
2194 |
-
msgid "Full name"
|
2195 |
-
msgstr "Fulde navn"
|
2196 |
-
|
2197 |
-
#: templates/forms/affiliation.php:173
|
2198 |
-
msgid "PayPal account email address"
|
2199 |
-
msgstr "E-mailadresse til PayPal-konto"
|
2200 |
-
|
2201 |
-
#: templates/forms/affiliation.php:177
|
2202 |
-
msgid "Where are you going to promote the %s?"
|
2203 |
-
msgstr "Hvor vil du promovere %s?"
|
2204 |
-
|
2205 |
-
#: templates/forms/affiliation.php:179
|
2206 |
-
msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
|
2207 |
-
msgstr "Enter the domain of your website or other websites from where you plan to promote the %s."
|
2208 |
-
|
2209 |
-
#: templates/forms/affiliation.php:181
|
2210 |
-
msgid "Add another domain"
|
2211 |
-
msgstr "Tilføj andet domæne"
|
2212 |
-
|
2213 |
-
#: templates/forms/affiliation.php:185
|
2214 |
-
msgid "Extra Domains"
|
2215 |
-
msgstr "Ekstra domæner"
|
2216 |
-
|
2217 |
-
#: templates/forms/affiliation.php:186
|
2218 |
-
msgid "Extra domains where you will be marketing the product from."
|
2219 |
-
msgstr "Andre domæner du vil markedsføre produktet fra."
|
2220 |
-
|
2221 |
-
#: templates/forms/affiliation.php:196
|
2222 |
-
msgid "Promotion methods"
|
2223 |
-
msgstr "Promoveringsmetoder"
|
2224 |
-
|
2225 |
-
#: templates/forms/affiliation.php:199
|
2226 |
-
msgid "Social media (Facebook, Twitter, etc.)"
|
2227 |
-
msgstr "Sociale medier (Facebook, Twitter osv.)"
|
2228 |
-
|
2229 |
-
#: templates/forms/affiliation.php:203
|
2230 |
-
msgid "Mobile apps"
|
2231 |
-
msgstr "Mobil-apps"
|
2232 |
-
|
2233 |
-
#: templates/forms/affiliation.php:207
|
2234 |
-
msgid "Website, email, and social media statistics (optional)"
|
2235 |
-
msgstr "Websted, e-mail, og statistikker for sociale medier (valgfrit)"
|
2236 |
-
|
2237 |
-
#: templates/forms/affiliation.php:210
|
2238 |
-
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)."
|
2239 |
-
msgstr "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)."
|
2240 |
-
|
2241 |
-
#: templates/forms/affiliation.php:214
|
2242 |
-
msgid "How will you promote us?"
|
2243 |
-
msgstr "Hvordan vil du promovere os?"
|
2244 |
-
|
2245 |
-
#: templates/forms/affiliation.php:217
|
2246 |
-
msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
2247 |
-
msgstr "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
2248 |
-
|
2249 |
-
#: templates/forms/affiliation.php223, templates/forms/resend-key.php:22
|
2250 |
-
msgid "Cancel"
|
2251 |
-
msgstr "Annuller"
|
2252 |
-
|
2253 |
-
#: templates/forms/affiliation.php:225
|
2254 |
-
msgid "Become an affiliate"
|
2255 |
-
msgstr "Bliv en affiliate"
|
2256 |
-
|
2257 |
-
#: templates/forms/license-activation.php:21
|
2258 |
-
msgid "Please enter the license key that you received in the email right after the purchase:"
|
2259 |
-
msgstr "Indtast licensnøglen, du modtog i e-mailen lige efter købet:"
|
2260 |
-
|
2261 |
-
#: templates/forms/license-activation.php:26
|
2262 |
-
msgid "Update License"
|
2263 |
-
msgstr "Opdater licens"
|
2264 |
-
|
2265 |
-
#: templates/forms/optout.php:30
|
2266 |
-
msgctxt "verb"
|
2267 |
-
msgid "Opt Out"
|
2268 |
-
msgstr "Frameld"
|
2269 |
-
|
2270 |
-
#: templates/forms/optout.php:31
|
2271 |
-
msgctxt "verb"
|
2272 |
-
msgid "Opt In"
|
2273 |
-
msgstr "Tilmeld"
|
2274 |
-
|
2275 |
-
#: templates/forms/optout.php:33
|
2276 |
-
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."
|
2277 |
-
msgstr "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."
|
2278 |
-
|
2279 |
-
#: templates/forms/optout.php:35
|
2280 |
-
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
2281 |
-
msgstr "Ved at klikke \"Frameld\" vil vi ikke længere sende data fra %s til %s."
|
2282 |
-
|
2283 |
-
#: templates/forms/premium-versions-upgrade-handler.php:40
|
2284 |
-
msgid "There is a new version of %s available."
|
2285 |
-
msgstr "En ny version af %s er tilgængelig."
|
2286 |
-
|
2287 |
-
#: templates/forms/premium-versions-upgrade-handler.php:41
|
2288 |
-
msgid " %s to access version %s security & feature updates, and support."
|
2289 |
-
msgstr " %s to access version %s security & feature updates, and support."
|
2290 |
-
|
2291 |
-
#: templates/forms/premium-versions-upgrade-handler.php:54
|
2292 |
-
msgid "New Version Available"
|
2293 |
-
msgstr "Ny version tilgængelig"
|
2294 |
-
|
2295 |
-
#: templates/forms/premium-versions-upgrade-handler.php:75
|
2296 |
-
msgctxt "close a window"
|
2297 |
-
msgid "Dismiss"
|
2298 |
-
msgstr "Fjern"
|
2299 |
-
|
2300 |
-
#: templates/forms/resend-key.php:21
|
2301 |
-
msgid "Send License Key"
|
2302 |
-
msgstr "Send licensnøgle"
|
2303 |
-
|
2304 |
-
#: templates/forms/resend-key.php:57
|
2305 |
-
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
2306 |
-
msgstr "Indtast e-mailadressen, som du benyttede ved opgraderingen, nedenfor og vi vil gensende licensnøglen til dig."
|
2307 |
-
|
2308 |
-
#: templates/forms/subscription-cancellation.php:37
|
2309 |
-
msgid "Deactivating or uninstalling the %s will automatically disable the license, which you'll be able to use on another site."
|
2310 |
-
msgstr "Deactivating or uninstalling the %s will automatically disable the license, which you'll be able to use on another site."
|
2311 |
-
|
2312 |
-
#: templates/forms/subscription-cancellation.php:47
|
2313 |
-
msgid "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
|
2314 |
-
msgstr "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
|
2315 |
-
|
2316 |
-
#: templates/forms/subscription-cancellation.php:52
|
2317 |
-
msgid "license"
|
2318 |
-
msgstr "license"
|
2319 |
-
|
2320 |
-
#: templates/forms/subscription-cancellation.php:57
|
2321 |
-
msgid "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
|
2322 |
-
msgstr "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
|
2323 |
-
|
2324 |
-
#: templates/forms/subscription-cancellation.php:68
|
2325 |
-
msgid "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
|
2326 |
-
msgstr "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
|
2327 |
-
|
2328 |
-
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the
|
2329 |
-
#. subscription'
|
2330 |
-
#: templates/forms/subscription-cancellation.php99,
|
2331 |
-
#: templates/account/partials/addon.php29,
|
2332 |
-
#: templates/account/partials/site.php:298
|
2333 |
-
msgid "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
2334 |
-
msgstr "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
2335 |
-
|
2336 |
-
#: templates/forms/subscription-cancellation.php:103
|
2337 |
-
msgid "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
|
2338 |
-
msgstr "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
|
2339 |
-
|
2340 |
-
#: templates/forms/subscription-cancellation.php:136
|
2341 |
-
msgid "Cancel %s?"
|
2342 |
-
msgstr "Cancel %s?"
|
2343 |
-
|
2344 |
-
#: templates/forms/subscription-cancellation.php:143
|
2345 |
-
msgid "Proceed"
|
2346 |
-
msgstr "Proceed"
|
2347 |
-
|
2348 |
-
#: templates/forms/subscription-cancellation.php191,
|
2349 |
-
#: templates/forms/deactivation/form.php:171
|
2350 |
-
msgid "Cancel %s & Proceed"
|
2351 |
-
msgstr "Cancel %s & Proceed"
|
2352 |
-
|
2353 |
-
#: templates/forms/trial-start.php:22
|
2354 |
-
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
2355 |
-
msgstr "Du er 1 klik fra at begynde din %1$s dages gratis prøveperiode af planen %2$s."
|
2356 |
-
|
2357 |
-
#: templates/forms/trial-start.php:28
|
2358 |
-
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."
|
2359 |
-
msgstr "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."
|
2360 |
-
|
2361 |
-
#: templates/js/style-premium-theme.php:39
|
2362 |
-
msgid "Premium"
|
2363 |
-
msgstr "Premium"
|
2364 |
-
|
2365 |
-
#: templates/js/style-premium-theme.php:42
|
2366 |
-
msgid "Beta"
|
2367 |
-
msgstr "Beta"
|
2368 |
-
|
2369 |
-
#: templates/partials/network-activation.php:27
|
2370 |
-
msgid "Activate license on all sites in the network."
|
2371 |
-
msgstr "Aktiver licens på alle websteder i netværket."
|
2372 |
-
|
2373 |
-
#: templates/partials/network-activation.php:28
|
2374 |
-
msgid "Apply on all sites in the network."
|
2375 |
-
msgstr "Anvend på alle websteder i netværket."
|
2376 |
-
|
2377 |
-
#: templates/partials/network-activation.php:31
|
2378 |
-
msgid "Activate license on all pending sites."
|
2379 |
-
msgstr "Akiver licens på alle afventende websteder."
|
2380 |
-
|
2381 |
-
#: templates/partials/network-activation.php:32
|
2382 |
-
msgid "Apply on all pending sites."
|
2383 |
-
msgstr "Anvend på alle afventende websteder."
|
2384 |
-
|
2385 |
-
#: templates/partials/network-activation.php40,
|
2386 |
-
#: templates/partials/network-activation.php:74
|
2387 |
-
msgid "allow"
|
2388 |
-
msgstr "tillad"
|
2389 |
-
|
2390 |
-
#: templates/partials/network-activation.php43,
|
2391 |
-
#: templates/partials/network-activation.php:77
|
2392 |
-
msgid "delegate"
|
2393 |
-
msgstr "delegér"
|
2394 |
-
|
2395 |
-
#: templates/partials/network-activation.php47,
|
2396 |
-
#: templates/partials/network-activation.php:81
|
2397 |
-
msgid "skip"
|
2398 |
-
msgstr "spring over"
|
2399 |
-
|
2400 |
-
#: templates/plugin-info/description.php72,
|
2401 |
-
#: templates/plugin-info/screenshots.php:31
|
2402 |
-
msgid "Click to view full-size screenshot %d"
|
2403 |
-
msgstr "Klik for at vise skærmbillede %d i fuld skærm"
|
2404 |
-
|
2405 |
-
#: templates/plugin-info/features.php:56
|
2406 |
-
msgid "Unlimited Updates"
|
2407 |
-
msgstr "Ubegrænsede opdateringer"
|
2408 |
-
|
2409 |
-
#: templates/account/partials/activate-license-button.php:46
|
2410 |
-
msgid "Localhost"
|
2411 |
-
msgstr "Localhost"
|
2412 |
-
|
2413 |
-
#: templates/account/partials/activate-license-button.php:50
|
2414 |
-
msgctxt "as 5 licenses left"
|
2415 |
-
msgid "%s left"
|
2416 |
-
msgstr "%s tilbage"
|
2417 |
-
|
2418 |
-
#: templates/account/partials/activate-license-button.php:51
|
2419 |
-
msgid "Last license"
|
2420 |
-
msgstr "Seneste license"
|
2421 |
-
|
2422 |
-
#: templates/account/partials/addon.php:167
|
2423 |
-
msgid "Cancelled"
|
2424 |
-
msgstr "Annulleret"
|
2425 |
-
|
2426 |
-
#: templates/account/partials/addon.php:177
|
2427 |
-
msgid "No expiration"
|
2428 |
-
msgstr "Udløber ikke"
|
2429 |
-
|
2430 |
-
#: templates/account/partials/site.php:181
|
2431 |
-
msgid "Owner Name"
|
2432 |
-
msgstr "Ejer-navn"
|
2433 |
-
|
2434 |
-
#: templates/account/partials/site.php:193
|
2435 |
-
msgid "Owner Email"
|
2436 |
-
msgstr "E-mailadresse for ejer"
|
2437 |
-
|
2438 |
-
#: templates/account/partials/site.php:205
|
2439 |
-
msgid "Owner ID"
|
2440 |
-
msgstr "Ejer-ID"
|
2441 |
-
|
2442 |
-
#: templates/account/partials/site.php:270
|
2443 |
-
msgid "Subscription"
|
2444 |
-
msgstr "Abonnement"
|
2445 |
-
|
2446 |
-
#: templates/forms/deactivation/contact.php:19
|
2447 |
-
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
2448 |
-
msgstr "Vi beklager ulejligheden, og vi er her for at hjælpe, hvis du giver os chancen."
|
2449 |
-
|
2450 |
-
#: templates/forms/deactivation/contact.php:22
|
2451 |
-
msgid "Contact Support"
|
2452 |
-
msgstr "Kontakt support"
|
2453 |
-
|
2454 |
-
#: templates/forms/deactivation/form.php:64
|
2455 |
-
msgid "Anonymous feedback"
|
2456 |
-
msgstr "Anonym feedback"
|
2457 |
-
|
2458 |
-
#: templates/forms/deactivation/form.php:70
|
2459 |
-
msgid "Deactivate"
|
2460 |
-
msgstr "Deaktiver"
|
2461 |
-
|
2462 |
-
#: templates/forms/deactivation/form.php:72
|
2463 |
-
msgid "Activate %s"
|
2464 |
-
msgstr "Aktiver %s"
|
2465 |
-
|
2466 |
-
#: templates/forms/deactivation/form.php:87
|
2467 |
-
msgid "Quick Feedback"
|
2468 |
-
msgstr "Quick Feedback"
|
2469 |
-
|
2470 |
-
#: templates/forms/deactivation/form.php:91
|
2471 |
-
msgid "If you have a moment, please let us know why you are %s"
|
2472 |
-
msgstr "Hvis du har tid, så lad os venligst vide hvorfor du %s"
|
2473 |
-
|
2474 |
-
#: templates/forms/deactivation/form.php:91
|
2475 |
-
msgid "deactivating"
|
2476 |
-
msgstr "deaktiverer"
|
2477 |
-
|
2478 |
-
#: templates/forms/deactivation/form.php:91
|
2479 |
-
msgid "switching"
|
2480 |
-
msgstr "skifter"
|
2481 |
-
|
2482 |
-
#: templates/forms/deactivation/form.php:365
|
2483 |
-
msgid "Submit & %s"
|
2484 |
-
msgstr "Send & %s"
|
2485 |
-
|
2486 |
-
#: templates/forms/deactivation/form.php:386
|
2487 |
-
msgid "Kindly tell us the reason so we can improve."
|
2488 |
-
msgstr "Fortæl os venligst årsagen, så vi kan forbedre det."
|
2489 |
-
|
2490 |
-
#: templates/forms/deactivation/form.php:511
|
2491 |
-
msgid "Yes - %s"
|
2492 |
-
msgstr "Ja - %s"
|
2493 |
-
|
2494 |
-
#: templates/forms/deactivation/form.php:518
|
2495 |
-
msgid "Skip & %s"
|
2496 |
-
msgstr "Spring over & %s"
|
2497 |
-
|
2498 |
-
#: templates/forms/deactivation/retry-skip.php:21
|
2499 |
-
msgid "Click here to use the plugin anonymously"
|
2500 |
-
msgstr "Klik her for at benytte pluginnet anonymt"
|
2501 |
-
|
2502 |
-
#: templates/forms/deactivation/retry-skip.php:23
|
2503 |
-
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
2504 |
-
msgstr "Du har måske overset det, men du behøver ikke at dele data og kan blot %s tilmeldingen."
|
1 |
+
# Copyright (C) 2019 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Joachim Jensen, 2019
|
5 |
+
# Joachim Jensen, 2016-2018
|
6 |
+
# Lars Koudal, 2018-2019
|
7 |
+
msgid ""
|
8 |
+
msgstr ""
|
9 |
+
"Project-Id-Version: WordPress SDK\n"
|
10 |
+
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
11 |
+
"POT-Creation-Date: \n"
|
12 |
+
"PO-Revision-Date: 2019-10-07 15:33+0000\n"
|
13 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
14 |
+
"Language: da_DK\n"
|
15 |
+
"Language-Team: Danish (Denmark) (http://www.transifex.com/freemius/wordpress-sdk/language/da_DK/)\n"
|
16 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
17 |
+
"Content-Transfer-Encoding: 8bit\n"
|
18 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
+
"MIME-Version: 1.0\n"
|
20 |
+
"X-Poedit-Basepath: ..\n"
|
21 |
+
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
24 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
25 |
+
|
26 |
+
#: includes/class-freemius.php1880, templates/account.php:840
|
27 |
+
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."
|
28 |
+
msgstr "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."
|
29 |
+
|
30 |
+
#: includes/class-freemius.php:1887
|
31 |
+
msgid "Would you like to proceed with the update?"
|
32 |
+
msgstr "Vil du fortsætte med opdateringen?"
|
33 |
+
|
34 |
+
#: includes/class-freemius.php:2095
|
35 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
36 |
+
msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
37 |
+
|
38 |
+
#: includes/class-freemius.php:2097
|
39 |
+
msgid "Error"
|
40 |
+
msgstr "Fejl"
|
41 |
+
|
42 |
+
#: includes/class-freemius.php:2491
|
43 |
+
msgid "I found a better %s"
|
44 |
+
msgstr "Jeg fandt et bedre %s"
|
45 |
+
|
46 |
+
#: includes/class-freemius.php:2493
|
47 |
+
msgid "What's the %s's name?"
|
48 |
+
msgstr "Hvad er navnet på %s?"
|
49 |
+
|
50 |
+
#: includes/class-freemius.php:2499
|
51 |
+
msgid "It's a temporary %s. I'm just debugging an issue."
|
52 |
+
msgstr "Det er en midlertidig %s. Jeg er i gang med fejlrettelser."
|
53 |
+
|
54 |
+
#: includes/class-freemius.php:2501
|
55 |
+
msgid "Deactivation"
|
56 |
+
msgstr "Deaktivering"
|
57 |
+
|
58 |
+
#: includes/class-freemius.php:2502
|
59 |
+
msgid "Theme Switch"
|
60 |
+
msgstr "Temaskift"
|
61 |
+
|
62 |
+
#: includes/class-freemius.php2511, templates/forms/resend-key.php:24
|
63 |
+
msgid "Other"
|
64 |
+
msgstr "Andet"
|
65 |
+
|
66 |
+
#: includes/class-freemius.php:2519
|
67 |
+
msgid "I no longer need the %s"
|
68 |
+
msgstr "Jeg har ikke længere brug for %s"
|
69 |
+
|
70 |
+
#: includes/class-freemius.php:2526
|
71 |
+
msgid "I only needed the %s for a short period"
|
72 |
+
msgstr "Jeg behøvede kun %s i en kort periode"
|
73 |
+
|
74 |
+
#: includes/class-freemius.php:2532
|
75 |
+
msgid "The %s broke my site"
|
76 |
+
msgstr "%s ødelagde min webside"
|
77 |
+
|
78 |
+
#: includes/class-freemius.php:2539
|
79 |
+
msgid "The %s suddenly stopped working"
|
80 |
+
msgstr "%s stoppede pludseligt med at virke"
|
81 |
+
|
82 |
+
#: includes/class-freemius.php:2549
|
83 |
+
msgid "I can't pay for it anymore"
|
84 |
+
msgstr "Jeg kan ikke længere betale for det"
|
85 |
+
|
86 |
+
#: includes/class-freemius.php:2551
|
87 |
+
msgid "What price would you feel comfortable paying?"
|
88 |
+
msgstr "Hvilken pris ville du foretrække at betale?"
|
89 |
+
|
90 |
+
#: includes/class-freemius.php:2557
|
91 |
+
msgid "I don't like to share my information with you"
|
92 |
+
msgstr "Jeg har ikke lyst til at dele mine informationer med jer"
|
93 |
+
|
94 |
+
#: includes/class-freemius.php:2578
|
95 |
+
msgid "The %s didn't work"
|
96 |
+
msgstr "%s virkede ikke"
|
97 |
+
|
98 |
+
#: includes/class-freemius.php:2588
|
99 |
+
msgid "I couldn't understand how to make it work"
|
100 |
+
msgstr "Jeg forstod ikke, hvordan jeg skulle få det til at fungere."
|
101 |
+
|
102 |
+
#: includes/class-freemius.php:2596
|
103 |
+
msgid "The %s is great, but I need specific feature that you don't support"
|
104 |
+
msgstr "%s er godt, men jeg har brug for en specifik feature, som ikke understøttes"
|
105 |
+
|
106 |
+
#: includes/class-freemius.php:2598
|
107 |
+
msgid "What feature?"
|
108 |
+
msgstr "Hvilken feature?"
|
109 |
+
|
110 |
+
#: includes/class-freemius.php:2602
|
111 |
+
msgid "The %s is not working"
|
112 |
+
msgstr "%s virker ikke"
|
113 |
+
|
114 |
+
#: includes/class-freemius.php:2604
|
115 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
116 |
+
msgstr "Vær venlig at dele hvad der ikke virkede så vi kan rette det for kommende brugere...."
|
117 |
+
|
118 |
+
#: includes/class-freemius.php:2608
|
119 |
+
msgid "It's not what I was looking for"
|
120 |
+
msgstr "Det er ikke, hvad jeg søgte"
|
121 |
+
|
122 |
+
#: includes/class-freemius.php:2610
|
123 |
+
msgid "What you've been looking for?"
|
124 |
+
msgstr "Hvad ledte du efter?"
|
125 |
+
|
126 |
+
#: includes/class-freemius.php:2614
|
127 |
+
msgid "The %s didn't work as expected"
|
128 |
+
msgstr "%s virkede ikke som forventet"
|
129 |
+
|
130 |
+
#: includes/class-freemius.php:2616
|
131 |
+
msgid "What did you expect?"
|
132 |
+
msgstr "Hvad forventede du?"
|
133 |
+
|
134 |
+
#: includes/class-freemius.php3471, templates/debug.php:20
|
135 |
+
msgid "Freemius Debug"
|
136 |
+
msgstr "Freemius Debug"
|
137 |
+
|
138 |
+
#: includes/class-freemius.php:4223
|
139 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
140 |
+
msgstr "Jeg ved ikke hvad cURL er, eller hvordan jeg installerer det. Hjælp mig!"
|
141 |
+
|
142 |
+
#: includes/class-freemius.php:4225
|
143 |
+
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."
|
144 |
+
msgstr "Vi vil kontakte din udbyder og løse problemet. Når vi har opdatinger i sagen, vil vi følge op med en email til dig på %s."
|
145 |
+
|
146 |
+
#: includes/class-freemius.php:4232
|
147 |
+
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."
|
148 |
+
msgstr "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."
|
149 |
+
|
150 |
+
#: includes/class-freemius.php:4337
|
151 |
+
msgid "Yes - do your thing"
|
152 |
+
msgstr "Ja - fortsæt bare"
|
153 |
+
|
154 |
+
#: includes/class-freemius.php:4342
|
155 |
+
msgid "No - just deactivate"
|
156 |
+
msgstr "Nej - bare deaktiver"
|
157 |
+
|
158 |
+
#: includes/class-freemius.php4387, includes/class-freemius.php4881,
|
159 |
+
#: includes/class-freemius.php6032, includes/class-freemius.php13153,
|
160 |
+
#: includes/class-freemius.php16558, includes/class-freemius.php16646,
|
161 |
+
#: includes/class-freemius.php16812, includes/class-freemius.php19040,
|
162 |
+
#: includes/class-freemius.php19381, includes/class-freemius.php19391,
|
163 |
+
#: includes/class-freemius.php20051, includes/class-freemius.php20924,
|
164 |
+
#: includes/class-freemius.php21039, includes/class-freemius.php21183,
|
165 |
+
#: templates/add-ons.php:57
|
166 |
+
msgctxt "exclamation"
|
167 |
+
msgid "Oops"
|
168 |
+
msgstr "Ups"
|
169 |
+
|
170 |
+
#: includes/class-freemius.php:4456
|
171 |
+
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."
|
172 |
+
msgstr "Tak fordi du giver os en chance for at fixe det! En besked er lige blevet sendt til vores tekniske personale. Vi vil vende tilbage, så snart der er nyt om %s. Vi sætter pris på din tålmodighed."
|
173 |
+
|
174 |
+
#: includes/class-freemius.php:4878
|
175 |
+
msgctxt "addonX cannot run without pluginY"
|
176 |
+
msgid "%s cannot run without %s."
|
177 |
+
msgstr "%s virker ikke uden %s."
|
178 |
+
|
179 |
+
#: includes/class-freemius.php:4879
|
180 |
+
msgctxt "addonX cannot run..."
|
181 |
+
msgid "%s cannot run without the plugin."
|
182 |
+
msgstr "%s virker ikke uden pluginnet."
|
183 |
+
|
184 |
+
#: includes/class-freemius.php5052, includes/class-freemius.php5077,
|
185 |
+
#: includes/class-freemius.php:20122
|
186 |
+
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
187 |
+
msgstr "Uventet API-fejl. Kontakt %s's forfatter med følgende fejl."
|
188 |
+
|
189 |
+
#: includes/class-freemius.php:5720
|
190 |
+
msgid "Premium %s version was successfully activated."
|
191 |
+
msgstr "Premium-versionen af %s blev aktiveret."
|
192 |
+
|
193 |
+
#: includes/class-freemius.php5732, includes/class-freemius.php:7599
|
194 |
+
msgctxt ""
|
195 |
+
msgid "W00t"
|
196 |
+
msgstr "W00t"
|
197 |
+
|
198 |
+
#: includes/class-freemius.php:5747
|
199 |
+
msgid "You have a %s license."
|
200 |
+
msgstr "Du har en %s licens."
|
201 |
+
|
202 |
+
#: includes/class-freemius.php5751, includes/class-freemius.php15975,
|
203 |
+
#: includes/class-freemius.php15986, includes/class-freemius.php19292,
|
204 |
+
#: includes/class-freemius.php19642, includes/class-freemius.php19711,
|
205 |
+
#: includes/class-freemius.php:19876
|
206 |
+
msgctxt "interjection expressing joy or exuberance"
|
207 |
+
msgid "Yee-haw"
|
208 |
+
msgstr "Yee-haw"
|
209 |
+
|
210 |
+
#: includes/class-freemius.php:6015
|
211 |
+
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."
|
212 |
+
msgstr "%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."
|
213 |
+
|
214 |
+
#: includes/class-freemius.php:6019
|
215 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
216 |
+
msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
217 |
+
|
218 |
+
#: includes/class-freemius.php6028, templates/add-ons.php186,
|
219 |
+
#: templates/account/partials/addon.php:381
|
220 |
+
msgid "More information about %s"
|
221 |
+
msgstr "Mere information om %s"
|
222 |
+
|
223 |
+
#: includes/class-freemius.php:6029
|
224 |
+
msgid "Purchase License"
|
225 |
+
msgstr "Køb licens"
|
226 |
+
|
227 |
+
#: includes/class-freemius.php6964, templates/connect.php:163
|
228 |
+
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."
|
229 |
+
msgstr "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."
|
230 |
+
|
231 |
+
#: includes/class-freemius.php:6968
|
232 |
+
msgid "start the trial"
|
233 |
+
msgstr "start prøveperioden"
|
234 |
+
|
235 |
+
#: includes/class-freemius.php6969, templates/connect.php:167
|
236 |
+
msgid "complete the install"
|
237 |
+
msgstr "færdiggør installeringen"
|
238 |
+
|
239 |
+
#: includes/class-freemius.php:7081
|
240 |
+
msgid "You are just one step away - %s"
|
241 |
+
msgstr "Du mangler kun ét skridt - %s"
|
242 |
+
|
243 |
+
#: includes/class-freemius.php:7084
|
244 |
+
msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
|
245 |
+
msgid "Complete \"%s\" Activation Now"
|
246 |
+
msgstr "Færdiggør aktivering af \"%s\" nu"
|
247 |
+
|
248 |
+
#: includes/class-freemius.php:7162
|
249 |
+
msgid "We made a few tweaks to the %s, %s"
|
250 |
+
msgstr "Vi har foretaget nogle rettelser til %s, %s"
|
251 |
+
|
252 |
+
#: includes/class-freemius.php:7166
|
253 |
+
msgid "Opt in to make \"%s\" better!"
|
254 |
+
msgstr "Accepter for at gøre \"%s\" bedre!"
|
255 |
+
|
256 |
+
#: includes/class-freemius.php:7598
|
257 |
+
msgid "The upgrade of %s was successfully completed."
|
258 |
+
msgstr "Opgraderingen af %s blev fuldendt."
|
259 |
+
|
260 |
+
#: includes/class-freemius.php9802, includes/class-fs-plugin-updater.php1038,
|
261 |
+
#: includes/class-fs-plugin-updater.php1233,
|
262 |
+
#: includes/class-fs-plugin-updater.php1240,
|
263 |
+
#: templates/auto-installation.php:32
|
264 |
+
msgid "Add-On"
|
265 |
+
msgstr "Tilføjelse"
|
266 |
+
|
267 |
+
#: includes/class-freemius.php9804, templates/account.php335,
|
268 |
+
#: templates/account.php343, templates/debug.php360, templates/debug.php:551
|
269 |
+
msgid "Plugin"
|
270 |
+
msgstr "Plugin"
|
271 |
+
|
272 |
+
#: includes/class-freemius.php9805, templates/account.php336,
|
273 |
+
#: templates/account.php344, templates/debug.php360, templates/debug.php551,
|
274 |
+
#: templates/forms/deactivation/form.php:71
|
275 |
+
msgid "Theme"
|
276 |
+
msgstr "Tema"
|
277 |
+
|
278 |
+
#: includes/class-freemius.php:12596
|
279 |
+
msgid "An unknown error has occurred while trying to set the user's beta mode."
|
280 |
+
msgstr "An unknown error has occurred while trying to set the user's beta mode."
|
281 |
+
|
282 |
+
#: includes/class-freemius.php:13020
|
283 |
+
msgid "Invalid site details collection."
|
284 |
+
msgstr "Invalid site details collection."
|
285 |
+
|
286 |
+
#: includes/class-freemius.php:13140
|
287 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
288 |
+
msgstr "Vi kunne ikke finde din e-mailadresse i systemet, er du sikker på, det er den rigtige adresse?"
|
289 |
+
|
290 |
+
#: includes/class-freemius.php:13142
|
291 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
292 |
+
msgstr "Vi kan ikke finde nogen aktive licenser knyttet til den e-mailadresse, er du sikker på, det er den rigtige adresse?"
|
293 |
+
|
294 |
+
#: includes/class-freemius.php:13416
|
295 |
+
msgid "Account is pending activation."
|
296 |
+
msgstr "Konto afventer aktivering."
|
297 |
+
|
298 |
+
#: includes/class-freemius.php13528,
|
299 |
+
#: templates/forms/premium-versions-upgrade-handler.php:47
|
300 |
+
msgid "Buy a license now"
|
301 |
+
msgstr "Køb en licens nu"
|
302 |
+
|
303 |
+
#: includes/class-freemius.php13540,
|
304 |
+
#: templates/forms/premium-versions-upgrade-handler.php:46
|
305 |
+
msgid "Renew your license now"
|
306 |
+
msgstr "Forny din licens nu"
|
307 |
+
|
308 |
+
#: includes/class-freemius.php:13544
|
309 |
+
msgid "%s to access version %s security & feature updates, and support."
|
310 |
+
msgstr "%s to access version %s security & feature updates, and support."
|
311 |
+
|
312 |
+
#: includes/class-freemius.php:15957
|
313 |
+
msgid "%s activation was successfully completed."
|
314 |
+
msgstr "Aktivering af %s blev gennemført."
|
315 |
+
|
316 |
+
#: includes/class-freemius.php:15971
|
317 |
+
msgid "Your account was successfully activated with the %s plan."
|
318 |
+
msgstr "Din konto blev aktiveret med planen %s."
|
319 |
+
|
320 |
+
#: includes/class-freemius.php15982, includes/class-freemius.php:19707
|
321 |
+
msgid "Your t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|