Version Description
- Updated to latest client JS & CSS fixing a few bugs
- Removed deprecated functions for PHP 7.2 compatibility
- Updated to latest Freemius SDK 1.2.4
Download this release
Release Info
Developer | bradvin |
Plugin | FooBox Image Lightbox WordPress Plugin |
Version | 2.5.2 |
Comparing to | |
See all releases |
Code changes from version 2.5.1 to 2.5.2
- foobox-free.php +2 -2
- free/includes/foopluginbase/classes/class-foo-plugin-settings.php +6 -4
- free/includes/view-getting-started.php +2 -6
- free/js/foobox.free.min.js +1 -1
- freemius/.codeclimate.yml +19 -0
- freemius/.github/ISSUE_TEMPLATE.md +29 -0
- freemius/.travis.yml +11 -0
- freemius/LICENSE.txt +673 -673
- freemius/assets/css/admin/account.css +1 -1
- freemius/assets/css/admin/affiliation.css +1 -1
- freemius/assets/css/admin/common.css +2 -2
- freemius/assets/css/admin/connect.css +1 -1
- freemius/assets/css/admin/index.php +3 -0
- freemius/assets/css/customizer.css +1 -1
- freemius/assets/css/index.php +3 -0
- freemius/assets/img/foobox-image-lightbox.png +0 -0
- freemius/assets/img/index.php +3 -0
- freemius/assets/js/index.php +3 -0
- freemius/assets/js/nojquery.ba-postmessage.js +139 -139
- freemius/assets/js/nojquery.ba-postmessage.min.js +11 -11
- freemius/assets/js/postmessage.js +134 -134
- freemius/assets/scss/_mixins.scss +269 -269
- freemius/assets/scss/admin/_themes.scss +20 -20
- freemius/assets/scss/admin/account.scss +255 -255
- freemius/assets/scss/admin/add-ons.scss +448 -448
- freemius/assets/scss/admin/affiliation.scss +96 -96
- freemius/assets/scss/admin/index.php +3 -0
- freemius/assets/scss/customizer.scss +124 -124
- freemius/assets/scss/index.php +3 -0
- freemius/composer.json +10 -10
- freemius/config.php +3 -0
- freemius/gulpfile.js +32 -4
- freemius/includes/class-freemius-abstract.php +596 -596
- freemius/includes/class-freemius.php +572 -330
- freemius/includes/class-fs-logger.php +687 -687
- freemius/includes/class-fs-plugin-updater.php +12 -14
- freemius/includes/class-fs-security.php +85 -85
- freemius/includes/customizer/class-fs-customizer-support-section.php +3 -3
- freemius/includes/customizer/class-fs-customizer-upsell-control.php +2 -2
- freemius/includes/customizer/index.php +3 -0
- freemius/includes/debug/class-fs-debug-bar-panel.php +1 -1
- freemius/includes/debug/debug-bar-start.php +2 -2
- freemius/includes/entities/class-fs-affiliate-terms.php +127 -127
- freemius/includes/entities/class-fs-affiliate.php +83 -83
- freemius/includes/entities/class-fs-billing.php +94 -94
- freemius/includes/entities/class-fs-entity.php +148 -148
- freemius/includes/entities/class-fs-payment.php +93 -93
- freemius/includes/entities/class-fs-plugin-info.php +33 -33
- freemius/includes/entities/class-fs-plugin-license.php +224 -224
- freemius/includes/entities/class-fs-plugin-plan.php +144 -144
- freemius/includes/entities/class-fs-plugin-tag.php +23 -23
- freemius/includes/entities/class-fs-plugin.php +116 -116
- freemius/includes/entities/class-fs-pricing.php +140 -140
- freemius/includes/entities/class-fs-scope-entity.php +28 -28
- freemius/includes/entities/class-fs-site.php +147 -147
- freemius/includes/entities/class-fs-subscription.php +124 -124
- freemius/includes/entities/class-fs-user.php +61 -61
- freemius/includes/fs-core-functions.php +1097 -665
- freemius/includes/fs-essential-functions.php +3 -0
- freemius/includes/fs-plugin-info-dialog.php +98 -56
- freemius/includes/i18n.php +3 -1
- freemius/includes/l10n.php +0 -220
- freemius/includes/managers/class-fs-admin-menu-manager.php +849 -849
- freemius/includes/managers/class-fs-cache-manager.php +280 -280
- freemius/includes/managers/class-fs-key-value-storage.php +327 -327
- freemius/includes/managers/class-fs-license-manager.php +103 -103
- freemius/includes/managers/class-fs-option-manager.php +352 -352
- freemius/includes/managers/class-fs-plan-manager.php +161 -161
- freemius/includes/managers/class-fs-plugin-manager.php +219 -219
- freemius/includes/sdk/FreemiusWordPress.php +15 -14
- freemius/includes/sdk/LICENSE.txt +340 -340
- freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +47 -47
- freemius/languages/freemius-da_DK.po +1826 -1826
- freemius/languages/freemius-en.mo +0 -0
- freemius/languages/freemius-en.po +1520 -1368
- freemius/languages/freemius-es_ES.mo +0 -0
- freemius/languages/freemius-es_ES.po +1238 -0
foobox-free.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: FooBox Image Lightbox
|
5 |
Plugin URI: http://fooplugins.com/plugins/foobox/
|
6 |
Description: The best responsive lightbox for WordPress.
|
7 |
-
Version: 2.5.
|
8 |
Author: FooPlugins
|
9 |
Author URI: http://fooplugins.com
|
10 |
License: GPL2
|
@@ -21,7 +21,7 @@ if ( !class_exists( 'FooBox' ) ) {
|
|
21 |
define( 'FOOBOX_BASE_ACTIVATION_REDIRECT_TRANSIENT_KEY', '_foobox_activation_redirect' );
|
22 |
define( 'FOOBOX_BASE_PATH', plugin_dir_path( __FILE__ ) );
|
23 |
define( 'FOOBOX_BASE_URL', plugin_dir_url( __FILE__ ) );
|
24 |
-
define( 'FOOBOX_BASE_VERSION', '2.5.
|
25 |
// Create a helper function for easy SDK access.
|
26 |
function foobox_fs()
|
27 |
{
|
4 |
Plugin Name: FooBox Image Lightbox
|
5 |
Plugin URI: http://fooplugins.com/plugins/foobox/
|
6 |
Description: The best responsive lightbox for WordPress.
|
7 |
+
Version: 2.5.2
|
8 |
Author: FooPlugins
|
9 |
Author URI: http://fooplugins.com
|
10 |
License: GPL2
|
21 |
define( 'FOOBOX_BASE_ACTIVATION_REDIRECT_TRANSIENT_KEY', '_foobox_activation_redirect' );
|
22 |
define( 'FOOBOX_BASE_PATH', plugin_dir_path( __FILE__ ) );
|
23 |
define( 'FOOBOX_BASE_URL', plugin_dir_url( __FILE__ ) );
|
24 |
+
define( 'FOOBOX_BASE_VERSION', '2.5.2' );
|
25 |
// Create a helper function for easy SDK access.
|
26 |
function foobox_fs()
|
27 |
{
|
free/includes/foopluginbase/classes/class-foo-plugin-settings.php
CHANGED
@@ -81,16 +81,18 @@ if ( !class_exists( 'Foo_Plugin_Settings_v2_0' ) ) {
|
|
81 |
|
82 |
$this->_settings_sections[$section_id] = $section;
|
83 |
|
84 |
-
$
|
85 |
-
'echo "' . $desc . '";' );
|
86 |
-
|
87 |
-
add_settings_section( $section_id, $title, $section_callback, $this->plugin_slug );
|
88 |
|
89 |
//post action
|
90 |
do_action( $this->plugin_slug . '-after_settings_section', $section_id, $title, $desc );
|
91 |
}
|
92 |
}
|
93 |
|
|
|
|
|
|
|
|
|
|
|
94 |
function add_section_to_tab($tab_id, $section_id, $title, $desc = '') {
|
95 |
if ( array_key_exists( $tab_id, $this->_settings_tabs ) ) {
|
96 |
|
81 |
|
82 |
$this->_settings_sections[$section_id] = $section;
|
83 |
|
84 |
+
add_settings_section( $section_id, $title, array( $this, 'echo_section_desc' ), $this->plugin_slug );
|
|
|
|
|
|
|
85 |
|
86 |
//post action
|
87 |
do_action( $this->plugin_slug . '-after_settings_section', $section_id, $title, $desc );
|
88 |
}
|
89 |
}
|
90 |
|
91 |
+
function echo_section_desc( $arg ) {
|
92 |
+
$section = $this->_settings_sections[ $arg['id'] ];
|
93 |
+
echo $section['desc'];
|
94 |
+
}
|
95 |
+
|
96 |
function add_section_to_tab($tab_id, $section_id, $title, $desc = '') {
|
97 |
if ( array_key_exists( $tab_id, $this->_settings_tabs ) ) {
|
98 |
|
free/includes/view-getting-started.php
CHANGED
@@ -93,17 +93,13 @@ $button_text = $show_trial_message ? __( 'Already convinced? Upgrade to PRO!', '
|
|
93 |
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Social Sharing', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Share content to your favourite social networks with ease.', 'foobox-image-lightbox' ); ?>
|
94 |
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Look and feel', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Default, Metro and Flat styles available. You can also change color schemes and icons.', 'foobox-image-lightbox' ); ?>
|
95 |
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Fullscreen Mode', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Use the browser\'s native fullscreen mode to showcase your media.', 'foobox-image-lightbox' ); ?>
|
96 |
-
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( '
|
|
|
97 |
|
98 |
<?php if ( !foobox_hide_pricing_menu() ) { ?>
|
99 |
<h4><?php printf( '<a href="%s">%s</a>', esc_url ( foobox_pricing_url() ), $button_text ); ?></h4>
|
100 |
<?php } ?>
|
101 |
|
102 |
-
<h2><?php _e( 'Optimized Asset Loading', 'foobox-image-lightbox' ); ?></h2>
|
103 |
-
<p><?php _e( 'Do you watch what javascript or stylesheet files are loaded on your site? Choose to only load FooBox assets on certain pages, or all of them. Either opt-in or opt-out, you have the choice.', 'foobox-image-lightbox' ); ?></p>
|
104 |
-
|
105 |
-
<h2><?php _e( 'Advanced Settings', 'foobox-image-lightbox' ); ?></h2>
|
106 |
-
<p><?php _e( 'With 85+ settings available, you can customize FooBox to your heart\'s content. But if you are a power-user, you can add custom JS and CSS using our advanced settings.', 'foobox-image-lightbox' ); ?></p>
|
107 |
</div>
|
108 |
</div>
|
109 |
<div id="demo_tab" class="feature-section nav-container" style="display: none">
|
93 |
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Social Sharing', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Share content to your favourite social networks with ease.', 'foobox-image-lightbox' ); ?>
|
94 |
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Look and feel', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Default, Metro and Flat styles available. You can also change color schemes and icons.', 'foobox-image-lightbox' ); ?>
|
95 |
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Fullscreen Mode', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Use the browser\'s native fullscreen mode to showcase your media.', 'foobox-image-lightbox' ); ?>
|
96 |
+
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'Custom JS & CSS', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'Power-users can add custom JS and CSS using our advanced settings.', 'foobox-image-lightbox' ); ?>
|
97 |
+
<p><span class="dashicons dashicons-yes"></span><strong><?php _e( 'PLUS tons more!', 'foobox-image-lightbox' ); ?></strong> - <?php _e( 'With 85+ settings available, you can customize FooBox to your heart\'s content.', 'foobox-image-lightbox' ); ?>
|
98 |
|
99 |
<?php if ( !foobox_hide_pricing_menu() ) { ?>
|
100 |
<h4><?php printf( '<a href="%s">%s</a>', esc_url ( foobox_pricing_url() ), $button_text ); ?></h4>
|
101 |
<?php } ?>
|
102 |
|
|
|
|
|
|
|
|
|
|
|
103 |
</div>
|
104 |
</div>
|
105 |
<div id="demo_tab" class="feature-section nav-container" style="display: none">
|
free/js/foobox.free.min.js
CHANGED
@@ -7,4 +7,4 @@
|
|
7 |
* You are free to use FooBox jQuery in personal projects as long as this copyright header is left intact.
|
8 |
*/
|
9 |
!function(a,b,c,undefined){if(a&&b){b.FooBox={defaults:{affiliate:{enabled:!0,prefix:"Powered by ",url:"http://fooplugins.com/plugins/foobox/"},alwaysInit:!1,closeOnOverlayClick:!0,containerCssClass:"fbx-instance",countMessage:"item %index of %total",error:"Could not load the item",excludes:".fbx-link, .nofoobox",externalSelector:"a[data-foobox],input[data-foobox]",fitToScreen:!1,hideScrollbars:!0,loadDelay:0,loaderTimeout:600,modalClass:"",preload:!1,rel:null,resizeSpeed:300,selector:"a",showButtons:!0,showCount:!0,style:"fbx-rounded",theme:"fbx-light",transitionInSpeed:200,transitionOutSpeed:200,initCallback:null,loop:!0},version:"2.0.10",instances:[],ready:function(b){(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?b(a):setTimeout(function(){FooBox.ready(b)},1)}},FooBox.$=a,FooBox.format=function(a,b,c){var d,e,f=arguments[0];for(d=0;d<arguments.length-1;d++)e=new RegExp("\\{"+d+"\\}","gm"),f=f.replace(e,arguments[d+1]);return f},FooBox.browser={isIE:!1,isChrome:!1,isSafari:!1,isLtSafari10:!1,version:0,css:"",iOS:!1,Mac:!1,isMobile:function(a){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))}(navigator.userAgent||navigator.vendor||b.opera),check:function(){var a=navigator.appVersion.toLowerCase(),c=navigator.userAgent.toLowerCase(),d=navigator.platform;FooBox.browser.iOS=/(iPad|iPhone|iPod)/g.test(d),1==FooBox.browser.iOS&&(FooBox.browser.css+=" fbx-ios"),FooBox.browser.Mac=/(Mac)/g.test(d),1==FooBox.browser.Mac&&(FooBox.browser.css+=" fbx-mac"),FooBox.browser.isChrome=a.indexOf("chrome")>-1||a.indexOf("crios")>-1,FooBox.browser.isChrome&&(FooBox.browser.css+=" fbx-chrome"),FooBox.browser.isSafari=a.indexOf("safari")>-1&&!FooBox.browser.isChrome,FooBox.browser.isSafari&&(FooBox.browser.css+=" fbx-safari",FooBox.browser.isLtSafari10=/constructor/i.test(b.HTMLElement)),FooBox.browser.isFirefox=c.indexOf("firefox")>-1,FooBox.browser.isFirefox&&(FooBox.browser.css+=" fbx-firefox");var e=c.indexOf("msie "),f=c.indexOf("trident/"),g=c.indexOf("edge/");if(FooBox.browser.isIE=e>-1||f>-1||g>-1,FooBox.browser.isIE){if(e>-1)FooBox.browser.version=parseInt(c.substring(e+5,c.indexOf(".",e)),10);else if(f>-1){var h=c.indexOf("rv:");FooBox.browser.version=parseInt(c.substring(h+3,c.indexOf(".",h)),10)}else g>-1&&(FooBox.browser.version=parseInt(c.substring(g+5,c.indexOf(".",g)),10));FooBox.browser.css=FooBox.format("fbx-ie fbx-ie{0}",FooBox.browser.version)}},supportsTransitions:function(){var a,b=document.body||document.documentElement,c=b.style,d="transition";if("string"==typeof c[d])return!0;a=["Moz","Webkit","Khtml","O","ms"],d=d.charAt(0).toUpperCase()+d.substr(1);for(var e=0;e<a.length;e++)if("string"==typeof c[a[e]+d])return!0;return!1},transitionEnd:function(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(c.hasOwnProperty(a)&&b.style[a]!==undefined)return c[a];return null}},FooBox.browser.check(),FooBox.qualifiedURL=function(a){var b=document.createElement("a");return b.href=a,b.href},c||(c={}),c.log=c.log||function(){},c.warn=c.warn||function(){},c.error=c.error||function(){},c.info=c.info||function(){};var d={write:function(){c.log(FooBox.format.apply(d,arguments))},error:function(){1===arguments.length&&arguments[0]instanceof Error?c.error(arguments[0]):c.error(FooBox.format.apply(d,arguments))}};jQuery.Event.prototype.fb={instance:null,modal:null,options:null},FooBox.raise=function(b,c,d){d=d||{};var e=a.Event(c);return e.fb={},e.fb.instance=b,e.fb.modal=b.modal.element,e.fb.options=b.options,a.extend(!0,e.fb,d),b.element.one(c,function(a){a.stopPropagation()}).trigger(e),e},FooBox.isjQuery=function(a){return a instanceof jQuery?!0:a&&a.jquery},FooBox.options={isMultipart:function(a,b){return"string"==typeof a&&a.length>0&&-1!==a.indexOf(b)},hasProperties:function(a){if("object"!=typeof a)return!1;var b;for(b in a)if(a.hasOwnProperty(b))return!0;return!1},get:function(a,b){if(FooBox.options.isMultipart(b,".")){var c=b.substring(0,b.indexOf(".")),d=b.substring(b.indexOf(".")+1);return a[c]=a[c]||{},FooBox.options.get(a[c],d)}return a[b]},set:function(a,b,c){if(FooBox.options.isMultipart(b,".")){var d=b.substring(0,b.indexOf(".")),e=b.substring(b.indexOf(".")+1);a[d]=a[d]||{},FooBox.options.set(a[d],e,c)}else a[b]=c},merge:function(a,b,c){var d,e=Array.prototype.slice.call(arguments);for(a=e.shift(),b=e.shift(),FooBox.options._merge(a,b),d=0;d<e.length;d++)c=e[d],FooBox.options._merge(a,c);return a},_merge:function(b,c){var d;for(d in c)c.hasOwnProperty(d)&&(FooBox.options.hasProperties(c[d])&&!a.isArray(c[d])?(b[d]=b[d]||{},FooBox.options._merge(b[d],c[d])):a.isArray(c[d])?(b[d]=[],a.extend(!0,b[d],c[d])):b[d]=c[d])}},FooBox.objects={registered:{},ensure:function(a){return FooBox.objects.registered[a]=FooBox.objects.registered[a]||[]},register:function(b,c,d){var e=FooBox.objects.ensure(b);return e.push(c),"object"==typeof d&&a.extend(!0,FooBox.defaults,d),!0},load:function(a,b){var c,e,f=[],g=FooBox.objects.ensure(a);for(e=0;e<g.length;e++)try{c=g[e],f.push(new c(b))}catch(h){d.error(h)}b.objects=b.objects||{},b.objects[a]=f},call:function(b,c,e,f,g){var h,i=Array.prototype.slice.call(arguments);b=i.shift(),c=i.shift(),e=i.shift();for(var j=c.objects[b]||[],k=0;k<j.length;k++)try{if(h=j[k],!a.isFunction(h[e]))continue;h[e].apply(h,i)}catch(l){d.error(l)}},get:function(b,c,d){var e,f=c.objects[b];if(!f||!a.isFunction(d))return null;for(e=0;e<f.length;e++)if(d(f[e]))return f[e];return null}},FooBox.addons={_ns:"addons",validate:function(b){return a.isFunction(b)?!0:(d.error('Expected type "function", received type "{0}".',typeof b),!1)},register:function(a,b){return FooBox.addons.validate(a)?FooBox.objects.register(FooBox.addons._ns,a,b):(d.error("Failed to register the addon."),!1)},load:function(a){FooBox.objects.load(FooBox.addons._ns,a)},call:function(a,b,c,d){var e=Array.prototype.slice.call(arguments);e.unshift(FooBox.addons._ns),FooBox.objects.call.apply(this,e)}},FooBox.handlers={_ns:"handlers",validate:function(b){if(!a.isFunction(b))return d.error('Expected type "function", received type "{0}".',typeof b),!1;var c=new b;return a.isFunction(c.handles)?a.isFunction(c.defaults)?a.isFunction(c.parse)?a.isFunction(c.load)?a.isFunction(c.getSize)?a.isFunction(c.hasChanged)?a.isFunction(c.preload)?!0:(d.error('The required "preload" method is not implemented.'),!1):(d.error('The required "hasChanged" method is not implemented.'),!1):(d.error('The required "getSize" method is not implemented.'),!1):(d.error('The required "load" method is not implemented.'),!1):(d.error('The required "parse" method is not implemented.'),!1):(d.error('The required "defaults" method is not implemented.'),!1):(d.error('The required "handles" method is not implemented.'),!1)},register:function(a,b){return FooBox.handlers.validate(a)?FooBox.objects.register(FooBox.handlers._ns,a,b):(d.error("Failed to register the handler."),!1)},load:function(a){FooBox.objects.load(FooBox.handlers._ns,a)},call:function(a,b,c,d){var e=Array.prototype.slice.call(arguments);e.unshift(FooBox.handlers._ns),FooBox.objects.call.apply(this,e)},get:function(a,b){return FooBox.objects.get(FooBox.handlers._ns,a,function(a){return a.type==b})}},FooBox.Item=function(b,c,d){return this.type=b,this.element=FooBox.isjQuery(c)?c:a(c),this.handler=d,this.width=null,this.height=null,this.url=null,this.overflow=!1,this.preloaded=!1,this.proportion=!1,this.error=!1,this},FooBox.Size=function(a,b){return this.width="number"==typeof a?a:parseInt(a,0),this.height="number"==typeof b?b:parseInt(b,0),this.equalTo=function(a){return this.width==a.width&&this.height==a.height},this},FooBox.Size.check=function(a){return"number"==typeof a?a:isNaN(parseInt(a))?null:parseInt(a)},FooBox.Timer=function(){this.id=null,this.busy=!1;var a=this;return this.start=function(b,c,d){d=d||b,a.stop(),a.id=setTimeout(function(){b.call(d),a.id=null,a.busy=!1},c),a.busy=!0},this.stop=function(){null!==a.id&&a.busy!==!1&&(clearTimeout(a.id),a.id=null,a.busy=!1)},this},a.fn.foobox=function(b){return b=b||{},this.each(function(){var c=a(this).data("fbx_instance");if(c instanceof FooBox.Instance)if(1==c.options.alwaysInit){var d=c.options;c.destroy(),c=new FooBox.Instance(c.id),c.init(this,a.extend(!0,d,b))}else c.reinit(b);else{if(c=a(this).data("fbx_p_instance"),c instanceof FooBox.Instance)return;c=new FooBox.Instance,c.init(this,b)}})},FooBox.Modal=function(b){this.FooBox=b,this.element=null,this.loaderTimeout=new FooBox.Timer,this._first=!1,this._busy=!1,this._closed=!1;var c=this;return this.init=function(a,b){c.setup.html(),c.setup.options(b),c.setup.bind()},this.reinit=function(a){c.setup.options(a)},this.destroy=function(){FooBox.isjQuery(c.element)&&c.element.remove()},this.setup={html:function(){if(!FooBox.isjQuery(c.element)){c.element=a('<div class="fbx-modal"></div>'),c.element.append('<div class="fbx-inner-spacer"></div>');var b=a('<div class="fbx-stage"></div>');b.append('<div class="fbx-item-current"></div>'),b.append('<div class="fbx-item-next"></div>');var d=a('<div class="fbx-inner fbx-inner-shadow"></div>');d.append(b),d.append('<a class="fbx-prev fbx-btn-transition fbx-btn-shadow"></a>'),d.append('<div class="fbx-credit"><a target="_blank" href=""><em></em><span> FooBox</span></a></div>'),d.append('<span class="fbx-count" />'),d.append('<a class="fbx-next fbx-btn-transition fbx-btn-shadow"></a>'),d.append('<a class="fbx-close fbx-btn-transition fbx-btn-shadow"></a>'),c.element.append('<div class="fbx-loader"><div></div></div>'),c.element.append(d),c.FooBox.raise("foobox.setupHtml"),a("body").append(c.element)}},options:function(a){var b;c.element.removeClass().addClass("fbx-modal").addClass(FooBox.format("fbx-{0}",c.FooBox.id)).addClass(c.FooBox.element.data("style")||a.style).addClass(c.FooBox.element.data("theme")||a.theme).addClass(c.FooBox.element.data("modal-class")).addClass(a.modalClass).data("fbx_instance",c.FooBox),c.element.addClass(FooBox.browser.css),b=a.affiliate.enabled?"":"none",c.element.find(".fbx-credit").css("display",b),a.affiliate.enabled&&(c.element.find(".fbx-credit > a").attr("href",a.affiliate.url),c.element.find(".fbx-credit > a > em").text(a.affiliate.prefix)),b=a.showCount&&c.FooBox.items.multiple()?"":"none",c.element.find(".fbx-count").css("display",b),a.showButtons&&c.FooBox.items.multiple()||c.element.addClass("fbx-no-buttons"),c.FooBox.raise("foobox.setupOptions")},bind:function(){1==c.FooBox.options.closeOnOverlayClick&&c.element.off("click.foobox").on("click.foobox",function(b){1==c.FooBox.options.closeOnOverlayClick&&a(b.target).is(".fbx-modal")&&c.close()}),c.element.find(".fbx-close").off("click.foobox").on("click.foobox",function(a){a.preventDefault(),a.stopPropagation(),c.close()}).end().find(".fbx-prev").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||c.prev()}).end().find(".fbx-next").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||c.next()})}},this.prioritize=function(){FooBox.instances.length>1&&c.element.nextAll(".fbx-modal:last").after(c.element)},this.preload=function(){if(1==c.FooBox.options.preload){var a=c.FooBox.items.prev();a&&a.handler.preload(a);var b=c.FooBox.items.next();b&&b.handler.preload(b)}},this.show=function(b){function e(a){if(c.loaderTimeout.stop(),c.element.removeClass("fbx-loading"),c._busy=!1,d.error(a),!c.FooBox.raise("foobox.onError",{error:a}).isDefaultPrevented()){var e=c.FooBox.items.error(f.index);null!=e&&c.show(b)}}b=b||!1,c._first=b,c._busy=!0,c._closed=!1,a("body").addClass("fbx-active"),c.FooBox.options.hideScrollbars&&a("html").addClass("fbx-no-scroll");var f=c.FooBox.items.current();1==f.error?c.element.addClass("fbx-error"):c.element.removeClass("fbx-error"),c.element.hasClass("fbx-show")||(c.prioritize(),c.element.addClass("fbx-loading").find(".fbx-inner").css({width:"100px",height:"100px","margin-top":"-50px","margin-left":"-50px"}));var g=c.element.find(".fbx-item-current"),h=c.element.find(".fbx-item-next");if(h.hide().css("opacity","0"),c.element.find(".fbx-count").text(c.FooBox.options.countMessage.replace("%index",""+(c.FooBox.items.indexes.current+1)).replace("%total",""+c.FooBox.items.array.length)),c.FooBox.raise("foobox.beforeLoad",{item:f}).isDefaultPrevented())return void(c._busy=!1);if(f.handler.hasChanged(f)){var i=f.index,j=f.element.get(0);f=f.handler.parse(f.element);var k=c.FooBox.raise("foobox.parseItem",{element:f.element,item:f});j.index=k.fb.item.index=i,c.FooBox.items.array[i]=k.fb.item}c.preload(),c.loaderTimeout.start(function(){c.element.addClass("fbx-loading")},c.FooBox.options.loaderTimeout),setTimeout(function(){c.checkForLoop(f),f.handler.load(f,h,function(a){return 1==c._closed?void(c._busy=!1):void c.transitionOut(g,function(){return 1==c._closed?void(c._busy=!1):void c.resize(a,h,function(){return 1==c._closed?void(c._busy=!1):(c.loaderTimeout.stop(),h.show(),void c.transitionIn(h,function(){return 1==c._closed?void(c._busy=!1):(h.add(g).toggleClass("fbx-item-next fbx-item-current"),g.empty(),void(c.element.hasClass("fbx-show")?(c.element.removeClass("fbx-loading"),c.FooBox.raise("foobox.afterLoad",{item:f}),c._busy=!1):c.FooBox.raise("foobox.beforeShow",{item:f}).isDefaultPrevented()||(c.element.removeClass("fbx-loading").addClass("fbx-show"),c.FooBox.raise("foobox.afterShow",{item:f}),c.FooBox.raise("foobox.afterLoad",{item:f}),c._busy=!1)))},e))},e)},e)},e)},c.FooBox.options.loadDelay)},this.checkForLoop=function(a){1!=c.FooBox.options.loop&&(c.element.find(".fbx-prev, .fbx-next").removeClass("fbx-disabled"),c.FooBox.items.is.first(a)&&c.element.find(".fbx-prev").addClass("fbx-disabled"),c.FooBox.items.is.last(a)&&c.element.find(".fbx-next").addClass("fbx-disabled"))},this.resize=function(b,d,e,f){try{if(0===b.width||0===b.height)return void(a.isFunction(f)&&f(FooBox.format("Invalid size supplied. Width = {0}, Height = {1}",b.width,b.height)));var g=c.FooBox.items.current(),h=new FooBox.Size(b.width,b.height),i=c.element.find(".fbx-inner"),j=c.element.find(".fbx-inner-spacer"),k=parseInt(j.css("padding-top"),0),l=parseInt(j.css("padding-bottom"),0),m=parseInt(j.css("padding-left"),0),n=parseInt(j.css("padding-right"),0),o=parseInt(i.css("border-top-width"),0),p=parseInt(i.css("border-bottom-width"),0),q=parseInt(i.css("border-left-width"),0),r=parseInt(i.css("border-right-width"),0),s=parseInt(i.css("padding-left"),0),t=k+l+2*s+o+p,u=m+n+2*s+q+r,v=new FooBox.Size(parseInt(i.css("width"),0),parseInt(i.css("height"),0)),w=new FooBox.Size(c.element.width()-u,c.element.height()-t),x=w.width/b.width;b.height*x>w.height&&(x=w.height/b.height),c.FooBox.options.fitToScreen===!0||1==g.proportion&&(b.height>w.height||b.width>w.width)?(b.height=Math.floor(b.height*x),b.width=Math.floor(b.width*x)):0==g.proportion&&(b.height>w.height&&(b.height=w.height),b.width>w.width&&(b.width=w.width)),b.height<100&&(b.height=100),b.width<100&&(b.width=100);var y=-(b.height/2+s+(l-k/2)/2)+(q+r)/2,z=-(b.width/2+s+(q+r)/2);if(v.equalTo(b))i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e();else if(!c.FooBox.raise("foobox.beforeResize",{item:g,size:b,offset:{top:y,left:z},error:f,success:e}).isDefaultPrevented())if(y=-(b.height/2+s+(l-k/2)/2)+(q+r)/2,z=-(b.width/2+s+(q+r)/2),c.element.hasClass("fbx-show"))if(FooBox.browser.supportsTransitions()){var A=c.FooBox.options.resizeSpeed/1e3,B="all "+A+"s ease-in-out";i.css({WebkitTransition:B,MozTransition:B,MsTransition:B,OTransition:B,transition:B}),i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),setTimeout(function(){i.css({WebkitTransition:"",MozTransition:"",MsTransition:"",OTransition:"",transition:""}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e(b)},c.FooBox.options.resizeSpeed)}else i.animate({height:b.height,width:b.width,"margin-top":y,"margin-left":z},c.FooBox.options.resizeSpeed,function(){c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e(b)});else i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e()}catch(C){a.isFunction(f)&&f(C)}},this.overflow=function(a,b,d,e){var f=e.find(".fbx-item");1==a.overflow&&(d.width<.8*b.width||d.height<.8*b.height)||1==a.overflow&&0==a.proportion&&(d.width<b.width||d.height<b.height)||1==a.overflow&&"html"==a.type?("html"==a.type?(f.css({width:"100%",height:"auto",overflow:""}),e.css("overflow","auto")):(f.css({width:b.width,height:b.height,overflow:""}),e.css({"overflow-x":b.width<=d.width?"hidden":"","overflow-y":b.height<=d.height?"hidden":""})),c.FooBox.raise("foobox.showOverflow",{item:a,container:e})):(f.css({width:"",height:"",overflow:"hidden"}),e.css({"overflow-x":"","overflow-y":"",overflow:"hidden"}),c.FooBox.raise("foobox.hideOverflow",{item:a,container:e}))},this.transitionOut=function(b,d,e){try{if(!c.element.hasClass("fbx-show"))return void(a.isFunction(d)&&d());b.animate({opacity:0},b.is(":visible")?c.FooBox.options.transitionOutSpeed:0,function(){a.isFunction(d)&&d()})}catch(f){a.isFunction(e)&&e(f)}},this.transitionIn=function(b,d,e){try{if(!c.element.hasClass("fbx-show"))return b.css({opacity:1}),void(a.isFunction(d)&&d());b.animate({opacity:1},c.FooBox.options.transitionInSpeed,function(){a.isFunction(d)&&d()})}catch(f){a.isFunction(e)&&e(f)}},this.close=function(){c.FooBox.raise("foobox.beforeClose").isDefaultPrevented()||(c._closed=!0,c._busy=!1,c.element.removeClass("fbx-loading fbx-show"),a("body").removeClass("fbx-active"),c.FooBox.raise("foobox.close"),c.element.find(".fbx-item-current, .fbx-item-next").empty(),a("html").removeClass("fbx-no-scroll"),c.FooBox.raise("foobox.afterClose"))},this.prev=function(a){if(1!=c._busy){if(c.FooBox.items.indexes.set(c.FooBox.items.indexes.prev),"string"==typeof a)for(var b=c.FooBox.items.current();b.type!=a;)c.FooBox.items.indexes.set(c.FooBox.items.indexes.prev),b=c.FooBox.items.current();c.show(!1),c.FooBox.raise("foobox.previous")}},this.next=function(a){if(1!=c._busy){if(c.FooBox.items.indexes.set(c.FooBox.items.indexes.next),"string"==typeof a)for(var b=c.FooBox.items.current();b.type!=a;)c.FooBox.items.indexes.set(c.FooBox.items.indexes.next),b=c.FooBox.items.current();c.show(!1),c.FooBox.raise("foobox.next")}},this},FooBox.Instance=function(b){this.id=null,"number"==typeof b?(this.id=b,FooBox.instances[b-1]=this):this.id=FooBox.instances.push(this),this.element=null,this.options=a.extend(!0,{},FooBox.defaults),this.modal=new FooBox.Modal(this),this.objects={},FooBox.addons.load(this),FooBox.handlers.load(this);var c=this;return this.raise=function(a,b){return FooBox.raise(c,a,b)},this.init=function(b,d){c.element=FooBox.isjQuery(b)?b:a(b),c.options=FooBox.options.merge(c.options,d||{}),FooBox.addons.call(c,"preinit",c.element,c.options),c.items.init(),c.items.array.length>0?(c.element.data("fbx_instance",c),c.options.containerCssClass&&c.element.addClass(c.options.containerCssClass),c.setup.bind(),c.modal.init(b,c.options),FooBox.handlers.call(c,"init",c.element,c.options),c.raise("foobox.initialized"),a.isFunction(c.options.initCallback)&&c.options.initCallback.call(c)):c.destroy()},this.reinit=function(a){c.options=FooBox.options.merge(c.options,a||{}),c.items.init(!0),c.items.array.length>0?(c.setup.bind(),c.modal.reinit(c.options),FooBox.handlers.call(c,"reinit",c.options),c.raise("foobox.reinitialized")):c.destroy()},this.destroy=function(){FooBox.addons.call(c,"destroy"),FooBox.handlers.call(c,"destroy"),c.items.destroy(),c.modal.destroy(),c.element.removeClass("fbx-instance fbx-item").data({fbx_instance:null,fbx_p_instance:null}),c.id==FooBox.instances.length?FooBox.instances.splice(c.id-1,1):FooBox.instances[c.id-1]=null,c.raise("foobox.destroy")},this.setup={bind:function(){a(c.options.externalSelector).off("click.fooboxExternal").on("click.fooboxExternal",function(b){b.preventDefault();var c=a(this).data("foobox"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof FooBox.Instance&&e.modal instanceof FooBox.Modal&&e.modal.show(!0),!1})}},this.items={array:[],indexes:{prev:-1,current:0,next:1,direction:"*",set:function(a){var b=c.items.indexes.current;a=a||0,a=a>c.items.array.length-1?0:0>a?c.items.array.length-1:a;var d=a-1,e=a+1;c.items.indexes.current=a,c.items.indexes.prev=0>d?c.items.array.length-1:d,c.items.indexes.next=e>c.items.array.length-1?0:e,c.items.indexes.direction=c.items.indexes._direction(b,a,c.items.array.length-1)},_direction:function(a,b,c){return 0==b&&a==c?">":b==c&&0==a?"<":b>a?">":a>b?"<":"*"}},new_array:function(b){b=b||!1;var d,e,f,g=0;if(1==b){if(c.items.array.length>0){for(var h=0;h<c.items.array.length;h++)d=c.items.array[h],FooBox.isjQuery(d.element)?0==d.element.parents(":first").length&&(c.items.array.splice(h,1),h-=1):d.option||(c.items.array.splice(h,1),h-=1);for(var i=0;i<c.items.array.length;i++)d=c.items.array[i],FooBox.isjQuery(d.element)?(f=d.element.get(0),f.index=d.index=i):d.index=i}}else c.items.array=[];if(a.isArray(c.options.items))for(var j=0;j<c.options.items.length;j++)if(d=c.options.items[j],-1==c.items.indexOf(d))for(var k=0;k<c.objects.handlers.length;k++)if(c.objects.handlers[k].type==d.type){d.index=g,d.option=!0,d.handler=c.objects.handlers[k],d.handler.defaults(d),e=c.raise("foobox.parseItem",{element:null,item:d}),c.items.array.push(e.fb.item),g++;break}},init:function(a){a=a||!1,c.items.new_array(a),c.element.is(c.options.selector)&&!c.element.is(c.options.excludes)&&c.items.add(c.element)?c.element.off("click.item").on("click.item",c.items.clicked):c.element.find(c.options.selector).not(c.options.excludes).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked),c.items.rel()},destroy:function(){var b,d;for(d=0;d<c.items.array.length;d++)b=c.items.array[d],a.isFunction(b.destroy)&&b.destroy(),FooBox.isjQuery(b.element)&&b.element.off("click.item").removeClass("fbx-link").data("fbx_p_instance",null);c.items.array=[]},rel:function(){var b=c.options.rel||c.element.attr("rel")||(c.items.first(function(a){return FooBox.isjQuery(a.element)?"string"==typeof a.element.attr("rel"):!1})||{element:a()}).element.attr("rel");"string"==typeof b&&a('[rel="'+b+'"]').not(c.options.excludes).not(c.element).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked)},indexOf:function(a,b){if(!a)return-1;b=b||"url";var d;for(d=0;d<c.items.array.length;d++)if(c.items.array[d][b]==a[b])return d;return-1},is:{first:function(a){return c.items.array&&0!=c.items.array.length?c.items.array[0].index==a.index:!1},last:function(a){return c.items.array&&0!=c.items.array.length?c.items.array[c.items.array.length-1].index==a.index:!1}},add:function(b){b=FooBox.isjQuery(b)?b:a(b);var d=c.items.parse(b,c.items.array.length);if(null===d)return!1;var e=b.get(0),f=c.items.indexOf(d);-1!=f?(d=c.items.array[f],e.index=d.index):e.index=d.index=c.items.array.push(d)-1;var g=b.addClass("fbx-link").data("fbx_p_instance");return g instanceof FooBox.Instance||b.data("fbx_p_instance",c),!0},get:function(b){b=FooBox.isjQuery(b)?b:a(b);var d=null,e=b.get(0).index;return e&&e>0&&e<=c.items.array.length-1&&(d=c.items.array[e]),d},parse:function(b,d){b=FooBox.isjQuery(b)?b:a(b);for(var e,f,g=0;g<c.objects.handlers.length;g++)if(c.objects.handlers[g].handles(b,c.element)){e=c.objects.handlers[g].parse(b),isNaN(d)||(e.index=d),f=c.raise("foobox.parseItem",{element:b,item:e});break}return"undefined"!=typeof f&&f.fb.item?f.fb.item:null},error:function(b){function d(b){var c=this;return c.FooBox=b,c.type="error",c.handles=function(){return!1},c.hasChanged=function(){return!1},c.defaults=function(){},c.parse=function(){},c.load=function(b,d,e,f){try{d.empty().append(b.content),a.isFunction(e)&&e(c.getSize(b))}catch(g){a.isFunction(f)&&f(g)}},c.getSize=function(a){return new FooBox.Size(a.width,a.height)},c}if(c.items.array.length>b&&1==c.items.array[b].error)return c.items.array[b];var e,f,g=FooBox.handlers.get(c,"html"),h=!1;if(null==g&&(g=new d(c)),null!==c.options.error.match(/^#/i)&&a(c.options.error).length>0)e=a(c.options.error),h=!0;else{var i=FooBox.format('<div class="fbx-error-msg" data-width="240" data-height="240"><span></span><p>{0}</p></div>',c.options.error);e=a(i)}return f=new FooBox.Item(g.type,e.get(0),g),f.selector=1==h?c.options.error:null,f.index=b,f.error=!0,f.title=e.data("title")||null,f.description=e.data("description")||null,f.width=e.data("width")||240||null,f.height=e.data("height")||240||null,f.content=1==h?null:e,f.fullscreen=!0,f.handler=g,c.items.array[b]=f,f},first:function(a){for(var b=null,d=0;d<c.items.array.length;d++)if(a(c.items.array[d])){b=c.items.array[d];break}return b},current:function(){return c.items.array[c.items.indexes.current]},prev:function(){return c.items.array[c.items.indexes.prev]},next:function(){return c.items.array[c.items.indexes.next]},multiple:function(){return c.items.array.length>1},clicked:function(a){return a.preventDefault(),c.items.indexes.set(this.index),c.modal.show(!0),!1}},this},FooBox.open=function(b){if(1==FooBox.isDeepLink)return null;var c,d=null;if("object"==typeof b){var e=document.createElement("a");a(e).foobox(b),d=a(e).data("fbx_instance")}else"number"==typeof b?c=b:(c=parseInt(b||0),c=isNaN(c)?0:c),c=c>FooBox.instances.length-1?FooBox.instances.length-1:0>c?0:c,d=FooBox.instances[c];return null!=d&&d.modal instanceof FooBox.Modal?(d.modal.show(!0),d):null},FooBox.close=function(){var a,b=[],c=null;for(a=0;a<FooBox.instances.length;a++)c=FooBox.instances[a],null!=c&&c.modal instanceof FooBox.Modal&&FooBox.isjQuery(c.modal.element)&&c.modal.element.hasClass("fbx-show")&&b.push(c);for(a=0;a<b.length;a++)c=b[a],c.modal.close()},FooBox.resize=function(c,d){if(c||d){var e,f,g,h;for(e=0;e<FooBox.instances.length;e++)f=FooBox.instances[e],null!=f&&f.modal instanceof FooBox.Modal&&FooBox.isjQuery(f.modal.element)&&f.modal.element.hasClass("fbx-show")&&(g=f.items.current(),h=new FooBox.Size(c||g.width||0,d||g.height||0),g.width=h.width,g.height=h.height,f.modal.resize(h,f.modal.element.find(".fbx-item-current")))}else a(b).trigger("resize.foobox")},FooBox.lateBind=function(c,d){var e=a.extend(!0,{},FooBox.defaults,d||b.FOOBOX&&FOOBOX.o||{}),f=a(c);f.on("click.foobox",e.selector,function(a){a.preventDefault();var b=f.data("fbx_instance");b||(b=f.foobox(e).data("fbx_instance")),b instanceof FooBox.Instance&&"number"==typeof this.index&&(b.items.indexes.set(this.index),b.modal.show(!0))})}}}(jQuery,window,window.console),function(a,b){var c={images:{noRightClick:!1,attr:"href",overflow:!1,fullscreen:!0,showCaptions:!0,regex:/https?:\/\/.*?\/.*?\.(jpg|jpeg|png|gif|bmp)/i,maxWidth:-1,maxHeight:-1,findUrl:function(a,c){if(!c)return"";if(c.data("image"))return c.data("image");var d=c.attr(a.options.images.attr);return"string"==typeof d?b.qualifiedURL(c.attr(a.options.images.attr)):""}}};b.Item.prototype.image=null,b.Item.prototype.maxWidth=null,b.Item.prototype.maxHeight=null,b.ImageHandler=function(c){this.FooBox=c,this.type="image";var d=this;this.handles=function(a){var b=d.FooBox.options.images.findUrl(d.FooBox,a),c="string"==typeof b&&null!=b.match(d.FooBox.options.images.regex),e=d.FooBox.raise("foobox.handlesImage",{element:a,handle:c});return e.fb.handle},this.defaults=function(a){a.fullscreen=a.fullscreen||d.FooBox.options.images.fullscreen,a.captions=a.captions||d.FooBox.options.images.showCaptions,a.social=a.social||!0,a.overflow=a.overflow||d.FooBox.options.images.overflow,a.proportion=a.proportion||!0,a.maxWidth=a.maxWidth||d.FooBox.options.images.maxWidth,a.maxHeight=a.maxHeight||d.FooBox.options.images.maxHeight},this.parse=function(a){var c=new b.Item(d.type,a,this);return d.defaults(c),c.url=d.FooBox.options.images.findUrl(d.FooBox,a)||null,c.width=b.Size.check(a.data("width")||c.width||null),c.height=b.Size.check(a.data("height")||c.height||null),c.fullscreen="boolean"==typeof a.data("fullscreen")?a.data("fullscreen"):c.fullscreen,c.overflow="boolean"==typeof a.data("overflow")?a.data("overflow"):c.overflow,c.proportion="boolean"==typeof a.data("proportion")?a.data("proportion"):c.proportion,c.maxWidth="number"==typeof a.data("maxWidth")?a.data("maxWidth"):c.maxWidth,c.maxHeight="number"==typeof a.data("maxHeight")?a.data("maxHeight"):c.maxHeight,c.image=null,c.image_url=c.url,c},this.load=function(b,c,e,f){try{var g=function(){var f=a(b.image).addClass("fbx-item fbx-item-image");d.FooBox.options.images.noRightClick&&f.on("contextmenu",function(a){return a.preventDefault(),!1}),c.empty().append(f),a.isFunction(e)&&e(d.getSize(b))};b.image&&null!==b.image?g():(b.image=new Image,b.image.onload=function(){b.image.onload=b.image.onerror=null,b.height=b.image.height,b.width=b.image.width,g()},b.image.onerror=function(){b.image.onload=b.image.onerror=null,b.image=null,a.isFunction(f)&&f("An error occurred attempting to load the image.")},b.image.src=b.url)}catch(h){a.isFunction(f)&&f(h)}},this.preload=function(a){if(1!=a.preloaded){var b=new Image;b.src=a.url,a.preloaded=!0}},this.getSize=function(a){if(null!=a.width&&null!=a.height){if(a.maxWidth>0&&a.maxHeight>0&&(a.width>a.maxWidth||a.height>a.maxHeight)){var c=a.width>a.height?a.maxWidth/a.width:a.maxHeight/a.height;a.width*=c,a.height*=c}return new b.Size(a.width,a.height)}return new b.Size(0,0)},this.hasChanged=function(a){if(b.isjQuery(a.element)){var c=d.FooBox.options.images.findUrl(d.FooBox,a.element);return a.url!=c}return!1}},b.handlers.register(b.ImageHandler,c)}(jQuery,window.FooBox),function(a,b){var c={keyboard:{enabled:!0,preventDefault:!1,stopPropagation:!1}};b.Keyboard=function(a){this.FooBox=a;var c=this;this.preinit=function(a){c.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":c.handlers.initialized,
|
10 |
-
"foobox.setupHtml":c.handlers.setupHtml})},this.destroy=function(){c.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&c.FooBox.element.off({"foobox.initialized foobox.reinitialized":c.handlers.initialized,"foobox.setupHtml":c.handlers.setupHtml}),c.FooBox.element.off("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.off("keydown.foobox",c.handlers.onKeydown)},initialized:function(){c.handlers.unbind(),1==c.FooBox.options.keyboard.enabled&&(c.FooBox.element.on("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.on("keydown.foobox",c.handlers.onKeydown))},setupHtml:function(a){a.fb.modal.attr("tabindex",0)},afterLoad:function(a){a.fb.modal.focus()},onKeydown:function(a){var b=c.FooBox.modal,d=c.FooBox.options.keyboard;b.element.hasClass("fbx-show")&&(b.element.hasClass("fbx-fullscreen-mode")||27!==a.which?c.FooBox.items.multiple()&&37===a.which?b.prev():c.FooBox.items.multiple()&&39===a.which&&b.next():b.close(),1==d.preventDefault&&a.preventDefault(),1==d.stopPropagation&&a.stopPropagation(),c.FooBox.raise("foobox.keydown",{keyCode:a.which}))}}},b.addons.register(b.Keyboard,c)}(jQuery,window.FooBox),function(a,b){var c={hideNavOnMobile:!1,resizeTimeout:300,breakpoints:{phone:640,tablet:1024},iosInterval:200};b.BPInfo=function(c){var d="undefined"!=typeof window.devicePixelRatio&&b.browser.isMobile?window.devicePixelRatio:1;this.width=(window.innerWidth||document.documentElement.clientWidth||(document.body?document.body.offsetWidth:0))/d,this.height=(window.innerHeight||document.documentElement.clientHeight||(document.body?document.body.offsetHeight:0))/d,this.orientation=this.width>this.height?"fbx-landscape":"fbx-portrait";var e,f=null;if(a.isArray(c))for(var g=0;g<c.length;g++)if(e=c[g],e&&e.width&&this.width<=e.width){f=e;break}this.breakpoint=null==f?"fbx-desktop":f.name},b.Responsive=function(c){this.FooBox=c,this.breakpoint={values:[],names:""},this.timers={resize:new b.Timer,ios:new b.Timer};var d=this,e=null;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.initialized foobox.reinitialized",d.handlers.initialized)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(b){b=b||!1,b&&d.FooBox.element.off("foobox.initialized foobox.reinitialized",d.handlers.initialized),a(window).off("resize.foobox",d.handlers.resize),d.FooBox.element.off({"foobox.beforeShow":d.handlers.iosBeforeShow,"foobox.close":d.handlers.iosClose})},initialized:function(){d.handlers.unbind(),d.setup.breakpoints(),d.style(),a(window).on("resize.foobox",d.handlers.resize),b.browser.iOS&&(b.browser.isSafari||b.browser.isChrome)&&d.FooBox.element.on({"foobox.beforeShow":d.handlers.iosBeforeShow,"foobox.close":d.handlers.iosClose})},resize:function(){d.timers.resize.start(function(){d.style();var a=d.FooBox.items.current();if(d.FooBox.modal.element.has("fbx-show")&&null!=a){var b=a.handler.getSize(a);d.FooBox.modal.resize(b,d.FooBox.modal.element.find(".fbx-item-current"))}},d.FooBox.options.resizeTimeout)},iosBeforeShow:function(){d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval)},iosClose:function(){d.timers.ios.stop()},ios:function(){if(!d.FooBox.modal.element.hasClass("fbx-show"))return void d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval);var a=window.orientation||0,c=window.innerHeight,f=90==a||-90==a,g=0,h=0,i=f?screen.availWidth:screen.availHeight;b.browser.isChrome?(g=i-(f?76:56),h=i-(f?0:20)):b.browser.isSafari&&(g=i-88,h=i-(f?0:19)),(null==e||0==e)&&g>=c?(e=!0,d.iosRedraw()):(null==e||1==e)&&c>=h&&(e=!1,d.iosRedraw()),d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval)}},this.setup={breakpoints:function(){d.breakpoint.values=[],d.breakpoint.names="";for(var a in d.FooBox.options.breakpoints)d.FooBox.options.breakpoints.hasOwnProperty(a)&&(d.breakpoint.values.push({name:d.fixName(a),width:d.FooBox.options.breakpoints[a]}),d.breakpoint.names+=d.fixName(a)+" ");d.breakpoint.values.sort(function(a,b){return a.width-b.width})}},this.iosRedraw=function(){window.scrollTo(0,document.body.scrollTop),a(window).trigger("resize")},this.fixName=function(a){return/^fbx-[a-zA-Z0-9]/.test(a)?a:"fbx-"+a},this.style=function(){var a=new b.BPInfo(d.breakpoint.values),c=d.FooBox.modal.element;c.removeClass(d.breakpoint.names).removeClass("fbx-desktop fbx-landscape fbx-portrait").addClass(a.breakpoint).addClass(a.orientation),d.FooBox.options.hideNavOnMobile===!0?c.addClass("fbx-no-nav"):c.removeClass("fbx-no-nav")}},b.Responsive.metaCheck=function(){var b=a("meta[name=viewport]"),c=b.attr("content");if(b.length>0&&"string"==typeof c){for(var d=c.split(","),e=!1,f=!1,g=0;g<d.length;g++){var h=a.trim(d[g]);"width"==h.substring(0,5)&&-1!==h.indexOf("device-width")?e=!0:"initial-scale"==h.substring(0,13)&&(f=!0)}e&&!f&&(d.push("initial-scale=1"),c=d.join(","),b.attr("content",c))}},b.addons.register(b.Responsive,c),b.Responsive.metaCheck()}(jQuery,window.FooBox),function(a,b){var c={captions:{animation:"slide",enabled:!0,descSource:"find",hoverDelay:300,maxHeight:.4,onlyShowOnHover:!1,onlyShowOnClick:!1,overrideDesc:!1,overrideTitle:!1,prettify:!1,titleSource:"image_find"}};b.Item.prototype.captions=!1,b.Item.prototype.title=null,b.Item.prototype.description=null,b.Item.prototype.caption=null,b.Captions=function(c){this.FooBox=c,this.timers={hover:new b.Timer};var d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":d.handlers.initialized,"foobox.setupHtml":d.handlers.setupHtml,"foobox.setupOptions":d.handlers.setupOptions,"foobox.parseItem":d.handlers.parseItem,"foobox.onError":d.handlers.onError})},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off({"foobox.initialized foobox.reinitialized":d.handlers.initialized,"foobox.setupHtml":d.handlers.setupHtml,"foobox.setupOptions":d.handlers.setupOptions,"foobox.parseItem":d.handlers.parseItem,"foobox.onError":d.handlers.onError,"foobox.close":d.handlers.close}),d.FooBox.element.off({"foobox.beforeLoad":d.handlers.beforeLoad,"foobox.afterLoad":d.handlers.afterLoad}),d.FooBox.modal instanceof b.Modal&&b.isjQuery(d.FooBox.modal.element)&&d.FooBox.modal.element.off("mouseenter.captions mouseleave.captions").find(".fbx-item-current, .fbx-item-next").off("click.captions")},initialized:function(a){d.handlers.unbind(),a.fb.options.captions.enabled===!0&&(a.fb.instance.element.on({"foobox.beforeLoad":d.handlers.beforeLoad,"foobox.afterLoad":d.handlers.afterLoad,"foobox.close":d.handlers.close}),-1===a.fb.options.modalClass.indexOf("fbx-caption-toggle-only")&&a.fb.modal.find(".fbx-item-current, .fbx-item-next").on("click.captions",d.handlers.toggleCaptions),a.fb.options.captions.onlyShowOnHover===!0&&a.fb.modal.on("mouseenter.captions",".fbx-inner:not(:has(.fbx-item-error))",d.handlers.mouseenter).on("mouseleave.captions",".fbx-inner:not(:has(.fbx-item-error))",d.handlers.mouseleave))},toggleCaptions:function(b){if(a(b.target).is("img")||a(b.target).is(".fbx-close-caption")||a(b.target).is(".fbx-open-caption")){var c=d.FooBox.items.current(),e=d.FooBox.modal.element;"image"!==c.type||e.hasClass("fbx-error")||(b.preventDefault(),e.find(".fbx-caption").is(".fbx-fade-caption, .fbx-slide-caption, .fbx-hide-caption")?(e.removeClass("fbx-captions-hidden"),d.show()):(e.addClass("fbx-captions-hidden"),d.hide()))}},mouseenter:function(){d.timers.hover.start(function(){d.show()},d.FooBox.options.captions.hoverDelay)},mouseleave:function(){d.timers.hover.start(function(){d.hide()},d.FooBox.options.captions.hoverDelay)},setupHtml:function(b){var c=a("<div/>",{"class":"fbx-caption"}),e=a("<a/>",{"class":"fbx-open-caption",html:"…"}).on("click.captions",d.handlers.toggleCaptions);"string"==typeof b.fb.options.modalClass&&-1!=b.fb.options.modalClass.indexOf("fbx-sticky-caption")?b.fb.modal.append(c,e):(b.fb.modal.find(".fbx-stage").append(c),b.fb.modal.find(".fbx-inner").append(e))},setupOptions:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},close:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},beforeLoad:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},afterLoad:function(a){var b=a.fb.item;return!b||b.error||b.captionLoaded||(a.fb.instance.raise("foobox.alterCaption",{element:a.fb.element,item:b}),b.captionLoaded=!0),1==a.fb.options.captions.onlyShowOnHover?void d.update():void(0==a.fb.options.captions.onlyShowOnClick&&d.show())},onError:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},parseItem:function(c){var e=c.fb.options.captions;if(c.fb.item.captions&&0!=e.enabled){var f,g,h="";if(null!=c.fb.element){var i=a(c.fb.element).data("titleSource")||a(c.fb.instance.element).data("titleSource")||e.titleSource,j=a(c.fb.element).data("descSource")||a(c.fb.instance.element).data("descSource")||e.descSource;"none"!=i&&(f=c.fb.element.data("captionTitle")||c.fb.element.data("title")||d.text(c.fb.element,i)),"none"!=j&&(g=c.fb.element.data("captionDesc")||c.fb.element.data("description")||d.text(c.fb.element,j))}else f=c.fb.item.title,g=c.fb.item.description;f=null==f||"undefined"==typeof f?"":f+"",g=null==g||"undefined"==typeof g?"":g+"",f&&f==g&&(g=null),h="string"==typeof f&&f.length>0?b.format('<div class="fbx-caption-title">{0}</div>',f):h,h="string"==typeof g&&g.length>0?h+b.format('<div class="fbx-caption-desc">{0}</div>',g):h,c.fb.item.title=f,c.fb.item.description=g,c.fb.item.caption=h,c.fb.instance.raise("foobox.createCaption",{element:c.fb.element,item:c.fb.item})}}},this.text=function(b,c){var e;switch(c){case"find":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title")||b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image_find":e=a.trim(b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image":e=a.trim(b.find("img:first").data("title")||b.find("img:first").attr("title"));break;case"image_alt":e=a.trim(b.find("img:first").data("alt")||b.find("img:first").attr("alt"));break;case"anchor":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title"));break;default:e=null}return d.FooBox.options.captions.prettify&&(e=d.prettifier(e)),e},this.animation=function(){switch(d.FooBox.options.captions.animation){case"fade":return"fbx-fade-caption";case"slide":return"fbx-slide-caption";default:return"fbx-hide-caption"}},this.hide=function(){var a=d.FooBox.items.current(),b=d.FooBox.modal.element.find(".fbx-caption");return d.FooBox.options.captions.enabled&&a.captions&&"string"==typeof a.caption&&0!=a.caption.length?(b.addClass(d.animation()),void d.FooBox.raise("foobox.captionsHide",{item:a})):void b.addClass("fbx-hide-caption")},this.show=function(){var a=d.FooBox,c=a.items.current(),e=a.modal.element.find(".fbx-caption");return!a.options.captions.enabled||!c.captions||"string"!=typeof c.caption||0==c.caption.length||a.modal.element.hasClass("fbx-captions-hidden")||b.isjQuery(c.element)&&c.element.hasClass("no-captions")?void e.addClass("fbx-hide-caption"):(d.update(),e.removeClass("fbx-fade-caption fbx-slide-caption fbx-hide-caption"),void d.FooBox.raise("foobox.captionsShow",{item:c}))},this.update=function(){var c=d.FooBox.items.current(),e=d.FooBox.modal.element.find(".fbx-caption");e.html(c.caption).find('a[href^="#"]').filter(function(){var c=a(this).attr("href"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof b.Instance?(a(this).data("hrefTarget",d.get(0)),!0):!1}).off("click.captions").on("click.captions",function(c){c.preventDefault();var e=a(this).data("hrefTarget"),f=a(e).data("fbx_instance")||a(e).data("fbx_p_instance");return f instanceof b.Instance&&(d.FooBox.modal.close(),f.items.indexes.set(e.index),f.modal.show()),!1}),a("<a/>",{"class":"fbx-close-caption",html:"×"}).on("click.captions",d.handlers.toggleCaptions).prependTo(e)},this.prettifier=function(a){return"string"!=typeof a?null:(a=a.replace(/\s*-\d+/g,"").replace(/\s*_\d+/g,"").replace(/-/g," ").replace(/_/g," "),a=a.replace(/\w\S*/g,function(a){return-1!=a.indexOf("#")?a:a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}))}},b.addons.register(b.Captions,c)}(jQuery,window.FooBox),function(a,b){var c={wordpress:{enabled:!1}};b.Wordpress=function(c){this.FooBox=c;var d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.createCaption",d.handlers.onCreateCaption)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.createCaption",d.handlers.onCreateCaption)},onCreateCaption:function(c){var d=c.fb.options,e=c.fb.instance.element,f=c.fb.item.element,g="",h=c.fb.item.title,i=c.fb.item.description;if(1==d.wordpress.enabled&&b.isjQuery(f)){var j=f.data("captionTitle")||f.data("title"),k=f.data("captionDesc")||f.data("description");if(e.hasClass("gallery"))d.captions.overrideTitle===!1&&(h=j||f.parents(".gallery-item:first").find(".wp-caption-text:first").html()||f.parents(".gallery-item:first").find(".gallery-caption:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(e.hasClass("wp-caption")||f.hasClass("wp-caption"))d.captions.overrideTitle===!1&&(h=j||f.find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(f.parents(".wp-caption:first").length>0)d.captions.overrideTitle===!1&&(h=j||f.parents(".wp-caption:first").find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.parents(".wp-caption:first").find("img").attr("alt")||i||"");else{if(!e.hasClass("tiled-gallery"))return;d.captions.overrideTitle===!1&&(h=j||f.parents(".tiled-gallery-item:first").find(".tiled-gallery-caption").html()||f.find("img").data("image-title")||f.find("img").attr("title")||h||""),d.captions.overrideDesc===!1&&(i=k||a.trim(f.find("img").data("image-description")).replace(/(^<p>)|(<\/p>$)/gi,"")||i||"")}h+="",i+="",h=h||"",i=i||"";var l=a("<div/>"),m=l.html(h).text(),n=l.html(i).text();(a.trim(h)==a.trim(i)||m==n)&&(i=null),g="string"==typeof h&&h.length>0?b.format('<div class="fbx-caption-title">{0}</div>',h):g,g="string"==typeof i&&i.length>0?g+b.format('<div class="fbx-caption-desc">{0}</div>',i):g,c.fb.item.title=h,c.fb.item.description=i,c.fb.item.caption=g}}}},b.addons.register(b.Wordpress,c)}(jQuery,window.FooBox),function(a,b){var c={pan:{enabled:!0,showOverview:!0,position:"fbx-top-right"}};b.Pan=function(c){this.FooBox=c;var d,e,f,g,h=this,i=!1,j=!1,k=null,l=null,m=null,n=null,o=null,p=0;this.preinit=function(a){h.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":h.handlers.initialized})},this.destroy=function(){h.handlers.unbind(!0)},this.setOverview=function(){var a=parseInt(n.css("max-width")),b=parseInt(n.css("max-height")),c=a/k.width,d=b/k.height;p=c>d?d:c;var e=k.width*p,f=k.height*p;n.width(e).height(f).css("background-image","url("+k.url+")")},this.setViewport=function(){var a=m.width(),b=m.height(),c=a*p,d=b*p;o.width(c).height(d)},this.disableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").off("click.captions",c.handlers.toggleCaptions)},this.enableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").on("click.captions",c.handlers.toggleCaptions)},this.handlers={unbind:function(a){a=a||!1,a&&h.FooBox.element.off({"foobox.initialized foobox.reinitialized":h.handlers.initialized}),h.FooBox.element.off({"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow}),h.FooBox.modal instanceof b.Modal&&b.isjQuery(h.FooBox.modal.element)&&h.FooBox.modal.element.find(".fbx-stage").off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,mouseup:h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning")},initialized:function(a){h.handlers.unbind(),a.fb.options.pan.enabled===!0&&h.FooBox.element.on({"foobox.close":h.handlers.onMouseUp,"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow})},onAfterLoad:function(a){i===!0&&"image"==a.fb.item.handler.type&&(h.setOverview(),h.setViewport())},onShowOverflow:function(b){"image"==b.fb.item.handler.type&&(i===!0?(h.setOverview(),h.setViewport()):(i=!0,h.disableCaptionImageClick(),k=b.fb.item,m=h.FooBox.modal.element.addClass("fbx-pannable-item").find(".fbx-stage").on({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).addClass("fbx-pannable"),l=b.fb.container,b.fb.options.pan.showOverview===!0&&(n=a("<div/>",{"class":"fbx-pan-overview"}).addClass(b.fb.options.pan.position).on("click",h.handlers.onOverviewClick).appendTo(m),o=a("<div/>",{"class":"fbx-pan-viewport"}).appendTo(n),l.on("scroll",h.handlers.onScroll),h.setOverview(),h.setViewport())))},onHideOverflow:function(a){i===!0&&(i=!1,h.enableCaptionImageClick(),a.fb.options.pan.showOverview===!0&&n.remove(),l.off("scroll",h.handlers.onScroll),m.off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning"),h.FooBox.modal.element.removeClass("fbx-pannable-item"))},onMouseDown:function(a){if(i===!0){a.preventDefault(),m.addClass("fbx-panning");var b=l.get(0);j=!0,d=a.pageX,e=a.pageY,f=b.scrollLeft,g=b.scrollTop}},onMouseMove:function(a){if(j===!0&&i===!0){var b=l.get(0);b.scrollLeft=f-(a.pageX-d),b.scrollTop=g-(a.pageY-e)}},onMouseUp:function(){i===!0&&(j=!1,m.removeClass("fbx-panning"),d=0,e=0,f=0,g=0)},onScroll:function(){var a=l.get(0),b=a.scrollTop/k.height*100,c=a.scrollLeft/k.width*100;o.css({top:b+"%",left:c+"%"})},onOverviewClick:function(b){var c=a(this).offset(),d=(b.pageX-c.left)/p,e=(b.pageY-c.top)/p,f=d-l.width()/2,g=e-l.height()/2;l.animate({scrollTop:g,scrollLeft:f},300)}}},b.addons.register(b.Pan,c)}(jQuery,window.FooBox),function(a,b){var c={swipe:{enabled:!0,min:80}};b.Swipe=function(a){this.FooBox=a,this.isMoving=!1;var c,d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.initialized foobox.reinitialized",d.handlers.initialized)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.initialized foobox.reinitialized",d.handlers.initialized),d.FooBox.modal instanceof b.Modal&&b.isjQuery(d.FooBox.modal.element)&&d.FooBox.modal.element.off({touchstart:d.handlers.onTouchStart,touchmove:d.handlers.onTouchMove})},initialized:function(a){d.handlers.unbind(),a.fb.options.swipe.enabled===!0&&a.fb.modal.on("touchstart",d.handlers.onTouchStart)},onTouchStart:function(a){var b=a.originalEvent.touches||a.touches;1==b.length&&d.FooBox.items.multiple()&&(c=b[0].pageX,d.isMoving=!0,d.FooBox.modal.element.on("touchmove",d.handlers.onTouchMove))},onTouchMove:function(a){if(d.isMoving){var b=a.originalEvent.touches||a.touches,e=b[0].pageX,f=c-e;Math.abs(f)>=d.FooBox.options.swipe.min&&(d.cancelTouch(),f>0?(d.FooBox.raise("foobox.swipeRight"),d.FooBox.modal.next()):(d.FooBox.raise("foobox.swipeLeft"),d.FooBox.modal.prev()))}}},this.cancelTouch=function(){d.FooBox.modal.element.off("touchmove",d.handlers.onTouchMove),c=null,d.isMoving=!1}},b.addons.register(b.Swipe,c)}(jQuery,window.FooBox);
|
7 |
* You are free to use FooBox jQuery in personal projects as long as this copyright header is left intact.
|
8 |
*/
|
9 |
!function(a,b,c,undefined){if(a&&b){b.FooBox={defaults:{affiliate:{enabled:!0,prefix:"Powered by ",url:"http://fooplugins.com/plugins/foobox/"},alwaysInit:!1,closeOnOverlayClick:!0,containerCssClass:"fbx-instance",countMessage:"item %index of %total",error:"Could not load the item",excludes:".fbx-link, .nofoobox",externalSelector:"a[data-foobox],input[data-foobox]",fitToScreen:!1,hideScrollbars:!0,loadDelay:0,loaderTimeout:600,modalClass:"",preload:!1,rel:null,resizeSpeed:300,selector:"a",showButtons:!0,showCount:!0,style:"fbx-rounded",theme:"fbx-light",transitionInSpeed:200,transitionOutSpeed:200,initCallback:null,loop:!0},version:"2.0.10",instances:[],ready:function(b){(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?b(a):setTimeout(function(){FooBox.ready(b)},1)}},FooBox.$=a,FooBox.format=function(a,b,c){var d,e,f=arguments[0];for(d=0;d<arguments.length-1;d++)e=new RegExp("\\{"+d+"\\}","gm"),f=f.replace(e,arguments[d+1]);return f},FooBox.browser={isIE:!1,isChrome:!1,isSafari:!1,isLtSafari10:!1,version:0,css:"",iOS:!1,Mac:!1,isMobile:function(a){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))}(navigator.userAgent||navigator.vendor||b.opera),check:function(){var a=navigator.appVersion.toLowerCase(),c=navigator.userAgent.toLowerCase(),d=navigator.platform;FooBox.browser.iOS=/(iPad|iPhone|iPod)/g.test(d),1==FooBox.browser.iOS&&(FooBox.browser.css+=" fbx-ios"),FooBox.browser.Mac=/(Mac)/g.test(d),1==FooBox.browser.Mac&&(FooBox.browser.css+=" fbx-mac"),FooBox.browser.isChrome=a.indexOf("chrome")>-1||a.indexOf("crios")>-1,FooBox.browser.isChrome&&(FooBox.browser.css+=" fbx-chrome"),FooBox.browser.isSafari=a.indexOf("safari")>-1&&!FooBox.browser.isChrome,FooBox.browser.isSafari&&(FooBox.browser.css+=" fbx-safari",FooBox.browser.isLtSafari10=/constructor/i.test(b.HTMLElement)),FooBox.browser.isFirefox=c.indexOf("firefox")>-1,FooBox.browser.isFirefox&&(FooBox.browser.css+=" fbx-firefox");var e=c.indexOf("msie "),f=c.indexOf("trident/"),g=c.indexOf("edge/");if(FooBox.browser.isIE=e>-1||f>-1||g>-1,FooBox.browser.isIE){if(e>-1)FooBox.browser.version=parseInt(c.substring(e+5,c.indexOf(".",e)),10);else if(f>-1){var h=c.indexOf("rv:");FooBox.browser.version=parseInt(c.substring(h+3,c.indexOf(".",h)),10)}else g>-1&&(FooBox.browser.version=parseInt(c.substring(g+5,c.indexOf(".",g)),10));FooBox.browser.css=FooBox.format("fbx-ie fbx-ie{0}",FooBox.browser.version)}},supportsTransitions:function(){var a,b=document.body||document.documentElement,c=b.style,d="transition";if("string"==typeof c[d])return!0;a=["Moz","Webkit","Khtml","O","ms"],d=d.charAt(0).toUpperCase()+d.substr(1);for(var e=0;e<a.length;e++)if("string"==typeof c[a[e]+d])return!0;return!1},transitionEnd:function(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(c.hasOwnProperty(a)&&b.style[a]!==undefined)return c[a];return null}},FooBox.browser.check(),FooBox.qualifiedURL=function(a){var b=document.createElement("a");return b.href=a,b.href},c||(c={}),c.log=c.log||function(){},c.warn=c.warn||function(){},c.error=c.error||function(){},c.info=c.info||function(){};var d={write:function(){c.log(FooBox.format.apply(d,arguments))},error:function(){1===arguments.length&&arguments[0]instanceof Error?c.error(arguments[0]):c.error(FooBox.format.apply(d,arguments))}};jQuery.Event.prototype.fb={instance:null,modal:null,options:null},FooBox.raise=function(b,c,d){d=d||{};var e=a.Event(c);return e.fb={},e.fb.instance=b,e.fb.modal=b.modal.element,e.fb.options=b.options,a.extend(!0,e.fb,d),b.element.one(c,function(a){a.stopPropagation()}).trigger(e),e},FooBox.isjQuery=function(a){return a instanceof jQuery?!0:a&&a.jquery},FooBox.options={isMultipart:function(a,b){return"string"==typeof a&&a.length>0&&-1!==a.indexOf(b)},hasProperties:function(a){if("object"!=typeof a)return!1;var b;for(b in a)if(a.hasOwnProperty(b))return!0;return!1},get:function(a,b){if(FooBox.options.isMultipart(b,".")){var c=b.substring(0,b.indexOf(".")),d=b.substring(b.indexOf(".")+1);return a[c]=a[c]||{},FooBox.options.get(a[c],d)}return a[b]},set:function(a,b,c){if(FooBox.options.isMultipart(b,".")){var d=b.substring(0,b.indexOf(".")),e=b.substring(b.indexOf(".")+1);a[d]=a[d]||{},FooBox.options.set(a[d],e,c)}else a[b]=c},merge:function(a,b,c){var d,e=Array.prototype.slice.call(arguments);for(a=e.shift(),b=e.shift(),FooBox.options._merge(a,b),d=0;d<e.length;d++)c=e[d],FooBox.options._merge(a,c);return a},_merge:function(b,c){var d;for(d in c)c.hasOwnProperty(d)&&(FooBox.options.hasProperties(c[d])&&!a.isArray(c[d])?(b[d]=b[d]||{},FooBox.options._merge(b[d],c[d])):a.isArray(c[d])?(b[d]=[],a.extend(!0,b[d],c[d])):b[d]=c[d])}},FooBox.objects={registered:{},ensure:function(a){return FooBox.objects.registered[a]=FooBox.objects.registered[a]||[]},register:function(b,c,d){var e=FooBox.objects.ensure(b);return e.push(c),"object"==typeof d&&a.extend(!0,FooBox.defaults,d),!0},load:function(a,b){var c,e,f=[],g=FooBox.objects.ensure(a);for(e=0;e<g.length;e++)try{c=g[e],f.push(new c(b))}catch(h){d.error(h)}b.objects=b.objects||{},b.objects[a]=f},call:function(b,c,e,f,g){var h,i=Array.prototype.slice.call(arguments);b=i.shift(),c=i.shift(),e=i.shift();for(var j=c.objects[b]||[],k=0;k<j.length;k++)try{if(h=j[k],!a.isFunction(h[e]))continue;h[e].apply(h,i)}catch(l){d.error(l)}},get:function(b,c,d){var e,f=c.objects[b];if(!f||!a.isFunction(d))return null;for(e=0;e<f.length;e++)if(d(f[e]))return f[e];return null}},FooBox.addons={_ns:"addons",validate:function(b){return a.isFunction(b)?!0:(d.error('Expected type "function", received type "{0}".',typeof b),!1)},register:function(a,b){return FooBox.addons.validate(a)?FooBox.objects.register(FooBox.addons._ns,a,b):(d.error("Failed to register the addon."),!1)},load:function(a){FooBox.objects.load(FooBox.addons._ns,a)},call:function(a,b,c,d){var e=Array.prototype.slice.call(arguments);e.unshift(FooBox.addons._ns),FooBox.objects.call.apply(this,e)}},FooBox.handlers={_ns:"handlers",validate:function(b){if(!a.isFunction(b))return d.error('Expected type "function", received type "{0}".',typeof b),!1;var c=new b;return a.isFunction(c.handles)?a.isFunction(c.defaults)?a.isFunction(c.parse)?a.isFunction(c.load)?a.isFunction(c.getSize)?a.isFunction(c.hasChanged)?a.isFunction(c.preload)?!0:(d.error('The required "preload" method is not implemented.'),!1):(d.error('The required "hasChanged" method is not implemented.'),!1):(d.error('The required "getSize" method is not implemented.'),!1):(d.error('The required "load" method is not implemented.'),!1):(d.error('The required "parse" method is not implemented.'),!1):(d.error('The required "defaults" method is not implemented.'),!1):(d.error('The required "handles" method is not implemented.'),!1)},register:function(a,b){return FooBox.handlers.validate(a)?FooBox.objects.register(FooBox.handlers._ns,a,b):(d.error("Failed to register the handler."),!1)},load:function(a){FooBox.objects.load(FooBox.handlers._ns,a)},call:function(a,b,c,d){var e=Array.prototype.slice.call(arguments);e.unshift(FooBox.handlers._ns),FooBox.objects.call.apply(this,e)},get:function(a,b){return FooBox.objects.get(FooBox.handlers._ns,a,function(a){return a.type==b})}},FooBox.Item=function(b,c,d){return this.type=b,this.element=FooBox.isjQuery(c)?c:a(c),this.handler=d,this.width=null,this.height=null,this.url=null,this.overflow=!1,this.preloaded=!1,this.proportion=!1,this.error=!1,this},FooBox.Size=function(a,b){return this.width="number"==typeof a?a:parseInt(a,0),this.height="number"==typeof b?b:parseInt(b,0),this.equalTo=function(a){return this.width==a.width&&this.height==a.height},this},FooBox.Size.check=function(a){return"number"==typeof a?a:isNaN(parseInt(a))?null:parseInt(a)},FooBox.Timer=function(){this.id=null,this.busy=!1;var a=this;return this.start=function(b,c,d){d=d||b,a.stop(),a.id=setTimeout(function(){b.call(d),a.id=null,a.busy=!1},c),a.busy=!0},this.stop=function(){null!==a.id&&a.busy!==!1&&(clearTimeout(a.id),a.id=null,a.busy=!1)},this},a.fn.foobox=function(b){return b=b||{},this.each(function(){var c=a(this).data("fbx_instance");if(c instanceof FooBox.Instance)if(1==c.options.alwaysInit){var d=c.options;c.destroy(),c=new FooBox.Instance(c.id),c.init(this,a.extend(!0,d,b))}else c.reinit(b);else{if(c=a(this).data("fbx_p_instance"),c instanceof FooBox.Instance)return;c=new FooBox.Instance,c.init(this,b)}})},FooBox.Modal=function(b){this.FooBox=b,this.element=null,this.loaderTimeout=new FooBox.Timer,this._first=!1,this._busy=!1,this._closed=!1;var c=this;return this.init=function(a,b){c.setup.html(),c.setup.options(b),c.setup.bind()},this.reinit=function(a){c.setup.options(a)},this.destroy=function(){FooBox.isjQuery(c.element)&&c.element.remove()},this.setup={html:function(){if(!FooBox.isjQuery(c.element)){c.element=a('<div class="fbx-modal"></div>'),c.element.append('<div class="fbx-inner-spacer"></div>');var b=a('<div class="fbx-stage"></div>');b.append('<div class="fbx-item-current"></div>'),b.append('<div class="fbx-item-next"></div>');var d=a('<div class="fbx-inner fbx-inner-shadow"></div>');d.append(b),d.append('<a class="fbx-prev fbx-btn-transition fbx-btn-shadow"></a>'),d.append('<div class="fbx-credit"><a target="_blank" href=""><em></em><span> FooBox</span></a></div>'),d.append('<span class="fbx-count" />'),d.append('<a class="fbx-next fbx-btn-transition fbx-btn-shadow"></a>'),d.append('<a class="fbx-close fbx-btn-transition fbx-btn-shadow"></a>'),c.element.append('<div class="fbx-loader"><div></div></div>'),c.element.append(d),c.FooBox.raise("foobox.setupHtml"),a("body").append(c.element)}},options:function(a){var b;c.element.removeClass().addClass("fbx-modal").addClass(FooBox.format("fbx-{0}",c.FooBox.id)).addClass(c.FooBox.element.data("style")||a.style).addClass(c.FooBox.element.data("theme")||a.theme).addClass(c.FooBox.element.data("modal-class")).addClass(a.modalClass).data("fbx_instance",c.FooBox),c.element.addClass(FooBox.browser.css),b=a.affiliate.enabled?"":"none",c.element.find(".fbx-credit").css("display",b),a.affiliate.enabled&&(c.element.find(".fbx-credit > a").attr("href",a.affiliate.url),c.element.find(".fbx-credit > a > em").text(a.affiliate.prefix)),b=a.showCount&&c.FooBox.items.multiple()?"":"none",c.element.find(".fbx-count").css("display",b),a.showButtons&&c.FooBox.items.multiple()||c.element.addClass("fbx-no-buttons"),c.FooBox.raise("foobox.setupOptions")},bind:function(){1==c.FooBox.options.closeOnOverlayClick&&c.element.off("click.foobox").on("click.foobox",function(b){1==c.FooBox.options.closeOnOverlayClick&&a(b.target).is(".fbx-modal")&&c.close()}),c.element.find(".fbx-close").off("click.foobox").on("click.foobox",function(a){a.preventDefault(),a.stopPropagation(),c.close()}).end().find(".fbx-prev").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||c.prev()}).end().find(".fbx-next").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||c.next()})}},this.prioritize=function(){FooBox.instances.length>1&&c.element.nextAll(".fbx-modal:last").after(c.element)},this.preload=function(){if(1==c.FooBox.options.preload){var a=c.FooBox.items.prev();a&&a.handler.preload(a);var b=c.FooBox.items.next();b&&b.handler.preload(b)}},this.show=function(b){function e(a){if(c.loaderTimeout.stop(),c.element.removeClass("fbx-loading"),c._busy=!1,d.error(a),!c.FooBox.raise("foobox.onError",{error:a}).isDefaultPrevented()){var e=c.FooBox.items.error(f.index);null!=e&&c.show(b)}}b=b||!1,c._first=b,c._busy=!0,c._closed=!1,a("body").addClass("fbx-active"),c.FooBox.options.hideScrollbars&&a("html").addClass("fbx-no-scroll");var f=c.FooBox.items.current();1==f.error?c.element.addClass("fbx-error"):c.element.removeClass("fbx-error"),c.element.hasClass("fbx-show")||(c.prioritize(),c.element.addClass("fbx-loading").find(".fbx-inner").css({width:"100px",height:"100px","margin-top":"-50px","margin-left":"-50px"}));var g=c.element.find(".fbx-item-current"),h=c.element.find(".fbx-item-next");if(h.hide().css("opacity","0"),c.element.find(".fbx-count").text(c.FooBox.options.countMessage.replace("%index",""+(c.FooBox.items.indexes.current+1)).replace("%total",""+c.FooBox.items.array.length)),c.FooBox.raise("foobox.beforeLoad",{item:f}).isDefaultPrevented())return void(c._busy=!1);if(f.handler.hasChanged(f)){var i=f.index,j=f.element.get(0);f=f.handler.parse(f.element);var k=c.FooBox.raise("foobox.parseItem",{element:f.element,item:f});j.index=k.fb.item.index=i,c.FooBox.items.array[i]=k.fb.item}c.preload(),c.loaderTimeout.start(function(){c.element.addClass("fbx-loading")},c.FooBox.options.loaderTimeout),setTimeout(function(){c.checkForLoop(f),f.handler.load(f,h,function(a){return 1==c._closed?void(c._busy=!1):void c.transitionOut(g,function(){return 1==c._closed?void(c._busy=!1):void c.resize(a,h,function(){return 1==c._closed?void(c._busy=!1):(c.loaderTimeout.stop(),h.show(),void c.transitionIn(h,function(){return 1==c._closed?void(c._busy=!1):(h.add(g).toggleClass("fbx-item-next fbx-item-current"),g.empty(),void(c.element.hasClass("fbx-show")?(c.element.removeClass("fbx-loading"),c.FooBox.raise("foobox.afterLoad",{item:f}),c._busy=!1):c.FooBox.raise("foobox.beforeShow",{item:f}).isDefaultPrevented()||(c.element.removeClass("fbx-loading").addClass("fbx-show"),c.FooBox.raise("foobox.afterShow",{item:f}),c.FooBox.raise("foobox.afterLoad",{item:f}),c._busy=!1)))},e))},e)},e)},e)},c.FooBox.options.loadDelay)},this.checkForLoop=function(a){1!=c.FooBox.options.loop&&(c.element.find(".fbx-prev, .fbx-next").removeClass("fbx-disabled"),c.FooBox.items.is.first(a)&&c.element.find(".fbx-prev").addClass("fbx-disabled"),c.FooBox.items.is.last(a)&&c.element.find(".fbx-next").addClass("fbx-disabled"))},this.resize=function(b,d,e,f){try{if(0===b.width||0===b.height)return void(a.isFunction(f)&&f(FooBox.format("Invalid size supplied. Width = {0}, Height = {1}",b.width,b.height)));var g=c.FooBox.items.current(),h=new FooBox.Size(b.width,b.height),i=c.element.find(".fbx-inner"),j=c.element.find(".fbx-inner-spacer"),k=parseInt(j.css("padding-top"),0),l=parseInt(j.css("padding-bottom"),0),m=parseInt(j.css("padding-left"),0),n=parseInt(j.css("padding-right"),0),o=parseInt(i.css("border-top-width"),0),p=parseInt(i.css("border-bottom-width"),0),q=parseInt(i.css("border-left-width"),0),r=parseInt(i.css("border-right-width"),0),s=parseInt(i.css("padding-left"),0),t=k+l+2*s+o+p,u=m+n+2*s+q+r,v=new FooBox.Size(parseInt(i.css("width"),0),parseInt(i.css("height"),0)),w=new FooBox.Size(c.element.width()-u,c.element.height()-t),x=w.width/b.width;b.height*x>w.height&&(x=w.height/b.height),c.FooBox.options.fitToScreen===!0||1==g.proportion&&(b.height>w.height||b.width>w.width)?(b.height=Math.floor(b.height*x),b.width=Math.floor(b.width*x)):0==g.proportion&&(b.height>w.height&&(b.height=w.height),b.width>w.width&&(b.width=w.width)),b.height<100&&(b.height=100),b.width<100&&(b.width=100);var y=-(b.height/2+s+(l-k/2)/2)+(q+r)/2,z=-(b.width/2+s+(q+r)/2);if(v.equalTo(b))i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e();else if(!c.FooBox.raise("foobox.beforeResize",{item:g,size:b,offset:{top:y,left:z},error:f,success:e}).isDefaultPrevented())if(y=-(b.height/2+s+(l-k/2)/2)+(q+r)/2,z=-(b.width/2+s+(q+r)/2),c.element.hasClass("fbx-show"))if(FooBox.browser.supportsTransitions()){var A=c.FooBox.options.resizeSpeed/1e3,B="all "+A+"s ease-in-out";i.css({WebkitTransition:B,MozTransition:B,MsTransition:B,OTransition:B,transition:B}),i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),setTimeout(function(){i.css({WebkitTransition:"",MozTransition:"",MsTransition:"",OTransition:"",transition:""}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e(b)},c.FooBox.options.resizeSpeed)}else i.animate({height:b.height,width:b.width,"margin-top":y,"margin-left":z},c.FooBox.options.resizeSpeed,function(){c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e(b)});else i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e()}catch(C){a.isFunction(f)&&f(C)}},this.overflow=function(a,b,d,e){var f=e.find(".fbx-item");1==a.overflow&&(d.width<.8*b.width||d.height<.8*b.height)||1==a.overflow&&0==a.proportion&&(d.width<b.width||d.height<b.height)||1==a.overflow&&"html"==a.type?("html"==a.type?(f.css({width:"100%",height:"auto",overflow:""}),e.css("overflow","auto")):(f.css({width:b.width,height:b.height,overflow:""}),e.css({"overflow-x":b.width<=d.width?"hidden":"","overflow-y":b.height<=d.height?"hidden":""})),c.FooBox.raise("foobox.showOverflow",{item:a,container:e})):(f.css({width:"",height:"",overflow:"hidden"}),e.css({"overflow-x":"","overflow-y":"",overflow:"hidden"}),c.FooBox.raise("foobox.hideOverflow",{item:a,container:e}))},this.transitionOut=function(b,d,e){try{if(!c.element.hasClass("fbx-show"))return void(a.isFunction(d)&&d());b.animate({opacity:0},b.is(":visible")?c.FooBox.options.transitionOutSpeed:0,function(){a.isFunction(d)&&d()})}catch(f){a.isFunction(e)&&e(f)}},this.transitionIn=function(b,d,e){try{if(!c.element.hasClass("fbx-show"))return b.css({opacity:1}),void(a.isFunction(d)&&d());b.animate({opacity:1},c.FooBox.options.transitionInSpeed,function(){a.isFunction(d)&&d()})}catch(f){a.isFunction(e)&&e(f)}},this.close=function(){c.FooBox.raise("foobox.beforeClose").isDefaultPrevented()||(c._closed=!0,c._busy=!1,c.element.removeClass("fbx-loading fbx-show"),a("body").removeClass("fbx-active"),c.FooBox.raise("foobox.close"),c.element.find(".fbx-item-current, .fbx-item-next").empty(),a("html").removeClass("fbx-no-scroll"),c.FooBox.raise("foobox.afterClose"))},this.prev=function(a){if(1!=c._busy){if(c.FooBox.items.indexes.set(c.FooBox.items.indexes.prev),"string"==typeof a)for(var b=c.FooBox.items.current();b.type!=a;)c.FooBox.items.indexes.set(c.FooBox.items.indexes.prev),b=c.FooBox.items.current();c.show(!1),c.FooBox.raise("foobox.previous")}},this.next=function(a){if(1!=c._busy){if(c.FooBox.items.indexes.set(c.FooBox.items.indexes.next),"string"==typeof a)for(var b=c.FooBox.items.current();b.type!=a;)c.FooBox.items.indexes.set(c.FooBox.items.indexes.next),b=c.FooBox.items.current();c.show(!1),c.FooBox.raise("foobox.next")}},this},FooBox.Instance=function(b){this.id=null,"number"==typeof b?(this.id=b,FooBox.instances[b-1]=this):this.id=FooBox.instances.push(this),this.element=null,this.options=a.extend(!0,{},FooBox.defaults),this.modal=new FooBox.Modal(this),this.objects={},FooBox.addons.load(this),FooBox.handlers.load(this);var c=this;return this.raise=function(a,b){return FooBox.raise(c,a,b)},this.init=function(b,d){c.element=FooBox.isjQuery(b)?b:a(b),c.options=FooBox.options.merge(c.options,d||{}),FooBox.addons.call(c,"preinit",c.element,c.options),c.items.init(),c.items.array.length>0?(c.element.data("fbx_instance",c),c.options.containerCssClass&&c.element.addClass(c.options.containerCssClass),c.setup.bind(),c.modal.init(b,c.options),FooBox.handlers.call(c,"init",c.element,c.options),c.raise("foobox.initialized"),a.isFunction(c.options.initCallback)&&c.options.initCallback.call(c)):c.destroy()},this.reinit=function(a){c.options=FooBox.options.merge(c.options,a||{}),c.items.init(!0),c.items.array.length>0?(c.setup.bind(),c.modal.reinit(c.options),FooBox.handlers.call(c,"reinit",c.options),c.raise("foobox.reinitialized")):c.destroy()},this.destroy=function(){FooBox.addons.call(c,"destroy"),FooBox.handlers.call(c,"destroy"),c.items.destroy(),c.modal.destroy(),c.element.removeClass("fbx-instance fbx-item").data({fbx_instance:null,fbx_p_instance:null}),c.id==FooBox.instances.length?FooBox.instances.splice(c.id-1,1):FooBox.instances[c.id-1]=null,c.raise("foobox.destroy")},this.setup={bind:function(){a(c.options.externalSelector).off("click.fooboxExternal").on("click.fooboxExternal",function(b){b.preventDefault();var c=a(this).data("foobox"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof FooBox.Instance&&e.modal instanceof FooBox.Modal&&e.modal.show(!0),!1})}},this.items={array:[],indexes:{prev:-1,current:0,next:1,direction:"*",set:function(a){var b=c.items.indexes.current;a=a||0,a=a>c.items.array.length-1?0:0>a?c.items.array.length-1:a;var d=a-1,e=a+1;c.items.indexes.current=a,c.items.indexes.prev=0>d?c.items.array.length-1:d,c.items.indexes.next=e>c.items.array.length-1?0:e,c.items.indexes.direction=c.items.indexes._direction(b,a,c.items.array.length-1)},_direction:function(a,b,c){return 0==b&&a==c?">":b==c&&0==a?"<":b>a?">":a>b?"<":"*"}},new_array:function(b){b=b||!1;var d,e,f,g=0;if(1==b){if(c.items.array.length>0){for(var h=0;h<c.items.array.length;h++)d=c.items.array[h],FooBox.isjQuery(d.element)?0==d.element.parents(":first").length&&(c.items.array.splice(h,1),h-=1):d.option||(c.items.array.splice(h,1),h-=1);for(var i=0;i<c.items.array.length;i++)d=c.items.array[i],FooBox.isjQuery(d.element)?(f=d.element.get(0),f.index=d.index=i):d.index=i}}else c.items.array=[];if(a.isArray(c.options.items))for(var j=0;j<c.options.items.length;j++)if(d=c.options.items[j],-1==c.items.indexOf(d))for(var k=0;k<c.objects.handlers.length;k++)if(c.objects.handlers[k].type==d.type){d.index=g,d.option=!0,d.handler=c.objects.handlers[k],d.handler.defaults(d),e=c.raise("foobox.parseItem",{element:null,item:d}),c.items.array.push(e.fb.item),g++;break}},init:function(a){a=a||!1,c.items.new_array(a),c.element.is(c.options.selector)&&!c.element.is(c.options.excludes)&&c.items.add(c.element)?c.element.off("click.item").on("click.item",c.items.clicked):c.element.find(c.options.selector).not(c.options.excludes).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked),c.items.rel()},destroy:function(){var b,d;for(d=0;d<c.items.array.length;d++)b=c.items.array[d],a.isFunction(b.destroy)&&b.destroy(),FooBox.isjQuery(b.element)&&b.element.off("click.item").removeClass("fbx-link").data("fbx_p_instance",null);c.items.array=[]},rel:function(){var b=c.options.rel||c.element.attr("rel")||(c.items.first(function(a){return FooBox.isjQuery(a.element)?"string"==typeof a.element.attr("rel"):!1})||{element:a()}).element.attr("rel");"string"==typeof b&&a('[rel="'+b+'"]').not(c.options.excludes).not(c.element).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked)},indexOf:function(a,b){if(!a)return-1;b=b||"url";var d;for(d=0;d<c.items.array.length;d++)if(c.items.array[d][b]==a[b])return d;return-1},is:{first:function(a){return c.items.array&&0!=c.items.array.length?c.items.array[0].index==a.index:!1},last:function(a){return c.items.array&&0!=c.items.array.length?c.items.array[c.items.array.length-1].index==a.index:!1}},add:function(b){b=FooBox.isjQuery(b)?b:a(b);var d=c.items.parse(b,c.items.array.length);if(null===d)return!1;var e=b.get(0),f=c.items.indexOf(d);-1!=f?(d=c.items.array[f],e.index=d.index):e.index=d.index=c.items.array.push(d)-1;var g=b.addClass("fbx-link").data("fbx_p_instance");return g instanceof FooBox.Instance||b.data("fbx_p_instance",c),!0},get:function(b){b=FooBox.isjQuery(b)?b:a(b);var d=null,e=b.get(0).index;return e&&e>0&&e<=c.items.array.length-1&&(d=c.items.array[e]),d},parse:function(b,d){b=FooBox.isjQuery(b)?b:a(b);for(var e,f,g=0;g<c.objects.handlers.length;g++)if(c.objects.handlers[g].handles(b,c.element)){e=c.objects.handlers[g].parse(b),isNaN(d)||(e.index=d),f=c.raise("foobox.parseItem",{element:b,item:e});break}return"undefined"!=typeof f&&f.fb.item?f.fb.item:null},error:function(b){function d(b){var c=this;return c.FooBox=b,c.type="error",c.handles=function(){return!1},c.hasChanged=function(){return!1},c.defaults=function(){},c.parse=function(){},c.load=function(b,d,e,f){try{d.empty().append(b.content),a.isFunction(e)&&e(c.getSize(b))}catch(g){a.isFunction(f)&&f(g)}},c.getSize=function(a){return new FooBox.Size(a.width,a.height)},c}if(c.items.array.length>b&&1==c.items.array[b].error)return c.items.array[b];var e,f,g=FooBox.handlers.get(c,"html"),h=!1;if(null==g&&(g=new d(c)),null!==c.options.error.match(/^#/i)&&a(c.options.error).length>0)e=a(c.options.error),h=!0;else{var i=FooBox.format('<div class="fbx-error-msg" data-width="240" data-height="240"><span></span><p>{0}</p></div>',c.options.error);e=a(i)}return f=new FooBox.Item(g.type,e.get(0),g),f.selector=1==h?c.options.error:null,f.index=b,f.error=!0,f.title=e.data("title")||null,f.description=e.data("description")||null,f.width=e.data("width")||240||null,f.height=e.data("height")||240||null,f.content=1==h?null:e,f.fullscreen=!0,f.handler=g,c.items.array[b]=f,f},first:function(a){for(var b=null,d=0;d<c.items.array.length;d++)if(a(c.items.array[d])){b=c.items.array[d];break}return b},current:function(){return c.items.array[c.items.indexes.current]},prev:function(){return c.items.array[c.items.indexes.prev]},next:function(){return c.items.array[c.items.indexes.next]},multiple:function(){return c.items.array.length>1},clicked:function(a){return a.preventDefault(),c.items.indexes.set(this.index),c.modal.show(!0),!1}},this},FooBox.open=function(b){if(1==FooBox.isDeepLink)return null;var c,d=null;if("object"==typeof b){var e=document.createElement("a");a(e).foobox(b),d=a(e).data("fbx_instance")}else"number"==typeof b?c=b:(c=parseInt(b||0),c=isNaN(c)?0:c),c=c>FooBox.instances.length-1?FooBox.instances.length-1:0>c?0:c,d=FooBox.instances[c];return null!=d&&d.modal instanceof FooBox.Modal?(d.modal.show(!0),d):null},FooBox.close=function(){var a,b=[],c=null;for(a=0;a<FooBox.instances.length;a++)c=FooBox.instances[a],null!=c&&c.modal instanceof FooBox.Modal&&FooBox.isjQuery(c.modal.element)&&c.modal.element.hasClass("fbx-show")&&b.push(c);for(a=0;a<b.length;a++)c=b[a],c.modal.close()},FooBox.resize=function(c,d){if(c||d){var e,f,g,h;for(e=0;e<FooBox.instances.length;e++)f=FooBox.instances[e],null!=f&&f.modal instanceof FooBox.Modal&&FooBox.isjQuery(f.modal.element)&&f.modal.element.hasClass("fbx-show")&&(g=f.items.current(),h=new FooBox.Size(c||g.width||0,d||g.height||0),g.width=h.width,g.height=h.height,f.modal.resize(h,f.modal.element.find(".fbx-item-current")))}else a(b).trigger("resize.foobox")},FooBox.lateBind=function(c,d){var e=a.extend(!0,{},FooBox.defaults,d||b.FOOBOX&&FOOBOX.o||{}),f=a(c);f.on("click.foobox",e.selector,function(a){a.preventDefault();var b=f.data("fbx_instance");b||(b=f.foobox(e).data("fbx_instance")),b instanceof FooBox.Instance&&"number"==typeof this.index&&(b.items.indexes.set(this.index),b.modal.show(!0))})}}}(jQuery,window,window.console),function(a,b){var c={images:{noRightClick:!1,attr:"href",overflow:!1,fullscreen:!0,showCaptions:!0,regex:/https?:\/\/.*?\/.*?\.(jpg|jpeg|png|gif|bmp)/i,maxWidth:-1,maxHeight:-1,findUrl:function(a,c){if(!c)return"";if(c.data("image"))return c.data("image");var d=c.attr(a.options.images.attr);return"string"==typeof d?b.qualifiedURL(c.attr(a.options.images.attr)):""}}};b.Item.prototype.image=null,b.Item.prototype.maxWidth=null,b.Item.prototype.maxHeight=null,b.ImageHandler=function(c){this.FooBox=c,this.type="image";var d=this;this.handles=function(a){var b=d.FooBox.options.images.findUrl(d.FooBox,a),c="string"==typeof b&&null!=b.match(d.FooBox.options.images.regex),e=d.FooBox.raise("foobox.handlesImage",{element:a,handle:c});return e.fb.handle},this.defaults=function(a){a.fullscreen=a.fullscreen||d.FooBox.options.images.fullscreen,a.captions=a.captions||d.FooBox.options.images.showCaptions,a.social=a.social||!0,a.overflow=a.overflow||d.FooBox.options.images.overflow,a.proportion=a.proportion||!0,a.maxWidth=a.maxWidth||d.FooBox.options.images.maxWidth,a.maxHeight=a.maxHeight||d.FooBox.options.images.maxHeight},this.parse=function(a){var c=new b.Item(d.type,a,this);return d.defaults(c),c.url=d.FooBox.options.images.findUrl(d.FooBox,a)||null,c.width=b.Size.check(a.data("width")||c.width||null),c.height=b.Size.check(a.data("height")||c.height||null),c.fullscreen="boolean"==typeof a.data("fullscreen")?a.data("fullscreen"):c.fullscreen,c.overflow="boolean"==typeof a.data("overflow")?a.data("overflow"):c.overflow,c.proportion="boolean"==typeof a.data("proportion")?a.data("proportion"):c.proportion,c.maxWidth="number"==typeof a.data("maxWidth")?a.data("maxWidth"):c.maxWidth,c.maxHeight="number"==typeof a.data("maxHeight")?a.data("maxHeight"):c.maxHeight,c.image=null,c.image_url=c.url,c},this.load=function(b,c,e,f){try{var g=function(){var f=a(b.image).addClass("fbx-item fbx-item-image");d.FooBox.options.images.noRightClick&&f.on("contextmenu",function(a){return a.preventDefault(),!1}),c.empty().append(f),a.isFunction(e)&&e(d.getSize(b))};b.image&&null!==b.image?g():(b.image=new Image,b.image.onload=function(){b.image.onload=b.image.onerror=null,b.height=b.image.height,b.width=b.image.width,g()},b.image.onerror=function(){b.image.onload=b.image.onerror=null,b.image=null,a.isFunction(f)&&f("An error occurred attempting to load the image.")},b.image.src=b.url)}catch(h){a.isFunction(f)&&f(h)}},this.preload=function(a){if(1!=a.preloaded){var b=new Image;b.src=a.url,a.preloaded=!0}},this.getSize=function(a){if(null!=a.width&&null!=a.height){if(a.maxWidth>0&&a.maxHeight>0&&(a.width>a.maxWidth||a.height>a.maxHeight)){var c=a.width>a.height?a.maxWidth/a.width:a.maxHeight/a.height;a.width*=c,a.height*=c}return new b.Size(a.width,a.height)}return new b.Size(0,0)},this.hasChanged=function(a){if(b.isjQuery(a.element)){var c=d.FooBox.options.images.findUrl(d.FooBox,a.element);return a.url!=c}return!1}},b.handlers.register(b.ImageHandler,c)}(jQuery,window.FooBox),function(a,b){var c={keyboard:{enabled:!0,preventDefault:!1,stopPropagation:!1}};b.Keyboard=function(a){this.FooBox=a;var c=this;this.preinit=function(a){c.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":c.handlers.initialized,
|
10 |
+
"foobox.setupHtml":c.handlers.setupHtml})},this.destroy=function(){c.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&c.FooBox.element.off({"foobox.initialized foobox.reinitialized":c.handlers.initialized,"foobox.setupHtml":c.handlers.setupHtml}),c.FooBox.element.off("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.off("keydown.foobox",c.handlers.onKeydown)},initialized:function(){c.handlers.unbind(),1==c.FooBox.options.keyboard.enabled&&(c.FooBox.element.on("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.on("keydown.foobox",c.handlers.onKeydown))},setupHtml:function(a){a.fb.modal.attr("tabindex",0)},afterLoad:function(a){a.fb.modal.focus()},onKeydown:function(a){var b=c.FooBox.modal,d=c.FooBox.options.keyboard;b.element.hasClass("fbx-show")&&(b.element.hasClass("fbx-fullscreen-mode")||27!==a.which?c.FooBox.items.multiple()&&37===a.which?b.prev():c.FooBox.items.multiple()&&39===a.which&&b.next():b.close(),1==d.preventDefault&&a.preventDefault(),1==d.stopPropagation&&a.stopPropagation(),c.FooBox.raise("foobox.keydown",{keyCode:a.which}))}}},b.addons.register(b.Keyboard,c)}(jQuery,window.FooBox),function(a,b){var c={hideNavOnMobile:!1,resizeTimeout:300,breakpoints:{phone:640,tablet:1024},iosInterval:200};b.BPInfo=function(c){var d="undefined"!=typeof window.devicePixelRatio&&b.browser.isMobile?window.devicePixelRatio:1;this.width=(window.innerWidth||document.documentElement.clientWidth||(document.body?document.body.offsetWidth:0))/d,this.height=(window.innerHeight||document.documentElement.clientHeight||(document.body?document.body.offsetHeight:0))/d,this.orientation=this.width>this.height?"fbx-landscape":"fbx-portrait";var e,f=null;if(a.isArray(c))for(var g=0;g<c.length;g++)if(e=c[g],e&&e.width&&this.width<=e.width){f=e;break}this.breakpoint=null==f?"fbx-desktop":f.name},b.Responsive=function(c){this.FooBox=c,this.breakpoint={values:[],names:""},this.timers={resize:new b.Timer,ios:new b.Timer};var d=this,e=null;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.initialized foobox.reinitialized",d.handlers.initialized)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(b){b=b||!1,b&&d.FooBox.element.off("foobox.initialized foobox.reinitialized",d.handlers.initialized),a(window).off("resize.foobox",d.handlers.resize),d.FooBox.element.off({"foobox.beforeShow":d.handlers.iosBeforeShow,"foobox.close":d.handlers.iosClose})},initialized:function(){d.handlers.unbind(),d.setup.breakpoints(),d.style(),a(window).on("resize.foobox",d.handlers.resize),b.browser.iOS&&(b.browser.isSafari||b.browser.isChrome)&&d.FooBox.element.on({"foobox.beforeShow":d.handlers.iosBeforeShow,"foobox.close":d.handlers.iosClose})},resize:function(){d.timers.resize.start(function(){d.style();var a=d.FooBox.items.current();if(d.FooBox.modal.element.has("fbx-show")&&null!=a){var b=a.handler.getSize(a);d.FooBox.modal.resize(b,d.FooBox.modal.element.find(".fbx-item-current"))}},d.FooBox.options.resizeTimeout)},iosBeforeShow:function(){d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval)},iosClose:function(){d.timers.ios.stop()},ios:function(){if(!d.FooBox.modal.element.hasClass("fbx-show"))return void d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval);var a=window.orientation||0,c=window.innerHeight,f=90==a||-90==a,g=0,h=0,i=f?screen.availWidth:screen.availHeight;b.browser.isChrome?(g=i-(f?76:56),h=i-(f?0:20)):b.browser.isSafari&&(g=i-88,h=i-(f?0:19)),(null==e||0==e)&&g>=c?(e=!0,d.iosRedraw()):(null==e||1==e)&&c>=h&&(e=!1,d.iosRedraw()),d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval)}},this.setup={breakpoints:function(){d.breakpoint.values=[],d.breakpoint.names="";for(var a in d.FooBox.options.breakpoints)d.FooBox.options.breakpoints.hasOwnProperty(a)&&(d.breakpoint.values.push({name:d.fixName(a),width:d.FooBox.options.breakpoints[a]}),d.breakpoint.names+=d.fixName(a)+" ");d.breakpoint.values.sort(function(a,b){return a.width-b.width})}},this.iosRedraw=function(){window.scrollTo(0,document.body.scrollTop),a(window).trigger("resize")},this.fixName=function(a){return/^fbx-[a-zA-Z0-9]/.test(a)?a:"fbx-"+a},this.style=function(){var a=new b.BPInfo(d.breakpoint.values),c=d.FooBox.modal.element;c.removeClass(d.breakpoint.names).removeClass("fbx-desktop fbx-landscape fbx-portrait").addClass(a.breakpoint).addClass(a.orientation),d.FooBox.options.hideNavOnMobile===!0?c.addClass("fbx-no-nav"):c.removeClass("fbx-no-nav")}},b.Responsive.metaCheck=function(){var b=a("meta[name=viewport]"),c=b.attr("content");if(b.length>0&&"string"==typeof c){for(var d=c.split(","),e=!1,f=!1,g=0;g<d.length;g++){var h=a.trim(d[g]);"width"==h.substring(0,5)&&-1!==h.indexOf("device-width")?e=!0:"initial-scale"==h.substring(0,13)&&(f=!0)}e&&!f&&(d.push("initial-scale=1"),c=d.join(","),b.attr("content",c))}},b.addons.register(b.Responsive,c),b.Responsive.metaCheck()}(jQuery,window.FooBox),function(a,b){var c={captions:{animation:"slide",enabled:!0,descSource:"find",hoverDelay:300,maxHeight:.4,onlyShowOnHover:!1,onlyShowOnClick:!1,overrideDesc:!1,overrideTitle:!1,prettify:!1,titleSource:"image_find"}};b.Item.prototype.captions=!1,b.Item.prototype.title=null,b.Item.prototype.description=null,b.Item.prototype.caption=null,b.Captions=function(c){this.FooBox=c,this.timers={hover:new b.Timer};var d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":d.handlers.initialized,"foobox.setupHtml":d.handlers.setupHtml,"foobox.setupOptions":d.handlers.setupOptions,"foobox.parseItem":d.handlers.parseItem,"foobox.onError":d.handlers.onError})},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off({"foobox.initialized foobox.reinitialized":d.handlers.initialized,"foobox.setupHtml":d.handlers.setupHtml,"foobox.setupOptions":d.handlers.setupOptions,"foobox.parseItem":d.handlers.parseItem,"foobox.onError":d.handlers.onError,"foobox.close":d.handlers.close}),d.FooBox.element.off({"foobox.beforeLoad":d.handlers.beforeLoad,"foobox.afterLoad":d.handlers.afterLoad}),d.FooBox.modal instanceof b.Modal&&b.isjQuery(d.FooBox.modal.element)&&d.FooBox.modal.element.off("mouseenter.captions mouseleave.captions").find(".fbx-item-current, .fbx-item-next").off("click.captions")},initialized:function(a){d.handlers.unbind(),a.fb.options.captions.enabled===!0&&(a.fb.instance.element.on({"foobox.beforeLoad":d.handlers.beforeLoad,"foobox.afterLoad":d.handlers.afterLoad,"foobox.close":d.handlers.close}),-1===a.fb.options.modalClass.indexOf("fbx-caption-toggle-only")&&a.fb.modal.find(".fbx-item-current, .fbx-item-next").on("click.captions",d.handlers.toggleCaptions),a.fb.options.captions.onlyShowOnHover===!0&&a.fb.modal.on("mouseenter.captions",".fbx-inner:not(:has(.fbx-item-error))",d.handlers.mouseenter).on("mouseleave.captions",".fbx-inner:not(:has(.fbx-item-error))",d.handlers.mouseleave))},toggleCaptions:function(b){if(a(b.target).is("img")||a(b.target).is(".fbx-close-caption")||a(b.target).is(".fbx-open-caption")){var c=d.FooBox.items.current(),e=d.FooBox.modal.element;c.captions&&!e.hasClass("fbx-error")&&(b.preventDefault(),e.find(".fbx-caption").is(".fbx-fade-caption, .fbx-slide-caption, .fbx-hide-caption")?(e.removeClass("fbx-captions-hidden"),d.show()):(e.addClass("fbx-captions-hidden"),d.hide()))}},mouseenter:function(){d.timers.hover.start(function(){d.show()},d.FooBox.options.captions.hoverDelay)},mouseleave:function(){d.timers.hover.start(function(){d.hide()},d.FooBox.options.captions.hoverDelay)},setupHtml:function(b){var c=a("<div/>",{"class":"fbx-caption"}),e=a("<a/>",{"class":"fbx-open-caption",html:"…"}).on("click.captions",d.handlers.toggleCaptions);"string"==typeof b.fb.options.modalClass&&-1!=b.fb.options.modalClass.indexOf("fbx-sticky-caption")?b.fb.modal.append(c,e):(b.fb.modal.find(".fbx-stage").append(c),b.fb.modal.find(".fbx-inner").append(e))},setupOptions:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},close:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},beforeLoad:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},afterLoad:function(a){var b=a.fb.item;return!b||b.error||b.captionLoaded||(a.fb.instance.raise("foobox.alterCaption",{element:a.fb.element,item:b}),b.captionLoaded=!0),1==a.fb.options.captions.onlyShowOnHover?void d.update():void(0==a.fb.options.captions.onlyShowOnClick&&d.show())},onError:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},parseItem:function(c){var e=c.fb.options.captions;if(c.fb.item.captions&&0!=e.enabled){var f,g,h="";if(null!=c.fb.element){var i=a(c.fb.element).data("titleSource")||a(c.fb.instance.element).data("titleSource")||e.titleSource,j=a(c.fb.element).data("descSource")||a(c.fb.instance.element).data("descSource")||e.descSource;"none"!=i&&(f=c.fb.element.data("captionTitle")||c.fb.element.data("title")||d.text(c.fb.element,i)),"none"!=j&&(g=c.fb.element.data("captionDesc")||c.fb.element.data("description")||d.text(c.fb.element,j))}else f=c.fb.item.title,g=c.fb.item.description;f=null==f||"undefined"==typeof f?"":f+"",g=null==g||"undefined"==typeof g?"":g+"",f&&f==g&&(g=null),h="string"==typeof f&&f.length>0?b.format('<div class="fbx-caption-title">{0}</div>',f):h,h="string"==typeof g&&g.length>0?h+b.format('<div class="fbx-caption-desc">{0}</div>',g):h,c.fb.item.title=f,c.fb.item.description=g,c.fb.item.caption=h,c.fb.instance.raise("foobox.createCaption",{element:c.fb.element,item:c.fb.item})}}},this.text=function(b,c){var e;switch(c){case"find":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title")||b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image_find":e=a.trim(b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image":e=a.trim(b.find("img:first").data("title")||b.find("img:first").attr("title"));break;case"image_alt":e=a.trim(b.find("img:first").data("alt")||b.find("img:first").attr("alt"));break;case"anchor":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title"));break;default:e=null}return d.FooBox.options.captions.prettify&&(e=d.prettifier(e)),e},this.animation=function(){switch(d.FooBox.options.captions.animation){case"fade":return"fbx-fade-caption";case"slide":return"fbx-slide-caption";default:return"fbx-hide-caption"}},this.hide=function(){var a=d.FooBox.items.current(),b=d.FooBox.modal.element.find(".fbx-caption");return d.FooBox.options.captions.enabled&&a.captions&&"string"==typeof a.caption&&0!=a.caption.length?(b.addClass(d.animation()),void d.FooBox.raise("foobox.captionsHide",{item:a})):void b.addClass("fbx-hide-caption")},this.show=function(){var a=d.FooBox,c=a.items.current(),e=a.modal.element.find(".fbx-caption");return!a.options.captions.enabled||!c.captions||"string"!=typeof c.caption||0==c.caption.length||a.modal.element.hasClass("fbx-captions-hidden")||b.isjQuery(c.element)&&c.element.hasClass("no-captions")?void e.addClass("fbx-hide-caption"):(d.update(),e.removeClass("fbx-fade-caption fbx-slide-caption fbx-hide-caption"),void d.FooBox.raise("foobox.captionsShow",{item:c}))},this.update=function(){var c=d.FooBox.items.current(),e=d.FooBox.modal.element.find(".fbx-caption");e.html(c.caption).find('a[href^="#"]').filter(function(){var c=a(this).attr("href"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof b.Instance?(a(this).data("hrefTarget",d.get(0)),!0):!1}).off("click.captions").on("click.captions",function(c){c.preventDefault();var e=a(this).data("hrefTarget"),f=a(e).data("fbx_instance")||a(e).data("fbx_p_instance");return f instanceof b.Instance&&(d.FooBox.modal.close(),f.items.indexes.set(e.index),f.modal.show()),!1}),a("<a/>",{"class":"fbx-close-caption",html:"×"}).on("click.captions",d.handlers.toggleCaptions).prependTo(e)},this.prettifier=function(a){return"string"!=typeof a?null:(a=a.replace(/\s*-\d+/g,"").replace(/\s*_\d+/g,"").replace(/-/g," ").replace(/_/g," "),a=a.replace(/\w\S*/g,function(a){return-1!=a.indexOf("#")?a:a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}))}},b.addons.register(b.Captions,c)}(jQuery,window.FooBox),function(a,b){var c={wordpress:{enabled:!1}};b.Wordpress=function(c){this.FooBox=c;var d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.createCaption",d.handlers.onCreateCaption)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.createCaption",d.handlers.onCreateCaption)},onCreateCaption:function(c){var d=c.fb.options,e=c.fb.instance.element,f=c.fb.item.element,g="",h=c.fb.item.title,i=c.fb.item.description;if(1==d.wordpress.enabled&&b.isjQuery(f)){var j=f.data("captionTitle")||f.data("title"),k=f.data("captionDesc")||f.data("description");if(e.hasClass("gallery"))d.captions.overrideTitle===!1&&(h=j||f.parents(".gallery-item:first").find(".wp-caption-text:first").html()||f.parents(".gallery-item:first").find(".gallery-caption:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(e.hasClass("wp-caption")||f.hasClass("wp-caption"))d.captions.overrideTitle===!1&&(h=j||f.find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(f.parents(".wp-caption:first").length>0)d.captions.overrideTitle===!1&&(h=j||f.parents(".wp-caption:first").find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.parents(".wp-caption:first").find("img").attr("alt")||i||"");else{if(!e.hasClass("tiled-gallery"))return;d.captions.overrideTitle===!1&&(h=j||f.parents(".tiled-gallery-item:first").find(".tiled-gallery-caption").html()||f.find("img").data("image-title")||f.find("img").attr("title")||h||""),d.captions.overrideDesc===!1&&(i=k||a.trim(f.find("img").data("image-description")).replace(/(^<p>)|(<\/p>$)/gi,"")||i||"")}h+="",i+="",h=h||"",i=i||"";var l=a("<div/>"),m=l.html(h).text(),n=l.html(i).text();(a.trim(h)==a.trim(i)||m==n)&&(i=null),g="string"==typeof h&&h.length>0?b.format('<div class="fbx-caption-title">{0}</div>',h):g,g="string"==typeof i&&i.length>0?g+b.format('<div class="fbx-caption-desc">{0}</div>',i):g,c.fb.item.title=h,c.fb.item.description=i,c.fb.item.caption=g}}}},b.addons.register(b.Wordpress,c)}(jQuery,window.FooBox),function(a,b){var c={pan:{enabled:!0,showOverview:!0,position:"fbx-top-right"}};b.Pan=function(c){this.FooBox=c;var d,e,f,g,h=this,i=!1,j=!1,k=null,l=null,m=null,n=null,o=null,p=0;this.preinit=function(a){h.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":h.handlers.initialized})},this.destroy=function(){h.handlers.unbind(!0)},this.setOverview=function(){var a=parseInt(n.css("max-width")),b=parseInt(n.css("max-height")),c=a/k.width,d=b/k.height;p=c>d?d:c;var e=k.width*p,f=k.height*p;n.width(e).height(f).css("background-image","url("+k.url+")")},this.setViewport=function(){var a=m.width(),b=m.height(),c=a*p,d=b*p;o.width(c).height(d)},this.disableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").off("click.captions",c.handlers.toggleCaptions)},this.enableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").on("click.captions",c.handlers.toggleCaptions)},this.handlers={unbind:function(a){a=a||!1,a&&h.FooBox.element.off({"foobox.initialized foobox.reinitialized":h.handlers.initialized}),h.FooBox.element.off({"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow}),h.FooBox.modal instanceof b.Modal&&b.isjQuery(h.FooBox.modal.element)&&h.FooBox.modal.element.find(".fbx-stage").off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,mouseup:h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning")},initialized:function(a){h.handlers.unbind(),a.fb.options.pan.enabled===!0&&h.FooBox.element.on({"foobox.close":h.handlers.onMouseUp,"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow})},onAfterLoad:function(a){i===!0&&"image"==a.fb.item.handler.type&&(h.setOverview(),h.setViewport())},onShowOverflow:function(b){"image"==b.fb.item.handler.type&&(i===!0?(h.setOverview(),h.setViewport()):(i=!0,h.disableCaptionImageClick(),k=b.fb.item,m=h.FooBox.modal.element.addClass("fbx-pannable-item").find(".fbx-stage").on({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).addClass("fbx-pannable"),l=b.fb.container,b.fb.options.pan.showOverview===!0&&(n=a("<div/>",{"class":"fbx-pan-overview"}).addClass(b.fb.options.pan.position).on("click",h.handlers.onOverviewClick).appendTo(m),o=a("<div/>",{"class":"fbx-pan-viewport"}).appendTo(n),l.on("scroll",h.handlers.onScroll),h.setOverview(),h.setViewport())))},onHideOverflow:function(a){i===!0&&(i=!1,h.enableCaptionImageClick(),a.fb.options.pan.showOverview===!0&&n.remove(),l.off("scroll",h.handlers.onScroll),m.off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning"),h.FooBox.modal.element.removeClass("fbx-pannable-item"))},onMouseDown:function(a){if(i===!0){a.preventDefault(),m.addClass("fbx-panning");var b=l.get(0);j=!0,d=a.pageX,e=a.pageY,f=b.scrollLeft,g=b.scrollTop}},onMouseMove:function(a){if(j===!0&&i===!0){var b=l.get(0);b.scrollLeft=f-(a.pageX-d),b.scrollTop=g-(a.pageY-e)}},onMouseUp:function(){i===!0&&(j=!1,m.removeClass("fbx-panning"),d=0,e=0,f=0,g=0)},onScroll:function(){var a=l.get(0),b=a.scrollTop/k.height*100,c=a.scrollLeft/k.width*100;o.css({top:b+"%",left:c+"%"})},onOverviewClick:function(b){var c=a(this).offset(),d=(b.pageX-c.left)/p,e=(b.pageY-c.top)/p,f=d-l.width()/2,g=e-l.height()/2;l.animate({scrollTop:g,scrollLeft:f},300)}}},b.addons.register(b.Pan,c)}(jQuery,window.FooBox),function(a,b){var c={swipe:{enabled:!0,min:80}};b.Swipe=function(a){this.FooBox=a,this.isMoving=!1;var c,d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.initialized foobox.reinitialized",d.handlers.initialized)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.initialized foobox.reinitialized",d.handlers.initialized),d.FooBox.modal instanceof b.Modal&&b.isjQuery(d.FooBox.modal.element)&&d.FooBox.modal.element.off({touchstart:d.handlers.onTouchStart,touchmove:d.handlers.onTouchMove})},initialized:function(a){d.handlers.unbind(),a.fb.options.swipe.enabled===!0&&a.fb.modal.on("touchstart",d.handlers.onTouchStart)},onTouchStart:function(a){var b=a.originalEvent.touches||a.touches;1==b.length&&d.FooBox.items.multiple()&&(c=b[0].pageX,d.isMoving=!0,d.FooBox.modal.element.on("touchmove",d.handlers.onTouchMove))},onTouchMove:function(a){if(d.isMoving){var b=a.originalEvent.touches||a.touches,e=b[0].pageX,f=c-e;Math.abs(f)>=d.FooBox.options.swipe.min&&(d.cancelTouch(),f>0?(d.FooBox.raise("foobox.swipeRight"),d.FooBox.modal.next()):(d.FooBox.raise("foobox.swipeLeft"),d.FooBox.modal.prev()))}}},this.cancelTouch=function(){d.FooBox.modal.element.off("touchmove",d.handlers.onTouchMove),c=null,d.isMoving=!1}},b.addons.register(b.Swipe,c)}(jQuery,window.FooBox);
|
freemius/.codeclimate.yml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
engines:
|
2 |
+
phpcodesniffer:
|
3 |
+
enabled: true
|
4 |
+
config:
|
5 |
+
standard: "WordPress"
|
6 |
+
checks:
|
7 |
+
Squiz Commenting InlineComment InvalidEndChar:
|
8 |
+
enabled: false
|
9 |
+
Squiz Commenting InlineComment SpacingBefore:
|
10 |
+
enabled: false
|
11 |
+
Squiz Commenting InlineComment WrongStyle:
|
12 |
+
enabled: false
|
13 |
+
Generic Commenting DocComment MissingShort:
|
14 |
+
enabled: false
|
15 |
+
Generic WhiteSpace ScopeIndent IncorrectExact:
|
16 |
+
enabled: false
|
17 |
+
ratings:
|
18 |
+
paths:
|
19 |
+
- "**.php"
|
freemius/.github/ISSUE_TEMPLATE.md
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
**Actual Behavior**:
|
2 |
+
- `What is the issue? (*)`
|
3 |
+
- `What is the expected behavior?`
|
4 |
+
|
5 |
+
**Versions**: (*)
|
6 |
+
- `Freemius SDK Version:`
|
7 |
+
- `WordPress Version:`
|
8 |
+
- `PHP Version:`
|
9 |
+
|
10 |
+
**Plugin / Theme**: (*)
|
11 |
+
- `Name:`
|
12 |
+
- `Slug:`
|
13 |
+
- `Freemius ID:`
|
14 |
+
|
15 |
+
**Additional Information**:
|
16 |
+
- `Browser Type: (*)`
|
17 |
+
- `Browser Version: (*)`
|
18 |
+
- `OS: (*)`
|
19 |
+
- `Stack Traces:`
|
20 |
+
|
21 |
+
----
|
22 |
+
**Note:** `(*)` indicates required information. Without this information, your issue may be auto-closed.
|
23 |
+
|
24 |
+
> You can find your Freemius SDK version at `/freemius/start.php`
|
25 |
+
|
26 |
+
> You can find your Freemius product ID in the Freemius dashboard: `SETTINGS -> INTEGRATION`.
|
27 |
+
|
28 |
+
> Do not modify the titles or questions. Simply add your responses to the ends of the questions.
|
29 |
+
Add more lines if needed.
|
freemius/.travis.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
sudo: false
|
2 |
+
|
3 |
+
language: php
|
4 |
+
|
5 |
+
php:
|
6 |
+
- 5.3
|
7 |
+
- 5.4
|
8 |
+
- 5.5
|
9 |
+
- 5.6
|
10 |
+
- 7.0
|
11 |
+
- hhvm
|
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>.
|
freemius/assets/css/admin/account.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
|
1 |
+
#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
|
freemius/assets/css/admin/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{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{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}
|
freemius/assets/css/admin/common.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
.theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#iframe{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}
|
1 |
+
.theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#iframe{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}
|
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 .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
|
1 |
+
#fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
|
freemius/assets/css/admin/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
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}
|
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}
|
freemius/assets/css/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/img/foobox-image-lightbox.png
ADDED
Binary file
|
freemius/assets/img/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/js/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
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 |
}
|
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};
|
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);
|
freemius/assets/scss/_mixins.scss
CHANGED
@@ -1,270 +1,270 @@
|
|
1 |
-
// ---- CSS3 SASS MIXINS ----
|
2 |
-
// https://github.com/madr/css3-sass-mixins
|
3 |
-
//
|
4 |
-
// Copyright (C) 2011 by Anders Ytterström
|
5 |
-
//
|
6 |
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 |
-
// of this software and associated documentation files (the "Software"), to deal
|
8 |
-
// in the Software without restriction, including without limitation the rights
|
9 |
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 |
-
// copies of the Software, and to permit persons to whom the Software is
|
11 |
-
// furnished to do so, subject to the following conditions:
|
12 |
-
//
|
13 |
-
// The above copyright notice and this permission notice shall be included in
|
14 |
-
// all copies or substantial portions of the Software.
|
15 |
-
//
|
16 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 |
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 |
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19 |
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 |
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 |
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22 |
-
// THE SOFTWARE.
|
23 |
-
//
|
24 |
-
|
25 |
-
// ---- LEGACY IE SUPPORT USING FILTERS ----
|
26 |
-
// Should IE filters be used or not?
|
27 |
-
// PROS: gradients, drop shadows etc will be handled by css.
|
28 |
-
// CONS: will harm the site performance badly,
|
29 |
-
// especially on sites with heavy rendering and scripting.
|
30 |
-
$useIEFilters: 0;
|
31 |
-
// might be 0 or 1. disabled by default.
|
32 |
-
// ---- /LEGACY IE SUPPORT USING FILTERS ----
|
33 |
-
|
34 |
-
|
35 |
-
@mixin background-size ($value) {
|
36 |
-
-webkit-background-size: $value;
|
37 |
-
background-size: $value;
|
38 |
-
}
|
39 |
-
|
40 |
-
@mixin border-image ($path, $offsets, $repeats) {
|
41 |
-
-moz-border-image: $path $offsets $repeats;
|
42 |
-
-o-border-image: $path $offsets $repeats;
|
43 |
-
-webkit-border-image: $path $offsets $repeats;
|
44 |
-
border-image: $path $offsets $repeats;
|
45 |
-
}
|
46 |
-
|
47 |
-
@mixin border-radius ($values...) {
|
48 |
-
-moz-border-radius: $values;
|
49 |
-
-webkit-border-radius: $values;
|
50 |
-
border-radius: $values;
|
51 |
-
/*-moz-background-clip: padding;
|
52 |
-
-webkit-background-clip: padding-box;
|
53 |
-
background-clip: padding-box;*/
|
54 |
-
}
|
55 |
-
|
56 |
-
@mixin box-shadow ($values...) {
|
57 |
-
-moz-box-shadow: $values;
|
58 |
-
-webkit-box-shadow: $values;
|
59 |
-
box-shadow: $values;
|
60 |
-
}
|
61 |
-
|
62 |
-
//@mixin box-shadow ($x, $y, $offset, $hex, $ie: $useIEFilters, $inset: null, $spread:null) {
|
63 |
-
// -moz-box-shadow: $x $y $offset $spread $hex $inset;
|
64 |
-
// -webkit-box-shadow: $x $y $offset $spread $hex $inset;
|
65 |
-
// box-shadow: $x $y $offset $spread $hex $inset;
|
66 |
-
//
|
67 |
-
// @if $ie == 1 {
|
68 |
-
// $iecolor: '#' + red($hex) + green($hex) + blue($hex);
|
69 |
-
// filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}');
|
70 |
-
// -ms-filter: quote(progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}'));
|
71 |
-
// }
|
72 |
-
//}
|
73 |
-
|
74 |
-
@mixin box-sizing($value) {
|
75 |
-
-moz-box-sizing: $value;
|
76 |
-
-webkit-box-sizing: $value;
|
77 |
-
box-sizing: $value;
|
78 |
-
}
|
79 |
-
|
80 |
-
// requires sass 3.2
|
81 |
-
@mixin keyframes($name){
|
82 |
-
@-moz-keyframes #{$name} { @content; }
|
83 |
-
@-ms-keyframes #{$name} { @content; }
|
84 |
-
@-o-keyframes #{$name} { @content; }
|
85 |
-
@-webkit-keyframes #{$name} { @content; }
|
86 |
-
@keyframes #{$name} { @content; }
|
87 |
-
}
|
88 |
-
|
89 |
-
@mixin linear-gradient($from, $to, $ie: $useIEFilters) {
|
90 |
-
@if $ie != 1 { background-color: $to; }
|
91 |
-
|
92 |
-
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, $from),color-stop(1, $to));
|
93 |
-
background-image: -webkit-linear-gradient(top, $from, $to);
|
94 |
-
background-image: -moz-linear-gradient(top, $from, $to);
|
95 |
-
background-image: -ms-linear-gradient(top, $from, $to);
|
96 |
-
background-image: -o-linear-gradient(top, $from, $to);
|
97 |
-
background-image: linear-gradient(top, bottom, $from, $to);
|
98 |
-
|
99 |
-
@if $ie == 1 {
|
100 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
@mixin horizontal-gradient($startColor: #555, $endColor: #333, $ie: $useIEFilters) {
|
105 |
-
@if $ie != 1 { background-color: $endColor; }
|
106 |
-
|
107 |
-
background-color: $endColor;
|
108 |
-
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
109 |
-
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
110 |
-
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
111 |
-
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
112 |
-
background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
|
113 |
-
background-repeat: repeat-x;
|
114 |
-
@if $ie == 1 {
|
115 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1);
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
@mixin radial-gradient($from, $to, $ie: $useIEFilters) {
|
120 |
-
@if $ie != 1 { background-color: $to; }
|
121 |
-
|
122 |
-
background: -moz-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
123 |
-
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to));
|
124 |
-
background: -webkit-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
125 |
-
background: -o-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
126 |
-
background: -ms-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
127 |
-
background: radial-gradient(center, circle cover, $from 0%, $to 100%);
|
128 |
-
background-color: $from;
|
129 |
-
|
130 |
-
@if $ie == 1 {
|
131 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}', GradientType=1); /* IE6-9 fallback on horizontal gradient */
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
@mixin perspective($perspective) {
|
136 |
-
-moz-perspective: $perspective;
|
137 |
-
-ms-perspective: $perspective;
|
138 |
-
-webkit-perspective: $perspective;
|
139 |
-
perspective: $perspective;
|
140 |
-
-moz-transform-style: preserve-3d;
|
141 |
-
-ms-transform-style: preserve-3d;
|
142 |
-
-webkit-transform-style: preserve-3d;
|
143 |
-
transform-style: preserve-3d;
|
144 |
-
}
|
145 |
-
|
146 |
-
@mixin transform ($transforms) {
|
147 |
-
-moz-transform: $transforms;
|
148 |
-
-o-transform: $transforms;
|
149 |
-
-ms-transform: $transforms;
|
150 |
-
-webkit-transform: $transforms;
|
151 |
-
transform: $transforms;
|
152 |
-
}
|
153 |
-
|
154 |
-
@mixin matrix ($a, $b, $c, $d, $e, $f) {
|
155 |
-
-moz-transform: matrix($a, $b, $c, $d, #{$e}px, #{$f}px);
|
156 |
-
-o-transform: matrix($a, $b, $c, $d, $e, $f);
|
157 |
-
-ms-transform: matrix($a, $b, $c, $d, $e, $f);
|
158 |
-
-webkit-transform: matrix($a, $b, $c, $d, $e, $f);
|
159 |
-
transform: matrix($a, $b, $c, $d, $e, $f);
|
160 |
-
}
|
161 |
-
|
162 |
-
@mixin rotate ($deg) {
|
163 |
-
@include transform(rotate(#{$deg}deg));
|
164 |
-
}
|
165 |
-
|
166 |
-
@mixin scale ($size) {
|
167 |
-
@include transform(scale(#{$size}));
|
168 |
-
}
|
169 |
-
|
170 |
-
@mixin translate ($x, $y) {
|
171 |
-
@include transform(translate($x, $y));
|
172 |
-
}
|
173 |
-
|
174 |
-
@mixin transition ($value...) {
|
175 |
-
-moz-transition: $value;
|
176 |
-
-o-transition: $value;
|
177 |
-
-ms-transition: $value;
|
178 |
-
-webkit-transition: $value;
|
179 |
-
transition: $value;
|
180 |
-
}
|
181 |
-
|
182 |
-
@mixin animation($str) {
|
183 |
-
-webkit-animation: #{$str};
|
184 |
-
-moz-animation: #{$str};
|
185 |
-
-ms-animation: #{$str};
|
186 |
-
-o-animation: #{$str};
|
187 |
-
animation: #{$str};
|
188 |
-
}
|
189 |
-
|
190 |
-
@mixin animation-name($str) {
|
191 |
-
-webkit-animation-name: #{$str};
|
192 |
-
-moz-animation-name: #{$str};
|
193 |
-
-ms-animation-name: #{$str};
|
194 |
-
-o-animation-name: #{$str};
|
195 |
-
animation-name: #{$str};
|
196 |
-
}
|
197 |
-
|
198 |
-
@mixin animation-duration($str) {
|
199 |
-
-webkit-animation-duration: #{$str};
|
200 |
-
-moz-animation-duration: #{$str};
|
201 |
-
-ms-animation-duration: #{$str};
|
202 |
-
-o-animation-duration: #{$str};
|
203 |
-
animation-duration: #{$str};
|
204 |
-
}
|
205 |
-
|
206 |
-
@mixin animation-direction($str) {
|
207 |
-
-webkit-animation-direction: #{$str};
|
208 |
-
-moz-animation-direction: #{$str};
|
209 |
-
-ms-animation-direction: #{$str};
|
210 |
-
-o-animation-direction: #{$str};
|
211 |
-
animation-direction: #{$str};
|
212 |
-
}
|
213 |
-
|
214 |
-
@mixin animation-delay($str) {
|
215 |
-
animation-delay:#{$str};
|
216 |
-
-o-animation-delay:#{$str};
|
217 |
-
-ms-animation-delay:#{$str};
|
218 |
-
-webkit-animation-delay:#{$str};
|
219 |
-
-moz-animation-delay:#{$str};
|
220 |
-
}
|
221 |
-
|
222 |
-
@mixin animation-iteration-count($str) {
|
223 |
-
animation-iteration-count:#{$str};
|
224 |
-
-o-animation-iteration-count:#{$str};
|
225 |
-
-ms-animation-iteration-count:#{$str};
|
226 |
-
-webkit-animation-iteration-count:#{$str};
|
227 |
-
-moz-animation-iteration-count:#{$str};
|
228 |
-
}
|
229 |
-
|
230 |
-
@mixin animation-timing-function($str) {
|
231 |
-
-webkit-animation-timing-function: #{$str};
|
232 |
-
-moz-animation-timing-function: #{$str};
|
233 |
-
-ms-animation-timing-function: #{$str};
|
234 |
-
-o-animation-timing-function: #{$str};
|
235 |
-
animation-timing-function: #{$str};
|
236 |
-
}
|
237 |
-
|
238 |
-
// ==== /CSS3 SASS MIXINS ====
|
239 |
-
|
240 |
-
@mixin opacity($opacity) {
|
241 |
-
opacity: $opacity;
|
242 |
-
$opacity-ie: $opacity * 100;
|
243 |
-
filter: alpha(opacity=$opacity-ie); //IE8
|
244 |
-
}
|
245 |
-
|
246 |
-
@mixin size($width, $height: $width)
|
247 |
-
{
|
248 |
-
width: $width;
|
249 |
-
height: $height;
|
250 |
-
}
|
251 |
-
|
252 |
-
@mixin clearfix
|
253 |
-
{
|
254 |
-
&:after {
|
255 |
-
content: "";
|
256 |
-
display: table;
|
257 |
-
clear: both;
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
// Placeholder text
|
262 |
-
@mixin placeholder($color: $input-color-placeholder) {
|
263 |
-
// Firefox
|
264 |
-
&::-moz-placeholder {
|
265 |
-
color: $color;
|
266 |
-
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
|
267 |
-
}
|
268 |
-
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
269 |
-
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
270 |
}
|
1 |
+
// ---- CSS3 SASS MIXINS ----
|
2 |
+
// https://github.com/madr/css3-sass-mixins
|
3 |
+
//
|
4 |
+
// Copyright (C) 2011 by Anders Ytterström
|
5 |
+
//
|
6 |
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 |
+
// of this software and associated documentation files (the "Software"), to deal
|
8 |
+
// in the Software without restriction, including without limitation the rights
|
9 |
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 |
+
// copies of the Software, and to permit persons to whom the Software is
|
11 |
+
// furnished to do so, subject to the following conditions:
|
12 |
+
//
|
13 |
+
// The above copyright notice and this permission notice shall be included in
|
14 |
+
// all copies or substantial portions of the Software.
|
15 |
+
//
|
16 |
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 |
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 |
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19 |
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 |
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 |
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22 |
+
// THE SOFTWARE.
|
23 |
+
//
|
24 |
+
|
25 |
+
// ---- LEGACY IE SUPPORT USING FILTERS ----
|
26 |
+
// Should IE filters be used or not?
|
27 |
+
// PROS: gradients, drop shadows etc will be handled by css.
|
28 |
+
// CONS: will harm the site performance badly,
|
29 |
+
// especially on sites with heavy rendering and scripting.
|
30 |
+
$useIEFilters: 0;
|
31 |
+
// might be 0 or 1. disabled by default.
|
32 |
+
// ---- /LEGACY IE SUPPORT USING FILTERS ----
|
33 |
+
|
34 |
+
|
35 |
+
@mixin background-size ($value) {
|
36 |
+
-webkit-background-size: $value;
|
37 |
+
background-size: $value;
|
38 |
+
}
|
39 |
+
|
40 |
+
@mixin border-image ($path, $offsets, $repeats) {
|
41 |
+
-moz-border-image: $path $offsets $repeats;
|
42 |
+
-o-border-image: $path $offsets $repeats;
|
43 |
+
-webkit-border-image: $path $offsets $repeats;
|
44 |
+
border-image: $path $offsets $repeats;
|
45 |
+
}
|
46 |
+
|
47 |
+
@mixin border-radius ($values...) {
|
48 |
+
-moz-border-radius: $values;
|
49 |
+
-webkit-border-radius: $values;
|
50 |
+
border-radius: $values;
|
51 |
+
/*-moz-background-clip: padding;
|
52 |
+
-webkit-background-clip: padding-box;
|
53 |
+
background-clip: padding-box;*/
|
54 |
+
}
|
55 |
+
|
56 |
+
@mixin box-shadow ($values...) {
|
57 |
+
-moz-box-shadow: $values;
|
58 |
+
-webkit-box-shadow: $values;
|
59 |
+
box-shadow: $values;
|
60 |
+
}
|
61 |
+
|
62 |
+
//@mixin box-shadow ($x, $y, $offset, $hex, $ie: $useIEFilters, $inset: null, $spread:null) {
|
63 |
+
// -moz-box-shadow: $x $y $offset $spread $hex $inset;
|
64 |
+
// -webkit-box-shadow: $x $y $offset $spread $hex $inset;
|
65 |
+
// box-shadow: $x $y $offset $spread $hex $inset;
|
66 |
+
//
|
67 |
+
// @if $ie == 1 {
|
68 |
+
// $iecolor: '#' + red($hex) + green($hex) + blue($hex);
|
69 |
+
// filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}');
|
70 |
+
// -ms-filter: quote(progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}'));
|
71 |
+
// }
|
72 |
+
//}
|
73 |
+
|
74 |
+
@mixin box-sizing($value) {
|
75 |
+
-moz-box-sizing: $value;
|
76 |
+
-webkit-box-sizing: $value;
|
77 |
+
box-sizing: $value;
|
78 |
+
}
|
79 |
+
|
80 |
+
// requires sass 3.2
|
81 |
+
@mixin keyframes($name){
|
82 |
+
@-moz-keyframes #{$name} { @content; }
|
83 |
+
@-ms-keyframes #{$name} { @content; }
|
84 |
+
@-o-keyframes #{$name} { @content; }
|
85 |
+
@-webkit-keyframes #{$name} { @content; }
|
86 |
+
@keyframes #{$name} { @content; }
|
87 |
+
}
|
88 |
+
|
89 |
+
@mixin linear-gradient($from, $to, $ie: $useIEFilters) {
|
90 |
+
@if $ie != 1 { background-color: $to; }
|
91 |
+
|
92 |
+
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, $from),color-stop(1, $to));
|
93 |
+
background-image: -webkit-linear-gradient(top, $from, $to);
|
94 |
+
background-image: -moz-linear-gradient(top, $from, $to);
|
95 |
+
background-image: -ms-linear-gradient(top, $from, $to);
|
96 |
+
background-image: -o-linear-gradient(top, $from, $to);
|
97 |
+
background-image: linear-gradient(top, bottom, $from, $to);
|
98 |
+
|
99 |
+
@if $ie == 1 {
|
100 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
@mixin horizontal-gradient($startColor: #555, $endColor: #333, $ie: $useIEFilters) {
|
105 |
+
@if $ie != 1 { background-color: $endColor; }
|
106 |
+
|
107 |
+
background-color: $endColor;
|
108 |
+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
109 |
+
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
110 |
+
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
111 |
+
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
112 |
+
background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
|
113 |
+
background-repeat: repeat-x;
|
114 |
+
@if $ie == 1 {
|
115 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1);
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
@mixin radial-gradient($from, $to, $ie: $useIEFilters) {
|
120 |
+
@if $ie != 1 { background-color: $to; }
|
121 |
+
|
122 |
+
background: -moz-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
123 |
+
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to));
|
124 |
+
background: -webkit-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
125 |
+
background: -o-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
126 |
+
background: -ms-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
127 |
+
background: radial-gradient(center, circle cover, $from 0%, $to 100%);
|
128 |
+
background-color: $from;
|
129 |
+
|
130 |
+
@if $ie == 1 {
|
131 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}', GradientType=1); /* IE6-9 fallback on horizontal gradient */
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
@mixin perspective($perspective) {
|
136 |
+
-moz-perspective: $perspective;
|
137 |
+
-ms-perspective: $perspective;
|
138 |
+
-webkit-perspective: $perspective;
|
139 |
+
perspective: $perspective;
|
140 |
+
-moz-transform-style: preserve-3d;
|
141 |
+
-ms-transform-style: preserve-3d;
|
142 |
+
-webkit-transform-style: preserve-3d;
|
143 |
+
transform-style: preserve-3d;
|
144 |
+
}
|
145 |
+
|
146 |
+
@mixin transform ($transforms) {
|
147 |
+
-moz-transform: $transforms;
|
148 |
+
-o-transform: $transforms;
|
149 |
+
-ms-transform: $transforms;
|
150 |
+
-webkit-transform: $transforms;
|
151 |
+
transform: $transforms;
|
152 |
+
}
|
153 |
+
|
154 |
+
@mixin matrix ($a, $b, $c, $d, $e, $f) {
|
155 |
+
-moz-transform: matrix($a, $b, $c, $d, #{$e}px, #{$f}px);
|
156 |
+
-o-transform: matrix($a, $b, $c, $d, $e, $f);
|
157 |
+
-ms-transform: matrix($a, $b, $c, $d, $e, $f);
|
158 |
+
-webkit-transform: matrix($a, $b, $c, $d, $e, $f);
|
159 |
+
transform: matrix($a, $b, $c, $d, $e, $f);
|
160 |
+
}
|
161 |
+
|
162 |
+
@mixin rotate ($deg) {
|
163 |
+
@include transform(rotate(#{$deg}deg));
|
164 |
+
}
|
165 |
+
|
166 |
+
@mixin scale ($size) {
|
167 |
+
@include transform(scale(#{$size}));
|
168 |
+
}
|
169 |
+
|
170 |
+
@mixin translate ($x, $y) {
|
171 |
+
@include transform(translate($x, $y));
|
172 |
+
}
|
173 |
+
|
174 |
+
@mixin transition ($value...) {
|
175 |
+
-moz-transition: $value;
|
176 |
+
-o-transition: $value;
|
177 |
+
-ms-transition: $value;
|
178 |
+
-webkit-transition: $value;
|
179 |
+
transition: $value;
|
180 |
+
}
|
181 |
+
|
182 |
+
@mixin animation($str) {
|
183 |
+
-webkit-animation: #{$str};
|
184 |
+
-moz-animation: #{$str};
|
185 |
+
-ms-animation: #{$str};
|
186 |
+
-o-animation: #{$str};
|
187 |
+
animation: #{$str};
|
188 |
+
}
|
189 |
+
|
190 |
+
@mixin animation-name($str) {
|
191 |
+
-webkit-animation-name: #{$str};
|
192 |
+
-moz-animation-name: #{$str};
|
193 |
+
-ms-animation-name: #{$str};
|
194 |
+
-o-animation-name: #{$str};
|
195 |
+
animation-name: #{$str};
|
196 |
+
}
|
197 |
+
|
198 |
+
@mixin animation-duration($str) {
|
199 |
+
-webkit-animation-duration: #{$str};
|
200 |
+
-moz-animation-duration: #{$str};
|
201 |
+
-ms-animation-duration: #{$str};
|
202 |
+
-o-animation-duration: #{$str};
|
203 |
+
animation-duration: #{$str};
|
204 |
+
}
|
205 |
+
|
206 |
+
@mixin animation-direction($str) {
|
207 |
+
-webkit-animation-direction: #{$str};
|
208 |
+
-moz-animation-direction: #{$str};
|
209 |
+
-ms-animation-direction: #{$str};
|
210 |
+
-o-animation-direction: #{$str};
|
211 |
+
animation-direction: #{$str};
|
212 |
+
}
|
213 |
+
|
214 |
+
@mixin animation-delay($str) {
|
215 |
+
animation-delay:#{$str};
|
216 |
+
-o-animation-delay:#{$str};
|
217 |
+
-ms-animation-delay:#{$str};
|
218 |
+
-webkit-animation-delay:#{$str};
|
219 |
+
-moz-animation-delay:#{$str};
|
220 |
+
}
|
221 |
+
|
222 |
+
@mixin animation-iteration-count($str) {
|
223 |
+
animation-iteration-count:#{$str};
|
224 |
+
-o-animation-iteration-count:#{$str};
|
225 |
+
-ms-animation-iteration-count:#{$str};
|
226 |
+
-webkit-animation-iteration-count:#{$str};
|
227 |
+
-moz-animation-iteration-count:#{$str};
|
228 |
+
}
|
229 |
+
|
230 |
+
@mixin animation-timing-function($str) {
|
231 |
+
-webkit-animation-timing-function: #{$str};
|
232 |
+
-moz-animation-timing-function: #{$str};
|
233 |
+
-ms-animation-timing-function: #{$str};
|
234 |
+
-o-animation-timing-function: #{$str};
|
235 |
+
animation-timing-function: #{$str};
|
236 |
+
}
|
237 |
+
|
238 |
+
// ==== /CSS3 SASS MIXINS ====
|
239 |
+
|
240 |
+
@mixin opacity($opacity) {
|
241 |
+
opacity: $opacity;
|
242 |
+
$opacity-ie: $opacity * 100;
|
243 |
+
filter: alpha(opacity=$opacity-ie); //IE8
|
244 |
+
}
|
245 |
+
|
246 |
+
@mixin size($width, $height: $width)
|
247 |
+
{
|
248 |
+
width: $width;
|
249 |
+
height: $height;
|
250 |
+
}
|
251 |
+
|
252 |
+
@mixin clearfix
|
253 |
+
{
|
254 |
+
&:after {
|
255 |
+
content: "";
|
256 |
+
display: table;
|
257 |
+
clear: both;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
// Placeholder text
|
262 |
+
@mixin placeholder($color: $input-color-placeholder) {
|
263 |
+
// Firefox
|
264 |
+
&::-moz-placeholder {
|
265 |
+
color: $color;
|
266 |
+
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
|
267 |
+
}
|
268 |
+
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
269 |
+
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
270 |
}
|
freemius/assets/scss/admin/_themes.scss
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
.theme-browser
|
2 |
-
{
|
3 |
-
.theme
|
4 |
-
{
|
5 |
-
.fs-premium-theme-badge
|
6 |
-
{
|
7 |
-
position: absolute;
|
8 |
-
top: 10px;
|
9 |
-
right: 0;
|
10 |
-
background: $fs-logo-green-color;
|
11 |
-
color: #fff;
|
12 |
-
text-transform: uppercase;
|
13 |
-
padding: 5px 10px;
|
14 |
-
@include border-radius(3px 0 0 3px);
|
15 |
-
font-weight: bold;
|
16 |
-
border-right: 0;
|
17 |
-
@include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
|
18 |
-
font-size: 1.1em;
|
19 |
-
}
|
20 |
-
}
|
21 |
}
|
1 |
+
.theme-browser
|
2 |
+
{
|
3 |
+
.theme
|
4 |
+
{
|
5 |
+
.fs-premium-theme-badge
|
6 |
+
{
|
7 |
+
position: absolute;
|
8 |
+
top: 10px;
|
9 |
+
right: 0;
|
10 |
+
background: $fs-logo-green-color;
|
11 |
+
color: #fff;
|
12 |
+
text-transform: uppercase;
|
13 |
+
padding: 5px 10px;
|
14 |
+
@include border-radius(3px 0 0 3px);
|
15 |
+
font-weight: bold;
|
16 |
+
border-right: 0;
|
17 |
+
@include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
|
18 |
+
font-size: 1.1em;
|
19 |
+
}
|
20 |
+
}
|
21 |
}
|
freemius/assets/scss/admin/account.scss
CHANGED
@@ -1,256 +1,256 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
#fs_account
|
4 |
-
{
|
5 |
-
.postbox,
|
6 |
-
.widefat
|
7 |
-
{
|
8 |
-
max-width: 700px;
|
9 |
-
}
|
10 |
-
|
11 |
-
h3
|
12 |
-
{
|
13 |
-
font-size: 1.3em;
|
14 |
-
padding: 12px 15px;
|
15 |
-
margin: 0 0 12px 0;
|
16 |
-
line-height: 1.4;
|
17 |
-
border-bottom: 1px solid #F1F1F1;
|
18 |
-
|
19 |
-
.dashicons {
|
20 |
-
width: 26px;
|
21 |
-
height: 26px;
|
22 |
-
font-size: 1.3em;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
i.dashicons
|
27 |
-
{
|
28 |
-
font-size: 1.2em;
|
29 |
-
height: 1.2em;
|
30 |
-
width: 1.2em;
|
31 |
-
}
|
32 |
-
|
33 |
-
.button
|
34 |
-
{
|
35 |
-
i.dashicons
|
36 |
-
{
|
37 |
-
vertical-align: middle;
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
.fs-header-actions
|
42 |
-
{
|
43 |
-
position: absolute;
|
44 |
-
top: 17px;
|
45 |
-
right: 15px;
|
46 |
-
font-size: 0.9em;
|
47 |
-
|
48 |
-
ul
|
49 |
-
{
|
50 |
-
margin: 0;
|
51 |
-
}
|
52 |
-
|
53 |
-
li
|
54 |
-
{
|
55 |
-
form
|
56 |
-
{
|
57 |
-
display: inline-block;
|
58 |
-
}
|
59 |
-
|
60 |
-
float: left;
|
61 |
-
a
|
62 |
-
{
|
63 |
-
text-decoration: none;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
#fs_account_details .button-group {
|
70 |
-
float: right;
|
71 |
-
}
|
72 |
-
|
73 |
-
.rtl #fs_account .fs-header-actions
|
74 |
-
{
|
75 |
-
left: 15px;
|
76 |
-
right: auto;
|
77 |
-
}
|
78 |
-
|
79 |
-
.fs-key-value-table
|
80 |
-
{
|
81 |
-
width: 100%;
|
82 |
-
|
83 |
-
form
|
84 |
-
{
|
85 |
-
display: inline-block;
|
86 |
-
}
|
87 |
-
|
88 |
-
tr
|
89 |
-
{
|
90 |
-
td:first-child
|
91 |
-
{
|
92 |
-
nobr
|
93 |
-
{
|
94 |
-
font-weight: bold;
|
95 |
-
}
|
96 |
-
|
97 |
-
text-align: right;
|
98 |
-
|
99 |
-
form
|
100 |
-
{
|
101 |
-
display: block;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
td.fs-right
|
106 |
-
{
|
107 |
-
text-align: right;
|
108 |
-
}
|
109 |
-
|
110 |
-
&.fs-odd
|
111 |
-
{
|
112 |
-
background: #ebebeb;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
td, th
|
117 |
-
{
|
118 |
-
padding: 10px;
|
119 |
-
}
|
120 |
-
|
121 |
-
code {
|
122 |
-
line-height: 28px;
|
123 |
-
}
|
124 |
-
|
125 |
-
var, code, input[type="text"]
|
126 |
-
{
|
127 |
-
color: #0073AA;
|
128 |
-
font-size: 16px;
|
129 |
-
background: none;
|
130 |
-
}
|
131 |
-
|
132 |
-
input[type="text"] {
|
133 |
-
width: 100%;
|
134 |
-
font-weight: bold;
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
label.fs-tag
|
139 |
-
{
|
140 |
-
background: #ffba00;
|
141 |
-
color: #fff;
|
142 |
-
display: inline-block;
|
143 |
-
border-radius: 3px;
|
144 |
-
padding: 5px;
|
145 |
-
font-size: 11px;
|
146 |
-
line-height: 11px;
|
147 |
-
vertical-align: baseline;
|
148 |
-
|
149 |
-
&.fs-warn
|
150 |
-
{
|
151 |
-
background: #ffba00;
|
152 |
-
}
|
153 |
-
&.fs-success
|
154 |
-
{
|
155 |
-
background: #46b450;
|
156 |
-
}
|
157 |
-
&.fs-error
|
158 |
-
{
|
159 |
-
background: #dc3232;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
#fs_addons
|
164 |
-
{
|
165 |
-
h3
|
166 |
-
{
|
167 |
-
border: none;
|
168 |
-
margin-bottom: 0;
|
169 |
-
padding: 4px 5px;
|
170 |
-
}
|
171 |
-
|
172 |
-
td
|
173 |
-
{
|
174 |
-
vertical-align: middle;
|
175 |
-
}
|
176 |
-
|
177 |
-
thead {
|
178 |
-
white-space: nowrap;
|
179 |
-
}
|
180 |
-
|
181 |
-
td:first-child,
|
182 |
-
th:first-child
|
183 |
-
{
|
184 |
-
text-align: left;
|
185 |
-
font-weight: bold;
|
186 |
-
}
|
187 |
-
td:last-child,
|
188 |
-
th:last-child
|
189 |
-
{
|
190 |
-
text-align: right;
|
191 |
-
}
|
192 |
-
th
|
193 |
-
{
|
194 |
-
font-weight: bold;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
#fs_billing_address {
|
199 |
-
width: 100%;
|
200 |
-
|
201 |
-
tr {
|
202 |
-
td {
|
203 |
-
width: 50%;
|
204 |
-
padding: 5px;
|
205 |
-
}
|
206 |
-
|
207 |
-
&:first-of-type {
|
208 |
-
td {
|
209 |
-
padding-top: 0;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
}
|
213 |
-
|
214 |
-
@mixin read-mode {
|
215 |
-
border-color: transparent;
|
216 |
-
color: #777;
|
217 |
-
border-bottom: 1px dashed #ccc;
|
218 |
-
padding-left: 0;
|
219 |
-
background: none;
|
220 |
-
}
|
221 |
-
|
222 |
-
span {
|
223 |
-
font-weight: bold;
|
224 |
-
}
|
225 |
-
|
226 |
-
input, select {
|
227 |
-
@include placeholder(transparent);
|
228 |
-
|
229 |
-
display: block;
|
230 |
-
width: 100%;
|
231 |
-
margin-top: 5px;
|
232 |
-
|
233 |
-
&.fs-read-mode {
|
234 |
-
@include read-mode();
|
235 |
-
}
|
236 |
-
}
|
237 |
-
|
238 |
-
|
239 |
-
&.fs-read-mode {
|
240 |
-
td span {
|
241 |
-
display: none;
|
242 |
-
}
|
243 |
-
|
244 |
-
input, select
|
245 |
-
{
|
246 |
-
@include read-mode();
|
247 |
-
@include placeholder(#ccc);
|
248 |
-
}
|
249 |
-
}
|
250 |
-
|
251 |
-
|
252 |
-
button {
|
253 |
-
display: block;
|
254 |
-
width: 100%;
|
255 |
-
}
|
256 |
}
|
1 |
+
@import "../start";
|
2 |
+
|
3 |
+
#fs_account
|
4 |
+
{
|
5 |
+
.postbox,
|
6 |
+
.widefat
|
7 |
+
{
|
8 |
+
max-width: 700px;
|
9 |
+
}
|
10 |
+
|
11 |
+
h3
|
12 |
+
{
|
13 |
+
font-size: 1.3em;
|
14 |
+
padding: 12px 15px;
|
15 |
+
margin: 0 0 12px 0;
|
16 |
+
line-height: 1.4;
|
17 |
+
border-bottom: 1px solid #F1F1F1;
|
18 |
+
|
19 |
+
.dashicons {
|
20 |
+
width: 26px;
|
21 |
+
height: 26px;
|
22 |
+
font-size: 1.3em;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
i.dashicons
|
27 |
+
{
|
28 |
+
font-size: 1.2em;
|
29 |
+
height: 1.2em;
|
30 |
+
width: 1.2em;
|
31 |
+
}
|
32 |
+
|
33 |
+
.button
|
34 |
+
{
|
35 |
+
i.dashicons
|
36 |
+
{
|
37 |
+
vertical-align: middle;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
.fs-header-actions
|
42 |
+
{
|
43 |
+
position: absolute;
|
44 |
+
top: 17px;
|
45 |
+
right: 15px;
|
46 |
+
font-size: 0.9em;
|
47 |
+
|
48 |
+
ul
|
49 |
+
{
|
50 |
+
margin: 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
li
|
54 |
+
{
|
55 |
+
form
|
56 |
+
{
|
57 |
+
display: inline-block;
|
58 |
+
}
|
59 |
+
|
60 |
+
float: left;
|
61 |
+
a
|
62 |
+
{
|
63 |
+
text-decoration: none;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
#fs_account_details .button-group {
|
70 |
+
float: right;
|
71 |
+
}
|
72 |
+
|
73 |
+
.rtl #fs_account .fs-header-actions
|
74 |
+
{
|
75 |
+
left: 15px;
|
76 |
+
right: auto;
|
77 |
+
}
|
78 |
+
|
79 |
+
.fs-key-value-table
|
80 |
+
{
|
81 |
+
width: 100%;
|
82 |
+
|
83 |
+
form
|
84 |
+
{
|
85 |
+
display: inline-block;
|
86 |
+
}
|
87 |
+
|
88 |
+
tr
|
89 |
+
{
|
90 |
+
td:first-child
|
91 |
+
{
|
92 |
+
nobr
|
93 |
+
{
|
94 |
+
font-weight: bold;
|
95 |
+
}
|
96 |
+
|
97 |
+
text-align: right;
|
98 |
+
|
99 |
+
form
|
100 |
+
{
|
101 |
+
display: block;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
td.fs-right
|
106 |
+
{
|
107 |
+
text-align: right;
|
108 |
+
}
|
109 |
+
|
110 |
+
&.fs-odd
|
111 |
+
{
|
112 |
+
background: #ebebeb;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
td, th
|
117 |
+
{
|
118 |
+
padding: 10px;
|
119 |
+
}
|
120 |
+
|
121 |
+
code {
|
122 |
+
line-height: 28px;
|
123 |
+
}
|
124 |
+
|
125 |
+
var, code, input[type="text"]
|
126 |
+
{
|
127 |
+
color: #0073AA;
|
128 |
+
font-size: 16px;
|
129 |
+
background: none;
|
130 |
+
}
|
131 |
+
|
132 |
+
input[type="text"] {
|
133 |
+
width: 100%;
|
134 |
+
font-weight: bold;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
label.fs-tag
|
139 |
+
{
|
140 |
+
background: #ffba00;
|
141 |
+
color: #fff;
|
142 |
+
display: inline-block;
|
143 |
+
border-radius: 3px;
|
144 |
+
padding: 5px;
|
145 |
+
font-size: 11px;
|
146 |
+
line-height: 11px;
|
147 |
+
vertical-align: baseline;
|
148 |
+
|
149 |
+
&.fs-warn
|
150 |
+
{
|
151 |
+
background: #ffba00;
|
152 |
+
}
|
153 |
+
&.fs-success
|
154 |
+
{
|
155 |
+
background: #46b450;
|
156 |
+
}
|
157 |
+
&.fs-error
|
158 |
+
{
|
159 |
+
background: #dc3232;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
#fs_addons
|
164 |
+
{
|
165 |
+
h3
|
166 |
+
{
|
167 |
+
border: none;
|
168 |
+
margin-bottom: 0;
|
169 |
+
padding: 4px 5px;
|
170 |
+
}
|
171 |
+
|
172 |
+
td
|
173 |
+
{
|
174 |
+
vertical-align: middle;
|
175 |
+
}
|
176 |
+
|
177 |
+
thead {
|
178 |
+
white-space: nowrap;
|
179 |
+
}
|
180 |
+
|
181 |
+
td:first-child,
|
182 |
+
th:first-child
|
183 |
+
{
|
184 |
+
text-align: left;
|
185 |
+
font-weight: bold;
|
186 |
+
}
|
187 |
+
td:last-child,
|
188 |
+
th:last-child
|
189 |
+
{
|
190 |
+
text-align: right;
|
191 |
+
}
|
192 |
+
th
|
193 |
+
{
|
194 |
+
font-weight: bold;
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
#fs_billing_address {
|
199 |
+
width: 100%;
|
200 |
+
|
201 |
+
tr {
|
202 |
+
td {
|
203 |
+
width: 50%;
|
204 |
+
padding: 5px;
|
205 |
+
}
|
206 |
+
|
207 |
+
&:first-of-type {
|
208 |
+
td {
|
209 |
+
padding-top: 0;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
@mixin read-mode {
|
215 |
+
border-color: transparent;
|
216 |
+
color: #777;
|
217 |
+
border-bottom: 1px dashed #ccc;
|
218 |
+
padding-left: 0;
|
219 |
+
background: none;
|
220 |
+
}
|
221 |
+
|
222 |
+
span {
|
223 |
+
font-weight: bold;
|
224 |
+
}
|
225 |
+
|
226 |
+
input, select {
|
227 |
+
@include placeholder(transparent);
|
228 |
+
|
229 |
+
display: block;
|
230 |
+
width: 100%;
|
231 |
+
margin-top: 5px;
|
232 |
+
|
233 |
+
&.fs-read-mode {
|
234 |
+
@include read-mode();
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
|
239 |
+
&.fs-read-mode {
|
240 |
+
td span {
|
241 |
+
display: none;
|
242 |
+
}
|
243 |
+
|
244 |
+
input, select
|
245 |
+
{
|
246 |
+
@include read-mode();
|
247 |
+
@include placeholder(#ccc);
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
|
252 |
+
button {
|
253 |
+
display: block;
|
254 |
+
width: 100%;
|
255 |
+
}
|
256 |
}
|
freemius/assets/scss/admin/add-ons.scss
CHANGED
@@ -1,449 +1,449 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
#fs_addons
|
4 |
-
{
|
5 |
-
.fs-cards-list
|
6 |
-
{
|
7 |
-
list-style: none;
|
8 |
-
|
9 |
-
.fs-card
|
10 |
-
{
|
11 |
-
float: left;
|
12 |
-
// height: 185px; // With reviews/ratings
|
13 |
-
height: 152px;
|
14 |
-
width: 310px;
|
15 |
-
padding: 0;
|
16 |
-
margin: 0 0 30px 30px;
|
17 |
-
font-size: 14px;
|
18 |
-
list-style: none;
|
19 |
-
border: 1px solid #ddd;
|
20 |
-
cursor: pointer;
|
21 |
-
position: relative;
|
22 |
-
|
23 |
-
.fs-overlay
|
24 |
-
{
|
25 |
-
position: absolute;
|
26 |
-
left: 0;
|
27 |
-
right: 0;
|
28 |
-
bottom: 0;
|
29 |
-
top: 0;
|
30 |
-
z-index: 9;
|
31 |
-
}
|
32 |
-
|
33 |
-
.fs-inner
|
34 |
-
{
|
35 |
-
background-color: #fff;
|
36 |
-
overflow: hidden;
|
37 |
-
height: 100%;
|
38 |
-
position: relative;
|
39 |
-
|
40 |
-
ul
|
41 |
-
{
|
42 |
-
@include transition(all, 0.15s);
|
43 |
-
left: 0;
|
44 |
-
right: 0;
|
45 |
-
top: 0;
|
46 |
-
position: absolute;
|
47 |
-
}
|
48 |
-
|
49 |
-
li
|
50 |
-
{
|
51 |
-
list-style: none;
|
52 |
-
line-height: 18px;
|
53 |
-
padding: 0 15px;
|
54 |
-
width: 100%;
|
55 |
-
display: block;
|
56 |
-
@include box-sizing(border-box);
|
57 |
-
}
|
58 |
-
|
59 |
-
.fs-card-banner
|
60 |
-
{
|
61 |
-
padding: 0;
|
62 |
-
margin: 0;
|
63 |
-
line-height: 0;
|
64 |
-
display: block;
|
65 |
-
height: 100px;
|
66 |
-
background-repeat: repeat-x;
|
67 |
-
background-size: 100% 100%;
|
68 |
-
@include transition(all, 0.15s);
|
69 |
-
}
|
70 |
-
|
71 |
-
.fs-title
|
72 |
-
{
|
73 |
-
margin: 10px 0 0 0;
|
74 |
-
height: 18px;
|
75 |
-
overflow: hidden;
|
76 |
-
color: #000;
|
77 |
-
white-space: nowrap;
|
78 |
-
text-overflow: ellipsis;
|
79 |
-
font-weight: bold;
|
80 |
-
}
|
81 |
-
|
82 |
-
.fs-offer
|
83 |
-
{
|
84 |
-
font-size: 0.9em;
|
85 |
-
}
|
86 |
-
|
87 |
-
.fs-description
|
88 |
-
{
|
89 |
-
background-color: #f9f9f9;
|
90 |
-
padding: 10px 15px 100px 15px;
|
91 |
-
border-top: 1px solid #eee;
|
92 |
-
margin: 0 0 10px 0;
|
93 |
-
color: #777;
|
94 |
-
}
|
95 |
-
|
96 |
-
.fs-tag
|
97 |
-
{
|
98 |
-
position: absolute;
|
99 |
-
top: 10px;
|
100 |
-
right: 0px;
|
101 |
-
background: greenyellow;
|
102 |
-
display: block;
|
103 |
-
padding: 2px 10px;
|
104 |
-
@include box-shadow(1px 1px 1px rgba(0,0,0,0.3));
|
105 |
-
text-transform: uppercase;
|
106 |
-
font-size: 0.9em;
|
107 |
-
font-weight: bold;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fs-cta
|
111 |
-
{
|
112 |
-
.button
|
113 |
-
{
|
114 |
-
position: absolute;
|
115 |
-
top: 112px;
|
116 |
-
right: 10px;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
@media screen and (min-width: 960px) {
|
122 |
-
&:hover
|
123 |
-
{
|
124 |
-
.fs-overlay
|
125 |
-
{
|
126 |
-
border: 2px solid $fms-link-color;
|
127 |
-
margin-left: -1px;
|
128 |
-
margin-top: -1px;
|
129 |
-
}
|
130 |
-
|
131 |
-
.fs-inner
|
132 |
-
{
|
133 |
-
ul
|
134 |
-
{
|
135 |
-
top: -100px;
|
136 |
-
}
|
137 |
-
|
138 |
-
.fs-card-banner
|
139 |
-
{
|
140 |
-
// background-position: 50% -100px;
|
141 |
-
}
|
142 |
-
|
143 |
-
.fs-title,
|
144 |
-
.fs-offer
|
145 |
-
{
|
146 |
-
color: $fms-link-color;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
}
|
150 |
-
}
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
#TB_window
|
156 |
-
{
|
157 |
-
&, iframe
|
158 |
-
{
|
159 |
-
width: 772px !important;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
#plugin-information
|
164 |
-
{
|
165 |
-
#section-description
|
166 |
-
{
|
167 |
-
h2, h3, p, b, i, blockquote, li, ul, ol
|
168 |
-
{
|
169 |
-
clear: none;
|
170 |
-
}
|
171 |
-
|
172 |
-
.fs-selling-points
|
173 |
-
{
|
174 |
-
padding-bottom: 10px;
|
175 |
-
border-bottom: 1px solid #ddd;
|
176 |
-
|
177 |
-
ul
|
178 |
-
{
|
179 |
-
margin: 0;
|
180 |
-
|
181 |
-
li
|
182 |
-
{
|
183 |
-
padding: 0;
|
184 |
-
list-style: none outside none;
|
185 |
-
|
186 |
-
i.dashicons
|
187 |
-
{
|
188 |
-
color: $fs-logo-green-color;
|
189 |
-
font-size: 3em;
|
190 |
-
vertical-align: middle;
|
191 |
-
line-height: 30px;
|
192 |
-
float: left;
|
193 |
-
margin: 0 0 0 -15px;
|
194 |
-
}
|
195 |
-
|
196 |
-
h3
|
197 |
-
{
|
198 |
-
margin: 1em 30px !important;
|
199 |
-
}
|
200 |
-
}
|
201 |
-
}
|
202 |
-
}
|
203 |
-
|
204 |
-
.fs-screenshots
|
205 |
-
{
|
206 |
-
@include clearfix();
|
207 |
-
ul
|
208 |
-
{
|
209 |
-
list-style: none;
|
210 |
-
margin: 0;
|
211 |
-
|
212 |
-
li
|
213 |
-
{
|
214 |
-
width: 225px;
|
215 |
-
height: 225px;
|
216 |
-
float: left;
|
217 |
-
margin-bottom: 20px;
|
218 |
-
@include box-sizing(content-box);
|
219 |
-
|
220 |
-
a
|
221 |
-
{
|
222 |
-
display: block;
|
223 |
-
width: 100%;
|
224 |
-
height: 100%;
|
225 |
-
border: 1px solid;
|
226 |
-
@include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
|
227 |
-
background-size: cover;
|
228 |
-
}
|
229 |
-
|
230 |
-
&.odd
|
231 |
-
{
|
232 |
-
margin-right: 20px;
|
233 |
-
}
|
234 |
-
}
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
.plugin-information-pricing
|
240 |
-
{
|
241 |
-
$pricing_color: #FFFEEC;
|
242 |
-
$borders_color: #DDD;
|
243 |
-
margin: -16px;
|
244 |
-
// padding: 20px;
|
245 |
-
border-bottom: 1px solid $borders_color;
|
246 |
-
|
247 |
-
.fs-plan
|
248 |
-
{
|
249 |
-
|
250 |
-
h3
|
251 |
-
{
|
252 |
-
margin-top: 0;
|
253 |
-
padding: 20px;
|
254 |
-
font-size: 16px;
|
255 |
-
}
|
256 |
-
|
257 |
-
.nav-tab-wrapper
|
258 |
-
{
|
259 |
-
border-bottom: 1px solid $borders_color;
|
260 |
-
|
261 |
-
.nav-tab
|
262 |
-
{
|
263 |
-
cursor: pointer;
|
264 |
-
position: relative;
|
265 |
-
padding: 0 10px;
|
266 |
-
font-size: 0.9em;
|
267 |
-
|
268 |
-
label
|
269 |
-
{
|
270 |
-
text-transform: uppercase;
|
271 |
-
color: green;
|
272 |
-
background: greenyellow;
|
273 |
-
position: absolute;
|
274 |
-
left: -1px;
|
275 |
-
right: -1px;
|
276 |
-
bottom: 100%;
|
277 |
-
border: 1px solid darkgreen;
|
278 |
-
padding: 2px;
|
279 |
-
text-align: center;
|
280 |
-
font-size: 0.9em;
|
281 |
-
line-height: 1em;
|
282 |
-
}
|
283 |
-
|
284 |
-
&.nav-tab-active
|
285 |
-
{
|
286 |
-
cursor: default;
|
287 |
-
background: $pricing_color;
|
288 |
-
border-bottom-color: $pricing_color;
|
289 |
-
}
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
-
&.fs-single-cycle
|
294 |
-
{
|
295 |
-
h3
|
296 |
-
{
|
297 |
-
background: $pricing_color;
|
298 |
-
margin: 0;
|
299 |
-
padding-bottom: 0;
|
300 |
-
color: #0073aa;
|
301 |
-
}
|
302 |
-
|
303 |
-
.nav-tab-wrapper,
|
304 |
-
.fs-billing-frequency
|
305 |
-
{
|
306 |
-
display: none;
|
307 |
-
}
|
308 |
-
}
|
309 |
-
|
310 |
-
.fs-pricing-body
|
311 |
-
{
|
312 |
-
background: $pricing_color;
|
313 |
-
padding: 20px;
|
314 |
-
}
|
315 |
-
|
316 |
-
.button
|
317 |
-
{
|
318 |
-
width: 100%;
|
319 |
-
text-align: center;
|
320 |
-
font-weight: bold;
|
321 |
-
text-transform: uppercase;
|
322 |
-
font-size: 1.1em;
|
323 |
-
}
|
324 |
-
|
325 |
-
label
|
326 |
-
{
|
327 |
-
white-space: nowrap;
|
328 |
-
}
|
329 |
-
|
330 |
-
var {
|
331 |
-
font-style: normal;
|
332 |
-
}
|
333 |
-
|
334 |
-
.fs-billing-frequency,
|
335 |
-
.fs-annual-discount
|
336 |
-
{
|
337 |
-
text-align: center;
|
338 |
-
display: block;
|
339 |
-
font-weight: bold;
|
340 |
-
margin-bottom: 10px;
|
341 |
-
text-transform: uppercase;
|
342 |
-
background: #F3F3F3;
|
343 |
-
padding: 2px;
|
344 |
-
border: 1px solid #ccc;
|
345 |
-
}
|
346 |
-
|
347 |
-
.fs-annual-discount
|
348 |
-
{
|
349 |
-
text-transform: none;
|
350 |
-
color: green;
|
351 |
-
background: greenyellow;
|
352 |
-
}
|
353 |
-
|
354 |
-
ul.fs-trial-terms
|
355 |
-
{
|
356 |
-
font-size: 0.9em;
|
357 |
-
|
358 |
-
i
|
359 |
-
{
|
360 |
-
float: left;
|
361 |
-
margin: 0 0 0 -15px;
|
362 |
-
}
|
363 |
-
|
364 |
-
li
|
365 |
-
{
|
366 |
-
margin: 10px 0 0 0;
|
367 |
-
}
|
368 |
-
}
|
369 |
-
}
|
370 |
-
}
|
371 |
-
|
372 |
-
#section-features
|
373 |
-
{
|
374 |
-
.fs-features
|
375 |
-
{
|
376 |
-
margin: -20px -26px;
|
377 |
-
}
|
378 |
-
|
379 |
-
table
|
380 |
-
{
|
381 |
-
width: 100%;
|
382 |
-
border-spacing: 0;
|
383 |
-
border-collapse: separate;
|
384 |
-
|
385 |
-
thead
|
386 |
-
{
|
387 |
-
th
|
388 |
-
{
|
389 |
-
padding: 10px 0;
|
390 |
-
}
|
391 |
-
|
392 |
-
.fs-price
|
393 |
-
{
|
394 |
-
color: $fs-logo-green-color;
|
395 |
-
font-weight: normal;
|
396 |
-
display: block;
|
397 |
-
text-align: center;
|
398 |
-
}
|
399 |
-
}
|
400 |
-
|
401 |
-
tbody
|
402 |
-
{
|
403 |
-
td
|
404 |
-
{
|
405 |
-
border-top: 1px solid #ccc;
|
406 |
-
padding: 10px 0;
|
407 |
-
text-align: center;
|
408 |
-
width: 100px;
|
409 |
-
color: $fs-logo-green-color;
|
410 |
-
|
411 |
-
&:first-child
|
412 |
-
{
|
413 |
-
text-align: left;
|
414 |
-
width: auto;
|
415 |
-
color: inherit;
|
416 |
-
padding-left: 26px;
|
417 |
-
}
|
418 |
-
}
|
419 |
-
tr.fs-odd
|
420 |
-
{
|
421 |
-
td
|
422 |
-
{
|
423 |
-
background: #fefefe;
|
424 |
-
}
|
425 |
-
}
|
426 |
-
}
|
427 |
-
}
|
428 |
-
|
429 |
-
.dashicons-yes
|
430 |
-
{
|
431 |
-
width: 30px;
|
432 |
-
height: 30px;
|
433 |
-
font-size: 30px;
|
434 |
-
}
|
435 |
-
}
|
436 |
-
}
|
437 |
-
|
438 |
-
@media screen and (max-width: 961px) {
|
439 |
-
#fs_addons
|
440 |
-
{
|
441 |
-
.fs-cards-list
|
442 |
-
{
|
443 |
-
.fs-card
|
444 |
-
{
|
445 |
-
height: 265px;
|
446 |
-
}
|
447 |
-
}
|
448 |
-
}
|
449 |
}
|
1 |
+
@import "../start";
|
2 |
+
|
3 |
+
#fs_addons
|
4 |
+
{
|
5 |
+
.fs-cards-list
|
6 |
+
{
|
7 |
+
list-style: none;
|
8 |
+
|
9 |
+
.fs-card
|
10 |
+
{
|
11 |
+
float: left;
|
12 |
+
// height: 185px; // With reviews/ratings
|
13 |
+
height: 152px;
|
14 |
+
width: 310px;
|
15 |
+
padding: 0;
|
16 |
+
margin: 0 0 30px 30px;
|
17 |
+
font-size: 14px;
|
18 |
+
list-style: none;
|
19 |
+
border: 1px solid #ddd;
|
20 |
+
cursor: pointer;
|
21 |
+
position: relative;
|
22 |
+
|
23 |
+
.fs-overlay
|
24 |
+
{
|
25 |
+
position: absolute;
|
26 |
+
left: 0;
|
27 |
+
right: 0;
|
28 |
+
bottom: 0;
|
29 |
+
top: 0;
|
30 |
+
z-index: 9;
|
31 |
+
}
|
32 |
+
|
33 |
+
.fs-inner
|
34 |
+
{
|
35 |
+
background-color: #fff;
|
36 |
+
overflow: hidden;
|
37 |
+
height: 100%;
|
38 |
+
position: relative;
|
39 |
+
|
40 |
+
ul
|
41 |
+
{
|
42 |
+
@include transition(all, 0.15s);
|
43 |
+
left: 0;
|
44 |
+
right: 0;
|
45 |
+
top: 0;
|
46 |
+
position: absolute;
|
47 |
+
}
|
48 |
+
|
49 |
+
li
|
50 |
+
{
|
51 |
+
list-style: none;
|
52 |
+
line-height: 18px;
|
53 |
+
padding: 0 15px;
|
54 |
+
width: 100%;
|
55 |
+
display: block;
|
56 |
+
@include box-sizing(border-box);
|
57 |
+
}
|
58 |
+
|
59 |
+
.fs-card-banner
|
60 |
+
{
|
61 |
+
padding: 0;
|
62 |
+
margin: 0;
|
63 |
+
line-height: 0;
|
64 |
+
display: block;
|
65 |
+
height: 100px;
|
66 |
+
background-repeat: repeat-x;
|
67 |
+
background-size: 100% 100%;
|
68 |
+
@include transition(all, 0.15s);
|
69 |
+
}
|
70 |
+
|
71 |
+
.fs-title
|
72 |
+
{
|
73 |
+
margin: 10px 0 0 0;
|
74 |
+
height: 18px;
|
75 |
+
overflow: hidden;
|
76 |
+
color: #000;
|
77 |
+
white-space: nowrap;
|
78 |
+
text-overflow: ellipsis;
|
79 |
+
font-weight: bold;
|
80 |
+
}
|
81 |
+
|
82 |
+
.fs-offer
|
83 |
+
{
|
84 |
+
font-size: 0.9em;
|
85 |
+
}
|
86 |
+
|
87 |
+
.fs-description
|
88 |
+
{
|
89 |
+
background-color: #f9f9f9;
|
90 |
+
padding: 10px 15px 100px 15px;
|
91 |
+
border-top: 1px solid #eee;
|
92 |
+
margin: 0 0 10px 0;
|
93 |
+
color: #777;
|
94 |
+
}
|
95 |
+
|
96 |
+
.fs-tag
|
97 |
+
{
|
98 |
+
position: absolute;
|
99 |
+
top: 10px;
|
100 |
+
right: 0px;
|
101 |
+
background: greenyellow;
|
102 |
+
display: block;
|
103 |
+
padding: 2px 10px;
|
104 |
+
@include box-shadow(1px 1px 1px rgba(0,0,0,0.3));
|
105 |
+
text-transform: uppercase;
|
106 |
+
font-size: 0.9em;
|
107 |
+
font-weight: bold;
|
108 |
+
}
|
109 |
+
|
110 |
+
.fs-cta
|
111 |
+
{
|
112 |
+
.button
|
113 |
+
{
|
114 |
+
position: absolute;
|
115 |
+
top: 112px;
|
116 |
+
right: 10px;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
@media screen and (min-width: 960px) {
|
122 |
+
&:hover
|
123 |
+
{
|
124 |
+
.fs-overlay
|
125 |
+
{
|
126 |
+
border: 2px solid $fms-link-color;
|
127 |
+
margin-left: -1px;
|
128 |
+
margin-top: -1px;
|
129 |
+
}
|
130 |
+
|
131 |
+
.fs-inner
|
132 |
+
{
|
133 |
+
ul
|
134 |
+
{
|
135 |
+
top: -100px;
|
136 |
+
}
|
137 |
+
|
138 |
+
.fs-card-banner
|
139 |
+
{
|
140 |
+
// background-position: 50% -100px;
|
141 |
+
}
|
142 |
+
|
143 |
+
.fs-title,
|
144 |
+
.fs-offer
|
145 |
+
{
|
146 |
+
color: $fms-link-color;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
#TB_window
|
156 |
+
{
|
157 |
+
&, iframe
|
158 |
+
{
|
159 |
+
width: 772px !important;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
#plugin-information
|
164 |
+
{
|
165 |
+
#section-description
|
166 |
+
{
|
167 |
+
h2, h3, p, b, i, blockquote, li, ul, ol
|
168 |
+
{
|
169 |
+
clear: none;
|
170 |
+
}
|
171 |
+
|
172 |
+
.fs-selling-points
|
173 |
+
{
|
174 |
+
padding-bottom: 10px;
|
175 |
+
border-bottom: 1px solid #ddd;
|
176 |
+
|
177 |
+
ul
|
178 |
+
{
|
179 |
+
margin: 0;
|
180 |
+
|
181 |
+
li
|
182 |
+
{
|
183 |
+
padding: 0;
|
184 |
+
list-style: none outside none;
|
185 |
+
|
186 |
+
i.dashicons
|
187 |
+
{
|
188 |
+
color: $fs-logo-green-color;
|
189 |
+
font-size: 3em;
|
190 |
+
vertical-align: middle;
|
191 |
+
line-height: 30px;
|
192 |
+
float: left;
|
193 |
+
margin: 0 0 0 -15px;
|
194 |
+
}
|
195 |
+
|
196 |
+
h3
|
197 |
+
{
|
198 |
+
margin: 1em 30px !important;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
.fs-screenshots
|
205 |
+
{
|
206 |
+
@include clearfix();
|
207 |
+
ul
|
208 |
+
{
|
209 |
+
list-style: none;
|
210 |
+
margin: 0;
|
211 |
+
|
212 |
+
li
|
213 |
+
{
|
214 |
+
width: 225px;
|
215 |
+
height: 225px;
|
216 |
+
float: left;
|
217 |
+
margin-bottom: 20px;
|
218 |
+
@include box-sizing(content-box);
|
219 |
+
|
220 |
+
a
|
221 |
+
{
|
222 |
+
display: block;
|
223 |
+
width: 100%;
|
224 |
+
height: 100%;
|
225 |
+
border: 1px solid;
|
226 |
+
@include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
|
227 |
+
background-size: cover;
|
228 |
+
}
|
229 |
+
|
230 |
+
&.odd
|
231 |
+
{
|
232 |
+
margin-right: 20px;
|
233 |
+
}
|
234 |
+
}
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
.plugin-information-pricing
|
240 |
+
{
|
241 |
+
$pricing_color: #FFFEEC;
|
242 |
+
$borders_color: #DDD;
|
243 |
+
margin: -16px;
|
244 |
+
// padding: 20px;
|
245 |
+
border-bottom: 1px solid $borders_color;
|
246 |
+
|
247 |
+
.fs-plan
|
248 |
+
{
|
249 |
+
|
250 |
+
h3
|
251 |
+
{
|
252 |
+
margin-top: 0;
|
253 |
+
padding: 20px;
|
254 |
+
font-size: 16px;
|
255 |
+
}
|
256 |
+
|
257 |
+
.nav-tab-wrapper
|
258 |
+
{
|
259 |
+
border-bottom: 1px solid $borders_color;
|
260 |
+
|
261 |
+
.nav-tab
|
262 |
+
{
|
263 |
+
cursor: pointer;
|
264 |
+
position: relative;
|
265 |
+
padding: 0 10px;
|
266 |
+
font-size: 0.9em;
|
267 |
+
|
268 |
+
label
|
269 |
+
{
|
270 |
+
text-transform: uppercase;
|
271 |
+
color: green;
|
272 |
+
background: greenyellow;
|
273 |
+
position: absolute;
|
274 |
+
left: -1px;
|
275 |
+
right: -1px;
|
276 |
+
bottom: 100%;
|
277 |
+
border: 1px solid darkgreen;
|
278 |
+
padding: 2px;
|
279 |
+
text-align: center;
|
280 |
+
font-size: 0.9em;
|
281 |
+
line-height: 1em;
|
282 |
+
}
|
283 |
+
|
284 |
+
&.nav-tab-active
|
285 |
+
{
|
286 |
+
cursor: default;
|
287 |
+
background: $pricing_color;
|
288 |
+
border-bottom-color: $pricing_color;
|
289 |
+
}
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
&.fs-single-cycle
|
294 |
+
{
|
295 |
+
h3
|
296 |
+
{
|
297 |
+
background: $pricing_color;
|
298 |
+
margin: 0;
|
299 |
+
padding-bottom: 0;
|
300 |
+
color: #0073aa;
|
301 |
+
}
|
302 |
+
|
303 |
+
.nav-tab-wrapper,
|
304 |
+
.fs-billing-frequency
|
305 |
+
{
|
306 |
+
display: none;
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
.fs-pricing-body
|
311 |
+
{
|
312 |
+
background: $pricing_color;
|
313 |
+
padding: 20px;
|
314 |
+
}
|
315 |
+
|
316 |
+
.button
|
317 |
+
{
|
318 |
+
width: 100%;
|
319 |
+
text-align: center;
|
320 |
+
font-weight: bold;
|
321 |
+
text-transform: uppercase;
|
322 |
+
font-size: 1.1em;
|
323 |
+
}
|
324 |
+
|
325 |
+
label
|
326 |
+
{
|
327 |
+
white-space: nowrap;
|
328 |
+
}
|
329 |
+
|
330 |
+
var {
|
331 |
+
font-style: normal;
|
332 |
+
}
|
333 |
+
|
334 |
+
.fs-billing-frequency,
|
335 |
+
.fs-annual-discount
|
336 |
+
{
|
337 |
+
text-align: center;
|
338 |
+
display: block;
|
339 |
+
font-weight: bold;
|
340 |
+
margin-bottom: 10px;
|
341 |
+
text-transform: uppercase;
|
342 |
+
background: #F3F3F3;
|
343 |
+
padding: 2px;
|
344 |
+
border: 1px solid #ccc;
|
345 |
+
}
|
346 |
+
|
347 |
+
.fs-annual-discount
|
348 |
+
{
|
349 |
+
text-transform: none;
|
350 |
+
color: green;
|
351 |
+
background: greenyellow;
|
352 |
+
}
|
353 |
+
|
354 |
+
ul.fs-trial-terms
|
355 |
+
{
|
356 |
+
font-size: 0.9em;
|
357 |
+
|
358 |
+
i
|
359 |
+
{
|
360 |
+
float: left;
|
361 |
+
margin: 0 0 0 -15px;
|
362 |
+
}
|
363 |
+
|
364 |
+
li
|
365 |
+
{
|
366 |
+
margin: 10px 0 0 0;
|
367 |
+
}
|
368 |
+
}
|
369 |
+
}
|
370 |
+
}
|
371 |
+
|
372 |
+
#section-features
|
373 |
+
{
|
374 |
+
.fs-features
|
375 |
+
{
|
376 |
+
margin: -20px -26px;
|
377 |
+
}
|
378 |
+
|
379 |
+
table
|
380 |
+
{
|
381 |
+
width: 100%;
|
382 |
+
border-spacing: 0;
|
383 |
+
border-collapse: separate;
|
384 |
+
|
385 |
+
thead
|
386 |
+
{
|
387 |
+
th
|
388 |
+
{
|
389 |
+
padding: 10px 0;
|
390 |
+
}
|
391 |
+
|
392 |
+
.fs-price
|
393 |
+
{
|
394 |
+
color: $fs-logo-green-color;
|
395 |
+
font-weight: normal;
|
396 |
+
display: block;
|
397 |
+
text-align: center;
|
398 |
+
}
|
399 |
+
}
|
400 |
+
|
401 |
+
tbody
|
402 |
+
{
|
403 |
+
td
|
404 |
+
{
|
405 |
+
border-top: 1px solid #ccc;
|
406 |
+
padding: 10px 0;
|
407 |
+
text-align: center;
|
408 |
+
width: 100px;
|
409 |
+
color: $fs-logo-green-color;
|
410 |
+
|
411 |
+
&:first-child
|
412 |
+
{
|
413 |
+
text-align: left;
|
414 |
+
width: auto;
|
415 |
+
color: inherit;
|
416 |
+
padding-left: 26px;
|
417 |
+
}
|
418 |
+
}
|
419 |
+
tr.fs-odd
|
420 |
+
{
|
421 |
+
td
|
422 |
+
{
|
423 |
+
background: #fefefe;
|
424 |
+
}
|
425 |
+
}
|
426 |
+
}
|
427 |
+
}
|
428 |
+
|
429 |
+
.dashicons-yes
|
430 |
+
{
|
431 |
+
width: 30px;
|
432 |
+
height: 30px;
|
433 |
+
font-size: 30px;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
}
|
437 |
+
|
438 |
+
@media screen and (max-width: 961px) {
|
439 |
+
#fs_addons
|
440 |
+
{
|
441 |
+
.fs-cards-list
|
442 |
+
{
|
443 |
+
.fs-card
|
444 |
+
{
|
445 |
+
height: 265px;
|
446 |
+
}
|
447 |
+
}
|
448 |
+
}
|
449 |
}
|
freemius/assets/scss/admin/affiliation.scss
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
#fs_affiliation_content_wrapper {
|
4 |
-
#messages {
|
5 |
-
margin-top: 25px;
|
6 |
-
}
|
7 |
-
|
8 |
-
h3 {
|
9 |
-
font-size: 24px;
|
10 |
-
padding: 0;
|
11 |
-
margin-left: 0;
|
12 |
-
}
|
13 |
-
|
14 |
-
ul {
|
15 |
-
li {
|
16 |
-
@include box-sizing(border-box);
|
17 |
-
list-style-type: none;
|
18 |
-
|
19 |
-
&:before {
|
20 |
-
content: '✓';
|
21 |
-
margin-right: 10px;
|
22 |
-
font-weight: bold;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
p:not(.description), li, label {
|
28 |
-
font-size: 16px !important;
|
29 |
-
line-height: 26px !important;
|
30 |
-
}
|
31 |
-
|
32 |
-
.button {
|
33 |
-
margin-top: 20px;
|
34 |
-
margin-bottom: 7px;
|
35 |
-
line-height: 35px;
|
36 |
-
height: 40px;
|
37 |
-
font-size: 16px;
|
38 |
-
|
39 |
-
&#cancel_button {
|
40 |
-
margin-right: 5px;
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
form {
|
45 |
-
.input-container {
|
46 |
-
.input-label {
|
47 |
-
font-weight: bold;
|
48 |
-
display: block;
|
49 |
-
width: 100%;
|
50 |
-
}
|
51 |
-
|
52 |
-
&.input-container-text {
|
53 |
-
label, input, textarea {
|
54 |
-
display: block;
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
margin-bottom: 15px;
|
59 |
-
|
60 |
-
#add_domain, .remove-domain {
|
61 |
-
text-decoration: none;
|
62 |
-
display: inline-block;
|
63 |
-
margin-top: 3px;
|
64 |
-
|
65 |
-
&:focus {
|
66 |
-
box-shadow: none;
|
67 |
-
}
|
68 |
-
|
69 |
-
&.disabled {
|
70 |
-
color: #aaa;
|
71 |
-
cursor: default;
|
72 |
-
}
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
#extra_domains_container {
|
77 |
-
.description {
|
78 |
-
margin-top: 0;
|
79 |
-
position: relative;
|
80 |
-
top: -4px;
|
81 |
-
}
|
82 |
-
|
83 |
-
.extra-domain-input-container {
|
84 |
-
margin-bottom: 15px;
|
85 |
-
|
86 |
-
.domain {
|
87 |
-
display: inline-block;
|
88 |
-
margin-right: 5px;
|
89 |
-
|
90 |
-
&:last-of-type {
|
91 |
-
margin-bottom: 0;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
}
|
96 |
-
}
|
97 |
}
|
1 |
+
@import "../start";
|
2 |
+
|
3 |
+
#fs_affiliation_content_wrapper {
|
4 |
+
#messages {
|
5 |
+
margin-top: 25px;
|
6 |
+
}
|
7 |
+
|
8 |
+
h3 {
|
9 |
+
font-size: 24px;
|
10 |
+
padding: 0;
|
11 |
+
margin-left: 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
ul {
|
15 |
+
li {
|
16 |
+
@include box-sizing(border-box);
|
17 |
+
list-style-type: none;
|
18 |
+
|
19 |
+
&:before {
|
20 |
+
content: '✓';
|
21 |
+
margin-right: 10px;
|
22 |
+
font-weight: bold;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
p:not(.description), li, label {
|
28 |
+
font-size: 16px !important;
|
29 |
+
line-height: 26px !important;
|
30 |
+
}
|
31 |
+
|
32 |
+
.button {
|
33 |
+
margin-top: 20px;
|
34 |
+
margin-bottom: 7px;
|
35 |
+
line-height: 35px;
|
36 |
+
height: 40px;
|
37 |
+
font-size: 16px;
|
38 |
+
|
39 |
+
&#cancel_button {
|
40 |
+
margin-right: 5px;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
form {
|
45 |
+
.input-container {
|
46 |
+
.input-label {
|
47 |
+
font-weight: bold;
|
48 |
+
display: block;
|
49 |
+
width: 100%;
|
50 |
+
}
|
51 |
+
|
52 |
+
&.input-container-text {
|
53 |
+
label, input, textarea {
|
54 |
+
display: block;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
margin-bottom: 15px;
|
59 |
+
|
60 |
+
#add_domain, .remove-domain {
|
61 |
+
text-decoration: none;
|
62 |
+
display: inline-block;
|
63 |
+
margin-top: 3px;
|
64 |
+
|
65 |
+
&:focus {
|
66 |
+
box-shadow: none;
|
67 |
+
}
|
68 |
+
|
69 |
+
&.disabled {
|
70 |
+
color: #aaa;
|
71 |
+
cursor: default;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
#extra_domains_container {
|
77 |
+
.description {
|
78 |
+
margin-top: 0;
|
79 |
+
position: relative;
|
80 |
+
top: -4px;
|
81 |
+
}
|
82 |
+
|
83 |
+
.extra-domain-input-container {
|
84 |
+
margin-bottom: 15px;
|
85 |
+
|
86 |
+
.domain {
|
87 |
+
display: inline-block;
|
88 |
+
margin-right: 5px;
|
89 |
+
|
90 |
+
&:last-of-type {
|
91 |
+
margin-bottom: 0;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
}
|
freemius/assets/scss/admin/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/scss/customizer.scss
CHANGED
@@ -1,125 +1,125 @@
|
|
1 |
-
@import "start";
|
2 |
-
|
3 |
-
#fs_customizer_upsell {
|
4 |
-
.fs-customizer-plan {
|
5 |
-
padding: 10px 20px 20px 20px;
|
6 |
-
border-radius: 3px;
|
7 |
-
background: #fff;
|
8 |
-
|
9 |
-
h2 {
|
10 |
-
position: relative;
|
11 |
-
margin: 0;
|
12 |
-
line-height: 2em;
|
13 |
-
text-transform: uppercase;
|
14 |
-
|
15 |
-
.button-link {
|
16 |
-
top: -2px;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
.fs-feature {
|
22 |
-
position: relative;
|
23 |
-
}
|
24 |
-
|
25 |
-
.dashicons-yes {
|
26 |
-
color: #0085ba;
|
27 |
-
font-size: 2em;
|
28 |
-
vertical-align: bottom;
|
29 |
-
margin-left: -7px;
|
30 |
-
margin-right: 10px;
|
31 |
-
|
32 |
-
.rtl & {
|
33 |
-
margin-left: 10px;
|
34 |
-
margin-right: -7px;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
.dashicons-editor-help
|
39 |
-
{
|
40 |
-
color: #bbb;
|
41 |
-
cursor: help;
|
42 |
-
|
43 |
-
$tooltip-color: #000;
|
44 |
-
|
45 |
-
.fs-feature-desc {
|
46 |
-
opacity: 0;
|
47 |
-
visibility: hidden;
|
48 |
-
@include transition(opacity 0.3s ease-in-out);
|
49 |
-
|
50 |
-
position: absolute;
|
51 |
-
background: $tooltip-color;
|
52 |
-
color: #fff;
|
53 |
-
font-family: 'arial', serif;
|
54 |
-
font-size: 12px;
|
55 |
-
padding: 10px;
|
56 |
-
z-index: 999999;
|
57 |
-
bottom: 100%;
|
58 |
-
margin-bottom: 5px;
|
59 |
-
left: 0;
|
60 |
-
right: 0;
|
61 |
-
@include border-radius(5px);
|
62 |
-
@include box-shadow(1px 1px 1px rgba(0,0,0,0.2));
|
63 |
-
line-height: 1.3em;
|
64 |
-
font-weight: bold;
|
65 |
-
text-align: left;
|
66 |
-
|
67 |
-
.rtl &
|
68 |
-
{
|
69 |
-
text-align: right;
|
70 |
-
}
|
71 |
-
|
72 |
-
&::after {
|
73 |
-
content: ' ';
|
74 |
-
display: block;
|
75 |
-
width: 0;
|
76 |
-
height: 0;
|
77 |
-
border-style: solid;
|
78 |
-
border-width: 5px 5px 0 5px;
|
79 |
-
border-color: $tooltip-color transparent transparent transparent;
|
80 |
-
position: absolute;
|
81 |
-
top: 100%;
|
82 |
-
left: 21px;
|
83 |
-
|
84 |
-
.rtl & {
|
85 |
-
right: 21px;
|
86 |
-
left: auto;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
&:hover {
|
92 |
-
.fs-feature-desc {
|
93 |
-
visibility: visible;
|
94 |
-
opacity: 1;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
.button-primary {
|
100 |
-
display: block;
|
101 |
-
text-align: center;
|
102 |
-
margin-top: 10px;
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
#fs_customizer_support
|
107 |
-
{
|
108 |
-
display: block !important;
|
109 |
-
|
110 |
-
.button {
|
111 |
-
float: right;
|
112 |
-
}
|
113 |
-
|
114 |
-
.button-group {
|
115 |
-
width: 100%;
|
116 |
-
display: block;
|
117 |
-
margin-top: 10px;
|
118 |
-
|
119 |
-
.button {
|
120 |
-
float: none;
|
121 |
-
width: 50%;
|
122 |
-
text-align: center;
|
123 |
-
}
|
124 |
-
}
|
125 |
}
|
1 |
+
@import "start";
|
2 |
+
|
3 |
+
#fs_customizer_upsell {
|
4 |
+
.fs-customizer-plan {
|
5 |
+
padding: 10px 20px 20px 20px;
|
6 |
+
border-radius: 3px;
|
7 |
+
background: #fff;
|
8 |
+
|
9 |
+
h2 {
|
10 |
+
position: relative;
|
11 |
+
margin: 0;
|
12 |
+
line-height: 2em;
|
13 |
+
text-transform: uppercase;
|
14 |
+
|
15 |
+
.button-link {
|
16 |
+
top: -2px;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
.fs-feature {
|
22 |
+
position: relative;
|
23 |
+
}
|
24 |
+
|
25 |
+
.dashicons-yes {
|
26 |
+
color: #0085ba;
|
27 |
+
font-size: 2em;
|
28 |
+
vertical-align: bottom;
|
29 |
+
margin-left: -7px;
|
30 |
+
margin-right: 10px;
|
31 |
+
|
32 |
+
.rtl & {
|
33 |
+
margin-left: 10px;
|
34 |
+
margin-right: -7px;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
.dashicons-editor-help
|
39 |
+
{
|
40 |
+
color: #bbb;
|
41 |
+
cursor: help;
|
42 |
+
|
43 |
+
$tooltip-color: #000;
|
44 |
+
|
45 |
+
.fs-feature-desc {
|
46 |
+
opacity: 0;
|
47 |
+
visibility: hidden;
|
48 |
+
@include transition(opacity 0.3s ease-in-out);
|
49 |
+
|
50 |
+
position: absolute;
|
51 |
+
background: $tooltip-color;
|
52 |
+
color: #fff;
|
53 |
+
font-family: 'arial', serif;
|
54 |
+
font-size: 12px;
|
55 |
+
padding: 10px;
|
56 |
+
z-index: 999999;
|
57 |
+
bottom: 100%;
|
58 |
+
margin-bottom: 5px;
|
59 |
+
left: 0;
|
60 |
+
right: 0;
|
61 |
+
@include border-radius(5px);
|
62 |
+
@include box-shadow(1px 1px 1px rgba(0,0,0,0.2));
|
63 |
+
line-height: 1.3em;
|
64 |
+
font-weight: bold;
|
65 |
+
text-align: left;
|
66 |
+
|
67 |
+
.rtl &
|
68 |
+
{
|
69 |
+
text-align: right;
|
70 |
+
}
|
71 |
+
|
72 |
+
&::after {
|
73 |
+
content: ' ';
|
74 |
+
display: block;
|
75 |
+
width: 0;
|
76 |
+
height: 0;
|
77 |
+
border-style: solid;
|
78 |
+
border-width: 5px 5px 0 5px;
|
79 |
+
border-color: $tooltip-color transparent transparent transparent;
|
80 |
+
position: absolute;
|
81 |
+
top: 100%;
|
82 |
+
left: 21px;
|
83 |
+
|
84 |
+
.rtl & {
|
85 |
+
right: 21px;
|
86 |
+
left: auto;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
&:hover {
|
92 |
+
.fs-feature-desc {
|
93 |
+
visibility: visible;
|
94 |
+
opacity: 1;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
.button-primary {
|
100 |
+
display: block;
|
101 |
+
text-align: center;
|
102 |
+
margin-top: 10px;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
#fs_customizer_support
|
107 |
+
{
|
108 |
+
display: block !important;
|
109 |
+
|
110 |
+
.button {
|
111 |
+
float: right;
|
112 |
+
}
|
113 |
+
|
114 |
+
.button-group {
|
115 |
+
width: 100%;
|
116 |
+
display: block;
|
117 |
+
margin-top: 10px;
|
118 |
+
|
119 |
+
.button {
|
120 |
+
float: none;
|
121 |
+
width: 50%;
|
122 |
+
text-align: center;
|
123 |
+
}
|
124 |
+
}
|
125 |
}
|
freemius/assets/scss/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/composer.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
{
|
2 |
-
"name": "freemius/wordpress-sdk",
|
3 |
-
"description": "Freemius WordPress SDK",
|
4 |
-
"keywords": ["freemius", "wordpress", "plugin", "sdk"],
|
5 |
-
"homepage": "https://freemius.com",
|
6 |
-
"license": "GPL-
|
7 |
-
"require": {
|
8 |
-
"php": ">=5.2"
|
9 |
-
}
|
10 |
-
}
|
1 |
+
{
|
2 |
+
"name": "freemius/wordpress-sdk",
|
3 |
+
"description": "Freemius WordPress SDK",
|
4 |
+
"keywords": ["freemius", "wordpress", "plugin", "sdk"],
|
5 |
+
"homepage": "https://freemius.com",
|
6 |
+
"license": "GPL-3.0",
|
7 |
+
"require": {
|
8 |
+
"php": ">=5.2"
|
9 |
+
}
|
10 |
+
}
|
freemius/config.php
CHANGED
@@ -285,6 +285,9 @@
|
|
285 |
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
286 |
define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
|
287 |
}
|
|
|
|
|
|
|
288 |
|
289 |
#--------------------------------------------------------------------------------
|
290 |
#region Debugging
|
285 |
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
286 |
define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
|
287 |
}
|
288 |
+
if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
|
289 |
+
define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
290 |
+
}
|
291 |
|
292 |
#--------------------------------------------------------------------------------
|
293 |
#region Debugging
|
freemius/gulpfile.js
CHANGED
@@ -10,7 +10,7 @@ var clean = require('gulp-clean');
|
|
10 |
|
11 |
var languagesFolder = './languages/';
|
12 |
|
13 |
-
var options = require('./transifex-config.json')
|
14 |
|
15 |
function getFolders(dir) {
|
16 |
return filesystem.readdirSync(dir)
|
@@ -23,7 +23,7 @@ var transifex = require('gulp-transifex').createClient(options);
|
|
23 |
|
24 |
// Create POT out of i18n.php.
|
25 |
gulp.task('prepare-source', function () {
|
26 |
-
gulp.src('
|
27 |
.pipe(sort())
|
28 |
.pipe(wpPot({
|
29 |
destFile : 'freemius.pot',
|
@@ -31,21 +31,49 @@ gulp.task('prepare-source', function () {
|
|
31 |
bugReport : 'https://github.com/Freemius/wordpress-sdk/issues',
|
32 |
lastTranslator : 'Vova Feldman <vova@freemius.com>',
|
33 |
team : 'Freemius Team <admin@freemius.com>',
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
gettextFunctions: [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
{name: '_fs_text'},
|
|
|
36 |
{name: '_fs_echo'},
|
37 |
{name: '_fs_esc_attr'},
|
38 |
{name: '_fs_esc_attr_echo'},
|
39 |
{name: '_fs_esc_html'},
|
40 |
{name: '_fs_esc_html_echo'},
|
41 |
-
{name: '_fs_x', context: 2},
|
42 |
{name: '_fs_ex', context: 2},
|
43 |
{name: '_fs_esc_attr_x', context: 2},
|
44 |
{name: '_fs_esc_html_x', context: 2},
|
|
|
45 |
{name: '_fs_n', plural: 2},
|
46 |
{name: '_fs_n_noop', plural: 2},
|
47 |
{name: '_fs_nx', plural: 2, context: 4},
|
48 |
-
{name: '_fs_nx_noop', plural: 2, context: 3}
|
49 |
]
|
50 |
}))
|
51 |
.pipe(gulp.dest(languagesFolder + 'freemius.pot'));
|
10 |
|
11 |
var languagesFolder = './languages/';
|
12 |
|
13 |
+
var options = require('./transifex-config.json');
|
14 |
|
15 |
function getFolders(dir) {
|
16 |
return filesystem.readdirSync(dir)
|
23 |
|
24 |
// Create POT out of i18n.php.
|
25 |
gulp.task('prepare-source', function () {
|
26 |
+
gulp.src('**/*.php')
|
27 |
.pipe(sort())
|
28 |
.pipe(wpPot({
|
29 |
destFile : 'freemius.pot',
|
31 |
bugReport : 'https://github.com/Freemius/wordpress-sdk/issues',
|
32 |
lastTranslator : 'Vova Feldman <vova@freemius.com>',
|
33 |
team : 'Freemius Team <admin@freemius.com>',
|
34 |
+
/*gettextMethods: {
|
35 |
+
instances: ['this', '_fs'],
|
36 |
+
methods: [
|
37 |
+
'get_text_inline'
|
38 |
+
]
|
39 |
+
},*/
|
40 |
gettextFunctions: [
|
41 |
+
{name: 'get_text_inline'},
|
42 |
+
|
43 |
+
{name: 'fs_text_inline'},
|
44 |
+
{name: 'fs_echo_inline'},
|
45 |
+
{name: 'fs_esc_js_inline'},
|
46 |
+
{name: 'fs_esc_attr_inline'},
|
47 |
+
{name: 'fs_esc_attr_echo_inline'},
|
48 |
+
{name: 'fs_esc_html_inline'},
|
49 |
+
{name: 'fs_esc_html_echo_inline'},
|
50 |
+
|
51 |
+
{name: 'get_text_x_inline', context: 2},
|
52 |
+
{name: 'fs_text_x_inline', context: 2},
|
53 |
+
{name: 'fs_echo_x_inline', context: 2},
|
54 |
+
{name: 'fs_esc_attr_x_inline', context: 2},
|
55 |
+
{name: 'fs_esc_js_x_inline', context: 2},
|
56 |
+
{name: 'fs_esc_js_echo_x_inline', context: 2},
|
57 |
+
{name: 'fs_esc_html_x_inline', context: 2},
|
58 |
+
{name: 'fs_esc_html_echo_x_inline', context: 2}
|
59 |
+
/*,
|
60 |
+
|
61 |
+
|
62 |
{name: '_fs_text'},
|
63 |
+
{name: '_fs_x', context: 2},
|
64 |
{name: '_fs_echo'},
|
65 |
{name: '_fs_esc_attr'},
|
66 |
{name: '_fs_esc_attr_echo'},
|
67 |
{name: '_fs_esc_html'},
|
68 |
{name: '_fs_esc_html_echo'},
|
|
|
69 |
{name: '_fs_ex', context: 2},
|
70 |
{name: '_fs_esc_attr_x', context: 2},
|
71 |
{name: '_fs_esc_html_x', context: 2},
|
72 |
+
|
73 |
{name: '_fs_n', plural: 2},
|
74 |
{name: '_fs_n_noop', plural: 2},
|
75 |
{name: '_fs_nx', plural: 2, context: 4},
|
76 |
+
{name: '_fs_nx_noop', plural: 2, context: 3}*/
|
77 |
]
|
78 |
}))
|
79 |
.pipe(gulp.dest(languagesFolder + 'freemius.pot'));
|
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 plugin using the free plan.
|
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 plugin using the free plan.
|
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 |
}
|
freemius/includes/class-freemius.php
CHANGED
@@ -555,6 +555,18 @@
|
|
555 |
return;
|
556 |
}
|
557 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
|
559 |
version_compare( $sdk_version, '1.1.5', '>=' )
|
560 |
) {
|
@@ -578,6 +590,46 @@
|
|
578 |
}
|
579 |
}
|
580 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
/**
|
582 |
* @author Vova Feldman (@svovaf)
|
583 |
* @since 1.2.2.7
|
@@ -874,8 +926,11 @@
|
|
874 |
// Try to load the cached value of the file path.
|
875 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
876 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
877 |
-
|
878 |
-
|
|
|
|
|
|
|
879 |
}
|
880 |
}
|
881 |
|
@@ -894,15 +949,16 @@
|
|
894 |
if ( isset( $this->_storage->plugin_main_file ) &&
|
895 |
isset( $this->_storage->plugin_main_file->prev_path )
|
896 |
) {
|
897 |
-
|
898 |
-
|
|
|
899 |
}
|
900 |
}
|
901 |
|
902 |
wp_die(
|
903 |
-
$this->
|
904 |
" Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
|
905 |
-
$this->
|
906 |
array( 'back_link' => true )
|
907 |
);
|
908 |
}
|
@@ -918,9 +974,62 @@
|
|
918 |
'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
|
919 |
);
|
920 |
|
921 |
-
return $id_slug_type_path_map[ $this->_module_id ]['path'];
|
922 |
}
|
923 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
924 |
/**
|
925 |
* @author Leo Fajardo (@leorw)
|
926 |
*
|
@@ -950,7 +1059,10 @@
|
|
950 |
* @author Vova Feldman (@svovaf)
|
951 |
* @since 1.2.3
|
952 |
*/
|
953 |
-
|
|
|
|
|
|
|
954 |
) {
|
955 |
$caller_main_file_and_type = $this->get_caller_main_file_and_type();
|
956 |
|
@@ -1041,8 +1153,18 @@
|
|
1041 |
*/
|
1042 |
|
1043 |
if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
|
1044 |
-
$module_type
|
1045 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1046 |
continue;
|
1047 |
}
|
1048 |
}
|
@@ -1060,7 +1182,7 @@
|
|
1060 |
|
1061 |
if ( isset( $caller_map[ $caller_file_hash ] ) ) {
|
1062 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
1063 |
-
$caller_file_candidate = $caller_map[ $caller_file_hash ];
|
1064 |
}
|
1065 |
}
|
1066 |
|
@@ -1152,18 +1274,18 @@
|
|
1152 |
|
1153 |
$reason_found_better_plugin = array(
|
1154 |
'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
|
1155 |
-
'text' => sprintf( $this->
|
1156 |
'input_type' => 'textfield',
|
1157 |
-
'input_placeholder' => sprintf( $this->
|
1158 |
);
|
1159 |
|
1160 |
$reason_temporary_deactivation = array(
|
1161 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
1162 |
'text' => sprintf(
|
1163 |
-
$this->
|
1164 |
strtolower( $this->is_plugin() ?
|
1165 |
-
$this->
|
1166 |
-
$this->
|
1167 |
)
|
1168 |
),
|
1169 |
'input_type' => '',
|
@@ -1172,7 +1294,7 @@
|
|
1172 |
|
1173 |
$reason_other = array(
|
1174 |
'id' => self::REASON_OTHER,
|
1175 |
-
'text' => $this->
|
1176 |
'input_type' => 'textfield',
|
1177 |
'input_placeholder' => ''
|
1178 |
);
|
@@ -1180,27 +1302,27 @@
|
|
1180 |
$long_term_user_reasons = array(
|
1181 |
array(
|
1182 |
'id' => self::REASON_NO_LONGER_NEEDED,
|
1183 |
-
'text' => sprintf( $this->
|
1184 |
'input_type' => '',
|
1185 |
'input_placeholder' => ''
|
1186 |
),
|
1187 |
$reason_found_better_plugin,
|
1188 |
array(
|
1189 |
'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
|
1190 |
-
'text' => sprintf( $this->
|
1191 |
'input_type' => '',
|
1192 |
'input_placeholder' => ''
|
1193 |
),
|
1194 |
array(
|
1195 |
'id' => self::REASON_BROKE_MY_SITE,
|
1196 |
-
'text' => sprintf( $this->
|
1197 |
'input_type' => '',
|
1198 |
'input_placeholder' => '',
|
1199 |
'internal_message' => $contact_support_template
|
1200 |
),
|
1201 |
array(
|
1202 |
'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
|
1203 |
-
'text' => sprintf( $this->
|
1204 |
'input_type' => '',
|
1205 |
'input_placeholder' => '',
|
1206 |
'internal_message' => $contact_support_template
|
@@ -1210,15 +1332,15 @@
|
|
1210 |
if ( $this->is_paying() ) {
|
1211 |
$long_term_user_reasons[] = array(
|
1212 |
'id' => self::REASON_CANT_PAY_ANYMORE,
|
1213 |
-
'text' => $this->
|
1214 |
'input_type' => 'textfield',
|
1215 |
-
'input_placeholder' => $this->
|
1216 |
);
|
1217 |
}
|
1218 |
|
1219 |
$reason_dont_share_info = array(
|
1220 |
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
1221 |
-
'text' => $this->
|
1222 |
'input_type' => '',
|
1223 |
'input_placeholder' => ''
|
1224 |
);
|
@@ -1239,7 +1361,7 @@
|
|
1239 |
'non-registered-and-non-anonymous-short-term' => array(
|
1240 |
array(
|
1241 |
'id' => self::REASON_DIDNT_WORK,
|
1242 |
-
'text' => sprintf( $this->
|
1243 |
'input_type' => '',
|
1244 |
'input_placeholder' => ''
|
1245 |
),
|
@@ -1249,7 +1371,7 @@
|
|
1249 |
'short-term' => array(
|
1250 |
array(
|
1251 |
'id' => self::REASON_COULDNT_MAKE_IT_WORK,
|
1252 |
-
'text' => $this->
|
1253 |
'input_type' => '',
|
1254 |
'input_placeholder' => '',
|
1255 |
'internal_message' => $contact_support_template
|
@@ -1257,27 +1379,27 @@
|
|
1257 |
$reason_found_better_plugin,
|
1258 |
array(
|
1259 |
'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
|
1260 |
-
'text' => sprintf( $this->
|
1261 |
'input_type' => 'textarea',
|
1262 |
-
'input_placeholder' => $this->
|
1263 |
),
|
1264 |
array(
|
1265 |
'id' => self::REASON_NOT_WORKING,
|
1266 |
-
'text' => sprintf( $this->
|
1267 |
'input_type' => 'textarea',
|
1268 |
-
'input_placeholder' => $this->
|
1269 |
),
|
1270 |
array(
|
1271 |
'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
|
1272 |
-
'text' => $this->
|
1273 |
'input_type' => 'textarea',
|
1274 |
-
'input_placeholder' => $this->
|
1275 |
),
|
1276 |
array(
|
1277 |
'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
|
1278 |
-
'text' => sprintf( $this->
|
1279 |
'input_type' => 'textarea',
|
1280 |
-
'input_placeholder' => $this->
|
1281 |
)
|
1282 |
)
|
1283 |
);
|
@@ -1813,7 +1935,7 @@
|
|
1813 |
|
1814 |
self::$_static_logger->entrance();
|
1815 |
|
1816 |
-
$title = sprintf( '%s [v.%s]',
|
1817 |
|
1818 |
if ( WP_FS__DEV_MODE ) {
|
1819 |
// Add top-level debug menu item.
|
@@ -2220,29 +2342,36 @@
|
|
2220 |
*
|
2221 |
* @return string
|
2222 |
*/
|
2223 |
-
|
2224 |
-
|
2225 |
|
2226 |
-
|
2227 |
-
|
2228 |
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
|
2237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2238 |
|
2239 |
-
|
2240 |
-
|
2241 |
|
2242 |
-
|
2243 |
|
2244 |
-
|
2245 |
-
|
2246 |
|
2247 |
/**
|
2248 |
* @author Vova Feldman (@svovaf)
|
@@ -2322,6 +2451,18 @@
|
|
2322 |
// $admin_email = get_option( 'admin_email' );
|
2323 |
$admin_email = $current_user->user_email;
|
2324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2325 |
$message = false;
|
2326 |
if ( is_object( $api_result ) &&
|
2327 |
isset( $api_result->error ) &&
|
@@ -2348,15 +2489,15 @@
|
|
2348 |
if ( ! empty( $missing_methods ) ) {
|
2349 |
$missing_methods = sprintf(
|
2350 |
'<br><br><b>%s</b> %s',
|
2351 |
-
$this->
|
2352 |
$missing_methods
|
2353 |
);
|
2354 |
}
|
2355 |
}
|
2356 |
|
2357 |
$message = sprintf(
|
2358 |
-
|
2359 |
-
$this->
|
2360 |
$missing_methods .
|
2361 |
' %s',
|
2362 |
'<b>' . $this->get_plugin_name() . '</b>',
|
@@ -2364,95 +2505,95 @@
|
|
2364 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2365 |
sprintf(
|
2366 |
'<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
|
2367 |
-
$this->
|
2368 |
' - ' . sprintf(
|
2369 |
-
$this->
|
2370 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2371 |
)
|
2372 |
),
|
2373 |
sprintf(
|
2374 |
'<b>%s</b> - %s',
|
2375 |
-
|
2376 |
-
sprintf( $this->
|
2377 |
),
|
2378 |
sprintf(
|
2379 |
-
'<a href="%s"><b>%s</b></a
|
2380 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2381 |
-
$
|
2382 |
-
|
2383 |
)
|
2384 |
)
|
2385 |
);
|
2386 |
break;
|
2387 |
case 'cloudflare_ddos_protection':
|
2388 |
$message = sprintf(
|
2389 |
-
|
2390 |
-
$this->
|
2391 |
-
|
2392 |
' %s',
|
2393 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2394 |
sprintf(
|
2395 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2396 |
sprintf(
|
2397 |
'<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
|
2398 |
-
$
|
2399 |
' - ' . sprintf(
|
2400 |
-
$
|
2401 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2402 |
)
|
2403 |
),
|
2404 |
sprintf(
|
2405 |
-
'<a href="%s" target="_blank"><b>%s</b></a
|
2406 |
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
2407 |
-
$
|
2408 |
-
|
2409 |
),
|
2410 |
sprintf(
|
2411 |
-
'<a href="%s"><b>%s</b></a
|
2412 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2413 |
-
$
|
2414 |
-
|
2415 |
)
|
2416 |
)
|
2417 |
);
|
2418 |
break;
|
2419 |
case 'squid_cache_block':
|
2420 |
$message = sprintf(
|
2421 |
-
|
2422 |
-
$this->
|
2423 |
' %s',
|
2424 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2425 |
sprintf(
|
2426 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2427 |
sprintf(
|
2428 |
-
'<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a
|
2429 |
-
$this->
|
2430 |
-
|
2431 |
-
$this->
|
2432 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2433 |
)
|
2434 |
),
|
2435 |
sprintf(
|
2436 |
'<b>%s</b> - %s',
|
2437 |
-
|
2438 |
sprintf(
|
2439 |
-
$this->
|
2440 |
// We use a filter since the plugin might require additional API connectivity.
|
2441 |
'<b>' . implode( ', ', $this->apply_filters( 'api_domains', array( 'api.freemius.com', 'wp.freemius.com' ) ) ) . '</b>',
|
2442 |
$this->_module_type
|
2443 |
)
|
2444 |
),
|
2445 |
sprintf(
|
2446 |
-
'<a href="%s"><b>%s</b></a
|
2447 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2448 |
-
$
|
2449 |
-
|
2450 |
)
|
2451 |
)
|
2452 |
);
|
2453 |
break;
|
2454 |
// default:
|
2455 |
-
// $message = $this->
|
2456 |
// break;
|
2457 |
}
|
2458 |
}
|
@@ -2460,25 +2601,27 @@
|
|
2460 |
$message_id = 'failed_connect_api';
|
2461 |
$type = 'error';
|
2462 |
|
|
|
|
|
2463 |
if ( false === $message ) {
|
2464 |
if ( $is_first_failure ) {
|
2465 |
// First attempt failed.
|
2466 |
$message = sprintf(
|
2467 |
-
|
2468 |
-
|
2469 |
-
$this->
|
2470 |
'%s',
|
2471 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2472 |
sprintf(
|
2473 |
'<div id="fs_firewall_issue_options">%s %s</div>',
|
2474 |
sprintf(
|
2475 |
'<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
|
2476 |
-
$this->
|
2477 |
),
|
2478 |
sprintf(
|
2479 |
'<a href="%s" class="button">%s</a>',
|
2480 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2481 |
-
$this->
|
2482 |
)
|
2483 |
)
|
2484 |
);
|
@@ -2488,32 +2631,32 @@
|
|
2488 |
} else {
|
2489 |
// Second connectivity attempt failed.
|
2490 |
$message = sprintf(
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
' %s',
|
2495 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2496 |
sprintf(
|
2497 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2498 |
sprintf(
|
2499 |
'<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
|
2500 |
-
$
|
2501 |
' - ' . sprintf(
|
2502 |
-
$
|
2503 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2504 |
)
|
2505 |
),
|
2506 |
sprintf(
|
2507 |
-
'<a href="%s" target="_blank"><b>%s</b></a
|
2508 |
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
2509 |
-
$
|
2510 |
-
|
2511 |
),
|
2512 |
sprintf(
|
2513 |
-
'<a href="%s"><b>%s</b></a
|
2514 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2515 |
-
$
|
2516 |
-
|
2517 |
)
|
2518 |
)
|
2519 |
);
|
@@ -2523,7 +2666,7 @@
|
|
2523 |
$this->_admin_notices->add_sticky(
|
2524 |
$message,
|
2525 |
$message_id,
|
2526 |
-
$this->
|
2527 |
$type
|
2528 |
);
|
2529 |
}
|
@@ -2590,7 +2733,7 @@
|
|
2590 |
|
2591 |
$this->_admin_notices->add_sticky(
|
2592 |
sprintf(
|
2593 |
-
$this->
|
2594 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2595 |
),
|
2596 |
'server_details_sent'
|
@@ -2866,10 +3009,6 @@
|
|
2866 |
|
2867 |
$this->parse_settings( $plugin_info );
|
2868 |
|
2869 |
-
if ( $this->has_affiliate_program() ) {
|
2870 |
-
$this->fetch_affiliate_and_terms();
|
2871 |
-
}
|
2872 |
-
|
2873 |
if ( ! self::is_ajax() ) {
|
2874 |
if ( ! $this->is_addon() || $this->is_only_premium() ) {
|
2875 |
add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
|
@@ -2985,10 +3124,10 @@
|
|
2985 |
|
2986 |
$this->_admin_notices->add(
|
2987 |
( ! empty( $parent_name ) ?
|
2988 |
-
sprintf( $this->
|
2989 |
-
sprintf( $this->
|
2990 |
),
|
2991 |
-
$this->
|
2992 |
'error'
|
2993 |
);
|
2994 |
|
@@ -3107,7 +3246,7 @@
|
|
3107 |
$this->_logger->api_error( $result );
|
3108 |
|
3109 |
self::shoot_ajax_failure(
|
3110 |
-
$this->
|
3111 |
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
3112 |
$result->error->message :
|
3113 |
var_export( $result, true ) )
|
@@ -3132,7 +3271,7 @@
|
|
3132 |
$this->_logger->api_error( $result );
|
3133 |
|
3134 |
self::shoot_ajax_failure(
|
3135 |
-
$this->
|
3136 |
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
3137 |
$result->error->message :
|
3138 |
var_export( $result, true ) )
|
@@ -3540,9 +3679,10 @@
|
|
3540 |
|
3541 |
if ( ! $this->is_only_premium() ) {
|
3542 |
$this->_admin_notices->add_sticky(
|
3543 |
-
sprintf( $this->
|
3544 |
'premium_activated',
|
3545 |
-
$this->
|
|
|
3546 |
);
|
3547 |
}
|
3548 |
} else {
|
@@ -3555,11 +3695,12 @@
|
|
3555 |
if ( $this->is_paying() && ! $this->is_premium() ) {
|
3556 |
$this->_admin_notices->add_sticky(
|
3557 |
sprintf(
|
3558 |
-
|
|
|
3559 |
$this->_site->plan->title
|
3560 |
) . $this->get_complete_upgrade_instructions(),
|
3561 |
'plan_upgraded',
|
3562 |
-
$this->
|
3563 |
);
|
3564 |
}
|
3565 |
}
|
@@ -3822,19 +3963,25 @@
|
|
3822 |
|
3823 |
$this->_parent->_admin_notices->add_sticky(
|
3824 |
sprintf(
|
3825 |
-
|
3826 |
-
|
3827 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3828 |
),
|
3829 |
'<b>' . $this->_plugin->title . '</b>'
|
3830 |
) . ' ' . sprintf(
|
3831 |
'<a href="%s" aria-label="%s" class="button button-primary" style="margin-left: 10px; vertical-align: middle;">%s ➜</a>',
|
3832 |
$this->_parent->addon_url( $this->_slug ),
|
3833 |
-
esc_attr( sprintf( $this->_parent->
|
3834 |
-
$this->_parent->
|
3835 |
),
|
3836 |
'no_addon_license_' . $this->_slug,
|
3837 |
-
( $is_after_trial_cancel ? '' : $this->_parent->
|
3838 |
( $is_after_trial_cancel ? 'success' : 'error' )
|
3839 |
);
|
3840 |
|
@@ -4268,10 +4415,12 @@
|
|
4268 |
|
4269 |
$this->_admin_notices->add_sticky(
|
4270 |
sprintf(
|
4271 |
-
$this->
|
4272 |
'<b>' . $this->get_plugin_name() . '</b>',
|
4273 |
'<b>' . $email . '</b>',
|
4274 |
-
|
|
|
|
|
4275 |
),
|
4276 |
'activation_pending',
|
4277 |
'Thanks!'
|
@@ -4350,10 +4499,11 @@
|
|
4350 |
// Show notice for new plugin installations.
|
4351 |
$this->_admin_notices->add(
|
4352 |
sprintf(
|
4353 |
-
$this->
|
4354 |
sprintf( '<b><a href="%s">%s</a></b>',
|
4355 |
$this->get_activation_url(),
|
4356 |
-
sprintf( $this->
|
|
|
4357 |
)
|
4358 |
),
|
4359 |
'',
|
@@ -4366,11 +4516,11 @@
|
|
4366 |
// Show notice for new plugin installations.
|
4367 |
$this->_admin_notices->add_sticky(
|
4368 |
sprintf(
|
4369 |
-
$this->
|
4370 |
$this->_module_type,
|
4371 |
sprintf( '<b><a href="%s">%s</a></b>',
|
4372 |
$this->get_activation_url(),
|
4373 |
-
sprintf( $this->
|
4374 |
)
|
4375 |
),
|
4376 |
'connect_account',
|
@@ -4755,8 +4905,9 @@
|
|
4755 |
// If activating the premium module version, add an admin notice to congratulate for an upgrade completion.
|
4756 |
if ( $is_premium_version_activation ) {
|
4757 |
$this->_admin_notices->add(
|
4758 |
-
sprintf( $this->
|
4759 |
-
$this->
|
|
|
4760 |
);
|
4761 |
}
|
4762 |
} else if ( $this->is_anonymous() ) {
|
@@ -5839,10 +5990,10 @@
|
|
5839 |
*/
|
5840 |
function get_module_label( $lowercase = false ) {
|
5841 |
$label = $this->is_addon() ?
|
5842 |
-
$this->
|
5843 |
( $this->is_plugin() ?
|
5844 |
-
$this->
|
5845 |
-
$this->
|
5846 |
|
5847 |
if ( $lowercase ) {
|
5848 |
$label = strtolower( $label );
|
@@ -7099,9 +7250,9 @@
|
|
7099 |
$error = $result->error;
|
7100 |
|
7101 |
if ( in_array( $error->code, array( 'invalid_email', 'no_user' ) ) ) {
|
7102 |
-
$error = $this->
|
7103 |
} else if ( 'no_license' === $error->code ) {
|
7104 |
-
$error = $this->
|
7105 |
} else {
|
7106 |
$error = $error->message;
|
7107 |
}
|
@@ -7112,7 +7263,7 @@
|
|
7112 |
);
|
7113 |
|
7114 |
if ( false !== $error ) {
|
7115 |
-
$licenses['error'] = sprintf( '%s... %s', $this->
|
7116 |
}
|
7117 |
|
7118 |
echo json_encode( $licenses );
|
@@ -7145,7 +7296,7 @@
|
|
7145 |
if ( self::is_ajax() &&
|
7146 |
'admin-ajax.php' === $pagenow
|
7147 |
) {
|
7148 |
-
$referer =
|
7149 |
|
7150 |
if ( is_string( $referer ) ) {
|
7151 |
$parts = explode( '?', $referer );
|
@@ -7202,14 +7353,12 @@
|
|
7202 |
|
7203 |
/**
|
7204 |
* @author Leo Fajardo (@leorw)
|
7205 |
-
* @since 1.2.
|
7206 |
*/
|
7207 |
-
private function
|
7208 |
-
$this->_logger->entrance();
|
7209 |
-
|
7210 |
if ( ! is_object( $this->plugin_affiliate_terms ) ) {
|
7211 |
$plugins_api = $this->get_api_plugin_scope();
|
7212 |
-
$affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation',
|
7213 |
|
7214 |
if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
|
7215 |
return;
|
@@ -7217,20 +7366,30 @@
|
|
7217 |
|
7218 |
$this->plugin_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7219 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7220 |
|
7221 |
-
if ( $this->is_registered() ) {
|
7222 |
$users_api = $this->get_api_user_scope();
|
7223 |
-
$result = $users_api->get( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json",
|
7224 |
if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
|
7225 |
if ( ! empty( $result->affiliates ) ) {
|
7226 |
$affiliate = new FS_Affiliate( $result->affiliates[0] );
|
7227 |
|
7228 |
-
if ( ! $
|
7229 |
-
|
|
|
7230 |
}
|
7231 |
|
7232 |
if ( $affiliate->is_using_custom_terms ) {
|
7233 |
-
$affiliate_terms = $users_api->get( "/plugins/{$this->_plugin->id}/affiliates/{$affiliate->id}/aff/{$affiliate->custom_affiliate_terms_id}.json",
|
7234 |
if ( $this->is_api_result_entity( $affiliate_terms ) ) {
|
7235 |
$this->custom_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7236 |
}
|
@@ -7242,6 +7401,17 @@
|
|
7242 |
}
|
7243 |
}
|
7244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7245 |
/**
|
7246 |
* @author Leo Fajardo
|
7247 |
* @since 1.2.3
|
@@ -7310,10 +7480,12 @@
|
|
7310 |
var_export( $next_page, true )
|
7311 |
);
|
7312 |
} else if ( $this->is_pending_activation() ) {
|
7313 |
-
self::shoot_ajax_failure( $this->
|
7314 |
}
|
7315 |
}
|
7316 |
|
|
|
|
|
7317 |
$api = $this->get_api_user_scope();
|
7318 |
$result = $api->call(
|
7319 |
( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
|
@@ -7335,6 +7507,7 @@
|
|
7335 |
}
|
7336 |
|
7337 |
$affiliate_application_data = array(
|
|
|
7338 |
'stats_description' => $affiliate['stats_description'],
|
7339 |
'promotion_method_description' => $affiliate['promotion_method_description'],
|
7340 |
);
|
@@ -8552,7 +8725,19 @@
|
|
8552 |
return true;
|
8553 |
}
|
8554 |
|
8555 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8556 |
|
8557 |
if ( empty( $decoded ) ) {
|
8558 |
return false;
|
@@ -8647,7 +8832,8 @@
|
|
8647 |
|
8648 |
if ( ! $this->is_paying_or_trial() ) {
|
8649 |
$this->_admin_notices->add_sticky(
|
8650 |
-
sprintf( $this->
|
|
|
8651 |
'activation_complete'
|
8652 |
);
|
8653 |
}
|
@@ -8658,20 +8844,20 @@
|
|
8658 |
if ( $this->is_paying() ) {
|
8659 |
$this->_admin_notices->add_sticky(
|
8660 |
sprintf(
|
8661 |
-
$this->
|
8662 |
$this->_site->plan->title
|
8663 |
) . $this->get_complete_upgrade_instructions(),
|
8664 |
'plan_upgraded',
|
8665 |
-
$this->
|
8666 |
);
|
8667 |
} else {
|
8668 |
$this->_admin_notices->add_sticky(
|
8669 |
sprintf(
|
8670 |
-
$this->
|
8671 |
'<i>' . $this->get_plugin_name() . '</i>'
|
8672 |
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
8673 |
'trial_started',
|
8674 |
-
$this->
|
8675 |
);
|
8676 |
}
|
8677 |
}
|
@@ -8956,9 +9142,9 @@
|
|
8956 |
$install = $this->apply_filters( 'after_install_failure', $install, $args );
|
8957 |
|
8958 |
$this->_admin_notices->add(
|
8959 |
-
sprintf( $this->
|
8960 |
-
$this->
|
8961 |
-
$this->
|
8962 |
'error'
|
8963 |
);
|
8964 |
|
@@ -9012,9 +9198,9 @@
|
|
9012 |
|
9013 |
if ( isset( $addon_install->error ) ) {
|
9014 |
$this->_admin_notices->add(
|
9015 |
-
sprintf( $this->
|
9016 |
-
$this->
|
9017 |
-
$this->
|
9018 |
'error'
|
9019 |
);
|
9020 |
|
@@ -9073,9 +9259,9 @@
|
|
9073 |
|
9074 |
if ( isset( $parent_install->error ) ) {
|
9075 |
$this->_admin_notices->add(
|
9076 |
-
sprintf( $this->
|
9077 |
-
$this->
|
9078 |
-
$this->
|
9079 |
'error'
|
9080 |
);
|
9081 |
|
@@ -9332,15 +9518,15 @@
|
|
9332 |
* @return string
|
9333 |
*/
|
9334 |
function get_pricing_cta_label() {
|
9335 |
-
$label = 'upgrade';
|
9336 |
|
9337 |
if ( $this->is_in_trial_promotion() &&
|
9338 |
! $this->is_paying_or_trial()
|
9339 |
) {
|
9340 |
// If running a trial promotion, modify the pricing to load the trial.
|
9341 |
-
$label = 'start-trial';
|
9342 |
} else if ( $this->is_paying() ) {
|
9343 |
-
$label = 'pricing';
|
9344 |
}
|
9345 |
|
9346 |
return $label;
|
@@ -9380,9 +9566,9 @@
|
|
9380 |
if ( $this->has_affiliate_program() ) {
|
9381 |
// Add affiliation page.
|
9382 |
$this->add_submenu_item(
|
9383 |
-
$this->
|
9384 |
array( &$this, '_affiliation_page_render' ),
|
9385 |
-
$this->get_plugin_name() . ' – ' . $this->
|
9386 |
'manage_options',
|
9387 |
'affiliation',
|
9388 |
'Freemius::_clean_admin_content_section',
|
@@ -9402,9 +9588,9 @@
|
|
9402 |
|
9403 |
// Add user account page.
|
9404 |
$this->add_submenu_item(
|
9405 |
-
$this->
|
9406 |
array( &$this, '_account_page_render' ),
|
9407 |
-
$this->get_plugin_name() . ' – ' . $this->
|
9408 |
'manage_options',
|
9409 |
'account',
|
9410 |
array( &$this, '_account_page_load' ),
|
@@ -9415,9 +9601,9 @@
|
|
9415 |
|
9416 |
// Add contact page.
|
9417 |
$this->add_submenu_item(
|
9418 |
-
$this->
|
9419 |
array( &$this, '_contact_page_render' ),
|
9420 |
-
$this->get_plugin_name() . ' – ' . $this->
|
9421 |
'manage_options',
|
9422 |
'contact',
|
9423 |
'Freemius::_clean_admin_content_section',
|
@@ -9427,9 +9613,9 @@
|
|
9427 |
|
9428 |
if ( $this->has_addons() ) {
|
9429 |
$this->add_submenu_item(
|
9430 |
-
$this->
|
9431 |
array( &$this, '_addons_page_render' ),
|
9432 |
-
$this->get_plugin_name() . ' – ' . $this->
|
9433 |
'manage_options',
|
9434 |
'addons',
|
9435 |
array( &$this, '_addons_page_load' ),
|
@@ -9443,7 +9629,7 @@
|
|
9443 |
$this->is_pricing_page_visible()
|
9444 |
);
|
9445 |
|
9446 |
-
$
|
9447 |
$pricing_class = 'upgrade-mode';
|
9448 |
if ( $show_pricing ) {
|
9449 |
if ( $this->is_in_trial_promotion() &&
|
@@ -9458,9 +9644,9 @@
|
|
9458 |
|
9459 |
// Add upgrade/pricing page.
|
9460 |
$this->add_submenu_item(
|
9461 |
-
|
9462 |
array( &$this, '_pricing_page_render' ),
|
9463 |
-
$this->get_plugin_name() . ' – ' . $this->
|
9464 |
'manage_options',
|
9465 |
'pricing',
|
9466 |
'Freemius::_clean_admin_content_section',
|
@@ -9640,7 +9826,7 @@
|
|
9640 |
|
9641 |
if ( ! $this->is_activation_mode() ) {
|
9642 |
$this->add_submenu_link_item(
|
9643 |
-
$this->apply_filters( 'support_forum_submenu', $this->
|
9644 |
$this->get_support_forum_url(),
|
9645 |
'wp-support-forum',
|
9646 |
null,
|
@@ -10380,8 +10566,8 @@
|
|
10380 |
$this->do_action( 'account_email_verified', $user->email );
|
10381 |
|
10382 |
$this->_admin_notices->add(
|
10383 |
-
$this->
|
10384 |
-
$this->
|
10385 |
'success',
|
10386 |
// Make admin sticky if account menu item is invisible,
|
10387 |
// since the page will be auto redirected to the plugin's
|
@@ -10513,21 +10699,24 @@
|
|
10513 |
* @return FS_Plugin_Plan[]|object
|
10514 |
*/
|
10515 |
private function _fetch_plugin_plans() {
|
10516 |
-
|
10517 |
-
|
10518 |
|
10519 |
-
|
|
|
|
|
|
|
10520 |
|
10521 |
-
|
10522 |
-
|
10523 |
-
|
10524 |
-
|
10525 |
|
10526 |
-
|
10527 |
-
|
10528 |
|
10529 |
-
|
10530 |
-
|
10531 |
|
10532 |
/**
|
10533 |
* @author Vova Feldman (@svovaf)
|
@@ -10912,24 +11101,18 @@
|
|
10912 |
}
|
10913 |
|
10914 |
$this->_admin_notices->add_sticky(
|
10915 |
-
|
10916 |
-
|
10917 |
-
$this->
|
10918 |
-
|
10919 |
-
|
10920 |
-
|
10921 |
-
|
10922 |
-
)
|
10923 |
-
|
10924 |
-
|
10925 |
-
$this->get_text( 'addon-successfully-purchased-message' ),
|
10926 |
-
$addon->title
|
10927 |
-
) . ' ' . $this->get_latest_download_link(
|
10928 |
-
$this->get_text( 'download-latest-version' ),
|
10929 |
-
$addon_id
|
10930 |
-
),
|
10931 |
'addon_plan_upgraded_' . $addon->slug,
|
10932 |
-
$this->
|
10933 |
);
|
10934 |
}
|
10935 |
}
|
@@ -10974,11 +11157,11 @@
|
|
10974 |
if ( ! self::$_global_admin_notices->has_sticky( 'api_blocked' ) ) {
|
10975 |
self::$_global_admin_notices->add(
|
10976 |
sprintf(
|
10977 |
-
$this->
|
10978 |
$this->get_plugin_name(),
|
10979 |
'<a href="' . $api->get_url() . '" target="_blank">' . $api->get_url() . '</a>'
|
10980 |
-
) . '<br> ' . $this->
|
10981 |
-
$this->
|
10982 |
'error',
|
10983 |
$background,
|
10984 |
false,
|
@@ -10988,8 +11171,8 @@
|
|
10988 |
} else {
|
10989 |
// Authentication params are broken.
|
10990 |
$this->_admin_notices->add(
|
10991 |
-
$this->
|
10992 |
-
$this->
|
10993 |
'error'
|
10994 |
);
|
10995 |
}
|
@@ -11105,6 +11288,8 @@
|
|
11105 |
}
|
11106 |
}
|
11107 |
|
|
|
|
|
11108 |
if ( $this->has_paid_plan() ) {
|
11109 |
switch ( $plan_change ) {
|
11110 |
case 'none':
|
@@ -11116,19 +11301,19 @@
|
|
11116 |
if ( $plan->is_free() ) {
|
11117 |
$this->_admin_notices->add(
|
11118 |
sprintf(
|
11119 |
-
$this->
|
11120 |
-
'<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . $this->
|
11121 |
) . ' ' . sprintf(
|
11122 |
'<a href="%s">%s</a>',
|
11123 |
$this->contact_url(
|
11124 |
'bug',
|
11125 |
-
sprintf( $this->
|
11126 |
strtoupper( $plan->name )
|
11127 |
)
|
11128 |
),
|
11129 |
-
$this->
|
11130 |
),
|
11131 |
-
$
|
11132 |
);
|
11133 |
}
|
11134 |
}
|
@@ -11136,11 +11321,11 @@
|
|
11136 |
case 'upgraded':
|
11137 |
$this->_admin_notices->add_sticky(
|
11138 |
sprintf(
|
11139 |
-
$this->
|
11140 |
'<i>' . $this->get_plugin_name() . '</i>'
|
11141 |
) . $this->get_complete_upgrade_instructions(),
|
11142 |
'plan_upgraded',
|
11143 |
-
$this->
|
11144 |
);
|
11145 |
|
11146 |
$this->_admin_notices->remove_sticky( array(
|
@@ -11153,7 +11338,7 @@
|
|
11153 |
case 'changed':
|
11154 |
$this->_admin_notices->add_sticky(
|
11155 |
sprintf(
|
11156 |
-
$this->
|
11157 |
$this->_site->plan->title
|
11158 |
),
|
11159 |
'plan_changed'
|
@@ -11168,41 +11353,41 @@
|
|
11168 |
break;
|
11169 |
case 'downgraded':
|
11170 |
$this->_admin_notices->add_sticky(
|
11171 |
-
sprintf( $this->
|
11172 |
'license_expired',
|
11173 |
-
$
|
11174 |
);
|
11175 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11176 |
break;
|
11177 |
case 'cancelled':
|
11178 |
$this->_admin_notices->add(
|
11179 |
-
$this->
|
11180 |
sprintf(
|
11181 |
'<a href="%s">%s</a>',
|
11182 |
$this->contact_url( 'bug' ),
|
11183 |
-
$this->
|
11184 |
),
|
11185 |
-
$
|
11186 |
'error'
|
11187 |
);
|
11188 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11189 |
break;
|
11190 |
case 'expired':
|
11191 |
$this->_admin_notices->add_sticky(
|
11192 |
-
sprintf( $this->
|
11193 |
'license_expired',
|
11194 |
-
$
|
11195 |
);
|
11196 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11197 |
break;
|
11198 |
case 'trial_started':
|
11199 |
$this->_admin_notices->add_sticky(
|
11200 |
sprintf(
|
11201 |
-
$this->
|
11202 |
'<i>' . $this->get_plugin_name() . '</i>'
|
11203 |
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
11204 |
'trial_started',
|
11205 |
-
$this->
|
11206 |
);
|
11207 |
|
11208 |
$this->_admin_notices->remove_sticky( array(
|
@@ -11211,9 +11396,9 @@
|
|
11211 |
break;
|
11212 |
case 'trial_expired':
|
11213 |
$this->_admin_notices->add_sticky(
|
11214 |
-
$this->
|
11215 |
'trial_expired',
|
11216 |
-
$
|
11217 |
);
|
11218 |
$this->_admin_notices->remove_sticky( array(
|
11219 |
'trial_started',
|
@@ -11281,23 +11466,22 @@
|
|
11281 |
if ( ! $background ) {
|
11282 |
$this->_admin_notices->add( sprintf(
|
11283 |
'%s %s',
|
11284 |
-
$this->
|
11285 |
( is_object( $license ) && isset( $license->error ) ?
|
11286 |
$license->error->message :
|
11287 |
sprintf( '%s<br><code>%s</code>',
|
11288 |
-
$this->
|
11289 |
var_export( $license, true )
|
11290 |
)
|
11291 |
)
|
11292 |
),
|
11293 |
-
$this->
|
11294 |
'error'
|
11295 |
);
|
11296 |
}
|
11297 |
|
11298 |
return;
|
11299 |
}
|
11300 |
-
|
11301 |
$premium_license = new FS_Plugin_License( $license );
|
11302 |
|
11303 |
// Updated site plan.
|
@@ -11312,10 +11496,10 @@
|
|
11312 |
|
11313 |
if ( ! $background ) {
|
11314 |
$this->_admin_notices->add_sticky(
|
11315 |
-
$this->
|
11316 |
$this->get_complete_upgrade_instructions(),
|
11317 |
'license_activated',
|
11318 |
-
$this->
|
11319 |
);
|
11320 |
}
|
11321 |
|
@@ -11334,10 +11518,12 @@
|
|
11334 |
protected function _deactivate_license( $show_notice = true ) {
|
11335 |
$this->_logger->entrance();
|
11336 |
|
|
|
|
|
11337 |
if ( ! is_object( $this->_license ) ) {
|
11338 |
$this->_admin_notices->add(
|
11339 |
-
sprintf( $this->
|
11340 |
-
$
|
11341 |
);
|
11342 |
|
11343 |
return;
|
@@ -11348,9 +11534,9 @@
|
|
11348 |
|
11349 |
if ( isset( $license->error ) ) {
|
11350 |
$this->_admin_notices->add(
|
11351 |
-
$this->
|
11352 |
-
$this->
|
11353 |
-
$
|
11354 |
'error'
|
11355 |
);
|
11356 |
|
@@ -11375,8 +11561,8 @@
|
|
11375 |
|
11376 |
if ( $show_notice ) {
|
11377 |
$this->_admin_notices->add(
|
11378 |
-
sprintf( $this->
|
11379 |
-
$this->
|
11380 |
);
|
11381 |
}
|
11382 |
|
@@ -11424,7 +11610,7 @@
|
|
11424 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11425 |
|
11426 |
$this->_admin_notices->add(
|
11427 |
-
sprintf( $this->
|
11428 |
$plan->title,
|
11429 |
human_time_diff( time(), strtotime( $this->_license->expiration ) )
|
11430 |
)
|
@@ -11434,8 +11620,8 @@
|
|
11434 |
$this->_store_site();
|
11435 |
} else {
|
11436 |
$this->_admin_notices->add(
|
11437 |
-
$this->
|
11438 |
-
$this->
|
11439 |
'error'
|
11440 |
);
|
11441 |
}
|
@@ -11452,11 +11638,14 @@
|
|
11452 |
function start_trial( $plan_name = false ) {
|
11453 |
$this->_logger->entrance();
|
11454 |
|
|
|
|
|
|
|
11455 |
if ( $this->is_trial() ) {
|
11456 |
// Already in trial mode.
|
11457 |
$this->_admin_notices->add(
|
11458 |
-
sprintf( $this->
|
11459 |
-
$
|
11460 |
'error'
|
11461 |
);
|
11462 |
|
@@ -11466,8 +11655,8 @@
|
|
11466 |
if ( $this->_site->is_trial_utilized() ) {
|
11467 |
// Trial was already utilized.
|
11468 |
$this->_admin_notices->add(
|
11469 |
-
$this->
|
11470 |
-
$
|
11471 |
'error'
|
11472 |
);
|
11473 |
|
@@ -11480,8 +11669,8 @@
|
|
11480 |
if ( false === $plan ) {
|
11481 |
// Plan doesn't exist.
|
11482 |
$this->_admin_notices->add(
|
11483 |
-
sprintf( $this->
|
11484 |
-
$
|
11485 |
'error'
|
11486 |
);
|
11487 |
|
@@ -11491,8 +11680,8 @@
|
|
11491 |
if ( ! $plan->has_trial() ) {
|
11492 |
// Plan doesn't exist.
|
11493 |
$this->_admin_notices->add(
|
11494 |
-
sprintf( $this->
|
11495 |
-
$
|
11496 |
'error'
|
11497 |
);
|
11498 |
|
@@ -11502,8 +11691,8 @@
|
|
11502 |
if ( ! $this->has_trial_plan() ) {
|
11503 |
// None of the plans have a trial.
|
11504 |
$this->_admin_notices->add(
|
11505 |
-
sprintf( $this->
|
11506 |
-
$
|
11507 |
'error'
|
11508 |
);
|
11509 |
|
@@ -11521,9 +11710,9 @@
|
|
11521 |
if ( ! $this->is_api_result_entity( $plan ) ) {
|
11522 |
// Some API error while trying to start the trial.
|
11523 |
$this->_admin_notices->add(
|
11524 |
-
sprintf( $this->
|
11525 |
. ' ' . var_export( $plan, true ),
|
11526 |
-
$
|
11527 |
'error'
|
11528 |
);
|
11529 |
|
@@ -11547,10 +11736,13 @@
|
|
11547 |
private function _cancel_trial() {
|
11548 |
$this->_logger->entrance();
|
11549 |
|
|
|
|
|
|
|
11550 |
if ( ! $this->is_trial() ) {
|
11551 |
$this->_admin_notices->add(
|
11552 |
-
$this->
|
11553 |
-
$
|
11554 |
'error'
|
11555 |
);
|
11556 |
|
@@ -11600,7 +11792,7 @@
|
|
11600 |
! $this->deactivate_premium_only_addon_without_license( true )
|
11601 |
) {
|
11602 |
$this->_admin_notices->add(
|
11603 |
-
sprintf( $this->
|
11604 |
);
|
11605 |
}
|
11606 |
|
@@ -11608,8 +11800,8 @@
|
|
11608 |
unset( $this->_storage->trial_plan );
|
11609 |
} else {
|
11610 |
$this->_admin_notices->add(
|
11611 |
-
$this->
|
11612 |
-
$
|
11613 |
'error'
|
11614 |
);
|
11615 |
}
|
@@ -11846,21 +12038,26 @@
|
|
11846 |
if ( ! $background ) {
|
11847 |
$this->_admin_notices->add(
|
11848 |
sprintf(
|
11849 |
-
|
|
|
11850 |
$update->version,
|
11851 |
sprintf(
|
11852 |
'<a href="%s" target="_blank">%s</a>',
|
11853 |
$this->get_account_url( 'download_latest' ),
|
11854 |
-
sprintf(
|
|
|
|
|
|
|
|
|
11855 |
)
|
11856 |
),
|
11857 |
-
$this->
|
11858 |
);
|
11859 |
}
|
11860 |
} else if ( false === $new_version && ! $background ) {
|
11861 |
$this->_admin_notices->add(
|
11862 |
-
$this->
|
11863 |
-
$this->
|
11864 |
);
|
11865 |
}
|
11866 |
|
@@ -12126,7 +12323,7 @@
|
|
12126 |
|
12127 |
if ( ! isset( $result->error ) ) {
|
12128 |
$this->_admin_notices->add( sprintf(
|
12129 |
-
$this->
|
12130 |
sprintf( '<a href="mailto:%1s">%2s</a>', esc_url( $this->_user->email ), $this->_user->email )
|
12131 |
) );
|
12132 |
} else {
|
@@ -12214,6 +12411,9 @@
|
|
12214 |
$plugin_id = fs_request_get( 'plugin_id', $this->get_id() );
|
12215 |
$action = fs_get_action();
|
12216 |
|
|
|
|
|
|
|
12217 |
switch ( $action ) {
|
12218 |
case 'delete_account':
|
12219 |
check_admin_referer( $action );
|
@@ -12298,20 +12498,20 @@
|
|
12298 |
$candidate_email = fs_request_get( 'candidate_email', '' );
|
12299 |
|
12300 |
if ( $this->init_change_owner( $candidate_email ) ) {
|
12301 |
-
$this->_admin_notices->add( sprintf( $this->
|
12302 |
}
|
12303 |
break;
|
12304 |
case 'owner_confirmed':
|
12305 |
$candidate_email = fs_request_get( 'candidate_email', '' );
|
12306 |
|
12307 |
-
$this->_admin_notices->add( sprintf( $this->
|
12308 |
break;
|
12309 |
case 'candidate_confirmed':
|
12310 |
if ( $this->complete_change_owner() ) {
|
12311 |
$this->_admin_notices->add_sticky(
|
12312 |
-
sprintf( $this->
|
12313 |
'ownership_changed',
|
12314 |
-
$this->
|
12315 |
);
|
12316 |
} else {
|
12317 |
// @todo Handle failed ownership change message.
|
@@ -12331,23 +12531,23 @@
|
|
12331 |
switch ( $result->error->code ) {
|
12332 |
case 'user_exist':
|
12333 |
$this->_admin_notices->add(
|
12334 |
-
$this->
|
12335 |
-
sprintf( $this->
|
12336 |
sprintf(
|
12337 |
'<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
12338 |
$this->get_account_url( 'change_owner', array(
|
12339 |
'state' => 'init',
|
12340 |
'candidate_email' => $new_email
|
12341 |
) ),
|
12342 |
-
$this->
|
12343 |
),
|
12344 |
-
$
|
12345 |
'error'
|
12346 |
);
|
12347 |
break;
|
12348 |
}
|
12349 |
} else {
|
12350 |
-
$this->_admin_notices->add( $this->
|
12351 |
}
|
12352 |
|
12353 |
return;
|
@@ -12359,12 +12559,12 @@
|
|
12359 |
|
12360 |
if ( isset( $result->error ) ) {
|
12361 |
$this->_admin_notices->add(
|
12362 |
-
$this->
|
12363 |
-
$
|
12364 |
'error'
|
12365 |
);
|
12366 |
} else {
|
12367 |
-
$this->_admin_notices->add( $this->
|
12368 |
}
|
12369 |
|
12370 |
return;
|
@@ -12424,8 +12624,10 @@
|
|
12424 |
$this->do_action( 'account_property_edit', 'site', $site_property, $site_property_value );
|
12425 |
|
12426 |
$this->_admin_notices->add( sprintf(
|
12427 |
-
|
12428 |
-
|
|
|
|
|
12429 |
|
12430 |
return;
|
12431 |
}
|
@@ -12487,6 +12689,8 @@
|
|
12487 |
function _affiliation_page_render() {
|
12488 |
$this->_logger->entrance();
|
12489 |
|
|
|
|
|
12490 |
fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
|
12491 |
|
12492 |
$vars = array( 'id' => $this->_module_id );
|
@@ -12561,8 +12765,8 @@
|
|
12561 |
|
12562 |
if ( ! $this->is_registered() && $this->is_org_repo_compliant() ) {
|
12563 |
$this->_admin_notices->add(
|
12564 |
-
sprintf( $this->
|
12565 |
-
$this->
|
12566 |
'update-nag'
|
12567 |
);
|
12568 |
}
|
@@ -12880,7 +13084,7 @@
|
|
12880 |
$trial_period = $this->_trial_days;
|
12881 |
$require_payment = $this->_is_trial_require_payment;
|
12882 |
$trial_url = $this->get_trial_url();
|
12883 |
-
$plans_string = strtolower( $this->
|
12884 |
|
12885 |
if ( $this->is_registered() ) {
|
12886 |
// If opted-in, override trial with up to date data from API.
|
@@ -12920,7 +13124,7 @@
|
|
12920 |
}
|
12921 |
|
12922 |
$message = sprintf(
|
12923 |
-
$this->
|
12924 |
sprintf( '<b>%s</b>', $this->get_plugin_name() ),
|
12925 |
$plans_string,
|
12926 |
$trial_period
|
@@ -12928,15 +13132,15 @@
|
|
12928 |
|
12929 |
// "No Credit-Card Required" or "No Commitment for N Days".
|
12930 |
$cc_string = $require_payment ?
|
12931 |
-
sprintf( $this->
|
12932 |
-
$this->
|
12933 |
|
12934 |
|
12935 |
// Start trial button.
|
12936 |
$button = ' ' . sprintf(
|
12937 |
'<a style="margin-left: 10px; vertical-align: super;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
12938 |
$trial_url,
|
12939 |
-
$this->
|
12940 |
);
|
12941 |
|
12942 |
$this->_admin_notices->add_sticky(
|
@@ -12976,8 +13180,6 @@
|
|
12976 |
if (
|
12977 |
// Product has no affiliate program.
|
12978 |
! $this->has_affiliate_program() ||
|
12979 |
-
// User is already an affiliate.
|
12980 |
-
is_object( $this->affiliate ) ||
|
12981 |
// User has applied for an affiliate account.
|
12982 |
! empty( $this->_storage->affiliate_application_data ) ) {
|
12983 |
return false;
|
@@ -13013,7 +13215,7 @@
|
|
13013 |
}
|
13014 |
|
13015 |
$message = sprintf(
|
13016 |
-
$this->
|
13017 |
sprintf( '<strong>%s</strong>', $this->get_plugin_name() ),
|
13018 |
$this->get_module_label( true )
|
13019 |
);
|
@@ -13022,7 +13224,7 @@
|
|
13022 |
$button = ' ' . sprintf(
|
13023 |
'<a style="display: block; margin-top: 10px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
13024 |
$this->_get_admin_page_url( 'affiliation' ),
|
13025 |
-
$this->
|
13026 |
);
|
13027 |
|
13028 |
$this->_admin_notices->add_sticky(
|
@@ -13139,7 +13341,7 @@
|
|
13139 |
if ( $this->is_registered() ) {
|
13140 |
if ( ! $this->is_paying() && $this->has_paid_plan() ) {
|
13141 |
$this->add_plugin_action_link(
|
13142 |
-
$this->
|
13143 |
$this->get_upgrade_url(),
|
13144 |
false,
|
13145 |
7,
|
@@ -13149,7 +13351,7 @@
|
|
13149 |
|
13150 |
if ( $this->has_addons() ) {
|
13151 |
$this->add_plugin_action_link(
|
13152 |
-
$this->
|
13153 |
$this->_get_admin_page_url( 'addons' ),
|
13154 |
false,
|
13155 |
9,
|
@@ -13177,11 +13379,9 @@
|
|
13177 |
add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
|
13178 |
}
|
13179 |
|
13180 |
-
$link_text = $this->
|
13181 |
-
$this->
|
13182 |
-
|
13183 |
-
'change-license'
|
13184 |
-
);
|
13185 |
|
13186 |
$this->add_plugin_action_link(
|
13187 |
$link_text,
|
@@ -13242,14 +13442,14 @@
|
|
13242 |
|
13243 |
if ( $this->is_registered() ) {
|
13244 |
if ( $this->is_tracking_allowed() ) {
|
13245 |
-
$link_text_id = 'opt-out';
|
13246 |
} else {
|
13247 |
-
$link_text_id = 'opt-in';
|
13248 |
}
|
13249 |
|
13250 |
add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
|
13251 |
} else {
|
13252 |
-
$link_text_id = 'opt-in';
|
13253 |
|
13254 |
$params = ! $this->is_anonymous() ?
|
13255 |
array() :
|
@@ -13263,7 +13463,7 @@
|
|
13263 |
|
13264 |
if ( $this->is_plugin() && self::is_plugins_page() ) {
|
13265 |
$this->add_plugin_action_link(
|
13266 |
-
|
13267 |
$url,
|
13268 |
false,
|
13269 |
13,
|
@@ -13432,20 +13632,21 @@
|
|
13432 |
|
13433 |
// @since 1.2.1.5 The free version is auto deactivated.
|
13434 |
$deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ?
|
13435 |
-
( '<li>' . $this->
|
13436 |
'';
|
13437 |
|
13438 |
return sprintf(
|
13439 |
' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
|
13440 |
-
$this->
|
13441 |
$this->get_latest_download_link( sprintf(
|
13442 |
-
|
|
|
13443 |
$plan_title
|
13444 |
) ),
|
13445 |
$deactivation_step,
|
13446 |
-
$this->
|
13447 |
'//bit.ly/upload-wp-' . $this->_module_type . 's',
|
13448 |
-
$this->
|
13449 |
);
|
13450 |
}
|
13451 |
|
@@ -13461,6 +13662,46 @@
|
|
13461 |
return fs_text( $key, $this->_slug );
|
13462 |
}
|
13463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13464 |
#----------------------------------------------------------------------------------
|
13465 |
#region Versioning
|
13466 |
#----------------------------------------------------------------------------------
|
@@ -13564,17 +13805,17 @@
|
|
13564 |
if ( ! $this->is_registered() ) {
|
13565 |
// Not registered.
|
13566 |
self::shoot_ajax_failure( array(
|
13567 |
-
'message' => $this->
|
13568 |
'code' => 'premium_installed',
|
13569 |
) );
|
13570 |
}
|
13571 |
|
13572 |
-
$plugin_id = fs_request_get( '
|
13573 |
|
13574 |
if ( ! FS_Plugin::is_valid_id( $plugin_id ) ) {
|
13575 |
// Invalid ID.
|
13576 |
self::shoot_ajax_failure( array(
|
13577 |
-
'message' => $this->
|
13578 |
'code' => 'invalid_module_id',
|
13579 |
) );
|
13580 |
}
|
@@ -13583,21 +13824,21 @@
|
|
13583 |
if ( $this->is_premium() ) {
|
13584 |
// Already using the premium code version.
|
13585 |
self::shoot_ajax_failure( array(
|
13586 |
-
'message' => $this->
|
13587 |
'code' => 'premium_installed',
|
13588 |
) );
|
13589 |
}
|
13590 |
if ( ! $this->can_use_premium_code() ) {
|
13591 |
// Don't have access to the premium code.
|
13592 |
self::shoot_ajax_failure( array(
|
13593 |
-
'message' => $this->
|
13594 |
'code' => 'invalid_license',
|
13595 |
) );
|
13596 |
}
|
13597 |
if ( ! $this->has_release_on_freemius() ) {
|
13598 |
// Plugin is a serviceware, no premium code version.
|
13599 |
self::shoot_ajax_failure( array(
|
13600 |
-
'message' => $this->
|
13601 |
'code' => 'premium_version_missing',
|
13602 |
) );
|
13603 |
}
|
@@ -13607,7 +13848,7 @@
|
|
13607 |
if ( ! is_object( $addon ) ) {
|
13608 |
// Invalid add-on ID.
|
13609 |
self::shoot_ajax_failure( array(
|
13610 |
-
'message' => $this->
|
13611 |
'code' => 'invalid_module_id',
|
13612 |
) );
|
13613 |
}
|
@@ -13615,7 +13856,7 @@
|
|
13615 |
if ( $this->is_addon_activated( $plugin_id, true ) ) {
|
13616 |
// Premium add-on version is already activated.
|
13617 |
self::shoot_ajax_failure( array(
|
13618 |
-
'message' => $this->
|
13619 |
'code' => 'premium_installed',
|
13620 |
) );
|
13621 |
}
|
@@ -13687,10 +13928,11 @@
|
|
13687 |
}
|
13688 |
}
|
13689 |
|
13690 |
-
|
13691 |
-
|
13692 |
-
|
13693 |
-
|
|
|
13694 |
|
13695 |
fs_require_template( 'auto-installation.php', $vars );
|
13696 |
}
|
@@ -13960,7 +14202,7 @@
|
|
13960 |
require_once WP_FS__DIR_INCLUDES . '/customizer/class-fs-customizer-upsell-control.php';
|
13961 |
|
13962 |
$customizer->add_section( 'freemius_upsell', array(
|
13963 |
-
'title' => '★ ' . $this->
|
13964 |
'priority' => 1,
|
13965 |
) );
|
13966 |
$customizer->add_setting( 'freemius_upsell', array(
|
555 |
return;
|
556 |
}
|
557 |
|
558 |
+
if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
|
559 |
+
version_compare( $sdk_version, '1.2.3', '>=' )
|
560 |
+
) {
|
561 |
+
/**
|
562 |
+
* Starting from version 1.2.3, paths are stored as relative paths and not absolute paths; so when
|
563 |
+
* upgrading to 1.2.3, make paths relative.
|
564 |
+
*
|
565 |
+
* @author Leo Fajardo (@leorw)
|
566 |
+
*/
|
567 |
+
$this->make_paths_relative();
|
568 |
+
}
|
569 |
+
|
570 |
if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
|
571 |
version_compare( $sdk_version, '1.1.5', '>=' )
|
572 |
) {
|
590 |
}
|
591 |
}
|
592 |
|
593 |
+
/**
|
594 |
+
* Makes paths relative.
|
595 |
+
*
|
596 |
+
* @author Leo Fajardo
|
597 |
+
* @since 1.2.3
|
598 |
+
*/
|
599 |
+
private function make_paths_relative() {
|
600 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
601 |
+
|
602 |
+
if ( isset( $id_slug_type_path_map[ $this->_module_id ]['path'] ) ) {
|
603 |
+
$id_slug_type_path_map[ $this->_module_id ]['path'] = $this->get_relative_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
604 |
+
|
605 |
+
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
606 |
+
}
|
607 |
+
|
608 |
+
if ( isset( $this->_storage->plugin_main_file ) ) {
|
609 |
+
$plugin_main_file = $this->_storage->plugin_main_file;
|
610 |
+
|
611 |
+
if ( isset( $plugin_main_file->path ) ) {
|
612 |
+
$this->_storage->plugin_main_file->path = $this->get_relative_path( $this->_storage->plugin_main_file->path );
|
613 |
+
} else if ( isset( $plugin_main_file->prev_path ) ) {
|
614 |
+
$this->_storage->plugin_main_file->prev_path = $this->get_relative_path( $this->_storage->plugin_main_file->prev_path );
|
615 |
+
}
|
616 |
+
}
|
617 |
+
|
618 |
+
// Remove invalid path that is still associated with the current slug if there's any.
|
619 |
+
$file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
|
620 |
+
foreach ( $file_slug_map as $plugin_basename => $slug ) {
|
621 |
+
if ( $slug === $this->_slug &&
|
622 |
+
$plugin_basename !== $this->_plugin_basename &&
|
623 |
+
! file_exists( $this->get_absolute_path( $plugin_basename ) )
|
624 |
+
) {
|
625 |
+
unset( $file_slug_map[ $plugin_basename ] );
|
626 |
+
self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
|
627 |
+
|
628 |
+
break;
|
629 |
+
}
|
630 |
+
}
|
631 |
+
}
|
632 |
+
|
633 |
/**
|
634 |
* @author Vova Feldman (@svovaf)
|
635 |
* @since 1.2.2.7
|
926 |
// Try to load the cached value of the file path.
|
927 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
928 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
929 |
+
if ( isset( $plugin_main_file->path ) ) {
|
930 |
+
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
931 |
+
if ( file_exists( $absolute_path ) ) {
|
932 |
+
return $absolute_path;
|
933 |
+
}
|
934 |
}
|
935 |
}
|
936 |
|
949 |
if ( isset( $this->_storage->plugin_main_file ) &&
|
950 |
isset( $this->_storage->plugin_main_file->prev_path )
|
951 |
) {
|
952 |
+
$absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
|
953 |
+
if ( file_exists( $absolute_path ) ) {
|
954 |
+
return $absolute_path;
|
955 |
}
|
956 |
}
|
957 |
|
958 |
wp_die(
|
959 |
+
$this->get_text_inline( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'failed-finding-main-path' ) .
|
960 |
" Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
|
961 |
+
$this->get_text_inline( 'Error', 'error' ),
|
962 |
array( 'back_link' => true )
|
963 |
);
|
964 |
}
|
974 |
'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
|
975 |
);
|
976 |
|
977 |
+
return $this->get_absolute_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
978 |
}
|
979 |
|
980 |
+
/**
|
981 |
+
* @author Leo Fajardo (@leorw)
|
982 |
+
* @since 1.2.3
|
983 |
+
*
|
984 |
+
* @param string $path
|
985 |
+
*
|
986 |
+
* @return string
|
987 |
+
*/
|
988 |
+
private function get_relative_path( $path ) {
|
989 |
+
$module_root_dir = $this->get_module_root_dir_path();
|
990 |
+
if ( 0 === strpos( $path, $module_root_dir ) ) {
|
991 |
+
$path = substr( $path, strlen( $module_root_dir ) );
|
992 |
+
}
|
993 |
+
|
994 |
+
return $path;
|
995 |
+
}
|
996 |
+
|
997 |
+
/**
|
998 |
+
* @author Leo Fajardo (@leorw)
|
999 |
+
* @since 1.2.3
|
1000 |
+
*
|
1001 |
+
* @param string $path
|
1002 |
+
* @param string|bool $module_type
|
1003 |
+
*
|
1004 |
+
* @return string
|
1005 |
+
*/
|
1006 |
+
private function get_absolute_path( $path, $module_type = false ) {
|
1007 |
+
$module_root_dir = $this->get_module_root_dir_path( $module_type );
|
1008 |
+
if ( 0 !== strpos( $path, $module_root_dir ) ) {
|
1009 |
+
$path = fs_normalize_path( $module_root_dir . $path );
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
return $path;
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
/**
|
1016 |
+
* @author Leo Fajardo (@leorw)
|
1017 |
+
* @since 1.2.3
|
1018 |
+
*
|
1019 |
+
* @param string|bool $module_type
|
1020 |
+
*
|
1021 |
+
* @return string
|
1022 |
+
*/
|
1023 |
+
private function get_module_root_dir_path( $module_type = false ) {
|
1024 |
+
$is_plugin = empty( $module_type ) ?
|
1025 |
+
$this->is_plugin() :
|
1026 |
+
( WP_FS__MODULE_TYPE_PLUGIN === $module_type );
|
1027 |
+
|
1028 |
+
return fs_normalize_path( trailingslashit( $is_plugin ?
|
1029 |
+
WP_PLUGIN_DIR :
|
1030 |
+
get_theme_root() ) );
|
1031 |
+
}
|
1032 |
+
|
1033 |
/**
|
1034 |
* @author Leo Fajardo (@leorw)
|
1035 |
*
|
1059 |
* @author Vova Feldman (@svovaf)
|
1060 |
* @since 1.2.3
|
1061 |
*/
|
1062 |
+
! file_exists( $this->get_absolute_path(
|
1063 |
+
$id_slug_type_path_map[ $module_id ]['path'],
|
1064 |
+
$id_slug_type_path_map[ $module_id ]['type']
|
1065 |
+
) )
|
1066 |
) {
|
1067 |
$caller_main_file_and_type = $this->get_caller_main_file_and_type();
|
1068 |
|
1153 |
*/
|
1154 |
|
1155 |
if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
|
1156 |
+
$module_type = WP_FS__MODULE_TYPE_THEME;
|
1157 |
+
|
1158 |
+
/**
|
1159 |
+
* Relative path of the theme, e.g.:
|
1160 |
+
* `my-theme/functions.php`
|
1161 |
+
*
|
1162 |
+
* @author Leo Fajardo (@leorw)
|
1163 |
+
*/
|
1164 |
+
$caller_file_candidate = basename( dirname( $caller_file_path ) ) .
|
1165 |
+
'/' .
|
1166 |
+
basename( $caller_file_path );
|
1167 |
+
|
1168 |
continue;
|
1169 |
}
|
1170 |
}
|
1182 |
|
1183 |
if ( isset( $caller_map[ $caller_file_hash ] ) ) {
|
1184 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
1185 |
+
$caller_file_candidate = plugin_basename( $caller_map[ $caller_file_hash ] );
|
1186 |
}
|
1187 |
}
|
1188 |
|
1274 |
|
1275 |
$reason_found_better_plugin = array(
|
1276 |
'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
|
1277 |
+
'text' => sprintf( $this->get_text_inline( 'I found a better %s', 'reason-found-a-better-plugin' ), $module_type ),
|
1278 |
'input_type' => 'textfield',
|
1279 |
+
'input_placeholder' => sprintf( $this->get_text_inline( "What's the %s's name?", 'placeholder-plugin-name' ), $module_type ),
|
1280 |
);
|
1281 |
|
1282 |
$reason_temporary_deactivation = array(
|
1283 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
1284 |
'text' => sprintf(
|
1285 |
+
$this->get_text_inline( "It's a temporary %s. I'm just debugging an issue.", 'reason-temporary-x' ),
|
1286 |
strtolower( $this->is_plugin() ?
|
1287 |
+
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
1288 |
+
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
1289 |
)
|
1290 |
),
|
1291 |
'input_type' => '',
|
1294 |
|
1295 |
$reason_other = array(
|
1296 |
'id' => self::REASON_OTHER,
|
1297 |
+
'text' => $this->get_text_inline( 'Other', 'reason-other' ),
|
1298 |
'input_type' => 'textfield',
|
1299 |
'input_placeholder' => ''
|
1300 |
);
|
1302 |
$long_term_user_reasons = array(
|
1303 |
array(
|
1304 |
'id' => self::REASON_NO_LONGER_NEEDED,
|
1305 |
+
'text' => sprintf( $this->get_text_inline( 'I no longer need the %s', 'reason-no-longer-needed' ), $module_type ),
|
1306 |
'input_type' => '',
|
1307 |
'input_placeholder' => ''
|
1308 |
),
|
1309 |
$reason_found_better_plugin,
|
1310 |
array(
|
1311 |
'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
|
1312 |
+
'text' => sprintf( $this->get_text_inline( 'I only needed the %s for a short period', 'reason-needed-for-a-short-period' ), $module_type ),
|
1313 |
'input_type' => '',
|
1314 |
'input_placeholder' => ''
|
1315 |
),
|
1316 |
array(
|
1317 |
'id' => self::REASON_BROKE_MY_SITE,
|
1318 |
+
'text' => sprintf( $this->get_text_inline( 'The %s broke my site', 'reason-broke-my-site' ), $module_type ),
|
1319 |
'input_type' => '',
|
1320 |
'input_placeholder' => '',
|
1321 |
'internal_message' => $contact_support_template
|
1322 |
),
|
1323 |
array(
|
1324 |
'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
|
1325 |
+
'text' => sprintf( $this->get_text_inline( 'The %s suddenly stopped working', 'reason-suddenly-stopped-working' ), $module_type ),
|
1326 |
'input_type' => '',
|
1327 |
'input_placeholder' => '',
|
1328 |
'internal_message' => $contact_support_template
|
1332 |
if ( $this->is_paying() ) {
|
1333 |
$long_term_user_reasons[] = array(
|
1334 |
'id' => self::REASON_CANT_PAY_ANYMORE,
|
1335 |
+
'text' => $this->get_text_inline( "I can't pay for it anymore", 'reason-cant-pay-anymore' ),
|
1336 |
'input_type' => 'textfield',
|
1337 |
+
'input_placeholder' => $this->get_text_inline( 'What price would you feel comfortable paying?', 'placeholder-comfortable-price' )
|
1338 |
);
|
1339 |
}
|
1340 |
|
1341 |
$reason_dont_share_info = array(
|
1342 |
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
1343 |
+
'text' => $this->get_text_inline( "I don't like to share my information with you", 'reason-dont-like-to-share-my-information' ),
|
1344 |
'input_type' => '',
|
1345 |
'input_placeholder' => ''
|
1346 |
);
|
1361 |
'non-registered-and-non-anonymous-short-term' => array(
|
1362 |
array(
|
1363 |
'id' => self::REASON_DIDNT_WORK,
|
1364 |
+
'text' => sprintf( $this->get_text_inline( "The %s didn't work", 'reason-didnt-work' ), $module_type ),
|
1365 |
'input_type' => '',
|
1366 |
'input_placeholder' => ''
|
1367 |
),
|
1371 |
'short-term' => array(
|
1372 |
array(
|
1373 |
'id' => self::REASON_COULDNT_MAKE_IT_WORK,
|
1374 |
+
'text' => $this->get_text_inline( "I couldn't understand how to make it work", 'reason-couldnt-make-it-work' ),
|
1375 |
'input_type' => '',
|
1376 |
'input_placeholder' => '',
|
1377 |
'internal_message' => $contact_support_template
|
1379 |
$reason_found_better_plugin,
|
1380 |
array(
|
1381 |
'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
|
1382 |
+
'text' => sprintf( $this->get_text_inline( "The %s is great, but I need specific feature that you don't support", 'reason-great-but-need-specific-feature' ), $module_type ),
|
1383 |
'input_type' => 'textarea',
|
1384 |
+
'input_placeholder' => $this->get_text_inline( 'What feature?', 'placeholder-feature' )
|
1385 |
),
|
1386 |
array(
|
1387 |
'id' => self::REASON_NOT_WORKING,
|
1388 |
+
'text' => sprintf( $this->get_text_inline( 'The %s is not working', 'reason-not-working' ), $module_type ),
|
1389 |
'input_type' => 'textarea',
|
1390 |
+
'input_placeholder' => $this->get_text_inline( "Kindly share what didn't work so we can fix it for future users...", 'placeholder-share-what-didnt-work' )
|
1391 |
),
|
1392 |
array(
|
1393 |
'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
|
1394 |
+
'text' => $this->get_text_inline( "It's not what I was looking for", 'reason-not-what-i-was-looking-for' ),
|
1395 |
'input_type' => 'textarea',
|
1396 |
+
'input_placeholder' => $this->get_text_inline( "What you've been looking for?", 'placeholder-what-youve-been-looking-for' )
|
1397 |
),
|
1398 |
array(
|
1399 |
'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
|
1400 |
+
'text' => sprintf( $this->get_text_inline( "The %s didn't work as expected", 'reason-didnt-work-as-expected' ), $module_type ),
|
1401 |
'input_type' => 'textarea',
|
1402 |
+
'input_placeholder' => $this->get_text_inline( 'What did you expect?', 'placeholder-what-did-you-expect' )
|
1403 |
)
|
1404 |
)
|
1405 |
);
|
1935 |
|
1936 |
self::$_static_logger->entrance();
|
1937 |
|
1938 |
+
$title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION );
|
1939 |
|
1940 |
if ( WP_FS__DEV_MODE ) {
|
1941 |
// Add top-level debug menu item.
|
2342 |
*
|
2343 |
* @return string
|
2344 |
*/
|
2345 |
+
function get_anonymous_id() {
|
2346 |
+
$unique_id = self::$_accounts->get_option( 'unique_id' );
|
2347 |
|
2348 |
+
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
2349 |
+
$key = get_site_url();
|
2350 |
|
2351 |
+
// If localhost, assign microtime instead of domain.
|
2352 |
+
if ( WP_FS__IS_LOCALHOST ||
|
2353 |
+
false !== strpos( $key, 'localhost' ) ||
|
2354 |
+
false === strpos( $key, '.' )
|
2355 |
+
) {
|
2356 |
+
$key = microtime();
|
2357 |
+
}
|
2358 |
|
2359 |
+
/**
|
2360 |
+
* Base the unique identifier on the WP secure authentication key. Which
|
2361 |
+
* turns the key into a secret anonymous identifier.
|
2362 |
+
*
|
2363 |
+
* @author Vova Feldman (@svovaf)
|
2364 |
+
* @since 1.2.3
|
2365 |
+
*/
|
2366 |
+
$unique_id = md5( $key . SECURE_AUTH_KEY );
|
2367 |
|
2368 |
+
self::$_accounts->set_option( 'unique_id', $unique_id, true );
|
2369 |
+
}
|
2370 |
|
2371 |
+
$this->_logger->departure( $unique_id );
|
2372 |
|
2373 |
+
return $unique_id;
|
2374 |
+
}
|
2375 |
|
2376 |
/**
|
2377 |
* @author Vova Feldman (@svovaf)
|
2451 |
// $admin_email = get_option( 'admin_email' );
|
2452 |
$admin_email = $current_user->user_email;
|
2453 |
|
2454 |
+
// Aliases.
|
2455 |
+
$deactivate_plugin_title = $this->esc_html_inline( 'That\'s exhausting, please deactivate', 'deactivate-plugin-title' );
|
2456 |
+
$deactivate_plugin_desc = $this->esc_html_inline( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', 'deactivate-plugin-desc' );
|
2457 |
+
$install_previous_title = $this->esc_html_inline( 'Let\'s try your previous version', 'install-previous-title' );
|
2458 |
+
$install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
|
2459 |
+
$fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
|
2460 |
+
$fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
|
2461 |
+
/* translators: %s: product title (e.g. "Awesome Plugin" requires an access to...) */
|
2462 |
+
$x_requires_access_to_api = $this->esc_html_inline( '%s requires an access to our API.', 'x-requires-access-to-api' );
|
2463 |
+
$sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
|
2464 |
+
$happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
|
2465 |
+
|
2466 |
$message = false;
|
2467 |
if ( is_object( $api_result ) &&
|
2468 |
isset( $api_result->error ) &&
|
2489 |
if ( ! empty( $missing_methods ) ) {
|
2490 |
$missing_methods = sprintf(
|
2491 |
'<br><br><b>%s</b> %s',
|
2492 |
+
$this->esc_html_inline( 'Disabled method(s):', 'curl-disabled-methods' ),
|
2493 |
$missing_methods
|
2494 |
);
|
2495 |
}
|
2496 |
}
|
2497 |
|
2498 |
$message = sprintf(
|
2499 |
+
$x_requires_access_to_api . ' ' .
|
2500 |
+
$this->esc_html_inline( 'We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server.', 'curl-missing-message' ) . ' ' .
|
2501 |
$missing_methods .
|
2502 |
' %s',
|
2503 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2505 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2506 |
sprintf(
|
2507 |
'<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
|
2508 |
+
$this->get_text_inline( 'I don\'t know what is cURL or how to install it, help me!', 'curl-missing-no-clue-title' ),
|
2509 |
' - ' . sprintf(
|
2510 |
+
$this->get_text_inline( '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.', 'curl-missing-no-clue-desc' ),
|
2511 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2512 |
)
|
2513 |
),
|
2514 |
sprintf(
|
2515 |
'<b>%s</b> - %s',
|
2516 |
+
$sysadmin_title,
|
2517 |
+
esc_html( sprintf( $this->get_text_inline( '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.', 'curl-missing-sysadmin-desc' ), $this->get_module_label( true ) ) )
|
2518 |
),
|
2519 |
sprintf(
|
2520 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
2521 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
2522 |
+
$deactivate_plugin_title,
|
2523 |
+
$deactivate_plugin_desc
|
2524 |
)
|
2525 |
)
|
2526 |
);
|
2527 |
break;
|
2528 |
case 'cloudflare_ddos_protection':
|
2529 |
$message = sprintf(
|
2530 |
+
$x_requires_access_to_api . ' ' .
|
2531 |
+
$this->esc_html_inline( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', 'cloudflare-blocks-connection-message' ) . ' ' .
|
2532 |
+
$happy_to_resolve_issue_asap .
|
2533 |
' %s',
|
2534 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2535 |
sprintf(
|
2536 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2537 |
sprintf(
|
2538 |
'<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
|
2539 |
+
$fix_issue_title,
|
2540 |
' - ' . sprintf(
|
2541 |
+
$fix_issue_desc,
|
2542 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2543 |
)
|
2544 |
),
|
2545 |
sprintf(
|
2546 |
+
'<a href="%s" target="_blank"><b>%s</b></a> - %s',
|
2547 |
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
2548 |
+
$install_previous_title,
|
2549 |
+
$install_previous_desc
|
2550 |
),
|
2551 |
sprintf(
|
2552 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
2553 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=' . '', 'deactivate-plugin_' . $this->_plugin_basename ),
|
2554 |
+
$deactivate_plugin_title,
|
2555 |
+
$deactivate_plugin_desc
|
2556 |
)
|
2557 |
)
|
2558 |
);
|
2559 |
break;
|
2560 |
case 'squid_cache_block':
|
2561 |
$message = sprintf(
|
2562 |
+
$x_requires_access_to_api . ' ' .
|
2563 |
+
$this->esc_html_inline( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', 'squid-blocks-connection-message' ) .
|
2564 |
' %s',
|
2565 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2566 |
sprintf(
|
2567 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2568 |
sprintf(
|
2569 |
+
'<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a> - %s',
|
2570 |
+
$this->esc_html_inline( 'I don\'t know what is Squid or ACL, help me!', 'squid-no-clue-title' ),
|
2571 |
+
sprintf(
|
2572 |
+
$this->esc_html_inline( '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.', 'squid-no-clue-desc' ),
|
2573 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2574 |
)
|
2575 |
),
|
2576 |
sprintf(
|
2577 |
'<b>%s</b> - %s',
|
2578 |
+
$sysadmin_title,
|
2579 |
sprintf(
|
2580 |
+
$this->esc_html_inline( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again.', 'squid-sysadmin-desc' ),
|
2581 |
// We use a filter since the plugin might require additional API connectivity.
|
2582 |
'<b>' . implode( ', ', $this->apply_filters( 'api_domains', array( 'api.freemius.com', 'wp.freemius.com' ) ) ) . '</b>',
|
2583 |
$this->_module_type
|
2584 |
)
|
2585 |
),
|
2586 |
sprintf(
|
2587 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
2588 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
2589 |
+
$deactivate_plugin_title,
|
2590 |
+
$deactivate_plugin_desc
|
2591 |
)
|
2592 |
)
|
2593 |
);
|
2594 |
break;
|
2595 |
// default:
|
2596 |
+
// $message = $this->get_text_inline( 'connectivity-test-fails-message' );
|
2597 |
// break;
|
2598 |
}
|
2599 |
}
|
2601 |
$message_id = 'failed_connect_api';
|
2602 |
$type = 'error';
|
2603 |
|
2604 |
+
$connectivity_test_fails_message = $this->esc_html_inline( 'From unknown reason, the API connectivity test failed.', 'connectivity-test-fails-message' );
|
2605 |
+
|
2606 |
if ( false === $message ) {
|
2607 |
if ( $is_first_failure ) {
|
2608 |
// First attempt failed.
|
2609 |
$message = sprintf(
|
2610 |
+
$x_requires_access_to_api . ' ' .
|
2611 |
+
$connectivity_test_fails_message . ' ' .
|
2612 |
+
$this->esc_html_inline( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', 'connectivity-test-maybe-temporary' ) . '<br><br>' .
|
2613 |
'%s',
|
2614 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2615 |
sprintf(
|
2616 |
'<div id="fs_firewall_issue_options">%s %s</div>',
|
2617 |
sprintf(
|
2618 |
'<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
|
2619 |
+
$this->get_text_inline( 'Yes - do your thing', 'yes-do-your-thing' )
|
2620 |
),
|
2621 |
sprintf(
|
2622 |
'<a href="%s" class="button">%s</a>',
|
2623 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
2624 |
+
$this->get_text_inline( 'No - just deactivate', 'no-deactivate' )
|
2625 |
)
|
2626 |
)
|
2627 |
);
|
2631 |
} else {
|
2632 |
// Second connectivity attempt failed.
|
2633 |
$message = sprintf(
|
2634 |
+
$x_requires_access_to_api . ' ' .
|
2635 |
+
$connectivity_test_fails_message . ' ' .
|
2636 |
+
$happy_to_resolve_issue_asap .
|
2637 |
' %s',
|
2638 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2639 |
sprintf(
|
2640 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2641 |
sprintf(
|
2642 |
'<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
|
2643 |
+
$fix_issue_title,
|
2644 |
' - ' . sprintf(
|
2645 |
+
$fix_issue_desc,
|
2646 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2647 |
)
|
2648 |
),
|
2649 |
sprintf(
|
2650 |
+
'<a href="%s" target="_blank"><b>%s</b></a> - %s',
|
2651 |
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
2652 |
+
$install_previous_title,
|
2653 |
+
$install_previous_desc
|
2654 |
),
|
2655 |
sprintf(
|
2656 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
2657 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
2658 |
+
$deactivate_plugin_title,
|
2659 |
+
$deactivate_plugin_desc
|
2660 |
)
|
2661 |
)
|
2662 |
);
|
2666 |
$this->_admin_notices->add_sticky(
|
2667 |
$message,
|
2668 |
$message_id,
|
2669 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
2670 |
$type
|
2671 |
);
|
2672 |
}
|
2733 |
|
2734 |
$this->_admin_notices->add_sticky(
|
2735 |
sprintf(
|
2736 |
+
$this->get_text_inline( '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.', 'fix-request-sent-message' ),
|
2737 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2738 |
),
|
2739 |
'server_details_sent'
|
3009 |
|
3010 |
$this->parse_settings( $plugin_info );
|
3011 |
|
|
|
|
|
|
|
|
|
3012 |
if ( ! self::is_ajax() ) {
|
3013 |
if ( ! $this->is_addon() || $this->is_only_premium() ) {
|
3014 |
add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
|
3124 |
|
3125 |
$this->_admin_notices->add(
|
3126 |
( ! empty( $parent_name ) ?
|
3127 |
+
sprintf( $this->get_text_x_inline( '%s cannot run without %s.', 'addonX cannot run without pluginY', 'addon-x-cannot-run-without-y' ), $this->get_plugin_name(), $parent_name ) :
|
3128 |
+
sprintf( $this->get_text_x_inline( '%s cannot run without the plugin.', 'addonX cannot run...', 'addon-x-cannot-run-without-parent' ), $this->get_plugin_name() )
|
3129 |
),
|
3130 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
3131 |
'error'
|
3132 |
);
|
3133 |
|
3246 |
$this->_logger->api_error( $result );
|
3247 |
|
3248 |
self::shoot_ajax_failure(
|
3249 |
+
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
3250 |
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
3251 |
$result->error->message :
|
3252 |
var_export( $result, true ) )
|
3271 |
$this->_logger->api_error( $result );
|
3272 |
|
3273 |
self::shoot_ajax_failure(
|
3274 |
+
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
3275 |
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
3276 |
$result->error->message :
|
3277 |
var_export( $result, true ) )
|
3679 |
|
3680 |
if ( ! $this->is_only_premium() ) {
|
3681 |
$this->_admin_notices->add_sticky(
|
3682 |
+
sprintf( $this->get_text_inline( 'Premium %s version was successfully activated.', 'premium-activated-message' ), $this->_module_type ),
|
3683 |
'premium_activated',
|
3684 |
+
$this->get_text_x_inline( 'W00t',
|
3685 |
+
'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
|
3686 |
);
|
3687 |
}
|
3688 |
} else {
|
3695 |
if ( $this->is_paying() && ! $this->is_premium() ) {
|
3696 |
$this->_admin_notices->add_sticky(
|
3697 |
sprintf(
|
3698 |
+
/* translators: %s: License type (e.g. you have a professional license) */
|
3699 |
+
$this->get_text_inline( 'You have a %s license.', 'you-have-x-license' ),
|
3700 |
$this->_site->plan->title
|
3701 |
) . $this->get_complete_upgrade_instructions(),
|
3702 |
'plan_upgraded',
|
3703 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
3704 |
);
|
3705 |
}
|
3706 |
}
|
3963 |
|
3964 |
$this->_parent->_admin_notices->add_sticky(
|
3965 |
sprintf(
|
3966 |
+
($is_after_trial_cancel ?
|
3967 |
+
$this->_parent->get_text_inline(
|
3968 |
+
'%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.',
|
3969 |
+
'addon-trial-cancelled-message'
|
3970 |
+
) :
|
3971 |
+
$this->_parent->get_text_inline(
|
3972 |
+
'%s is a premium only add-on. You have to purchase a license first before activating the plugin.',
|
3973 |
+
'addon-no-license-message'
|
3974 |
+
)
|
3975 |
),
|
3976 |
'<b>' . $this->_plugin->title . '</b>'
|
3977 |
) . ' ' . sprintf(
|
3978 |
'<a href="%s" aria-label="%s" class="button button-primary" style="margin-left: 10px; vertical-align: middle;">%s ➜</a>',
|
3979 |
$this->_parent->addon_url( $this->_slug ),
|
3980 |
+
esc_attr( sprintf( $this->_parent->get_text_inline( 'More information about %s', 'more-information-about-x' ), $this->_plugin->title ) ),
|
3981 |
+
$this->_parent->get_text_inline( 'Purchase License', 'purchase-license' )
|
3982 |
),
|
3983 |
'no_addon_license_' . $this->_slug,
|
3984 |
+
( $is_after_trial_cancel ? '' : $this->_parent->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...' ),
|
3985 |
( $is_after_trial_cancel ? 'success' : 'error' )
|
3986 |
);
|
3987 |
|
4415 |
|
4416 |
$this->_admin_notices->add_sticky(
|
4417 |
sprintf(
|
4418 |
+
$this->get_text_inline( '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.', 'pending-activation-message' ),
|
4419 |
'<b>' . $this->get_plugin_name() . '</b>',
|
4420 |
'<b>' . $email . '</b>',
|
4421 |
+
( $is_pending_trial ?
|
4422 |
+
$this->get_text_inline( 'start the trial', 'start-the-trial' ) :
|
4423 |
+
$this->get_text_inline( 'complete the install', 'complete-the-install' ) )
|
4424 |
),
|
4425 |
'activation_pending',
|
4426 |
'Thanks!'
|
4499 |
// Show notice for new plugin installations.
|
4500 |
$this->_admin_notices->add(
|
4501 |
sprintf(
|
4502 |
+
$this->get_text_inline( 'You are just one step away - %s', 'you-are-step-away' ),
|
4503 |
sprintf( '<b><a href="%s">%s</a></b>',
|
4504 |
$this->get_activation_url(),
|
4505 |
+
sprintf( $this->get_text_x_inline( 'Complete "%s" Activation Now',
|
4506 |
+
'%s - plugin name. As complete "PluginX" activation now', 'activate-x-now' ), $this->get_plugin_name() )
|
4507 |
)
|
4508 |
),
|
4509 |
'',
|
4516 |
// Show notice for new plugin installations.
|
4517 |
$this->_admin_notices->add_sticky(
|
4518 |
sprintf(
|
4519 |
+
$this->get_text_inline( 'We made a few tweaks to the %s, %s', 'few-plugin-tweaks' ),
|
4520 |
$this->_module_type,
|
4521 |
sprintf( '<b><a href="%s">%s</a></b>',
|
4522 |
$this->get_activation_url(),
|
4523 |
+
sprintf( $this->get_text_inline( 'Opt in to make "%s" Better!', 'optin-x-now' ), $this->get_plugin_name() )
|
4524 |
)
|
4525 |
),
|
4526 |
'connect_account',
|
4905 |
// If activating the premium module version, add an admin notice to congratulate for an upgrade completion.
|
4906 |
if ( $is_premium_version_activation ) {
|
4907 |
$this->_admin_notices->add(
|
4908 |
+
sprintf( $this->get_text_inline( 'The upgrade of %s was successfully completed.', 'successful-version-upgrade-message' ), sprintf( '<b>%s</b>', $this->_plugin->title ) ),
|
4909 |
+
$this->get_text_x_inline( 'W00t',
|
4910 |
+
'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
|
4911 |
);
|
4912 |
}
|
4913 |
} else if ( $this->is_anonymous() ) {
|
5990 |
*/
|
5991 |
function get_module_label( $lowercase = false ) {
|
5992 |
$label = $this->is_addon() ?
|
5993 |
+
$this->get_text_inline( 'Add-On', 'addon' ) :
|
5994 |
( $this->is_plugin() ?
|
5995 |
+
$this->get_text_inline( 'Plugin', 'plugin' ) :
|
5996 |
+
$this->get_text_inline( 'Theme', 'theme' ) );
|
5997 |
|
5998 |
if ( $lowercase ) {
|
5999 |
$label = strtolower( $label );
|
7250 |
$error = $result->error;
|
7251 |
|
7252 |
if ( in_array( $error->code, array( 'invalid_email', 'no_user' ) ) ) {
|
7253 |
+
$error = $this->get_text_inline( "We couldn't find your email address in the system, are you sure it's the right address?", 'email-not-found' );
|
7254 |
} else if ( 'no_license' === $error->code ) {
|
7255 |
+
$error = $this->get_text_inline( "We can't see any active licenses associated with that email address, are you sure it's the right address?", 'no-active-licenses' );
|
7256 |
} else {
|
7257 |
$error = $error->message;
|
7258 |
}
|
7263 |
);
|
7264 |
|
7265 |
if ( false !== $error ) {
|
7266 |
+
$licenses['error'] = sprintf( '%s... %s', $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ), strtolower( $error ) );
|
7267 |
}
|
7268 |
|
7269 |
echo json_encode( $licenses );
|
7296 |
if ( self::is_ajax() &&
|
7297 |
'admin-ajax.php' === $pagenow
|
7298 |
) {
|
7299 |
+
$referer = fs_get_raw_referer();
|
7300 |
|
7301 |
if ( is_string( $referer ) ) {
|
7302 |
$parts = explode( '?', $referer );
|
7353 |
|
7354 |
/**
|
7355 |
* @author Leo Fajardo (@leorw)
|
7356 |
+
* @since 1.2.4
|
7357 |
*/
|
7358 |
+
private function fetch_affiliate_terms() {
|
|
|
|
|
7359 |
if ( ! is_object( $this->plugin_affiliate_terms ) ) {
|
7360 |
$plugins_api = $this->get_api_plugin_scope();
|
7361 |
+
$affiliate_terms = $plugins_api->get( '/aff.json?type=affiliation', false, WP_FS__TIME_WEEK_IN_SEC );
|
7362 |
|
7363 |
if ( ! $this->is_api_result_entity( $affiliate_terms ) ) {
|
7364 |
return;
|
7366 |
|
7367 |
$this->plugin_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7368 |
}
|
7369 |
+
}
|
7370 |
+
|
7371 |
+
/**
|
7372 |
+
* @author Leo Fajardo (@leorw)
|
7373 |
+
* @since 1.2.4
|
7374 |
+
*/
|
7375 |
+
private function fetch_affiliate_and_custom_terms() {
|
7376 |
+
if ( ! empty( $this->_storage->affiliate_application_data ) ) {
|
7377 |
+
$application_data = $this->_storage->affiliate_application_data;
|
7378 |
+
$flush = ( ! isset( $application_data['status'] ) || 'pending' === $application_data['status'] );
|
7379 |
|
|
|
7380 |
$users_api = $this->get_api_user_scope();
|
7381 |
+
$result = $users_api->get( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json", $flush, WP_FS__TIME_WEEK_IN_SEC );
|
7382 |
if ( $this->is_api_result_object( $result, 'affiliates' ) ) {
|
7383 |
if ( ! empty( $result->affiliates ) ) {
|
7384 |
$affiliate = new FS_Affiliate( $result->affiliates[0] );
|
7385 |
|
7386 |
+
if ( ! isset( $application_data['status'] ) || $application_data['status'] !== $affiliate->status ) {
|
7387 |
+
$application_data['status'] = $affiliate->status;
|
7388 |
+
$this->_storage->affiliate_application_data = $application_data;
|
7389 |
}
|
7390 |
|
7391 |
if ( $affiliate->is_using_custom_terms ) {
|
7392 |
+
$affiliate_terms = $users_api->get( "/plugins/{$this->_plugin->id}/affiliates/{$affiliate->id}/aff/{$affiliate->custom_affiliate_terms_id}.json", $flush, WP_FS__TIME_WEEK_IN_SEC );
|
7393 |
if ( $this->is_api_result_entity( $affiliate_terms ) ) {
|
7394 |
$this->custom_affiliate_terms = new FS_AffiliateTerms( $affiliate_terms );
|
7395 |
}
|
7401 |
}
|
7402 |
}
|
7403 |
|
7404 |
+
/**
|
7405 |
+
* @author Leo Fajardo (@leorw)
|
7406 |
+
* @since 1.2.3
|
7407 |
+
*/
|
7408 |
+
private function fetch_affiliate_and_terms() {
|
7409 |
+
$this->_logger->entrance();
|
7410 |
+
|
7411 |
+
$this->fetch_affiliate_terms();
|
7412 |
+
$this->fetch_affiliate_and_custom_terms();
|
7413 |
+
}
|
7414 |
+
|
7415 |
/**
|
7416 |
* @author Leo Fajardo
|
7417 |
* @since 1.2.3
|
7480 |
var_export( $next_page, true )
|
7481 |
);
|
7482 |
} else if ( $this->is_pending_activation() ) {
|
7483 |
+
self::shoot_ajax_failure( $this->get_text_inline( 'Account is pending activation.', 'account-is-pending-activation' ) );
|
7484 |
}
|
7485 |
}
|
7486 |
|
7487 |
+
$this->fetch_affiliate_terms();
|
7488 |
+
|
7489 |
$api = $this->get_api_user_scope();
|
7490 |
$result = $api->call(
|
7491 |
( "/plugins/{$this->_plugin->id}/aff/{$this->plugin_affiliate_terms->id}/affiliates.json" ),
|
7507 |
}
|
7508 |
|
7509 |
$affiliate_application_data = array(
|
7510 |
+
'status' => 'pending',
|
7511 |
'stats_description' => $affiliate['stats_description'],
|
7512 |
'promotion_method_description' => $affiliate['promotion_method_description'],
|
7513 |
);
|
8725 |
return true;
|
8726 |
}
|
8727 |
|
8728 |
+
/**
|
8729 |
+
* When json_decode() executed on PHP 5.2 with an invalid JSON, it will throw a PHP warning. Unfortunately, the new Theme Check doesn't allow PHP silencing and the theme review team isn't open to change that, therefore, instead of using `@json_decode()` we had to use the method without the `@` directive.
|
8730 |
+
*
|
8731 |
+
* @author Vova Feldman (@svovaf)
|
8732 |
+
* @since 1.2.3
|
8733 |
+
* @link https://themes.trac.wordpress.org/ticket/46134#comment:5
|
8734 |
+
* @link https://themes.trac.wordpress.org/ticket/46134#comment:9
|
8735 |
+
* @link https://themes.trac.wordpress.org/ticket/46134#comment:12
|
8736 |
+
* @link https://themes.trac.wordpress.org/ticket/46134#comment:14
|
8737 |
+
*/
|
8738 |
+
$decoded = is_string( $response['body'] ) ?
|
8739 |
+
json_decode( $response['body'] ) :
|
8740 |
+
null;
|
8741 |
|
8742 |
if ( empty( $decoded ) ) {
|
8743 |
return false;
|
8832 |
|
8833 |
if ( ! $this->is_paying_or_trial() ) {
|
8834 |
$this->_admin_notices->add_sticky(
|
8835 |
+
sprintf( $this->get_text_x_inline( '%s activation was successfully completed.',
|
8836 |
+
'pluginX activation was successfully...', 'plugin-x-activation-message' ), '<b>' . $this->get_plugin_name() . '</b>' ),
|
8837 |
'activation_complete'
|
8838 |
);
|
8839 |
}
|
8844 |
if ( $this->is_paying() ) {
|
8845 |
$this->_admin_notices->add_sticky(
|
8846 |
sprintf(
|
8847 |
+
$this->get_text_inline( 'Your account was successfully activated with the %s plan.', 'activation-with-plan-x-message' ),
|
8848 |
$this->_site->plan->title
|
8849 |
) . $this->get_complete_upgrade_instructions(),
|
8850 |
'plan_upgraded',
|
8851 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
8852 |
);
|
8853 |
} else {
|
8854 |
$this->_admin_notices->add_sticky(
|
8855 |
sprintf(
|
8856 |
+
$this->get_text_inline( 'Your trial has been successfully started.', 'trial-started-message' ),
|
8857 |
'<i>' . $this->get_plugin_name() . '</i>'
|
8858 |
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
8859 |
'trial_started',
|
8860 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
8861 |
);
|
8862 |
}
|
8863 |
}
|
9142 |
$install = $this->apply_filters( 'after_install_failure', $install, $args );
|
9143 |
|
9144 |
$this->_admin_notices->add(
|
9145 |
+
sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
|
9146 |
+
$this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $install->error->message . '</b>',
|
9147 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
9148 |
'error'
|
9149 |
);
|
9150 |
|
9198 |
|
9199 |
if ( isset( $addon_install->error ) ) {
|
9200 |
$this->_admin_notices->add(
|
9201 |
+
sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
|
9202 |
+
$this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $addon_install->error->message . '</b>',
|
9203 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
9204 |
'error'
|
9205 |
);
|
9206 |
|
9259 |
|
9260 |
if ( isset( $parent_install->error ) ) {
|
9261 |
$this->_admin_notices->add(
|
9262 |
+
sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
|
9263 |
+
$this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $parent_install->error->message . '</b>',
|
9264 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
9265 |
'error'
|
9266 |
);
|
9267 |
|
9518 |
* @return string
|
9519 |
*/
|
9520 |
function get_pricing_cta_label() {
|
9521 |
+
$label = $this->get_text_inline( 'Upgrade', 'upgrade' );
|
9522 |
|
9523 |
if ( $this->is_in_trial_promotion() &&
|
9524 |
! $this->is_paying_or_trial()
|
9525 |
) {
|
9526 |
// If running a trial promotion, modify the pricing to load the trial.
|
9527 |
+
$label = $this->get_text_inline( 'Start Trial', 'start-trial' );
|
9528 |
} else if ( $this->is_paying() ) {
|
9529 |
+
$label = $this->get_text_inline( 'Pricing', 'pricing' );
|
9530 |
}
|
9531 |
|
9532 |
return $label;
|
9566 |
if ( $this->has_affiliate_program() ) {
|
9567 |
// Add affiliation page.
|
9568 |
$this->add_submenu_item(
|
9569 |
+
$this->get_text_inline( 'Affiliation', 'affiliation' ),
|
9570 |
array( &$this, '_affiliation_page_render' ),
|
9571 |
+
$this->get_plugin_name() . ' – ' . $this->get_text_inline( 'Affiliation', 'affiliation' ),
|
9572 |
'manage_options',
|
9573 |
'affiliation',
|
9574 |
'Freemius::_clean_admin_content_section',
|
9588 |
|
9589 |
// Add user account page.
|
9590 |
$this->add_submenu_item(
|
9591 |
+
$this->get_text_inline( 'Account', 'account' ),
|
9592 |
array( &$this, '_account_page_render' ),
|
9593 |
+
$this->get_plugin_name() . ' – ' . $this->get_text_inline( 'Account', 'account' ),
|
9594 |
'manage_options',
|
9595 |
'account',
|
9596 |
array( &$this, '_account_page_load' ),
|
9601 |
|
9602 |
// Add contact page.
|
9603 |
$this->add_submenu_item(
|
9604 |
+
$this->get_text_inline( 'Contact Us', 'contact-us' ),
|
9605 |
array( &$this, '_contact_page_render' ),
|
9606 |
+
$this->get_plugin_name() . ' – ' . $this->get_text_inline( 'Contact Us', 'contact-us' ),
|
9607 |
'manage_options',
|
9608 |
'contact',
|
9609 |
'Freemius::_clean_admin_content_section',
|
9613 |
|
9614 |
if ( $this->has_addons() ) {
|
9615 |
$this->add_submenu_item(
|
9616 |
+
$this->get_text_inline( 'Add-Ons', 'add-ons' ),
|
9617 |
array( &$this, '_addons_page_render' ),
|
9618 |
+
$this->get_plugin_name() . ' – ' . $this->get_text_inline( 'Add-Ons', 'add-ons' ),
|
9619 |
'manage_options',
|
9620 |
'addons',
|
9621 |
array( &$this, '_addons_page_load' ),
|
9629 |
$this->is_pricing_page_visible()
|
9630 |
);
|
9631 |
|
9632 |
+
$pricing_cta_text = $this->get_pricing_cta_label();
|
9633 |
$pricing_class = 'upgrade-mode';
|
9634 |
if ( $show_pricing ) {
|
9635 |
if ( $this->is_in_trial_promotion() &&
|
9644 |
|
9645 |
// Add upgrade/pricing page.
|
9646 |
$this->add_submenu_item(
|
9647 |
+
$pricing_cta_text . ' ' . ( is_rtl() ? '←' : '➤' ),
|
9648 |
array( &$this, '_pricing_page_render' ),
|
9649 |
+
$this->get_plugin_name() . ' – ' . $this->get_text_x_inline( 'Pricing', 'noun', 'pricing' ),
|
9650 |
'manage_options',
|
9651 |
'pricing',
|
9652 |
'Freemius::_clean_admin_content_section',
|
9826 |
|
9827 |
if ( ! $this->is_activation_mode() ) {
|
9828 |
$this->add_submenu_link_item(
|
9829 |
+
$this->apply_filters( 'support_forum_submenu', $this->get_text_inline( 'Support Forum', 'support-forum' ) ),
|
9830 |
$this->get_support_forum_url(),
|
9831 |
'wp-support-forum',
|
9832 |
null,
|
10566 |
$this->do_action( 'account_email_verified', $user->email );
|
10567 |
|
10568 |
$this->_admin_notices->add(
|
10569 |
+
$this->get_text_inline( 'Your email has been successfully verified - you are AWESOME!', 'email-verified-message' ),
|
10570 |
+
$this->get_text_x_inline( 'Right on', 'a positive response', 'right-on' ) . '!',
|
10571 |
'success',
|
10572 |
// Make admin sticky if account menu item is invisible,
|
10573 |
// since the page will be auto redirected to the plugin's
|
10699 |
* @return FS_Plugin_Plan[]|object
|
10700 |
*/
|
10701 |
private function _fetch_plugin_plans() {
|
10702 |
+
$this->_logger->entrance();
|
10703 |
+
$api = $this->get_api_site_scope();
|
10704 |
|
10705 |
+
/**
|
10706 |
+
* @since 1.2.3 When running in DEV mode, retrieve pending plans as well.
|
10707 |
+
*/
|
10708 |
+
$result = $api->get( '/plans.json?show_pending=' . ( $this->has_secret_key() ? 'true' : 'false' ), true );
|
10709 |
|
10710 |
+
if ( $this->is_api_result_object( $result, 'plans' ) && is_array( $result->plans ) ) {
|
10711 |
+
for ( $i = 0, $len = count( $result->plans ); $i < $len; $i ++ ) {
|
10712 |
+
$result->plans[ $i ] = new FS_Plugin_Plan( $result->plans[ $i ] );
|
10713 |
+
}
|
10714 |
|
10715 |
+
$result = $result->plans;
|
10716 |
+
}
|
10717 |
|
10718 |
+
return $result;
|
10719 |
+
}
|
10720 |
|
10721 |
/**
|
10722 |
* @author Vova Feldman (@svovaf)
|
11101 |
}
|
11102 |
|
11103 |
$this->_admin_notices->add_sticky(
|
11104 |
+
sprintf(
|
11105 |
+
( FS_Plan_Manager::instance()->has_free_plan( $plans ) ?
|
11106 |
+
$this->get_text_inline( 'Your %s Add-on plan was successfully upgraded.', 'addon-successfully-upgraded-message' ) :
|
11107 |
+
/* translators: %s:product name, e.g. Facebook add-on was successfully... */
|
11108 |
+
$this->get_text_inline( '%s Add-on was successfully purchased.', 'addon-successfully-purchased-message' ) ),
|
11109 |
+
$addon->title
|
11110 |
+
) . ' ' . $this->get_latest_download_link(
|
11111 |
+
$this->get_text_inline( 'Download the latest version', 'download-latest-version' ),
|
11112 |
+
$addon_id
|
11113 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
11114 |
'addon_plan_upgraded_' . $addon->slug,
|
11115 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
11116 |
);
|
11117 |
}
|
11118 |
}
|
11157 |
if ( ! self::$_global_admin_notices->has_sticky( 'api_blocked' ) ) {
|
11158 |
self::$_global_admin_notices->add(
|
11159 |
sprintf(
|
11160 |
+
$this->get_text_x_inline( 'Your server is blocking the access to Freemius\' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s', '%1s - plugin title, %2s - API domain', 'server-blocking-access' ),
|
11161 |
$this->get_plugin_name(),
|
11162 |
'<a href="' . $api->get_url() . '" target="_blank">' . $api->get_url() . '</a>'
|
11163 |
+
) . '<br> ' . $this->get_text_inline( 'Error received from the server:', 'server-error-message' ) . var_export( $site->error, true ),
|
11164 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
11165 |
'error',
|
11166 |
$background,
|
11167 |
false,
|
11171 |
} else {
|
11172 |
// Authentication params are broken.
|
11173 |
$this->_admin_notices->add(
|
11174 |
+
$this->get_text_inline( 'It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again.', 'wrong-authentication-param-message' ),
|
11175 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
11176 |
'error'
|
11177 |
);
|
11178 |
}
|
11288 |
}
|
11289 |
}
|
11290 |
|
11291 |
+
$hmm_text = $this->get_text_x_inline( 'Hmm', 'something somebody says when they are thinking about what you have just said.', 'hmm' ) . '...';
|
11292 |
+
|
11293 |
if ( $this->has_paid_plan() ) {
|
11294 |
switch ( $plan_change ) {
|
11295 |
case 'none':
|
11301 |
if ( $plan->is_free() ) {
|
11302 |
$this->_admin_notices->add(
|
11303 |
sprintf(
|
11304 |
+
$this->get_text_inline( '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.', 'plan-did-not-change-message' ),
|
11305 |
+
'<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . $this->get_text_x_inline( 'Trial', 'trial period', 'trial' ) : '' ) . '</b></i>'
|
11306 |
) . ' ' . sprintf(
|
11307 |
'<a href="%s">%s</a>',
|
11308 |
$this->contact_url(
|
11309 |
'bug',
|
11310 |
+
sprintf( $this->get_text_inline( 'I have upgraded my account but when I try to Sync the License, the plan remains %s.', 'plan-did-not-change-email-message' ),
|
11311 |
strtoupper( $plan->name )
|
11312 |
)
|
11313 |
),
|
11314 |
+
$this->get_text_inline( 'Please contact us here', 'contact-us-here' )
|
11315 |
),
|
11316 |
+
$hmm_text
|
11317 |
);
|
11318 |
}
|
11319 |
}
|
11321 |
case 'upgraded':
|
11322 |
$this->_admin_notices->add_sticky(
|
11323 |
sprintf(
|
11324 |
+
$this->get_text_inline( 'Your plan was successfully upgraded.', 'plan-upgraded-message' ),
|
11325 |
'<i>' . $this->get_plugin_name() . '</i>'
|
11326 |
) . $this->get_complete_upgrade_instructions(),
|
11327 |
'plan_upgraded',
|
11328 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
11329 |
);
|
11330 |
|
11331 |
$this->_admin_notices->remove_sticky( array(
|
11338 |
case 'changed':
|
11339 |
$this->_admin_notices->add_sticky(
|
11340 |
sprintf(
|
11341 |
+
$this->get_text_inline( 'Your plan was successfully changed to %s.', 'plan-changed-to-x-message' ),
|
11342 |
$this->_site->plan->title
|
11343 |
),
|
11344 |
'plan_changed'
|
11353 |
break;
|
11354 |
case 'downgraded':
|
11355 |
$this->_admin_notices->add_sticky(
|
11356 |
+
sprintf( $this->get_text_inline( 'Your license has expired. You can still continue using the free %s forever.', 'license-expired-blocking-message' ), $this->_module_type ),
|
11357 |
'license_expired',
|
11358 |
+
$hmm_text
|
11359 |
);
|
11360 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11361 |
break;
|
11362 |
case 'cancelled':
|
11363 |
$this->_admin_notices->add(
|
11364 |
+
$this->get_text_inline( 'Your license has been cancelled. If you think it\'s a mistake, please contact support.', 'license-cancelled' ) . ' ' .
|
11365 |
sprintf(
|
11366 |
'<a href="%s">%s</a>',
|
11367 |
$this->contact_url( 'bug' ),
|
11368 |
+
$this->get_text_inline( 'Please contact us here', 'contact-us-here' )
|
11369 |
),
|
11370 |
+
$hmm_text,
|
11371 |
'error'
|
11372 |
);
|
11373 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11374 |
break;
|
11375 |
case 'expired':
|
11376 |
$this->_admin_notices->add_sticky(
|
11377 |
+
sprintf( $this->get_text_inline( '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.', 'license-expired-non-blocking-message' ), $this->_site->plan->title ),
|
11378 |
'license_expired',
|
11379 |
+
$hmm_text
|
11380 |
);
|
11381 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11382 |
break;
|
11383 |
case 'trial_started':
|
11384 |
$this->_admin_notices->add_sticky(
|
11385 |
sprintf(
|
11386 |
+
$this->get_text_inline( 'Your trial has been successfully started.', 'trial-started-message' ),
|
11387 |
'<i>' . $this->get_plugin_name() . '</i>'
|
11388 |
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
11389 |
'trial_started',
|
11390 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
11391 |
);
|
11392 |
|
11393 |
$this->_admin_notices->remove_sticky( array(
|
11396 |
break;
|
11397 |
case 'trial_expired':
|
11398 |
$this->_admin_notices->add_sticky(
|
11399 |
+
$this->get_text_inline( 'Your trial has expired. You can still continue using all our free features.', 'trial-expired-message' ),
|
11400 |
'trial_expired',
|
11401 |
+
$hmm_text
|
11402 |
);
|
11403 |
$this->_admin_notices->remove_sticky( array(
|
11404 |
'trial_started',
|
11466 |
if ( ! $background ) {
|
11467 |
$this->_admin_notices->add( sprintf(
|
11468 |
'%s %s',
|
11469 |
+
$this->get_text_inline( 'It looks like the license could not be activated.', 'license-activation-failed-message' ),
|
11470 |
( is_object( $license ) && isset( $license->error ) ?
|
11471 |
$license->error->message :
|
11472 |
sprintf( '%s<br><code>%s</code>',
|
11473 |
+
$this->get_text_inline( 'Error received from the server:', 'server-error-message' ),
|
11474 |
var_export( $license, true )
|
11475 |
)
|
11476 |
)
|
11477 |
),
|
11478 |
+
$this->get_text_x_inline( 'Hmm', 'something somebody says when they are thinking about what you have just said.', 'hmm' ) . '...',
|
11479 |
'error'
|
11480 |
);
|
11481 |
}
|
11482 |
|
11483 |
return;
|
11484 |
}
|
|
|
11485 |
$premium_license = new FS_Plugin_License( $license );
|
11486 |
|
11487 |
// Updated site plan.
|
11496 |
|
11497 |
if ( ! $background ) {
|
11498 |
$this->_admin_notices->add_sticky(
|
11499 |
+
$this->get_text_inline( 'Your license was successfully activated.', 'license-activated-message' ) .
|
11500 |
$this->get_complete_upgrade_instructions(),
|
11501 |
'license_activated',
|
11502 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
11503 |
);
|
11504 |
}
|
11505 |
|
11518 |
protected function _deactivate_license( $show_notice = true ) {
|
11519 |
$this->_logger->entrance();
|
11520 |
|
11521 |
+
$hmm_text = $this->get_text_x_inline( 'Hmm', 'something somebody says when they are thinking about what you have just said.', 'hmm' ) . '...';
|
11522 |
+
|
11523 |
if ( ! is_object( $this->_license ) ) {
|
11524 |
$this->_admin_notices->add(
|
11525 |
+
sprintf( $this->get_text_inline( 'It looks like your site currently doesn\'t have an active license.', 'no-active-license-message' ), $this->_site->plan->title ),
|
11526 |
+
$hmm_text
|
11527 |
);
|
11528 |
|
11529 |
return;
|
11534 |
|
11535 |
if ( isset( $license->error ) ) {
|
11536 |
$this->_admin_notices->add(
|
11537 |
+
$this->get_text_inline( 'It looks like the license deactivation failed.', 'license-deactivation-failed-message' ) . '<br> ' .
|
11538 |
+
$this->get_text_inline( 'Error received from the server:', 'server-error-message' ) . ' ' . var_export( $license->error, true ),
|
11539 |
+
$hmm_text,
|
11540 |
'error'
|
11541 |
);
|
11542 |
|
11561 |
|
11562 |
if ( $show_notice ) {
|
11563 |
$this->_admin_notices->add(
|
11564 |
+
sprintf( $this->get_text_inline( 'Your license was successfully deactivated, you are back to the %s plan.', 'license-deactivation-message' ), $this->_site->plan->title ),
|
11565 |
+
$this->get_text_inline( 'O.K', 'ok' )
|
11566 |
);
|
11567 |
}
|
11568 |
|
11610 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
11611 |
|
11612 |
$this->_admin_notices->add(
|
11613 |
+
sprintf( $this->get_text_inline( 'Your plan was successfully downgraded. Your %s plan license will expire in %s.', 'plan-x-downgraded-message' ),
|
11614 |
$plan->title,
|
11615 |
human_time_diff( time(), strtotime( $this->_license->expiration ) )
|
11616 |
)
|
11620 |
$this->_store_site();
|
11621 |
} else {
|
11622 |
$this->_admin_notices->add(
|
11623 |
+
$this->get_text_inline( 'Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes.', 'plan-downgraded-failure-message' ),
|
11624 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
11625 |
'error'
|
11626 |
);
|
11627 |
}
|
11638 |
function start_trial( $plan_name = false ) {
|
11639 |
$this->_logger->entrance();
|
11640 |
|
11641 |
+
// Alias.
|
11642 |
+
$oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
|
11643 |
+
|
11644 |
if ( $this->is_trial() ) {
|
11645 |
// Already in trial mode.
|
11646 |
$this->_admin_notices->add(
|
11647 |
+
sprintf( $this->get_text_inline( 'You are already running the %s in a trial mode.', 'in-trial-mode' ), $this->_module_type ),
|
11648 |
+
$oops_text,
|
11649 |
'error'
|
11650 |
);
|
11651 |
|
11655 |
if ( $this->_site->is_trial_utilized() ) {
|
11656 |
// Trial was already utilized.
|
11657 |
$this->_admin_notices->add(
|
11658 |
+
$this->get_text_inline( 'You already utilized a trial before.', 'trial-utilized' ),
|
11659 |
+
$oops_text,
|
11660 |
'error'
|
11661 |
);
|
11662 |
|
11669 |
if ( false === $plan ) {
|
11670 |
// Plan doesn't exist.
|
11671 |
$this->_admin_notices->add(
|
11672 |
+
sprintf( $this->get_text_inline( 'Plan %s do not exist, therefore, can\'t start a trial.', 'trial-plan-x-not-exist' ), $plan_name ),
|
11673 |
+
$oops_text,
|
11674 |
'error'
|
11675 |
);
|
11676 |
|
11680 |
if ( ! $plan->has_trial() ) {
|
11681 |
// Plan doesn't exist.
|
11682 |
$this->_admin_notices->add(
|
11683 |
+
sprintf( $this->get_text_inline( 'Plan %s does not support a trial period.', 'plan-x-no-trial' ), $plan_name ),
|
11684 |
+
$oops_text,
|
11685 |
'error'
|
11686 |
);
|
11687 |
|
11691 |
if ( ! $this->has_trial_plan() ) {
|
11692 |
// None of the plans have a trial.
|
11693 |
$this->_admin_notices->add(
|
11694 |
+
sprintf( $this->get_text_inline( 'None of the %s\'s plans supports a trial period.', 'no-trials' ), $this->_module_type ),
|
11695 |
+
$oops_text,
|
11696 |
'error'
|
11697 |
);
|
11698 |
|
11710 |
if ( ! $this->is_api_result_entity( $plan ) ) {
|
11711 |
// Some API error while trying to start the trial.
|
11712 |
$this->_admin_notices->add(
|
11713 |
+
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type )
|
11714 |
. ' ' . var_export( $plan, true ),
|
11715 |
+
$oops_text,
|
11716 |
'error'
|
11717 |
);
|
11718 |
|
11736 |
private function _cancel_trial() {
|
11737 |
$this->_logger->entrance();
|
11738 |
|
11739 |
+
// Alias.
|
11740 |
+
$oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
|
11741 |
+
|
11742 |
if ( ! $this->is_trial() ) {
|
11743 |
$this->_admin_notices->add(
|
11744 |
+
$this->get_text_inline( 'It looks like you are not in trial mode anymore so there\'s nothing to cancel :)', 'trial-cancel-no-trial-message' ),
|
11745 |
+
$oops_text,
|
11746 |
'error'
|
11747 |
);
|
11748 |
|
11792 |
! $this->deactivate_premium_only_addon_without_license( true )
|
11793 |
) {
|
11794 |
$this->_admin_notices->add(
|
11795 |
+
sprintf( $this->get_text_inline( 'Your %s free trial was successfully cancelled.', 'trial-cancel-message' ), $this->_storage->trial_plan->title )
|
11796 |
);
|
11797 |
}
|
11798 |
|
11800 |
unset( $this->_storage->trial_plan );
|
11801 |
} else {
|
11802 |
$this->_admin_notices->add(
|
11803 |
+
$this->get_text_inline( 'Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes.', 'trial-cancel-failure-message' ),
|
11804 |
+
$oops_text,
|
11805 |
'error'
|
11806 |
);
|
11807 |
}
|
12038 |
if ( ! $background ) {
|
12039 |
$this->_admin_notices->add(
|
12040 |
sprintf(
|
12041 |
+
/* translators: %s: Numeric version number (e.g. '2.1.9' */
|
12042 |
+
$this->get_text_inline( 'Version %s was released.', 'version-x-released' ) . ' ' . $this->get_text_inline( 'Please download %s.', 'please-download-x' ),
|
12043 |
$update->version,
|
12044 |
sprintf(
|
12045 |
'<a href="%s" target="_blank">%s</a>',
|
12046 |
$this->get_account_url( 'download_latest' ),
|
12047 |
+
sprintf(
|
12048 |
+
/* translators: %s: plan name (e.g. latest "Professional" version) */
|
12049 |
+
$this->get_text_inline( 'the latest %s version here', 'latest-x-version' ),
|
12050 |
+
$this->_site->plan->title
|
12051 |
+
)
|
12052 |
)
|
12053 |
),
|
12054 |
+
$this->get_text_inline( 'New', 'new' ) . '!'
|
12055 |
);
|
12056 |
}
|
12057 |
} else if ( false === $new_version && ! $background ) {
|
12058 |
$this->_admin_notices->add(
|
12059 |
+
$this->get_text_inline( 'Seems like you got the latest release.', 'you-have-latest' ),
|
12060 |
+
$this->get_text_inline( 'You are all good!', 'you-are-good' )
|
12061 |
);
|
12062 |
}
|
12063 |
|
12323 |
|
12324 |
if ( ! isset( $result->error ) ) {
|
12325 |
$this->_admin_notices->add( sprintf(
|
12326 |
+
$this->get_text_inline( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.', 'verification-email-sent-message' ),
|
12327 |
sprintf( '<a href="mailto:%1s">%2s</a>', esc_url( $this->_user->email ), $this->_user->email )
|
12328 |
) );
|
12329 |
} else {
|
12411 |
$plugin_id = fs_request_get( 'plugin_id', $this->get_id() );
|
12412 |
$action = fs_get_action();
|
12413 |
|
12414 |
+
// Alias.
|
12415 |
+
$oops_text = $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...';
|
12416 |
+
|
12417 |
switch ( $action ) {
|
12418 |
case 'delete_account':
|
12419 |
check_admin_referer( $action );
|
12498 |
$candidate_email = fs_request_get( 'candidate_email', '' );
|
12499 |
|
12500 |
if ( $this->init_change_owner( $candidate_email ) ) {
|
12501 |
+
$this->_admin_notices->add( sprintf( $this->get_text_inline( '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.', 'change-owner-request-sent-x' ), '<b>' . $this->_user->email . '</b>' ) );
|
12502 |
}
|
12503 |
break;
|
12504 |
case 'owner_confirmed':
|
12505 |
$candidate_email = fs_request_get( 'candidate_email', '' );
|
12506 |
|
12507 |
+
$this->_admin_notices->add( sprintf( $this->get_text_inline( 'Thanks for confirming the ownership change. An email was just sent to %s for final approval.', 'change-owner-request_owner-confirmed' ), '<b>' . $candidate_email . '</b>' ) );
|
12508 |
break;
|
12509 |
case 'candidate_confirmed':
|
12510 |
if ( $this->complete_change_owner() ) {
|
12511 |
$this->_admin_notices->add_sticky(
|
12512 |
+
sprintf( $this->get_text_inline( '%s is the new owner of the account.', 'change-owner-request_candidate-confirmed' ), '<b>' . $this->_user->email . '</b>' ),
|
12513 |
'ownership_changed',
|
12514 |
+
$this->get_text_x_inline( 'Congrats', 'as congratulations', 'congrats' ) . '!'
|
12515 |
);
|
12516 |
} else {
|
12517 |
// @todo Handle failed ownership change message.
|
12531 |
switch ( $result->error->code ) {
|
12532 |
case 'user_exist':
|
12533 |
$this->_admin_notices->add(
|
12534 |
+
$this->get_text_inline( 'Sorry, we could not complete the email update. Another user with the same email is already registered.', 'user-exist-message' ) . ' ' .
|
12535 |
+
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 . '</b>' ) .
|
12536 |
sprintf(
|
12537 |
'<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
12538 |
$this->get_account_url( 'change_owner', array(
|
12539 |
'state' => 'init',
|
12540 |
'candidate_email' => $new_email
|
12541 |
) ),
|
12542 |
+
$this->get_text_inline( 'Change Ownership', 'change-ownership' )
|
12543 |
),
|
12544 |
+
$oops_text,
|
12545 |
'error'
|
12546 |
);
|
12547 |
break;
|
12548 |
}
|
12549 |
} else {
|
12550 |
+
$this->_admin_notices->add( $this->get_text_inline( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.', 'email-updated-message' ) );
|
12551 |
}
|
12552 |
|
12553 |
return;
|
12559 |
|
12560 |
if ( isset( $result->error ) ) {
|
12561 |
$this->_admin_notices->add(
|
12562 |
+
$this->get_text_inline( 'Please provide your full name.', 'name-update-failed-message' ),
|
12563 |
+
$oops_text,
|
12564 |
'error'
|
12565 |
);
|
12566 |
} else {
|
12567 |
+
$this->_admin_notices->add( $this->get_text_inline( 'Your name was successfully updated.', 'name-updated-message' ) );
|
12568 |
}
|
12569 |
|
12570 |
return;
|
12624 |
$this->do_action( 'account_property_edit', 'site', $site_property, $site_property_value );
|
12625 |
|
12626 |
$this->_admin_notices->add( sprintf(
|
12627 |
+
/* translators: %s: User's account property (e.g. email address, name) */
|
12628 |
+
$this->get_text_inline( 'You have successfully updated your %s.', 'x-updated' ),
|
12629 |
+
'<b>' . str_replace( '_', ' ', $p ) . '</b>'
|
12630 |
+
) );
|
12631 |
|
12632 |
return;
|
12633 |
}
|
12689 |
function _affiliation_page_render() {
|
12690 |
$this->_logger->entrance();
|
12691 |
|
12692 |
+
$this->fetch_affiliate_and_terms();
|
12693 |
+
|
12694 |
fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
|
12695 |
|
12696 |
$vars = array( 'id' => $this->_module_id );
|
12765 |
|
12766 |
if ( ! $this->is_registered() && $this->is_org_repo_compliant() ) {
|
12767 |
$this->_admin_notices->add(
|
12768 |
+
sprintf( $this->get_text_inline( 'Just letting you know that the add-ons information of %s is being pulled from an external server.', 'addons-info-external-message' ), '<b>' . $this->get_plugin_name() . '</b>' ),
|
12769 |
+
$this->get_text_x_inline( 'Heads up', 'advance notice of something that will need attention.', 'heads-up' ),
|
12770 |
'update-nag'
|
12771 |
);
|
12772 |
}
|
13084 |
$trial_period = $this->_trial_days;
|
13085 |
$require_payment = $this->_is_trial_require_payment;
|
13086 |
$trial_url = $this->get_trial_url();
|
13087 |
+
$plans_string = strtolower( $this->get_text_inline( 'Awesome', 'awesome' ) );
|
13088 |
|
13089 |
if ( $this->is_registered() ) {
|
13090 |
// If opted-in, override trial with up to date data from API.
|
13124 |
}
|
13125 |
|
13126 |
$message = sprintf(
|
13127 |
+
$this->get_text_x_inline( 'Hey', 'exclamation', 'hey' ) . '! ' . $this->get_text_inline( 'How do you like %s so far? Test all our %s premium features with a %d-day free trial.', 'trial-x-promotion-message' ),
|
13128 |
sprintf( '<b>%s</b>', $this->get_plugin_name() ),
|
13129 |
$plans_string,
|
13130 |
$trial_period
|
13132 |
|
13133 |
// "No Credit-Card Required" or "No Commitment for N Days".
|
13134 |
$cc_string = $require_payment ?
|
13135 |
+
sprintf( $this->get_text_inline( 'No commitment for %s days - cancel anytime!', 'no-commitment-for-x-days' ), $trial_period ) :
|
13136 |
+
$this->get_text_inline( 'No credit card required', 'no-cc-required' ) . '!';
|
13137 |
|
13138 |
|
13139 |
// Start trial button.
|
13140 |
$button = ' ' . sprintf(
|
13141 |
'<a style="margin-left: 10px; vertical-align: super;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
13142 |
$trial_url,
|
13143 |
+
$this->get_text_x_inline( 'Start free trial', 'call to action', 'start-free-trial' )
|
13144 |
);
|
13145 |
|
13146 |
$this->_admin_notices->add_sticky(
|
13180 |
if (
|
13181 |
// Product has no affiliate program.
|
13182 |
! $this->has_affiliate_program() ||
|
|
|
|
|
13183 |
// User has applied for an affiliate account.
|
13184 |
! empty( $this->_storage->affiliate_application_data ) ) {
|
13185 |
return false;
|
13215 |
}
|
13216 |
|
13217 |
$message = sprintf(
|
13218 |
+
$this->get_text_inline( '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!', 'become-an-ambassador-admin-notice' ),
|
13219 |
sprintf( '<strong>%s</strong>', $this->get_plugin_name() ),
|
13220 |
$this->get_module_label( true )
|
13221 |
);
|
13224 |
$button = ' ' . sprintf(
|
13225 |
'<a style="display: block; margin-top: 10px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
13226 |
$this->_get_admin_page_url( 'affiliation' ),
|
13227 |
+
$this->get_text_inline( 'Learn more', 'learn-more' ) . '...'
|
13228 |
);
|
13229 |
|
13230 |
$this->_admin_notices->add_sticky(
|
13341 |
if ( $this->is_registered() ) {
|
13342 |
if ( ! $this->is_paying() && $this->has_paid_plan() ) {
|
13343 |
$this->add_plugin_action_link(
|
13344 |
+
$this->get_text_inline( 'Upgrade', 'upgrade' ),
|
13345 |
$this->get_upgrade_url(),
|
13346 |
false,
|
13347 |
7,
|
13351 |
|
13352 |
if ( $this->has_addons() ) {
|
13353 |
$this->add_plugin_action_link(
|
13354 |
+
$this->get_text_inline( 'Add-Ons', 'add-ons' ),
|
13355 |
$this->_get_admin_page_url( 'addons' ),
|
13356 |
false,
|
13357 |
9,
|
13379 |
add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
|
13380 |
}
|
13381 |
|
13382 |
+
$link_text = $this->is_free_plan() ?
|
13383 |
+
$this->get_text_inline( 'Activate License', 'activate-license' ) :
|
13384 |
+
$this->get_text_inline( 'Change License', 'change-license' );
|
|
|
|
|
13385 |
|
13386 |
$this->add_plugin_action_link(
|
13387 |
$link_text,
|
13442 |
|
13443 |
if ( $this->is_registered() ) {
|
13444 |
if ( $this->is_tracking_allowed() ) {
|
13445 |
+
$link_text_id = $this->get_text_inline( 'Opt Out', 'opt-out' );
|
13446 |
} else {
|
13447 |
+
$link_text_id = $this->get_text_inline( 'Opt In', 'opt-in' );
|
13448 |
}
|
13449 |
|
13450 |
add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
|
13451 |
} else {
|
13452 |
+
$link_text_id = $this->get_text_inline( 'Opt In', 'opt-in' );
|
13453 |
|
13454 |
$params = ! $this->is_anonymous() ?
|
13455 |
array() :
|
13463 |
|
13464 |
if ( $this->is_plugin() && self::is_plugins_page() ) {
|
13465 |
$this->add_plugin_action_link(
|
13466 |
+
$link_text_id,
|
13467 |
$url,
|
13468 |
false,
|
13469 |
13,
|
13632 |
|
13633 |
// @since 1.2.1.5 The free version is auto deactivated.
|
13634 |
$deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ?
|
13635 |
+
( '<li>' . $this->esc_html_inline( 'Deactivate the free version', 'deactivate-free-version' ) . '.</li>' ) :
|
13636 |
'';
|
13637 |
|
13638 |
return sprintf(
|
13639 |
' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
|
13640 |
+
$this->get_text_inline( 'Please follow these steps to complete the upgrade', 'follow-steps-to-complete-upgrade' ),
|
13641 |
$this->get_latest_download_link( sprintf(
|
13642 |
+
/* translators: %s: Plan title */
|
13643 |
+
$this->get_text_inline( 'Download the latest %s version', 'download-latest-x-version' ),
|
13644 |
$plan_title
|
13645 |
) ),
|
13646 |
$deactivation_step,
|
13647 |
+
$this->get_text_inline( 'Upload and activate the downloaded version', 'upload-and-activate' ),
|
13648 |
'//bit.ly/upload-wp-' . $this->_module_type . 's',
|
13649 |
+
$this->get_text_inline( 'How to upload and activate?', 'howto-upload-activate' )
|
13650 |
);
|
13651 |
}
|
13652 |
|
13662 |
return fs_text( $key, $this->_slug );
|
13663 |
}
|
13664 |
|
13665 |
+
/**
|
13666 |
+
* @author Vova Feldman (@svovaf)
|
13667 |
+
* @since 1.2.3
|
13668 |
+
*
|
13669 |
+
* @param string $text Translatable string.
|
13670 |
+
* @param string $key String key for overrides.
|
13671 |
+
*
|
13672 |
+
* @return string
|
13673 |
+
*/
|
13674 |
+
function get_text_inline( $text, $key = '' ) {
|
13675 |
+
return _fs_text_inline( $text, $key, $this->_slug );
|
13676 |
+
}
|
13677 |
+
|
13678 |
+
/**
|
13679 |
+
* @author Vova Feldman (@svovaf)
|
13680 |
+
* @since 1.2.3
|
13681 |
+
*
|
13682 |
+
* @param string $text Translatable string.
|
13683 |
+
* @param string $context Context information for the translators.
|
13684 |
+
* @param string $key String key for overrides.
|
13685 |
+
*
|
13686 |
+
* @return string
|
13687 |
+
*/
|
13688 |
+
function get_text_x_inline( $text, $context, $key ) {
|
13689 |
+
return _fs_text_x_inline( $text, $context, $key, $this->_slug );
|
13690 |
+
}
|
13691 |
+
|
13692 |
+
/**
|
13693 |
+
* @author Vova Feldman (@svovaf)
|
13694 |
+
* @since 1.2.3
|
13695 |
+
*
|
13696 |
+
* @param string $text Translatable string.
|
13697 |
+
* @param string $key String key for overrides.
|
13698 |
+
*
|
13699 |
+
* @return string
|
13700 |
+
*/
|
13701 |
+
function esc_html_inline( $text, $key ) {
|
13702 |
+
return esc_html( _fs_text_inline( $text, $key, $this->_slug ) );
|
13703 |
+
}
|
13704 |
+
|
13705 |
#----------------------------------------------------------------------------------
|
13706 |
#region Versioning
|
13707 |
#----------------------------------------------------------------------------------
|
13805 |
if ( ! $this->is_registered() ) {
|
13806 |
// Not registered.
|
13807 |
self::shoot_ajax_failure( array(
|
13808 |
+
'message' => $this->get_text_inline( 'Auto installation only works for opted-in users.', 'auto-install-error-not-opted-in' ),
|
13809 |
'code' => 'premium_installed',
|
13810 |
) );
|
13811 |
}
|
13812 |
|
13813 |
+
$plugin_id = fs_request_get( 'target_module_id', $this->get_id() );
|
13814 |
|
13815 |
if ( ! FS_Plugin::is_valid_id( $plugin_id ) ) {
|
13816 |
// Invalid ID.
|
13817 |
self::shoot_ajax_failure( array(
|
13818 |
+
'message' => $this->get_text_inline( 'Invalid module ID.', 'auto-install-error-invalid-id' ),
|
13819 |
'code' => 'invalid_module_id',
|
13820 |
) );
|
13821 |
}
|
13824 |
if ( $this->is_premium() ) {
|
13825 |
// Already using the premium code version.
|
13826 |
self::shoot_ajax_failure( array(
|
13827 |
+
'message' => $this->get_text_inline( 'Premium version already active.', 'auto-install-error-premium-activated' ),
|
13828 |
'code' => 'premium_installed',
|
13829 |
) );
|
13830 |
}
|
13831 |
if ( ! $this->can_use_premium_code() ) {
|
13832 |
// Don't have access to the premium code.
|
13833 |
self::shoot_ajax_failure( array(
|
13834 |
+
'message' => $this->get_text_inline( 'You do not have a valid license to access the premium version.', 'auto-install-error-invalid-license' ),
|
13835 |
'code' => 'invalid_license',
|
13836 |
) );
|
13837 |
}
|
13838 |
if ( ! $this->has_release_on_freemius() ) {
|
13839 |
// Plugin is a serviceware, no premium code version.
|
13840 |
self::shoot_ajax_failure( array(
|
13841 |
+
'message' => $this->get_text_inline( 'Plugin is a "Serviceware" which means it does not have a premium code version.', 'auto-install-error-serviceware' ),
|
13842 |
'code' => 'premium_version_missing',
|
13843 |
) );
|
13844 |
}
|
13848 |
if ( ! is_object( $addon ) ) {
|
13849 |
// Invalid add-on ID.
|
13850 |
self::shoot_ajax_failure( array(
|
13851 |
+
'message' => $this->get_text_inline( 'Invalid module ID.', 'auto-install-error-invalid-id' ),
|
13852 |
'code' => 'invalid_module_id',
|
13853 |
) );
|
13854 |
}
|
13856 |
if ( $this->is_addon_activated( $plugin_id, true ) ) {
|
13857 |
// Premium add-on version is already activated.
|
13858 |
self::shoot_ajax_failure( array(
|
13859 |
+
'message' => $this->get_text_inline( 'Premium add-on version already installed.', 'auto-install-error-premium-addon-activated' ),
|
13860 |
'code' => 'premium_installed',
|
13861 |
) );
|
13862 |
}
|
13928 |
}
|
13929 |
}
|
13930 |
|
13931 |
+
$vars = array(
|
13932 |
+
'id' => $this->_module_id,
|
13933 |
+
'target_module_id' => $plugin_id,
|
13934 |
+
'slug' => $this->_slug,
|
13935 |
+
);
|
13936 |
|
13937 |
fs_require_template( 'auto-installation.php', $vars );
|
13938 |
}
|
14202 |
require_once WP_FS__DIR_INCLUDES . '/customizer/class-fs-customizer-upsell-control.php';
|
14203 |
|
14204 |
$customizer->add_section( 'freemius_upsell', array(
|
14205 |
+
'title' => '★ ' . $this->get_text_inline( 'View paid features', 'view-paid-features' ),
|
14206 |
'priority' => 1,
|
14207 |
) );
|
14208 |
$customizer->add_setting( 'freemius_upsell', array(
|
freemius/includes/class-fs-logger.php
CHANGED
@@ -1,688 +1,688 @@
|
|
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 ) && isset( $api_result->error ) ) {
|
224 |
-
$message = $api_result->error->message;
|
225 |
-
} else if ( is_object( $api_result ) ) {
|
226 |
-
$message = var_export( $api_result, true );
|
227 |
-
} else if ( is_string( $api_result ) ) {
|
228 |
-
$message = $api_result;
|
229 |
-
} else if ( empty( $api_result ) ) {
|
230 |
-
$message = 'Empty API result.';
|
231 |
-
}
|
232 |
-
|
233 |
-
$message = 'API Error: ' . $message;
|
234 |
-
|
235 |
-
$this->_log( $message, 'error', $wrapper );
|
236 |
-
}
|
237 |
-
|
238 |
-
function entrance( $message = '', $wrapper = false ) {
|
239 |
-
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
240 |
-
|
241 |
-
$this->_log( $msg, 'log', $wrapper );
|
242 |
-
}
|
243 |
-
|
244 |
-
function departure( $message = '', $wrapper = false ) {
|
245 |
-
$msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
246 |
-
|
247 |
-
$this->_log( $msg, 'log', $wrapper );
|
248 |
-
}
|
249 |
-
|
250 |
-
#--------------------------------------------------------------------------------
|
251 |
-
#region Log Formatting
|
252 |
-
#--------------------------------------------------------------------------------
|
253 |
-
|
254 |
-
private static function format( $log, $show_type = true ) {
|
255 |
-
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'] . ']';
|
256 |
-
}
|
257 |
-
|
258 |
-
private static function format_html( $log ) {
|
259 |
-
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>';
|
260 |
-
}
|
261 |
-
|
262 |
-
#endregion
|
263 |
-
|
264 |
-
static function dump() {
|
265 |
-
?>
|
266 |
-
<!-- BEGIN: Freemius PHP Console Log -->
|
267 |
-
<script type="text/javascript">
|
268 |
-
<?php
|
269 |
-
foreach ( self::$LOG as $log ) {
|
270 |
-
echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
|
271 |
-
}
|
272 |
-
?>
|
273 |
-
</script>
|
274 |
-
<!-- END: Freemius PHP Console Log -->
|
275 |
-
<?php
|
276 |
-
}
|
277 |
-
|
278 |
-
static function get_log() {
|
279 |
-
return self::$LOG;
|
280 |
-
}
|
281 |
-
|
282 |
-
#--------------------------------------------------------------------------------
|
283 |
-
#region Database Logging
|
284 |
-
#--------------------------------------------------------------------------------
|
285 |
-
|
286 |
-
/**
|
287 |
-
* @author Vova Feldman (@svovaf)
|
288 |
-
* @since 1.2.1.6
|
289 |
-
*
|
290 |
-
* @return bool
|
291 |
-
*/
|
292 |
-
public static function is_storage_logging_on() {
|
293 |
-
if ( ! isset( self::$_isStorageLoggingOn ) ) {
|
294 |
-
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
295 |
-
}
|
296 |
-
|
297 |
-
return self::$_isStorageLoggingOn;
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Turns on/off database persistent debugging to capture
|
302 |
-
* multi-session logs to debug complex flows like
|
303 |
-
* plugin auto-deactivate on premium version activation.
|
304 |
-
*
|
305 |
-
* @todo Check if Theme Check has issues with DB tables for themes.
|
306 |
-
*
|
307 |
-
* @author Vova Feldman (@svovaf)
|
308 |
-
* @since 1.2.1.6
|
309 |
-
*
|
310 |
-
* @param bool $is_on
|
311 |
-
*
|
312 |
-
* @return bool
|
313 |
-
*/
|
314 |
-
public static function _set_storage_logging( $is_on = true ) {
|
315 |
-
global $wpdb;
|
316 |
-
|
317 |
-
$table = "{$wpdb->prefix}fs_logger";
|
318 |
-
|
319 |
-
if ( $is_on ) {
|
320 |
-
/**
|
321 |
-
* Create logging table.
|
322 |
-
*
|
323 |
-
* NOTE:
|
324 |
-
* dbDelta must use KEY and not INDEX for indexes.
|
325 |
-
*
|
326 |
-
* @link https://core.trac.wordpress.org/ticket/2695
|
327 |
-
*/
|
328 |
-
$result = $wpdb->query( "CREATE TABLE {$table} (
|
329 |
-
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
330 |
-
`process_id` INT UNSIGNED NOT NULL,
|
331 |
-
`user_name` VARCHAR(64) NOT NULL,
|
332 |
-
`logger` VARCHAR(128) NOT NULL,
|
333 |
-
`log_order` INT UNSIGNED NOT NULL,
|
334 |
-
`type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
|
335 |
-
`message` TEXT NOT NULL,
|
336 |
-
`file` VARCHAR(256) NOT NULL,
|
337 |
-
`line` INT UNSIGNED NOT NULL,
|
338 |
-
`function` VARCHAR(256) NOT NULL,
|
339 |
-
`request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
|
340 |
-
`request_url` VARCHAR(1024) NOT NULL,
|
341 |
-
`created` DECIMAL(16, 6) NOT NULL,
|
342 |
-
PRIMARY KEY (`id`),
|
343 |
-
KEY `process_id` (`process_id` ASC),
|
344 |
-
KEY `process_logger` (`process_id` ASC, `logger` ASC),
|
345 |
-
KEY `function` (`function` ASC),
|
346 |
-
KEY `type` (`type` ASC))" );
|
347 |
-
} else {
|
348 |
-
/**
|
349 |
-
* Drop logging table.
|
350 |
-
*/
|
351 |
-
$result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
|
352 |
-
}
|
353 |
-
|
354 |
-
if ( false !== $result ) {
|
355 |
-
update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
|
356 |
-
}
|
357 |
-
|
358 |
-
return ( false !== $result );
|
359 |
-
}
|
360 |
-
|
361 |
-
/**
|
362 |
-
* @author Vova Feldman (@svovaf)
|
363 |
-
* @since 1.2.1.6
|
364 |
-
*
|
365 |
-
* @param string $type
|
366 |
-
* @param string $message
|
367 |
-
* @param int $log_order
|
368 |
-
* @param array $caller
|
369 |
-
*
|
370 |
-
* @return false|int
|
371 |
-
*/
|
372 |
-
private function db_log(
|
373 |
-
&$type,
|
374 |
-
&$message,
|
375 |
-
&$log_order,
|
376 |
-
&$caller
|
377 |
-
) {
|
378 |
-
global $wpdb;
|
379 |
-
|
380 |
-
$request_type = 'call';
|
381 |
-
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
382 |
-
$request_type = 'cron';
|
383 |
-
} else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
384 |
-
$request_type = 'ajax';
|
385 |
-
}
|
386 |
-
|
387 |
-
$request_url = WP_FS__IS_HTTP_REQUEST ?
|
388 |
-
$_SERVER['REQUEST_URI'] :
|
389 |
-
'';
|
390 |
-
|
391 |
-
return $wpdb->insert(
|
392 |
-
"{$wpdb->prefix}fs_logger",
|
393 |
-
array(
|
394 |
-
'process_id' => self::$_processID,
|
395 |
-
'user_name' => self::$_ownerName,
|
396 |
-
'logger' => $this->_id,
|
397 |
-
'log_order' => $log_order,
|
398 |
-
'type' => $type,
|
399 |
-
'request_type' => $request_type,
|
400 |
-
'request_url' => $request_url,
|
401 |
-
'message' => $message,
|
402 |
-
'file' => isset( $caller['file'] ) ?
|
403 |
-
substr( $caller['file'], self::$_abspathLength ) :
|
404 |
-
'',
|
405 |
-
'line' => $caller['line'],
|
406 |
-
'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
|
407 |
-
'created' => microtime( true ),
|
408 |
-
)
|
409 |
-
);
|
410 |
-
}
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Persistent DB logger columns.
|
414 |
-
*
|
415 |
-
* @var array
|
416 |
-
*/
|
417 |
-
private static $_log_columns = array(
|
418 |
-
'id',
|
419 |
-
'process_id',
|
420 |
-
'user_name',
|
421 |
-
'logger',
|
422 |
-
'log_order',
|
423 |
-
'type',
|
424 |
-
'message',
|
425 |
-
'file',
|
426 |
-
'line',
|
427 |
-
'function',
|
428 |
-
'request_type',
|
429 |
-
'request_url',
|
430 |
-
'created',
|
431 |
-
);
|
432 |
-
|
433 |
-
/**
|
434 |
-
* Create DB logs query.
|
435 |
-
*
|
436 |
-
* @author Vova Feldman (@svovaf)
|
437 |
-
* @since 1.2.1.6
|
438 |
-
*
|
439 |
-
* @param bool $filters
|
440 |
-
* @param int $limit
|
441 |
-
* @param int $offset
|
442 |
-
* @param bool $order
|
443 |
-
* @param bool $escape_eol
|
444 |
-
*
|
445 |
-
* @return string
|
446 |
-
*/
|
447 |
-
private static function build_db_logs_query(
|
448 |
-
$filters = false,
|
449 |
-
$limit = 200,
|
450 |
-
$offset = 0,
|
451 |
-
$order = false,
|
452 |
-
$escape_eol = false
|
453 |
-
) {
|
454 |
-
global $wpdb;
|
455 |
-
|
456 |
-
$select = '*';
|
457 |
-
|
458 |
-
if ( $escape_eol ) {
|
459 |
-
$select = '';
|
460 |
-
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
461 |
-
if ( $i > 0 ) {
|
462 |
-
$select .= ', ';
|
463 |
-
}
|
464 |
-
|
465 |
-
if ( 'message' !== self::$_log_columns[ $i ] ) {
|
466 |
-
$select .= self::$_log_columns[ $i ];
|
467 |
-
} else {
|
468 |
-
$select .= 'REPLACE(message , \'\n\', \' \') AS message';
|
469 |
-
}
|
470 |
-
}
|
471 |
-
}
|
472 |
-
|
473 |
-
$query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
|
474 |
-
if ( is_array( $filters ) ) {
|
475 |
-
$criteria = array();
|
476 |
-
|
477 |
-
if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
|
478 |
-
$filters['type'] = strtolower( $filters['type'] );
|
479 |
-
|
480 |
-
switch ( $filters['type'] ) {
|
481 |
-
case 'warn_error':
|
482 |
-
$criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
|
483 |
-
break;
|
484 |
-
case 'error':
|
485 |
-
case 'warn':
|
486 |
-
$criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
|
487 |
-
break;
|
488 |
-
case 'info':
|
489 |
-
default:
|
490 |
-
$criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
|
491 |
-
break;
|
492 |
-
}
|
493 |
-
}
|
494 |
-
|
495 |
-
if ( ! empty( $filters['request_type'] ) ) {
|
496 |
-
$filters['request_type'] = strtolower( $filters['request_type'] );
|
497 |
-
|
498 |
-
if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
|
499 |
-
$criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
|
500 |
-
}
|
501 |
-
}
|
502 |
-
|
503 |
-
if ( ! empty( $filters['file'] ) ) {
|
504 |
-
$criteria[] = array(
|
505 |
-
'col' => 'file',
|
506 |
-
'op' => 'LIKE',
|
507 |
-
'val' => '%' . esc_sql( $filters['file'] ),
|
508 |
-
);
|
509 |
-
}
|
510 |
-
|
511 |
-
if ( ! empty( $filters['function'] ) ) {
|
512 |
-
$criteria[] = array(
|
513 |
-
'col' => 'function',
|
514 |
-
'op' => 'LIKE',
|
515 |
-
'val' => '%' . esc_sql( $filters['function'] ),
|
516 |
-
);
|
517 |
-
}
|
518 |
-
|
519 |
-
if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
|
520 |
-
$criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
|
521 |
-
}
|
522 |
-
|
523 |
-
if ( ! empty( $filters['logger'] ) ) {
|
524 |
-
$criteria[] = array(
|
525 |
-
'col' => 'logger',
|
526 |
-
'op' => 'LIKE',
|
527 |
-
'val' => '%' . esc_sql( $filters['logger'] ) . '%',
|
528 |
-
);
|
529 |
-
}
|
530 |
-
|
531 |
-
if ( ! empty( $filters['message'] ) ) {
|
532 |
-
$criteria[] = array(
|
533 |
-
'col' => 'message',
|
534 |
-
'op' => 'LIKE',
|
535 |
-
'val' => '%' . esc_sql( $filters['message'] ) . '%',
|
536 |
-
);
|
537 |
-
}
|
538 |
-
|
539 |
-
if ( 0 < count( $criteria ) ) {
|
540 |
-
$query .= "\nWHERE\n";
|
541 |
-
|
542 |
-
$first = true;
|
543 |
-
foreach ( $criteria as $c ) {
|
544 |
-
if ( ! $first ) {
|
545 |
-
$query .= "AND\n";
|
546 |
-
}
|
547 |
-
|
548 |
-
if ( is_array( $c['val'] ) ) {
|
549 |
-
$operator = 'IN';
|
550 |
-
|
551 |
-
for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
|
552 |
-
$c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
|
553 |
-
}
|
554 |
-
|
555 |
-
$val = '(' . implode( ',', $c['val'] ) . ')';
|
556 |
-
} else {
|
557 |
-
$operator = ! empty( $c['op'] ) ? $c['op'] : '=';
|
558 |
-
$val = "'" . esc_sql( $c['val'] ) . "'";
|
559 |
-
}
|
560 |
-
|
561 |
-
$query .= "`{$c['col']}` {$operator} {$val}\n";
|
562 |
-
|
563 |
-
$first = false;
|
564 |
-
}
|
565 |
-
}
|
566 |
-
}
|
567 |
-
|
568 |
-
if ( ! is_array( $order ) ) {
|
569 |
-
$order = array(
|
570 |
-
'col' => 'id',
|
571 |
-
'order' => 'desc'
|
572 |
-
);
|
573 |
-
}
|
574 |
-
|
575 |
-
$query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
|
576 |
-
|
577 |
-
return $query;
|
578 |
-
}
|
579 |
-
|
580 |
-
/**
|
581 |
-
* Load logs from DB.
|
582 |
-
*
|
583 |
-
* @author Vova Feldman (@svovaf)
|
584 |
-
* @since 1.2.1.6
|
585 |
-
*
|
586 |
-
* @param bool $filters
|
587 |
-
* @param int $limit
|
588 |
-
* @param int $offset
|
589 |
-
* @param bool $order
|
590 |
-
*
|
591 |
-
* @return object[]|null
|
592 |
-
*/
|
593 |
-
public static function load_db_logs(
|
594 |
-
$filters = false,
|
595 |
-
$limit = 200,
|
596 |
-
$offset = 0,
|
597 |
-
$order = false
|
598 |
-
) {
|
599 |
-
global $wpdb;
|
600 |
-
|
601 |
-
$query = self::build_db_logs_query(
|
602 |
-
$filters,
|
603 |
-
$limit,
|
604 |
-
$offset,
|
605 |
-
$order
|
606 |
-
);
|
607 |
-
|
608 |
-
return $wpdb->get_results( $query );
|
609 |
-
}
|
610 |
-
|
611 |
-
/**
|
612 |
-
* Load logs from DB.
|
613 |
-
*
|
614 |
-
* @author Vova Feldman (@svovaf)
|
615 |
-
* @since 1.2.1.6
|
616 |
-
*
|
617 |
-
* @param bool $filters
|
618 |
-
* @param string $filename
|
619 |
-
* @param int $limit
|
620 |
-
* @param int $offset
|
621 |
-
* @param bool $order
|
622 |
-
*
|
623 |
-
* @return false|string File download URL or false on failure.
|
624 |
-
*/
|
625 |
-
public static function download_db_logs(
|
626 |
-
$filters = false,
|
627 |
-
$filename = '',
|
628 |
-
$limit = 10000,
|
629 |
-
$offset = 0,
|
630 |
-
$order = false
|
631 |
-
) {
|
632 |
-
global $wpdb;
|
633 |
-
|
634 |
-
$query = self::build_db_logs_query(
|
635 |
-
$filters,
|
636 |
-
$limit,
|
637 |
-
$offset,
|
638 |
-
$order,
|
639 |
-
true
|
640 |
-
);
|
641 |
-
|
642 |
-
$upload_dir = wp_upload_dir();
|
643 |
-
if ( empty( $filename ) ) {
|
644 |
-
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
645 |
-
}
|
646 |
-
$filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
|
647 |
-
|
648 |
-
$query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
|
649 |
-
|
650 |
-
$columns = '';
|
651 |
-
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
652 |
-
if ( $i > 0 ) {
|
653 |
-
$columns .= ', ';
|
654 |
-
}
|
655 |
-
|
656 |
-
$columns .= "'" . self::$_log_columns[ $i ] . "'";
|
657 |
-
}
|
658 |
-
|
659 |
-
$query = "SELECT {$columns} UNION ALL " . $query;
|
660 |
-
|
661 |
-
$result = $wpdb->query( $query );
|
662 |
-
|
663 |
-
if ( false === $result ) {
|
664 |
-
return false;
|
665 |
-
}
|
666 |
-
|
667 |
-
return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
|
668 |
-
}
|
669 |
-
|
670 |
-
/**
|
671 |
-
* @author Vova Feldman (@svovaf)
|
672 |
-
* @since 1.2.1.6
|
673 |
-
*
|
674 |
-
* @param string $filename
|
675 |
-
*
|
676 |
-
* @return string
|
677 |
-
*/
|
678 |
-
public static function get_logs_download_url( $filename = '' ) {
|
679 |
-
$upload_dir = wp_upload_dir();
|
680 |
-
if ( empty( $filename ) ) {
|
681 |
-
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
682 |
-
}
|
683 |
-
|
684 |
-
return rtrim( $upload_dir['url'], '/' ) . $filename;
|
685 |
-
}
|
686 |
-
|
687 |
-
#endregion
|
688 |
}
|
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 ) && isset( $api_result->error ) ) {
|
224 |
+
$message = $api_result->error->message;
|
225 |
+
} else if ( is_object( $api_result ) ) {
|
226 |
+
$message = var_export( $api_result, true );
|
227 |
+
} else if ( is_string( $api_result ) ) {
|
228 |
+
$message = $api_result;
|
229 |
+
} else if ( empty( $api_result ) ) {
|
230 |
+
$message = 'Empty API result.';
|
231 |
+
}
|
232 |
+
|
233 |
+
$message = 'API Error: ' . $message;
|
234 |
+
|
235 |
+
$this->_log( $message, 'error', $wrapper );
|
236 |
+
}
|
237 |
+
|
238 |
+
function entrance( $message = '', $wrapper = false ) {
|
239 |
+
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
240 |
+
|
241 |
+
$this->_log( $msg, 'log', $wrapper );
|
242 |
+
}
|
243 |
+
|
244 |
+
function departure( $message = '', $wrapper = false ) {
|
245 |
+
$msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
246 |
+
|
247 |
+
$this->_log( $msg, 'log', $wrapper );
|
248 |
+
}
|
249 |
+
|
250 |
+
#--------------------------------------------------------------------------------
|
251 |
+
#region Log Formatting
|
252 |
+
#--------------------------------------------------------------------------------
|
253 |
+
|
254 |
+
private static function format( $log, $show_type = true ) {
|
255 |
+
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'] . ']';
|
256 |
+
}
|
257 |
+
|
258 |
+
private static function format_html( $log ) {
|
259 |
+
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>';
|
260 |
+
}
|
261 |
+
|
262 |
+
#endregion
|
263 |
+
|
264 |
+
static function dump() {
|
265 |
+
?>
|
266 |
+
<!-- BEGIN: Freemius PHP Console Log -->
|
267 |
+
<script type="text/javascript">
|
268 |
+
<?php
|
269 |
+
foreach ( self::$LOG as $log ) {
|
270 |
+
echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
|
271 |
+
}
|
272 |
+
?>
|
273 |
+
</script>
|
274 |
+
<!-- END: Freemius PHP Console Log -->
|
275 |
+
<?php
|
276 |
+
}
|
277 |
+
|
278 |
+
static function get_log() {
|
279 |
+
return self::$LOG;
|
280 |
+
}
|
281 |
+
|
282 |
+
#--------------------------------------------------------------------------------
|
283 |
+
#region Database Logging
|
284 |
+
#--------------------------------------------------------------------------------
|
285 |
+
|
286 |
+
/**
|
287 |
+
* @author Vova Feldman (@svovaf)
|
288 |
+
* @since 1.2.1.6
|
289 |
+
*
|
290 |
+
* @return bool
|
291 |
+
*/
|
292 |
+
public static function is_storage_logging_on() {
|
293 |
+
if ( ! isset( self::$_isStorageLoggingOn ) ) {
|
294 |
+
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
295 |
+
}
|
296 |
+
|
297 |
+
return self::$_isStorageLoggingOn;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Turns on/off database persistent debugging to capture
|
302 |
+
* multi-session logs to debug complex flows like
|
303 |
+
* plugin auto-deactivate on premium version activation.
|
304 |
+
*
|
305 |
+
* @todo Check if Theme Check has issues with DB tables for themes.
|
306 |
+
*
|
307 |
+
* @author Vova Feldman (@svovaf)
|
308 |
+
* @since 1.2.1.6
|
309 |
+
*
|
310 |
+
* @param bool $is_on
|
311 |
+
*
|
312 |
+
* @return bool
|
313 |
+
*/
|
314 |
+
public static function _set_storage_logging( $is_on = true ) {
|
315 |
+
global $wpdb;
|
316 |
+
|
317 |
+
$table = "{$wpdb->prefix}fs_logger";
|
318 |
+
|
319 |
+
if ( $is_on ) {
|
320 |
+
/**
|
321 |
+
* Create logging table.
|
322 |
+
*
|
323 |
+
* NOTE:
|
324 |
+
* dbDelta must use KEY and not INDEX for indexes.
|
325 |
+
*
|
326 |
+
* @link https://core.trac.wordpress.org/ticket/2695
|
327 |
+
*/
|
328 |
+
$result = $wpdb->query( "CREATE TABLE {$table} (
|
329 |
+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
330 |
+
`process_id` INT UNSIGNED NOT NULL,
|
331 |
+
`user_name` VARCHAR(64) NOT NULL,
|
332 |
+
`logger` VARCHAR(128) NOT NULL,
|
333 |
+
`log_order` INT UNSIGNED NOT NULL,
|
334 |
+
`type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
|
335 |
+
`message` TEXT NOT NULL,
|
336 |
+
`file` VARCHAR(256) NOT NULL,
|
337 |
+
`line` INT UNSIGNED NOT NULL,
|
338 |
+
`function` VARCHAR(256) NOT NULL,
|
339 |
+
`request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
|
340 |
+
`request_url` VARCHAR(1024) NOT NULL,
|
341 |
+
`created` DECIMAL(16, 6) NOT NULL,
|
342 |
+
PRIMARY KEY (`id`),
|
343 |
+
KEY `process_id` (`process_id` ASC),
|
344 |
+
KEY `process_logger` (`process_id` ASC, `logger` ASC),
|
345 |
+
KEY `function` (`function` ASC),
|
346 |
+
KEY `type` (`type` ASC))" );
|
347 |
+
} else {
|
348 |
+
/**
|
349 |
+
* Drop logging table.
|
350 |
+
*/
|
351 |
+
$result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
|
352 |
+
}
|
353 |
+
|
354 |
+
if ( false !== $result ) {
|
355 |
+
update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
|
356 |
+
}
|
357 |
+
|
358 |
+
return ( false !== $result );
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* @author Vova Feldman (@svovaf)
|
363 |
+
* @since 1.2.1.6
|
364 |
+
*
|
365 |
+
* @param string $type
|
366 |
+
* @param string $message
|
367 |
+
* @param int $log_order
|
368 |
+
* @param array $caller
|
369 |
+
*
|
370 |
+
* @return false|int
|
371 |
+
*/
|
372 |
+
private function db_log(
|
373 |
+
&$type,
|
374 |
+
&$message,
|
375 |
+
&$log_order,
|
376 |
+
&$caller
|
377 |
+
) {
|
378 |
+
global $wpdb;
|
379 |
+
|
380 |
+
$request_type = 'call';
|
381 |
+
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
382 |
+
$request_type = 'cron';
|
383 |
+
} else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
384 |
+
$request_type = 'ajax';
|
385 |
+
}
|
386 |
+
|
387 |
+
$request_url = WP_FS__IS_HTTP_REQUEST ?
|
388 |
+
$_SERVER['REQUEST_URI'] :
|
389 |
+
'';
|
390 |
+
|
391 |
+
return $wpdb->insert(
|
392 |
+
"{$wpdb->prefix}fs_logger",
|
393 |
+
array(
|
394 |
+
'process_id' => self::$_processID,
|
395 |
+
'user_name' => self::$_ownerName,
|
396 |
+
'logger' => $this->_id,
|
397 |
+
'log_order' => $log_order,
|
398 |
+
'type' => $type,
|
399 |
+
'request_type' => $request_type,
|
400 |
+
'request_url' => $request_url,
|
401 |
+
'message' => $message,
|
402 |
+
'file' => isset( $caller['file'] ) ?
|
403 |
+
substr( $caller['file'], self::$_abspathLength ) :
|
404 |
+
'',
|
405 |
+
'line' => $caller['line'],
|
406 |
+
'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
|
407 |
+
'created' => microtime( true ),
|
408 |
+
)
|
409 |
+
);
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Persistent DB logger columns.
|
414 |
+
*
|
415 |
+
* @var array
|
416 |
+
*/
|
417 |
+
private static $_log_columns = array(
|
418 |
+
'id',
|
419 |
+
'process_id',
|
420 |
+
'user_name',
|
421 |
+
'logger',
|
422 |
+
'log_order',
|
423 |
+
'type',
|
424 |
+
'message',
|
425 |
+
'file',
|
426 |
+
'line',
|
427 |
+
'function',
|
428 |
+
'request_type',
|
429 |
+
'request_url',
|
430 |
+
'created',
|
431 |
+
);
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Create DB logs query.
|
435 |
+
*
|
436 |
+
* @author Vova Feldman (@svovaf)
|
437 |
+
* @since 1.2.1.6
|
438 |
+
*
|
439 |
+
* @param bool $filters
|
440 |
+
* @param int $limit
|
441 |
+
* @param int $offset
|
442 |
+
* @param bool $order
|
443 |
+
* @param bool $escape_eol
|
444 |
+
*
|
445 |
+
* @return string
|
446 |
+
*/
|
447 |
+
private static function build_db_logs_query(
|
448 |
+
$filters = false,
|
449 |
+
$limit = 200,
|
450 |
+
$offset = 0,
|
451 |
+
$order = false,
|
452 |
+
$escape_eol = false
|
453 |
+
) {
|
454 |
+
global $wpdb;
|
455 |
+
|
456 |
+
$select = '*';
|
457 |
+
|
458 |
+
if ( $escape_eol ) {
|
459 |
+
$select = '';
|
460 |
+
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
461 |
+
if ( $i > 0 ) {
|
462 |
+
$select .= ', ';
|
463 |
+
}
|
464 |
+
|
465 |
+
if ( 'message' !== self::$_log_columns[ $i ] ) {
|
466 |
+
$select .= self::$_log_columns[ $i ];
|
467 |
+
} else {
|
468 |
+
$select .= 'REPLACE(message , \'\n\', \' \') AS message';
|
469 |
+
}
|
470 |
+
}
|
471 |
+
}
|
472 |
+
|
473 |
+
$query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
|
474 |
+
if ( is_array( $filters ) ) {
|
475 |
+
$criteria = array();
|
476 |
+
|
477 |
+
if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
|
478 |
+
$filters['type'] = strtolower( $filters['type'] );
|
479 |
+
|
480 |
+
switch ( $filters['type'] ) {
|
481 |
+
case 'warn_error':
|
482 |
+
$criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
|
483 |
+
break;
|
484 |
+
case 'error':
|
485 |
+
case 'warn':
|
486 |
+
$criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
|
487 |
+
break;
|
488 |
+
case 'info':
|
489 |
+
default:
|
490 |
+
$criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
|
491 |
+
break;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
if ( ! empty( $filters['request_type'] ) ) {
|
496 |
+
$filters['request_type'] = strtolower( $filters['request_type'] );
|
497 |
+
|
498 |
+
if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
|
499 |
+
$criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
if ( ! empty( $filters['file'] ) ) {
|
504 |
+
$criteria[] = array(
|
505 |
+
'col' => 'file',
|
506 |
+
'op' => 'LIKE',
|
507 |
+
'val' => '%' . esc_sql( $filters['file'] ),
|
508 |
+
);
|
509 |
+
}
|
510 |
+
|
511 |
+
if ( ! empty( $filters['function'] ) ) {
|
512 |
+
$criteria[] = array(
|
513 |
+
'col' => 'function',
|
514 |
+
'op' => 'LIKE',
|
515 |
+
'val' => '%' . esc_sql( $filters['function'] ),
|
516 |
+
);
|
517 |
+
}
|
518 |
+
|
519 |
+
if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
|
520 |
+
$criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
|
521 |
+
}
|
522 |
+
|
523 |
+
if ( ! empty( $filters['logger'] ) ) {
|
524 |
+
$criteria[] = array(
|
525 |
+
'col' => 'logger',
|
526 |
+
'op' => 'LIKE',
|
527 |
+
'val' => '%' . esc_sql( $filters['logger'] ) . '%',
|
528 |
+
);
|
529 |
+
}
|
530 |
+
|
531 |
+
if ( ! empty( $filters['message'] ) ) {
|
532 |
+
$criteria[] = array(
|
533 |
+
'col' => 'message',
|
534 |
+
'op' => 'LIKE',
|
535 |
+
'val' => '%' . esc_sql( $filters['message'] ) . '%',
|
536 |
+
);
|
537 |
+
}
|
538 |
+
|
539 |
+
if ( 0 < count( $criteria ) ) {
|
540 |
+
$query .= "\nWHERE\n";
|
541 |
+
|
542 |
+
$first = true;
|
543 |
+
foreach ( $criteria as $c ) {
|
544 |
+
if ( ! $first ) {
|
545 |
+
$query .= "AND\n";
|
546 |
+
}
|
547 |
+
|
548 |
+
if ( is_array( $c['val'] ) ) {
|
549 |
+
$operator = 'IN';
|
550 |
+
|
551 |
+
for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
|
552 |
+
$c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
|
553 |
+
}
|
554 |
+
|
555 |
+
$val = '(' . implode( ',', $c['val'] ) . ')';
|
556 |
+
} else {
|
557 |
+
$operator = ! empty( $c['op'] ) ? $c['op'] : '=';
|
558 |
+
$val = "'" . esc_sql( $c['val'] ) . "'";
|
559 |
+
}
|
560 |
+
|
561 |
+
$query .= "`{$c['col']}` {$operator} {$val}\n";
|
562 |
+
|
563 |
+
$first = false;
|
564 |
+
}
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
if ( ! is_array( $order ) ) {
|
569 |
+
$order = array(
|
570 |
+
'col' => 'id',
|
571 |
+
'order' => 'desc'
|
572 |
+
);
|
573 |
+
}
|
574 |
+
|
575 |
+
$query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
|
576 |
+
|
577 |
+
return $query;
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Load logs from DB.
|
582 |
+
*
|
583 |
+
* @author Vova Feldman (@svovaf)
|
584 |
+
* @since 1.2.1.6
|
585 |
+
*
|
586 |
+
* @param bool $filters
|
587 |
+
* @param int $limit
|
588 |
+
* @param int $offset
|
589 |
+
* @param bool $order
|
590 |
+
*
|
591 |
+
* @return object[]|null
|
592 |
+
*/
|
593 |
+
public static function load_db_logs(
|
594 |
+
$filters = false,
|
595 |
+
$limit = 200,
|
596 |
+
$offset = 0,
|
597 |
+
$order = false
|
598 |
+
) {
|
599 |
+
global $wpdb;
|
600 |
+
|
601 |
+
$query = self::build_db_logs_query(
|
602 |
+
$filters,
|
603 |
+
$limit,
|
604 |
+
$offset,
|
605 |
+
$order
|
606 |
+
);
|
607 |
+
|
608 |
+
return $wpdb->get_results( $query );
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Load logs from DB.
|
613 |
+
*
|
614 |
+
* @author Vova Feldman (@svovaf)
|
615 |
+
* @since 1.2.1.6
|
616 |
+
*
|
617 |
+
* @param bool $filters
|
618 |
+
* @param string $filename
|
619 |
+
* @param int $limit
|
620 |
+
* @param int $offset
|
621 |
+
* @param bool $order
|
622 |
+
*
|
623 |
+
* @return false|string File download URL or false on failure.
|
624 |
+
*/
|
625 |
+
public static function download_db_logs(
|
626 |
+
$filters = false,
|
627 |
+
$filename = '',
|
628 |
+
$limit = 10000,
|
629 |
+
$offset = 0,
|
630 |
+
$order = false
|
631 |
+
) {
|
632 |
+
global $wpdb;
|
633 |
+
|
634 |
+
$query = self::build_db_logs_query(
|
635 |
+
$filters,
|
636 |
+
$limit,
|
637 |
+
$offset,
|
638 |
+
$order,
|
639 |
+
true
|
640 |
+
);
|
641 |
+
|
642 |
+
$upload_dir = wp_upload_dir();
|
643 |
+
if ( empty( $filename ) ) {
|
644 |
+
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
645 |
+
}
|
646 |
+
$filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
|
647 |
+
|
648 |
+
$query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
|
649 |
+
|
650 |
+
$columns = '';
|
651 |
+
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
652 |
+
if ( $i > 0 ) {
|
653 |
+
$columns .= ', ';
|
654 |
+
}
|
655 |
+
|
656 |
+
$columns .= "'" . self::$_log_columns[ $i ] . "'";
|
657 |
+
}
|
658 |
+
|
659 |
+
$query = "SELECT {$columns} UNION ALL " . $query;
|
660 |
+
|
661 |
+
$result = $wpdb->query( $query );
|
662 |
+
|
663 |
+
if ( false === $result ) {
|
664 |
+
return false;
|
665 |
+
}
|
666 |
+
|
667 |
+
return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
|
668 |
+
}
|
669 |
+
|
670 |
+
/**
|
671 |
+
* @author Vova Feldman (@svovaf)
|
672 |
+
* @since 1.2.1.6
|
673 |
+
*
|
674 |
+
* @param string $filename
|
675 |
+
*
|
676 |
+
* @return string
|
677 |
+
*/
|
678 |
+
public static function get_logs_download_url( $filename = '' ) {
|
679 |
+
$upload_dir = wp_upload_dir();
|
680 |
+
if ( empty( $filename ) ) {
|
681 |
+
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
682 |
+
}
|
683 |
+
|
684 |
+
return rtrim( $upload_dir['url'], '/' ) . $filename;
|
685 |
+
}
|
686 |
+
|
687 |
+
#endregion
|
688 |
}
|
freemius/includes/class-fs-plugin-updater.php
CHANGED
@@ -128,7 +128,7 @@
|
|
128 |
$plugin_update_row = preg_replace(
|
129 |
'/(\<div.+>)(.+)(\<a.+\<a.+)\<\/div\>/is',
|
130 |
'$1 $2 ' . sprintf(
|
131 |
-
$this->_fs->
|
132 |
'<a href="' . $this->_fs->pricing_url() . '">', '</a>',
|
133 |
$r->new_version ) .
|
134 |
'$4',
|
@@ -355,7 +355,7 @@ if ( !isset($info->error) ) {
|
|
355 |
$data->version = $this->_fs->get_plugin_version();
|
356 |
} else {
|
357 |
if ( $is_addon ) {
|
358 |
-
$data->name = $addon->title . ' ' . $this->_fs->
|
359 |
$data->slug = $addon->slug;
|
360 |
$data->url = WP_FS__ADDRESS;
|
361 |
$data->package = $new_version->url;
|
@@ -487,7 +487,7 @@ if ( !isset($info->error) ) {
|
|
487 |
if ( ! empty( $plugin_id ) && ! FS_Plugin::is_valid_id( $plugin_id ) ) {
|
488 |
// Invalid plugin ID.
|
489 |
return array(
|
490 |
-
'message' => $this->_fs->
|
491 |
'code' => 'invalid_module_id',
|
492 |
);
|
493 |
}
|
@@ -501,29 +501,27 @@ if ( !isset($info->error) ) {
|
|
501 |
if ( ! is_object( $addon ) ) {
|
502 |
// Invalid add-on ID.
|
503 |
return array(
|
504 |
-
'message' => $this->_fs->
|
505 |
'code' => 'invalid_module_id',
|
506 |
);
|
507 |
}
|
508 |
|
509 |
$slug = $addon->slug;
|
510 |
-
$title = $addon->title . ' ' . $this->_fs->
|
511 |
|
512 |
$is_addon = true;
|
513 |
} else {
|
514 |
$slug = $this->_fs->get_slug();
|
515 |
$title = $this->_fs->get_plugin_title() .
|
516 |
-
( $this->_fs->is_addon() ? ' ' . $this->_fs->
|
517 |
}
|
518 |
|
519 |
if ( $this->is_premium_plugin_active( $plugin_id ) ) {
|
520 |
// Premium version already activated.
|
521 |
return array(
|
522 |
-
'message' => $
|
523 |
-
|
524 |
-
|
525 |
-
'auto-install-error-premium-activated'
|
526 |
-
),
|
527 |
'code' => 'premium_installed',
|
528 |
);
|
529 |
}
|
@@ -552,7 +550,7 @@ if ( !isset($info->error) ) {
|
|
552 |
|
553 |
$skin_args = array(
|
554 |
'type' => 'web',
|
555 |
-
'title' => sprintf( $this->_fs->
|
556 |
'url' => esc_url_raw( $install_url ),
|
557 |
'nonce' => 'install-plugin_' . $slug,
|
558 |
'plugin' => '',
|
@@ -593,7 +591,7 @@ if ( !isset($info->error) ) {
|
|
593 |
global $wp_filesystem;
|
594 |
|
595 |
$error_code = 'unable_to_connect_to_filesystem';
|
596 |
-
$error_message = $this->_fs->
|
597 |
|
598 |
// Pass through the error from WP_Filesystem if one was raised.
|
599 |
if ( $wp_filesystem instanceof WP_Filesystem_Base &&
|
@@ -699,7 +697,7 @@ if ( !isset($info->error) ) {
|
|
699 |
} else {
|
700 |
return new WP_Error(
|
701 |
'rename_failed',
|
702 |
-
$this->_fs->
|
703 |
array(
|
704 |
'found' => $subdir_name,
|
705 |
'expected' => $desired_slug
|
128 |
$plugin_update_row = preg_replace(
|
129 |
'/(\<div.+>)(.+)(\<a.+\<a.+)\<\/div\>/is',
|
130 |
'$1 $2 ' . sprintf(
|
131 |
+
$this->_fs->get_text_inline( '%sRenew your license now%s to access version %s features and support.', 'renew-license-now' ),
|
132 |
'<a href="' . $this->_fs->pricing_url() . '">', '</a>',
|
133 |
$r->new_version ) .
|
134 |
'$4',
|
355 |
$data->version = $this->_fs->get_plugin_version();
|
356 |
} else {
|
357 |
if ( $is_addon ) {
|
358 |
+
$data->name = $addon->title . ' ' . $this->_fs->get_text_inline( 'Add-On', 'addon' );
|
359 |
$data->slug = $addon->slug;
|
360 |
$data->url = WP_FS__ADDRESS;
|
361 |
$data->package = $new_version->url;
|
487 |
if ( ! empty( $plugin_id ) && ! FS_Plugin::is_valid_id( $plugin_id ) ) {
|
488 |
// Invalid plugin ID.
|
489 |
return array(
|
490 |
+
'message' => $this->_fs->get_text_inline( 'Invalid module ID.', 'auto-install-error-invalid-id' ),
|
491 |
'code' => 'invalid_module_id',
|
492 |
);
|
493 |
}
|
501 |
if ( ! is_object( $addon ) ) {
|
502 |
// Invalid add-on ID.
|
503 |
return array(
|
504 |
+
'message' => $this->_fs->get_text_inline( 'Invalid module ID.', 'auto-install-error-invalid-id' ),
|
505 |
'code' => 'invalid_module_id',
|
506 |
);
|
507 |
}
|
508 |
|
509 |
$slug = $addon->slug;
|
510 |
+
$title = $addon->title . ' ' . $this->_fs->get_text_inline( 'Add-On', 'addon' );
|
511 |
|
512 |
$is_addon = true;
|
513 |
} else {
|
514 |
$slug = $this->_fs->get_slug();
|
515 |
$title = $this->_fs->get_plugin_title() .
|
516 |
+
( $this->_fs->is_addon() ? ' ' . $this->_fs->get_text_inline( 'Add-On', 'addon' ) : '' );
|
517 |
}
|
518 |
|
519 |
if ( $this->is_premium_plugin_active( $plugin_id ) ) {
|
520 |
// Premium version already activated.
|
521 |
return array(
|
522 |
+
'message' => $is_addon ?
|
523 |
+
$this->_fs->get_text_inline( 'Premium add-on version already installed.', 'auto-install-error-premium-addon-activated' ) :
|
524 |
+
$this->_fs->get_text_inline( 'Premium version already active.', 'auto-install-error-premium-activated' ),
|
|
|
|
|
525 |
'code' => 'premium_installed',
|
526 |
);
|
527 |
}
|
550 |
|
551 |
$skin_args = array(
|
552 |
'type' => 'web',
|
553 |
+
'title' => sprintf( $this->_fs->get_text_inline( 'Installing plugin: %s', 'installing-plugin-x' ), $title ),
|
554 |
'url' => esc_url_raw( $install_url ),
|
555 |
'nonce' => 'install-plugin_' . $slug,
|
556 |
'plugin' => '',
|
591 |
global $wp_filesystem;
|
592 |
|
593 |
$error_code = 'unable_to_connect_to_filesystem';
|
594 |
+
$error_message = $this->_fs->get_text_inline( 'Unable to connect to the filesystem. Please confirm your credentials.' );
|
595 |
|
596 |
// Pass through the error from WP_Filesystem if one was raised.
|
597 |
if ( $wp_filesystem instanceof WP_Filesystem_Base &&
|
697 |
} else {
|
698 |
return new WP_Error(
|
699 |
'rename_failed',
|
700 |
+
$this->_fs->get_text_inline( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'module-package-rename-failure' ),
|
701 |
array(
|
702 |
'found' => $subdir_name,
|
703 |
'expected' => $desired_slug
|
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 |
+
}
|
freemius/includes/customizer/class-fs-customizer-support-section.php
CHANGED
@@ -52,19 +52,19 @@
|
|
52 |
$json['theme_title'] = $this->fs->get_plugin_name();
|
53 |
|
54 |
if ( $is_contact_visible && $is_support_visible ) {
|
55 |
-
$json['theme_title'] .= ' ' . $this->fs->
|
56 |
}
|
57 |
|
58 |
if ( $is_contact_visible ) {
|
59 |
$json['contact'] = array(
|
60 |
-
'label' => $this->fs->
|
61 |
'url' => $this->fs->contact_url(),
|
62 |
);
|
63 |
}
|
64 |
|
65 |
if ( $is_support_visible ) {
|
66 |
$json['support'] = array(
|
67 |
-
'label' => $this->fs->
|
68 |
'url' => $this->fs->get_support_forum_url()
|
69 |
);
|
70 |
}
|
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 |
}
|
freemius/includes/customizer/class-fs-customizer-upsell-control.php
CHANGED
@@ -49,7 +49,7 @@
|
|
49 |
* Json conversion
|
50 |
*/
|
51 |
public function to_json() {
|
52 |
-
$pricing_cta = esc_html( $this->fs->
|
53 |
|
54 |
parent::to_json();
|
55 |
|
@@ -103,7 +103,7 @@
|
|
103 |
$this->json['plans'] = $pricing->plans;
|
104 |
|
105 |
$this->json['strings'] = array(
|
106 |
-
'plan' => $this->fs->
|
107 |
);
|
108 |
}
|
109 |
|
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 |
|
103 |
$this->json['plans'] = $pricing->plans;
|
104 |
|
105 |
$this->json['strings'] = array(
|
106 |
+
'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
|
107 |
);
|
108 |
}
|
109 |
|
freemius/includes/customizer/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/includes/debug/class-fs-debug-bar-panel.php
CHANGED
@@ -45,7 +45,7 @@
|
|
45 |
$total_time += $l['total'];
|
46 |
}
|
47 |
|
48 |
-
return number_format( 100 * $total_time, 2 ) . ' ' .
|
49 |
}
|
50 |
|
51 |
function render() {
|
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() {
|
freemius/includes/debug/debug-bar-start.php
CHANGED
@@ -38,8 +38,8 @@
|
|
38 |
require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
|
39 |
$statuses[] = array(
|
40 |
'fs_api_requests',
|
41 |
-
|
42 |
-
Freemius_Debug_Bar_Panel::requests_count() . ' ' .
|
43 |
' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
|
44 |
);
|
45 |
}
|
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 |
}
|
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 |
}
|
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 |
}
|
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 |
}
|
freemius/includes/entities/class-fs-entity.php
CHANGED
@@ -1,149 +1,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 |
}
|
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 |
}
|
freemius/includes/entities/class-fs-payment.php
CHANGED
@@ -1,94 +1,94 @@
|
|
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 |
-
* @var number
|
47 |
-
*/
|
48 |
-
public $bound_payment_id;
|
49 |
-
/**
|
50 |
-
* @var string
|
51 |
-
*/
|
52 |
-
public $external_id;
|
53 |
-
/**
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
public $gateway;
|
57 |
-
/**
|
58 |
-
* @var string ISO 3166-1 alpha-2 - two-letter country code.
|
59 |
-
*
|
60 |
-
* @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
|
61 |
-
*/
|
62 |
-
public $country_code;
|
63 |
-
/**
|
64 |
-
* @var string
|
65 |
-
*/
|
66 |
-
public $vat_id;
|
67 |
-
/**
|
68 |
-
* @var float Actual Tax / VAT in $$$
|
69 |
-
*/
|
70 |
-
public $vat;
|
71 |
-
|
72 |
-
#endregion Properties
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @param object|bool $payment
|
76 |
-
*/
|
77 |
-
function __construct( $payment = false ) {
|
78 |
-
parent::__construct( $payment );
|
79 |
-
}
|
80 |
-
|
81 |
-
static function get_type() {
|
82 |
-
return 'payment';
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @author Vova Feldman (@svovaf)
|
87 |
-
* @since 1.0.0
|
88 |
-
*
|
89 |
-
* @return bool
|
90 |
-
*/
|
91 |
-
function is_refund() {
|
92 |
-
return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
|
93 |
-
}
|
94 |
}
|
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 |
+
* @var number
|
47 |
+
*/
|
48 |
+
public $bound_payment_id;
|
49 |
+
/**
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
public $external_id;
|
53 |
+
/**
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
public $gateway;
|
57 |
+
/**
|
58 |
+
* @var string ISO 3166-1 alpha-2 - two-letter country code.
|
59 |
+
*
|
60 |
+
* @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
|
61 |
+
*/
|
62 |
+
public $country_code;
|
63 |
+
/**
|
64 |
+
* @var string
|
65 |
+
*/
|
66 |
+
public $vat_id;
|
67 |
+
/**
|
68 |
+
* @var float Actual Tax / VAT in $$$
|
69 |
+
*/
|
70 |
+
public $vat;
|
71 |
+
|
72 |
+
#endregion Properties
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @param object|bool $payment
|
76 |
+
*/
|
77 |
+
function __construct( $payment = false ) {
|
78 |
+
parent::__construct( $payment );
|
79 |
+
}
|
80 |
+
|
81 |
+
static function get_type() {
|
82 |
+
return 'payment';
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @author Vova Feldman (@svovaf)
|
87 |
+
* @since 1.0.0
|
88 |
+
*
|
89 |
+
* @return bool
|
90 |
+
*/
|
91 |
+
function is_refund() {
|
92 |
+
return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
|
93 |
+
}
|
94 |
}
|
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 |
}
|
freemius/includes/entities/class-fs-plugin-license.php
CHANGED
@@ -1,224 +1,224 @@
|
|
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_License
|
15 |
-
*/
|
16 |
-
class FS_Plugin_License extends FS_Entity {
|
17 |
-
|
18 |
-
#region Properties
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var number
|
22 |
-
*/
|
23 |
-
public $plugin_id;
|
24 |
-
/**
|
25 |
-
* @var number
|
26 |
-
*/
|
27 |
-
public $user_id;
|
28 |
-
/**
|
29 |
-
* @var number
|
30 |
-
*/
|
31 |
-
public $plan_id;
|
32 |
-
/**
|
33 |
-
* @var number
|
34 |
-
*/
|
35 |
-
public $pricing_id;
|
36 |
-
/**
|
37 |
-
* @var int|null
|
38 |
-
*/
|
39 |
-
public $quota;
|
40 |
-
/**
|
41 |
-
* @var int
|
42 |
-
*/
|
43 |
-
public $activated;
|
44 |
-
/**
|
45 |
-
* @var int
|
46 |
-
*/
|
47 |
-
public $activated_local;
|
48 |
-
/**
|
49 |
-
* @var string
|
50 |
-
*/
|
51 |
-
public $expiration;
|
52 |
-
/**
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
public $secret_key;
|
56 |
-
/**
|
57 |
-
* @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
|
58 |
-
* license.
|
59 |
-
*/
|
60 |
-
public $is_free_localhost;
|
61 |
-
/**
|
62 |
-
* @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
|
63 |
-
* block updates and support.
|
64 |
-
*/
|
65 |
-
public $is_block_features;
|
66 |
-
/**
|
67 |
-
* @var bool
|
68 |
-
*/
|
69 |
-
public $is_cancelled;
|
70 |
-
|
71 |
-
#endregion Properties
|
72 |
-
|
73 |
-
/**
|
74 |
-
* @param stdClass|bool $license
|
75 |
-
*/
|
76 |
-
function __construct( $license = false ) {
|
77 |
-
parent::__construct( $license );
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Get entity type.
|
82 |
-
*
|
83 |
-
* @return string
|
84 |
-
*/
|
85 |
-
static function get_type() {
|
86 |
-
return 'license';
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Check how many site activations left.
|
91 |
-
*
|
92 |
-
* @author Vova Feldman (@svovaf)
|
93 |
-
* @since 1.0.5
|
94 |
-
*
|
95 |
-
* @return int
|
96 |
-
*/
|
97 |
-
function left() {
|
98 |
-
if ( ! $this->is_active() || $this->is_expired() ) {
|
99 |
-
return 0;
|
100 |
-
}
|
101 |
-
|
102 |
-
if ( $this->is_unlimited() ) {
|
103 |
-
return 999;
|
104 |
-
}
|
105 |
-
|
106 |
-
return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Check if single site license.
|
111 |
-
*
|
112 |
-
* @author Vova Feldman (@svovaf)
|
113 |
-
* @since 1.1.8.1
|
114 |
-
*
|
115 |
-
* @return bool
|
116 |
-
*/
|
117 |
-
function is_single_site() {
|
118 |
-
return ( is_numeric( $this->quota ) && 1 == $this->quota );
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @author Vova Feldman (@svovaf)
|
123 |
-
* @since 1.0.5
|
124 |
-
*
|
125 |
-
* @return bool
|
126 |
-
*/
|
127 |
-
function is_expired() {
|
128 |
-
return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Check if license is not expired.
|
133 |
-
*
|
134 |
-
* @author Vova Feldman (@svovaf)
|
135 |
-
* @since 1.2.1
|
136 |
-
*
|
137 |
-
* @return bool
|
138 |
-
*/
|
139 |
-
function is_valid() {
|
140 |
-
return ! $this->is_expired();
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* @author Vova Feldman (@svovaf)
|
145 |
-
* @since 1.0.6
|
146 |
-
*
|
147 |
-
* @return bool
|
148 |
-
*/
|
149 |
-
function is_lifetime() {
|
150 |
-
return is_null( $this->expiration );
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* @author Vova Feldman (@svovaf)
|
155 |
-
* @since 1.2.0
|
156 |
-
*
|
157 |
-
* @return bool
|
158 |
-
*/
|
159 |
-
function is_unlimited() {
|
160 |
-
return is_null( $this->quota );
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Check if license is fully utilized.
|
165 |
-
*
|
166 |
-
* @author Vova Feldman (@svovaf)
|
167 |
-
* @since 1.0.6
|
168 |
-
*
|
169 |
-
* @param bool $is_localhost
|
170 |
-
*
|
171 |
-
* @return bool
|
172 |
-
*/
|
173 |
-
function is_utilized( $is_localhost = null ) {
|
174 |
-
if ( is_null( $is_localhost ) ) {
|
175 |
-
$is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
|
176 |
-
}
|
177 |
-
|
178 |
-
if ( $this->is_unlimited() ) {
|
179 |
-
return false;
|
180 |
-
}
|
181 |
-
|
182 |
-
return ! ( $this->is_free_localhost && $is_localhost ) &&
|
183 |
-
( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* @author Vova Feldman (@svovaf)
|
188 |
-
* @since 1.2.1
|
189 |
-
*
|
190 |
-
* @return bool
|
191 |
-
*/
|
192 |
-
function is_active() {
|
193 |
-
return ( ! $this->is_cancelled );
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Check if license's plan features are enabled.
|
198 |
-
*
|
199 |
-
* - Either if plan not expired
|
200 |
-
* - If expired, based on the configuration to block features or not.
|
201 |
-
*
|
202 |
-
* @author Vova Feldman (@svovaf)
|
203 |
-
* @since 1.0.6
|
204 |
-
*
|
205 |
-
* @return bool
|
206 |
-
*/
|
207 |
-
function is_features_enabled() {
|
208 |
-
return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Subscription considered to be new without any payments
|
213 |
-
* if the license expires in less than 24 hours
|
214 |
-
* from the license creation.
|
215 |
-
*
|
216 |
-
* @author Vova Feldman (@svovaf)
|
217 |
-
* @since 1.0.9
|
218 |
-
*
|
219 |
-
* @return bool
|
220 |
-
*/
|
221 |
-
function is_first_payment_pending() {
|
222 |
-
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
|
223 |
-
}
|
224 |
-
}
|
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_License
|
15 |
+
*/
|
16 |
+
class FS_Plugin_License extends FS_Entity {
|
17 |
+
|
18 |
+
#region Properties
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var number
|
22 |
+
*/
|
23 |
+
public $plugin_id;
|
24 |
+
/**
|
25 |
+
* @var number
|
26 |
+
*/
|
27 |
+
public $user_id;
|
28 |
+
/**
|
29 |
+
* @var number
|
30 |
+
*/
|
31 |
+
public $plan_id;
|
32 |
+
/**
|
33 |
+
* @var number
|
34 |
+
*/
|
35 |
+
public $pricing_id;
|
36 |
+
/**
|
37 |
+
* @var int|null
|
38 |
+
*/
|
39 |
+
public $quota;
|
40 |
+
/**
|
41 |
+
* @var int
|
42 |
+
*/
|
43 |
+
public $activated;
|
44 |
+
/**
|
45 |
+
* @var int
|
46 |
+
*/
|
47 |
+
public $activated_local;
|
48 |
+
/**
|
49 |
+
* @var string
|
50 |
+
*/
|
51 |
+
public $expiration;
|
52 |
+
/**
|
53 |
+
* @var string
|
54 |
+
*/
|
55 |
+
public $secret_key;
|
56 |
+
/**
|
57 |
+
* @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
|
58 |
+
* license.
|
59 |
+
*/
|
60 |
+
public $is_free_localhost;
|
61 |
+
/**
|
62 |
+
* @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
|
63 |
+
* block updates and support.
|
64 |
+
*/
|
65 |
+
public $is_block_features;
|
66 |
+
/**
|
67 |
+
* @var bool
|
68 |
+
*/
|
69 |
+
public $is_cancelled;
|
70 |
+
|
71 |
+
#endregion Properties
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @param stdClass|bool $license
|
75 |
+
*/
|
76 |
+
function __construct( $license = false ) {
|
77 |
+
parent::__construct( $license );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get entity type.
|
82 |
+
*
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
+
static function get_type() {
|
86 |
+
return 'license';
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Check how many site activations left.
|
91 |
+
*
|
92 |
+
* @author Vova Feldman (@svovaf)
|
93 |
+
* @since 1.0.5
|
94 |
+
*
|
95 |
+
* @return int
|
96 |
+
*/
|
97 |
+
function left() {
|
98 |
+
if ( ! $this->is_active() || $this->is_expired() ) {
|
99 |
+
return 0;
|
100 |
+
}
|
101 |
+
|
102 |
+
if ( $this->is_unlimited() ) {
|
103 |
+
return 999;
|
104 |
+
}
|
105 |
+
|
106 |
+
return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Check if single site license.
|
111 |
+
*
|
112 |
+
* @author Vova Feldman (@svovaf)
|
113 |
+
* @since 1.1.8.1
|
114 |
+
*
|
115 |
+
* @return bool
|
116 |
+
*/
|
117 |
+
function is_single_site() {
|
118 |
+
return ( is_numeric( $this->quota ) && 1 == $this->quota );
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @author Vova Feldman (@svovaf)
|
123 |
+
* @since 1.0.5
|
124 |
+
*
|
125 |
+
* @return bool
|
126 |
+
*/
|
127 |
+
function is_expired() {
|
128 |
+
return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Check if license is not expired.
|
133 |
+
*
|
134 |
+
* @author Vova Feldman (@svovaf)
|
135 |
+
* @since 1.2.1
|
136 |
+
*
|
137 |
+
* @return bool
|
138 |
+
*/
|
139 |
+
function is_valid() {
|
140 |
+
return ! $this->is_expired();
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* @author Vova Feldman (@svovaf)
|
145 |
+
* @since 1.0.6
|
146 |
+
*
|
147 |
+
* @return bool
|
148 |
+
*/
|
149 |
+
function is_lifetime() {
|
150 |
+
return is_null( $this->expiration );
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @author Vova Feldman (@svovaf)
|
155 |
+
* @since 1.2.0
|
156 |
+
*
|
157 |
+
* @return bool
|
158 |
+
*/
|
159 |
+
function is_unlimited() {
|
160 |
+
return is_null( $this->quota );
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Check if license is fully utilized.
|
165 |
+
*
|
166 |
+
* @author Vova Feldman (@svovaf)
|
167 |
+
* @since 1.0.6
|
168 |
+
*
|
169 |
+
* @param bool $is_localhost
|
170 |
+
*
|
171 |
+
* @return bool
|
172 |
+
*/
|
173 |
+
function is_utilized( $is_localhost = null ) {
|
174 |
+
if ( is_null( $is_localhost ) ) {
|
175 |
+
$is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
|
176 |
+
}
|
177 |
+
|
178 |
+
if ( $this->is_unlimited() ) {
|
179 |
+
return false;
|
180 |
+
}
|
181 |
+
|
182 |
+
return ! ( $this->is_free_localhost && $is_localhost ) &&
|
183 |
+
( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* @author Vova Feldman (@svovaf)
|
188 |
+
* @since 1.2.1
|
189 |
+
*
|
190 |
+
* @return bool
|
191 |
+
*/
|
192 |
+
function is_active() {
|
193 |
+
return ( ! $this->is_cancelled );
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Check if license's plan features are enabled.
|
198 |
+
*
|
199 |
+
* - Either if plan not expired
|
200 |
+
* - If expired, based on the configuration to block features or not.
|
201 |
+
*
|
202 |
+
* @author Vova Feldman (@svovaf)
|
203 |
+
* @since 1.0.6
|
204 |
+
*
|
205 |
+
* @return bool
|
206 |
+
*/
|
207 |
+
function is_features_enabled() {
|
208 |
+
return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Subscription considered to be new without any payments
|
213 |
+
* if the license expires in less than 24 hours
|
214 |
+
* from the license creation.
|
215 |
+
*
|
216 |
+
* @author Vova Feldman (@svovaf)
|
217 |
+
* @since 1.0.9
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
*/
|
221 |
+
function is_first_payment_pending() {
|
222 |
+
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
|
223 |
+
}
|
224 |
+
}
|
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 |
}
|
freemius/includes/entities/class-fs-plugin-tag.php
CHANGED
@@ -1,24 +1,24 @@
|
|
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_Plugin_Tag extends FS_Entity {
|
14 |
-
public $version;
|
15 |
-
public $url;
|
16 |
-
|
17 |
-
function __construct( $tag = false ) {
|
18 |
-
parent::__construct( $tag );
|
19 |
-
}
|
20 |
-
|
21 |
-
static function get_type() {
|
22 |
-
return 'tag';
|
23 |
-
}
|
24 |
}
|
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_Plugin_Tag extends FS_Entity {
|
14 |
+
public $version;
|
15 |
+
public $url;
|
16 |
+
|
17 |
+
function __construct( $tag = false ) {
|
18 |
+
parent::__construct( $tag );
|
19 |
+
}
|
20 |
+
|
21 |
+
static function get_type() {
|
22 |
+
return 'tag';
|
23 |
+
}
|
24 |
}
|
freemius/includes/entities/class-fs-plugin.php
CHANGED
@@ -1,117 +1,117 @@
|
|
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 |
-
* @since 1.2.2
|
29 |
-
*
|
30 |
-
* @var string 'plugin' or 'theme'
|
31 |
-
*/
|
32 |
-
public $type;
|
33 |
-
|
34 |
-
#region Install Specific Properties
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @var string
|
38 |
-
*/
|
39 |
-
public $file;
|
40 |
-
/**
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
public $version;
|
44 |
-
/**
|
45 |
-
* @var bool
|
46 |
-
*/
|
47 |
-
public $auto_update;
|
48 |
-
/**
|
49 |
-
* @var FS_Plugin_Info
|
50 |
-
*/
|
51 |
-
public $info;
|
52 |
-
/**
|
53 |
-
* @since 1.0.9
|
54 |
-
*
|
55 |
-
* @var bool
|
56 |
-
*/
|
57 |
-
public $is_premium;
|
58 |
-
/**
|
59 |
-
* @since 1.0.9
|
60 |
-
*
|
61 |
-
* @var bool
|
62 |
-
*/
|
63 |
-
public $is_live;
|
64 |
-
/**
|
65 |
-
* @author Leo Fajardo (@leorw)
|
66 |
-
*
|
67 |
-
* @since 1.2.3
|
68 |
-
*
|
69 |
-
* @var string|false false if the module doesn't have an affiliate program or one of the following:
|
70 |
-
* 'selected', 'customers', or 'all'.
|
71 |
-
*/
|
72 |
-
public $affiliate_moderation;
|
73 |
-
|
74 |
-
const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
|
75 |
-
|
76 |
-
#endregion Install Specific Properties
|
77 |
-
|
78 |
-
/**
|
79 |
-
* @param stdClass|bool $plugin
|
80 |
-
*/
|
81 |
-
function __construct( $plugin = false ) {
|
82 |
-
parent::__construct( $plugin );
|
83 |
-
|
84 |
-
$this->is_premium = false;
|
85 |
-
$this->is_live = true;
|
86 |
-
|
87 |
-
if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
|
88 |
-
$this->info = new FS_Plugin_Info( $plugin->info );
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Check if plugin is an add-on (has parent).
|
94 |
-
*
|
95 |
-
* @author Vova Feldman (@svovaf)
|
96 |
-
* @since 1.0.6
|
97 |
-
*
|
98 |
-
* @return bool
|
99 |
-
*/
|
100 |
-
function is_addon() {
|
101 |
-
return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* @author Leo Fajardo (@leorw)
|
106 |
-
* @since 1.2.3
|
107 |
-
*
|
108 |
-
* @return bool
|
109 |
-
*/
|
110 |
-
function has_affiliate_program() {
|
111 |
-
return ( ! empty( $this->affiliate_moderation ) );
|
112 |
-
}
|
113 |
-
|
114 |
-
static function get_type() {
|
115 |
-
return 'plugin';
|
116 |
-
}
|
117 |
}
|
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 |
+
* @since 1.2.2
|
29 |
+
*
|
30 |
+
* @var string 'plugin' or 'theme'
|
31 |
+
*/
|
32 |
+
public $type;
|
33 |
+
|
34 |
+
#region Install Specific Properties
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file;
|
40 |
+
/**
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
public $version;
|
44 |
+
/**
|
45 |
+
* @var bool
|
46 |
+
*/
|
47 |
+
public $auto_update;
|
48 |
+
/**
|
49 |
+
* @var FS_Plugin_Info
|
50 |
+
*/
|
51 |
+
public $info;
|
52 |
+
/**
|
53 |
+
* @since 1.0.9
|
54 |
+
*
|
55 |
+
* @var bool
|
56 |
+
*/
|
57 |
+
public $is_premium;
|
58 |
+
/**
|
59 |
+
* @since 1.0.9
|
60 |
+
*
|
61 |
+
* @var bool
|
62 |
+
*/
|
63 |
+
public $is_live;
|
64 |
+
/**
|
65 |
+
* @author Leo Fajardo (@leorw)
|
66 |
+
*
|
67 |
+
* @since 1.2.3
|
68 |
+
*
|
69 |
+
* @var string|false false if the module doesn't have an affiliate program or one of the following:
|
70 |
+
* 'selected', 'customers', or 'all'.
|
71 |
+
*/
|
72 |
+
public $affiliate_moderation;
|
73 |
+
|
74 |
+
const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
|
75 |
+
|
76 |
+
#endregion Install Specific Properties
|
77 |
+
|
78 |
+
/**
|
79 |
+
* @param stdClass|bool $plugin
|
80 |
+
*/
|
81 |
+
function __construct( $plugin = false ) {
|
82 |
+
parent::__construct( $plugin );
|
83 |
+
|
84 |
+
$this->is_premium = false;
|
85 |
+
$this->is_live = true;
|
86 |
+
|
87 |
+
if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
|
88 |
+
$this->info = new FS_Plugin_Info( $plugin->info );
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Check if plugin is an add-on (has parent).
|
94 |
+
*
|
95 |
+
* @author Vova Feldman (@svovaf)
|
96 |
+
* @since 1.0.6
|
97 |
+
*
|
98 |
+
* @return bool
|
99 |
+
*/
|
100 |
+
function is_addon() {
|
101 |
+
return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* @author Leo Fajardo (@leorw)
|
106 |
+
* @since 1.2.3
|
107 |
+
*
|
108 |
+
* @return bool
|
109 |
+
*/
|
110 |
+
function has_affiliate_program() {
|
111 |
+
return ( ! empty( $this->affiliate_moderation ) );
|
112 |
+
}
|
113 |
+
|
114 |
+
static function get_type() {
|
115 |
+
return 'plugin';
|
116 |
+
}
|
117 |
}
|
freemius/includes/entities/class-fs-pricing.php
CHANGED
@@ -1,141 +1,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 |
-
#endregion Properties
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @param object|bool $pricing
|
42 |
-
*/
|
43 |
-
function __construct( $pricing = false ) {
|
44 |
-
parent::__construct( $pricing );
|
45 |
-
}
|
46 |
-
|
47 |
-
static function get_type() {
|
48 |
-
return 'pricing';
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @author Vova Feldman (@svovaf)
|
53 |
-
* @since 1.1.8
|
54 |
-
*
|
55 |
-
* @return bool
|
56 |
-
*/
|
57 |
-
function has_monthly() {
|
58 |
-
return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* @author Vova Feldman (@svovaf)
|
63 |
-
* @since 1.1.8
|
64 |
-
*
|
65 |
-
* @return bool
|
66 |
-
*/
|
67 |
-
function has_annual() {
|
68 |
-
return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* @author Vova Feldman (@svovaf)
|
73 |
-
* @since 1.1.8
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
function has_lifetime() {
|
78 |
-
return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Check if unlimited licenses pricing.
|
83 |
-
*
|
84 |
-
* @author Vova Feldman (@svovaf)
|
85 |
-
* @since 1.1.8
|
86 |
-
*
|
87 |
-
* @return bool
|
88 |
-
*/
|
89 |
-
function is_unlimited() {
|
90 |
-
return is_null( $this->licenses );
|
91 |
-
}
|
92 |
-
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Check if pricing has more than one billing cycle.
|
96 |
-
*
|
97 |
-
* @author Vova Feldman (@svovaf)
|
98 |
-
* @since 1.1.8
|
99 |
-
*
|
100 |
-
* @return bool
|
101 |
-
*/
|
102 |
-
function is_multi_cycle() {
|
103 |
-
$cycles = 0;
|
104 |
-
if ( $this->has_monthly() ) {
|
105 |
-
$cycles ++;
|
106 |
-
}
|
107 |
-
if ( $this->has_annual() ) {
|
108 |
-
$cycles ++;
|
109 |
-
}
|
110 |
-
if ( $this->has_lifetime() ) {
|
111 |
-
$cycles ++;
|
112 |
-
}
|
113 |
-
|
114 |
-
return $cycles > 1;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Get annual over monthly discount.
|
119 |
-
*
|
120 |
-
* @author Vova Feldman (@svovaf)
|
121 |
-
* @since 1.1.8
|
122 |
-
*
|
123 |
-
* @return int
|
124 |
-
*/
|
125 |
-
function annual_discount_percentage() {
|
126 |
-
return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Get annual over monthly savings.
|
131 |
-
*
|
132 |
-
* @author Vova Feldman (@svovaf)
|
133 |
-
* @since 1.1.8
|
134 |
-
*
|
135 |
-
* @return float
|
136 |
-
*/
|
137 |
-
function annual_savings() {
|
138 |
-
return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
|
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 |
+
#endregion Properties
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param object|bool $pricing
|
42 |
+
*/
|
43 |
+
function __construct( $pricing = false ) {
|
44 |
+
parent::__construct( $pricing );
|
45 |
+
}
|
46 |
+
|
47 |
+
static function get_type() {
|
48 |
+
return 'pricing';
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @author Vova Feldman (@svovaf)
|
53 |
+
* @since 1.1.8
|
54 |
+
*
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
function has_monthly() {
|
58 |
+
return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @author Vova Feldman (@svovaf)
|
63 |
+
* @since 1.1.8
|
64 |
+
*
|
65 |
+
* @return bool
|
66 |
+
*/
|
67 |
+
function has_annual() {
|
68 |
+
return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @author Vova Feldman (@svovaf)
|
73 |
+
* @since 1.1.8
|
74 |
+
*
|
75 |
+
* @return bool
|
76 |
+
*/
|
77 |
+
function has_lifetime() {
|
78 |
+
return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Check if unlimited licenses pricing.
|
83 |
+
*
|
84 |
+
* @author Vova Feldman (@svovaf)
|
85 |
+
* @since 1.1.8
|
86 |
+
*
|
87 |
+
* @return bool
|
88 |
+
*/
|
89 |
+
function is_unlimited() {
|
90 |
+
return is_null( $this->licenses );
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Check if pricing has more than one billing cycle.
|
96 |
+
*
|
97 |
+
* @author Vova Feldman (@svovaf)
|
98 |
+
* @since 1.1.8
|
99 |
+
*
|
100 |
+
* @return bool
|
101 |
+
*/
|
102 |
+
function is_multi_cycle() {
|
103 |
+
$cycles = 0;
|
104 |
+
if ( $this->has_monthly() ) {
|
105 |
+
$cycles ++;
|
106 |
+
}
|
107 |
+
if ( $this->has_annual() ) {
|
108 |
+
$cycles ++;
|
109 |
+
}
|
110 |
+
if ( $this->has_lifetime() ) {
|
111 |
+
$cycles ++;
|
112 |
+
}
|
113 |
+
|
114 |
+
return $cycles > 1;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Get annual over monthly discount.
|
119 |
+
*
|
120 |
+
* @author Vova Feldman (@svovaf)
|
121 |
+
* @since 1.1.8
|
122 |
+
*
|
123 |
+
* @return int
|
124 |
+
*/
|
125 |
+
function annual_discount_percentage() {
|
126 |
+
return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Get annual over monthly savings.
|
131 |
+
*
|
132 |
+
* @author Vova Feldman (@svovaf)
|
133 |
+
* @since 1.1.8
|
134 |
+
*
|
135 |
+
* @return float
|
136 |
+
*/
|
137 |
+
function annual_savings() {
|
138 |
+
return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
|
139 |
+
}
|
140 |
+
|
141 |
}
|
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 |
}
|
freemius/includes/entities/class-fs-site.php
CHANGED
@@ -1,148 +1,148 @@
|
|
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 string
|
16 |
-
*/
|
17 |
-
public $slug;
|
18 |
-
/**
|
19 |
-
* @var number
|
20 |
-
*/
|
21 |
-
public $site_id;
|
22 |
-
/**
|
23 |
-
* @var number
|
24 |
-
*/
|
25 |
-
public $plugin_id;
|
26 |
-
/**
|
27 |
-
* @var number
|
28 |
-
*/
|
29 |
-
public $user_id;
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $title;
|
34 |
-
/**
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public $url;
|
38 |
-
/**
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
public $version;
|
42 |
-
/**
|
43 |
-
* @var string E.g. en-GB
|
44 |
-
*/
|
45 |
-
public $language;
|
46 |
-
/**
|
47 |
-
* @var string E.g. UTF-8
|
48 |
-
*/
|
49 |
-
public $charset;
|
50 |
-
/**
|
51 |
-
* @var string Platform version (e.g WordPress version).
|
52 |
-
*/
|
53 |
-
public $platform_version;
|
54 |
-
/**
|
55 |
-
* Freemius SDK version
|
56 |
-
*
|
57 |
-
* @author Leo Fajardo (@leorw)
|
58 |
-
* @since 1.2.2
|
59 |
-
*
|
60 |
-
* @var string SDK version (e.g.: 1.2.2)
|
61 |
-
*/
|
62 |
-
public $sdk_version;
|
63 |
-
/**
|
64 |
-
* @var string Programming language version (e.g PHP version).
|
65 |
-
*/
|
66 |
-
public $programming_language_version;
|
67 |
-
/**
|
68 |
-
* @var FS_Plugin_Plan $plan
|
69 |
-
*/
|
70 |
-
public $plan;
|
71 |
-
/**
|
72 |
-
* @var number|null
|
73 |
-
*/
|
74 |
-
public $license_id;
|
75 |
-
/**
|
76 |
-
* @var number|null
|
77 |
-
*/
|
78 |
-
public $trial_plan_id;
|
79 |
-
/**
|
80 |
-
* @var string|null
|
81 |
-
*/
|
82 |
-
public $trial_ends;
|
83 |
-
/**
|
84 |
-
* @since 1.0.9
|
85 |
-
*
|
86 |
-
* @var bool
|
87 |
-
*/
|
88 |
-
public $is_premium = false;
|
89 |
-
/**
|
90 |
-
* @author Leo Fajardo (@leorw)
|
91 |
-
*
|
92 |
-
* @since 1.2.1.5
|
93 |
-
*
|
94 |
-
* @var bool
|
95 |
-
*/
|
96 |
-
public $is_disconnected = false;
|
97 |
-
|
98 |
-
/**
|
99 |
-
* @param stdClass|bool $site
|
100 |
-
*/
|
101 |
-
function __construct( $site = false ) {
|
102 |
-
$this->plan = new FS_Plugin_Plan();
|
103 |
-
|
104 |
-
parent::__construct( $site );
|
105 |
-
|
106 |
-
if ( is_object( $site ) ) {
|
107 |
-
$this->plan->id = $site->plan_id;
|
108 |
-
}
|
109 |
-
|
110 |
-
if ( ! is_bool( $this->is_disconnected ) ) {
|
111 |
-
$this->is_disconnected = false;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
static function get_type() {
|
116 |
-
return 'install';
|
117 |
-
}
|
118 |
-
|
119 |
-
function is_localhost() {
|
120 |
-
// The server has no way to verify if localhost unless localhost appears in domain.
|
121 |
-
return WP_FS__IS_LOCALHOST_FOR_SERVER;
|
122 |
-
// return (substr($_SERVER['REMOTE_ADDR'], 0, 4) == '127.' || $_SERVER['REMOTE_ADDR'] == '::1');
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Check if site in trial.
|
127 |
-
*
|
128 |
-
* @author Vova Feldman (@svovaf)
|
129 |
-
* @since 1.0.9
|
130 |
-
*
|
131 |
-
* @return bool
|
132 |
-
*/
|
133 |
-
function is_trial() {
|
134 |
-
return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Check if user already utilized the trial with the current install.
|
139 |
-
*
|
140 |
-
* @author Vova Feldman (@svovaf)
|
141 |
-
* @since 1.0.9
|
142 |
-
*
|
143 |
-
* @return bool
|
144 |
-
*/
|
145 |
-
function is_trial_utilized() {
|
146 |
-
return is_numeric( $this->trial_plan_id );
|
147 |
-
}
|
148 |
}
|
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 string
|
16 |
+
*/
|
17 |
+
public $slug;
|
18 |
+
/**
|
19 |
+
* @var number
|
20 |
+
*/
|
21 |
+
public $site_id;
|
22 |
+
/**
|
23 |
+
* @var number
|
24 |
+
*/
|
25 |
+
public $plugin_id;
|
26 |
+
/**
|
27 |
+
* @var number
|
28 |
+
*/
|
29 |
+
public $user_id;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $title;
|
34 |
+
/**
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public $url;
|
38 |
+
/**
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
public $version;
|
42 |
+
/**
|
43 |
+
* @var string E.g. en-GB
|
44 |
+
*/
|
45 |
+
public $language;
|
46 |
+
/**
|
47 |
+
* @var string E.g. UTF-8
|
48 |
+
*/
|
49 |
+
public $charset;
|
50 |
+
/**
|
51 |
+
* @var string Platform version (e.g WordPress version).
|
52 |
+
*/
|
53 |
+
public $platform_version;
|
54 |
+
/**
|
55 |
+
* Freemius SDK version
|
56 |
+
*
|
57 |
+
* @author Leo Fajardo (@leorw)
|
58 |
+
* @since 1.2.2
|
59 |
+
*
|
60 |
+
* @var string SDK version (e.g.: 1.2.2)
|
61 |
+
*/
|
62 |
+
public $sdk_version;
|
63 |
+
/**
|
64 |
+
* @var string Programming language version (e.g PHP version).
|
65 |
+
*/
|
66 |
+
public $programming_language_version;
|
67 |
+
/**
|
68 |
+
* @var FS_Plugin_Plan $plan
|
69 |
+
*/
|
70 |
+
public $plan;
|
71 |
+
/**
|
72 |
+
* @var number|null
|
73 |
+
*/
|
74 |
+
public $license_id;
|
75 |
+
/**
|
76 |
+
* @var number|null
|
77 |
+
*/
|
78 |
+
public $trial_plan_id;
|
79 |
+
/**
|
80 |
+
* @var string|null
|
81 |
+
*/
|
82 |
+
public $trial_ends;
|
83 |
+
/**
|
84 |
+
* @since 1.0.9
|
85 |
+
*
|
86 |
+
* @var bool
|
87 |
+
*/
|
88 |
+
public $is_premium = false;
|
89 |
+
/**
|
90 |
+
* @author Leo Fajardo (@leorw)
|
91 |
+
*
|
92 |
+
* @since 1.2.1.5
|
93 |
+
*
|
94 |
+
* @var bool
|
95 |
+
*/
|
96 |
+
public $is_disconnected = false;
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @param stdClass|bool $site
|
100 |
+
*/
|
101 |
+
function __construct( $site = false ) {
|
102 |
+
$this->plan = new FS_Plugin_Plan();
|
103 |
+
|
104 |
+
parent::__construct( $site );
|
105 |
+
|
106 |
+
if ( is_object( $site ) ) {
|
107 |
+
$this->plan->id = $site->plan_id;
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( ! is_bool( $this->is_disconnected ) ) {
|
111 |
+
$this->is_disconnected = false;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
static function get_type() {
|
116 |
+
return 'install';
|
117 |
+
}
|
118 |
+
|
119 |
+
function is_localhost() {
|
120 |
+
// The server has no way to verify if localhost unless localhost appears in domain.
|
121 |
+
return WP_FS__IS_LOCALHOST_FOR_SERVER;
|
122 |
+
// return (substr($_SERVER['REMOTE_ADDR'], 0, 4) == '127.' || $_SERVER['REMOTE_ADDR'] == '::1');
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Check if site in trial.
|
127 |
+
*
|
128 |
+
* @author Vova Feldman (@svovaf)
|
129 |
+
* @since 1.0.9
|
130 |
+
*
|
131 |
+
* @return bool
|
132 |
+
*/
|
133 |
+
function is_trial() {
|
134 |
+
return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Check if user already utilized the trial with the current install.
|
139 |
+
*
|
140 |
+
* @author Vova Feldman (@svovaf)
|
141 |
+
* @since 1.0.9
|
142 |
+
*
|
143 |
+
* @return bool
|
144 |
+
*/
|
145 |
+
function is_trial_utilized() {
|
146 |
+
return is_numeric( $this->trial_plan_id );
|
147 |
+
}
|
148 |
}
|
freemius/includes/entities/class-fs-subscription.php
CHANGED
@@ -1,125 +1,125 @@
|
|
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 |
-
* @var string|null
|
71 |
-
*/
|
72 |
-
public $vat_id;
|
73 |
-
/**
|
74 |
-
* @var string Two characters country code
|
75 |
-
*/
|
76 |
-
public $country_code;
|
77 |
-
|
78 |
-
#endregion Properties
|
79 |
-
|
80 |
-
/**
|
81 |
-
* @param object|bool $subscription
|
82 |
-
*/
|
83 |
-
function __construct( $subscription = false ) {
|
84 |
-
parent::__construct( $subscription );
|
85 |
-
}
|
86 |
-
|
87 |
-
static function get_type() {
|
88 |
-
return 'subscription';
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Check if subscription is active.
|
93 |
-
*
|
94 |
-
* @author Vova Feldman (@svovaf)
|
95 |
-
* @since 1.0.9
|
96 |
-
*
|
97 |
-
* @return bool
|
98 |
-
*/
|
99 |
-
function is_active() {
|
100 |
-
return ! empty( $this->next_payment ) &&
|
101 |
-
( strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME );
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Subscription considered to be new without any payments
|
106 |
-
* if the next payment should be made within less than 24 hours
|
107 |
-
* from the subscription creation.
|
108 |
-
*
|
109 |
-
* @author Vova Feldman (@svovaf)
|
110 |
-
* @since 1.0.9
|
111 |
-
*
|
112 |
-
* @return bool
|
113 |
-
*/
|
114 |
-
function is_first_payment_pending() {
|
115 |
-
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* @author Vova Feldman (@svovaf)
|
120 |
-
* @since 1.1.7
|
121 |
-
*/
|
122 |
-
function has_trial() {
|
123 |
-
return ! is_null( $this->trial_ends );
|
124 |
-
}
|
125 |
}
|
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 |
+
* @var string|null
|
71 |
+
*/
|
72 |
+
public $vat_id;
|
73 |
+
/**
|
74 |
+
* @var string Two characters country code
|
75 |
+
*/
|
76 |
+
public $country_code;
|
77 |
+
|
78 |
+
#endregion Properties
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @param object|bool $subscription
|
82 |
+
*/
|
83 |
+
function __construct( $subscription = false ) {
|
84 |
+
parent::__construct( $subscription );
|
85 |
+
}
|
86 |
+
|
87 |
+
static function get_type() {
|
88 |
+
return 'subscription';
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Check if subscription is active.
|
93 |
+
*
|
94 |
+
* @author Vova Feldman (@svovaf)
|
95 |
+
* @since 1.0.9
|
96 |
+
*
|
97 |
+
* @return bool
|
98 |
+
*/
|
99 |
+
function is_active() {
|
100 |
+
return ! empty( $this->next_payment ) &&
|
101 |
+
( strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME );
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Subscription considered to be new without any payments
|
106 |
+
* if the next payment should be made within less than 24 hours
|
107 |
+
* from the subscription creation.
|
108 |
+
*
|
109 |
+
* @author Vova Feldman (@svovaf)
|
110 |
+
* @since 1.0.9
|
111 |
+
*
|
112 |
+
* @return bool
|
113 |
+
*/
|
114 |
+
function is_first_payment_pending() {
|
115 |
+
return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @author Vova Feldman (@svovaf)
|
120 |
+
* @since 1.1.7
|
121 |
+
*/
|
122 |
+
function has_trial() {
|
123 |
+
return ! is_null( $this->trial_ends );
|
124 |
+
}
|
125 |
}
|
freemius/includes/entities/class-fs-user.php
CHANGED
@@ -1,62 +1,62 @@
|
|
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 |
-
* @var string|null
|
35 |
-
*/
|
36 |
-
public $customer_id;
|
37 |
-
/**
|
38 |
-
* @var float
|
39 |
-
*/
|
40 |
-
public $gross;
|
41 |
-
|
42 |
-
#endregion Properties
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @param object|bool $user
|
46 |
-
*/
|
47 |
-
function __construct( $user = false ) {
|
48 |
-
parent::__construct( $user );
|
49 |
-
}
|
50 |
-
|
51 |
-
function get_name() {
|
52 |
-
return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
|
53 |
-
}
|
54 |
-
|
55 |
-
function is_verified() {
|
56 |
-
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
57 |
-
}
|
58 |
-
|
59 |
-
static function get_type() {
|
60 |
-
return 'user';
|
61 |
-
}
|
62 |
}
|
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 |
+
* @var string|null
|
35 |
+
*/
|
36 |
+
public $customer_id;
|
37 |
+
/**
|
38 |
+
* @var float
|
39 |
+
*/
|
40 |
+
public $gross;
|
41 |
+
|
42 |
+
#endregion Properties
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @param object|bool $user
|
46 |
+
*/
|
47 |
+
function __construct( $user = false ) {
|
48 |
+
parent::__construct( $user );
|
49 |
+
}
|
50 |
+
|
51 |
+
function get_name() {
|
52 |
+
return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
function is_verified() {
|
56 |
+
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
57 |
+
}
|
58 |
+
|
59 |
+
static function get_type() {
|
60 |
+
return 'user';
|
61 |
+
}
|
62 |
}
|
freemius/includes/fs-core-functions.php
CHANGED
@@ -1,335 +1,381 @@
|
|
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 |
-
|
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 |
// switch ($errno) {
|
335 |
// case E_USER_ERROR:
|
@@ -343,344 +389,730 @@
|
|
343 |
// default:
|
344 |
// break;
|
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 |
-
|
404 |
-
|
405 |
-
|
406 |
|
407 |
// if ( ! isset( $parsed_url['host'] ) ) {
|
408 |
// return $url;
|
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 |
-
|
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 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
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 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
|
686 |
#endregion
|
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 |
+
if ( ! function_exists( 'fs_dummy' ) ) {
|
14 |
+
function fs_dummy() {
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
/* Url.
|
19 |
+
--------------------------------------------------------------------------------------------*/
|
20 |
+
if ( ! function_exists( 'fs_get_url_daily_cache_killer' ) ) {
|
21 |
+
function fs_get_url_daily_cache_killer() {
|
22 |
+
return date( '\YY\Mm\Dd' );
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
/* Templates / Views.
|
27 |
+
--------------------------------------------------------------------------------------------*/
|
28 |
+
if ( ! function_exists( 'fs_get_template_path' ) ) {
|
29 |
+
function fs_get_template_path( $path ) {
|
30 |
+
return WP_FS__DIR_TEMPLATES . '/' . trim( $path, '/' );
|
31 |
+
}
|
32 |
+
|
33 |
+
function fs_include_template( $path, &$params = null ) {
|
34 |
+
$VARS = &$params;
|
35 |
+
include fs_get_template_path( $path );
|
36 |
+
}
|
37 |
+
|
38 |
+
function fs_include_once_template( $path, &$params = null ) {
|
39 |
+
$VARS = &$params;
|
40 |
+
include_once fs_get_template_path( $path );
|
41 |
+
}
|
42 |
+
|
43 |
+
function fs_require_template( $path, &$params = null ) {
|
44 |
+
$VARS = &$params;
|
45 |
+
require fs_get_template_path( $path );
|
46 |
+
}
|
47 |
+
|
48 |
+
function fs_require_once_template( $path, &$params = null ) {
|
49 |
+
$VARS = &$params;
|
50 |
+
require_once fs_get_template_path( $path );
|
51 |
+
}
|
52 |
+
|
53 |
+
function fs_get_template( $path, &$params = null ) {
|
54 |
+
ob_start();
|
55 |
+
|
56 |
+
$VARS = &$params;
|
57 |
+
require fs_get_template_path( $path );
|
58 |
+
|
59 |
+
return ob_get_clean();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/* Scripts and styles including.
|
64 |
+
--------------------------------------------------------------------------------------------*/
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Generates an absolute URL to the given path. This function ensures that the URL will be correct whether the asset
|
68 |
+
* is inside a plugin's folder or a theme's folder.
|
69 |
+
*
|
70 |
+
* Examples:
|
71 |
+
* 1. "themes" folder
|
72 |
+
* Path: C:/xampp/htdocs/fswp/wp-content/themes/twentytwelve/freemius/assets/css/admin/common.css
|
73 |
+
* URL: http://fswp:8080/wp-content/themes/twentytwelve/freemius/assets/css/admin/common.css
|
74 |
+
*
|
75 |
+
* 2. "plugins" folder
|
76 |
+
* Path: C:/xampp/htdocs/fswp/wp-content/plugins/rating-widget-premium/freemius/assets/css/admin/common.css
|
77 |
+
* URL: http://fswp:8080/wp-content/plugins/rating-widget-premium/freemius/assets/css/admin/common.css
|
78 |
+
*
|
79 |
+
* @author Leo Fajardo (@leorw)
|
80 |
+
* @since 1.2.2
|
81 |
+
*
|
82 |
+
* @param string $asset_abs_path Asset's absolute path.
|
83 |
+
*
|
84 |
+
* @return string Asset's URL.
|
85 |
+
*/
|
86 |
+
function fs_asset_url( $asset_abs_path ) {
|
87 |
+
$wp_content_dir = fs_normalize_path( WP_CONTENT_DIR );
|
88 |
+
$asset_abs_path = fs_normalize_path( $asset_abs_path );
|
89 |
+
$asset_rel_path = str_replace( $wp_content_dir, '', $asset_abs_path );
|
90 |
+
|
91 |
+
$asset_url = content_url( fs_normalize_path( $asset_rel_path ) );
|
92 |
+
|
93 |
+
return $asset_url;
|
94 |
+
}
|
95 |
+
|
96 |
+
function fs_enqueue_local_style( $handle, $path, $deps = array(), $ver = false, $media = 'all' ) {
|
97 |
+
wp_enqueue_style( $handle, fs_asset_url( WP_FS__DIR_CSS . '/' . trim( $path, '/' ) ), $deps, $ver, $media );
|
98 |
+
}
|
99 |
+
|
100 |
+
function fs_enqueue_local_script( $handle, $path, $deps = array(), $ver = false, $in_footer = 'all' ) {
|
101 |
+
wp_enqueue_script( $handle, fs_asset_url( WP_FS__DIR_JS . '/' . trim( $path, '/' ) ), $deps, $ver, $in_footer );
|
102 |
+
}
|
103 |
+
|
104 |
+
function fs_img_url( $path, $img_dir = WP_FS__DIR_IMG ) {
|
105 |
+
return ( fs_asset_url( $img_dir . '/' . trim( $path, '/' ) ) );
|
106 |
+
}
|
107 |
+
|
108 |
+
#--------------------------------------------------------------------------------
|
109 |
+
#region Request handlers.
|
110 |
+
#--------------------------------------------------------------------------------
|
111 |
+
|
112 |
+
if ( ! function_exists( 'fs_request_get' ) ) {
|
113 |
+
/**
|
114 |
+
* @param string $key
|
115 |
+
* @param mixed $def
|
116 |
+
* @param string|bool $type Since 1.2.1.7 - when set to 'get' will look for the value passed via querystring, when
|
117 |
+
* set to 'post' will look for the value passed via the POST request's body, otherwise,
|
118 |
+
* will check if the parameter was passed in any of the two.
|
119 |
+
*
|
120 |
+
* @return mixed
|
121 |
+
*/
|
122 |
+
function fs_request_get( $key, $def = false, $type = false ) {
|
123 |
+
if ( is_string( $type ) ) {
|
124 |
+
$type = strtolower( $type );
|
125 |
+
}
|
126 |
+
|
127 |
+
switch ( $type ) {
|
128 |
+
case 'post':
|
129 |
+
$value = isset( $_POST[ $key ] ) ? $_POST[ $key ] : $def;
|
130 |
+
break;
|
131 |
+
case 'get':
|
132 |
+
$value = isset( $_GET[ $key ] ) ? $_GET[ $key ] : $def;
|
133 |
+
break;
|
134 |
+
default:
|
135 |
+
$value = isset( $_REQUEST[ $key ] ) ? $_REQUEST[ $key ] : $def;
|
136 |
+
break;
|
137 |
+
}
|
138 |
+
|
139 |
+
return $value;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( ! function_exists( 'fs_request_has' ) ) {
|
144 |
+
function fs_request_has( $key ) {
|
145 |
+
return isset( $_REQUEST[ $key ] );
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( ! function_exists( 'fs_request_get_bool' ) ) {
|
150 |
+
function fs_request_get_bool( $key, $def = false ) {
|
151 |
+
if ( ! isset( $_REQUEST[ $key ] ) ) {
|
152 |
+
return $def;
|
153 |
+
}
|
154 |
+
|
155 |
+
if ( 1 == $_REQUEST[ $key ] || 'true' === strtolower( $_REQUEST[ $key ] ) ) {
|
156 |
+
return true;
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( 0 == $_REQUEST[ $key ] || 'false' === strtolower( $_REQUEST[ $key ] ) ) {
|
160 |
+
return false;
|
161 |
+
}
|
162 |
+
|
163 |
+
return $def;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
if ( ! function_exists( 'fs_request_is_post' ) ) {
|
168 |
+
function fs_request_is_post() {
|
169 |
+
return ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) );
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
if ( ! function_exists( 'fs_request_is_get' ) ) {
|
174 |
+
function fs_request_is_get() {
|
175 |
+
return ( 'get' === strtolower( $_SERVER['REQUEST_METHOD'] ) );
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
if ( ! function_exists( 'fs_get_action' ) ) {
|
180 |
+
function fs_get_action( $action_key = 'action' ) {
|
181 |
+
if ( ! empty( $_REQUEST[ $action_key ] ) && is_string( $_REQUEST[ $action_key ] ) ) {
|
182 |
+
return strtolower( $_REQUEST[ $action_key ] );
|
183 |
+
}
|
184 |
+
|
185 |
+
if ( 'action' == $action_key ) {
|
186 |
+
$action_key = 'fs_action';
|
187 |
+
|
188 |
+
if ( ! empty( $_REQUEST[ $action_key ] ) && is_string( $_REQUEST[ $action_key ] ) ) {
|
189 |
+
return strtolower( $_REQUEST[ $action_key ] );
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
return false;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! function_exists( 'fs_request_is_action' ) ) {
|
198 |
+
function fs_request_is_action( $action, $action_key = 'action' ) {
|
199 |
+
return ( strtolower( $action ) === fs_get_action( $action_key ) );
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
if ( ! function_exists( 'fs_request_is_action_secure' ) ) {
|
204 |
+
/**
|
205 |
+
* @author Vova Feldman (@svovaf)
|
206 |
+
* @since 1.0.0
|
207 |
+
*
|
208 |
+
* @since 1.2.1.5 Allow nonce verification.
|
209 |
+
*
|
210 |
+
* @param string $action
|
211 |
+
* @param string $action_key
|
212 |
+
* @param string $nonce_key
|
213 |
+
*
|
214 |
+
* @return bool
|
215 |
+
*/
|
216 |
+
function fs_request_is_action_secure(
|
217 |
+
$action,
|
218 |
+
$action_key = 'action',
|
219 |
+
$nonce_key = 'nonce'
|
220 |
+
) {
|
221 |
+
if ( strtolower( $action ) !== fs_get_action( $action_key ) ) {
|
222 |
+
return false;
|
223 |
+
}
|
224 |
+
|
225 |
+
$nonce = ! empty( $_REQUEST[ $nonce_key ] ) ?
|
226 |
+
$_REQUEST[ $nonce_key ] :
|
227 |
+
'';
|
228 |
+
|
229 |
+
if ( empty( $nonce ) ||
|
230 |
+
( false === wp_verify_nonce( $nonce, $action ) )
|
231 |
+
) {
|
232 |
+
return false;
|
233 |
+
}
|
234 |
+
|
235 |
+
return true;
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
#endregion
|
240 |
+
|
241 |
+
if ( ! function_exists( 'fs_is_plugin_page' ) ) {
|
242 |
+
function fs_is_plugin_page( $page_slug ) {
|
243 |
+
return ( is_admin() && $page_slug === fs_request_get( 'page' ) );
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
if ( ! function_exists( 'fs_get_raw_referer' ) ) {
|
248 |
+
/**
|
249 |
+
* Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.
|
250 |
+
*
|
251 |
+
* Do not use for redirects, use {@see wp_get_referer()} instead.
|
252 |
+
*
|
253 |
+
* @since 1.2.3
|
254 |
+
*
|
255 |
+
* @return string|false Referer URL on success, false on failure.
|
256 |
+
*/
|
257 |
+
function fs_get_raw_referer() {
|
258 |
+
if ( function_exists( 'wp_get_raw_referer' ) ) {
|
259 |
+
return wp_get_raw_referer();
|
260 |
+
}
|
261 |
+
if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
|
262 |
+
return wp_unslash( $_REQUEST['_wp_http_referer'] );
|
263 |
+
} else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
|
264 |
+
return wp_unslash( $_SERVER['HTTP_REFERER'] );
|
265 |
+
}
|
266 |
+
|
267 |
+
return false;
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
/* Core UI.
|
272 |
+
--------------------------------------------------------------------------------------------*/
|
273 |
+
/**
|
274 |
+
* @param number $module_id
|
275 |
+
* @param string $page
|
276 |
+
* @param string $action
|
277 |
+
* @param string $title
|
278 |
+
* @param array $params
|
279 |
+
* @param bool $is_primary
|
280 |
+
* @param string|bool $icon_class Optional class for an icon (since 1.1.7).
|
281 |
+
* @param string|bool $confirmation Optional confirmation message before submit (since 1.1.7).
|
282 |
+
* @param string $method Since 1.1.7
|
283 |
+
*
|
284 |
+
* @uses fs_ui_get_action_button()
|
285 |
+
*/
|
286 |
+
function fs_ui_action_button(
|
287 |
+
$module_id,
|
288 |
+
$page,
|
289 |
+
$action,
|
290 |
+
$title,
|
291 |
+
$params = array(),
|
292 |
+
$is_primary = true,
|
293 |
+
$icon_class = false,
|
294 |
+
$confirmation = false,
|
295 |
+
$method = 'GET'
|
296 |
+
) {
|
297 |
+
echo fs_ui_get_action_button(
|
298 |
+
$module_id,
|
299 |
+
$page,
|
300 |
+
$action,
|
301 |
+
$title,
|
302 |
+
$params,
|
303 |
+
$is_primary,
|
304 |
+
$icon_class,
|
305 |
+
$confirmation,
|
306 |
+
$method
|
307 |
+
);
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* @author Vova Feldman (@svovaf)
|
312 |
+
* @since 1.1.7
|
313 |
+
*
|
314 |
+
* @param number $module_id
|
315 |
+
* @param string $page
|
316 |
+
* @param string $action
|
317 |
+
* @param string $title
|
318 |
+
* @param array $params
|
319 |
+
* @param bool $is_primary
|
320 |
+
* @param string|bool $icon_class Optional class for an icon.
|
321 |
+
* @param string|bool $confirmation Optional confirmation message before submit.
|
322 |
+
* @param string $method
|
323 |
+
*
|
324 |
+
* @return string
|
325 |
+
*/
|
326 |
+
function fs_ui_get_action_button(
|
327 |
+
$module_id,
|
328 |
+
$page,
|
329 |
+
$action,
|
330 |
+
$title,
|
331 |
+
$params = array(),
|
332 |
+
$is_primary = true,
|
333 |
+
$icon_class = false,
|
334 |
+
$confirmation = false,
|
335 |
+
$method = 'GET'
|
336 |
+
) {
|
337 |
+
// Prepend icon (if set).
|
338 |
+
$title = ( is_string( $icon_class ) ? '<i class="' . $icon_class . '"></i> ' : '' ) . $title;
|
339 |
+
|
340 |
+
if ( is_string( $confirmation ) ) {
|
341 |
+
return sprintf( '<form action="%s" method="%s"><input type="hidden" name="fs_action" value="%s">%s<a href="#" class="%s" onclick="if (confirm(\'%s\')) this.parentNode.submit(); return false;">%s</a></form>',
|
342 |
+
freemius( $module_id )->_get_admin_page_url( $page, $params ),
|
343 |
+
$method,
|
344 |
+
$action,
|
345 |
+
wp_nonce_field( $action, '_wpnonce', true, false ),
|
346 |
+
'button' . ( $is_primary ? ' button-primary' : '' ),
|
347 |
+
$confirmation,
|
348 |
+
$title
|
349 |
+
);
|
350 |
+
} else if ( 'GET' !== strtoupper( $method ) ) {
|
351 |
+
return sprintf( '<form action="%s" method="%s"><input type="hidden" name="fs_action" value="%s">%s<a href="#" class="%s" onclick="this.parentNode.submit(); return false;">%s</a></form>',
|
352 |
+
freemius( $module_id )->_get_admin_page_url( $page, $params ),
|
353 |
+
$method,
|
354 |
+
$action,
|
355 |
+
wp_nonce_field( $action, '_wpnonce', true, false ),
|
356 |
+
'button' . ( $is_primary ? ' button-primary' : '' ),
|
357 |
+
$title
|
358 |
+
);
|
359 |
+
} else {
|
360 |
+
return sprintf( '<a href="%s" class="%s">%s</a></form>',
|
361 |
+
wp_nonce_url( freemius( $module_id )->_get_admin_page_url( $page, array_merge( $params, array( 'fs_action' => $action ) ) ), $action ),
|
362 |
+
'button' . ( $is_primary ? ' button-primary' : '' ),
|
363 |
+
$title
|
364 |
+
);
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
function fs_ui_action_link( $module_id, $page, $action, $title, $params = array() ) {
|
369 |
+
?><a class=""
|
370 |
+
href="<?php echo wp_nonce_url( freemius( $module_id )->_get_admin_page_url( $page, array_merge( $params, array( 'fs_action' => $action ) ) ), $action ) ?>"><?php echo $title ?></a><?php
|
371 |
+
}
|
372 |
+
|
373 |
+
/*function fs_error_handler($errno, $errstr, $errfile, $errline)
|
374 |
+
{
|
375 |
+
if (false === strpos($errfile, 'freemius/'))
|
376 |
+
{
|
377 |
+
// @todo Dump Freemius errors to local log.
|
378 |
+
}
|
379 |
|
380 |
// switch ($errno) {
|
381 |
// case E_USER_ERROR:
|
389 |
// default:
|
390 |
// break;
|
391 |
// }
|
392 |
+
}
|
393 |
+
|
394 |
+
set_error_handler('fs_error_handler');*/
|
395 |
+
|
396 |
+
if ( ! function_exists( 'fs_nonce_url' ) ) {
|
397 |
+
/**
|
398 |
+
* Retrieve URL with nonce added to URL query.
|
399 |
+
*
|
400 |
+
* Originally was using `wp_nonce_url()` but the new version
|
401 |
+
* changed the return value to escaped URL, that's not the expected
|
402 |
+
* behaviour.
|
403 |
+
*
|
404 |
+
* @author Vova Feldman (@svovaf)
|
405 |
+
* @since ~1.1.3
|
406 |
+
*
|
407 |
+
* @param string $actionurl URL to add nonce action.
|
408 |
+
* @param int|string $action Optional. Nonce action name. Default -1.
|
409 |
+
* @param string $name Optional. Nonce name. Default '_wpnonce'.
|
410 |
+
*
|
411 |
+
* @return string Escaped URL with nonce action added.
|
412 |
+
*/
|
413 |
+
function fs_nonce_url( $actionurl, $action = - 1, $name = '_wpnonce' ) {
|
414 |
+
return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
if ( ! function_exists( 'fs_starts_with' ) ) {
|
419 |
+
/**
|
420 |
+
* Check if string starts with.
|
421 |
+
*
|
422 |
+
* @author Vova Feldman (@svovaf)
|
423 |
+
* @since 1.1.3
|
424 |
+
*
|
425 |
+
* @param string $haystack
|
426 |
+
* @param string $needle
|
427 |
+
*
|
428 |
+
* @return bool
|
429 |
+
*/
|
430 |
+
function fs_starts_with( $haystack, $needle ) {
|
431 |
+
$length = strlen( $needle );
|
432 |
+
|
433 |
+
return ( substr( $haystack, 0, $length ) === $needle );
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
#region Url Canonization ------------------------------------------------------------------
|
438 |
+
|
439 |
+
if ( ! function_exists( 'fs_canonize_url' ) ) {
|
440 |
+
/**
|
441 |
+
* @author Vova Feldman (@svovaf)
|
442 |
+
* @since 1.1.3
|
443 |
+
*
|
444 |
+
* @param string $url
|
445 |
+
* @param bool $omit_host
|
446 |
+
* @param array $ignore_params
|
447 |
+
*
|
448 |
+
* @return string
|
449 |
+
*/
|
450 |
+
function fs_canonize_url( $url, $omit_host = false, $ignore_params = array() ) {
|
451 |
+
$parsed_url = parse_url( strtolower( $url ) );
|
452 |
|
453 |
// if ( ! isset( $parsed_url['host'] ) ) {
|
454 |
// return $url;
|
455 |
// }
|
456 |
|
457 |
+
$canonical = ( ( $omit_host || ! isset( $parsed_url['host'] ) ) ? '' : $parsed_url['host'] ) . $parsed_url['path'];
|
458 |
+
|
459 |
+
if ( isset( $parsed_url['query'] ) ) {
|
460 |
+
parse_str( $parsed_url['query'], $queryString );
|
461 |
+
$canonical .= '?' . fs_canonize_query_string( $queryString, $ignore_params );
|
462 |
+
}
|
463 |
+
|
464 |
+
return $canonical;
|
465 |
+
}
|
466 |
+
}
|
467 |
+
|
468 |
+
if ( ! function_exists( 'fs_canonize_query_string' ) ) {
|
469 |
+
/**
|
470 |
+
* @author Vova Feldman (@svovaf)
|
471 |
+
* @since 1.1.3
|
472 |
+
*
|
473 |
+
* @param array $params
|
474 |
+
* @param array $ignore_params
|
475 |
+
* @param bool $params_prefix
|
476 |
+
*
|
477 |
+
* @return string
|
478 |
+
*/
|
479 |
+
function fs_canonize_query_string( array $params, array &$ignore_params, $params_prefix = false ) {
|
480 |
+
if ( ! is_array( $params ) || 0 === count( $params ) ) {
|
481 |
+
return '';
|
482 |
+
}
|
483 |
+
|
484 |
+
// Url encode both keys and values
|
485 |
+
$keys = fs_urlencode_rfc3986( array_keys( $params ) );
|
486 |
+
$values = fs_urlencode_rfc3986( array_values( $params ) );
|
487 |
+
$params = array_combine( $keys, $values );
|
488 |
+
|
489 |
+
// Parameters are sorted by name, using lexicographical byte value ordering.
|
490 |
+
// Ref: Spec: 9.1.1 (1)
|
491 |
+
uksort( $params, 'strcmp' );
|
492 |
+
|
493 |
+
$pairs = array();
|
494 |
+
foreach ( $params as $parameter => $value ) {
|
495 |
+
$lower_param = strtolower( $parameter );
|
496 |
+
|
497 |
+
// Skip ignore params.
|
498 |
+
if ( in_array( $lower_param, $ignore_params ) ||
|
499 |
+
( false !== $params_prefix && fs_starts_with( $lower_param, $params_prefix ) )
|
500 |
+
) {
|
501 |
+
continue;
|
502 |
+
}
|
503 |
+
|
504 |
+
if ( is_array( $value ) ) {
|
505 |
+
// If two or more parameters share the same name, they are sorted by their value
|
506 |
+
// Ref: Spec: 9.1.1 (1)
|
507 |
+
natsort( $value );
|
508 |
+
foreach ( $value as $duplicate_value ) {
|
509 |
+
$pairs[] = $lower_param . '=' . $duplicate_value;
|
510 |
+
}
|
511 |
+
} else {
|
512 |
+
$pairs[] = $lower_param . '=' . $value;
|
513 |
+
}
|
514 |
+
}
|
515 |
+
|
516 |
+
if ( 0 === count( $pairs ) ) {
|
517 |
+
return '';
|
518 |
+
}
|
519 |
+
|
520 |
+
return implode( "&", $pairs );
|
521 |
+
}
|
522 |
+
}
|
523 |
+
|
524 |
+
if ( ! function_exists( 'fs_urlencode_rfc3986' ) ) {
|
525 |
+
/**
|
526 |
+
* @author Vova Feldman (@svovaf)
|
527 |
+
* @since 1.1.3
|
528 |
+
*
|
529 |
+
* @param string|string[] $input
|
530 |
+
*
|
531 |
+
* @return array|mixed|string
|
532 |
+
*/
|
533 |
+
function fs_urlencode_rfc3986( $input ) {
|
534 |
+
if ( is_array( $input ) ) {
|
535 |
+
return array_map( 'fs_urlencode_rfc3986', $input );
|
536 |
+
} else if ( is_scalar( $input ) ) {
|
537 |
+
return str_replace( '+', ' ', str_replace( '%7E', '~', rawurlencode( $input ) ) );
|
538 |
+
}
|
539 |
+
|
540 |
+
return '';
|
541 |
+
}
|
542 |
+
}
|
543 |
+
|
544 |
+
#endregion Url Canonization ------------------------------------------------------------------
|
545 |
+
|
546 |
+
/**
|
547 |
+
* @author Vova Feldman (@svovaf)
|
548 |
+
*
|
549 |
+
* @since 1.2.2 Changed to usage of WP_Filesystem_Direct.
|
550 |
+
*
|
551 |
+
* @param string $from URL
|
552 |
+
* @param string $to File path.
|
553 |
+
*
|
554 |
+
* @return bool Is successfully downloaded.
|
555 |
+
*/
|
556 |
+
function fs_download_image( $from, $to ) {
|
557 |
+
$dir = dirname( $to );
|
558 |
+
|
559 |
+
if ( 'direct' !== get_filesystem_method( array(), $dir ) ) {
|
560 |
+
return false;
|
561 |
+
}
|
562 |
+
|
563 |
+
if ( ! class_exists( 'WP_Filesystem_Direct' ) ) {
|
564 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
|
565 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
|
566 |
+
}
|
567 |
+
|
568 |
+
$fs = new WP_Filesystem_Direct( '' );
|
569 |
+
$tmpfile = download_url( $from );
|
570 |
+
|
571 |
+
if ( $tmpfile instanceof WP_Error ) {
|
572 |
+
// Issue downloading the file.
|
573 |
+
return false;
|
574 |
+
}
|
575 |
+
|
576 |
+
$fs->copy( $tmpfile, $to );
|
577 |
+
$fs->delete( $tmpfile );
|
578 |
+
|
579 |
+
return true;
|
580 |
+
}
|
581 |
+
|
582 |
+
/* General Utilities
|
583 |
+
--------------------------------------------------------------------------------------------*/
|
584 |
+
|
585 |
+
/**
|
586 |
+
* Sorts an array by the value of the priority key.
|
587 |
+
*
|
588 |
+
* @author Daniel Iser (@danieliser)
|
589 |
+
* @since 1.1.7
|
590 |
+
*
|
591 |
+
* @param $a
|
592 |
+
* @param $b
|
593 |
+
*
|
594 |
+
* @return int
|
595 |
+
*/
|
596 |
+
function fs_sort_by_priority( $a, $b ) {
|
597 |
+
|
598 |
+
// If b has a priority and a does not, b wins.
|
599 |
+
if ( ! isset( $a['priority'] ) && isset( $b['priority'] ) ) {
|
600 |
+
return 1;
|
601 |
+
} // If b has a priority and a does not, b wins.
|
602 |
+
elseif ( isset( $a['priority'] ) && ! isset( $b['priority'] ) ) {
|
603 |
+
return - 1;
|
604 |
+
} // If neither has a priority or both priorities are equal its a tie.
|
605 |
+
elseif ( ( ! isset( $a['priority'] ) && ! isset( $b['priority'] ) ) || $a['priority'] === $b['priority'] ) {
|
606 |
+
return 0;
|
607 |
+
}
|
608 |
+
|
609 |
+
// If both have priority return the winner.
|
610 |
+
return ( $a['priority'] < $b['priority'] ) ? - 1 : 1;
|
611 |
+
}
|
612 |
+
|
613 |
+
#--------------------------------------------------------------------------------
|
614 |
+
#region Localization
|
615 |
+
#--------------------------------------------------------------------------------
|
616 |
+
|
617 |
+
if ( ! function_exists( 'fs_text' ) ) {
|
618 |
+
/**
|
619 |
+
* Retrieve a translated text by key.
|
620 |
+
*
|
621 |
+
* @author Vova Feldman (@svovaf)
|
622 |
+
* @since 1.2.1.7
|
623 |
+
*
|
624 |
+
* @param string $key
|
625 |
+
* @param string $slug
|
626 |
+
*
|
627 |
+
* @return string
|
628 |
+
*
|
629 |
+
* @global $fs_text , $fs_text_overrides
|
630 |
+
*/
|
631 |
+
function fs_text( $key, $slug = 'freemius' ) {
|
632 |
+
return __fs( $key, $slug );
|
633 |
+
}
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Get a translatable text override if exists, or `false`.
|
637 |
+
*
|
638 |
+
* @author Vova Feldman (@svovaf)
|
639 |
+
* @since 1.2.1.7
|
640 |
+
*
|
641 |
+
* @param string $text Translatable string.
|
642 |
+
* @param string $key String key for overrides.
|
643 |
+
* @param string $slug Module slug for overrides.
|
644 |
+
*
|
645 |
+
* @return string|false
|
646 |
+
*/
|
647 |
+
function fs_text_override( $text, $key, $slug ) {
|
648 |
+
global $fs_text_overrides;
|
649 |
+
|
650 |
+
/**
|
651 |
+
* Check if string is overridden.
|
652 |
+
*/
|
653 |
+
if ( ! isset( $fs_text_overrides[ $slug ] ) ) {
|
654 |
+
return false;
|
655 |
+
}
|
656 |
+
|
657 |
+
if ( empty( $key ) ) {
|
658 |
+
$key = strtolower( str_replace( ' ', '-', $text ) );
|
659 |
+
}
|
660 |
+
|
661 |
+
if ( isset( $fs_text_overrides[ $slug ][ $key ] ) ) {
|
662 |
+
return $fs_text_overrides[ $slug ][ $key ];
|
663 |
+
}
|
664 |
+
|
665 |
+
$lower_key = strtolower( $key );
|
666 |
+
if ( isset( $fs_text_overrides[ $slug ][ $lower_key ] ) ) {
|
667 |
+
return $fs_text_overrides[ $slug ][ $lower_key ];
|
668 |
+
}
|
669 |
+
|
670 |
+
return false;
|
671 |
+
}
|
672 |
+
|
673 |
+
/**
|
674 |
+
* Get a translatable text and its text domain.
|
675 |
+
*
|
676 |
+
* When the text is overridden by the module, returns the overridden text and the text domain of the module. Otherwise, returns the original text and 'freemius' as the text domain.
|
677 |
+
*
|
678 |
+
* @author Vova Feldman (@svovaf)
|
679 |
+
* @since 1.2.1.7
|
680 |
+
*
|
681 |
+
* @param string $text Translatable string.
|
682 |
+
* @param string $key String key for overrides.
|
683 |
+
* @param string $slug Module slug for overrides.
|
684 |
+
*
|
685 |
+
* @return string[]
|
686 |
+
*/
|
687 |
+
function fs_text_and_domain( $text, $key, $slug ) {
|
688 |
+
$override = fs_text_override( $text, $key, $slug );
|
689 |
+
|
690 |
+
if ( false === $override ) {
|
691 |
+
// No override, use FS text domain.
|
692 |
+
$text_domain = 'freemius';
|
693 |
+
} else {
|
694 |
+
// Found an override.
|
695 |
+
$text = $override;
|
696 |
+
// Use the module's text domain.
|
697 |
+
$text_domain = $slug;
|
698 |
+
}
|
699 |
+
|
700 |
+
return array( $text, $text_domain );
|
701 |
+
}
|
702 |
+
|
703 |
+
#region Private
|
704 |
+
|
705 |
+
/**
|
706 |
+
* Retrieve an inline translated text by key.
|
707 |
+
*
|
708 |
+
* @author Vova Feldman (@svovaf)
|
709 |
+
* @since 1.2.3
|
710 |
+
*
|
711 |
+
* @param string $text Translatable string.
|
712 |
+
* @param string $key String key for overrides.
|
713 |
+
* @param string $slug Module slug for overrides.
|
714 |
+
*
|
715 |
+
* @return string
|
716 |
+
*
|
717 |
+
* @global $fs_text_overrides
|
718 |
+
*/
|
719 |
+
function _fs_text_inline( $text, $key = '', $slug = 'freemius' ) {
|
720 |
+
list( $text, $text_domain ) = fs_text_and_domain( $text, $key, $slug );
|
721 |
+
|
722 |
+
// Avoid misleading Theme Check warning.
|
723 |
+
$fn = 'translate';
|
724 |
+
|
725 |
+
return $fn( $text, $text_domain );
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Retrieve an inline translated text by key with a context.
|
730 |
+
*
|
731 |
+
* @author Vova Feldman (@svovaf)
|
732 |
+
* @since 1.2.3
|
733 |
+
*
|
734 |
+
* @param string $text Translatable string.
|
735 |
+
* @param string $context Context information for the translators.
|
736 |
+
* @param string $key String key for overrides.
|
737 |
+
* @param string $slug Module slug for overrides.
|
738 |
+
*
|
739 |
+
* @return string
|
740 |
+
*
|
741 |
+
* @global $fs_text_overrides
|
742 |
+
*/
|
743 |
+
function _fs_text_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
744 |
+
list( $text, $text_domain ) = fs_text_and_domain( $text, $key, $slug );
|
745 |
+
|
746 |
+
// Avoid misleading Theme Check warning.
|
747 |
+
$fn = 'translate_with_gettext_context';
|
748 |
+
|
749 |
+
return $fn( $text, $context, $text_domain );
|
750 |
+
}
|
751 |
+
|
752 |
+
#endregion
|
753 |
+
|
754 |
+
/**
|
755 |
+
* Retrieve an inline translated text by key.
|
756 |
+
*
|
757 |
+
* @author Vova Feldman (@svovaf)
|
758 |
+
* @since 1.2.3
|
759 |
+
*
|
760 |
+
* @param string $text Translatable string.
|
761 |
+
* @param string $key String key for overrides.
|
762 |
+
* @param string $slug Module slug for overrides.
|
763 |
+
*
|
764 |
+
* @return string
|
765 |
+
*
|
766 |
+
* @global $fs_text_overrides
|
767 |
+
*/
|
768 |
+
function fs_text_inline( $text, $key = '', $slug = 'freemius' ) {
|
769 |
+
return _fs_text_inline( $text, $key, $slug );
|
770 |
+
}
|
771 |
+
|
772 |
+
/**
|
773 |
+
* Retrieve an inline translated text by key with a context.
|
774 |
+
*
|
775 |
+
* @author Vova Feldman (@svovaf)
|
776 |
+
* @since 1.2.3
|
777 |
+
*
|
778 |
+
* @param string $text Translatable string.
|
779 |
+
* @param string $context Context information for the translators.
|
780 |
+
* @param string $key String key for overrides.
|
781 |
+
* @param string $slug Module slug for overrides.
|
782 |
+
*
|
783 |
+
* @return string
|
784 |
+
*
|
785 |
+
* @global $fs_text_overrides
|
786 |
+
*/
|
787 |
+
function fs_text_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
788 |
+
return _fs_text_x_inline( $text, $context, $key, $slug );
|
789 |
+
}
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Output a translated text by key.
|
793 |
+
*
|
794 |
+
* @author Vova Feldman (@svovaf)
|
795 |
+
* @since 1.2.1.7
|
796 |
+
*
|
797 |
+
* @param string $key
|
798 |
+
* @param string $slug
|
799 |
+
*/
|
800 |
+
function fs_echo( $key, $slug = 'freemius' ) {
|
801 |
+
echo fs_text( $key, $slug );
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Output an inline translated text.
|
806 |
+
*
|
807 |
+
* @author Vova Feldman (@svovaf)
|
808 |
+
* @since 1.2.3
|
809 |
+
*
|
810 |
+
* @param string $text Translatable string.
|
811 |
+
* @param string $key String key for overrides.
|
812 |
+
* @param string $slug Module slug for overrides.
|
813 |
+
*/
|
814 |
+
function fs_echo_inline( $text, $key = '', $slug = 'freemius' ) {
|
815 |
+
echo _fs_text_inline( $text, $key, $slug );
|
816 |
+
}
|
817 |
+
|
818 |
+
/**
|
819 |
+
* Output an inline translated text with a context.
|
820 |
+
*
|
821 |
+
* @author Vova Feldman (@svovaf)
|
822 |
+
* @since 1.2.3
|
823 |
+
*
|
824 |
+
* @param string $text Translatable string.
|
825 |
+
* @param string $context Context information for the translators.
|
826 |
+
* @param string $key String key for overrides.
|
827 |
+
* @param string $slug Module slug for overrides.
|
828 |
+
*/
|
829 |
+
function fs_echo_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
830 |
+
echo _fs_text_x_inline( $text, $context, $key, $slug );
|
831 |
+
}
|
832 |
+
}
|
833 |
+
|
834 |
+
if ( ! function_exists( 'fs_esc_attr' ) ) {
|
835 |
+
/**
|
836 |
+
* @author Vova Feldman
|
837 |
+
* @since 1.2.1.6
|
838 |
+
*
|
839 |
+
* @param string $key
|
840 |
+
* @param string $slug
|
841 |
+
*
|
842 |
+
* @return string
|
843 |
+
*/
|
844 |
+
function fs_esc_attr( $key, $slug ) {
|
845 |
+
return esc_attr( fs_text( $key, $slug ) );
|
846 |
+
}
|
847 |
+
}
|
848 |
+
|
849 |
+
if ( ! function_exists( 'fs_esc_attr_inline' ) ) {
|
850 |
+
/**
|
851 |
+
* @author Vova Feldman (@svovaf)
|
852 |
+
* @since 1.2.3
|
853 |
+
*
|
854 |
+
* @param string $text Translatable string.
|
855 |
+
* @param string $key String key for overrides.
|
856 |
+
* @param string $slug Module slug for overrides.
|
857 |
+
*
|
858 |
+
* @return string
|
859 |
+
*/
|
860 |
+
function fs_esc_attr_inline( $text, $key = '', $slug = 'freemius' ) {
|
861 |
+
return esc_attr( _fs_text_inline( $text, $key, $slug ) );
|
862 |
+
}
|
863 |
+
}
|
864 |
+
|
865 |
+
if ( ! function_exists( 'fs_esc_attr_x_inline' ) ) {
|
866 |
+
/**
|
867 |
+
* @author Vova Feldman (@svovaf)
|
868 |
+
* @since 1.2.3
|
869 |
+
*
|
870 |
+
* @param string $text Translatable string.
|
871 |
+
* @param string $context Context information for the translators.
|
872 |
+
* @param string $key String key for overrides.
|
873 |
+
* @param string $slug Module slug for overrides.
|
874 |
+
*
|
875 |
+
* @return string
|
876 |
+
*/
|
877 |
+
function fs_esc_attr_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
878 |
+
return esc_attr( _fs_text_x_inline( $text, $context, $key, $slug ) );
|
879 |
+
}
|
880 |
+
}
|
881 |
+
|
882 |
+
if ( ! function_exists( 'fs_esc_attr_echo' ) ) {
|
883 |
+
/**
|
884 |
+
* @author Vova Feldman
|
885 |
+
* @since 1.2.1.6
|
886 |
+
*
|
887 |
+
* @param string $key
|
888 |
+
* @param string $slug
|
889 |
+
*/
|
890 |
+
function fs_esc_attr_echo( $key, $slug ) {
|
891 |
+
echo esc_attr( fs_text( $key, $slug ) );
|
892 |
+
}
|
893 |
+
}
|
894 |
+
|
895 |
+
if ( ! function_exists( 'fs_esc_attr_echo_inline' ) ) {
|
896 |
+
/**
|
897 |
+
* @author Vova Feldman (@svovaf)
|
898 |
+
* @since 1.2.3
|
899 |
+
*
|
900 |
+
* @param string $text Translatable string.
|
901 |
+
* @param string $key String key for overrides.
|
902 |
+
* @param string $slug Module slug for overrides.
|
903 |
+
*/
|
904 |
+
function fs_esc_attr_echo_inline( $text, $key = '', $slug = 'freemius' ) {
|
905 |
+
echo esc_attr( _fs_text_inline( $text, $key, $slug ) );
|
906 |
+
}
|
907 |
+
}
|
908 |
+
|
909 |
+
if ( ! function_exists( 'fs_esc_js' ) ) {
|
910 |
+
/**
|
911 |
+
* @author Vova Feldman
|
912 |
+
* @since 1.2.1.6
|
913 |
+
*
|
914 |
+
* @param string $key
|
915 |
+
* @param string $slug
|
916 |
+
*
|
917 |
+
* @return string
|
918 |
+
*/
|
919 |
+
function fs_esc_js( $key, $slug ) {
|
920 |
+
return esc_js( fs_text( $key, $slug ) );
|
921 |
+
}
|
922 |
+
}
|
923 |
+
|
924 |
+
if ( ! function_exists( 'fs_esc_js_inline' ) ) {
|
925 |
+
/**
|
926 |
+
* @author Vova Feldman (@svovaf)
|
927 |
+
* @since 1.2.3
|
928 |
+
*
|
929 |
+
* @param string $text Translatable string.
|
930 |
+
* @param string $key String key for overrides.
|
931 |
+
* @param string $slug Module slug for overrides.
|
932 |
+
*
|
933 |
+
* @return string
|
934 |
+
*/
|
935 |
+
function fs_esc_js_inline( $text, $key = '', $slug = 'freemius' ) {
|
936 |
+
return esc_js( _fs_text_inline( $text, $key, $slug ) );
|
937 |
+
}
|
938 |
+
}
|
939 |
+
|
940 |
+
if ( ! function_exists( 'fs_esc_js_x_inline' ) ) {
|
941 |
+
/**
|
942 |
+
* @author Vova Feldman (@svovaf)
|
943 |
+
* @since 1.2.3
|
944 |
+
*
|
945 |
+
* @param string $text Translatable string.
|
946 |
+
* @param string $context Context information for the translators.
|
947 |
+
* @param string $key String key for overrides.
|
948 |
+
* @param string $slug Module slug for overrides.
|
949 |
+
*
|
950 |
+
* @return string
|
951 |
+
*/
|
952 |
+
function fs_esc_js_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
953 |
+
return esc_js( _fs_text_x_inline( $text, $context, $key, $slug ) );
|
954 |
+
}
|
955 |
+
}
|
956 |
+
|
957 |
+
if ( ! function_exists( 'fs_esc_js_echo_x_inline' ) ) {
|
958 |
+
/**
|
959 |
+
* @author Vova Feldman (@svovaf)
|
960 |
+
* @since 1.2.3
|
961 |
+
*
|
962 |
+
* @param string $text Translatable string.
|
963 |
+
* @param string $context Context information for the translators.
|
964 |
+
* @param string $key String key for overrides.
|
965 |
+
* @param string $slug Module slug for overrides.
|
966 |
+
*
|
967 |
+
* @return string
|
968 |
+
*/
|
969 |
+
function fs_esc_js_echo_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
970 |
+
echo esc_js( _fs_text_x_inline( $text, $context, $key, $slug ) );
|
971 |
+
}
|
972 |
+
}
|
973 |
+
|
974 |
+
if ( ! function_exists( 'fs_esc_js_echo' ) ) {
|
975 |
+
/**
|
976 |
+
* @author Vova Feldman
|
977 |
+
* @since 1.2.1.6
|
978 |
+
*
|
979 |
+
* @param string $key
|
980 |
+
* @param string $slug
|
981 |
+
*/
|
982 |
+
function fs_esc_js_echo( $key, $slug ) {
|
983 |
+
echo esc_js( fs_text( $key, $slug ) );
|
984 |
+
}
|
985 |
+
}
|
986 |
+
|
987 |
+
if ( ! function_exists( 'fs_esc_js_echo_inline' ) ) {
|
988 |
+
/**
|
989 |
+
* @author Vova Feldman (@svovaf)
|
990 |
+
* @since 1.2.3
|
991 |
+
*
|
992 |
+
* @param string $text Translatable string.
|
993 |
+
* @param string $key String key for overrides.
|
994 |
+
* @param string $slug Module slug for overrides.
|
995 |
+
*/
|
996 |
+
function fs_esc_js_echo_inline( $text, $key = '', $slug = 'freemius' ) {
|
997 |
+
echo esc_js( _fs_text_inline( $text, $key, $slug ) );
|
998 |
+
}
|
999 |
+
}
|
1000 |
+
|
1001 |
+
if ( ! function_exists( 'fs_json_encode_echo' ) ) {
|
1002 |
+
/**
|
1003 |
+
* @author Vova Feldman
|
1004 |
+
* @since 1.2.1.6
|
1005 |
+
*
|
1006 |
+
* @param string $key
|
1007 |
+
* @param string $slug
|
1008 |
+
*/
|
1009 |
+
function fs_json_encode_echo( $key, $slug ) {
|
1010 |
+
echo json_encode( fs_text( $key, $slug ) );
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
if ( ! function_exists( 'fs_json_encode_echo_inline' ) ) {
|
1015 |
+
/**
|
1016 |
+
* @author Vova Feldman (@svovaf)
|
1017 |
+
* @since 1.2.3
|
1018 |
+
*
|
1019 |
+
* @param string $text Translatable string.
|
1020 |
+
* @param string $key String key for overrides.
|
1021 |
+
* @param string $slug Module slug for overrides.
|
1022 |
+
*/
|
1023 |
+
function fs_json_encode_echo_inline( $text, $key = '', $slug = 'freemius' ) {
|
1024 |
+
echo json_encode( _fs_text_inline( $text, $key, $slug ) );
|
1025 |
+
}
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
if ( ! function_exists( 'fs_esc_html' ) ) {
|
1029 |
+
/**
|
1030 |
+
* @author Vova Feldman
|
1031 |
+
* @since 1.2.1.6
|
1032 |
+
*
|
1033 |
+
* @param string $key
|
1034 |
+
* @param string $slug
|
1035 |
+
*
|
1036 |
+
* @return string
|
1037 |
+
*/
|
1038 |
+
function fs_esc_html( $key, $slug ) {
|
1039 |
+
return esc_html( fs_text( $key, $slug ) );
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
if ( ! function_exists( 'fs_esc_html_inline' ) ) {
|
1044 |
+
/**
|
1045 |
+
* @author Vova Feldman (@svovaf)
|
1046 |
+
* @since 1.2.3
|
1047 |
+
*
|
1048 |
+
* @param string $text Translatable string.
|
1049 |
+
* @param string $key String key for overrides.
|
1050 |
+
* @param string $slug Module slug for overrides.
|
1051 |
+
*
|
1052 |
+
* @return string
|
1053 |
+
*/
|
1054 |
+
function fs_esc_html_inline( $text, $key = '', $slug = 'freemius' ) {
|
1055 |
+
return esc_html( _fs_text_inline( $text, $key, $slug ) );
|
1056 |
+
}
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
if ( ! function_exists( 'fs_esc_html_x_inline' ) ) {
|
1060 |
+
/**
|
1061 |
+
* @author Vova Feldman (@svovaf)
|
1062 |
+
* @since 1.2.3
|
1063 |
+
*
|
1064 |
+
* @param string $text Translatable string.
|
1065 |
+
* @param string $context Context information for the translators.
|
1066 |
+
* @param string $key String key for overrides.
|
1067 |
+
* @param string $slug Module slug for overrides.
|
1068 |
+
*
|
1069 |
+
* @return string
|
1070 |
+
*/
|
1071 |
+
function fs_esc_html_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
1072 |
+
return esc_html( _fs_text_x_inline( $text, $context, $key, $slug ) );
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
if ( ! function_exists( 'fs_esc_html_echo_x_inline' ) ) {
|
1077 |
+
/**
|
1078 |
+
* @author Vova Feldman (@svovaf)
|
1079 |
+
* @since 1.2.3
|
1080 |
+
*
|
1081 |
+
* @param string $text Translatable string.
|
1082 |
+
* @param string $context Context information for the translators.
|
1083 |
+
* @param string $key String key for overrides.
|
1084 |
+
* @param string $slug Module slug for overrides.
|
1085 |
+
*/
|
1086 |
+
function fs_esc_html_echo_x_inline( $text, $context, $key = '', $slug = 'freemius' ) {
|
1087 |
+
echo esc_html( _fs_text_x_inline( $text, $context, $key, $slug ) );
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
if ( ! function_exists( 'fs_esc_html_echo' ) ) {
|
1092 |
+
/**
|
1093 |
+
* @author Vova Feldman
|
1094 |
+
* @since 1.2.1.6
|
1095 |
+
*
|
1096 |
+
* @param string $key
|
1097 |
+
* @param string $slug
|
1098 |
+
*/
|
1099 |
+
function fs_esc_html_echo( $key, $slug ) {
|
1100 |
+
echo esc_html( fs_text( $key, $slug ) );
|
1101 |
+
}
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
if ( ! function_exists( 'fs_esc_html_echo_inline' ) ) {
|
1105 |
+
/**
|
1106 |
+
* @author Vova Feldman (@svovaf)
|
1107 |
+
* @since 1.2.3
|
1108 |
+
*
|
1109 |
+
* @param string $text Translatable string.
|
1110 |
+
* @param string $key String key for overrides.
|
1111 |
+
* @param string $slug Module slug for overrides.
|
1112 |
+
*/
|
1113 |
+
function fs_esc_html_echo_inline( $text, $key = '', $slug = 'freemius' ) {
|
1114 |
+
echo esc_html( _fs_text_inline( $text, $key, $slug ) );
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
|
1118 |
#endregion
|
freemius/includes/fs-essential-functions.php
CHANGED
@@ -158,6 +158,7 @@
|
|
158 |
* Retrieve a translated text by key.
|
159 |
*
|
160 |
* @deprecated Use `fs_text()` instead since methods starting with `__` trigger warnings in Php 7.
|
|
|
161 |
*
|
162 |
* @author Vova Feldman (@svovaf)
|
163 |
* @since 1.1.4
|
@@ -209,6 +210,8 @@
|
|
209 |
*
|
210 |
* @deprecated Use `fs_echo()` instead for consistency with `fs_text()`.
|
211 |
*
|
|
|
|
|
212 |
* @author Vova Feldman (@svovaf)
|
213 |
* @since 1.1.4
|
214 |
*
|
158 |
* Retrieve a translated text by key.
|
159 |
*
|
160 |
* @deprecated Use `fs_text()` instead since methods starting with `__` trigger warnings in Php 7.
|
161 |
+
* @todo Remove this method in the future.
|
162 |
*
|
163 |
* @author Vova Feldman (@svovaf)
|
164 |
* @since 1.1.4
|
210 |
*
|
211 |
* @deprecated Use `fs_echo()` instead for consistency with `fs_text()`.
|
212 |
*
|
213 |
+
* @todo Remove this method in the future.
|
214 |
+
*
|
215 |
* @author Vova Feldman (@svovaf)
|
216 |
* @since 1.1.4
|
217 |
*
|
freemius/includes/fs-plugin-info-dialog.php
CHANGED
@@ -325,8 +325,12 @@
|
|
325 |
$plan->has_trial()
|
326 |
) . '" target="_parent">' .
|
327 |
( ! $plan->has_trial() ?
|
328 |
-
|
329 |
-
sprintf(
|
|
|
|
|
|
|
|
|
330 |
) .
|
331 |
'</a>';
|
332 |
|
@@ -348,23 +352,23 @@
|
|
348 |
* plugin is wordpress.org compliant. Therefore, require a download
|
349 |
* since installing external plugins is not allowed by the wp.org guidelines.
|
350 |
*/
|
351 |
-
return ' <a class="button button-primary right" href="' . esc_url( $api->download_link ) . '" target="_blank">' .
|
352 |
} else {
|
353 |
if ( $status['url'] ) {
|
354 |
-
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' .
|
355 |
}
|
356 |
}
|
357 |
break;
|
358 |
case 'update_available':
|
359 |
if ( $status['url'] ) {
|
360 |
-
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' .
|
361 |
}
|
362 |
break;
|
363 |
case 'newer_installed':
|
364 |
-
return '<a class="button button-primary right disabled">' . sprintf(
|
365 |
break;
|
366 |
case 'latest_installed':
|
367 |
-
return '<a class="button button-primary right disabled">' .
|
368 |
break;
|
369 |
}
|
370 |
|
@@ -477,13 +481,13 @@
|
|
477 |
);
|
478 |
|
479 |
$plugins_section_titles = array(
|
480 |
-
'description' =>
|
481 |
-
'installation' =>
|
482 |
-
'faq' =>
|
483 |
-
'screenshots' =>
|
484 |
-
'changelog' =>
|
485 |
-
'reviews' =>
|
486 |
-
'other_notes' =>
|
487 |
);
|
488 |
|
489 |
// Sanitize HTML
|
@@ -498,7 +502,7 @@
|
|
498 |
}
|
499 |
|
500 |
// Add after $api->slug is ready.
|
501 |
-
$plugins_section_titles['features'] =
|
502 |
|
503 |
$_tab = esc_attr( $tab );
|
504 |
|
@@ -508,7 +512,7 @@
|
|
508 |
$section = array_shift( $section_titles );
|
509 |
}
|
510 |
|
511 |
-
iframe_header(
|
512 |
|
513 |
$_with_banner = '';
|
514 |
|
@@ -580,7 +584,7 @@
|
|
580 |
<div class="fs-plan<?php if ( ! $is_multi_cycle ) {
|
581 |
echo ' fs-single-cycle';
|
582 |
} ?>" data-plan-id="<?php echo $plan->id ?>">
|
583 |
-
<h3 data-plan="<?php echo $plan->id ?>"><?php
|
584 |
<?php $has_annual = $first_pricing->has_annual() ?>
|
585 |
<?php $has_monthly = $first_pricing->has_monthly() ?>
|
586 |
<div class="nav-tab-wrapper">
|
@@ -605,9 +609,22 @@
|
|
605 |
<a class="nav-tab" data-billing-cycle="<?php echo $cycle ?>"
|
606 |
data-pricing="<?php echo esc_attr( json_encode( $prices ) ) ?>">
|
607 |
<?php if ( $is_featured ) : ?>
|
608 |
-
<label>★ <?php
|
609 |
<?php endif ?>
|
610 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
</a>
|
612 |
<?php endif ?>
|
613 |
<?php $i ++; endforeach ?>
|
@@ -618,21 +635,21 @@
|
|
618 |
_formatBillingFrequency = function (cycle) {
|
619 |
switch (cycle) {
|
620 |
case 'monthly':
|
621 |
-
return '<?php printf(
|
622 |
case 'annual':
|
623 |
-
return '<?php printf(
|
624 |
case 'lifetime':
|
625 |
-
return '<?php printf(
|
626 |
}
|
627 |
},
|
628 |
_formatLicensesTitle = function (pricing) {
|
629 |
switch (pricing.licenses) {
|
630 |
case 1:
|
631 |
-
return '<?php
|
632 |
case null:
|
633 |
-
return '<?php
|
634 |
default:
|
635 |
-
return '<?php
|
636 |
}
|
637 |
},
|
638 |
_formatPrice = function (pricing, cycle, multipleLicenses) {
|
@@ -642,14 +659,14 @@
|
|
642 |
var priceCycle;
|
643 |
switch (cycle) {
|
644 |
case 'monthly':
|
645 |
-
priceCycle = ' / <?php
|
646 |
break;
|
647 |
case 'lifetime':
|
648 |
priceCycle = '';
|
649 |
break;
|
650 |
case 'annual':
|
651 |
default:
|
652 |
-
priceCycle = ' / <?php
|
653 |
break;
|
654 |
}
|
655 |
|
@@ -701,7 +718,7 @@
|
|
701 |
|
702 |
// Render licenses prices.
|
703 |
if (1 == pricing.length) {
|
704 |
-
html = '<li><label><?php
|
705 |
} else {
|
706 |
for (var i = 0; i < pricing.length; i++) {
|
707 |
html += '<li><label><input name="pricing-<?php echo $plan->id ?>" type="radio" value="' + pricing[i].id + '">' + _formatPrice(pricing[i], billingCycle) + '</label></li>';
|
@@ -747,7 +764,7 @@
|
|
747 |
<?php $annual_discount = ( $has_annual && $has_monthly ) ? $plan->pricing[0]->annual_discount_percentage() : 0 ?>
|
748 |
<?php if ( $annual_discount > 0 ) : ?>
|
749 |
<span
|
750 |
-
class="fs-annual-discount"><?php printf(
|
751 |
<?php endif ?>
|
752 |
<ul class="fs-licenses">
|
753 |
</ul>
|
@@ -757,10 +774,10 @@
|
|
757 |
<?php $trial_period = $this->get_trial_period( $plan ) ?>
|
758 |
<ul class="fs-trial-terms">
|
759 |
<li>
|
760 |
-
<i class="dashicons dashicons-yes"></i><?php
|
761 |
</li>
|
762 |
<li>
|
763 |
-
<i class="dashicons dashicons-yes"></i><?php printf(
|
764 |
</li>
|
765 |
</ul>
|
766 |
<?php endif ?>
|
@@ -771,85 +788,99 @@
|
|
771 |
<?php endif ?>
|
772 |
<?php endif ?>
|
773 |
<div>
|
774 |
-
<h3><?php
|
775 |
<ul>
|
776 |
<?php if ( ! empty( $api->version ) ) { ?>
|
777 |
-
<li><strong><?php
|
778 |
<?php
|
779 |
}
|
780 |
if ( ! empty( $api->author ) ) {
|
781 |
?>
|
782 |
<li>
|
783 |
-
<strong><?php
|
784 |
</li>
|
785 |
<?php
|
786 |
}
|
787 |
if ( ! empty( $api->last_updated ) ) {
|
788 |
?>
|
789 |
-
<li><strong><?php
|
790 |
title="<?php echo $api->last_updated; ?>">
|
791 |
-
<?php
|
|
|
|
|
|
|
|
|
792 |
</span></li>
|
793 |
<?php
|
794 |
}
|
795 |
if ( ! empty( $api->requires ) ) {
|
796 |
?>
|
797 |
<li>
|
798 |
-
<strong><?php
|
799 |
</li>
|
800 |
<?php
|
801 |
}
|
802 |
if ( ! empty( $api->tested ) ) {
|
803 |
?>
|
804 |
-
<li><strong><?php
|
805 |
</li>
|
806 |
<?php
|
807 |
}
|
808 |
if ( ! empty( $api->downloaded ) ) {
|
809 |
?>
|
810 |
<li>
|
811 |
-
<strong><?php
|
812 |
-
|
|
|
|
|
|
|
|
|
|
|
813 |
number_format_i18n( $api->downloaded )
|
814 |
-
); ?>
|
815 |
</li>
|
816 |
<?php
|
817 |
}
|
818 |
if ( ! empty( $api->slug ) && empty( $api->external ) ) {
|
819 |
?>
|
820 |
<li><a target="_blank"
|
821 |
-
href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php
|
822 |
</li>
|
823 |
<?php
|
824 |
}
|
825 |
if ( ! empty( $api->homepage ) ) {
|
826 |
?>
|
827 |
<li><a target="_blank"
|
828 |
-
href="<?php echo esc_url( $api->homepage ); ?>"><?php
|
829 |
</li>
|
830 |
<?php
|
831 |
}
|
832 |
if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
|
833 |
?>
|
834 |
<li><a target="_blank"
|
835 |
-
href="<?php echo esc_url( $api->donate_link ); ?>"><?php
|
836 |
</li>
|
837 |
<?php } ?>
|
838 |
</ul>
|
839 |
</div>
|
840 |
<?php if ( ! empty( $api->rating ) ) { ?>
|
841 |
-
<h3><?php
|
842 |
<?php wp_star_rating( array(
|
843 |
'rating' => $api->rating,
|
844 |
'type' => 'percent',
|
845 |
'number' => $api->num_ratings
|
846 |
) ); ?>
|
847 |
-
<small>(<?php
|
848 |
-
|
849 |
sprintf(
|
850 |
-
|
|
|
|
|
|
|
|
|
|
|
851 |
number_format_i18n( $api->num_ratings )
|
852 |
-
) )
|
853 |
<?php
|
854 |
}
|
855 |
|
@@ -858,7 +889,12 @@
|
|
858 |
// Avoid div-by-zero.
|
859 |
$_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
|
860 |
$stars_label = sprintf(
|
861 |
-
|
|
|
|
|
|
|
|
|
|
|
862 |
number_format_i18n( $key )
|
863 |
);
|
864 |
?>
|
@@ -866,7 +902,11 @@
|
|
866 |
<span class="counter-label"><a
|
867 |
href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
|
868 |
target="_blank"
|
869 |
-
title="<?php echo esc_attr( sprintf(
|
|
|
|
|
|
|
|
|
870 |
<span class="counter-back">
|
871 |
<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
|
872 |
</span>
|
@@ -877,7 +917,7 @@
|
|
877 |
}
|
878 |
if ( ! empty( $api->contributors ) ) {
|
879 |
?>
|
880 |
-
<h3><?php
|
881 |
<ul class="contributors">
|
882 |
<?php
|
883 |
foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) {
|
@@ -898,16 +938,16 @@
|
|
898 |
</ul>
|
899 |
<?php if ( ! empty( $api->donate_link ) ) { ?>
|
900 |
<a target="_blank"
|
901 |
-
href="<?php echo esc_url( $api->donate_link ); ?>"><?php
|
902 |
<?php } ?>
|
903 |
<?php } ?>
|
904 |
</div>
|
905 |
<div id="section-holder" class="wrap">
|
906 |
<?php
|
907 |
if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
908 |
-
echo '<div class="notice notice-warning"><p>' . '<strong>' .
|
909 |
} else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
910 |
-
echo '<div class="notice notice-warning"><p>' . '<strong>' .
|
911 |
}
|
912 |
|
913 |
foreach ( (array) $api->sections as $section_name => $content ) {
|
@@ -925,7 +965,9 @@
|
|
925 |
$missing_notice = array(
|
926 |
'type' => 'error',
|
927 |
'id' => md5( microtime() ),
|
928 |
-
'message' =>
|
|
|
|
|
929 |
);
|
930 |
fs_require_template( 'admin-notice.php', $missing_notice );
|
931 |
}
|
325 |
$plan->has_trial()
|
326 |
) . '" target="_parent">' .
|
327 |
( ! $plan->has_trial() ?
|
328 |
+
fs_text_x_inline( 'Purchase', 'verb', 'purchase', $api->slug ) :
|
329 |
+
sprintf(
|
330 |
+
/* translators: %s: N-days trial */
|
331 |
+
fs_text_inline( 'Start my free %s', 'start-free-x', $api->slug ),
|
332 |
+
$this->get_trial_period( $plan )
|
333 |
+
)
|
334 |
) .
|
335 |
'</a>';
|
336 |
|
352 |
* plugin is wordpress.org compliant. Therefore, require a download
|
353 |
* since installing external plugins is not allowed by the wp.org guidelines.
|
354 |
*/
|
355 |
+
return ' <a class="button button-primary right" href="' . esc_url( $api->download_link ) . '" target="_blank">' . fs_esc_html_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $api->slug ) . '</a>';
|
356 |
} else {
|
357 |
if ( $status['url'] ) {
|
358 |
+
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . fs_esc_html_inline( 'Install Now', 'install-now', $api->slug ) . '</a>';
|
359 |
}
|
360 |
}
|
361 |
break;
|
362 |
case 'update_available':
|
363 |
if ( $status['url'] ) {
|
364 |
+
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . fs_text_inline( 'Install Update Now', 'install-update-now', $api->slug ) . '</a>';
|
365 |
}
|
366 |
break;
|
367 |
case 'newer_installed':
|
368 |
+
return '<a class="button button-primary right disabled">' . sprintf( fs_text_inline( 'Newer Version (%s) Installed', 'newer-installed', $api->slug ), $status['version'] ) . '</a>';
|
369 |
break;
|
370 |
case 'latest_installed':
|
371 |
+
return '<a class="button button-primary right disabled">' . fs_text_inline( 'Latest Version Installed', 'latest-installed', $api->slug ) . '</a>';
|
372 |
break;
|
373 |
}
|
374 |
|
481 |
);
|
482 |
|
483 |
$plugins_section_titles = array(
|
484 |
+
'description' => fs_text_x_inline( 'Description', 'Plugin installer section title', 'description', $api->slug ),
|
485 |
+
'installation' => fs_text_x_inline( 'Installation', 'Plugin installer section title', 'installation', $api->slug ),
|
486 |
+
'faq' => fs_text_x_inline( 'FAQ', 'Plugin installer section title', 'faq', $api->slug ),
|
487 |
+
'screenshots' => fs_text_inline( 'Screenshots', 'screenshots', $api->slug ),
|
488 |
+
'changelog' => fs_text_x_inline( 'Changelog', 'Plugin installer section title', 'changelog', $api->slug ),
|
489 |
+
'reviews' => fs_text_x_inline( 'Reviews', 'Plugin installer section title', 'reviews', $api->slug ),
|
490 |
+
'other_notes' => fs_text_x_inline( 'Other Notes', 'Plugin installer section title', 'other-notes', $api->slug ),
|
491 |
);
|
492 |
|
493 |
// Sanitize HTML
|
502 |
}
|
503 |
|
504 |
// Add after $api->slug is ready.
|
505 |
+
$plugins_section_titles['features'] = fs_text_x_inline( 'Features & Pricing', 'Plugin installer section title', 'features-and-pricing', $api->slug );
|
506 |
|
507 |
$_tab = esc_attr( $tab );
|
508 |
|
512 |
$section = array_shift( $section_titles );
|
513 |
}
|
514 |
|
515 |
+
iframe_header( fs_text_inline( 'Plugin Install', 'plugin-install', $api->slug ) );
|
516 |
|
517 |
$_with_banner = '';
|
518 |
|
584 |
<div class="fs-plan<?php if ( ! $is_multi_cycle ) {
|
585 |
echo ' fs-single-cycle';
|
586 |
} ?>" data-plan-id="<?php echo $plan->id ?>">
|
587 |
+
<h3 data-plan="<?php echo $plan->id ?>"><?php echo esc_html( sprintf( fs_text_x_inline( '%s Plan', 'e.g. Professional Plan', 'x-plan', $api->slug ), $plan->title ) ) ?></h3>
|
588 |
<?php $has_annual = $first_pricing->has_annual() ?>
|
589 |
<?php $has_monthly = $first_pricing->has_monthly() ?>
|
590 |
<div class="nav-tab-wrapper">
|
609 |
<a class="nav-tab" data-billing-cycle="<?php echo $cycle ?>"
|
610 |
data-pricing="<?php echo esc_attr( json_encode( $prices ) ) ?>">
|
611 |
<?php if ( $is_featured ) : ?>
|
612 |
+
<label>★ <?php fs_esc_html_echo_x_inline( 'Best', 'e.g. the best product', 'best', $api->slug ) ?> ★</label>
|
613 |
<?php endif ?>
|
614 |
+
<?php
|
615 |
+
switch ($cycle)
|
616 |
+
{
|
617 |
+
case 'monthly':
|
618 |
+
fs_esc_html_echo_x_inline( 'Monthly', 'as every month', 'monthly', $api->slug );
|
619 |
+
break;
|
620 |
+
case 'annual':
|
621 |
+
fs_esc_html_echo_x_inline( 'Annual', 'as once a year', 'annual', $api->slug );
|
622 |
+
break;
|
623 |
+
case 'lifetime':
|
624 |
+
fs_esc_html_echo_inline( 'Lifetime', 'lifetime', $api->slug );
|
625 |
+
break;
|
626 |
+
}
|
627 |
+
?>
|
628 |
</a>
|
629 |
<?php endif ?>
|
630 |
<?php $i ++; endforeach ?>
|
635 |
_formatBillingFrequency = function (cycle) {
|
636 |
switch (cycle) {
|
637 |
case 'monthly':
|
638 |
+
return '<?php printf( fs_text_x_inline( 'Billed %s', 'e.g. billed monthly', 'billed-x', $api->slug), fs_text_x_inline( 'Monthly', 'as every month', 'monthly', $api->slug ) ) ?>';
|
639 |
case 'annual':
|
640 |
+
return '<?php printf( fs_text_x_inline( 'Billed %s', 'e.g. billed monthly', 'billed-x', $api->slug), fs_text_x_inline( 'Annually', 'as once a year', 'annually', $api->slug ) ) ?>';
|
641 |
case 'lifetime':
|
642 |
+
return '<?php printf( fs_text_x_inline( 'Billed %s', 'e.g. billed monthly', 'billed-x', $api->slug), fs_text_x_inline( 'Once', 'as once a year', 'once', $api->slug ) ) ?>';
|
643 |
}
|
644 |
},
|
645 |
_formatLicensesTitle = function (pricing) {
|
646 |
switch (pricing.licenses) {
|
647 |
case 1:
|
648 |
+
return '<?php fs_esc_attr_echo_inline( 'Single Site License', 'license-single-site', $api->slug ) ?>';
|
649 |
case null:
|
650 |
+
return '<?php fs_esc_attr_echo_inline( 'Unlimited Licenses', 'license-unlimited', $api->slug ) ?>';
|
651 |
default:
|
652 |
+
return '<?php fs_esc_attr_echo_inline( 'Up to %s Sites', 'license-x-sites', $api->slug ) ?>'.replace('%s', pricing.licenses);
|
653 |
}
|
654 |
},
|
655 |
_formatPrice = function (pricing, cycle, multipleLicenses) {
|
659 |
var priceCycle;
|
660 |
switch (cycle) {
|
661 |
case 'monthly':
|
662 |
+
priceCycle = ' / <?php fs_echo_x_inline( 'mo', 'as monthly period', 'mo', $api->slug ) ?>';
|
663 |
break;
|
664 |
case 'lifetime':
|
665 |
priceCycle = '';
|
666 |
break;
|
667 |
case 'annual':
|
668 |
default:
|
669 |
+
priceCycle = ' / <?php fs_echo_x_inline('year', 'as annual period', 'year', $api->slug) ?>';
|
670 |
break;
|
671 |
}
|
672 |
|
718 |
|
719 |
// Render licenses prices.
|
720 |
if (1 == pricing.length) {
|
721 |
+
html = '<li><label><?php echo fs_esc_attr_x_inline( 'Price', 'noun', 'price', $api->slug ) ?>: ' + _formatPrice(pricing[0], billingCycle, false) + '</label></li>';
|
722 |
} else {
|
723 |
for (var i = 0; i < pricing.length; i++) {
|
724 |
html += '<li><label><input name="pricing-<?php echo $plan->id ?>" type="radio" value="' + pricing[i].id + '">' + _formatPrice(pricing[i], billingCycle) + '</label></li>';
|
764 |
<?php $annual_discount = ( $has_annual && $has_monthly ) ? $plan->pricing[0]->annual_discount_percentage() : 0 ?>
|
765 |
<?php if ( $annual_discount > 0 ) : ?>
|
766 |
<span
|
767 |
+
class="fs-annual-discount"><?php printf( fs_esc_html_x_inline( 'Save %s', 'as a discount of $5 or 10%', 'save-x', $api->slug ), $annual_discount . '%' ) ?></span>
|
768 |
<?php endif ?>
|
769 |
<ul class="fs-licenses">
|
770 |
</ul>
|
774 |
<?php $trial_period = $this->get_trial_period( $plan ) ?>
|
775 |
<ul class="fs-trial-terms">
|
776 |
<li>
|
777 |
+
<i class="dashicons dashicons-yes"></i><?php echo esc_html( sprintf( fs_text_inline( 'No commitment for %s - cancel anytime', 'no-commitment-x', $api->slug ), $trial_period ) ) ?>
|
778 |
</li>
|
779 |
<li>
|
780 |
+
<i class="dashicons dashicons-yes"></i><?php printf( esc_html( fs_text_inline( 'After your free %s, pay as little as %s', 'after-x-pay-as-little-y', $api->slug ) ), $trial_period, '<var class="fs-price">' . $this->get_price_tag( $plan, $plan->pricing[0] ) . '</var>' ) ?>
|
781 |
</li>
|
782 |
</ul>
|
783 |
<?php endif ?>
|
788 |
<?php endif ?>
|
789 |
<?php endif ?>
|
790 |
<div>
|
791 |
+
<h3><?php fs_echo_inline( 'Details', 'details', $api->slug ) ?></h3>
|
792 |
<ul>
|
793 |
<?php if ( ! empty( $api->version ) ) { ?>
|
794 |
+
<li><strong><?php fs_esc_html_echo_x_inline( 'Version', 'product version', 'version', $api->slug ); ?>:</strong> <?php echo $api->version; ?></li>
|
795 |
<?php
|
796 |
}
|
797 |
if ( ! empty( $api->author ) ) {
|
798 |
?>
|
799 |
<li>
|
800 |
+
<strong><?php fs_echo_x_inline( 'Author', 'as the plugin author', 'author', $api->slug ); ?>:</strong> <?php echo links_add_target( $api->author, '_blank' ); ?>
|
801 |
</li>
|
802 |
<?php
|
803 |
}
|
804 |
if ( ! empty( $api->last_updated ) ) {
|
805 |
?>
|
806 |
+
<li><strong><?php fs_echo_inline( 'Last Updated', 'last-updated', $api->slug ); ?>:</strong> <span
|
807 |
title="<?php echo $api->last_updated; ?>">
|
808 |
+
<?php echo esc_html( sprintf(
|
809 |
+
/* translators: %s: time period (e.g. "2 hours" ago) */
|
810 |
+
fs_text_x_inline( '%s ago', 'x-ago', $api->slug ),
|
811 |
+
human_time_diff( strtotime( $api->last_updated ) )
|
812 |
+
) ) ?>
|
813 |
</span></li>
|
814 |
<?php
|
815 |
}
|
816 |
if ( ! empty( $api->requires ) ) {
|
817 |
?>
|
818 |
<li>
|
819 |
+
<strong><?php fs_esc_html_echo_inline( 'Requires WordPress Version', 'requires-wordpress-version', $api->slug ) ?>:</strong> <?php echo esc_html( sprintf( fs_text_inline( '%s or higher', 'x-or-higher', $api->slug ), $api->requires ) ) ?>
|
820 |
</li>
|
821 |
<?php
|
822 |
}
|
823 |
if ( ! empty( $api->tested ) ) {
|
824 |
?>
|
825 |
+
<li><strong><?php fs_esc_html_echo_inline( 'Compatible up to', 'compatible-up-to', $api->slug ); ?>:</strong> <?php echo $api->tested; ?>
|
826 |
</li>
|
827 |
<?php
|
828 |
}
|
829 |
if ( ! empty( $api->downloaded ) ) {
|
830 |
?>
|
831 |
<li>
|
832 |
+
<strong><?php fs_esc_html_echo_inline( 'Downloaded', 'downloaded', $api->slug ) ?>:</strong> <?php echo esc_html( sprintf(
|
833 |
+
( ( 1 == $api->downloaded ) ?
|
834 |
+
/* translators: %s: 1 or One (Number of times downloaded) */
|
835 |
+
fs_text_inline( '%s time', 'x-time', $api->slug ) :
|
836 |
+
/* translators: %s: Number of times downloaded */
|
837 |
+
fs_text_inline( '%s times', 'x-times', $api->slug )
|
838 |
+
),
|
839 |
number_format_i18n( $api->downloaded )
|
840 |
+
) ); ?>
|
841 |
</li>
|
842 |
<?php
|
843 |
}
|
844 |
if ( ! empty( $api->slug ) && empty( $api->external ) ) {
|
845 |
?>
|
846 |
<li><a target="_blank"
|
847 |
+
href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php fs_esc_html_echo_inline( 'WordPress.org Plugin Page', 'wp-org-plugin-page', $api->slug ) ?> »</a>
|
848 |
</li>
|
849 |
<?php
|
850 |
}
|
851 |
if ( ! empty( $api->homepage ) ) {
|
852 |
?>
|
853 |
<li><a target="_blank"
|
854 |
+
href="<?php echo esc_url( $api->homepage ); ?>"><?php fs_esc_html_echo_inline( 'Plugin Homepage', 'plugin-homepage', $api->slug ) ?> »</a>
|
855 |
</li>
|
856 |
<?php
|
857 |
}
|
858 |
if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
|
859 |
?>
|
860 |
<li><a target="_blank"
|
861 |
+
href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_esc_html_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?> »</a>
|
862 |
</li>
|
863 |
<?php } ?>
|
864 |
</ul>
|
865 |
</div>
|
866 |
<?php if ( ! empty( $api->rating ) ) { ?>
|
867 |
+
<h3><?php fs_echo_inline( 'Average Rating', 'average-rating', $api->slug ); ?></h3>
|
868 |
<?php wp_star_rating( array(
|
869 |
'rating' => $api->rating,
|
870 |
'type' => 'percent',
|
871 |
'number' => $api->num_ratings
|
872 |
) ); ?>
|
873 |
+
<small>(<?php echo esc_html( sprintf(
|
874 |
+
fs_text_inline( 'based on %s', 'based-on-x', $api->slug ),
|
875 |
sprintf(
|
876 |
+
( ( 1 == $api->num_ratings ) ?
|
877 |
+
/* translators: %s: 1 or One */
|
878 |
+
fs_text_inline( '%s rating', 'x-rating', $api->slug ) :
|
879 |
+
/* translators: %s: Number larger than 1 */
|
880 |
+
fs_text_inline( '%s ratings', 'x-ratings', $api->slug )
|
881 |
+
),
|
882 |
number_format_i18n( $api->num_ratings )
|
883 |
+
) ) ) ?>)</small>
|
884 |
<?php
|
885 |
}
|
886 |
|
889 |
// Avoid div-by-zero.
|
890 |
$_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
|
891 |
$stars_label = sprintf(
|
892 |
+
( ( 1 == $key ) ?
|
893 |
+
/* translators: %s: 1 or One */
|
894 |
+
fs_text_inline( '%s star', 'x-star', $api->slug ) :
|
895 |
+
/* translators: %s: Number larger than 1 */
|
896 |
+
fs_text_inline( '%s stars', 'x-stars', $api->slug )
|
897 |
+
),
|
898 |
number_format_i18n( $key )
|
899 |
);
|
900 |
?>
|
902 |
<span class="counter-label"><a
|
903 |
href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
|
904 |
target="_blank"
|
905 |
+
title="<?php echo esc_attr( sprintf(
|
906 |
+
/* translators: %s: # of stars (e.g. 5 stars) */
|
907 |
+
fs_text_inline( 'Click to see reviews that provided a rating of %s', 'click-to-reviews', $api->slug ),
|
908 |
+
$stars_label
|
909 |
+
) ) ?>"><?php echo $stars_label ?></a></span>
|
910 |
<span class="counter-back">
|
911 |
<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
|
912 |
</span>
|
917 |
}
|
918 |
if ( ! empty( $api->contributors ) ) {
|
919 |
?>
|
920 |
+
<h3><?php fs_echo_inline( 'Contributors', 'contributors', $api->slug ); ?></h3>
|
921 |
<ul class="contributors">
|
922 |
<?php
|
923 |
foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) {
|
938 |
</ul>
|
939 |
<?php if ( ! empty( $api->donate_link ) ) { ?>
|
940 |
<a target="_blank"
|
941 |
+
href="<?php echo esc_url( $api->donate_link ); ?>"><?php fs_echo_inline( 'Donate to this plugin', 'donate-to-plugin', $api->slug ) ?> »</a>
|
942 |
<?php } ?>
|
943 |
<?php } ?>
|
944 |
</div>
|
945 |
<div id="section-holder" class="wrap">
|
946 |
<?php
|
947 |
if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
948 |
+
echo '<div class="notice notice-warning"><p>' . '<strong>' . fs_text_inline( 'Warning', 'warning', $api->slug ) . ':</strong> ' . fs_text_inline( 'This plugin has not been tested with your current version of WordPress.', 'not-tested-warning', $api->slug ) . '</p></div>';
|
949 |
} else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
950 |
+
echo '<div class="notice notice-warning"><p>' . '<strong>' . fs_text_inline( 'Warning', 'warning', $api->slug ) . ':</strong> ' . fs_text_inline( 'This plugin has not been marked as compatible with your version of WordPress.', 'not-compatible-warning', $api->slug ) . '</p></div>';
|
951 |
}
|
952 |
|
953 |
foreach ( (array) $api->sections as $section_name => $content ) {
|
965 |
$missing_notice = array(
|
966 |
'type' => 'error',
|
967 |
'id' => md5( microtime() ),
|
968 |
+
'message' => $api->is_paid ?
|
969 |
+
fs_text_inline( 'Paid add-on must be deployed to Freemius.', 'paid-addon-not-deployed', $api->slug ) :
|
970 |
+
fs_text_inline( 'Add-on must be deployed to WordPress.org or Freemius.', 'free-addon-not-deployed', $api->slug ),
|
971 |
);
|
972 |
fs_require_template( 'admin-notice.php', $missing_notice );
|
973 |
}
|
freemius/includes/i18n.php
CHANGED
@@ -4,6 +4,8 @@
|
|
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.4
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -29,7 +31,7 @@
|
|
29 |
* my_freemius->override_i18n( array(
|
30 |
* 'opt-in-connect' => __( "Yes - I'm in!", '{your-text_domain}' ),
|
31 |
* 'skip' => __( 'Not today', '{your-text_domain}' ),
|
32 |
-
* );
|
33 |
*/
|
34 |
global $fs_text;
|
35 |
|
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.4
|
7 |
+
*
|
8 |
+
* @deprecated This file is no longer in use. It's still in the project for backward compatibility.
|
9 |
*/
|
10 |
|
11 |
if ( ! defined( 'ABSPATH' ) ) {
|
31 |
* my_freemius->override_i18n( array(
|
32 |
* 'opt-in-connect' => __( "Yes - I'm in!", '{your-text_domain}' ),
|
33 |
* 'skip' => __( 'Not today', '{your-text_domain}' ),
|
34 |
+
* ) );
|
35 |
*/
|
36 |
global $fs_text;
|
37 |
|
freemius/includes/l10n.php
CHANGED
@@ -25,75 +25,6 @@
|
|
25 |
return $fn( $text, 'freemius' );
|
26 |
}
|
27 |
|
28 |
-
/**
|
29 |
-
* Retrieve the translation of $text and escapes it for safe use in an attribute.
|
30 |
-
*
|
31 |
-
* @since 1.2.1.6
|
32 |
-
*
|
33 |
-
* @param string $text
|
34 |
-
*
|
35 |
-
* @return string
|
36 |
-
*/
|
37 |
-
function _fs_esc_attr( $text ) {
|
38 |
-
// Avoid misleading Theme Check warning.
|
39 |
-
$fn = 'translate';
|
40 |
-
return esc_attr( $fn( $text, 'freemius' ) );
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Retrieve the translation of $text and escapes it for safe use in HTML output.
|
45 |
-
*
|
46 |
-
* @since 1.2.1.6
|
47 |
-
*
|
48 |
-
* @param string $text
|
49 |
-
*
|
50 |
-
* @return string
|
51 |
-
*/
|
52 |
-
function _fs_esc_html( $text ) {
|
53 |
-
// Avoid misleading Theme Check warning.
|
54 |
-
$fn = 'translate';
|
55 |
-
return esc_html( $fn( $text, 'freemius' ) );
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Display translated text.
|
60 |
-
*
|
61 |
-
* @since 1.2.0
|
62 |
-
*
|
63 |
-
* @param string $text
|
64 |
-
*/
|
65 |
-
function _fs_echo( $text ) {
|
66 |
-
// Avoid misleading Theme Check warning.
|
67 |
-
$fn = 'translate';
|
68 |
-
echo $fn( $text, 'freemius' );
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Display translated text that has been escaped for safe use in an attribute.
|
73 |
-
*
|
74 |
-
* @since 1.2.1.6
|
75 |
-
*
|
76 |
-
* @param string $text
|
77 |
-
*/
|
78 |
-
function _fs_esc_attr_echo( $text ) {
|
79 |
-
// Avoid misleading Theme Check warning.
|
80 |
-
$fn = 'translate';
|
81 |
-
echo esc_attr( $fn( $text, 'freemius' ) );
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Display translated text that has been escaped for safe use in HTML output.
|
86 |
-
*
|
87 |
-
* @since 1.2.1.6
|
88 |
-
*
|
89 |
-
* @param string $text
|
90 |
-
*/
|
91 |
-
function _fs_esc_html_echo( $text ) {
|
92 |
-
// Avoid misleading Theme Check warning.
|
93 |
-
$fn = 'translate';
|
94 |
-
echo esc_html( $fn( $text, 'freemius' ) );
|
95 |
-
}
|
96 |
-
|
97 |
/**
|
98 |
* Retrieve translated string with gettext context.
|
99 |
*
|
@@ -115,154 +46,3 @@
|
|
115 |
$fn = 'translate_with_gettext_context';
|
116 |
return $fn( $text, $context, 'freemius' );
|
117 |
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Display translated string with gettext context.
|
121 |
-
*
|
122 |
-
* @since 1.2.1.6
|
123 |
-
*
|
124 |
-
* @param string $text
|
125 |
-
* @param string $context
|
126 |
-
*/
|
127 |
-
function _fs_ex( $text, $context ) {
|
128 |
-
// Avoid misleading Theme Check warning.
|
129 |
-
$fn = '_x';
|
130 |
-
echo $fn( $text, $context, 'freemius' );
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Translate string with gettext context, and escapes it for safe use in an attribute.
|
135 |
-
*
|
136 |
-
* @since 1.2.1.6
|
137 |
-
*
|
138 |
-
* @param string $text
|
139 |
-
* @param string $context
|
140 |
-
*
|
141 |
-
* @return string
|
142 |
-
*/
|
143 |
-
function _fs_esc_attr_x( $text, $context ) {
|
144 |
-
// Avoid misleading Theme Check warning.
|
145 |
-
$fn = 'translate_with_gettext_context';
|
146 |
-
return esc_attr( $fn( $text, $context, 'freemius' ) );
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Translate string with gettext context, and escapes it for safe use in HTML output.
|
151 |
-
*
|
152 |
-
* @since 2.9.0
|
153 |
-
*
|
154 |
-
* @param string $text
|
155 |
-
* @param string $context
|
156 |
-
*
|
157 |
-
* @return string
|
158 |
-
*/
|
159 |
-
function _fs_esc_html_x( $text, $context ) {
|
160 |
-
// Avoid misleading Theme Check warning.
|
161 |
-
$fn = 'translate_with_gettext_context';
|
162 |
-
return esc_html( $fn( $text, $context, 'freemius' ) );
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Translates and retrieves the singular or plural form based on the supplied number.
|
167 |
-
*
|
168 |
-
* @since 1.2.1.6
|
169 |
-
*
|
170 |
-
* @param string $single
|
171 |
-
* @param string $plural
|
172 |
-
* @param int $number
|
173 |
-
*
|
174 |
-
* @return string
|
175 |
-
*/
|
176 |
-
function _fs_n( $single, $plural, $number ) {
|
177 |
-
$translations = get_translations_for_domain( 'freemius' );
|
178 |
-
$translation = $translations->translate_plural( $single, $plural, $number );
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Filters the singular or plural form of a string.
|
182 |
-
*
|
183 |
-
* @since WP 2.2.0
|
184 |
-
*
|
185 |
-
* @param string $translation
|
186 |
-
* @param string $single
|
187 |
-
* @param string $plural
|
188 |
-
* @param string $number
|
189 |
-
* @param string $domain
|
190 |
-
*/
|
191 |
-
return apply_filters( 'ngettext', $translation, $single, $plural, $number, 'freemius' );
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Translates and retrieves the singular or plural form based on the supplied number, with gettext context.
|
196 |
-
*
|
197 |
-
* @since 1.2.1.6
|
198 |
-
*
|
199 |
-
* @param string $single
|
200 |
-
* @param string $plural
|
201 |
-
* @param int $number
|
202 |
-
* @param string $context
|
203 |
-
*
|
204 |
-
* @return string
|
205 |
-
*/
|
206 |
-
function _fs_nx($single, $plural, $number, $context ) {
|
207 |
-
$translations = get_translations_for_domain( 'freemius' );
|
208 |
-
$translation = $translations->translate_plural( $single, $plural, $number, $context );
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Filters the singular or plural form of a string with gettext context.
|
212 |
-
*
|
213 |
-
* @since WP 3.0
|
214 |
-
*
|
215 |
-
* @param string $translation
|
216 |
-
* @param string $single
|
217 |
-
* @param string $plural
|
218 |
-
* @param string $number
|
219 |
-
* @param string $context
|
220 |
-
* @param string $domain
|
221 |
-
*/
|
222 |
-
return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, 'freemius' );
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Registers plural strings in POT file, but does not translate them.
|
227 |
-
*
|
228 |
-
* Used when you want to keep structures with translatable plural
|
229 |
-
* strings and use them later when the number is known.
|
230 |
-
*
|
231 |
-
* @since 1.2.1.6
|
232 |
-
*
|
233 |
-
* @param string $singular
|
234 |
-
* @param string $plural
|
235 |
-
*
|
236 |
-
* @return array
|
237 |
-
*/
|
238 |
-
function _fs_n_noop( $singular, $plural ) {
|
239 |
-
return array(
|
240 |
-
'singular' => $singular,
|
241 |
-
'plural' => $plural,
|
242 |
-
'context' => null,
|
243 |
-
'domain' => 'freemius'
|
244 |
-
);
|
245 |
-
}
|
246 |
-
|
247 |
-
/**
|
248 |
-
* Registers plural strings with gettext context in POT file, but does not translate them.
|
249 |
-
*
|
250 |
-
* Used when you want to keep structures with translatable plural
|
251 |
-
* strings and use them later when the number is known.
|
252 |
-
*
|
253 |
-
* @since 1.2.1.6
|
254 |
-
*
|
255 |
-
* @param string $singular
|
256 |
-
* @param string $plural
|
257 |
-
* @param string $context
|
258 |
-
*
|
259 |
-
* @return array
|
260 |
-
*/
|
261 |
-
function _fs_nx_noop( $singular, $plural, $context ) {
|
262 |
-
return array(
|
263 |
-
'singular' => $singular,
|
264 |
-
'plural' => $plural,
|
265 |
-
'context' => $context,
|
266 |
-
'domain' => 'freemius'
|
267 |
-
);
|
268 |
-
}
|
25 |
return $fn( $text, 'freemius' );
|
26 |
}
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
/**
|
29 |
* Retrieve translated string with gettext context.
|
30 |
*
|
46 |
$fn = 'translate_with_gettext_context';
|
47 |
return $fn( $text, $context, 'freemius' );
|
48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
freemius/includes/managers/class-fs-admin-menu-manager.php
CHANGED
@@ -1,850 +1,850 @@
|
|
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 |
-
#endregion Properties
|
94 |
-
|
95 |
-
/**
|
96 |
-
* @var FS_Logger
|
97 |
-
*/
|
98 |
-
protected $_logger;
|
99 |
-
|
100 |
-
#region Singleton
|
101 |
-
|
102 |
-
/**
|
103 |
-
* @var FS_Admin_Menu_Manager[]
|
104 |
-
*/
|
105 |
-
private static $_instances = array();
|
106 |
-
|
107 |
-
/**
|
108 |
-
* @param number $module_id
|
109 |
-
* @param string $module_type
|
110 |
-
* @param string $module_unique_affix
|
111 |
-
*
|
112 |
-
* @return FS_Admin_Menu_Manager
|
113 |
-
*/
|
114 |
-
static function instance( $module_id, $module_type, $module_unique_affix ) {
|
115 |
-
$key = 'm_' . $module_id;
|
116 |
-
|
117 |
-
if ( ! isset( self::$_instances[ $key ] ) ) {
|
118 |
-
self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
|
119 |
-
}
|
120 |
-
|
121 |
-
return self::$_instances[ $key ];
|
122 |
-
}
|
123 |
-
|
124 |
-
protected function __construct( $module_id, $module_type, $module_unique_affix ) {
|
125 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
126 |
-
|
127 |
-
$this->_module_id = $module_id;
|
128 |
-
$this->_module_type = $module_type;
|
129 |
-
$this->_module_unique_affix = $module_unique_affix;
|
130 |
-
}
|
131 |
-
|
132 |
-
#endregion Singleton
|
133 |
-
|
134 |
-
#region Helpers
|
135 |
-
|
136 |
-
private function get_option( &$options, $key, $default = false ) {
|
137 |
-
return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
|
138 |
-
}
|
139 |
-
|
140 |
-
private function get_bool_option( &$options, $key, $default = false ) {
|
141 |
-
return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
|
142 |
-
}
|
143 |
-
|
144 |
-
#endregion Helpers
|
145 |
-
|
146 |
-
/**
|
147 |
-
* @param array $menu
|
148 |
-
* @param bool $is_addon
|
149 |
-
*/
|
150 |
-
function init( $menu, $is_addon = false ) {
|
151 |
-
$this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
|
152 |
-
|
153 |
-
$this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
|
154 |
-
|
155 |
-
$this->_default_submenu_items = array();
|
156 |
-
// @deprecated
|
157 |
-
$this->_type = 'page';
|
158 |
-
$this->_is_top_level = true;
|
159 |
-
$this->_is_override_exact = false;
|
160 |
-
$this->_parent_slug = false;
|
161 |
-
// @deprecated
|
162 |
-
$this->_parent_type = 'page';
|
163 |
-
|
164 |
-
if ( ! $is_addon && isset( $menu ) ) {
|
165 |
-
$this->_default_submenu_items = array(
|
166 |
-
'contact' => $this->get_bool_option( $menu, 'contact', true ),
|
167 |
-
'support' => $this->get_bool_option( $menu, 'support', true ),
|
168 |
-
'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
|
169 |
-
'account' => $this->get_bool_option( $menu, 'account', true ),
|
170 |
-
'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
|
171 |
-
'addons' => $this->get_bool_option( $menu, 'addons', true ),
|
172 |
-
);
|
173 |
-
|
174 |
-
// @deprecated
|
175 |
-
$this->_type = $this->get_option( $menu, 'type', 'page' );
|
176 |
-
$this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
|
177 |
-
|
178 |
-
if ( isset( $menu['parent'] ) ) {
|
179 |
-
$this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
|
180 |
-
// @deprecated
|
181 |
-
$this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
|
182 |
-
|
183 |
-
// If parent's slug is different, then it's NOT a top level menu item.
|
184 |
-
$this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
|
185 |
-
} else {
|
186 |
-
/**
|
187 |
-
* If no parent then top level if:
|
188 |
-
* - Has custom admin menu ('page')
|
189 |
-
* - CPT menu type ('cpt')
|
190 |
-
*/
|
191 |
-
// $this->_is_top_level = in_array( $this->_type, array(
|
192 |
-
// 'cpt',
|
193 |
-
// 'page'
|
194 |
-
// ) );
|
195 |
-
}
|
196 |
-
|
197 |
-
$this->_first_time_path = $this->get_option( $menu, 'first-path', false );
|
198 |
-
if ( ! empty( $this->_first_time_path ) && is_string( $this->_first_time_path ) ) {
|
199 |
-
$this->_first_time_path = admin_url( $this->_first_time_path, 'admin' );
|
200 |
-
}
|
201 |
-
}
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Check if top level menu.
|
206 |
-
*
|
207 |
-
* @author Vova Feldman (@svovaf)
|
208 |
-
* @since 1.1.3
|
209 |
-
*
|
210 |
-
* @return bool False if submenu item.
|
211 |
-
*/
|
212 |
-
function is_top_level() {
|
213 |
-
return $this->_is_top_level;
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Check if the page should be override on exact URL match.
|
218 |
-
*
|
219 |
-
* @author Vova Feldman (@svovaf)
|
220 |
-
* @since 1.1.3
|
221 |
-
*
|
222 |
-
* @return bool False if submenu item.
|
223 |
-
*/
|
224 |
-
function is_override_exact() {
|
225 |
-
return $this->_is_override_exact;
|
226 |
-
}
|
227 |
-
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Get the path of the page the user should be forwarded to after first activation.
|
231 |
-
*
|
232 |
-
* @author Vova Feldman (@svovaf)
|
233 |
-
* @since 1.1.3
|
234 |
-
*
|
235 |
-
* @return string
|
236 |
-
*/
|
237 |
-
function get_first_time_path() {
|
238 |
-
return $this->_first_time_path;
|
239 |
-
}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Check if plugin's menu item is part of a custom top level menu.
|
243 |
-
*
|
244 |
-
* @author Vova Feldman (@svovaf)
|
245 |
-
* @since 1.1.3
|
246 |
-
*
|
247 |
-
* @return bool
|
248 |
-
*/
|
249 |
-
function has_custom_parent() {
|
250 |
-
return ! $this->_is_top_level && is_string( $this->_parent_slug );
|
251 |
-
}
|
252 |
-
|
253 |
-
/**
|
254 |
-
* @author Leo Fajardo (@leorw)
|
255 |
-
* @since 1.2.2
|
256 |
-
*
|
257 |
-
* @return bool
|
258 |
-
*/
|
259 |
-
function has_menu() {
|
260 |
-
return $this->_menu_exists;
|
261 |
-
}
|
262 |
-
|
263 |
-
/**
|
264 |
-
* @author Vova Feldman (@svovaf)
|
265 |
-
* @since 1.1.3
|
266 |
-
*
|
267 |
-
* @param string $id
|
268 |
-
* @param bool $default
|
269 |
-
* @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.
|
270 |
-
*
|
271 |
-
* @return bool
|
272 |
-
*/
|
273 |
-
function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
|
274 |
-
if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
|
275 |
-
return false;
|
276 |
-
}
|
277 |
-
|
278 |
-
return fs_apply_filter(
|
279 |
-
$this->_module_unique_affix,
|
280 |
-
'is_submenu_visible',
|
281 |
-
$this->get_bool_option( $this->_default_submenu_items, $id, $default ),
|
282 |
-
$id
|
283 |
-
);
|
284 |
-
}
|
285 |
-
|
286 |
-
/**
|
287 |
-
* Calculates admin settings menu slug.
|
288 |
-
* If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
|
289 |
-
*
|
290 |
-
* @author Vova Feldman (@svovaf)
|
291 |
-
* @since 1.1.3
|
292 |
-
*
|
293 |
-
* @param string $page
|
294 |
-
*
|
295 |
-
* @return string
|
296 |
-
*/
|
297 |
-
function get_slug( $page = '' ) {
|
298 |
-
return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
|
299 |
-
$this->_menu_slug :
|
300 |
-
$this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* @author Vova Feldman (@svovaf)
|
305 |
-
* @since 1.1.3
|
306 |
-
*
|
307 |
-
* @return string
|
308 |
-
*/
|
309 |
-
function get_parent_slug() {
|
310 |
-
return $this->_parent_slug;
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* @author Vova Feldman (@svovaf)
|
315 |
-
* @since 1.1.3
|
316 |
-
*
|
317 |
-
* @return string
|
318 |
-
*/
|
319 |
-
function get_type() {
|
320 |
-
return $this->_type;
|
321 |
-
}
|
322 |
-
|
323 |
-
/**
|
324 |
-
* @author Vova Feldman (@svovaf)
|
325 |
-
* @since 1.1.3
|
326 |
-
*
|
327 |
-
* @return bool
|
328 |
-
*/
|
329 |
-
function is_cpt() {
|
330 |
-
return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
|
331 |
-
// Back compatibility.
|
332 |
-
'cpt' === $this->_type
|
333 |
-
);
|
334 |
-
}
|
335 |
-
|
336 |
-
/**
|
337 |
-
* @author Vova Feldman (@svovaf)
|
338 |
-
* @since 1.1.3
|
339 |
-
*
|
340 |
-
* @return string
|
341 |
-
*/
|
342 |
-
function get_parent_type() {
|
343 |
-
return $this->_parent_type;
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* @author Vova Feldman (@svovaf)
|
348 |
-
* @since 1.1.3
|
349 |
-
*
|
350 |
-
* @return string
|
351 |
-
*/
|
352 |
-
function get_raw_slug() {
|
353 |
-
return $this->_menu_slug;
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Get plugin's original menu slug.
|
358 |
-
*
|
359 |
-
* @author Vova Feldman (@svovaf)
|
360 |
-
* @since 1.1.3
|
361 |
-
*
|
362 |
-
* @return string
|
363 |
-
*/
|
364 |
-
function get_original_menu_slug() {
|
365 |
-
if ( 'cpt' === $this->_type ) {
|
366 |
-
return add_query_arg( array(
|
367 |
-
'post_type' => $this->_menu_slug
|
368 |
-
), 'edit.php' );
|
369 |
-
}
|
370 |
-
|
371 |
-
if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
|
372 |
-
return $this->_menu_slug;
|
373 |
-
} else {
|
374 |
-
return $this->_module_unique_affix;
|
375 |
-
}
|
376 |
-
}
|
377 |
-
|
378 |
-
/**
|
379 |
-
* @author Vova Feldman (@svovaf)
|
380 |
-
* @since 1.1.3
|
381 |
-
*
|
382 |
-
* @return string
|
383 |
-
*/
|
384 |
-
function get_top_level_menu_slug() {
|
385 |
-
return $this->has_custom_parent() ?
|
386 |
-
$this->get_parent_slug() :
|
387 |
-
$this->get_raw_slug();
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Is user on plugin's admin activation page.
|
392 |
-
*
|
393 |
-
* @author Vova Feldman (@svovaf)
|
394 |
-
* @since 1.0.8
|
395 |
-
*
|
396 |
-
* @return bool
|
397 |
-
*/
|
398 |
-
function is_main_settings_page() {
|
399 |
-
if ( $this->_menu_exists &&
|
400 |
-
( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
|
401 |
-
) {
|
402 |
-
/**
|
403 |
-
* Module has a settings menu and the context page is the main settings page, so assume it's in
|
404 |
-
* activation (doesn't really check if already opted-in/skipped or not).
|
405 |
-
*
|
406 |
-
* @since 1.2.2
|
407 |
-
*/
|
408 |
-
return true;
|
409 |
-
}
|
410 |
-
|
411 |
-
global $pagenow;
|
412 |
-
if ( ( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) && Freemius::is_themes_page() ) {
|
413 |
-
/**
|
414 |
-
* In activation only when show_optin query string param is given.
|
415 |
-
*
|
416 |
-
* @since 1.2.2
|
417 |
-
*/
|
418 |
-
return fs_request_get_bool( $this->_module_unique_affix . '_show_optin' );
|
419 |
-
}
|
420 |
-
|
421 |
-
return false;
|
422 |
-
}
|
423 |
-
|
424 |
-
#region Submenu Override
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Override submenu's action.
|
428 |
-
*
|
429 |
-
* @author Vova Feldman (@svovaf)
|
430 |
-
* @since 1.1.0
|
431 |
-
*
|
432 |
-
* @param string $parent_slug
|
433 |
-
* @param string $menu_slug
|
434 |
-
* @param callable $function
|
435 |
-
*
|
436 |
-
* @return false|string If submenu exist, will return the hook name.
|
437 |
-
*/
|
438 |
-
function override_submenu_action( $parent_slug, $menu_slug, $function ) {
|
439 |
-
global $submenu;
|
440 |
-
|
441 |
-
$menu_slug = plugin_basename( $menu_slug );
|
442 |
-
$parent_slug = plugin_basename( $parent_slug );
|
443 |
-
|
444 |
-
if ( ! isset( $submenu[ $parent_slug ] ) ) {
|
445 |
-
// Parent menu not exist.
|
446 |
-
return false;
|
447 |
-
}
|
448 |
-
|
449 |
-
$found_submenu_item = false;
|
450 |
-
foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
|
451 |
-
if ( $menu_slug === $submenu_item[2] ) {
|
452 |
-
$found_submenu_item = $submenu_item;
|
453 |
-
break;
|
454 |
-
}
|
455 |
-
}
|
456 |
-
|
457 |
-
if ( false === $found_submenu_item ) {
|
458 |
-
// Submenu item not found.
|
459 |
-
return false;
|
460 |
-
}
|
461 |
-
|
462 |
-
// Remove current function.
|
463 |
-
$hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
|
464 |
-
remove_all_actions( $hookname );
|
465 |
-
|
466 |
-
// Attach new action.
|
467 |
-
add_action( $hookname, $function );
|
468 |
-
|
469 |
-
return $hookname;
|
470 |
-
}
|
471 |
-
|
472 |
-
#endregion Submenu Override
|
473 |
-
|
474 |
-
#region Top level menu Override
|
475 |
-
|
476 |
-
/**
|
477 |
-
* Find plugin's admin dashboard main menu item.
|
478 |
-
*
|
479 |
-
* @author Vova Feldman (@svovaf)
|
480 |
-
* @since 1.0.2
|
481 |
-
*
|
482 |
-
* @return string[]|false
|
483 |
-
*/
|
484 |
-
private function find_top_level_menu() {
|
485 |
-
global $menu;
|
486 |
-
|
487 |
-
$position = - 1;
|
488 |
-
$found_menu = false;
|
489 |
-
|
490 |
-
$menu_slug = $this->get_raw_slug();
|
491 |
-
|
492 |
-
$hook_name = get_plugin_page_hookname( $menu_slug, '' );
|
493 |
-
foreach ( $menu as $pos => $m ) {
|
494 |
-
if ( $menu_slug === $m[2] ) {
|
495 |
-
$position = $pos;
|
496 |
-
$found_menu = $m;
|
497 |
-
break;
|
498 |
-
}
|
499 |
-
}
|
500 |
-
|
501 |
-
if ( false === $found_menu ) {
|
502 |
-
return false;
|
503 |
-
}
|
504 |
-
|
505 |
-
return array(
|
506 |
-
'menu' => $found_menu,
|
507 |
-
'position' => $position,
|
508 |
-
'hook_name' => $hook_name
|
509 |
-
);
|
510 |
-
}
|
511 |
-
|
512 |
-
/**
|
513 |
-
* Find plugin's admin dashboard main submenu item.
|
514 |
-
*
|
515 |
-
* @author Vova Feldman (@svovaf)
|
516 |
-
* @since 1.2.1.6
|
517 |
-
*
|
518 |
-
* @return array|false
|
519 |
-
*/
|
520 |
-
private function find_main_submenu() {
|
521 |
-
global $submenu;
|
522 |
-
|
523 |
-
$top_level_menu_slug = $this->get_top_level_menu_slug();
|
524 |
-
|
525 |
-
if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
|
526 |
-
return false;
|
527 |
-
}
|
528 |
-
|
529 |
-
$submenu_slug = $this->get_raw_slug();
|
530 |
-
|
531 |
-
$position = - 1;
|
532 |
-
$found_submenu = false;
|
533 |
-
|
534 |
-
$hook_name = get_plugin_page_hookname( $submenu_slug, '' );
|
535 |
-
|
536 |
-
foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
|
537 |
-
if ( $submenu_slug === $sub[2] ) {
|
538 |
-
$position = $pos;
|
539 |
-
$found_submenu = $sub;
|
540 |
-
}
|
541 |
-
}
|
542 |
-
|
543 |
-
if ( false === $found_submenu ) {
|
544 |
-
return false;
|
545 |
-
}
|
546 |
-
|
547 |
-
return array(
|
548 |
-
'menu' => $found_submenu,
|
549 |
-
'parent_slug' => $top_level_menu_slug,
|
550 |
-
'position' => $position,
|
551 |
-
'hook_name' => $hook_name
|
552 |
-
);
|
553 |
-
}
|
554 |
-
|
555 |
-
/**
|
556 |
-
* Remove all sub-menu items.
|
557 |
-
*
|
558 |
-
* @author Vova Feldman (@svovaf)
|
559 |
-
* @since 1.0.7
|
560 |
-
*
|
561 |
-
* @return bool If submenu with plugin's menu slug was found.
|
562 |
-
*/
|
563 |
-
private function remove_all_submenu_items() {
|
564 |
-
global $submenu;
|
565 |
-
|
566 |
-
$menu_slug = $this->get_raw_slug();
|
567 |
-
|
568 |
-
if ( ! isset( $submenu[ $menu_slug ] ) ) {
|
569 |
-
return false;
|
570 |
-
}
|
571 |
-
|
572 |
-
/**
|
573 |
-
* This method is NOT executed for WordPress.org themes.
|
574 |
-
* Since we maintain only one version of the SDK we added this small
|
575 |
-
* hack to avoid the error from Theme Check since it's a false-positive.
|
576 |
-
*
|
577 |
-
* @author Vova Feldman (@svovaf)
|
578 |
-
* @since 1.2.2.7
|
579 |
-
*/
|
580 |
-
$submenu_ref = &$submenu;
|
581 |
-
$submenu_ref[ $menu_slug ] = array();
|
582 |
-
|
583 |
-
return true;
|
584 |
-
}
|
585 |
-
|
586 |
-
/**
|
587 |
-
*
|
588 |
-
* @author Vova Feldman (@svovaf)
|
589 |
-
* @since 1.0.9
|
590 |
-
*
|
591 |
-
* @return false|array[string]mixed
|
592 |
-
*/
|
593 |
-
function remove_menu_item() {
|
594 |
-
$this->_logger->entrance();
|
595 |
-
|
596 |
-
// Find main menu item.
|
597 |
-
$menu = $this->find_top_level_menu();
|
598 |
-
|
599 |
-
if ( false === $menu ) {
|
600 |
-
return false;
|
601 |
-
}
|
602 |
-
|
603 |
-
// Remove it with its actions.
|
604 |
-
remove_all_actions( $menu['hook_name'] );
|
605 |
-
|
606 |
-
// Remove all submenu items.
|
607 |
-
$this->remove_all_submenu_items();
|
608 |
-
|
609 |
-
return $menu;
|
610 |
-
}
|
611 |
-
|
612 |
-
/**
|
613 |
-
* Get module's main admin setting page URL.
|
614 |
-
*
|
615 |
-
* @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.
|
616 |
-
*
|
617 |
-
* @author Vova Feldman (@svovaf)
|
618 |
-
* @since 1.2.2.7
|
619 |
-
*
|
620 |
-
* @return string
|
621 |
-
*/
|
622 |
-
function main_menu_url() {
|
623 |
-
$this->_logger->entrance();
|
624 |
-
|
625 |
-
if ( $this->_is_top_level ) {
|
626 |
-
$menu = $this->find_top_level_menu();
|
627 |
-
} else {
|
628 |
-
$menu = $this->find_main_submenu();
|
629 |
-
}
|
630 |
-
|
631 |
-
$parent_slug = isset( $menu['parent_slug'] ) ?
|
632 |
-
$menu['parent_slug'] :
|
633 |
-
'admin.php';
|
634 |
-
|
635 |
-
return admin_url( $parent_slug . '?page=' . $menu['menu'][2] );
|
636 |
-
}
|
637 |
-
|
638 |
-
/**
|
639 |
-
* @author Vova Feldman (@svovaf)
|
640 |
-
* @since 1.1.4
|
641 |
-
*
|
642 |
-
* @param callable $function
|
643 |
-
*
|
644 |
-
* @return false|array[string]mixed
|
645 |
-
*/
|
646 |
-
function override_menu_item( $function ) {
|
647 |
-
$found_menu = $this->remove_menu_item();
|
648 |
-
|
649 |
-
if ( false === $found_menu ) {
|
650 |
-
return false;
|
651 |
-
}
|
652 |
-
|
653 |
-
if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
|
654 |
-
$menu_slug = plugin_basename( $this->get_slug() );
|
655 |
-
|
656 |
-
$hookname = get_plugin_page_hookname( $menu_slug, '' );
|
657 |
-
|
658 |
-
// Override menu action.
|
659 |
-
add_action( $hookname, $function );
|
660 |
-
} else {
|
661 |
-
global $menu;
|
662 |
-
|
663 |
-
// Remove original CPT menu.
|
664 |
-
unset( $menu[ $found_menu['position'] ] );
|
665 |
-
|
666 |
-
// Create new top-level menu action.
|
667 |
-
$hookname = self::add_page(
|
668 |
-
$found_menu['menu'][3],
|
669 |
-
$found_menu['menu'][0],
|
670 |
-
'manage_options',
|
671 |
-
$this->get_slug(),
|
672 |
-
$function,
|
673 |
-
$found_menu['menu'][6],
|
674 |
-
$found_menu['position']
|
675 |
-
);
|
676 |
-
}
|
677 |
-
|
678 |
-
return $hookname;
|
679 |
-
}
|
680 |
-
|
681 |
-
/**
|
682 |
-
* Adds a counter to the module's top level menu item.
|
683 |
-
*
|
684 |
-
* @author Vova Feldman (@svovaf)
|
685 |
-
* @since 1.2.1.5
|
686 |
-
*
|
687 |
-
* @param int $counter
|
688 |
-
* @param string $class
|
689 |
-
*/
|
690 |
-
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
|
691 |
-
global $menu, $submenu;
|
692 |
-
|
693 |
-
$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>';
|
694 |
-
|
695 |
-
/**
|
696 |
-
* This method is NOT executed for WordPress.org themes.
|
697 |
-
* Since we maintain only one version of the SDK we added this small
|
698 |
-
* hack to avoid the error from Theme Check since it's a false-positive.
|
699 |
-
*
|
700 |
-
* @author Vova Feldman (@svovaf)
|
701 |
-
* @since 1.2.2.7
|
702 |
-
*/
|
703 |
-
$menu_ref = &$menu;
|
704 |
-
$submenu_ref = &$submenu;
|
705 |
-
|
706 |
-
if ( $this->_is_top_level ) {
|
707 |
-
// Find main menu item.
|
708 |
-
$found_menu = $this->find_top_level_menu();
|
709 |
-
|
710 |
-
if ( false !== $found_menu ) {
|
711 |
-
// Override menu label.
|
712 |
-
$menu_ref[ $found_menu['position'] ][0] = sprintf(
|
713 |
-
$mask,
|
714 |
-
$found_menu['menu'][0],
|
715 |
-
$class,
|
716 |
-
$counter
|
717 |
-
);
|
718 |
-
}
|
719 |
-
} else {
|
720 |
-
$found_submenu = $this->find_main_submenu();
|
721 |
-
|
722 |
-
if ( false !== $found_submenu ) {
|
723 |
-
// Override menu label.
|
724 |
-
$submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
|
725 |
-
$mask,
|
726 |
-
$found_submenu['menu'][0],
|
727 |
-
$class,
|
728 |
-
$counter
|
729 |
-
);
|
730 |
-
}
|
731 |
-
}
|
732 |
-
}
|
733 |
-
|
734 |
-
#endregion Top level menu Override
|
735 |
-
|
736 |
-
/**
|
737 |
-
* Add a top-level menu page.
|
738 |
-
*
|
739 |
-
* Note for WordPress.org Theme/Plugin reviewer:
|
740 |
-
*
|
741 |
-
* This is a replication of `add_menu_page()` to avoid Theme Check warning.
|
742 |
-
*
|
743 |
-
* Why?
|
744 |
-
* ====
|
745 |
-
* Freemius is an SDK for plugin and theme developers. Since the core
|
746 |
-
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
747 |
-
* we only develop and maintain one code base.
|
748 |
-
*
|
749 |
-
* This method will not run for wp.org themes (only plugins) since theme
|
750 |
-
* admin settings/options are now only allowed in the customizer.
|
751 |
-
*
|
752 |
-
* If you have any questions or need clarifications, please don't hesitate
|
753 |
-
* pinging me on slack, my username is @svovaf.
|
754 |
-
*
|
755 |
-
* @author Vova Feldman (@svovaf)
|
756 |
-
* @since 1.2.2
|
757 |
-
*
|
758 |
-
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
759 |
-
* selected.
|
760 |
-
* @param string $menu_title The text to be used for the menu.
|
761 |
-
* @param string $capability The capability required for this menu to be displayed to the user.
|
762 |
-
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
763 |
-
* @param callable|string $function The function to be called to output the content for this page.
|
764 |
-
* @param string $icon_url The URL to the icon to be used for this menu.
|
765 |
-
* * Pass a base64-encoded SVG using a data URI, which will be colored to
|
766 |
-
* match the color scheme. This should begin with
|
767 |
-
* 'data:image/svg+xml;base64,'.
|
768 |
-
* * Pass the name of a Dashicons helper class to use a font icon,
|
769 |
-
* e.g. 'dashicons-chart-pie'.
|
770 |
-
* * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
|
771 |
-
* via CSS.
|
772 |
-
* @param int $position The position in the menu order this one should appear.
|
773 |
-
*
|
774 |
-
* @return string The resulting page's hook_suffix.
|
775 |
-
*/
|
776 |
-
static function add_page(
|
777 |
-
$page_title,
|
778 |
-
$menu_title,
|
779 |
-
$capability,
|
780 |
-
$menu_slug,
|
781 |
-
$function = '',
|
782 |
-
$icon_url = '',
|
783 |
-
$position = null
|
784 |
-
) {
|
785 |
-
$fn = 'add_menu' . '_page';
|
786 |
-
|
787 |
-
return $fn(
|
788 |
-
$page_title,
|
789 |
-
$menu_title,
|
790 |
-
$capability,
|
791 |
-
$menu_slug,
|
792 |
-
$function,
|
793 |
-
$icon_url,
|
794 |
-
$position
|
795 |
-
);
|
796 |
-
}
|
797 |
-
|
798 |
-
/**
|
799 |
-
* Add a submenu page.
|
800 |
-
*
|
801 |
-
* Note for WordPress.org Theme/Plugin reviewer:
|
802 |
-
*
|
803 |
-
* This is a replication of `add_submenu_page()` to avoid Theme Check warning.
|
804 |
-
*
|
805 |
-
* Why?
|
806 |
-
* ====
|
807 |
-
* Freemius is an SDK for plugin and theme developers. Since the core
|
808 |
-
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
809 |
-
* we only develop and maintain one code base.
|
810 |
-
*
|
811 |
-
* This method will not run for wp.org themes (only plugins) since theme
|
812 |
-
* admin settings/options are now only allowed in the customizer.
|
813 |
-
*
|
814 |
-
* If you have any questions or need clarifications, please don't hesitate
|
815 |
-
* pinging me on slack, my username is @svovaf.
|
816 |
-
*
|
817 |
-
* @author Vova Feldman (@svovaf)
|
818 |
-
* @since 1.2.2
|
819 |
-
*
|
820 |
-
* @param string $parent_slug The slug name for the parent menu (or the file name of a standard
|
821 |
-
* WordPress admin page).
|
822 |
-
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
823 |
-
* selected.
|
824 |
-
* @param string $menu_title The text to be used for the menu.
|
825 |
-
* @param string $capability The capability required for this menu to be displayed to the user.
|
826 |
-
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
827 |
-
* @param callable|string $function The function to be called to output the content for this page.
|
828 |
-
*
|
829 |
-
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
|
830 |
-
* required.
|
831 |
-
*/
|
832 |
-
static function add_subpage(
|
833 |
-
$parent_slug,
|
834 |
-
$page_title,
|
835 |
-
$menu_title,
|
836 |
-
$capability,
|
837 |
-
$menu_slug,
|
838 |
-
$function = ''
|
839 |
-
) {
|
840 |
-
$fn = 'add_submenu' . '_page';
|
841 |
-
|
842 |
-
return $fn( $parent_slug,
|
843 |
-
$page_title,
|
844 |
-
$menu_title,
|
845 |
-
$capability,
|
846 |
-
$menu_slug,
|
847 |
-
$function
|
848 |
-
);
|
849 |
-
}
|
850 |
}
|
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 |
+
#endregion Properties
|
94 |
+
|
95 |
+
/**
|
96 |
+
* @var FS_Logger
|
97 |
+
*/
|
98 |
+
protected $_logger;
|
99 |
+
|
100 |
+
#region Singleton
|
101 |
+
|
102 |
+
/**
|
103 |
+
* @var FS_Admin_Menu_Manager[]
|
104 |
+
*/
|
105 |
+
private static $_instances = array();
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @param number $module_id
|
109 |
+
* @param string $module_type
|
110 |
+
* @param string $module_unique_affix
|
111 |
+
*
|
112 |
+
* @return FS_Admin_Menu_Manager
|
113 |
+
*/
|
114 |
+
static function instance( $module_id, $module_type, $module_unique_affix ) {
|
115 |
+
$key = 'm_' . $module_id;
|
116 |
+
|
117 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
118 |
+
self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
|
119 |
+
}
|
120 |
+
|
121 |
+
return self::$_instances[ $key ];
|
122 |
+
}
|
123 |
+
|
124 |
+
protected function __construct( $module_id, $module_type, $module_unique_affix ) {
|
125 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
126 |
+
|
127 |
+
$this->_module_id = $module_id;
|
128 |
+
$this->_module_type = $module_type;
|
129 |
+
$this->_module_unique_affix = $module_unique_affix;
|
130 |
+
}
|
131 |
+
|
132 |
+
#endregion Singleton
|
133 |
+
|
134 |
+
#region Helpers
|
135 |
+
|
136 |
+
private function get_option( &$options, $key, $default = false ) {
|
137 |
+
return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
|
138 |
+
}
|
139 |
+
|
140 |
+
private function get_bool_option( &$options, $key, $default = false ) {
|
141 |
+
return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
|
142 |
+
}
|
143 |
+
|
144 |
+
#endregion Helpers
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @param array $menu
|
148 |
+
* @param bool $is_addon
|
149 |
+
*/
|
150 |
+
function init( $menu, $is_addon = false ) {
|
151 |
+
$this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
|
152 |
+
|
153 |
+
$this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
|
154 |
+
|
155 |
+
$this->_default_submenu_items = array();
|
156 |
+
// @deprecated
|
157 |
+
$this->_type = 'page';
|
158 |
+
$this->_is_top_level = true;
|
159 |
+
$this->_is_override_exact = false;
|
160 |
+
$this->_parent_slug = false;
|
161 |
+
// @deprecated
|
162 |
+
$this->_parent_type = 'page';
|
163 |
+
|
164 |
+
if ( ! $is_addon && isset( $menu ) ) {
|
165 |
+
$this->_default_submenu_items = array(
|
166 |
+
'contact' => $this->get_bool_option( $menu, 'contact', true ),
|
167 |
+
'support' => $this->get_bool_option( $menu, 'support', true ),
|
168 |
+
'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
|
169 |
+
'account' => $this->get_bool_option( $menu, 'account', true ),
|
170 |
+
'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
|
171 |
+
'addons' => $this->get_bool_option( $menu, 'addons', true ),
|
172 |
+
);
|
173 |
+
|
174 |
+
// @deprecated
|
175 |
+
$this->_type = $this->get_option( $menu, 'type', 'page' );
|
176 |
+
$this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
|
177 |
+
|
178 |
+
if ( isset( $menu['parent'] ) ) {
|
179 |
+
$this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
|
180 |
+
// @deprecated
|
181 |
+
$this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
|
182 |
+
|
183 |
+
// If parent's slug is different, then it's NOT a top level menu item.
|
184 |
+
$this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
|
185 |
+
} else {
|
186 |
+
/**
|
187 |
+
* If no parent then top level if:
|
188 |
+
* - Has custom admin menu ('page')
|
189 |
+
* - CPT menu type ('cpt')
|
190 |
+
*/
|
191 |
+
// $this->_is_top_level = in_array( $this->_type, array(
|
192 |
+
// 'cpt',
|
193 |
+
// 'page'
|
194 |
+
// ) );
|
195 |
+
}
|
196 |
+
|
197 |
+
$this->_first_time_path = $this->get_option( $menu, 'first-path', false );
|
198 |
+
if ( ! empty( $this->_first_time_path ) && is_string( $this->_first_time_path ) ) {
|
199 |
+
$this->_first_time_path = admin_url( $this->_first_time_path, 'admin' );
|
200 |
+
}
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Check if top level menu.
|
206 |
+
*
|
207 |
+
* @author Vova Feldman (@svovaf)
|
208 |
+
* @since 1.1.3
|
209 |
+
*
|
210 |
+
* @return bool False if submenu item.
|
211 |
+
*/
|
212 |
+
function is_top_level() {
|
213 |
+
return $this->_is_top_level;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Check if the page should be override on exact URL match.
|
218 |
+
*
|
219 |
+
* @author Vova Feldman (@svovaf)
|
220 |
+
* @since 1.1.3
|
221 |
+
*
|
222 |
+
* @return bool False if submenu item.
|
223 |
+
*/
|
224 |
+
function is_override_exact() {
|
225 |
+
return $this->_is_override_exact;
|
226 |
+
}
|
227 |
+
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Get the path of the page the user should be forwarded to after first activation.
|
231 |
+
*
|
232 |
+
* @author Vova Feldman (@svovaf)
|
233 |
+
* @since 1.1.3
|
234 |
+
*
|
235 |
+
* @return string
|
236 |
+
*/
|
237 |
+
function get_first_time_path() {
|
238 |
+
return $this->_first_time_path;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Check if plugin's menu item is part of a custom top level menu.
|
243 |
+
*
|
244 |
+
* @author Vova Feldman (@svovaf)
|
245 |
+
* @since 1.1.3
|
246 |
+
*
|
247 |
+
* @return bool
|
248 |
+
*/
|
249 |
+
function has_custom_parent() {
|
250 |
+
return ! $this->_is_top_level && is_string( $this->_parent_slug );
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* @author Leo Fajardo (@leorw)
|
255 |
+
* @since 1.2.2
|
256 |
+
*
|
257 |
+
* @return bool
|
258 |
+
*/
|
259 |
+
function has_menu() {
|
260 |
+
return $this->_menu_exists;
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* @author Vova Feldman (@svovaf)
|
265 |
+
* @since 1.1.3
|
266 |
+
*
|
267 |
+
* @param string $id
|
268 |
+
* @param bool $default
|
269 |
+
* @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.
|
270 |
+
*
|
271 |
+
* @return bool
|
272 |
+
*/
|
273 |
+
function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
|
274 |
+
if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
|
275 |
+
return false;
|
276 |
+
}
|
277 |
+
|
278 |
+
return fs_apply_filter(
|
279 |
+
$this->_module_unique_affix,
|
280 |
+
'is_submenu_visible',
|
281 |
+
$this->get_bool_option( $this->_default_submenu_items, $id, $default ),
|
282 |
+
$id
|
283 |
+
);
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Calculates admin settings menu slug.
|
288 |
+
* If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
|
289 |
+
*
|
290 |
+
* @author Vova Feldman (@svovaf)
|
291 |
+
* @since 1.1.3
|
292 |
+
*
|
293 |
+
* @param string $page
|
294 |
+
*
|
295 |
+
* @return string
|
296 |
+
*/
|
297 |
+
function get_slug( $page = '' ) {
|
298 |
+
return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
|
299 |
+
$this->_menu_slug :
|
300 |
+
$this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* @author Vova Feldman (@svovaf)
|
305 |
+
* @since 1.1.3
|
306 |
+
*
|
307 |
+
* @return string
|
308 |
+
*/
|
309 |
+
function get_parent_slug() {
|
310 |
+
return $this->_parent_slug;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* @author Vova Feldman (@svovaf)
|
315 |
+
* @since 1.1.3
|
316 |
+
*
|
317 |
+
* @return string
|
318 |
+
*/
|
319 |
+
function get_type() {
|
320 |
+
return $this->_type;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* @author Vova Feldman (@svovaf)
|
325 |
+
* @since 1.1.3
|
326 |
+
*
|
327 |
+
* @return bool
|
328 |
+
*/
|
329 |
+
function is_cpt() {
|
330 |
+
return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
|
331 |
+
// Back compatibility.
|
332 |
+
'cpt' === $this->_type
|
333 |
+
);
|
334 |
+
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* @author Vova Feldman (@svovaf)
|
338 |
+
* @since 1.1.3
|
339 |
+
*
|
340 |
+
* @return string
|
341 |
+
*/
|
342 |
+
function get_parent_type() {
|
343 |
+
return $this->_parent_type;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* @author Vova Feldman (@svovaf)
|
348 |
+
* @since 1.1.3
|
349 |
+
*
|
350 |
+
* @return string
|
351 |
+
*/
|
352 |
+
function get_raw_slug() {
|
353 |
+
return $this->_menu_slug;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Get plugin's original menu slug.
|
358 |
+
*
|
359 |
+
* @author Vova Feldman (@svovaf)
|
360 |
+
* @since 1.1.3
|
361 |
+
*
|
362 |
+
* @return string
|
363 |
+
*/
|
364 |
+
function get_original_menu_slug() {
|
365 |
+
if ( 'cpt' === $this->_type ) {
|
366 |
+
return add_query_arg( array(
|
367 |
+
'post_type' => $this->_menu_slug
|
368 |
+
), 'edit.php' );
|
369 |
+
}
|
370 |
+
|
371 |
+
if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
|
372 |
+
return $this->_menu_slug;
|
373 |
+
} else {
|
374 |
+
return $this->_module_unique_affix;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* @author Vova Feldman (@svovaf)
|
380 |
+
* @since 1.1.3
|
381 |
+
*
|
382 |
+
* @return string
|
383 |
+
*/
|
384 |
+
function get_top_level_menu_slug() {
|
385 |
+
return $this->has_custom_parent() ?
|
386 |
+
$this->get_parent_slug() :
|
387 |
+
$this->get_raw_slug();
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Is user on plugin's admin activation page.
|
392 |
+
*
|
393 |
+
* @author Vova Feldman (@svovaf)
|
394 |
+
* @since 1.0.8
|
395 |
+
*
|
396 |
+
* @return bool
|
397 |
+
*/
|
398 |
+
function is_main_settings_page() {
|
399 |
+
if ( $this->_menu_exists &&
|
400 |
+
( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
|
401 |
+
) {
|
402 |
+
/**
|
403 |
+
* Module has a settings menu and the context page is the main settings page, so assume it's in
|
404 |
+
* activation (doesn't really check if already opted-in/skipped or not).
|
405 |
+
*
|
406 |
+
* @since 1.2.2
|
407 |
+
*/
|
408 |
+
return true;
|
409 |
+
}
|
410 |
+
|
411 |
+
global $pagenow;
|
412 |
+
if ( ( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) && Freemius::is_themes_page() ) {
|
413 |
+
/**
|
414 |
+
* In activation only when show_optin query string param is given.
|
415 |
+
*
|
416 |
+
* @since 1.2.2
|
417 |
+
*/
|
418 |
+
return fs_request_get_bool( $this->_module_unique_affix . '_show_optin' );
|
419 |
+
}
|
420 |
+
|
421 |
+
return false;
|
422 |
+
}
|
423 |
+
|
424 |
+
#region Submenu Override
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Override submenu's action.
|
428 |
+
*
|
429 |
+
* @author Vova Feldman (@svovaf)
|
430 |
+
* @since 1.1.0
|
431 |
+
*
|
432 |
+
* @param string $parent_slug
|
433 |
+
* @param string $menu_slug
|
434 |
+
* @param callable $function
|
435 |
+
*
|
436 |
+
* @return false|string If submenu exist, will return the hook name.
|
437 |
+
*/
|
438 |
+
function override_submenu_action( $parent_slug, $menu_slug, $function ) {
|
439 |
+
global $submenu;
|
440 |
+
|
441 |
+
$menu_slug = plugin_basename( $menu_slug );
|
442 |
+
$parent_slug = plugin_basename( $parent_slug );
|
443 |
+
|
444 |
+
if ( ! isset( $submenu[ $parent_slug ] ) ) {
|
445 |
+
// Parent menu not exist.
|
446 |
+
return false;
|
447 |
+
}
|
448 |
+
|
449 |
+
$found_submenu_item = false;
|
450 |
+
foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
|
451 |
+
if ( $menu_slug === $submenu_item[2] ) {
|
452 |
+
$found_submenu_item = $submenu_item;
|
453 |
+
break;
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
+
if ( false === $found_submenu_item ) {
|
458 |
+
// Submenu item not found.
|
459 |
+
return false;
|
460 |
+
}
|
461 |
+
|
462 |
+
// Remove current function.
|
463 |
+
$hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
|
464 |
+
remove_all_actions( $hookname );
|
465 |
+
|
466 |
+
// Attach new action.
|
467 |
+
add_action( $hookname, $function );
|
468 |
+
|
469 |
+
return $hookname;
|
470 |
+
}
|
471 |
+
|
472 |
+
#endregion Submenu Override
|
473 |
+
|
474 |
+
#region Top level menu Override
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Find plugin's admin dashboard main menu item.
|
478 |
+
*
|
479 |
+
* @author Vova Feldman (@svovaf)
|
480 |
+
* @since 1.0.2
|
481 |
+
*
|
482 |
+
* @return string[]|false
|
483 |
+
*/
|
484 |
+
private function find_top_level_menu() {
|
485 |
+
global $menu;
|
486 |
+
|
487 |
+
$position = - 1;
|
488 |
+
$found_menu = false;
|
489 |
+
|
490 |
+
$menu_slug = $this->get_raw_slug();
|
491 |
+
|
492 |
+
$hook_name = get_plugin_page_hookname( $menu_slug, '' );
|
493 |
+
foreach ( $menu as $pos => $m ) {
|
494 |
+
if ( $menu_slug === $m[2] ) {
|
495 |
+
$position = $pos;
|
496 |
+
$found_menu = $m;
|
497 |
+
break;
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
if ( false === $found_menu ) {
|
502 |
+
return false;
|
503 |
+
}
|
504 |
+
|
505 |
+
return array(
|
506 |
+
'menu' => $found_menu,
|
507 |
+
'position' => $position,
|
508 |
+
'hook_name' => $hook_name
|
509 |
+
);
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Find plugin's admin dashboard main submenu item.
|
514 |
+
*
|
515 |
+
* @author Vova Feldman (@svovaf)
|
516 |
+
* @since 1.2.1.6
|
517 |
+
*
|
518 |
+
* @return array|false
|
519 |
+
*/
|
520 |
+
private function find_main_submenu() {
|
521 |
+
global $submenu;
|
522 |
+
|
523 |
+
$top_level_menu_slug = $this->get_top_level_menu_slug();
|
524 |
+
|
525 |
+
if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
|
526 |
+
return false;
|
527 |
+
}
|
528 |
+
|
529 |
+
$submenu_slug = $this->get_raw_slug();
|
530 |
+
|
531 |
+
$position = - 1;
|
532 |
+
$found_submenu = false;
|
533 |
+
|
534 |
+
$hook_name = get_plugin_page_hookname( $submenu_slug, '' );
|
535 |
+
|
536 |
+
foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
|
537 |
+
if ( $submenu_slug === $sub[2] ) {
|
538 |
+
$position = $pos;
|
539 |
+
$found_submenu = $sub;
|
540 |
+
}
|
541 |
+
}
|
542 |
+
|
543 |
+
if ( false === $found_submenu ) {
|
544 |
+
return false;
|
545 |
+
}
|
546 |
+
|
547 |
+
return array(
|
548 |
+
'menu' => $found_submenu,
|
549 |
+
'parent_slug' => $top_level_menu_slug,
|
550 |
+
'position' => $position,
|
551 |
+
'hook_name' => $hook_name
|
552 |
+
);
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Remove all sub-menu items.
|
557 |
+
*
|
558 |
+
* @author Vova Feldman (@svovaf)
|
559 |
+
* @since 1.0.7
|
560 |
+
*
|
561 |
+
* @return bool If submenu with plugin's menu slug was found.
|
562 |
+
*/
|
563 |
+
private function remove_all_submenu_items() {
|
564 |
+
global $submenu;
|
565 |
+
|
566 |
+
$menu_slug = $this->get_raw_slug();
|
567 |
+
|
568 |
+
if ( ! isset( $submenu[ $menu_slug ] ) ) {
|
569 |
+
return false;
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* This method is NOT executed for WordPress.org themes.
|
574 |
+
* Since we maintain only one version of the SDK we added this small
|
575 |
+
* hack to avoid the error from Theme Check since it's a false-positive.
|
576 |
+
*
|
577 |
+
* @author Vova Feldman (@svovaf)
|
578 |
+
* @since 1.2.2.7
|
579 |
+
*/
|
580 |
+
$submenu_ref = &$submenu;
|
581 |
+
$submenu_ref[ $menu_slug ] = array();
|
582 |
+
|
583 |
+
return true;
|
584 |
+
}
|
585 |
+
|
586 |
+
/**
|
587 |
+
*
|
588 |
+
* @author Vova Feldman (@svovaf)
|
589 |
+
* @since 1.0.9
|
590 |
+
*
|
591 |
+
* @return false|array[string]mixed
|
592 |
+
*/
|
593 |
+
function remove_menu_item() {
|
594 |
+
$this->_logger->entrance();
|
595 |
+
|
596 |
+
// Find main menu item.
|
597 |
+
$menu = $this->find_top_level_menu();
|
598 |
+
|
599 |
+
if ( false === $menu ) {
|
600 |
+
return false;
|
601 |
+
}
|
602 |
+
|
603 |
+
// Remove it with its actions.
|
604 |
+
remove_all_actions( $menu['hook_name'] );
|
605 |
+
|
606 |
+
// Remove all submenu items.
|
607 |
+
$this->remove_all_submenu_items();
|
608 |
+
|
609 |
+
return $menu;
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Get module's main admin setting page URL.
|
614 |
+
*
|
615 |
+
* @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.
|
616 |
+
*
|
617 |
+
* @author Vova Feldman (@svovaf)
|
618 |
+
* @since 1.2.2.7
|
619 |
+
*
|
620 |
+
* @return string
|
621 |
+
*/
|
622 |
+
function main_menu_url() {
|
623 |
+
$this->_logger->entrance();
|
624 |
+
|
625 |
+
if ( $this->_is_top_level ) {
|
626 |
+
$menu = $this->find_top_level_menu();
|
627 |
+
} else {
|
628 |
+
$menu = $this->find_main_submenu();
|
629 |
+
}
|
630 |
+
|
631 |
+
$parent_slug = isset( $menu['parent_slug'] ) ?
|
632 |
+
$menu['parent_slug'] :
|
633 |
+
'admin.php';
|
634 |
+
|
635 |
+
return admin_url( $parent_slug . '?page=' . $menu['menu'][2] );
|
636 |
+
}
|
637 |
+
|
638 |
+
/**
|
639 |
+
* @author Vova Feldman (@svovaf)
|
640 |
+
* @since 1.1.4
|
641 |
+
*
|
642 |
+
* @param callable $function
|
643 |
+
*
|
644 |
+
* @return false|array[string]mixed
|
645 |
+
*/
|
646 |
+
function override_menu_item( $function ) {
|
647 |
+
$found_menu = $this->remove_menu_item();
|
648 |
+
|
649 |
+
if ( false === $found_menu ) {
|
650 |
+
return false;
|
651 |
+
}
|
652 |
+
|
653 |
+
if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
|
654 |
+
$menu_slug = plugin_basename( $this->get_slug() );
|
655 |
+
|
656 |
+
$hookname = get_plugin_page_hookname( $menu_slug, '' );
|
657 |
+
|
658 |
+
// Override menu action.
|
659 |
+
add_action( $hookname, $function );
|
660 |
+
} else {
|
661 |
+
global $menu;
|
662 |
+
|
663 |
+
// Remove original CPT menu.
|
664 |
+
unset( $menu[ $found_menu['position'] ] );
|
665 |
+
|
666 |
+
// Create new top-level menu action.
|
667 |
+
$hookname = self::add_page(
|
668 |
+
$found_menu['menu'][3],
|
669 |
+
$found_menu['menu'][0],
|
670 |
+
'manage_options',
|
671 |
+
$this->get_slug(),
|
672 |
+
$function,
|
673 |
+
$found_menu['menu'][6],
|
674 |
+
$found_menu['position']
|
675 |
+
);
|
676 |
+
}
|
677 |
+
|
678 |
+
return $hookname;
|
679 |
+
}
|
680 |
+
|
681 |
+
/**
|
682 |
+
* Adds a counter to the module's top level menu item.
|
683 |
+
*
|
684 |
+
* @author Vova Feldman (@svovaf)
|
685 |
+
* @since 1.2.1.5
|
686 |
+
*
|
687 |
+
* @param int $counter
|
688 |
+
* @param string $class
|
689 |
+
*/
|
690 |
+
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
|
691 |
+
global $menu, $submenu;
|
692 |
+
|
693 |
+
$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>';
|
694 |
+
|
695 |
+
/**
|
696 |
+
* This method is NOT executed for WordPress.org themes.
|
697 |
+
* Since we maintain only one version of the SDK we added this small
|
698 |
+
* hack to avoid the error from Theme Check since it's a false-positive.
|
699 |
+
*
|
700 |
+
* @author Vova Feldman (@svovaf)
|
701 |
+
* @since 1.2.2.7
|
702 |
+
*/
|
703 |
+
$menu_ref = &$menu;
|
704 |
+
$submenu_ref = &$submenu;
|
705 |
+
|
706 |
+
if ( $this->_is_top_level ) {
|
707 |
+
// Find main menu item.
|
708 |
+
$found_menu = $this->find_top_level_menu();
|
709 |
+
|
710 |
+
if ( false !== $found_menu ) {
|
711 |
+
// Override menu label.
|
712 |
+
$menu_ref[ $found_menu['position'] ][0] = sprintf(
|
713 |
+
$mask,
|
714 |
+
$found_menu['menu'][0],
|
715 |
+
$class,
|
716 |
+
$counter
|
717 |
+
);
|
718 |
+
}
|
719 |
+
} else {
|
720 |
+
$found_submenu = $this->find_main_submenu();
|
721 |
+
|
722 |
+
if ( false !== $found_submenu ) {
|
723 |
+
// Override menu label.
|
724 |
+
$submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
|
725 |
+
$mask,
|
726 |
+
$found_submenu['menu'][0],
|
727 |
+
$class,
|
728 |
+
$counter
|
729 |
+
);
|
730 |
+
}
|
731 |
+
}
|
732 |
+
}
|
733 |
+
|
734 |
+
#endregion Top level menu Override
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Add a top-level menu page.
|
738 |
+
*
|
739 |
+
* Note for WordPress.org Theme/Plugin reviewer:
|
740 |
+
*
|
741 |
+
* This is a replication of `add_menu_page()` to avoid Theme Check warning.
|
742 |
+
*
|
743 |
+
* Why?
|
744 |
+
* ====
|
745 |
+
* Freemius is an SDK for plugin and theme developers. Since the core
|
746 |
+
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
747 |
+
* we only develop and maintain one code base.
|
748 |
+
*
|
749 |
+
* This method will not run for wp.org themes (only plugins) since theme
|
750 |
+
* admin settings/options are now only allowed in the customizer.
|
751 |
+
*
|
752 |
+
* If you have any questions or need clarifications, please don't hesitate
|
753 |
+
* pinging me on slack, my username is @svovaf.
|
754 |
+
*
|
755 |
+
* @author Vova Feldman (@svovaf)
|
756 |
+
* @since 1.2.2
|
757 |
+
*
|
758 |
+
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
759 |
+
* selected.
|
760 |
+
* @param string $menu_title The text to be used for the menu.
|
761 |
+
* @param string $capability The capability required for this menu to be displayed to the user.
|
762 |
+
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
763 |
+
* @param callable|string $function The function to be called to output the content for this page.
|
764 |
+
* @param string $icon_url The URL to the icon to be used for this menu.
|
765 |
+
* * Pass a base64-encoded SVG using a data URI, which will be colored to
|
766 |
+
* match the color scheme. This should begin with
|
767 |
+
* 'data:image/svg+xml;base64,'.
|
768 |
+
* * Pass the name of a Dashicons helper class to use a font icon,
|
769 |
+
* e.g. 'dashicons-chart-pie'.
|
770 |
+
* * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
|
771 |
+
* via CSS.
|
772 |
+
* @param int $position The position in the menu order this one should appear.
|
773 |
+
*
|
774 |
+
* @return string The resulting page's hook_suffix.
|
775 |
+
*/
|
776 |
+
static function add_page(
|
777 |
+
$page_title,
|
778 |
+
$menu_title,
|
779 |
+
$capability,
|
780 |
+
$menu_slug,
|
781 |
+
$function = '',
|
782 |
+
$icon_url = '',
|
783 |
+
$position = null
|
784 |
+
) {
|
785 |
+
$fn = 'add_menu' . '_page';
|
786 |
+
|
787 |
+
return $fn(
|
788 |
+
$page_title,
|
789 |
+
$menu_title,
|
790 |
+
$capability,
|
791 |
+
$menu_slug,
|
792 |
+
$function,
|
793 |
+
$icon_url,
|
794 |
+
$position
|
795 |
+
);
|
796 |
+
}
|
797 |
+
|
798 |
+
/**
|
799 |
+
* Add a submenu page.
|
800 |
+
*
|
801 |
+
* Note for WordPress.org Theme/Plugin reviewer:
|
802 |
+
*
|
803 |
+
* This is a replication of `add_submenu_page()` to avoid Theme Check warning.
|
804 |
+
*
|
805 |
+
* Why?
|
806 |
+
* ====
|
807 |
+
* Freemius is an SDK for plugin and theme developers. Since the core
|
808 |
+
* of the SDK is relevant both for plugins and themes, for obvious reasons,
|
809 |
+
* we only develop and maintain one code base.
|
810 |
+
*
|
811 |
+
* This method will not run for wp.org themes (only plugins) since theme
|
812 |
+
* admin settings/options are now only allowed in the customizer.
|
813 |
+
*
|
814 |
+
* If you have any questions or need clarifications, please don't hesitate
|
815 |
+
* pinging me on slack, my username is @svovaf.
|
816 |
+
*
|
817 |
+
* @author Vova Feldman (@svovaf)
|
818 |
+
* @since 1.2.2
|
819 |
+
*
|
820 |
+
* @param string $parent_slug The slug name for the parent menu (or the file name of a standard
|
821 |
+
* WordPress admin page).
|
822 |
+
* @param string $page_title The text to be displayed in the title tags of the page when the menu is
|
823 |
+
* selected.
|
824 |
+
* @param string $menu_title The text to be used for the menu.
|
825 |
+
* @param string $capability The capability required for this menu to be displayed to the user.
|
826 |
+
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
|
827 |
+
* @param callable|string $function The function to be called to output the content for this page.
|
828 |
+
*
|
829 |
+
* @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
|
830 |
+
* required.
|
831 |
+
*/
|
832 |
+
static function add_subpage(
|
833 |
+
$parent_slug,
|
834 |
+
$page_title,
|
835 |
+
$menu_title,
|
836 |
+
$capability,
|
837 |
+
$menu_slug,
|
838 |
+
$function = ''
|
839 |
+
) {
|
840 |
+
$fn = 'add_submenu' . '_page';
|
841 |
+
|
842 |
+
return $fn( $parent_slug,
|
843 |
+
$page_title,
|
844 |
+
$menu_title,
|
845 |
+
$capability,
|
846 |
+
$menu_slug,
|
847 |
+
$function
|
848 |
+
);
|
849 |
+
}
|
850 |
}
|
freemius/includes/managers/class-fs-cache-manager.php
CHANGED
@@ -1,281 +1,281 @@
|
|
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 );
|
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 |
-
*/
|
208 |
-
function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
209 |
-
$this->_logger->entrance( 'key = ' . $key );
|
210 |
-
|
211 |
-
$cache_entry = new stdClass();
|
212 |
-
|
213 |
-
$cache_entry->result = $value;
|
214 |
-
$cache_entry->created = WP_FS__SCRIPT_START_TIME;
|
215 |
-
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME + $expiration;
|
216 |
-
$this->_options->set_option( $key, $cache_entry, true );
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Get cached record expiration, or false if not cached or expired.
|
221 |
-
*
|
222 |
-
* @author Vova Feldman (@svovaf)
|
223 |
-
* @since 1.1.7.3
|
224 |
-
*
|
225 |
-
* @param string $key
|
226 |
-
*
|
227 |
-
* @return bool|int
|
228 |
-
*/
|
229 |
-
function get_record_expiration( $key ) {
|
230 |
-
$this->_logger->entrance( 'key = ' . $key );
|
231 |
-
|
232 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
233 |
-
|
234 |
-
if ( is_object( $cache_entry ) &&
|
235 |
-
isset( $cache_entry->timestamp ) &&
|
236 |
-
is_numeric( $cache_entry->timestamp ) &&
|
237 |
-
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
238 |
-
) {
|
239 |
-
return $cache_entry->timestamp;
|
240 |
-
}
|
241 |
-
|
242 |
-
return false;
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Purge cached item.
|
247 |
-
*
|
248 |
-
* @author Vova Feldman (@svovaf)
|
249 |
-
* @since 1.1.6
|
250 |
-
*
|
251 |
-
* @param string $key
|
252 |
-
*/
|
253 |
-
function purge( $key ) {
|
254 |
-
$this->_logger->entrance( 'key = ' . $key );
|
255 |
-
|
256 |
-
$this->_options->unset_option( $key, true );
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Set cached item as expired.
|
261 |
-
*
|
262 |
-
* @author Vova Feldman (@svovaf)
|
263 |
-
* @since 1.2.2.7
|
264 |
-
*
|
265 |
-
* @param string $key
|
266 |
-
*/
|
267 |
-
function expire( $key ) {
|
268 |
-
$this->_logger->entrance( 'key = ' . $key );
|
269 |
-
|
270 |
-
$cache_entry = $this->_options->get_option( $key, false );
|
271 |
-
|
272 |
-
if ( is_object( $cache_entry ) &&
|
273 |
-
isset( $cache_entry->timestamp ) &&
|
274 |
-
is_numeric( $cache_entry->timestamp ))
|
275 |
-
{
|
276 |
-
// Set to expired.
|
277 |
-
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
|
278 |
-
$this->_options->set_option( $key, $cache_entry, true );
|
279 |
-
}
|
280 |
-
}
|
281 |
}
|
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 );
|
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 |
+
*/
|
208 |
+
function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
209 |
+
$this->_logger->entrance( 'key = ' . $key );
|
210 |
+
|
211 |
+
$cache_entry = new stdClass();
|
212 |
+
|
213 |
+
$cache_entry->result = $value;
|
214 |
+
$cache_entry->created = WP_FS__SCRIPT_START_TIME;
|
215 |
+
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME + $expiration;
|
216 |
+
$this->_options->set_option( $key, $cache_entry, true );
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Get cached record expiration, or false if not cached or expired.
|
221 |
+
*
|
222 |
+
* @author Vova Feldman (@svovaf)
|
223 |
+
* @since 1.1.7.3
|
224 |
+
*
|
225 |
+
* @param string $key
|
226 |
+
*
|
227 |
+
* @return bool|int
|
228 |
+
*/
|
229 |
+
function get_record_expiration( $key ) {
|
230 |
+
$this->_logger->entrance( 'key = ' . $key );
|
231 |
+
|
232 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
233 |
+
|
234 |
+
if ( is_object( $cache_entry ) &&
|
235 |
+
isset( $cache_entry->timestamp ) &&
|
236 |
+
is_numeric( $cache_entry->timestamp ) &&
|
237 |
+
$cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
|
238 |
+
) {
|
239 |
+
return $cache_entry->timestamp;
|
240 |
+
}
|
241 |
+
|
242 |
+
return false;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Purge cached item.
|
247 |
+
*
|
248 |
+
* @author Vova Feldman (@svovaf)
|
249 |
+
* @since 1.1.6
|
250 |
+
*
|
251 |
+
* @param string $key
|
252 |
+
*/
|
253 |
+
function purge( $key ) {
|
254 |
+
$this->_logger->entrance( 'key = ' . $key );
|
255 |
+
|
256 |
+
$this->_options->unset_option( $key, true );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Set cached item as expired.
|
261 |
+
*
|
262 |
+
* @author Vova Feldman (@svovaf)
|
263 |
+
* @since 1.2.2.7
|
264 |
+
*
|
265 |
+
* @param string $key
|
266 |
+
*/
|
267 |
+
function expire( $key ) {
|
268 |
+
$this->_logger->entrance( 'key = ' . $key );
|
269 |
+
|
270 |
+
$cache_entry = $this->_options->get_option( $key, false );
|
271 |
+
|
272 |
+
if ( is_object( $cache_entry ) &&
|
273 |
+
isset( $cache_entry->timestamp ) &&
|
274 |
+
is_numeric( $cache_entry->timestamp ))
|
275 |
+
{
|
276 |
+
// Set to expired.
|
277 |
+
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
|
278 |
+
$this->_options->set_option( $key, $cache_entry, true );
|
279 |
+
}
|
280 |
+
}
|
281 |
}
|
freemius/includes/managers/class-fs-key-value-storage.php
CHANGED
@@ -1,328 +1,328 @@
|
|
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 |
-
* @since 1.2.2
|
51 |
-
*
|
52 |
-
* @var string
|
53 |
-
*/
|
54 |
-
protected $_secondary_id;
|
55 |
-
/**
|
56 |
-
* @var array
|
57 |
-
*/
|
58 |
-
protected $_data;
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @var FS_Plugin_Manager[]
|
62 |
-
*/
|
63 |
-
private static $_instances = array();
|
64 |
-
/**
|
65 |
-
* @var FS_Logger
|
66 |
-
*/
|
67 |
-
protected $_logger;
|
68 |
-
|
69 |
-
/**
|
70 |
-
* @param string $id
|
71 |
-
* @param string $secondary_id
|
72 |
-
*
|
73 |
-
* @return FS_Key_Value_Storage
|
74 |
-
*/
|
75 |
-
static function instance( $id, $secondary_id ) {
|
76 |
-
$key = $id . ':' . $secondary_id;
|
77 |
-
if ( ! isset( self::$_instances[ $key ] ) ) {
|
78 |
-
self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id );
|
79 |
-
}
|
80 |
-
|
81 |
-
return self::$_instances[ $key ];
|
82 |
-
}
|
83 |
-
|
84 |
-
protected function __construct( $id, $secondary_id ) {
|
85 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
86 |
-
|
87 |
-
$this->_secondary_id = $secondary_id;
|
88 |
-
$this->_id = $id;
|
89 |
-
$this->load();
|
90 |
-
}
|
91 |
-
|
92 |
-
protected function get_option_manager() {
|
93 |
-
return FS_Option_Manager::get_manager( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
94 |
-
}
|
95 |
-
|
96 |
-
protected function get_all_data() {
|
97 |
-
return $this->get_option_manager()->get_option( $this->_id, array() );
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Load plugin data from local DB.
|
102 |
-
*
|
103 |
-
* @author Vova Feldman (@svovaf)
|
104 |
-
* @since 1.0.7
|
105 |
-
*/
|
106 |
-
function load() {
|
107 |
-
$all_plugins_data = $this->get_all_data();
|
108 |
-
$this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
|
109 |
-
$all_plugins_data[ $this->_secondary_id ] :
|
110 |
-
array();
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* @author Vova Feldman (@svovaf)
|
115 |
-
* @since 1.0.7
|
116 |
-
*
|
117 |
-
* @param string $key
|
118 |
-
* @param mixed $value
|
119 |
-
* @param bool $flush
|
120 |
-
*/
|
121 |
-
function store( $key, $value, $flush = true ) {
|
122 |
-
if ( $this->_logger->is_on() ) {
|
123 |
-
$this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
|
124 |
-
}
|
125 |
-
|
126 |
-
if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
|
127 |
-
// No need to store data if the value wasn't changed.
|
128 |
-
return;
|
129 |
-
}
|
130 |
-
|
131 |
-
$all_data = $this->get_all_data();
|
132 |
-
|
133 |
-
$this->_data[ $key ] = $value;
|
134 |
-
|
135 |
-
$all_data[ $this->_secondary_id ] = $this->_data;
|
136 |
-
|
137 |
-
$options_manager = $this->get_option_manager();
|
138 |
-
$options_manager->set_option( $this->_id, $all_data, $flush );
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* @author Vova Feldman (@svovaf)
|
143 |
-
* @since 1.0.7
|
144 |
-
*
|
145 |
-
* @param bool $store
|
146 |
-
* @param string[] $exceptions Set of keys to keep and not clear.
|
147 |
-
*/
|
148 |
-
function clear_all( $store = true, $exceptions = array() ) {
|
149 |
-
$new_data = array();
|
150 |
-
foreach ( $exceptions as $key ) {
|
151 |
-
if ( isset( $this->_data[ $key ] ) ) {
|
152 |
-
$new_data[ $key ] = $this->_data[ $key ];
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
$this->_data = $new_data;
|
157 |
-
|
158 |
-
if ( $store ) {
|
159 |
-
$all_data = $this->get_all_data();
|
160 |
-
$all_data[ $this->_secondary_id ] = $this->_data;
|
161 |
-
$options_manager = $this->get_option_manager();
|
162 |
-
$options_manager->set_option( $this->_id, $all_data, true );
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Delete key-value storage.
|
168 |
-
*
|
169 |
-
* @author Vova Feldman (@svovaf)
|
170 |
-
* @since 1.0.9
|
171 |
-
*/
|
172 |
-
function delete() {
|
173 |
-
$this->_data = array();
|
174 |
-
|
175 |
-
$all_data = $this->get_all_data();
|
176 |
-
unset( $all_data[ $this->_secondary_id ] );
|
177 |
-
$options_manager = $this->get_option_manager();
|
178 |
-
$options_manager->set_option( $this->_id, $all_data, true );
|
179 |
-
}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* @author Vova Feldman (@svovaf)
|
183 |
-
* @since 1.0.7
|
184 |
-
*
|
185 |
-
* @param string $key
|
186 |
-
* @param bool $store
|
187 |
-
*/
|
188 |
-
function remove( $key, $store = true ) {
|
189 |
-
if ( ! array_key_exists( $key, $this->_data ) ) {
|
190 |
-
return;
|
191 |
-
}
|
192 |
-
|
193 |
-
unset( $this->_data[ $key ] );
|
194 |
-
|
195 |
-
if ( $store ) {
|
196 |
-
$all_data = $this->get_all_data();
|
197 |
-
$all_data[ $this->_secondary_id ] = $this->_data;
|
198 |
-
$options_manager = $this->get_option_manager();
|
199 |
-
$options_manager->set_option( $this->_id, $all_data, true );
|
200 |
-
}
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* @author Vova Feldman (@svovaf)
|
205 |
-
* @since 1.0.7
|
206 |
-
*
|
207 |
-
* @param string $key
|
208 |
-
* @param mixed $default
|
209 |
-
*
|
210 |
-
* @return bool|\FS_Plugin
|
211 |
-
*/
|
212 |
-
function get( $key, $default = false ) {
|
213 |
-
return array_key_exists( $key, $this->_data ) ?
|
214 |
-
$this->_data[ $key ] :
|
215 |
-
$default;
|
216 |
-
}
|
217 |
-
|
218 |
-
|
219 |
-
/* ArrayAccess + Magic Access (better for refactoring)
|
220 |
-
-----------------------------------------------------------------------------------*/
|
221 |
-
function __set( $k, $v ) {
|
222 |
-
$this->store( $k, $v );
|
223 |
-
}
|
224 |
-
|
225 |
-
function __isset( $k ) {
|
226 |
-
return array_key_exists( $k, $this->_data );
|
227 |
-
}
|
228 |
-
|
229 |
-
function __unset( $k ) {
|
230 |
-
$this->remove( $k );
|
231 |
-
}
|
232 |
-
|
233 |
-
function __get( $k ) {
|
234 |
-
return $this->get( $k, null );
|
235 |
-
}
|
236 |
-
|
237 |
-
function offsetSet( $k, $v ) {
|
238 |
-
if ( is_null( $k ) ) {
|
239 |
-
throw new Exception( 'Can\'t append value to request params.' );
|
240 |
-
} else {
|
241 |
-
$this->{$k} = $v;
|
242 |
-
}
|
243 |
-
}
|
244 |
-
|
245 |
-
function offsetExists( $k ) {
|
246 |
-
return array_key_exists( $k, $this->_data );
|
247 |
-
}
|
248 |
-
|
249 |
-
function offsetUnset( $k ) {
|
250 |
-
unset( $this->$k );
|
251 |
-
}
|
252 |
-
|
253 |
-
function offsetGet( $k ) {
|
254 |
-
return $this->get( $k, null );
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* (PHP 5 >= 5.0.0)<br/>
|
259 |
-
* Return the current element
|
260 |
-
*
|
261 |
-
* @link http://php.net/manual/en/iterator.current.php
|
262 |
-
* @return mixed Can return any type.
|
263 |
-
*/
|
264 |
-
public function current() {
|
265 |
-
return current( $this->_data );
|
266 |
-
}
|
267 |
-
|
268 |
-
/**
|
269 |
-
* (PHP 5 >= 5.0.0)<br/>
|
270 |
-
* Move forward to next element
|
271 |
-
*
|
272 |
-
* @link http://php.net/manual/en/iterator.next.php
|
273 |
-
* @return void Any returned value is ignored.
|
274 |
-
*/
|
275 |
-
public function next() {
|
276 |
-
next( $this->_data );
|
277 |
-
}
|
278 |
-
|
279 |
-
/**
|
280 |
-
* (PHP 5 >= 5.0.0)<br/>
|
281 |
-
* Return the key of the current element
|
282 |
-
*
|
283 |
-
* @link http://php.net/manual/en/iterator.key.php
|
284 |
-
* @return mixed scalar on success, or null on failure.
|
285 |
-
*/
|
286 |
-
public function key() {
|
287 |
-
return key( $this->_data );
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* (PHP 5 >= 5.0.0)<br/>
|
292 |
-
* Checks if current position is valid
|
293 |
-
*
|
294 |
-
* @link http://php.net/manual/en/iterator.valid.php
|
295 |
-
* @return boolean The return value will be casted to boolean and then evaluated.
|
296 |
-
* Returns true on success or false on failure.
|
297 |
-
*/
|
298 |
-
public function valid() {
|
299 |
-
$key = key( $this->_data );
|
300 |
-
|
301 |
-
return ( $key !== null && $key !== false );
|
302 |
-
}
|
303 |
-
|
304 |
-
/**
|
305 |
-
* (PHP 5 >= 5.0.0)<br/>
|
306 |
-
* Rewind the Iterator to the first element
|
307 |
-
*
|
308 |
-
* @link http://php.net/manual/en/iterator.rewind.php
|
309 |
-
* @return void Any returned value is ignored.
|
310 |
-
*/
|
311 |
-
public function rewind() {
|
312 |
-
reset( $this->_data );
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* (PHP 5 >= 5.1.0)<br/>
|
317 |
-
* Count elements of an object
|
318 |
-
*
|
319 |
-
* @link http://php.net/manual/en/countable.count.php
|
320 |
-
* @return int The custom count as an integer.
|
321 |
-
* </p>
|
322 |
-
* <p>
|
323 |
-
* The return value is cast to an integer.
|
324 |
-
*/
|
325 |
-
public function count() {
|
326 |
-
return count( $this->_data );
|
327 |
-
}
|
328 |
}
|
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 |
+
* @since 1.2.2
|
51 |
+
*
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
protected $_secondary_id;
|
55 |
+
/**
|
56 |
+
* @var array
|
57 |
+
*/
|
58 |
+
protected $_data;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @var FS_Plugin_Manager[]
|
62 |
+
*/
|
63 |
+
private static $_instances = array();
|
64 |
+
/**
|
65 |
+
* @var FS_Logger
|
66 |
+
*/
|
67 |
+
protected $_logger;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @param string $id
|
71 |
+
* @param string $secondary_id
|
72 |
+
*
|
73 |
+
* @return FS_Key_Value_Storage
|
74 |
+
*/
|
75 |
+
static function instance( $id, $secondary_id ) {
|
76 |
+
$key = $id . ':' . $secondary_id;
|
77 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
78 |
+
self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id );
|
79 |
+
}
|
80 |
+
|
81 |
+
return self::$_instances[ $key ];
|
82 |
+
}
|
83 |
+
|
84 |
+
protected function __construct( $id, $secondary_id ) {
|
85 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
86 |
+
|
87 |
+
$this->_secondary_id = $secondary_id;
|
88 |
+
$this->_id = $id;
|
89 |
+
$this->load();
|
90 |
+
}
|
91 |
+
|
92 |
+
protected function get_option_manager() {
|
93 |
+
return FS_Option_Manager::get_manager( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
94 |
+
}
|
95 |
+
|
96 |
+
protected function get_all_data() {
|
97 |
+
return $this->get_option_manager()->get_option( $this->_id, array() );
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Load plugin data from local DB.
|
102 |
+
*
|
103 |
+
* @author Vova Feldman (@svovaf)
|
104 |
+
* @since 1.0.7
|
105 |
+
*/
|
106 |
+
function load() {
|
107 |
+
$all_plugins_data = $this->get_all_data();
|
108 |
+
$this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
|
109 |
+
$all_plugins_data[ $this->_secondary_id ] :
|
110 |
+
array();
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @author Vova Feldman (@svovaf)
|
115 |
+
* @since 1.0.7
|
116 |
+
*
|
117 |
+
* @param string $key
|
118 |
+
* @param mixed $value
|
119 |
+
* @param bool $flush
|
120 |
+
*/
|
121 |
+
function store( $key, $value, $flush = true ) {
|
122 |
+
if ( $this->_logger->is_on() ) {
|
123 |
+
$this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
|
124 |
+
}
|
125 |
+
|
126 |
+
if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
|
127 |
+
// No need to store data if the value wasn't changed.
|
128 |
+
return;
|
129 |
+
}
|
130 |
+
|
131 |
+
$all_data = $this->get_all_data();
|
132 |
+
|
133 |
+
$this->_data[ $key ] = $value;
|
134 |
+
|
135 |
+
$all_data[ $this->_secondary_id ] = $this->_data;
|
136 |
+
|
137 |
+
$options_manager = $this->get_option_manager();
|
138 |
+
$options_manager->set_option( $this->_id, $all_data, $flush );
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* @author Vova Feldman (@svovaf)
|
143 |
+
* @since 1.0.7
|
144 |
+
*
|
145 |
+
* @param bool $store
|
146 |
+
* @param string[] $exceptions Set of keys to keep and not clear.
|
147 |
+
*/
|
148 |
+
function clear_all( $store = true, $exceptions = array() ) {
|
149 |
+
$new_data = array();
|
150 |
+
foreach ( $exceptions as $key ) {
|
151 |
+
if ( isset( $this->_data[ $key ] ) ) {
|
152 |
+
$new_data[ $key ] = $this->_data[ $key ];
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
$this->_data = $new_data;
|
157 |
+
|
158 |
+
if ( $store ) {
|
159 |
+
$all_data = $this->get_all_data();
|
160 |
+
$all_data[ $this->_secondary_id ] = $this->_data;
|
161 |
+
$options_manager = $this->get_option_manager();
|
162 |
+
$options_manager->set_option( $this->_id, $all_data, true );
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Delete key-value storage.
|
168 |
+
*
|
169 |
+
* @author Vova Feldman (@svovaf)
|
170 |
+
* @since 1.0.9
|
171 |
+
*/
|
172 |
+
function delete() {
|
173 |
+
$this->_data = array();
|
174 |
+
|
175 |
+
$all_data = $this->get_all_data();
|
176 |
+
unset( $all_data[ $this->_secondary_id ] );
|
177 |
+
$options_manager = $this->get_option_manager();
|
178 |
+
$options_manager->set_option( $this->_id, $all_data, true );
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* @author Vova Feldman (@svovaf)
|
183 |
+
* @since 1.0.7
|
184 |
+
*
|
185 |
+
* @param string $key
|
186 |
+
* @param bool $store
|
187 |
+
*/
|
188 |
+
function remove( $key, $store = true ) {
|
189 |
+
if ( ! array_key_exists( $key, $this->_data ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
unset( $this->_data[ $key ] );
|
194 |
+
|
195 |
+
if ( $store ) {
|
196 |
+
$all_data = $this->get_all_data();
|
197 |
+
$all_data[ $this->_secondary_id ] = $this->_data;
|
198 |
+
$options_manager = $this->get_option_manager();
|
199 |
+
$options_manager->set_option( $this->_id, $all_data, true );
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* @author Vova Feldman (@svovaf)
|
205 |
+
* @since 1.0.7
|
206 |
+
*
|
207 |
+
* @param string $key
|
208 |
+
* @param mixed $default
|
209 |
+
*
|
210 |
+
* @return bool|\FS_Plugin
|
211 |
+
*/
|
212 |
+
function get( $key, $default = false ) {
|
213 |
+
return array_key_exists( $key, $this->_data ) ?
|
214 |
+
$this->_data[ $key ] :
|
215 |
+
$default;
|
216 |
+
}
|
217 |
+
|
218 |
+
|
219 |
+
/* ArrayAccess + Magic Access (better for refactoring)
|
220 |
+
-----------------------------------------------------------------------------------*/
|
221 |
+
function __set( $k, $v ) {
|
222 |
+
$this->store( $k, $v );
|
223 |
+
}
|
224 |
+
|
225 |
+
function __isset( $k ) {
|
226 |
+
return array_key_exists( $k, $this->_data );
|
227 |
+
}
|
228 |
+
|
229 |
+
function __unset( $k ) {
|
230 |
+
$this->remove( $k );
|
231 |
+
}
|
232 |
+
|
233 |
+
function __get( $k ) {
|
234 |
+
return $this->get( $k, null );
|
235 |
+
}
|
236 |
+
|
237 |
+
function offsetSet( $k, $v ) {
|
238 |
+
if ( is_null( $k ) ) {
|
239 |
+
throw new Exception( 'Can\'t append value to request params.' );
|
240 |
+
} else {
|
241 |
+
$this->{$k} = $v;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
function offsetExists( $k ) {
|
246 |
+
return array_key_exists( $k, $this->_data );
|
247 |
+
}
|
248 |
+
|
249 |
+
function offsetUnset( $k ) {
|
250 |
+
unset( $this->$k );
|
251 |
+
}
|
252 |
+
|
253 |
+
function offsetGet( $k ) {
|
254 |
+
return $this->get( $k, null );
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* (PHP 5 >= 5.0.0)<br/>
|
259 |
+
* Return the current element
|
260 |
+
*
|
261 |
+
* @link http://php.net/manual/en/iterator.current.php
|
262 |
+
* @return mixed Can return any type.
|
263 |
+
*/
|
264 |
+
public function current() {
|
265 |
+
return current( $this->_data );
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* (PHP 5 >= 5.0.0)<br/>
|
270 |
+
* Move forward to next element
|
271 |
+
*
|
272 |
+
* @link http://php.net/manual/en/iterator.next.php
|
273 |
+
* @return void Any returned value is ignored.
|
274 |
+
*/
|
275 |
+
public function next() {
|
276 |
+
next( $this->_data );
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* (PHP 5 >= 5.0.0)<br/>
|
281 |
+
* Return the key of the current element
|
282 |
+
*
|
283 |
+
* @link http://php.net/manual/en/iterator.key.php
|
284 |
+
* @return mixed scalar on success, or null on failure.
|
285 |
+
*/
|
286 |
+
public function key() {
|
287 |
+
return key( $this->_data );
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* (PHP 5 >= 5.0.0)<br/>
|
292 |
+
* Checks if current position is valid
|
293 |
+
*
|
294 |
+
* @link http://php.net/manual/en/iterator.valid.php
|
295 |
+
* @return boolean The return value will be casted to boolean and then evaluated.
|
296 |
+
* Returns true on success or false on failure.
|
297 |
+
*/
|
298 |
+
public function valid() {
|
299 |
+
$key = key( $this->_data );
|
300 |
+
|
301 |
+
return ( $key !== null && $key !== false );
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* (PHP 5 >= 5.0.0)<br/>
|
306 |
+
* Rewind the Iterator to the first element
|
307 |
+
*
|
308 |
+
* @link http://php.net/manual/en/iterator.rewind.php
|
309 |
+
* @return void Any returned value is ignored.
|
310 |
+
*/
|
311 |
+
public function rewind() {
|
312 |
+
reset( $this->_data );
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* (PHP 5 >= 5.1.0)<br/>
|
317 |
+
* Count elements of an object
|
318 |
+
*
|
319 |
+
* @link http://php.net/manual/en/countable.count.php
|
320 |
+
* @return int The custom count as an integer.
|
321 |
+
* </p>
|
322 |
+
* <p>
|
323 |
+
* The return value is cast to an integer.
|
324 |
+
*/
|
325 |
+
public function count() {
|
326 |
+
return count( $this->_data );
|
327 |
+
}
|
328 |
}
|
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 |
}
|
freemius/includes/managers/class-fs-option-manager.php
CHANGED
@@ -1,353 +1,353 @@
|
|
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
|
32 |
-
*/
|
33 |
-
private $_options;
|
34 |
-
/**
|
35 |
-
* @var FS_Logger
|
36 |
-
*/
|
37 |
-
private $_logger;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* @var FS_Option_Manager[]
|
41 |
-
*/
|
42 |
-
private static $_MANAGERS = array();
|
43 |
-
|
44 |
-
/**
|
45 |
-
* @author Vova Feldman (@svovaf)
|
46 |
-
* @since 1.0.3
|
47 |
-
*
|
48 |
-
* @param string $id
|
49 |
-
* @param bool $load
|
50 |
-
*/
|
51 |
-
private function __construct( $id, $load = false ) {
|
52 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_opt_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
53 |
-
|
54 |
-
$this->_logger->entrance();
|
55 |
-
$this->_logger->log( 'id = ' . $id );
|
56 |
-
|
57 |
-
$this->_id = $id;
|
58 |
-
|
59 |
-
if ( $load ) {
|
60 |
-
$this->load();
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* @author Vova Feldman (@svovaf)
|
66 |
-
* @since 1.0.3
|
67 |
-
*
|
68 |
-
* @param $id
|
69 |
-
* @param $load
|
70 |
-
*
|
71 |
-
* @return FS_Option_Manager
|
72 |
-
*/
|
73 |
-
static function get_manager( $id, $load = false ) {
|
74 |
-
$id = strtolower( $id );
|
75 |
-
|
76 |
-
if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
|
77 |
-
self::$_MANAGERS[ $id ] = new FS_Option_Manager( $id, $load );
|
78 |
-
} // If load required but not yet loaded, load.
|
79 |
-
else if ( $load && ! self::$_MANAGERS[ $id ]->is_loaded() ) {
|
80 |
-
self::$_MANAGERS[ $id ]->load();
|
81 |
-
}
|
82 |
-
|
83 |
-
return self::$_MANAGERS[ $id ];
|
84 |
-
}
|
85 |
-
|
86 |
-
private function _get_option_manager_name() {
|
87 |
-
// return WP_FS__SLUG . '_' . $this->_id;
|
88 |
-
return $this->_id;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* @author Vova Feldman (@svovaf)
|
93 |
-
* @since 1.0.3
|
94 |
-
*
|
95 |
-
* @param bool $flush
|
96 |
-
*/
|
97 |
-
function load( $flush = false ) {
|
98 |
-
$this->_logger->entrance();
|
99 |
-
|
100 |
-
$option_name = $this->_get_option_manager_name();
|
101 |
-
|
102 |
-
if ( $flush || ! isset( $this->_options ) ) {
|
103 |
-
if ( isset( $this->_options ) ) {
|
104 |
-
// Clear prev options.
|
105 |
-
$this->clear();
|
106 |
-
}
|
107 |
-
|
108 |
-
if ( ! WP_FS__DEBUG_SDK ) {
|
109 |
-
$this->_options = wp_cache_get( $option_name, WP_FS__SLUG );
|
110 |
-
}
|
111 |
-
|
112 |
-
// $this->_logger->info('wp_cache_get = ' . var_export($this->_options, true));
|
113 |
-
|
114 |
-
// if ( is_array( $this->_options ) ) {
|
115 |
-
// $this->clear();
|
116 |
-
// }
|
117 |
-
|
118 |
-
$cached = true;
|
119 |
-
|
120 |
-
if ( empty( $this->_options ) ) {
|
121 |
-
$this->_options = get_option( $option_name );
|
122 |
-
|
123 |
-
if ( is_string( $this->_options ) ) {
|
124 |
-
$this->_options = json_decode( $this->_options );
|
125 |
-
}
|
126 |
-
|
127 |
-
// $this->_logger->info('get_option = ' . var_export($this->_options, true));
|
128 |
-
|
129 |
-
if ( false === $this->_options ) {
|
130 |
-
$this->clear();
|
131 |
-
}
|
132 |
-
|
133 |
-
$cached = false;
|
134 |
-
}
|
135 |
-
|
136 |
-
if ( ! WP_FS__DEBUG_SDK && ! $cached ) // Set non encoded cache.
|
137 |
-
{
|
138 |
-
wp_cache_set( $option_name, $this->_options, WP_FS__SLUG );
|
139 |
-
}
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* @author Vova Feldman (@svovaf)
|
145 |
-
* @since 1.0.3
|
146 |
-
*
|
147 |
-
* @return bool
|
148 |
-
*/
|
149 |
-
function is_loaded() {
|
150 |
-
return isset( $this->_options );
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* @author Vova Feldman (@svovaf)
|
155 |
-
* @since 1.0.3
|
156 |
-
*
|
157 |
-
* @return bool
|
158 |
-
*/
|
159 |
-
function is_empty() {
|
160 |
-
return ( $this->is_loaded() && false === $this->_options );
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* @author Vova Feldman (@svovaf)
|
165 |
-
* @since 1.0.6
|
166 |
-
*
|
167 |
-
* @param bool $flush
|
168 |
-
*/
|
169 |
-
function clear( $flush = false ) {
|
170 |
-
$this->_logger->entrance();
|
171 |
-
|
172 |
-
$this->_options = array();
|
173 |
-
|
174 |
-
if ( $flush ) {
|
175 |
-
$this->store();
|
176 |
-
}
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Delete options manager from DB.
|
181 |
-
*
|
182 |
-
* @author Vova Feldman (@svovaf)
|
183 |
-
* @since 1.0.9
|
184 |
-
*/
|
185 |
-
function delete() {
|
186 |
-
delete_option( $this->_get_option_manager_name() );
|
187 |
-
}
|
188 |
-
|
189 |
-
/**
|
190 |
-
* @author Vova Feldman (@svovaf)
|
191 |
-
* @since 1.0.6
|
192 |
-
*
|
193 |
-
* @param string $option
|
194 |
-
*
|
195 |
-
* @return bool
|
196 |
-
*/
|
197 |
-
function has_option( $option ) {
|
198 |
-
return array_key_exists( $option, $this->_options );
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* @author Vova Feldman (@svovaf)
|
203 |
-
* @since 1.0.3
|
204 |
-
*
|
205 |
-
* @param string $option
|
206 |
-
* @param mixed $default
|
207 |
-
*
|
208 |
-
* @return mixed
|
209 |
-
*/
|
210 |
-
function get_option( $option, $default = null ) {
|
211 |
-
$this->_logger->entrance( 'option = ' . $option );
|
212 |
-
|
213 |
-
if ( is_array( $this->_options ) ) {
|
214 |
-
$value = isset( $this->_options[ $option ] ) ?
|
215 |
-
$this->_options[ $option ] :
|
216 |
-
$default;
|
217 |
-
} else if ( is_object( $this->_options ) ) {
|
218 |
-
$value = isset( $this->_options->{$option} ) ?
|
219 |
-
$this->_options->{$option} :
|
220 |
-
$default;
|
221 |
-
} else {
|
222 |
-
$value = $default;
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* If it's an object, return a clone of the object, otherwise,
|
227 |
-
* external changes of the object will actually change the value
|
228 |
-
* of the object in the options manager which may lead to an unexpected
|
229 |
-
* behaviour and data integrity when a store() call is triggered.
|
230 |
-
*
|
231 |
-
* Example:
|
232 |
-
* $object1 = $options->get_option( 'object1' );
|
233 |
-
* $object1->x = 123;
|
234 |
-
*
|
235 |
-
* $object2 = $options->get_option( 'object2' );
|
236 |
-
* $object2->y = 'dummy';
|
237 |
-
*
|
238 |
-
* $options->set_option( 'object2', $object2, true );
|
239 |
-
*
|
240 |
-
* If we don't return a clone of option 'object1', setting 'object2'
|
241 |
-
* will also store the updated value of 'object1' which is quite not
|
242 |
-
* an expected behaviour.
|
243 |
-
*
|
244 |
-
* @author Vova Feldman
|
245 |
-
*/
|
246 |
-
return is_object($value) ? clone $value : $value;
|
247 |
-
}
|
248 |
-
|
249 |
-
/**
|
250 |
-
* @author Vova Feldman (@svovaf)
|
251 |
-
* @since 1.0.3
|
252 |
-
*
|
253 |
-
* @param string $option
|
254 |
-
* @param mixed $value
|
255 |
-
* @param bool $flush
|
256 |
-
*/
|
257 |
-
function set_option( $option, $value, $flush = false ) {
|
258 |
-
$this->_logger->entrance( 'option = ' . $option );
|
259 |
-
|
260 |
-
if ( ! $this->is_loaded() ) {
|
261 |
-
$this->clear();
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* If it's an object, store a clone of the object, otherwise,
|
266 |
-
* external changes of the object will actually change the value
|
267 |
-
* of the object in the options manager which may lead to an unexpected
|
268 |
-
* behaviour and data integrity when a store() call is triggered.
|
269 |
-
*
|
270 |
-
* Example:
|
271 |
-
* $object1 = new stdClass();
|
272 |
-
* $object1->x = 123;
|
273 |
-
*
|
274 |
-
* $options->set_option( 'object1', $object1 );
|
275 |
-
*
|
276 |
-
* $object1->x = 456;
|
277 |
-
*
|
278 |
-
* $options->set_option( 'object2', $object2, true );
|
279 |
-
*
|
280 |
-
* If we don't set the option as a clone of option 'object1', setting 'object2'
|
281 |
-
* will also store the updated value of 'object1' ($object1->x = 456 instead of
|
282 |
-
* $object1->x = 123) which is quite not an expected behaviour.
|
283 |
-
*
|
284 |
-
* @author Vova Feldman
|
285 |
-
*/
|
286 |
-
$copy = is_object($value) ? clone $value : $value;
|
287 |
-
|
288 |
-
if ( is_array( $this->_options ) ) {
|
289 |
-
$this->_options[ $option ] = $copy;
|
290 |
-
} else if ( is_object( $this->_options ) ) {
|
291 |
-
$this->_options->{$option} = $copy;
|
292 |
-
}
|
293 |
-
|
294 |
-
if ( $flush ) {
|
295 |
-
$this->store();
|
296 |
-
}
|
297 |
-
}
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Unset option.
|
301 |
-
*
|
302 |
-
* @author Vova Feldman (@svovaf)
|
303 |
-
* @since 1.0.3
|
304 |
-
*
|
305 |
-
* @param string $option
|
306 |
-
* @param bool $flush
|
307 |
-
*/
|
308 |
-
function unset_option( $option, $flush = false ) {
|
309 |
-
$this->_logger->entrance( 'option = ' . $option );
|
310 |
-
|
311 |
-
if ( is_array( $this->_options ) ) {
|
312 |
-
if ( ! isset( $this->_options[ $option ] ) ) {
|
313 |
-
return;
|
314 |
-
}
|
315 |
-
|
316 |
-
unset( $this->_options[ $option ] );
|
317 |
-
|
318 |
-
} else if ( is_object( $this->_options ) ) {
|
319 |
-
if ( ! isset( $this->_options->{$option} ) ) {
|
320 |
-
return;
|
321 |
-
}
|
322 |
-
|
323 |
-
unset( $this->_options->{$option} );
|
324 |
-
}
|
325 |
-
|
326 |
-
if ( $flush ) {
|
327 |
-
$this->store();
|
328 |
-
}
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Dump options to database.
|
333 |
-
*
|
334 |
-
* @author Vova Feldman (@svovaf)
|
335 |
-
* @since 1.0.3
|
336 |
-
*/
|
337 |
-
function store() {
|
338 |
-
$this->_logger->entrance();
|
339 |
-
|
340 |
-
$option_name = $this->_get_option_manager_name();
|
341 |
-
|
342 |
-
if ( $this->_logger->is_on() ) {
|
343 |
-
$this->_logger->info( $option_name . ' = ' . var_export( $this->_options, true ) );
|
344 |
-
}
|
345 |
-
|
346 |
-
// Update DB.
|
347 |
-
update_option( $option_name, $this->_options );
|
348 |
-
|
349 |
-
if ( ! WP_FS__DEBUG_SDK ) {
|
350 |
-
wp_cache_set( $option_name, $this->_options, WP_FS__SLUG );
|
351 |
-
}
|
352 |
-
}
|
353 |
}
|
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
|
32 |
+
*/
|
33 |
+
private $_options;
|
34 |
+
/**
|
35 |
+
* @var FS_Logger
|
36 |
+
*/
|
37 |
+
private $_logger;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @var FS_Option_Manager[]
|
41 |
+
*/
|
42 |
+
private static $_MANAGERS = array();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @author Vova Feldman (@svovaf)
|
46 |
+
* @since 1.0.3
|
47 |
+
*
|
48 |
+
* @param string $id
|
49 |
+
* @param bool $load
|
50 |
+
*/
|
51 |
+
private function __construct( $id, $load = false ) {
|
52 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_opt_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
53 |
+
|
54 |
+
$this->_logger->entrance();
|
55 |
+
$this->_logger->log( 'id = ' . $id );
|
56 |
+
|
57 |
+
$this->_id = $id;
|
58 |
+
|
59 |
+
if ( $load ) {
|
60 |
+
$this->load();
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @author Vova Feldman (@svovaf)
|
66 |
+
* @since 1.0.3
|
67 |
+
*
|
68 |
+
* @param $id
|
69 |
+
* @param $load
|
70 |
+
*
|
71 |
+
* @return FS_Option_Manager
|
72 |
+
*/
|
73 |
+
static function get_manager( $id, $load = false ) {
|
74 |
+
$id = strtolower( $id );
|
75 |
+
|
76 |
+
if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
|
77 |
+
self::$_MANAGERS[ $id ] = new FS_Option_Manager( $id, $load );
|
78 |
+
} // If load required but not yet loaded, load.
|
79 |
+
else if ( $load && ! self::$_MANAGERS[ $id ]->is_loaded() ) {
|
80 |
+
self::$_MANAGERS[ $id ]->load();
|
81 |
+
}
|
82 |
+
|
83 |
+
return self::$_MANAGERS[ $id ];
|
84 |
+
}
|
85 |
+
|
86 |
+
private function _get_option_manager_name() {
|
87 |
+
// return WP_FS__SLUG . '_' . $this->_id;
|
88 |
+
return $this->_id;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @author Vova Feldman (@svovaf)
|
93 |
+
* @since 1.0.3
|
94 |
+
*
|
95 |
+
* @param bool $flush
|
96 |
+
*/
|
97 |
+
function load( $flush = false ) {
|
98 |
+
$this->_logger->entrance();
|
99 |
+
|
100 |
+
$option_name = $this->_get_option_manager_name();
|
101 |
+
|
102 |
+
if ( $flush || ! isset( $this->_options ) ) {
|
103 |
+
if ( isset( $this->_options ) ) {
|
104 |
+
// Clear prev options.
|
105 |
+
$this->clear();
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( ! WP_FS__DEBUG_SDK ) {
|
109 |
+
$this->_options = wp_cache_get( $option_name, WP_FS__SLUG );
|
110 |
+
}
|
111 |
+
|
112 |
+
// $this->_logger->info('wp_cache_get = ' . var_export($this->_options, true));
|
113 |
+
|
114 |
+
// if ( is_array( $this->_options ) ) {
|
115 |
+
// $this->clear();
|
116 |
+
// }
|
117 |
+
|
118 |
+
$cached = true;
|
119 |
+
|
120 |
+
if ( empty( $this->_options ) ) {
|
121 |
+
$this->_options = get_option( $option_name );
|
122 |
+
|
123 |
+
if ( is_string( $this->_options ) ) {
|
124 |
+
$this->_options = json_decode( $this->_options );
|
125 |
+
}
|
126 |
+
|
127 |
+
// $this->_logger->info('get_option = ' . var_export($this->_options, true));
|
128 |
+
|
129 |
+
if ( false === $this->_options ) {
|
130 |
+
$this->clear();
|
131 |
+
}
|
132 |
+
|
133 |
+
$cached = false;
|
134 |
+
}
|
135 |
+
|
136 |
+
if ( ! WP_FS__DEBUG_SDK && ! $cached ) // Set non encoded cache.
|
137 |
+
{
|
138 |
+
wp_cache_set( $option_name, $this->_options, WP_FS__SLUG );
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* @author Vova Feldman (@svovaf)
|
145 |
+
* @since 1.0.3
|
146 |
+
*
|
147 |
+
* @return bool
|
148 |
+
*/
|
149 |
+
function is_loaded() {
|
150 |
+
return isset( $this->_options );
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @author Vova Feldman (@svovaf)
|
155 |
+
* @since 1.0.3
|
156 |
+
*
|
157 |
+
* @return bool
|
158 |
+
*/
|
159 |
+
function is_empty() {
|
160 |
+
return ( $this->is_loaded() && false === $this->_options );
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* @author Vova Feldman (@svovaf)
|
165 |
+
* @since 1.0.6
|
166 |
+
*
|
167 |
+
* @param bool $flush
|
168 |
+
*/
|
169 |
+
function clear( $flush = false ) {
|
170 |
+
$this->_logger->entrance();
|
171 |
+
|
172 |
+
$this->_options = array();
|
173 |
+
|
174 |
+
if ( $flush ) {
|
175 |
+
$this->store();
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Delete options manager from DB.
|
181 |
+
*
|
182 |
+
* @author Vova Feldman (@svovaf)
|
183 |
+
* @since 1.0.9
|
184 |
+
*/
|
185 |
+
function delete() {
|
186 |
+
delete_option( $this->_get_option_manager_name() );
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* @author Vova Feldman (@svovaf)
|
191 |
+
* @since 1.0.6
|
192 |
+
*
|
193 |
+
* @param string $option
|
194 |
+
*
|
195 |
+
* @return bool
|
196 |
+
*/
|
197 |
+
function has_option( $option ) {
|
198 |
+
return array_key_exists( $option, $this->_options );
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* @author Vova Feldman (@svovaf)
|
203 |
+
* @since 1.0.3
|
204 |
+
*
|
205 |
+
* @param string $option
|
206 |
+
* @param mixed $default
|
207 |
+
*
|
208 |
+
* @return mixed
|
209 |
+
*/
|
210 |
+
function get_option( $option, $default = null ) {
|
211 |
+
$this->_logger->entrance( 'option = ' . $option );
|
212 |
+
|
213 |
+
if ( is_array( $this->_options ) ) {
|
214 |
+
$value = isset( $this->_options[ $option ] ) ?
|
215 |
+
$this->_options[ $option ] :
|
216 |
+
$default;
|
217 |
+
} else if ( is_object( $this->_options ) ) {
|
218 |
+
$value = isset( $this->_options->{$option} ) ?
|
219 |
+
$this->_options->{$option} :
|
220 |
+
$default;
|
221 |
+
} else {
|
222 |
+
$value = $default;
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* If it's an object, return a clone of the object, otherwise,
|
227 |
+
* external changes of the object will actually change the value
|
228 |
+
* of the object in the options manager which may lead to an unexpected
|
229 |
+
* behaviour and data integrity when a store() call is triggered.
|
230 |
+
*
|
231 |
+
* Example:
|
232 |
+
* $object1 = $options->get_option( 'object1' );
|
233 |
+
* $object1->x = 123;
|
234 |
+
*
|
235 |
+
* $object2 = $options->get_option( 'object2' );
|
236 |
+
* $object2->y = 'dummy';
|
237 |
+
*
|
238 |
+
* $options->set_option( 'object2', $object2, true );
|
239 |
+
*
|
240 |
+
* If we don't return a clone of option 'object1', setting 'object2'
|
241 |
+
* will also store the updated value of 'object1' which is quite not
|
242 |
+
* an expected behaviour.
|
243 |
+
*
|
244 |
+
* @author Vova Feldman
|
245 |
+
*/
|
246 |
+
return is_object($value) ? clone $value : $value;
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* @author Vova Feldman (@svovaf)
|
251 |
+
* @since 1.0.3
|
252 |
+
*
|
253 |
+
* @param string $option
|
254 |
+
* @param mixed $value
|
255 |
+
* @param bool $flush
|
256 |
+
*/
|
257 |
+
function set_option( $option, $value, $flush = false ) {
|
258 |
+
$this->_logger->entrance( 'option = ' . $option );
|
259 |
+
|
260 |
+
if ( ! $this->is_loaded() ) {
|
261 |
+
$this->clear();
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* If it's an object, store a clone of the object, otherwise,
|
266 |
+
* external changes of the object will actually change the value
|
267 |
+
* of the object in the options manager which may lead to an unexpected
|
268 |
+
* behaviour and data integrity when a store() call is triggered.
|
269 |
+
*
|
270 |
+
* Example:
|
271 |
+
* $object1 = new stdClass();
|
272 |
+
* $object1->x = 123;
|
273 |
+
*
|
274 |
+
* $options->set_option( 'object1', $object1 );
|
275 |
+
*
|
276 |
+
* $object1->x = 456;
|
277 |
+
*
|
278 |
+
* $options->set_option( 'object2', $object2, true );
|
279 |
+
*
|
280 |
+
* If we don't set the option as a clone of option 'object1', setting 'object2'
|
281 |
+
* will also store the updated value of 'object1' ($object1->x = 456 instead of
|
282 |
+
* $object1->x = 123) which is quite not an expected behaviour.
|
283 |
+
*
|
284 |
+
* @author Vova Feldman
|
285 |
+
*/
|
286 |
+
$copy = is_object($value) ? clone $value : $value;
|
287 |
+
|
288 |
+
if ( is_array( $this->_options ) ) {
|
289 |
+
$this->_options[ $option ] = $copy;
|
290 |
+
} else if ( is_object( $this->_options ) ) {
|
291 |
+
$this->_options->{$option} = $copy;
|
292 |
+
}
|
293 |
+
|
294 |
+
if ( $flush ) {
|
295 |
+
$this->store();
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Unset option.
|
301 |
+
*
|
302 |
+
* @author Vova Feldman (@svovaf)
|
303 |
+
* @since 1.0.3
|
304 |
+
*
|
305 |
+
* @param string $option
|
306 |
+
* @param bool $flush
|
307 |
+
*/
|
308 |
+
function unset_option( $option, $flush = false ) {
|
309 |
+
$this->_logger->entrance( 'option = ' . $option );
|
310 |
+
|
311 |
+
if ( is_array( $this->_options ) ) {
|
312 |
+
if ( ! isset( $this->_options[ $option ] ) ) {
|
313 |
+
return;
|
314 |
+
}
|
315 |
+
|
316 |
+
unset( $this->_options[ $option ] );
|
317 |
+
|
318 |
+
} else if ( is_object( $this->_options ) ) {
|
319 |
+
if ( ! isset( $this->_options->{$option} ) ) {
|
320 |
+
return;
|
321 |
+
}
|
322 |
+
|
323 |
+
unset( $this->_options->{$option} );
|
324 |
+
}
|
325 |
+
|
326 |
+
if ( $flush ) {
|
327 |
+
$this->store();
|
328 |
+
}
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Dump options to database.
|
333 |
+
*
|
334 |
+
* @author Vova Feldman (@svovaf)
|
335 |
+
* @since 1.0.3
|
336 |
+
*/
|
337 |
+
function store() {
|
338 |
+
$this->_logger->entrance();
|
339 |
+
|
340 |
+
$option_name = $this->_get_option_manager_name();
|
341 |
+
|
342 |
+
if ( $this->_logger->is_on() ) {
|
343 |
+
$this->_logger->info( $option_name . ' = ' . var_export( $this->_options, true ) );
|
344 |
+
}
|
345 |
+
|
346 |
+
// Update DB.
|
347 |
+
update_option( $option_name, $this->_options );
|
348 |
+
|
349 |
+
if ( ! WP_FS__DEBUG_SDK ) {
|
350 |
+
wp_cache_set( $option_name, $this->_options, WP_FS__SLUG );
|
351 |
+
}
|
352 |
+
}
|
353 |
}
|
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 |
}
|
freemius/includes/managers/class-fs-plugin-manager.php
CHANGED
@@ -1,220 +1,220 @@
|
|
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_Plugin_Manager {
|
14 |
-
/**
|
15 |
-
* @since 1.2.2
|
16 |
-
*
|
17 |
-
* @var string|number
|
18 |
-
*/
|
19 |
-
protected $_module_id;
|
20 |
-
/**
|
21 |
-
* @since 1.2.2
|
22 |
-
*
|
23 |
-
* @var FS_Plugin
|
24 |
-
*/
|
25 |
-
protected $_module;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @var FS_Plugin_Manager[]
|
29 |
-
*/
|
30 |
-
private static $_instances = array();
|
31 |
-
/**
|
32 |
-
* @var FS_Logger
|
33 |
-
*/
|
34 |
-
protected $_logger;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Option names
|
38 |
-
*
|
39 |
-
* @author Leo Fajardo (@leorw)
|
40 |
-
* @since 1.2.2
|
41 |
-
*/
|
42 |
-
const OPTION_NAME_PLUGINS = 'plugins';
|
43 |
-
const OPTION_NAME_THEMES = 'themes';
|
44 |
-
|
45 |
-
/**
|
46 |
-
* @param string|number $module_id
|
47 |
-
*
|
48 |
-
* @return FS_Plugin_Manager
|
49 |
-
*/
|
50 |
-
static function instance( $module_id ) {
|
51 |
-
$key = 'm_' . $module_id;
|
52 |
-
|
53 |
-
if ( ! isset( self::$_instances[ $key ] ) ) {
|
54 |
-
self::$_instances[ $key ] = new FS_Plugin_Manager( $module_id );
|
55 |
-
}
|
56 |
-
|
57 |
-
return self::$_instances[ $key ];
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @param string|number $module_id
|
62 |
-
*/
|
63 |
-
protected function __construct( $module_id ) {
|
64 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_' . 'plugins', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
65 |
-
$this->_module_id = $module_id;
|
66 |
-
|
67 |
-
$this->load();
|
68 |
-
}
|
69 |
-
|
70 |
-
protected function get_option_manager() {
|
71 |
-
return FS_Option_Manager::get_manager( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* @author Leo Fajardo (@leorw)
|
76 |
-
* @since 1.2.2
|
77 |
-
*
|
78 |
-
* @param string|false $module_type "plugin", "theme", or "false" for all modules.
|
79 |
-
*
|
80 |
-
* @return array
|
81 |
-
*/
|
82 |
-
protected function get_all_modules( $module_type = false ) {
|
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 |
-
|
95 |
-
/**
|
96 |
-
* Load plugin data from local DB.
|
97 |
-
*
|
98 |
-
* @author Vova Feldman (@svovaf)
|
99 |
-
* @since 1.0.6
|
100 |
-
*/
|
101 |
-
function load() {
|
102 |
-
$all_modules = $this->get_all_modules();
|
103 |
-
|
104 |
-
if ( ! is_numeric( $this->_module_id ) ) {
|
105 |
-
unset( $all_modules[ self::OPTION_NAME_THEMES ] );
|
106 |
-
}
|
107 |
-
|
108 |
-
foreach ( $all_modules as $modules ) {
|
109 |
-
/**
|
110 |
-
* @since 1.2.2
|
111 |
-
*
|
112 |
-
* @var $modules FS_Plugin[]
|
113 |
-
*/
|
114 |
-
foreach ( $modules as $module ) {
|
115 |
-
$found_module = false;
|
116 |
-
|
117 |
-
/**
|
118 |
-
* If module ID is not numeric, it must be a plugin's slug.
|
119 |
-
*
|
120 |
-
* @author Leo Fajardo (@leorw)
|
121 |
-
* @since 1.2.2
|
122 |
-
*/
|
123 |
-
if ( ! is_numeric( $this->_module_id ) ) {
|
124 |
-
if ( $this->_module_id === $module->slug ) {
|
125 |
-
$this->_module_id = $module->id;
|
126 |
-
$found_module = true;
|
127 |
-
}
|
128 |
-
} else if ( $this->_module_id == $module->id ) {
|
129 |
-
$found_module = true;
|
130 |
-
}
|
131 |
-
|
132 |
-
if ( $found_module ) {
|
133 |
-
$this->_module = $module;
|
134 |
-
break;
|
135 |
-
}
|
136 |
-
}
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Store plugin on local DB.
|
142 |
-
*
|
143 |
-
* @author Vova Feldman (@svovaf)
|
144 |
-
* @since 1.0.6
|
145 |
-
*
|
146 |
-
* @param bool|FS_Plugin $module
|
147 |
-
* @param bool $flush
|
148 |
-
*
|
149 |
-
* @return bool|\FS_Plugin
|
150 |
-
*/
|
151 |
-
function store( $module = false, $flush = true ) {
|
152 |
-
if ( false !== $module ) {
|
153 |
-
$this->_module = $module;
|
154 |
-
}
|
155 |
-
|
156 |
-
$all_modules = $this->get_all_modules( $this->_module->type );
|
157 |
-
$all_modules[ $this->_module->slug ] = $this->_module;
|
158 |
-
|
159 |
-
$options_manager = $this->get_option_manager();
|
160 |
-
$options_manager->set_option( $this->_module->type . 's', $all_modules, $flush );
|
161 |
-
|
162 |
-
return $this->_module;
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Update local plugin data if different.
|
167 |
-
*
|
168 |
-
* @author Vova Feldman (@svovaf)
|
169 |
-
* @since 1.0.6
|
170 |
-
*
|
171 |
-
* @param \FS_Plugin $plugin
|
172 |
-
* @param bool $store
|
173 |
-
*
|
174 |
-
* @return bool True if plugin was updated.
|
175 |
-
*/
|
176 |
-
function update( FS_Plugin $plugin, $store = true ) {
|
177 |
-
if ( ! ($this->_module instanceof FS_Plugin ) ||
|
178 |
-
$this->_module->slug != $plugin->slug ||
|
179 |
-
$this->_module->public_key != $plugin->public_key ||
|
180 |
-
$this->_module->secret_key != $plugin->secret_key ||
|
181 |
-
$this->_module->parent_plugin_id != $plugin->parent_plugin_id ||
|
182 |
-
$this->_module->title != $plugin->title
|
183 |
-
) {
|
184 |
-
$this->store( $plugin, $store );
|
185 |
-
|
186 |
-
return true;
|
187 |
-
}
|
188 |
-
|
189 |
-
return false;
|
190 |
-
}
|
191 |
-
|
192 |
-
/**
|
193 |
-
* @author Vova Feldman (@svovaf)
|
194 |
-
* @since 1.0.6
|
195 |
-
*
|
196 |
-
* @param FS_Plugin $plugin
|
197 |
-
* @param bool $store
|
198 |
-
*/
|
199 |
-
function set( FS_Plugin $plugin, $store = false ) {
|
200 |
-
$this->_module = $plugin;
|
201 |
-
|
202 |
-
if ( $store ) {
|
203 |
-
$this->store();
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* @author Vova Feldman (@svovaf)
|
209 |
-
* @since 1.0.6
|
210 |
-
*
|
211 |
-
* @return bool|\FS_Plugin
|
212 |
-
*/
|
213 |
-
function get() {
|
214 |
-
return isset( $this->_module ) ?
|
215 |
-
$this->_module :
|
216 |
-
false;
|
217 |
-
}
|
218 |
-
|
219 |
-
|
220 |
}
|
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_Plugin_Manager {
|
14 |
+
/**
|
15 |
+
* @since 1.2.2
|
16 |
+
*
|
17 |
+
* @var string|number
|
18 |
+
*/
|
19 |
+
protected $_module_id;
|
20 |
+
/**
|
21 |
+
* @since 1.2.2
|
22 |
+
*
|
23 |
+
* @var FS_Plugin
|
24 |
+
*/
|
25 |
+
protected $_module;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @var FS_Plugin_Manager[]
|
29 |
+
*/
|
30 |
+
private static $_instances = array();
|
31 |
+
/**
|
32 |
+
* @var FS_Logger
|
33 |
+
*/
|
34 |
+
protected $_logger;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Option names
|
38 |
+
*
|
39 |
+
* @author Leo Fajardo (@leorw)
|
40 |
+
* @since 1.2.2
|
41 |
+
*/
|
42 |
+
const OPTION_NAME_PLUGINS = 'plugins';
|
43 |
+
const OPTION_NAME_THEMES = 'themes';
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @param string|number $module_id
|
47 |
+
*
|
48 |
+
* @return FS_Plugin_Manager
|
49 |
+
*/
|
50 |
+
static function instance( $module_id ) {
|
51 |
+
$key = 'm_' . $module_id;
|
52 |
+
|
53 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
54 |
+
self::$_instances[ $key ] = new FS_Plugin_Manager( $module_id );
|
55 |
+
}
|
56 |
+
|
57 |
+
return self::$_instances[ $key ];
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param string|number $module_id
|
62 |
+
*/
|
63 |
+
protected function __construct( $module_id ) {
|
64 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_' . 'plugins', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
65 |
+
$this->_module_id = $module_id;
|
66 |
+
|
67 |
+
$this->load();
|
68 |
+
}
|
69 |
+
|
70 |
+
protected function get_option_manager() {
|
71 |
+
return FS_Option_Manager::get_manager( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @author Leo Fajardo (@leorw)
|
76 |
+
* @since 1.2.2
|
77 |
+
*
|
78 |
+
* @param string|false $module_type "plugin", "theme", or "false" for all modules.
|
79 |
+
*
|
80 |
+
* @return array
|
81 |
+
*/
|
82 |
+
protected function get_all_modules( $module_type = false ) {
|
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 |
+
|
95 |
+
/**
|
96 |
+
* Load plugin data from local DB.
|
97 |
+
*
|
98 |
+
* @author Vova Feldman (@svovaf)
|
99 |
+
* @since 1.0.6
|
100 |
+
*/
|
101 |
+
function load() {
|
102 |
+
$all_modules = $this->get_all_modules();
|
103 |
+
|
104 |
+
if ( ! is_numeric( $this->_module_id ) ) {
|
105 |
+
unset( $all_modules[ self::OPTION_NAME_THEMES ] );
|
106 |
+
}
|
107 |
+
|
108 |
+
foreach ( $all_modules as $modules ) {
|
109 |
+
/**
|
110 |
+
* @since 1.2.2
|
111 |
+
*
|
112 |
+
* @var $modules FS_Plugin[]
|
113 |
+
*/
|
114 |
+
foreach ( $modules as $module ) {
|
115 |
+
$found_module = false;
|
116 |
+
|
117 |
+
/**
|
118 |
+
* If module ID is not numeric, it must be a plugin's slug.
|
119 |
+
*
|
120 |
+
* @author Leo Fajardo (@leorw)
|
121 |
+
* @since 1.2.2
|
122 |
+
*/
|
123 |
+
if ( ! is_numeric( $this->_module_id ) ) {
|
124 |
+
if ( $this->_module_id === $module->slug ) {
|
125 |
+
$this->_module_id = $module->id;
|
126 |
+
$found_module = true;
|
127 |
+
}
|
128 |
+
} else if ( $this->_module_id == $module->id ) {
|
129 |
+
$found_module = true;
|
130 |
+
}
|
131 |
+
|
132 |
+
if ( $found_module ) {
|
133 |
+
$this->_module = $module;
|
134 |
+
break;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Store plugin on local DB.
|
142 |
+
*
|
143 |
+
* @author Vova Feldman (@svovaf)
|
144 |
+
* @since 1.0.6
|
145 |
+
*
|
146 |
+
* @param bool|FS_Plugin $module
|
147 |
+
* @param bool $flush
|
148 |
+
*
|
149 |
+
* @return bool|\FS_Plugin
|
150 |
+
*/
|
151 |
+
function store( $module = false, $flush = true ) {
|
152 |
+
if ( false !== $module ) {
|
153 |
+
$this->_module = $module;
|
154 |
+
}
|
155 |
+
|
156 |
+
$all_modules = $this->get_all_modules( $this->_module->type );
|
157 |
+
$all_modules[ $this->_module->slug ] = $this->_module;
|
158 |
+
|
159 |
+
$options_manager = $this->get_option_manager();
|
160 |
+
$options_manager->set_option( $this->_module->type . 's', $all_modules, $flush );
|
161 |
+
|
162 |
+
return $this->_module;
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Update local plugin data if different.
|
167 |
+
*
|
168 |
+
* @author Vova Feldman (@svovaf)
|
169 |
+
* @since 1.0.6
|
170 |
+
*
|
171 |
+
* @param \FS_Plugin $plugin
|
172 |
+
* @param bool $store
|
173 |
+
*
|
174 |
+
* @return bool True if plugin was updated.
|
175 |
+
*/
|
176 |
+
function update( FS_Plugin $plugin, $store = true ) {
|
177 |
+
if ( ! ($this->_module instanceof FS_Plugin ) ||
|
178 |
+
$this->_module->slug != $plugin->slug ||
|
179 |
+
$this->_module->public_key != $plugin->public_key ||
|
180 |
+
$this->_module->secret_key != $plugin->secret_key ||
|
181 |
+
$this->_module->parent_plugin_id != $plugin->parent_plugin_id ||
|
182 |
+
$this->_module->title != $plugin->title
|
183 |
+
) {
|
184 |
+
$this->store( $plugin, $store );
|
185 |
+
|
186 |
+
return true;
|
187 |
+
}
|
188 |
+
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* @author Vova Feldman (@svovaf)
|
194 |
+
* @since 1.0.6
|
195 |
+
*
|
196 |
+
* @param FS_Plugin $plugin
|
197 |
+
* @param bool $store
|
198 |
+
*/
|
199 |
+
function set( FS_Plugin $plugin, $store = false ) {
|
200 |
+
$this->_module = $plugin;
|
201 |
+
|
202 |
+
if ( $store ) {
|
203 |
+
$this->store();
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* @author Vova Feldman (@svovaf)
|
209 |
+
* @since 1.0.6
|
210 |
+
*
|
211 |
+
* @return bool|\FS_Plugin
|
212 |
+
*/
|
213 |
+
function get() {
|
214 |
+
return isset( $this->_module ) ?
|
215 |
+
$this->_module :
|
216 |
+
false;
|
217 |
+
}
|
218 |
+
|
219 |
+
|
220 |
}
|
freemius/includes/sdk/FreemiusWordPress.php
CHANGED
@@ -263,6 +263,8 @@
|
|
263 |
|
264 |
/**
|
265 |
* Get API request URL signed via query string.
|
|
|
|
|
266 |
*
|
267 |
* @param string $pPath
|
268 |
*
|
@@ -270,20 +272,19 @@
|
|
270 |
*
|
271 |
* @return string
|
272 |
*/
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
}
|
287 |
|
288 |
/**
|
289 |
* @author Vova Feldman
|
263 |
|
264 |
/**
|
265 |
* Get API request URL signed via query string.
|
266 |
+
*
|
267 |
+
* @since 1.2.3 Stopped using http_build_query(). Instead, use urlencode(). In some environments the encoding of http_build_query() can generate a URL that once used with a redirect, the `&` querystring separator is escaped to `&` which breaks the URL (Added by @svovaf).
|
268 |
*
|
269 |
* @param string $pPath
|
270 |
*
|
272 |
*
|
273 |
* @return string
|
274 |
*/
|
275 |
+
function GetSignedUrl( $pPath ) {
|
276 |
+
$resource = explode( '?', $this->CanonizePath( $pPath ) );
|
277 |
+
$pResourceUrl = $resource[0];
|
278 |
+
|
279 |
+
$auth = $this->GenerateAuthorizationParams( $pResourceUrl );
|
280 |
+
|
281 |
+
return Freemius_Api_WordPress::GetUrl(
|
282 |
+
$pResourceUrl . '?' .
|
283 |
+
( 1 < count( $resource ) && ! empty( $resource[1] ) ? $resource[1] . '&' : '' ) .
|
284 |
+
'authorization=' . urlencode( $auth['authorization'] ) .
|
285 |
+
'&auth_date=' . urlencode( $auth['date'] )
|
286 |
+
, $this->_isSandbox );
|
287 |
+
}
|
|
|
288 |
|
289 |
/**
|
290 |
* @author Vova Feldman
|
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 |
+
|
freemius/includes/supplements/fs-essential-functions-1.1.7.1.php
CHANGED
@@ -1,47 +1,47 @@
|
|
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 give 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 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
30 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
31 |
-
}
|
32 |
-
|
33 |
-
$all_plugins = get_plugins();
|
34 |
-
|
35 |
-
$file_real_path = fs_normalize_path( realpath( $file ) );
|
36 |
-
|
37 |
-
// Get active plugin's main files real full names (might be symlinks).
|
38 |
-
foreach ( $all_plugins as $relative_path => &$data ) {
|
39 |
-
if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) ) ) ) {
|
40 |
-
if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) {
|
41 |
-
return $relative_path;
|
42 |
-
}
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
return null;
|
47 |
-
}
|
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 give 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 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
30 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
31 |
+
}
|
32 |
+
|
33 |
+
$all_plugins = get_plugins();
|
34 |
+
|
35 |
+
$file_real_path = fs_normalize_path( realpath( $file ) );
|
36 |
+
|
37 |
+
// Get active plugin's main files real full names (might be symlinks).
|
38 |
+
foreach ( $all_plugins as $relative_path => &$data ) {
|
39 |
+
if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) ) ) ) {
|
40 |
+
if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) {
|
41 |
+
return $relative_path;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
return null;
|
47 |
+
}
|
freemius/languages/freemius-da_DK.po
CHANGED
@@ -1,1826 +1,1826 @@
|
|
1 |
-
# Copyright (C) 2017 freemius
|
2 |
-
# This file is distributed under the same license as the freemius package.
|
3 |
-
# Translators:
|
4 |
-
# Joachim Jensen <jv@intox.dk>, 2016-2017
|
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: 2017-08-24 12:32+0000\n"
|
11 |
-
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
12 |
-
"Language: da_DK\n"
|
13 |
-
"Language-Team: Danish (Denmark) (http://www.transifex.com/freemius/wordpress-sdk/language/da_DK/)\n"
|
14 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
-
"Content-Transfer-Encoding: 8bit\n"
|
16 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
-
"MIME-Version: 1.0\n"
|
18 |
-
"X-Poedit-Basepath: ..\n"
|
19 |
-
"X-Poedit-KeywordsList: _fs_text;_fs_echo;_fs_esc_attr;_fs_esc_attr_echo;_fs_esc_html;_fs_esc_html_echo;_fs_x:1,2c;_fs_ex:1,2c;_fs_esc_attr_x:1,2c;_fs_esc_html_x:1,2c;_fs_n:1,2;_fs_n_noop:1,2;_fs_nx:1,2,4c;_fs_nx_noop:1,2,3c\n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
-
|
24 |
-
#: includes/i18n.php:37
|
25 |
-
msgid "Account"
|
26 |
-
msgstr "Konto"
|
27 |
-
|
28 |
-
#: includes/i18n.php:38
|
29 |
-
msgid "Add-On"
|
30 |
-
msgstr "Add-On"
|
31 |
-
|
32 |
-
#: includes/i18n.php:39
|
33 |
-
msgid "Contact Us"
|
34 |
-
msgstr "Kontakt os"
|
35 |
-
|
36 |
-
#: includes/i18n.php:40
|
37 |
-
msgid "Contact Support"
|
38 |
-
msgstr "Kontakt support"
|
39 |
-
|
40 |
-
#: includes/i18n.php:41
|
41 |
-
msgid "Change Ownership"
|
42 |
-
msgstr "Skift ejerskab"
|
43 |
-
|
44 |
-
#: includes/i18n.php:42
|
45 |
-
msgid "Support"
|
46 |
-
msgstr "Support"
|
47 |
-
|
48 |
-
#: includes/i18n.php:43
|
49 |
-
msgid "Support Forum"
|
50 |
-
msgstr "Supportforum"
|
51 |
-
|
52 |
-
#: includes/i18n.php:44
|
53 |
-
msgid "Add-Ons"
|
54 |
-
msgstr "Add-Ons"
|
55 |
-
|
56 |
-
#: includes/i18n.php:45
|
57 |
-
msgctxt "verb"
|
58 |
-
msgid "Upgrade"
|
59 |
-
msgstr "Opgrader"
|
60 |
-
|
61 |
-
#: includes/i18n.php:46
|
62 |
-
msgid "Awesome"
|
63 |
-
msgstr "Sejt"
|
64 |
-
|
65 |
-
#: includes/i18n.php:47
|
66 |
-
msgctxt "noun"
|
67 |
-
msgid "Pricing"
|
68 |
-
msgstr "Priser"
|
69 |
-
|
70 |
-
#: includes/i18n.php:48
|
71 |
-
msgctxt "noun"
|
72 |
-
msgid "Price"
|
73 |
-
msgstr "Pris"
|
74 |
-
|
75 |
-
#: includes/i18n.php:49
|
76 |
-
msgid "Unlimited Updates"
|
77 |
-
msgstr "Ubegrænsede opdateringer"
|
78 |
-
|
79 |
-
#: includes/i18n.php:50
|
80 |
-
msgctxt "verb"
|
81 |
-
msgid "Downgrade"
|
82 |
-
msgstr "Nedgrader"
|
83 |
-
|
84 |
-
#: includes/i18n.php:51
|
85 |
-
msgctxt "verb"
|
86 |
-
msgid "Cancel Subscription"
|
87 |
-
msgstr "Annuller abonnement"
|
88 |
-
|
89 |
-
#: includes/i18n.php:52
|
90 |
-
msgid "Cancel Trial"
|
91 |
-
msgstr "Annuller prøveperiode"
|
92 |
-
|
93 |
-
#: includes/i18n.php:53
|
94 |
-
msgid "Free Trial"
|
95 |
-
msgstr "Gratis prøveperiode"
|
96 |
-
|
97 |
-
#: includes/i18n.php:54
|
98 |
-
msgid "Start my free %s"
|
99 |
-
msgstr "Start min gratis %s"
|
100 |
-
|
101 |
-
#: includes/i18n.php:55
|
102 |
-
msgid "No commitment for %s - cancel anytime"
|
103 |
-
msgstr "Ingen bindinger ved %s - annuller når som helst"
|
104 |
-
|
105 |
-
#: includes/i18n.php:56
|
106 |
-
msgid "After your free %s, pay as little as %s"
|
107 |
-
msgstr "Efter din gratis %s er prisen kun %s"
|
108 |
-
|
109 |
-
#: includes/i18n.php:57
|
110 |
-
msgid "Details"
|
111 |
-
msgstr "Detaljer"
|
112 |
-
|
113 |
-
#: includes/i18n.php:58
|
114 |
-
msgid "Account Details"
|
115 |
-
msgstr "Kontodetaljer"
|
116 |
-
|
117 |
-
#: includes/i18n.php:59
|
118 |
-
msgctxt "verb"
|
119 |
-
msgid "Delete"
|
120 |
-
msgstr "Slet"
|
121 |
-
|
122 |
-
#: includes/i18n.php:60
|
123 |
-
msgctxt "verb"
|
124 |
-
msgid "Show"
|
125 |
-
msgstr "Vis"
|
126 |
-
|
127 |
-
#: includes/i18n.php:61
|
128 |
-
msgctxt "verb"
|
129 |
-
msgid "Hide"
|
130 |
-
msgstr "Skjul"
|
131 |
-
|
132 |
-
#: includes/i18n.php:62
|
133 |
-
msgctxt "verb"
|
134 |
-
msgid "Edit"
|
135 |
-
msgstr "Rediger"
|
136 |
-
|
137 |
-
#: includes/i18n.php:63
|
138 |
-
msgctxt "verb"
|
139 |
-
msgid "Update"
|
140 |
-
msgstr "Opdater"
|
141 |
-
|
142 |
-
#: includes/i18n.php:64
|
143 |
-
msgid "Date"
|
144 |
-
msgstr "Dato"
|
145 |
-
|
146 |
-
#: includes/i18n.php:65
|
147 |
-
msgid "Amount"
|
148 |
-
msgstr "Beløb"
|
149 |
-
|
150 |
-
#: includes/i18n.php:66
|
151 |
-
msgid "Invoice"
|
152 |
-
msgstr "Faktura"
|
153 |
-
|
154 |
-
#: includes/i18n.php:67
|
155 |
-
msgid "Billing"
|
156 |
-
msgstr "Betaling"
|
157 |
-
|
158 |
-
#: includes/i18n.php:68
|
159 |
-
msgid "Payments"
|
160 |
-
msgstr "Betalinger"
|
161 |
-
|
162 |
-
#: includes/i18n.php:69
|
163 |
-
msgid "Delete Account"
|
164 |
-
msgstr "Slet konto"
|
165 |
-
|
166 |
-
#: includes/i18n.php:70
|
167 |
-
msgctxt "as close a window"
|
168 |
-
msgid "Dismiss"
|
169 |
-
msgstr "Fjern"
|
170 |
-
|
171 |
-
#: includes/i18n.php:71
|
172 |
-
msgctxt "as product pricing plan"
|
173 |
-
msgid "Plan"
|
174 |
-
msgstr "Plan"
|
175 |
-
|
176 |
-
#: includes/i18n.php:72
|
177 |
-
msgid "Change Plan"
|
178 |
-
msgstr "Skift plan"
|
179 |
-
|
180 |
-
#: includes/i18n.php:73
|
181 |
-
msgctxt "as download professional version"
|
182 |
-
msgid "Download %s Version"
|
183 |
-
msgstr "Download %s Version"
|
184 |
-
|
185 |
-
#: includes/i18n.php:74
|
186 |
-
msgctxt "as download professional version now"
|
187 |
-
msgid "Download %s version now"
|
188 |
-
msgstr "Download %s version now"
|
189 |
-
|
190 |
-
#: includes/i18n.php:75
|
191 |
-
msgctxt "as download latest version"
|
192 |
-
msgid "Download Latest"
|
193 |
-
msgstr "Download seneste"
|
194 |
-
|
195 |
-
#: includes/i18n.php:76
|
196 |
-
msgctxt "E.g. you have a professional license."
|
197 |
-
msgid "You have a %s license."
|
198 |
-
msgstr "Du har en %s licens."
|
199 |
-
|
200 |
-
#: includes/i18n.php:77
|
201 |
-
msgid "New"
|
202 |
-
msgstr "Ny"
|
203 |
-
|
204 |
-
#: includes/i18n.php:78
|
205 |
-
msgid "Free"
|
206 |
-
msgstr "Gratis"
|
207 |
-
|
208 |
-
#: includes/i18n.php:79
|
209 |
-
msgctxt "as trial plan"
|
210 |
-
msgid "Trial"
|
211 |
-
msgstr "Prøveperiode"
|
212 |
-
|
213 |
-
#: includes/i18n.php:80
|
214 |
-
msgctxt "as starting a trial plan"
|
215 |
-
msgid "Start Trial"
|
216 |
-
msgstr "Start prøveperiode"
|
217 |
-
|
218 |
-
#: includes/i18n.php:81
|
219 |
-
msgctxt "verb"
|
220 |
-
msgid "Purchase"
|
221 |
-
msgstr "Køb"
|
222 |
-
|
223 |
-
#: includes/i18n.php:82
|
224 |
-
msgid "Purchase License"
|
225 |
-
msgstr "Køb licens"
|
226 |
-
|
227 |
-
#: includes/i18n.php:83
|
228 |
-
msgctxt "verb"
|
229 |
-
msgid "Buy"
|
230 |
-
msgstr "Køb"
|
231 |
-
|
232 |
-
#: includes/i18n.php:84
|
233 |
-
msgid "Buy License"
|
234 |
-
msgstr "Køb licens"
|
235 |
-
|
236 |
-
#: includes/i18n.php:85
|
237 |
-
msgid "Single Site License"
|
238 |
-
msgstr "Single Site License"
|
239 |
-
|
240 |
-
#: includes/i18n.php:86
|
241 |
-
msgid "Unlimited Licenses"
|
242 |
-
msgstr "Ubegrænsede licenser"
|
243 |
-
|
244 |
-
#: includes/i18n.php:87
|
245 |
-
msgid "Up to %s Sites"
|
246 |
-
msgstr "Op til %s websteder"
|
247 |
-
|
248 |
-
#: includes/i18n.php:88
|
249 |
-
msgid "%sRenew your license now%s to access version %s features and support."
|
250 |
-
msgstr "%sRenew your license now%s to access version %s features and support."
|
251 |
-
|
252 |
-
#: includes/i18n.php:89
|
253 |
-
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
254 |
-
msgstr "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
255 |
-
|
256 |
-
#: includes/i18n.php:90
|
257 |
-
msgctxt "e.g. Professional Plan"
|
258 |
-
msgid "%s Plan"
|
259 |
-
msgstr "%s Plan"
|
260 |
-
|
261 |
-
#: includes/i18n.php:91
|
262 |
-
msgid "You are just one step away - %s"
|
263 |
-
msgstr "Du mangler kun ét skridt - %s"
|
264 |
-
|
265 |
-
#: includes/i18n.php:92
|
266 |
-
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
267 |
-
msgid "Complete \"%s\" Activation Now"
|
268 |
-
msgstr "Færdiggør aktivering af \"%s\" nu"
|
269 |
-
|
270 |
-
#: includes/i18n.php:94
|
271 |
-
msgid "We made a few tweaks to the %s, %s"
|
272 |
-
msgstr "We made a few tweaks to the %s, %s"
|
273 |
-
|
274 |
-
#: includes/i18n.php:95
|
275 |
-
msgid "Opt-in to make \"%s\" Better!"
|
276 |
-
msgstr "Tilmeld for at gøre \"%s\" bedre!"
|
277 |
-
|
278 |
-
#: includes/i18n.php:96
|
279 |
-
msgid "Error"
|
280 |
-
msgstr "Fejl"
|
281 |
-
|
282 |
-
#: includes/i18n.php:97
|
283 |
-
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
284 |
-
msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
285 |
-
|
286 |
-
#: includes/i18n.php:100
|
287 |
-
msgctxt "as expiration date"
|
288 |
-
msgid "Expiration"
|
289 |
-
msgstr "Expiration"
|
290 |
-
|
291 |
-
#: includes/i18n.php:101
|
292 |
-
msgctxt "as software license"
|
293 |
-
msgid "License"
|
294 |
-
msgstr "Licens"
|
295 |
-
|
296 |
-
#: includes/i18n.php:102
|
297 |
-
msgid "not verified"
|
298 |
-
msgstr "ikke verificeret"
|
299 |
-
|
300 |
-
#: includes/i18n.php:103
|
301 |
-
msgid "Verify Email"
|
302 |
-
msgstr "Verificer e-mail"
|
303 |
-
|
304 |
-
#: includes/i18n.php:104
|
305 |
-
msgctxt "e.g. expires in 2 months"
|
306 |
-
msgid "Expires in %s"
|
307 |
-
msgstr "Udløber om %s"
|
308 |
-
|
309 |
-
#: includes/i18n.php:105
|
310 |
-
msgctxt "e.g. auto renews in 2 months"
|
311 |
-
msgid "Auto renews in %s"
|
312 |
-
msgstr "Auto-fornyer om %s"
|
313 |
-
|
314 |
-
#: includes/i18n.php:106
|
315 |
-
msgid "No expiration"
|
316 |
-
msgstr "Udløber ikke"
|
317 |
-
|
318 |
-
#: includes/i18n.php:107
|
319 |
-
msgid "Expired"
|
320 |
-
msgstr "Udløbet"
|
321 |
-
|
322 |
-
#: includes/i18n.php:108
|
323 |
-
msgid "Cancelled"
|
324 |
-
msgstr "Annulleret"
|
325 |
-
|
326 |
-
#: includes/i18n.php:109
|
327 |
-
msgctxt "e.g. In 2 hours"
|
328 |
-
msgid "In %s"
|
329 |
-
msgstr "Om %s"
|
330 |
-
|
331 |
-
#: includes/i18n.php:110
|
332 |
-
msgctxt "e.g. 2 min ago"
|
333 |
-
msgid "%s ago"
|
334 |
-
msgstr "%s siden"
|
335 |
-
|
336 |
-
#: includes/i18n.php:112
|
337 |
-
msgid "%s or higher"
|
338 |
-
msgstr "%s eller højere"
|
339 |
-
|
340 |
-
#: includes/i18n.php:113
|
341 |
-
msgctxt "as plugin version"
|
342 |
-
msgid "Version"
|
343 |
-
msgstr "Version"
|
344 |
-
|
345 |
-
#: includes/i18n.php:114
|
346 |
-
msgid "Name"
|
347 |
-
msgstr "Navn"
|
348 |
-
|
349 |
-
#: includes/i18n.php:115
|
350 |
-
msgid "Email"
|
351 |
-
msgstr "E-mail"
|
352 |
-
|
353 |
-
#: includes/i18n.php:116
|
354 |
-
msgid "Email address"
|
355 |
-
msgstr "E-mailadresse"
|
356 |
-
|
357 |
-
#: includes/i18n.php:117
|
358 |
-
msgid "Verified"
|
359 |
-
msgstr "Verificeret"
|
360 |
-
|
361 |
-
#: includes/i18n.php:118
|
362 |
-
msgid "Module"
|
363 |
-
msgstr "Modul"
|
364 |
-
|
365 |
-
#: includes/i18n.php:119
|
366 |
-
msgid "Module Type"
|
367 |
-
msgstr "Modultype"
|
368 |
-
|
369 |
-
#: includes/i18n.php:120
|
370 |
-
msgid "Plugin"
|
371 |
-
msgstr "Plugin"
|
372 |
-
|
373 |
-
#: includes/i18n.php:121
|
374 |
-
msgid "Plugins"
|
375 |
-
msgstr "Plugins"
|
376 |
-
|
377 |
-
#: includes/i18n.php:122
|
378 |
-
msgid "Theme"
|
379 |
-
msgstr "Tema"
|
380 |
-
|
381 |
-
#: includes/i18n.php:123
|
382 |
-
msgid "Themes"
|
383 |
-
msgstr "Temaer"
|
384 |
-
|
385 |
-
#: includes/i18n.php:124
|
386 |
-
msgctxt "as file/folder path"
|
387 |
-
msgid "Path"
|
388 |
-
msgstr "Sti"
|
389 |
-
|
390 |
-
#: includes/i18n.php:125
|
391 |
-
msgid "Title"
|
392 |
-
msgstr "Titel"
|
393 |
-
|
394 |
-
#: includes/i18n.php:126
|
395 |
-
msgid "Free version"
|
396 |
-
msgstr "Gratis version"
|
397 |
-
|
398 |
-
#: includes/i18n.php:127
|
399 |
-
msgid "Premium version"
|
400 |
-
msgstr "Premium version"
|
401 |
-
|
402 |
-
#: includes/i18n.php:128
|
403 |
-
msgctxt "as WP plugin slug"
|
404 |
-
msgid "Slug"
|
405 |
-
msgstr "Kortnavn"
|
406 |
-
|
407 |
-
#: includes/i18n.php:129
|
408 |
-
msgid "ID"
|
409 |
-
msgstr "ID"
|
410 |
-
|
411 |
-
#: includes/i18n.php:130
|
412 |
-
msgid "Users"
|
413 |
-
msgstr "Brugere"
|
414 |
-
|
415 |
-
#: includes/i18n.php:131
|
416 |
-
msgid "%s Installs"
|
417 |
-
msgstr "%s installeringer"
|
418 |
-
|
419 |
-
#: includes/i18n.php:132
|
420 |
-
msgctxt "like websites"
|
421 |
-
msgid "Sites"
|
422 |
-
msgstr "Websteder"
|
423 |
-
|
424 |
-
#: includes/i18n.php:133
|
425 |
-
msgid "User ID"
|
426 |
-
msgstr "Bruger-ID"
|
427 |
-
|
428 |
-
#: includes/i18n.php:134
|
429 |
-
msgid "Site ID"
|
430 |
-
msgstr "Websteds-ID"
|
431 |
-
|
432 |
-
#: includes/i18n.php:135
|
433 |
-
msgid "Public Key"
|
434 |
-
msgstr "Offentlig nøgle"
|
435 |
-
|
436 |
-
#: includes/i18n.php:136
|
437 |
-
msgid "Secret Key"
|
438 |
-
msgstr "Privat nøgle"
|
439 |
-
|
440 |
-
#: includes/i18n.php:137
|
441 |
-
msgctxt "as secret encryption key missing"
|
442 |
-
msgid "No Secret"
|
443 |
-
msgstr "Ingen privat nøgle"
|
444 |
-
|
445 |
-
#: includes/i18n.php:138
|
446 |
-
msgid "No ID"
|
447 |
-
msgstr "Intet ID"
|
448 |
-
|
449 |
-
#: includes/i18n.php:139
|
450 |
-
msgctxt "as synchronize license"
|
451 |
-
msgid "Sync License"
|
452 |
-
msgstr "Synkroniser licens"
|
453 |
-
|
454 |
-
#: includes/i18n.php:140
|
455 |
-
msgctxt "as synchronize"
|
456 |
-
msgid "Sync"
|
457 |
-
msgstr "Synkroniser"
|
458 |
-
|
459 |
-
#: includes/i18n.php:141
|
460 |
-
msgid "Activate License"
|
461 |
-
msgstr "Aktiver licens"
|
462 |
-
|
463 |
-
#: includes/i18n.php:142
|
464 |
-
msgid "Activate Free Version"
|
465 |
-
msgstr "Aktiver gratis version"
|
466 |
-
|
467 |
-
#: includes/i18n.php:143
|
468 |
-
msgid "Please enter the license key that you received in the email right after the purchase:"
|
469 |
-
msgstr "Please enter the license key that you received in the email right after the purchase:"
|
470 |
-
|
471 |
-
#: includes/i18n.php:144
|
472 |
-
msgid "Activating license..."
|
473 |
-
msgstr "Aktiverer licens..."
|
474 |
-
|
475 |
-
#: includes/i18n.php:145
|
476 |
-
msgid "Change License"
|
477 |
-
msgstr "Skift licens"
|
478 |
-
|
479 |
-
#: includes/i18n.php:146
|
480 |
-
msgid "Update License"
|
481 |
-
msgstr "Opdater licens"
|
482 |
-
|
483 |
-
#: includes/i18n.php:147
|
484 |
-
msgid "Deactivate License"
|
485 |
-
msgstr "Deaktiver licens"
|
486 |
-
|
487 |
-
#: includes/i18n.php:148
|
488 |
-
msgid "Activate"
|
489 |
-
msgstr "Aktiver"
|
490 |
-
|
491 |
-
#: includes/i18n.php:149
|
492 |
-
msgid "Deactivate"
|
493 |
-
msgstr "Deaktiver"
|
494 |
-
|
495 |
-
#: includes/i18n.php:150
|
496 |
-
msgid "Skip & Deactivate"
|
497 |
-
msgstr "Spring over & deaktiver"
|
498 |
-
|
499 |
-
#: includes/i18n.php:151
|
500 |
-
msgid "Skip & %s"
|
501 |
-
msgstr "Spring over & %s"
|
502 |
-
|
503 |
-
#: includes/i18n.php:152
|
504 |
-
msgid "No - just deactivate"
|
505 |
-
msgstr "Nej - bare deaktiver"
|
506 |
-
|
507 |
-
#: includes/i18n.php:153
|
508 |
-
msgid "Yes - do your thing"
|
509 |
-
msgstr "Yes - do your thing"
|
510 |
-
|
511 |
-
#: includes/i18n.php:154
|
512 |
-
msgctxt "active mode"
|
513 |
-
msgid "Active"
|
514 |
-
msgstr "Aktiv"
|
515 |
-
|
516 |
-
#: includes/i18n.php:155
|
517 |
-
msgctxt "is active mode?"
|
518 |
-
msgid "Is Active"
|
519 |
-
msgstr "Er aktiv"
|
520 |
-
|
521 |
-
#: includes/i18n.php:156
|
522 |
-
msgid "Install Now"
|
523 |
-
msgstr "Installer nu"
|
524 |
-
|
525 |
-
#: includes/i18n.php:157
|
526 |
-
msgid "Install Update Now"
|
527 |
-
msgstr "Installer opdatering nu"
|
528 |
-
|
529 |
-
#: includes/i18n.php:158
|
530 |
-
msgid "More information about %s"
|
531 |
-
msgstr "Mere information om %s"
|
532 |
-
|
533 |
-
#: includes/i18n.php:159
|
534 |
-
msgid "Localhost"
|
535 |
-
msgstr "Localhost"
|
536 |
-
|
537 |
-
#: includes/i18n.php:160
|
538 |
-
msgctxt "as activate Professional plan"
|
539 |
-
msgid "Activate %s Plan"
|
540 |
-
msgstr "Aktiver %s plan"
|
541 |
-
|
542 |
-
#: includes/i18n.php:161
|
543 |
-
msgctxt "as 5 licenses left"
|
544 |
-
msgid "%s left"
|
545 |
-
msgstr "%s tilbage"
|
546 |
-
|
547 |
-
#: includes/i18n.php:162
|
548 |
-
msgid "Last license"
|
549 |
-
msgstr "Seneste license"
|
550 |
-
|
551 |
-
#: includes/i18n.php:163
|
552 |
-
msgid "What is your %s?"
|
553 |
-
msgstr "What is your %s?"
|
554 |
-
|
555 |
-
#: includes/i18n.php:164
|
556 |
-
msgid "Activate this add-on"
|
557 |
-
msgstr "Aktiver denne tilføjelse"
|
558 |
-
|
559 |
-
#: includes/i18n.php:165
|
560 |
-
msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
561 |
-
msgstr "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
562 |
-
|
563 |
-
#: includes/i18n.php:166
|
564 |
-
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?"
|
565 |
-
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?"
|
566 |
-
|
567 |
-
#: includes/i18n.php:167
|
568 |
-
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?"
|
569 |
-
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?"
|
570 |
-
|
571 |
-
#: includes/i18n.php:168
|
572 |
-
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
573 |
-
msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
574 |
-
|
575 |
-
#: includes/i18n.php:169
|
576 |
-
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
577 |
-
msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
578 |
-
|
579 |
-
#: includes/i18n.php:170
|
580 |
-
msgid "You can still enjoy all %s features but you will not have access to %s updates and support."
|
581 |
-
msgstr "You can still enjoy all %s features but you will not have access to %s updates and support."
|
582 |
-
|
583 |
-
#: includes/i18n.php:171
|
584 |
-
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
585 |
-
msgstr "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
586 |
-
|
587 |
-
#: includes/i18n.php:172
|
588 |
-
msgid "Are you sure you want to proceed?"
|
589 |
-
msgstr "Er du sikker på, du vil fortsætte?"
|
590 |
-
|
591 |
-
#: includes/i18n.php:175
|
592 |
-
msgid "Add Ons for %s"
|
593 |
-
msgstr "Tilføjelser til %s"
|
594 |
-
|
595 |
-
#: includes/i18n.php:176
|
596 |
-
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."
|
597 |
-
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."
|
598 |
-
|
599 |
-
#: includes/i18n.php:178
|
600 |
-
msgid "Anonymous feedback"
|
601 |
-
msgstr "Anonym feedback"
|
602 |
-
|
603 |
-
#: includes/i18n.php:179
|
604 |
-
msgid "Quick feedback"
|
605 |
-
msgstr "Hurtig feedback"
|
606 |
-
|
607 |
-
#: includes/i18n.php:180
|
608 |
-
msgid "If you have a moment, please let us know why you are %s"
|
609 |
-
msgstr "If you have a moment, please let us know why you are %s"
|
610 |
-
|
611 |
-
#: includes/i18n.php:181
|
612 |
-
msgid "deactivating"
|
613 |
-
msgstr "deactivating"
|
614 |
-
|
615 |
-
#: includes/i18n.php:182
|
616 |
-
msgid "Deactivation"
|
617 |
-
msgstr "Deactivation"
|
618 |
-
|
619 |
-
#: includes/i18n.php:183
|
620 |
-
msgid "Theme Switch"
|
621 |
-
msgstr "Theme Switch"
|
622 |
-
|
623 |
-
#: includes/i18n.php:184
|
624 |
-
msgid "switching"
|
625 |
-
msgstr "switching"
|
626 |
-
|
627 |
-
#: includes/i18n.php:185
|
628 |
-
msgid "Switch"
|
629 |
-
msgstr "Switch"
|
630 |
-
|
631 |
-
#: includes/i18n.php:186
|
632 |
-
msgid "Activate %s"
|
633 |
-
msgstr "Activate %s"
|
634 |
-
|
635 |
-
#: includes/i18n.php:187
|
636 |
-
msgid "Yes - %s"
|
637 |
-
msgstr "Yes - %s"
|
638 |
-
|
639 |
-
#: includes/i18n.php:188
|
640 |
-
msgid "Submit & %s"
|
641 |
-
msgstr "Submit & %s"
|
642 |
-
|
643 |
-
#: includes/i18n.php:189
|
644 |
-
msgid "Cancel"
|
645 |
-
msgstr "Annuller"
|
646 |
-
|
647 |
-
#: includes/i18n.php:190
|
648 |
-
msgid "I no longer need the %s"
|
649 |
-
msgstr "I no longer need the %s"
|
650 |
-
|
651 |
-
#: includes/i18n.php:191
|
652 |
-
msgid "I found a better %s"
|
653 |
-
msgstr "I found a better %s"
|
654 |
-
|
655 |
-
#: includes/i18n.php:192
|
656 |
-
msgid "I only needed the %s for a short period"
|
657 |
-
msgstr "I only needed the %s for a short period"
|
658 |
-
|
659 |
-
#: includes/i18n.php:193
|
660 |
-
msgid "The %s broke my site"
|
661 |
-
msgstr "The %s broke my site"
|
662 |
-
|
663 |
-
#: includes/i18n.php:194
|
664 |
-
msgid "The %s suddenly stopped working"
|
665 |
-
msgstr "The %s suddenly stopped working"
|
666 |
-
|
667 |
-
#: includes/i18n.php:195
|
668 |
-
msgid "I can't pay for it anymore"
|
669 |
-
msgstr "Jeg kan ikke længere betale for det"
|
670 |
-
|
671 |
-
#: includes/i18n.php:196
|
672 |
-
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
673 |
-
msgstr "Det er en midlertidig deaktivering. Jeg prøver at fejlfinde et problem."
|
674 |
-
|
675 |
-
#: includes/i18n.php:197
|
676 |
-
msgid "It's a temporary %s. I'm just debugging an issue."
|
677 |
-
msgstr "It's a temporary %s. I'm just debugging an issue."
|
678 |
-
|
679 |
-
#: includes/i18n.php:198
|
680 |
-
msgctxt ""
|
681 |
-
msgid "Other"
|
682 |
-
msgstr "Other"
|
683 |
-
|
684 |
-
#: includes/i18n.php:200
|
685 |
-
msgid "Kindly tell us the reason so we can improve."
|
686 |
-
msgstr "Fortæl os venligst årsagen, så vi kan forbedre det."
|
687 |
-
|
688 |
-
#: includes/i18n.php:201
|
689 |
-
msgid "What's the %s's name?"
|
690 |
-
msgstr "What's the %s's name?"
|
691 |
-
|
692 |
-
#: includes/i18n.php:202
|
693 |
-
msgid "What price would you feel comfortable paying?"
|
694 |
-
msgstr "What price would you feel comfortable paying?"
|
695 |
-
|
696 |
-
#: includes/i18n.php:203
|
697 |
-
msgid "I couldn't understand how to make it work"
|
698 |
-
msgstr "Jeg forstod ikke, hvordan jeg skulle få det til at fungere."
|
699 |
-
|
700 |
-
#: includes/i18n.php:204
|
701 |
-
msgid "The %s is great, but I need specific feature that you don't support"
|
702 |
-
msgstr "The %s is great, but I need specific feature that you don't support"
|
703 |
-
|
704 |
-
#: includes/i18n.php:205
|
705 |
-
msgid "The %s is not working"
|
706 |
-
msgstr "The %s is not working"
|
707 |
-
|
708 |
-
#: includes/i18n.php:206
|
709 |
-
msgid "It's not what I was looking for"
|
710 |
-
msgstr "Det er ikke, hvad jeg søgte"
|
711 |
-
|
712 |
-
#: includes/i18n.php:207
|
713 |
-
msgid "The %s didn't work as expected"
|
714 |
-
msgstr "The %s didn't work as expected"
|
715 |
-
|
716 |
-
#: includes/i18n.php:208
|
717 |
-
msgid "What feature?"
|
718 |
-
msgstr "Hvilken feature?"
|
719 |
-
|
720 |
-
#: includes/i18n.php:209
|
721 |
-
msgid "Kindly share what didn't work so we can fix it for future users..."
|
722 |
-
msgstr "Kindly share what didn't work so we can fix it for future users..."
|
723 |
-
|
724 |
-
#: includes/i18n.php:210
|
725 |
-
msgid "What you've been looking for?"
|
726 |
-
msgstr "What you've been looking for?"
|
727 |
-
|
728 |
-
#: includes/i18n.php:211
|
729 |
-
msgid "What did you expect?"
|
730 |
-
msgstr "Hvad forventede du?"
|
731 |
-
|
732 |
-
#: includes/i18n.php:212
|
733 |
-
msgid "The %s didn't work"
|
734 |
-
msgstr "The %s didn't work"
|
735 |
-
|
736 |
-
#: includes/i18n.php:213
|
737 |
-
msgid "I don't like to share my information with you"
|
738 |
-
msgstr "I don't like to share my information with you"
|
739 |
-
|
740 |
-
#: includes/i18n.php:214
|
741 |
-
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
742 |
-
msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
743 |
-
|
744 |
-
#: includes/i18n.php:218
|
745 |
-
msgctxt "greeting"
|
746 |
-
msgid "Hey %s,"
|
747 |
-
msgstr "Hey %s,"
|
748 |
-
|
749 |
-
#: includes/i18n.php:219
|
750 |
-
msgctxt "a greeting. E.g. Thanks John!"
|
751 |
-
msgid "Thanks %s!"
|
752 |
-
msgstr "Tak %s!"
|
753 |
-
|
754 |
-
#: includes/i18n.php:220
|
755 |
-
msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
756 |
-
msgstr "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
757 |
-
|
758 |
-
#: includes/i18n.php:221
|
759 |
-
msgid "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
760 |
-
msgstr "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
761 |
-
|
762 |
-
#: includes/i18n.php:222
|
763 |
-
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."
|
764 |
-
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."
|
765 |
-
|
766 |
-
#: includes/i18n.php:223
|
767 |
-
msgid "complete the install"
|
768 |
-
msgstr "færdiggør installeringen"
|
769 |
-
|
770 |
-
#: includes/i18n.php:224
|
771 |
-
msgid "start the trial"
|
772 |
-
msgstr "start prøveperioden"
|
773 |
-
|
774 |
-
#: includes/i18n.php:225
|
775 |
-
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
776 |
-
msgstr "Thanks for purchasing %s! To get started, please enter your license key:"
|
777 |
-
|
778 |
-
#: includes/i18n.php:226
|
779 |
-
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."
|
780 |
-
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."
|
781 |
-
|
782 |
-
#: includes/i18n.php:227
|
783 |
-
msgid "What permissions are being granted?"
|
784 |
-
msgstr "Hvilke tilladelser bliver givet?"
|
785 |
-
|
786 |
-
#: includes/i18n.php:228
|
787 |
-
msgid "Your Profile Overview"
|
788 |
-
msgstr "Overblik af din profil"
|
789 |
-
|
790 |
-
#: includes/i18n.php:229
|
791 |
-
msgid "Name and email address"
|
792 |
-
msgstr "Navn og e-mailadresse"
|
793 |
-
|
794 |
-
#: includes/i18n.php:230
|
795 |
-
msgid "Your Site Overview"
|
796 |
-
msgstr "Overblik af dit websted"
|
797 |
-
|
798 |
-
#: includes/i18n.php:231
|
799 |
-
msgid "Site URL, WP version, PHP info, plugins & themes"
|
800 |
-
msgstr "Websteds-URL, WP version, PHP info, plugins og temaer"
|
801 |
-
|
802 |
-
#: includes/i18n.php:232
|
803 |
-
msgid "Current %s Events"
|
804 |
-
msgstr "Current %s Events"
|
805 |
-
|
806 |
-
#: includes/i18n.php:233
|
807 |
-
msgid "Activation, deactivation and uninstall"
|
808 |
-
msgstr "Aktivering, deaktivering og afinstallering"
|
809 |
-
|
810 |
-
#: includes/i18n.php:234
|
811 |
-
msgid "Plugins & Themes"
|
812 |
-
msgstr "Plugins & Temaer"
|
813 |
-
|
814 |
-
#: includes/i18n.php:235
|
815 |
-
msgid "Titles, versions and state."
|
816 |
-
msgstr "Titler, versioner og tilstand."
|
817 |
-
|
818 |
-
#: includes/i18n.php:236
|
819 |
-
msgid "Admin Notices"
|
820 |
-
msgstr "Admin Notices"
|
821 |
-
|
822 |
-
#: includes/i18n.php:237
|
823 |
-
msgid "Newsletter"
|
824 |
-
msgstr "Nyhedsbrev"
|
825 |
-
|
826 |
-
#: includes/i18n.php:238
|
827 |
-
msgid "Updates, announcements, marketing, no spam"
|
828 |
-
msgstr "Updates, announcements, marketing, no spam"
|
829 |
-
|
830 |
-
#: includes/i18n.php:239
|
831 |
-
msgid "Privacy Policy"
|
832 |
-
msgstr "Privatlivspolitik"
|
833 |
-
|
834 |
-
#: includes/i18n.php:240
|
835 |
-
msgid "Terms of Service"
|
836 |
-
msgstr "Servicevilkår"
|
837 |
-
|
838 |
-
#: includes/i18n.php:241
|
839 |
-
msgctxt "as activating plugin"
|
840 |
-
msgid "Activating"
|
841 |
-
msgstr "Aktiverer"
|
842 |
-
|
843 |
-
#: includes/i18n.php:242
|
844 |
-
msgctxt "as in the process of sending an email"
|
845 |
-
msgid "Sending email"
|
846 |
-
msgstr "Sender e-mail"
|
847 |
-
|
848 |
-
#: includes/i18n.php:243
|
849 |
-
msgctxt "button label"
|
850 |
-
msgid "Allow & Continue"
|
851 |
-
msgstr "Tillad & Fortsæt"
|
852 |
-
|
853 |
-
#: includes/i18n.php:244
|
854 |
-
msgctxt "button label"
|
855 |
-
msgid "Agree & Activate License"
|
856 |
-
msgstr "Accepter & aktiver licens"
|
857 |
-
|
858 |
-
#: includes/i18n.php:245
|
859 |
-
msgctxt "verb"
|
860 |
-
msgid "Skip"
|
861 |
-
msgstr "Spring over"
|
862 |
-
|
863 |
-
#: includes/i18n.php:246
|
864 |
-
msgid "Click here to use the plugin anonymously"
|
865 |
-
msgstr "Klik her for at benytte pluginnet anonymt"
|
866 |
-
|
867 |
-
#: includes/i18n.php:247
|
868 |
-
msgid "Re-send activation email"
|
869 |
-
msgstr "Gensend e-mail om aktivering"
|
870 |
-
|
871 |
-
#: includes/i18n.php:248
|
872 |
-
msgid "License key"
|
873 |
-
msgstr "Licensnøgle"
|
874 |
-
|
875 |
-
#: includes/i18n.php:249
|
876 |
-
msgid "Send License Key"
|
877 |
-
msgstr "Send licensnøgle"
|
878 |
-
|
879 |
-
#: includes/i18n.php:250
|
880 |
-
msgid "Sending license key"
|
881 |
-
msgstr "Sender licensnøgle"
|
882 |
-
|
883 |
-
#: includes/i18n.php:251
|
884 |
-
msgid "Have a license key?"
|
885 |
-
msgstr "Har du en licensnøgle?"
|
886 |
-
|
887 |
-
#: includes/i18n.php:252
|
888 |
-
msgid "Don't have a license key?"
|
889 |
-
msgstr "Har du ikke en licensnøgle?"
|
890 |
-
|
891 |
-
#: includes/i18n.php:253
|
892 |
-
msgid "Can't find your license key?"
|
893 |
-
msgstr "Kan du ikke finde din licensnøgle?"
|
894 |
-
|
895 |
-
#: includes/i18n.php:254
|
896 |
-
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
897 |
-
msgstr "We couldn't find your email address in the system, are you sure it's the right address?"
|
898 |
-
|
899 |
-
#: includes/i18n.php:255
|
900 |
-
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
901 |
-
msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
902 |
-
|
903 |
-
#: includes/i18n.php:256
|
904 |
-
msgid "Opt In"
|
905 |
-
msgstr "Tilmeld"
|
906 |
-
|
907 |
-
#: includes/i18n.php:257
|
908 |
-
msgid "Opt Out"
|
909 |
-
msgstr "Frameld"
|
910 |
-
|
911 |
-
#: includes/i18n.php:258
|
912 |
-
msgid "On second thought - I want to continue helping"
|
913 |
-
msgstr "Ved nærmere eftertanke - Jeg vil fortsætte med at hjælpe"
|
914 |
-
|
915 |
-
#: includes/i18n.php:259
|
916 |
-
msgid "Opting out..."
|
917 |
-
msgstr "Framelder..."
|
918 |
-
|
919 |
-
#: includes/i18n.php:260
|
920 |
-
msgid "Opting in..."
|
921 |
-
msgstr "Tilmelder..."
|
922 |
-
|
923 |
-
#: includes/i18n.php:261
|
924 |
-
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
925 |
-
msgstr "We appreciate your help in making the %s better by letting us track some usage data."
|
926 |
-
|
927 |
-
#: includes/i18n.php:262
|
928 |
-
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."
|
929 |
-
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."
|
930 |
-
|
931 |
-
#: includes/i18n.php:263
|
932 |
-
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
933 |
-
msgstr "Ved at klikke \"Frameld\" vil vi ikke længere sende data fra %s til %s."
|
934 |
-
|
935 |
-
#: includes/i18n.php:267
|
936 |
-
msgid "Screenshots"
|
937 |
-
msgstr "Skærmbilleder"
|
938 |
-
|
939 |
-
#: includes/i18n.php:268
|
940 |
-
msgid "Click to view full-size screenshot %d"
|
941 |
-
msgstr "Click to view full-size screenshot %d"
|
942 |
-
|
943 |
-
#: includes/i18n.php:272
|
944 |
-
msgid "Freemius Debug"
|
945 |
-
msgstr "Freemius Debug"
|
946 |
-
|
947 |
-
#: includes/i18n.php:273
|
948 |
-
msgctxt "as turned on"
|
949 |
-
msgid "On"
|
950 |
-
msgstr "Til"
|
951 |
-
|
952 |
-
#: includes/i18n.php:274
|
953 |
-
msgctxt "as turned off"
|
954 |
-
msgid "Off"
|
955 |
-
msgstr "Fra"
|
956 |
-
|
957 |
-
#: includes/i18n.php:275
|
958 |
-
msgctxt "as code debugging"
|
959 |
-
msgid "Debugging"
|
960 |
-
msgstr "Fejlfinding"
|
961 |
-
|
962 |
-
#: includes/i18n.php:276
|
963 |
-
msgid "Freemius State"
|
964 |
-
msgstr "Freemius tilstand"
|
965 |
-
|
966 |
-
#: includes/i18n.php:277
|
967 |
-
msgctxt "as connection was successful"
|
968 |
-
msgid "Connected"
|
969 |
-
msgstr "Forbundet"
|
970 |
-
|
971 |
-
#: includes/i18n.php:278
|
972 |
-
msgctxt "as connection blocked"
|
973 |
-
msgid "Blocked"
|
974 |
-
msgstr "Blokeret"
|
975 |
-
|
976 |
-
#: includes/i18n.php:279
|
977 |
-
msgctxt "as application program interface"
|
978 |
-
msgid "API"
|
979 |
-
msgstr "API"
|
980 |
-
|
981 |
-
#: includes/i18n.php:280
|
982 |
-
msgctxt "as software development kit versions"
|
983 |
-
msgid "SDK"
|
984 |
-
msgstr "SDK"
|
985 |
-
|
986 |
-
#: includes/i18n.php:281
|
987 |
-
msgctxt "as software development kit versions"
|
988 |
-
msgid "SDK Versions"
|
989 |
-
msgstr "SDK-versioner"
|
990 |
-
|
991 |
-
#: includes/i18n.php:282
|
992 |
-
msgctxt "as plugin folder path"
|
993 |
-
msgid "Plugin Path"
|
994 |
-
msgstr "Plugin-sti"
|
995 |
-
|
996 |
-
#: includes/i18n.php:283
|
997 |
-
msgctxt "as sdk path"
|
998 |
-
msgid "SDK Path"
|
999 |
-
msgstr "SDK-sti"
|
1000 |
-
|
1001 |
-
#: includes/i18n.php:284
|
1002 |
-
msgid "Add Ons of Plugin %s"
|
1003 |
-
msgstr "Tilføjelser til plugin %s"
|
1004 |
-
|
1005 |
-
#: includes/i18n.php:285
|
1006 |
-
msgid "Are you sure you want to delete all Freemius data?"
|
1007 |
-
msgstr "Er du sikker på, du vil slette al Freemius data?"
|
1008 |
-
|
1009 |
-
#: includes/i18n.php:286
|
1010 |
-
msgid "Actions"
|
1011 |
-
msgstr "Handlinger"
|
1012 |
-
|
1013 |
-
#: includes/i18n.php:287
|
1014 |
-
msgid "Delete All Accounts"
|
1015 |
-
msgstr "Slet alle konti"
|
1016 |
-
|
1017 |
-
#: includes/i18n.php:288
|
1018 |
-
msgid "Start Fresh"
|
1019 |
-
msgstr "Start forfra"
|
1020 |
-
|
1021 |
-
#: includes/i18n.php:289
|
1022 |
-
msgid "Clear API Cache"
|
1023 |
-
msgstr "Ryd API-cache"
|
1024 |
-
|
1025 |
-
#: includes/i18n.php:290
|
1026 |
-
msgid "Sync Data From Server"
|
1027 |
-
msgstr "Synkroniser data fra server"
|
1028 |
-
|
1029 |
-
#: includes/i18n.php:291
|
1030 |
-
msgid "Scheduled Crons"
|
1031 |
-
msgstr "Planlagte cron jobs"
|
1032 |
-
|
1033 |
-
#: includes/i18n.php:292
|
1034 |
-
msgid "Cron Type"
|
1035 |
-
msgstr "Cron Type"
|
1036 |
-
|
1037 |
-
#: includes/i18n.php:293
|
1038 |
-
msgid "Plugins & Themes Sync"
|
1039 |
-
msgstr "Synkronisering af plugins og temaer"
|
1040 |
-
|
1041 |
-
#: includes/i18n.php:294
|
1042 |
-
msgid "%s Licenses"
|
1043 |
-
msgstr "%s Licenses"
|
1044 |
-
|
1045 |
-
#: includes/i18n.php:295
|
1046 |
-
msgid "Debug Log"
|
1047 |
-
msgstr "Fejlfindingslog"
|
1048 |
-
|
1049 |
-
#: includes/i18n.php:296
|
1050 |
-
msgid "All"
|
1051 |
-
msgstr "Alle"
|
1052 |
-
|
1053 |
-
#: includes/i18n.php:297
|
1054 |
-
msgid "File"
|
1055 |
-
msgstr "Fil"
|
1056 |
-
|
1057 |
-
#: includes/i18n.php:298
|
1058 |
-
msgid "Function"
|
1059 |
-
msgstr "Funktion"
|
1060 |
-
|
1061 |
-
#: includes/i18n.php:299
|
1062 |
-
msgid "Process ID"
|
1063 |
-
msgstr "Proces-ID"
|
1064 |
-
|
1065 |
-
#: includes/i18n.php:300
|
1066 |
-
msgid "Logger"
|
1067 |
-
msgstr "Logger"
|
1068 |
-
|
1069 |
-
#: includes/i18n.php:301
|
1070 |
-
msgid "Message"
|
1071 |
-
msgstr "Besked"
|
1072 |
-
|
1073 |
-
#: includes/i18n.php:302
|
1074 |
-
msgid "Download"
|
1075 |
-
msgstr "Download"
|
1076 |
-
|
1077 |
-
#: includes/i18n.php:303
|
1078 |
-
msgid "Filter"
|
1079 |
-
msgstr "Filter"
|
1080 |
-
|
1081 |
-
#: includes/i18n.php:304
|
1082 |
-
msgid "Type"
|
1083 |
-
msgstr "Type"
|
1084 |
-
|
1085 |
-
#: includes/i18n.php:305
|
1086 |
-
msgid "All Types"
|
1087 |
-
msgstr "Alle typer"
|
1088 |
-
|
1089 |
-
#: includes/i18n.php:306
|
1090 |
-
msgid "All Requests"
|
1091 |
-
msgstr "Alle forespørgsler"
|
1092 |
-
|
1093 |
-
#: includes/i18n.php:310
|
1094 |
-
msgctxt "as congratulations"
|
1095 |
-
msgid "Congrats"
|
1096 |
-
msgstr "Tillykke"
|
1097 |
-
|
1098 |
-
#: includes/i18n.php:311
|
1099 |
-
msgctxt "exclamation"
|
1100 |
-
msgid "Oops"
|
1101 |
-
msgstr "Ups"
|
1102 |
-
|
1103 |
-
#: includes/i18n.php:312
|
1104 |
-
msgctxt "interjection expressing joy or exuberance"
|
1105 |
-
msgid "Yee-haw"
|
1106 |
-
msgstr "Yee-haw"
|
1107 |
-
|
1108 |
-
#: includes/i18n.php:313
|
1109 |
-
msgctxt ""
|
1110 |
-
msgid "W00t"
|
1111 |
-
msgstr "W00t"
|
1112 |
-
|
1113 |
-
#: includes/i18n.php:315
|
1114 |
-
msgctxt "a positive response"
|
1115 |
-
msgid "Right on"
|
1116 |
-
msgstr "Sådan"
|
1117 |
-
|
1118 |
-
#: includes/i18n.php:316
|
1119 |
-
msgctxt ""
|
1120 |
-
msgid "Hmm"
|
1121 |
-
msgstr "Hmm"
|
1122 |
-
|
1123 |
-
#: includes/i18n.php:318
|
1124 |
-
msgid "O.K"
|
1125 |
-
msgstr "O.K"
|
1126 |
-
|
1127 |
-
#: includes/i18n.php:319
|
1128 |
-
msgctxt "exclamation"
|
1129 |
-
msgid "Hey"
|
1130 |
-
msgstr "Hey"
|
1131 |
-
|
1132 |
-
#: includes/i18n.php:320
|
1133 |
-
msgctxt "advance notice of something that will need attention."
|
1134 |
-
msgid "Heads up"
|
1135 |
-
msgstr "Se her"
|
1136 |
-
|
1137 |
-
#: includes/i18n.php:325
|
1138 |
-
msgid "Seems like you got the latest release."
|
1139 |
-
msgstr "Det ser ud til, at du har den seneste udgivelse."
|
1140 |
-
|
1141 |
-
#: includes/i18n.php:326
|
1142 |
-
msgid "You are all good!"
|
1143 |
-
msgstr "Det var det!"
|
1144 |
-
|
1145 |
-
#: includes/i18n.php:327
|
1146 |
-
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1147 |
-
msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1148 |
-
|
1149 |
-
#: includes/i18n.php:328
|
1150 |
-
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
1151 |
-
msgstr "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
1152 |
-
|
1153 |
-
#: includes/i18n.php:329
|
1154 |
-
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1155 |
-
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1156 |
-
|
1157 |
-
#: includes/i18n.php:330
|
1158 |
-
msgid "Your name was successfully updated."
|
1159 |
-
msgstr "Dit navn er blevet opdateret."
|
1160 |
-
|
1161 |
-
#: includes/i18n.php:331
|
1162 |
-
msgid "You have successfully updated your %s."
|
1163 |
-
msgstr "Opdatering af %s blev gennemført."
|
1164 |
-
|
1165 |
-
#: includes/i18n.php:332
|
1166 |
-
msgid "Please provide your full name."
|
1167 |
-
msgstr "Indtast venligst dit fulde navn."
|
1168 |
-
|
1169 |
-
#: includes/i18n.php:333
|
1170 |
-
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1171 |
-
msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1172 |
-
|
1173 |
-
#: includes/i18n.php:334
|
1174 |
-
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1175 |
-
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1176 |
-
|
1177 |
-
#: includes/i18n.php:335
|
1178 |
-
msgid "No credit card required"
|
1179 |
-
msgstr "Betalingskort ikke påkrævet"
|
1180 |
-
|
1181 |
-
#: includes/i18n.php:336
|
1182 |
-
msgid "Premium %s version was successfully activated."
|
1183 |
-
msgstr "Premium %s version was successfully activated."
|
1184 |
-
|
1185 |
-
#: includes/i18n.php:337
|
1186 |
-
msgid "The upgrade of %s was successfully completed."
|
1187 |
-
msgstr "Opgraderingen af %s blev fuldendt."
|
1188 |
-
|
1189 |
-
#: includes/i18n.php:338
|
1190 |
-
msgid "Your account was successfully activated with the %s plan."
|
1191 |
-
msgstr "Din konto blev aktiveret med planen %s."
|
1192 |
-
|
1193 |
-
#: includes/i18n.php:339
|
1194 |
-
msgid "Download the latest %s version now"
|
1195 |
-
msgstr "Download den seneste version af %s nu"
|
1196 |
-
|
1197 |
-
#: includes/i18n.php:340
|
1198 |
-
msgid "Please follow these steps to complete the upgrade"
|
1199 |
-
msgstr "Følg venligst disse trin for at færdiggøre opgraderingen"
|
1200 |
-
|
1201 |
-
#: includes/i18n.php:341
|
1202 |
-
msgid "Download the latest %s version"
|
1203 |
-
msgstr "Download den seneste version af %s"
|
1204 |
-
|
1205 |
-
#: includes/i18n.php:342
|
1206 |
-
msgid "Download the latest version"
|
1207 |
-
msgstr "Download den seneste version"
|
1208 |
-
|
1209 |
-
#: includes/i18n.php:343
|
1210 |
-
msgid "Deactivate the free version"
|
1211 |
-
msgstr "Deaktiver den gratis version"
|
1212 |
-
|
1213 |
-
#: includes/i18n.php:344
|
1214 |
-
msgid "Upload and activate the downloaded version"
|
1215 |
-
msgstr "Upload og aktiver den downloadede version"
|
1216 |
-
|
1217 |
-
#: includes/i18n.php:345
|
1218 |
-
msgid "How to upload and activate?"
|
1219 |
-
msgstr "Upload og aktivering, hvordan?"
|
1220 |
-
|
1221 |
-
#: includes/i18n.php:346
|
1222 |
-
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1223 |
-
msgid "%s Add-on was successfully purchased."
|
1224 |
-
msgstr "Betalingen for tilføjelsen %s blev gennemført."
|
1225 |
-
|
1226 |
-
#: includes/i18n.php:348
|
1227 |
-
msgid "Your %s Add-on plan was successfully upgraded."
|
1228 |
-
msgstr "Your %s Add-on plan was successfully upgraded."
|
1229 |
-
|
1230 |
-
#: includes/i18n.php:349
|
1231 |
-
msgid "Your email has been successfully verified - you are AWESOME!"
|
1232 |
-
msgstr "Your email has been successfully verified - you are AWESOME!"
|
1233 |
-
|
1234 |
-
#: includes/i18n.php:350
|
1235 |
-
msgid "Your plan was successfully upgraded."
|
1236 |
-
msgstr "Din plan er blevet opgraderet."
|
1237 |
-
|
1238 |
-
#: includes/i18n.php:351
|
1239 |
-
msgid "Your plan was successfully changed to %s."
|
1240 |
-
msgstr "Din plan er blevet ændret til %s."
|
1241 |
-
|
1242 |
-
#: includes/i18n.php:352
|
1243 |
-
msgid "Your license has expired. You can still continue using the free %s forever."
|
1244 |
-
msgstr "Your license has expired. You can still continue using the free %s forever."
|
1245 |
-
|
1246 |
-
#: includes/i18n.php:353
|
1247 |
-
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
1248 |
-
msgstr "Din licens er blevet annulleret. Hvis du mener, dette er en fejl, så kontakt venligst support."
|
1249 |
-
|
1250 |
-
#: includes/i18n.php:354
|
1251 |
-
msgid "Your trial has been successfully started."
|
1252 |
-
msgstr "Din prøveperiode er begyndt."
|
1253 |
-
|
1254 |
-
#: includes/i18n.php:355
|
1255 |
-
msgid "Your license was successfully activated."
|
1256 |
-
msgstr "Din licens er blevet aktiveret."
|
1257 |
-
|
1258 |
-
#: includes/i18n.php:356
|
1259 |
-
msgid "It looks like your site currently doesn't have an active license."
|
1260 |
-
msgstr "Det ser ud til, at dit websted endnu ikke har en aktiv licens."
|
1261 |
-
|
1262 |
-
#: includes/i18n.php:357
|
1263 |
-
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
1264 |
-
msgstr "Din licens blev deaktiveret, du er tilbage på planen %s."
|
1265 |
-
|
1266 |
-
#: includes/i18n.php:358
|
1267 |
-
msgid "It looks like the license deactivation failed."
|
1268 |
-
msgstr "Det ser ud til, at licens-deaktiveringen mislykkedes."
|
1269 |
-
|
1270 |
-
#: includes/i18n.php:359
|
1271 |
-
msgid "It looks like the license could not be activated."
|
1272 |
-
msgstr "Det ser ud til, at licensen ikke kunne aktiveres."
|
1273 |
-
|
1274 |
-
#: includes/i18n.php:360
|
1275 |
-
msgid "Error received from the server:"
|
1276 |
-
msgstr "Fejl modtager fra serveren:"
|
1277 |
-
|
1278 |
-
#: includes/i18n.php:361
|
1279 |
-
msgid "Your trial has expired. You can still continue using all our free features."
|
1280 |
-
msgstr "Din prøveperiode er udløbet. Du kan fortsat bruge alle vores gratis funktioner."
|
1281 |
-
|
1282 |
-
#: includes/i18n.php:362
|
1283 |
-
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
1284 |
-
msgstr "Din plan blev nedgraderet. Licensen til din %s plan vil udløbe om %s."
|
1285 |
-
|
1286 |
-
#: includes/i18n.php:363
|
1287 |
-
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1288 |
-
msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1289 |
-
|
1290 |
-
#: includes/i18n.php:364
|
1291 |
-
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1292 |
-
msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1293 |
-
|
1294 |
-
#: includes/i18n.php:365
|
1295 |
-
msgid "Your %s free trial was successfully cancelled."
|
1296 |
-
msgstr "Din gratis prøveperiode for %s er blevet annulleret."
|
1297 |
-
|
1298 |
-
#: includes/i18n.php:366
|
1299 |
-
msgctxt "%s - numeric version number"
|
1300 |
-
msgid "Version %s was released."
|
1301 |
-
msgstr "Version %s er blevet udgivet."
|
1302 |
-
|
1303 |
-
#: includes/i18n.php:367
|
1304 |
-
msgid "Please download %s."
|
1305 |
-
msgstr "Download venligst %s."
|
1306 |
-
|
1307 |
-
#: includes/i18n.php:368
|
1308 |
-
msgctxt "%s - plan name, as the latest professional version here"
|
1309 |
-
msgid "the latest %s version here"
|
1310 |
-
msgstr "den seneste version af %s her"
|
1311 |
-
|
1312 |
-
#: includes/i18n.php:370
|
1313 |
-
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1314 |
-
msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1315 |
-
|
1316 |
-
#: includes/i18n.php:371
|
1317 |
-
msgctxt "call to action"
|
1318 |
-
msgid "Start free trial"
|
1319 |
-
msgstr "Start gratis prøveperiode"
|
1320 |
-
|
1321 |
-
#: includes/i18n.php:372
|
1322 |
-
msgid "Starting trial"
|
1323 |
-
msgstr "Starter prøveperiode"
|
1324 |
-
|
1325 |
-
#: includes/i18n.php:373
|
1326 |
-
msgid "Please wait"
|
1327 |
-
msgstr "Vent venligst"
|
1328 |
-
|
1329 |
-
#: includes/i18n.php:374
|
1330 |
-
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1331 |
-
msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1332 |
-
|
1333 |
-
#: includes/i18n.php:375
|
1334 |
-
msgid "You already utilized a trial before."
|
1335 |
-
msgstr "Du har allerede brugt din prøveperiode."
|
1336 |
-
|
1337 |
-
#: includes/i18n.php:376
|
1338 |
-
msgid "You are already running the %s in a trial mode."
|
1339 |
-
msgstr "You are already running the %s in a trial mode."
|
1340 |
-
|
1341 |
-
#: includes/i18n.php:377
|
1342 |
-
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1343 |
-
msgstr "Plan %s eksisterer ikke og kan derfor ikke starte prøveperiode."
|
1344 |
-
|
1345 |
-
#: includes/i18n.php:378
|
1346 |
-
msgid "Plan %s does not support a trial period."
|
1347 |
-
msgstr "Plan %s understøtter ikke en prøveperiode."
|
1348 |
-
|
1349 |
-
#: includes/i18n.php:379
|
1350 |
-
msgid "None of the %s's plans supports a trial period."
|
1351 |
-
msgstr "None of the %s's plans supports a trial period."
|
1352 |
-
|
1353 |
-
#: includes/i18n.php:380
|
1354 |
-
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
1355 |
-
msgstr "Unexpected API error. Please contact the %s's author with the following error."
|
1356 |
-
|
1357 |
-
#: includes/i18n.php:381
|
1358 |
-
msgid "No commitment for %s days - cancel anytime!"
|
1359 |
-
msgstr "Ingen bindinger i %s dage - annuller når som helst!"
|
1360 |
-
|
1361 |
-
#: includes/i18n.php:382
|
1362 |
-
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."
|
1363 |
-
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."
|
1364 |
-
|
1365 |
-
#: includes/i18n.php:383
|
1366 |
-
msgid "Couldn't activate %s."
|
1367 |
-
msgstr "Kunne ikke aktivere %s."
|
1368 |
-
|
1369 |
-
#: includes/i18n.php:384
|
1370 |
-
msgid "Please contact us with the following message:"
|
1371 |
-
msgstr "Kontakt os venligst med følgende besked:"
|
1372 |
-
|
1373 |
-
#: includes/i18n.php:385
|
1374 |
-
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."
|
1375 |
-
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."
|
1376 |
-
|
1377 |
-
#: includes/i18n.php:386
|
1378 |
-
msgid "Please contact us here"
|
1379 |
-
msgstr "Kontakt os her"
|
1380 |
-
|
1381 |
-
#: includes/i18n.php:387
|
1382 |
-
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1383 |
-
msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1384 |
-
|
1385 |
-
#: includes/i18n.php:390
|
1386 |
-
msgid "From unknown reason, the API connectivity test failed."
|
1387 |
-
msgstr "From unknown reason, the API connectivity test failed."
|
1388 |
-
|
1389 |
-
#: includes/i18n.php:391
|
1390 |
-
msgid "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
|
1391 |
-
msgstr "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
|
1392 |
-
|
1393 |
-
#: includes/i18n.php:392
|
1394 |
-
msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server."
|
1395 |
-
msgstr "We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server."
|
1396 |
-
|
1397 |
-
#: includes/i18n.php:393
|
1398 |
-
msgid "Disabled method(s):"
|
1399 |
-
msgstr "Disabled method(s):"
|
1400 |
-
|
1401 |
-
#: includes/i18n.php:394
|
1402 |
-
msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1403 |
-
msgstr "Af en ukendt årsag blokerer CloudFlare, vores firewall, forbindelsen."
|
1404 |
-
|
1405 |
-
#: includes/i18n.php:395
|
1406 |
-
msgctxt "as pluginX requires an access to our API"
|
1407 |
-
msgid "%s requires an access to our API."
|
1408 |
-
msgstr "%s påkræver adgang til vores API."
|
1409 |
-
|
1410 |
-
#: includes/i18n.php:397
|
1411 |
-
msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
|
1412 |
-
msgstr "Det ser ud til, at din server benytter Squid ACL (access control lists), som blokerer forbindelsen."
|
1413 |
-
|
1414 |
-
#: includes/i18n.php:398
|
1415 |
-
msgid "I don't know what is Squid or ACL, help me!"
|
1416 |
-
msgstr "Jeg ved ikke hvad Squid eller ACL er. Hjælp mig!"
|
1417 |
-
|
1418 |
-
#: includes/i18n.php399, includes/i18n.php:403
|
1419 |
-
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."
|
1420 |
-
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."
|
1421 |
-
|
1422 |
-
#: includes/i18n.php:400
|
1423 |
-
msgid "I'm a system administrator"
|
1424 |
-
msgstr "Jeg er en system-administrator"
|
1425 |
-
|
1426 |
-
#: includes/i18n.php:401
|
1427 |
-
msgid "Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again."
|
1428 |
-
msgstr "Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again."
|
1429 |
-
|
1430 |
-
#: includes/i18n.php:402
|
1431 |
-
msgid "I don't know what is cURL or how to install it, help me!"
|
1432 |
-
msgstr "Jeg ved ikke hvad cURL er, eller hvordan jeg installerer det. Hjælp mig!"
|
1433 |
-
|
1434 |
-
#: includes/i18n.php:404
|
1435 |
-
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."
|
1436 |
-
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."
|
1437 |
-
|
1438 |
-
#: includes/i18n.php:405
|
1439 |
-
msgid "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
|
1440 |
-
msgstr "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
|
1441 |
-
|
1442 |
-
#: includes/i18n.php:406
|
1443 |
-
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1444 |
-
msgstr "Vi beklager ulejligheden, og vi er her for at hjælpe, hvis du giver os chancen."
|
1445 |
-
|
1446 |
-
#: includes/i18n.php:407
|
1447 |
-
msgid "Yes - I'm giving you a chance to fix it"
|
1448 |
-
msgstr "Ja - jeg giver jer en chance for at rette det"
|
1449 |
-
|
1450 |
-
#: includes/i18n.php:408
|
1451 |
-
msgid "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
|
1452 |
-
msgstr "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
|
1453 |
-
|
1454 |
-
#: includes/i18n.php:409
|
1455 |
-
msgid "Let's try your previous version"
|
1456 |
-
msgstr "Lad os prøve din forrige version"
|
1457 |
-
|
1458 |
-
#: includes/i18n.php:410
|
1459 |
-
msgid "Uninstall this version and install the previous one."
|
1460 |
-
msgstr "Afinstaller denne version og installer den forrige."
|
1461 |
-
|
1462 |
-
#: includes/i18n.php:411
|
1463 |
-
msgid "That's exhausting, please deactivate"
|
1464 |
-
msgstr "Det er udmattende, deaktiver venligst"
|
1465 |
-
|
1466 |
-
#: includes/i18n.php:412
|
1467 |
-
msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1468 |
-
msgstr "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1469 |
-
|
1470 |
-
#: includes/i18n.php:413
|
1471 |
-
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."
|
1472 |
-
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."
|
1473 |
-
|
1474 |
-
#: includes/i18n.php:414
|
1475 |
-
msgctxt "%1s - plugin title, %2s - API domain"
|
1476 |
-
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1477 |
-
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1478 |
-
|
1479 |
-
#: includes/i18n.php:416
|
1480 |
-
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1481 |
-
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1482 |
-
|
1483 |
-
#: includes/i18n.php:419
|
1484 |
-
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."
|
1485 |
-
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."
|
1486 |
-
|
1487 |
-
#: includes/i18n.php:420
|
1488 |
-
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1489 |
-
msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1490 |
-
|
1491 |
-
#: includes/i18n.php:421
|
1492 |
-
msgid "%s is the new owner of the account."
|
1493 |
-
msgstr "%s er den nye ejer af kontoen."
|
1494 |
-
|
1495 |
-
#: includes/i18n.php:423
|
1496 |
-
msgctxt "addonX cannot run without pluginY"
|
1497 |
-
msgid "%s cannot run without %s."
|
1498 |
-
msgstr "%s virker ikke uden %s."
|
1499 |
-
|
1500 |
-
#: includes/i18n.php:425
|
1501 |
-
msgctxt "addonX cannot run..."
|
1502 |
-
msgid "%s cannot run without the plugin."
|
1503 |
-
msgstr "%s virker ikke uden pluginnet."
|
1504 |
-
|
1505 |
-
#: includes/i18n.php:426
|
1506 |
-
msgctxt "pluginX activation was successfully..."
|
1507 |
-
msgid "%s activation was successfully completed."
|
1508 |
-
msgstr "Aktivering af %s blev gennemført."
|
1509 |
-
|
1510 |
-
#: includes/i18n.php:428
|
1511 |
-
msgctxt "Plugin installer section title"
|
1512 |
-
msgid "Features & Pricing"
|
1513 |
-
msgstr "Funktioner og priser"
|
1514 |
-
|
1515 |
-
#: includes/i18n.php:429
|
1516 |
-
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1517 |
-
msgstr "Add-on must be deployed to WordPress.org or Freemius."
|
1518 |
-
|
1519 |
-
#: includes/i18n.php:430
|
1520 |
-
msgid "Paid add-on must be deployed to Freemius."
|
1521 |
-
msgstr "Paid add-on must be deployed to Freemius."
|
1522 |
-
|
1523 |
-
#: includes/i18n.php:434
|
1524 |
-
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1525 |
-
msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1526 |
-
|
1527 |
-
#: includes/i18n.php:435
|
1528 |
-
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."
|
1529 |
-
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."
|
1530 |
-
|
1531 |
-
#: includes/i18n.php:440
|
1532 |
-
msgctxt "as every month"
|
1533 |
-
msgid "Monthly"
|
1534 |
-
msgstr "Månedligt"
|
1535 |
-
|
1536 |
-
#: includes/i18n.php:441
|
1537 |
-
msgctxt "as monthly period"
|
1538 |
-
msgid "mo"
|
1539 |
-
msgstr "md"
|
1540 |
-
|
1541 |
-
#: includes/i18n.php:442
|
1542 |
-
msgctxt "as once a year"
|
1543 |
-
msgid "Annual"
|
1544 |
-
msgstr "Årligt"
|
1545 |
-
|
1546 |
-
#: includes/i18n.php:443
|
1547 |
-
msgctxt "as once a year"
|
1548 |
-
msgid "Annually"
|
1549 |
-
msgstr "Årligt"
|
1550 |
-
|
1551 |
-
#: includes/i18n.php:444
|
1552 |
-
msgctxt "as once a year"
|
1553 |
-
msgid "Once"
|
1554 |
-
msgstr "Engangsbeløb"
|
1555 |
-
|
1556 |
-
#: includes/i18n.php:445
|
1557 |
-
msgctxt "as annual period"
|
1558 |
-
msgid "year"
|
1559 |
-
msgstr "år"
|
1560 |
-
|
1561 |
-
#: includes/i18n.php:446
|
1562 |
-
msgid "Lifetime"
|
1563 |
-
msgstr "Livstid"
|
1564 |
-
|
1565 |
-
#: includes/i18n.php:447
|
1566 |
-
msgctxt "e.g. the best product"
|
1567 |
-
msgid "Best"
|
1568 |
-
msgstr "Bedste"
|
1569 |
-
|
1570 |
-
#: includes/i18n.php:448
|
1571 |
-
msgctxt "e.g. billed monthly"
|
1572 |
-
msgid "Billed %s"
|
1573 |
-
msgstr "Faktureret %s"
|
1574 |
-
|
1575 |
-
#: includes/i18n.php:449
|
1576 |
-
msgctxt "as a discount of $5 or 10%"
|
1577 |
-
msgid "Save %s"
|
1578 |
-
msgstr "Spar %s"
|
1579 |
-
|
1580 |
-
#: includes/i18n.php:451
|
1581 |
-
msgid "View details"
|
1582 |
-
msgstr "Vis detaljer"
|
1583 |
-
|
1584 |
-
#: includes/i18n.php:455
|
1585 |
-
msgctxt "button label"
|
1586 |
-
msgid "Approve & Start Trial"
|
1587 |
-
msgstr "Godkend & start prøveperiode"
|
1588 |
-
|
1589 |
-
#: includes/i18n.php:457
|
1590 |
-
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1591 |
-
msgstr "Du er 1 klik fra at begynde din %1$s dages gratis prøveperiode af planen %2$s."
|
1592 |
-
|
1593 |
-
#: includes/i18n.php:459
|
1594 |
-
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."
|
1595 |
-
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."
|
1596 |
-
|
1597 |
-
#: includes/i18n.php:465
|
1598 |
-
msgid "Business name"
|
1599 |
-
msgstr "Firmanavn"
|
1600 |
-
|
1601 |
-
#: includes/i18n.php:466
|
1602 |
-
msgid "Tax / VAT ID"
|
1603 |
-
msgstr "Moms / VAT ID"
|
1604 |
-
|
1605 |
-
#: includes/i18n.php:467
|
1606 |
-
msgid "Address Line %d"
|
1607 |
-
msgstr "Adresselinje %d"
|
1608 |
-
|
1609 |
-
#: includes/i18n.php:468
|
1610 |
-
msgid "Country"
|
1611 |
-
msgstr "Land"
|
1612 |
-
|
1613 |
-
#: includes/i18n.php:469
|
1614 |
-
msgid "Select Country"
|
1615 |
-
msgstr "Vælg land"
|
1616 |
-
|
1617 |
-
#: includes/i18n.php:470
|
1618 |
-
msgid "City"
|
1619 |
-
msgstr "By"
|
1620 |
-
|
1621 |
-
#: includes/i18n.php:471
|
1622 |
-
msgid "Town"
|
1623 |
-
msgstr "By"
|
1624 |
-
|
1625 |
-
#: includes/i18n.php:472
|
1626 |
-
msgid "State"
|
1627 |
-
msgstr "Stat"
|
1628 |
-
|
1629 |
-
#: includes/i18n.php:473
|
1630 |
-
msgid "Province"
|
1631 |
-
msgstr "Provins"
|
1632 |
-
|
1633 |
-
#: includes/i18n.php:474
|
1634 |
-
msgid "ZIP / Postal Code"
|
1635 |
-
msgstr "ZIP / Postnummer"
|
1636 |
-
|
1637 |
-
#: includes/i18n.php:479
|
1638 |
-
msgid "Installing plugin: %s"
|
1639 |
-
msgstr "Installing plugin: %s"
|
1640 |
-
|
1641 |
-
#: includes/i18n.php:480
|
1642 |
-
msgid "Automatic Installation"
|
1643 |
-
msgstr "Automatic Installation"
|
1644 |
-
|
1645 |
-
#: includes/i18n.php:482
|
1646 |
-
msgid "%s sec"
|
1647 |
-
msgstr "%s sec"
|
1648 |
-
|
1649 |
-
#: includes/i18n.php:483
|
1650 |
-
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."
|
1651 |
-
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."
|
1652 |
-
|
1653 |
-
#: includes/i18n.php:484
|
1654 |
-
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."
|
1655 |
-
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."
|
1656 |
-
|
1657 |
-
#: includes/i18n.php:485
|
1658 |
-
msgid "Cancel Installation"
|
1659 |
-
msgstr "Cancel Installation"
|
1660 |
-
|
1661 |
-
#: includes/i18n.php:486
|
1662 |
-
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
1663 |
-
msgstr "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
1664 |
-
|
1665 |
-
#: includes/i18n.php:487
|
1666 |
-
msgid "Invalid module ID."
|
1667 |
-
msgstr "Invalid module ID."
|
1668 |
-
|
1669 |
-
#: includes/i18n.php:488
|
1670 |
-
msgid "Auto installation only works for opted-in users."
|
1671 |
-
msgstr "Auto installation only works for opted-in users."
|
1672 |
-
|
1673 |
-
#: includes/i18n.php:489
|
1674 |
-
msgid "Premium version already active."
|
1675 |
-
msgstr "Premium version already active."
|
1676 |
-
|
1677 |
-
#: includes/i18n.php:490
|
1678 |
-
msgid "Premium add-on version already installed."
|
1679 |
-
msgstr "Premium add-on version already installed."
|
1680 |
-
|
1681 |
-
#: includes/i18n.php:491
|
1682 |
-
msgid "You do not have a valid license to access the premium version."
|
1683 |
-
msgstr "You do not have a valid license to access the premium version."
|
1684 |
-
|
1685 |
-
#: includes/i18n.php:492
|
1686 |
-
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
1687 |
-
msgstr "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
1688 |
-
|
1689 |
-
#: includes/i18n.php:496
|
1690 |
-
msgid "Secure HTTPS %s page, running from an external domain"
|
1691 |
-
msgstr "Secure HTTPS %s page, running from an external domain"
|
1692 |
-
|
1693 |
-
#: includes/i18n.php:497
|
1694 |
-
msgid "PCI compliant"
|
1695 |
-
msgstr "PCI compliant"
|
1696 |
-
|
1697 |
-
#: includes/i18n.php:498
|
1698 |
-
msgid "View paid features"
|
1699 |
-
msgstr "View paid features"
|
1700 |
-
|
1701 |
-
#: includes/i18n.php:512
|
1702 |
-
msgctxt "Plugin installer section title"
|
1703 |
-
msgid "Description"
|
1704 |
-
msgstr "Beskrivelse"
|
1705 |
-
|
1706 |
-
#: includes/i18n.php:513
|
1707 |
-
msgctxt "Plugin installer section title"
|
1708 |
-
msgid "Installation"
|
1709 |
-
msgstr "Installering"
|
1710 |
-
|
1711 |
-
#: includes/i18n.php:514
|
1712 |
-
msgctxt "Plugin installer section title"
|
1713 |
-
msgid "FAQ"
|
1714 |
-
msgstr "FAQ"
|
1715 |
-
|
1716 |
-
#: includes/i18n.php:515
|
1717 |
-
msgctxt "Plugin installer section title"
|
1718 |
-
msgid "Changelog"
|
1719 |
-
msgstr "Ændringslog"
|
1720 |
-
|
1721 |
-
#: includes/i18n.php:516
|
1722 |
-
msgctxt "Plugin installer section title"
|
1723 |
-
msgid "Reviews"
|
1724 |
-
msgstr "Anmeldelser"
|
1725 |
-
|
1726 |
-
#: includes/i18n.php:517
|
1727 |
-
msgctxt "Plugin installer section title"
|
1728 |
-
msgid "Other Notes"
|
1729 |
-
msgstr "Andre noter"
|
1730 |
-
|
1731 |
-
#: includes/i18n.php:519
|
1732 |
-
msgid "%s star"
|
1733 |
-
msgstr "%s stjerne"
|
1734 |
-
|
1735 |
-
#: includes/i18n.php:521
|
1736 |
-
msgid "%s stars"
|
1737 |
-
msgstr "%s stjerner"
|
1738 |
-
|
1739 |
-
#: includes/i18n.php:523
|
1740 |
-
msgid "%s rating"
|
1741 |
-
msgstr "%s vurdering"
|
1742 |
-
|
1743 |
-
#: includes/i18n.php:525
|
1744 |
-
msgid "%s ratings"
|
1745 |
-
msgstr "%s vurderinger"
|
1746 |
-
|
1747 |
-
#: includes/i18n.php:527
|
1748 |
-
msgid "%s time"
|
1749 |
-
msgstr "%s gang"
|
1750 |
-
|
1751 |
-
#: includes/i18n.php:529
|
1752 |
-
msgid "%s times"
|
1753 |
-
msgstr "%s gange"
|
1754 |
-
|
1755 |
-
#: includes/i18n.php:531
|
1756 |
-
msgid "Click to see reviews that provided a rating of %s"
|
1757 |
-
msgstr "Click to see reviews that provided a rating of %s"
|
1758 |
-
|
1759 |
-
#: includes/i18n.php:532
|
1760 |
-
msgid "Last Updated"
|
1761 |
-
msgstr "Senest opdateret"
|
1762 |
-
|
1763 |
-
#: includes/i18n.php:533
|
1764 |
-
msgid "Requires WordPress Version:"
|
1765 |
-
msgstr "Kræver WordPress-version:"
|
1766 |
-
|
1767 |
-
#: includes/i18n.php:534
|
1768 |
-
msgctxt "as the plugin author"
|
1769 |
-
msgid "Author:"
|
1770 |
-
msgstr "Forfatter:"
|
1771 |
-
|
1772 |
-
#: includes/i18n.php:535
|
1773 |
-
msgid "Compatible up to:"
|
1774 |
-
msgstr "Kompatibel op til:"
|
1775 |
-
|
1776 |
-
#: includes/i18n.php:536
|
1777 |
-
msgid "Downloaded:"
|
1778 |
-
msgstr "Hentet:"
|
1779 |
-
|
1780 |
-
#: includes/i18n.php:537
|
1781 |
-
msgid "WordPress.org Plugin Page"
|
1782 |
-
msgstr "WordPress.org Plugin-side"
|
1783 |
-
|
1784 |
-
#: includes/i18n.php:538
|
1785 |
-
msgid "Plugin Homepage"
|
1786 |
-
msgstr "Plugin-websted"
|
1787 |
-
|
1788 |
-
#: includes/i18n.php:539
|
1789 |
-
msgid "Donate to this plugin"
|
1790 |
-
msgstr "Donér til dette plugin"
|
1791 |
-
|
1792 |
-
#: includes/i18n.php:540
|
1793 |
-
msgid "Average Rating"
|
1794 |
-
msgstr "Gennemsnitlig vurdering"
|
1795 |
-
|
1796 |
-
#: includes/i18n.php:541
|
1797 |
-
msgid "based on %s"
|
1798 |
-
msgstr "baseret på %s"
|
1799 |
-
|
1800 |
-
#: includes/i18n.php:542
|
1801 |
-
msgid "Warning:"
|
1802 |
-
msgstr "Advarsel:"
|
1803 |
-
|
1804 |
-
#: includes/i18n.php:543
|
1805 |
-
msgid "Contributors"
|
1806 |
-
msgstr "Bidragsydere"
|
1807 |
-
|
1808 |
-
#: includes/i18n.php:544
|
1809 |
-
msgid "Plugin Install"
|
1810 |
-
msgstr "Plugin Install"
|
1811 |
-
|
1812 |
-
#: includes/i18n.php:545
|
1813 |
-
msgid "This plugin has not been tested with your current version of WordPress."
|
1814 |
-
msgstr "This plugin has not been tested with your current version of WordPress."
|
1815 |
-
|
1816 |
-
#: includes/i18n.php:546
|
1817 |
-
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1818 |
-
msgstr "This plugin has not been marked as compatible with your version of WordPress."
|
1819 |
-
|
1820 |
-
#: includes/i18n.php:547
|
1821 |
-
msgid "Newer Version (%s) Installed"
|
1822 |
-
msgstr "Nyere version (%s) installeret"
|
1823 |
-
|
1824 |
-
#: includes/i18n.php:548
|
1825 |
-
msgid "Latest Version Installed"
|
1826 |
-
msgstr "Seneste version installeret"
|
1 |
+
# Copyright (C) 2017 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Joachim Jensen <jv@intox.dk>, 2016-2017
|
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: 2017-08-24 12:32+0000\n"
|
11 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
12 |
+
"Language: da_DK\n"
|
13 |
+
"Language-Team: Danish (Denmark) (http://www.transifex.com/freemius/wordpress-sdk/language/da_DK/)\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
"MIME-Version: 1.0\n"
|
18 |
+
"X-Poedit-Basepath: ..\n"
|
19 |
+
"X-Poedit-KeywordsList: _fs_text;_fs_echo;_fs_esc_attr;_fs_esc_attr_echo;_fs_esc_html;_fs_esc_html_echo;_fs_x:1,2c;_fs_ex:1,2c;_fs_esc_attr_x:1,2c;_fs_esc_html_x:1,2c;_fs_n:1,2;_fs_n_noop:1,2;_fs_nx:1,2,4c;_fs_nx_noop:1,2,3c\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
+
|
24 |
+
#: includes/i18n.php:37
|
25 |
+
msgid "Account"
|
26 |
+
msgstr "Konto"
|
27 |
+
|
28 |
+
#: includes/i18n.php:38
|
29 |
+
msgid "Add-On"
|
30 |
+
msgstr "Add-On"
|
31 |
+
|
32 |
+
#: includes/i18n.php:39
|
33 |
+
msgid "Contact Us"
|
34 |
+
msgstr "Kontakt os"
|
35 |
+
|
36 |
+
#: includes/i18n.php:40
|
37 |
+
msgid "Contact Support"
|
38 |
+
msgstr "Kontakt support"
|
39 |
+
|
40 |
+
#: includes/i18n.php:41
|
41 |
+
msgid "Change Ownership"
|
42 |
+
msgstr "Skift ejerskab"
|
43 |
+
|
44 |
+
#: includes/i18n.php:42
|
45 |
+
msgid "Support"
|
46 |
+
msgstr "Support"
|
47 |
+
|
48 |
+
#: includes/i18n.php:43
|
49 |
+
msgid "Support Forum"
|
50 |
+
msgstr "Supportforum"
|
51 |
+
|
52 |
+
#: includes/i18n.php:44
|
53 |
+
msgid "Add-Ons"
|
54 |
+
msgstr "Add-Ons"
|
55 |
+
|
56 |
+
#: includes/i18n.php:45
|
57 |
+
msgctxt "verb"
|
58 |
+
msgid "Upgrade"
|
59 |
+
msgstr "Opgrader"
|
60 |
+
|
61 |
+
#: includes/i18n.php:46
|
62 |
+
msgid "Awesome"
|
63 |
+
msgstr "Sejt"
|
64 |
+
|
65 |
+
#: includes/i18n.php:47
|
66 |
+
msgctxt "noun"
|
67 |
+
msgid "Pricing"
|
68 |
+
msgstr "Priser"
|
69 |
+
|
70 |
+
#: includes/i18n.php:48
|
71 |
+
msgctxt "noun"
|
72 |
+
msgid "Price"
|
73 |
+
msgstr "Pris"
|
74 |
+
|
75 |
+
#: includes/i18n.php:49
|
76 |
+
msgid "Unlimited Updates"
|
77 |
+
msgstr "Ubegrænsede opdateringer"
|
78 |
+
|
79 |
+
#: includes/i18n.php:50
|
80 |
+
msgctxt "verb"
|
81 |
+
msgid "Downgrade"
|
82 |
+
msgstr "Nedgrader"
|
83 |
+
|
84 |
+
#: includes/i18n.php:51
|
85 |
+
msgctxt "verb"
|
86 |
+
msgid "Cancel Subscription"
|
87 |
+
msgstr "Annuller abonnement"
|
88 |
+
|
89 |
+
#: includes/i18n.php:52
|
90 |
+
msgid "Cancel Trial"
|
91 |
+
msgstr "Annuller prøveperiode"
|
92 |
+
|
93 |
+
#: includes/i18n.php:53
|
94 |
+
msgid "Free Trial"
|
95 |
+
msgstr "Gratis prøveperiode"
|
96 |
+
|
97 |
+
#: includes/i18n.php:54
|
98 |
+
msgid "Start my free %s"
|
99 |
+
msgstr "Start min gratis %s"
|
100 |
+
|
101 |
+
#: includes/i18n.php:55
|
102 |
+
msgid "No commitment for %s - cancel anytime"
|
103 |
+
msgstr "Ingen bindinger ved %s - annuller når som helst"
|
104 |
+
|
105 |
+
#: includes/i18n.php:56
|
106 |
+
msgid "After your free %s, pay as little as %s"
|
107 |
+
msgstr "Efter din gratis %s er prisen kun %s"
|
108 |
+
|
109 |
+
#: includes/i18n.php:57
|
110 |
+
msgid "Details"
|
111 |
+
msgstr "Detaljer"
|
112 |
+
|
113 |
+
#: includes/i18n.php:58
|
114 |
+
msgid "Account Details"
|
115 |
+
msgstr "Kontodetaljer"
|
116 |
+
|
117 |
+
#: includes/i18n.php:59
|
118 |
+
msgctxt "verb"
|
119 |
+
msgid "Delete"
|
120 |
+
msgstr "Slet"
|
121 |
+
|
122 |
+
#: includes/i18n.php:60
|
123 |
+
msgctxt "verb"
|
124 |
+
msgid "Show"
|
125 |
+
msgstr "Vis"
|
126 |
+
|
127 |
+
#: includes/i18n.php:61
|
128 |
+
msgctxt "verb"
|
129 |
+
msgid "Hide"
|
130 |
+
msgstr "Skjul"
|
131 |
+
|
132 |
+
#: includes/i18n.php:62
|
133 |
+
msgctxt "verb"
|
134 |
+
msgid "Edit"
|
135 |
+
msgstr "Rediger"
|
136 |
+
|
137 |
+
#: includes/i18n.php:63
|
138 |
+
msgctxt "verb"
|
139 |
+
msgid "Update"
|
140 |
+
msgstr "Opdater"
|
141 |
+
|
142 |
+
#: includes/i18n.php:64
|
143 |
+
msgid "Date"
|
144 |
+
msgstr "Dato"
|
145 |
+
|
146 |
+
#: includes/i18n.php:65
|
147 |
+
msgid "Amount"
|
148 |
+
msgstr "Beløb"
|
149 |
+
|
150 |
+
#: includes/i18n.php:66
|
151 |
+
msgid "Invoice"
|
152 |
+
msgstr "Faktura"
|
153 |
+
|
154 |
+
#: includes/i18n.php:67
|
155 |
+
msgid "Billing"
|
156 |
+
msgstr "Betaling"
|
157 |
+
|
158 |
+
#: includes/i18n.php:68
|
159 |
+
msgid "Payments"
|
160 |
+
msgstr "Betalinger"
|
161 |
+
|
162 |
+
#: includes/i18n.php:69
|
163 |
+
msgid "Delete Account"
|
164 |
+
msgstr "Slet konto"
|
165 |
+
|
166 |
+
#: includes/i18n.php:70
|
167 |
+
msgctxt "as close a window"
|
168 |
+
msgid "Dismiss"
|
169 |
+
msgstr "Fjern"
|
170 |
+
|
171 |
+
#: includes/i18n.php:71
|
172 |
+
msgctxt "as product pricing plan"
|
173 |
+
msgid "Plan"
|
174 |
+
msgstr "Plan"
|
175 |
+
|
176 |
+
#: includes/i18n.php:72
|
177 |
+
msgid "Change Plan"
|
178 |
+
msgstr "Skift plan"
|
179 |
+
|
180 |
+
#: includes/i18n.php:73
|
181 |
+
msgctxt "as download professional version"
|
182 |
+
msgid "Download %s Version"
|
183 |
+
msgstr "Download %s Version"
|
184 |
+
|
185 |
+
#: includes/i18n.php:74
|
186 |
+
msgctxt "as download professional version now"
|
187 |
+
msgid "Download %s version now"
|
188 |
+
msgstr "Download %s version now"
|
189 |
+
|
190 |
+
#: includes/i18n.php:75
|
191 |
+
msgctxt "as download latest version"
|
192 |
+
msgid "Download Latest"
|
193 |
+
msgstr "Download seneste"
|
194 |
+
|
195 |
+
#: includes/i18n.php:76
|
196 |
+
msgctxt "E.g. you have a professional license."
|
197 |
+
msgid "You have a %s license."
|
198 |
+
msgstr "Du har en %s licens."
|
199 |
+
|
200 |
+
#: includes/i18n.php:77
|
201 |
+
msgid "New"
|
202 |
+
msgstr "Ny"
|
203 |
+
|
204 |
+
#: includes/i18n.php:78
|
205 |
+
msgid "Free"
|
206 |
+
msgstr "Gratis"
|
207 |
+
|
208 |
+
#: includes/i18n.php:79
|
209 |
+
msgctxt "as trial plan"
|
210 |
+
msgid "Trial"
|
211 |
+
msgstr "Prøveperiode"
|
212 |
+
|
213 |
+
#: includes/i18n.php:80
|
214 |
+
msgctxt "as starting a trial plan"
|
215 |
+
msgid "Start Trial"
|
216 |
+
msgstr "Start prøveperiode"
|
217 |
+
|
218 |
+
#: includes/i18n.php:81
|
219 |
+
msgctxt "verb"
|
220 |
+
msgid "Purchase"
|
221 |
+
msgstr "Køb"
|
222 |
+
|
223 |
+
#: includes/i18n.php:82
|
224 |
+
msgid "Purchase License"
|
225 |
+
msgstr "Køb licens"
|
226 |
+
|
227 |
+
#: includes/i18n.php:83
|
228 |
+
msgctxt "verb"
|
229 |
+
msgid "Buy"
|
230 |
+
msgstr "Køb"
|
231 |
+
|
232 |
+
#: includes/i18n.php:84
|
233 |
+
msgid "Buy License"
|
234 |
+
msgstr "Køb licens"
|
235 |
+
|
236 |
+
#: includes/i18n.php:85
|
237 |
+
msgid "Single Site License"
|
238 |
+
msgstr "Single Site License"
|
239 |
+
|
240 |
+
#: includes/i18n.php:86
|
241 |
+
msgid "Unlimited Licenses"
|
242 |
+
msgstr "Ubegrænsede licenser"
|
243 |
+
|
244 |
+
#: includes/i18n.php:87
|
245 |
+
msgid "Up to %s Sites"
|
246 |
+
msgstr "Op til %s websteder"
|
247 |
+
|
248 |
+
#: includes/i18n.php:88
|
249 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
250 |
+
msgstr "%sRenew your license now%s to access version %s features and support."
|
251 |
+
|
252 |
+
#: includes/i18n.php:89
|
253 |
+
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
254 |
+
msgstr "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
255 |
+
|
256 |
+
#: includes/i18n.php:90
|
257 |
+
msgctxt "e.g. Professional Plan"
|
258 |
+
msgid "%s Plan"
|
259 |
+
msgstr "%s Plan"
|
260 |
+
|
261 |
+
#: includes/i18n.php:91
|
262 |
+
msgid "You are just one step away - %s"
|
263 |
+
msgstr "Du mangler kun ét skridt - %s"
|
264 |
+
|
265 |
+
#: includes/i18n.php:92
|
266 |
+
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
267 |
+
msgid "Complete \"%s\" Activation Now"
|
268 |
+
msgstr "Færdiggør aktivering af \"%s\" nu"
|
269 |
+
|
270 |
+
#: includes/i18n.php:94
|
271 |
+
msgid "We made a few tweaks to the %s, %s"
|
272 |
+
msgstr "We made a few tweaks to the %s, %s"
|
273 |
+
|
274 |
+
#: includes/i18n.php:95
|
275 |
+
msgid "Opt-in to make \"%s\" Better!"
|
276 |
+
msgstr "Tilmeld for at gøre \"%s\" bedre!"
|
277 |
+
|
278 |
+
#: includes/i18n.php:96
|
279 |
+
msgid "Error"
|
280 |
+
msgstr "Fejl"
|
281 |
+
|
282 |
+
#: includes/i18n.php:97
|
283 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
284 |
+
msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
285 |
+
|
286 |
+
#: includes/i18n.php:100
|
287 |
+
msgctxt "as expiration date"
|
288 |
+
msgid "Expiration"
|
289 |
+
msgstr "Expiration"
|
290 |
+
|
291 |
+
#: includes/i18n.php:101
|
292 |
+
msgctxt "as software license"
|
293 |
+
msgid "License"
|
294 |
+
msgstr "Licens"
|
295 |
+
|
296 |
+
#: includes/i18n.php:102
|
297 |
+
msgid "not verified"
|
298 |
+
msgstr "ikke verificeret"
|
299 |
+
|
300 |
+
#: includes/i18n.php:103
|
301 |
+
msgid "Verify Email"
|
302 |
+
msgstr "Verificer e-mail"
|
303 |
+
|
304 |
+
#: includes/i18n.php:104
|
305 |
+
msgctxt "e.g. expires in 2 months"
|
306 |
+
msgid "Expires in %s"
|
307 |
+
msgstr "Udløber om %s"
|
308 |
+
|
309 |
+
#: includes/i18n.php:105
|
310 |
+
msgctxt "e.g. auto renews in 2 months"
|
311 |
+
msgid "Auto renews in %s"
|
312 |
+
msgstr "Auto-fornyer om %s"
|
313 |
+
|
314 |
+
#: includes/i18n.php:106
|
315 |
+
msgid "No expiration"
|
316 |
+
msgstr "Udløber ikke"
|
317 |
+
|
318 |
+
#: includes/i18n.php:107
|
319 |
+
msgid "Expired"
|
320 |
+
msgstr "Udløbet"
|
321 |
+
|
322 |
+
#: includes/i18n.php:108
|
323 |
+
msgid "Cancelled"
|
324 |
+
msgstr "Annulleret"
|
325 |
+
|
326 |
+
#: includes/i18n.php:109
|
327 |
+
msgctxt "e.g. In 2 hours"
|
328 |
+
msgid "In %s"
|
329 |
+
msgstr "Om %s"
|
330 |
+
|
331 |
+
#: includes/i18n.php:110
|
332 |
+
msgctxt "e.g. 2 min ago"
|
333 |
+
msgid "%s ago"
|
334 |
+
msgstr "%s siden"
|
335 |
+
|
336 |
+
#: includes/i18n.php:112
|
337 |
+
msgid "%s or higher"
|
338 |
+
msgstr "%s eller højere"
|
339 |
+
|
340 |
+
#: includes/i18n.php:113
|
341 |
+
msgctxt "as plugin version"
|
342 |
+
msgid "Version"
|
343 |
+
msgstr "Version"
|
344 |
+
|
345 |
+
#: includes/i18n.php:114
|
346 |
+
msgid "Name"
|
347 |
+
msgstr "Navn"
|
348 |
+
|
349 |
+
#: includes/i18n.php:115
|
350 |
+
msgid "Email"
|
351 |
+
msgstr "E-mail"
|
352 |
+
|
353 |
+
#: includes/i18n.php:116
|
354 |
+
msgid "Email address"
|
355 |
+
msgstr "E-mailadresse"
|
356 |
+
|
357 |
+
#: includes/i18n.php:117
|
358 |
+
msgid "Verified"
|
359 |
+
msgstr "Verificeret"
|
360 |
+
|
361 |
+
#: includes/i18n.php:118
|
362 |
+
msgid "Module"
|
363 |
+
msgstr "Modul"
|
364 |
+
|
365 |
+
#: includes/i18n.php:119
|
366 |
+
msgid "Module Type"
|
367 |
+
msgstr "Modultype"
|
368 |
+
|
369 |
+
#: includes/i18n.php:120
|
370 |
+
msgid "Plugin"
|
371 |
+
msgstr "Plugin"
|
372 |
+
|
373 |
+
#: includes/i18n.php:121
|
374 |
+
msgid "Plugins"
|
375 |
+
msgstr "Plugins"
|
376 |
+
|
377 |
+
#: includes/i18n.php:122
|
378 |
+
msgid "Theme"
|
379 |
+
msgstr "Tema"
|
380 |
+
|
381 |
+
#: includes/i18n.php:123
|
382 |
+
msgid "Themes"
|
383 |
+
msgstr "Temaer"
|
384 |
+
|
385 |
+
#: includes/i18n.php:124
|
386 |
+
msgctxt "as file/folder path"
|
387 |
+
msgid "Path"
|
388 |
+
msgstr "Sti"
|
389 |
+
|
390 |
+
#: includes/i18n.php:125
|
391 |
+
msgid "Title"
|
392 |
+
msgstr "Titel"
|
393 |
+
|
394 |
+
#: includes/i18n.php:126
|
395 |
+
msgid "Free version"
|
396 |
+
msgstr "Gratis version"
|
397 |
+
|
398 |
+
#: includes/i18n.php:127
|
399 |
+
msgid "Premium version"
|
400 |
+
msgstr "Premium version"
|
401 |
+
|
402 |
+
#: includes/i18n.php:128
|
403 |
+
msgctxt "as WP plugin slug"
|
404 |
+
msgid "Slug"
|
405 |
+
msgstr "Kortnavn"
|
406 |
+
|
407 |
+
#: includes/i18n.php:129
|
408 |
+
msgid "ID"
|
409 |
+
msgstr "ID"
|
410 |
+
|
411 |
+
#: includes/i18n.php:130
|
412 |
+
msgid "Users"
|
413 |
+
msgstr "Brugere"
|
414 |
+
|
415 |
+
#: includes/i18n.php:131
|
416 |
+
msgid "%s Installs"
|
417 |
+
msgstr "%s installeringer"
|
418 |
+
|
419 |
+
#: includes/i18n.php:132
|
420 |
+
msgctxt "like websites"
|
421 |
+
msgid "Sites"
|
422 |
+
msgstr "Websteder"
|
423 |
+
|
424 |
+
#: includes/i18n.php:133
|
425 |
+
msgid "User ID"
|
426 |
+
msgstr "Bruger-ID"
|
427 |
+
|
428 |
+
#: includes/i18n.php:134
|
429 |
+
msgid "Site ID"
|
430 |
+
msgstr "Websteds-ID"
|
431 |
+
|
432 |
+
#: includes/i18n.php:135
|
433 |
+
msgid "Public Key"
|
434 |
+
msgstr "Offentlig nøgle"
|
435 |
+
|
436 |
+
#: includes/i18n.php:136
|
437 |
+
msgid "Secret Key"
|
438 |
+
msgstr "Privat nøgle"
|
439 |
+
|
440 |
+
#: includes/i18n.php:137
|
441 |
+
msgctxt "as secret encryption key missing"
|
442 |
+
msgid "No Secret"
|
443 |
+
msgstr "Ingen privat nøgle"
|
444 |
+
|
445 |
+
#: includes/i18n.php:138
|
446 |
+
msgid "No ID"
|
447 |
+
msgstr "Intet ID"
|
448 |
+
|
449 |
+
#: includes/i18n.php:139
|
450 |
+
msgctxt "as synchronize license"
|
451 |
+
msgid "Sync License"
|
452 |
+
msgstr "Synkroniser licens"
|
453 |
+
|
454 |
+
#: includes/i18n.php:140
|
455 |
+
msgctxt "as synchronize"
|
456 |
+
msgid "Sync"
|
457 |
+
msgstr "Synkroniser"
|
458 |
+
|
459 |
+
#: includes/i18n.php:141
|
460 |
+
msgid "Activate License"
|
461 |
+
msgstr "Aktiver licens"
|
462 |
+
|
463 |
+
#: includes/i18n.php:142
|
464 |
+
msgid "Activate Free Version"
|
465 |
+
msgstr "Aktiver gratis version"
|
466 |
+
|
467 |
+
#: includes/i18n.php:143
|
468 |
+
msgid "Please enter the license key that you received in the email right after the purchase:"
|
469 |
+
msgstr "Please enter the license key that you received in the email right after the purchase:"
|
470 |
+
|
471 |
+
#: includes/i18n.php:144
|
472 |
+
msgid "Activating license..."
|
473 |
+
msgstr "Aktiverer licens..."
|
474 |
+
|
475 |
+
#: includes/i18n.php:145
|
476 |
+
msgid "Change License"
|
477 |
+
msgstr "Skift licens"
|
478 |
+
|
479 |
+
#: includes/i18n.php:146
|
480 |
+
msgid "Update License"
|
481 |
+
msgstr "Opdater licens"
|
482 |
+
|
483 |
+
#: includes/i18n.php:147
|
484 |
+
msgid "Deactivate License"
|
485 |
+
msgstr "Deaktiver licens"
|
486 |
+
|
487 |
+
#: includes/i18n.php:148
|
488 |
+
msgid "Activate"
|
489 |
+
msgstr "Aktiver"
|
490 |
+
|
491 |
+
#: includes/i18n.php:149
|
492 |
+
msgid "Deactivate"
|
493 |
+
msgstr "Deaktiver"
|
494 |
+
|
495 |
+
#: includes/i18n.php:150
|
496 |
+
msgid "Skip & Deactivate"
|
497 |
+
msgstr "Spring over & deaktiver"
|
498 |
+
|
499 |
+
#: includes/i18n.php:151
|
500 |
+
msgid "Skip & %s"
|
501 |
+
msgstr "Spring over & %s"
|
502 |
+
|
503 |
+
#: includes/i18n.php:152
|
504 |
+
msgid "No - just deactivate"
|
505 |
+
msgstr "Nej - bare deaktiver"
|
506 |
+
|
507 |
+
#: includes/i18n.php:153
|
508 |
+
msgid "Yes - do your thing"
|
509 |
+
msgstr "Yes - do your thing"
|
510 |
+
|
511 |
+
#: includes/i18n.php:154
|
512 |
+
msgctxt "active mode"
|
513 |
+
msgid "Active"
|
514 |
+
msgstr "Aktiv"
|
515 |
+
|
516 |
+
#: includes/i18n.php:155
|
517 |
+
msgctxt "is active mode?"
|
518 |
+
msgid "Is Active"
|
519 |
+
msgstr "Er aktiv"
|
520 |
+
|
521 |
+
#: includes/i18n.php:156
|
522 |
+
msgid "Install Now"
|
523 |
+
msgstr "Installer nu"
|
524 |
+
|
525 |
+
#: includes/i18n.php:157
|
526 |
+
msgid "Install Update Now"
|
527 |
+
msgstr "Installer opdatering nu"
|
528 |
+
|
529 |
+
#: includes/i18n.php:158
|
530 |
+
msgid "More information about %s"
|
531 |
+
msgstr "Mere information om %s"
|
532 |
+
|
533 |
+
#: includes/i18n.php:159
|
534 |
+
msgid "Localhost"
|
535 |
+
msgstr "Localhost"
|
536 |
+
|
537 |
+
#: includes/i18n.php:160
|
538 |
+
msgctxt "as activate Professional plan"
|
539 |
+
msgid "Activate %s Plan"
|
540 |
+
msgstr "Aktiver %s plan"
|
541 |
+
|
542 |
+
#: includes/i18n.php:161
|
543 |
+
msgctxt "as 5 licenses left"
|
544 |
+
msgid "%s left"
|
545 |
+
msgstr "%s tilbage"
|
546 |
+
|
547 |
+
#: includes/i18n.php:162
|
548 |
+
msgid "Last license"
|
549 |
+
msgstr "Seneste license"
|
550 |
+
|
551 |
+
#: includes/i18n.php:163
|
552 |
+
msgid "What is your %s?"
|
553 |
+
msgstr "What is your %s?"
|
554 |
+
|
555 |
+
#: includes/i18n.php:164
|
556 |
+
msgid "Activate this add-on"
|
557 |
+
msgstr "Aktiver denne tilføjelse"
|
558 |
+
|
559 |
+
#: includes/i18n.php:165
|
560 |
+
msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
561 |
+
msgstr "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
562 |
+
|
563 |
+
#: includes/i18n.php:166
|
564 |
+
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?"
|
565 |
+
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?"
|
566 |
+
|
567 |
+
#: includes/i18n.php:167
|
568 |
+
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?"
|
569 |
+
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?"
|
570 |
+
|
571 |
+
#: includes/i18n.php:168
|
572 |
+
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
573 |
+
msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
574 |
+
|
575 |
+
#: includes/i18n.php:169
|
576 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
577 |
+
msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
578 |
+
|
579 |
+
#: includes/i18n.php:170
|
580 |
+
msgid "You can still enjoy all %s features but you will not have access to %s updates and support."
|
581 |
+
msgstr "You can still enjoy all %s features but you will not have access to %s updates and support."
|
582 |
+
|
583 |
+
#: includes/i18n.php:171
|
584 |
+
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
585 |
+
msgstr "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
586 |
+
|
587 |
+
#: includes/i18n.php:172
|
588 |
+
msgid "Are you sure you want to proceed?"
|
589 |
+
msgstr "Er du sikker på, du vil fortsætte?"
|
590 |
+
|
591 |
+
#: includes/i18n.php:175
|
592 |
+
msgid "Add Ons for %s"
|
593 |
+
msgstr "Tilføjelser til %s"
|
594 |
+
|
595 |
+
#: includes/i18n.php:176
|
596 |
+
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."
|
597 |
+
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."
|
598 |
+
|
599 |
+
#: includes/i18n.php:178
|
600 |
+
msgid "Anonymous feedback"
|
601 |
+
msgstr "Anonym feedback"
|
602 |
+
|
603 |
+
#: includes/i18n.php:179
|
604 |
+
msgid "Quick feedback"
|
605 |
+
msgstr "Hurtig feedback"
|
606 |
+
|
607 |
+
#: includes/i18n.php:180
|
608 |
+
msgid "If you have a moment, please let us know why you are %s"
|
609 |
+
msgstr "If you have a moment, please let us know why you are %s"
|
610 |
+
|
611 |
+
#: includes/i18n.php:181
|
612 |
+
msgid "deactivating"
|
613 |
+
msgstr "deactivating"
|
614 |
+
|
615 |
+
#: includes/i18n.php:182
|
616 |
+
msgid "Deactivation"
|
617 |
+
msgstr "Deactivation"
|
618 |
+
|
619 |
+
#: includes/i18n.php:183
|
620 |
+
msgid "Theme Switch"
|
621 |
+
msgstr "Theme Switch"
|
622 |
+
|
623 |
+
#: includes/i18n.php:184
|
624 |
+
msgid "switching"
|
625 |
+
msgstr "switching"
|
626 |
+
|
627 |
+
#: includes/i18n.php:185
|
628 |
+
msgid "Switch"
|
629 |
+
msgstr "Switch"
|
630 |
+
|
631 |
+
#: includes/i18n.php:186
|
632 |
+
msgid "Activate %s"
|
633 |
+
msgstr "Activate %s"
|
634 |
+
|
635 |
+
#: includes/i18n.php:187
|
636 |
+
msgid "Yes - %s"
|
637 |
+
msgstr "Yes - %s"
|
638 |
+
|
639 |
+
#: includes/i18n.php:188
|
640 |
+
msgid "Submit & %s"
|
641 |
+
msgstr "Submit & %s"
|
642 |
+
|
643 |
+
#: includes/i18n.php:189
|
644 |
+
msgid "Cancel"
|
645 |
+
msgstr "Annuller"
|
646 |
+
|
647 |
+
#: includes/i18n.php:190
|
648 |
+
msgid "I no longer need the %s"
|
649 |
+
msgstr "I no longer need the %s"
|
650 |
+
|
651 |
+
#: includes/i18n.php:191
|
652 |
+
msgid "I found a better %s"
|
653 |
+
msgstr "I found a better %s"
|
654 |
+
|
655 |
+
#: includes/i18n.php:192
|
656 |
+
msgid "I only needed the %s for a short period"
|
657 |
+
msgstr "I only needed the %s for a short period"
|
658 |
+
|
659 |
+
#: includes/i18n.php:193
|
660 |
+
msgid "The %s broke my site"
|
661 |
+
msgstr "The %s broke my site"
|
662 |
+
|
663 |
+
#: includes/i18n.php:194
|
664 |
+
msgid "The %s suddenly stopped working"
|
665 |
+
msgstr "The %s suddenly stopped working"
|
666 |
+
|
667 |
+
#: includes/i18n.php:195
|
668 |
+
msgid "I can't pay for it anymore"
|
669 |
+
msgstr "Jeg kan ikke længere betale for det"
|
670 |
+
|
671 |
+
#: includes/i18n.php:196
|
672 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
673 |
+
msgstr "Det er en midlertidig deaktivering. Jeg prøver at fejlfinde et problem."
|
674 |
+
|
675 |
+
#: includes/i18n.php:197
|
676 |
+
msgid "It's a temporary %s. I'm just debugging an issue."
|
677 |
+
msgstr "It's a temporary %s. I'm just debugging an issue."
|
678 |
+
|
679 |
+
#: includes/i18n.php:198
|
680 |
+
msgctxt ""
|
681 |
+
msgid "Other"
|
682 |
+
msgstr "Other"
|
683 |
+
|
684 |
+
#: includes/i18n.php:200
|
685 |
+
msgid "Kindly tell us the reason so we can improve."
|
686 |
+
msgstr "Fortæl os venligst årsagen, så vi kan forbedre det."
|
687 |
+
|
688 |
+
#: includes/i18n.php:201
|
689 |
+
msgid "What's the %s's name?"
|
690 |
+
msgstr "What's the %s's name?"
|
691 |
+
|
692 |
+
#: includes/i18n.php:202
|
693 |
+
msgid "What price would you feel comfortable paying?"
|
694 |
+
msgstr "What price would you feel comfortable paying?"
|
695 |
+
|
696 |
+
#: includes/i18n.php:203
|
697 |
+
msgid "I couldn't understand how to make it work"
|
698 |
+
msgstr "Jeg forstod ikke, hvordan jeg skulle få det til at fungere."
|
699 |
+
|
700 |
+
#: includes/i18n.php:204
|
701 |
+
msgid "The %s is great, but I need specific feature that you don't support"
|
702 |
+
msgstr "The %s is great, but I need specific feature that you don't support"
|
703 |
+
|
704 |
+
#: includes/i18n.php:205
|
705 |
+
msgid "The %s is not working"
|
706 |
+
msgstr "The %s is not working"
|
707 |
+
|
708 |
+
#: includes/i18n.php:206
|
709 |
+
msgid "It's not what I was looking for"
|
710 |
+
msgstr "Det er ikke, hvad jeg søgte"
|
711 |
+
|
712 |
+
#: includes/i18n.php:207
|
713 |
+
msgid "The %s didn't work as expected"
|
714 |
+
msgstr "The %s didn't work as expected"
|
715 |
+
|
716 |
+
#: includes/i18n.php:208
|
717 |
+
msgid "What feature?"
|
718 |
+
msgstr "Hvilken feature?"
|
719 |
+
|
720 |
+
#: includes/i18n.php:209
|
721 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
722 |
+
msgstr "Kindly share what didn't work so we can fix it for future users..."
|
723 |
+
|
724 |
+
#: includes/i18n.php:210
|
725 |
+
msgid "What you've been looking for?"
|
726 |
+
msgstr "What you've been looking for?"
|
727 |
+
|
728 |
+
#: includes/i18n.php:211
|
729 |
+
msgid "What did you expect?"
|
730 |
+
msgstr "Hvad forventede du?"
|
731 |
+
|
732 |
+
#: includes/i18n.php:212
|
733 |
+
msgid "The %s didn't work"
|
734 |
+
msgstr "The %s didn't work"
|
735 |
+
|
736 |
+
#: includes/i18n.php:213
|
737 |
+
msgid "I don't like to share my information with you"
|
738 |
+
msgstr "I don't like to share my information with you"
|
739 |
+
|
740 |
+
#: includes/i18n.php:214
|
741 |
+
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
742 |
+
msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
743 |
+
|
744 |
+
#: includes/i18n.php:218
|
745 |
+
msgctxt "greeting"
|
746 |
+
msgid "Hey %s,"
|
747 |
+
msgstr "Hey %s,"
|
748 |
+
|
749 |
+
#: includes/i18n.php:219
|
750 |
+
msgctxt "a greeting. E.g. Thanks John!"
|
751 |
+
msgid "Thanks %s!"
|
752 |
+
msgstr "Tak %s!"
|
753 |
+
|
754 |
+
#: includes/i18n.php:220
|
755 |
+
msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
756 |
+
msgstr "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
757 |
+
|
758 |
+
#: includes/i18n.php:221
|
759 |
+
msgid "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
760 |
+
msgstr "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
761 |
+
|
762 |
+
#: includes/i18n.php:222
|
763 |
+
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."
|
764 |
+
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."
|
765 |
+
|
766 |
+
#: includes/i18n.php:223
|
767 |
+
msgid "complete the install"
|
768 |
+
msgstr "færdiggør installeringen"
|
769 |
+
|
770 |
+
#: includes/i18n.php:224
|
771 |
+
msgid "start the trial"
|
772 |
+
msgstr "start prøveperioden"
|
773 |
+
|
774 |
+
#: includes/i18n.php:225
|
775 |
+
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
776 |
+
msgstr "Thanks for purchasing %s! To get started, please enter your license key:"
|
777 |
+
|
778 |
+
#: includes/i18n.php:226
|
779 |
+
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."
|
780 |
+
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."
|
781 |
+
|
782 |
+
#: includes/i18n.php:227
|
783 |
+
msgid "What permissions are being granted?"
|
784 |
+
msgstr "Hvilke tilladelser bliver givet?"
|
785 |
+
|
786 |
+
#: includes/i18n.php:228
|
787 |
+
msgid "Your Profile Overview"
|
788 |
+
msgstr "Overblik af din profil"
|
789 |
+
|
790 |
+
#: includes/i18n.php:229
|
791 |
+
msgid "Name and email address"
|
792 |
+
msgstr "Navn og e-mailadresse"
|
793 |
+
|
794 |
+
#: includes/i18n.php:230
|
795 |
+
msgid "Your Site Overview"
|
796 |
+
msgstr "Overblik af dit websted"
|
797 |
+
|
798 |
+
#: includes/i18n.php:231
|
799 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
800 |
+
msgstr "Websteds-URL, WP version, PHP info, plugins og temaer"
|
801 |
+
|
802 |
+
#: includes/i18n.php:232
|
803 |
+
msgid "Current %s Events"
|
804 |
+
msgstr "Current %s Events"
|
805 |
+
|
806 |
+
#: includes/i18n.php:233
|
807 |
+
msgid "Activation, deactivation and uninstall"
|
808 |
+
msgstr "Aktivering, deaktivering og afinstallering"
|
809 |
+
|
810 |
+
#: includes/i18n.php:234
|
811 |
+
msgid "Plugins & Themes"
|
812 |
+
msgstr "Plugins & Temaer"
|
813 |
+
|
814 |
+
#: includes/i18n.php:235
|
815 |
+
msgid "Titles, versions and state."
|
816 |
+
msgstr "Titler, versioner og tilstand."
|
817 |
+
|
818 |
+
#: includes/i18n.php:236
|
819 |
+
msgid "Admin Notices"
|
820 |
+
msgstr "Admin Notices"
|
821 |
+
|
822 |
+
#: includes/i18n.php:237
|
823 |
+
msgid "Newsletter"
|
824 |
+
msgstr "Nyhedsbrev"
|
825 |
+
|
826 |
+
#: includes/i18n.php:238
|
827 |
+
msgid "Updates, announcements, marketing, no spam"
|
828 |
+
msgstr "Updates, announcements, marketing, no spam"
|
829 |
+
|
830 |
+
#: includes/i18n.php:239
|
831 |
+
msgid "Privacy Policy"
|
832 |
+
msgstr "Privatlivspolitik"
|
833 |
+
|
834 |
+
#: includes/i18n.php:240
|
835 |
+
msgid "Terms of Service"
|
836 |
+
msgstr "Servicevilkår"
|
837 |
+
|
838 |
+
#: includes/i18n.php:241
|
839 |
+
msgctxt "as activating plugin"
|
840 |
+
msgid "Activating"
|
841 |
+
msgstr "Aktiverer"
|
842 |
+
|
843 |
+
#: includes/i18n.php:242
|
844 |
+
msgctxt "as in the process of sending an email"
|
845 |
+
msgid "Sending email"
|
846 |
+
msgstr "Sender e-mail"
|
847 |
+
|
848 |
+
#: includes/i18n.php:243
|
849 |
+
msgctxt "button label"
|
850 |
+
msgid "Allow & Continue"
|
851 |
+
msgstr "Tillad & Fortsæt"
|
852 |
+
|
853 |
+
#: includes/i18n.php:244
|
854 |
+
msgctxt "button label"
|
855 |
+
msgid "Agree & Activate License"
|
856 |
+
msgstr "Accepter & aktiver licens"
|
857 |
+
|
858 |
+
#: includes/i18n.php:245
|
859 |
+
msgctxt "verb"
|
860 |
+
msgid "Skip"
|
861 |
+
msgstr "Spring over"
|
862 |
+
|
863 |
+
#: includes/i18n.php:246
|
864 |
+
msgid "Click here to use the plugin anonymously"
|
865 |
+
msgstr "Klik her for at benytte pluginnet anonymt"
|
866 |
+
|
867 |
+
#: includes/i18n.php:247
|
868 |
+
msgid "Re-send activation email"
|
869 |
+
msgstr "Gensend e-mail om aktivering"
|
870 |
+
|
871 |
+
#: includes/i18n.php:248
|
872 |
+
msgid "License key"
|
873 |
+
msgstr "Licensnøgle"
|
874 |
+
|
875 |
+
#: includes/i18n.php:249
|
876 |
+
msgid "Send License Key"
|
877 |
+
msgstr "Send licensnøgle"
|
878 |
+
|
879 |
+
#: includes/i18n.php:250
|
880 |
+
msgid "Sending license key"
|
881 |
+
msgstr "Sender licensnøgle"
|
882 |
+
|
883 |
+
#: includes/i18n.php:251
|
884 |
+
msgid "Have a license key?"
|
885 |
+
msgstr "Har du en licensnøgle?"
|
886 |
+
|
887 |
+
#: includes/i18n.php:252
|
888 |
+
msgid "Don't have a license key?"
|
889 |
+
msgstr "Har du ikke en licensnøgle?"
|
890 |
+
|
891 |
+
#: includes/i18n.php:253
|
892 |
+
msgid "Can't find your license key?"
|
893 |
+
msgstr "Kan du ikke finde din licensnøgle?"
|
894 |
+
|
895 |
+
#: includes/i18n.php:254
|
896 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
897 |
+
msgstr "We couldn't find your email address in the system, are you sure it's the right address?"
|
898 |
+
|
899 |
+
#: includes/i18n.php:255
|
900 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
901 |
+
msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
902 |
+
|
903 |
+
#: includes/i18n.php:256
|
904 |
+
msgid "Opt In"
|
905 |
+
msgstr "Tilmeld"
|
906 |
+
|
907 |
+
#: includes/i18n.php:257
|
908 |
+
msgid "Opt Out"
|
909 |
+
msgstr "Frameld"
|
910 |
+
|
911 |
+
#: includes/i18n.php:258
|
912 |
+
msgid "On second thought - I want to continue helping"
|
913 |
+
msgstr "Ved nærmere eftertanke - Jeg vil fortsætte med at hjælpe"
|
914 |
+
|
915 |
+
#: includes/i18n.php:259
|
916 |
+
msgid "Opting out..."
|
917 |
+
msgstr "Framelder..."
|
918 |
+
|
919 |
+
#: includes/i18n.php:260
|
920 |
+
msgid "Opting in..."
|
921 |
+
msgstr "Tilmelder..."
|
922 |
+
|
923 |
+
#: includes/i18n.php:261
|
924 |
+
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
925 |
+
msgstr "We appreciate your help in making the %s better by letting us track some usage data."
|
926 |
+
|
927 |
+
#: includes/i18n.php:262
|
928 |
+
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."
|
929 |
+
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."
|
930 |
+
|
931 |
+
#: includes/i18n.php:263
|
932 |
+
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
933 |
+
msgstr "Ved at klikke \"Frameld\" vil vi ikke længere sende data fra %s til %s."
|
934 |
+
|
935 |
+
#: includes/i18n.php:267
|
936 |
+
msgid "Screenshots"
|
937 |
+
msgstr "Skærmbilleder"
|
938 |
+
|
939 |
+
#: includes/i18n.php:268
|
940 |
+
msgid "Click to view full-size screenshot %d"
|
941 |
+
msgstr "Click to view full-size screenshot %d"
|
942 |
+
|
943 |
+
#: includes/i18n.php:272
|
944 |
+
msgid "Freemius Debug"
|
945 |
+
msgstr "Freemius Debug"
|
946 |
+
|
947 |
+
#: includes/i18n.php:273
|
948 |
+
msgctxt "as turned on"
|
949 |
+
msgid "On"
|
950 |
+
msgstr "Til"
|
951 |
+
|
952 |
+
#: includes/i18n.php:274
|
953 |
+
msgctxt "as turned off"
|
954 |
+
msgid "Off"
|
955 |
+
msgstr "Fra"
|
956 |
+
|
957 |
+
#: includes/i18n.php:275
|
958 |
+
msgctxt "as code debugging"
|
959 |
+
msgid "Debugging"
|
960 |
+
msgstr "Fejlfinding"
|
961 |
+
|
962 |
+
#: includes/i18n.php:276
|
963 |
+
msgid "Freemius State"
|
964 |
+
msgstr "Freemius tilstand"
|
965 |
+
|
966 |
+
#: includes/i18n.php:277
|
967 |
+
msgctxt "as connection was successful"
|
968 |
+
msgid "Connected"
|
969 |
+
msgstr "Forbundet"
|
970 |
+
|
971 |
+
#: includes/i18n.php:278
|
972 |
+
msgctxt "as connection blocked"
|
973 |
+
msgid "Blocked"
|
974 |
+
msgstr "Blokeret"
|
975 |
+
|
976 |
+
#: includes/i18n.php:279
|
977 |
+
msgctxt "as application program interface"
|
978 |
+
msgid "API"
|
979 |
+
msgstr "API"
|
980 |
+
|
981 |
+
#: includes/i18n.php:280
|
982 |
+
msgctxt "as software development kit versions"
|
983 |
+
msgid "SDK"
|
984 |
+
msgstr "SDK"
|
985 |
+
|
986 |
+
#: includes/i18n.php:281
|
987 |
+
msgctxt "as software development kit versions"
|
988 |
+
msgid "SDK Versions"
|
989 |
+
msgstr "SDK-versioner"
|
990 |
+
|
991 |
+
#: includes/i18n.php:282
|
992 |
+
msgctxt "as plugin folder path"
|
993 |
+
msgid "Plugin Path"
|
994 |
+
msgstr "Plugin-sti"
|
995 |
+
|
996 |
+
#: includes/i18n.php:283
|
997 |
+
msgctxt "as sdk path"
|
998 |
+
msgid "SDK Path"
|
999 |
+
msgstr "SDK-sti"
|
1000 |
+
|
1001 |
+
#: includes/i18n.php:284
|
1002 |
+
msgid "Add Ons of Plugin %s"
|
1003 |
+
msgstr "Tilføjelser til plugin %s"
|
1004 |
+
|
1005 |
+
#: includes/i18n.php:285
|
1006 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1007 |
+
msgstr "Er du sikker på, du vil slette al Freemius data?"
|
1008 |
+
|
1009 |
+
#: includes/i18n.php:286
|
1010 |
+
msgid "Actions"
|
1011 |
+
msgstr "Handlinger"
|
1012 |
+
|
1013 |
+
#: includes/i18n.php:287
|
1014 |
+
msgid "Delete All Accounts"
|
1015 |
+
msgstr "Slet alle konti"
|
1016 |
+
|
1017 |
+
#: includes/i18n.php:288
|
1018 |
+
msgid "Start Fresh"
|
1019 |
+
msgstr "Start forfra"
|
1020 |
+
|
1021 |
+
#: includes/i18n.php:289
|
1022 |
+
msgid "Clear API Cache"
|
1023 |
+
msgstr "Ryd API-cache"
|
1024 |
+
|
1025 |
+
#: includes/i18n.php:290
|
1026 |
+
msgid "Sync Data From Server"
|
1027 |
+
msgstr "Synkroniser data fra server"
|
1028 |
+
|
1029 |
+
#: includes/i18n.php:291
|
1030 |
+
msgid "Scheduled Crons"
|
1031 |
+
msgstr "Planlagte cron jobs"
|
1032 |
+
|
1033 |
+
#: includes/i18n.php:292
|
1034 |
+
msgid "Cron Type"
|
1035 |
+
msgstr "Cron Type"
|
1036 |
+
|
1037 |
+
#: includes/i18n.php:293
|
1038 |
+
msgid "Plugins & Themes Sync"
|
1039 |
+
msgstr "Synkronisering af plugins og temaer"
|
1040 |
+
|
1041 |
+
#: includes/i18n.php:294
|
1042 |
+
msgid "%s Licenses"
|
1043 |
+
msgstr "%s Licenses"
|
1044 |
+
|
1045 |
+
#: includes/i18n.php:295
|
1046 |
+
msgid "Debug Log"
|
1047 |
+
msgstr "Fejlfindingslog"
|
1048 |
+
|
1049 |
+
#: includes/i18n.php:296
|
1050 |
+
msgid "All"
|
1051 |
+
msgstr "Alle"
|
1052 |
+
|
1053 |
+
#: includes/i18n.php:297
|
1054 |
+
msgid "File"
|
1055 |
+
msgstr "Fil"
|
1056 |
+
|
1057 |
+
#: includes/i18n.php:298
|
1058 |
+
msgid "Function"
|
1059 |
+
msgstr "Funktion"
|
1060 |
+
|
1061 |
+
#: includes/i18n.php:299
|
1062 |
+
msgid "Process ID"
|
1063 |
+
msgstr "Proces-ID"
|
1064 |
+
|
1065 |
+
#: includes/i18n.php:300
|
1066 |
+
msgid "Logger"
|
1067 |
+
msgstr "Logger"
|
1068 |
+
|
1069 |
+
#: includes/i18n.php:301
|
1070 |
+
msgid "Message"
|
1071 |
+
msgstr "Besked"
|
1072 |
+
|
1073 |
+
#: includes/i18n.php:302
|
1074 |
+
msgid "Download"
|
1075 |
+
msgstr "Download"
|
1076 |
+
|
1077 |
+
#: includes/i18n.php:303
|
1078 |
+
msgid "Filter"
|
1079 |
+
msgstr "Filter"
|
1080 |
+
|
1081 |
+
#: includes/i18n.php:304
|
1082 |
+
msgid "Type"
|
1083 |
+
msgstr "Type"
|
1084 |
+
|
1085 |
+
#: includes/i18n.php:305
|
1086 |
+
msgid "All Types"
|
1087 |
+
msgstr "Alle typer"
|
1088 |
+
|
1089 |
+
#: includes/i18n.php:306
|
1090 |
+
msgid "All Requests"
|
1091 |
+
msgstr "Alle forespørgsler"
|
1092 |
+
|
1093 |
+
#: includes/i18n.php:310
|
1094 |
+
msgctxt "as congratulations"
|
1095 |
+
msgid "Congrats"
|
1096 |
+
msgstr "Tillykke"
|
1097 |
+
|
1098 |
+
#: includes/i18n.php:311
|
1099 |
+
msgctxt "exclamation"
|
1100 |
+
msgid "Oops"
|
1101 |
+
msgstr "Ups"
|
1102 |
+
|
1103 |
+
#: includes/i18n.php:312
|
1104 |
+
msgctxt "interjection expressing joy or exuberance"
|
1105 |
+
msgid "Yee-haw"
|
1106 |
+
msgstr "Yee-haw"
|
1107 |
+
|
1108 |
+
#: includes/i18n.php:313
|
1109 |
+
msgctxt ""
|
1110 |
+
msgid "W00t"
|
1111 |
+
msgstr "W00t"
|
1112 |
+
|
1113 |
+
#: includes/i18n.php:315
|
1114 |
+
msgctxt "a positive response"
|
1115 |
+
msgid "Right on"
|
1116 |
+
msgstr "Sådan"
|
1117 |
+
|
1118 |
+
#: includes/i18n.php:316
|
1119 |
+
msgctxt ""
|
1120 |
+
msgid "Hmm"
|
1121 |
+
msgstr "Hmm"
|
1122 |
+
|
1123 |
+
#: includes/i18n.php:318
|
1124 |
+
msgid "O.K"
|
1125 |
+
msgstr "O.K"
|
1126 |
+
|
1127 |
+
#: includes/i18n.php:319
|
1128 |
+
msgctxt "exclamation"
|
1129 |
+
msgid "Hey"
|
1130 |
+
msgstr "Hey"
|
1131 |
+
|
1132 |
+
#: includes/i18n.php:320
|
1133 |
+
msgctxt "advance notice of something that will need attention."
|
1134 |
+
msgid "Heads up"
|
1135 |
+
msgstr "Se her"
|
1136 |
+
|
1137 |
+
#: includes/i18n.php:325
|
1138 |
+
msgid "Seems like you got the latest release."
|
1139 |
+
msgstr "Det ser ud til, at du har den seneste udgivelse."
|
1140 |
+
|
1141 |
+
#: includes/i18n.php:326
|
1142 |
+
msgid "You are all good!"
|
1143 |
+
msgstr "Det var det!"
|
1144 |
+
|
1145 |
+
#: includes/i18n.php:327
|
1146 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1147 |
+
msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1148 |
+
|
1149 |
+
#: includes/i18n.php:328
|
1150 |
+
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
1151 |
+
msgstr "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
1152 |
+
|
1153 |
+
#: includes/i18n.php:329
|
1154 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1155 |
+
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1156 |
+
|
1157 |
+
#: includes/i18n.php:330
|
1158 |
+
msgid "Your name was successfully updated."
|
1159 |
+
msgstr "Dit navn er blevet opdateret."
|
1160 |
+
|
1161 |
+
#: includes/i18n.php:331
|
1162 |
+
msgid "You have successfully updated your %s."
|
1163 |
+
msgstr "Opdatering af %s blev gennemført."
|
1164 |
+
|
1165 |
+
#: includes/i18n.php:332
|
1166 |
+
msgid "Please provide your full name."
|
1167 |
+
msgstr "Indtast venligst dit fulde navn."
|
1168 |
+
|
1169 |
+
#: includes/i18n.php:333
|
1170 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1171 |
+
msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1172 |
+
|
1173 |
+
#: includes/i18n.php:334
|
1174 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1175 |
+
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1176 |
+
|
1177 |
+
#: includes/i18n.php:335
|
1178 |
+
msgid "No credit card required"
|
1179 |
+
msgstr "Betalingskort ikke påkrævet"
|
1180 |
+
|
1181 |
+
#: includes/i18n.php:336
|
1182 |
+
msgid "Premium %s version was successfully activated."
|
1183 |
+
msgstr "Premium %s version was successfully activated."
|
1184 |
+
|
1185 |
+
#: includes/i18n.php:337
|
1186 |
+
msgid "The upgrade of %s was successfully completed."
|
1187 |
+
msgstr "Opgraderingen af %s blev fuldendt."
|
1188 |
+
|
1189 |
+
#: includes/i18n.php:338
|
1190 |
+
msgid "Your account was successfully activated with the %s plan."
|
1191 |
+
msgstr "Din konto blev aktiveret med planen %s."
|
1192 |
+
|
1193 |
+
#: includes/i18n.php:339
|
1194 |
+
msgid "Download the latest %s version now"
|
1195 |
+
msgstr "Download den seneste version af %s nu"
|
1196 |
+
|
1197 |
+
#: includes/i18n.php:340
|
1198 |
+
msgid "Please follow these steps to complete the upgrade"
|
1199 |
+
msgstr "Følg venligst disse trin for at færdiggøre opgraderingen"
|
1200 |
+
|
1201 |
+
#: includes/i18n.php:341
|
1202 |
+
msgid "Download the latest %s version"
|
1203 |
+
msgstr "Download den seneste version af %s"
|
1204 |
+
|
1205 |
+
#: includes/i18n.php:342
|
1206 |
+
msgid "Download the latest version"
|
1207 |
+
msgstr "Download den seneste version"
|
1208 |
+
|
1209 |
+
#: includes/i18n.php:343
|
1210 |
+
msgid "Deactivate the free version"
|
1211 |
+
msgstr "Deaktiver den gratis version"
|
1212 |
+
|
1213 |
+
#: includes/i18n.php:344
|
1214 |
+
msgid "Upload and activate the downloaded version"
|
1215 |
+
msgstr "Upload og aktiver den downloadede version"
|
1216 |
+
|
1217 |
+
#: includes/i18n.php:345
|
1218 |
+
msgid "How to upload and activate?"
|
1219 |
+
msgstr "Upload og aktivering, hvordan?"
|
1220 |
+
|
1221 |
+
#: includes/i18n.php:346
|
1222 |
+
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1223 |
+
msgid "%s Add-on was successfully purchased."
|
1224 |
+
msgstr "Betalingen for tilføjelsen %s blev gennemført."
|
1225 |
+
|
1226 |
+
#: includes/i18n.php:348
|
1227 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
1228 |
+
msgstr "Your %s Add-on plan was successfully upgraded."
|
1229 |
+
|
1230 |
+
#: includes/i18n.php:349
|
1231 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
1232 |
+
msgstr "Your email has been successfully verified - you are AWESOME!"
|
1233 |
+
|
1234 |
+
#: includes/i18n.php:350
|
1235 |
+
msgid "Your plan was successfully upgraded."
|
1236 |
+
msgstr "Din plan er blevet opgraderet."
|
1237 |
+
|
1238 |
+
#: includes/i18n.php:351
|
1239 |
+
msgid "Your plan was successfully changed to %s."
|
1240 |
+
msgstr "Din plan er blevet ændret til %s."
|
1241 |
+
|
1242 |
+
#: includes/i18n.php:352
|
1243 |
+
msgid "Your license has expired. You can still continue using the free %s forever."
|
1244 |
+
msgstr "Your license has expired. You can still continue using the free %s forever."
|
1245 |
+
|
1246 |
+
#: includes/i18n.php:353
|
1247 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
1248 |
+
msgstr "Din licens er blevet annulleret. Hvis du mener, dette er en fejl, så kontakt venligst support."
|
1249 |
+
|
1250 |
+
#: includes/i18n.php:354
|
1251 |
+
msgid "Your trial has been successfully started."
|
1252 |
+
msgstr "Din prøveperiode er begyndt."
|
1253 |
+
|
1254 |
+
#: includes/i18n.php:355
|
1255 |
+
msgid "Your license was successfully activated."
|
1256 |
+
msgstr "Din licens er blevet aktiveret."
|
1257 |
+
|
1258 |
+
#: includes/i18n.php:356
|
1259 |
+
msgid "It looks like your site currently doesn't have an active license."
|
1260 |
+
msgstr "Det ser ud til, at dit websted endnu ikke har en aktiv licens."
|
1261 |
+
|
1262 |
+
#: includes/i18n.php:357
|
1263 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
1264 |
+
msgstr "Din licens blev deaktiveret, du er tilbage på planen %s."
|
1265 |
+
|
1266 |
+
#: includes/i18n.php:358
|
1267 |
+
msgid "It looks like the license deactivation failed."
|
1268 |
+
msgstr "Det ser ud til, at licens-deaktiveringen mislykkedes."
|
1269 |
+
|
1270 |
+
#: includes/i18n.php:359
|
1271 |
+
msgid "It looks like the license could not be activated."
|
1272 |
+
msgstr "Det ser ud til, at licensen ikke kunne aktiveres."
|
1273 |
+
|
1274 |
+
#: includes/i18n.php:360
|
1275 |
+
msgid "Error received from the server:"
|
1276 |
+
msgstr "Fejl modtager fra serveren:"
|
1277 |
+
|
1278 |
+
#: includes/i18n.php:361
|
1279 |
+
msgid "Your trial has expired. You can still continue using all our free features."
|
1280 |
+
msgstr "Din prøveperiode er udløbet. Du kan fortsat bruge alle vores gratis funktioner."
|
1281 |
+
|
1282 |
+
#: includes/i18n.php:362
|
1283 |
+
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
1284 |
+
msgstr "Din plan blev nedgraderet. Licensen til din %s plan vil udløbe om %s."
|
1285 |
+
|
1286 |
+
#: includes/i18n.php:363
|
1287 |
+
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1288 |
+
msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1289 |
+
|
1290 |
+
#: includes/i18n.php:364
|
1291 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1292 |
+
msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1293 |
+
|
1294 |
+
#: includes/i18n.php:365
|
1295 |
+
msgid "Your %s free trial was successfully cancelled."
|
1296 |
+
msgstr "Din gratis prøveperiode for %s er blevet annulleret."
|
1297 |
+
|
1298 |
+
#: includes/i18n.php:366
|
1299 |
+
msgctxt "%s - numeric version number"
|
1300 |
+
msgid "Version %s was released."
|
1301 |
+
msgstr "Version %s er blevet udgivet."
|
1302 |
+
|
1303 |
+
#: includes/i18n.php:367
|
1304 |
+
msgid "Please download %s."
|
1305 |
+
msgstr "Download venligst %s."
|
1306 |
+
|
1307 |
+
#: includes/i18n.php:368
|
1308 |
+
msgctxt "%s - plan name, as the latest professional version here"
|
1309 |
+
msgid "the latest %s version here"
|
1310 |
+
msgstr "den seneste version af %s her"
|
1311 |
+
|
1312 |
+
#: includes/i18n.php:370
|
1313 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1314 |
+
msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1315 |
+
|
1316 |
+
#: includes/i18n.php:371
|
1317 |
+
msgctxt "call to action"
|
1318 |
+
msgid "Start free trial"
|
1319 |
+
msgstr "Start gratis prøveperiode"
|
1320 |
+
|
1321 |
+
#: includes/i18n.php:372
|
1322 |
+
msgid "Starting trial"
|
1323 |
+
msgstr "Starter prøveperiode"
|
1324 |
+
|
1325 |
+
#: includes/i18n.php:373
|
1326 |
+
msgid "Please wait"
|
1327 |
+
msgstr "Vent venligst"
|
1328 |
+
|
1329 |
+
#: includes/i18n.php:374
|
1330 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1331 |
+
msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1332 |
+
|
1333 |
+
#: includes/i18n.php:375
|
1334 |
+
msgid "You already utilized a trial before."
|
1335 |
+
msgstr "Du har allerede brugt din prøveperiode."
|
1336 |
+
|
1337 |
+
#: includes/i18n.php:376
|
1338 |
+
msgid "You are already running the %s in a trial mode."
|
1339 |
+
msgstr "You are already running the %s in a trial mode."
|
1340 |
+
|
1341 |
+
#: includes/i18n.php:377
|
1342 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1343 |
+
msgstr "Plan %s eksisterer ikke og kan derfor ikke starte prøveperiode."
|
1344 |
+
|
1345 |
+
#: includes/i18n.php:378
|
1346 |
+
msgid "Plan %s does not support a trial period."
|
1347 |
+
msgstr "Plan %s understøtter ikke en prøveperiode."
|
1348 |
+
|
1349 |
+
#: includes/i18n.php:379
|
1350 |
+
msgid "None of the %s's plans supports a trial period."
|
1351 |
+
msgstr "None of the %s's plans supports a trial period."
|
1352 |
+
|
1353 |
+
#: includes/i18n.php:380
|
1354 |
+
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
1355 |
+
msgstr "Unexpected API error. Please contact the %s's author with the following error."
|
1356 |
+
|
1357 |
+
#: includes/i18n.php:381
|
1358 |
+
msgid "No commitment for %s days - cancel anytime!"
|
1359 |
+
msgstr "Ingen bindinger i %s dage - annuller når som helst!"
|
1360 |
+
|
1361 |
+
#: includes/i18n.php:382
|
1362 |
+
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."
|
1363 |
+
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."
|
1364 |
+
|
1365 |
+
#: includes/i18n.php:383
|
1366 |
+
msgid "Couldn't activate %s."
|
1367 |
+
msgstr "Kunne ikke aktivere %s."
|
1368 |
+
|
1369 |
+
#: includes/i18n.php:384
|
1370 |
+
msgid "Please contact us with the following message:"
|
1371 |
+
msgstr "Kontakt os venligst med følgende besked:"
|
1372 |
+
|
1373 |
+
#: includes/i18n.php:385
|
1374 |
+
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."
|
1375 |
+
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."
|
1376 |
+
|
1377 |
+
#: includes/i18n.php:386
|
1378 |
+
msgid "Please contact us here"
|
1379 |
+
msgstr "Kontakt os her"
|
1380 |
+
|
1381 |
+
#: includes/i18n.php:387
|
1382 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1383 |
+
msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1384 |
+
|
1385 |
+
#: includes/i18n.php:390
|
1386 |
+
msgid "From unknown reason, the API connectivity test failed."
|
1387 |
+
msgstr "From unknown reason, the API connectivity test failed."
|
1388 |
+
|
1389 |
+
#: includes/i18n.php:391
|
1390 |
+
msgid "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
|
1391 |
+
msgstr "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
|
1392 |
+
|
1393 |
+
#: includes/i18n.php:392
|
1394 |
+
msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server."
|
1395 |
+
msgstr "We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server."
|
1396 |
+
|
1397 |
+
#: includes/i18n.php:393
|
1398 |
+
msgid "Disabled method(s):"
|
1399 |
+
msgstr "Disabled method(s):"
|
1400 |
+
|
1401 |
+
#: includes/i18n.php:394
|
1402 |
+
msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1403 |
+
msgstr "Af en ukendt årsag blokerer CloudFlare, vores firewall, forbindelsen."
|
1404 |
+
|
1405 |
+
#: includes/i18n.php:395
|
1406 |
+
msgctxt "as pluginX requires an access to our API"
|
1407 |
+
msgid "%s requires an access to our API."
|
1408 |
+
msgstr "%s påkræver adgang til vores API."
|
1409 |
+
|
1410 |
+
#: includes/i18n.php:397
|
1411 |
+
msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
|
1412 |
+
msgstr "Det ser ud til, at din server benytter Squid ACL (access control lists), som blokerer forbindelsen."
|
1413 |
+
|
1414 |
+
#: includes/i18n.php:398
|
1415 |
+
msgid "I don't know what is Squid or ACL, help me!"
|
1416 |
+
msgstr "Jeg ved ikke hvad Squid eller ACL er. Hjælp mig!"
|
1417 |
+
|
1418 |
+
#: includes/i18n.php399, includes/i18n.php:403
|
1419 |
+
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."
|
1420 |
+
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."
|
1421 |
+
|
1422 |
+
#: includes/i18n.php:400
|
1423 |
+
msgid "I'm a system administrator"
|
1424 |
+
msgstr "Jeg er en system-administrator"
|
1425 |
+
|
1426 |
+
#: includes/i18n.php:401
|
1427 |
+
msgid "Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again."
|
1428 |
+
msgstr "Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again."
|
1429 |
+
|
1430 |
+
#: includes/i18n.php:402
|
1431 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
1432 |
+
msgstr "Jeg ved ikke hvad cURL er, eller hvordan jeg installerer det. Hjælp mig!"
|
1433 |
+
|
1434 |
+
#: includes/i18n.php:404
|
1435 |
+
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."
|
1436 |
+
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."
|
1437 |
+
|
1438 |
+
#: includes/i18n.php:405
|
1439 |
+
msgid "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
|
1440 |
+
msgstr "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
|
1441 |
+
|
1442 |
+
#: includes/i18n.php:406
|
1443 |
+
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1444 |
+
msgstr "Vi beklager ulejligheden, og vi er her for at hjælpe, hvis du giver os chancen."
|
1445 |
+
|
1446 |
+
#: includes/i18n.php:407
|
1447 |
+
msgid "Yes - I'm giving you a chance to fix it"
|
1448 |
+
msgstr "Ja - jeg giver jer en chance for at rette det"
|
1449 |
+
|
1450 |
+
#: includes/i18n.php:408
|
1451 |
+
msgid "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
|
1452 |
+
msgstr "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
|
1453 |
+
|
1454 |
+
#: includes/i18n.php:409
|
1455 |
+
msgid "Let's try your previous version"
|
1456 |
+
msgstr "Lad os prøve din forrige version"
|
1457 |
+
|
1458 |
+
#: includes/i18n.php:410
|
1459 |
+
msgid "Uninstall this version and install the previous one."
|
1460 |
+
msgstr "Afinstaller denne version og installer den forrige."
|
1461 |
+
|
1462 |
+
#: includes/i18n.php:411
|
1463 |
+
msgid "That's exhausting, please deactivate"
|
1464 |
+
msgstr "Det er udmattende, deaktiver venligst"
|
1465 |
+
|
1466 |
+
#: includes/i18n.php:412
|
1467 |
+
msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1468 |
+
msgstr "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1469 |
+
|
1470 |
+
#: includes/i18n.php:413
|
1471 |
+
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."
|
1472 |
+
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."
|
1473 |
+
|
1474 |
+
#: includes/i18n.php:414
|
1475 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
1476 |
+
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1477 |
+
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1478 |
+
|
1479 |
+
#: includes/i18n.php:416
|
1480 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1481 |
+
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1482 |
+
|
1483 |
+
#: includes/i18n.php:419
|
1484 |
+
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."
|
1485 |
+
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."
|
1486 |
+
|
1487 |
+
#: includes/i18n.php:420
|
1488 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1489 |
+
msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1490 |
+
|
1491 |
+
#: includes/i18n.php:421
|
1492 |
+
msgid "%s is the new owner of the account."
|
1493 |
+
msgstr "%s er den nye ejer af kontoen."
|
1494 |
+
|
1495 |
+
#: includes/i18n.php:423
|
1496 |
+
msgctxt "addonX cannot run without pluginY"
|
1497 |
+
msgid "%s cannot run without %s."
|
1498 |
+
msgstr "%s virker ikke uden %s."
|
1499 |
+
|
1500 |
+
#: includes/i18n.php:425
|
1501 |
+
msgctxt "addonX cannot run..."
|
1502 |
+
msgid "%s cannot run without the plugin."
|
1503 |
+
msgstr "%s virker ikke uden pluginnet."
|
1504 |
+
|
1505 |
+
#: includes/i18n.php:426
|
1506 |
+
msgctxt "pluginX activation was successfully..."
|
1507 |
+
msgid "%s activation was successfully completed."
|
1508 |
+
msgstr "Aktivering af %s blev gennemført."
|
1509 |
+
|
1510 |
+
#: includes/i18n.php:428
|
1511 |
+
msgctxt "Plugin installer section title"
|
1512 |
+
msgid "Features & Pricing"
|
1513 |
+
msgstr "Funktioner og priser"
|
1514 |
+
|
1515 |
+
#: includes/i18n.php:429
|
1516 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1517 |
+
msgstr "Add-on must be deployed to WordPress.org or Freemius."
|
1518 |
+
|
1519 |
+
#: includes/i18n.php:430
|
1520 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1521 |
+
msgstr "Paid add-on must be deployed to Freemius."
|
1522 |
+
|
1523 |
+
#: includes/i18n.php:434
|
1524 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1525 |
+
msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1526 |
+
|
1527 |
+
#: includes/i18n.php:435
|
1528 |
+
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."
|
1529 |
+
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."
|
1530 |
+
|
1531 |
+
#: includes/i18n.php:440
|
1532 |
+
msgctxt "as every month"
|
1533 |
+
msgid "Monthly"
|
1534 |
+
msgstr "Månedligt"
|
1535 |
+
|
1536 |
+
#: includes/i18n.php:441
|
1537 |
+
msgctxt "as monthly period"
|
1538 |
+
msgid "mo"
|
1539 |
+
msgstr "md"
|
1540 |
+
|
1541 |
+
#: includes/i18n.php:442
|
1542 |
+
msgctxt "as once a year"
|
1543 |
+
msgid "Annual"
|
1544 |
+
msgstr "Årligt"
|
1545 |
+
|
1546 |
+
#: includes/i18n.php:443
|
1547 |
+
msgctxt "as once a year"
|
1548 |
+
msgid "Annually"
|
1549 |
+
msgstr "Årligt"
|
1550 |
+
|
1551 |
+
#: includes/i18n.php:444
|
1552 |
+
msgctxt "as once a year"
|
1553 |
+
msgid "Once"
|
1554 |
+
msgstr "Engangsbeløb"
|
1555 |
+
|
1556 |
+
#: includes/i18n.php:445
|
1557 |
+
msgctxt "as annual period"
|
1558 |
+
msgid "year"
|
1559 |
+
msgstr "år"
|
1560 |
+
|
1561 |
+
#: includes/i18n.php:446
|
1562 |
+
msgid "Lifetime"
|
1563 |
+
msgstr "Livstid"
|
1564 |
+
|
1565 |
+
#: includes/i18n.php:447
|
1566 |
+
msgctxt "e.g. the best product"
|
1567 |
+
msgid "Best"
|
1568 |
+
msgstr "Bedste"
|
1569 |
+
|
1570 |
+
#: includes/i18n.php:448
|
1571 |
+
msgctxt "e.g. billed monthly"
|
1572 |
+
msgid "Billed %s"
|
1573 |
+
msgstr "Faktureret %s"
|
1574 |
+
|
1575 |
+
#: includes/i18n.php:449
|
1576 |
+
msgctxt "as a discount of $5 or 10%"
|
1577 |
+
msgid "Save %s"
|
1578 |
+
msgstr "Spar %s"
|
1579 |
+
|
1580 |
+
#: includes/i18n.php:451
|
1581 |
+
msgid "View details"
|
1582 |
+
msgstr "Vis detaljer"
|
1583 |
+
|
1584 |
+
#: includes/i18n.php:455
|
1585 |
+
msgctxt "button label"
|
1586 |
+
msgid "Approve & Start Trial"
|
1587 |
+
msgstr "Godkend & start prøveperiode"
|
1588 |
+
|
1589 |
+
#: includes/i18n.php:457
|
1590 |
+
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1591 |
+
msgstr "Du er 1 klik fra at begynde din %1$s dages gratis prøveperiode af planen %2$s."
|
1592 |
+
|
1593 |
+
#: includes/i18n.php:459
|
1594 |
+
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."
|
1595 |
+
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."
|
1596 |
+
|
1597 |
+
#: includes/i18n.php:465
|
1598 |
+
msgid "Business name"
|
1599 |
+
msgstr "Firmanavn"
|
1600 |
+
|
1601 |
+
#: includes/i18n.php:466
|
1602 |
+
msgid "Tax / VAT ID"
|
1603 |
+
msgstr "Moms / VAT ID"
|
1604 |
+
|
1605 |
+
#: includes/i18n.php:467
|
1606 |
+
msgid "Address Line %d"
|
1607 |
+
msgstr "Adresselinje %d"
|
1608 |
+
|
1609 |
+
#: includes/i18n.php:468
|
1610 |
+
msgid "Country"
|
1611 |
+
msgstr "Land"
|
1612 |
+
|
1613 |
+
#: includes/i18n.php:469
|
1614 |
+
msgid "Select Country"
|
1615 |
+
msgstr "Vælg land"
|
1616 |
+
|
1617 |
+
#: includes/i18n.php:470
|
1618 |
+
msgid "City"
|
1619 |
+
msgstr "By"
|
1620 |
+
|
1621 |
+
#: includes/i18n.php:471
|
1622 |
+
msgid "Town"
|
1623 |
+
msgstr "By"
|
1624 |
+
|
1625 |
+
#: includes/i18n.php:472
|
1626 |
+
msgid "State"
|
1627 |
+
msgstr "Stat"
|
1628 |
+
|
1629 |
+
#: includes/i18n.php:473
|
1630 |
+
msgid "Province"
|
1631 |
+
msgstr "Provins"
|
1632 |
+
|
1633 |
+
#: includes/i18n.php:474
|
1634 |
+
msgid "ZIP / Postal Code"
|
1635 |
+
msgstr "ZIP / Postnummer"
|
1636 |
+
|
1637 |
+
#: includes/i18n.php:479
|
1638 |
+
msgid "Installing plugin: %s"
|
1639 |
+
msgstr "Installing plugin: %s"
|
1640 |
+
|
1641 |
+
#: includes/i18n.php:480
|
1642 |
+
msgid "Automatic Installation"
|
1643 |
+
msgstr "Automatic Installation"
|
1644 |
+
|
1645 |
+
#: includes/i18n.php:482
|
1646 |
+
msgid "%s sec"
|
1647 |
+
msgstr "%s sec"
|
1648 |
+
|
1649 |
+
#: includes/i18n.php:483
|
1650 |
+
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."
|
1651 |
+
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."
|
1652 |
+
|
1653 |
+
#: includes/i18n.php:484
|
1654 |
+
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."
|
1655 |
+
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."
|
1656 |
+
|
1657 |
+
#: includes/i18n.php:485
|
1658 |
+
msgid "Cancel Installation"
|
1659 |
+
msgstr "Cancel Installation"
|
1660 |
+
|
1661 |
+
#: includes/i18n.php:486
|
1662 |
+
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
1663 |
+
msgstr "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
1664 |
+
|
1665 |
+
#: includes/i18n.php:487
|
1666 |
+
msgid "Invalid module ID."
|
1667 |
+
msgstr "Invalid module ID."
|
1668 |
+
|
1669 |
+
#: includes/i18n.php:488
|
1670 |
+
msgid "Auto installation only works for opted-in users."
|
1671 |
+
msgstr "Auto installation only works for opted-in users."
|
1672 |
+
|
1673 |
+
#: includes/i18n.php:489
|
1674 |
+
msgid "Premium version already active."
|
1675 |
+
msgstr "Premium version already active."
|
1676 |
+
|
1677 |
+
#: includes/i18n.php:490
|
1678 |
+
msgid "Premium add-on version already installed."
|
1679 |
+
msgstr "Premium add-on version already installed."
|
1680 |
+
|
1681 |
+
#: includes/i18n.php:491
|
1682 |
+
msgid "You do not have a valid license to access the premium version."
|
1683 |
+
msgstr "You do not have a valid license to access the premium version."
|
1684 |
+
|
1685 |
+
#: includes/i18n.php:492
|
1686 |
+
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
1687 |
+
msgstr "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
1688 |
+
|
1689 |
+
#: includes/i18n.php:496
|
1690 |
+
msgid "Secure HTTPS %s page, running from an external domain"
|
1691 |
+
msgstr "Secure HTTPS %s page, running from an external domain"
|
1692 |
+
|
1693 |
+
#: includes/i18n.php:497
|
1694 |
+
msgid "PCI compliant"
|
1695 |
+
msgstr "PCI compliant"
|
1696 |
+
|
1697 |
+
#: includes/i18n.php:498
|
1698 |
+
msgid "View paid features"
|
1699 |
+
msgstr "View paid features"
|
1700 |
+
|
1701 |
+
#: includes/i18n.php:512
|
1702 |
+
msgctxt "Plugin installer section title"
|
1703 |
+
msgid "Description"
|
1704 |
+
msgstr "Beskrivelse"
|
1705 |
+
|
1706 |
+
#: includes/i18n.php:513
|
1707 |
+
msgctxt "Plugin installer section title"
|
1708 |
+
msgid "Installation"
|
1709 |
+
msgstr "Installering"
|
1710 |
+
|
1711 |
+
#: includes/i18n.php:514
|
1712 |
+
msgctxt "Plugin installer section title"
|
1713 |
+
msgid "FAQ"
|
1714 |
+
msgstr "FAQ"
|
1715 |
+
|
1716 |
+
#: includes/i18n.php:515
|
1717 |
+
msgctxt "Plugin installer section title"
|
1718 |
+
msgid "Changelog"
|
1719 |
+
msgstr "Ændringslog"
|
1720 |
+
|
1721 |
+
#: includes/i18n.php:516
|
1722 |
+
msgctxt "Plugin installer section title"
|
1723 |
+
msgid "Reviews"
|
1724 |
+
msgstr "Anmeldelser"
|
1725 |
+
|
1726 |
+
#: includes/i18n.php:517
|
1727 |
+
msgctxt "Plugin installer section title"
|
1728 |
+
msgid "Other Notes"
|
1729 |
+
msgstr "Andre noter"
|
1730 |
+
|
1731 |
+
#: includes/i18n.php:519
|
1732 |
+
msgid "%s star"
|
1733 |
+
msgstr "%s stjerne"
|
1734 |
+
|
1735 |
+
#: includes/i18n.php:521
|
1736 |
+
msgid "%s stars"
|
1737 |
+
msgstr "%s stjerner"
|
1738 |
+
|
1739 |
+
#: includes/i18n.php:523
|
1740 |
+
msgid "%s rating"
|
1741 |
+
msgstr "%s vurdering"
|
1742 |
+
|
1743 |
+
#: includes/i18n.php:525
|
1744 |
+
msgid "%s ratings"
|
1745 |
+
msgstr "%s vurderinger"
|
1746 |
+
|
1747 |
+
#: includes/i18n.php:527
|
1748 |
+
msgid "%s time"
|
1749 |
+
msgstr "%s gang"
|
1750 |
+
|
1751 |
+
#: includes/i18n.php:529
|
1752 |
+
msgid "%s times"
|
1753 |
+
msgstr "%s gange"
|
1754 |
+
|
1755 |
+
#: includes/i18n.php:531
|
1756 |
+
msgid "Click to see reviews that provided a rating of %s"
|
1757 |
+
msgstr "Click to see reviews that provided a rating of %s"
|
1758 |
+
|
1759 |
+
#: includes/i18n.php:532
|
1760 |
+
msgid "Last Updated"
|
1761 |
+
msgstr "Senest opdateret"
|
1762 |
+
|
1763 |
+
#: includes/i18n.php:533
|
1764 |
+
msgid "Requires WordPress Version:"
|
1765 |
+
msgstr "Kræver WordPress-version:"
|
1766 |
+
|
1767 |
+
#: includes/i18n.php:534
|
1768 |
+
msgctxt "as the plugin author"
|
1769 |
+
msgid "Author:"
|
1770 |
+
msgstr "Forfatter:"
|
1771 |
+
|
1772 |
+
#: includes/i18n.php:535
|
1773 |
+
msgid "Compatible up to:"
|
1774 |
+
msgstr "Kompatibel op til:"
|
1775 |
+
|
1776 |
+
#: includes/i18n.php:536
|
1777 |
+
msgid "Downloaded:"
|
1778 |
+
msgstr "Hentet:"
|
1779 |
+
|
1780 |
+
#: includes/i18n.php:537
|
1781 |
+
msgid "WordPress.org Plugin Page"
|
1782 |
+
msgstr "WordPress.org Plugin-side"
|
1783 |
+
|
1784 |
+
#: includes/i18n.php:538
|
1785 |
+
msgid "Plugin Homepage"
|
1786 |
+
msgstr "Plugin-websted"
|
1787 |
+
|
1788 |
+
#: includes/i18n.php:539
|
1789 |
+
msgid "Donate to this plugin"
|
1790 |
+
msgstr "Donér til dette plugin"
|
1791 |
+
|
1792 |
+
#: includes/i18n.php:540
|
1793 |
+
msgid "Average Rating"
|
1794 |
+
msgstr "Gennemsnitlig vurdering"
|
1795 |
+
|
1796 |
+
#: includes/i18n.php:541
|
1797 |
+
msgid "based on %s"
|
1798 |
+
msgstr "baseret på %s"
|
1799 |
+
|
1800 |
+
#: includes/i18n.php:542
|
1801 |
+
msgid "Warning:"
|
1802 |
+
msgstr "Advarsel:"
|
1803 |
+
|
1804 |
+
#: includes/i18n.php:543
|
1805 |
+
msgid "Contributors"
|
1806 |
+
msgstr "Bidragsydere"
|
1807 |
+
|
1808 |
+
#: includes/i18n.php:544
|
1809 |
+
msgid "Plugin Install"
|
1810 |
+
msgstr "Plugin Install"
|
1811 |
+
|
1812 |
+
#: includes/i18n.php:545
|
1813 |
+
msgid "This plugin has not been tested with your current version of WordPress."
|
1814 |
+
msgstr "This plugin has not been tested with your current version of WordPress."
|
1815 |
+
|
1816 |
+
#: includes/i18n.php:546
|
1817 |
+
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1818 |
+
msgstr "This plugin has not been marked as compatible with your version of WordPress."
|
1819 |
+
|
1820 |
+
#: includes/i18n.php:547
|
1821 |
+
msgid "Newer Version (%s) Installed"
|
1822 |
+
msgstr "Nyere version (%s) installeret"
|
1823 |
+
|
1824 |
+
#: includes/i18n.php:548
|
1825 |
+
msgid "Latest Version Installed"
|
1826 |
+
msgstr "Seneste version installeret"
|
freemius/languages/freemius-en.mo
CHANGED
Binary file
|
freemius/languages/freemius-en.po
CHANGED
@@ -14,1811 +14,1963 @@ msgstr ""
|
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"MIME-Version: 1.0\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
-
"X-Poedit-KeywordsList:
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
20 |
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
|
22 |
-
#: includes/
|
23 |
-
msgid "
|
24 |
-
msgstr "
|
25 |
-
|
26 |
-
#: includes/i18n.php:38
|
27 |
-
msgid "Add-On"
|
28 |
-
msgstr "Add-On"
|
29 |
|
30 |
-
#: includes/
|
31 |
-
msgid "
|
32 |
-
msgstr "
|
33 |
|
34 |
-
#: includes/
|
35 |
-
msgid "
|
36 |
-
msgstr "
|
37 |
|
38 |
-
#: includes/
|
39 |
-
msgid "
|
40 |
-
msgstr "
|
41 |
|
42 |
-
#: includes/
|
43 |
-
msgid "
|
44 |
-
msgstr "
|
45 |
|
46 |
-
#: includes/
|
47 |
-
msgid "
|
48 |
-
msgstr "
|
49 |
|
50 |
-
#: includes/
|
51 |
-
msgid "
|
52 |
-
msgstr "
|
53 |
|
54 |
-
#: includes/
|
55 |
-
|
56 |
-
|
57 |
-
msgstr "Upgrade"
|
58 |
|
59 |
-
#: includes/
|
60 |
-
msgid "
|
61 |
-
msgstr "
|
62 |
|
63 |
-
#: includes/
|
64 |
-
|
65 |
-
|
66 |
-
msgstr "Pricing"
|
67 |
|
68 |
-
#: includes/
|
69 |
-
|
70 |
-
|
71 |
-
msgstr "Price"
|
72 |
|
73 |
-
#: includes/
|
74 |
-
msgid "
|
75 |
-
msgstr "
|
76 |
|
77 |
-
#: includes/
|
78 |
-
|
79 |
-
|
80 |
-
msgstr "Downgrade"
|
81 |
|
82 |
-
#: includes/
|
83 |
-
|
84 |
-
|
85 |
-
msgstr "Cancel Subscription"
|
86 |
|
87 |
-
#: includes/
|
88 |
-
msgid "
|
89 |
-
msgstr "
|
90 |
|
91 |
-
#: includes/
|
92 |
-
msgid "
|
93 |
-
msgstr "
|
94 |
|
95 |
-
#: includes/
|
96 |
-
msgid "
|
97 |
-
msgstr "
|
98 |
|
99 |
-
#: includes/
|
100 |
-
msgid "
|
101 |
-
msgstr "
|
102 |
|
103 |
-
#: includes/
|
104 |
-
msgid "
|
105 |
-
msgstr "
|
106 |
|
107 |
-
#: includes/
|
108 |
-
msgid "
|
109 |
-
msgstr "
|
110 |
|
111 |
-
#: includes/
|
112 |
-
msgid "
|
113 |
-
msgstr "
|
114 |
|
115 |
-
#: includes/
|
116 |
-
|
117 |
-
|
118 |
-
msgstr "Delete"
|
119 |
|
120 |
-
#: includes/
|
121 |
-
|
122 |
-
|
123 |
-
msgstr "Show"
|
124 |
|
125 |
-
#: includes/
|
126 |
-
|
127 |
-
|
128 |
-
msgstr "Hide"
|
129 |
|
130 |
-
#: includes/
|
131 |
-
|
132 |
-
|
133 |
-
msgstr "Edit"
|
134 |
|
135 |
-
#: includes/
|
136 |
-
|
137 |
-
|
138 |
-
msgstr "Update"
|
139 |
|
140 |
-
#: includes/
|
141 |
-
msgid "
|
142 |
-
msgstr "
|
143 |
|
144 |
-
#: includes/
|
145 |
-
msgid "
|
146 |
-
msgstr "
|
147 |
|
148 |
-
#: includes/
|
149 |
-
msgid "
|
150 |
-
msgstr "
|
151 |
|
152 |
-
#: includes/
|
153 |
-
msgid "
|
154 |
-
msgstr "
|
155 |
|
156 |
-
#: includes/
|
157 |
-
msgid "
|
158 |
-
msgstr "
|
159 |
|
160 |
-
#: includes/
|
161 |
-
|
162 |
-
|
|
|
163 |
|
164 |
-
#: includes/
|
165 |
-
|
166 |
-
|
167 |
-
msgstr "Dismiss"
|
168 |
|
169 |
-
#: includes/
|
170 |
-
msgctxt "
|
171 |
-
msgid "
|
172 |
-
msgstr "
|
173 |
|
174 |
-
#: includes/
|
175 |
-
|
176 |
-
|
|
|
177 |
|
178 |
-
#: includes/
|
179 |
-
|
180 |
-
|
181 |
-
msgstr "Download %s Version"
|
182 |
|
183 |
-
#: includes/
|
184 |
-
|
185 |
-
|
186 |
-
msgstr "Download %s version now"
|
187 |
|
188 |
-
#: includes/
|
189 |
-
msgctxt "
|
190 |
-
msgid "
|
191 |
-
msgstr "
|
192 |
|
193 |
-
#: includes/
|
194 |
-
msgctxt "E.g. you have a professional license."
|
195 |
msgid "You have a %s license."
|
196 |
msgstr "You have a %s license."
|
197 |
|
198 |
-
#: includes/
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
#: includes/i18n.php:78
|
203 |
-
msgid "Free"
|
204 |
-
msgstr "Free"
|
205 |
|
206 |
-
#: includes/
|
207 |
-
|
208 |
-
|
209 |
-
msgstr "Trial"
|
210 |
|
211 |
-
#: includes/
|
212 |
-
|
213 |
-
|
214 |
-
msgstr "Start Trial"
|
215 |
|
216 |
-
#: includes/
|
217 |
-
|
218 |
-
|
219 |
-
msgstr "Purchase"
|
220 |
|
221 |
-
#: includes/
|
222 |
msgid "Purchase License"
|
223 |
msgstr "Purchase License"
|
224 |
|
225 |
-
#: includes/
|
226 |
-
|
227 |
-
|
228 |
-
msgstr "Buy"
|
229 |
-
|
230 |
-
#: includes/i18n.php:84
|
231 |
-
msgid "Buy License"
|
232 |
-
msgstr "Buy License"
|
233 |
-
|
234 |
-
#: includes/i18n.php:85
|
235 |
-
msgid "Single Site License"
|
236 |
-
msgstr "Single Site License"
|
237 |
-
|
238 |
-
#: includes/i18n.php:86
|
239 |
-
msgid "Unlimited Licenses"
|
240 |
-
msgstr "Unlimited Licenses"
|
241 |
-
|
242 |
-
#: includes/i18n.php:87
|
243 |
-
msgid "Up to %s Sites"
|
244 |
-
msgstr "Up to %s Sites"
|
245 |
-
|
246 |
-
#: includes/i18n.php:88
|
247 |
-
msgid "%sRenew your license now%s to access version %s features and support."
|
248 |
-
msgstr "%sRenew your license now%s to access version %s features and support."
|
249 |
|
250 |
-
#: includes/
|
251 |
-
msgid "
|
252 |
-
msgstr "
|
253 |
|
254 |
-
#: includes/
|
255 |
-
|
256 |
-
|
257 |
-
msgstr "%s Plan"
|
258 |
|
259 |
-
#: includes/
|
260 |
msgid "You are just one step away - %s"
|
261 |
msgstr "You are just one step away - %s"
|
262 |
|
263 |
-
#: includes/
|
264 |
-
msgctxt "%s - plugin name. As complete \"
|
265 |
msgid "Complete \"%s\" Activation Now"
|
266 |
msgstr "Complete \"%s\" Activation Now"
|
267 |
|
268 |
-
#: includes/
|
269 |
msgid "We made a few tweaks to the %s, %s"
|
270 |
msgstr "We made a few tweaks to the %s, %s"
|
271 |
|
272 |
-
#: includes/
|
273 |
-
msgid "Opt
|
274 |
-
msgstr "Opt
|
275 |
|
276 |
-
#: includes/
|
277 |
-
msgid "
|
278 |
-
msgstr "
|
279 |
|
280 |
-
#: includes/
|
281 |
-
msgid "
|
282 |
-
msgstr "
|
283 |
|
284 |
-
#: includes/
|
285 |
-
|
286 |
-
|
287 |
-
msgstr "Expiration"
|
288 |
|
289 |
-
#: includes/
|
290 |
-
|
291 |
-
|
292 |
-
msgstr "License"
|
293 |
|
294 |
-
#: includes/
|
295 |
-
msgid "
|
296 |
-
msgstr "
|
297 |
|
298 |
-
#: includes/
|
299 |
-
msgid "
|
300 |
-
msgstr "
|
301 |
|
302 |
-
#: includes/
|
303 |
-
|
304 |
-
|
305 |
-
msgstr "Expires in %s"
|
306 |
|
307 |
-
#: includes/
|
308 |
-
msgctxt "
|
309 |
-
msgid "
|
310 |
-
msgstr "
|
311 |
|
312 |
-
#: includes/
|
313 |
-
msgid "
|
314 |
-
msgstr "
|
315 |
|
316 |
-
#: includes/
|
317 |
-
msgid "
|
318 |
-
msgstr "
|
319 |
|
320 |
-
#: includes/
|
321 |
-
msgid "
|
322 |
-
msgstr "
|
323 |
|
324 |
-
#: includes/
|
325 |
-
|
326 |
-
|
327 |
-
msgstr "In %s"
|
328 |
|
329 |
-
#: includes/
|
330 |
-
|
331 |
-
|
332 |
-
msgstr "%s ago"
|
333 |
|
334 |
-
#: includes/
|
335 |
-
msgid "
|
336 |
-
msgstr "
|
337 |
|
338 |
-
#: includes/
|
339 |
-
|
340 |
-
|
341 |
-
msgstr "Version"
|
342 |
|
343 |
-
#: includes/
|
344 |
-
msgid "
|
345 |
-
msgstr "
|
346 |
|
347 |
-
#: includes/
|
348 |
-
msgid "
|
349 |
-
msgstr "
|
350 |
|
351 |
-
#: includes/
|
352 |
-
msgid "
|
353 |
-
msgstr "
|
354 |
|
355 |
-
#: includes/
|
356 |
-
msgid "
|
357 |
-
msgstr "
|
358 |
|
359 |
-
#: includes/
|
360 |
-
|
361 |
-
|
|
|
362 |
|
363 |
-
#: includes/
|
364 |
-
msgid "
|
365 |
-
msgstr "
|
366 |
|
367 |
-
#: includes/
|
368 |
-
msgid "
|
369 |
-
msgstr "
|
370 |
|
371 |
-
#: includes/
|
372 |
-
|
373 |
-
|
|
|
374 |
|
375 |
-
#: includes/
|
376 |
-
msgid "
|
377 |
-
msgstr "
|
378 |
|
379 |
-
#: includes/
|
380 |
-
msgid "
|
381 |
-
msgstr "
|
382 |
|
383 |
-
#: includes/
|
384 |
-
|
385 |
-
|
386 |
-
msgstr "Path"
|
387 |
|
388 |
-
#: includes/
|
389 |
-
|
390 |
-
|
|
|
391 |
|
392 |
-
#: includes/
|
393 |
-
msgid "
|
394 |
-
msgstr "
|
395 |
|
396 |
-
#: includes/
|
397 |
-
msgid "
|
398 |
-
msgstr "
|
399 |
|
400 |
-
#: includes/
|
401 |
-
msgctxt "
|
402 |
-
msgid "
|
403 |
-
msgstr "
|
404 |
|
405 |
-
#: includes/
|
406 |
-
msgid "
|
407 |
-
msgstr "
|
408 |
|
409 |
-
#: includes/
|
410 |
-
|
411 |
-
|
|
|
412 |
|
413 |
-
#: includes/
|
414 |
-
msgid "%s
|
415 |
-
msgstr "%s
|
416 |
|
417 |
-
#: includes/
|
418 |
-
|
419 |
-
|
420 |
-
msgstr "Sites"
|
421 |
|
422 |
-
#: includes/
|
423 |
-
msgid "
|
424 |
-
msgstr "
|
425 |
|
426 |
-
#: includes/
|
427 |
-
msgid "
|
428 |
-
msgstr "
|
429 |
|
430 |
-
#: includes/
|
431 |
-
msgid "
|
432 |
-
msgstr "
|
433 |
|
434 |
-
#: includes/
|
435 |
-
msgid "
|
436 |
-
msgstr "
|
437 |
|
438 |
-
#: includes/
|
439 |
-
|
440 |
-
|
441 |
-
msgstr "No Secret"
|
442 |
|
443 |
-
#: includes/
|
444 |
-
msgid "
|
445 |
-
msgstr "
|
446 |
|
447 |
-
#: includes/
|
448 |
-
|
449 |
-
|
450 |
-
msgstr "Sync License"
|
451 |
|
452 |
-
#: includes/
|
453 |
-
|
454 |
-
|
455 |
-
msgstr "Sync"
|
456 |
|
457 |
-
#: includes/
|
458 |
-
msgid "
|
459 |
-
msgstr "
|
460 |
|
461 |
-
#: includes/
|
462 |
-
msgid "
|
463 |
-
msgstr "
|
464 |
|
465 |
-
#: includes/
|
466 |
-
msgid "
|
467 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
|
469 |
-
#: includes/
|
470 |
-
msgid "
|
471 |
-
msgstr "
|
472 |
|
473 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
msgid "Change License"
|
475 |
msgstr "Change License"
|
476 |
|
477 |
-
#: includes/
|
478 |
-
msgid "
|
479 |
-
msgstr "
|
480 |
|
481 |
-
#: includes/
|
482 |
-
msgid "
|
483 |
-
msgstr "
|
484 |
|
485 |
-
#: includes/
|
486 |
-
msgid "
|
487 |
-
msgstr "
|
488 |
|
489 |
-
#: includes/
|
490 |
-
msgid "
|
491 |
-
msgstr "
|
492 |
|
493 |
-
#: includes/
|
494 |
-
msgid "
|
495 |
-
msgstr "
|
496 |
|
497 |
-
#: includes/
|
498 |
-
msgid "
|
499 |
-
msgstr "
|
500 |
|
501 |
-
#: includes/
|
502 |
-
msgid "
|
503 |
-
msgstr "
|
504 |
|
505 |
-
#: includes/
|
506 |
-
msgid "
|
507 |
-
msgstr "
|
508 |
|
509 |
-
#: includes/
|
510 |
-
|
511 |
-
|
512 |
-
msgstr "Active"
|
513 |
|
514 |
-
#: includes/
|
515 |
-
|
516 |
-
|
517 |
-
msgstr "Is Active"
|
518 |
|
519 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
msgid "Install Now"
|
521 |
msgstr "Install Now"
|
522 |
|
523 |
-
#: includes/
|
524 |
msgid "Install Update Now"
|
525 |
msgstr "Install Update Now"
|
526 |
|
527 |
-
#: includes/
|
528 |
-
msgid "
|
529 |
-
msgstr "
|
530 |
|
531 |
-
#: includes/
|
532 |
-
msgid "
|
533 |
-
msgstr "
|
534 |
|
535 |
-
#: includes/
|
536 |
-
msgctxt "
|
537 |
-
msgid "
|
538 |
-
msgstr "
|
539 |
|
540 |
-
#: includes/
|
541 |
-
msgctxt "
|
542 |
-
msgid "
|
543 |
-
msgstr "
|
544 |
|
545 |
-
#: includes/
|
546 |
-
|
547 |
-
|
|
|
548 |
|
549 |
-
#: includes/
|
550 |
-
msgid "
|
551 |
-
msgstr "
|
552 |
|
553 |
-
#: includes/
|
554 |
-
|
555 |
-
|
|
|
556 |
|
557 |
-
#: includes/
|
558 |
-
|
559 |
-
|
|
|
560 |
|
561 |
-
#: includes/
|
562 |
-
|
563 |
-
|
|
|
564 |
|
565 |
-
#: includes/
|
566 |
-
|
567 |
-
|
|
|
568 |
|
569 |
-
#: includes/
|
570 |
-
msgid "
|
571 |
-
msgstr "
|
572 |
|
573 |
-
#: includes/
|
574 |
-
|
575 |
-
|
|
|
576 |
|
577 |
-
#: includes/
|
578 |
-
|
579 |
-
|
|
|
580 |
|
581 |
-
#: includes/
|
582 |
-
|
583 |
-
|
|
|
584 |
|
585 |
-
#: includes/
|
586 |
-
|
587 |
-
|
|
|
588 |
|
589 |
-
#: includes/
|
590 |
-
msgid "
|
591 |
-
msgstr "
|
592 |
|
593 |
-
#: includes/
|
594 |
-
|
595 |
-
|
|
|
596 |
|
597 |
-
#: includes/
|
598 |
-
|
599 |
-
|
|
|
600 |
|
601 |
-
#: includes/
|
602 |
-
|
603 |
-
|
|
|
604 |
|
605 |
-
#: includes/
|
606 |
-
msgid "
|
607 |
-
msgstr "
|
608 |
|
609 |
-
#: includes/
|
610 |
-
msgid "
|
611 |
-
msgstr "
|
612 |
|
613 |
-
#: includes/
|
614 |
-
msgid "
|
615 |
-
msgstr "
|
616 |
|
617 |
-
#: includes/
|
618 |
-
|
619 |
-
|
|
|
620 |
|
621 |
-
#: includes/
|
622 |
-
|
623 |
-
|
|
|
624 |
|
625 |
-
#: includes/
|
626 |
-
|
627 |
-
|
|
|
628 |
|
629 |
-
#: includes/
|
630 |
-
|
631 |
-
|
|
|
632 |
|
633 |
-
#: includes/
|
634 |
-
msgid "
|
635 |
-
msgstr "
|
636 |
|
637 |
-
#: includes/
|
638 |
-
msgid "
|
639 |
-
msgstr "
|
640 |
|
641 |
-
#: includes/
|
642 |
-
msgid "
|
643 |
-
msgstr "
|
644 |
|
645 |
-
#: includes/
|
646 |
-
|
647 |
-
|
|
|
648 |
|
649 |
-
#: includes/
|
650 |
-
|
651 |
-
|
|
|
652 |
|
653 |
-
#: includes/
|
654 |
-
msgid "
|
655 |
-
msgstr "
|
656 |
|
657 |
-
#: includes/
|
658 |
-
|
659 |
-
|
|
|
660 |
|
661 |
-
#: includes/
|
662 |
-
msgid "
|
663 |
-
msgstr "
|
664 |
|
665 |
-
#: includes/
|
666 |
-
msgid "
|
667 |
-
msgstr "
|
668 |
|
669 |
-
#: includes/
|
670 |
-
msgid "
|
671 |
-
msgstr "
|
672 |
|
673 |
-
#: includes/
|
674 |
-
msgid "
|
675 |
-
msgstr "
|
676 |
|
677 |
-
#: includes/
|
678 |
-
|
679 |
-
|
680 |
-
msgstr "Other"
|
681 |
|
682 |
-
#: includes/
|
683 |
-
msgid "
|
684 |
-
msgstr "
|
685 |
|
686 |
-
#: includes/
|
687 |
-
msgid "
|
688 |
-
msgstr "
|
689 |
|
690 |
-
#: includes/
|
691 |
-
msgid "
|
692 |
-
msgstr "
|
693 |
|
694 |
-
#: includes/
|
695 |
-
msgid "
|
696 |
-
msgstr "
|
697 |
|
698 |
-
#: includes/
|
699 |
-
msgid "
|
700 |
-
msgstr "
|
701 |
|
702 |
-
#: includes/
|
703 |
-
msgid "
|
704 |
-
msgstr "
|
705 |
|
706 |
-
#: includes/
|
707 |
-
msgid "
|
708 |
-
msgstr "
|
709 |
|
710 |
-
#: includes/
|
711 |
-
msgid "
|
712 |
-
msgstr "
|
713 |
|
714 |
-
#: includes/
|
715 |
-
msgid "
|
716 |
-
msgstr "
|
717 |
|
718 |
-
#: includes/
|
719 |
-
msgid "
|
720 |
-
msgstr "
|
721 |
|
722 |
-
#: includes/
|
723 |
-
msgid "
|
724 |
-
msgstr "
|
725 |
|
726 |
-
#: includes/
|
727 |
-
msgid "
|
728 |
-
msgstr "
|
729 |
|
730 |
-
#: includes/
|
731 |
-
msgid "
|
732 |
-
msgstr "
|
733 |
|
734 |
-
#: includes/
|
735 |
-
msgid "
|
736 |
-
msgstr "
|
737 |
|
738 |
-
#: includes/
|
739 |
-
msgid "
|
740 |
-
msgstr "
|
741 |
|
742 |
-
#: includes/
|
743 |
-
|
744 |
-
|
745 |
-
msgstr "Hey %s,"
|
746 |
|
747 |
-
#: includes/
|
748 |
-
|
749 |
-
|
750 |
-
msgstr "Thanks %s!"
|
751 |
|
752 |
-
#:
|
753 |
-
msgid "
|
754 |
-
msgstr "
|
755 |
|
756 |
-
#:
|
757 |
-
msgid "
|
758 |
-
msgstr "
|
759 |
|
760 |
-
#:
|
761 |
-
msgid "You
|
762 |
-
msgstr "You
|
763 |
|
764 |
-
#:
|
765 |
-
msgid "
|
766 |
-
msgstr "
|
767 |
|
768 |
-
|
769 |
-
|
770 |
-
|
|
|
771 |
|
772 |
-
|
773 |
-
|
774 |
-
|
|
|
775 |
|
776 |
-
|
777 |
-
|
778 |
-
|
|
|
779 |
|
780 |
-
#:
|
781 |
-
|
782 |
-
|
|
|
783 |
|
784 |
-
#:
|
785 |
-
msgid "
|
786 |
-
msgstr "
|
787 |
|
788 |
-
#:
|
789 |
-
msgid "
|
790 |
-
msgstr "
|
791 |
|
792 |
-
#:
|
793 |
-
|
794 |
-
|
|
|
795 |
|
796 |
-
#:
|
797 |
-
|
798 |
-
|
|
|
799 |
|
800 |
-
#:
|
801 |
-
msgid "
|
802 |
-
msgstr "
|
803 |
|
804 |
-
#:
|
805 |
-
msgid "
|
806 |
-
msgstr "
|
807 |
|
808 |
-
#: includes/
|
809 |
-
|
810 |
-
|
|
|
811 |
|
812 |
-
#:
|
813 |
-
msgid "
|
814 |
-
msgstr "
|
815 |
|
816 |
-
#:
|
817 |
-
msgid "
|
818 |
-
msgstr "
|
819 |
|
820 |
-
#:
|
821 |
-
msgid "
|
822 |
-
msgstr "
|
823 |
|
824 |
-
#:
|
825 |
-
msgid "
|
826 |
-
msgstr "
|
827 |
|
828 |
-
#:
|
829 |
-
msgid "
|
830 |
-
msgstr "
|
831 |
|
832 |
-
#:
|
833 |
-
msgid "
|
834 |
-
msgstr "
|
835 |
|
836 |
-
#:
|
837 |
-
|
838 |
-
|
839 |
-
msgstr "Activating"
|
840 |
|
841 |
-
#:
|
842 |
-
|
843 |
-
|
844 |
-
msgstr "Sending email"
|
845 |
|
846 |
-
#:
|
847 |
-
|
848 |
-
|
849 |
-
msgstr "Allow & Continue"
|
850 |
|
851 |
-
#:
|
852 |
-
msgctxt "
|
853 |
-
msgid "
|
854 |
-
msgstr "
|
855 |
|
856 |
-
#:
|
857 |
-
|
858 |
-
|
859 |
-
msgstr "Skip"
|
860 |
|
861 |
-
#:
|
862 |
-
msgid "
|
863 |
-
msgstr "
|
864 |
|
865 |
-
#:
|
866 |
-
msgid "
|
867 |
-
msgstr "
|
868 |
|
869 |
-
#:
|
870 |
-
msgid "
|
871 |
-
msgstr "
|
872 |
|
873 |
-
#:
|
874 |
-
msgid "
|
875 |
-
msgstr "
|
876 |
|
877 |
-
#:
|
878 |
-
msgid "
|
879 |
-
msgstr "
|
880 |
|
881 |
-
#:
|
882 |
-
msgid "
|
883 |
-
msgstr "
|
884 |
|
885 |
-
#:
|
886 |
-
|
887 |
-
|
|
|
888 |
|
889 |
-
#:
|
890 |
-
msgid "
|
891 |
-
msgstr "
|
892 |
|
893 |
-
#:
|
894 |
-
msgid "
|
895 |
-
msgstr "
|
896 |
|
897 |
-
#:
|
898 |
-
msgid "
|
899 |
-
msgstr "
|
900 |
|
901 |
-
#:
|
902 |
-
msgid "
|
903 |
-
msgstr "
|
904 |
|
905 |
-
#:
|
906 |
-
|
907 |
-
|
|
|
908 |
|
909 |
-
#:
|
910 |
-
msgid "
|
911 |
-
msgstr "
|
912 |
|
913 |
-
#:
|
914 |
-
msgid "
|
915 |
-
msgstr "
|
916 |
|
917 |
-
#:
|
918 |
-
msgid "
|
919 |
-
msgstr "
|
920 |
|
921 |
-
#:
|
922 |
-
msgid "
|
923 |
-
msgstr "
|
924 |
|
925 |
-
#:
|
926 |
-
msgid "
|
927 |
-
msgstr "
|
928 |
|
929 |
-
#:
|
930 |
-
|
931 |
-
|
|
|
932 |
|
933 |
-
#:
|
934 |
-
msgid "
|
935 |
-
msgstr "
|
936 |
|
937 |
-
#:
|
938 |
-
|
939 |
-
|
|
|
940 |
|
941 |
-
#:
|
942 |
-
|
943 |
-
|
|
|
944 |
|
945 |
-
#:
|
946 |
-
|
947 |
-
|
948 |
-
msgstr "On"
|
949 |
|
950 |
-
#:
|
951 |
-
msgctxt "as
|
952 |
-
msgid "
|
953 |
-
msgstr "
|
954 |
|
955 |
-
#:
|
956 |
-
|
957 |
-
|
958 |
-
msgstr "Debugging"
|
959 |
|
960 |
-
#:
|
961 |
-
msgid "
|
962 |
-
msgstr "
|
963 |
|
964 |
-
#:
|
965 |
-
|
966 |
-
|
967 |
-
msgstr "Connected"
|
968 |
|
969 |
-
#:
|
970 |
-
|
971 |
-
|
972 |
-
msgstr "Blocked"
|
973 |
|
974 |
-
#:
|
975 |
-
msgctxt "
|
976 |
-
msgid "
|
977 |
-
msgstr "
|
978 |
|
979 |
-
#:
|
980 |
-
|
981 |
-
|
982 |
-
msgstr "SDK"
|
983 |
|
984 |
-
#:
|
985 |
-
|
986 |
-
|
987 |
-
msgstr "SDK Versions"
|
988 |
|
989 |
-
#:
|
990 |
-
|
991 |
-
|
992 |
-
msgstr "Plugin Path"
|
993 |
|
994 |
-
#:
|
995 |
-
msgctxt "as
|
996 |
-
msgid "
|
997 |
-
msgstr "
|
998 |
|
999 |
-
#:
|
1000 |
-
msgid "
|
1001 |
-
msgstr "
|
1002 |
|
1003 |
-
#:
|
1004 |
-
msgid "
|
1005 |
-
msgstr "
|
1006 |
|
1007 |
-
#:
|
1008 |
-
msgid "
|
1009 |
-
msgstr "
|
1010 |
|
1011 |
-
#:
|
1012 |
-
msgid "
|
1013 |
-
msgstr "
|
1014 |
|
1015 |
-
#:
|
1016 |
-
msgid "
|
1017 |
-
msgstr "
|
1018 |
|
1019 |
-
#:
|
1020 |
-
msgid "
|
1021 |
-
msgstr "
|
1022 |
|
1023 |
-
#:
|
1024 |
-
msgid "
|
1025 |
-
msgstr "
|
1026 |
|
1027 |
-
#:
|
1028 |
-
msgid "
|
1029 |
-
msgstr "
|
1030 |
|
1031 |
-
#:
|
1032 |
-
msgid "
|
1033 |
-
msgstr "
|
1034 |
|
1035 |
-
#:
|
1036 |
-
msgid "
|
1037 |
-
msgstr "
|
1038 |
|
1039 |
-
#:
|
1040 |
-
msgid "
|
1041 |
-
msgstr "
|
1042 |
|
1043 |
-
#:
|
1044 |
-
|
1045 |
-
|
|
|
1046 |
|
1047 |
-
#:
|
1048 |
-
msgid "
|
1049 |
-
msgstr "
|
1050 |
|
1051 |
-
#:
|
1052 |
-
msgid "
|
1053 |
-
msgstr "
|
1054 |
|
1055 |
-
#:
|
1056 |
-
msgid "
|
1057 |
-
msgstr "
|
1058 |
|
1059 |
-
#:
|
1060 |
-
msgid "
|
1061 |
-
msgstr "
|
1062 |
|
1063 |
-
#:
|
1064 |
-
msgid "
|
1065 |
-
msgstr "
|
1066 |
|
1067 |
-
#:
|
1068 |
-
|
1069 |
-
|
|
|
1070 |
|
1071 |
-
#:
|
1072 |
-
msgid "
|
1073 |
-
msgstr "
|
1074 |
|
1075 |
-
#:
|
1076 |
-
msgid "
|
1077 |
-
msgstr "
|
1078 |
|
1079 |
-
#:
|
1080 |
-
msgid "
|
1081 |
-
msgstr "
|
1082 |
|
1083 |
-
#:
|
1084 |
-
msgid "
|
1085 |
-
msgstr "
|
1086 |
|
1087 |
-
#:
|
1088 |
-
msgid "
|
1089 |
-
msgstr "
|
1090 |
|
1091 |
-
#:
|
1092 |
-
|
1093 |
-
|
1094 |
-
msgstr "Congrats"
|
1095 |
|
1096 |
-
#:
|
1097 |
-
|
1098 |
-
|
1099 |
-
msgstr "Oops"
|
1100 |
|
1101 |
-
#:
|
1102 |
-
|
1103 |
-
|
1104 |
-
msgstr "Yee-haw"
|
1105 |
|
1106 |
-
#:
|
1107 |
-
|
1108 |
-
|
1109 |
-
msgstr "W00t"
|
1110 |
|
1111 |
-
#:
|
1112 |
-
|
1113 |
-
|
1114 |
-
msgstr "Right on"
|
1115 |
|
1116 |
-
#:
|
1117 |
-
|
1118 |
-
|
1119 |
-
msgstr "Hmm"
|
1120 |
|
1121 |
-
#:
|
1122 |
-
msgid "
|
1123 |
-
msgstr "
|
1124 |
|
1125 |
-
#:
|
1126 |
-
|
1127 |
-
|
1128 |
-
msgstr "Hey"
|
1129 |
|
1130 |
-
#:
|
1131 |
-
|
1132 |
-
|
1133 |
-
msgstr "Heads up"
|
1134 |
|
1135 |
-
#:
|
1136 |
-
msgid "
|
1137 |
-
msgstr "
|
1138 |
|
1139 |
-
#:
|
1140 |
-
msgid "
|
1141 |
-
msgstr "
|
1142 |
|
1143 |
-
#:
|
1144 |
-
|
1145 |
-
|
|
|
1146 |
|
1147 |
-
#:
|
1148 |
-
|
1149 |
-
|
|
|
1150 |
|
1151 |
-
#:
|
1152 |
-
msgid "
|
1153 |
-
msgstr "
|
1154 |
|
1155 |
-
#:
|
1156 |
-
|
1157 |
-
|
|
|
1158 |
|
1159 |
-
#:
|
1160 |
-
|
1161 |
-
|
|
|
1162 |
|
1163 |
-
#:
|
1164 |
-
msgid "
|
1165 |
-
msgstr "
|
1166 |
|
1167 |
-
#:
|
1168 |
-
|
1169 |
-
|
|
|
1170 |
|
1171 |
-
#:
|
1172 |
-
msgid "
|
1173 |
-
msgstr "
|
1174 |
|
1175 |
-
#:
|
1176 |
-
msgid "
|
1177 |
-
msgstr "
|
1178 |
|
1179 |
-
#:
|
1180 |
-
msgid "
|
1181 |
-
msgstr "
|
1182 |
|
1183 |
-
#:
|
1184 |
-
msgid "
|
1185 |
-
msgstr "
|
1186 |
|
1187 |
-
#:
|
1188 |
-
msgid "
|
1189 |
-
msgstr "
|
1190 |
|
1191 |
-
#:
|
1192 |
-
msgid "
|
1193 |
-
msgstr "
|
1194 |
|
1195 |
-
#:
|
1196 |
-
msgid "
|
1197 |
-
msgstr "
|
1198 |
|
1199 |
-
#:
|
1200 |
-
msgid "
|
1201 |
-
msgstr "
|
1202 |
|
1203 |
-
#:
|
1204 |
-
msgid "
|
1205 |
-
msgstr "
|
1206 |
|
1207 |
-
#:
|
1208 |
-
|
1209 |
-
|
|
|
1210 |
|
1211 |
-
#:
|
1212 |
-
msgid "
|
1213 |
-
msgstr "
|
1214 |
|
1215 |
-
#:
|
1216 |
-
msgid "
|
1217 |
-
msgstr "
|
1218 |
|
1219 |
-
#:
|
1220 |
-
|
1221 |
-
|
1222 |
-
msgstr "%s Add-on was successfully purchased."
|
1223 |
|
1224 |
-
#:
|
1225 |
-
msgid "
|
1226 |
-
msgstr "
|
1227 |
|
1228 |
-
#:
|
1229 |
-
msgid "
|
1230 |
-
msgstr "
|
1231 |
|
1232 |
-
#:
|
1233 |
-
msgid "
|
1234 |
-
msgstr "
|
1235 |
|
1236 |
-
#:
|
1237 |
-
msgid "
|
1238 |
-
msgstr "
|
1239 |
|
1240 |
-
#:
|
1241 |
-
|
1242 |
-
|
|
|
1243 |
|
1244 |
-
#:
|
1245 |
-
msgid "
|
1246 |
-
msgstr "
|
1247 |
|
1248 |
-
#:
|
1249 |
-
|
1250 |
-
|
|
|
1251 |
|
1252 |
-
#:
|
1253 |
-
|
1254 |
-
|
|
|
1255 |
|
1256 |
-
#:
|
1257 |
-
msgid "
|
1258 |
-
msgstr "
|
1259 |
|
1260 |
-
#:
|
1261 |
-
msgid "
|
1262 |
-
msgstr "
|
1263 |
|
1264 |
-
#:
|
1265 |
-
|
1266 |
-
|
|
|
1267 |
|
1268 |
-
#:
|
1269 |
-
msgid "
|
1270 |
-
msgstr "
|
1271 |
|
1272 |
-
#:
|
1273 |
-
msgid "
|
1274 |
-
msgstr "
|
1275 |
|
1276 |
-
#:
|
1277 |
-
msgid "
|
1278 |
-
msgstr "
|
1279 |
|
1280 |
-
#:
|
1281 |
-
msgid "
|
1282 |
-
msgstr "
|
1283 |
|
1284 |
-
#:
|
1285 |
-
msgid "
|
1286 |
-
msgstr "
|
1287 |
|
1288 |
-
#:
|
1289 |
-
msgid "
|
1290 |
-
msgstr "
|
1291 |
|
1292 |
-
#:
|
1293 |
-
msgid "
|
1294 |
-
msgstr "
|
1295 |
|
1296 |
-
#:
|
1297 |
-
|
1298 |
-
|
1299 |
-
msgstr "Version %s was released."
|
1300 |
|
1301 |
-
#:
|
1302 |
-
msgid "
|
1303 |
-
msgstr "
|
1304 |
|
1305 |
-
#:
|
1306 |
-
msgctxt "
|
1307 |
-
msgid "
|
1308 |
-
msgstr "
|
1309 |
|
1310 |
-
#:
|
1311 |
-
msgid "
|
1312 |
-
msgstr "
|
1313 |
|
1314 |
-
#:
|
1315 |
-
|
1316 |
-
|
1317 |
-
msgstr "Start free trial"
|
1318 |
|
1319 |
-
#:
|
1320 |
-
msgid "
|
1321 |
-
msgstr "
|
1322 |
|
1323 |
-
#:
|
1324 |
-
msgid "
|
1325 |
-
msgstr "
|
1326 |
|
1327 |
-
#:
|
1328 |
-
msgid "
|
1329 |
-
msgstr "
|
1330 |
|
1331 |
-
#:
|
1332 |
-
msgid "
|
1333 |
-
msgstr "
|
1334 |
|
1335 |
-
#:
|
1336 |
-
msgid "
|
1337 |
-
msgstr "
|
1338 |
|
1339 |
-
#:
|
1340 |
-
msgid "
|
1341 |
-
msgstr "
|
1342 |
|
1343 |
-
#:
|
1344 |
-
msgid "
|
1345 |
-
msgstr "
|
1346 |
|
1347 |
-
#:
|
1348 |
-
msgid "
|
1349 |
-
msgstr "
|
1350 |
|
1351 |
-
#:
|
1352 |
-
msgid "
|
1353 |
-
msgstr "
|
1354 |
|
1355 |
-
#:
|
1356 |
-
msgid "
|
1357 |
-
msgstr "
|
1358 |
|
1359 |
-
#:
|
1360 |
-
msgid "
|
1361 |
-
msgstr "
|
1362 |
|
1363 |
-
#: includes/
|
1364 |
-
msgid "
|
1365 |
-
msgstr "
|
1366 |
|
1367 |
-
#: includes/
|
1368 |
-
|
1369 |
-
|
|
|
1370 |
|
1371 |
-
#: includes/
|
1372 |
-
msgid "
|
1373 |
-
msgstr "
|
1374 |
|
1375 |
-
#: includes/
|
1376 |
-
msgid "
|
1377 |
-
msgstr "
|
1378 |
|
1379 |
-
#:
|
1380 |
-
|
1381 |
-
|
|
|
1382 |
|
1383 |
-
#:
|
1384 |
-
msgid "
|
1385 |
-
msgstr "
|
1386 |
|
1387 |
-
#:
|
1388 |
-
msgid "
|
1389 |
-
msgstr "
|
1390 |
|
1391 |
-
#:
|
1392 |
-
msgid "
|
1393 |
-
msgstr "
|
1394 |
|
1395 |
-
#:
|
1396 |
-
msgid "
|
1397 |
-
msgstr "
|
1398 |
|
1399 |
-
#:
|
1400 |
-
msgid "
|
1401 |
-
msgstr "
|
1402 |
|
1403 |
-
#:
|
1404 |
-
|
1405 |
-
|
1406 |
-
msgstr "%s requires an access to our API."
|
1407 |
|
1408 |
-
#:
|
1409 |
-
msgid "
|
1410 |
-
msgstr "
|
1411 |
|
1412 |
-
#:
|
1413 |
-
msgid "
|
1414 |
-
msgstr "
|
1415 |
|
1416 |
-
#:
|
1417 |
-
msgid "
|
1418 |
-
msgstr "
|
1419 |
|
1420 |
-
#:
|
1421 |
-
msgid "
|
1422 |
-
msgstr "
|
1423 |
|
1424 |
-
#:
|
1425 |
-
msgid "
|
1426 |
-
msgstr "
|
1427 |
|
1428 |
-
#:
|
1429 |
-
msgid "
|
1430 |
-
msgstr "
|
1431 |
|
1432 |
-
#:
|
1433 |
-
msgid "
|
1434 |
-
msgstr "
|
1435 |
|
1436 |
-
#:
|
1437 |
-
msgid "
|
1438 |
-
msgstr "
|
1439 |
|
1440 |
-
#:
|
1441 |
-
msgid "
|
1442 |
-
msgstr "
|
1443 |
|
1444 |
-
#:
|
1445 |
-
msgid "
|
1446 |
-
msgstr "
|
1447 |
|
1448 |
-
#:
|
1449 |
-
msgid "
|
1450 |
-
msgstr "
|
1451 |
|
1452 |
-
#:
|
1453 |
-
msgid "
|
1454 |
-
msgstr "
|
1455 |
|
1456 |
-
#:
|
1457 |
-
msgid "
|
1458 |
-
msgstr "
|
1459 |
|
1460 |
-
#:
|
1461 |
-
|
1462 |
-
|
|
|
1463 |
|
1464 |
-
#:
|
1465 |
-
msgid "
|
1466 |
-
msgstr "
|
1467 |
|
1468 |
-
#:
|
1469 |
-
msgid "
|
1470 |
-
msgstr "
|
1471 |
|
1472 |
-
#:
|
1473 |
-
|
1474 |
-
|
1475 |
-
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1476 |
|
1477 |
-
#:
|
1478 |
-
msgid "
|
1479 |
-
msgstr "
|
1480 |
|
1481 |
-
#:
|
1482 |
-
msgid "
|
1483 |
-
msgstr "
|
1484 |
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
|
|
1488 |
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
|
|
1492 |
|
1493 |
-
#:
|
1494 |
-
msgctxt "
|
1495 |
-
msgid "
|
1496 |
-
msgstr "
|
1497 |
|
1498 |
-
#:
|
1499 |
-
|
1500 |
-
|
1501 |
-
msgstr "%s cannot run without the plugin."
|
1502 |
|
1503 |
-
#:
|
1504 |
-
|
1505 |
-
|
1506 |
-
msgstr "%s activation was successfully completed."
|
1507 |
|
1508 |
-
#:
|
1509 |
-
|
1510 |
-
|
1511 |
-
msgstr "Features & Pricing"
|
1512 |
|
1513 |
-
#:
|
1514 |
-
msgid "
|
1515 |
-
msgstr "
|
1516 |
|
1517 |
-
#:
|
1518 |
-
msgid "
|
1519 |
-
msgstr "
|
1520 |
|
1521 |
-
#:
|
1522 |
-
msgid "
|
1523 |
-
msgstr "
|
1524 |
|
1525 |
-
#:
|
1526 |
-
msgid "
|
1527 |
-
msgstr "
|
1528 |
|
1529 |
-
#:
|
1530 |
-
|
1531 |
-
|
1532 |
-
msgstr "Monthly"
|
1533 |
|
1534 |
-
#:
|
1535 |
-
|
1536 |
-
|
1537 |
-
msgstr "mo"
|
1538 |
|
1539 |
-
#:
|
1540 |
-
|
1541 |
-
|
1542 |
-
msgstr "Annual"
|
1543 |
|
1544 |
-
#:
|
1545 |
-
|
1546 |
-
|
1547 |
-
msgstr "Annually"
|
1548 |
|
1549 |
-
#:
|
1550 |
-
|
1551 |
-
|
1552 |
-
msgstr "Once"
|
1553 |
|
1554 |
-
#:
|
1555 |
-
|
1556 |
-
|
1557 |
-
msgstr "year"
|
1558 |
|
1559 |
-
#:
|
1560 |
-
msgid "
|
1561 |
-
msgstr "
|
1562 |
|
1563 |
-
#:
|
1564 |
-
|
1565 |
-
|
1566 |
-
msgstr "Best"
|
1567 |
|
1568 |
-
#:
|
1569 |
-
|
1570 |
-
|
1571 |
-
msgstr "Billed %s"
|
1572 |
|
1573 |
-
#:
|
1574 |
-
|
1575 |
-
|
1576 |
-
msgstr "Save %s"
|
1577 |
|
1578 |
-
#:
|
1579 |
-
msgid "
|
1580 |
-
msgstr "
|
1581 |
|
1582 |
-
#:
|
1583 |
-
|
1584 |
-
|
1585 |
-
msgstr "Approve & Start Trial"
|
1586 |
|
1587 |
-
#:
|
1588 |
-
msgid "
|
1589 |
-
msgstr "
|
1590 |
|
1591 |
-
#:
|
1592 |
-
msgid "
|
1593 |
-
msgstr "
|
1594 |
|
1595 |
-
#:
|
1596 |
-
msgid "
|
1597 |
-
msgstr "
|
1598 |
|
1599 |
-
#:
|
1600 |
-
msgid "
|
1601 |
-
msgstr "
|
1602 |
|
1603 |
-
#:
|
1604 |
-
msgid "
|
1605 |
-
msgstr "
|
1606 |
|
1607 |
-
#:
|
1608 |
-
msgid "
|
1609 |
-
msgstr "
|
1610 |
|
1611 |
-
#:
|
1612 |
-
msgid "
|
1613 |
-
msgstr "
|
1614 |
|
1615 |
-
#:
|
1616 |
-
msgid "
|
1617 |
-
msgstr "
|
1618 |
|
1619 |
-
#:
|
1620 |
-
msgid "
|
1621 |
-
msgstr "
|
1622 |
|
1623 |
-
#:
|
1624 |
-
msgid "
|
1625 |
-
msgstr "
|
1626 |
|
1627 |
-
#:
|
1628 |
-
msgid "
|
1629 |
-
msgstr "
|
1630 |
|
1631 |
-
#:
|
1632 |
-
msgid "
|
1633 |
-
msgstr "
|
1634 |
|
1635 |
-
#:
|
1636 |
-
msgid "
|
1637 |
-
msgstr "
|
1638 |
|
1639 |
-
#:
|
1640 |
-
msgid "
|
1641 |
-
msgstr "
|
1642 |
|
1643 |
-
#:
|
1644 |
-
msgid "
|
1645 |
-
msgstr "
|
1646 |
|
1647 |
-
#:
|
1648 |
-
msgid "
|
1649 |
-
msgstr "
|
1650 |
|
1651 |
-
#:
|
1652 |
-
msgid "
|
1653 |
-
msgstr "
|
1654 |
|
1655 |
-
#:
|
1656 |
-
msgid "
|
1657 |
-
msgstr "
|
1658 |
|
1659 |
-
#:
|
1660 |
-
msgid "
|
1661 |
-
msgstr "
|
1662 |
|
1663 |
-
#:
|
1664 |
-
msgid "
|
1665 |
-
msgstr "
|
1666 |
|
1667 |
-
#:
|
1668 |
-
msgid "
|
1669 |
-
msgstr "
|
1670 |
|
1671 |
-
#:
|
1672 |
-
msgid "
|
1673 |
-
msgstr "
|
1674 |
|
1675 |
-
#:
|
1676 |
-
msgid "
|
1677 |
-
msgstr "
|
1678 |
|
1679 |
-
#:
|
1680 |
-
msgid "
|
1681 |
-
msgstr "
|
1682 |
|
1683 |
-
#:
|
1684 |
-
msgid "
|
1685 |
-
msgstr "
|
1686 |
|
1687 |
-
#:
|
1688 |
-
msgid "
|
1689 |
-
msgstr "
|
1690 |
|
1691 |
-
#:
|
1692 |
-
msgid "
|
1693 |
-
msgstr "
|
1694 |
|
1695 |
-
#:
|
1696 |
-
msgid "
|
1697 |
-
msgstr "
|
1698 |
|
1699 |
-
#:
|
1700 |
-
|
1701 |
-
|
1702 |
-
msgstr "Description"
|
1703 |
|
1704 |
-
#:
|
1705 |
-
|
1706 |
-
|
1707 |
-
msgstr "Installation"
|
1708 |
|
1709 |
-
#:
|
1710 |
-
|
1711 |
-
|
1712 |
-
msgstr "FAQ"
|
1713 |
|
1714 |
-
#:
|
1715 |
-
msgctxt "
|
1716 |
-
msgid "
|
1717 |
-
msgstr "
|
1718 |
|
1719 |
-
#:
|
1720 |
-
msgctxt "
|
1721 |
-
msgid "
|
1722 |
-
msgstr "
|
1723 |
|
1724 |
-
#:
|
1725 |
-
|
1726 |
-
|
1727 |
-
msgstr "Other Notes"
|
1728 |
|
1729 |
-
#:
|
1730 |
-
msgid "%s
|
1731 |
-
msgstr "%s
|
1732 |
|
1733 |
-
#:
|
1734 |
-
msgid "%s
|
1735 |
-
msgstr "%s
|
1736 |
|
1737 |
-
#:
|
1738 |
-
msgid "
|
1739 |
-
msgstr "
|
1740 |
|
1741 |
-
#:
|
1742 |
-
msgid "
|
1743 |
-
msgstr "
|
1744 |
|
1745 |
-
#:
|
1746 |
-
msgid "%s
|
1747 |
-
msgstr "%s
|
1748 |
|
1749 |
-
#:
|
1750 |
-
msgid "%s
|
1751 |
-
msgstr "%s
|
1752 |
|
1753 |
-
#:
|
1754 |
-
msgid "
|
1755 |
-
msgstr "
|
1756 |
|
1757 |
-
#:
|
1758 |
-
msgid "
|
1759 |
-
msgstr "
|
1760 |
|
1761 |
-
#:
|
1762 |
-
msgid "
|
1763 |
-
msgstr "
|
1764 |
|
1765 |
-
#:
|
1766 |
-
|
1767 |
-
|
1768 |
-
msgstr "Author:"
|
1769 |
|
1770 |
-
#:
|
1771 |
-
msgid "
|
1772 |
-
msgstr "
|
1773 |
|
1774 |
-
#:
|
1775 |
-
msgid "
|
1776 |
-
msgstr "
|
1777 |
|
1778 |
-
#:
|
1779 |
-
msgid "
|
1780 |
-
msgstr "
|
1781 |
|
1782 |
-
#:
|
1783 |
-
msgid "
|
1784 |
-
msgstr "
|
1785 |
|
1786 |
-
#:
|
1787 |
-
msgid "
|
1788 |
-
msgstr "
|
1789 |
|
1790 |
-
#:
|
1791 |
-
msgid "
|
1792 |
-
msgstr "
|
1793 |
|
1794 |
-
#:
|
1795 |
-
msgid "
|
1796 |
-
msgstr "
|
1797 |
|
1798 |
-
#:
|
1799 |
-
msgid "
|
1800 |
-
msgstr "
|
1801 |
|
1802 |
-
#:
|
1803 |
-
msgid "
|
1804 |
-
msgstr "
|
1805 |
|
1806 |
-
#:
|
1807 |
-
msgid "
|
1808 |
-
msgstr "
|
1809 |
|
1810 |
-
#:
|
1811 |
-
msgid "
|
1812 |
-
msgstr "
|
1813 |
|
1814 |
-
#:
|
1815 |
-
msgid "
|
1816 |
-
msgstr "
|
1817 |
|
1818 |
-
#:
|
1819 |
-
msgid "
|
1820 |
-
msgstr "
|
1821 |
|
1822 |
-
#:
|
1823 |
-
msgid "
|
1824 |
-
msgstr "
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"MIME-Version: 1.0\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
17 |
+
"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"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
20 |
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
|
22 |
+
#: includes/class-freemius.php:959
|
23 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
24 |
+
msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
#: includes/class-freemius.php:961
|
27 |
+
msgid "Error"
|
28 |
+
msgstr "Error"
|
29 |
|
30 |
+
#: includes/class-freemius.php:1277
|
31 |
+
msgid "I found a better %s"
|
32 |
+
msgstr "I found a better %s"
|
33 |
|
34 |
+
#: includes/class-freemius.php:1279
|
35 |
+
msgid "What's the %s's name?"
|
36 |
+
msgstr "What's the %s's name?"
|
37 |
|
38 |
+
#: includes/class-freemius.php:1285
|
39 |
+
msgid "It's a temporary %s. I'm just debugging an issue."
|
40 |
+
msgstr "It's a temporary %s. I'm just debugging an issue."
|
41 |
|
42 |
+
#: includes/class-freemius.php:1287
|
43 |
+
msgid "Deactivation"
|
44 |
+
msgstr "Deactivation"
|
45 |
|
46 |
+
#: includes/class-freemius.php:1288
|
47 |
+
msgid "Theme Switch"
|
48 |
+
msgstr "Theme Switch"
|
49 |
|
50 |
+
#: includes/class-freemius.php:1297, templates/forms/resend-key.php:24
|
51 |
+
msgid "Other"
|
52 |
+
msgstr "Other"
|
|
|
53 |
|
54 |
+
#: includes/class-freemius.php:1305
|
55 |
+
msgid "I no longer need the %s"
|
56 |
+
msgstr "I no longer need the %s"
|
57 |
|
58 |
+
#: includes/class-freemius.php:1312
|
59 |
+
msgid "I only needed the %s for a short period"
|
60 |
+
msgstr "I only needed the %s for a short period"
|
|
|
61 |
|
62 |
+
#: includes/class-freemius.php:1318
|
63 |
+
msgid "The %s broke my site"
|
64 |
+
msgstr "The %s broke my site"
|
|
|
65 |
|
66 |
+
#: includes/class-freemius.php:1325
|
67 |
+
msgid "The %s suddenly stopped working"
|
68 |
+
msgstr "The %s suddenly stopped working"
|
69 |
|
70 |
+
#: includes/class-freemius.php:1335
|
71 |
+
msgid "I can't pay for it anymore"
|
72 |
+
msgstr "I can't pay for it anymore"
|
|
|
73 |
|
74 |
+
#: includes/class-freemius.php:1337
|
75 |
+
msgid "What price would you feel comfortable paying?"
|
76 |
+
msgstr "What price would you feel comfortable paying?"
|
|
|
77 |
|
78 |
+
#: includes/class-freemius.php:1343
|
79 |
+
msgid "I don't like to share my information with you"
|
80 |
+
msgstr "I don't like to share my information with you"
|
81 |
|
82 |
+
#: includes/class-freemius.php:1364
|
83 |
+
msgid "The %s didn't work"
|
84 |
+
msgstr "The %s didn't work"
|
85 |
|
86 |
+
#: includes/class-freemius.php:1374
|
87 |
+
msgid "I couldn't understand how to make it work"
|
88 |
+
msgstr "I couldn't understand how to make it work"
|
89 |
|
90 |
+
#: includes/class-freemius.php:1382
|
91 |
+
msgid "The %s is great, but I need specific feature that you don't support"
|
92 |
+
msgstr "The %s is great, but I need specific feature that you don't support"
|
93 |
|
94 |
+
#: includes/class-freemius.php:1384
|
95 |
+
msgid "What feature?"
|
96 |
+
msgstr "What feature?"
|
97 |
|
98 |
+
#: includes/class-freemius.php:1388
|
99 |
+
msgid "The %s is not working"
|
100 |
+
msgstr "The %s is not working"
|
101 |
|
102 |
+
#: includes/class-freemius.php:1390
|
103 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
104 |
+
msgstr "Kindly share what didn't work so we can fix it for future users..."
|
105 |
|
106 |
+
#: includes/class-freemius.php:1394
|
107 |
+
msgid "It's not what I was looking for"
|
108 |
+
msgstr "It's not what I was looking for"
|
|
|
109 |
|
110 |
+
#: includes/class-freemius.php:1396
|
111 |
+
msgid "What you've been looking for?"
|
112 |
+
msgstr "What you've been looking for?"
|
|
|
113 |
|
114 |
+
#: includes/class-freemius.php:1400
|
115 |
+
msgid "The %s didn't work as expected"
|
116 |
+
msgstr "The %s didn't work as expected"
|
|
|
117 |
|
118 |
+
#: includes/class-freemius.php:1402
|
119 |
+
msgid "What did you expect?"
|
120 |
+
msgstr "What did you expect?"
|
|
|
121 |
|
122 |
+
#: includes/class-freemius.php:1938, templates/debug.php:20
|
123 |
+
msgid "Freemius Debug"
|
124 |
+
msgstr "Freemius Debug"
|
|
|
125 |
|
126 |
+
#: includes/class-freemius.php:2508
|
127 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
128 |
+
msgstr "I don't know what is cURL or how to install it, help me!"
|
129 |
|
130 |
+
#: includes/class-freemius.php:2510
|
131 |
+
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."
|
132 |
+
msgstr "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."
|
133 |
|
134 |
+
#: includes/class-freemius.php:2517
|
135 |
+
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."
|
136 |
+
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."
|
137 |
|
138 |
+
#: includes/class-freemius.php:2619
|
139 |
+
msgid "Yes - do your thing"
|
140 |
+
msgstr "Yes - do your thing"
|
141 |
|
142 |
+
#: includes/class-freemius.php:2624
|
143 |
+
msgid "No - just deactivate"
|
144 |
+
msgstr "No - just deactivate"
|
145 |
|
146 |
+
#: includes/class-freemius.php:2669, includes/class-freemius.php:3134, includes/class-freemius.php:3988, includes/class-freemius.php:7270, includes/class-freemius.php:9137, includes/class-freemius.php:9193, includes/class-freemius.php:9254, includes/class-freemius.php:11154, includes/class-freemius.php:11165, includes/class-freemius.php:11614, includes/class-freemius.php:11632, includes/class-freemius.php:11730, includes/class-freemius.php:12405, templates/add-ons.php:43
|
147 |
+
msgctxt "exclamation"
|
148 |
+
msgid "Oops"
|
149 |
+
msgstr "Oops"
|
150 |
|
151 |
+
#: includes/class-freemius.php:2736
|
152 |
+
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."
|
153 |
+
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."
|
|
|
154 |
|
155 |
+
#: includes/class-freemius.php:3131
|
156 |
+
msgctxt "addonX cannot run without pluginY"
|
157 |
+
msgid "%s cannot run without %s."
|
158 |
+
msgstr "%s cannot run without %s."
|
159 |
|
160 |
+
#: includes/class-freemius.php:3132
|
161 |
+
msgctxt "addonX cannot run..."
|
162 |
+
msgid "%s cannot run without the plugin."
|
163 |
+
msgstr "%s cannot run without the plugin."
|
164 |
|
165 |
+
#: includes/class-freemius.php:3253, includes/class-freemius.php:3278, includes/class-freemius.php:11703
|
166 |
+
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
167 |
+
msgstr "Unexpected API error. Please contact the %s's author with the following error."
|
|
|
168 |
|
169 |
+
#: includes/class-freemius.php:3686
|
170 |
+
msgid "Premium %s version was successfully activated."
|
171 |
+
msgstr "Premium %s version was successfully activated."
|
|
|
172 |
|
173 |
+
#: includes/class-freemius.php:3688, includes/class-freemius.php:4913
|
174 |
+
msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
|
175 |
+
msgid "W00t"
|
176 |
+
msgstr "W00t"
|
177 |
|
178 |
+
#: includes/class-freemius.php:3703
|
|
|
179 |
msgid "You have a %s license."
|
180 |
msgstr "You have a %s license."
|
181 |
|
182 |
+
#: includes/class-freemius.php:3707, includes/class-freemius.php:8841, includes/class-freemius.php:8850, includes/class-freemius.php:11105, includes/class-freemius.php:11318, includes/class-freemius.php:11380, includes/class-freemius.php:11492
|
183 |
+
msgctxt "interjection expressing joy or exuberance"
|
184 |
+
msgid "Yee-haw"
|
185 |
+
msgstr "Yee-haw"
|
|
|
|
|
|
|
186 |
|
187 |
+
#: includes/class-freemius.php:3971
|
188 |
+
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."
|
189 |
+
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."
|
|
|
190 |
|
191 |
+
#: includes/class-freemius.php:3975
|
192 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
193 |
+
msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
|
|
194 |
|
195 |
+
#: includes/class-freemius.php:3984, templates/account.php:692, templates/add-ons.php:99
|
196 |
+
msgid "More information about %s"
|
197 |
+
msgstr "More information about %s"
|
|
|
198 |
|
199 |
+
#: includes/class-freemius.php:3985
|
200 |
msgid "Purchase License"
|
201 |
msgstr "Purchase License"
|
202 |
|
203 |
+
#: includes/class-freemius.php:4422, templates/connect.php:136
|
204 |
+
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."
|
205 |
+
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."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
+
#: includes/class-freemius.php:4426
|
208 |
+
msgid "start the trial"
|
209 |
+
msgstr "start the trial"
|
210 |
|
211 |
+
#: includes/class-freemius.php:4427, templates/connect.php:140
|
212 |
+
msgid "complete the install"
|
213 |
+
msgstr "complete the install"
|
|
|
214 |
|
215 |
+
#: includes/class-freemius.php:4506
|
216 |
msgid "You are just one step away - %s"
|
217 |
msgstr "You are just one step away - %s"
|
218 |
|
219 |
+
#: includes/class-freemius.php:4509
|
220 |
+
msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
|
221 |
msgid "Complete \"%s\" Activation Now"
|
222 |
msgstr "Complete \"%s\" Activation Now"
|
223 |
|
224 |
+
#: includes/class-freemius.php:4523
|
225 |
msgid "We made a few tweaks to the %s, %s"
|
226 |
msgstr "We made a few tweaks to the %s, %s"
|
227 |
|
228 |
+
#: includes/class-freemius.php:4527
|
229 |
+
msgid "Opt in to make \"%s\" Better!"
|
230 |
+
msgstr "Opt in to make \"%s\" Better!"
|
231 |
|
232 |
+
#: includes/class-freemius.php:4912
|
233 |
+
msgid "The upgrade of %s was successfully completed."
|
234 |
+
msgstr "The upgrade of %s was successfully completed."
|
235 |
|
236 |
+
#: includes/class-freemius.php:5997, includes/class-fs-plugin-updater.php:358, includes/class-fs-plugin-updater.php:510, includes/class-fs-plugin-updater.php:516, templates/auto-installation.php:31
|
237 |
+
msgid "Add-On"
|
238 |
+
msgstr "Add-On"
|
239 |
|
240 |
+
#: includes/class-freemius.php:5999, templates/debug.php:303, templates/debug.php:413
|
241 |
+
msgid "Plugin"
|
242 |
+
msgstr "Plugin"
|
|
|
243 |
|
244 |
+
#: includes/class-freemius.php:6000, templates/debug.php:303, templates/debug.php:413, templates/forms/deactivation/form.php:64
|
245 |
+
msgid "Theme"
|
246 |
+
msgstr "Theme"
|
|
|
247 |
|
248 |
+
#: includes/class-freemius.php:7257
|
249 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
250 |
+
msgstr "We couldn't find your email address in the system, are you sure it's the right address?"
|
251 |
|
252 |
+
#: includes/class-freemius.php:7259
|
253 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
254 |
+
msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
255 |
|
256 |
+
#: includes/class-freemius.php:7468
|
257 |
+
msgid "Account is pending activation."
|
258 |
+
msgstr "Account is pending activation."
|
|
|
259 |
|
260 |
+
#: includes/class-freemius.php:8825
|
261 |
+
msgctxt "pluginX activation was successfully..."
|
262 |
+
msgid "%s activation was successfully completed."
|
263 |
+
msgstr "%s activation was successfully completed."
|
264 |
|
265 |
+
#: includes/class-freemius.php:8837
|
266 |
+
msgid "Your account was successfully activated with the %s plan."
|
267 |
+
msgstr "Your account was successfully activated with the %s plan."
|
268 |
|
269 |
+
#: includes/class-freemius.php:8846, includes/class-freemius.php:11376
|
270 |
+
msgid "Your trial has been successfully started."
|
271 |
+
msgstr "Your trial has been successfully started."
|
272 |
|
273 |
+
#: includes/class-freemius.php:9135, includes/class-freemius.php:9191, includes/class-freemius.php:9252
|
274 |
+
msgid "Couldn't activate %s."
|
275 |
+
msgstr "Couldn't activate %s."
|
276 |
|
277 |
+
#: includes/class-freemius.php:9136, includes/class-freemius.php:9192, includes/class-freemius.php:9253
|
278 |
+
msgid "Please contact us with the following message:"
|
279 |
+
msgstr "Please contact us with the following message:"
|
|
|
280 |
|
281 |
+
#: includes/class-freemius.php:9511, includes/class-freemius.php:13334
|
282 |
+
msgid "Upgrade"
|
283 |
+
msgstr "Upgrade"
|
|
|
284 |
|
285 |
+
#: includes/class-freemius.php:9517
|
286 |
+
msgid "Start Trial"
|
287 |
+
msgstr "Start Trial"
|
288 |
|
289 |
+
#: includes/class-freemius.php:9519
|
290 |
+
msgid "Pricing"
|
291 |
+
msgstr "Pricing"
|
|
|
292 |
|
293 |
+
#: includes/class-freemius.php:9559, includes/class-freemius.php:9561
|
294 |
+
msgid "Affiliation"
|
295 |
+
msgstr "Affiliation"
|
296 |
|
297 |
+
#: includes/class-freemius.php:9581, includes/class-freemius.php:9583, templates/account.php:79, templates/debug.php:281
|
298 |
+
msgid "Account"
|
299 |
+
msgstr "Account"
|
300 |
|
301 |
+
#: includes/class-freemius.php:9594, includes/class-freemius.php:9596, includes/customizer/class-fs-customizer-support-section.php:60
|
302 |
+
msgid "Contact Us"
|
303 |
+
msgstr "Contact Us"
|
304 |
|
305 |
+
#: includes/class-freemius.php:9606, includes/class-freemius.php:9608, includes/class-freemius.php:13344, templates/account.php:68
|
306 |
+
msgid "Add-Ons"
|
307 |
+
msgstr "Add-Ons"
|
308 |
|
309 |
+
#: includes/class-freemius.php:9639, templates/pricing.php:92
|
310 |
+
msgctxt "noun"
|
311 |
+
msgid "Pricing"
|
312 |
+
msgstr "Pricing"
|
313 |
|
314 |
+
#: includes/class-freemius.php:9819, includes/customizer/class-fs-customizer-support-section.php:67
|
315 |
+
msgid "Support Forum"
|
316 |
+
msgstr "Support Forum"
|
317 |
|
318 |
+
#: includes/class-freemius.php:10559
|
319 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
320 |
+
msgstr "Your email has been successfully verified - you are AWESOME!"
|
321 |
|
322 |
+
#: includes/class-freemius.php:10560
|
323 |
+
msgctxt "a positive response"
|
324 |
+
msgid "Right on"
|
325 |
+
msgstr "Right on"
|
326 |
|
327 |
+
#: includes/class-freemius.php:11096
|
328 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
329 |
+
msgstr "Your %s Add-on plan was successfully upgraded."
|
330 |
|
331 |
+
#: includes/class-freemius.php:11098
|
332 |
+
msgid "%s Add-on was successfully purchased."
|
333 |
+
msgstr "%s Add-on was successfully purchased."
|
334 |
|
335 |
+
#: includes/class-freemius.php:11101
|
336 |
+
msgid "Download the latest version"
|
337 |
+
msgstr "Download the latest version"
|
|
|
338 |
|
339 |
+
#: includes/class-freemius.php:11150
|
340 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
341 |
+
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
342 |
+
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
343 |
|
344 |
+
#: includes/class-freemius.php:11153, includes/class-freemius.php:11463, includes/class-freemius.php:11528
|
345 |
+
msgid "Error received from the server:"
|
346 |
+
msgstr "Error received from the server:"
|
347 |
|
348 |
+
#: includes/class-freemius.php:11164
|
349 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
350 |
+
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
351 |
|
352 |
+
#: includes/class-freemius.php:11281, includes/class-freemius.php:11468, includes/class-freemius.php:11511
|
353 |
+
msgctxt "something somebody says when they are thinking about what you have just said."
|
354 |
+
msgid "Hmm"
|
355 |
+
msgstr "Hmm"
|
356 |
|
357 |
+
#: includes/class-freemius.php:11294
|
358 |
+
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."
|
359 |
+
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."
|
360 |
|
361 |
+
#: includes/class-freemius.php:11295, templates/account.php:70, templates/add-ons.php:130
|
362 |
+
msgctxt "trial period"
|
363 |
+
msgid "Trial"
|
364 |
+
msgstr "Trial"
|
365 |
|
366 |
+
#: includes/class-freemius.php:11300
|
367 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
368 |
+
msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
369 |
|
370 |
+
#: includes/class-freemius.php:11304, includes/class-freemius.php:11358
|
371 |
+
msgid "Please contact us here"
|
372 |
+
msgstr "Please contact us here"
|
|
|
373 |
|
374 |
+
#: includes/class-freemius.php:11314
|
375 |
+
msgid "Your plan was successfully upgraded."
|
376 |
+
msgstr "Your plan was successfully upgraded."
|
377 |
|
378 |
+
#: includes/class-freemius.php:11331
|
379 |
+
msgid "Your plan was successfully changed to %s."
|
380 |
+
msgstr "Your plan was successfully changed to %s."
|
381 |
|
382 |
+
#: includes/class-freemius.php:11346
|
383 |
+
msgid "Your license has expired. You can still continue using the free %s forever."
|
384 |
+
msgstr "Your license has expired. You can still continue using the free %s forever."
|
385 |
|
386 |
+
#: includes/class-freemius.php:11354
|
387 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
388 |
+
msgstr "Your license has been cancelled. If you think it's a mistake, please contact support."
|
389 |
|
390 |
+
#: includes/class-freemius.php:11367
|
391 |
+
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."
|
392 |
+
msgstr "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."
|
|
|
393 |
|
394 |
+
#: includes/class-freemius.php:11389
|
395 |
+
msgid "Your trial has expired. You can still continue using all our free features."
|
396 |
+
msgstr "Your trial has expired. You can still continue using all our free features."
|
397 |
|
398 |
+
#: includes/class-freemius.php:11459
|
399 |
+
msgid "It looks like the license could not be activated."
|
400 |
+
msgstr "It looks like the license could not be activated."
|
|
|
401 |
|
402 |
+
#: includes/class-freemius.php:11489
|
403 |
+
msgid "Your license was successfully activated."
|
404 |
+
msgstr "Your license was successfully activated."
|
|
|
405 |
|
406 |
+
#: includes/class-freemius.php:11515
|
407 |
+
msgid "It looks like your site currently doesn't have an active license."
|
408 |
+
msgstr "It looks like your site currently doesn't have an active license."
|
409 |
|
410 |
+
#: includes/class-freemius.php:11527
|
411 |
+
msgid "It looks like the license deactivation failed."
|
412 |
+
msgstr "It looks like the license deactivation failed."
|
413 |
|
414 |
+
#: includes/class-freemius.php:11554
|
415 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
416 |
+
msgstr "Your license was successfully deactivated, you are back to the %s plan."
|
417 |
+
|
418 |
+
#: includes/class-freemius.php:11555
|
419 |
+
msgid "O.K"
|
420 |
+
msgstr "O.K"
|
421 |
+
|
422 |
+
#: includes/class-freemius.php:11603
|
423 |
+
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
424 |
+
msgstr "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
425 |
+
|
426 |
+
#: includes/class-freemius.php:11613
|
427 |
+
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
428 |
+
msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
429 |
+
|
430 |
+
#: includes/class-freemius.php:11637
|
431 |
+
msgid "You are already running the %s in a trial mode."
|
432 |
+
msgstr "You are already running the %s in a trial mode."
|
433 |
+
|
434 |
+
#: includes/class-freemius.php:11648
|
435 |
+
msgid "You already utilized a trial before."
|
436 |
+
msgstr "You already utilized a trial before."
|
437 |
+
|
438 |
+
#: includes/class-freemius.php:11662
|
439 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
440 |
+
msgstr "Plan %s do not exist, therefore, can't start a trial."
|
441 |
+
|
442 |
+
#: includes/class-freemius.php:11673
|
443 |
+
msgid "Plan %s does not support a trial period."
|
444 |
+
msgstr "Plan %s does not support a trial period."
|
445 |
+
|
446 |
+
#: includes/class-freemius.php:11684
|
447 |
+
msgid "None of the %s's plans supports a trial period."
|
448 |
+
msgstr "None of the %s's plans supports a trial period."
|
449 |
+
|
450 |
+
#: includes/class-freemius.php:11734
|
451 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
452 |
+
msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
453 |
+
|
454 |
+
#: includes/class-freemius.php:11785
|
455 |
+
msgid "Your %s free trial was successfully cancelled."
|
456 |
+
msgstr "Your %s free trial was successfully cancelled."
|
457 |
|
458 |
+
#: includes/class-freemius.php:11793
|
459 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
460 |
+
msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
461 |
|
462 |
+
#: includes/class-freemius.php:12032
|
463 |
+
msgid "Version %s was released."
|
464 |
+
msgstr "Version %s was released."
|
465 |
+
|
466 |
+
#: includes/class-freemius.php:12032
|
467 |
+
msgid "Please download %s."
|
468 |
+
msgstr "Please download %s."
|
469 |
+
|
470 |
+
#: includes/class-freemius.php:12039
|
471 |
+
msgid "the latest %s version here"
|
472 |
+
msgstr "the latest %s version here"
|
473 |
+
|
474 |
+
#: includes/class-freemius.php:12044
|
475 |
+
msgid "New"
|
476 |
+
msgstr "New"
|
477 |
+
|
478 |
+
#: includes/class-freemius.php:12049
|
479 |
+
msgid "Seems like you got the latest release."
|
480 |
+
msgstr "Seems like you got the latest release."
|
481 |
+
|
482 |
+
#: includes/class-freemius.php:12050
|
483 |
+
msgid "You are all good!"
|
484 |
+
msgstr "You are all good!"
|
485 |
+
|
486 |
+
#: includes/class-freemius.php:12316
|
487 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
488 |
+
msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
489 |
+
|
490 |
+
#: includes/class-freemius.php:12491
|
491 |
+
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."
|
492 |
+
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."
|
493 |
+
|
494 |
+
#: includes/class-freemius.php:12497
|
495 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
496 |
+
msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
497 |
+
|
498 |
+
#: includes/class-freemius.php:12502
|
499 |
+
msgid "%s is the new owner of the account."
|
500 |
+
msgstr "%s is the new owner of the account."
|
501 |
+
|
502 |
+
#: includes/class-freemius.php:12504
|
503 |
+
msgctxt "as congratulations"
|
504 |
+
msgid "Congrats"
|
505 |
+
msgstr "Congrats"
|
506 |
+
|
507 |
+
#: includes/class-freemius.php:12524
|
508 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
509 |
+
msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
510 |
+
|
511 |
+
#: includes/class-freemius.php:12525
|
512 |
+
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
513 |
+
msgstr "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
514 |
+
|
515 |
+
#: includes/class-freemius.php:12532
|
516 |
+
msgid "Change Ownership"
|
517 |
+
msgstr "Change Ownership"
|
518 |
+
|
519 |
+
#: includes/class-freemius.php:12540
|
520 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
521 |
+
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
522 |
+
|
523 |
+
#: includes/class-freemius.php:12552
|
524 |
+
msgid "Please provide your full name."
|
525 |
+
msgstr "Please provide your full name."
|
526 |
+
|
527 |
+
#: includes/class-freemius.php:12557
|
528 |
+
msgid "Your name was successfully updated."
|
529 |
+
msgstr "Your name was successfully updated."
|
530 |
+
|
531 |
+
#: includes/class-freemius.php:12618
|
532 |
+
msgid "You have successfully updated your %s."
|
533 |
+
msgstr "You have successfully updated your %s."
|
534 |
+
|
535 |
+
#: includes/class-freemius.php:12756
|
536 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
537 |
+
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
538 |
+
|
539 |
+
#: includes/class-freemius.php:12757
|
540 |
+
msgctxt "advance notice of something that will need attention."
|
541 |
+
msgid "Heads up"
|
542 |
+
msgstr "Heads up"
|
543 |
+
|
544 |
+
#: includes/class-freemius.php:13075
|
545 |
+
msgid "Awesome"
|
546 |
+
msgstr "Awesome"
|
547 |
+
|
548 |
+
#: includes/class-freemius.php:13115
|
549 |
+
msgctxt "exclamation"
|
550 |
+
msgid "Hey"
|
551 |
+
msgstr "Hey"
|
552 |
+
|
553 |
+
#: includes/class-freemius.php:13115
|
554 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
555 |
+
msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
556 |
+
|
557 |
+
#: includes/class-freemius.php:13123
|
558 |
+
msgid "No commitment for %s days - cancel anytime!"
|
559 |
+
msgstr "No commitment for %s days - cancel anytime!"
|
560 |
+
|
561 |
+
#: includes/class-freemius.php:13124
|
562 |
+
msgid "No credit card required"
|
563 |
+
msgstr "No credit card required"
|
564 |
+
|
565 |
+
#: includes/class-freemius.php:13131, templates/forms/trial-start.php:53
|
566 |
+
msgctxt "call to action"
|
567 |
+
msgid "Start free trial"
|
568 |
+
msgstr "Start free trial"
|
569 |
+
|
570 |
+
#: includes/class-freemius.php:13208
|
571 |
+
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!"
|
572 |
+
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!"
|
573 |
+
|
574 |
+
#: includes/class-freemius.php:13217
|
575 |
+
msgid "Learn more"
|
576 |
+
msgstr "Learn more"
|
577 |
+
|
578 |
+
#: includes/class-freemius.php:13373, templates/account.php:330, templates/connect.php:309, templates/forms/license-activation.php:24
|
579 |
+
msgid "Activate License"
|
580 |
+
msgstr "Activate License"
|
581 |
+
|
582 |
+
#: includes/class-freemius.php:13374, templates/account.php:393
|
583 |
msgid "Change License"
|
584 |
msgstr "Change License"
|
585 |
|
586 |
+
#: includes/class-freemius.php:13435
|
587 |
+
msgid "Opt Out"
|
588 |
+
msgstr "Opt Out"
|
589 |
|
590 |
+
#: includes/class-freemius.php:13437, includes/class-freemius.php:13442
|
591 |
+
msgid "Opt In"
|
592 |
+
msgstr "Opt In"
|
593 |
|
594 |
+
#: includes/class-freemius.php:13630
|
595 |
+
msgid "Please follow these steps to complete the upgrade"
|
596 |
+
msgstr "Please follow these steps to complete the upgrade"
|
597 |
|
598 |
+
#: includes/class-freemius.php:13633
|
599 |
+
msgid "Download the latest %s version"
|
600 |
+
msgstr "Download the latest %s version"
|
601 |
|
602 |
+
#: includes/class-freemius.php:13637
|
603 |
+
msgid "Upload and activate the downloaded version"
|
604 |
+
msgstr "Upload and activate the downloaded version"
|
605 |
|
606 |
+
#: includes/class-freemius.php:13639
|
607 |
+
msgid "How to upload and activate?"
|
608 |
+
msgstr "How to upload and activate?"
|
609 |
|
610 |
+
#: includes/class-freemius.php:13798
|
611 |
+
msgid "Auto installation only works for opted-in users."
|
612 |
+
msgstr "Auto installation only works for opted-in users."
|
613 |
|
614 |
+
#: includes/class-freemius.php:13808, includes/class-freemius.php:13841, includes/class-fs-plugin-updater.php:490, includes/class-fs-plugin-updater.php:504
|
615 |
+
msgid "Invalid module ID."
|
616 |
+
msgstr "Invalid module ID."
|
617 |
|
618 |
+
#: includes/class-freemius.php:13817, includes/class-fs-plugin-updater.php:524
|
619 |
+
msgid "Premium version already active."
|
620 |
+
msgstr "Premium version already active."
|
|
|
621 |
|
622 |
+
#: includes/class-freemius.php:13824
|
623 |
+
msgid "You do not have a valid license to access the premium version."
|
624 |
+
msgstr "You do not have a valid license to access the premium version."
|
|
|
625 |
|
626 |
+
#: includes/class-freemius.php:13831
|
627 |
+
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
628 |
+
msgstr "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
629 |
+
|
630 |
+
#: includes/class-freemius.php:13849, includes/class-fs-plugin-updater.php:523
|
631 |
+
msgid "Premium add-on version already installed."
|
632 |
+
msgstr "Premium add-on version already installed."
|
633 |
+
|
634 |
+
#: includes/class-freemius.php:14194
|
635 |
+
msgid "View paid features"
|
636 |
+
msgstr "View paid features"
|
637 |
+
|
638 |
+
#: includes/class-fs-plugin-updater.php:131
|
639 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
640 |
+
msgstr "%sRenew your license now%s to access version %s features and support."
|
641 |
+
|
642 |
+
#: includes/class-fs-plugin-updater.php:553
|
643 |
+
msgid "Installing plugin: %s"
|
644 |
+
msgstr "Installing plugin: %s"
|
645 |
+
|
646 |
+
#: includes/class-fs-plugin-updater.php:594
|
647 |
+
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
648 |
+
msgstr "Unable to connect to the filesystem. Please confirm your credentials."
|
649 |
+
|
650 |
+
#: includes/class-fs-plugin-updater.php:700
|
651 |
+
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
652 |
+
msgstr "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
653 |
+
|
654 |
+
#: includes/fs-plugin-info-dialog.php:328, templates/account.php:696
|
655 |
+
msgctxt "verb"
|
656 |
+
msgid "Purchase"
|
657 |
+
msgstr "Purchase"
|
658 |
+
|
659 |
+
#: includes/fs-plugin-info-dialog.php:331
|
660 |
+
msgid "Start my free %s"
|
661 |
+
msgstr "Start my free %s"
|
662 |
+
|
663 |
+
#: includes/fs-plugin-info-dialog.php:355, templates/account.php:52
|
664 |
+
msgctxt "as download latest version"
|
665 |
+
msgid "Download Latest"
|
666 |
+
msgstr "Download Latest"
|
667 |
+
|
668 |
+
#: includes/fs-plugin-info-dialog.php:358, templates/account.php:676, templates/account.php:729, templates/auto-installation.php:110
|
669 |
msgid "Install Now"
|
670 |
msgstr "Install Now"
|
671 |
|
672 |
+
#: includes/fs-plugin-info-dialog.php:364, templates/account.php:384
|
673 |
msgid "Install Update Now"
|
674 |
msgstr "Install Update Now"
|
675 |
|
676 |
+
#: includes/fs-plugin-info-dialog.php:368
|
677 |
+
msgid "Newer Version (%s) Installed"
|
678 |
+
msgstr "Newer Version (%s) Installed"
|
679 |
|
680 |
+
#: includes/fs-plugin-info-dialog.php:371
|
681 |
+
msgid "Latest Version Installed"
|
682 |
+
msgstr "Latest Version Installed"
|
683 |
|
684 |
+
#: includes/fs-plugin-info-dialog.php:484
|
685 |
+
msgctxt "Plugin installer section title"
|
686 |
+
msgid "Description"
|
687 |
+
msgstr "Description"
|
688 |
|
689 |
+
#: includes/fs-plugin-info-dialog.php:485
|
690 |
+
msgctxt "Plugin installer section title"
|
691 |
+
msgid "Installation"
|
692 |
+
msgstr "Installation"
|
693 |
|
694 |
+
#: includes/fs-plugin-info-dialog.php:486
|
695 |
+
msgctxt "Plugin installer section title"
|
696 |
+
msgid "FAQ"
|
697 |
+
msgstr "FAQ"
|
698 |
|
699 |
+
#: includes/fs-plugin-info-dialog.php:487, templates/plugin-info/description.php:55
|
700 |
+
msgid "Screenshots"
|
701 |
+
msgstr "Screenshots"
|
702 |
|
703 |
+
#: includes/fs-plugin-info-dialog.php:488
|
704 |
+
msgctxt "Plugin installer section title"
|
705 |
+
msgid "Changelog"
|
706 |
+
msgstr "Changelog"
|
707 |
|
708 |
+
#: includes/fs-plugin-info-dialog.php:489
|
709 |
+
msgctxt "Plugin installer section title"
|
710 |
+
msgid "Reviews"
|
711 |
+
msgstr "Reviews"
|
712 |
|
713 |
+
#: includes/fs-plugin-info-dialog.php:490
|
714 |
+
msgctxt "Plugin installer section title"
|
715 |
+
msgid "Other Notes"
|
716 |
+
msgstr "Other Notes"
|
717 |
|
718 |
+
#: includes/fs-plugin-info-dialog.php:505
|
719 |
+
msgctxt "Plugin installer section title"
|
720 |
+
msgid "Features & Pricing"
|
721 |
+
msgstr "Features & Pricing"
|
722 |
|
723 |
+
#: includes/fs-plugin-info-dialog.php:515
|
724 |
+
msgid "Plugin Install"
|
725 |
+
msgstr "Plugin Install"
|
726 |
|
727 |
+
#: includes/fs-plugin-info-dialog.php:587
|
728 |
+
msgctxt "e.g. Professional Plan"
|
729 |
+
msgid "%s Plan"
|
730 |
+
msgstr "%s Plan"
|
731 |
|
732 |
+
#: includes/fs-plugin-info-dialog.php:612
|
733 |
+
msgctxt "e.g. the best product"
|
734 |
+
msgid "Best"
|
735 |
+
msgstr "Best"
|
736 |
|
737 |
+
#: includes/fs-plugin-info-dialog.php:618, includes/fs-plugin-info-dialog.php:638
|
738 |
+
msgctxt "as every month"
|
739 |
+
msgid "Monthly"
|
740 |
+
msgstr "Monthly"
|
741 |
|
742 |
+
#: includes/fs-plugin-info-dialog.php:621
|
743 |
+
msgctxt "as once a year"
|
744 |
+
msgid "Annual"
|
745 |
+
msgstr "Annual"
|
746 |
|
747 |
+
#: includes/fs-plugin-info-dialog.php:624
|
748 |
+
msgid "Lifetime"
|
749 |
+
msgstr "Lifetime"
|
750 |
|
751 |
+
#: includes/fs-plugin-info-dialog.php:638, includes/fs-plugin-info-dialog.php:640, includes/fs-plugin-info-dialog.php:642
|
752 |
+
msgctxt "e.g. billed monthly"
|
753 |
+
msgid "Billed %s"
|
754 |
+
msgstr "Billed %s"
|
755 |
|
756 |
+
#: includes/fs-plugin-info-dialog.php:640
|
757 |
+
msgctxt "as once a year"
|
758 |
+
msgid "Annually"
|
759 |
+
msgstr "Annually"
|
760 |
|
761 |
+
#: includes/fs-plugin-info-dialog.php:642
|
762 |
+
msgctxt "as once a year"
|
763 |
+
msgid "Once"
|
764 |
+
msgstr "Once"
|
765 |
|
766 |
+
#: includes/fs-plugin-info-dialog.php:648
|
767 |
+
msgid "Single Site License"
|
768 |
+
msgstr "Single Site License"
|
769 |
|
770 |
+
#: includes/fs-plugin-info-dialog.php:650
|
771 |
+
msgid "Unlimited Licenses"
|
772 |
+
msgstr "Unlimited Licenses"
|
773 |
|
774 |
+
#: includes/fs-plugin-info-dialog.php:652
|
775 |
+
msgid "Up to %s Sites"
|
776 |
+
msgstr "Up to %s Sites"
|
777 |
|
778 |
+
#: includes/fs-plugin-info-dialog.php:662, templates/plugin-info/features.php:82
|
779 |
+
msgctxt "as monthly period"
|
780 |
+
msgid "mo"
|
781 |
+
msgstr "mo"
|
782 |
|
783 |
+
#: includes/fs-plugin-info-dialog.php:669, templates/plugin-info/features.php:80
|
784 |
+
msgctxt "as annual period"
|
785 |
+
msgid "year"
|
786 |
+
msgstr "year"
|
787 |
|
788 |
+
#: includes/fs-plugin-info-dialog.php:721
|
789 |
+
msgctxt "noun"
|
790 |
+
msgid "Price"
|
791 |
+
msgstr "Price"
|
792 |
|
793 |
+
#: includes/fs-plugin-info-dialog.php:767
|
794 |
+
msgctxt "as a discount of $5 or 10%"
|
795 |
+
msgid "Save %s"
|
796 |
+
msgstr "Save %s"
|
797 |
|
798 |
+
#: includes/fs-plugin-info-dialog.php:777
|
799 |
+
msgid "No commitment for %s - cancel anytime"
|
800 |
+
msgstr "No commitment for %s - cancel anytime"
|
801 |
|
802 |
+
#: includes/fs-plugin-info-dialog.php:780
|
803 |
+
msgid "After your free %s, pay as little as %s"
|
804 |
+
msgstr "After your free %s, pay as little as %s"
|
805 |
|
806 |
+
#: includes/fs-plugin-info-dialog.php:791
|
807 |
+
msgid "Details"
|
808 |
+
msgstr "Details"
|
809 |
|
810 |
+
#: includes/fs-plugin-info-dialog.php:794, templates/account.php:59, templates/debug.php:183, templates/debug.php:220, templates/debug.php:354
|
811 |
+
msgctxt "product version"
|
812 |
+
msgid "Version"
|
813 |
+
msgstr "Version"
|
814 |
|
815 |
+
#: includes/fs-plugin-info-dialog.php:800
|
816 |
+
msgctxt "as the plugin author"
|
817 |
+
msgid "Author"
|
818 |
+
msgstr "Author"
|
819 |
|
820 |
+
#: includes/fs-plugin-info-dialog.php:806
|
821 |
+
msgid "Last Updated"
|
822 |
+
msgstr "Last Updated"
|
823 |
|
824 |
+
#: includes/fs-plugin-info-dialog.php:810
|
825 |
+
msgctxt "x-ago"
|
826 |
+
msgid "%s ago"
|
827 |
+
msgstr "%s ago"
|
828 |
|
829 |
+
#: includes/fs-plugin-info-dialog.php:819
|
830 |
+
msgid "Requires WordPress Version"
|
831 |
+
msgstr "Requires WordPress Version"
|
832 |
|
833 |
+
#: includes/fs-plugin-info-dialog.php:819
|
834 |
+
msgid "%s or higher"
|
835 |
+
msgstr "%s or higher"
|
836 |
|
837 |
+
#: includes/fs-plugin-info-dialog.php:825
|
838 |
+
msgid "Compatible up to"
|
839 |
+
msgstr "Compatible up to"
|
840 |
|
841 |
+
#: includes/fs-plugin-info-dialog.php:832
|
842 |
+
msgid "Downloaded"
|
843 |
+
msgstr "Downloaded"
|
844 |
|
845 |
+
#: includes/fs-plugin-info-dialog.php:835
|
846 |
+
msgid "%s time"
|
847 |
+
msgstr "%s time"
|
|
|
848 |
|
849 |
+
#: includes/fs-plugin-info-dialog.php:837
|
850 |
+
msgid "%s times"
|
851 |
+
msgstr "%s times"
|
852 |
|
853 |
+
#: includes/fs-plugin-info-dialog.php:847
|
854 |
+
msgid "WordPress.org Plugin Page"
|
855 |
+
msgstr "WordPress.org Plugin Page"
|
856 |
|
857 |
+
#: includes/fs-plugin-info-dialog.php:854
|
858 |
+
msgid "Plugin Homepage"
|
859 |
+
msgstr "Plugin Homepage"
|
860 |
|
861 |
+
#: includes/fs-plugin-info-dialog.php:861, includes/fs-plugin-info-dialog.php:941
|
862 |
+
msgid "Donate to this plugin"
|
863 |
+
msgstr "Donate to this plugin"
|
864 |
|
865 |
+
#: includes/fs-plugin-info-dialog.php:867
|
866 |
+
msgid "Average Rating"
|
867 |
+
msgstr "Average Rating"
|
868 |
|
869 |
+
#: includes/fs-plugin-info-dialog.php:874
|
870 |
+
msgid "based on %s"
|
871 |
+
msgstr "based on %s"
|
872 |
|
873 |
+
#: includes/fs-plugin-info-dialog.php:878
|
874 |
+
msgid "%s rating"
|
875 |
+
msgstr "%s rating"
|
876 |
|
877 |
+
#: includes/fs-plugin-info-dialog.php:880
|
878 |
+
msgid "%s ratings"
|
879 |
+
msgstr "%s ratings"
|
880 |
|
881 |
+
#: includes/fs-plugin-info-dialog.php:894
|
882 |
+
msgid "%s star"
|
883 |
+
msgstr "%s star"
|
884 |
|
885 |
+
#: includes/fs-plugin-info-dialog.php:896
|
886 |
+
msgid "%s stars"
|
887 |
+
msgstr "%s stars"
|
888 |
|
889 |
+
#: includes/fs-plugin-info-dialog.php:907
|
890 |
+
msgid "Click to see reviews that provided a rating of %s"
|
891 |
+
msgstr "Click to see reviews that provided a rating of %s"
|
892 |
|
893 |
+
#: includes/fs-plugin-info-dialog.php:920
|
894 |
+
msgid "Contributors"
|
895 |
+
msgstr "Contributors"
|
896 |
|
897 |
+
#: includes/fs-plugin-info-dialog.php:948, includes/fs-plugin-info-dialog.php:950
|
898 |
+
msgid "Warning"
|
899 |
+
msgstr "Warning"
|
900 |
|
901 |
+
#: includes/fs-plugin-info-dialog.php:948
|
902 |
+
msgid "This plugin has not been tested with your current version of WordPress."
|
903 |
+
msgstr "This plugin has not been tested with your current version of WordPress."
|
904 |
|
905 |
+
#: includes/fs-plugin-info-dialog.php:950
|
906 |
+
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
907 |
+
msgstr "This plugin has not been marked as compatible with your version of WordPress."
|
908 |
|
909 |
+
#: includes/fs-plugin-info-dialog.php:969
|
910 |
+
msgid "Paid add-on must be deployed to Freemius."
|
911 |
+
msgstr "Paid add-on must be deployed to Freemius."
|
|
|
912 |
|
913 |
+
#: includes/fs-plugin-info-dialog.php:970
|
914 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
915 |
+
msgstr "Add-on must be deployed to WordPress.org or Freemius."
|
|
|
916 |
|
917 |
+
#: templates/account.php:53
|
918 |
+
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
919 |
+
msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
920 |
|
921 |
+
#: templates/account.php:54
|
922 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
923 |
+
msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
924 |
|
925 |
+
#: templates/account.php:55
|
926 |
+
msgid "You can still enjoy all %s features but you will not have access to %s updates and support."
|
927 |
+
msgstr "You can still enjoy all %s features but you will not have access to %s updates and support."
|
928 |
|
929 |
+
#: templates/account.php:56
|
930 |
+
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
931 |
+
msgstr "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
932 |
|
933 |
+
#. translators: %s: Plan title (e.g. "Professional")
|
934 |
+
#: templates/account.php:58
|
935 |
+
msgid "Activate %s Plan"
|
936 |
+
msgstr "Activate %s Plan"
|
937 |
|
938 |
+
#. translators: %s: Time period (e.g. Auto renews in "2 months")
|
939 |
+
#: templates/account.php:61
|
940 |
+
msgid "Auto renews in %s"
|
941 |
+
msgstr "Auto renews in %s"
|
942 |
|
943 |
+
#. translators: %s: Time period (e.g. Expires in "2 months")
|
944 |
+
#: templates/account.php:63
|
945 |
+
msgid "Expires in %s"
|
946 |
+
msgstr "Expires in %s"
|
947 |
|
948 |
+
#: templates/account.php:64
|
949 |
+
msgctxt "as synchronize license"
|
950 |
+
msgid "Sync License"
|
951 |
+
msgstr "Sync License"
|
952 |
|
953 |
+
#: templates/account.php:65
|
954 |
+
msgid "Cancel Trial"
|
955 |
+
msgstr "Cancel Trial"
|
956 |
|
957 |
+
#: templates/account.php:66
|
958 |
+
msgid "Change Plan"
|
959 |
+
msgstr "Change Plan"
|
960 |
|
961 |
+
#: templates/account.php:67
|
962 |
+
msgctxt "verb"
|
963 |
+
msgid "Upgrade"
|
964 |
+
msgstr "Upgrade"
|
965 |
|
966 |
+
#: templates/account.php:69
|
967 |
+
msgctxt "verb"
|
968 |
+
msgid "Downgrade"
|
969 |
+
msgstr "Downgrade"
|
970 |
|
971 |
+
#: templates/account.php:71, templates/add-ons.php:126, templates/plugin-info/features.php:72
|
972 |
+
msgid "Free"
|
973 |
+
msgstr "Free"
|
974 |
|
975 |
+
#: templates/account.php:72
|
976 |
+
msgid "Activate"
|
977 |
+
msgstr "Activate"
|
978 |
|
979 |
+
#: templates/account.php:73, templates/debug.php:311, includes/customizer/class-fs-customizer-upsell-control.php:106
|
980 |
+
msgctxt "as product pricing plan"
|
981 |
+
msgid "Plan"
|
982 |
+
msgstr "Plan"
|
983 |
|
984 |
+
#: templates/account.php:87
|
985 |
+
msgid "Free Trial"
|
986 |
+
msgstr "Free Trial"
|
987 |
|
988 |
+
#: templates/account.php:98
|
989 |
+
msgid "Account Details"
|
990 |
+
msgstr "Account Details"
|
991 |
|
992 |
+
#: templates/account.php:108
|
993 |
+
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?"
|
994 |
+
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?"
|
995 |
|
996 |
+
#: templates/account.php:110
|
997 |
+
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?"
|
998 |
+
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?"
|
999 |
|
1000 |
+
#: templates/account.php:113
|
1001 |
+
msgid "Delete Account"
|
1002 |
+
msgstr "Delete Account"
|
1003 |
|
1004 |
+
#: templates/account.php:124
|
1005 |
+
msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
1006 |
+
msgstr "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
1007 |
|
1008 |
+
#: templates/account.php:125, templates/account.php:590
|
1009 |
+
msgid "Deactivate License"
|
1010 |
+
msgstr "Deactivate License"
|
|
|
1011 |
|
1012 |
+
#: templates/account.php:142
|
1013 |
+
msgid "Are you sure you want to proceed?"
|
1014 |
+
msgstr "Are you sure you want to proceed?"
|
|
|
1015 |
|
1016 |
+
#: templates/account.php:142
|
1017 |
+
msgid "Cancel Subscription"
|
1018 |
+
msgstr "Cancel Subscription"
|
|
|
1019 |
|
1020 |
+
#: templates/account.php:171
|
1021 |
+
msgctxt "as synchronize"
|
1022 |
+
msgid "Sync"
|
1023 |
+
msgstr "Sync"
|
1024 |
|
1025 |
+
#: templates/account.php:185, templates/debug.php:389
|
1026 |
+
msgid "Name"
|
1027 |
+
msgstr "Name"
|
|
|
1028 |
|
1029 |
+
#: templates/account.php:191, templates/debug.php:390
|
1030 |
+
msgid "Email"
|
1031 |
+
msgstr "Email"
|
1032 |
|
1033 |
+
#: templates/account.php:198, templates/debug.php:310, templates/debug.php:419
|
1034 |
+
msgid "User ID"
|
1035 |
+
msgstr "User ID"
|
1036 |
|
1037 |
+
#: templates/account.php:205
|
1038 |
+
msgid "Site ID"
|
1039 |
+
msgstr "Site ID"
|
1040 |
|
1041 |
+
#: templates/account.php:208
|
1042 |
+
msgid "No ID"
|
1043 |
+
msgstr "No ID"
|
1044 |
|
1045 |
+
#: templates/account.php:213, templates/debug.php:225, templates/debug.php:312, templates/debug.php:355, templates/debug.php:392
|
1046 |
+
msgid "Public Key"
|
1047 |
+
msgstr "Public Key"
|
1048 |
|
1049 |
+
#: templates/account.php:219, templates/debug.php:313, templates/debug.php:356, templates/debug.php:393
|
1050 |
+
msgid "Secret Key"
|
1051 |
+
msgstr "Secret Key"
|
1052 |
|
1053 |
+
#: templates/account.php:222
|
1054 |
+
msgctxt "as secret encryption key missing"
|
1055 |
+
msgid "No Secret"
|
1056 |
+
msgstr "No Secret"
|
1057 |
|
1058 |
+
#: templates/account.php:241
|
1059 |
+
msgid "Trial"
|
1060 |
+
msgstr "Trial"
|
1061 |
|
1062 |
+
#: templates/account.php:257, templates/debug.php:424
|
1063 |
+
msgid "License Key"
|
1064 |
+
msgstr "License Key"
|
1065 |
|
1066 |
+
#: templates/account.php:287
|
1067 |
+
msgid "not verified"
|
1068 |
+
msgstr "not verified"
|
1069 |
|
1070 |
+
#: templates/account.php:317
|
1071 |
+
msgid "Localhost"
|
1072 |
+
msgstr "Localhost"
|
1073 |
|
1074 |
+
#: templates/account.php:321
|
1075 |
+
msgctxt "as 5 licenses left"
|
1076 |
+
msgid "%s left"
|
1077 |
+
msgstr "%s left"
|
1078 |
|
1079 |
+
#: templates/account.php:322
|
1080 |
+
msgid "Last license"
|
1081 |
+
msgstr "Last license"
|
1082 |
|
1083 |
+
#: templates/account.php:352
|
1084 |
+
msgid "Premium version"
|
1085 |
+
msgstr "Premium version"
|
1086 |
|
1087 |
+
#: templates/account.php:354
|
1088 |
+
msgid "Free version"
|
1089 |
+
msgstr "Free version"
|
1090 |
|
1091 |
+
#: templates/account.php:366
|
1092 |
+
msgid "Verify Email"
|
1093 |
+
msgstr "Verify Email"
|
1094 |
|
1095 |
+
#: templates/account.php:377
|
1096 |
+
msgid "Download %s Version"
|
1097 |
+
msgstr "Download %s Version"
|
1098 |
|
1099 |
+
#: templates/account.php:391, templates/account.php:442
|
1100 |
+
msgctxt "verb"
|
1101 |
+
msgid "Show"
|
1102 |
+
msgstr "Show"
|
1103 |
|
1104 |
+
#: templates/account.php:405
|
1105 |
+
msgid "What is your %s?"
|
1106 |
+
msgstr "What is your %s?"
|
1107 |
|
1108 |
+
#: templates/account.php:413, templates/account/billing.php:27
|
1109 |
+
msgctxt "verb"
|
1110 |
+
msgid "Edit"
|
1111 |
+
msgstr "Edit"
|
1112 |
|
1113 |
+
#: templates/account.php:436
|
1114 |
+
msgctxt "verb"
|
1115 |
+
msgid "Hide"
|
1116 |
+
msgstr "Hide"
|
1117 |
|
1118 |
+
#: templates/account.php:472, templates/debug.php:218, templates/debug.php:308, templates/debug.php:351, templates/debug.php:388, templates/debug.php:417, templates/debug.php:496, templates/account/payments.php:35, templates/debug/logger.php:21
|
1119 |
+
msgid "ID"
|
1120 |
+
msgstr "ID"
|
|
|
1121 |
|
1122 |
+
#: templates/account.php:475
|
1123 |
+
msgctxt "as software license"
|
1124 |
+
msgid "License"
|
1125 |
+
msgstr "License"
|
1126 |
|
1127 |
+
#: templates/account.php:550
|
1128 |
+
msgid "Cancelled"
|
1129 |
+
msgstr "Cancelled"
|
|
|
1130 |
|
1131 |
+
#: templates/account.php:555
|
1132 |
+
msgid "Expired"
|
1133 |
+
msgstr "Expired"
|
1134 |
|
1135 |
+
#: templates/account.php:560
|
1136 |
+
msgid "No expiration"
|
1137 |
+
msgstr "No expiration"
|
|
|
1138 |
|
1139 |
+
#: templates/account.php:668, templates/account.php:724
|
1140 |
+
msgid "Activate this add-on"
|
1141 |
+
msgstr "Activate this add-on"
|
|
|
1142 |
|
1143 |
+
#: templates/account.php:745, templates/debug.php:336
|
1144 |
+
msgctxt "verb"
|
1145 |
+
msgid "Delete"
|
1146 |
+
msgstr "Delete"
|
1147 |
|
1148 |
+
#: templates/add-ons.php:36
|
1149 |
+
msgid "Add Ons for %s"
|
1150 |
+
msgstr "Add Ons for %s"
|
|
|
1151 |
|
1152 |
+
#: templates/add-ons.php:44
|
1153 |
+
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."
|
1154 |
+
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."
|
|
|
1155 |
|
1156 |
+
#: templates/add-ons.php:135
|
1157 |
+
msgid "View details"
|
1158 |
+
msgstr "View details"
|
|
|
1159 |
|
1160 |
+
#: templates/admin-notice.php:13, templates/forms/license-activation.php:73, templates/forms/resend-key.php:77
|
1161 |
+
msgctxt "as close a window"
|
1162 |
+
msgid "Dismiss"
|
1163 |
+
msgstr "Dismiss"
|
1164 |
|
1165 |
+
#: templates/auto-installation.php:44
|
1166 |
+
msgid "%s sec"
|
1167 |
+
msgstr "%s sec"
|
1168 |
|
1169 |
+
#: templates/auto-installation.php:82
|
1170 |
+
msgid "Automatic Installation"
|
1171 |
+
msgstr "Automatic Installation"
|
1172 |
|
1173 |
+
#: templates/auto-installation.php:92
|
1174 |
+
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."
|
1175 |
+
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."
|
1176 |
|
1177 |
+
#: templates/auto-installation.php:103
|
1178 |
+
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."
|
1179 |
+
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."
|
1180 |
|
1181 |
+
#: templates/auto-installation.php:108
|
1182 |
+
msgid "Cancel Installation"
|
1183 |
+
msgstr "Cancel Installation"
|
1184 |
|
1185 |
+
#: templates/checkout.php:168
|
1186 |
+
msgid "Checkout"
|
1187 |
+
msgstr "Checkout"
|
1188 |
|
1189 |
+
#: templates/checkout.php:168
|
1190 |
+
msgid "PCI compliant"
|
1191 |
+
msgstr "PCI compliant"
|
1192 |
|
1193 |
+
#: templates/connect.php:128
|
1194 |
+
msgid "Allow & Continue"
|
1195 |
+
msgstr "Allow & Continue"
|
1196 |
|
1197 |
+
#: templates/connect.php:131
|
1198 |
+
msgid "Re-send activation email"
|
1199 |
+
msgstr "Re-send activation email"
|
1200 |
|
1201 |
+
#: templates/connect.php:135
|
1202 |
+
msgid "Thanks %s!"
|
1203 |
+
msgstr "Thanks %s!"
|
1204 |
|
1205 |
+
#: templates/connect.php:143, templates/forms/license-activation.php:43
|
1206 |
+
msgid "Agree & Activate License"
|
1207 |
+
msgstr "Agree & Activate License"
|
1208 |
|
1209 |
+
#: templates/connect.php:147, templates/connect.php:170
|
1210 |
+
msgctxt "greeting"
|
1211 |
+
msgid "Hey %s,"
|
1212 |
+
msgstr "Hey %s,"
|
1213 |
|
1214 |
+
#: templates/connect.php:148
|
1215 |
+
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
1216 |
+
msgstr "Thanks for purchasing %s! To get started, please enter your license key:"
|
1217 |
|
1218 |
+
#: templates/connect.php:154
|
1219 |
+
msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1220 |
+
msgstr "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1221 |
|
1222 |
+
#: templates/connect.php:159
|
1223 |
+
msgid "Please help us improve %1$s! If you opt in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
1224 |
+
msgstr "Please help us improve %1$s! If you opt in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
1225 |
|
1226 |
+
#: templates/connect.php:189, templates/forms/license-activation.php:46
|
1227 |
+
msgid "License key"
|
1228 |
+
msgstr "License key"
|
1229 |
|
1230 |
+
#: templates/connect.php:192, templates/forms/license-activation.php:19
|
1231 |
+
msgid "Can't find your license key?"
|
1232 |
+
msgstr "Can't find your license key?"
|
1233 |
|
1234 |
+
#: templates/connect.php:199, templates/forms/deactivation/retry-skip.php:20
|
1235 |
+
msgctxt "verb"
|
1236 |
+
msgid "Skip"
|
1237 |
+
msgstr "Skip"
|
1238 |
|
1239 |
+
#: templates/connect.php:228
|
1240 |
+
msgid "Your Profile Overview"
|
1241 |
+
msgstr "Your Profile Overview"
|
1242 |
|
1243 |
+
#: templates/connect.php:229
|
1244 |
+
msgid "Name and email address"
|
1245 |
+
msgstr "Name and email address"
|
1246 |
|
1247 |
+
#: templates/connect.php:234
|
1248 |
+
msgid "Your Site Overview"
|
1249 |
+
msgstr "Your Site Overview"
|
1250 |
|
1251 |
+
#: templates/connect.php:235
|
1252 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
1253 |
+
msgstr "Site URL, WP version, PHP info, plugins & themes"
|
1254 |
|
1255 |
+
#: templates/connect.php:240
|
1256 |
+
msgid "Admin Notices"
|
1257 |
+
msgstr "Admin Notices"
|
1258 |
|
1259 |
+
#: templates/connect.php:241, templates/connect.php:263
|
1260 |
+
msgid "Updates, announcements, marketing, no spam"
|
1261 |
+
msgstr "Updates, announcements, marketing, no spam"
|
|
|
1262 |
|
1263 |
+
#: templates/connect.php:246
|
1264 |
+
msgid "Current %s Events"
|
1265 |
+
msgstr "Current %s Events"
|
|
|
1266 |
|
1267 |
+
#: templates/connect.php:247
|
1268 |
+
msgid "Activation, deactivation and uninstall"
|
1269 |
+
msgstr "Activation, deactivation and uninstall"
|
|
|
1270 |
|
1271 |
+
#: templates/connect.php:262
|
1272 |
+
msgid "Newsletter"
|
1273 |
+
msgstr "Newsletter"
|
|
|
1274 |
|
1275 |
+
#: templates/connect.php:279, templates/forms/license-activation.php:38
|
1276 |
+
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."
|
1277 |
+
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."
|
|
|
1278 |
|
1279 |
+
#: templates/connect.php:284
|
1280 |
+
msgid "What permissions are being granted?"
|
1281 |
+
msgstr "What permissions are being granted?"
|
|
|
1282 |
|
1283 |
+
#: templates/connect.php:305
|
1284 |
+
msgid "Don't have a license key?"
|
1285 |
+
msgstr "Don't have a license key?"
|
1286 |
|
1287 |
+
#: templates/connect.php:306
|
1288 |
+
msgid "Activate Free Version"
|
1289 |
+
msgstr "Activate Free Version"
|
|
|
1290 |
|
1291 |
+
#: templates/connect.php:308
|
1292 |
+
msgid "Have a license key?"
|
1293 |
+
msgstr "Have a license key?"
|
|
|
1294 |
|
1295 |
+
#: templates/connect.php:316
|
1296 |
+
msgid "Privacy Policy"
|
1297 |
+
msgstr "Privacy Policy"
|
1298 |
|
1299 |
+
#: templates/connect.php:318
|
1300 |
+
msgid "Terms of Service"
|
1301 |
+
msgstr "Terms of Service"
|
1302 |
|
1303 |
+
#: templates/connect.php:436
|
1304 |
+
msgctxt "as in the process of sending an email"
|
1305 |
+
msgid "Sending email"
|
1306 |
+
msgstr "Sending email"
|
1307 |
|
1308 |
+
#: templates/connect.php:437
|
1309 |
+
msgctxt "as activating plugin"
|
1310 |
+
msgid "Activating"
|
1311 |
+
msgstr "Activating"
|
1312 |
|
1313 |
+
#: templates/contact.php:74
|
1314 |
+
msgid "Contact"
|
1315 |
+
msgstr "Contact"
|
1316 |
|
1317 |
+
#: templates/debug.php:17
|
1318 |
+
msgctxt "as turned off"
|
1319 |
+
msgid "Off"
|
1320 |
+
msgstr "Off"
|
1321 |
|
1322 |
+
#: templates/debug.php:18
|
1323 |
+
msgctxt "as turned on"
|
1324 |
+
msgid "On"
|
1325 |
+
msgstr "On"
|
1326 |
|
1327 |
+
#: templates/debug.php:20
|
1328 |
+
msgid "SDK"
|
1329 |
+
msgstr "SDK"
|
1330 |
|
1331 |
+
#: templates/debug.php:24
|
1332 |
+
msgctxt "as code debugging"
|
1333 |
+
msgid "Debugging"
|
1334 |
+
msgstr "Debugging"
|
1335 |
|
1336 |
+
#: templates/debug.php:54, templates/debug.php:226, templates/debug.php:314
|
1337 |
+
msgid "Actions"
|
1338 |
+
msgstr "Actions"
|
1339 |
|
1340 |
+
#: templates/debug.php:64
|
1341 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1342 |
+
msgstr "Are you sure you want to delete all Freemius data?"
|
1343 |
|
1344 |
+
#: templates/debug.php:64
|
1345 |
+
msgid "Delete All Accounts"
|
1346 |
+
msgstr "Delete All Accounts"
|
1347 |
|
1348 |
+
#: templates/debug.php:71
|
1349 |
+
msgid "Clear API Cache"
|
1350 |
+
msgstr "Clear API Cache"
|
1351 |
|
1352 |
+
#: templates/debug.php:78
|
1353 |
+
msgid "Sync Data From Server"
|
1354 |
+
msgstr "Sync Data From Server"
|
1355 |
|
1356 |
+
#: templates/debug.php:82
|
1357 |
+
msgid "Load DB Option"
|
1358 |
+
msgstr "Load DB Option"
|
1359 |
|
1360 |
+
#: templates/debug.php:85
|
1361 |
+
msgid "Set DB Option"
|
1362 |
+
msgstr "Set DB Option"
|
1363 |
|
1364 |
+
#: templates/debug.php:162
|
1365 |
+
msgid "Key"
|
1366 |
+
msgstr "Key"
|
1367 |
|
1368 |
+
#: templates/debug.php:163
|
1369 |
+
msgid "Value"
|
1370 |
+
msgstr "Value"
|
1371 |
|
1372 |
+
#: templates/debug.php:179
|
1373 |
+
msgctxt "as software development kit versions"
|
1374 |
+
msgid "SDK Versions"
|
1375 |
+
msgstr "SDK Versions"
|
1376 |
|
1377 |
+
#: templates/debug.php:184
|
1378 |
+
msgid "SDK Path"
|
1379 |
+
msgstr "SDK Path"
|
1380 |
|
1381 |
+
#: templates/debug.php:185, templates/debug.php:224
|
1382 |
+
msgid "Module Path"
|
1383 |
+
msgstr "Module Path"
|
1384 |
|
1385 |
+
#: templates/debug.php:186
|
1386 |
+
msgid "Is Active"
|
1387 |
+
msgstr "Is Active"
|
|
|
1388 |
|
1389 |
+
#: templates/debug.php:214, templates/debug/plugins-themes-sync.php:35
|
1390 |
+
msgid "Plugins"
|
1391 |
+
msgstr "Plugins"
|
1392 |
|
1393 |
+
#: templates/debug.php:214, templates/debug/plugins-themes-sync.php:56
|
1394 |
+
msgid "Themes"
|
1395 |
+
msgstr "Themes"
|
1396 |
|
1397 |
+
#: templates/debug.php:219, templates/debug.php:309, templates/debug.php:353, templates/debug/scheduled-crons.php:81
|
1398 |
+
msgid "Slug"
|
1399 |
+
msgstr "Slug"
|
1400 |
|
1401 |
+
#: templates/debug.php:221, templates/debug.php:352
|
1402 |
+
msgid "Title"
|
1403 |
+
msgstr "Title"
|
1404 |
|
1405 |
+
#: templates/debug.php:222
|
1406 |
+
msgctxt "as application program interface"
|
1407 |
+
msgid "API"
|
1408 |
+
msgstr "API"
|
1409 |
|
1410 |
+
#: templates/debug.php:223
|
1411 |
+
msgid "Freemius State"
|
1412 |
+
msgstr "Freemius State"
|
1413 |
|
1414 |
+
#: templates/debug.php:255
|
1415 |
+
msgctxt "as connection was successful"
|
1416 |
+
msgid "Connected"
|
1417 |
+
msgstr "Connected"
|
1418 |
|
1419 |
+
#: templates/debug.php:256
|
1420 |
+
msgctxt "as connection blocked"
|
1421 |
+
msgid "Blocked"
|
1422 |
+
msgstr "Blocked"
|
1423 |
|
1424 |
+
#: templates/debug.php:277
|
1425 |
+
msgid "Simulate Trial"
|
1426 |
+
msgstr "Simulate Trial"
|
1427 |
|
1428 |
+
#: templates/debug.php:302
|
1429 |
+
msgid "%s Installs"
|
1430 |
+
msgstr "%s Installs"
|
1431 |
|
1432 |
+
#: templates/debug.php:304
|
1433 |
+
msgctxt "like websites"
|
1434 |
+
msgid "Sites"
|
1435 |
+
msgstr "Sites"
|
1436 |
|
1437 |
+
#: templates/debug.php:347
|
1438 |
+
msgid "Add Ons of module %s"
|
1439 |
+
msgstr "Add Ons of module %s"
|
1440 |
|
1441 |
+
#: templates/debug.php:384
|
1442 |
+
msgid "Users"
|
1443 |
+
msgstr "Users"
|
1444 |
|
1445 |
+
#: templates/debug.php:391
|
1446 |
+
msgid "Verified"
|
1447 |
+
msgstr "Verified"
|
1448 |
|
1449 |
+
#: templates/debug.php:413
|
1450 |
+
msgid "%s Licenses"
|
1451 |
+
msgstr "%s Licenses"
|
1452 |
|
1453 |
+
#: templates/debug.php:418
|
1454 |
+
msgid "Plugin ID"
|
1455 |
+
msgstr "Plugin ID"
|
1456 |
|
1457 |
+
#: templates/debug.php:420
|
1458 |
+
msgid "Plan ID"
|
1459 |
+
msgstr "Plan ID"
|
1460 |
|
1461 |
+
#: templates/debug.php:421
|
1462 |
+
msgid "Quota"
|
1463 |
+
msgstr "Quota"
|
1464 |
|
1465 |
+
#: templates/debug.php:422
|
1466 |
+
msgid "Activated"
|
1467 |
+
msgstr "Activated"
|
|
|
1468 |
|
1469 |
+
#: templates/debug.php:423
|
1470 |
+
msgid "Blocking"
|
1471 |
+
msgstr "Blocking"
|
1472 |
|
1473 |
+
#: templates/debug.php:425
|
1474 |
+
msgctxt "as expiration date"
|
1475 |
+
msgid "Expiration"
|
1476 |
+
msgstr "Expiration"
|
1477 |
|
1478 |
+
#: templates/debug.php:454
|
1479 |
+
msgid "Debug Log"
|
1480 |
+
msgstr "Debug Log"
|
1481 |
|
1482 |
+
#: templates/debug.php:458
|
1483 |
+
msgid "All Types"
|
1484 |
+
msgstr "All Types"
|
|
|
1485 |
|
1486 |
+
#: templates/debug.php:465
|
1487 |
+
msgid "All Requests"
|
1488 |
+
msgstr "All Requests"
|
1489 |
|
1490 |
+
#: templates/debug.php:470, templates/debug.php:499, templates/debug/logger.php:25
|
1491 |
+
msgid "File"
|
1492 |
+
msgstr "File"
|
1493 |
|
1494 |
+
#: templates/debug.php:471, templates/debug.php:497, templates/debug/logger.php:23
|
1495 |
+
msgid "Function"
|
1496 |
+
msgstr "Function"
|
1497 |
|
1498 |
+
#: templates/debug.php:472
|
1499 |
+
msgid "Process ID"
|
1500 |
+
msgstr "Process ID"
|
1501 |
|
1502 |
+
#: templates/debug.php:473
|
1503 |
+
msgid "Logger"
|
1504 |
+
msgstr "Logger"
|
1505 |
|
1506 |
+
#: templates/debug.php:474, templates/debug.php:498, templates/debug/logger.php:24
|
1507 |
+
msgid "Message"
|
1508 |
+
msgstr "Message"
|
1509 |
|
1510 |
+
#: templates/debug.php:476
|
1511 |
+
msgid "Filter"
|
1512 |
+
msgstr "Filter"
|
1513 |
|
1514 |
+
#: templates/debug.php:484
|
1515 |
+
msgid "Download"
|
1516 |
+
msgstr "Download"
|
1517 |
|
1518 |
+
#: templates/debug.php:495, templates/debug/logger.php:22
|
1519 |
+
msgid "Type"
|
1520 |
+
msgstr "Type"
|
1521 |
|
1522 |
+
#: templates/debug.php:500, templates/debug/logger.php:26
|
1523 |
+
msgid "Timestamp"
|
1524 |
+
msgstr "Timestamp"
|
1525 |
|
1526 |
+
#: templates/secure-https-header.php:28
|
1527 |
+
msgid "Secure HTTPS %s page, running from an external domain"
|
1528 |
+
msgstr "Secure HTTPS %s page, running from an external domain"
|
1529 |
|
1530 |
+
#: includes/customizer/class-fs-customizer-support-section.php:55, templates/plugin-info/features.php:43
|
1531 |
+
msgid "Support"
|
1532 |
+
msgstr "Support"
|
1533 |
|
1534 |
+
#: includes/debug/class-fs-debug-bar-panel.php:48, templates/debug/api-calls.php:54, templates/debug/logger.php:62
|
1535 |
+
msgctxt "milliseconds"
|
1536 |
+
msgid "ms"
|
1537 |
+
msgstr "ms"
|
1538 |
|
1539 |
+
#: includes/debug/debug-bar-start.php:41
|
1540 |
+
msgid "Freemius API"
|
1541 |
+
msgstr "Freemius API"
|
1542 |
|
1543 |
+
#: includes/debug/debug-bar-start.php:42
|
1544 |
+
msgid "Requests"
|
1545 |
+
msgstr "Requests"
|
1546 |
|
1547 |
+
#: templates/account/billing.php:28
|
1548 |
+
msgctxt "verb"
|
1549 |
+
msgid "Update"
|
1550 |
+
msgstr "Update"
|
1551 |
|
1552 |
+
#: templates/account/billing.php:39
|
1553 |
+
msgid "Billing"
|
1554 |
+
msgstr "Billing"
|
1555 |
|
1556 |
+
#: templates/account/billing.php:44, templates/account/billing.php:44
|
1557 |
+
msgid "Business name"
|
1558 |
+
msgstr "Business name"
|
1559 |
|
1560 |
+
#: templates/account/billing.php:45, templates/account/billing.php:45
|
1561 |
+
msgid "Tax / VAT ID"
|
1562 |
+
msgstr "Tax / VAT ID"
|
1563 |
|
1564 |
+
#: templates/account/billing.php:48, templates/account/billing.php:48, templates/account/billing.php:49, templates/account/billing.php:49
|
1565 |
+
msgid "Address Line %d"
|
1566 |
+
msgstr "Address Line %d"
|
1567 |
|
1568 |
+
#: templates/account/billing.php:52, templates/account/billing.php:52
|
1569 |
+
msgid "City"
|
1570 |
+
msgstr "City"
|
1571 |
|
1572 |
+
#: templates/account/billing.php:52, templates/account/billing.php:52
|
1573 |
+
msgid "Town"
|
1574 |
+
msgstr "Town"
|
|
|
1575 |
|
1576 |
+
#: templates/account/billing.php:53, templates/account/billing.php:53
|
1577 |
+
msgid "ZIP / Postal Code"
|
1578 |
+
msgstr "ZIP / Postal Code"
|
1579 |
|
1580 |
+
#: templates/account/billing.php:308
|
1581 |
+
msgid "Country"
|
1582 |
+
msgstr "Country"
|
1583 |
|
1584 |
+
#: templates/account/billing.php:310
|
1585 |
+
msgid "Select Country"
|
1586 |
+
msgstr "Select Country"
|
1587 |
|
1588 |
+
#: templates/account/billing.php:317, templates/account/billing.php:318
|
1589 |
+
msgid "State"
|
1590 |
+
msgstr "State"
|
1591 |
|
1592 |
+
#: templates/account/billing.php:317, templates/account/billing.php:318
|
1593 |
+
msgid "Province"
|
1594 |
+
msgstr "Province"
|
1595 |
|
1596 |
+
#: templates/account/payments.php:29
|
1597 |
+
msgid "Payments"
|
1598 |
+
msgstr "Payments"
|
1599 |
|
1600 |
+
#: templates/account/payments.php:36
|
1601 |
+
msgid "Date"
|
1602 |
+
msgstr "Date"
|
1603 |
|
1604 |
+
#: templates/account/payments.php:37
|
1605 |
+
msgid "Amount"
|
1606 |
+
msgstr "Amount"
|
1607 |
|
1608 |
+
#: templates/account/payments.php:38, templates/account/payments.php:50
|
1609 |
+
msgid "Invoice"
|
1610 |
+
msgstr "Invoice"
|
1611 |
|
1612 |
+
#: templates/debug/api-calls.php:56
|
1613 |
+
msgid "API"
|
1614 |
+
msgstr "API"
|
1615 |
|
1616 |
+
#: templates/debug/api-calls.php:68
|
1617 |
+
msgid "Method"
|
1618 |
+
msgstr "Method"
|
1619 |
|
1620 |
+
#: templates/debug/api-calls.php:69
|
1621 |
+
msgid "Code"
|
1622 |
+
msgstr "Code"
|
1623 |
|
1624 |
+
#: templates/debug/api-calls.php:70
|
1625 |
+
msgid "Length"
|
1626 |
+
msgstr "Length"
|
1627 |
|
1628 |
+
#: templates/debug/api-calls.php:71
|
1629 |
+
msgctxt "as file/folder path"
|
1630 |
+
msgid "Path"
|
1631 |
+
msgstr "Path"
|
1632 |
|
1633 |
+
#: templates/debug/api-calls.php:73
|
1634 |
+
msgid "Body"
|
1635 |
+
msgstr "Body"
|
1636 |
|
1637 |
+
#: templates/debug/api-calls.php:75
|
1638 |
+
msgid "Result"
|
1639 |
+
msgstr "Result"
|
1640 |
|
1641 |
+
#: templates/debug/api-calls.php:76
|
1642 |
+
msgid "Start"
|
1643 |
+
msgstr "Start"
|
|
|
1644 |
|
1645 |
+
#: templates/debug/api-calls.php:77
|
1646 |
+
msgid "End"
|
1647 |
+
msgstr "End"
|
1648 |
|
1649 |
+
#: templates/debug/logger.php:15
|
1650 |
+
msgid "Log"
|
1651 |
+
msgstr "Log"
|
1652 |
|
1653 |
+
#. translators: %s: time period (e.g. In "2 hours")
|
1654 |
+
#: templates/debug/plugins-themes-sync.php:18, templates/debug/scheduled-crons.php:92
|
1655 |
+
msgid "In %s"
|
1656 |
+
msgstr "In %s"
|
1657 |
|
1658 |
+
#. translators: %s: time period (e.g. "2 hours" ago)
|
1659 |
+
#: templates/debug/plugins-themes-sync.php:20, templates/debug/scheduled-crons.php:94
|
1660 |
+
msgid "%s ago"
|
1661 |
+
msgstr "%s ago"
|
1662 |
|
1663 |
+
#: templates/debug/plugins-themes-sync.php:21, templates/debug/scheduled-crons.php:75
|
1664 |
+
msgctxt "seconds"
|
1665 |
+
msgid "sec"
|
1666 |
+
msgstr "sec"
|
1667 |
|
1668 |
+
#: templates/debug/plugins-themes-sync.php:23
|
1669 |
+
msgid "Plugins & Themes Sync"
|
1670 |
+
msgstr "Plugins & Themes Sync"
|
|
|
1671 |
|
1672 |
+
#: templates/debug/plugins-themes-sync.php:28
|
1673 |
+
msgid "Total"
|
1674 |
+
msgstr "Total"
|
|
|
1675 |
|
1676 |
+
#: templates/debug/plugins-themes-sync.php:29, templates/debug/scheduled-crons.php:85
|
1677 |
+
msgid "Last"
|
1678 |
+
msgstr "Last"
|
|
|
1679 |
|
1680 |
+
#: templates/debug/scheduled-crons.php:77
|
1681 |
+
msgid "Scheduled Crons"
|
1682 |
+
msgstr "Scheduled Crons"
|
1683 |
|
1684 |
+
#: templates/debug/scheduled-crons.php:82
|
1685 |
+
msgid "Module"
|
1686 |
+
msgstr "Module"
|
1687 |
|
1688 |
+
#: templates/debug/scheduled-crons.php:83
|
1689 |
+
msgid "Module Type"
|
1690 |
+
msgstr "Module Type"
|
1691 |
|
1692 |
+
#: templates/debug/scheduled-crons.php:84
|
1693 |
+
msgid "Cron Type"
|
1694 |
+
msgstr "Cron Type"
|
1695 |
|
1696 |
+
#: templates/debug/scheduled-crons.php:86
|
1697 |
+
msgid "Next"
|
1698 |
+
msgstr "Next"
|
|
|
1699 |
|
1700 |
+
#: templates/forms/affiliation.php:81
|
1701 |
+
msgid "Non-expiring"
|
1702 |
+
msgstr "Non-expiring"
|
|
|
1703 |
|
1704 |
+
#: templates/forms/affiliation.php:84
|
1705 |
+
msgid "Apply to become an affiliate"
|
1706 |
+
msgstr "Apply to become an affiliate"
|
|
|
1707 |
|
1708 |
+
#: templates/forms/affiliation.php:103
|
1709 |
+
msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
1710 |
+
msgstr "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
|
|
1711 |
|
1712 |
+
#: templates/forms/affiliation.php:114
|
1713 |
+
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."
|
1714 |
+
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."
|
|
|
1715 |
|
1716 |
+
#: templates/forms/affiliation.php:117
|
1717 |
+
msgid "Your affiliation account was temporarily suspended."
|
1718 |
+
msgstr "Your affiliation account was temporarily suspended."
|
|
|
1719 |
|
1720 |
+
#: templates/forms/affiliation.php:120
|
1721 |
+
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."
|
1722 |
+
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."
|
1723 |
|
1724 |
+
#: templates/forms/affiliation.php:123
|
1725 |
+
msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
1726 |
+
msgstr "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
|
|
1727 |
|
1728 |
+
#: templates/forms/affiliation.php:136
|
1729 |
+
msgid "Like the %s? Become our ambassador and earn cash ;-)"
|
1730 |
+
msgstr "Like the %s? Become our ambassador and earn cash ;-)"
|
|
|
1731 |
|
1732 |
+
#: templates/forms/affiliation.php:137
|
1733 |
+
msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
1734 |
+
msgstr "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
|
|
1735 |
|
1736 |
+
#: templates/forms/affiliation.php:140
|
1737 |
+
msgid "Program Summary"
|
1738 |
+
msgstr "Program Summary"
|
1739 |
|
1740 |
+
#: templates/forms/affiliation.php:142
|
1741 |
+
msgid "%s commission when a customer purchases a new license."
|
1742 |
+
msgstr "%s commission when a customer purchases a new license."
|
|
|
1743 |
|
1744 |
+
#: templates/forms/affiliation.php:144
|
1745 |
+
msgid "Get commission for automated subscription renewals."
|
1746 |
+
msgstr "Get commission for automated subscription renewals."
|
1747 |
|
1748 |
+
#: templates/forms/affiliation.php:147
|
1749 |
+
msgid "%s tracking cookie after the first visit to maximize earnings potential."
|
1750 |
+
msgstr "%s tracking cookie after the first visit to maximize earnings potential."
|
1751 |
|
1752 |
+
#: templates/forms/affiliation.php:150
|
1753 |
+
msgid "Unlimited commissions."
|
1754 |
+
msgstr "Unlimited commissions."
|
1755 |
|
1756 |
+
#: templates/forms/affiliation.php:152
|
1757 |
+
msgid "%s minimum payout amount."
|
1758 |
+
msgstr "%s minimum payout amount."
|
1759 |
|
1760 |
+
#: templates/forms/affiliation.php:153
|
1761 |
+
msgid "Payouts are in USD and processed monthly via PayPal."
|
1762 |
+
msgstr "Payouts are in USD and processed monthly via PayPal."
|
1763 |
|
1764 |
+
#: templates/forms/affiliation.php:154
|
1765 |
+
msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
1766 |
+
msgstr "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
1767 |
|
1768 |
+
#: templates/forms/affiliation.php:157
|
1769 |
+
msgid "Affiliate"
|
1770 |
+
msgstr "Affiliate"
|
1771 |
|
1772 |
+
#: templates/forms/affiliation.php:160, templates/forms/resend-key.php:23
|
1773 |
+
msgid "Email address"
|
1774 |
+
msgstr "Email address"
|
1775 |
|
1776 |
+
#: templates/forms/affiliation.php:164
|
1777 |
+
msgid "Full name"
|
1778 |
+
msgstr "Full name"
|
1779 |
|
1780 |
+
#: templates/forms/affiliation.php:168
|
1781 |
+
msgid "PayPal account email address"
|
1782 |
+
msgstr "PayPal account email address"
|
1783 |
|
1784 |
+
#: templates/forms/affiliation.php:172
|
1785 |
+
msgid "Where are you going to promote the %s?"
|
1786 |
+
msgstr "Where are you going to promote the %s?"
|
1787 |
|
1788 |
+
#: templates/forms/affiliation.php:174
|
1789 |
+
msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
|
1790 |
+
msgstr "Enter the domain of your website or other websites from where you plan to promote the %s."
|
1791 |
|
1792 |
+
#: templates/forms/affiliation.php:176
|
1793 |
+
msgid "Add another domain"
|
1794 |
+
msgstr "Add another domain"
|
1795 |
|
1796 |
+
#: templates/forms/affiliation.php:180
|
1797 |
+
msgid "Extra Domains"
|
1798 |
+
msgstr "Extra Domains"
|
1799 |
|
1800 |
+
#: templates/forms/affiliation.php:181
|
1801 |
+
msgid "Extra domains where you will be marketing the product from."
|
1802 |
+
msgstr "Extra domains where you will be marketing the product from."
|
1803 |
|
1804 |
+
#: templates/forms/affiliation.php:191
|
1805 |
+
msgid "Promotion methods"
|
1806 |
+
msgstr "Promotion methods"
|
1807 |
|
1808 |
+
#: templates/forms/affiliation.php:194
|
1809 |
+
msgid "Social media (Facebook, Twitter, etc.)"
|
1810 |
+
msgstr "Social media (Facebook, Twitter, etc.)"
|
1811 |
|
1812 |
+
#: templates/forms/affiliation.php:198
|
1813 |
+
msgid "Mobile apps"
|
1814 |
+
msgstr "Mobile apps"
|
1815 |
|
1816 |
+
#: templates/forms/affiliation.php:202
|
1817 |
+
msgid "Website, email, and social media statistics (optional)"
|
1818 |
+
msgstr "Website, email, and social media statistics (optional)"
|
1819 |
|
1820 |
+
#: templates/forms/affiliation.php:205
|
1821 |
+
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)."
|
1822 |
+
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)."
|
1823 |
|
1824 |
+
#: templates/forms/affiliation.php:209
|
1825 |
+
msgid "How will you promote us?"
|
1826 |
+
msgstr "How will you promote us?"
|
1827 |
|
1828 |
+
#: templates/forms/affiliation.php:212
|
1829 |
+
msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
1830 |
+
msgstr "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
1831 |
|
1832 |
+
#: templates/forms/affiliation.php:218, templates/forms/resend-key.php:22
|
1833 |
+
msgid "Cancel"
|
1834 |
+
msgstr "Cancel"
|
1835 |
|
1836 |
+
#: templates/forms/affiliation.php:220
|
1837 |
+
msgid "Become an affiliate"
|
1838 |
+
msgstr "Become an affiliate"
|
1839 |
|
1840 |
+
#: templates/forms/affiliation.php:275
|
1841 |
+
msgid "Email address is required."
|
1842 |
+
msgstr "Email address is required."
|
1843 |
|
1844 |
+
#: templates/forms/affiliation.php:281
|
1845 |
+
msgid "PayPal email address is required."
|
1846 |
+
msgstr "PayPal email address is required."
|
1847 |
|
1848 |
+
#: templates/forms/affiliation.php:291
|
1849 |
+
msgid "Domain is required."
|
1850 |
+
msgstr "Domain is required."
|
1851 |
|
1852 |
+
#: templates/forms/affiliation.php:294, templates/forms/affiliation.php:308
|
1853 |
+
msgid "Invalid domain"
|
1854 |
+
msgstr "Invalid domain"
|
1855 |
|
1856 |
+
#: templates/forms/affiliation.php:364
|
1857 |
+
msgid "Processing"
|
1858 |
+
msgstr "Processing"
|
|
|
1859 |
|
1860 |
+
#: templates/forms/license-activation.php:20
|
1861 |
+
msgid "Please enter the license key that you received in the email right after the purchase:"
|
1862 |
+
msgstr "Please enter the license key that you received in the email right after the purchase:"
|
|
|
1863 |
|
1864 |
+
#: templates/forms/license-activation.php:25
|
1865 |
+
msgid "Update License"
|
1866 |
+
msgstr "Update License"
|
|
|
1867 |
|
1868 |
+
#: templates/forms/optout.php:30
|
1869 |
+
msgctxt "verb"
|
1870 |
+
msgid "Opt Out"
|
1871 |
+
msgstr "Opt Out"
|
1872 |
|
1873 |
+
#: templates/forms/optout.php:31
|
1874 |
+
msgctxt "verb"
|
1875 |
+
msgid "Opt In"
|
1876 |
+
msgstr "Opt In"
|
1877 |
|
1878 |
+
#: templates/forms/optout.php:32
|
1879 |
+
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
1880 |
+
msgstr "We appreciate your help in making the %s better by letting us track some usage data."
|
|
|
1881 |
|
1882 |
+
#: templates/forms/optout.php:33
|
1883 |
+
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."
|
1884 |
+
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."
|
1885 |
|
1886 |
+
#: templates/forms/optout.php:35
|
1887 |
+
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
1888 |
+
msgstr "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
1889 |
|
1890 |
+
#: templates/forms/resend-key.php:21
|
1891 |
+
msgid "Send License Key"
|
1892 |
+
msgstr "Send License Key"
|
1893 |
|
1894 |
+
#: templates/forms/resend-key.php:57
|
1895 |
+
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
1896 |
+
msgstr "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
1897 |
|
1898 |
+
#: templates/forms/trial-start.php:22
|
1899 |
+
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1900 |
+
msgstr "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1901 |
|
1902 |
+
#: templates/forms/trial-start.php:28
|
1903 |
+
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."
|
1904 |
+
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."
|
1905 |
|
1906 |
+
#: templates/js/style-premium-theme.php:37
|
1907 |
+
msgid "Premium"
|
1908 |
+
msgstr "Premium"
|
1909 |
|
1910 |
+
#: templates/plugin-info/description.php:72, templates/plugin-info/screenshots.php:31
|
1911 |
+
msgid "Click to view full-size screenshot %d"
|
1912 |
+
msgstr "Click to view full-size screenshot %d"
|
1913 |
|
1914 |
+
#: templates/plugin-info/features.php:56
|
1915 |
+
msgid "Unlimited Updates"
|
1916 |
+
msgstr "Unlimited Updates"
|
1917 |
|
1918 |
+
#: templates/forms/deactivation/contact.php:19
|
1919 |
+
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1920 |
+
msgstr "Sorry for the inconvenience and we are here to help if you give us a chance."
|
|
|
1921 |
|
1922 |
+
#: templates/forms/deactivation/contact.php:22
|
1923 |
+
msgid "Contact Support"
|
1924 |
+
msgstr "Contact Support"
|
1925 |
|
1926 |
+
#: templates/forms/deactivation/form.php:56
|
1927 |
+
msgid "Anonymous feedback"
|
1928 |
+
msgstr "Anonymous feedback"
|
1929 |
|
1930 |
+
#: templates/forms/deactivation/form.php:63
|
1931 |
+
msgid "Deactivate"
|
1932 |
+
msgstr "Deactivate"
|
1933 |
|
1934 |
+
#: templates/forms/deactivation/form.php:65
|
1935 |
+
msgid "Activate %s"
|
1936 |
+
msgstr "Activate %s"
|
1937 |
|
1938 |
+
#: templates/forms/deactivation/form.php:76
|
1939 |
+
msgid "Quick feedback"
|
1940 |
+
msgstr "Quick feedback"
|
1941 |
|
1942 |
+
#: templates/forms/deactivation/form.php:80
|
1943 |
+
msgid "If you have a moment, please let us know why you are %s"
|
1944 |
+
msgstr "If you have a moment, please let us know why you are %s"
|
1945 |
|
1946 |
+
#: templates/forms/deactivation/form.php:80
|
1947 |
+
msgid "deactivating"
|
1948 |
+
msgstr "deactivating"
|
1949 |
|
1950 |
+
#: templates/forms/deactivation/form.php:80
|
1951 |
+
msgid "switching"
|
1952 |
+
msgstr "switching"
|
1953 |
|
1954 |
+
#: templates/forms/deactivation/form.php:248
|
1955 |
+
msgid "Submit & %s"
|
1956 |
+
msgstr "Submit & %s"
|
1957 |
|
1958 |
+
#: templates/forms/deactivation/form.php:269
|
1959 |
+
msgid "Kindly tell us the reason so we can improve."
|
1960 |
+
msgstr "Kindly tell us the reason so we can improve."
|
1961 |
|
1962 |
+
#: templates/forms/deactivation/form.php:390
|
1963 |
+
msgid "Yes - %s"
|
1964 |
+
msgstr "Yes - %s"
|
1965 |
|
1966 |
+
#: templates/forms/deactivation/form.php:397
|
1967 |
+
msgid "Skip & %s"
|
1968 |
+
msgstr "Skip & %s"
|
1969 |
|
1970 |
+
#: templates/forms/deactivation/retry-skip.php:21
|
1971 |
+
msgid "Click here to use the plugin anonymously"
|
1972 |
+
msgstr "Click here to use the plugin anonymously"
|
1973 |
|
1974 |
+
#: templates/forms/deactivation/retry-skip.php:23
|
1975 |
+
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
1976 |
+
msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
freemius/languages/freemius-es_ES.mo
ADDED
Binary file
|
freemius/languages/freemius-es_ES.po
ADDED
@@ -0,0 +1,2035 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2017 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Carlos Longarela <carlos@longarela.eu>, 2017
|
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: 2017-12-04 15:57+0000\n"
|
11 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
12 |
+
"Language: es_ES\n"
|
13 |
+
"Language-Team: Spanish (Spain) (http://www.transifex.com/freemius/wordpress-sdk/language/es_ES/)\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\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.php:959
|
25 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
26 |
+
msgstr "Freemius SDK no pudo encontrar el archivo principal del plugin. Por favor contacta a sdk@freemius.com con el error actual."
|
27 |
+
|
28 |
+
#: includes/class-freemius.php:961
|
29 |
+
msgid "Error"
|
30 |
+
msgstr "Error"
|
31 |
+
|
32 |
+
#: includes/class-freemius.php:1277
|
33 |
+
msgid "I found a better %s"
|
34 |
+
msgstr "He encontrado un mejor %s"
|
35 |
+
|
36 |
+
#: includes/class-freemius.php:1279
|
37 |
+
msgid "What's the %s's name?"
|
38 |
+
msgstr "¿Cuál es el nombre de %s?"
|
39 |
+
|
40 |
+
#: includes/class-freemius.php:1285
|
41 |
+
msgid "It's a temporary %s. I'm just debugging an issue."
|
42 |
+
msgstr "Es temporal %s. Sólo estoy depurando un problema."
|
43 |
+
|
44 |
+
#: includes/class-freemius.php:1287
|
45 |
+
msgid "Deactivation"
|
46 |
+
msgstr "Desactivación"
|
47 |
+
|
48 |
+
#: includes/class-freemius.php:1288
|
49 |
+
msgid "Theme Switch"
|
50 |
+
msgstr "Cambiar Tema"
|
51 |
+
|
52 |
+
#: includes/class-freemius.php1297, templates/forms/resend-key.php:24
|
53 |
+
msgid "Other"
|
54 |
+
msgstr "Otra"
|
55 |
+
|
56 |
+
#: includes/class-freemius.php:1305
|
57 |
+
msgid "I no longer need the %s"
|
58 |
+
msgstr "Ya no necesito el %s"
|
59 |
+
|
60 |
+
#: includes/class-freemius.php:1312
|
61 |
+
msgid "I only needed the %s for a short period"
|
62 |
+
msgstr "Sólo necesitaba la %s por un corto período"
|
63 |
+
|
64 |
+
#: includes/class-freemius.php:1318
|
65 |
+
msgid "The %s broke my site"
|
66 |
+
msgstr "%s ha roto mi sitio"
|
67 |
+
|
68 |
+
#: includes/class-freemius.php:1325
|
69 |
+
msgid "The %s suddenly stopped working"
|
70 |
+
msgstr "%s de repente ha dejado de funcionar"
|
71 |
+
|
72 |
+
#: includes/class-freemius.php:1335
|
73 |
+
msgid "I can't pay for it anymore"
|
74 |
+
msgstr "No puedo pagarlo durante más tiempo"
|
75 |
+
|
76 |
+
#: includes/class-freemius.php:1337
|
77 |
+
msgid "What price would you feel comfortable paying?"
|
78 |
+
msgstr "¿Qué precio te sentirías cómodo pagando?"
|
79 |
+
|
80 |
+
#: includes/class-freemius.php:1343
|
81 |
+
msgid "I don't like to share my information with you"
|
82 |
+
msgstr "No me gusta compartir mi información contigo"
|
83 |
+
|
84 |
+
#: includes/class-freemius.php:1364
|
85 |
+
msgid "The %s didn't work"
|
86 |
+
msgstr "%s no funcionaba"
|
87 |
+
|
88 |
+
#: includes/class-freemius.php:1374
|
89 |
+
msgid "I couldn't understand how to make it work"
|
90 |
+
msgstr "No entiendo cómo hacerlo funcionar"
|
91 |
+
|
92 |
+
#: includes/class-freemius.php:1382
|
93 |
+
msgid "The %s is great, but I need specific feature that you don't support"
|
94 |
+
msgstr "%s es genial, pero necesito una característica que no soportáis"
|
95 |
+
|
96 |
+
#: includes/class-freemius.php:1384
|
97 |
+
msgid "What feature?"
|
98 |
+
msgstr "¿Qué característica?"
|
99 |
+
|
100 |
+
#: includes/class-freemius.php:1388
|
101 |
+
msgid "The %s is not working"
|
102 |
+
msgstr "%s no funciona"
|
103 |
+
|
104 |
+
#: includes/class-freemius.php:1390
|
105 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
106 |
+
msgstr "Por favor, comparte lo que no funcionó para que podamos arreglarlo para los futuros usuarios..."
|
107 |
+
|
108 |
+
#: includes/class-freemius.php:1394
|
109 |
+
msgid "It's not what I was looking for"
|
110 |
+
msgstr "No es lo que estaba buscando"
|
111 |
+
|
112 |
+
#: includes/class-freemius.php:1396
|
113 |
+
msgid "What you've been looking for?"
|
114 |
+
msgstr "¿Que has estado buscando?"
|
115 |
+
|
116 |
+
#: includes/class-freemius.php:1400
|
117 |
+
msgid "The %s didn't work as expected"
|
118 |
+
msgstr "%s no funciona como esperaba"
|
119 |
+
|
120 |
+
#: includes/class-freemius.php:1402
|
121 |
+
msgid "What did you expect?"
|
122 |
+
msgstr "¿Qué esperas?"
|
123 |
+
|
124 |
+
#: includes/class-freemius.php1938, templates/debug.php:20
|
125 |
+
msgid "Freemius Debug"
|
126 |
+
msgstr "Debug Freemius"
|
127 |
+
|
128 |
+
#: includes/class-freemius.php:2508
|
129 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
130 |
+
msgstr "No sé qué es cURL o cómo instalarlo, ¡ayúdame!"
|
131 |
+
|
132 |
+
#: includes/class-freemius.php:2510
|
133 |
+
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."
|
134 |
+
msgstr "Nos aseguraremos de ponernos en contacto con tu empresa de alojamiento web y resolver el problema. Recibirás un correo electrónico de seguimiento a %s tan pronto tengamos una actualización."
|
135 |
+
|
136 |
+
#: includes/class-freemius.php:2517
|
137 |
+
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."
|
138 |
+
msgstr "Genial, por favor instala cURL y habilítalo en el archivo php.ini. Además, busca la directiva 'disable_functions' en el archivo php.ini y quita cualquier método que comienza con 'curl_'. Para asegurarte de que se activó con éxito, utiliza 'phpinfo()'. Una vez activado, desactiva el %s y reactívalo de nuevo."
|
139 |
+
|
140 |
+
#: includes/class-freemius.php:2619
|
141 |
+
msgid "Yes - do your thing"
|
142 |
+
msgstr "Vamos, adelante"
|
143 |
+
|
144 |
+
#: includes/class-freemius.php:2624
|
145 |
+
msgid "No - just deactivate"
|
146 |
+
msgstr "No - sólo desactivar"
|
147 |
+
|
148 |
+
#: includes/class-freemius.php2669, includes/class-freemius.php3134,
|
149 |
+
#: includes/class-freemius.php3988, includes/class-freemius.php7270,
|
150 |
+
#: includes/class-freemius.php9137, includes/class-freemius.php9193,
|
151 |
+
#: includes/class-freemius.php9254, includes/class-freemius.php11154,
|
152 |
+
#: includes/class-freemius.php11165, includes/class-freemius.php11614,
|
153 |
+
#: includes/class-freemius.php11632, includes/class-freemius.php11730,
|
154 |
+
#: includes/class-freemius.php12405, templates/add-ons.php:43
|
155 |
+
msgctxt "exclamation"
|
156 |
+
msgid "Oops"
|
157 |
+
msgstr "Oops"
|
158 |
+
|
159 |
+
#: includes/class-freemius.php:2736
|
160 |
+
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."
|
161 |
+
msgstr "¡Gracias por darnos la oportunidad de arreglarlo! Acabamos de enviar un mensaje a nuestro personal técnico. Nos pondremos en contacto contigo tan pronto como tengamos una actualización de %s. Apreciamos tu paciencia."
|
162 |
+
|
163 |
+
#: includes/class-freemius.php:3131
|
164 |
+
msgctxt "addonX cannot run without pluginY"
|
165 |
+
msgid "%s cannot run without %s."
|
166 |
+
msgstr "%s no se puede ejecutar sin %s."
|
167 |
+
|
168 |
+
#: includes/class-freemius.php:3132
|
169 |
+
msgctxt "addonX cannot run..."
|
170 |
+
msgid "%s cannot run without the plugin."
|
171 |
+
msgstr "%s no se puede ejecutar sin el plugin."
|
172 |
+
|
173 |
+
#: includes/class-freemius.php3253, includes/class-freemius.php3278,
|
174 |
+
#: includes/class-freemius.php:11703
|
175 |
+
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
176 |
+
msgstr "Error inesperado del API. Pónte en contacto con el autor de %s indicándole el siguiente error."
|
177 |
+
|
178 |
+
#: includes/class-freemius.php:3686
|
179 |
+
msgid "Premium %s version was successfully activated."
|
180 |
+
msgstr "La versión Premium %s ha sido activada con éxito."
|
181 |
+
|
182 |
+
#: includes/class-freemius.php3688, includes/class-freemius.php:4913
|
183 |
+
msgctxt ""
|
184 |
+
msgid "W00t"
|
185 |
+
msgstr "W00t"
|
186 |
+
|
187 |
+
#: includes/class-freemius.php:3703
|
188 |
+
msgid "You have a %s license."
|
189 |
+
msgstr "Tienes una licencia %s."
|
190 |
+
|
191 |
+
#: includes/class-freemius.php3707, includes/class-freemius.php8841,
|
192 |
+
#: includes/class-freemius.php8850, includes/class-freemius.php11105,
|
193 |
+
#: includes/class-freemius.php11318, includes/class-freemius.php11380,
|
194 |
+
#: includes/class-freemius.php:11492
|
195 |
+
msgctxt "interjection expressing joy or exuberance"
|
196 |
+
msgid "Yee-haw"
|
197 |
+
msgstr "Vaya"
|
198 |
+
|
199 |
+
#: includes/class-freemius.php:3971
|
200 |
+
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."
|
201 |
+
msgstr "la prueba gratuita de %s fue cancelada con éxito. Puesto que el complemento es sólo premium se desactivó automáticamente. Si quieres utilizarlo en el futuro, deberás comprar una licencia."
|
202 |
+
|
203 |
+
#: includes/class-freemius.php:3975
|
204 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
205 |
+
msgstr "%s es un complemento único de premium. Tienes que comprar una licencia primero antes de activar el plugin."
|
206 |
+
|
207 |
+
#: includes/class-freemius.php3984, templates/account.php692,
|
208 |
+
#: templates/add-ons.php:99
|
209 |
+
msgid "More information about %s"
|
210 |
+
msgstr "Más información sobre %s"
|
211 |
+
|
212 |
+
#: includes/class-freemius.php:3985
|
213 |
+
msgid "Purchase License"
|
214 |
+
msgstr "Comprar Licencia"
|
215 |
+
|
216 |
+
#: includes/class-freemius.php4422, templates/connect.php:136
|
217 |
+
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."
|
218 |
+
msgstr "Recibirás un correo de activación para %s en tu buzón en %s. Por favor, asegúrate de hacer clic en el botón de activación en ese correo electrónico para %s."
|
219 |
+
|
220 |
+
#: includes/class-freemius.php:4426
|
221 |
+
msgid "start the trial"
|
222 |
+
msgstr "comenzar el período de prueba"
|
223 |
+
|
224 |
+
#: includes/class-freemius.php4427, templates/connect.php:140
|
225 |
+
msgid "complete the install"
|
226 |
+
msgstr "completar la instalación"
|
227 |
+
|
228 |
+
#: includes/class-freemius.php:4506
|
229 |
+
msgid "You are just one step away - %s"
|
230 |
+
msgstr "Estás a sólo un paso - %s"
|
231 |
+
|
232 |
+
#: includes/class-freemius.php:4509
|
233 |
+
msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
|
234 |
+
msgid "Complete \"%s\" Activation Now"
|
235 |
+
msgstr "Completar la Activación de \"%s\" Ahora"
|
236 |
+
|
237 |
+
#: includes/class-freemius.php:4523
|
238 |
+
msgid "We made a few tweaks to the %s, %s"
|
239 |
+
msgstr "Hemos realizado algunas optimizaciones al %s, %s"
|
240 |
+
|
241 |
+
#: includes/class-freemius.php:4527
|
242 |
+
msgid "Opt in to make \"%s\" Better!"
|
243 |
+
msgstr "Opt in to make \"%s\" Better!"
|
244 |
+
|
245 |
+
#: includes/class-freemius.php:4912
|
246 |
+
msgid "The upgrade of %s was successfully completed."
|
247 |
+
msgstr "La actualización de %s se completó con éxito."
|
248 |
+
|
249 |
+
#: includes/class-freemius.php5997, includes/class-fs-plugin-updater.php358,
|
250 |
+
#: includes/class-fs-plugin-updater.php510,
|
251 |
+
#: includes/class-fs-plugin-updater.php516, templates/auto-installation.php:31
|
252 |
+
msgid "Add-On"
|
253 |
+
msgstr "Complemento"
|
254 |
+
|
255 |
+
#: includes/class-freemius.php5999, templates/debug.php303,
|
256 |
+
#: templates/debug.php:413
|
257 |
+
msgid "Plugin"
|
258 |
+
msgstr "Plugin"
|
259 |
+
|
260 |
+
#: includes/class-freemius.php6000, templates/debug.php303,
|
261 |
+
#: templates/debug.php413, templates/forms/deactivation/form.php:64
|
262 |
+
msgid "Theme"
|
263 |
+
msgstr "Tema"
|
264 |
+
|
265 |
+
#: includes/class-freemius.php:7257
|
266 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
267 |
+
msgstr "No podemos encontrar tu dirección de correo electrónico en el sistema, ¿estás seguro de que es la dirección de correo electrónico correcta?"
|
268 |
+
|
269 |
+
#: includes/class-freemius.php:7259
|
270 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
271 |
+
msgstr "No vemos ninguna licencia activa asociada a esa dirección de correo electrónico, ¿estás seguro de que es la dirección de correo electrónico correcta?"
|
272 |
+
|
273 |
+
#: includes/class-freemius.php:7468
|
274 |
+
msgid "Account is pending activation."
|
275 |
+
msgstr "Account is pending activation."
|
276 |
+
|
277 |
+
#: includes/class-freemius.php:8825
|
278 |
+
msgctxt "pluginX activation was successfully..."
|
279 |
+
msgid "%s activation was successfully completed."
|
280 |
+
msgstr "%s activación se completó con éxito."
|
281 |
+
|
282 |
+
#: includes/class-freemius.php:8837
|
283 |
+
msgid "Your account was successfully activated with the %s plan."
|
284 |
+
msgstr "Tu cuenta se ha activado correctamente con el plan %s."
|
285 |
+
|
286 |
+
#: includes/class-freemius.php8846, includes/class-freemius.php:11376
|
287 |
+
msgid "Your trial has been successfully started."
|
288 |
+
msgstr "Tu versión de prueba se ha iniciado con éxito."
|
289 |
+
|
290 |
+
#: includes/class-freemius.php9135, includes/class-freemius.php9191,
|
291 |
+
#: includes/class-freemius.php:9252
|
292 |
+
msgid "Couldn't activate %s."
|
293 |
+
msgstr "No se puede activar %s."
|
294 |
+
|
295 |
+
#: includes/class-freemius.php9136, includes/class-freemius.php9192,
|
296 |
+
#: includes/class-freemius.php:9253
|
297 |
+
msgid "Please contact us with the following message:"
|
298 |
+
msgstr "Por favor contáctanos con el siguiente mensaje:"
|
299 |
+
|
300 |
+
#: includes/class-freemius.php9511, includes/class-freemius.php:13334
|
301 |
+
msgid "Upgrade"
|
302 |
+
msgstr "Actualizar"
|
303 |
+
|
304 |
+
#: includes/class-freemius.php:9517
|
305 |
+
msgid "Start Trial"
|
306 |
+
msgstr "Comenzar el Período de Prueba"
|
307 |
+
|
308 |
+
#: includes/class-freemius.php:9519
|
309 |
+
msgid "Pricing"
|
310 |
+
msgstr "Precio"
|
311 |
+
|
312 |
+
#: includes/class-freemius.php9559, includes/class-freemius.php:9561
|
313 |
+
msgid "Affiliation"
|
314 |
+
msgstr "Affiliation"
|
315 |
+
|
316 |
+
#: includes/class-freemius.php9581, includes/class-freemius.php9583,
|
317 |
+
#: templates/account.php79, templates/debug.php:281
|
318 |
+
msgid "Account"
|
319 |
+
msgstr "Cuenta"
|
320 |
+
|
321 |
+
#: includes/class-freemius.php9594, includes/class-freemius.php9596,
|
322 |
+
#: includes/customizer/class-fs-customizer-support-section.php:60
|
323 |
+
msgid "Contact Us"
|
324 |
+
msgstr "Contáctanos"
|
325 |
+
|
326 |
+
#: includes/class-freemius.php9606, includes/class-freemius.php9608,
|
327 |
+
#: includes/class-freemius.php13344, templates/account.php:68
|
328 |
+
msgid "Add-Ons"
|
329 |
+
msgstr "Complementos"
|
330 |
+
|
331 |
+
#: includes/class-freemius.php9639, templates/pricing.php:92
|
332 |
+
msgctxt "noun"
|
333 |
+
msgid "Pricing"
|
334 |
+
msgstr "Precio"
|
335 |
+
|
336 |
+
#: includes/class-freemius.php9819,
|
337 |
+
#: includes/customizer/class-fs-customizer-support-section.php:67
|
338 |
+
msgid "Support Forum"
|
339 |
+
msgstr "Foro de Soporte"
|
340 |
+
|
341 |
+
#: includes/class-freemius.php:10559
|
342 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
343 |
+
msgstr "Tu email ha sido verificado correctamente - eres IMPRESIONANTE!"
|
344 |
+
|
345 |
+
#: includes/class-freemius.php:10560
|
346 |
+
msgctxt "a positive response"
|
347 |
+
msgid "Right on"
|
348 |
+
msgstr "Bien hecho"
|
349 |
+
|
350 |
+
#: includes/class-freemius.php:11096
|
351 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
352 |
+
msgstr "Tu complemento %s del plan se actualizó con éxito."
|
353 |
+
|
354 |
+
#: includes/class-freemius.php:11098
|
355 |
+
msgid "%s Add-on was successfully purchased."
|
356 |
+
msgstr "El complemento %s ha sido comprado correctamente."
|
357 |
+
|
358 |
+
#: includes/class-freemius.php:11101
|
359 |
+
msgid "Download the latest version"
|
360 |
+
msgstr "Descargar la última versión"
|
361 |
+
|
362 |
+
#: includes/class-freemius.php:11150
|
363 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
364 |
+
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
365 |
+
msgstr "Tu servidor está bloqueando el acceso a la API de Freemius, que es crucial para la sincronización de licencia %1s. Por favor, ponte en contacto con tu host para que lo añadan a su lista blanca %2s"
|
366 |
+
|
367 |
+
#: includes/class-freemius.php11153, includes/class-freemius.php11463,
|
368 |
+
#: includes/class-freemius.php:11528
|
369 |
+
msgid "Error received from the server:"
|
370 |
+
msgstr "Error recibido del servidor:"
|
371 |
+
|
372 |
+
#: includes/class-freemius.php:11164
|
373 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
374 |
+
msgstr "Parece que uno de los parámetros de autenticación es incorrecto. Actualiza tu Clave Pública, Clave Secreta & ID de Usuario e inténtelo de nuevo."
|
375 |
+
|
376 |
+
#: includes/class-freemius.php11281, includes/class-freemius.php11468,
|
377 |
+
#: includes/class-freemius.php:11511
|
378 |
+
msgctxt ""
|
379 |
+
msgid "Hmm"
|
380 |
+
msgstr "Hmm"
|
381 |
+
|
382 |
+
#: includes/class-freemius.php:11294
|
383 |
+
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."
|
384 |
+
msgstr "Parece que todavía estás en el plan %s. Si actualizaste o cambiaste tu plan, probablemente sea un problema de nuestra parte - lo sentimos."
|
385 |
+
|
386 |
+
#: includes/class-freemius.php11295, templates/account.php70,
|
387 |
+
#: templates/add-ons.php:130
|
388 |
+
msgctxt "trial period"
|
389 |
+
msgid "Trial"
|
390 |
+
msgstr "Período de Prueba Gratuito"
|
391 |
+
|
392 |
+
#: includes/class-freemius.php:11300
|
393 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
394 |
+
msgstr "He actualizado mi cuenta, pero cuando intento sincronizar la licencia, el plan sigue siendo %s."
|
395 |
+
|
396 |
+
#: includes/class-freemius.php11304, includes/class-freemius.php:11358
|
397 |
+
msgid "Please contact us here"
|
398 |
+
msgstr "Contacta aquí con nosotros"
|
399 |
+
|
400 |
+
#: includes/class-freemius.php:11314
|
401 |
+
msgid "Your plan was successfully upgraded."
|
402 |
+
msgstr "Tu plan se actualizó con éxito."
|
403 |
+
|
404 |
+
#: includes/class-freemius.php:11331
|
405 |
+
msgid "Your plan was successfully changed to %s."
|
406 |
+
msgstr "Tu plan se cambió correctamente a %s."
|
407 |
+
|
408 |
+
#: includes/class-freemius.php:11346
|
409 |
+
msgid "Your license has expired. You can still continue using the free %s forever."
|
410 |
+
msgstr "Tu licencia ha caducado. Puedes seguir usando el plan gratuito %s para siempre."
|
411 |
+
|
412 |
+
#: includes/class-freemius.php:11354
|
413 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
414 |
+
msgstr "Tu licencia ha sido cancelada. Si crees que es un error, ponte en contacto con el servicio de asistencia."
|
415 |
+
|
416 |
+
#: includes/class-freemius.php:11367
|
417 |
+
msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
|
418 |
+
msgstr "Tu licencia ha caducado. Todavía puedes seguir usando todas las funciones de %s, pero tendrás que renovar tu licencia para seguir recibiendo actualizaciones y soporte."
|
419 |
+
|
420 |
+
#: includes/class-freemius.php:11389
|
421 |
+
msgid "Your trial has expired. You can still continue using all our free features."
|
422 |
+
msgstr "Tu período de prueba ha caducado. Todavía puedes seguir usando todas nuestras funciones gratuitas."
|
423 |
+
|
424 |
+
#: includes/class-freemius.php:11459
|
425 |
+
msgid "It looks like the license could not be activated."
|
426 |
+
msgstr "Parece que la licencia no se pudo activar."
|
427 |
+
|
428 |
+
#: includes/class-freemius.php:11489
|
429 |
+
msgid "Your license was successfully activated."
|
430 |
+
msgstr "Tu licencia fue activada correctamente."
|
431 |
+
|
432 |
+
#: includes/class-freemius.php:11515
|
433 |
+
msgid "It looks like your site currently doesn't have an active license."
|
434 |
+
msgstr "Parece que tu sitio actualmente no tiene una licencia activa."
|
435 |
+
|
436 |
+
#: includes/class-freemius.php:11527
|
437 |
+
msgid "It looks like the license deactivation failed."
|
438 |
+
msgstr "Parece que la desactivación de licencia ha fallado."
|
439 |
+
|
440 |
+
#: includes/class-freemius.php:11554
|
441 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
442 |
+
msgstr "Tu licencia fue desactivada correctamente, has vuelto al plan %s."
|
443 |
+
|
444 |
+
#: includes/class-freemius.php:11555
|
445 |
+
msgid "O.K"
|
446 |
+
msgstr "O.K"
|
447 |
+
|
448 |
+
#: includes/class-freemius.php:11603
|
449 |
+
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
450 |
+
msgstr "Tu plan fue degradado con éxito. Tu licencia %s plan caducará en %s."
|
451 |
+
|
452 |
+
#: includes/class-freemius.php:11613
|
453 |
+
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
454 |
+
msgstr "Parece que estamos teniendo algún problema temporal con tu degradación de plan. Vuelve a intentarlo en unos minutos."
|
455 |
+
|
456 |
+
#: includes/class-freemius.php:11637
|
457 |
+
msgid "You are already running the %s in a trial mode."
|
458 |
+
msgstr "Estás ejecutando %s en modo de prueba."
|
459 |
+
|
460 |
+
#: includes/class-freemius.php:11648
|
461 |
+
msgid "You already utilized a trial before."
|
462 |
+
msgstr "Ya utilizaste un período de prueba antes."
|
463 |
+
|
464 |
+
#: includes/class-freemius.php:11662
|
465 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
466 |
+
msgstr "El plan %s no existe, por lo tanto, no puedes comenzar un período de prueba."
|
467 |
+
|
468 |
+
#: includes/class-freemius.php:11673
|
469 |
+
msgid "Plan %s does not support a trial period."
|
470 |
+
msgstr "El plan %s no admite un período de prueba."
|
471 |
+
|
472 |
+
#: includes/class-freemius.php:11684
|
473 |
+
msgid "None of the %s's plans supports a trial period."
|
474 |
+
msgstr "Ninguno de los planes de %s soportan un período de prueba."
|
475 |
+
|
476 |
+
#: includes/class-freemius.php:11734
|
477 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
478 |
+
msgstr "Parece que ya no estás en modo de prueba, así que no hay nada que cancelar :)"
|
479 |
+
|
480 |
+
#: includes/class-freemius.php:11785
|
481 |
+
msgid "Your %s free trial was successfully cancelled."
|
482 |
+
msgstr "Tu prueba gratuita de %s fue cancelada con éxito."
|
483 |
+
|
484 |
+
#: includes/class-freemius.php:11793
|
485 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
486 |
+
msgstr "Parece que estamos teniendo algún problema temporal con tu cancelación de prueba. Vuelve a intentarlo en unos minutos."
|
487 |
+
|
488 |
+
#: includes/class-freemius.php:12032
|
489 |
+
msgid "Version %s was released."
|
490 |
+
msgstr "La versión %s se ha lanzado."
|
491 |
+
|
492 |
+
#: includes/class-freemius.php:12032
|
493 |
+
msgid "Please download %s."
|
494 |
+
msgstr "Por favor descarga %s."
|
495 |
+
|
496 |
+
#: includes/class-freemius.php:12039
|
497 |
+
msgid "the latest %s version here"
|
498 |
+
msgstr "la última versión %s aquí"
|
499 |
+
|
500 |
+
#: includes/class-freemius.php:12044
|
501 |
+
msgid "New"
|
502 |
+
msgstr "Nuevo"
|
503 |
+
|
504 |
+
#: includes/class-freemius.php:12049
|
505 |
+
msgid "Seems like you got the latest release."
|
506 |
+
msgstr "Parece que tienes la última versión."
|
507 |
+
|
508 |
+
#: includes/class-freemius.php:12050
|
509 |
+
msgid "You are all good!"
|
510 |
+
msgstr "¡Está todo listo!"
|
511 |
+
|
512 |
+
#: includes/class-freemius.php:12316
|
513 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
514 |
+
msgstr "El correo de verificación se acaba de enviar a %s. Si no puedes encontrarlo después de 5 min, comprueba tu carpeta de spam."
|
515 |
+
|
516 |
+
#: includes/class-freemius.php:12491
|
517 |
+
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."
|
518 |
+
msgstr "Comprueba tu buzón de correo, debes recibir un correo electrónico a través de %s para confirmar el cambio de propiedad. Por razones de seguridad, debes confirmar el cambio dentro de los próximos 15 min. Si no puedes encontrar el correo electrónico, comprueba tu carpeta de correo no deseado."
|
519 |
+
|
520 |
+
#: includes/class-freemius.php:12497
|
521 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
522 |
+
msgstr "Gracias por confirmar el cambio de propiedad. Se envió un correo electrónico a %s para su aprobación final."
|
523 |
+
|
524 |
+
#: includes/class-freemius.php:12502
|
525 |
+
msgid "%s is the new owner of the account."
|
526 |
+
msgstr "%s es el nuevo dueño de la cuenta."
|
527 |
+
|
528 |
+
#: includes/class-freemius.php:12504
|
529 |
+
msgctxt "as congratulations"
|
530 |
+
msgid "Congrats"
|
531 |
+
msgstr "Felicidades"
|
532 |
+
|
533 |
+
#: includes/class-freemius.php:12524
|
534 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
535 |
+
msgstr "Lo sentimos, no podemos completar la actualización de correo electrónico. Ya hay registrado otro usuario con esa dirección de correo electrónico."
|
536 |
+
|
537 |
+
#: includes/class-freemius.php:12525
|
538 |
+
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
539 |
+
msgstr "Si deseas renunciar a la titularidad de la cuenta de %s a %s haz clic en el botón de Cambio de Titularidad."
|
540 |
+
|
541 |
+
#: includes/class-freemius.php:12532
|
542 |
+
msgid "Change Ownership"
|
543 |
+
msgstr "Cambiar Propietario"
|
544 |
+
|
545 |
+
#: includes/class-freemius.php:12540
|
546 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
547 |
+
msgstr "Se actualizó correctamente tu correo electrónico. Recibirás un correo electrónico con las instrucciones de confirmación en unos momentos."
|
548 |
+
|
549 |
+
#: includes/class-freemius.php:12552
|
550 |
+
msgid "Please provide your full name."
|
551 |
+
msgstr "Por favor, dinos tu nombre completo."
|
552 |
+
|
553 |
+
#: includes/class-freemius.php:12557
|
554 |
+
msgid "Your name was successfully updated."
|
555 |
+
msgstr "Tu nombre fue actualizado correctamente."
|
556 |
+
|
557 |
+
#: includes/class-freemius.php:12618
|
558 |
+
msgid "You have successfully updated your %s."
|
559 |
+
msgstr "Has actualizado correctamente tu %s."
|
560 |
+
|
561 |
+
#: includes/class-freemius.php:12756
|
562 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
563 |
+
msgstr "Sólo déjanos informarte que la información de complementos de %s se está extrayendo de un servidor externo."
|
564 |
+
|
565 |
+
#: includes/class-freemius.php:12757
|
566 |
+
msgctxt "advance notice of something that will need attention."
|
567 |
+
msgid "Heads up"
|
568 |
+
msgstr "Atención"
|
569 |
+
|
570 |
+
#: includes/class-freemius.php:13075
|
571 |
+
msgid "Awesome"
|
572 |
+
msgstr "Increíble"
|
573 |
+
|
574 |
+
#: includes/class-freemius.php:13115
|
575 |
+
msgctxt "exclamation"
|
576 |
+
msgid "Hey"
|
577 |
+
msgstr "Hey"
|
578 |
+
|
579 |
+
#: includes/class-freemius.php:13115
|
580 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
581 |
+
msgstr "¿Qué te pareció %s hasta ahora? Prueba todas nuestras funciones premium de %s con una prueba gratuita de % d-días."
|
582 |
+
|
583 |
+
#: includes/class-freemius.php:13123
|
584 |
+
msgid "No commitment for %s days - cancel anytime!"
|
585 |
+
msgstr "Sin compromiso por %s días - ¡cancelar en cualquier momento!"
|
586 |
+
|
587 |
+
#: includes/class-freemius.php:13124
|
588 |
+
msgid "No credit card required"
|
589 |
+
msgstr "No se necesita tarjeta de crédito"
|
590 |
+
|
591 |
+
#: includes/class-freemius.php13131, templates/forms/trial-start.php:53
|
592 |
+
msgctxt "call to action"
|
593 |
+
msgid "Start free trial"
|
594 |
+
msgstr "Comenzar el período de prueba gratuito"
|
595 |
+
|
596 |
+
#: includes/class-freemius.php:13208
|
597 |
+
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!"
|
598 |
+
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!"
|
599 |
+
|
600 |
+
#: includes/class-freemius.php:13217
|
601 |
+
msgid "Learn more"
|
602 |
+
msgstr "Learn more"
|
603 |
+
|
604 |
+
#: includes/class-freemius.php13373, templates/account.php330,
|
605 |
+
#: templates/connect.php309, templates/forms/license-activation.php:24
|
606 |
+
msgid "Activate License"
|
607 |
+
msgstr "Activar Licencia"
|
608 |
+
|
609 |
+
#: includes/class-freemius.php13374, templates/account.php:393
|
610 |
+
msgid "Change License"
|
611 |
+
msgstr "Cambiar Licencia"
|
612 |
+
|
613 |
+
#: includes/class-freemius.php:13435
|
614 |
+
msgid "Opt Out"
|
615 |
+
msgstr "Darse de baja"
|
616 |
+
|
617 |
+
#: includes/class-freemius.php13437, includes/class-freemius.php:13442
|
618 |
+
msgid "Opt In"
|
619 |
+
msgstr "Inscribirse"
|
620 |
+
|
621 |
+
#: includes/class-freemius.php:13630
|
622 |
+
msgid "Please follow these steps to complete the upgrade"
|
623 |
+
msgstr "Por favor, sigue estos pasos para completar la actualización"
|
624 |
+
|
625 |
+
#: includes/class-freemius.php:13633
|
626 |
+
msgid "Download the latest %s version"
|
627 |
+
msgstr "Descargar la última versión %s"
|
628 |
+
|
629 |
+
#: includes/class-freemius.php:13637
|
630 |
+
msgid "Upload and activate the downloaded version"
|
631 |
+
msgstr "Cargar y activar la versión descargada"
|
632 |
+
|
633 |
+
#: includes/class-freemius.php:13639
|
634 |
+
msgid "How to upload and activate?"
|
635 |
+
msgstr "¿Cómo subirlo y activarlo?"
|
636 |
+
|
637 |
+
#: includes/class-freemius.php:13798
|
638 |
+
msgid "Auto installation only works for opted-in users."
|
639 |
+
msgstr "La instalación automática sólo funciona para usuarios que aceptaron."
|
640 |
+
|
641 |
+
#: includes/class-freemius.php13808, includes/class-freemius.php13841,
|
642 |
+
#: includes/class-fs-plugin-updater.php490,
|
643 |
+
#: includes/class-fs-plugin-updater.php:504
|
644 |
+
msgid "Invalid module ID."
|
645 |
+
msgstr "Id de Módulo no válido."
|
646 |
+
|
647 |
+
#: includes/class-freemius.php13817, includes/class-fs-plugin-updater.php:524
|
648 |
+
msgid "Premium version already active."
|
649 |
+
msgstr "Versión Premium ya activa."
|
650 |
+
|
651 |
+
#: includes/class-freemius.php:13824
|
652 |
+
msgid "You do not have a valid license to access the premium version."
|
653 |
+
msgstr "No tienes una licencia válida para acceder a la versión premium."
|
654 |
+
|
655 |
+
#: includes/class-freemius.php:13831
|
656 |
+
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
657 |
+
msgstr "El plugin es un \"Serviceware\" lo que significa que no tiene una versión de código premium."
|
658 |
+
|
659 |
+
#: includes/class-freemius.php13849, includes/class-fs-plugin-updater.php:523
|
660 |
+
msgid "Premium add-on version already installed."
|
661 |
+
msgstr "Versión del complemento Premium ya instalada."
|
662 |
+
|
663 |
+
#: includes/class-freemius.php:14194
|
664 |
+
msgid "View paid features"
|
665 |
+
msgstr "Ver las funciones de pago"
|
666 |
+
|
667 |
+
#: includes/class-fs-plugin-updater.php:131
|
668 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
669 |
+
msgstr "%s Renueva tu licencia ahora %s para acceder a la versión %s características y soporte."
|
670 |
+
|
671 |
+
#: includes/class-fs-plugin-updater.php:553
|
672 |
+
msgid "Installing plugin: %s"
|
673 |
+
msgstr "Instalando plugin: %s"
|
674 |
+
|
675 |
+
#: includes/class-fs-plugin-updater.php:594
|
676 |
+
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
677 |
+
msgstr "Unable to connect to the filesystem. Please confirm your credentials."
|
678 |
+
|
679 |
+
#: includes/class-fs-plugin-updater.php:700
|
680 |
+
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
681 |
+
msgstr "El paquete de plugin remoto no contiene una carpeta con el Slug deseado y el cambio de nombre no funcionó."
|
682 |
+
|
683 |
+
#: includes/fs-plugin-info-dialog.php328, templates/account.php:696
|
684 |
+
msgctxt "verb"
|
685 |
+
msgid "Purchase"
|
686 |
+
msgstr "Comprar"
|
687 |
+
|
688 |
+
#: includes/fs-plugin-info-dialog.php:331
|
689 |
+
msgid "Start my free %s"
|
690 |
+
msgstr "Comenzar mi período gratuito de %s"
|
691 |
+
|
692 |
+
#: includes/fs-plugin-info-dialog.php355, templates/account.php:52
|
693 |
+
msgctxt "as download latest version"
|
694 |
+
msgid "Download Latest"
|
695 |
+
msgstr "Descargar la última"
|
696 |
+
|
697 |
+
#: includes/fs-plugin-info-dialog.php358, templates/account.php676,
|
698 |
+
#: templates/account.php729, templates/auto-installation.php:110
|
699 |
+
msgid "Install Now"
|
700 |
+
msgstr "Instalar Ahora"
|
701 |
+
|
702 |
+
#: includes/fs-plugin-info-dialog.php364, templates/account.php:384
|
703 |
+
msgid "Install Update Now"
|
704 |
+
msgstr "Instalar Actualización Ahora"
|
705 |
+
|
706 |
+
#: includes/fs-plugin-info-dialog.php:368
|
707 |
+
msgid "Newer Version (%s) Installed"
|
708 |
+
msgstr "Versión más Reciente (%s) Instalada"
|
709 |
+
|
710 |
+
#: includes/fs-plugin-info-dialog.php:371
|
711 |
+
msgid "Latest Version Installed"
|
712 |
+
msgstr "Última Versión Instalada"
|
713 |
+
|
714 |
+
#: includes/fs-plugin-info-dialog.php:484
|
715 |
+
msgctxt "Plugin installer section title"
|
716 |
+
msgid "Description"
|
717 |
+
msgstr "Descripción"
|
718 |
+
|
719 |
+
#: includes/fs-plugin-info-dialog.php:485
|
720 |
+
msgctxt "Plugin installer section title"
|
721 |
+
msgid "Installation"
|
722 |
+
msgstr "Instalación"
|
723 |
+
|
724 |
+
#: includes/fs-plugin-info-dialog.php:486
|
725 |
+
msgctxt "Plugin installer section title"
|
726 |
+
msgid "FAQ"
|
727 |
+
msgstr "FAQ"
|
728 |
+
|
729 |
+
#: includes/fs-plugin-info-dialog.php487,
|
730 |
+
#: templates/plugin-info/description.php:55
|
731 |
+
msgid "Screenshots"
|
732 |
+
msgstr "Capturas de pantalla"
|
733 |
+
|
734 |
+
#: includes/fs-plugin-info-dialog.php:488
|
735 |
+
msgctxt "Plugin installer section title"
|
736 |
+
msgid "Changelog"
|
737 |
+
msgstr "Registro de cambios"
|
738 |
+
|
739 |
+
#: includes/fs-plugin-info-dialog.php:489
|
740 |
+
msgctxt "Plugin installer section title"
|
741 |
+
msgid "Reviews"
|
742 |
+
msgstr "Valoraciones"
|
743 |
+
|
744 |
+
#: includes/fs-plugin-info-dialog.php:490
|
745 |
+
msgctxt "Plugin installer section title"
|
746 |
+
msgid "Other Notes"
|
747 |
+
msgstr "Otras Notas"
|
748 |
+
|
749 |
+
#: includes/fs-plugin-info-dialog.php:505
|
750 |
+
msgctxt "Plugin installer section title"
|
751 |
+
msgid "Features & Pricing"
|
752 |
+
msgstr "Características y Precios"
|
753 |
+
|
754 |
+
#: includes/fs-plugin-info-dialog.php:515
|
755 |
+
msgid "Plugin Install"
|
756 |
+
msgstr "Instalar Plugin"
|
757 |
+
|
758 |
+
#: includes/fs-plugin-info-dialog.php:587
|
759 |
+
msgctxt "e.g. Professional Plan"
|
760 |
+
msgid "%s Plan"
|
761 |
+
msgstr "Plan %s"
|
762 |
+
|
763 |
+
#: includes/fs-plugin-info-dialog.php:612
|
764 |
+
msgctxt "e.g. the best product"
|
765 |
+
msgid "Best"
|
766 |
+
msgstr "El mejor"
|
767 |
+
|
768 |
+
#: includes/fs-plugin-info-dialog.php618,
|
769 |
+
#: includes/fs-plugin-info-dialog.php:638
|
770 |
+
msgctxt "as every month"
|
771 |
+
msgid "Monthly"
|
772 |
+
msgstr "Mensual"
|
773 |
+
|
774 |
+
#: includes/fs-plugin-info-dialog.php:621
|
775 |
+
msgctxt "as once a year"
|
776 |
+
msgid "Annual"
|
777 |
+
msgstr "Anual"
|
778 |
+
|
779 |
+
#: includes/fs-plugin-info-dialog.php:624
|
780 |
+
msgid "Lifetime"
|
781 |
+
msgstr "Permanente"
|
782 |
+
|
783 |
+
#: includes/fs-plugin-info-dialog.php638,
|
784 |
+
#: includes/fs-plugin-info-dialog.php640,
|
785 |
+
#: includes/fs-plugin-info-dialog.php:642
|
786 |
+
msgctxt "e.g. billed monthly"
|
787 |
+
msgid "Billed %s"
|
788 |
+
msgstr "Facturado %s"
|
789 |
+
|
790 |
+
#: includes/fs-plugin-info-dialog.php:640
|
791 |
+
msgctxt "as once a year"
|
792 |
+
msgid "Annually"
|
793 |
+
msgstr "Anualmente"
|
794 |
+
|
795 |
+
#: includes/fs-plugin-info-dialog.php:642
|
796 |
+
msgctxt "as once a year"
|
797 |
+
msgid "Once"
|
798 |
+
msgstr "Una vez"
|
799 |
+
|
800 |
+
#: includes/fs-plugin-info-dialog.php:648
|
801 |
+
msgid "Single Site License"
|
802 |
+
msgstr "Licencia para un Único Sitio"
|
803 |
+
|
804 |
+
#: includes/fs-plugin-info-dialog.php:650
|
805 |
+
msgid "Unlimited Licenses"
|
806 |
+
msgstr "Licencias Ilimitadas"
|
807 |
+
|
808 |
+
#: includes/fs-plugin-info-dialog.php:652
|
809 |
+
msgid "Up to %s Sites"
|
810 |
+
msgstr "Hasta %s Sitios"
|
811 |
+
|
812 |
+
#: includes/fs-plugin-info-dialog.php662,
|
813 |
+
#: templates/plugin-info/features.php:82
|
814 |
+
msgctxt "as monthly period"
|
815 |
+
msgid "mo"
|
816 |
+
msgstr "me"
|
817 |
+
|
818 |
+
#: includes/fs-plugin-info-dialog.php669,
|
819 |
+
#: templates/plugin-info/features.php:80
|
820 |
+
msgctxt "as annual period"
|
821 |
+
msgid "year"
|
822 |
+
msgstr "año"
|
823 |
+
|
824 |
+
#: includes/fs-plugin-info-dialog.php:721
|
825 |
+
msgctxt "noun"
|
826 |
+
msgid "Price"
|
827 |
+
msgstr "Precio"
|
828 |
+
|
829 |
+
#: includes/fs-plugin-info-dialog.php:767
|
830 |
+
msgctxt "as a discount of $5 or 10%"
|
831 |
+
msgid "Save %s"
|
832 |
+
msgstr "Guardar %s"
|
833 |
+
|
834 |
+
#: includes/fs-plugin-info-dialog.php:777
|
835 |
+
msgid "No commitment for %s - cancel anytime"
|
836 |
+
msgstr "Sin compromiso para %s - cancelar en cualquier momento"
|
837 |
+
|
838 |
+
#: includes/fs-plugin-info-dialog.php:780
|
839 |
+
msgid "After your free %s, pay as little as %s"
|
840 |
+
msgstr "Después de su período gratuito %s, pague sólo %s"
|
841 |
+
|
842 |
+
#: includes/fs-plugin-info-dialog.php:791
|
843 |
+
msgid "Details"
|
844 |
+
msgstr "Detalles"
|
845 |
+
|
846 |
+
#: includes/fs-plugin-info-dialog.php794, templates/account.php59,
|
847 |
+
#: templates/debug.php183, templates/debug.php220, templates/debug.php:354
|
848 |
+
msgctxt "product version"
|
849 |
+
msgid "Version"
|
850 |
+
msgstr "Versión"
|
851 |
+
|
852 |
+
#: includes/fs-plugin-info-dialog.php:800
|
853 |
+
msgctxt "as the plugin author"
|
854 |
+
msgid "Author"
|
855 |
+
msgstr "Autor"
|
856 |
+
|
857 |
+
#: includes/fs-plugin-info-dialog.php:806
|
858 |
+
msgid "Last Updated"
|
859 |
+
msgstr "Última Actualización"
|
860 |
+
|
861 |
+
#: includes/fs-plugin-info-dialog.php:810
|
862 |
+
msgctxt "x-ago"
|
863 |
+
msgid "%s ago"
|
864 |
+
msgstr "hace %s"
|
865 |
+
|
866 |
+
#: includes/fs-plugin-info-dialog.php:819
|
867 |
+
msgid "Requires WordPress Version"
|
868 |
+
msgstr "Necesita la versión de WordPress"
|
869 |
+
|
870 |
+
#: includes/fs-plugin-info-dialog.php:819
|
871 |
+
msgid "%s or higher"
|
872 |
+
msgstr "%s o mayor"
|
873 |
+
|
874 |
+
#: includes/fs-plugin-info-dialog.php:825
|
875 |
+
msgid "Compatible up to"
|
876 |
+
msgstr "Compatible hasta"
|
877 |
+
|
878 |
+
#: includes/fs-plugin-info-dialog.php:832
|
879 |
+
msgid "Downloaded"
|
880 |
+
msgstr "Descargado"
|
881 |
+
|
882 |
+
#: includes/fs-plugin-info-dialog.php:835
|
883 |
+
msgid "%s time"
|
884 |
+
msgstr "% vez"
|
885 |
+
|
886 |
+
#: includes/fs-plugin-info-dialog.php:837
|
887 |
+
msgid "%s times"
|
888 |
+
msgstr "%s veces"
|
889 |
+
|
890 |
+
#: includes/fs-plugin-info-dialog.php:847
|
891 |
+
msgid "WordPress.org Plugin Page"
|
892 |
+
msgstr "Página del Plugin en WordPress.org"
|
893 |
+
|
894 |
+
#: includes/fs-plugin-info-dialog.php:854
|
895 |
+
msgid "Plugin Homepage"
|
896 |
+
msgstr "Página web del Plugin"
|
897 |
+
|
898 |
+
#: includes/fs-plugin-info-dialog.php861,
|
899 |
+
#: includes/fs-plugin-info-dialog.php:941
|
900 |
+
msgid "Donate to this plugin"
|
901 |
+
msgstr "Donar a este plugin"
|
902 |
+
|
903 |
+
#: includes/fs-plugin-info-dialog.php:867
|
904 |
+
msgid "Average Rating"
|
905 |
+
msgstr "Calificación Media"
|
906 |
+
|
907 |
+
#: includes/fs-plugin-info-dialog.php:874
|
908 |
+
msgid "based on %s"
|
909 |
+
msgstr "basado en %s"
|
910 |
+
|
911 |
+
#: includes/fs-plugin-info-dialog.php:878
|
912 |
+
msgid "%s rating"
|
913 |
+
msgstr "%s calificación"
|
914 |
+
|
915 |
+
#: includes/fs-plugin-info-dialog.php:880
|
916 |
+
msgid "%s ratings"
|
917 |
+
msgstr "%s calificaciones"
|
918 |
+
|
919 |
+
#: includes/fs-plugin-info-dialog.php:894
|
920 |
+
msgid "%s star"
|
921 |
+
msgstr "%s estrella"
|
922 |
+
|
923 |
+
#: includes/fs-plugin-info-dialog.php:896
|
924 |
+
msgid "%s stars"
|
925 |
+
msgstr "%s estrellas"
|
926 |
+
|
927 |
+
#: includes/fs-plugin-info-dialog.php:907
|
928 |
+
msgid "Click to see reviews that provided a rating of %s"
|
929 |
+
msgstr "Haz clic para ver los comentarios con una valoración de %s"
|
930 |
+
|
931 |
+
#: includes/fs-plugin-info-dialog.php:920
|
932 |
+
msgid "Contributors"
|
933 |
+
msgstr "Colaboradores"
|
934 |
+
|
935 |
+
#: includes/fs-plugin-info-dialog.php948,
|
936 |
+
#: includes/fs-plugin-info-dialog.php:950
|
937 |
+
msgid "Warning"
|
938 |
+
msgstr "Atencion"
|
939 |
+
|
940 |
+
#: includes/fs-plugin-info-dialog.php:948
|
941 |
+
msgid "This plugin has not been tested with your current version of WordPress."
|
942 |
+
msgstr "Este plugin no ha sido probado con tu versión actual de WordPress."
|
943 |
+
|
944 |
+
#: includes/fs-plugin-info-dialog.php:950
|
945 |
+
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
946 |
+
msgstr "Este puglin no ha sido marcado como compatible con tu versión de WordPress."
|
947 |
+
|
948 |
+
#: includes/fs-plugin-info-dialog.php:969
|
949 |
+
msgid "Paid add-on must be deployed to Freemius."
|
950 |
+
msgstr "El complemento de pago se debe implementar en Freemius."
|
951 |
+
|
952 |
+
#: includes/fs-plugin-info-dialog.php:970
|
953 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
954 |
+
msgstr "El complemento debe implementarse en WordPress.org o en Freemius."
|
955 |
+
|
956 |
+
#: templates/account.php:53
|
957 |
+
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
958 |
+
msgstr "Degradando tu plan detendrás inmediatamente todos los pagos recurrentes futuros y tu licencia del plan %s expirará en %s."
|
959 |
+
|
960 |
+
#: templates/account.php:54
|
961 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
962 |
+
msgstr "La cancelación del período de prueba bloqueará inmediatamente el acceso a todas las funciones premium. ¿Estás seguro?"
|
963 |
+
|
964 |
+
#: templates/account.php:55
|
965 |
+
msgid "You can still enjoy all %s features but you will not have access to %s updates and support."
|
966 |
+
msgstr "Todavía puedes disfrutar de todas las funciones de %s pero no tienes acceso a soporte y actualizaciones de %s."
|
967 |
+
|
968 |
+
#: templates/account.php:56
|
969 |
+
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
970 |
+
msgstr "Una vez que caduque tu licencia todavía puedes utilizar la versión gratuita pero NO tendrás acceso a las funciones de %s."
|
971 |
+
|
972 |
+
#. translators: %s: Plan title (e.g. "Professional")
|
973 |
+
#: templates/account.php:58
|
974 |
+
msgid "Activate %s Plan"
|
975 |
+
msgstr "Activar Plan %s"
|
976 |
+
|
977 |
+
#. translators: %s: Time period (e.g. Auto renews in "2 months")
|
978 |
+
#: templates/account.php:61
|
979 |
+
msgid "Auto renews in %s"
|
980 |
+
msgstr "Auto renovaciones en %s"
|
981 |
+
|
982 |
+
#. translators: %s: Time period (e.g. Expires in "2 months")
|
983 |
+
#: templates/account.php:63
|
984 |
+
msgid "Expires in %s"
|
985 |
+
msgstr "Caduca en %s"
|
986 |
+
|
987 |
+
#: templates/account.php:64
|
988 |
+
msgctxt "as synchronize license"
|
989 |
+
msgid "Sync License"
|
990 |
+
msgstr "Sincronizar Licencia"
|
991 |
+
|
992 |
+
#: templates/account.php:65
|
993 |
+
msgid "Cancel Trial"
|
994 |
+
msgstr "Cancelar Período de Prueba"
|
995 |
+
|
996 |
+
#: templates/account.php:66
|
997 |
+
msgid "Change Plan"
|
998 |
+
msgstr "Cambiar Plan"
|
999 |
+
|
1000 |
+
#: templates/account.php:67
|
1001 |
+
msgctxt "verb"
|
1002 |
+
msgid "Upgrade"
|
1003 |
+
msgstr "Actualizar"
|
1004 |
+
|
1005 |
+
#: templates/account.php:69
|
1006 |
+
msgctxt "verb"
|
1007 |
+
msgid "Downgrade"
|
1008 |
+
msgstr "Degradar"
|
1009 |
+
|
1010 |
+
#: templates/account.php71, templates/add-ons.php126,
|
1011 |
+
#: templates/plugin-info/features.php:72
|
1012 |
+
msgid "Free"
|
1013 |
+
msgstr "Gratis"
|
1014 |
+
|
1015 |
+
#: templates/account.php:72
|
1016 |
+
msgid "Activate"
|
1017 |
+
msgstr "Activar"
|
1018 |
+
|
1019 |
+
#: templates/account.php73, templates/debug.php311,
|
1020 |
+
#: includes/customizer/class-fs-customizer-upsell-control.php:106
|
1021 |
+
msgctxt "as product pricing plan"
|
1022 |
+
msgid "Plan"
|
1023 |
+
msgstr "Plan"
|
1024 |
+
|
1025 |
+
#: templates/account.php:87
|
1026 |
+
msgid "Free Trial"
|
1027 |
+
msgstr "Período de Prueba Gratuito"
|
1028 |
+
|
1029 |
+
#: templates/account.php:98
|
1030 |
+
msgid "Account Details"
|
1031 |
+
msgstr "Detalles de la Cuenta"
|
1032 |
+
|
1033 |
+
#: templates/account.php:108
|
1034 |
+
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?"
|
1035 |
+
msgstr "La eliminación de la cuenta desactivará automáticamente su licencia de plan %s para que pueda utilizarla en otros sitios. Si también desea cancelar los pagos periódicos, haga clic en el botón \"Cancelar\" y, en primer lugar, \"Degradar\" su cuenta. ¿Seguro que deseas continuar con la eliminación?"
|
1036 |
+
|
1037 |
+
#: templates/account.php:110
|
1038 |
+
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?"
|
1039 |
+
msgstr "La eliminación no es temporal. Sólo elimínalo si ya no deseas utilizar este %s más. ¿Estás seguro que desea continuar con la eliminación?"
|
1040 |
+
|
1041 |
+
#: templates/account.php:113
|
1042 |
+
msgid "Delete Account"
|
1043 |
+
msgstr "Borrar Cuenta"
|
1044 |
+
|
1045 |
+
#: templates/account.php:124
|
1046 |
+
msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
|
1047 |
+
msgstr "Al desactivar tu licencia todas las características premium se bloquearán, pero posibilitará poder activar tu licencia en otro sitio. ¿Estás seguro que quieres continuar?"
|
1048 |
+
|
1049 |
+
#: templates/account.php125, templates/account.php:590
|
1050 |
+
msgid "Deactivate License"
|
1051 |
+
msgstr "Desactivar Licencia"
|
1052 |
+
|
1053 |
+
#: templates/account.php:142
|
1054 |
+
msgid "Are you sure you want to proceed?"
|
1055 |
+
msgstr "¿Estás seguro que quieres proceder?"
|
1056 |
+
|
1057 |
+
#: templates/account.php:142
|
1058 |
+
msgid "Cancel Subscription"
|
1059 |
+
msgstr "Cancelar Suscripción"
|
1060 |
+
|
1061 |
+
#: templates/account.php:171
|
1062 |
+
msgctxt "as synchronize"
|
1063 |
+
msgid "Sync"
|
1064 |
+
msgstr "Sincronizar"
|
1065 |
+
|
1066 |
+
#: templates/account.php185, templates/debug.php:389
|
1067 |
+
msgid "Name"
|
1068 |
+
msgstr "Nombre"
|
1069 |
+
|
1070 |
+
#: templates/account.php191, templates/debug.php:390
|
1071 |
+
msgid "Email"
|
1072 |
+
msgstr "Correo Electrónico"
|
1073 |
+
|
1074 |
+
#: templates/account.php198, templates/debug.php310, templates/debug.php:419
|
1075 |
+
msgid "User ID"
|
1076 |
+
msgstr "ID de Usuario"
|
1077 |
+
|
1078 |
+
#: templates/account.php:205
|
1079 |
+
msgid "Site ID"
|
1080 |
+
msgstr "ID del Sitio"
|
1081 |
+
|
1082 |
+
#: templates/account.php:208
|
1083 |
+
msgid "No ID"
|
1084 |
+
msgstr "Sin ID"
|
1085 |
+
|
1086 |
+
#: templates/account.php213, templates/debug.php225, templates/debug.php312,
|
1087 |
+
#: templates/debug.php355, templates/debug.php:392
|
1088 |
+
msgid "Public Key"
|
1089 |
+
msgstr "Clave Pública"
|
1090 |
+
|
1091 |
+
#: templates/account.php219, templates/debug.php313, templates/debug.php356,
|
1092 |
+
#: templates/debug.php:393
|
1093 |
+
msgid "Secret Key"
|
1094 |
+
msgstr "Clave Secreta"
|
1095 |
+
|
1096 |
+
#: templates/account.php:222
|
1097 |
+
msgctxt "as secret encryption key missing"
|
1098 |
+
msgid "No Secret"
|
1099 |
+
msgstr "Sin clave secreta"
|
1100 |
+
|
1101 |
+
#: templates/account.php:241
|
1102 |
+
msgid "Trial"
|
1103 |
+
msgstr "Período de Prueba Gratuito"
|
1104 |
+
|
1105 |
+
#: templates/account.php257, templates/debug.php:424
|
1106 |
+
msgid "License Key"
|
1107 |
+
msgstr "Clave de licencia"
|
1108 |
+
|
1109 |
+
#: templates/account.php:287
|
1110 |
+
msgid "not verified"
|
1111 |
+
msgstr "no verificado"
|
1112 |
+
|
1113 |
+
#: templates/account.php:317
|
1114 |
+
msgid "Localhost"
|
1115 |
+
msgstr "Localhost"
|
1116 |
+
|
1117 |
+
#: templates/account.php:321
|
1118 |
+
msgctxt "as 5 licenses left"
|
1119 |
+
msgid "%s left"
|
1120 |
+
msgstr "quedan %s"
|
1121 |
+
|
1122 |
+
#: templates/account.php:322
|
1123 |
+
msgid "Last license"
|
1124 |
+
msgstr "Última licencia"
|
1125 |
+
|
1126 |
+
#: templates/account.php:352
|
1127 |
+
msgid "Premium version"
|
1128 |
+
msgstr "Versión Premium"
|
1129 |
+
|
1130 |
+
#: templates/account.php:354
|
1131 |
+
msgid "Free version"
|
1132 |
+
msgstr "Versión Gratuita"
|
1133 |
+
|
1134 |
+
#: templates/account.php:366
|
1135 |
+
msgid "Verify Email"
|
1136 |
+
msgstr "Verificar Correo Electrónico"
|
1137 |
+
|
1138 |
+
#: templates/account.php:377
|
1139 |
+
msgid "Download %s Version"
|
1140 |
+
msgstr "Descargar Versión %s"
|
1141 |
+
|
1142 |
+
#: templates/account.php391, templates/account.php:442
|
1143 |
+
msgctxt "verb"
|
1144 |
+
msgid "Show"
|
1145 |
+
msgstr "Mostrar"
|
1146 |
+
|
1147 |
+
#: templates/account.php:405
|
1148 |
+
msgid "What is your %s?"
|
1149 |
+
msgstr "¿Cual es tú %s?"
|
1150 |
+
|
1151 |
+
#: templates/account.php413, templates/account/billing.php:27
|
1152 |
+
msgctxt "verb"
|
1153 |
+
msgid "Edit"
|
1154 |
+
msgstr "Editar"
|
1155 |
+
|
1156 |
+
#: templates/account.php:436
|
1157 |
+
msgctxt "verb"
|
1158 |
+
msgid "Hide"
|
1159 |
+
msgstr "Ocultar"
|
1160 |
+
|
1161 |
+
#: templates/account.php472, templates/debug.php218, templates/debug.php308,
|
1162 |
+
#: templates/debug.php351, templates/debug.php388, templates/debug.php417,
|
1163 |
+
#: templates/debug.php496, templates/account/payments.php35,
|
1164 |
+
#: templates/debug/logger.php:21
|
1165 |
+
msgid "ID"
|
1166 |
+
msgstr "ID"
|
1167 |
+
|
1168 |
+
#: templates/account.php:475
|
1169 |
+
msgctxt "as software license"
|
1170 |
+
msgid "License"
|
1171 |
+
msgstr "Licencia"
|
1172 |
+
|
1173 |
+
#: templates/account.php:550
|
1174 |
+
msgid "Cancelled"
|
1175 |
+
msgstr "Cancelado"
|
1176 |
+
|
1177 |
+
#: templates/account.php:555
|
1178 |
+
msgid "Expired"
|
1179 |
+
msgstr "Caducado"
|
1180 |
+
|
1181 |
+
#: templates/account.php:560
|
1182 |
+
msgid "No expiration"
|
1183 |
+
msgstr "Sin caducidad"
|
1184 |
+
|
1185 |
+
#: templates/account.php668, templates/account.php:724
|
1186 |
+
msgid "Activate this add-on"
|
1187 |
+
msgstr "Activar este complemento"
|
1188 |
+
|
1189 |
+
#: templates/account.php745, templates/debug.php:336
|
1190 |
+
msgctxt "verb"
|
1191 |
+
msgid "Delete"
|
1192 |
+
msgstr "Borrar"
|
1193 |
+
|
1194 |
+
#: templates/add-ons.php:36
|
1195 |
+
msgid "Add Ons for %s"
|
1196 |
+
msgstr "Complementos para %s"
|
1197 |
+
|
1198 |
+
#: templates/add-ons.php:44
|
1199 |
+
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."
|
1200 |
+
msgstr "No podemos cargar la lista de complementos. Probablemente es un problema por nuestro parte, por favor inténtalo de nuevo en unos minutos."
|
1201 |
+
|
1202 |
+
#: templates/add-ons.php:135
|
1203 |
+
msgid "View details"
|
1204 |
+
msgstr "Ver detalles"
|
1205 |
+
|
1206 |
+
#: templates/admin-notice.php13, templates/forms/license-activation.php73,
|
1207 |
+
#: templates/forms/resend-key.php:77
|
1208 |
+
msgctxt "as close a window"
|
1209 |
+
msgid "Dismiss"
|
1210 |
+
msgstr "Descartar"
|
1211 |
+
|
1212 |
+
#: templates/auto-installation.php:44
|
1213 |
+
msgid "%s sec"
|
1214 |
+
msgstr "%s seg"
|
1215 |
+
|
1216 |
+
#: templates/auto-installation.php:82
|
1217 |
+
msgid "Automatic Installation"
|
1218 |
+
msgstr "Instalación Automática"
|
1219 |
+
|
1220 |
+
#: templates/auto-installation.php:92
|
1221 |
+
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."
|
1222 |
+
msgstr "Una descarga automatizada y la instalación de %s (versión de pago) de %s comenzará en %s. Si quieres hacerlo manualmente - haz clic en el botón de cancelación."
|
1223 |
+
|
1224 |
+
#: templates/auto-installation.php:103
|
1225 |
+
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."
|
1226 |
+
msgstr "El proceso de instalación ha comenzado y puede tardar unos minutos en completarse. Por favor, espera hasta que se finalice - no actualices esta página."
|
1227 |
+
|
1228 |
+
#: templates/auto-installation.php:108
|
1229 |
+
msgid "Cancel Installation"
|
1230 |
+
msgstr "Cancelar instalación"
|
1231 |
+
|
1232 |
+
#: templates/checkout.php:168
|
1233 |
+
msgid "Checkout"
|
1234 |
+
msgstr "Checkout"
|
1235 |
+
|
1236 |
+
#: templates/checkout.php:168
|
1237 |
+
msgid "PCI compliant"
|
1238 |
+
msgstr "Compatible con PCI
|