Version Description
Download this release
Release Info
Developer | buttonizer |
Plugin | Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.4.1
- buttonizer.php +2 -2
- classes/{admin → Admin}/Admin.php +0 -0
- classes/{admin → Admin}/Ajax/SaveData.php +0 -0
- classes/{admin → Admin}/Ajax/WordpressOverview.php +0 -0
- classes/{admin → Admin}/Buttons.php +0 -0
- classes/{admin → Admin}/CompanyOpened.php +0 -0
- classes/{admin → Admin}/General.php +0 -0
- classes/{admin → Admin}/PageCategories.php +0 -0
- classes/{admin → Admin}/ResetButtonizer.php +0 -0
- classes/{admin → Admin}/Video.php +0 -0
- classes/admin/IconManager.php +0 -57
- classes/admin/InitializeAdmin.php +0 -328
- classes/default/license.php +0 -70
- classes/default/main.php +0 -443
- classes/default/maintain.php +0 -156
- freemius/.gitignore +0 -16
- freemius/LICENSE.txt +620 -286
- freemius/README.md +0 -253
- freemius/assets/css/admin/account.css +1 -1
- freemius/assets/css/admin/affiliation.css +1 -0
- 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/common.css +0 -1
- freemius/assets/css/customizer.css +1 -0
- freemius/assets/css/index.php +3 -0
- freemius/assets/img/buttonizer-floating-action-button.png +0 -0
- freemius/assets/img/buttonizer.png +0 -0
- freemius/assets/img/icon.png +0 -0
- freemius/assets/img/index.php +3 -0
- freemius/assets/img/plugin-icon.png +0 -0
- freemius/assets/img/theme-icon.png +0 -0
- freemius/assets/js/index.php +3 -0
- freemius/assets/scss/_mixins.scss +269 -282
- freemius/assets/scss/admin/_themes.scss +21 -0
- freemius/assets/scss/admin/account.scss +6 -0
- freemius/assets/scss/admin/affiliation.scss +97 -0
- freemius/assets/scss/admin/common.scss +217 -172
- freemius/assets/scss/admin/connect.scss +49 -0
- freemius/assets/scss/admin/index.php +3 -0
- freemius/assets/scss/customizer.scss +125 -0
- freemius/assets/scss/index.php +3 -0
- freemius/config.php +331 -327
- freemius/gulpfile.js +167 -0
- freemius/includes/class-freemius-abstract.php +2 -2
- freemius/includes/class-freemius.php +2843 -835
- freemius/includes/class-fs-api.php +557 -557
- freemius/includes/class-fs-logger.php +687 -687
- freemius/includes/class-fs-plugin-updater.php +48 -19
- freemius/includes/class-fs-security.php +1 -1
- freemius/includes/customizer/class-fs-customizer-support-section.php +102 -0
- freemius/includes/customizer/class-fs-customizer-upsell-control.php +157 -0
- freemius/includes/customizer/index.php +3 -0
- freemius/includes/debug/class-fs-debug-bar-panel.php +6 -6
- freemius/includes/debug/debug-bar-start.php +3 -3
- freemius/includes/entities/class-fs-affiliate-terms.php +128 -0
- freemius/includes/entities/class-fs-affiliate.php +84 -0
- freemius/includes/entities/class-fs-billing.php +1 -1
- freemius/includes/entities/class-fs-entity.php +4 -4
- freemius/includes/entities/class-fs-payment.php +1 -1
- freemius/includes/entities/class-fs-plugin-info.php +1 -1
- freemius/includes/entities/class-fs-plugin-license.php +1 -1
- freemius/includes/entities/class-fs-plugin-plan.php +1 -1
- freemius/includes/entities/class-fs-plugin-tag.php +1 -1
- freemius/includes/entities/class-fs-plugin.php +24 -1
- freemius/includes/entities/class-fs-pricing.php +1 -1
- freemius/includes/entities/class-fs-scope-entity.php +1 -1
- freemius/includes/entities/class-fs-site.php +1 -1
- freemius/includes/entities/class-fs-subscription.php +1 -1
- freemius/includes/entities/class-fs-user.php +1 -1
- freemius/includes/fs-core-functions.php +1067 -578
- freemius/includes/fs-essential-functions.php +496 -458
- freemius/includes/fs-plugin-info-dialog.php +130 -82
- freemius/includes/i18n.php +100 -41
- freemius/includes/l10n.php +6 -208
- freemius/includes/managers/class-fs-admin-menu-manager.php +849 -781
- freemius/includes/managers/class-fs-admin-notice-manager.php +47 -36
- freemius/includes/managers/class-fs-cache-manager.php +56 -12
- freemius/includes/managers/class-fs-key-value-storage.php +18 -16
- freemius/includes/managers/class-fs-license-manager.php +1 -1
- freemius/includes/managers/class-fs-option-manager.php +59 -8
- freemius/includes/managers/class-fs-plan-manager.php +1 -1
- freemius/includes/managers/class-fs-plugin-manager.php +103 -37
- freemius/includes/sdk/FreemiusBase.php +39 -12
- freemius/includes/sdk/{Freemius.php → FreemiusWordPress.php} +253 -178
- freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +47 -47
- freemius/languages/freemius-da_DK.mo +0 -0
- freemius/languages/freemius-da_DK.po +423 -387
- freemius/languages/freemius-en.mo +0 -0
- freemius/languages/freemius-en.po +1976 -1788
- freemius/languages/freemius-es_ES.mo +0 -0
- freemius/languages/freemius-es_ES.po +1771 -0
buttonizer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
Plugin URI: https://buttonizer.pro
|
5 |
Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
|
6 |
-
Version: 1.4
|
7 |
Author: Buttonizer
|
8 |
Author URI: https://buttonizer.pro
|
9 |
License: GPL2
|
@@ -34,7 +34,7 @@ define('BUTTONIZER_NAME', 'buttonizer');
|
|
34 |
define('BUTTONIZER_DIR', dirname(__FILE__));
|
35 |
define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
|
36 |
define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
|
37 |
-
define('BUTTONIZER_VERSION','1.4');
|
38 |
|
39 |
# No script kiddies
|
40 |
defined( 'ABSPATH' ) or die('No script kiddies please!');
|
3 |
Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
Plugin URI: https://buttonizer.pro
|
5 |
Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
|
6 |
+
Version: 1.4.1
|
7 |
Author: Buttonizer
|
8 |
Author URI: https://buttonizer.pro
|
9 |
License: GPL2
|
34 |
define('BUTTONIZER_DIR', dirname(__FILE__));
|
35 |
define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
|
36 |
define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
|
37 |
+
define('BUTTONIZER_VERSION','1.4.1');
|
38 |
|
39 |
# No script kiddies
|
40 |
defined( 'ABSPATH' ) or die('No script kiddies please!');
|
classes/{admin → Admin}/Admin.php
RENAMED
File without changes
|
classes/{admin → Admin}/Ajax/SaveData.php
RENAMED
File without changes
|
classes/{admin → Admin}/Ajax/WordpressOverview.php
RENAMED
File without changes
|
classes/{admin → Admin}/Buttons.php
RENAMED
File without changes
|
classes/{admin → Admin}/CompanyOpened.php
RENAMED
File without changes
|
classes/{admin → Admin}/General.php
RENAMED
File without changes
|
classes/{admin → Admin}/PageCategories.php
RENAMED
File without changes
|
classes/{admin → Admin}/ResetButtonizer.php
RENAMED
File without changes
|
classes/{admin → Admin}/Video.php
RENAMED
File without changes
|
classes/admin/IconManager.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
This program is free software; you can redistribute it and/or
|
5 |
-
modify it under the terms of the GNU General Public License
|
6 |
-
as published by the Free Software Foundation; either version 2
|
7 |
-
of the License, or (at your option) any later version.
|
8 |
-
|
9 |
-
This program is distributed in the hope that it will be useful,
|
10 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
-
GNU General Public License for more details.
|
13 |
-
|
14 |
-
You should have received a copy of the GNU General Public License
|
15 |
-
along with this program; if not, write to the Free Software
|
16 |
-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
17 |
-
|
18 |
-
Copyright 2017 Buttonizer
|
19 |
-
*/
|
20 |
-
namespace Buttonizer\Admin;
|
21 |
-
|
22 |
-
# No script kiddies
|
23 |
-
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
24 |
-
class IconManager
|
25 |
-
{
|
26 |
-
private $aFontAwesome = array() ;
|
27 |
-
function __construct( $aFontAwesome )
|
28 |
-
{
|
29 |
-
$this->aFontAwesome = $aFontAwesome;
|
30 |
-
}
|
31 |
-
|
32 |
-
public function generator( $aData )
|
33 |
-
{
|
34 |
-
if ( !isset( $aData['image'] ) || !isset( $aData['icon'] ) || !isset( $aData['image_fieldname'] ) || !isset( $aData['icon_fieldname'] ) ) {
|
35 |
-
return 'Invalid.';
|
36 |
-
}
|
37 |
-
$p = $this->generator_start( $aData );
|
38 |
-
return $p;
|
39 |
-
}
|
40 |
-
|
41 |
-
private function generator_start( $aData )
|
42 |
-
{
|
43 |
-
$p = '<div class="icon-or-image" data-type="icon">
|
44 |
-
<div class="icon-placeholder">
|
45 |
-
<div class="placeholder-choose">
|
46 |
-
or <span class="buttonizer-click-to-pro" style="color: #0073aa; text-decoration: underline; cursor: pointer;">upload image (PRO ONLY)</span>
|
47 |
-
</div>';
|
48 |
-
$p .= '<select name="' . $aData['icon_fieldname'] . '" id="' . $aData['icon_fieldname'] . '" style="font-family: \'FontAwesome\', \'Helvetica\';" class="fa-chooser">';
|
49 |
-
foreach ( $this->aFontAwesome as $key => $row ) {
|
50 |
-
$p .= '<option value="' . $key . '" ' . (( $aData['icon'] == $key ? 'selected="selected"' : '' )) . '>' . $row . " " . $key . '</option>';
|
51 |
-
}
|
52 |
-
$p .= "</select>";
|
53 |
-
$p .= '</div>';
|
54 |
-
return $p;
|
55 |
-
}
|
56 |
-
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/admin/InitializeAdmin.php
DELETED
@@ -1,328 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
This program is free software; you can redistribute it and/or
|
4 |
-
modify it under the terms of the GNU General Public License
|
5 |
-
as published by the Free Software Foundation; either version 2
|
6 |
-
of the License, or (at your option) any later version.
|
7 |
-
|
8 |
-
This program is distributed in the hope that it will be useful,
|
9 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11 |
-
GNU General Public License for more details.
|
12 |
-
|
13 |
-
You should have received a copy of the GNU General Public License
|
14 |
-
along with this program; if not, write to the Free Software
|
15 |
-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
16 |
-
|
17 |
-
Copyright 2017 Buttonizer
|
18 |
-
*/
|
19 |
-
|
20 |
-
namespace Buttonizer\Admin;
|
21 |
-
|
22 |
-
# No script kiddies
|
23 |
-
defined( 'ABSPATH' ) or die('No script kiddies please!');
|
24 |
-
|
25 |
-
class InitializeAdmin {
|
26 |
-
// Define some data
|
27 |
-
private $aButtonizerPageButtons;
|
28 |
-
private $aPluginTabs = array();
|
29 |
-
private $oIconManager = null;
|
30 |
-
private $aFontAwesome = null;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* InitializeAdmin constructor.
|
34 |
-
*/
|
35 |
-
public function __construct() {
|
36 |
-
// Let's wait for Wordpress to initialize... Otherways we are way to early
|
37 |
-
add_action( 'init', array( &$this, 'wordpress_initialized') );
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Wordpress initialized
|
42 |
-
*/
|
43 |
-
public function wordpress_initialized() {
|
44 |
-
$this->createButtonizerAdminMenu();
|
45 |
-
$this->getFontAwesome();
|
46 |
-
|
47 |
-
// Insert scripts
|
48 |
-
if (is_admin()) {
|
49 |
-
add_action('admin_enqueue_scripts', array(&$this, 'getPluginScripts'));
|
50 |
-
}else{
|
51 |
-
add_action('wp_print_scripts', array(&$this, 'getPluginScripts'));
|
52 |
-
}
|
53 |
-
|
54 |
-
add_action( 'admin_init', array( &$this, 'register_settings_pages') );
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Create admin menu
|
59 |
-
*/
|
60 |
-
private function createButtonizerAdminMenu() {
|
61 |
-
add_menu_page(
|
62 |
-
'Buttonizer Settings',
|
63 |
-
'Buttonizer',
|
64 |
-
'manage_options',
|
65 |
-
'Buttonizer',
|
66 |
-
array(&$this, 'plugin_options_page'),
|
67 |
-
plugins_url('/assets/wp-icon.png', BUTTONIZER_PLUGIN_DIR),
|
68 |
-
81
|
69 |
-
);
|
70 |
-
|
71 |
-
add_filter( "plugin_action_links_" . plugin_basename(BUTTONIZER_PLUGIN_DIR), function($aLinks) {
|
72 |
-
$aButtonizerLinks = array(
|
73 |
-
'<a href="' . admin_url( 'admin.php?page=Buttonizer-contact' ) . '">I need support</a><br />',
|
74 |
-
'<a href="' . admin_url( 'admin.php?page=Buttonizer' ) . '">Buttonizer Buttons</a>',
|
75 |
-
'<a href="' . admin_url( 'admin.php?page=Buttonizer&tab=buttonizer_general_settings' ) . '">General settings</a>'
|
76 |
-
);
|
77 |
-
return array_merge($aLinks, $aButtonizerLinks);
|
78 |
-
});
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Get media and add scripts/styles that Buttonizer uses
|
83 |
-
*/
|
84 |
-
public function getPluginScripts() {
|
85 |
-
wp_enqueue_media();
|
86 |
-
wp_enqueue_style(array('wp-color-picker'));
|
87 |
-
wp_enqueue_script(
|
88 |
-
array( 'jquery','wp-color-picker','jquery-ui-slider'),
|
89 |
-
false,
|
90 |
-
true
|
91 |
-
);
|
92 |
-
|
93 |
-
wp_enqueue_script('media-uploader', plugins_url('/js/wp_media_uploader.js?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
94 |
-
wp_enqueue_script('sortable', plugins_url('/js/sortable.min.js?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
95 |
-
wp_enqueue_script('dashboard-script', plugins_url('/js/dashboard.js?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
96 |
-
wp_enqueue_script('opening-script', plugins_url('/js/company-openingtimes.js?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
97 |
-
wp_enqueue_script('advanced-settings-script', plugins_url('/js/advanced-settings.js?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
98 |
-
wp_enqueue_script('intro', plugins_url('/js/intro.js?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
99 |
-
|
100 |
-
wp_enqueue_style('font-awesome','//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
|
101 |
-
|
102 |
-
wp_enqueue_style('dialog-boxes', plugins_url('/freemius/assets/css/admin/dialog-boxes.css', BUTTONIZER_PLUGIN_DIR));
|
103 |
-
wp_enqueue_style('intro', plugins_url('/css/introjs.css?v=' . md5(BUTTONIZER_VERSION), BUTTONIZER_PLUGIN_DIR));
|
104 |
-
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Register the Buttonizer settings pages
|
109 |
-
*/
|
110 |
-
public function register_settings_pages() {
|
111 |
-
$this->register_buttonizer_buttons();
|
112 |
-
$this->register_buttonizer_general_settings();
|
113 |
-
$this->register_buttonizer_page_categories();
|
114 |
-
$this->register_buttonizer_opening_settings();
|
115 |
-
$this->register_buttonizer_reset_everything();
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Default setting page template
|
120 |
-
*/
|
121 |
-
function plugin_options_page() {
|
122 |
-
// Add IconManager
|
123 |
-
require BUTTONIZER_DIR . '/classes/admin/IconManager.php';
|
124 |
-
$this->oIconManager = new IconManager($this->aFontAwesome);
|
125 |
-
|
126 |
-
$tab = isset($_GET['tab']) ? $_GET['tab'] : 'buttonizer_buttons';
|
127 |
-
|
128 |
-
?>
|
129 |
-
<link rel="stylesheet" href="<?php echo plugins_url('/css/style.css', BUTTONIZER_PLUGIN_DIR); ?>?v=<?=md5(BUTTONIZER_VERSION)?>" type="text/css" media="all" />
|
130 |
-
<script>
|
131 |
-
var fontAwesome = <?php echo json_encode($this->aFontAwesome); ?>;
|
132 |
-
var faviconUrl = '<?php echo plugins_url('/favicon.ico', BUTTONIZER_PLUGIN_DIR); ?>?v=<?=md5(BUTTONIZER_VERSION)?>'
|
133 |
-
</script>
|
134 |
-
|
135 |
-
<!-- Icon autocompleter -->
|
136 |
-
<div class="fontawesome-searcher" style="display: none;">
|
137 |
-
<div class="fontawesome-searcher-searchbar">
|
138 |
-
<input type="text" placeholder="Search..." />
|
139 |
-
</div>
|
140 |
-
<div class="fontawesome-searcher-icons"></div>
|
141 |
-
|
142 |
-
<div class="no-matches-found" style="display: none;">
|
143 |
-
There is nothing found.
|
144 |
-
</div>
|
145 |
-
</div>
|
146 |
-
|
147 |
-
<a href="admin.php?page=Buttonizer&tab=buttonizer_buttons" class="buttonizer-logo"><img src="<?php echo plugins_url('/assets/logo.png', BUTTONIZER_PLUGIN_DIR); ?>" /></a>
|
148 |
-
<div class="clear"></div>
|
149 |
-
|
150 |
-
<!-- Page wrapper -->
|
151 |
-
<div class="wrap">
|
152 |
-
<?php $this->plugin_options_tabs(); ?>
|
153 |
-
<form method="post" action="options.php" id="buttonizer">
|
154 |
-
<?php wp_nonce_field( 'update-options' ); ?>
|
155 |
-
<?php settings_fields( $tab ); ?>
|
156 |
-
|
157 |
-
<?php do_settings_sections( $tab ); ?>
|
158 |
-
|
159 |
-
|
160 |
-
<?php
|
161 |
-
if($tab != 'buttonizer_page_reset'){
|
162 |
-
// submit_button();
|
163 |
-
?>
|
164 |
-
<p class="submit">
|
165 |
-
<button type="submit" class="button button-primary savebutton"><i class="fa fa-floppy-o"></i> <span>Save</span></button>
|
166 |
-
</p>
|
167 |
-
<?php
|
168 |
-
}
|
169 |
-
|
170 |
-
if(!ButtonizerLicense()->is_plan('premium')) {
|
171 |
-
?><div class="buttonizer-pro-text"><b class="color-buttonizer">You <span><i class="fa fa-heart"></i></span> Buttonizer?</b> When upgrading to <a href="admin.php?page=Buttonizer-pricing">Buttonizer Pro</a> you will get more cool & handy features.</div><?php
|
172 |
-
}
|
173 |
-
?>
|
174 |
-
</form>
|
175 |
-
</div>
|
176 |
-
<?php
|
177 |
-
}
|
178 |
-
|
179 |
-
// Button
|
180 |
-
public function plugin_options_tabs() {
|
181 |
-
$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'buttonizer_buttons';
|
182 |
-
|
183 |
-
|
184 |
-
echo '<div id="wordpress-plugin-message-spam" style="display: none; visibility: hidden;"><h2 class="nav-tab-wrapper">Sorry, I don\'t want all those plugin-spam from others on my page. This is a fake div where they will be spawned in. Happy life :)</h2></div>';
|
185 |
-
|
186 |
-
|
187 |
-
echo '<h1 class="nav-tab-wrapper">';
|
188 |
-
|
189 |
-
// Load tabs
|
190 |
-
foreach ( $this->aPluginTabs as $tab_key => $tab_caption ) {
|
191 |
-
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
192 |
-
echo '<a class="nav-tab ' . $active . '" href="?page=Buttonizer&tab=' . $tab_key . '">' . $tab_caption . '</a>';
|
193 |
-
}
|
194 |
-
|
195 |
-
// Show Buttonizer version number
|
196 |
-
echo '<a href="javascript:void(0)" class="nav-tab" style="cursor: default; float: right; border: 0; background: none; outline: none !important;">Buttonizer: v'. BUTTONIZER_VERSION .'</a>';
|
197 |
-
|
198 |
-
// Show buttonizer upgrade notification
|
199 |
-
if (!ButtonizerLicense()->is_plan('btn_pro')) {
|
200 |
-
echo '<a href="'. ButtonizerLicense()->get_upgrade_url() .'" id="upgrade-to-pro-url" class="nav-tab" style="float: right; border: 0; background: none; outline: none !important;">Upgrade to Pro!</a>';
|
201 |
-
|
202 |
-
if (ButtonizerLicense()->is_trial()) {
|
203 |
-
echo '<a href="" style="display: none;" id="upgrade-has-trail"></a>';
|
204 |
-
}
|
205 |
-
}else{
|
206 |
-
echo '<a href="'. ButtonizerLicense()->get_account_url() .'" class="nav-tab" style="float: right; border: 0; background: none; outline: none !important;">My Account</a>';
|
207 |
-
}
|
208 |
-
|
209 |
-
echo '<a href="?page=Buttonizer&tab=buttonizer_general_settings#buttonizer-tour" class="nav-tab" style="float: right; border: 0; background: none; outline: none !important;" id="take-the-tour">Take the tour</a>';
|
210 |
-
|
211 |
-
echo '</h1>';
|
212 |
-
}
|
213 |
-
|
214 |
-
/** ============================
|
215 |
-
* Add the tabs
|
216 |
-
* =============================
|
217 |
-
*/
|
218 |
-
|
219 |
-
/* Add buttons tab */
|
220 |
-
function register_buttonizer_buttons() {
|
221 |
-
$this->aPluginTabs['buttonizer_buttons'] = __('Buttons', BUTTONIZER_SLUG);
|
222 |
-
|
223 |
-
register_setting('buttonizer_buttons', 'buttonizer_buttons');
|
224 |
-
|
225 |
-
// FAB Button Settings
|
226 |
-
add_settings_section(
|
227 |
-
'buttonizer_buttons', // ID
|
228 |
-
'Floating Action Buttons <button type="submit" class="button button-primary savebutton savebutton_margin"><i class="fa fa-floppy-o"></i> <span>Save</span></button> <a href="javascript:buttonizer.addRow()" id="new-button" class="button button-primary"><i class="fa fa-plus"></i> New button</a>', // Title
|
229 |
-
array( $this, 'getPageButtons' ), // Callback
|
230 |
-
'buttonizer_buttons' // Page
|
231 |
-
);
|
232 |
-
}
|
233 |
-
|
234 |
-
public function getPageButtons() {
|
235 |
-
require BUTTONIZER_DIR . '/classes/admin/Buttons.php';
|
236 |
-
|
237 |
-
new Buttons($this->aFontAwesome, $this->oIconManager);
|
238 |
-
}
|
239 |
-
|
240 |
-
/* Add general settings */
|
241 |
-
function register_buttonizer_general_settings() {
|
242 |
-
$this->aPluginTabs['buttonizer_general_settings'] = __('General settings', BUTTONIZER_SLUG);
|
243 |
-
|
244 |
-
register_setting('buttonizer_general_settings', 'buttonizer_general_settings');
|
245 |
-
|
246 |
-
// FAB Button Settings
|
247 |
-
add_settings_section(
|
248 |
-
'buttonizer_general_settings', // ID
|
249 |
-
'General settings <button type="submit" class="button button-primary savebutton savebutton_margin"><i class="fa fa-floppy-o"></i> <span>Save</span></button>', // Title
|
250 |
-
array( $this, 'getPageGeneralSettings' ), // Callback
|
251 |
-
'buttonizer_general_settings' // Page
|
252 |
-
);
|
253 |
-
}
|
254 |
-
|
255 |
-
public function getPageGeneralSettings() {
|
256 |
-
require BUTTONIZER_DIR . '/classes/admin/General.php';
|
257 |
-
|
258 |
-
new General($this->aFontAwesome, $this->oIconManager);
|
259 |
-
}
|
260 |
-
|
261 |
-
/* Buttonizer opening times */
|
262 |
-
private function register_buttonizer_opening_settings() {
|
263 |
-
$this->aPluginTabs['buttonizer_opening_settings'] = __('Opening hours', BUTTONIZER_SLUG);
|
264 |
-
|
265 |
-
register_setting( 'buttonizer_opening_settings', 'buttonizer_opening_settings');
|
266 |
-
|
267 |
-
// FAB Button Settings
|
268 |
-
add_settings_section(
|
269 |
-
'buttonizer_opening_settings', // ID
|
270 |
-
'Opening settings <button type="submit" class="button button-primary savebutton savebutton_margin"><i class="fa fa-floppy-o"></i> <span>Save</span></button>', // Title
|
271 |
-
array( $this, 'getPageOpeningTimes' ), // Callback
|
272 |
-
'buttonizer_opening_settings' // Page
|
273 |
-
);
|
274 |
-
}
|
275 |
-
|
276 |
-
public function getPageOpeningTimes() {
|
277 |
-
require BUTTONIZER_DIR . '/classes/admin/CompanyOpened.php';
|
278 |
-
|
279 |
-
new CompanyOpened();
|
280 |
-
}
|
281 |
-
|
282 |
-
/* Buttonizer Page Categories */
|
283 |
-
private function register_buttonizer_page_categories() {
|
284 |
-
$this->aPluginTabs['buttonizer_page_categories'] = __('Page categories', BUTTONIZER_SLUG);
|
285 |
-
|
286 |
-
register_setting( 'buttonizer_page_categories', 'buttonizer_page_categories');
|
287 |
-
|
288 |
-
// FAB Button Settings
|
289 |
-
add_settings_section(
|
290 |
-
'buttonizer_page_categories', // ID
|
291 |
-
'Page categories <button type="submit" class="button button-primary savebutton savebutton_margin"><i class="fa fa-floppy-o"></i> <span>Save</span></button> <a href="javascript:buttonizer.addRow()" id="new-button" class="button button-primary"><i class="fa fa-plus"></i> New category</a>', // Title
|
292 |
-
array( $this, 'getPagePageCategories' ), // Callback
|
293 |
-
'buttonizer_page_categories' // Page
|
294 |
-
);
|
295 |
-
}
|
296 |
-
|
297 |
-
public function getPagePageCategories() {
|
298 |
-
require BUTTONIZER_DIR . '/classes/admin/PageCategories.php';
|
299 |
-
|
300 |
-
new PageCategories();
|
301 |
-
}
|
302 |
-
|
303 |
-
/* Buttonizer Page Categories */
|
304 |
-
private function register_buttonizer_reset_everything() {
|
305 |
-
register_setting( 'buttonizer_page_reset', 'buttonizer_page_categories');
|
306 |
-
|
307 |
-
// FAB Button Settings
|
308 |
-
add_settings_section(
|
309 |
-
'buttonizer_page_reset', // ID
|
310 |
-
'Reset Buttonizer <a href="?page=Buttonizer&tab=buttonizer_page_reset&realReset='. md5(BUTTONIZER_DIR) .'" class="button button-red"><i class="fa fa-refresh"></i> Reset Buttonizer</a>',
|
311 |
-
array( $this, 'getPageResetButtonizer' ), // Callback
|
312 |
-
'buttonizer_page_reset' // Page
|
313 |
-
);
|
314 |
-
}
|
315 |
-
|
316 |
-
public function getPageResetButtonizer() {
|
317 |
-
require BUTTONIZER_DIR . '/classes/admin/ResetButtonizer.php';
|
318 |
-
|
319 |
-
new ResetButtonizer();
|
320 |
-
}
|
321 |
-
|
322 |
-
/*
|
323 |
-
* Load Font Awesome Icons
|
324 |
-
*/
|
325 |
-
private function getFontAwesome() {
|
326 |
-
$this->aFontAwesome = array ( 'fa-adjust' => '', 'fa-adn' => '', 'fa-align-center' => '', 'fa-align-justify' => '', 'fa-align-left' => '', 'fa-align-right' => '', 'fa-ambulance' => '', 'fa-anchor' => '', 'fa-android' => '', 'fa-angellist' => '', 'fa-angle-double-down' => '', 'fa-angle-double-left' => '', 'fa-angle-double-right' => '', 'fa-angle-double-up' => '', 'fa-angle-down' => '', 'fa-angle-left' => '', 'fa-angle-right' => '', 'fa-angle-up' => '', 'fa-apple' => '', 'fa-archive' => '', 'fa-area-chart' => '', 'fa-arrow-circle-down' => '', 'fa-arrow-circle-left' => '', 'fa-arrow-circle-o-down' => '', 'fa-arrow-circle-o-left' => '', 'fa-arrow-circle-o-right' => '', 'fa-arrow-circle-o-up' => '', 'fa-arrow-circle-right' => '', 'fa-arrow-circle-up' => '', 'fa-arrow-down' => '', 'fa-arrow-left' => '', 'fa-arrow-right' => '', 'fa-arrow-up' => '', 'fa-arrows' => '', 'fa-arrows-alt' => '', 'fa-arrows-h' => '', 'fa-arrows-v' => '', 'fa-asterisk' => '', 'fa-at' => '', 'fa-automobile' => '', 'fa-backward' => '', 'fa-ban' => '', 'fa-bank' => '', 'fa-bar-chart' => '', 'fa-bar-chart-o' => '', 'fa-barcode' => '', 'fa-bars' => '', 'fa-bed' => '', 'fa-beer' => '', 'fa-behance' => '', 'fa-behance-square' => '', 'fa-bell' => '', 'fa-bell-o' => '', 'fa-bell-slash' => '', 'fa-bell-slash-o' => '', 'fa-bicycle' => '', 'fa-binoculars' => '', 'fa-birthday-cake' => '', 'fa-bitbucket' => '', 'fa-bitbucket-square' => '', 'fa-bitcoin' => '', 'fa-bold' => '', 'fa-bolt' => '', 'fa-bomb' => '', 'fa-book' => '', 'fa-bookmark' => '', 'fa-bookmark-o' => '', 'fa-briefcase' => '', 'fa-btc' => '', 'fa-bug' => '', 'fa-building' => '', 'fa-building-o' => '', 'fa-bullhorn' => '', 'fa-bullseye' => '', 'fa-bus' => '', 'fa-buysellads' => '', 'fa-cab' => '', 'fa-calculator' => '', 'fa-calendar' => '', 'fa-calendar-o' => '', 'fa-camera' => '', 'fa-camera-retro' => '', 'fa-car' => '', 'fa-caret-down' => '', 'fa-caret-left' => '', 'fa-caret-right' => '', 'fa-caret-square-o-down' => '', 'fa-caret-square-o-left' => '', 'fa-caret-square-o-right' => '', 'fa-caret-square-o-up' => '', 'fa-caret-up' => '', 'fa-cart-arrow-down' => '', 'fa-cart-plus' => '', 'fa-cc' => '', 'fa-cc-amex' => '', 'fa-cc-discover' => '', 'fa-cc-mastercard' => '', 'fa-cc-paypal' => '', 'fa-cc-stripe' => '', 'fa-cc-visa' => '', 'fa-certificate' => '', 'fa-chain' => '', 'fa-chain-broken' => '', 'fa-check' => '', 'fa-check-circle' => '', 'fa-check-circle-o' => '', 'fa-check-square' => '', 'fa-check-square-o' => '', 'fa-chevron-circle-down' => '', 'fa-chevron-circle-left' => '', 'fa-chevron-circle-right' => '', 'fa-chevron-circle-up' => '', 'fa-chevron-down' => '', 'fa-chevron-left' => '', 'fa-chevron-right' => '', 'fa-chevron-up' => '', 'fa-child' => '', 'fa-circle' => '', 'fa-circle-o' => '', 'fa-circle-o-notch' => '', 'fa-circle-thin' => '', 'fa-clipboard' => '', 'fa-clock-o' => '', 'fa-close' => '', 'fa-cloud' => '', 'fa-cloud-download' => '', 'fa-cloud-upload' => '', 'fa-cny' => '', 'fa-code' => '', 'fa-code-fork' => '', 'fa-codepen' => '', 'fa-coffee' => '', 'fa-cog' => '', 'fa-cogs' => '', 'fa-columns' => '', 'fa-comment' => '', 'fa-comment-o' => '', 'fa-comments' => '', 'fa-comments-o' => '', 'fa-compass' => '', 'fa-compress' => '', 'fa-connectdevelop' => '', 'fa-copy' => '', 'fa-copyright' => '', 'fa-credit-card' => '', 'fa-crop' => '', 'fa-crosshairs' => '', 'fa-css3' => '', 'fa-cube' => '', 'fa-cubes' => '', 'fa-cut' => '', 'fa-cutlery' => '', 'fa-dashboard' => '', 'fa-dashcube' => '', 'fa-database' => '', 'fa-dedent' => '', 'fa-delicious' => '', 'fa-desktop' => '', 'fa-deviantart' => '', 'fa-diamond' => '', 'fa-digg' => '', 'fa-dollar' => '', 'fa-dot-circle-o' => '', 'fa-download' => '', 'fa-dribbble' => '', 'fa-dropbox' => '', 'fa-drupal' => '', 'fa-edit' => '', 'fa-eject' => '', 'fa-ellipsis-h' => '', 'fa-ellipsis-v' => '', 'fa-empire' => '', 'fa-envelope' => '', 'fa-envelope-o' => '', 'fa-envelope-square' => '', 'fa-eraser' => '', 'fa-eur' => '', 'fa-euro' => '', 'fa-exchange' => '', 'fa-exclamation' => '', 'fa-exclamation-circle' => '', 'fa-exclamation-triangle' => '', 'fa-expand' => '', 'fa-external-link' => '', 'fa-external-link-square' => '', 'fa-eye' => '', 'fa-eye-slash' => '', 'fa-eyedropper' => '', 'fa-facebook' => '', 'fa-facebook-f' => '', 'fa-facebook-official' => '', 'fa-facebook-square' => '', 'fa-fast-backward' => '', 'fa-fast-forward' => '', 'fa-fax' => '', 'fa-female' => '', 'fa-fighter-jet' => '', 'fa-file' => '', 'fa-file-archive-o' => '', 'fa-file-audio-o' => '', 'fa-file-code-o' => '', 'fa-file-excel-o' => '', 'fa-file-image-o' => '', 'fa-file-movie-o' => '', 'fa-file-o' => '', 'fa-file-pdf-o' => '', 'fa-file-photo-o' => '', 'fa-file-picture-o' => '', 'fa-file-powerpoint-o' => '', 'fa-file-sound-o' => '', 'fa-file-text' => '', 'fa-file-text-o' => '', 'fa-file-video-o' => '', 'fa-file-word-o' => '', 'fa-file-zip-o' => '', 'fa-files-o' => '', 'fa-film' => '', 'fa-filter' => '', 'fa-fire' => '', 'fa-fire-extinguisher' => '', 'fa-flag' => '', 'fa-flag-checkered' => '', 'fa-flag-o' => '', 'fa-flash' => '', 'fa-flask' => '', 'fa-flickr' => '', 'fa-floppy-o' => '', 'fa-folder' => '', 'fa-folder-o' => '', 'fa-folder-open' => '', 'fa-folder-open-o' => '', 'fa-font' => '', 'fa-forumbee' => '', 'fa-forward' => '', 'fa-foursquare' => '', 'fa-frown-o' => '', 'fa-futbol-o' => '', 'fa-gamepad' => '', 'fa-gavel' => '', 'fa-gbp' => '', 'fa-ge' => '', 'fa-gear' => '', 'fa-gears' => '', 'fa-genderless' => '', 'fa-gift' => '', 'fa-git' => '', 'fa-git-square' => '', 'fa-github' => '', 'fa-github-alt' => '', 'fa-github-square' => '', 'fa-gittip' => '', 'fa-glass' => '', 'fa-globe' => '', 'fa-google' => '', 'fa-google-plus' => '', 'fa-google-plus-square' => '', 'fa-google-wallet' => '', 'fa-graduation-cap' => '', 'fa-gratipay' => '', 'fa-group' => '', 'fa-h-square' => '', 'fa-hacker-news' => '', 'fa-hand-o-down' => '', 'fa-hand-o-left' => '', 'fa-hand-o-right' => '', 'fa-hand-o-up' => '', 'fa-hdd-o' => '', 'fa-header' => '', 'fa-headphones' => '', 'fa-heart' => '', 'fa-heart-o' => '', 'fa-heartbeat' => '', 'fa-history' => '', 'fa-home' => '', 'fa-hospital-o' => '', 'fa-hotel' => '', 'fa-html5' => '', 'fa-ils' => '', 'fa-image' => '', 'fa-inbox' => '', 'fa-indent' => '', 'fa-info' => '', 'fa-info-circle' => '', 'fa-inr' => '', 'fa-instagram' => '', 'fa-institution' => '', 'fa-ioxhost' => '', 'fa-italic' => '', 'fa-joomla' => '', 'fa-jpy' => '', 'fa-jsfiddle' => '', 'fa-key' => '', 'fa-keyboard-o' => '', 'fa-krw' => '', 'fa-language' => '', 'fa-laptop' => '', 'fa-lastfm' => '', 'fa-lastfm-square' => '', 'fa-leaf' => '', 'fa-leanpub' => '', 'fa-legal' => '', 'fa-lemon-o' => '', 'fa-level-down' => '', 'fa-level-up' => '', 'fa-life-bouy' => '', 'fa-life-buoy' => '', 'fa-life-ring' => '', 'fa-life-saver' => '', 'fa-lightbulb-o' => '', 'fa-line-chart' => '', 'fa-link' => '', 'fa-linkedin' => '', 'fa-linkedin-square' => '', 'fa-linux' => '', 'fa-list' => '', 'fa-list-alt' => '', 'fa-list-ol' => '', 'fa-list-ul' => '', 'fa-location-arrow' => '', 'fa-lock' => '', 'fa-long-arrow-down' => '', 'fa-long-arrow-left' => '', 'fa-long-arrow-right' => '', 'fa-long-arrow-up' => '', 'fa-magic' => '', 'fa-magnet' => '', 'fa-mail-forward' => '', 'fa-mail-reply' => '', 'fa-mail-reply-all' => '', 'fa-male' => '', 'fa-map-marker' => '', 'fa-mars' => '', 'fa-mars-double' => '', 'fa-mars-stroke' => '', 'fa-mars-stroke-h' => '', 'fa-mars-stroke-v' => '', 'fa-maxcdn' => '', 'fa-meanpath' => '', 'fa-medium' => '', 'fa-medkit' => '', 'fa-meh-o' => '', 'fa-mercury' => '', 'fa-microphone' => '', 'fa-microphone-slash' => '', 'fa-minus' => '', 'fa-minus-circle' => '', 'fa-minus-square' => '', 'fa-minus-square-o' => '', 'fa-mobile' => '', 'fa-mobile-phone' => '', 'fa-money' => '', 'fa-moon-o' => '', 'fa-mortar-board' => '', 'fa-motorcycle' => '', 'fa-music' => '', 'fa-navicon' => '', 'fa-neuter' => '', 'fa-newspaper-o' => '', 'fa-openid' => '', 'fa-outdent' => '', 'fa-pagelines' => '', 'fa-paint-brush' => '', 'fa-paper-plane' => '', 'fa-paper-plane-o' => '', 'fa-paperclip' => '', 'fa-paragraph' => '', 'fa-paste' => '', 'fa-pause' => '', 'fa-paw' => '', 'fa-paypal' => '', 'fa-pencil' => '', 'fa-pencil-square' => '', 'fa-pencil-square-o' => '', 'fa-phone' => '', 'fa-phone-square' => '', 'fa-photo' => '', 'fa-picture-o' => '', 'fa-pie-chart' => '', 'fa-pied-piper' => '', 'fa-pied-piper-alt' => '', 'fa-pinterest' => '', 'fa-pinterest-p' => '', 'fa-pinterest-square' => '', 'fa-plane' => '', 'fa-play' => '', 'fa-play-circle' => '', 'fa-play-circle-o' => '', 'fa-plug' => '', 'fa-plus' => '', 'fa-plus-circle' => '', 'fa-plus-square' => '', 'fa-plus-square-o' => '', 'fa-power-off' => '', 'fa-print' => '', 'fa-puzzle-piece' => '', 'fa-qq' => '', 'fa-qrcode' => '', 'fa-question' => '', 'fa-question-circle' => '', 'fa-quote-left' => '', 'fa-quote-right' => '', 'fa-ra' => '', 'fa-random' => '', 'fa-rebel' => '', 'fa-recycle' => '', 'fa-reddit' => '', 'fa-reddit-square' => '', 'fa-refresh' => '', 'fa-remove' => '', 'fa-renren' => '', 'fa-reorder' => '', 'fa-repeat' => '', 'fa-reply' => '', 'fa-reply-all' => '', 'fa-retweet' => '', 'fa-rmb' => '', 'fa-road' => '', 'fa-rocket' => '', 'fa-rotate-left' => '', 'fa-rotate-right' => '', 'fa-rouble' => '', 'fa-rss' => '', 'fa-rss-square' => '', 'fa-rub' => '', 'fa-ruble' => '', 'fa-rupee' => '', 'fa-save' => '', 'fa-scissors' => '', 'fa-search' => '', 'fa-search-minus' => '', 'fa-search-plus' => '', 'fa-sellsy' => '', 'fa-send' => '', 'fa-send-o' => '', 'fa-server' => '', 'fa-share' => '', 'fa-share-alt' => '', 'fa-share-alt-square' => '', 'fa-share-square' => '', 'fa-share-square-o' => '', 'fa-shekel' => '', 'fa-sheqel' => '', 'fa-shield' => '', 'fa-ship' => '', 'fa-shirtsinbulk' => '', 'fa-shopping-cart' => '', 'fa-sign-in' => '', 'fa-sign-out' => '', 'fa-signal' => '', 'fa-simplybuilt' => '', 'fa-sitemap' => '', 'fa-skyatlas' => '', 'fa-skype' => '', 'fa-slack' => '', 'fa-sliders' => '', 'fa-slideshare' => '', 'fa-smile-o' => '', 'fa-soccer-ball-o' => '', 'fa-sort' => '', 'fa-sort-alpha-asc' => '', 'fa-sort-alpha-desc' => '', 'fa-sort-amount-asc' => '', 'fa-sort-amount-desc' => '', 'fa-sort-asc' => '', 'fa-sort-desc' => '', 'fa-sort-down' => '', 'fa-sort-numeric-asc' => '', 'fa-sort-numeric-desc' => '', 'fa-sort-up' => '', 'fa-soundcloud' => '', 'fa-space-shuttle' => '', 'fa-spinner' => '', 'fa-spoon' => '', 'fa-spotify' => '', 'fa-square' => '', 'fa-square-o' => '', 'fa-stack-exchange' => '', 'fa-stack-overflow' => '', 'fa-star' => '', 'fa-star-half' => '', 'fa-star-half-empty' => '', 'fa-star-half-full' => '', 'fa-star-half-o' => '', 'fa-star-o' => '', 'fa-steam' => '', 'fa-steam-square' => '', 'fa-step-backward' => '', 'fa-step-forward' => '', 'fa-stethoscope' => '', 'fa-stop' => '', 'fa-street-view' => '', 'fa-strikethrough' => '', 'fa-stumbleupon' => '', 'fa-stumbleupon-circle' => '', 'fa-subscript' => '', 'fa-subway' => '', 'fa-suitcase' => '', 'fa-sun-o' => '', 'fa-superscript' => '', 'fa-support' => '', 'fa-table' => '', 'fa-tablet' => '', 'fa-tachometer' => '', 'fa-tag' => '', 'fa-tags' => '', 'fa-tasks' => '', 'fa-taxi' => '', 'fa-tencent-weibo' => '', 'fa-terminal' => '', 'fa-text-height' => '', 'fa-text-width' => '', 'fa-th' => '', 'fa-th-large' => '', 'fa-th-list' => '', 'fa-thumb-tack' => '', 'fa-thumbs-down' => '', 'fa-thumbs-o-down' => '', 'fa-thumbs-o-up' => '', 'fa-thumbs-up' => '', 'fa-ticket' => '', 'fa-times' => '', 'fa-times-circle' => '', 'fa-times-circle-o' => '', 'fa-tint' => '', 'fa-toggle-down' => '', 'fa-toggle-left' => '', 'fa-toggle-off' => '', 'fa-toggle-on' => '', 'fa-toggle-right' => '', 'fa-toggle-up' => '', 'fa-train' => '', 'fa-transgender' => '', 'fa-transgender-alt' => '', 'fa-trash' => '', 'fa-trash-o' => '', 'fa-tree' => '', 'fa-trello' => '', 'fa-trophy' => '', 'fa-truck' => '', 'fa-try' => '', 'fa-tty' => '', 'fa-tumblr' => '', 'fa-tumblr-square' => '', 'fa-turkish-lira' => '', 'fa-twitch' => '', 'fa-twitter' => '', 'fa-twitter-square' => '', 'fa-umbrella' => '', 'fa-underline' => '', 'fa-undo' => '', 'fa-university' => '', 'fa-unlink' => '', 'fa-unlock' => '', 'fa-unlock-alt' => '', 'fa-unsorted' => '', 'fa-upload' => '', 'fa-usd' => '', 'fa-user' => '', 'fa-user-md' => '', 'fa-user-plus' => '', 'fa-user-secret' => '', 'fa-user-times' => '', 'fa-users' => '', 'fa-venus' => '', 'fa-venus-double' => '', 'fa-venus-mars' => '', 'fa-viacoin' => '', 'fa-video-camera' => '', 'fa-vimeo-square' => '', 'fa-vine' => '', 'fa-vk' => '', 'fa-volume-down' => '', 'fa-volume-off' => '', 'fa-volume-up' => '', 'fa-warning' => '', 'fa-wechat' => '', 'fa-weibo' => '', 'fa-weixin' => '', 'fa-whatsapp' => '', 'fa-wheelchair' => '', 'fa-wifi' => '', 'fa-windows' => '', 'fa-won' => '', 'fa-wordpress' => '', 'fa-wrench' => '', 'fa-xing' => '', 'fa-xing-square' => '', 'fa-yahoo' => '', 'fa-yelp' => '', 'fa-yen' => '', 'fa-youtube' => '', 'fa-youtube-play' => '', 'fa-youtube-square' => '', );
|
327 |
-
}
|
328 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/default/license.php
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
This program is free software; you can redistribute it and/or
|
5 |
-
modify it under the terms of the GNU General Public License
|
6 |
-
as published by the Free Software Foundation; either version 2
|
7 |
-
of the License, or (at your option) any later version.
|
8 |
-
|
9 |
-
This program is distributed in the hope that it will be useful,
|
10 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
-
GNU General Public License for more details.
|
13 |
-
|
14 |
-
You should have received a copy of the GNU General Public License
|
15 |
-
along with this program; if not, write to the Free Software
|
16 |
-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
17 |
-
|
18 |
-
Copyright 2017 Buttonizer
|
19 |
-
*/
|
20 |
-
namespace Buttonizer;
|
21 |
-
|
22 |
-
# No script kiddies
|
23 |
-
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
24 |
-
class License
|
25 |
-
{
|
26 |
-
private $oButtonizer = 'null' ;
|
27 |
-
public function init()
|
28 |
-
{
|
29 |
-
|
30 |
-
if ( $this->oButtonizer == 'null' ) {
|
31 |
-
require_once BUTTONIZER_DIR . '/freemius/start.php';
|
32 |
-
// Some data for Buttonizer to be freemium and paid.
|
33 |
-
// We are paid so we can maintain the plugin
|
34 |
-
// If you don't want to pay for the plugin, you can allways use the
|
35 |
-
$this->oButtonizer = fs_dynamic_init( array(
|
36 |
-
'id' => '1219',
|
37 |
-
'slug' => 'buttonizer-floating-action-button',
|
38 |
-
'type' => 'plugin',
|
39 |
-
'public_key' => 'pk_fcd360d9c82b90a5e874e651ad733',
|
40 |
-
'is_premium' => false,
|
41 |
-
'has_addons' => false,
|
42 |
-
'has_paid_plans' => true,
|
43 |
-
'menu' => array(
|
44 |
-
'first-path' => 'admin.php?page=Buttonizer&welcome-splash=true',
|
45 |
-
'slug' => 'Buttonizer',
|
46 |
-
'support' => false,
|
47 |
-
),
|
48 |
-
'is_live' => true,
|
49 |
-
) );
|
50 |
-
}
|
51 |
-
|
52 |
-
return;
|
53 |
-
}
|
54 |
-
|
55 |
-
public function get()
|
56 |
-
{
|
57 |
-
return $this->oButtonizer;
|
58 |
-
}
|
59 |
-
|
60 |
-
private function getDaysLeft()
|
61 |
-
{
|
62 |
-
return round( 2000 / 8 - 243 );
|
63 |
-
}
|
64 |
-
|
65 |
-
// Default data
|
66 |
-
private function initButtonizerData()
|
67 |
-
{
|
68 |
-
}
|
69 |
-
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/default/main.php
DELETED
@@ -1,443 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
This program is free software; you can redistribute it and/or
|
5 |
-
modify it under the terms of the GNU General Public License
|
6 |
-
as published by the Free Software Foundation; either version 2
|
7 |
-
of the License, or (at your option) any later version.
|
8 |
-
|
9 |
-
This program is distributed in the hope that it will be useful,
|
10 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
-
GNU General Public License for more details.
|
13 |
-
|
14 |
-
You should have received a copy of the GNU General Public License
|
15 |
-
along with this program; if not, write to the Free Software
|
16 |
-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
17 |
-
|
18 |
-
Copyright 2017 Buttonizer
|
19 |
-
*/
|
20 |
-
namespace Buttonizer;
|
21 |
-
|
22 |
-
# No script kiddies
|
23 |
-
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
24 |
-
class Button
|
25 |
-
{
|
26 |
-
// Saved settings
|
27 |
-
private $aButtons ;
|
28 |
-
private $aPageSettings ;
|
29 |
-
private $aSettings ;
|
30 |
-
private $aOpeningData ;
|
31 |
-
// Default settings
|
32 |
-
private $bIsMobile = false ;
|
33 |
-
private $bIsOpened = true ;
|
34 |
-
// Current page
|
35 |
-
private $sCurrentPageId = 0 ;
|
36 |
-
private $sCurrentPageUrl = '' ;
|
37 |
-
private $sCurrentPageTitle = '' ;
|
38 |
-
private $sCurrentPageDescription = '' ;
|
39 |
-
private $aAnimationSettings = array( 'default', 'circle', 'fade-left-to-right' ) ;
|
40 |
-
private $aAttentionAnimationSettings = array( 'none', 'hello', 'bounce' ) ;
|
41 |
-
// Output string
|
42 |
-
private $iAmountOfButtons = 0 ;
|
43 |
-
private $iAmountOfShareButtons = 0 ;
|
44 |
-
private $sOutput = '' ;
|
45 |
-
// Custom button color
|
46 |
-
private $sButtonCss = '' ;
|
47 |
-
public function __construct( $bIsMobile )
|
48 |
-
{
|
49 |
-
// Set some data
|
50 |
-
$this->bIsMobile = (bool) $bIsMobile;
|
51 |
-
add_action( 'wp_footer', function () {
|
52 |
-
// Setup
|
53 |
-
$this->setup();
|
54 |
-
// Share buttons
|
55 |
-
$this->share_btns();
|
56 |
-
// Generate
|
57 |
-
$this->generate();
|
58 |
-
// Output
|
59 |
-
$this->output();
|
60 |
-
} );
|
61 |
-
add_action( 'wp_print_styles', array( &$this, 'siteLoadStyles' ) );
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Buttonizer setup
|
66 |
-
*/
|
67 |
-
private function setup()
|
68 |
-
{
|
69 |
-
// Timezone
|
70 |
-
date_default_timezone_set( ( get_option( 'timezone_string' ) != '' ? get_option( 'timezone_string' ) : "Europe/Amsterdam" ) );
|
71 |
-
// Get options
|
72 |
-
$this->aButtons = (array) get_option( 'buttonizer_buttons' );
|
73 |
-
$this->aPageSettings = (array) get_option( 'buttonizer_page_categories' );
|
74 |
-
$this->aOpeningData = (array) get_option( 'buttonizer_opening_settings' );
|
75 |
-
$this->aSettings = (array) get_option( 'buttonizer_general_settings' );
|
76 |
-
// Current page data
|
77 |
-
$this->sCurrentPageId = get_the_ID();
|
78 |
-
$this->sCurrentPageUrl = urlencode( get_permalink() );
|
79 |
-
$this->sCurrentPageTitle = get_the_title();
|
80 |
-
$this->sCurrentPageDescription = str_replace( " ", "+", get_the_content( 'Read more' ) );
|
81 |
-
// Is store opened
|
82 |
-
$this->bIsOpened = $this->isOpened();
|
83 |
-
}
|
84 |
-
|
85 |
-
public function siteLoadStyles()
|
86 |
-
{
|
87 |
-
wp_enqueue_style( 'buttonizer', plugins_url( '/css/buttonizer.css?v=' . md5( BUTTONIZER_VERSION ), BUTTONIZER_PLUGIN_DIR ) );
|
88 |
-
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
|
89 |
-
}
|
90 |
-
|
91 |
-
// Generate
|
92 |
-
private function generate()
|
93 |
-
{
|
94 |
-
$aButtons = ( isset( $this->aButtons['buttonorder'] ) && is_array( $this->aButtons['buttonorder'] ) ? $this->aButtons['buttonorder'] : [] );
|
95 |
-
foreach ( $aButtons as $sKey => $iId ) {
|
96 |
-
if ( '-1' == $iId ) {
|
97 |
-
continue;
|
98 |
-
}
|
99 |
-
$sButton = $this->generateB( $iId );
|
100 |
-
|
101 |
-
if ( 'continue' == $sButton ) {
|
102 |
-
continue;
|
103 |
-
} else {
|
104 |
-
$this->sOutput = $sButton . $this->sOutput;
|
105 |
-
}
|
106 |
-
|
107 |
-
$this->iAmountOfButtons++;
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Button generator
|
113 |
-
*
|
114 |
-
* @param $bNmbr
|
115 |
-
* @return string
|
116 |
-
*/
|
117 |
-
private function generateB( $bNmbr )
|
118 |
-
{
|
119 |
-
// Check if this one must be showed when the company is open:
|
120 |
-
if ( isset( $this->aButtons['button_' . $bNmbr . '_show_when_opened'] ) && !$this->bIsOpened ) {
|
121 |
-
return 'continue';
|
122 |
-
}
|
123 |
-
// Check if this one must be showed when the company is open:
|
124 |
-
if ( isset( $this->aButtons['button_' . $bNmbr . '_show_not_when_opened'] ) && $this->bIsOpened ) {
|
125 |
-
return 'continue';
|
126 |
-
}
|
127 |
-
// Do we need to show the button?
|
128 |
-
|
129 |
-
if ( !isset( $this->aButtons['button_' . $bNmbr . '_show_on_phone'] ) && !isset( $this->aButtons['button_' . $bNmbr . '_show_on_desktop'] ) ) {
|
130 |
-
// Skipping because not showing on desktop AND phone
|
131 |
-
return 'continue';
|
132 |
-
} else {
|
133 |
-
// Is the button visble on mobile phones?:
|
134 |
-
if ( $this->bIsMobile && !isset( $this->aButtons['button_' . $bNmbr . '_show_on_phone'] ) ) {
|
135 |
-
// Skipping because this is a mobile
|
136 |
-
return 'continue';
|
137 |
-
}
|
138 |
-
// Is the button visible on desktop?:
|
139 |
-
if ( !$this->bIsMobile && !isset( $this->aButtons['button_' . $bNmbr . '_show_on_desktop'] ) ) {
|
140 |
-
// Skipping because this is desktop and it musn't get shown here
|
141 |
-
return 'continue';
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
/*
|
146 |
-
* Page categories selected or not
|
147 |
-
* Check on what pages the button must be shown
|
148 |
-
*/
|
149 |
-
$buttonShowOnPages = ( isset( $this->aButtons['button_' . $bNmbr . '_show_on_pages'] ) ? $this->aButtons['button_' . $bNmbr . '_show_on_pages'] : 'all' );
|
150 |
-
$buttonPagesData = ( isset( $this->aPageSettings['category_' . $buttonShowOnPages] ) ? $this->aPageSettings['category_' . $buttonShowOnPages] : 'all' );
|
151 |
-
$sCategoryType = ( isset( $this->aPageSettings['category_' . $buttonShowOnPages . '_type'] ) ? $this->aPageSettings['category_' . $buttonShowOnPages . '_type'] : 'include' );
|
152 |
-
if ( $buttonShowOnPages != 'all' && $buttonShowOnPages != -5 && $buttonPagesData != 'all' && ($sCategoryType == 'include' && !in_array( $this->sCurrentPageId, $buttonPagesData ) || $sCategoryType == 'exclude' && in_array( $this->sCurrentPageId, $buttonPagesData )) ) {
|
153 |
-
return 'continue';
|
154 |
-
}
|
155 |
-
/*
|
156 |
-
* All button info
|
157 |
-
*/
|
158 |
-
$buttonText = ( isset( $this->aButtons['button_' . $bNmbr . '_text'] ) ? $this->aButtons['button_' . $bNmbr . '_text'] : 'Button ' . $bNmbr );
|
159 |
-
$buttonTitle = ( isset( $this->aButtons['button_' . $bNmbr . '_title'] ) ? $this->aButtons['button_' . $bNmbr . '_title'] : 'Button ' . $bNmbr );
|
160 |
-
$buttonIsPhone = ( isset( $this->aButtons['button_' . $bNmbr . '_is_phonenumber'] ) ? $this->aButtons['button_' . $bNmbr . '_is_phonenumber'] : '' );
|
161 |
-
$linkNewTab = ( isset( $this->aButtons['button_' . $bNmbr . '_url_newtab'] ) ? 'target="_blank"' : '' );
|
162 |
-
$hideLabel = ( isset( $this->aButtons['button_' . $bNmbr . '_hide_label'] ) ? $this->aButtons['button_' . $bNmbr . '_hide_label'] : '' );
|
163 |
-
$sButtonAction = ( isset( $this->aButtons['button_' . $bNmbr . '_action'] ) ? $this->aButtons['button_' . $bNmbr . '_action'] : '' );
|
164 |
-
$sButtonActionLink = ( isset( $this->aButtons['button_' . $bNmbr . '_url'] ) ? $this->aButtons['button_' . $bNmbr . '_url'] : '' );
|
165 |
-
|
166 |
-
if ( 'phone' == $sButtonAction || $buttonIsPhone ) {
|
167 |
-
$sButtonActionLink = 'tel:' . str_replace( [
|
168 |
-
' ',
|
169 |
-
'+',
|
170 |
-
'?',
|
171 |
-
'#'
|
172 |
-
], '', $sButtonActionLink );
|
173 |
-
} else {
|
174 |
-
if ( 'mail' == $sButtonAction ) {
|
175 |
-
$sButtonActionLink = 'mailto:' . $sButtonActionLink;
|
176 |
-
}
|
177 |
-
}
|
178 |
-
|
179 |
-
// Has image
|
180 |
-
|
181 |
-
if ( !isset( $this->aButtons['button_' . $bNmbr . '_image'] ) || empty($this->aButtons['button_' . $bNmbr . '_image']) ) {
|
182 |
-
$sButtonIcon = '<i class="fa ' . (( isset( $this->aButtons['button_' . $bNmbr . '_icon'] ) ? $this->aButtons['button_' . $bNmbr . '_icon'] : 'plus' )) . '"></i>';
|
183 |
-
} else {
|
184 |
-
$sButtonIcon = '<img src="' . $this->aButtons['button_' . $bNmbr . '_image'] . '" style="width: ' . (( count( $this->aButtons ) > 1 ? '25px' : '32px' )) . '; vertical-align: middle;" />';
|
185 |
-
}
|
186 |
-
|
187 |
-
$sButtonClasses = 'is_extra bt_' . $this->iAmountOfButtons;
|
188 |
-
// Show label on hover
|
189 |
-
if ( isset( $this->aButtons['button_' . $bNmbr . '_show_label_on_hover'] ) && $this->aButtons['button_' . $bNmbr . '_show_label_on_hover'] == '1' ) {
|
190 |
-
$sButtonClasses .= ' show_on_hover';
|
191 |
-
}
|
192 |
-
// Custom classes
|
193 |
-
$sButtonClasses .= ' ' . $this->getCustomClass( $bNmbr );
|
194 |
-
// Custom colors?
|
195 |
-
if ( isset( $this->aButtons['button_' . $bNmbr . '_using_custom_colors'] ) && $this->aButtons['button_' . $bNmbr . '_using_custom_colors'] == '1' ) {
|
196 |
-
$this->sButtonCss .= '
|
197 |
-
.buttonizer-button .buttonizer_' . $bNmbr . ' {
|
198 |
-
background-color: ' . $this->aButtons['button_' . $bNmbr . '_colors_button'] . ';
|
199 |
-
}
|
200 |
-
|
201 |
-
.buttonizer-button .buttonizer_' . $bNmbr . ':hover,.buttonizer_' . $bNmbr . ':active {
|
202 |
-
background-color: ' . $this->aButtons['button_' . $bNmbr . '_colors_pushed'] . ';
|
203 |
-
}
|
204 |
-
|
205 |
-
.buttonizer-button .buttonizer_' . $bNmbr . ' i {
|
206 |
-
color: ' . $this->aButtons['button_' . $bNmbr . '_colors_icon'] . ';
|
207 |
-
} ';
|
208 |
-
}
|
209 |
-
return '<a href="' . $sButtonActionLink . '" class="' . $sButtonClasses . ' is_btzn_btn buttonizer_' . $bNmbr . '" ' . $linkNewTab . ' onclick="onButtonizerClickEvent(\'' . $buttonTitle . '\')">' . (( $buttonText != "" ? '<div class="text"' . (( $hideLabel == '1' ? 'style="display: none;"' : '' )) . '><div>' . $buttonText . '</div></div>' : '' )) . $sButtonIcon . '</a>';
|
210 |
-
// Thanks, end
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Show on timeout
|
215 |
-
*
|
216 |
-
* @return float|int|string
|
217 |
-
*/
|
218 |
-
private function showOnTimeout()
|
219 |
-
{
|
220 |
-
return '0';
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Show on scroll
|
225 |
-
*
|
226 |
-
* @return string|int
|
227 |
-
*/
|
228 |
-
private function showOnScroll()
|
229 |
-
{
|
230 |
-
return '0';
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* Exit intent
|
235 |
-
*
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
private function enableExitIntent()
|
239 |
-
{
|
240 |
-
return '0';
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Exit intent
|
245 |
-
*
|
246 |
-
* @return mixed|string
|
247 |
-
*/
|
248 |
-
private function enableExitIntentText()
|
249 |
-
{
|
250 |
-
return '';
|
251 |
-
}
|
252 |
-
|
253 |
-
/**
|
254 |
-
* Custom class
|
255 |
-
*
|
256 |
-
* @param $iButtonId
|
257 |
-
* @return string
|
258 |
-
*/
|
259 |
-
private function getCustomClass( $iButtonId )
|
260 |
-
{
|
261 |
-
return '';
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Is the store opened right now?
|
266 |
-
*
|
267 |
-
* @return bool
|
268 |
-
*/
|
269 |
-
private function isOpened()
|
270 |
-
{
|
271 |
-
$sDayOfWeek = $this->getDay( date( 'N' ) );
|
272 |
-
// Result
|
273 |
-
$bTodayOpened = ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] : '' );
|
274 |
-
// If result == 1 => Opened
|
275 |
-
|
276 |
-
if ( $bTodayOpened != "1" ) {
|
277 |
-
$bIsOpened = false;
|
278 |
-
} else {
|
279 |
-
// Get the time right now
|
280 |
-
$sCurentHour = date( "G" );
|
281 |
-
$sCurrentMinute = date( "i" );
|
282 |
-
// Get the opening and closing time from today.
|
283 |
-
$hourOpening = explode( ':', ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened_from'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened_from'] : '10:00' ) );
|
284 |
-
$hourClosing = explode( ':', ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_closing_on'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_closing_on'] : '17:00' ) );
|
285 |
-
// Check if the company is opened/closed
|
286 |
-
|
287 |
-
if ( $sCurentHour < $hourOpening[0] || $sCurentHour == $hourOpening[0] && $sCurrentMinute < $hourOpening[1] || $sCurentHour > $hourClosing[0] || $sCurentHour == $hourClosing[0] && $sCurrentMinute > $hourClosing[1] - 1 ) {
|
288 |
-
$bIsOpened = false;
|
289 |
-
} else {
|
290 |
-
$bIsOpened = true;
|
291 |
-
}
|
292 |
-
|
293 |
-
}
|
294 |
-
|
295 |
-
return $bIsOpened;
|
296 |
-
}
|
297 |
-
|
298 |
-
/**
|
299 |
-
* Day-number to text
|
300 |
-
*
|
301 |
-
* @param $sDay
|
302 |
-
* @return string
|
303 |
-
*/
|
304 |
-
private function getDay( $sDay )
|
305 |
-
{
|
306 |
-
switch ( $sDay ) {
|
307 |
-
case '1':
|
308 |
-
return 'monday';
|
309 |
-
break;
|
310 |
-
case '2':
|
311 |
-
return 'tuesday';
|
312 |
-
break;
|
313 |
-
case '3':
|
314 |
-
return 'wednesday';
|
315 |
-
break;
|
316 |
-
case '4':
|
317 |
-
return 'thursday';
|
318 |
-
break;
|
319 |
-
case '5':
|
320 |
-
return 'friday';
|
321 |
-
break;
|
322 |
-
case '6':
|
323 |
-
return 'saturday';
|
324 |
-
break;
|
325 |
-
case '7':
|
326 |
-
return 'sunday';
|
327 |
-
break;
|
328 |
-
default:
|
329 |
-
return 'sunday';
|
330 |
-
break;
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
/**
|
335 |
-
* Share buttons
|
336 |
-
*/
|
337 |
-
private function share_btns()
|
338 |
-
{
|
339 |
-
|
340 |
-
if ( isset( $this->aSettings["share_facebook"] ) && '1' == $this->aSettings["share_facebook"] ) {
|
341 |
-
$buttonText = ( isset( $this->aSettings['share_facebook_text'] ) && $this->aSettings['share_facebook_text'] != '' ? $this->aSettings['share_facebook_text'] : 'Share this on Facebok' );
|
342 |
-
$this->sOutput = '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Facebook share click\'); onButtonizerButtonFacebook();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != "" ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-facebook"></i></a>' . $this->sOutput;
|
343 |
-
$this->iAmountOfShareButtons++;
|
344 |
-
}
|
345 |
-
|
346 |
-
|
347 |
-
if ( isset( $this->aSettings["share_twitter"] ) && '1' == $this->aSettings["share_twitter"] ) {
|
348 |
-
$buttonText = ( isset( $this->aSettings['share_twitter_text'] ) && $this->aSettings['share_twitter_text'] != '' ? $this->aSettings['share_twitter_text'] : 'Share this on Twitter' );
|
349 |
-
$this->sOutput = '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Twitter share click\'); onButtonizerButtonTwitter();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != "" ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-twitter"></i></a>' . $this->sOutput;
|
350 |
-
$this->iAmountOfShareButtons++;
|
351 |
-
}
|
352 |
-
|
353 |
-
|
354 |
-
if ( isset( $this->aSettings["share_linkedin"] ) && '1' == $this->aSettings["share_linkedin"] ) {
|
355 |
-
$buttonText = ( isset( $this->aSettings['share_linkedin_text'] ) && $this->aSettings['share_linkedin_text'] != '' ? $this->aSettings['share_linkedin_text'] : 'Share this on LinkedIn' );
|
356 |
-
$this->sOutput = '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Linkedin share click\'); onButtonizerButtonLinkedin();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != "" ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-linkedin"></i></a>' . $this->sOutput;
|
357 |
-
$this->iAmountOfShareButtons++;
|
358 |
-
}
|
359 |
-
|
360 |
-
}
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Get the positioning of the buttons
|
364 |
-
* @param string $sPositioning
|
365 |
-
* @return string
|
366 |
-
*/
|
367 |
-
public function buttonPositioning( $sPositioning = '' )
|
368 |
-
{
|
369 |
-
$sPositioning .= (( isset( $this->aSettings['buttons_placing'] ) && $this->aSettings['buttons_placing'] == 'left' ? 'left' : 'right' )) . ': ' . (( isset( $this->aSettings['position_horizontal'] ) ? $this->aSettings['position_horizontal'] : (( isset( $this->aSettings['position_right'] ) ? $this->aSettings['position_right'] : '5' )) )) . '%;';
|
370 |
-
$sPositioning .= 'bottom: ' . (( isset( $this->aSettings['position_bottom'] ) ? $this->aSettings['position_bottom'] : '5' )) . '%;';
|
371 |
-
return $sPositioning;
|
372 |
-
}
|
373 |
-
|
374 |
-
/**
|
375 |
-
* Output of the button
|
376 |
-
*/
|
377 |
-
public function output()
|
378 |
-
{
|
379 |
-
$showAfterTimeout = $this->showOnTimeout();
|
380 |
-
$showOnScroll = $this->showOnScroll();
|
381 |
-
// Main button image or icon
|
382 |
-
$sImage = ( isset( $this->aSettings['custom_icon'] ) ? $this->aSettings['custom_icon'] : '' );
|
383 |
-
|
384 |
-
if ( $sImage != '' ) {
|
385 |
-
$sIcon = '<img src="' . $sImage . '" style="width: 32px; vertical-align: middle;" />';
|
386 |
-
} else {
|
387 |
-
$sIcon = ( !empty($this->aSettings['icon_icon']) && $this->aSettings['icon_icon'] != '+' ? '<i class="isicon-fa fa ' . $this->aSettings['icon_icon'] . '"></i>' : '<i>+</i>' );
|
388 |
-
}
|
389 |
-
|
390 |
-
|
391 |
-
if ( $this->iAmountOfButtons == 1 && $this->iAmountOfShareButtons == 0 ) {
|
392 |
-
$output = str_replace( "is_extra bt_0", "buttonizer_head onlyone", $this->sOutput );
|
393 |
-
} else {
|
394 |
-
|
395 |
-
if ( $this->iAmountOfButtons > 1 || $this->iAmountOfShareButtons > 0 ) {
|
396 |
-
$output = '<a href="javascript:void(0)" class="buttonizer_head" onclick="onButtonizerClickEvent(\'Open/Close Buttonizer button\')">' . (( !empty($this->aSettings['icon_label']) ? '<div class="text noremove"><div>' . $this->aSettings['icon_label'] . '</div></div>' : '' )) . $sIcon . '</a>' . $this->sOutput;
|
397 |
-
} else {
|
398 |
-
$output = '';
|
399 |
-
}
|
400 |
-
|
401 |
-
}
|
402 |
-
|
403 |
-
// Google analytics toevoegen
|
404 |
-
if ( isset( $this->aSettings['google_analytics'] ) && $this->aSettings['google_analytics'] != "" ) {
|
405 |
-
$output .= "<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', '" . $this->aSettings['google_analytics'] . "', 'auto');</script>";
|
406 |
-
}
|
407 |
-
|
408 |
-
if ( isset( $this->aSettings['buttons_animation'] ) && in_array( $this->aSettings['buttons_animation'], $this->aAnimationSettings ) ) {
|
409 |
-
$sButtonAnimation = $this->aSettings['buttons_animation'];
|
410 |
-
} else {
|
411 |
-
$sButtonAnimation = 'default';
|
412 |
-
}
|
413 |
-
|
414 |
-
|
415 |
-
if ( isset( $this->aSettings['attention_animation'] ) && in_array( $this->aSettings['attention_animation'], $this->aAttentionAnimationSettings ) ) {
|
416 |
-
$sAttentionAnimation = $this->aSettings['attention_animation'];
|
417 |
-
} else {
|
418 |
-
$sAttentionAnimation = 'default';
|
419 |
-
}
|
420 |
-
|
421 |
-
list( $sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue ) = sscanf( $this->aSettings['button_unpushed'], "#%02x%02x%02x" );
|
422 |
-
echo '<style>.buttonizer-button a:hover, .buttonizer-button a:focus{ background:' . $this->aSettings['button_pushed'] . '; } .buttonizer-button a { background:' . $this->aSettings['button_unpushed'] . '; } .buttonizer-button a i { color: ' . $this->aSettings['icon_color'] . '; } ' . $this->sButtonCss . '</style>
|
423 |
-
<div class="buttonizer-button ' . (( $showOnScroll > 0 || $showAfterTimeout > 0 ? 'hide' : '' )) . ' ' . (( isset( $this->aSettings['buttons_label_show_on_hover'] ) && $this->aSettings['buttons_label_show_on_hover'] == '1' ? ' show_labels_on_hover' : '' )) . '"
|
424 |
-
button-animation="' . $sButtonAnimation . '"
|
425 |
-
attention-animation="' . $sAttentionAnimation . '"
|
426 |
-
label-style="' . (( isset( $this->aSettings['buttons_label_placing'] ) ? $this->aSettings['buttons_label_placing'] : 'default' )) . '"
|
427 |
-
style="' . $this->buttonPositioning() . '"
|
428 |
-
id="buttonizer-button"><div class="buttonizer_inner" id="buttonizer-sys">' . $output . '</div></div>' ;
|
429 |
-
echo '
|
430 |
-
<script defer type="text/javascript" src="' . plugins_url( '/js/buttonizer.js?v=' . md5( BUTTONIZER_VERSION ), BUTTONIZER_PLUGIN_DIR ) . '"></script>
|
431 |
-
<script type="text/javascript">
|
432 |
-
document.addEventListener(\'DOMContentLoaded\', function(){
|
433 |
-
buttonizer.init({
|
434 |
-
scrollBarTop: ' . $showOnScroll . ',
|
435 |
-
showAfter: ' . $showAfterTimeout . ',
|
436 |
-
' . (( ButtonizerLicense()->is__premium_only() ? 'exitIntent: ' . $this->enableExitIntent() . ',' : '' )) . '
|
437 |
-
' . (( ButtonizerLicense()->is__premium_only() ? 'exitIntentText: "' . $this->enableExitIntentText() . '",' : '' )) . '
|
438 |
-
});
|
439 |
-
});
|
440 |
-
</script>' ;
|
441 |
-
}
|
442 |
-
|
443 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/default/maintain.php
DELETED
@@ -1,156 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
This program is free software; you can redistribute it and/or
|
4 |
-
modify it under the terms of the GNU General Public License
|
5 |
-
as published by the Free Software Foundation; either version 2
|
6 |
-
of the License, or (at your option) any later version.
|
7 |
-
|
8 |
-
This program is distributed in the hope that it will be useful,
|
9 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11 |
-
GNU General Public License for more details.
|
12 |
-
|
13 |
-
You should have received a copy of the GNU General Public License
|
14 |
-
along with this program; if not, write to the Free Software
|
15 |
-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
16 |
-
|
17 |
-
Copyright 2017 Buttonizer
|
18 |
-
*/
|
19 |
-
namespace Buttonizer;
|
20 |
-
|
21 |
-
# No script kiddies
|
22 |
-
defined( 'ABSPATH' ) or die('No script kiddies please!');
|
23 |
-
|
24 |
-
class Maintain {
|
25 |
-
|
26 |
-
// Construct
|
27 |
-
public function __construct($sReady = false) {
|
28 |
-
if(!$sReady) return;
|
29 |
-
|
30 |
-
if (!session_id())
|
31 |
-
session_start();
|
32 |
-
|
33 |
-
register_activation_hook('buttonizer', array(&$this, 'pluginActivate'));
|
34 |
-
register_deactivation_hook('buttonizer', array(&$this, 'pluginDeactivate'));
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Activate Buttonizer, AWESOMAAH!
|
39 |
-
*/
|
40 |
-
public function pluginActivate() {
|
41 |
-
/*
|
42 |
-
* General settings
|
43 |
-
*/
|
44 |
-
$aGeneralSettings = get_option('buttonizer_general_settings');
|
45 |
-
|
46 |
-
// Check stored old data
|
47 |
-
if($aGeneralSettings == ''){
|
48 |
-
$aGeneralSettings = array(
|
49 |
-
'button_unpushed' => '#48A4DC',
|
50 |
-
'button_pushed' => '#1D9BDB',
|
51 |
-
'icon_color' => '#FFFFFF',
|
52 |
-
'icon_icon' => 'fa-plus',
|
53 |
-
'position_right' => '5',
|
54 |
-
'position_bottom' => '5',
|
55 |
-
'google_analytics' => ''
|
56 |
-
);
|
57 |
-
|
58 |
-
// Update and save general default settings
|
59 |
-
update_option('buttonizer_general_settings', $aGeneralSettings);
|
60 |
-
}
|
61 |
-
|
62 |
-
/*
|
63 |
-
* Add default buttons
|
64 |
-
*/
|
65 |
-
$aButtonizerDefaultButtons = get_option('buttonizer_buttons');
|
66 |
-
|
67 |
-
// Check stored old data
|
68 |
-
if($aButtonizerDefaultButtons == ''){
|
69 |
-
$aButtonizerDefaultButtons = [];
|
70 |
-
|
71 |
-
// Update and save general default settings
|
72 |
-
update_option('buttonizer_buttons', $aButtonizerDefaultButtons);
|
73 |
-
}
|
74 |
-
|
75 |
-
/*
|
76 |
-
* Opening settings
|
77 |
-
*/
|
78 |
-
$aDefaultOpeningSettings = get_option('buttonizer_opening_settings');
|
79 |
-
|
80 |
-
// Do we have old opening data?
|
81 |
-
if($aDefaultOpeningSettings == '') {
|
82 |
-
$aDefaultOpeningSettings =
|
83 |
-
array(
|
84 |
-
// Monday
|
85 |
-
'monday_opened_from' => '10:00',
|
86 |
-
'monday_closing_on' => '17:00',
|
87 |
-
'monday_opened' => false,
|
88 |
-
|
89 |
-
// Tuesday
|
90 |
-
'tuesday_opened_from' => '10:00',
|
91 |
-
'tuesday_closing_on' => '17:00',
|
92 |
-
'tuesday_opened' => false,
|
93 |
-
|
94 |
-
// Wednesday
|
95 |
-
'wednesday_opened_from' => '10:00',
|
96 |
-
'wednesday_closing_on' => '17:00',
|
97 |
-
'wednesday_opened' => false,
|
98 |
-
|
99 |
-
// Thursday
|
100 |
-
'thursday_opened_from' => '10:00',
|
101 |
-
'thursday_closing_on' => '17:00',
|
102 |
-
'thursday_opened' => false,
|
103 |
-
|
104 |
-
// Friday
|
105 |
-
'friday_opened_from' => '10:00',
|
106 |
-
'friday_closing_on' => '17:00',
|
107 |
-
'friday_opened' => false,
|
108 |
-
|
109 |
-
// Saturday
|
110 |
-
'saturday_opened_from' => '10:00',
|
111 |
-
'saturday_closing_on' => '17:00',
|
112 |
-
'saturday_opened' => true,
|
113 |
-
|
114 |
-
// Sunday
|
115 |
-
'sunday_opened_from' => '10:00',
|
116 |
-
'sunday_closing_on' => '17:00',
|
117 |
-
'sunday_opened' => true,
|
118 |
-
);
|
119 |
-
|
120 |
-
// Update and save default opening settings
|
121 |
-
update_option('buttonizer_opening_settings', $aDefaultOpeningSettings);
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Deactivate plugin, SEE YOU SOON!
|
127 |
-
*/
|
128 |
-
public function pluginDeactivate(){
|
129 |
-
// Nothing to handle right now. Maybe later
|
130 |
-
}
|
131 |
-
|
132 |
-
/*
|
133 |
-
* Mobile or desktop check
|
134 |
-
*/
|
135 |
-
public function isMobile() {
|
136 |
-
if (
|
137 |
-
isset($_SERVER['HTTP_USER_AGENT']) &&
|
138 |
-
(
|
139 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false ||
|
140 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false ||
|
141 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false ||
|
142 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false ||
|
143 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false ||
|
144 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ||
|
145 |
-
strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mobi') !== false
|
146 |
-
)
|
147 |
-
)
|
148 |
-
{
|
149 |
-
// Is mobile
|
150 |
-
return true;
|
151 |
-
} else {
|
152 |
-
// Is desktop
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
freemius/.gitignore
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
output/
|
2 |
-
assets/img/icon.*
|
3 |
-
|
4 |
-
pootle-page-builder.png
|
5 |
-
rating-widget.jpg
|
6 |
-
hello-dolly-pro.png
|
7 |
-
woocommerce-fiscalita-italiana.png
|
8 |
-
assets/img/content-aware-sidebars.png
|
9 |
-
assets/img/custom-post-type-ui.png
|
10 |
-
.idea
|
11 |
-
nextgen-gallery.png
|
12 |
-
node_modules
|
13 |
-
languages/_freemius-en.mo
|
14 |
-
languages/_freemius-en.po
|
15 |
-
foobox-image-lightbox.png
|
16 |
-
transifex-config.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
freemius/LICENSE.txt
CHANGED
@@ -1,281 +1,622 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version
|
3 |
|
4 |
-
Copyright (C)
|
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
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
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 |
-
|
25 |
-
|
26 |
-
|
27 |
|
28 |
-
To protect your rights, we need to
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must
|
35 |
-
you
|
36 |
-
source code. And you must show them these terms so they
|
37 |
-
rights.
|
38 |
-
|
39 |
-
|
40 |
-
(
|
41 |
-
distribute and/or modify
|
42 |
-
|
43 |
-
|
44 |
-
that
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
The precise terms and conditions for copying, distribution and
|
57 |
modification follow.
|
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 |
this License.
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
any
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
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
|
243 |
-
specifies a version
|
244 |
-
later version", you have the
|
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 |
END OF TERMS AND CONDITIONS
|
281 |
|
@@ -287,15 +628,15 @@ 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 |
-
|
291 |
the "copyright" line and a pointer to where the full notice is found.
|
292 |
|
293 |
-
{
|
294 |
-
Copyright (C) {year} {
|
295 |
|
296 |
-
This program is free software
|
297 |
it under the terms of the GNU General Public License as published by
|
298 |
-
the Free Software Foundation
|
299 |
(at your option) any later version.
|
300 |
|
301 |
This program is distributed in the hope that it will be useful,
|
@@ -303,38 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
|
|
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
|
307 |
-
with this program
|
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
|
313 |
-
when it starts in an interactive mode:
|
314 |
|
315 |
-
|
316 |
-
|
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,
|
322 |
-
be
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
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 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 |
|
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,
|
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/README.md
DELETED
@@ -1,253 +0,0 @@
|
|
1 |
-
Freemius WordPress SDK
|
2 |
-
======================
|
3 |
-
|
4 |
-
[Monetization](https://freemius.com/wordpress/), [analytics](https://freemius.com/wordpress/insights/), and marketing automation platform for plugin & theme developers. Freemius empower developers to create prosperous subscription based businesses.
|
5 |
-
|
6 |
-
You can see some of the WordPress.org plugins & themes that are utilizing the power of Freemius here:
|
7 |
-
|
8 |
-
https://includewp.com/freemius/#focus
|
9 |
-
|
10 |
-
If you are a WordPress plugin or theme developer and you are interested to monetize with Freemius you can [sign-up here for free](https://dashboard.freemius.com/register/):
|
11 |
-
|
12 |
-
https://dashboard.freemius.com/register/
|
13 |
-
|
14 |
-
**Below you'll find the integration instructions for our WordPress SDK.**
|
15 |
-
|
16 |
-
## Code Documentation
|
17 |
-
|
18 |
-
You can find the SDK's PHP-Doc documentation here:
|
19 |
-
https://codedoc.pub/freemius/wordpress-sdk/master/
|
20 |
-
|
21 |
-
## Initializing the SDK
|
22 |
-
|
23 |
-
Copy the code below and paste it into the top of your main plugin's PHP file, right after the plugin's header comment:
|
24 |
-
|
25 |
-
```php
|
26 |
-
<?php
|
27 |
-
// Create a helper function for easy SDK access.
|
28 |
-
function my_prefix_fs() {
|
29 |
-
global $my_prefix_fs;
|
30 |
-
if ( ! isset( $my_prefix_fs ) ) {
|
31 |
-
// Include Freemius SDK.
|
32 |
-
require_once dirname(__FILE__) . '/freemius/start.php';
|
33 |
-
|
34 |
-
$my_prefix_fs = fs_dynamic_init( array(
|
35 |
-
'id' => '1234',
|
36 |
-
'slug' => 'my-plugin-slug',
|
37 |
-
'menu_slug' => 'my_menu_slug', // You can also use __FILE__
|
38 |
-
'public_key' => 'pk_MY_PUBLIC_KEY',
|
39 |
-
'is_live' => true,
|
40 |
-
'is_premium' => true,
|
41 |
-
'has_addons' => false,
|
42 |
-
'has_paid_plans' => false,
|
43 |
-
// Set the SDK to work in a sandbox mode (for development & testing).
|
44 |
-
// IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
|
45 |
-
'secret_key' => 'sk_MY_SECRET_KEY',
|
46 |
-
) );
|
47 |
-
}
|
48 |
-
|
49 |
-
return $my_prefix_fs;
|
50 |
-
}
|
51 |
-
|
52 |
-
// Init Freemius.
|
53 |
-
my_prefix_fs();
|
54 |
-
?>
|
55 |
-
```
|
56 |
-
|
57 |
-
- **1234** - Replace with your plugin's ID.
|
58 |
-
- **pk_MY_PUBLIC_KEY** - Replace with your plugin's public key.
|
59 |
-
- **sk_MY_SECRET_KEY** - Replace with your plugin's secret key.
|
60 |
-
- **my-plugin-slug** - Replace with your plugin's WordPress.org slug.
|
61 |
-
- **my_menu_slug** - Replace with your admin dashboard settings menu slug.
|
62 |
-
|
63 |
-
|
64 |
-
## Usage example
|
65 |
-
|
66 |
-
You can call the SDK by using the shortcode function:
|
67 |
-
|
68 |
-
```php
|
69 |
-
<?php my_prefix_fs()->get_upgrade_url(); ?>
|
70 |
-
```
|
71 |
-
|
72 |
-
Or when calling Freemius multiple times in a scope, it's recommended to use it with the global variable:
|
73 |
-
|
74 |
-
```php
|
75 |
-
<?php
|
76 |
-
global $my_prefix_fs;
|
77 |
-
$my_prefix_fs->get_account_url();
|
78 |
-
?>
|
79 |
-
```
|
80 |
-
|
81 |
-
## Adding license based logic examples
|
82 |
-
|
83 |
-
Add marketing content to encourage your users to upgrade for your paid version:
|
84 |
-
|
85 |
-
```php
|
86 |
-
<?php
|
87 |
-
if ( my_prefix_fs()->is_not_paying() ) {
|
88 |
-
echo '<section><h1>' . esc_html__('Awesome Premium Features', 'my-plugin-slug') . '</h1>';
|
89 |
-
echo '<a href="' . my_prefix_fs()->get_upgrade_url() . '">' .
|
90 |
-
esc_html__('Upgrade Now!', 'my-plugin-slug') .
|
91 |
-
'</a>';
|
92 |
-
echo '</section>';
|
93 |
-
}
|
94 |
-
?>
|
95 |
-
```
|
96 |
-
|
97 |
-
Add logic which will only be available in your premium plugin version:
|
98 |
-
|
99 |
-
```php
|
100 |
-
<?php
|
101 |
-
// This "if" block will be auto removed from the Free version.
|
102 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
103 |
-
|
104 |
-
// ... premium only logic ...
|
105 |
-
|
106 |
-
}
|
107 |
-
?>
|
108 |
-
```
|
109 |
-
|
110 |
-
To add a function which will only be available in your premium plugin version, simply add __premium_only as the suffix of the function name. Just make sure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:
|
111 |
-
|
112 |
-
```php
|
113 |
-
<?php
|
114 |
-
class My_Plugin {
|
115 |
-
function init() {
|
116 |
-
...
|
117 |
-
|
118 |
-
// This "if" block will be auto removed from the free version.
|
119 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
120 |
-
// Init premium version.
|
121 |
-
$this->admin_init__premium_only();
|
122 |
-
|
123 |
-
add_action( 'admin_init', array( &$this, 'admin_init_hook__premium_only' );
|
124 |
-
}
|
125 |
-
|
126 |
-
...
|
127 |
-
}
|
128 |
-
|
129 |
-
// This method will be only included in the premium version.
|
130 |
-
function admin_init__premium_only() {
|
131 |
-
...
|
132 |
-
}
|
133 |
-
|
134 |
-
// This method will be only included in the premium version.
|
135 |
-
function admin_init_hook__premium_only() {
|
136 |
-
...
|
137 |
-
}
|
138 |
-
}
|
139 |
-
?>
|
140 |
-
```
|
141 |
-
|
142 |
-
Add logic which will only be executed for customers in your 'professional' plan:
|
143 |
-
|
144 |
-
```php
|
145 |
-
<?php
|
146 |
-
if ( my_prefix_fs()->is_plan('professional', true) ) {
|
147 |
-
// .. logic related to Professional plan only ...
|
148 |
-
}
|
149 |
-
?>
|
150 |
-
```
|
151 |
-
|
152 |
-
Add logic which will only be executed for customers in your 'professional' plan or higher plans:
|
153 |
-
|
154 |
-
```php
|
155 |
-
<?php
|
156 |
-
if ( my_prefix_fs()->is_plan('professional') ) {
|
157 |
-
// ... logic related to Professional plan and higher plans ...
|
158 |
-
}
|
159 |
-
?>
|
160 |
-
```
|
161 |
-
|
162 |
-
Add logic which will only be available in your premium plugin version AND will only be executed for customers in your 'professional' plan (and higher plans):
|
163 |
-
|
164 |
-
```php
|
165 |
-
<?php
|
166 |
-
// This "if" block will be auto removed from the Free version.
|
167 |
-
if ( my_prefix_fs()->is_plan__premium_only('professional') ) {
|
168 |
-
// ... logic related to Professional plan and higher plans ...
|
169 |
-
}
|
170 |
-
?>
|
171 |
-
```
|
172 |
-
|
173 |
-
Add logic only for users in trial:
|
174 |
-
|
175 |
-
```php
|
176 |
-
<?php
|
177 |
-
if ( my_prefix_fs()->is_trial() ) {
|
178 |
-
// ... logic for users in trial ...
|
179 |
-
}
|
180 |
-
?>
|
181 |
-
```
|
182 |
-
|
183 |
-
Add logic for specified paid plan:
|
184 |
-
|
185 |
-
```php
|
186 |
-
<?php
|
187 |
-
// This "if" block will be auto removed from the Free version.
|
188 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
189 |
-
if ( my_prefix_fs()->is_plan( 'professional', true ) ) {
|
190 |
-
|
191 |
-
// ... logic related to Professional plan only ...
|
192 |
-
|
193 |
-
} else if ( my_prefix_fs()->is_plan( 'business' ) ) {
|
194 |
-
|
195 |
-
// ... logic related to Business plan and higher plans ...
|
196 |
-
|
197 |
-
}
|
198 |
-
}
|
199 |
-
?>
|
200 |
-
```
|
201 |
-
|
202 |
-
## Excluding files and folders from the free plugin version
|
203 |
-
There are two ways to exclude files from your free version.
|
204 |
-
|
205 |
-
1. Add `__premium_only` just before the file extension. For example, functions__premium_only.php will be only included in the premium plugin version. This works for all type of files, not only PHP.
|
206 |
-
2. Add `@fs_premium_only` a sepcial meta tag to the plugin's main PHP file header. Example:
|
207 |
-
```php
|
208 |
-
<?php
|
209 |
-
/**
|
210 |
-
* Plugin Name: My Very Awesome Plugin
|
211 |
-
* Plugin URI: http://my-awesome-plugin.com
|
212 |
-
* Description: Create and manage Awesomeness right in WordPress.
|
213 |
-
* Version: 1.0.0
|
214 |
-
* Author: Awesomattic
|
215 |
-
* Author URI: http://my-awesome-plugin.com/me/
|
216 |
-
* License: GPLv2
|
217 |
-
* Text Domain: myplugin
|
218 |
-
* Domain Path: /langs
|
219 |
-
*
|
220 |
-
* @fs_premium_only /lib/functions.php, /premium-files/
|
221 |
-
*/
|
222 |
-
|
223 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
224 |
-
exit;
|
225 |
-
}
|
226 |
-
|
227 |
-
// ... my code ...
|
228 |
-
?>
|
229 |
-
```
|
230 |
-
The file `/lib/functions.php` and the directory `/premium-files/` will be removed from the free plugin version.
|
231 |
-
|
232 |
-
# WordPress.org Compliance
|
233 |
-
Based on [WordPress.org Guidelines](https://wordpress.org/plugins/about/guidelines/) you are not allowed to submit a plugin that has premium code in it:
|
234 |
-
> All code hosted by WordPress.org servers must be free and fully-functional. If you want to sell advanced features for a plugin (such as a "pro" version), then you must sell and serve that code from your own site, we will not host it on our servers.
|
235 |
-
|
236 |
-
Therefore, if you want to deploy your free plugin's version to WordPress.org, make sure you wrap all your premium code with `if ( my_prefix_fs()->{{ method }}__premium_only() )` or the other methods provided to exclude premium features & files from the free version.
|
237 |
-
|
238 |
-
## Deployment
|
239 |
-
Zip your plugin's root folder and upload it in the Deployment section in the *Freemius Developer's Dashboard*.
|
240 |
-
The plugin will be scanned and processed by a custom developed *PHP Processor* which will auto-generate two versions of your plugin:
|
241 |
-
|
242 |
-
1. **Premium version**: Identical to your uploaded version, including all code (except your `secret_key`). Will be enabled for download ONLY for your paying or in trial customers.
|
243 |
-
2. **Free version**: The code stripped from all your paid features (based on the logic added wrapped in `{ method }__premium_only()`).
|
244 |
-
|
245 |
-
The free version is the one that you should give your users to download. Therefore, download the free generated version and upload to your site. Or, if your plugin was WordPress.org complaint and you made sure to exclude all your premium code with the different provided techniques, you can deploy the downloaded free version to the .org repo.
|
246 |
-
|
247 |
-
## Reporting Bugs
|
248 |
-
Email dev [at] freemius [dot] com
|
249 |
-
|
250 |
-
## FAQ
|
251 |
-
|
252 |
-
## Copyright
|
253 |
-
Freemius, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 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
ADDED
@@ -0,0 +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}
|
freemius/assets/css/admin/common.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
#iframe{line-height:0;font-size:0}.fs-full-size-wrapper{margin:
|
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}.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;box-shadow:
|
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}.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/common.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.fs-notice.success{color:green;font-weight:700}
|
|
freemius/assets/css/customizer.css
ADDED
@@ -0,0 +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}
|
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/buttonizer-floating-action-button.png
DELETED
Binary file
|
freemius/assets/img/buttonizer.png
DELETED
Binary file
|
freemius/assets/img/icon.png
DELETED
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/img/plugin-icon.png
ADDED
Binary file
|
freemius/assets/img/theme-icon.png
ADDED
Binary file
|
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/scss/_mixins.scss
CHANGED
@@ -1,283 +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 |
-
|
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 |
-
animation: #{$str};
|
201 |
-
}
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
-
|
208 |
-
animation-
|
209 |
-
}
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
animation-
|
217 |
-
}
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
-
|
224 |
-
animation-
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
-webkit-animation-
|
232 |
-
-moz-animation-
|
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 |
-
clear: both;
|
271 |
-
}
|
272 |
-
}
|
273 |
-
|
274 |
-
// Placeholder text
|
275 |
-
@mixin placeholder($color: $input-color-placeholder) {
|
276 |
-
// Firefox
|
277 |
-
&::-moz-placeholder {
|
278 |
-
color: $color;
|
279 |
-
opacity: 1; // Override Firefox's unusual Utils opacity; see https://github.com/twbs/bootstrap/pull/11526
|
280 |
-
}
|
281 |
-
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
282 |
-
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
283 |
}
|
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
ADDED
@@ -0,0 +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 |
+
}
|
freemius/assets/scss/admin/account.scss
CHANGED
@@ -15,6 +15,12 @@
|
|
15 |
margin: 0 0 12px 0;
|
16 |
line-height: 1.4;
|
17 |
border-bottom: 1px solid #F1F1F1;
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
i.dashicons
|
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
|
freemius/assets/scss/admin/affiliation.scss
ADDED
@@ -0,0 +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 |
+
}
|
freemius/assets/scss/admin/common.scss
CHANGED
@@ -1,173 +1,218 @@
|
|
1 |
-
@import "../start";
|
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 |
}
|
1 |
+
@import "../start";
|
2 |
+
@import "themes";
|
3 |
+
|
4 |
+
#iframe
|
5 |
+
{
|
6 |
+
line-height: 0;
|
7 |
+
font-size: 0;
|
8 |
+
}
|
9 |
+
|
10 |
+
.fs-full-size-wrapper
|
11 |
+
{
|
12 |
+
margin: 40px 0 -65px -20px;
|
13 |
+
|
14 |
+
@media (max-width: 600px) {
|
15 |
+
margin: 0 0 -65px -10px;
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
.fs-notice
|
20 |
+
{
|
21 |
+
position: relative;
|
22 |
+
|
23 |
+
&.fs-has-title
|
24 |
+
{
|
25 |
+
margin-bottom: 30px !important;
|
26 |
+
}
|
27 |
+
|
28 |
+
&.success
|
29 |
+
{
|
30 |
+
color: green;
|
31 |
+
// font-weight: normal;
|
32 |
+
}
|
33 |
+
|
34 |
+
&.promotion
|
35 |
+
{
|
36 |
+
border-color: $fs-notice-promotion-border-color !important;
|
37 |
+
background-color: $fs-notice-promotion-bkg !important;
|
38 |
+
}
|
39 |
+
|
40 |
+
.fs-notice-body
|
41 |
+
{
|
42 |
+
margin: .5em 0;
|
43 |
+
padding: 2px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.fs-close
|
47 |
+
{
|
48 |
+
// position: absolute;
|
49 |
+
// top: 2px;
|
50 |
+
// bottom: 2px;
|
51 |
+
// right: 2px;
|
52 |
+
// min-width: 100px;
|
53 |
+
// text-align: center;
|
54 |
+
// padding-right: 2px;
|
55 |
+
cursor: pointer;
|
56 |
+
color: #aaa;
|
57 |
+
float: right;
|
58 |
+
|
59 |
+
&:hover
|
60 |
+
{
|
61 |
+
color: #666;
|
62 |
+
// background: #A9A9A9;
|
63 |
+
}
|
64 |
+
|
65 |
+
> *
|
66 |
+
{
|
67 |
+
margin-top: 7px;
|
68 |
+
display: inline-block;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
label.fs-plugin-title
|
73 |
+
{
|
74 |
+
background: rgba(0, 0, 0, 0.3);
|
75 |
+
color: #fff;
|
76 |
+
padding: 2px 10px;
|
77 |
+
position: absolute;
|
78 |
+
top: 100%;
|
79 |
+
bottom: auto;
|
80 |
+
right: auto;
|
81 |
+
@include border-radius(0 0 3px 3px);
|
82 |
+
left: 10px;
|
83 |
+
font-size: 12px;
|
84 |
+
font-weight: bold;
|
85 |
+
cursor: auto;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
div.fs-notice
|
90 |
+
{
|
91 |
+
&.updated,
|
92 |
+
&.success,
|
93 |
+
&.promotion
|
94 |
+
{
|
95 |
+
display: block !important;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
.rtl .fs-notice
|
100 |
+
{
|
101 |
+
.fs-close
|
102 |
+
{
|
103 |
+
// left: 2px;
|
104 |
+
// right: auto;
|
105 |
+
// padding-right: 0;
|
106 |
+
// padding-left: 2px;
|
107 |
+
float: left;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
.fs-secure-notice
|
112 |
+
{
|
113 |
+
position: fixed;
|
114 |
+
top: 32px;
|
115 |
+
left: 160px;
|
116 |
+
right: 0;
|
117 |
+
background: rgb(235, 253, 235);
|
118 |
+
padding: 10px 20px;
|
119 |
+
color: green;
|
120 |
+
z-index: 9999;
|
121 |
+
@include box-shadow(0 2px 2px rgba(6, 113, 6, 0.3));
|
122 |
+
@include opacity(0.95);
|
123 |
+
|
124 |
+
&:hover
|
125 |
+
{
|
126 |
+
@include opacity(1);
|
127 |
+
}
|
128 |
+
|
129 |
+
a.fs-security-proof
|
130 |
+
{
|
131 |
+
color: green;
|
132 |
+
text-decoration: none;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
@media screen and (max-width: 960px) {
|
137 |
+
.fs-secure-notice
|
138 |
+
{
|
139 |
+
left: 36px;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
@media screen and (max-width: 600px) {
|
144 |
+
.fs-secure-notice
|
145 |
+
{
|
146 |
+
display: none;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
@media screen and (max-width: 500px) {
|
151 |
+
#fs_promo_tab
|
152 |
+
{
|
153 |
+
display: none;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
@media screen and (max-width: 782px) {
|
158 |
+
.fs-secure-notice
|
159 |
+
{
|
160 |
+
left: 0;
|
161 |
+
top: 46px;
|
162 |
+
text-align: center;
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
span.fs-submenu-item.fs-sub:before
|
167 |
+
{
|
168 |
+
// Add small arrow.
|
169 |
+
content: '\21B3';
|
170 |
+
padding: 0 5px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.rtl
|
174 |
+
{
|
175 |
+
span.fs-submenu-item.fs-sub:before
|
176 |
+
{
|
177 |
+
// Add small RTL arrow.
|
178 |
+
content: '\21B2';
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
.fs-submenu-item
|
183 |
+
{
|
184 |
+
&.pricing
|
185 |
+
{
|
186 |
+
&.upgrade-mode
|
187 |
+
{
|
188 |
+
color: greenyellow;
|
189 |
+
}
|
190 |
+
|
191 |
+
&.trial-mode
|
192 |
+
{
|
193 |
+
color: #83e2ff;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
#adminmenu .update-plugins.fs-trial
|
199 |
+
{
|
200 |
+
background-color: #00b9eb;
|
201 |
+
}
|
202 |
+
.fs-ajax-spinner
|
203 |
+
{
|
204 |
+
border: 0;
|
205 |
+
width: 20px;
|
206 |
+
height: 20px;
|
207 |
+
margin-right: 5px;
|
208 |
+
vertical-align: sub;
|
209 |
+
display: inline-block;
|
210 |
+
background: url('../../../../../../../wp-admin/images/wpspin_light-2x.gif');
|
211 |
+
background-size: contain;
|
212 |
+
}
|
213 |
+
|
214 |
+
.wrap.fs-section {
|
215 |
+
h2 {
|
216 |
+
text-align: left;
|
217 |
+
}
|
218 |
}
|
freemius/assets/scss/admin/connect.scss
CHANGED
@@ -405,6 +405,55 @@ $form_width: 480px;
|
|
405 |
}
|
406 |
}
|
407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
.wp-pointer-content
|
409 |
{
|
410 |
#fs_connect
|
405 |
}
|
406 |
}
|
407 |
|
408 |
+
#fs_theme_connect_wrapper {
|
409 |
+
position: fixed;
|
410 |
+
top: 0;
|
411 |
+
height: 100%;
|
412 |
+
width: 100%;
|
413 |
+
z-index: 99990;
|
414 |
+
background: rgba(0, 0, 0, 0.75);
|
415 |
+
text-align: center;
|
416 |
+
overflow-y: auto;
|
417 |
+
|
418 |
+
&:before {
|
419 |
+
content: "";
|
420 |
+
display: inline-block;
|
421 |
+
vertical-align: middle;
|
422 |
+
height: 100%;
|
423 |
+
}
|
424 |
+
|
425 |
+
> button.close {
|
426 |
+
color: white;
|
427 |
+
cursor: pointer;
|
428 |
+
height: 40px;
|
429 |
+
width: 40px;
|
430 |
+
position: absolute;
|
431 |
+
right: 0;
|
432 |
+
border: 0;
|
433 |
+
background-color: transparent;
|
434 |
+
top: 32px;
|
435 |
+
}
|
436 |
+
|
437 |
+
#fs_connect {
|
438 |
+
top: 0;
|
439 |
+
text-align: left;
|
440 |
+
display: inline-block;
|
441 |
+
vertical-align: middle;
|
442 |
+
margin-top: 52px;
|
443 |
+
margin-bottom: 20px;
|
444 |
+
|
445 |
+
.fs-terms
|
446 |
+
{
|
447 |
+
background: rgba(140, 140, 140, 0.64);
|
448 |
+
|
449 |
+
&, a
|
450 |
+
{
|
451 |
+
color: #c5c5c5;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
.wp-pointer-content
|
458 |
{
|
459 |
#fs_connect
|
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
ADDED
@@ -0,0 +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 |
+
}
|
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/config.php
CHANGED
@@ -1,327 +1,331 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
-
* @since 1.0.4
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
if ( ! defined( 'WP_FS__SLUG' ) ) {
|
14 |
-
define( 'WP_FS__SLUG', 'freemius' );
|
15 |
-
}
|
16 |
-
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
17 |
-
define( 'WP_FS__DEV_MODE', false );
|
18 |
-
}
|
19 |
-
|
20 |
-
#--------------------------------------------------------------------------------
|
21 |
-
#region API Connectivity Issues Simulation
|
22 |
-
#--------------------------------------------------------------------------------
|
23 |
-
|
24 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
25 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
26 |
-
}
|
27 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
|
28 |
-
define( 'WP_FS__SIMULATE_NO_CURL', false );
|
29 |
-
}
|
30 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
|
31 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
|
32 |
-
}
|
33 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
|
34 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
35 |
-
}
|
36 |
-
if ( WP_FS__SIMULATE_NO_CURL ) {
|
37 |
-
define( 'FS_SDK__SIMULATE_NO_CURL', true );
|
38 |
-
}
|
39 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
40 |
-
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
|
41 |
-
}
|
42 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
|
43 |
-
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
44 |
-
}
|
45 |
-
|
46 |
-
#endregion
|
47 |
-
|
48 |
-
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
49 |
-
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
50 |
-
}
|
51 |
-
|
52 |
-
if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
|
53 |
-
/**
|
54 |
-
* @since 1.1.7.3
|
55 |
-
* @author Vova Feldman (@svovaf)
|
56 |
-
*
|
57 |
-
* I'm not sure if shared servers periodically change IP, or the subdomain of the
|
58 |
-
*
|
59 |
-
* between domains on a daily basis. Therefore, to eliminate the risk of
|
60 |
-
* multiple unwanted connectivity test pings, temporary ignore domain or
|
61 |
-
* server IP changes.
|
62 |
-
*/
|
63 |
-
define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* If your dev environment supports custom public network IP setup
|
68 |
-
* like VVV, please update WP_FS__LOCALHOST_IP with your public IP
|
69 |
-
* and uncomment it during dev.
|
70 |
-
*/
|
71 |
-
if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
72 |
-
// VVV
|
73 |
-
define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
|
74 |
-
|
75 |
-
// define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* If true and running with secret key, the opt-in process
|
80 |
-
* will skip the email activation process which is invoked
|
81 |
-
* when the email of the context user already exist in Freemius
|
82 |
-
* database (as a security precaution, to prevent sharing user
|
83 |
-
* secret with unauthorized entity).
|
84 |
-
*
|
85 |
-
* IMPORTANT:
|
86 |
-
* AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
|
87 |
-
* THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
|
88 |
-
* CLOCK IS SYNCED.
|
89 |
-
*/
|
90 |
-
if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
|
91 |
-
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
#--------------------------------------------------------------------------------
|
96 |
-
#region Directories
|
97 |
-
#--------------------------------------------------------------------------------
|
98 |
-
|
99 |
-
if ( ! defined( 'WP_FS__DIR' ) ) {
|
100 |
-
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
101 |
-
}
|
102 |
-
if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
|
103 |
-
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
104 |
-
}
|
105 |
-
if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
|
106 |
-
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
107 |
-
}
|
108 |
-
if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
|
109 |
-
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
110 |
-
}
|
111 |
-
if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
|
112 |
-
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
113 |
-
}
|
114 |
-
if ( ! defined( 'WP_FS__DIR_JS' ) ) {
|
115 |
-
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
116 |
-
}
|
117 |
-
if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
|
118 |
-
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
119 |
-
}
|
120 |
-
if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
|
121 |
-
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
122 |
-
}
|
123 |
-
|
124 |
-
#endregion
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Domain / URL / Address
|
128 |
-
*/
|
129 |
-
define( '
|
130 |
-
define( '
|
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 |
-
( isset( $_SERVER['
|
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 |
-
define( '
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
define( '
|
265 |
-
define( '
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
define( '
|
272 |
-
define( '
|
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 |
-
define( '
|
305 |
-
}
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
if (
|
314 |
-
|
315 |
-
}
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.4
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( ! defined( 'WP_FS__SLUG' ) ) {
|
14 |
+
define( 'WP_FS__SLUG', 'freemius' );
|
15 |
+
}
|
16 |
+
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
17 |
+
define( 'WP_FS__DEV_MODE', false );
|
18 |
+
}
|
19 |
+
|
20 |
+
#--------------------------------------------------------------------------------
|
21 |
+
#region API Connectivity Issues Simulation
|
22 |
+
#--------------------------------------------------------------------------------
|
23 |
+
|
24 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
25 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
26 |
+
}
|
27 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
|
28 |
+
define( 'WP_FS__SIMULATE_NO_CURL', false );
|
29 |
+
}
|
30 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
|
31 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
|
32 |
+
}
|
33 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
|
34 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
35 |
+
}
|
36 |
+
if ( WP_FS__SIMULATE_NO_CURL ) {
|
37 |
+
define( 'FS_SDK__SIMULATE_NO_CURL', true );
|
38 |
+
}
|
39 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
40 |
+
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
|
41 |
+
}
|
42 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
|
43 |
+
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
44 |
+
}
|
45 |
+
|
46 |
+
#endregion
|
47 |
+
|
48 |
+
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
49 |
+
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
|
53 |
+
/**
|
54 |
+
* @since 1.1.7.3
|
55 |
+
* @author Vova Feldman (@svovaf)
|
56 |
+
*
|
57 |
+
* I'm not sure if shared servers periodically change IP, or the subdomain of the
|
58 |
+
* admin dashboard. Also, I've seen sites that have strange loop of switching
|
59 |
+
* between domains on a daily basis. Therefore, to eliminate the risk of
|
60 |
+
* multiple unwanted connectivity test pings, temporary ignore domain or
|
61 |
+
* server IP changes.
|
62 |
+
*/
|
63 |
+
define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* If your dev environment supports custom public network IP setup
|
68 |
+
* like VVV, please update WP_FS__LOCALHOST_IP with your public IP
|
69 |
+
* and uncomment it during dev.
|
70 |
+
*/
|
71 |
+
if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
72 |
+
// VVV default public network IP.
|
73 |
+
define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
|
74 |
+
|
75 |
+
// define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* If true and running with secret key, the opt-in process
|
80 |
+
* will skip the email activation process which is invoked
|
81 |
+
* when the email of the context user already exist in Freemius
|
82 |
+
* database (as a security precaution, to prevent sharing user
|
83 |
+
* secret with unauthorized entity).
|
84 |
+
*
|
85 |
+
* IMPORTANT:
|
86 |
+
* AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
|
87 |
+
* THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
|
88 |
+
* CLOCK IS SYNCED.
|
89 |
+
*/
|
90 |
+
if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
|
91 |
+
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
#--------------------------------------------------------------------------------
|
96 |
+
#region Directories
|
97 |
+
#--------------------------------------------------------------------------------
|
98 |
+
|
99 |
+
if ( ! defined( 'WP_FS__DIR' ) ) {
|
100 |
+
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
101 |
+
}
|
102 |
+
if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
|
103 |
+
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
104 |
+
}
|
105 |
+
if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
|
106 |
+
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
107 |
+
}
|
108 |
+
if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
|
109 |
+
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
110 |
+
}
|
111 |
+
if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
|
112 |
+
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
113 |
+
}
|
114 |
+
if ( ! defined( 'WP_FS__DIR_JS' ) ) {
|
115 |
+
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
116 |
+
}
|
117 |
+
if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
|
118 |
+
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
119 |
+
}
|
120 |
+
if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
|
121 |
+
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
122 |
+
}
|
123 |
+
|
124 |
+
#endregion
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Domain / URL / Address
|
128 |
+
*/
|
129 |
+
define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
|
130 |
+
define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
|
131 |
+
define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
|
132 |
+
|
133 |
+
if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
|
134 |
+
define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
|
135 |
+
}
|
136 |
+
if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
|
137 |
+
define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
|
141 |
+
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
142 |
+
}
|
143 |
+
|
144 |
+
#--------------------------------------------------------------------------------
|
145 |
+
#region HTTP
|
146 |
+
#--------------------------------------------------------------------------------
|
147 |
+
|
148 |
+
if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
|
149 |
+
define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
|
150 |
+
}
|
151 |
+
|
152 |
+
if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
|
153 |
+
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
154 |
+
// Checks if CloudFlare's HTTPS (Flexible SSL support).
|
155 |
+
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
|
156 |
+
'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
157 |
+
) ||
|
158 |
+
// Check if HTTPS request.
|
159 |
+
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
160 |
+
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
161 |
+
);
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
|
165 |
+
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
166 |
+
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
167 |
+
}
|
168 |
+
|
169 |
+
if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
|
170 |
+
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
171 |
+
}
|
172 |
+
|
173 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
|
174 |
+
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
175 |
+
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
176 |
+
} else {
|
177 |
+
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
178 |
+
is_string( WP_FS__REMOTE_ADDR ) &&
|
179 |
+
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
|
180 |
+
WP_FS__REMOTE_ADDR === '::1' )
|
181 |
+
);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
186 |
+
define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
|
187 |
+
false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
|
188 |
+
}
|
189 |
+
|
190 |
+
#endregion
|
191 |
+
|
192 |
+
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
193 |
+
// By default, run with Freemius production servers.
|
194 |
+
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! defined( 'WP_FS__ADDRESS' ) ) {
|
198 |
+
define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
#--------------------------------------------------------------------------------
|
203 |
+
#region API
|
204 |
+
#--------------------------------------------------------------------------------
|
205 |
+
|
206 |
+
if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
|
207 |
+
define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' );
|
208 |
+
}
|
209 |
+
if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
|
210 |
+
define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
|
211 |
+
}
|
212 |
+
|
213 |
+
// Set API address for local testing.
|
214 |
+
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
215 |
+
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
216 |
+
define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
|
217 |
+
}
|
218 |
+
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
219 |
+
define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
#endregion
|
224 |
+
|
225 |
+
#--------------------------------------------------------------------------------
|
226 |
+
#region Checkout
|
227 |
+
#--------------------------------------------------------------------------------
|
228 |
+
|
229 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
|
230 |
+
define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
|
234 |
+
define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
|
235 |
+
}
|
236 |
+
|
237 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
|
238 |
+
define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
|
239 |
+
}
|
240 |
+
|
241 |
+
#endregion
|
242 |
+
|
243 |
+
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
244 |
+
|
245 |
+
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
246 |
+
define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
|
247 |
+
}
|
248 |
+
if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
|
249 |
+
define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
|
250 |
+
}
|
251 |
+
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Module types
|
255 |
+
*
|
256 |
+
* @since 1.2.2
|
257 |
+
*/
|
258 |
+
define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
|
259 |
+
define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Billing Frequencies
|
263 |
+
*/
|
264 |
+
define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
|
265 |
+
define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
|
266 |
+
define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Plans
|
270 |
+
*/
|
271 |
+
define( 'WP_FS__PLAN_DEFAULT_PAID', false );
|
272 |
+
define( 'WP_FS__PLAN_FREE', 'free' );
|
273 |
+
define( 'WP_FS__PLAN_TRIAL', 'trial' );
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Times in seconds
|
277 |
+
*/
|
278 |
+
if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
|
279 |
+
define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
|
280 |
+
}
|
281 |
+
if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
|
282 |
+
define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
|
283 |
+
}
|
284 |
+
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
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
|
294 |
+
#--------------------------------------------------------------------------------
|
295 |
+
|
296 |
+
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
297 |
+
$debug_mode = get_option( 'fs_debug_mode', null );
|
298 |
+
|
299 |
+
if ( $debug_mode === null ) {
|
300 |
+
$debug_mode = false;
|
301 |
+
add_option( 'fs_debug_mode', $debug_mode );
|
302 |
+
}
|
303 |
+
|
304 |
+
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
305 |
+
}
|
306 |
+
|
307 |
+
if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
|
308 |
+
define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
|
309 |
+
}
|
310 |
+
if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
|
311 |
+
define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
|
312 |
+
}
|
313 |
+
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
314 |
+
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
315 |
+
}
|
316 |
+
|
317 |
+
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
318 |
+
error_reporting( E_ALL );
|
319 |
+
}
|
320 |
+
|
321 |
+
#endregion
|
322 |
+
|
323 |
+
if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
|
324 |
+
define( 'WP_FS__SCRIPT_START_TIME', time() );
|
325 |
+
}
|
326 |
+
if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
|
327 |
+
define( 'WP_FS__DEFAULT_PRIORITY', 10 );
|
328 |
+
}
|
329 |
+
if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
|
330 |
+
define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
|
331 |
+
}
|
freemius/gulpfile.js
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var gulp = require('gulp');
|
2 |
+
var path = require('path');
|
3 |
+
var filesystem = require('fs');
|
4 |
+
var wpPot = require('gulp-wp-pot');
|
5 |
+
var gettext = require('gulp-gettext');
|
6 |
+
var sort = require('gulp-sort');
|
7 |
+
var pofill = require('gulp-pofill');
|
8 |
+
var rename = require('gulp-rename');
|
9 |
+
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)
|
17 |
+
.filter(function (file) {
|
18 |
+
return filesystem.statSync(path.join(dir, file)).isDirectory();
|
19 |
+
});
|
20 |
+
}
|
21 |
+
|
22 |
+
var transifex = require('gulp-transifex').createClient(options);
|
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',
|
30 |
+
package : 'freemius',
|
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'));
|
80 |
+
|
81 |
+
// Create English PO out of the POT.
|
82 |
+
return gulp.src(languagesFolder + 'freemius.pot')
|
83 |
+
.pipe(pofill({
|
84 |
+
items: function (item) {
|
85 |
+
// If msgstr is empty, use identity translation
|
86 |
+
if (!item.msgstr.length) {
|
87 |
+
item.msgstr = [''];
|
88 |
+
}
|
89 |
+
if (!item.msgstr[0]) {
|
90 |
+
item.msgstr[0] = item.msgid;
|
91 |
+
}
|
92 |
+
return item;
|
93 |
+
}
|
94 |
+
}))
|
95 |
+
.pipe(rename('freemius-en.po'))
|
96 |
+
.pipe(gulp.dest(languagesFolder));
|
97 |
+
});
|
98 |
+
|
99 |
+
// Push updated po resource to transifex.
|
100 |
+
gulp.task('update-transifex', ['prepare-source'], function () {
|
101 |
+
return gulp.src(languagesFolder + 'freemius-en.po')
|
102 |
+
.pipe(transifex.pushResource());
|
103 |
+
});
|
104 |
+
|
105 |
+
// Download latest *.po translations.
|
106 |
+
gulp.task('download-translations', ['update-transifex'], function () {
|
107 |
+
return gulp.src(languagesFolder + 'freemius-en.po')
|
108 |
+
.pipe(transifex.pullResource());
|
109 |
+
});
|
110 |
+
|
111 |
+
// Move translations to languages root.
|
112 |
+
gulp.task('prepare-translations', ['download-translations'], function () {
|
113 |
+
var folders = getFolders(languagesFolder);
|
114 |
+
|
115 |
+
return folders.map(function (folder) {
|
116 |
+
return gulp.src(path.join(languagesFolder, folder, 'freemius-en.po'))
|
117 |
+
.pipe(rename('freemius-' + folder + '.po'))
|
118 |
+
.pipe(gulp.dest(languagesFolder));
|
119 |
+
});
|
120 |
+
});
|
121 |
+
|
122 |
+
// Feel up empty translations with English.
|
123 |
+
gulp.task('translations-feelup', ['prepare-translations'], function () {
|
124 |
+
return gulp.src(languagesFolder + '*.po')
|
125 |
+
.pipe(pofill({
|
126 |
+
items: function (item) {
|
127 |
+
// If msgstr is empty, use identity translation
|
128 |
+
if (0 == item.msgstr.length) {
|
129 |
+
item.msgstr = [''];
|
130 |
+
}
|
131 |
+
if (0 == item.msgstr[0].length) {
|
132 |
+
// item.msgid[0] = item.msgid;
|
133 |
+
item.msgstr[0] = item.msgid;
|
134 |
+
}
|
135 |
+
return item;
|
136 |
+
}
|
137 |
+
}))
|
138 |
+
.pipe(gulp.dest(languagesFolder));
|
139 |
+
});
|
140 |
+
|
141 |
+
// Cleanup temporary translation folders.
|
142 |
+
gulp.task('cleanup', ['prepare-translations'], function () {
|
143 |
+
var folders = getFolders(languagesFolder);
|
144 |
+
|
145 |
+
return folders.map(function (folder) {
|
146 |
+
return gulp.src(path.join(languagesFolder, folder), {read: false})
|
147 |
+
.pipe(clean());
|
148 |
+
});
|
149 |
+
});
|
150 |
+
|
151 |
+
// Compile *.po to *.mo binaries for usage.
|
152 |
+
gulp.task('compile-translations', ['translations-feelup'], function () {
|
153 |
+
// Compile POs to MOs.
|
154 |
+
return gulp.src(languagesFolder + '*.po')
|
155 |
+
.pipe(gettext())
|
156 |
+
.pipe(gulp.dest(languagesFolder))
|
157 |
+
});
|
158 |
+
|
159 |
+
gulp.task('default', [], function () {
|
160 |
+
gulp.run('prepare-source');
|
161 |
+
gulp.run('update-transifex');
|
162 |
+
gulp.run('download-translations');
|
163 |
+
gulp.run('prepare-translations');
|
164 |
+
gulp.run('translations-feelup');
|
165 |
+
gulp.run('cleanup');
|
166 |
+
gulp.run('compile-translations');
|
167 |
+
});
|
freemius/includes/class-freemius-abstract.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.7
|
7 |
*/
|
8 |
|
@@ -594,4 +594,4 @@
|
|
594 |
abstract function is_business();
|
595 |
|
596 |
#endregion
|
597 |
-
}
|
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 |
|
594 |
abstract function is_business();
|
595 |
|
596 |
#endregion
|
597 |
+
}
|
freemius/includes/class-freemius.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -67,6 +67,12 @@
|
|
67 |
* @var string
|
68 |
*/
|
69 |
private $_plugin_name;
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
#endregion Plugin Info
|
72 |
|
@@ -162,6 +168,12 @@
|
|
162 |
*/
|
163 |
private $_storage;
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
/**
|
166 |
* @since 1.0.0
|
167 |
*
|
@@ -247,11 +259,45 @@
|
|
247 |
*/
|
248 |
private static $_accounts;
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
/**
|
251 |
* @var Freemius[]
|
252 |
*/
|
253 |
private static $_instances = array();
|
254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
#region Uninstall Reasons IDs
|
256 |
|
257 |
const REASON_NO_LONGER_NEEDED = 1;
|
@@ -281,19 +327,27 @@
|
|
281 |
* @author Vova Feldman (@svovaf)
|
282 |
* @since 1.0.0
|
283 |
*
|
284 |
-
* @param
|
285 |
-
* @param bool
|
|
|
286 |
*/
|
287 |
-
private function __construct( $slug, $is_init = false ) {
|
288 |
-
$
|
|
|
|
|
289 |
|
290 |
-
$this->
|
|
|
|
|
291 |
|
292 |
-
$this->_storage = FS_Key_Value_Storage::instance( '
|
|
|
|
|
|
|
293 |
|
294 |
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
295 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
296 |
-
$this->_plugin_basename =
|
297 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
298 |
|
299 |
$base_name_split = explode( '/', $this->_plugin_basename );
|
@@ -315,17 +369,28 @@
|
|
315 |
$this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
|
316 |
}
|
317 |
|
318 |
-
|
|
|
|
|
319 |
|
320 |
$this->_admin_notices = FS_Admin_Notice_Manager::instance(
|
321 |
-
$
|
322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
);
|
324 |
|
325 |
if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
|
326 |
'true' === fs_request_is_action( 'restart_freemius' )
|
327 |
) {
|
328 |
FS_Api::clear_cache();
|
|
|
329 |
}
|
330 |
|
331 |
$this->_register_hooks();
|
@@ -336,7 +401,7 @@
|
|
336 |
}
|
337 |
|
338 |
/**
|
339 |
-
* Checks whether this
|
340 |
*
|
341 |
* @author Leo Fajardo (@leorw)
|
342 |
* @since 1.2.2
|
@@ -344,36 +409,88 @@
|
|
344 |
* @return bool
|
345 |
*/
|
346 |
function has_settings_menu() {
|
347 |
-
/**
|
348 |
-
* At the moment the wp.org require to show the opt-in in
|
349 |
-
* the themes page. Therefore, if the theme is .org compliant,
|
350 |
-
* treat it as if it doesn't have a menu item.
|
351 |
-
*/
|
352 |
-
if ( $this->is_theme() && $this->is_org_repo_compliant() ) {
|
353 |
-
return false;
|
354 |
-
}
|
355 |
-
|
356 |
return $this->_menu->has_menu();
|
357 |
}
|
358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
/**
|
360 |
* Checks whether this a submenu item is visible.
|
361 |
*
|
362 |
* @author Vova Feldman (@svovaf)
|
363 |
* @since 1.2.2.6
|
|
|
364 |
*
|
365 |
* @param string $slug
|
366 |
*
|
367 |
* @return bool
|
368 |
*/
|
369 |
function is_submenu_item_visible( $slug ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
if ( ! $this->has_settings_menu() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
return false;
|
372 |
}
|
373 |
|
374 |
return $this->_menu->is_submenu_item_visible( $slug );
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
/**
|
378 |
* @author Vova Feldman (@svovaf)
|
379 |
* @since 1.0.9
|
@@ -438,6 +555,18 @@
|
|
438 |
return;
|
439 |
}
|
440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
|
442 |
version_compare( $sdk_version, '1.1.5', '>=' )
|
443 |
) {
|
@@ -461,6 +590,62 @@
|
|
461 |
}
|
462 |
}
|
463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
/**
|
465 |
* This action is connected to the 'plugins_loaded' hook and helps to determine
|
466 |
* if this is a new plugin installation or a plugin update.
|
@@ -490,7 +675,7 @@
|
|
490 |
* Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
|
491 |
*
|
492 |
* NOTE:
|
493 |
-
* The only fallback of this mechanism is if an
|
494 |
* and then, the next immediate PageView is the plugin's main settings page, it will not
|
495 |
* show the opt-in right away. The reason it will happen is because Freemius execution
|
496 |
* will be turned off till the plugin is fully loaded at least once
|
@@ -504,7 +689,18 @@
|
|
504 |
// Update flag that plugin was loaded with Freemius at least once.
|
505 |
$this->_storage->was_plugin_loaded = true;
|
506 |
|
507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
$this->_storage->is_plugin_new_install = false;
|
509 |
}
|
510 |
}
|
@@ -517,22 +713,57 @@
|
|
517 |
$this->_logger->entrance();
|
518 |
|
519 |
if ( is_admin() ) {
|
520 |
-
|
|
|
521 |
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
536 |
|
537 |
/**
|
538 |
* Part of the mechanism to identify new plugin install vs. plugin update.
|
@@ -541,7 +772,10 @@
|
|
541 |
* @since 1.1.9
|
542 |
*/
|
543 |
if ( empty( $this->_storage->was_plugin_loaded ) ) {
|
544 |
-
if ( $this->
|
|
|
|
|
|
|
545 |
add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
|
546 |
} else {
|
547 |
// If was activated before, then it was already loaded before.
|
@@ -552,12 +786,18 @@
|
|
552 |
if ( ! self::is_ajax() ) {
|
553 |
if ( ! $this->is_addon() ) {
|
554 |
add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
|
555 |
-
add_action( 'admin_menu', array( &$this, '_prepare_admin_menu' ), WP_FS__LOWEST_PRIORITY );
|
556 |
}
|
557 |
}
|
558 |
}
|
559 |
|
560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
add_action( 'init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
|
563 |
|
@@ -571,11 +811,16 @@
|
|
571 |
'_install_premium_version_ajax_action'
|
572 |
) );
|
573 |
|
|
|
|
|
574 |
$this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
|
575 |
|
576 |
$this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
|
|
|
|
577 |
|
578 |
add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
|
|
|
579 |
add_action( 'admin_init', array( &$this, '_enqueue_common_css' ) );
|
580 |
|
581 |
/**
|
@@ -585,7 +830,7 @@
|
|
585 |
* @since 1.2.1.5
|
586 |
*/
|
587 |
if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
|
588 |
-
$this->
|
589 |
) {
|
590 |
add_action( 'admin_init', array( &$this, 'connect_again' ) );
|
591 |
}
|
@@ -628,6 +873,16 @@
|
|
628 |
unset( $plugin_main_file->path );
|
629 |
|
630 |
$this->_storage->plugin_main_file = $plugin_main_file;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
}
|
632 |
|
633 |
/**
|
@@ -650,15 +905,11 @@
|
|
650 |
array( &$this, '_submit_uninstall_reason_action' )
|
651 |
);
|
652 |
|
653 |
-
if ( $this->is_plugins_page() )
|
|
|
|
|
654 |
add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
|
655 |
}
|
656 |
-
|
657 |
-
if ( ! $this->is_addon() ) {
|
658 |
-
if ( $this->is_registered() ) {
|
659 |
-
$this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
|
660 |
-
}
|
661 |
-
}
|
662 |
}
|
663 |
|
664 |
/**
|
@@ -667,18 +918,19 @@
|
|
667 |
* @author Vova Feldman (@svovaf)
|
668 |
* @since 1.0.6
|
669 |
*
|
670 |
-
* @param
|
671 |
*
|
672 |
* @return string
|
673 |
-
*
|
674 |
-
* @uses fs_find_caller_plugin_file
|
675 |
*/
|
676 |
private function _find_caller_plugin_file( $is_init = false ) {
|
677 |
// Try to load the cached value of the file path.
|
678 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
679 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
680 |
-
|
681 |
-
|
|
|
|
|
|
|
682 |
}
|
683 |
}
|
684 |
|
@@ -697,15 +949,16 @@
|
|
697 |
if ( isset( $this->_storage->plugin_main_file ) &&
|
698 |
isset( $this->_storage->plugin_main_file->prev_path )
|
699 |
) {
|
700 |
-
|
701 |
-
|
|
|
702 |
}
|
703 |
}
|
704 |
|
705 |
wp_die(
|
706 |
-
$this->
|
707 |
" Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
|
708 |
-
$this->
|
709 |
array( 'back_link' => true )
|
710 |
);
|
711 |
}
|
@@ -716,29 +969,125 @@
|
|
716 |
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
717 |
*/
|
718 |
// Find caller module.
|
719 |
-
$
|
720 |
-
$plugin_file = $file_and_type->path;
|
721 |
-
|
722 |
$this->_storage->plugin_main_file = (object) array(
|
723 |
-
'path' =>
|
724 |
);
|
725 |
|
726 |
-
return $
|
727 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
728 |
|
729 |
/**
|
730 |
-
*
|
731 |
*
|
732 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
733 |
*
|
734 |
-
* @author
|
735 |
-
* @since
|
736 |
*
|
737 |
-
* @author
|
738 |
-
* @since
|
739 |
-
*
|
740 |
-
*
|
741 |
-
* @since
|
742 |
*/
|
743 |
private function get_caller_main_file_and_type() {
|
744 |
self::require_plugin_essentials();
|
@@ -765,6 +1114,7 @@
|
|
765 |
$caller_file_candidate = false;
|
766 |
$caller_map = array();
|
767 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
|
|
768 |
|
769 |
for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
|
770 |
if ( empty( $bt[ $i ]['file'] ) ) {
|
@@ -779,10 +1129,12 @@
|
|
779 |
if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
|
780 |
'do_action',
|
781 |
'apply_filter',
|
782 |
-
|
783 |
-
|
784 |
-
'
|
785 |
-
'
|
|
|
|
|
786 |
) )
|
787 |
) {
|
788 |
// Ignore call stack hooks and files inclusion.
|
@@ -790,6 +1142,33 @@
|
|
790 |
}
|
791 |
|
792 |
$caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
$caller_file_hash = md5( $caller_file_path );
|
794 |
|
795 |
if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
|
@@ -803,15 +1182,10 @@
|
|
803 |
|
804 |
if ( isset( $caller_map[ $caller_file_hash ] ) ) {
|
805 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
806 |
-
$caller_file_candidate = $caller_map[ $caller_file_hash ];
|
807 |
}
|
808 |
}
|
809 |
|
810 |
-
if ( empty( $caller_file_candidate ) ) {
|
811 |
-
// Throw an error to the developer in case of some edge case dev environment.
|
812 |
-
wp_die( $this->get_text( 'failed-finding-main-path' ), $this->get_text( 'error' ), array( 'back_link' => true ) );
|
813 |
-
}
|
814 |
-
|
815 |
return (object) array(
|
816 |
'module_type' => $module_type,
|
817 |
'path' => $caller_file_candidate
|
@@ -868,7 +1242,7 @@
|
|
868 |
// Load the HTML template for the deactivation feedback dialog box.
|
869 |
$vars = array(
|
870 |
'reasons' => $uninstall_reasons,
|
871 |
-
'
|
872 |
);
|
873 |
|
874 |
/**
|
@@ -886,8 +1260,10 @@
|
|
886 |
* @return array The uninstall reasons for the specified user type.
|
887 |
*/
|
888 |
function _get_uninstall_reasons( $user_type = 'long-term' ) {
|
|
|
|
|
889 |
$internal_message_template_var = array(
|
890 |
-
'
|
891 |
);
|
892 |
|
893 |
if ( $this->is_registered() && false !== $this->get_plan() && $this->get_plan()->has_technical_support() ) {
|
@@ -898,21 +1274,27 @@
|
|
898 |
|
899 |
$reason_found_better_plugin = array(
|
900 |
'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
|
901 |
-
'text' => $this->
|
902 |
'input_type' => 'textfield',
|
903 |
-
'input_placeholder' => $this->
|
904 |
);
|
905 |
|
906 |
$reason_temporary_deactivation = array(
|
907 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
908 |
-
'text' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
909 |
'input_type' => '',
|
910 |
'input_placeholder' => ''
|
911 |
);
|
912 |
|
913 |
$reason_other = array(
|
914 |
'id' => self::REASON_OTHER,
|
915 |
-
'text' => $this->
|
916 |
'input_type' => 'textfield',
|
917 |
'input_placeholder' => ''
|
918 |
);
|
@@ -920,27 +1302,27 @@
|
|
920 |
$long_term_user_reasons = array(
|
921 |
array(
|
922 |
'id' => self::REASON_NO_LONGER_NEEDED,
|
923 |
-
'text' => $this->
|
924 |
'input_type' => '',
|
925 |
'input_placeholder' => ''
|
926 |
),
|
927 |
$reason_found_better_plugin,
|
928 |
array(
|
929 |
'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
|
930 |
-
'text' => $this->
|
931 |
'input_type' => '',
|
932 |
'input_placeholder' => ''
|
933 |
),
|
934 |
array(
|
935 |
'id' => self::REASON_BROKE_MY_SITE,
|
936 |
-
'text' => $this->
|
937 |
'input_type' => '',
|
938 |
'input_placeholder' => '',
|
939 |
'internal_message' => $contact_support_template
|
940 |
),
|
941 |
array(
|
942 |
'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
|
943 |
-
'text' => $this->
|
944 |
'input_type' => '',
|
945 |
'input_placeholder' => '',
|
946 |
'internal_message' => $contact_support_template
|
@@ -950,15 +1332,15 @@
|
|
950 |
if ( $this->is_paying() ) {
|
951 |
$long_term_user_reasons[] = array(
|
952 |
'id' => self::REASON_CANT_PAY_ANYMORE,
|
953 |
-
'text' => $this->
|
954 |
'input_type' => 'textfield',
|
955 |
-
'input_placeholder' => $this->
|
956 |
);
|
957 |
}
|
958 |
|
959 |
$reason_dont_share_info = array(
|
960 |
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
961 |
-
'text' => $this->
|
962 |
'input_type' => '',
|
963 |
'input_placeholder' => ''
|
964 |
);
|
@@ -979,7 +1361,7 @@
|
|
979 |
'non-registered-and-non-anonymous-short-term' => array(
|
980 |
array(
|
981 |
'id' => self::REASON_DIDNT_WORK,
|
982 |
-
'text' => $this->
|
983 |
'input_type' => '',
|
984 |
'input_placeholder' => ''
|
985 |
),
|
@@ -989,7 +1371,7 @@
|
|
989 |
'short-term' => array(
|
990 |
array(
|
991 |
'id' => self::REASON_COULDNT_MAKE_IT_WORK,
|
992 |
-
'text' => $this->
|
993 |
'input_type' => '',
|
994 |
'input_placeholder' => '',
|
995 |
'internal_message' => $contact_support_template
|
@@ -997,27 +1379,27 @@
|
|
997 |
$reason_found_better_plugin,
|
998 |
array(
|
999 |
'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
|
1000 |
-
'text' => $this->
|
1001 |
'input_type' => 'textarea',
|
1002 |
-
'input_placeholder' => $this->
|
1003 |
),
|
1004 |
array(
|
1005 |
'id' => self::REASON_NOT_WORKING,
|
1006 |
-
'text' => $this->
|
1007 |
'input_type' => 'textarea',
|
1008 |
-
'input_placeholder' => $this->
|
1009 |
),
|
1010 |
array(
|
1011 |
'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
|
1012 |
-
'text' => $this->
|
1013 |
'input_type' => 'textarea',
|
1014 |
-
'input_placeholder' => $this->
|
1015 |
),
|
1016 |
array(
|
1017 |
'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
|
1018 |
-
'text' => $this->
|
1019 |
'input_type' => 'textarea',
|
1020 |
-
'input_placeholder' => $this->
|
1021 |
)
|
1022 |
)
|
1023 |
);
|
@@ -1065,6 +1447,18 @@
|
|
1065 |
|
1066 |
$this->_storage->store( 'uninstall_reason', $reason );
|
1067 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
// Print '1' for successful operation.
|
1069 |
echo 1;
|
1070 |
exit;
|
@@ -1082,41 +1476,76 @@
|
|
1082 |
* @author Vova Feldman (@svovaf)
|
1083 |
* @since 1.0.0
|
1084 |
*
|
1085 |
-
* @param
|
1086 |
-
* @param
|
|
|
1087 |
*
|
1088 |
* @return Freemius|false
|
1089 |
*/
|
1090 |
-
static function instance( $slug, $is_init = false ) {
|
1091 |
-
if ( empty( $
|
1092 |
return false;
|
1093 |
}
|
1094 |
|
1095 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
|
1097 |
-
if ( ! isset( self::$_instances[ $
|
1098 |
if ( 0 === count( self::$_instances ) ) {
|
1099 |
self::_load_required_static();
|
1100 |
}
|
1101 |
|
1102 |
-
self::$_instances[ $
|
1103 |
}
|
1104 |
|
1105 |
-
return self::$_instances[ $
|
1106 |
}
|
1107 |
|
1108 |
/**
|
1109 |
* @author Vova Feldman (@svovaf)
|
1110 |
* @since 1.0.6
|
1111 |
*
|
1112 |
-
* @param
|
1113 |
*
|
1114 |
* @return bool
|
1115 |
*/
|
1116 |
-
private static function has_instance( $
|
1117 |
-
return
|
1118 |
-
|
1119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1120 |
}
|
1121 |
|
1122 |
/**
|
@@ -1128,13 +1557,9 @@
|
|
1128 |
* @return false|Freemius
|
1129 |
*/
|
1130 |
static function get_instance_by_id( $id ) {
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
}
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
return false;
|
1138 |
}
|
1139 |
|
1140 |
/**
|
@@ -1150,7 +1575,7 @@
|
|
1150 |
$slug = self::find_slug_by_basename( $plugin_file );
|
1151 |
|
1152 |
return ( false !== $slug ) ?
|
1153 |
-
self::instance( $slug ) :
|
1154 |
false;
|
1155 |
}
|
1156 |
|
@@ -1168,14 +1593,14 @@
|
|
1168 |
* @author Vova Feldman (@svovaf)
|
1169 |
* @since 1.0.6
|
1170 |
*
|
1171 |
-
* @param
|
1172 |
*
|
1173 |
-
* @return
|
1174 |
*/
|
1175 |
-
function get_addon_instance( $
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
}
|
1180 |
|
1181 |
#endregion ------------------------------------------------------------------
|
@@ -1187,7 +1612,35 @@
|
|
1187 |
* @return bool
|
1188 |
*/
|
1189 |
function is_parent_plugin_installed() {
|
1190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1191 |
}
|
1192 |
|
1193 |
/**
|
@@ -1220,7 +1673,7 @@
|
|
1220 |
function is_activation_mode( $and_on = true ) {
|
1221 |
return (
|
1222 |
( $this->is_on() || ! $and_on ) &&
|
1223 |
-
! $this->is_registered() &&
|
1224 |
( ! $this->is_enable_anonymous() ||
|
1225 |
( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
|
1226 |
);
|
@@ -1244,7 +1697,7 @@
|
|
1244 |
}
|
1245 |
|
1246 |
// Check if current page is matching the activation page.
|
1247 |
-
return $this->is_matching_url( $
|
1248 |
}
|
1249 |
|
1250 |
/**
|
@@ -1258,12 +1711,16 @@
|
|
1258 |
* @author Vova Feldman (@svovaf)
|
1259 |
* @since 1.2.1.7
|
1260 |
*
|
1261 |
-
* @param string $url
|
1262 |
* @param string $sub_url
|
|
|
1263 |
*
|
1264 |
* @return bool
|
1265 |
*/
|
1266 |
-
private function is_matching_url( $
|
|
|
|
|
|
|
|
|
1267 |
$url = strtolower( $url );
|
1268 |
$sub_url = strtolower( $sub_url );
|
1269 |
|
@@ -1325,7 +1782,7 @@
|
|
1325 |
$active_plugins_basenames = get_option( 'active_plugins' );
|
1326 |
|
1327 |
foreach ( $all_plugins as $basename => &$data ) {
|
1328 |
-
// By
|
1329 |
$data['is_active'] = false;
|
1330 |
// Enrich with plugin slug.
|
1331 |
$data['slug'] = self::get_plugin_slug( $basename );
|
@@ -1417,9 +1874,6 @@
|
|
1417 |
|
1418 |
self::$_global_admin_notices = FS_Admin_Notice_Manager::instance( 'global' );
|
1419 |
|
1420 |
-
// Configure which Freemius powered plugins should be auto updated.
|
1421 |
-
// add_filter( 'auto_update_plugin', '_include_plugins_in_auto_update', 10, 2 );
|
1422 |
-
|
1423 |
add_action( 'admin_menu', array( 'Freemius', '_add_debug_section' ) );
|
1424 |
|
1425 |
add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
|
@@ -1430,7 +1884,9 @@
|
|
1430 |
|
1431 |
self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) );
|
1432 |
|
1433 |
-
|
|
|
|
|
1434 |
|
1435 |
self::$_statics_loaded = true;
|
1436 |
}
|
@@ -1471,15 +1927,15 @@
|
|
1471 |
* @since 1.0.8
|
1472 |
*/
|
1473 |
static function _add_debug_section() {
|
1474 |
-
if ( ! current_user_can( 'activate_plugins' )
|
|
|
|
|
1475 |
return;
|
1476 |
}
|
1477 |
|
1478 |
self::$_static_logger->entrance();
|
1479 |
|
1480 |
-
$title = sprintf( '%s [v.%s]',
|
1481 |
-
|
1482 |
-
$hook = null;
|
1483 |
|
1484 |
if ( WP_FS__DEV_MODE ) {
|
1485 |
// Add top-level debug menu item.
|
@@ -1491,17 +1947,15 @@
|
|
1491 |
array( 'Freemius', '_debug_page_render' )
|
1492 |
);
|
1493 |
} else {
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
);
|
1504 |
-
}
|
1505 |
}
|
1506 |
|
1507 |
if ( ! empty( $hook ) ) {
|
@@ -1579,7 +2033,6 @@
|
|
1579 |
self::shoot_ajax_success();
|
1580 |
}
|
1581 |
|
1582 |
-
|
1583 |
/**
|
1584 |
* @author Vova Feldman (@svovaf)
|
1585 |
* @since 1.0.8
|
@@ -1598,14 +2051,19 @@
|
|
1598 |
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
1599 |
check_admin_referer( 'simulate_trial' );
|
1600 |
|
1601 |
-
$
|
1602 |
-
|
1603 |
-
$fs = freemius( $slug );
|
1604 |
|
1605 |
// Update SDK install to at least 24 hours before.
|
1606 |
$fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
|
1607 |
// Unset the trial shown timestamp.
|
1608 |
unset( $fs->_storage->trial_promotion_shown );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1609 |
} else if ( fs_request_is_action( 'download_logs' ) ) {
|
1610 |
check_admin_referer( 'download_logs' );
|
1611 |
|
@@ -1629,11 +2087,13 @@
|
|
1629 |
self::$_static_logger->entrance();
|
1630 |
|
1631 |
$vars = array(
|
1632 |
-
'
|
1633 |
-
'
|
1634 |
-
'
|
1635 |
-
'
|
1636 |
-
'
|
|
|
|
|
1637 |
);
|
1638 |
|
1639 |
fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' );
|
@@ -1753,7 +2213,7 @@
|
|
1753 |
'sdk' => $this->version,
|
1754 |
'is_admin' => json_encode( is_admin() ),
|
1755 |
'is_ajax' => json_encode( self::is_ajax() ),
|
1756 |
-
'is_cron' => json_encode(
|
1757 |
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
1758 |
)
|
1759 |
);
|
@@ -1882,29 +2342,36 @@
|
|
1882 |
*
|
1883 |
* @return string
|
1884 |
*/
|
1885 |
-
|
1886 |
-
|
1887 |
|
1888 |
-
|
1889 |
-
|
1890 |
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
|
1899 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1900 |
|
1901 |
-
|
1902 |
-
|
1903 |
|
1904 |
-
|
1905 |
|
1906 |
-
|
1907 |
-
|
1908 |
|
1909 |
/**
|
1910 |
* @author Vova Feldman (@svovaf)
|
@@ -1919,18 +2386,61 @@
|
|
1919 |
}
|
1920 |
|
1921 |
/**
|
1922 |
-
* Generate API connectivity issue message.
|
1923 |
-
*
|
1924 |
* @author Vova Feldman (@svovaf)
|
1925 |
-
* @since 1.
|
1926 |
*
|
1927 |
-
* @param
|
1928 |
-
*
|
|
|
1929 |
*/
|
1930 |
-
function
|
1931 |
-
if (
|
1932 |
-
|
1933 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1934 |
}
|
1935 |
|
1936 |
if ( ! function_exists( 'wp_nonce_url' ) ) {
|
@@ -1941,6 +2451,18 @@
|
|
1941 |
// $admin_email = get_option( 'admin_email' );
|
1942 |
$admin_email = $current_user->user_email;
|
1943 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1944 |
$message = false;
|
1945 |
if ( is_object( $api_result ) &&
|
1946 |
isset( $api_result->error ) &&
|
@@ -1967,15 +2489,15 @@
|
|
1967 |
if ( ! empty( $missing_methods ) ) {
|
1968 |
$missing_methods = sprintf(
|
1969 |
'<br><br><b>%s</b> %s',
|
1970 |
-
$this->
|
1971 |
$missing_methods
|
1972 |
);
|
1973 |
}
|
1974 |
}
|
1975 |
|
1976 |
$message = sprintf(
|
1977 |
-
|
1978 |
-
$this->
|
1979 |
$missing_methods .
|
1980 |
' %s',
|
1981 |
'<b>' . $this->get_plugin_name() . '</b>',
|
@@ -1983,93 +2505,95 @@
|
|
1983 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
1984 |
sprintf(
|
1985 |
'<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
|
1986 |
-
$this->
|
1987 |
' - ' . sprintf(
|
1988 |
-
$this->
|
1989 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
1990 |
)
|
1991 |
),
|
1992 |
sprintf(
|
1993 |
'<b>%s</b> - %s',
|
1994 |
-
|
1995 |
-
$this->
|
1996 |
),
|
1997 |
sprintf(
|
1998 |
-
'<a href="%s"><b>%s</b></a
|
1999 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2000 |
-
$
|
2001 |
-
|
2002 |
)
|
2003 |
)
|
2004 |
);
|
2005 |
break;
|
2006 |
case 'cloudflare_ddos_protection':
|
2007 |
$message = sprintf(
|
2008 |
-
|
2009 |
-
$this->
|
2010 |
-
|
2011 |
' %s',
|
2012 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2013 |
sprintf(
|
2014 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2015 |
sprintf(
|
2016 |
'<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
|
2017 |
-
$
|
2018 |
' - ' . sprintf(
|
2019 |
-
$
|
2020 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2021 |
)
|
2022 |
),
|
2023 |
sprintf(
|
2024 |
-
'<a href="%s" target="_blank"><b>%s</b></a
|
2025 |
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
2026 |
-
$
|
2027 |
-
|
2028 |
),
|
2029 |
sprintf(
|
2030 |
-
'<a href="%s"><b>%s</b></a
|
2031 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2032 |
-
$
|
2033 |
-
|
2034 |
)
|
2035 |
)
|
2036 |
);
|
2037 |
break;
|
2038 |
case 'squid_cache_block':
|
2039 |
$message = sprintf(
|
2040 |
-
|
2041 |
-
$this->
|
2042 |
' %s',
|
2043 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2044 |
sprintf(
|
2045 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2046 |
sprintf(
|
2047 |
-
'<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a
|
2048 |
-
$this->
|
2049 |
-
|
2050 |
-
$this->
|
2051 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2052 |
)
|
2053 |
),
|
2054 |
sprintf(
|
2055 |
'<b>%s</b> - %s',
|
2056 |
-
|
2057 |
sprintf(
|
2058 |
-
$this->
|
2059 |
// We use a filter since the plugin might require additional API connectivity.
|
2060 |
-
'<b>' . implode( ', ', $this->apply_filters( 'api_domains', array( 'api.freemius.com' ) ) ) . '</b>'
|
|
|
|
|
2061 |
),
|
2062 |
sprintf(
|
2063 |
-
'<a href="%s"><b>%s</b></a
|
2064 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2065 |
-
$
|
2066 |
-
|
2067 |
)
|
2068 |
)
|
2069 |
);
|
2070 |
break;
|
2071 |
-
//
|
2072 |
-
// $message = $this->
|
2073 |
// break;
|
2074 |
}
|
2075 |
}
|
@@ -2077,25 +2601,27 @@
|
|
2077 |
$message_id = 'failed_connect_api';
|
2078 |
$type = 'error';
|
2079 |
|
|
|
|
|
2080 |
if ( false === $message ) {
|
2081 |
if ( $is_first_failure ) {
|
2082 |
// First attempt failed.
|
2083 |
$message = sprintf(
|
2084 |
-
|
2085 |
-
|
2086 |
-
$this->
|
2087 |
'%s',
|
2088 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2089 |
sprintf(
|
2090 |
'<div id="fs_firewall_issue_options">%s %s</div>',
|
2091 |
sprintf(
|
2092 |
'<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
|
2093 |
-
$this->
|
2094 |
),
|
2095 |
sprintf(
|
2096 |
'<a href="%s" class="button">%s</a>',
|
2097 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2098 |
-
$this->
|
2099 |
)
|
2100 |
)
|
2101 |
);
|
@@ -2105,32 +2631,32 @@
|
|
2105 |
} else {
|
2106 |
// Second connectivity attempt failed.
|
2107 |
$message = sprintf(
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
' %s',
|
2112 |
'<b>' . $this->get_plugin_name() . '</b>',
|
2113 |
sprintf(
|
2114 |
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
2115 |
sprintf(
|
2116 |
'<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
|
2117 |
-
$
|
2118 |
' - ' . sprintf(
|
2119 |
-
$
|
2120 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2121 |
)
|
2122 |
),
|
2123 |
sprintf(
|
2124 |
-
'<a href="%s" target="_blank"><b>%s</b></a
|
2125 |
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
2126 |
-
$
|
2127 |
-
|
2128 |
),
|
2129 |
sprintf(
|
2130 |
-
'<a href="%s"><b>%s</b></a
|
2131 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=
|
2132 |
-
$
|
2133 |
-
|
2134 |
)
|
2135 |
)
|
2136 |
);
|
@@ -2140,7 +2666,7 @@
|
|
2140 |
$this->_admin_notices->add_sticky(
|
2141 |
$message,
|
2142 |
$message_id,
|
2143 |
-
$this->
|
2144 |
$type
|
2145 |
);
|
2146 |
}
|
@@ -2207,7 +2733,7 @@
|
|
2207 |
|
2208 |
$this->_admin_notices->add_sticky(
|
2209 |
sprintf(
|
2210 |
-
$this->
|
2211 |
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
2212 |
),
|
2213 |
'server_details_sent'
|
@@ -2278,7 +2804,7 @@
|
|
2278 |
) {
|
2279 |
$default_sections = $this->get_email_sections();
|
2280 |
|
2281 |
-
// Insert new sections or replace the
|
2282 |
if ( is_array( $sections ) && ! empty( $sections ) ) {
|
2283 |
foreach ( $sections as $section_id => $custom_section ) {
|
2284 |
if ( ! isset( $default_sections[ $section_id ] ) ) {
|
@@ -2293,7 +2819,7 @@
|
|
2293 |
$current_section['title'] = $custom_section['title'];
|
2294 |
}
|
2295 |
|
2296 |
-
// Insert new rows under the current section or replace the
|
2297 |
if ( isset( $custom_section['rows'] ) && is_array( $custom_section['rows'] ) && ! empty( $custom_section['rows'] ) ) {
|
2298 |
foreach ( $custom_section['rows'] as $row_id => $row ) {
|
2299 |
$current_section['rows'][ $row_id ] = $row;
|
@@ -2338,7 +2864,7 @@
|
|
2338 |
|
2339 |
$active_plugin = self::get_active_plugins();
|
2340 |
|
2341 |
-
// Generate the list of active plugins separated by new line.
|
2342 |
$active_plugin_string = '';
|
2343 |
foreach ( $active_plugin as $plugin ) {
|
2344 |
$active_plugin_string .= sprintf(
|
@@ -2358,7 +2884,7 @@
|
|
2358 |
|
2359 |
$api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );
|
2360 |
|
2361 |
-
// Generate the
|
2362 |
$sections = array(
|
2363 |
'sdk' => array(
|
2364 |
'title' => 'SDK',
|
@@ -2368,7 +2894,7 @@
|
|
2368 |
)
|
2369 |
),
|
2370 |
'plugin' => array(
|
2371 |
-
'title' =>
|
2372 |
'rows' => array(
|
2373 |
'name' => array( 'Name', $this->get_plugin_name() ),
|
2374 |
'version' => array( 'Version', $this->get_plugin_version() )
|
@@ -2377,8 +2903,18 @@
|
|
2377 |
'api' => array(
|
2378 |
'title' => 'API Subdomain',
|
2379 |
'rows' => array(
|
2380 |
-
'dns' => array(
|
2381 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2382 |
),
|
2383 |
),
|
2384 |
'site' => array(
|
@@ -2473,7 +3009,13 @@
|
|
2473 |
|
2474 |
$this->parse_settings( $plugin_info );
|
2475 |
|
2476 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2477 |
return;
|
2478 |
}
|
2479 |
|
@@ -2488,7 +3030,7 @@
|
|
2488 |
$this->_admin_notices->has_sticky( 'failed_connect_api' )
|
2489 |
) {
|
2490 |
if ( ! $this->_enable_anonymous || $this->is_premium() ) {
|
2491 |
-
// If anonymous mode is disabled, add firewall
|
2492 |
add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
|
2493 |
|
2494 |
$this->add_ajax_action( 'resolve_firewall_issues', array(
|
@@ -2525,7 +3067,7 @@
|
|
2525 |
}
|
2526 |
|
2527 |
if ( $this->has_api_connectivity() ) {
|
2528 |
-
if (
|
2529 |
$this->hook_callback_to_sync_cron();
|
2530 |
} else if ( $this->is_user_in_admin() ) {
|
2531 |
/**
|
@@ -2568,7 +3110,7 @@
|
|
2568 |
}
|
2569 |
|
2570 |
if ( $this->is_user_in_admin() ) {
|
2571 |
-
if ( $this->
|
2572 |
$this->hook_plugin_action_links();
|
2573 |
}
|
2574 |
|
@@ -2582,10 +3124,10 @@
|
|
2582 |
|
2583 |
$this->_admin_notices->add(
|
2584 |
( ! empty( $parent_name ) ?
|
2585 |
-
sprintf( $this->
|
2586 |
-
sprintf( $this->
|
2587 |
),
|
2588 |
-
$this->
|
2589 |
'error'
|
2590 |
);
|
2591 |
|
@@ -2594,18 +3136,21 @@
|
|
2594 |
if ( $this->_parent->is_registered() && ! $this->is_registered() ) {
|
2595 |
// If parent plugin activated, automatically install add-on for the user.
|
2596 |
$this->_activate_addon_account( $this->_parent );
|
|
|
|
|
|
|
2597 |
}
|
2598 |
|
2599 |
// @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
|
2600 |
if ( $this->is_premium() ) {
|
2601 |
-
// Remove add-on download
|
2602 |
$this->_parent->_admin_notices->remove_sticky( array(
|
2603 |
'addon_plan_upgraded_' . $this->_slug,
|
2604 |
'no_addon_license_' . $this->_slug,
|
2605 |
) );
|
2606 |
}
|
2607 |
|
2608 |
-
$this->deactivate_premium_only_addon_without_license();
|
2609 |
}
|
2610 |
} else {
|
2611 |
if ( $this->has_addons() &&
|
@@ -2701,7 +3246,7 @@
|
|
2701 |
$this->_logger->api_error( $result );
|
2702 |
|
2703 |
self::shoot_ajax_failure(
|
2704 |
-
$this->
|
2705 |
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
2706 |
$result->error->message :
|
2707 |
var_export( $result, true ) )
|
@@ -2726,7 +3271,7 @@
|
|
2726 |
$this->_logger->api_error( $result );
|
2727 |
|
2728 |
self::shoot_ajax_failure(
|
2729 |
-
$this->
|
2730 |
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
2731 |
$result->error->message :
|
2732 |
var_export( $result, true ) )
|
@@ -2888,10 +3433,24 @@
|
|
2888 |
}
|
2889 |
|
2890 |
if ( false === $id ) {
|
2891 |
-
throw new Freemius_Exception(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2892 |
}
|
2893 |
if ( false === $public_key ) {
|
2894 |
-
throw new Freemius_Exception(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2895 |
}
|
2896 |
|
2897 |
$plugin = ( $this->_plugin instanceof FS_Plugin ) ?
|
@@ -2899,21 +3458,22 @@
|
|
2899 |
new FS_Plugin();
|
2900 |
|
2901 |
$plugin->update( array(
|
2902 |
-
'id'
|
2903 |
-
'
|
2904 |
-
'
|
2905 |
-
'
|
2906 |
-
'
|
2907 |
-
'
|
2908 |
-
'
|
2909 |
-
'
|
2910 |
-
'
|
2911 |
-
|
|
|
2912 |
) );
|
2913 |
|
2914 |
if ( $plugin->is_updated() ) {
|
2915 |
// Update plugin details.
|
2916 |
-
$this->_plugin = FS_Plugin_Manager::instance( $this->
|
2917 |
}
|
2918 |
// Set the secret key after storing the plugin, we don't want to store the key in the storage.
|
2919 |
$this->_plugin->secret_key = $secret_key;
|
@@ -2931,7 +3491,12 @@
|
|
2931 |
}
|
2932 |
}
|
2933 |
|
2934 |
-
$this->_menu = FS_Admin_Menu_Manager::instance(
|
|
|
|
|
|
|
|
|
|
|
2935 |
$this->_menu->init( $plugin_info['menu'], $this->is_addon() );
|
2936 |
|
2937 |
$this->_has_addons = $this->get_bool_option( $plugin_info, 'has_addons', false );
|
@@ -3007,7 +3572,7 @@
|
|
3007 |
if ( ! is_admin() ) {
|
3008 |
/**
|
3009 |
* If in activation mode, don't execute Freemius outside of the
|
3010 |
-
*
|
3011 |
*
|
3012 |
* @author Vova Feldman (@svovaf)
|
3013 |
* @since 1.1.7.3
|
@@ -3028,7 +3593,7 @@
|
|
3028 |
return true;
|
3029 |
}
|
3030 |
|
3031 |
-
if (
|
3032 |
/**
|
3033 |
* If in activation mode, don't execute Freemius during wp crons
|
3034 |
* (wp crons have HTTP context - called as HTTP request).
|
@@ -3066,10 +3631,27 @@
|
|
3066 |
function _after_code_type_change() {
|
3067 |
$this->_logger->entrance();
|
3068 |
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3073 |
}
|
3074 |
|
3075 |
/**
|
@@ -3095,11 +3677,14 @@
|
|
3095 |
'license_activated',
|
3096 |
) );
|
3097 |
|
3098 |
-
$this->
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
|
|
|
|
|
|
3103 |
} else {
|
3104 |
// Remove sticky message related to premium code activation.
|
3105 |
$this->_admin_notices->remove_sticky( 'premium_activated' );
|
@@ -3110,11 +3695,12 @@
|
|
3110 |
if ( $this->is_paying() && ! $this->is_premium() ) {
|
3111 |
$this->_admin_notices->add_sticky(
|
3112 |
sprintf(
|
3113 |
-
|
|
|
3114 |
$this->_site->plan->title
|
3115 |
) . $this->get_complete_upgrade_instructions(),
|
3116 |
'plan_upgraded',
|
3117 |
-
$this->
|
3118 |
);
|
3119 |
}
|
3120 |
}
|
@@ -3151,15 +3737,16 @@
|
|
3151 |
* @author Vova Feldman (@svovaf)
|
3152 |
* @since 1.0.6
|
3153 |
*
|
3154 |
-
* @param string|number $
|
3155 |
* @param bool|null $is_premium Since 1.2.1.7 can check for specified add-on version.
|
3156 |
*
|
3157 |
* @return bool
|
3158 |
*/
|
3159 |
-
function is_addon_activated( $
|
3160 |
$this->_logger->entrance();
|
3161 |
|
3162 |
-
$
|
|
|
3163 |
|
3164 |
if ( ! $is_activated ) {
|
3165 |
return false;
|
@@ -3167,7 +3754,7 @@
|
|
3167 |
|
3168 |
if ( is_bool( $is_premium ) ) {
|
3169 |
// Check if the specified code version is activate.
|
3170 |
-
$addon = $this->get_addon_instance( $
|
3171 |
$is_activated = ( $is_premium === $addon->is_premium() );
|
3172 |
}
|
3173 |
|
@@ -3180,22 +3767,25 @@
|
|
3180 |
* @author Vova Feldman (@svovaf)
|
3181 |
* @since 1.1.7
|
3182 |
*
|
3183 |
-
* @param
|
3184 |
*
|
3185 |
* @return bool
|
3186 |
*/
|
3187 |
-
function is_addon_connected( $
|
3188 |
$this->_logger->entrance();
|
3189 |
|
3190 |
-
$sites = self::get_all_sites();
|
3191 |
|
|
|
|
|
|
|
3192 |
if ( ! isset( $sites[ $slug ] ) ) {
|
3193 |
return false;
|
3194 |
}
|
3195 |
|
3196 |
$site = $sites[ $slug ];
|
3197 |
|
3198 |
-
$plugin = FS_Plugin_Manager::instance( $
|
3199 |
|
3200 |
if ( $plugin->parent_plugin_id != $this->_plugin->id ) {
|
3201 |
// The given slug do NOT belong to any of the plugin's add-ons.
|
@@ -3217,14 +3807,16 @@
|
|
3217 |
* @author Vova Feldman (@svovaf)
|
3218 |
* @since 1.0.6
|
3219 |
*
|
3220 |
-
* @param
|
3221 |
*
|
3222 |
* @return bool
|
3223 |
*/
|
3224 |
-
function is_addon_installed( $
|
3225 |
$this->_logger->entrance();
|
3226 |
|
3227 |
-
|
|
|
|
|
3228 |
}
|
3229 |
|
3230 |
/**
|
@@ -3233,22 +3825,35 @@
|
|
3233 |
* @author Vova Feldman (@svovaf)
|
3234 |
* @since 1.0.6
|
3235 |
*
|
3236 |
-
* @param
|
3237 |
*
|
3238 |
* @return string
|
3239 |
*/
|
3240 |
-
function get_addon_basename( $
|
3241 |
-
|
3242 |
-
|
|
|
|
|
3243 |
}
|
3244 |
|
3245 |
-
$
|
|
|
3246 |
|
3247 |
if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
|
3248 |
return $premium_basename;
|
3249 |
}
|
3250 |
|
3251 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3252 |
|
3253 |
return $free_basename;
|
3254 |
}
|
@@ -3263,7 +3868,7 @@
|
|
3263 |
*/
|
3264 |
function get_installed_addons() {
|
3265 |
$installed_addons = array();
|
3266 |
-
foreach ( self::$_instances as $
|
3267 |
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
3268 |
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
3269 |
$installed_addons[] = $instance;
|
@@ -3287,7 +3892,7 @@
|
|
3287 |
return false;
|
3288 |
}
|
3289 |
|
3290 |
-
foreach ( self::$_instances as $
|
3291 |
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
3292 |
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
3293 |
return true;
|
@@ -3332,21 +3937,23 @@
|
|
3332 |
! $this->has_features_enabled_license() &&
|
3333 |
! $this->_has_premium_license()
|
3334 |
) {
|
3335 |
-
|
3336 |
-
//
|
3337 |
-
//
|
3338 |
-
//
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
|
|
3347 |
|
3348 |
-
|
3349 |
-
|
|
|
3350 |
|
3351 |
if ( ! $this->has_free_plan() &&
|
3352 |
! $this->has_features_enabled_license() &&
|
@@ -3354,26 +3961,32 @@
|
|
3354 |
) {
|
3355 |
// @todo Check if deactivate plugins also call the deactivation hook.
|
3356 |
|
3357 |
-
deactivate_plugins( array( $this->_plugin_basename ), true );
|
3358 |
-
|
3359 |
$this->_parent->_admin_notices->add_sticky(
|
3360 |
sprintf(
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3364 |
),
|
3365 |
'<b>' . $this->_plugin->title . '</b>'
|
3366 |
) . ' ' . sprintf(
|
3367 |
'<a href="%s" aria-label="%s" class="button button-primary" style="margin-left: 10px; vertical-align: middle;">%s ➜</a>',
|
3368 |
$this->_parent->addon_url( $this->_slug ),
|
3369 |
-
esc_attr( sprintf( $this->_parent->
|
3370 |
-
$this->_parent->
|
3371 |
),
|
3372 |
'no_addon_license_' . $this->_slug,
|
3373 |
-
( $is_after_trial_cancel ? '' : $this->_parent->
|
3374 |
( $is_after_trial_cancel ? 'success' : 'error' )
|
3375 |
);
|
3376 |
|
|
|
|
|
3377 |
return true;
|
3378 |
}
|
3379 |
}
|
@@ -3399,7 +4012,7 @@
|
|
3399 |
$this->_plugin->secret_key = $secret_key;
|
3400 |
|
3401 |
// Update plugin details.
|
3402 |
-
FS_Plugin_Manager::instance( $this->
|
3403 |
}
|
3404 |
|
3405 |
/**
|
@@ -3488,7 +4101,7 @@
|
|
3488 |
* @since 1.1.7.3
|
3489 |
*/
|
3490 |
private function run_manual_sync() {
|
3491 |
-
|
3492 |
|
3493 |
if ( ! $this->is_user_admin() ) {
|
3494 |
return;
|
@@ -3802,10 +4415,12 @@
|
|
3802 |
|
3803 |
$this->_admin_notices->add_sticky(
|
3804 |
sprintf(
|
3805 |
-
$this->
|
3806 |
'<b>' . $this->get_plugin_name() . '</b>',
|
3807 |
'<b>' . $email . '</b>',
|
3808 |
-
|
|
|
|
|
3809 |
),
|
3810 |
'activation_pending',
|
3811 |
'Thanks!'
|
@@ -3821,7 +4436,9 @@
|
|
3821 |
* @return bool
|
3822 |
*/
|
3823 |
function is_plugin_activation() {
|
3824 |
-
return get_option(
|
|
|
|
|
3825 |
}
|
3826 |
|
3827 |
/**
|
@@ -3835,10 +4452,12 @@
|
|
3835 |
/**
|
3836 |
* Automatically redirect to connect/activation page after plugin activation.
|
3837 |
*
|
3838 |
-
* @since 1.1.7 Do NOT redirect to opt-in when running in network
|
3839 |
*/
|
3840 |
if ( $this->is_plugin_activation() ) {
|
3841 |
-
delete_option(
|
|
|
|
|
3842 |
|
3843 |
if ( ! function_exists( 'is_network_admin' ) || ! is_network_admin() ) {
|
3844 |
$this->_redirect_on_activation_hook();
|
@@ -3847,8 +4466,8 @@
|
|
3847 |
}
|
3848 |
}
|
3849 |
|
3850 |
-
if ( fs_request_is_action( $this->
|
3851 |
-
check_admin_referer( $this->
|
3852 |
|
3853 |
$this->skip_connection();
|
3854 |
|
@@ -3858,14 +4477,33 @@
|
|
3858 |
if ( ! $this->is_addon() && ! $this->is_registered() && ! $this->is_anonymous() ) {
|
3859 |
if ( ! $this->is_pending_activation() ) {
|
3860 |
if ( ! $this->_menu->is_main_settings_page() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3861 |
if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
|
3862 |
// Show notice for new plugin installations.
|
3863 |
$this->_admin_notices->add(
|
3864 |
sprintf(
|
3865 |
-
$this->
|
3866 |
sprintf( '<b><a href="%s">%s</a></b>',
|
3867 |
$this->get_activation_url(),
|
3868 |
-
sprintf( $this->
|
|
|
3869 |
)
|
3870 |
),
|
3871 |
'',
|
@@ -3878,10 +4516,11 @@
|
|
3878 |
// Show notice for new plugin installations.
|
3879 |
$this->_admin_notices->add_sticky(
|
3880 |
sprintf(
|
3881 |
-
$this->
|
|
|
3882 |
sprintf( '<b><a href="%s">%s</a></b>',
|
3883 |
$this->get_activation_url(),
|
3884 |
-
sprintf( $this->
|
3885 |
)
|
3886 |
),
|
3887 |
'connect_account',
|
@@ -3891,7 +4530,7 @@
|
|
3891 |
}
|
3892 |
|
3893 |
if ( $this->has_filter( 'optin_pointer_element' ) ) {
|
3894 |
-
// Don't show
|
3895 |
wp_enqueue_script( 'wp-pointer' );
|
3896 |
wp_enqueue_style( 'wp-pointer' );
|
3897 |
|
@@ -3902,10 +4541,15 @@
|
|
3902 |
'_add_connect_pointer_script'
|
3903 |
) );
|
3904 |
}
|
3905 |
-
|
3906 |
}
|
3907 |
}
|
3908 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
3909 |
}
|
3910 |
|
3911 |
$this->_add_upgrade_action_link();
|
@@ -3934,7 +4578,7 @@
|
|
3934 |
* @since 1.1.4
|
3935 |
*/
|
3936 |
function _add_connect_pointer_script() {
|
3937 |
-
$vars = array( '
|
3938 |
$pointer_content = fs_get_template( 'connect.php', $vars );
|
3939 |
?>
|
3940 |
<script type="text/javascript">// <![CDATA[
|
@@ -4002,7 +4646,7 @@
|
|
4002 |
}
|
4003 |
|
4004 |
/**
|
4005 |
-
* Check if the current page is the plugin's main
|
4006 |
*
|
4007 |
* @author Vova Feldman (@svovaf)
|
4008 |
* @since 1.0.7
|
@@ -4025,13 +4669,27 @@
|
|
4025 |
* @param bool $store
|
4026 |
*/
|
4027 |
function _delete_site( $store = true ) {
|
4028 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4029 |
|
4030 |
-
if ( isset( $sites[ $
|
4031 |
-
unset( $sites[ $
|
4032 |
}
|
4033 |
|
4034 |
-
self
|
4035 |
}
|
4036 |
|
4037 |
/**
|
@@ -4045,11 +4703,11 @@
|
|
4045 |
private function _delete_plans( $store = true ) {
|
4046 |
$this->_logger->entrance();
|
4047 |
|
4048 |
-
$plans = self::get_all_plans();
|
4049 |
|
4050 |
unset( $plans[ $this->_slug ] );
|
4051 |
|
4052 |
-
|
4053 |
}
|
4054 |
|
4055 |
/**
|
@@ -4064,7 +4722,7 @@
|
|
4064 |
private function _delete_licenses( $store = true, $plugin_slug = false ) {
|
4065 |
$this->_logger->entrance();
|
4066 |
|
4067 |
-
$all_licenses = self::get_all_licenses();
|
4068 |
|
4069 |
if ( ! is_string( $plugin_slug ) ) {
|
4070 |
$plugin_slug = $this->_slug;
|
@@ -4072,7 +4730,7 @@
|
|
4072 |
|
4073 |
unset( $all_licenses[ $plugin_slug ] );
|
4074 |
|
4075 |
-
|
4076 |
}
|
4077 |
|
4078 |
/**
|
@@ -4100,6 +4758,100 @@
|
|
4100 |
return empty( $this->_storage->plugin_last_version );
|
4101 |
}
|
4102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4103 |
/**
|
4104 |
* Plugin activated hook.
|
4105 |
*
|
@@ -4120,52 +4872,60 @@
|
|
4120 |
// Clear API cache on activation.
|
4121 |
FS_Api::clear_cache();
|
4122 |
|
4123 |
-
|
4124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4125 |
|
|
|
4126 |
if ( $is_premium_version_activation ) {
|
4127 |
$this->reconnect_locally();
|
4128 |
}
|
4129 |
|
4130 |
-
$this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
|
4131 |
|
4132 |
// Schedule re-activation event and sync.
|
4133 |
// $this->sync_install( array(), true );
|
4134 |
$this->schedule_install_sync();
|
4135 |
|
4136 |
-
//
|
4137 |
-
// 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
|
4138 |
-
$other_version_basename = $is_premium_version_activation ?
|
4139 |
-
$this->_free_plugin_basename :
|
4140 |
-
$this->premium_plugin_basename();
|
4141 |
-
|
4142 |
-
/**
|
4143 |
-
* If the other module version is activate, deactivate it.
|
4144 |
-
*
|
4145 |
-
* @author Leo Fajardo (@leorw)
|
4146 |
-
* @since 1.2.2
|
4147 |
-
*/
|
4148 |
-
if ( is_plugin_active( $other_version_basename ) ) {
|
4149 |
-
deactivate_plugins( $other_version_basename );
|
4150 |
-
}
|
4151 |
-
|
4152 |
-
// If activating the premium module version, add an Admin notice to congratulate for an upgrade completion.
|
4153 |
if ( $is_premium_version_activation ) {
|
4154 |
$this->_admin_notices->add(
|
4155 |
-
sprintf( $this->
|
4156 |
-
$this->
|
|
|
4157 |
);
|
4158 |
}
|
4159 |
} else if ( $this->is_anonymous() ) {
|
4160 |
/**
|
4161 |
* Reset "skipped" click cache on the following:
|
4162 |
-
* 1.
|
4163 |
-
* 2.
|
|
|
4164 |
*
|
4165 |
-
* @
|
|
|
|
|
4166 |
*/
|
4167 |
if ( WP_FS__DEV_MODE ||
|
4168 |
-
|
|
|
|
|
|
|
4169 |
) {
|
4170 |
$this->reset_anonymous_mode();
|
4171 |
}
|
@@ -4192,7 +4952,9 @@
|
|
4192 |
! $this->_isAutoInstall
|
4193 |
) {
|
4194 |
// Store hint that the plugin was just activated to enable auto-redirection to settings.
|
4195 |
-
add_option(
|
|
|
|
|
4196 |
}
|
4197 |
|
4198 |
/**
|
@@ -4223,7 +4985,7 @@
|
|
4223 |
|
4224 |
$this->do_action( 'before_account_delete' );
|
4225 |
|
4226 |
-
// Clear all
|
4227 |
$this->_admin_notices->clear_all_sticky();
|
4228 |
|
4229 |
$this->_delete_site( false );
|
@@ -4349,6 +5111,16 @@
|
|
4349 |
*/
|
4350 |
private function reset_anonymous_mode() {
|
4351 |
unset( $this->_storage->is_anonymous );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4352 |
}
|
4353 |
|
4354 |
/**
|
@@ -4655,8 +5427,8 @@
|
|
4655 |
* @since 1.1.2
|
4656 |
*
|
4657 |
* @param string[] string $override
|
4658 |
-
* @param bool $include_plugins Since 1.1.8 by
|
4659 |
-
* @param bool $include_themes Since 1.1.8 by
|
4660 |
*
|
4661 |
* @return array
|
4662 |
*/
|
@@ -5027,17 +5799,31 @@
|
|
5027 |
if ( ! isset( $this->_plugin_data ) ) {
|
5028 |
self::require_plugin_essentials();
|
5029 |
|
5030 |
-
|
5031 |
-
|
5032 |
-
|
5033 |
-
|
5034 |
-
|
5035 |
-
|
5036 |
-
|
5037 |
-
$
|
5038 |
-
|
5039 |
-
|
5040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5041 |
}
|
5042 |
|
5043 |
return $this->_plugin_data;
|
@@ -5046,10 +5832,16 @@
|
|
5046 |
/**
|
5047 |
* @author Vova Feldman (@svovaf)
|
5048 |
* @since 1.0.1
|
|
|
5049 |
*
|
5050 |
* @return string Plugin slug.
|
5051 |
*/
|
5052 |
function get_slug() {
|
|
|
|
|
|
|
|
|
|
|
5053 |
return $this->_slug;
|
5054 |
}
|
5055 |
|
@@ -5142,8 +5934,8 @@
|
|
5142 |
// Get name.
|
5143 |
$this->_plugin_name = $plugin_data['Name'];
|
5144 |
|
5145 |
-
// Check if plugin name contains
|
5146 |
-
$suffix = '
|
5147 |
$suffix_len = strlen( $suffix );
|
5148 |
|
5149 |
if ( strlen( $plugin_data['Name'] ) > $suffix_len &&
|
@@ -5188,6 +5980,28 @@
|
|
5188 |
return $this->apply_filters( 'plugin_title', $title );
|
5189 |
}
|
5190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5191 |
/**
|
5192 |
* @author Vova Feldman (@svovaf)
|
5193 |
* @since 1.0.4
|
@@ -5195,6 +6009,14 @@
|
|
5195 |
* @return string
|
5196 |
*/
|
5197 |
function get_plugin_basename() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5198 |
return $this->_plugin_basename;
|
5199 |
}
|
5200 |
|
@@ -5272,10 +6094,12 @@
|
|
5272 |
}
|
5273 |
|
5274 |
/**
|
|
|
|
|
5275 |
* @return FS_Site[]
|
5276 |
*/
|
5277 |
-
private static function get_all_sites() {
|
5278 |
-
$sites = self
|
5279 |
|
5280 |
if ( ! is_array( $sites ) ) {
|
5281 |
$sites = array();
|
@@ -5284,14 +6108,70 @@
|
|
5284 |
return $sites;
|
5285 |
}
|
5286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5287 |
/**
|
5288 |
* @author Vova Feldman (@svovaf)
|
5289 |
* @since 1.0.6
|
5290 |
*
|
|
|
|
|
5291 |
* @return FS_Plugin_License[]
|
5292 |
*/
|
5293 |
-
private static function get_all_licenses() {
|
5294 |
-
$licenses = self
|
5295 |
|
5296 |
if ( ! is_array( $licenses ) ) {
|
5297 |
$licenses = array();
|
@@ -5301,10 +6181,12 @@
|
|
5301 |
}
|
5302 |
|
5303 |
/**
|
|
|
|
|
5304 |
* @return FS_Plugin_Plan[]
|
5305 |
*/
|
5306 |
-
private static function get_all_plans() {
|
5307 |
-
$plans = self
|
5308 |
|
5309 |
if ( ! is_array( $plans ) ) {
|
5310 |
$plans = array();
|
@@ -6142,7 +7024,7 @@
|
|
6142 |
*/
|
6143 |
function _add_license_activation_dialog_box() {
|
6144 |
$vars = array(
|
6145 |
-
'
|
6146 |
);
|
6147 |
|
6148 |
fs_require_template( 'forms/license-activation.php', $vars );
|
@@ -6157,10 +7039,12 @@
|
|
6157 |
* @since 1.2.1.5
|
6158 |
*/
|
6159 |
function _add_optout_dialog() {
|
6160 |
-
$
|
6161 |
-
|
6162 |
-
|
|
|
6163 |
|
|
|
6164 |
fs_require_template( 'forms/optout.php', $vars );
|
6165 |
}
|
6166 |
|
@@ -6187,7 +7071,7 @@
|
|
6187 |
}
|
6188 |
|
6189 |
// Add license activation link and AJAX request handler.
|
6190 |
-
if (
|
6191 |
/**
|
6192 |
* @since 1.2.0 Add license action link only on plugins page.
|
6193 |
*/
|
@@ -6216,10 +7100,10 @@
|
|
6216 |
exit;
|
6217 |
}
|
6218 |
|
6219 |
-
$
|
6220 |
-
$fs
|
6221 |
$this :
|
6222 |
-
$this->get_addon_instance( $
|
6223 |
|
6224 |
$error = false;
|
6225 |
$next_page = false;
|
@@ -6233,13 +7117,13 @@
|
|
6233 |
if ( isset( $install->error ) ) {
|
6234 |
$error = $install->error->message;
|
6235 |
} else {
|
6236 |
-
|
6237 |
-
$fs->get_parent_instance() :
|
6238 |
-
$fs;
|
6239 |
|
6240 |
-
|
|
|
|
|
6241 |
|
6242 |
-
|
6243 |
}
|
6244 |
} else {
|
6245 |
$next_page = $fs->opt_in( false, false, false, $license_key );
|
@@ -6332,7 +7216,7 @@
|
|
6332 |
);
|
6333 |
}
|
6334 |
|
6335 |
-
|
6336 |
'next_page' => $next_page,
|
6337 |
) );
|
6338 |
}
|
@@ -6366,9 +7250,9 @@
|
|
6366 |
$error = $result->error;
|
6367 |
|
6368 |
if ( in_array( $error->code, array( 'invalid_email', 'no_user' ) ) ) {
|
6369 |
-
$error = $this->
|
6370 |
} else if ( 'no_license' === $error->code ) {
|
6371 |
-
$error = $this->
|
6372 |
} else {
|
6373 |
$error = $error->message;
|
6374 |
}
|
@@ -6379,7 +7263,7 @@
|
|
6379 |
);
|
6380 |
|
6381 |
if ( false !== $error ) {
|
6382 |
-
$licenses['error'] = sprintf( '%s... %s', $this->
|
6383 |
}
|
6384 |
|
6385 |
echo json_encode( $licenses );
|
@@ -6387,6 +7271,44 @@
|
|
6387 |
exit;
|
6388 |
}
|
6389 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6390 |
/**
|
6391 |
* Helper method to check if user in the plugins page.
|
6392 |
*
|
@@ -6395,10 +7317,8 @@
|
|
6395 |
*
|
6396 |
* @return bool
|
6397 |
*/
|
6398 |
-
function is_plugins_page() {
|
6399 |
-
|
6400 |
-
|
6401 |
-
return ( 'plugins.php' === $pagenow );
|
6402 |
}
|
6403 |
|
6404 |
/**
|
@@ -6409,12 +7329,226 @@
|
|
6409 |
*
|
6410 |
* @return bool
|
6411 |
*/
|
6412 |
-
function is_themes_page() {
|
6413 |
-
|
6414 |
-
|
6415 |
-
return ( 'themes.php' === $pagenow );
|
6416 |
}
|
6417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6418 |
#----------------------------------------------------------------------------------
|
6419 |
#region URL Generators
|
6420 |
#----------------------------------------------------------------------------------
|
@@ -6602,7 +7736,32 @@
|
|
6602 |
* @return bool
|
6603 |
*/
|
6604 |
function is_plugin() {
|
6605 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6606 |
}
|
6607 |
|
6608 |
/**
|
@@ -6676,7 +7835,7 @@
|
|
6676 |
}
|
6677 |
|
6678 |
// Verify the call is relevant for the plugin.
|
6679 |
-
if ( $this->
|
6680 |
return false;
|
6681 |
}
|
6682 |
|
@@ -6705,19 +7864,20 @@
|
|
6705 |
* @since 1.2.0
|
6706 |
*
|
6707 |
* @param array|string $actions Collection of AJAX actions.
|
6708 |
-
* @param
|
6709 |
*
|
6710 |
* @return bool
|
6711 |
*/
|
6712 |
-
static function is_ajax_action_static( $actions, $
|
6713 |
// Verify it's an ajax call.
|
6714 |
if ( ! self::is_ajax() ) {
|
6715 |
return false;
|
6716 |
}
|
6717 |
|
6718 |
-
|
|
|
6719 |
// Verify the call is relevant for the plugin.
|
6720 |
-
if ( $
|
6721 |
return false;
|
6722 |
}
|
6723 |
}
|
@@ -6731,7 +7891,7 @@
|
|
6731 |
$ajax_action = fs_request_get( 'action' );
|
6732 |
|
6733 |
foreach ( $actions as $action ) {
|
6734 |
-
if ( $ajax_action === self::get_ajax_action_static( $action, $
|
6735 |
return true;
|
6736 |
}
|
6737 |
}
|
@@ -6746,12 +7906,12 @@
|
|
6746 |
*
|
6747 |
* @return bool
|
6748 |
*/
|
6749 |
-
function is_cron() {
|
6750 |
return ( defined( 'DOING_CRON' ) && DOING_CRON );
|
6751 |
}
|
6752 |
|
6753 |
/**
|
6754 |
-
* Check if a real user is visiting the
|
6755 |
*
|
6756 |
* @author Vova Feldman (@svovaf)
|
6757 |
* @since 1.1.7
|
@@ -6759,7 +7919,19 @@
|
|
6759 |
* @return bool
|
6760 |
*/
|
6761 |
function is_user_in_admin() {
|
6762 |
-
return is_admin() && ! self::is_ajax() && !
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6763 |
}
|
6764 |
|
6765 |
/**
|
@@ -6794,13 +7966,25 @@
|
|
6794 |
|
6795 |
$page_param = $this->_menu->get_slug( $page );
|
6796 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6797 |
if ( ! $this->has_settings_menu() ) {
|
6798 |
if ( ! empty( $page ) ) {
|
6799 |
// Module doesn't have a setting page, but since the request is for
|
6800 |
-
// a specific Freemius page, use the
|
6801 |
return add_query_arg( array_merge( $params, array(
|
6802 |
'page' => $page_param,
|
6803 |
-
) ), admin_url( '
|
6804 |
} else {
|
6805 |
if ( $this->is_activation_mode() ) {
|
6806 |
/**
|
@@ -6811,10 +7995,13 @@
|
|
6811 |
*/
|
6812 |
return add_query_arg( array_merge( $params, array(
|
6813 |
'page' => $this->_slug,
|
6814 |
-
) ), admin_url( '
|
6815 |
} else {
|
6816 |
// Plugin without a settings page.
|
6817 |
-
|
|
|
|
|
|
|
6818 |
}
|
6819 |
}
|
6820 |
}
|
@@ -6824,11 +8011,11 @@
|
|
6824 |
$parent_slug = $this->_menu->get_parent_slug();
|
6825 |
$menu_file = ( false !== strpos( $parent_slug, '.php' ) ) ?
|
6826 |
$parent_slug :
|
6827 |
-
'
|
6828 |
|
6829 |
return add_query_arg( array_merge( $params, array(
|
6830 |
'page' => $page_param,
|
6831 |
-
) ), admin_url( $menu_file, '
|
6832 |
}
|
6833 |
|
6834 |
// Module has a top level CPT settings page.
|
@@ -6836,7 +8023,7 @@
|
|
6836 |
if ( empty( $page ) && $this->is_activation_mode() ) {
|
6837 |
return add_query_arg( array_merge( $params, array(
|
6838 |
'page' => $page_param
|
6839 |
-
) ), admin_url( '
|
6840 |
} else {
|
6841 |
if ( ! empty( $page ) ) {
|
6842 |
$params['page'] = $page_param;
|
@@ -6844,7 +8031,7 @@
|
|
6844 |
|
6845 |
return add_query_arg(
|
6846 |
$params,
|
6847 |
-
admin_url( $this->_menu->get_raw_slug(), '
|
6848 |
);
|
6849 |
}
|
6850 |
}
|
@@ -6852,7 +8039,49 @@
|
|
6852 |
// Module has a custom top level settings page.
|
6853 |
return add_query_arg( array_merge( $params, array(
|
6854 |
'page' => $page_param,
|
6855 |
-
) ), admin_url( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6856 |
}
|
6857 |
|
6858 |
/**
|
@@ -6873,7 +8102,7 @@
|
|
6873 |
}
|
6874 |
|
6875 |
return $this->get_account_url(
|
6876 |
-
$this->
|
6877 |
$params,
|
6878 |
$add_action_nonce
|
6879 |
);
|
@@ -7068,7 +8297,7 @@
|
|
7068 |
*
|
7069 |
* @return FS_Entity Return an decrypted clone entity.
|
7070 |
*/
|
7071 |
-
private static function
|
7072 |
$clone = clone $entity;
|
7073 |
$props = get_object_vars( $entity );
|
7074 |
|
@@ -7170,10 +8399,10 @@
|
|
7170 |
|
7171 |
$this->do_action( 'before_account_load' );
|
7172 |
|
7173 |
-
$sites = self::get_all_sites();
|
7174 |
$users = self::get_all_users();
|
7175 |
-
$plans = self::get_all_plans();
|
7176 |
-
$licenses = self::get_all_licenses();
|
7177 |
|
7178 |
if ( $this->_logger->is_on() && is_admin() ) {
|
7179 |
$this->_logger->log( 'sites = ' . var_export( $sites, true ) );
|
@@ -7191,10 +8420,21 @@
|
|
7191 |
) {
|
7192 |
// Load site.
|
7193 |
$this->_site = clone $site;
|
7194 |
-
$this->_site->plan = self::
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7195 |
|
7196 |
// Load relevant user.
|
7197 |
-
$this->_user = clone $users[ $
|
7198 |
|
7199 |
// Load plans.
|
7200 |
$this->_plans = $plans[ $this->_slug ];
|
@@ -7203,7 +8443,7 @@
|
|
7203 |
} else {
|
7204 |
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
7205 |
if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) {
|
7206 |
-
$this->_plans[ $i ] = self::
|
7207 |
} else {
|
7208 |
unset( $this->_plans[ $i ] );
|
7209 |
}
|
@@ -7268,15 +8508,12 @@
|
|
7268 |
|
7269 |
$current_user = self::_get_current_wp_user();
|
7270 |
|
7271 |
-
$activation_action = $this->
|
7272 |
$return_url = $this->is_anonymous() ?
|
7273 |
// If skipped already, then return to the account page.
|
7274 |
$this->get_account_url( $activation_action, array(), false ) :
|
7275 |
// Return to the module's main page.
|
7276 |
-
$this->
|
7277 |
-
'',
|
7278 |
-
array( 'fs_action' => $activation_action )
|
7279 |
-
);
|
7280 |
|
7281 |
$params = array(
|
7282 |
'user_firstname' => $current_user->user_firstname,
|
@@ -7345,6 +8582,7 @@
|
|
7345 |
* In this case, the user and site info will be sent to the server but no
|
7346 |
* data will be saved to the WP installation's database.
|
7347 |
* @param number|bool $trial_plan_id
|
|
|
7348 |
*
|
7349 |
* @return string|object
|
7350 |
* @use WP_Error
|
@@ -7355,7 +8593,8 @@
|
|
7355 |
$last = false,
|
7356 |
$license_key = false,
|
7357 |
$is_uninstall = false,
|
7358 |
-
$trial_plan_id = false
|
|
|
7359 |
) {
|
7360 |
$this->_logger->entrance();
|
7361 |
|
@@ -7408,7 +8647,28 @@
|
|
7408 |
);
|
7409 |
}
|
7410 |
|
7411 |
-
$params['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7412 |
|
7413 |
$url = WP_FS__ADDRESS . '/action/service/user/install/';
|
7414 |
if ( isset( $_COOKIE['XDEBUG_SESSION'] ) ) {
|
@@ -7465,7 +8725,19 @@
|
|
7465 |
return true;
|
7466 |
}
|
7467 |
|
7468 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7469 |
|
7470 |
if ( empty( $decoded ) ) {
|
7471 |
return false;
|
@@ -7483,7 +8755,9 @@
|
|
7483 |
} else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) {
|
7484 |
// Pending activation, add message.
|
7485 |
return $this->set_pending_confirmation(
|
7486 |
-
|
|
|
|
|
7487 |
false,
|
7488 |
$filtered_license_key,
|
7489 |
! empty( $params['trial_plan_id'] )
|
@@ -7549,7 +8823,7 @@
|
|
7549 |
|
7550 |
$this->_admin_notices->remove_sticky( 'connect_account' );
|
7551 |
|
7552 |
-
if ( $this->is_pending_activation() ) {
|
7553 |
// Remove pending activation sticky notice (if still exist).
|
7554 |
$this->_admin_notices->remove_sticky( 'activation_pending' );
|
7555 |
|
@@ -7558,31 +8832,32 @@
|
|
7558 |
|
7559 |
if ( ! $this->is_paying_or_trial() ) {
|
7560 |
$this->_admin_notices->add_sticky(
|
7561 |
-
sprintf( $this->
|
|
|
7562 |
'activation_complete'
|
7563 |
);
|
7564 |
}
|
7565 |
}
|
7566 |
|
7567 |
if ( $this->is_paying_or_trial() ) {
|
7568 |
-
if ( ! $this->is_premium() || ! $this->has_premium_version() ) {
|
7569 |
if ( $this->is_paying() ) {
|
7570 |
$this->_admin_notices->add_sticky(
|
7571 |
sprintf(
|
7572 |
-
$this->
|
7573 |
$this->_site->plan->title
|
7574 |
) . $this->get_complete_upgrade_instructions(),
|
7575 |
'plan_upgraded',
|
7576 |
-
$this->
|
7577 |
);
|
7578 |
} else {
|
7579 |
$this->_admin_notices->add_sticky(
|
7580 |
sprintf(
|
7581 |
-
$this->
|
7582 |
'<i>' . $this->get_plugin_name() . '</i>'
|
7583 |
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
7584 |
'trial_started',
|
7585 |
-
$this->
|
7586 |
);
|
7587 |
}
|
7588 |
}
|
@@ -7653,7 +8928,10 @@
|
|
7653 |
return;
|
7654 |
}
|
7655 |
|
7656 |
-
if ( fs_request_is_action( $this->
|
|
|
|
|
|
|
7657 |
// check_admin_referer( $this->_slug . '_activate_new' );
|
7658 |
|
7659 |
if ( fs_request_has( 'user_secret_key' ) ) {
|
@@ -7796,7 +9074,7 @@
|
|
7796 |
return;
|
7797 |
}
|
7798 |
|
7799 |
-
if ( fs_request_is_action( $this->
|
7800 |
// check_admin_referer( 'activate_existing_' . $this->_plugin->public_key );
|
7801 |
|
7802 |
/**
|
@@ -7864,14 +9142,26 @@
|
|
7864 |
$install = $this->apply_filters( 'after_install_failure', $install, $args );
|
7865 |
|
7866 |
$this->_admin_notices->add(
|
7867 |
-
sprintf( $this->
|
7868 |
-
$this->
|
7869 |
-
$this->
|
7870 |
'error'
|
7871 |
);
|
7872 |
|
7873 |
if ( $redirect ) {
|
7874 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7875 |
}
|
7876 |
|
7877 |
return $install;
|
@@ -7908,9 +9198,9 @@
|
|
7908 |
|
7909 |
if ( isset( $addon_install->error ) ) {
|
7910 |
$this->_admin_notices->add(
|
7911 |
-
sprintf( $this->
|
7912 |
-
$this->
|
7913 |
-
$this->
|
7914 |
'error'
|
7915 |
);
|
7916 |
|
@@ -7939,6 +9229,69 @@
|
|
7939 |
$this->_activate_license( true );
|
7940 |
}
|
7941 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7942 |
#endregion
|
7943 |
|
7944 |
#----------------------------------------------------------------------------------
|
@@ -7947,6 +9300,16 @@
|
|
7947 |
|
7948 |
private $_menu_items = array();
|
7949 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7950 |
/**
|
7951 |
* @author Vova Feldman (@svovaf)
|
7952 |
* @since 1.0.7
|
@@ -7987,14 +9350,30 @@
|
|
7987 |
*/
|
7988 |
private function add_menu_action() {
|
7989 |
if ( $this->is_activation_mode() ) {
|
7990 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7991 |
} else {
|
7992 |
-
|
7993 |
-
|
7994 |
-
|
|
|
|
|
|
|
|
|
|
|
7995 |
) {
|
7996 |
-
$this->_install_with_new_user();
|
7997 |
-
} else if ( fs_request_is_action( 'sync_user' ) && ! $this->has_settings_menu() ) {
|
7998 |
$this->_handle_account_user_sync();
|
7999 |
}
|
8000 |
}
|
@@ -8025,7 +9404,7 @@
|
|
8025 |
}
|
8026 |
|
8027 |
/**
|
8028 |
-
* Remove plugin's all
|
8029 |
*
|
8030 |
* @author Vova Feldman (@svovaf)
|
8031 |
* @since 1.0.1
|
@@ -8062,7 +9441,8 @@
|
|
8062 |
$menus = array( $this->_menu->get_parent_slug() );
|
8063 |
|
8064 |
if ( $this->_menu->is_override_exact() ) {
|
8065 |
-
|
|
|
8066 |
return;
|
8067 |
}
|
8068 |
}
|
@@ -8082,15 +9462,15 @@
|
|
8082 |
}
|
8083 |
|
8084 |
if ( $this->is_activation_page() ) {
|
8085 |
-
// Clean
|
8086 |
self::_clean_admin_content_section();
|
8087 |
}
|
8088 |
|
8089 |
if ( false !== $hook ) {
|
8090 |
-
if ( fs_request_is_action( $this->
|
8091 |
-
|
8092 |
-
} else if ( fs_request_is_action( $this->
|
8093 |
-
|
8094 |
}
|
8095 |
}
|
8096 |
}
|
@@ -8132,7 +9512,45 @@
|
|
8132 |
}
|
8133 |
|
8134 |
/**
|
8135 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8136 |
*
|
8137 |
* @author Vova Feldman (@svovaf)
|
8138 |
* @since 1.0.0
|
@@ -8141,26 +9559,51 @@
|
|
8141 |
$this->_logger->entrance();
|
8142 |
|
8143 |
if ( ! $this->is_addon() ) {
|
8144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8145 |
if ( $this->is_registered() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8146 |
// Add user account page.
|
8147 |
$this->add_submenu_item(
|
8148 |
-
$this->
|
8149 |
array( &$this, '_account_page_render' ),
|
8150 |
-
$this->get_plugin_name() . ' – ' . $this->
|
8151 |
'manage_options',
|
8152 |
'account',
|
8153 |
array( &$this, '_account_page_load' ),
|
8154 |
WP_FS__DEFAULT_PRIORITY,
|
8155 |
-
$
|
8156 |
);
|
8157 |
}
|
8158 |
|
8159 |
// Add contact page.
|
8160 |
$this->add_submenu_item(
|
8161 |
-
$this->
|
8162 |
array( &$this, '_contact_page_render' ),
|
8163 |
-
$this->get_plugin_name() . ' – ' . $this->
|
8164 |
'manage_options',
|
8165 |
'contact',
|
8166 |
'Freemius::_clean_admin_content_section',
|
@@ -8170,9 +9613,9 @@
|
|
8170 |
|
8171 |
if ( $this->has_addons() ) {
|
8172 |
$this->add_submenu_item(
|
8173 |
-
$this->
|
8174 |
array( &$this, '_addons_page_render' ),
|
8175 |
-
$this->get_plugin_name() . ' – ' . $this->
|
8176 |
'manage_options',
|
8177 |
'addons',
|
8178 |
array( &$this, '_addons_page_load' ),
|
@@ -8182,37 +9625,28 @@
|
|
8182 |
}
|
8183 |
|
8184 |
$show_pricing = (
|
8185 |
-
// Has at least one paid plan.
|
8186 |
-
$this->has_paid_plan() &&
|
8187 |
-
// Didn't ask to hide the pricing page.
|
8188 |
$this->is_submenu_item_visible( 'pricing' ) &&
|
8189 |
-
|
8190 |
-
( ! $this->is_paying() || ! $this->is_single_plan() )
|
8191 |
);
|
8192 |
-
// If user don't have paid plans, add pricing page
|
8193 |
-
// to support add-ons checkout but don't add the submenu item.
|
8194 |
-
// || (isset( $_GET['page'] ) && $this->_menu->get_slug( 'pricing' ) == $_GET['page']);
|
8195 |
|
8196 |
-
$
|
8197 |
$pricing_class = 'upgrade-mode';
|
8198 |
if ( $show_pricing ) {
|
8199 |
-
if ( $this->
|
8200 |
! $this->is_paying_or_trial()
|
8201 |
) {
|
8202 |
// If running a trial promotion, modify the pricing to load the trial.
|
8203 |
-
$pricing_cta_slug = 'start-trial';
|
8204 |
$pricing_class = 'trial-mode';
|
8205 |
} else if ( $this->is_paying() ) {
|
8206 |
-
$pricing_cta_slug = 'pricing';
|
8207 |
$pricing_class = '';
|
8208 |
}
|
8209 |
}
|
8210 |
|
8211 |
// Add upgrade/pricing page.
|
8212 |
$this->add_submenu_item(
|
8213 |
-
|
8214 |
array( &$this, '_pricing_page_render' ),
|
8215 |
-
$this->get_plugin_name() . ' – ' . $this->
|
8216 |
'manage_options',
|
8217 |
'pricing',
|
8218 |
'Freemius::_clean_admin_content_section',
|
@@ -8260,7 +9694,7 @@
|
|
8260 |
|
8261 |
$menu_item = sprintf(
|
8262 |
$item_template,
|
8263 |
-
$this->
|
8264 |
$item['menu_slug'],
|
8265 |
! empty( $item['class'] ) ? $item['class'] : '',
|
8266 |
$item['menu_title']
|
@@ -8285,7 +9719,9 @@
|
|
8285 |
}
|
8286 |
} else {
|
8287 |
FS_Admin_Menu_Manager::add_subpage(
|
8288 |
-
$
|
|
|
|
|
8289 |
$item['page_title'],
|
8290 |
$menu_item,
|
8291 |
$capability,
|
@@ -8310,12 +9746,12 @@
|
|
8310 |
$menu_slug = $this->_menu->get_top_level_menu_slug();
|
8311 |
|
8312 |
/**
|
8313 |
-
* Before "admin_menu" fires, WordPress will loop over the
|
8314 |
* does not have permissions. So in case a plugin does not have top-level menu but does have submenus under any
|
8315 |
-
* of the
|
8316 |
* Support Forum, etc.) since $submenu[ $menu_slug ] will be empty if the user doesn't have permission.
|
8317 |
*
|
8318 |
-
* In case a plugin does not have submenus under any of the
|
8319 |
* of another plugin, only users that have the right role can access its sub-submenus since we will use the
|
8320 |
* capability needed to access the parent menu as the capability for the submenus that we will add.
|
8321 |
*/
|
@@ -8357,6 +9793,18 @@
|
|
8357 |
ksort( $top_level_menu );
|
8358 |
}
|
8359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8360 |
/**
|
8361 |
* Displays the Support Forum link when enabled.
|
8362 |
*
|
@@ -8377,15 +9825,14 @@
|
|
8377 |
}
|
8378 |
|
8379 |
if ( ! $this->is_activation_mode() ) {
|
8380 |
-
|
8381 |
-
$this->
|
8382 |
-
|
8383 |
-
|
8384 |
-
|
8385 |
-
|
8386 |
-
|
8387 |
-
|
8388 |
-
}
|
8389 |
}
|
8390 |
}
|
8391 |
|
@@ -8461,14 +9908,15 @@
|
|
8461 |
* @param bool $menu_slug
|
8462 |
* @param string $capability
|
8463 |
* @param int $priority
|
8464 |
-
*
|
8465 |
*/
|
8466 |
function add_submenu_link_item(
|
8467 |
$menu_title,
|
8468 |
$url,
|
8469 |
$menu_slug = false,
|
8470 |
$capability = 'read',
|
8471 |
-
$priority = WP_FS__DEFAULT_PRIORITY
|
|
|
8472 |
) {
|
8473 |
$this->_logger->entrance( 'Title = ' . $menu_title . '; Url = ' . $url );
|
8474 |
|
@@ -8481,7 +9929,8 @@
|
|
8481 |
$url,
|
8482 |
$menu_slug,
|
8483 |
$capability,
|
8484 |
-
$priority
|
|
|
8485 |
);
|
8486 |
|
8487 |
return;
|
@@ -8500,11 +9949,13 @@
|
|
8500 |
'page_title' => $menu_title,
|
8501 |
'render_function' => 'fs_dummy',
|
8502 |
'before_render_function' => '',
|
|
|
8503 |
);
|
8504 |
}
|
8505 |
|
8506 |
#endregion ------------------------------------------------------------------
|
8507 |
|
|
|
8508 |
#--------------------------------------------------------------------------------
|
8509 |
#region Actions / Hooks / Filters
|
8510 |
#--------------------------------------------------------------------------------
|
@@ -8518,7 +9969,7 @@
|
|
8518 |
* @return string
|
8519 |
*/
|
8520 |
public function get_action_tag( $tag ) {
|
8521 |
-
return self::get_action_tag_static( $tag, $this->_slug );
|
8522 |
}
|
8523 |
|
8524 |
/**
|
@@ -8527,23 +9978,67 @@
|
|
8527 |
*
|
8528 |
* @param string $tag
|
8529 |
* @param string $slug
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8530 |
*
|
8531 |
* @return string
|
8532 |
*/
|
8533 |
-
static function
|
8534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8535 |
}
|
8536 |
|
8537 |
/**
|
8538 |
* @author Vova Feldman (@svovaf)
|
8539 |
* @since 1.2.1
|
|
|
|
|
8540 |
*
|
8541 |
* @param string $tag
|
8542 |
*
|
8543 |
* @return string
|
8544 |
*/
|
8545 |
function get_ajax_action( $tag ) {
|
8546 |
-
return self::get_ajax_action_static( $tag, $this->
|
8547 |
}
|
8548 |
|
8549 |
/**
|
@@ -8571,17 +10066,19 @@
|
|
8571 |
/**
|
8572 |
* @author Vova Feldman (@svovaf)
|
8573 |
* @since 1.2.1.6
|
|
|
|
|
8574 |
*
|
8575 |
-
* @param string
|
8576 |
-
* @param
|
8577 |
*
|
8578 |
* @return string
|
8579 |
*/
|
8580 |
-
private static function get_ajax_action_static( $tag, $
|
8581 |
$action = "fs_{$tag}";
|
8582 |
|
8583 |
-
if ( ! empty( $
|
8584 |
-
$action .= "_{$
|
8585 |
}
|
8586 |
|
8587 |
return $action;
|
@@ -8659,7 +10156,7 @@
|
|
8659 |
$tag,
|
8660 |
$function_to_add,
|
8661 |
$priority,
|
8662 |
-
$this->
|
8663 |
);
|
8664 |
}
|
8665 |
|
@@ -8669,10 +10166,10 @@
|
|
8669 |
* @author Vova Feldman (@svovaf)
|
8670 |
* @since 1.2.1.6
|
8671 |
*
|
8672 |
-
* @param string
|
8673 |
-
* @param callable
|
8674 |
-
* @param int
|
8675 |
-
* @param
|
8676 |
*
|
8677 |
* @return bool True if action added, false if no need to add the action since the AJAX call isn't matching.
|
8678 |
* @uses add_action()
|
@@ -8682,16 +10179,16 @@
|
|
8682 |
$tag,
|
8683 |
$function_to_add,
|
8684 |
$priority = WP_FS__DEFAULT_PRIORITY,
|
8685 |
-
$
|
8686 |
) {
|
8687 |
self::$_static_logger->entrance( $tag );
|
8688 |
|
8689 |
-
if ( ! self::is_ajax_action_static( $tag, $
|
8690 |
return false;
|
8691 |
}
|
8692 |
|
8693 |
add_action(
|
8694 |
-
'wp_ajax_' . self::get_ajax_action_static( $tag, $
|
8695 |
$function_to_add,
|
8696 |
$priority,
|
8697 |
0
|
@@ -8760,7 +10257,7 @@
|
|
8760 |
$this->_logger->entrance( $tag );
|
8761 |
|
8762 |
$args = func_get_args();
|
8763 |
-
array_unshift( $args, $this->
|
8764 |
|
8765 |
return call_user_func_array( 'fs_apply_filter', $args );
|
8766 |
}
|
@@ -8806,7 +10303,7 @@
|
|
8806 |
#endregion
|
8807 |
|
8808 |
/**
|
8809 |
-
* Override
|
8810 |
*
|
8811 |
* @author Vova Feldman (@svovaf)
|
8812 |
* @since 1.1.6
|
@@ -8841,9 +10338,26 @@
|
|
8841 |
$encrypted_site = clone $this->_site;
|
8842 |
$encrypted_site->plan = self::_encrypt_entity( $this->_site->plan );
|
8843 |
|
8844 |
-
$sites
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8845 |
$sites[ $this->_slug ] = $encrypted_site;
|
8846 |
-
|
|
|
8847 |
}
|
8848 |
|
8849 |
/**
|
@@ -8857,7 +10371,7 @@
|
|
8857 |
private function _store_plans( $store = true ) {
|
8858 |
$this->_logger->entrance();
|
8859 |
|
8860 |
-
$plans = self::get_all_plans();
|
8861 |
|
8862 |
// Copy plans.
|
8863 |
$encrypted_plans = array();
|
@@ -8866,7 +10380,8 @@
|
|
8866 |
}
|
8867 |
|
8868 |
$plans[ $this->_slug ] = $encrypted_plans;
|
8869 |
-
|
|
|
8870 |
}
|
8871 |
|
8872 |
/**
|
@@ -8882,7 +10397,7 @@
|
|
8882 |
private function _store_licenses( $store = true, $plugin_slug = false, $licenses = array() ) {
|
8883 |
$this->_logger->entrance();
|
8884 |
|
8885 |
-
$all_licenses = self::get_all_licenses();
|
8886 |
|
8887 |
if ( ! is_string( $plugin_slug ) ) {
|
8888 |
$plugin_slug = $this->_slug;
|
@@ -8895,7 +10410,7 @@
|
|
8895 |
|
8896 |
$all_licenses[ $plugin_slug ][ $this->_user->id ] = $licenses;
|
8897 |
|
8898 |
-
|
8899 |
}
|
8900 |
|
8901 |
/**
|
@@ -9051,10 +10566,10 @@
|
|
9051 |
$this->do_action( 'account_email_verified', $user->email );
|
9052 |
|
9053 |
$this->_admin_notices->add(
|
9054 |
-
$this->
|
9055 |
-
$this->
|
9056 |
'success',
|
9057 |
-
// Make
|
9058 |
// since the page will be auto redirected to the plugin's
|
9059 |
// main settings page, and the non-sticky message
|
9060 |
// will disappear.
|
@@ -9184,21 +10699,24 @@
|
|
9184 |
* @return FS_Plugin_Plan[]|object
|
9185 |
*/
|
9186 |
private function _fetch_plugin_plans() {
|
9187 |
-
|
9188 |
-
|
9189 |
|
9190 |
-
|
|
|
|
|
|
|
9191 |
|
9192 |
-
|
9193 |
-
|
9194 |
-
|
9195 |
-
|
9196 |
|
9197 |
-
|
9198 |
-
|
9199 |
|
9200 |
-
|
9201 |
-
|
9202 |
|
9203 |
/**
|
9204 |
* @author Vova Feldman (@svovaf)
|
@@ -9293,10 +10811,11 @@
|
|
9293 |
* @uses FS_Api
|
9294 |
*
|
9295 |
* @param number|bool $plugin_id
|
|
|
9296 |
*
|
9297 |
* @return FS_Payment[]|object
|
9298 |
*/
|
9299 |
-
function _fetch_payments( $plugin_id = false ) {
|
9300 |
$this->_logger->entrance();
|
9301 |
|
9302 |
$api = $this->get_api_user_scope();
|
@@ -9305,7 +10824,7 @@
|
|
9305 |
$plugin_id = $this->_plugin->id;
|
9306 |
}
|
9307 |
|
9308 |
-
$result = $api->get( "/plugins/{$plugin_id}/payments.json?include_addons=true",
|
9309 |
|
9310 |
if ( ! isset( $result->error ) ) {
|
9311 |
for ( $i = 0, $len = count( $result->payments ); $i < $len; $i ++ ) {
|
@@ -9322,12 +10841,14 @@
|
|
9322 |
* @since 1.2.1.5
|
9323 |
* @uses FS_Api
|
9324 |
*
|
|
|
|
|
9325 |
* @return \FS_Billing|mixed
|
9326 |
*/
|
9327 |
-
function _fetch_billing() {
|
9328 |
require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-billing.php';
|
9329 |
|
9330 |
-
$billing = $this->get_api_user_scope()->
|
9331 |
|
9332 |
if ( $this->is_api_result_entity( $billing ) ) {
|
9333 |
$billing = new FS_Billing( $billing );
|
@@ -9379,11 +10900,12 @@
|
|
9379 |
*
|
9380 |
* @param bool|number $plugin_id
|
9381 |
* @param bool $flush Since 1.1.7.3
|
|
|
9382 |
*
|
9383 |
* @return object|false New plugin tag info if exist.
|
9384 |
*/
|
9385 |
-
private function _fetch_newer_version( $plugin_id = false, $flush = true ) {
|
9386 |
-
$latest_tag = $this->_fetch_latest_version( $plugin_id, $flush );
|
9387 |
|
9388 |
if ( ! is_object( $latest_tag ) ) {
|
9389 |
return false;
|
@@ -9406,18 +10928,19 @@
|
|
9406 |
* @since 1.0.5
|
9407 |
*
|
9408 |
* @param bool|number $plugin_id
|
9409 |
-
* @param bool $flush
|
|
|
9410 |
*
|
9411 |
* @return bool|FS_Plugin_Tag
|
9412 |
*/
|
9413 |
-
function get_update( $plugin_id = false, $flush = true ) {
|
9414 |
$this->_logger->entrance();
|
9415 |
|
9416 |
if ( ! is_numeric( $plugin_id ) ) {
|
9417 |
$plugin_id = $this->_plugin->id;
|
9418 |
}
|
9419 |
|
9420 |
-
$this->check_updates( true, $plugin_id, $flush );
|
9421 |
$updates = $this->get_all_updates();
|
9422 |
|
9423 |
return isset( $updates[ $plugin_id ] ) && is_object( $updates[ $plugin_id ] ) ? $updates[ $plugin_id ] : false;
|
@@ -9493,7 +11016,8 @@
|
|
9493 |
* @return bool
|
9494 |
*/
|
9495 |
function is_user_admin() {
|
9496 |
-
return current_user_can( 'activate_plugins' )
|
|
|
9497 |
}
|
9498 |
|
9499 |
/**
|
@@ -9505,7 +11029,7 @@
|
|
9505 |
* @uses FS_Api
|
9506 |
*
|
9507 |
* @param bool $background Hints the method if it's a background sync. If false, it means that was initiated by
|
9508 |
-
* the
|
9509 |
*/
|
9510 |
private function _sync_license( $background = false ) {
|
9511 |
$this->_logger->entrance();
|
@@ -9567,7 +11091,7 @@
|
|
9567 |
if ( $this->is_array_instanceof( $licenses, 'FS_Plugin_License' ) ) {
|
9568 |
$this->_update_licenses( $licenses, $addon->slug );
|
9569 |
|
9570 |
-
if ( ! $this->is_addon_installed( $addon->
|
9571 |
$plans_result = $this->get_api_site_or_plugin_scope()->get( "/addons/{$addon_id}/plans.json" );
|
9572 |
|
9573 |
if ( ! isset( $plans_result->error ) ) {
|
@@ -9577,24 +11101,18 @@
|
|
9577 |
}
|
9578 |
|
9579 |
$this->_admin_notices->add_sticky(
|
9580 |
-
|
9581 |
-
|
9582 |
-
$this->
|
9583 |
-
|
9584 |
-
|
9585 |
-
|
9586 |
-
|
9587 |
-
)
|
9588 |
-
|
9589 |
-
|
9590 |
-
$this->get_text( 'addon-successfully-purchased-message' ),
|
9591 |
-
$addon->title
|
9592 |
-
) . ' ' . $this->get_latest_download_link(
|
9593 |
-
$this->get_text( 'download-latest-version' ),
|
9594 |
-
$addon_id
|
9595 |
-
),
|
9596 |
'addon_plan_upgraded_' . $addon->slug,
|
9597 |
-
$this->
|
9598 |
);
|
9599 |
}
|
9600 |
}
|
@@ -9609,7 +11127,7 @@
|
|
9609 |
* @uses FS_Api
|
9610 |
*
|
9611 |
* @param bool $background Hints the method if it's a background sync. If false, it means that was initiated by
|
9612 |
-
* the
|
9613 |
*/
|
9614 |
private function _sync_plugin_license( $background = false ) {
|
9615 |
$this->_logger->entrance();
|
@@ -9639,11 +11157,11 @@
|
|
9639 |
if ( ! self::$_global_admin_notices->has_sticky( 'api_blocked' ) ) {
|
9640 |
self::$_global_admin_notices->add(
|
9641 |
sprintf(
|
9642 |
-
$this->
|
9643 |
$this->get_plugin_name(),
|
9644 |
'<a href="' . $api->get_url() . '" target="_blank">' . $api->get_url() . '</a>'
|
9645 |
-
) . '<br> ' . $this->
|
9646 |
-
$this->
|
9647 |
'error',
|
9648 |
$background,
|
9649 |
false,
|
@@ -9653,8 +11171,8 @@
|
|
9653 |
} else {
|
9654 |
// Authentication params are broken.
|
9655 |
$this->_admin_notices->add(
|
9656 |
-
$this->
|
9657 |
-
$this->
|
9658 |
'error'
|
9659 |
);
|
9660 |
}
|
@@ -9770,6 +11288,8 @@
|
|
9770 |
}
|
9771 |
}
|
9772 |
|
|
|
|
|
9773 |
if ( $this->has_paid_plan() ) {
|
9774 |
switch ( $plan_change ) {
|
9775 |
case 'none':
|
@@ -9781,19 +11301,19 @@
|
|
9781 |
if ( $plan->is_free() ) {
|
9782 |
$this->_admin_notices->add(
|
9783 |
sprintf(
|
9784 |
-
$this->
|
9785 |
-
'<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . $this->
|
9786 |
) . ' ' . sprintf(
|
9787 |
'<a href="%s">%s</a>',
|
9788 |
$this->contact_url(
|
9789 |
'bug',
|
9790 |
-
sprintf( $this->
|
9791 |
strtoupper( $plan->name )
|
9792 |
)
|
9793 |
),
|
9794 |
-
$this->
|
9795 |
),
|
9796 |
-
$
|
9797 |
);
|
9798 |
}
|
9799 |
}
|
@@ -9801,11 +11321,11 @@
|
|
9801 |
case 'upgraded':
|
9802 |
$this->_admin_notices->add_sticky(
|
9803 |
sprintf(
|
9804 |
-
$this->
|
9805 |
'<i>' . $this->get_plugin_name() . '</i>'
|
9806 |
) . $this->get_complete_upgrade_instructions(),
|
9807 |
'plan_upgraded',
|
9808 |
-
$this->
|
9809 |
);
|
9810 |
|
9811 |
$this->_admin_notices->remove_sticky( array(
|
@@ -9818,7 +11338,7 @@
|
|
9818 |
case 'changed':
|
9819 |
$this->_admin_notices->add_sticky(
|
9820 |
sprintf(
|
9821 |
-
$this->
|
9822 |
$this->_site->plan->title
|
9823 |
),
|
9824 |
'plan_changed'
|
@@ -9833,41 +11353,41 @@
|
|
9833 |
break;
|
9834 |
case 'downgraded':
|
9835 |
$this->_admin_notices->add_sticky(
|
9836 |
-
sprintf( $this->
|
9837 |
'license_expired',
|
9838 |
-
$
|
9839 |
);
|
9840 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
9841 |
break;
|
9842 |
case 'cancelled':
|
9843 |
$this->_admin_notices->add(
|
9844 |
-
$this->
|
9845 |
sprintf(
|
9846 |
'<a href="%s">%s</a>',
|
9847 |
$this->contact_url( 'bug' ),
|
9848 |
-
$this->
|
9849 |
),
|
9850 |
-
$
|
9851 |
'error'
|
9852 |
);
|
9853 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
9854 |
break;
|
9855 |
case 'expired':
|
9856 |
$this->_admin_notices->add_sticky(
|
9857 |
-
sprintf( $this->
|
9858 |
'license_expired',
|
9859 |
-
$
|
9860 |
);
|
9861 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
9862 |
break;
|
9863 |
case 'trial_started':
|
9864 |
$this->_admin_notices->add_sticky(
|
9865 |
sprintf(
|
9866 |
-
$this->
|
9867 |
'<i>' . $this->get_plugin_name() . '</i>'
|
9868 |
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
9869 |
'trial_started',
|
9870 |
-
$this->
|
9871 |
);
|
9872 |
|
9873 |
$this->_admin_notices->remove_sticky( array(
|
@@ -9876,9 +11396,9 @@
|
|
9876 |
break;
|
9877 |
case 'trial_expired':
|
9878 |
$this->_admin_notices->add_sticky(
|
9879 |
-
$this->
|
9880 |
'trial_expired',
|
9881 |
-
$
|
9882 |
);
|
9883 |
$this->_admin_notices->remove_sticky( array(
|
9884 |
'trial_started',
|
@@ -9946,23 +11466,22 @@
|
|
9946 |
if ( ! $background ) {
|
9947 |
$this->_admin_notices->add( sprintf(
|
9948 |
'%s %s',
|
9949 |
-
$this->
|
9950 |
( is_object( $license ) && isset( $license->error ) ?
|
9951 |
$license->error->message :
|
9952 |
sprintf( '%s<br><code>%s</code>',
|
9953 |
-
$this->
|
9954 |
var_export( $license, true )
|
9955 |
)
|
9956 |
)
|
9957 |
),
|
9958 |
-
$this->
|
9959 |
'error'
|
9960 |
);
|
9961 |
}
|
9962 |
|
9963 |
return;
|
9964 |
}
|
9965 |
-
|
9966 |
$premium_license = new FS_Plugin_License( $license );
|
9967 |
|
9968 |
// Updated site plan.
|
@@ -9977,10 +11496,10 @@
|
|
9977 |
|
9978 |
if ( ! $background ) {
|
9979 |
$this->_admin_notices->add_sticky(
|
9980 |
-
$this->
|
9981 |
$this->get_complete_upgrade_instructions(),
|
9982 |
'license_activated',
|
9983 |
-
$this->
|
9984 |
);
|
9985 |
}
|
9986 |
|
@@ -9999,10 +11518,12 @@
|
|
9999 |
protected function _deactivate_license( $show_notice = true ) {
|
10000 |
$this->_logger->entrance();
|
10001 |
|
|
|
|
|
10002 |
if ( ! is_object( $this->_license ) ) {
|
10003 |
$this->_admin_notices->add(
|
10004 |
-
sprintf( $this->
|
10005 |
-
$
|
10006 |
);
|
10007 |
|
10008 |
return;
|
@@ -10013,9 +11534,9 @@
|
|
10013 |
|
10014 |
if ( isset( $license->error ) ) {
|
10015 |
$this->_admin_notices->add(
|
10016 |
-
$this->
|
10017 |
-
$this->
|
10018 |
-
$
|
10019 |
'error'
|
10020 |
);
|
10021 |
|
@@ -10029,7 +11550,7 @@
|
|
10029 |
}
|
10030 |
}
|
10031 |
|
10032 |
-
// Updated site plan to
|
10033 |
$this->_sync_plans();
|
10034 |
$this->_site->plan->id = $this->_plans[0]->id;
|
10035 |
// Unlink license from site.
|
@@ -10040,8 +11561,8 @@
|
|
10040 |
|
10041 |
if ( $show_notice ) {
|
10042 |
$this->_admin_notices->add(
|
10043 |
-
sprintf( $this->
|
10044 |
-
$this->
|
10045 |
);
|
10046 |
}
|
10047 |
|
@@ -10089,7 +11610,7 @@
|
|
10089 |
$this->_admin_notices->remove_sticky( 'plan_upgraded' );
|
10090 |
|
10091 |
$this->_admin_notices->add(
|
10092 |
-
sprintf( $this->
|
10093 |
$plan->title,
|
10094 |
human_time_diff( time(), strtotime( $this->_license->expiration ) )
|
10095 |
)
|
@@ -10099,8 +11620,8 @@
|
|
10099 |
$this->_store_site();
|
10100 |
} else {
|
10101 |
$this->_admin_notices->add(
|
10102 |
-
$this->
|
10103 |
-
$this->
|
10104 |
'error'
|
10105 |
);
|
10106 |
}
|
@@ -10117,11 +11638,14 @@
|
|
10117 |
function start_trial( $plan_name = false ) {
|
10118 |
$this->_logger->entrance();
|
10119 |
|
|
|
|
|
|
|
10120 |
if ( $this->is_trial() ) {
|
10121 |
// Already in trial mode.
|
10122 |
$this->_admin_notices->add(
|
10123 |
-
$this->
|
10124 |
-
$
|
10125 |
'error'
|
10126 |
);
|
10127 |
|
@@ -10131,8 +11655,8 @@
|
|
10131 |
if ( $this->_site->is_trial_utilized() ) {
|
10132 |
// Trial was already utilized.
|
10133 |
$this->_admin_notices->add(
|
10134 |
-
$this->
|
10135 |
-
$
|
10136 |
'error'
|
10137 |
);
|
10138 |
|
@@ -10145,8 +11669,8 @@
|
|
10145 |
if ( false === $plan ) {
|
10146 |
// Plan doesn't exist.
|
10147 |
$this->_admin_notices->add(
|
10148 |
-
sprintf( $this->
|
10149 |
-
$
|
10150 |
'error'
|
10151 |
);
|
10152 |
|
@@ -10156,8 +11680,8 @@
|
|
10156 |
if ( ! $plan->has_trial() ) {
|
10157 |
// Plan doesn't exist.
|
10158 |
$this->_admin_notices->add(
|
10159 |
-
sprintf( $this->
|
10160 |
-
$
|
10161 |
'error'
|
10162 |
);
|
10163 |
|
@@ -10167,8 +11691,8 @@
|
|
10167 |
if ( ! $this->has_trial_plan() ) {
|
10168 |
// None of the plans have a trial.
|
10169 |
$this->_admin_notices->add(
|
10170 |
-
$this->
|
10171 |
-
$
|
10172 |
'error'
|
10173 |
);
|
10174 |
|
@@ -10186,8 +11710,9 @@
|
|
10186 |
if ( ! $this->is_api_result_entity( $plan ) ) {
|
10187 |
// Some API error while trying to start the trial.
|
10188 |
$this->_admin_notices->add(
|
10189 |
-
$this->
|
10190 |
-
|
|
|
10191 |
'error'
|
10192 |
);
|
10193 |
|
@@ -10211,10 +11736,13 @@
|
|
10211 |
private function _cancel_trial() {
|
10212 |
$this->_logger->entrance();
|
10213 |
|
|
|
|
|
|
|
10214 |
if ( ! $this->is_trial() ) {
|
10215 |
$this->_admin_notices->add(
|
10216 |
-
$this->
|
10217 |
-
$
|
10218 |
'error'
|
10219 |
);
|
10220 |
|
@@ -10264,7 +11792,7 @@
|
|
10264 |
! $this->deactivate_premium_only_addon_without_license( true )
|
10265 |
) {
|
10266 |
$this->_admin_notices->add(
|
10267 |
-
sprintf( $this->
|
10268 |
);
|
10269 |
}
|
10270 |
|
@@ -10272,8 +11800,8 @@
|
|
10272 |
unset( $this->_storage->trial_plan );
|
10273 |
} else {
|
10274 |
$this->_admin_notices->add(
|
10275 |
-
$this->
|
10276 |
-
$
|
10277 |
'error'
|
10278 |
);
|
10279 |
}
|
@@ -10346,11 +11874,12 @@
|
|
10346 |
* @since 1.0.4
|
10347 |
*
|
10348 |
* @param bool|number $addon_id
|
10349 |
-
* @param bool $flush
|
|
|
10350 |
*
|
10351 |
* @return object|false Plugin latest tag info.
|
10352 |
*/
|
10353 |
-
function _fetch_latest_version( $addon_id = false, $flush = true ) {
|
10354 |
$this->_logger->entrance();
|
10355 |
|
10356 |
/**
|
@@ -10365,7 +11894,8 @@
|
|
10365 |
|
10366 |
$tag = $this->get_api_site_or_plugin_scope()->get(
|
10367 |
$this->_get_latest_version_endpoint( $addon_id, 'json' ),
|
10368 |
-
$flush
|
|
|
10369 |
);
|
10370 |
|
10371 |
$latest_version = ( is_object( $tag ) && isset( $tag->version ) ) ? $tag->version : 'couldn\'t get';
|
@@ -10485,15 +12015,21 @@
|
|
10485 |
* @uses FS_Api
|
10486 |
*
|
10487 |
* @param bool $background Hints the method if it's a background updates check. If false, it means that
|
10488 |
-
* was initiated by the
|
10489 |
* @param bool|number $plugin_id
|
10490 |
* @param bool $flush Since 1.1.7.3
|
|
|
10491 |
*/
|
10492 |
-
private function check_updates(
|
|
|
|
|
|
|
|
|
|
|
10493 |
$this->_logger->entrance();
|
10494 |
|
10495 |
// Check if there's a newer version for download.
|
10496 |
-
$new_version = $this->_fetch_newer_version( $plugin_id, $flush );
|
10497 |
|
10498 |
$update = null;
|
10499 |
if ( is_object( $new_version ) ) {
|
@@ -10502,21 +12038,26 @@
|
|
10502 |
if ( ! $background ) {
|
10503 |
$this->_admin_notices->add(
|
10504 |
sprintf(
|
10505 |
-
|
|
|
10506 |
$update->version,
|
10507 |
sprintf(
|
10508 |
'<a href="%s" target="_blank">%s</a>',
|
10509 |
$this->get_account_url( 'download_latest' ),
|
10510 |
-
sprintf(
|
|
|
|
|
|
|
|
|
10511 |
)
|
10512 |
),
|
10513 |
-
$this->
|
10514 |
);
|
10515 |
}
|
10516 |
} else if ( false === $new_version && ! $background ) {
|
10517 |
$this->_admin_notices->add(
|
10518 |
-
$this->
|
10519 |
-
$this->
|
10520 |
);
|
10521 |
}
|
10522 |
|
@@ -10527,7 +12068,7 @@
|
|
10527 |
* @author Vova Feldman (@svovaf)
|
10528 |
* @since 1.0.4
|
10529 |
*
|
10530 |
-
* @param bool $flush Since 1.1.7.3 add 24 hour cache by
|
10531 |
*
|
10532 |
* @return FS_Plugin[]
|
10533 |
*
|
@@ -10739,7 +12280,7 @@
|
|
10739 |
*/
|
10740 |
private function update_user_name() {
|
10741 |
$this->_logger->entrance();
|
10742 |
-
$name = fs_request_get( 'fs_user_name_' . $this->
|
10743 |
|
10744 |
$api = $this->get_api_user_scope();
|
10745 |
$user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,first,last", 'put', array(
|
@@ -10782,7 +12323,7 @@
|
|
10782 |
|
10783 |
if ( ! isset( $result->error ) ) {
|
10784 |
$this->_admin_notices->add( sprintf(
|
10785 |
-
$this->
|
10786 |
sprintf( '<a href="mailto:%1s">%2s</a>', esc_url( $this->_user->email ), $this->_user->email )
|
10787 |
) );
|
10788 |
} else {
|
@@ -10799,8 +12340,8 @@
|
|
10799 |
*
|
10800 |
* @return string
|
10801 |
*/
|
10802 |
-
|
10803 |
-
if ( $this->is_addon() ) {
|
10804 |
/**
|
10805 |
* @author Vova Feldman (@svovaf)
|
10806 |
* @since 1.2.1.7 Add-on's activation is the parent's module activation.
|
@@ -10820,31 +12361,39 @@
|
|
10820 |
* @return string
|
10821 |
*/
|
10822 |
function get_reconnect_url( $params = array() ) {
|
10823 |
-
$params['fs_action']
|
10824 |
-
$params['
|
10825 |
|
10826 |
-
return $this->
|
10827 |
}
|
10828 |
|
10829 |
/**
|
10830 |
-
* Get the URL of the page that should be loaded after the user connect
|
|
|
10831 |
*
|
10832 |
* @author Vova Feldman (@svovaf)
|
10833 |
* @since 1.1.3
|
10834 |
*
|
10835 |
* @param string $filter Filter name.
|
|
|
10836 |
*
|
10837 |
* @return string
|
10838 |
*/
|
10839 |
-
function get_after_activation_url( $filter ) {
|
10840 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10841 |
|
10842 |
-
return $this->apply_filters(
|
10843 |
$filter,
|
10844 |
empty( $first_time_path ) ?
|
10845 |
$this->_get_admin_page_url() :
|
10846 |
$first_time_path
|
10847 |
-
);
|
10848 |
}
|
10849 |
|
10850 |
/**
|
@@ -10862,6 +12411,9 @@
|
|
10862 |
$plugin_id = fs_request_get( 'plugin_id', $this->get_id() );
|
10863 |
$action = fs_get_action();
|
10864 |
|
|
|
|
|
|
|
10865 |
switch ( $action ) {
|
10866 |
case 'delete_account':
|
10867 |
check_admin_referer( $action );
|
@@ -10916,6 +12468,14 @@
|
|
10916 |
|
10917 |
if ( $plugin_id == $this->get_id() ) {
|
10918 |
$this->_deactivate_license();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10919 |
} else {
|
10920 |
if ( $this->is_addon_activated( $plugin_id ) ) {
|
10921 |
$fs_addon = self::get_instance_by_id( $plugin_id );
|
@@ -10938,20 +12498,20 @@
|
|
10938 |
$candidate_email = fs_request_get( 'candidate_email', '' );
|
10939 |
|
10940 |
if ( $this->init_change_owner( $candidate_email ) ) {
|
10941 |
-
$this->_admin_notices->add( sprintf( $this->
|
10942 |
}
|
10943 |
break;
|
10944 |
case 'owner_confirmed':
|
10945 |
$candidate_email = fs_request_get( 'candidate_email', '' );
|
10946 |
|
10947 |
-
$this->_admin_notices->add( sprintf( $this->
|
10948 |
break;
|
10949 |
case 'candidate_confirmed':
|
10950 |
if ( $this->complete_change_owner() ) {
|
10951 |
$this->_admin_notices->add_sticky(
|
10952 |
-
sprintf( $this->
|
10953 |
'ownership_changed',
|
10954 |
-
$this->
|
10955 |
);
|
10956 |
} else {
|
10957 |
// @todo Handle failed ownership change message.
|
@@ -10964,30 +12524,30 @@
|
|
10964 |
case 'update_email':
|
10965 |
check_admin_referer( 'update_email' );
|
10966 |
|
10967 |
-
$new_email = fs_request_get( 'fs_email_' . $this->
|
10968 |
$result = $this->update_email( $new_email );
|
10969 |
|
10970 |
if ( isset( $result->error ) ) {
|
10971 |
switch ( $result->error->code ) {
|
10972 |
case 'user_exist':
|
10973 |
$this->_admin_notices->add(
|
10974 |
-
$this->
|
10975 |
-
sprintf( $this->
|
10976 |
sprintf(
|
10977 |
'<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
10978 |
$this->get_account_url( 'change_owner', array(
|
10979 |
'state' => 'init',
|
10980 |
'candidate_email' => $new_email
|
10981 |
) ),
|
10982 |
-
$this->
|
10983 |
),
|
10984 |
-
$
|
10985 |
'error'
|
10986 |
);
|
10987 |
break;
|
10988 |
}
|
10989 |
} else {
|
10990 |
-
$this->_admin_notices->add( $this->
|
10991 |
}
|
10992 |
|
10993 |
return;
|
@@ -10999,12 +12559,12 @@
|
|
10999 |
|
11000 |
if ( isset( $result->error ) ) {
|
11001 |
$this->_admin_notices->add(
|
11002 |
-
$this->
|
11003 |
-
$
|
11004 |
'error'
|
11005 |
);
|
11006 |
} else {
|
11007 |
-
$this->_admin_notices->add( $this->
|
11008 |
}
|
11009 |
|
11010 |
return;
|
@@ -11033,7 +12593,7 @@
|
|
11033 |
|
11034 |
return;
|
11035 |
|
11036 |
-
case $this->
|
11037 |
$this->_sync_license();
|
11038 |
|
11039 |
return;
|
@@ -11055,7 +12615,7 @@
|
|
11055 |
$this->_logger->log( $action );
|
11056 |
|
11057 |
$site_property = substr( $p, strlen( 'site_' ) );
|
11058 |
-
$site_property_value = fs_request_get( 'fs_' . $p . '_' . $this->
|
11059 |
$this->get_site()->{$site_property} = $site_property_value;
|
11060 |
|
11061 |
// Store account after modification.
|
@@ -11064,8 +12624,10 @@
|
|
11064 |
$this->do_action( 'account_property_edit', 'site', $site_property, $site_property_value );
|
11065 |
|
11066 |
$this->_admin_notices->add( sprintf(
|
11067 |
-
|
11068 |
-
|
|
|
|
|
11069 |
|
11070 |
return;
|
11071 |
}
|
@@ -11118,6 +12680,24 @@
|
|
11118 |
$this->do_action( 'account_page_load_before_departure' );
|
11119 |
}
|
11120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11121 |
/**
|
11122 |
* Render account page.
|
11123 |
*
|
@@ -11128,11 +12708,7 @@
|
|
11128 |
$this->_logger->entrance();
|
11129 |
|
11130 |
$template = 'account.php';
|
11131 |
-
|
11132 |
-
$template = 'billing.php';
|
11133 |
-
}
|
11134 |
-
|
11135 |
-
$vars = array( 'slug' => $this->_slug );
|
11136 |
|
11137 |
/**
|
11138 |
* Added filter to the template to allow developers wrapping the template
|
@@ -11153,7 +12729,7 @@
|
|
11153 |
function _connect_page_render() {
|
11154 |
$this->_logger->entrance();
|
11155 |
|
11156 |
-
$vars = array( '
|
11157 |
|
11158 |
/**
|
11159 |
* Added filter to the template to allow developers wrapping the template
|
@@ -11189,8 +12765,8 @@
|
|
11189 |
|
11190 |
if ( ! $this->is_registered() && $this->is_org_repo_compliant() ) {
|
11191 |
$this->_admin_notices->add(
|
11192 |
-
sprintf( $this->
|
11193 |
-
$this->
|
11194 |
'update-nag'
|
11195 |
);
|
11196 |
}
|
@@ -11205,7 +12781,7 @@
|
|
11205 |
function _addons_page_render() {
|
11206 |
$this->_logger->entrance();
|
11207 |
|
11208 |
-
$vars = array( '
|
11209 |
|
11210 |
/**
|
11211 |
* Added filter to the template to allow developers wrapping the template
|
@@ -11228,7 +12804,7 @@
|
|
11228 |
function _pricing_page_render() {
|
11229 |
$this->_logger->entrance();
|
11230 |
|
11231 |
-
$vars = array( '
|
11232 |
|
11233 |
if ( 'true' === fs_request_get( 'checkout', false ) ) {
|
11234 |
fs_require_once_template( 'checkout.php', $vars );
|
@@ -11250,14 +12826,14 @@
|
|
11250 |
function _contact_page_render() {
|
11251 |
$this->_logger->entrance();
|
11252 |
|
11253 |
-
$vars = array( '
|
11254 |
fs_require_once_template( 'contact.php', $vars );
|
11255 |
}
|
11256 |
|
11257 |
#endregion ------------------------------------------------------------------------
|
11258 |
|
11259 |
/**
|
11260 |
-
* Hide all
|
11261 |
*
|
11262 |
* @author Vova Feldman (@svovaf)
|
11263 |
* @since 1.0.3
|
@@ -11279,7 +12855,7 @@
|
|
11279 |
}
|
11280 |
|
11281 |
/**
|
11282 |
-
* Attach to admin_head hook to hide all
|
11283 |
*
|
11284 |
* @author Vova Feldman (@svovaf)
|
11285 |
* @since 1.0.3
|
@@ -11314,7 +12890,7 @@
|
|
11314 |
function get_api_user_scope( $flush = false ) {
|
11315 |
if ( ! isset( $this->_user_api ) || $flush ) {
|
11316 |
$this->_user_api = FS_Api::instance(
|
11317 |
-
$this->
|
11318 |
'user',
|
11319 |
$this->_user->id,
|
11320 |
$this->_user->public_key,
|
@@ -11340,7 +12916,7 @@
|
|
11340 |
function get_api_site_scope( $flush = false ) {
|
11341 |
if ( ! isset( $this->_site_api ) || $flush ) {
|
11342 |
$this->_site_api = FS_Api::instance(
|
11343 |
-
$this->
|
11344 |
'install',
|
11345 |
$this->_site->id,
|
11346 |
$this->_site->public_key,
|
@@ -11365,7 +12941,7 @@
|
|
11365 |
function get_api_plugin_scope() {
|
11366 |
if ( ! isset( $this->_plugin_api ) ) {
|
11367 |
$this->_plugin_api = FS_Api::instance(
|
11368 |
-
$this->
|
11369 |
'plugin',
|
11370 |
$this->_plugin->id,
|
11371 |
$this->_plugin->public_key,
|
@@ -11414,10 +12990,22 @@
|
|
11414 |
* @since 1.2.1.5
|
11415 |
*/
|
11416 |
function _fix_start_trial_menu_item_url() {
|
11417 |
-
$template_args = array( '
|
11418 |
fs_require_template( 'add-trial-to-pricing.php', $template_args );
|
11419 |
}
|
11420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11421 |
/**
|
11422 |
* Show trial promotional notice (if any trial exist).
|
11423 |
*
|
@@ -11436,7 +13024,7 @@
|
|
11436 |
}
|
11437 |
|
11438 |
// Check if trial message is already shown.
|
11439 |
-
if ( $this->
|
11440 |
add_action( 'admin_footer', array( &$this, '_fix_start_trial_menu_item_url' ) );
|
11441 |
|
11442 |
$this->_menu->add_counter_to_menu_item( 1, 'fs-trial' );
|
@@ -11496,7 +13084,7 @@
|
|
11496 |
$trial_period = $this->_trial_days;
|
11497 |
$require_payment = $this->_is_trial_require_payment;
|
11498 |
$trial_url = $this->get_trial_url();
|
11499 |
-
$plans_string = strtolower( $this->
|
11500 |
|
11501 |
if ( $this->is_registered() ) {
|
11502 |
// If opted-in, override trial with up to date data from API.
|
@@ -11521,7 +13109,7 @@
|
|
11521 |
// Not all paid plans have a trial - generate a string of those that have it.
|
11522 |
for ( $i = 0; $i < $trial_plans_count; $i ++ ) {
|
11523 |
$plans_string .= sprintf(
|
11524 |
-
'<a href="%s">%s</a>',
|
11525 |
$trial_url,
|
11526 |
$trial_plans[ $i ]->title
|
11527 |
);
|
@@ -11536,7 +13124,7 @@
|
|
11536 |
}
|
11537 |
|
11538 |
$message = sprintf(
|
11539 |
-
$this->
|
11540 |
sprintf( '<b>%s</b>', $this->get_plugin_name() ),
|
11541 |
$plans_string,
|
11542 |
$trial_period
|
@@ -11544,15 +13132,15 @@
|
|
11544 |
|
11545 |
// "No Credit-Card Required" or "No Commitment for N Days".
|
11546 |
$cc_string = $require_payment ?
|
11547 |
-
sprintf( $this->
|
11548 |
-
$this->
|
11549 |
|
11550 |
|
11551 |
// Start trial button.
|
11552 |
$button = ' ' . sprintf(
|
11553 |
'<a style="margin-left: 10px; vertical-align: super;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
11554 |
$trial_url,
|
11555 |
-
$this->
|
11556 |
);
|
11557 |
|
11558 |
$this->_admin_notices->add_sticky(
|
@@ -11567,17 +13155,120 @@
|
|
11567 |
return true;
|
11568 |
}
|
11569 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11570 |
/**
|
11571 |
* @author Vova Feldman (@svovaf)
|
11572 |
* @since 1.2.1.5
|
11573 |
*/
|
11574 |
function _enqueue_common_css() {
|
11575 |
if ( $this->has_paid_plan() && ! $this->is_paying() ) {
|
11576 |
-
// Add basic CSS for
|
11577 |
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
|
11578 |
}
|
11579 |
}
|
11580 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11581 |
/* Action Links
|
11582 |
------------------------------------------------------------------------------------------------------------------*/
|
11583 |
private $_action_links_hooked = false;
|
@@ -11650,7 +13341,7 @@
|
|
11650 |
if ( $this->is_registered() ) {
|
11651 |
if ( ! $this->is_paying() && $this->has_paid_plan() ) {
|
11652 |
$this->add_plugin_action_link(
|
11653 |
-
$this->
|
11654 |
$this->get_upgrade_url(),
|
11655 |
false,
|
11656 |
7,
|
@@ -11660,7 +13351,7 @@
|
|
11660 |
|
11661 |
if ( $this->has_addons() ) {
|
11662 |
$this->add_plugin_action_link(
|
11663 |
-
$this->
|
11664 |
$this->_get_admin_page_url( 'addons' ),
|
11665 |
false,
|
11666 |
9,
|
@@ -11688,18 +13379,16 @@
|
|
11688 |
add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
|
11689 |
}
|
11690 |
|
11691 |
-
$link_text = $this->
|
11692 |
-
$this->
|
11693 |
-
|
11694 |
-
'change-license'
|
11695 |
-
);
|
11696 |
|
11697 |
$this->add_plugin_action_link(
|
11698 |
$link_text,
|
11699 |
'#',
|
11700 |
false,
|
11701 |
11,
|
11702 |
-
( 'activate-license ' . $this->
|
11703 |
);
|
11704 |
}
|
11705 |
|
@@ -11716,8 +13405,18 @@
|
|
11716 |
|
11717 |
$this->_logger->entrance();
|
11718 |
|
11719 |
-
if (
|
11720 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11721 |
return;
|
11722 |
}
|
11723 |
|
@@ -11739,44 +13438,38 @@
|
|
11739 |
return;
|
11740 |
}
|
11741 |
|
11742 |
-
if ( fs_request_is_action_secure( $this->_slug . '_reconnect' ) ) {
|
11743 |
-
if ( ! $this->is_registered() && $this->is_anonymous() ) {
|
11744 |
-
$this->connect_again();
|
11745 |
-
|
11746 |
-
return;
|
11747 |
-
}
|
11748 |
-
}
|
11749 |
-
|
11750 |
$url = '#';
|
11751 |
|
11752 |
if ( $this->is_registered() ) {
|
11753 |
if ( $this->is_tracking_allowed() ) {
|
11754 |
-
$link_text_id = 'opt-out';
|
11755 |
} else {
|
11756 |
-
$link_text_id = 'opt-in';
|
11757 |
}
|
11758 |
|
11759 |
add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
|
11760 |
} else {
|
11761 |
-
$link_text_id = 'opt-in';
|
11762 |
|
11763 |
$params = ! $this->is_anonymous() ?
|
11764 |
array() :
|
11765 |
array(
|
11766 |
-
'nonce' => wp_create_nonce( $this->
|
11767 |
-
'fs_action' => ( $this->
|
11768 |
);
|
11769 |
|
11770 |
$url = $this->get_activation_url( $params );
|
11771 |
}
|
11772 |
|
11773 |
-
$this->
|
11774 |
-
$this->
|
11775 |
-
|
11776 |
-
|
11777 |
-
|
11778 |
-
|
11779 |
-
|
|
|
|
|
11780 |
}
|
11781 |
|
11782 |
/**
|
@@ -11789,17 +13482,17 @@
|
|
11789 |
*/
|
11790 |
function get_after_plugin_activation_redirect_url() {
|
11791 |
$url = false;
|
11792 |
-
$plugin_fs = false;
|
11793 |
|
11794 |
-
if ( ! $this->is_addon() ) {
|
11795 |
$first_time_path = $this->_menu->get_first_time_path();
|
11796 |
-
$
|
11797 |
-
|
11798 |
-
$plugin_fs->get_activation_url() :
|
11799 |
( empty( $first_time_path ) ?
|
11800 |
$this->_get_admin_page_url() :
|
11801 |
$first_time_path );
|
11802 |
} else {
|
|
|
|
|
11803 |
if ( $this->is_parent_plugin_installed() ) {
|
11804 |
$plugin_fs = self::get_parent_instance();
|
11805 |
}
|
@@ -11878,7 +13571,7 @@
|
|
11878 |
*
|
11879 |
* @since 1.2.1.6 Always show the deactivation feedback form since we added automatic free version deactivation upon premium code activation.
|
11880 |
*/
|
11881 |
-
$deactivate_link .= '<i class="fs-
|
11882 |
|
11883 |
// Append deactivation link.
|
11884 |
$before_deactivate['deactivate'] = $deactivate_link;
|
@@ -11888,7 +13581,7 @@
|
|
11888 |
}
|
11889 |
|
11890 |
/**
|
11891 |
-
* Adds
|
11892 |
*
|
11893 |
* @author Vova Feldman (@svovaf)
|
11894 |
* @since 1.0.4
|
@@ -11902,7 +13595,7 @@
|
|
11902 |
}
|
11903 |
|
11904 |
/**
|
11905 |
-
* Adds sticky
|
11906 |
*
|
11907 |
* @author Vova Feldman (@svovaf)
|
11908 |
* @since 1.1.0
|
@@ -11939,84 +13632,74 @@
|
|
11939 |
|
11940 |
// @since 1.2.1.5 The free version is auto deactivated.
|
11941 |
$deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ?
|
11942 |
-
( '<li>' . $this->
|
11943 |
'';
|
11944 |
|
11945 |
return sprintf(
|
11946 |
' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
|
11947 |
-
$this->
|
11948 |
$this->get_latest_download_link( sprintf(
|
11949 |
-
|
|
|
11950 |
$plan_title
|
11951 |
) ),
|
11952 |
$deactivation_step,
|
11953 |
-
$this->
|
11954 |
-
'//bit.ly/upload-wp-
|
11955 |
-
$this->
|
11956 |
);
|
11957 |
}
|
11958 |
|
11959 |
-
/* Plugin Auto-Updates (@since 1.0.4)
|
11960 |
-
------------------------------------------------------------------------------------------------------------------*/
|
11961 |
/**
|
11962 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
11963 |
*/
|
11964 |
-
|
|
|
|
|
11965 |
|
11966 |
/**
|
11967 |
-
* @
|
11968 |
-
*
|
11969 |
-
* Include plugins for automatic updates based on stored settings.
|
11970 |
*
|
11971 |
-
|
|
|
11972 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11973 |
* @author Vova Feldman (@svovaf)
|
11974 |
-
* @since 1.
|
11975 |
*
|
11976 |
-
|
11977 |
-
* @param
|
|
|
11978 |
*
|
11979 |
-
* @return
|
11980 |
*/
|
11981 |
-
|
11982 |
-
|
11983 |
-
// while in 3.8.2 statistics were added (https://core.trac.wordpress.org/changeset/27905).
|
11984 |
-
$by_slug = ( (int) str_replace( '.', '', get_bloginfo( 'version' ) ) >= 382 );
|
11985 |
-
|
11986 |
-
if ( ! isset( self::$_auto_updated_plugins ) ) {
|
11987 |
-
$plugins = self::$_accounts->get_option( 'plugins', array() );
|
11988 |
-
|
11989 |
-
$identifiers = array();
|
11990 |
-
foreach ( $plugins as $p ) {
|
11991 |
-
/**
|
11992 |
-
* @var FS_Plugin $p
|
11993 |
-
*/
|
11994 |
-
if ( isset( $p->auto_update ) && $p->auto_update ) {
|
11995 |
-
$identifiers[] = ( $by_slug ? $p->slug : plugin_basename( $p->file ) );
|
11996 |
-
}
|
11997 |
-
}
|
11998 |
-
|
11999 |
-
self::$_auto_updated_plugins = $identifiers;
|
12000 |
-
}
|
12001 |
-
|
12002 |
-
if ( in_array( $by_slug ? $item->slug : $item, self::$_auto_updated_plugins ) ) {
|
12003 |
-
return true;
|
12004 |
-
}
|
12005 |
-
|
12006 |
-
// Pass update decision to next filters
|
12007 |
-
return $update;
|
12008 |
}
|
12009 |
|
12010 |
/**
|
12011 |
* @author Vova Feldman (@svovaf)
|
12012 |
-
* @since 1.2.
|
12013 |
*
|
12014 |
-
* @param string $
|
|
|
12015 |
*
|
12016 |
* @return string
|
12017 |
*/
|
12018 |
-
function
|
12019 |
-
|
12020 |
}
|
12021 |
|
12022 |
#----------------------------------------------------------------------------------
|
@@ -12122,17 +13805,17 @@
|
|
12122 |
if ( ! $this->is_registered() ) {
|
12123 |
// Not registered.
|
12124 |
self::shoot_ajax_failure( array(
|
12125 |
-
'message' => $this->
|
12126 |
'code' => 'premium_installed',
|
12127 |
) );
|
12128 |
}
|
12129 |
|
12130 |
-
$plugin_id = fs_request_get( '
|
12131 |
|
12132 |
if ( ! FS_Plugin::is_valid_id( $plugin_id ) ) {
|
12133 |
// Invalid ID.
|
12134 |
self::shoot_ajax_failure( array(
|
12135 |
-
'message' => $this->
|
12136 |
'code' => 'invalid_module_id',
|
12137 |
) );
|
12138 |
}
|
@@ -12141,21 +13824,21 @@
|
|
12141 |
if ( $this->is_premium() ) {
|
12142 |
// Already using the premium code version.
|
12143 |
self::shoot_ajax_failure( array(
|
12144 |
-
'message' => $this->
|
12145 |
'code' => 'premium_installed',
|
12146 |
) );
|
12147 |
}
|
12148 |
if ( ! $this->can_use_premium_code() ) {
|
12149 |
// Don't have access to the premium code.
|
12150 |
self::shoot_ajax_failure( array(
|
12151 |
-
'message' => $this->
|
12152 |
'code' => 'invalid_license',
|
12153 |
) );
|
12154 |
}
|
12155 |
if ( ! $this->has_release_on_freemius() ) {
|
12156 |
// Plugin is a serviceware, no premium code version.
|
12157 |
self::shoot_ajax_failure( array(
|
12158 |
-
'message' => $this->
|
12159 |
'code' => 'premium_version_missing',
|
12160 |
) );
|
12161 |
}
|
@@ -12165,7 +13848,7 @@
|
|
12165 |
if ( ! is_object( $addon ) ) {
|
12166 |
// Invalid add-on ID.
|
12167 |
self::shoot_ajax_failure( array(
|
12168 |
-
'message' => $this->
|
12169 |
'code' => 'invalid_module_id',
|
12170 |
) );
|
12171 |
}
|
@@ -12173,7 +13856,7 @@
|
|
12173 |
if ( $this->is_addon_activated( $plugin_id, true ) ) {
|
12174 |
// Premium add-on version is already activated.
|
12175 |
self::shoot_ajax_failure( array(
|
12176 |
-
'message' => $this->
|
12177 |
'code' => 'premium_installed',
|
12178 |
) );
|
12179 |
}
|
@@ -12245,16 +13928,341 @@
|
|
12245 |
}
|
12246 |
}
|
12247 |
|
12248 |
-
|
12249 |
-
|
12250 |
-
|
12251 |
-
|
|
|
12252 |
|
12253 |
fs_require_template( 'auto-installation.php', $vars );
|
12254 |
}
|
12255 |
|
12256 |
#endregion
|
12257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12258 |
#----------------------------------------------------------------------------------
|
12259 |
#region Marketing
|
12260 |
#----------------------------------------------------------------------------------
|
@@ -12312,4 +14320,4 @@
|
|
12312 |
}
|
12313 |
|
12314 |
#endregion
|
12315 |
-
}
|
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 |
if ( ! defined( 'ABSPATH' ) ) {
|
67 |
* @var string
|
68 |
*/
|
69 |
private $_plugin_name;
|
70 |
+
/**
|
71 |
+
* @since 1.2.2
|
72 |
+
*
|
73 |
+
* @var string
|
74 |
+
*/
|
75 |
+
private $_module_type;
|
76 |
|
77 |
#endregion Plugin Info
|
78 |
|
168 |
*/
|
169 |
private $_storage;
|
170 |
|
171 |
+
/**
|
172 |
+
* @since 1.2.2.7
|
173 |
+
* @var FS_Cache_Manager
|
174 |
+
*/
|
175 |
+
private $_cache;
|
176 |
+
|
177 |
/**
|
178 |
* @since 1.0.0
|
179 |
*
|
259 |
*/
|
260 |
private static $_accounts;
|
261 |
|
262 |
+
/**
|
263 |
+
* @since 1.2.2
|
264 |
+
*
|
265 |
+
* @var number
|
266 |
+
*/
|
267 |
+
private $_module_id;
|
268 |
+
|
269 |
/**
|
270 |
* @var Freemius[]
|
271 |
*/
|
272 |
private static $_instances = array();
|
273 |
|
274 |
+
/**
|
275 |
+
* @author Leo Fajardo (@leorw)
|
276 |
+
*
|
277 |
+
* @since 1.2.3
|
278 |
+
*
|
279 |
+
* @var FS_Affiliate
|
280 |
+
*/
|
281 |
+
private $affiliate = null;
|
282 |
+
|
283 |
+
/**
|
284 |
+
* @author Leo Fajardo (@leorw)
|
285 |
+
*
|
286 |
+
* @since 1.2.3
|
287 |
+
*
|
288 |
+
* @var FS_AffiliateTerms
|
289 |
+
*/
|
290 |
+
private $plugin_affiliate_terms = null;
|
291 |
+
|
292 |
+
/**
|
293 |
+
* @author Leo Fajardo (@leorw)
|
294 |
+
*
|
295 |
+
* @since 1.2.3
|
296 |
+
*
|
297 |
+
* @var FS_AffiliateTerms
|
298 |
+
*/
|
299 |
+
private $custom_affiliate_terms = null;
|
300 |
+
|
301 |
#region Uninstall Reasons IDs
|
302 |
|
303 |
const REASON_NO_LONGER_NEEDED = 1;
|
327 |
* @author Vova Feldman (@svovaf)
|
328 |
* @since 1.0.0
|
329 |
*
|
330 |
+
* @param number $module_id
|
331 |
+
* @param string|bool $slug
|
332 |
+
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
333 |
*/
|
334 |
+
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
335 |
+
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
336 |
+
$this->store_id_slug_type_path_map( $module_id, $slug );
|
337 |
+
}
|
338 |
|
339 |
+
$this->_module_id = $module_id;
|
340 |
+
$this->_slug = $this->get_slug();
|
341 |
+
$this->_module_type = $this->get_module_type();
|
342 |
|
343 |
+
$this->_storage = FS_Key_Value_Storage::instance( $this->_module_type . '_data', $this->_slug );
|
344 |
+
$this->_cache = FS_Cache_Manager::get_manager( WP_FS___OPTION_PREFIX . "cache_{$module_id}" );
|
345 |
+
|
346 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
347 |
|
348 |
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
349 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
350 |
+
$this->_plugin_basename = $this->get_plugin_basename();
|
351 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
352 |
|
353 |
$base_name_split = explode( '/', $this->_plugin_basename );
|
369 |
$this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
|
370 |
}
|
371 |
|
372 |
+
if ( ! is_object( $this->_plugin ) ) {
|
373 |
+
$this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->get();
|
374 |
+
}
|
375 |
|
376 |
$this->_admin_notices = FS_Admin_Notice_Manager::instance(
|
377 |
+
$this->_slug . ( $this->is_theme() ? ':theme' : '' ),
|
378 |
+
/**
|
379 |
+
* Ensure that the admin notice will always have a title by using the stored plugin title if available and
|
380 |
+
* retrieving the title via the "get_plugin_name" method if there is no stored plugin title available.
|
381 |
+
*
|
382 |
+
* @author Leo Fajardo (@leorw)
|
383 |
+
* @since 1.2.2
|
384 |
+
*/
|
385 |
+
( is_object( $this->_plugin ) ? $this->_plugin->title : $this->get_plugin_name() ),
|
386 |
+
$this->get_unique_affix()
|
387 |
);
|
388 |
|
389 |
if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
|
390 |
'true' === fs_request_is_action( 'restart_freemius' )
|
391 |
) {
|
392 |
FS_Api::clear_cache();
|
393 |
+
$this->_cache->clear();
|
394 |
}
|
395 |
|
396 |
$this->_register_hooks();
|
401 |
}
|
402 |
|
403 |
/**
|
404 |
+
* Checks whether this module has a settings menu.
|
405 |
*
|
406 |
* @author Leo Fajardo (@leorw)
|
407 |
* @since 1.2.2
|
409 |
* @return bool
|
410 |
*/
|
411 |
function has_settings_menu() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
return $this->_menu->has_menu();
|
413 |
}
|
414 |
|
415 |
+
/**
|
416 |
+
* Check if the context module is free wp.org theme.
|
417 |
+
*
|
418 |
+
* This method is helpful because:
|
419 |
+
* 1. wp.org themes are limited to a single submenu item,
|
420 |
+
* and sub-submenu items are most likely not allowed (never verified).
|
421 |
+
* 2. wp.org themes are not allowed to redirect the user
|
422 |
+
* after the theme activation, therefore, the agreed UX
|
423 |
+
* is showing the opt-in as a modal dialog box after
|
424 |
+
* activation (approved by @otto42, @emiluzelac, @greenshady, @grapplerulrich).
|
425 |
+
*
|
426 |
+
* @author Vova Feldman (@svovaf)
|
427 |
+
* @since 1.2.2.7
|
428 |
+
*
|
429 |
+
* @return bool
|
430 |
+
*/
|
431 |
+
function is_free_wp_org_theme() {
|
432 |
+
return (
|
433 |
+
$this->is_theme() &&
|
434 |
+
$this->is_org_repo_compliant() &&
|
435 |
+
! $this->is_premium()
|
436 |
+
);
|
437 |
+
}
|
438 |
+
|
439 |
/**
|
440 |
* Checks whether this a submenu item is visible.
|
441 |
*
|
442 |
* @author Vova Feldman (@svovaf)
|
443 |
* @since 1.2.2.6
|
444 |
+
* @since 1.2.2.7 Even if the menu item was specified to be hidden, when it is the context page, then show the submenu item so the user will have the right context page.
|
445 |
*
|
446 |
* @param string $slug
|
447 |
*
|
448 |
* @return bool
|
449 |
*/
|
450 |
function is_submenu_item_visible( $slug ) {
|
451 |
+
if ( $this->is_admin_page( $slug ) ) {
|
452 |
+
/**
|
453 |
+
* It is the current context page, so show the submenu item
|
454 |
+
* so the user will have the right context page, even if it
|
455 |
+
* was set to hidden.
|
456 |
+
*/
|
457 |
+
return true;
|
458 |
+
}
|
459 |
+
|
460 |
if ( ! $this->has_settings_menu() ) {
|
461 |
+
// No menu settings at all.
|
462 |
+
return false;
|
463 |
+
}
|
464 |
+
|
465 |
+
if ( $this->is_free_wp_org_theme() ) {
|
466 |
+
/**
|
467 |
+
* wp.org themes are limited to a single submenu item, and
|
468 |
+
* sub-submenu items are most likely not allowed (never verified).
|
469 |
+
*/
|
470 |
return false;
|
471 |
}
|
472 |
|
473 |
return $this->_menu->is_submenu_item_visible( $slug );
|
474 |
}
|
475 |
|
476 |
+
/**
|
477 |
+
* Check if a Freemius page should be accessible via the UI.
|
478 |
+
*
|
479 |
+
* @author Vova Feldman (@svovaf)
|
480 |
+
* @since 1.2.2.7
|
481 |
+
*
|
482 |
+
* @param string $slug
|
483 |
+
*
|
484 |
+
* @return bool
|
485 |
+
*/
|
486 |
+
function is_page_visible( $slug ) {
|
487 |
+
if ( $this->is_admin_page( $slug ) ) {
|
488 |
+
return true;
|
489 |
+
}
|
490 |
+
|
491 |
+
return $this->_menu->is_submenu_item_visible( $slug, true, true );
|
492 |
+
}
|
493 |
+
|
494 |
/**
|
495 |
* @author Vova Feldman (@svovaf)
|
496 |
* @since 1.0.9
|
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
|
636 |
+
*
|
637 |
+
* @param string $plugin_prev_version
|
638 |
+
* @param string $plugin_version
|
639 |
+
*/
|
640 |
+
function _after_version_update( $plugin_prev_version, $plugin_version ) {
|
641 |
+
if ( $this->is_theme() ) {
|
642 |
+
// Expire the cache of the previous tabs since the theme may
|
643 |
+
// have setting updates.
|
644 |
+
$this->_cache->expire( 'tabs' );
|
645 |
+
$this->_cache->expire( 'tabs_stylesheets' );
|
646 |
+
}
|
647 |
+
}
|
648 |
+
|
649 |
/**
|
650 |
* This action is connected to the 'plugins_loaded' hook and helps to determine
|
651 |
* if this is a new plugin installation or a plugin update.
|
675 |
* Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
|
676 |
*
|
677 |
* NOTE:
|
678 |
+
* The only fallback of this mechanism is if an admin updates a plugin based on use-case #2,
|
679 |
* and then, the next immediate PageView is the plugin's main settings page, it will not
|
680 |
* show the opt-in right away. The reason it will happen is because Freemius execution
|
681 |
* will be turned off till the plugin is fully loaded at least once
|
689 |
// Update flag that plugin was loaded with Freemius at least once.
|
690 |
$this->_storage->was_plugin_loaded = true;
|
691 |
|
692 |
+
/**
|
693 |
+
* Bug fix - only set to false when it's a plugin, due to the
|
694 |
+
* execution sequence of the theme hooks and our methods, if
|
695 |
+
* this will be set for themes, Freemius will always assume
|
696 |
+
* it's a theme update.
|
697 |
+
*
|
698 |
+
* @author Vova Feldman (@svovaf)
|
699 |
+
* @since 1.2.2.2
|
700 |
+
*/
|
701 |
+
if ( $this->is_plugin() &&
|
702 |
+
! isset( $this->_storage->is_plugin_new_install )
|
703 |
+
) {
|
704 |
$this->_storage->is_plugin_new_install = false;
|
705 |
}
|
706 |
}
|
713 |
$this->_logger->entrance();
|
714 |
|
715 |
if ( is_admin() ) {
|
716 |
+
if ( $this->is_plugin() ) {
|
717 |
+
$plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
|
718 |
|
719 |
+
/**
|
720 |
+
* @since 1.2.2
|
721 |
+
*
|
722 |
+
* Hook to both free and premium version activations to support
|
723 |
+
* auto deactivation on the other version activation.
|
724 |
+
*/
|
725 |
+
register_activation_hook(
|
726 |
+
$plugin_dir . $this->_free_plugin_basename,
|
727 |
+
array( &$this, '_activate_plugin_event_hook' )
|
728 |
+
);
|
729 |
+
|
730 |
+
register_activation_hook(
|
731 |
+
$plugin_dir . $this->premium_plugin_basename(),
|
732 |
+
array( &$this, '_activate_plugin_event_hook' )
|
733 |
+
);
|
734 |
+
} else {
|
735 |
+
add_action( 'after_switch_theme', array( &$this, '_activate_theme_event_hook' ), 10, 2 );
|
736 |
+
|
737 |
+
/**
|
738 |
+
* Include the required hooks to capture the theme settings' page tabs
|
739 |
+
* and cache them.
|
740 |
+
*
|
741 |
+
* @author Vova Feldman (@svovaf)
|
742 |
+
* @since 1.2.2.7
|
743 |
+
*/
|
744 |
+
if ( ! $this->_cache->has_valid( 'tabs' ) ) {
|
745 |
+
add_action( 'admin_footer', array( &$this, '_tabs_capture' ) );
|
746 |
+
// Add license activation AJAX callback.
|
747 |
+
$this->add_ajax_action( 'store_tabs', array( &$this, '_store_tabs_ajax_action' ) );
|
748 |
+
|
749 |
+
add_action( 'admin_enqueue_scripts', array( &$this, '_store_tabs_styles' ), 9999999 );
|
750 |
+
}
|
751 |
+
|
752 |
+
add_action(
|
753 |
+
'admin_footer',
|
754 |
+
array( &$this, '_add_freemius_tabs' ),
|
755 |
+
/**
|
756 |
+
* The tabs JS code must be executed after the tabs capture logic (_tabs_capture()).
|
757 |
+
* That's why the priority is 11 while the tabs capture logic is added
|
758 |
+
* with priority 10.
|
759 |
+
*
|
760 |
+
* @author Vova Feldman (@svovaf)
|
761 |
+
*/
|
762 |
+
11
|
763 |
+
);
|
764 |
+
|
765 |
+
add_action( 'admin_footer', array( &$this, '_style_premium_theme' ) );
|
766 |
+
}
|
767 |
|
768 |
/**
|
769 |
* Part of the mechanism to identify new plugin install vs. plugin update.
|
772 |
* @since 1.1.9
|
773 |
*/
|
774 |
if ( empty( $this->_storage->was_plugin_loaded ) ) {
|
775 |
+
if ( $this->is_plugin() &&
|
776 |
+
$this->is_activation_mode( false ) &&
|
777 |
+
0 == did_action( 'plugins_loaded' )
|
778 |
+
) {
|
779 |
add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
|
780 |
} else {
|
781 |
// If was activated before, then it was already loaded before.
|
786 |
if ( ! self::is_ajax() ) {
|
787 |
if ( ! $this->is_addon() ) {
|
788 |
add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
|
|
|
789 |
}
|
790 |
}
|
791 |
}
|
792 |
|
793 |
+
if ( $this->is_plugin() ) {
|
794 |
+
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
795 |
+
}
|
796 |
+
|
797 |
+
if ( $this->is_theme() && self::is_customizer() ) {
|
798 |
+
// Register customizer upsell.
|
799 |
+
add_action( 'customize_register', array( &$this, '_customizer_register' ) );
|
800 |
+
}
|
801 |
|
802 |
add_action( 'init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
|
803 |
|
811 |
'_install_premium_version_ajax_action'
|
812 |
) );
|
813 |
|
814 |
+
$this->add_ajax_action( 'submit_affiliate_application', array( &$this, '_submit_affiliate_application' ) );
|
815 |
+
|
816 |
$this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
|
817 |
|
818 |
$this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
819 |
+
$this->add_action( 'plugin_version_update', array( &$this, '_after_version_update' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
820 |
+
$this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
|
821 |
|
822 |
add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
|
823 |
+
add_action( 'admin_init', array( &$this, '_add_affiliate_program_notice' ) );
|
824 |
add_action( 'admin_init', array( &$this, '_enqueue_common_css' ) );
|
825 |
|
826 |
/**
|
830 |
* @since 1.2.1.5
|
831 |
*/
|
832 |
if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
|
833 |
+
$this->get_unique_affix() === fs_request_get( 'fs_unique_affix' )
|
834 |
) {
|
835 |
add_action( 'admin_init', array( &$this, 'connect_again' ) );
|
836 |
}
|
873 |
unset( $plugin_main_file->path );
|
874 |
|
875 |
$this->_storage->plugin_main_file = $plugin_main_file;
|
876 |
+
|
877 |
+
/**
|
878 |
+
* Clear global cached path.
|
879 |
+
*
|
880 |
+
* @author Leo Fajardo (@leorw)
|
881 |
+
* @since 1.2.2
|
882 |
+
*/
|
883 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map' );
|
884 |
+
unset( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
885 |
+
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
886 |
}
|
887 |
|
888 |
/**
|
905 |
array( &$this, '_submit_uninstall_reason_action' )
|
906 |
);
|
907 |
|
908 |
+
if ( ( $this->is_plugin() && self::is_plugins_page() ) ||
|
909 |
+
( $this->is_theme() && self::is_themes_page() )
|
910 |
+
) {
|
911 |
add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
|
912 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
913 |
}
|
914 |
|
915 |
/**
|
918 |
* @author Vova Feldman (@svovaf)
|
919 |
* @since 1.0.6
|
920 |
*
|
921 |
+
* @param bool $is_init Is initiation sequence.
|
922 |
*
|
923 |
* @return string
|
|
|
|
|
924 |
*/
|
925 |
private function _find_caller_plugin_file( $is_init = false ) {
|
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 |
}
|
969 |
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
970 |
*/
|
971 |
// Find caller module.
|
972 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
|
|
|
|
973 |
$this->_storage->plugin_main_file = (object) array(
|
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 |
*
|
1036 |
+
* @param number $module_id
|
1037 |
+
* @param string $slug
|
1038 |
+
*
|
1039 |
+
* @since 1.2.2
|
1040 |
+
*/
|
1041 |
+
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
1042 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
1043 |
+
|
1044 |
+
$store_option = false;
|
1045 |
+
|
1046 |
+
if ( ! isset( $id_slug_type_path_map[ $module_id ] ) ) {
|
1047 |
+
$id_slug_type_path_map[ $module_id ] = array(
|
1048 |
+
'slug' => $slug
|
1049 |
+
);
|
1050 |
+
|
1051 |
+
$store_option = true;
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
if ( ! isset( $id_slug_type_path_map[ $module_id ]['path'] ) ||
|
1055 |
+
/**
|
1056 |
+
* This verification is for cases when suddenly the same module
|
1057 |
+
* is installed but with a different folder name.
|
1058 |
+
*
|
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 |
+
|
1069 |
+
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
1070 |
+
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
1071 |
+
|
1072 |
+
$store_option = true;
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
if ( $store_option ) {
|
1076 |
+
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
/**
|
1081 |
+
* Identifies the caller type: plugin or theme.
|
1082 |
*
|
1083 |
+
* @author Leo Fajardo (@leorw)
|
1084 |
+
* @since 1.2.2
|
1085 |
*
|
1086 |
+
* @author Vova Feldman (@svovaf)
|
1087 |
+
* @since 1.2.2.3 Find the earliest module in the call stack that calls to the SDK. This fix is for cases when
|
1088 |
+
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
1089 |
+
* SDK an internal file instead of directly from functions.php.
|
1090 |
+
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
1091 |
*/
|
1092 |
private function get_caller_main_file_and_type() {
|
1093 |
self::require_plugin_essentials();
|
1114 |
$caller_file_candidate = false;
|
1115 |
$caller_map = array();
|
1116 |
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
1117 |
+
$themes_dir = fs_normalize_path( get_theme_root() );
|
1118 |
|
1119 |
for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
|
1120 |
if ( empty( $bt[ $i ]['file'] ) ) {
|
1129 |
if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
|
1130 |
'do_action',
|
1131 |
'apply_filter',
|
1132 |
+
// The string split is stupid, but otherwise, theme check
|
1133 |
+
// throws info notices.
|
1134 |
+
'requir' . 'e_once',
|
1135 |
+
'requir' . 'e',
|
1136 |
+
'includ' . 'e_once',
|
1137 |
+
'includ' . 'e'
|
1138 |
) )
|
1139 |
) {
|
1140 |
// Ignore call stack hooks and files inclusion.
|
1142 |
}
|
1143 |
|
1144 |
$caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
|
1145 |
+
|
1146 |
+
if ( 'functions.php' === basename( $caller_file_path ) ) {
|
1147 |
+
/**
|
1148 |
+
* 1. Assumes that theme's starting execution file is functions.php.
|
1149 |
+
* 2. This complex logic fixes symlink issues (e.g. with Vargant).
|
1150 |
+
*
|
1151 |
+
* @author Vova Feldman (@svovaf)
|
1152 |
+
* @since 1.2.2.5
|
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 |
+
}
|
1171 |
+
|
1172 |
$caller_file_hash = md5( $caller_file_path );
|
1173 |
|
1174 |
if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
|
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 |
|
|
|
|
|
|
|
|
|
|
|
1189 |
return (object) array(
|
1190 |
'module_type' => $module_type,
|
1191 |
'path' => $caller_file_candidate
|
1242 |
// Load the HTML template for the deactivation feedback dialog box.
|
1243 |
$vars = array(
|
1244 |
'reasons' => $uninstall_reasons,
|
1245 |
+
'id' => $this->_module_id
|
1246 |
);
|
1247 |
|
1248 |
/**
|
1260 |
* @return array The uninstall reasons for the specified user type.
|
1261 |
*/
|
1262 |
function _get_uninstall_reasons( $user_type = 'long-term' ) {
|
1263 |
+
$module_type = $this->_module_type;
|
1264 |
+
|
1265 |
$internal_message_template_var = array(
|
1266 |
+
'id' => $this->_module_id
|
1267 |
);
|
1268 |
|
1269 |
if ( $this->is_registered() && false !== $this->get_plan() && $this->get_plan()->has_technical_support() ) {
|
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' => '',
|
1292 |
'input_placeholder' => ''
|
1293 |
);
|
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 |
);
|
1447 |
|
1448 |
$this->_storage->store( 'uninstall_reason', $reason );
|
1449 |
|
1450 |
+
/**
|
1451 |
+
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
1452 |
+
* not support uninstall hook.
|
1453 |
+
*
|
1454 |
+
* @author Leo Fajardo (@leorw)
|
1455 |
+
* @since 1.2.2
|
1456 |
+
*/
|
1457 |
+
if ( $this->is_theme() ) {
|
1458 |
+
$this->_uninstall_plugin_event( false );
|
1459 |
+
$this->remove_sdk_reference();
|
1460 |
+
}
|
1461 |
+
|
1462 |
// Print '1' for successful operation.
|
1463 |
echo 1;
|
1464 |
exit;
|
1476 |
* @author Vova Feldman (@svovaf)
|
1477 |
* @since 1.0.0
|
1478 |
*
|
1479 |
+
* @param number $module_id
|
1480 |
+
* @param string|bool $slug
|
1481 |
+
* @param bool $is_init Is initiation sequence.
|
1482 |
*
|
1483 |
* @return Freemius|false
|
1484 |
*/
|
1485 |
+
static function instance( $module_id, $slug = false, $is_init = false ) {
|
1486 |
+
if ( empty( $module_id ) ) {
|
1487 |
return false;
|
1488 |
}
|
1489 |
|
1490 |
+
if ( ! is_numeric( $module_id ) ) {
|
1491 |
+
if ( ! $is_init && true === $slug ) {
|
1492 |
+
$is_init = true;
|
1493 |
+
}
|
1494 |
+
|
1495 |
+
$slug = $module_id;
|
1496 |
+
|
1497 |
+
$module = FS_Plugin_Manager::instance( $slug )->get();
|
1498 |
+
|
1499 |
+
if ( is_object( $module ) ) {
|
1500 |
+
$module_id = $module->id;
|
1501 |
+
}
|
1502 |
+
}
|
1503 |
+
|
1504 |
+
$key = 'm_' . $module_id;
|
1505 |
|
1506 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
1507 |
if ( 0 === count( self::$_instances ) ) {
|
1508 |
self::_load_required_static();
|
1509 |
}
|
1510 |
|
1511 |
+
self::$_instances[ $key ] = new Freemius( $module_id, $slug, $is_init );
|
1512 |
}
|
1513 |
|
1514 |
+
return self::$_instances[ $key ];
|
1515 |
}
|
1516 |
|
1517 |
/**
|
1518 |
* @author Vova Feldman (@svovaf)
|
1519 |
* @since 1.0.6
|
1520 |
*
|
1521 |
+
* @param number $addon_id
|
1522 |
*
|
1523 |
* @return bool
|
1524 |
*/
|
1525 |
+
private static function has_instance( $addon_id ) {
|
1526 |
+
return isset( self::$_instances[ 'm_' . $addon_id ] );
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
/**
|
1530 |
+
* @author Leo Fajardo (@leorw)
|
1531 |
+
* @since 1.2.2
|
1532 |
+
*
|
1533 |
+
* @param string|number $id_or_slug
|
1534 |
+
*
|
1535 |
+
* @return number|false
|
1536 |
+
*/
|
1537 |
+
private static function get_module_id( $id_or_slug ) {
|
1538 |
+
if ( is_numeric( $id_or_slug ) ) {
|
1539 |
+
return $id_or_slug;
|
1540 |
+
}
|
1541 |
+
|
1542 |
+
foreach ( self::$_instances as $instance ) {
|
1543 |
+
if ( $instance->is_plugin() && ( $id_or_slug === $instance->get_slug() ) ) {
|
1544 |
+
return $instance->get_id();
|
1545 |
+
}
|
1546 |
+
}
|
1547 |
+
|
1548 |
+
return false;
|
1549 |
}
|
1550 |
|
1551 |
/**
|
1557 |
* @return false|Freemius
|
1558 |
*/
|
1559 |
static function get_instance_by_id( $id ) {
|
1560 |
+
return isset ( self::$_instances[ 'm_' . $id ] ) ?
|
1561 |
+
self::$_instances[ 'm_' . $id ] :
|
1562 |
+
false;
|
|
|
|
|
|
|
|
|
1563 |
}
|
1564 |
|
1565 |
/**
|
1575 |
$slug = self::find_slug_by_basename( $plugin_file );
|
1576 |
|
1577 |
return ( false !== $slug ) ?
|
1578 |
+
self::instance( self::get_module_id( $slug ) ) :
|
1579 |
false;
|
1580 |
}
|
1581 |
|
1593 |
* @author Vova Feldman (@svovaf)
|
1594 |
* @since 1.0.6
|
1595 |
*
|
1596 |
+
* @param string|number $id_or_slug
|
1597 |
*
|
1598 |
+
* @return false|Freemius
|
1599 |
*/
|
1600 |
+
function get_addon_instance( $id_or_slug ) {
|
1601 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
1602 |
+
|
1603 |
+
return self::instance( $addon_id );
|
1604 |
}
|
1605 |
|
1606 |
#endregion ------------------------------------------------------------------
|
1612 |
* @return bool
|
1613 |
*/
|
1614 |
function is_parent_plugin_installed() {
|
1615 |
+
$is_active = self::has_instance( $this->_plugin->parent_plugin_id );
|
1616 |
+
|
1617 |
+
if ( $is_active ) {
|
1618 |
+
return true;
|
1619 |
+
}
|
1620 |
+
|
1621 |
+
/**
|
1622 |
+
* Parent module might be a theme. If that's the case, the add-on's FS
|
1623 |
+
* instance will be loaded prior to the theme's FS instance, therefore,
|
1624 |
+
* we need to check if it's active with a "look ahead".
|
1625 |
+
*
|
1626 |
+
* @author Vova Feldman
|
1627 |
+
* @since 1.2.2.3
|
1628 |
+
*/
|
1629 |
+
global $fs_active_plugins;
|
1630 |
+
if ( is_object( $fs_active_plugins ) && is_array( $fs_active_plugins->plugins ) ) {
|
1631 |
+
$active_theme = wp_get_theme();
|
1632 |
+
|
1633 |
+
foreach ( $fs_active_plugins->plugins as $sdk => $module ) {
|
1634 |
+
if ( WP_FS__MODULE_TYPE_THEME === $module->type ) {
|
1635 |
+
if ( $module->plugin_path == $active_theme->get_stylesheet() ) {
|
1636 |
+
// Parent module is a theme and it's currently active.
|
1637 |
+
return true;
|
1638 |
+
}
|
1639 |
+
}
|
1640 |
+
}
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
return false;
|
1644 |
}
|
1645 |
|
1646 |
/**
|
1673 |
function is_activation_mode( $and_on = true ) {
|
1674 |
return (
|
1675 |
( $this->is_on() || ! $and_on ) &&
|
1676 |
+
( ! $this->is_registered() || ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
|
1677 |
( ! $this->is_enable_anonymous() ||
|
1678 |
( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
|
1679 |
);
|
1697 |
}
|
1698 |
|
1699 |
// Check if current page is matching the activation page.
|
1700 |
+
return $this->is_matching_url( $this->get_activation_url() );
|
1701 |
}
|
1702 |
|
1703 |
/**
|
1711 |
* @author Vova Feldman (@svovaf)
|
1712 |
* @since 1.2.1.7
|
1713 |
*
|
|
|
1714 |
* @param string $sub_url
|
1715 |
+
* @param string $url If argument is not set, check if the sub_url matching the current's page URL.
|
1716 |
*
|
1717 |
* @return bool
|
1718 |
*/
|
1719 |
+
private function is_matching_url( $sub_url, $url = '' ) {
|
1720 |
+
if ( empty( $url ) ) {
|
1721 |
+
$url = $_SERVER['REQUEST_URI'];
|
1722 |
+
}
|
1723 |
+
|
1724 |
$url = strtolower( $url );
|
1725 |
$sub_url = strtolower( $sub_url );
|
1726 |
|
1782 |
$active_plugins_basenames = get_option( 'active_plugins' );
|
1783 |
|
1784 |
foreach ( $all_plugins as $basename => &$data ) {
|
1785 |
+
// By default set to inactive (next foreach update the active plugins).
|
1786 |
$data['is_active'] = false;
|
1787 |
// Enrich with plugin slug.
|
1788 |
$data['slug'] = self::get_plugin_slug( $basename );
|
1874 |
|
1875 |
self::$_global_admin_notices = FS_Admin_Notice_Manager::instance( 'global' );
|
1876 |
|
|
|
|
|
|
|
1877 |
add_action( 'admin_menu', array( 'Freemius', '_add_debug_section' ) );
|
1878 |
|
1879 |
add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
|
1884 |
|
1885 |
self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) );
|
1886 |
|
1887 |
+
if ( 0 == did_action( 'plugins_loaded' ) ) {
|
1888 |
+
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
|
1889 |
+
}
|
1890 |
|
1891 |
self::$_statics_loaded = true;
|
1892 |
}
|
1927 |
* @since 1.0.8
|
1928 |
*/
|
1929 |
static function _add_debug_section() {
|
1930 |
+
if ( ! current_user_can( 'activate_plugins' )
|
1931 |
+
&& ! current_user_can( 'switch_themes' )
|
1932 |
+
) {
|
1933 |
return;
|
1934 |
}
|
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.
|
1947 |
array( 'Freemius', '_debug_page_render' )
|
1948 |
);
|
1949 |
} else {
|
1950 |
+
// Add hidden debug page.
|
1951 |
+
$hook = FS_Admin_Menu_Manager::add_subpage(
|
1952 |
+
null,
|
1953 |
+
$title,
|
1954 |
+
$title,
|
1955 |
+
'manage_options',
|
1956 |
+
'freemius',
|
1957 |
+
array( 'Freemius', '_debug_page_render' )
|
1958 |
+
);
|
|
|
|
|
1959 |
}
|
1960 |
|
1961 |
if ( ! empty( $hook ) ) {
|
2033 |
self::shoot_ajax_success();
|
2034 |
}
|
2035 |
|
|
|
2036 |
/**
|
2037 |
* @author Vova Feldman (@svovaf)
|
2038 |
* @since 1.0.8
|
2051 |
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
2052 |
check_admin_referer( 'simulate_trial' );
|
2053 |
|
2054 |
+
$fs = freemius( fs_request_get( 'module_id' ) );
|
|
|
|
|
2055 |
|
2056 |
// Update SDK install to at least 24 hours before.
|
2057 |
$fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
|
2058 |
// Unset the trial shown timestamp.
|
2059 |
unset( $fs->_storage->trial_promotion_shown );
|
2060 |
+
} else if ( fs_request_is_action( 'delete_install' ) ) {
|
2061 |
+
check_admin_referer( 'delete_install' );
|
2062 |
+
|
2063 |
+
self::_delete_site_by_slug(
|
2064 |
+
fs_request_get( 'slug' ),
|
2065 |
+
fs_request_get( 'module_type' )
|
2066 |
+
);
|
2067 |
} else if ( fs_request_is_action( 'download_logs' ) ) {
|
2068 |
check_admin_referer( 'download_logs' );
|
2069 |
|
2087 |
self::$_static_logger->entrance();
|
2088 |
|
2089 |
$vars = array(
|
2090 |
+
'plugin_sites' => self::get_all_sites(),
|
2091 |
+
'theme_sites' => self::get_all_sites( WP_FS__MODULE_TYPE_THEME ),
|
2092 |
+
'users' => self::get_all_users(),
|
2093 |
+
'addons' => self::get_all_addons(),
|
2094 |
+
'account_addons' => self::get_all_account_addons(),
|
2095 |
+
'plugin_licenses' => self::get_all_licenses(),
|
2096 |
+
'theme_licenses' => self::get_all_licenses( WP_FS__MODULE_TYPE_THEME )
|
2097 |
);
|
2098 |
|
2099 |
fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' );
|
2213 |
'sdk' => $this->version,
|
2214 |
'is_admin' => json_encode( is_admin() ),
|
2215 |
'is_ajax' => json_encode( self::is_ajax() ),
|
2216 |
+
'is_cron' => json_encode( self::is_cron() ),
|
2217 |
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
2218 |
)
|
2219 |
);
|
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)
|
2386 |
}
|
2387 |
|
2388 |
/**
|
|
|
|
|
2389 |
* @author Vova Feldman (@svovaf)
|
2390 |
+
* @since 1.2.1.7
|
2391 |
*
|
2392 |
+
* @param string $email
|
2393 |
+
*
|
2394 |
+
* @return bool
|
2395 |
*/
|
2396 |
+
static function is_valid_email( $email ) {
|
2397 |
+
if ( false === filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
|
2398 |
+
return false;
|
2399 |
+
}
|
2400 |
+
|
2401 |
+
$parts = explode( '@', $email );
|
2402 |
+
|
2403 |
+
if ( 2 !== count( $parts ) || empty( $parts[1] ) ) {
|
2404 |
+
return false;
|
2405 |
+
}
|
2406 |
+
|
2407 |
+
$blacklist = array(
|
2408 |
+
'admin.',
|
2409 |
+
'webmaster.',
|
2410 |
+
'localhost.',
|
2411 |
+
'dev.',
|
2412 |
+
'development.',
|
2413 |
+
'test.',
|
2414 |
+
'stage.',
|
2415 |
+
'staging.',
|
2416 |
+
);
|
2417 |
+
|
2418 |
+
// Make sure domain is not one of the blacklisted.
|
2419 |
+
foreach ( $blacklist as $invalid ) {
|
2420 |
+
if ( 0 === strpos( $parts[1], $invalid ) ) {
|
2421 |
+
return false;
|
2422 |
+
}
|
2423 |
+
}
|
2424 |
+
|
2425 |
+
// Get the UTF encoded domain name.
|
2426 |
+
$domain = idn_to_ascii( $parts[1] ) . '.';
|
2427 |
+
|
2428 |
+
return ( checkdnsrr( $domain, 'MX' ) || checkdnsrr( $domain, 'A' ) );
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
/**
|
2432 |
+
* Generate API connectivity issue message.
|
2433 |
+
*
|
2434 |
+
* @author Vova Feldman (@svovaf)
|
2435 |
+
* @since 1.0.9
|
2436 |
+
*
|
2437 |
+
* @param mixed $api_result
|
2438 |
+
* @param bool $is_first_failure
|
2439 |
+
*/
|
2440 |
+
function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
|
2441 |
+
if ( ! $this->is_premium() && $this->_enable_anonymous ) {
|
2442 |
+
// Don't add message if it's the free version and can run anonymously.
|
2443 |
+
return;
|
2444 |
}
|
2445 |
|
2446 |
if ( ! function_exists( 'wp_nonce_url' ) ) {
|
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'
|
2804 |
) {
|
2805 |
$default_sections = $this->get_email_sections();
|
2806 |
|
2807 |
+
// Insert new sections or replace the default email sections.
|
2808 |
if ( is_array( $sections ) && ! empty( $sections ) ) {
|
2809 |
foreach ( $sections as $section_id => $custom_section ) {
|
2810 |
if ( ! isset( $default_sections[ $section_id ] ) ) {
|
2819 |
$current_section['title'] = $custom_section['title'];
|
2820 |
}
|
2821 |
|
2822 |
+
// Insert new rows under the current section or replace the default rows.
|
2823 |
if ( isset( $custom_section['rows'] ) && is_array( $custom_section['rows'] ) && ! empty( $custom_section['rows'] ) ) {
|
2824 |
foreach ( $custom_section['rows'] as $row_id => $row ) {
|
2825 |
$current_section['rows'][ $row_id ] = $row;
|
2864 |
|
2865 |
$active_plugin = self::get_active_plugins();
|
2866 |
|
2867 |
+
// Generate the list of active plugins separated by new line.
|
2868 |
$active_plugin_string = '';
|
2869 |
foreach ( $active_plugin as $plugin ) {
|
2870 |
$active_plugin_string .= sprintf(
|
2884 |
|
2885 |
$api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );
|
2886 |
|
2887 |
+
// Generate the default email sections.
|
2888 |
$sections = array(
|
2889 |
'sdk' => array(
|
2890 |
'title' => 'SDK',
|
2894 |
)
|
2895 |
),
|
2896 |
'plugin' => array(
|
2897 |
+
'title' => ucfirst( $this->get_module_type() ),
|
2898 |
'rows' => array(
|
2899 |
'name' => array( 'Name', $this->get_plugin_name() ),
|
2900 |
'version' => array( 'Version', $this->get_plugin_version() )
|
2903 |
'api' => array(
|
2904 |
'title' => 'API Subdomain',
|
2905 |
'rows' => array(
|
2906 |
+
'dns' => array(
|
2907 |
+
'DNS_CNAME',
|
2908 |
+
function_exists( 'dns_get_record' ) ?
|
2909 |
+
var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
|
2910 |
+
'dns_get_record() disabled/blocked'
|
2911 |
+
),
|
2912 |
+
'ip' => array(
|
2913 |
+
'IP',
|
2914 |
+
function_exists( 'gethostbyname' ) ?
|
2915 |
+
gethostbyname( $api_domain ) :
|
2916 |
+
'gethostbyname() disabled/blocked'
|
2917 |
+
),
|
2918 |
),
|
2919 |
),
|
2920 |
'site' => array(
|
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 );
|
3015 |
+
}
|
3016 |
+
}
|
3017 |
+
|
3018 |
+
if ( $this->should_stop_execution() ) {
|
3019 |
return;
|
3020 |
}
|
3021 |
|
3030 |
$this->_admin_notices->has_sticky( 'failed_connect_api' )
|
3031 |
) {
|
3032 |
if ( ! $this->_enable_anonymous || $this->is_premium() ) {
|
3033 |
+
// If anonymous mode is disabled, add firewall admin-notice message.
|
3034 |
add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
|
3035 |
|
3036 |
$this->add_ajax_action( 'resolve_firewall_issues', array(
|
3067 |
}
|
3068 |
|
3069 |
if ( $this->has_api_connectivity() ) {
|
3070 |
+
if ( self::is_cron() ) {
|
3071 |
$this->hook_callback_to_sync_cron();
|
3072 |
} else if ( $this->is_user_in_admin() ) {
|
3073 |
/**
|
3110 |
}
|
3111 |
|
3112 |
if ( $this->is_user_in_admin() ) {
|
3113 |
+
if ( self::is_plugins_page() && $this->is_plugin() ) {
|
3114 |
$this->hook_plugin_action_links();
|
3115 |
}
|
3116 |
|
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 |
|
3136 |
if ( $this->_parent->is_registered() && ! $this->is_registered() ) {
|
3137 |
// If parent plugin activated, automatically install add-on for the user.
|
3138 |
$this->_activate_addon_account( $this->_parent );
|
3139 |
+
} else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
|
3140 |
+
// If add-on activated and parent not, automatically install parent for the user.
|
3141 |
+
$this->activate_parent_account( $this->_parent );
|
3142 |
}
|
3143 |
|
3144 |
// @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
|
3145 |
if ( $this->is_premium() ) {
|
3146 |
+
// Remove add-on download admin-notice.
|
3147 |
$this->_parent->_admin_notices->remove_sticky( array(
|
3148 |
'addon_plan_upgraded_' . $this->_slug,
|
3149 |
'no_addon_license_' . $this->_slug,
|
3150 |
) );
|
3151 |
}
|
3152 |
|
3153 |
+
// $this->deactivate_premium_only_addon_without_license();
|
3154 |
}
|
3155 |
} else {
|
3156 |
if ( $this->has_addons() &&
|
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 ) )
|
3433 |
}
|
3434 |
|
3435 |
if ( false === $id ) {
|
3436 |
+
throw new Freemius_Exception( array(
|
3437 |
+
'error' => array(
|
3438 |
+
'type' => 'ParameterNotSet',
|
3439 |
+
'message' => 'Plugin id parameter is not set.',
|
3440 |
+
'code' => 'plugin_id_not_set',
|
3441 |
+
'http' => 500,
|
3442 |
+
)
|
3443 |
+
) );
|
3444 |
}
|
3445 |
if ( false === $public_key ) {
|
3446 |
+
throw new Freemius_Exception( array(
|
3447 |
+
'error' => array(
|
3448 |
+
'type' => 'ParameterNotSet',
|
3449 |
+
'message' => 'Plugin public_key parameter is not set.',
|
3450 |
+
'code' => 'plugin_public_key_not_set',
|
3451 |
+
'http' => 500,
|
3452 |
+
)
|
3453 |
+
) );
|
3454 |
}
|
3455 |
|
3456 |
$plugin = ( $this->_plugin instanceof FS_Plugin ) ?
|
3458 |
new FS_Plugin();
|
3459 |
|
3460 |
$plugin->update( array(
|
3461 |
+
'id' => $id,
|
3462 |
+
'type' => $this->get_option( $plugin_info, 'type', $this->_module_type),
|
3463 |
+
'public_key' => $public_key,
|
3464 |
+
'slug' => $this->_slug,
|
3465 |
+
'parent_plugin_id' => $parent_id,
|
3466 |
+
'version' => $this->get_plugin_version(),
|
3467 |
+
'title' => $this->get_plugin_name(),
|
3468 |
+
'file' => $this->_plugin_basename,
|
3469 |
+
'is_premium' => $this->get_bool_option( $plugin_info, 'is_premium', true ),
|
3470 |
+
'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
|
3471 |
+
'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
|
3472 |
) );
|
3473 |
|
3474 |
if ( $plugin->is_updated() ) {
|
3475 |
// Update plugin details.
|
3476 |
+
$this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->store( $plugin );
|
3477 |
}
|
3478 |
// Set the secret key after storing the plugin, we don't want to store the key in the storage.
|
3479 |
$this->_plugin->secret_key = $secret_key;
|
3491 |
}
|
3492 |
}
|
3493 |
|
3494 |
+
$this->_menu = FS_Admin_Menu_Manager::instance(
|
3495 |
+
$this->_module_id,
|
3496 |
+
$this->_module_type,
|
3497 |
+
$this->get_unique_affix()
|
3498 |
+
);
|
3499 |
+
|
3500 |
$this->_menu->init( $plugin_info['menu'], $this->is_addon() );
|
3501 |
|
3502 |
$this->_has_addons = $this->get_bool_option( $plugin_info, 'has_addons', false );
|
3572 |
if ( ! is_admin() ) {
|
3573 |
/**
|
3574 |
* If in activation mode, don't execute Freemius outside of the
|
3575 |
+
* admin dashboard.
|
3576 |
*
|
3577 |
* @author Vova Feldman (@svovaf)
|
3578 |
* @since 1.1.7.3
|
3593 |
return true;
|
3594 |
}
|
3595 |
|
3596 |
+
if ( self::is_cron() ) {
|
3597 |
/**
|
3598 |
* If in activation mode, don't execute Freemius during wp crons
|
3599 |
* (wp crons have HTTP context - called as HTTP request).
|
3631 |
function _after_code_type_change() {
|
3632 |
$this->_logger->entrance();
|
3633 |
|
3634 |
+
if ( $this->is_theme() ) {
|
3635 |
+
// Expire the cache of the previous tabs since the theme may
|
3636 |
+
// have setting updates after code type has changed.
|
3637 |
+
$this->_cache->expire( 'tabs' );
|
3638 |
+
$this->_cache->expire( 'tabs_stylesheets' );
|
3639 |
+
}
|
3640 |
+
|
3641 |
+
if ( $this->is_registered() ) {
|
3642 |
+
if ( ! $this->is_addon() ) {
|
3643 |
+
add_action(
|
3644 |
+
is_admin() ? 'admin_init' : 'init',
|
3645 |
+
array( &$this, '_plugin_code_type_changed' )
|
3646 |
+
);
|
3647 |
+
}
|
3648 |
+
|
3649 |
+
if ( $this->is_premium() ) {
|
3650 |
+
// Purge cached payments after switching to the premium version.
|
3651 |
+
// @todo This logic doesn't handle purging the cache for serviceware module upgrade.
|
3652 |
+
$this->get_api_user_scope()->purge_cache( "/plugins/{$this->_module_id}/payments.json?include_addons=true" );
|
3653 |
+
}
|
3654 |
+
}
|
3655 |
}
|
3656 |
|
3657 |
/**
|
3677 |
'license_activated',
|
3678 |
) );
|
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 {
|
3689 |
// Remove sticky message related to premium code activation.
|
3690 |
$this->_admin_notices->remove_sticky( 'premium_activated' );
|
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 |
}
|
3737 |
* @author Vova Feldman (@svovaf)
|
3738 |
* @since 1.0.6
|
3739 |
*
|
3740 |
+
* @param string|number $id_or_slug
|
3741 |
* @param bool|null $is_premium Since 1.2.1.7 can check for specified add-on version.
|
3742 |
*
|
3743 |
* @return bool
|
3744 |
*/
|
3745 |
+
function is_addon_activated( $id_or_slug, $is_premium = null ) {
|
3746 |
$this->_logger->entrance();
|
3747 |
|
3748 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
3749 |
+
$is_activated = self::has_instance( $addon_id );
|
3750 |
|
3751 |
if ( ! $is_activated ) {
|
3752 |
return false;
|
3754 |
|
3755 |
if ( is_bool( $is_premium ) ) {
|
3756 |
// Check if the specified code version is activate.
|
3757 |
+
$addon = $this->get_addon_instance( $addon_id );
|
3758 |
$is_activated = ( $is_premium === $addon->is_premium() );
|
3759 |
}
|
3760 |
|
3767 |
* @author Vova Feldman (@svovaf)
|
3768 |
* @since 1.1.7
|
3769 |
*
|
3770 |
+
* @param string|number $id_or_slug
|
3771 |
*
|
3772 |
* @return bool
|
3773 |
*/
|
3774 |
+
function is_addon_connected( $id_or_slug ) {
|
3775 |
$this->_logger->entrance();
|
3776 |
|
3777 |
+
$sites = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
|
3778 |
|
3779 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
3780 |
+
$addon = $this->get_addon( $addon_id );
|
3781 |
+
$slug = $addon->slug;
|
3782 |
if ( ! isset( $sites[ $slug ] ) ) {
|
3783 |
return false;
|
3784 |
}
|
3785 |
|
3786 |
$site = $sites[ $slug ];
|
3787 |
|
3788 |
+
$plugin = FS_Plugin_Manager::instance( $addon_id )->get();
|
3789 |
|
3790 |
if ( $plugin->parent_plugin_id != $this->_plugin->id ) {
|
3791 |
// The given slug do NOT belong to any of the plugin's add-ons.
|
3807 |
* @author Vova Feldman (@svovaf)
|
3808 |
* @since 1.0.6
|
3809 |
*
|
3810 |
+
* @param string|number $id_or_slug
|
3811 |
*
|
3812 |
* @return bool
|
3813 |
*/
|
3814 |
+
function is_addon_installed( $id_or_slug ) {
|
3815 |
$this->_logger->entrance();
|
3816 |
|
3817 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
3818 |
+
|
3819 |
+
return file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->get_addon_basename( $addon_id ) ) );
|
3820 |
}
|
3821 |
|
3822 |
/**
|
3825 |
* @author Vova Feldman (@svovaf)
|
3826 |
* @since 1.0.6
|
3827 |
*
|
3828 |
+
* @param string|number $id_or_slug
|
3829 |
*
|
3830 |
* @return string
|
3831 |
*/
|
3832 |
+
function get_addon_basename( $id_or_slug ) {
|
3833 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
3834 |
+
|
3835 |
+
if ( $this->is_addon_activated( $addon_id ) ) {
|
3836 |
+
return self::instance( $addon_id )->get_plugin_basename();
|
3837 |
}
|
3838 |
|
3839 |
+
$addon = $this->get_addon( $addon_id );
|
3840 |
+
$premium_basename = "{$addon->slug}-premium/{$addon->slug}.php";
|
3841 |
|
3842 |
if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
|
3843 |
return $premium_basename;
|
3844 |
}
|
3845 |
|
3846 |
+
$all_plugins = $this->get_all_plugins();
|
3847 |
+
|
3848 |
+
foreach ( $all_plugins as $basename => &$data ) {
|
3849 |
+
if ( $addon->slug === $data['slug'] ||
|
3850 |
+
$addon->slug . '-premium' === $data['slug']
|
3851 |
+
) {
|
3852 |
+
return $basename;
|
3853 |
+
}
|
3854 |
+
}
|
3855 |
+
|
3856 |
+
$free_basename = "{$addon->slug}/{$addon->slug}.php";
|
3857 |
|
3858 |
return $free_basename;
|
3859 |
}
|
3868 |
*/
|
3869 |
function get_installed_addons() {
|
3870 |
$installed_addons = array();
|
3871 |
+
foreach ( self::$_instances as $instance ) {
|
3872 |
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
3873 |
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
3874 |
$installed_addons[] = $instance;
|
3892 |
return false;
|
3893 |
}
|
3894 |
|
3895 |
+
foreach ( self::$_instances as $instance ) {
|
3896 |
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
3897 |
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
3898 |
return true;
|
3937 |
! $this->has_features_enabled_license() &&
|
3938 |
! $this->_has_premium_license()
|
3939 |
) {
|
3940 |
+
if ( $this->is_registered() ) {
|
3941 |
+
// IF wrapper is turned off because activation_timestamp is currently only stored for plugins (not addons).
|
3942 |
+
// if (empty($this->_storage->activation_timestamp) ||
|
3943 |
+
// (WP_FS__SCRIPT_START_TIME - $this->_storage->activation_timestamp) > 30
|
3944 |
+
// ) {
|
3945 |
+
/**
|
3946 |
+
* @todo When it's first fail, there's no reason to try and re-sync because the licenses were just synced after initial activation.
|
3947 |
+
*
|
3948 |
+
* Retry syncing the user add-on licenses.
|
3949 |
+
*/
|
3950 |
+
// Sync licenses.
|
3951 |
+
$this->_sync_licenses();
|
3952 |
+
// }
|
3953 |
|
3954 |
+
// Try to activate premium license.
|
3955 |
+
$this->_activate_license( true );
|
3956 |
+
}
|
3957 |
|
3958 |
if ( ! $this->has_free_plan() &&
|
3959 |
! $this->has_features_enabled_license() &&
|
3961 |
) {
|
3962 |
// @todo Check if deactivate plugins also call the deactivation hook.
|
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 |
|
3988 |
+
deactivate_plugins( array( $this->_plugin_basename ), true );
|
3989 |
+
|
3990 |
return true;
|
3991 |
}
|
3992 |
}
|
4012 |
$this->_plugin->secret_key = $secret_key;
|
4013 |
|
4014 |
// Update plugin details.
|
4015 |
+
FS_Plugin_Manager::instance( $this->_module_id )->update( $this->_plugin, true );
|
4016 |
}
|
4017 |
|
4018 |
/**
|
4101 |
* @since 1.1.7.3
|
4102 |
*/
|
4103 |
private function run_manual_sync() {
|
4104 |
+
self::require_pluggable_essentials();
|
4105 |
|
4106 |
if ( ! $this->is_user_admin() ) {
|
4107 |
return;
|
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!'
|
4436 |
* @return bool
|
4437 |
*/
|
4438 |
function is_plugin_activation() {
|
4439 |
+
return get_option( 'fs_'
|
4440 |
+
. ( $this->is_plugin() ? '' : $this->_module_type . '_' )
|
4441 |
+
. "{$this->_slug}_activated", false );
|
4442 |
}
|
4443 |
|
4444 |
/**
|
4452 |
/**
|
4453 |
* Automatically redirect to connect/activation page after plugin activation.
|
4454 |
*
|
4455 |
+
* @since 1.1.7 Do NOT redirect to opt-in when running in network admin mode.
|
4456 |
*/
|
4457 |
if ( $this->is_plugin_activation() ) {
|
4458 |
+
delete_option( 'fs_'
|
4459 |
+
. ( $this->is_plugin() ? '' : $this->_module_type . '_' )
|
4460 |
+
. "{$this->_slug}_activated" );
|
4461 |
|
4462 |
if ( ! function_exists( 'is_network_admin' ) || ! is_network_admin() ) {
|
4463 |
$this->_redirect_on_activation_hook();
|
4466 |
}
|
4467 |
}
|
4468 |
|
4469 |
+
if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
|
4470 |
+
check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
|
4471 |
|
4472 |
$this->skip_connection();
|
4473 |
|
4477 |
if ( ! $this->is_addon() && ! $this->is_registered() && ! $this->is_anonymous() ) {
|
4478 |
if ( ! $this->is_pending_activation() ) {
|
4479 |
if ( ! $this->_menu->is_main_settings_page() ) {
|
4480 |
+
/**
|
4481 |
+
* If a user visits any other admin page before activating the premium-only theme with a valid
|
4482 |
+
* license, reactivate the previous theme.
|
4483 |
+
*
|
4484 |
+
* @author Leo Fajardo (@leorw)
|
4485 |
+
* @since 1.2.2
|
4486 |
+
*/
|
4487 |
+
if ( $this->is_theme()
|
4488 |
+
&& $this->is_only_premium()
|
4489 |
+
&& ! $this->has_settings_menu()
|
4490 |
+
&& ! isset( $_REQUEST['fs_action'] )
|
4491 |
+
&& $this->can_activate_previous_theme()
|
4492 |
+
) {
|
4493 |
+
$this->activate_previous_theme();
|
4494 |
+
|
4495 |
+
return;
|
4496 |
+
}
|
4497 |
+
|
4498 |
if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
|
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',
|
4530 |
}
|
4531 |
|
4532 |
if ( $this->has_filter( 'optin_pointer_element' ) ) {
|
4533 |
+
// Don't show admin nag if plugin update.
|
4534 |
wp_enqueue_script( 'wp-pointer' );
|
4535 |
wp_enqueue_style( 'wp-pointer' );
|
4536 |
|
4541 |
'_add_connect_pointer_script'
|
4542 |
) );
|
4543 |
}
|
|
|
4544 |
}
|
4545 |
}
|
4546 |
}
|
4547 |
+
|
4548 |
+
if ( $this->is_theme() &&
|
4549 |
+
$this->_menu->is_main_settings_page()
|
4550 |
+
) {
|
4551 |
+
$this->_show_theme_activation_optin_dialog();
|
4552 |
+
}
|
4553 |
}
|
4554 |
|
4555 |
$this->_add_upgrade_action_link();
|
4578 |
* @since 1.1.4
|
4579 |
*/
|
4580 |
function _add_connect_pointer_script() {
|
4581 |
+
$vars = array( 'id' => $this->_module_id );
|
4582 |
$pointer_content = fs_get_template( 'connect.php', $vars );
|
4583 |
?>
|
4584 |
<script type="text/javascript">// <![CDATA[
|
4646 |
}
|
4647 |
|
4648 |
/**
|
4649 |
+
* Check if the current page is the plugin's main admin settings page.
|
4650 |
*
|
4651 |
* @author Vova Feldman (@svovaf)
|
4652 |
* @since 1.0.7
|
4669 |
* @param bool $store
|
4670 |
*/
|
4671 |
function _delete_site( $store = true ) {
|
4672 |
+
self::_delete_site_by_slug( $this->_slug, $this->_module_type, $store );
|
4673 |
+
}
|
4674 |
+
|
4675 |
+
/**
|
4676 |
+
* Delete site install from Database.
|
4677 |
+
*
|
4678 |
+
* @author Vova Feldman (@svovaf)
|
4679 |
+
* @since 1.2.2.7
|
4680 |
+
*
|
4681 |
+
* @param string $slug
|
4682 |
+
* @param string $module_type
|
4683 |
+
* @param bool $store
|
4684 |
+
*/
|
4685 |
+
static function _delete_site_by_slug($slug, $module_type, $store = true ) {
|
4686 |
+
$sites = self::get_all_sites( $module_type );
|
4687 |
|
4688 |
+
if ( isset( $sites[ $slug ] ) ) {
|
4689 |
+
unset( $sites[ $slug ] );
|
4690 |
}
|
4691 |
|
4692 |
+
self::set_account_option_by_module( $module_type, 'sites', $sites, $store );
|
4693 |
}
|
4694 |
|
4695 |
/**
|
4703 |
private function _delete_plans( $store = true ) {
|
4704 |
$this->_logger->entrance();
|
4705 |
|
4706 |
+
$plans = self::get_all_plans( $this->_module_type );
|
4707 |
|
4708 |
unset( $plans[ $this->_slug ] );
|
4709 |
|
4710 |
+
$this->set_account_option( 'plans', $plans, $store );
|
4711 |
}
|
4712 |
|
4713 |
/**
|
4722 |
private function _delete_licenses( $store = true, $plugin_slug = false ) {
|
4723 |
$this->_logger->entrance();
|
4724 |
|
4725 |
+
$all_licenses = self::get_all_licenses( $this->_module_type );
|
4726 |
|
4727 |
if ( ! is_string( $plugin_slug ) ) {
|
4728 |
$plugin_slug = $this->_slug;
|
4730 |
|
4731 |
unset( $all_licenses[ $plugin_slug ] );
|
4732 |
|
4733 |
+
$this->set_account_option( 'licenses', $all_licenses, $store );
|
4734 |
}
|
4735 |
|
4736 |
/**
|
4758 |
return empty( $this->_storage->plugin_last_version );
|
4759 |
}
|
4760 |
|
4761 |
+
/**
|
4762 |
+
* @author Leo Fajardo (@leorw)
|
4763 |
+
* @since 1.2.2
|
4764 |
+
*
|
4765 |
+
* @return bool|string
|
4766 |
+
*/
|
4767 |
+
private function get_previous_theme_slug() {
|
4768 |
+
return isset( $this->_storage->previous_theme ) ?
|
4769 |
+
$this->_storage->previous_theme :
|
4770 |
+
false;
|
4771 |
+
}
|
4772 |
+
|
4773 |
+
/**
|
4774 |
+
* @author Leo Fajardo (@leorw)
|
4775 |
+
* @since 1.2.2
|
4776 |
+
*
|
4777 |
+
* @return string
|
4778 |
+
*/
|
4779 |
+
private function can_activate_previous_theme() {
|
4780 |
+
$slug = $this->get_previous_theme_slug();
|
4781 |
+
if ( false !== $slug && current_user_can( 'switch_themes' ) ) {
|
4782 |
+
$theme_instance = wp_get_theme( $slug );
|
4783 |
+
|
4784 |
+
return $theme_instance->exists();
|
4785 |
+
}
|
4786 |
+
|
4787 |
+
return false;
|
4788 |
+
}
|
4789 |
+
|
4790 |
+
/**
|
4791 |
+
* @author Leo Fajardo (@leorw)
|
4792 |
+
* @since 1.2.2
|
4793 |
+
*
|
4794 |
+
* @return string
|
4795 |
+
*/
|
4796 |
+
private function activate_previous_theme() {
|
4797 |
+
switch_theme( $this->get_previous_theme_slug() );
|
4798 |
+
unset( $this->_storage->previous_theme );
|
4799 |
+
|
4800 |
+
global $pagenow;
|
4801 |
+
if ( 'themes.php' === $pagenow ) {
|
4802 |
+
/**
|
4803 |
+
* Refresh the active theme information.
|
4804 |
+
*
|
4805 |
+
* @author Leo Fajardo (@leorw)
|
4806 |
+
* @since 1.2.2
|
4807 |
+
*/
|
4808 |
+
fs_redirect( admin_url( $pagenow ) );
|
4809 |
+
}
|
4810 |
+
}
|
4811 |
+
|
4812 |
+
/**
|
4813 |
+
* @author Leo Fajardo (@leorw)
|
4814 |
+
* @since 1.2.2
|
4815 |
+
*
|
4816 |
+
* @return string
|
4817 |
+
*/
|
4818 |
+
function get_previous_theme_activation_url() {
|
4819 |
+
if ( ! $this->can_activate_previous_theme() ) {
|
4820 |
+
return '';
|
4821 |
+
}
|
4822 |
+
|
4823 |
+
/**
|
4824 |
+
* Activation URL
|
4825 |
+
*
|
4826 |
+
* @author Leo Fajardo (@leorw)
|
4827 |
+
* @since 1.2.2
|
4828 |
+
*/
|
4829 |
+
return wp_nonce_url(
|
4830 |
+
admin_url( 'themes.php?action=activate&stylesheet=' . urlencode( $this->get_previous_theme_slug() ) ),
|
4831 |
+
'switch-theme_' . $this->get_previous_theme_slug()
|
4832 |
+
);
|
4833 |
+
}
|
4834 |
+
|
4835 |
+
/**
|
4836 |
+
* Saves the slug of the previous theme if it still exists so that it can be used by the logic in the opt-in
|
4837 |
+
* form that decides whether to add a close button to the opt-in dialog or not. So after a premium-only theme is
|
4838 |
+
* activated, the close button will appear and will reactivate the previous theme if clicked. If the previous
|
4839 |
+
* theme doesn't exist, then there will be no close button.
|
4840 |
+
*
|
4841 |
+
* @author Leo Fajardo (@leorw)
|
4842 |
+
* @since 1.2.2
|
4843 |
+
*
|
4844 |
+
* @param string $slug_or_name Old theme's slug or name.
|
4845 |
+
* @param bool|WP_Theme $old_theme WP_Theme instance of the old theme if it still exists.
|
4846 |
+
*/
|
4847 |
+
function _activate_theme_event_hook( $slug_or_name, $old_theme = false ) {
|
4848 |
+
$this->_storage->previous_theme = ( false !== $old_theme ) ?
|
4849 |
+
$old_theme->get_stylesheet() :
|
4850 |
+
$slug_or_name;
|
4851 |
+
|
4852 |
+
$this->_activate_plugin_event_hook();
|
4853 |
+
}
|
4854 |
+
|
4855 |
/**
|
4856 |
* Plugin activated hook.
|
4857 |
*
|
4872 |
// Clear API cache on activation.
|
4873 |
FS_Api::clear_cache();
|
4874 |
|
4875 |
+
$is_premium_version_activation = ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) );
|
4876 |
+
|
4877 |
+
$this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
|
4878 |
+
|
4879 |
+
// 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
|
4880 |
+
// 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
|
4881 |
+
$other_version_basename = $is_premium_version_activation ?
|
4882 |
+
$this->_free_plugin_basename :
|
4883 |
+
$this->premium_plugin_basename();
|
4884 |
+
|
4885 |
+
/**
|
4886 |
+
* If the other module version is activate, deactivate it.
|
4887 |
+
*
|
4888 |
+
* @author Leo Fajardo (@leorw)
|
4889 |
+
* @since 1.2.2
|
4890 |
+
*/
|
4891 |
+
if ( is_plugin_active( $other_version_basename ) ) {
|
4892 |
+
deactivate_plugins( $other_version_basename );
|
4893 |
+
}
|
4894 |
|
4895 |
+
if ( $this->is_registered() ) {
|
4896 |
if ( $is_premium_version_activation ) {
|
4897 |
$this->reconnect_locally();
|
4898 |
}
|
4899 |
|
|
|
4900 |
|
4901 |
// Schedule re-activation event and sync.
|
4902 |
// $this->sync_install( array(), true );
|
4903 |
$this->schedule_install_sync();
|
4904 |
|
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() ) {
|
4914 |
/**
|
4915 |
* Reset "skipped" click cache on the following:
|
4916 |
+
* 1. Freemius DEV mode.
|
4917 |
+
* 2. WordPress DEBUG mode.
|
4918 |
+
* 3. If a plugin and the user skipped the exact same version before.
|
4919 |
*
|
4920 |
+
* @since 1.2.2.7 Ulrich Pogson (@grapplerulrich) asked to not reset the SKIPPED flag if the exact same THEME version was activated before unless the developer is running with WP_DEBUG on, or Freemius debug mode on (WP_FS__DEV_MODE).
|
4921 |
+
*
|
4922 |
+
* @todo 4. If explicitly asked to retry after every activation.
|
4923 |
*/
|
4924 |
if ( WP_FS__DEV_MODE ||
|
4925 |
+
(
|
4926 |
+
( $this->is_plugin() || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) &&
|
4927 |
+
$this->get_plugin_version() == $this->_storage->is_anonymous['version']
|
4928 |
+
)
|
4929 |
) {
|
4930 |
$this->reset_anonymous_mode();
|
4931 |
}
|
4952 |
! $this->_isAutoInstall
|
4953 |
) {
|
4954 |
// Store hint that the plugin was just activated to enable auto-redirection to settings.
|
4955 |
+
add_option( 'fs_'
|
4956 |
+
. ( $this->is_plugin() ? '' : $this->_module_type . '_' )
|
4957 |
+
. "{$this->_slug}_activated", true );
|
4958 |
}
|
4959 |
|
4960 |
/**
|
4985 |
|
4986 |
$this->do_action( 'before_account_delete' );
|
4987 |
|
4988 |
+
// Clear all admin notices.
|
4989 |
$this->_admin_notices->clear_all_sticky();
|
4990 |
|
4991 |
$this->_delete_site( false );
|
5111 |
*/
|
5112 |
private function reset_anonymous_mode() {
|
5113 |
unset( $this->_storage->is_anonymous );
|
5114 |
+
|
5115 |
+
/**
|
5116 |
+
* Ensure that this field is also "false", otherwise, if the current module's type is "theme" and the module
|
5117 |
+
* has no menus, the opt-in popup will not be shown immediately (in this case, the user will have to click
|
5118 |
+
* on the admin notice that contains the opt-in link in order to trigger the opt-in popup).
|
5119 |
+
*
|
5120 |
+
* @author Leo Fajardo (@leorw)
|
5121 |
+
* @since 1.2.2
|
5122 |
+
*/
|
5123 |
+
unset( $this->_is_anonymous );
|
5124 |
}
|
5125 |
|
5126 |
/**
|
5427 |
* @since 1.1.2
|
5428 |
*
|
5429 |
* @param string[] string $override
|
5430 |
+
* @param bool $include_plugins Since 1.1.8 by default include plugin changes.
|
5431 |
+
* @param bool $include_themes Since 1.1.8 by default include plugin changes.
|
5432 |
*
|
5433 |
* @return array
|
5434 |
*/
|
5799 |
if ( ! isset( $this->_plugin_data ) ) {
|
5800 |
self::require_plugin_essentials();
|
5801 |
|
5802 |
+
if ( $this->is_plugin() ) {
|
5803 |
+
/**
|
5804 |
+
* @author Vova Feldman (@svovaf)
|
5805 |
+
* @since 1.2.0 When using get_plugin_data() do NOT translate plugin data.
|
5806 |
+
*
|
5807 |
+
* @link https://github.com/Freemius/wordpress-sdk/issues/77
|
5808 |
+
*/
|
5809 |
+
$plugin_data = get_plugin_data(
|
5810 |
+
$this->_plugin_main_file_path,
|
5811 |
+
false,
|
5812 |
+
false
|
5813 |
+
);
|
5814 |
+
} else {
|
5815 |
+
$theme_data = wp_get_theme();
|
5816 |
+
|
5817 |
+
$plugin_data = array(
|
5818 |
+
'Name' => $theme_data->get( 'Name' ),
|
5819 |
+
'Version' => $theme_data->get( 'Version' ),
|
5820 |
+
'Author' => $theme_data->get( 'Author' ),
|
5821 |
+
'Description' => $theme_data->get( 'Description' ),
|
5822 |
+
'PluginURI' => $theme_data->get( 'ThemeURI' ),
|
5823 |
+
);
|
5824 |
+
}
|
5825 |
+
|
5826 |
+
$this->_plugin_data = $plugin_data;
|
5827 |
}
|
5828 |
|
5829 |
return $this->_plugin_data;
|
5832 |
/**
|
5833 |
* @author Vova Feldman (@svovaf)
|
5834 |
* @since 1.0.1
|
5835 |
+
* @since 1.2.2.5 If slug not set load slug by module ID.
|
5836 |
*
|
5837 |
* @return string Plugin slug.
|
5838 |
*/
|
5839 |
function get_slug() {
|
5840 |
+
if ( ! isset( $this->_slug ) ) {
|
5841 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
5842 |
+
$this->_slug = $id_slug_type_path_map[ $this->_module_id ]['slug'];
|
5843 |
+
}
|
5844 |
+
|
5845 |
return $this->_slug;
|
5846 |
}
|
5847 |
|
5934 |
// Get name.
|
5935 |
$this->_plugin_name = $plugin_data['Name'];
|
5936 |
|
5937 |
+
// Check if plugin name contains "(Premium)" suffix and remove it.
|
5938 |
+
$suffix = ' (premium)';
|
5939 |
$suffix_len = strlen( $suffix );
|
5940 |
|
5941 |
if ( strlen( $plugin_data['Name'] ) > $suffix_len &&
|
5980 |
return $this->apply_filters( 'plugin_title', $title );
|
5981 |
}
|
5982 |
|
5983 |
+
/**
|
5984 |
+
* @author Vova Feldman (@svovaf)
|
5985 |
+
* @since 1.2.2.7
|
5986 |
+
*
|
5987 |
+
* @param bool $lowercase
|
5988 |
+
*
|
5989 |
+
* @return string
|
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 );
|
6000 |
+
}
|
6001 |
+
|
6002 |
+
return $label;
|
6003 |
+
}
|
6004 |
+
|
6005 |
/**
|
6006 |
* @author Vova Feldman (@svovaf)
|
6007 |
* @since 1.0.4
|
6009 |
* @return string
|
6010 |
*/
|
6011 |
function get_plugin_basename() {
|
6012 |
+
if ( ! isset( $this->_plugin_basename ) ) {
|
6013 |
+
if ( $this->is_plugin() ) {
|
6014 |
+
$this->_plugin_basename = plugin_basename( $this->_plugin_main_file_path );
|
6015 |
+
} else {
|
6016 |
+
$this->_plugin_basename = basename( dirname( $this->_plugin_main_file_path ) );
|
6017 |
+
}
|
6018 |
+
}
|
6019 |
+
|
6020 |
return $this->_plugin_basename;
|
6021 |
}
|
6022 |
|
6094 |
}
|
6095 |
|
6096 |
/**
|
6097 |
+
* @param string $module_type
|
6098 |
+
*
|
6099 |
* @return FS_Site[]
|
6100 |
*/
|
6101 |
+
private static function get_all_sites( $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
|
6102 |
+
$sites = self::get_account_option( 'sites', $module_type );
|
6103 |
|
6104 |
if ( ! is_array( $sites ) ) {
|
6105 |
$sites = array();
|
6108 |
return $sites;
|
6109 |
}
|
6110 |
|
6111 |
+
/**
|
6112 |
+
* @author Leo Fajardo (@leorw)
|
6113 |
+
*
|
6114 |
+
* @since 1.2.2
|
6115 |
+
*
|
6116 |
+
* @param string $option_name
|
6117 |
+
* @param string $module_type
|
6118 |
+
*
|
6119 |
+
* @return mixed
|
6120 |
+
*/
|
6121 |
+
private static function get_account_option( $option_name, $module_type ) {
|
6122 |
+
if ( WP_FS__MODULE_TYPE_PLUGIN !== $module_type ) {
|
6123 |
+
$option_name = $module_type . '_' . $option_name;
|
6124 |
+
}
|
6125 |
+
|
6126 |
+
return self::$_accounts->get_option( $option_name, array() );
|
6127 |
+
}
|
6128 |
+
|
6129 |
+
/**
|
6130 |
+
* @author Leo Fajardo (@leorw)
|
6131 |
+
*
|
6132 |
+
* @since 1.2.2
|
6133 |
+
*
|
6134 |
+
* @param string $option_name
|
6135 |
+
* @param mixed $option_value
|
6136 |
+
* @param bool $store
|
6137 |
+
*/
|
6138 |
+
private function set_account_option( $option_name, $option_value, $store ) {
|
6139 |
+
self::set_account_option_by_module(
|
6140 |
+
$this->_module_type,
|
6141 |
+
$option_name,
|
6142 |
+
$option_value,
|
6143 |
+
$store
|
6144 |
+
);
|
6145 |
+
}
|
6146 |
+
|
6147 |
+
/**
|
6148 |
+
* @author Vova Feldman (@svovaf)
|
6149 |
+
*
|
6150 |
+
* @since 1.2.2.7
|
6151 |
+
*
|
6152 |
+
* @param string $module_type
|
6153 |
+
* @param string $option_name
|
6154 |
+
* @param mixed $option_value
|
6155 |
+
* @param bool $store
|
6156 |
+
*/
|
6157 |
+
private static function set_account_option_by_module( $module_type, $option_name, $option_value, $store ) {
|
6158 |
+
if ( WP_FS__MODULE_TYPE_PLUGIN != $module_type ) {
|
6159 |
+
$option_name = $module_type . '_' . $option_name;
|
6160 |
+
}
|
6161 |
+
|
6162 |
+
self::$_accounts->set_option( $option_name, $option_value, $store );
|
6163 |
+
}
|
6164 |
+
|
6165 |
/**
|
6166 |
* @author Vova Feldman (@svovaf)
|
6167 |
* @since 1.0.6
|
6168 |
*
|
6169 |
+
* @param string $module_type
|
6170 |
+
*
|
6171 |
* @return FS_Plugin_License[]
|
6172 |
*/
|
6173 |
+
private static function get_all_licenses( $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
|
6174 |
+
$licenses = self::get_account_option( 'licenses', $module_type );
|
6175 |
|
6176 |
if ( ! is_array( $licenses ) ) {
|
6177 |
$licenses = array();
|
6181 |
}
|
6182 |
|
6183 |
/**
|
6184 |
+
* @param string|bool $module_type
|
6185 |
+
*
|
6186 |
* @return FS_Plugin_Plan[]
|
6187 |
*/
|
6188 |
+
private static function get_all_plans( $module_type = false ) {
|
6189 |
+
$plans = self::get_account_option( 'plans', $module_type );
|
6190 |
|
6191 |
if ( ! is_array( $plans ) ) {
|
6192 |
$plans = array();
|
7024 |
*/
|
7025 |
function _add_license_activation_dialog_box() {
|
7026 |
$vars = array(
|
7027 |
+
'id' => $this->_module_id,
|
7028 |
);
|
7029 |
|
7030 |
fs_require_template( 'forms/license-activation.php', $vars );
|
7039 |
* @since 1.2.1.5
|
7040 |
*/
|
7041 |
function _add_optout_dialog() {
|
7042 |
+
if ( $this->is_theme() ) {
|
7043 |
+
$vars = null;
|
7044 |
+
fs_require_once_template( '/js/jquery.content-change.php', $vars );
|
7045 |
+
}
|
7046 |
|
7047 |
+
$vars = array( 'id' => $this->_module_id );
|
7048 |
fs_require_template( 'forms/optout.php', $vars );
|
7049 |
}
|
7050 |
|
7071 |
}
|
7072 |
|
7073 |
// Add license activation link and AJAX request handler.
|
7074 |
+
if ( self::is_plugins_page() ) {
|
7075 |
/**
|
7076 |
* @since 1.2.0 Add license action link only on plugins page.
|
7077 |
*/
|
7100 |
exit;
|
7101 |
}
|
7102 |
|
7103 |
+
$plugin_id = fs_request_get( 'module_id', '', 'post' );
|
7104 |
+
$fs = ( $plugin_id == $this->_module_id ) ?
|
7105 |
$this :
|
7106 |
+
$this->get_addon_instance( $plugin_id );
|
7107 |
|
7108 |
$error = false;
|
7109 |
$next_page = false;
|
7117 |
if ( isset( $install->error ) ) {
|
7118 |
$error = $install->error->message;
|
7119 |
} else {
|
7120 |
+
$fs->_sync_license( true );
|
|
|
|
|
7121 |
|
7122 |
+
$next_page = $fs->is_addon() ?
|
7123 |
+
$fs->get_parent_instance()->get_account_url() :
|
7124 |
+
$fs->get_account_url();
|
7125 |
|
7126 |
+
$fs->reconnect_locally();
|
7127 |
}
|
7128 |
} else {
|
7129 |
$next_page = $fs->opt_in( false, false, false, $license_key );
|
7216 |
);
|
7217 |
}
|
7218 |
|
7219 |
+
$this->shoot_ajax_success( array(
|
7220 |
'next_page' => $next_page,
|
7221 |
) );
|
7222 |
}
|
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 );
|
7271 |
exit;
|
7272 |
}
|
7273 |
|
7274 |
+
/**
|
7275 |
+
* @author Vova Feldman (@svovaf)
|
7276 |
+
* @since 1.2.1.8
|
7277 |
+
*
|
7278 |
+
* @var string
|
7279 |
+
*/
|
7280 |
+
private static $_pagenow;
|
7281 |
+
|
7282 |
+
/**
|
7283 |
+
* Get current page or the referer if executing a WP AJAX request.
|
7284 |
+
*
|
7285 |
+
* @author Vova Feldman (@svovaf)
|
7286 |
+
* @since 1.2.1.8
|
7287 |
+
*
|
7288 |
+
* @return string
|
7289 |
+
*/
|
7290 |
+
static function get_current_page() {
|
7291 |
+
if ( ! isset( self::$_pagenow ) ) {
|
7292 |
+
global $pagenow;
|
7293 |
+
|
7294 |
+
self::$_pagenow = $pagenow;
|
7295 |
+
|
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 );
|
7303 |
+
|
7304 |
+
self::$_pagenow = basename( $parts[0] );
|
7305 |
+
}
|
7306 |
+
}
|
7307 |
+
}
|
7308 |
+
|
7309 |
+
return self::$_pagenow;
|
7310 |
+
}
|
7311 |
+
|
7312 |
/**
|
7313 |
* Helper method to check if user in the plugins page.
|
7314 |
*
|
7317 |
*
|
7318 |
* @return bool
|
7319 |
*/
|
7320 |
+
static function is_plugins_page() {
|
7321 |
+
return ( 'plugins.php' === self::get_current_page() );
|
|
|
|
|
7322 |
}
|
7323 |
|
7324 |
/**
|
7329 |
*
|
7330 |
* @return bool
|
7331 |
*/
|
7332 |
+
static function is_themes_page() {
|
7333 |
+
return ( 'themes.php' === self::get_current_page() );
|
|
|
|
|
7334 |
}
|
7335 |
|
7336 |
+
#----------------------------------------------------------------------------------
|
7337 |
+
#region Affiliation
|
7338 |
+
#----------------------------------------------------------------------------------
|
7339 |
+
|
7340 |
+
/**
|
7341 |
+
* @author Leo Fajardo
|
7342 |
+
* @since 1.2.3
|
7343 |
+
*
|
7344 |
+
* @return bool
|
7345 |
+
*/
|
7346 |
+
function has_affiliate_program() {
|
7347 |
+
if ( ! is_object( $this->_plugin ) ) {
|
7348 |
+
return false;
|
7349 |
+
}
|
7350 |
+
|
7351 |
+
return $this->_plugin->has_affiliate_program();
|
7352 |
+
}
|
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;
|
7365 |
+
}
|
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 |
+
}
|
7396 |
+
}
|
7397 |
+
|
7398 |
+
$this->affiliate = $affiliate;
|
7399 |
+
}
|
7400 |
+
}
|
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
|
7418 |
+
*
|
7419 |
+
* @return FS_Affiliate
|
7420 |
+
*/
|
7421 |
+
function get_affiliate() {
|
7422 |
+
return $this->affiliate;
|
7423 |
+
}
|
7424 |
+
|
7425 |
+
|
7426 |
+
/**
|
7427 |
+
* @author Leo Fajardo
|
7428 |
+
* @since 1.2.3
|
7429 |
+
*
|
7430 |
+
* @return FS_AffiliateTerms
|
7431 |
+
*/
|
7432 |
+
function get_affiliate_terms() {
|
7433 |
+
return is_object( $this->custom_affiliate_terms ) ?
|
7434 |
+
$this->custom_affiliate_terms :
|
7435 |
+
$this->plugin_affiliate_terms;
|
7436 |
+
}
|
7437 |
+
|
7438 |
+
/**
|
7439 |
+
* @author Leo Fajardo
|
7440 |
+
* @since 1.2.3
|
7441 |
+
*
|
7442 |
+
* @return FS_Affiliate|null
|
7443 |
+
*/
|
7444 |
+
function _submit_affiliate_application() {
|
7445 |
+
$this->_logger->entrance();
|
7446 |
+
|
7447 |
+
$this->check_ajax_referer( 'submit_affiliate_application' );
|
7448 |
+
|
7449 |
+
if ( ! $this->is_user_admin() ) {
|
7450 |
+
// Only for admins.
|
7451 |
+
self::shoot_ajax_failure();
|
7452 |
+
}
|
7453 |
+
|
7454 |
+
$affiliate = fs_request_get( 'affiliate' );
|
7455 |
+
|
7456 |
+
if ( empty( $affiliate['promotion_methods'] ) ) {
|
7457 |
+
unset( $affiliate['promotion_methods'] );
|
7458 |
+
}
|
7459 |
+
|
7460 |
+
if ( ! empty( $affiliate['additional_domains'] ) ) {
|
7461 |
+
$affiliate['additional_domains'] = array_unique( $affiliate['additional_domains'] );
|
7462 |
+
}
|
7463 |
+
|
7464 |
+
if ( ! $this->is_registered() ) {
|
7465 |
+
// Opt in but don't track usage.
|
7466 |
+
$next_page = $this->opt_in(
|
7467 |
+
false,
|
7468 |
+
false,
|
7469 |
+
false,
|
7470 |
+
false,
|
7471 |
+
false,
|
7472 |
+
false,
|
7473 |
+
true
|
7474 |
+
);
|
7475 |
+
|
7476 |
+
if ( is_object( $next_page ) && $this->is_api_error( $next_page ) ) {
|
7477 |
+
self::shoot_ajax_failure(
|
7478 |
+
isset( $next_page->error ) ?
|
7479 |
+
$next_page->error->message :
|
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" ),
|
7492 |
+
'post',
|
7493 |
+
$affiliate
|
7494 |
+
);
|
7495 |
+
|
7496 |
+
if ( $this->is_api_error( $result ) ) {
|
7497 |
+
self::shoot_ajax_failure(
|
7498 |
+
isset( $result->error ) ?
|
7499 |
+
$result->error->message :
|
7500 |
+
var_export( $result, true )
|
7501 |
+
);
|
7502 |
+
}
|
7503 |
+
else
|
7504 |
+
{
|
7505 |
+
if ( $this->_admin_notices->has_sticky( 'affiliate_program' ) ) {
|
7506 |
+
$this->_admin_notices->remove_sticky( 'affiliate_program' );
|
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 |
+
);
|
7514 |
+
|
7515 |
+
if ( ! empty( $affiliate['promotion_methods'] ) ) {
|
7516 |
+
$affiliate_application_data['promotion_methods'] = $affiliate['promotion_methods'];
|
7517 |
+
}
|
7518 |
+
|
7519 |
+
if ( ! empty( $affiliate['domain'] ) ) {
|
7520 |
+
$affiliate_application_data['domain'] = $affiliate['domain'];
|
7521 |
+
}
|
7522 |
+
|
7523 |
+
if ( ! empty( $affiliate['additional_domains'] ) ) {
|
7524 |
+
$affiliate_application_data['additional_domains'] = $affiliate['additional_domains'];
|
7525 |
+
}
|
7526 |
+
|
7527 |
+
$this->_storage->affiliate_application_data = $affiliate_application_data;
|
7528 |
+
}
|
7529 |
+
|
7530 |
+
// Purge cached affiliate.
|
7531 |
+
$api->purge_cache( 'affiliate.json' );
|
7532 |
+
|
7533 |
+
self::shoot_ajax_success( $result );
|
7534 |
+
}
|
7535 |
+
|
7536 |
+
/**
|
7537 |
+
* @author Leo Fajardo
|
7538 |
+
* @since 1.2.3
|
7539 |
+
*
|
7540 |
+
* @return array|null
|
7541 |
+
*/
|
7542 |
+
function get_affiliate_application_data() {
|
7543 |
+
if ( empty( $this->_storage->affiliate_application_data ) ) {
|
7544 |
+
return null;
|
7545 |
+
}
|
7546 |
+
|
7547 |
+
return $this->_storage->affiliate_application_data;
|
7548 |
+
}
|
7549 |
+
|
7550 |
+
#endregion Affiliation ------------------------------------------------------------
|
7551 |
+
|
7552 |
#----------------------------------------------------------------------------------
|
7553 |
#region URL Generators
|
7554 |
#----------------------------------------------------------------------------------
|
7736 |
* @return bool
|
7737 |
*/
|
7738 |
function is_plugin() {
|
7739 |
+
return ( WP_FS__MODULE_TYPE_PLUGIN === $this->_module_type );
|
7740 |
+
}
|
7741 |
+
|
7742 |
+
/**
|
7743 |
+
* @author Leo Fajardo (@leorw)
|
7744 |
+
* @since 1.2.2
|
7745 |
+
*
|
7746 |
+
* @return string
|
7747 |
+
*/
|
7748 |
+
function get_module_type() {
|
7749 |
+
if ( ! isset( $this->_module_type ) ) {
|
7750 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
7751 |
+
$this->_module_type = $id_slug_type_path_map[ $this->_module_id ]['type'];
|
7752 |
+
}
|
7753 |
+
|
7754 |
+
return $this->_module_type;
|
7755 |
+
}
|
7756 |
+
|
7757 |
+
/**
|
7758 |
+
* @author Leo Fajardo (@leorw)
|
7759 |
+
* @since 1.2.2
|
7760 |
+
*
|
7761 |
+
* @return string
|
7762 |
+
*/
|
7763 |
+
function get_plugin_main_file_path() {
|
7764 |
+
return $this->_plugin_main_file_path;
|
7765 |
}
|
7766 |
|
7767 |
/**
|
7835 |
}
|
7836 |
|
7837 |
// Verify the call is relevant for the plugin.
|
7838 |
+
if ( $this->_module_id != fs_request_get( 'module_id' ) ) {
|
7839 |
return false;
|
7840 |
}
|
7841 |
|
7864 |
* @since 1.2.0
|
7865 |
*
|
7866 |
* @param array|string $actions Collection of AJAX actions.
|
7867 |
+
* @param number|null $module_id
|
7868 |
*
|
7869 |
* @return bool
|
7870 |
*/
|
7871 |
+
static function is_ajax_action_static( $actions, $module_id = null ) {
|
7872 |
// Verify it's an ajax call.
|
7873 |
if ( ! self::is_ajax() ) {
|
7874 |
return false;
|
7875 |
}
|
7876 |
|
7877 |
+
|
7878 |
+
if ( ! empty( $module_id ) ) {
|
7879 |
// Verify the call is relevant for the plugin.
|
7880 |
+
if ( $module_id != fs_request_get( 'module_id' ) ) {
|
7881 |
return false;
|
7882 |
}
|
7883 |
}
|
7891 |
$ajax_action = fs_request_get( 'action' );
|
7892 |
|
7893 |
foreach ( $actions as $action ) {
|
7894 |
+
if ( $ajax_action === self::get_ajax_action_static( $action, $module_id ) ) {
|
7895 |
return true;
|
7896 |
}
|
7897 |
}
|
7906 |
*
|
7907 |
* @return bool
|
7908 |
*/
|
7909 |
+
static function is_cron() {
|
7910 |
return ( defined( 'DOING_CRON' ) && DOING_CRON );
|
7911 |
}
|
7912 |
|
7913 |
/**
|
7914 |
+
* Check if a real user is visiting the admin dashboard.
|
7915 |
*
|
7916 |
* @author Vova Feldman (@svovaf)
|
7917 |
* @since 1.1.7
|
7919 |
* @return bool
|
7920 |
*/
|
7921 |
function is_user_in_admin() {
|
7922 |
+
return is_admin() && ! self::is_ajax() && ! self::is_cron();
|
7923 |
+
}
|
7924 |
+
|
7925 |
+
/**
|
7926 |
+
* Check if a real user is in the customizer view.
|
7927 |
+
*
|
7928 |
+
* @author Vova Feldman (@svovaf)
|
7929 |
+
* @since 1.2.2.7
|
7930 |
+
*
|
7931 |
+
* @return bool
|
7932 |
+
*/
|
7933 |
+
static function is_customizer() {
|
7934 |
+
return is_customize_preview();
|
7935 |
}
|
7936 |
|
7937 |
/**
|
7966 |
|
7967 |
$page_param = $this->_menu->get_slug( $page );
|
7968 |
|
7969 |
+
if ( empty( $page ) &&
|
7970 |
+
$this->is_theme() &&
|
7971 |
+
// Show the opt-in as an overlay for free wp.org themes or themes without any settings page.
|
7972 |
+
( $this->is_free_wp_org_theme() || ! $this->has_settings_menu() ) ) {
|
7973 |
+
$params[ $this->get_unique_affix() . '_show_optin' ] = 'true';
|
7974 |
+
|
7975 |
+
return add_query_arg(
|
7976 |
+
$params,
|
7977 |
+
admin_url( 'themes.php' )
|
7978 |
+
);
|
7979 |
+
}
|
7980 |
+
|
7981 |
if ( ! $this->has_settings_menu() ) {
|
7982 |
if ( ! empty( $page ) ) {
|
7983 |
// Module doesn't have a setting page, but since the request is for
|
7984 |
+
// a specific Freemius page, use the admin.php path.
|
7985 |
return add_query_arg( array_merge( $params, array(
|
7986 |
'page' => $page_param,
|
7987 |
+
) ), admin_url( 'admin.php' ) );
|
7988 |
} else {
|
7989 |
if ( $this->is_activation_mode() ) {
|
7990 |
/**
|
7995 |
*/
|
7996 |
return add_query_arg( array_merge( $params, array(
|
7997 |
'page' => $this->_slug,
|
7998 |
+
) ), admin_url( 'admin.php', 'admin' ) );
|
7999 |
} else {
|
8000 |
// Plugin without a settings page.
|
8001 |
+
return add_query_arg(
|
8002 |
+
$params,
|
8003 |
+
admin_url( 'plugins.php' )
|
8004 |
+
);
|
8005 |
}
|
8006 |
}
|
8007 |
}
|
8011 |
$parent_slug = $this->_menu->get_parent_slug();
|
8012 |
$menu_file = ( false !== strpos( $parent_slug, '.php' ) ) ?
|
8013 |
$parent_slug :
|
8014 |
+
'admin.php';
|
8015 |
|
8016 |
return add_query_arg( array_merge( $params, array(
|
8017 |
'page' => $page_param,
|
8018 |
+
) ), admin_url( $menu_file, 'admin' ) );
|
8019 |
}
|
8020 |
|
8021 |
// Module has a top level CPT settings page.
|
8023 |
if ( empty( $page ) && $this->is_activation_mode() ) {
|
8024 |
return add_query_arg( array_merge( $params, array(
|
8025 |
'page' => $page_param
|
8026 |
+
) ), admin_url( 'admin.php', 'admin' ) );
|
8027 |
} else {
|
8028 |
if ( ! empty( $page ) ) {
|
8029 |
$params['page'] = $page_param;
|
8031 |
|
8032 |
return add_query_arg(
|
8033 |
$params,
|
8034 |
+
admin_url( $this->_menu->get_raw_slug(), 'admin' )
|
8035 |
);
|
8036 |
}
|
8037 |
}
|
8039 |
// Module has a custom top level settings page.
|
8040 |
return add_query_arg( array_merge( $params, array(
|
8041 |
'page' => $page_param,
|
8042 |
+
) ), admin_url( 'admin.php', 'admin' ) );
|
8043 |
+
}
|
8044 |
+
|
8045 |
+
/**
|
8046 |
+
* Check if currently in a specified admin page.
|
8047 |
+
*
|
8048 |
+
* @author Vova Feldman (@svovaf)
|
8049 |
+
* @since 1.2.2.7
|
8050 |
+
*
|
8051 |
+
* @param string $page
|
8052 |
+
*
|
8053 |
+
* @return bool
|
8054 |
+
*/
|
8055 |
+
function is_admin_page( $page ) {
|
8056 |
+
return ( $this->_menu->get_slug( $page ) === fs_request_get( 'page', '', 'get' ) );
|
8057 |
+
}
|
8058 |
+
|
8059 |
+
/**
|
8060 |
+
* Get module's main admin setting page URL.
|
8061 |
+
*
|
8062 |
+
* @author Vova Feldman (@svovaf)
|
8063 |
+
* @since 1.2.2.7
|
8064 |
+
*
|
8065 |
+
* @return string
|
8066 |
+
*/
|
8067 |
+
function main_menu_url() {
|
8068 |
+
return $this->_menu->main_menu_url();
|
8069 |
+
}
|
8070 |
+
|
8071 |
+
/**
|
8072 |
+
* Check if currently on the theme's setting page or
|
8073 |
+
* on any of the Freemius added pages (via tabs).
|
8074 |
+
*
|
8075 |
+
* @author Vova Feldman (@svovaf)
|
8076 |
+
* @since 1.2.2.7
|
8077 |
+
*
|
8078 |
+
* @return bool
|
8079 |
+
*/
|
8080 |
+
function is_theme_settings_page() {
|
8081 |
+
return fs_starts_with(
|
8082 |
+
fs_request_get( 'page', '', 'get' ),
|
8083 |
+
$this->_menu->get_slug()
|
8084 |
+
);
|
8085 |
}
|
8086 |
|
8087 |
/**
|
8102 |
}
|
8103 |
|
8104 |
return $this->get_account_url(
|
8105 |
+
$this->get_unique_affix() . '_sync_license',
|
8106 |
$params,
|
8107 |
$add_action_nonce
|
8108 |
);
|
8297 |
*
|
8298 |
* @return FS_Entity Return an decrypted clone entity.
|
8299 |
*/
|
8300 |
+
private static function decrypt_entity( FS_Entity $entity ) {
|
8301 |
$clone = clone $entity;
|
8302 |
$props = get_object_vars( $entity );
|
8303 |
|
8399 |
|
8400 |
$this->do_action( 'before_account_load' );
|
8401 |
|
8402 |
+
$sites = self::get_all_sites( $this->_module_type );
|
8403 |
$users = self::get_all_users();
|
8404 |
+
$plans = self::get_all_plans( $this->_module_type );
|
8405 |
+
$licenses = self::get_all_licenses( $this->_module_type );
|
8406 |
|
8407 |
if ( $this->_logger->is_on() && is_admin() ) {
|
8408 |
$this->_logger->log( 'sites = ' . var_export( $sites, true ) );
|
8420 |
) {
|
8421 |
// Load site.
|
8422 |
$this->_site = clone $site;
|
8423 |
+
$this->_site->plan = self::decrypt_entity( $this->_site->plan );
|
8424 |
+
|
8425 |
+
/**
|
8426 |
+
* If the install owner's details are not stored locally, use the previous user's details if available.
|
8427 |
+
*
|
8428 |
+
* @author Leo Fajardo (@leorw)
|
8429 |
+
*/
|
8430 |
+
if ( ! isset( $users[ $this->_site->user_id ] ) && FS_User::is_valid_id( $this->_storage->prev_user_id ) ) {
|
8431 |
+
$user_id = $this->_storage->prev_user_id;
|
8432 |
+
} else {
|
8433 |
+
$user_id = $this->_site->user_id;
|
8434 |
+
}
|
8435 |
|
8436 |
// Load relevant user.
|
8437 |
+
$this->_user = clone $users[ $user_id ];
|
8438 |
|
8439 |
// Load plans.
|
8440 |
$this->_plans = $plans[ $this->_slug ];
|
8443 |
} else {
|
8444 |
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
8445 |
if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) {
|
8446 |
+
$this->_plans[ $i ] = self::decrypt_entity( $this->_plans[ $i ] );
|
8447 |
} else {
|
8448 |
unset( $this->_plans[ $i ] );
|
8449 |
}
|
8508 |
|
8509 |
$current_user = self::_get_current_wp_user();
|
8510 |
|
8511 |
+
$activation_action = $this->get_unique_affix() . '_activate_new';
|
8512 |
$return_url = $this->is_anonymous() ?
|
8513 |
// If skipped already, then return to the account page.
|
8514 |
$this->get_account_url( $activation_action, array(), false ) :
|
8515 |
// Return to the module's main page.
|
8516 |
+
$this->get_after_activation_url( 'after_connect_url', array( 'fs_action' => $activation_action ) );
|
|
|
|
|
|
|
8517 |
|
8518 |
$params = array(
|
8519 |
'user_firstname' => $current_user->user_firstname,
|
8582 |
* In this case, the user and site info will be sent to the server but no
|
8583 |
* data will be saved to the WP installation's database.
|
8584 |
* @param number|bool $trial_plan_id
|
8585 |
+
* @param bool $is_disconnected Whether or not to opt in without tracking.
|
8586 |
*
|
8587 |
* @return string|object
|
8588 |
* @use WP_Error
|
8593 |
$last = false,
|
8594 |
$license_key = false,
|
8595 |
$is_uninstall = false,
|
8596 |
+
$trial_plan_id = false,
|
8597 |
+
$is_disconnected = false
|
8598 |
) {
|
8599 |
$this->_logger->entrance();
|
8600 |
|
8647 |
);
|
8648 |
}
|
8649 |
|
8650 |
+
if ( isset( $params['license_key'] ) ) {
|
8651 |
+
$fs_user = Freemius::_get_user_by_email( $email );
|
8652 |
+
|
8653 |
+
if ( is_object( $fs_user ) ) {
|
8654 |
+
/**
|
8655 |
+
* If opting in with a context license and the context WP Admin user already opted in
|
8656 |
+
* before from the current site, add the user context security params to avoid the
|
8657 |
+
* unnecessry email activation when the context license is owned by the same context user.
|
8658 |
+
*
|
8659 |
+
* @author Leo Fajardo (@leorw)
|
8660 |
+
* @since 1.2.3
|
8661 |
+
*/
|
8662 |
+
$params = array_merge( $params, FS_Security::instance()->get_context_params(
|
8663 |
+
$fs_user,
|
8664 |
+
false,
|
8665 |
+
'install_with_existing_user'
|
8666 |
+
) );
|
8667 |
+
}
|
8668 |
+
}
|
8669 |
+
|
8670 |
+
$params['is_disconnected'] = $is_disconnected;
|
8671 |
+
$params['format'] = 'json';
|
8672 |
|
8673 |
$url = WP_FS__ADDRESS . '/action/service/user/install/';
|
8674 |
if ( isset( $_COOKIE['XDEBUG_SESSION'] ) ) {
|
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;
|
8755 |
} else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) {
|
8756 |
// Pending activation, add message.
|
8757 |
return $this->set_pending_confirmation(
|
8758 |
+
( isset( $decoded->email ) ?
|
8759 |
+
$decoded->email :
|
8760 |
+
true ),
|
8761 |
false,
|
8762 |
$filtered_license_key,
|
8763 |
! empty( $params['trial_plan_id'] )
|
8823 |
|
8824 |
$this->_admin_notices->remove_sticky( 'connect_account' );
|
8825 |
|
8826 |
+
if ( $this->is_pending_activation() || ! $this->has_settings_menu() ) {
|
8827 |
// Remove pending activation sticky notice (if still exist).
|
8828 |
$this->_admin_notices->remove_sticky( 'activation_pending' );
|
8829 |
|
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 |
}
|
8840 |
}
|
8841 |
|
8842 |
if ( $this->is_paying_or_trial() ) {
|
8843 |
+
if ( ! $this->is_premium() || ! $this->has_premium_version() || ! $this->has_settings_menu() ) {
|
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 |
}
|
8928 |
return;
|
8929 |
}
|
8930 |
|
8931 |
+
if ( ( $this->is_plugin() && fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ) ||
|
8932 |
+
// @todo This logic should be improved because it's executed on every load of a theme.
|
8933 |
+
$this->is_theme()
|
8934 |
+
) {
|
8935 |
// check_admin_referer( $this->_slug . '_activate_new' );
|
8936 |
|
8937 |
if ( fs_request_has( 'user_secret_key' ) ) {
|
9074 |
return;
|
9075 |
}
|
9076 |
|
9077 |
+
if ( fs_request_is_action( $this->get_unique_affix() . '_activate_existing' ) && fs_request_is_post() ) {
|
9078 |
// check_admin_referer( 'activate_existing_' . $this->_plugin->public_key );
|
9079 |
|
9080 |
/**
|
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 |
|
9151 |
if ( $redirect ) {
|
9152 |
+
/**
|
9153 |
+
* We set the user before getting the user scope API handler, so the user became temporarily
|
9154 |
+
* registered (`is_registered() = true`). Since the API returned an error and we will redirect,
|
9155 |
+
* we have to set the user to `null`, otherwise, the user will be redirected to the wrong
|
9156 |
+
* activation page based on the return value of `is_registered()`. In addition, in case the
|
9157 |
+
* context plugin doesn't have a settings menu and the default page is the `Plugins` page,
|
9158 |
+
* misleading plugin activation errors will be shown on the `Plugins` page.
|
9159 |
+
*
|
9160 |
+
* @author Leo Fajardo (@leorw)
|
9161 |
+
*/
|
9162 |
+
$this->_user = null;
|
9163 |
+
|
9164 |
+
fs_redirect( $this->get_activation_url( array( 'error' => $install->error->message ) ) );
|
9165 |
}
|
9166 |
|
9167 |
return $install;
|
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 |
|
9229 |
$this->_activate_license( true );
|
9230 |
}
|
9231 |
|
9232 |
+
/**
|
9233 |
+
* Tries to activate parent account based on add-on's info.
|
9234 |
+
*
|
9235 |
+
* @author Vova Feldman (@svovaf)
|
9236 |
+
* @since 1.2.2.7
|
9237 |
+
*
|
9238 |
+
* @param Freemius $parent_fs
|
9239 |
+
*/
|
9240 |
+
private function activate_parent_account( Freemius $parent_fs ) {
|
9241 |
+
if ( ! $this->is_addon() ) {
|
9242 |
+
// This is not an add-on.
|
9243 |
+
return;
|
9244 |
+
}
|
9245 |
+
|
9246 |
+
if ( $parent_fs->is_registered() ) {
|
9247 |
+
// Already activated.
|
9248 |
+
return;
|
9249 |
+
}
|
9250 |
+
|
9251 |
+
// Activate parent with add-on's user credentials.
|
9252 |
+
$parent_install = $this->get_api_user_scope()->call(
|
9253 |
+
"/plugins/{$parent_fs->_plugin->id}/installs.json",
|
9254 |
+
'post',
|
9255 |
+
$parent_fs->get_install_data_for_api( array(
|
9256 |
+
'uid' => $parent_fs->get_anonymous_id(),
|
9257 |
+
), false, false )
|
9258 |
+
);
|
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 |
+
|
9268 |
+
return;
|
9269 |
+
}
|
9270 |
+
|
9271 |
+
$parent_fs->_admin_notices->remove_sticky( 'connect_account' );
|
9272 |
+
|
9273 |
+
if ( $parent_fs->is_pending_activation() ) {
|
9274 |
+
$parent_fs->_admin_notices->remove_sticky( 'activation_pending' );
|
9275 |
+
|
9276 |
+
unset( $parent_fs->_storage->is_pending_activation );
|
9277 |
+
}
|
9278 |
+
|
9279 |
+
// First of all, set site info - otherwise we won't
|
9280 |
+
// be able to invoke API calls.
|
9281 |
+
$parent_fs->_site = new FS_Site( $parent_install );
|
9282 |
+
|
9283 |
+
// Sync add-on plans.
|
9284 |
+
$parent_fs->_sync_plans();
|
9285 |
+
|
9286 |
+
// Get site's current plan.
|
9287 |
+
$parent_fs->_site->plan = $parent_fs->_get_plan_by_id( $parent_fs->_site->plan->id );
|
9288 |
+
|
9289 |
+
// Get user information based on parent's plugin.
|
9290 |
+
$user = $this->get_user();
|
9291 |
+
|
9292 |
+
$parent_fs->_set_account( $user, $parent_fs->_site );
|
9293 |
+
}
|
9294 |
+
|
9295 |
#endregion
|
9296 |
|
9297 |
#----------------------------------------------------------------------------------
|
9300 |
|
9301 |
private $_menu_items = array();
|
9302 |
|
9303 |
+
/**
|
9304 |
+
* @author Vova Feldman (@svovaf)
|
9305 |
+
* @since 1.2.1.8
|
9306 |
+
*
|
9307 |
+
* @return array
|
9308 |
+
*/
|
9309 |
+
function get_menu_items() {
|
9310 |
+
return $this->_menu_items;
|
9311 |
+
}
|
9312 |
+
|
9313 |
/**
|
9314 |
* @author Vova Feldman (@svovaf)
|
9315 |
* @since 1.0.7
|
9350 |
*/
|
9351 |
private function add_menu_action() {
|
9352 |
if ( $this->is_activation_mode() ) {
|
9353 |
+
if ( $this->is_plugin() || ( $this->has_settings_menu() && ! $this->is_free_wp_org_theme() ) ) {
|
9354 |
+
$this->override_plugin_menu_with_activation();
|
9355 |
+
} else {
|
9356 |
+
/**
|
9357 |
+
* Handle theme opt-in when the opt-in form shows as a dialog box in the themes page.
|
9358 |
+
*/
|
9359 |
+
if ( fs_request_is_action( $this->get_unique_affix() . '_activate_existing' ) ) {
|
9360 |
+
add_action( 'load-themes.php', array( &$this, '_install_with_current_user' ) );
|
9361 |
+
} else if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ||
|
9362 |
+
fs_request_get_bool( 'pending_activation' )
|
9363 |
+
) {
|
9364 |
+
add_action( 'load-themes.php', array( &$this, '_install_with_new_user' ) );
|
9365 |
+
}
|
9366 |
+
}
|
9367 |
} else {
|
9368 |
+
if ( ! $this->is_registered() ) {
|
9369 |
+
// If not registered try to install user.
|
9370 |
+
if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ) {
|
9371 |
+
$this->_install_with_new_user();
|
9372 |
+
}
|
9373 |
+
} else if (
|
9374 |
+
fs_request_is_action( 'sync_user' ) &&
|
9375 |
+
( ! $this->has_settings_menu() || $this->is_free_wp_org_theme() )
|
9376 |
) {
|
|
|
|
|
9377 |
$this->_handle_account_user_sync();
|
9378 |
}
|
9379 |
}
|
9404 |
}
|
9405 |
|
9406 |
/**
|
9407 |
+
* Remove plugin's all admin menu items & pages, and replace with activation page.
|
9408 |
*
|
9409 |
* @author Vova Feldman (@svovaf)
|
9410 |
* @since 1.0.1
|
9441 |
$menus = array( $this->_menu->get_parent_slug() );
|
9442 |
|
9443 |
if ( $this->_menu->is_override_exact() ) {
|
9444 |
+
// Make sure the current page is matching the activation page.
|
9445 |
+
if ( ! $this->is_matching_url( $this->get_activation_url() ) ) {
|
9446 |
return;
|
9447 |
}
|
9448 |
}
|
9462 |
}
|
9463 |
|
9464 |
if ( $this->is_activation_page() ) {
|
9465 |
+
// Clean admin page from distracting content.
|
9466 |
self::_clean_admin_content_section();
|
9467 |
}
|
9468 |
|
9469 |
if ( false !== $hook ) {
|
9470 |
+
if ( fs_request_is_action( $this->get_unique_affix() . '_activate_existing' ) ) {
|
9471 |
+
$this->_install_with_current_user();
|
9472 |
+
} else if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ) {
|
9473 |
+
$this->_install_with_new_user();
|
9474 |
}
|
9475 |
}
|
9476 |
}
|
9512 |
}
|
9513 |
|
9514 |
/**
|
9515 |
+
* @author Vova Feldman (@svovaf)
|
9516 |
+
* @since 1.2.2.7
|
9517 |
+
*
|
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;
|
9533 |
+
}
|
9534 |
+
|
9535 |
+
/**
|
9536 |
+
* @author Vova Feldman (@svovaf)
|
9537 |
+
* @since 1.2.2.7
|
9538 |
+
*
|
9539 |
+
* @return bool
|
9540 |
+
*/
|
9541 |
+
function is_pricing_page_visible() {
|
9542 |
+
return (
|
9543 |
+
// Has at least one paid plan.
|
9544 |
+
$this->has_paid_plan() &&
|
9545 |
+
// Didn't ask to hide the pricing page.
|
9546 |
+
$this->is_page_visible( 'pricing' ) &&
|
9547 |
+
// Don't have a valid active license or has more than one plan.
|
9548 |
+
( ! $this->is_paying() || ! $this->is_single_plan() )
|
9549 |
+
);
|
9550 |
+
}
|
9551 |
+
|
9552 |
+
/**
|
9553 |
+
* Add default Freemius menu items.
|
9554 |
*
|
9555 |
* @author Vova Feldman (@svovaf)
|
9556 |
* @since 1.0.0
|
9559 |
$this->_logger->entrance();
|
9560 |
|
9561 |
if ( ! $this->is_addon() ) {
|
9562 |
+
/**
|
9563 |
+
* @since 1.2.2.7 Also add submenu items when running in a free .org theme so the tabs will be visible.
|
9564 |
+
*/
|
9565 |
+
if ( ! $this->is_activation_mode() || $this->is_free_wp_org_theme() ) {
|
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',
|
9575 |
+
WP_FS__DEFAULT_PRIORITY,
|
9576 |
+
$this->is_submenu_item_visible( 'affiliation' )
|
9577 |
+
);
|
9578 |
+
}
|
9579 |
+
|
9580 |
if ( $this->is_registered() ) {
|
9581 |
+
$show_account = (
|
9582 |
+
$this->is_submenu_item_visible( 'account' ) &&
|
9583 |
+
/**
|
9584 |
+
* @since 1.2.2.7 Don't show the Account for free WP.org themes without any paid plans.
|
9585 |
+
*/
|
9586 |
+
( ! $this->is_free_wp_org_theme() || $this->has_paid_plan() )
|
9587 |
+
);
|
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' ),
|
9597 |
WP_FS__DEFAULT_PRIORITY,
|
9598 |
+
$show_account
|
9599 |
);
|
9600 |
}
|
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' ),
|
9625 |
}
|
9626 |
|
9627 |
$show_pricing = (
|
|
|
|
|
|
|
9628 |
$this->is_submenu_item_visible( 'pricing' ) &&
|
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() &&
|
9636 |
! $this->is_paying_or_trial()
|
9637 |
) {
|
9638 |
// If running a trial promotion, modify the pricing to load the trial.
|
|
|
9639 |
$pricing_class = 'trial-mode';
|
9640 |
} else if ( $this->is_paying() ) {
|
|
|
9641 |
$pricing_class = '';
|
9642 |
}
|
9643 |
}
|
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',
|
9694 |
|
9695 |
$menu_item = sprintf(
|
9696 |
$item_template,
|
9697 |
+
$this->get_unique_affix(),
|
9698 |
$item['menu_slug'],
|
9699 |
! empty( $item['class'] ) ? $item['class'] : '',
|
9700 |
$item['menu_title']
|
9719 |
}
|
9720 |
} else {
|
9721 |
FS_Admin_Menu_Manager::add_subpage(
|
9722 |
+
$item['show_submenu'] ?
|
9723 |
+
$this->get_top_level_menu_slug() :
|
9724 |
+
null,
|
9725 |
$item['page_title'],
|
9726 |
$menu_item,
|
9727 |
$capability,
|
9746 |
$menu_slug = $this->_menu->get_top_level_menu_slug();
|
9747 |
|
9748 |
/**
|
9749 |
+
* Before "admin_menu" fires, WordPress will loop over the default submenus and remove pages for which the user
|
9750 |
* does not have permissions. So in case a plugin does not have top-level menu but does have submenus under any
|
9751 |
+
* of the default menus, only users that have the right role can access its sub-submenus (Account, Contact Us,
|
9752 |
* Support Forum, etc.) since $submenu[ $menu_slug ] will be empty if the user doesn't have permission.
|
9753 |
*
|
9754 |
+
* In case a plugin does not have submenus under any of the default menus but does have submenus under the menu
|
9755 |
* of another plugin, only users that have the right role can access its sub-submenus since we will use the
|
9756 |
* capability needed to access the parent menu as the capability for the submenus that we will add.
|
9757 |
*/
|
9793 |
ksort( $top_level_menu );
|
9794 |
}
|
9795 |
|
9796 |
+
/**
|
9797 |
+
* Helper method to return the module's support forum URL.
|
9798 |
+
*
|
9799 |
+
* @author Vova Feldman (@svovaf)
|
9800 |
+
* @since 1.2.2.7
|
9801 |
+
*
|
9802 |
+
* @return string
|
9803 |
+
*/
|
9804 |
+
function get_support_forum_url() {
|
9805 |
+
return $this->apply_filters( 'support_forum_url', "https://wordpress.org/support/{$this->_module_type}/{$this->_slug}" );
|
9806 |
+
}
|
9807 |
+
|
9808 |
/**
|
9809 |
* Displays the Support Forum link when enabled.
|
9810 |
*
|
9825 |
}
|
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,
|
9833 |
+
50,
|
9834 |
+
$this->is_submenu_item_visible( 'support' )
|
9835 |
+
);
|
|
|
9836 |
}
|
9837 |
}
|
9838 |
|
9908 |
* @param bool $menu_slug
|
9909 |
* @param string $capability
|
9910 |
* @param int $priority
|
9911 |
+
* @param bool $show_submenu
|
9912 |
*/
|
9913 |
function add_submenu_link_item(
|
9914 |
$menu_title,
|
9915 |
$url,
|
9916 |
$menu_slug = false,
|
9917 |
$capability = 'read',
|
9918 |
+
$priority = WP_FS__DEFAULT_PRIORITY,
|
9919 |
+
$show_submenu = true
|
9920 |
) {
|
9921 |
$this->_logger->entrance( 'Title = ' . $menu_title . '; Url = ' . $url );
|
9922 |
|
9929 |
$url,
|
9930 |
$menu_slug,
|
9931 |
$capability,
|
9932 |
+
$priority,
|
9933 |
+
$show_submenu
|
9934 |
);
|
9935 |
|
9936 |
return;
|
9949 |
'page_title' => $menu_title,
|
9950 |
'render_function' => 'fs_dummy',
|
9951 |
'before_render_function' => '',
|
9952 |
+
'show_submenu' => $show_submenu,
|
9953 |
);
|
9954 |
}
|
9955 |
|
9956 |
#endregion ------------------------------------------------------------------
|
9957 |
|
9958 |
+
|
9959 |
#--------------------------------------------------------------------------------
|
9960 |
#region Actions / Hooks / Filters
|
9961 |
#--------------------------------------------------------------------------------
|
9969 |
* @return string
|
9970 |
*/
|
9971 |
public function get_action_tag( $tag ) {
|
9972 |
+
return self::get_action_tag_static( $tag, $this->_slug, $this->is_plugin() );
|
9973 |
}
|
9974 |
|
9975 |
/**
|
9978 |
*
|
9979 |
* @param string $tag
|
9980 |
* @param string $slug
|
9981 |
+
* @param bool $is_plugin
|
9982 |
+
*
|
9983 |
+
* @return string
|
9984 |
+
*/
|
9985 |
+
static function get_action_tag_static( $tag, $slug = '', $is_plugin = true ) {
|
9986 |
+
$action = "fs_{$tag}";
|
9987 |
+
|
9988 |
+
if ( ! empty( $slug ) ) {
|
9989 |
+
$action .= '_' . self::get_module_unique_affix( $slug, $is_plugin );
|
9990 |
+
}
|
9991 |
+
|
9992 |
+
return $action;
|
9993 |
+
}
|
9994 |
+
|
9995 |
+
/**
|
9996 |
+
* Returns a string that can be used to generate a unique action name,
|
9997 |
+
* option name, HTML element ID, or HTML element class.
|
9998 |
+
*
|
9999 |
+
* @author Leo Fajardo (@leorw)
|
10000 |
+
* @since 1.2.2
|
10001 |
+
*
|
10002 |
+
* @return string
|
10003 |
+
*/
|
10004 |
+
public function get_unique_affix() {
|
10005 |
+
return self::get_module_unique_affix( $this->_slug, $this->is_plugin() );
|
10006 |
+
}
|
10007 |
+
|
10008 |
+
/**
|
10009 |
+
* Returns a string that can be used to generate a unique action name,
|
10010 |
+
* option name, HTML element ID, or HTML element class.
|
10011 |
+
*
|
10012 |
+
* @author Vova Feldman (@svovaf)
|
10013 |
+
* @since 1.2.2.5
|
10014 |
+
*
|
10015 |
+
* @param string $slug
|
10016 |
+
* @param bool $is_plugin
|
10017 |
*
|
10018 |
* @return string
|
10019 |
*/
|
10020 |
+
static function get_module_unique_affix( $slug, $is_plugin = true ) {
|
10021 |
+
$affix = $slug;
|
10022 |
+
|
10023 |
+
if ( ! $is_plugin ) {
|
10024 |
+
$affix .= '-' . WP_FS__MODULE_TYPE_THEME;
|
10025 |
+
}
|
10026 |
+
|
10027 |
+
return $affix;
|
10028 |
}
|
10029 |
|
10030 |
/**
|
10031 |
* @author Vova Feldman (@svovaf)
|
10032 |
* @since 1.2.1
|
10033 |
+
* @since 1.2.2.5 The AJAX action names are based on the module ID, not like the non-AJAX actions that are
|
10034 |
+
* based on the slug for backward compatibility.
|
10035 |
*
|
10036 |
* @param string $tag
|
10037 |
*
|
10038 |
* @return string
|
10039 |
*/
|
10040 |
function get_ajax_action( $tag ) {
|
10041 |
+
return self::get_ajax_action_static( $tag, $this->_module_id );
|
10042 |
}
|
10043 |
|
10044 |
/**
|
10066 |
/**
|
10067 |
* @author Vova Feldman (@svovaf)
|
10068 |
* @since 1.2.1.6
|
10069 |
+
* @since 1.2.2.5 The AJAX action names are based on the module ID, not like the non-AJAX actions that are
|
10070 |
+
* based on the slug for backward compatibility.
|
10071 |
*
|
10072 |
+
* @param string $tag
|
10073 |
+
* @param number|null $module_id
|
10074 |
*
|
10075 |
* @return string
|
10076 |
*/
|
10077 |
+
private static function get_ajax_action_static( $tag, $module_id = null ) {
|
10078 |
$action = "fs_{$tag}";
|
10079 |
|
10080 |
+
if ( ! empty( $module_id ) ) {
|
10081 |
+
$action .= "_{$module_id}";
|
10082 |
}
|
10083 |
|
10084 |
return $action;
|
10156 |
$tag,
|
10157 |
$function_to_add,
|
10158 |
$priority,
|
10159 |
+
$this->_module_id
|
10160 |
);
|
10161 |
}
|
10162 |
|
10166 |
* @author Vova Feldman (@svovaf)
|
10167 |
* @since 1.2.1.6
|
10168 |
*
|
10169 |
+
* @param string $tag
|
10170 |
+
* @param callable $function_to_add
|
10171 |
+
* @param int $priority
|
10172 |
+
* @param number|null $module_id
|
10173 |
*
|
10174 |
* @return bool True if action added, false if no need to add the action since the AJAX call isn't matching.
|
10175 |
* @uses add_action()
|
10179 |
$tag,
|
10180 |
$function_to_add,
|
10181 |
$priority = WP_FS__DEFAULT_PRIORITY,
|
10182 |
+
$module_id = null
|
10183 |
) {
|
10184 |
self::$_static_logger->entrance( $tag );
|
10185 |
|
10186 |
+
if ( ! self::is_ajax_action_static( $tag, $module_id ) ) {
|
10187 |
return false;
|
10188 |
}
|
10189 |
|
10190 |
add_action(
|
10191 |
+
'wp_ajax_' . self::get_ajax_action_static( $tag, $module_id ),
|
10192 |
$function_to_add,
|
10193 |
$priority,
|
10194 |
0
|
10257 |
$this->_logger->entrance( $tag );
|
10258 |
|
10259 |
$args = func_get_args();
|
10260 |
+
array_unshift( $args, $this->get_unique_affix() );
|
10261 |
|
10262 |
return call_user_func_array( 'fs_apply_filter', $args );
|
10263 |
}
|
10303 |
#endregion
|
10304 |
|
10305 |
/**
|
10306 |
+
* Override default i18n text phrases.
|
10307 |
*
|
10308 |
* @author Vova Feldman (@svovaf)
|
10309 |
* @since 1.1.6
|
10338 |
$encrypted_site = clone $this->_site;
|
10339 |
$encrypted_site->plan = self::_encrypt_entity( $this->_site->plan );
|
10340 |
|
10341 |
+
$sites = self::get_all_sites( $this->_module_type );
|
10342 |
+
|
10343 |
+
if ( empty( $this->_storage->prev_user_id ) && $this->_user->id != $this->_site->user_id ) {
|
10344 |
+
/**
|
10345 |
+
* Store the current user ID as the previous user ID so that the previous user can be used
|
10346 |
+
* as the install's owner while the new owner's details are not yet available.
|
10347 |
+
*
|
10348 |
+
* This will be executed only in the `replica` site. For example, there are 2 sites, namely `original`
|
10349 |
+
* and `replica`, then an ownership change was initiated and completed in the `original`, the `replica`
|
10350 |
+
* will be using the previous user until it is updated again (e.g.: until the next clone of `original`
|
10351 |
+
* into `replica`.
|
10352 |
+
*
|
10353 |
+
* @author Leo Fajardo (@leorw)
|
10354 |
+
*/
|
10355 |
+
$this->_storage->prev_user_id = $sites[ $this->_slug ]->user_id;
|
10356 |
+
}
|
10357 |
+
|
10358 |
$sites[ $this->_slug ] = $encrypted_site;
|
10359 |
+
|
10360 |
+
$this->set_account_option( 'sites', $sites, $store );
|
10361 |
}
|
10362 |
|
10363 |
/**
|
10371 |
private function _store_plans( $store = true ) {
|
10372 |
$this->_logger->entrance();
|
10373 |
|
10374 |
+
$plans = self::get_all_plans( $this->_module_type );
|
10375 |
|
10376 |
// Copy plans.
|
10377 |
$encrypted_plans = array();
|
10380 |
}
|
10381 |
|
10382 |
$plans[ $this->_slug ] = $encrypted_plans;
|
10383 |
+
|
10384 |
+
$this->set_account_option( 'plans', $plans, $store );
|
10385 |
}
|
10386 |
|
10387 |
/**
|
10397 |
private function _store_licenses( $store = true, $plugin_slug = false, $licenses = array() ) {
|
10398 |
$this->_logger->entrance();
|
10399 |
|
10400 |
+
$all_licenses = self::get_all_licenses( $this->_module_type );
|
10401 |
|
10402 |
if ( ! is_string( $plugin_slug ) ) {
|
10403 |
$plugin_slug = $this->_slug;
|
10410 |
|
10411 |
$all_licenses[ $plugin_slug ][ $this->_user->id ] = $licenses;
|
10412 |
|
10413 |
+
$this->set_account_option( 'licenses', $all_licenses, $store );
|
10414 |
}
|
10415 |
|
10416 |
/**
|
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
|
10574 |
// main settings page, and the non-sticky message
|
10575 |
// will disappear.
|
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)
|
10811 |
* @uses FS_Api
|
10812 |
*
|
10813 |
* @param number|bool $plugin_id
|
10814 |
+
* @param bool $flush
|
10815 |
*
|
10816 |
* @return FS_Payment[]|object
|
10817 |
*/
|
10818 |
+
function _fetch_payments( $plugin_id = false, $flush = false ) {
|
10819 |
$this->_logger->entrance();
|
10820 |
|
10821 |
$api = $this->get_api_user_scope();
|
10824 |
$plugin_id = $this->_plugin->id;
|
10825 |
}
|
10826 |
|
10827 |
+
$result = $api->get( "/plugins/{$plugin_id}/payments.json?include_addons=true", $flush );
|
10828 |
|
10829 |
if ( ! isset( $result->error ) ) {
|
10830 |
for ( $i = 0, $len = count( $result->payments ); $i < $len; $i ++ ) {
|
10841 |
* @since 1.2.1.5
|
10842 |
* @uses FS_Api
|
10843 |
*
|
10844 |
+
* @param bool $flush
|
10845 |
+
*
|
10846 |
* @return \FS_Billing|mixed
|
10847 |
*/
|
10848 |
+
function _fetch_billing( $flush = false ) {
|
10849 |
require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-billing.php';
|
10850 |
|
10851 |
+
$billing = $this->get_api_user_scope()->get( 'billing.json', $flush );
|
10852 |
|
10853 |
if ( $this->is_api_result_entity( $billing ) ) {
|
10854 |
$billing = new FS_Billing( $billing );
|
10900 |
*
|
10901 |
* @param bool|number $plugin_id
|
10902 |
* @param bool $flush Since 1.1.7.3
|
10903 |
+
* @param int $expiration Since 1.2.2.7
|
10904 |
*
|
10905 |
* @return object|false New plugin tag info if exist.
|
10906 |
*/
|
10907 |
+
private function _fetch_newer_version( $plugin_id = false, $flush = true, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
10908 |
+
$latest_tag = $this->_fetch_latest_version( $plugin_id, $flush, $expiration );
|
10909 |
|
10910 |
if ( ! is_object( $latest_tag ) ) {
|
10911 |
return false;
|
10928 |
* @since 1.0.5
|
10929 |
*
|
10930 |
* @param bool|number $plugin_id
|
10931 |
+
* @param bool $flush Since 1.1.7.3
|
10932 |
+
* @param int $expiration Since 1.2.2.7
|
10933 |
*
|
10934 |
* @return bool|FS_Plugin_Tag
|
10935 |
*/
|
10936 |
+
function get_update( $plugin_id = false, $flush = true, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
10937 |
$this->_logger->entrance();
|
10938 |
|
10939 |
if ( ! is_numeric( $plugin_id ) ) {
|
10940 |
$plugin_id = $this->_plugin->id;
|
10941 |
}
|
10942 |
|
10943 |
+
$this->check_updates( true, $plugin_id, $flush, $expiration );
|
10944 |
$updates = $this->get_all_updates();
|
10945 |
|
10946 |
return isset( $updates[ $plugin_id ] ) && is_object( $updates[ $plugin_id ] ) ? $updates[ $plugin_id ] : false;
|
11016 |
* @return bool
|
11017 |
*/
|
11018 |
function is_user_admin() {
|
11019 |
+
return ( $this->is_plugin() && current_user_can( 'activate_plugins' ) )
|
11020 |
+
|| ( $this->is_theme() && current_user_can( 'switch_themes' ) );
|
11021 |
}
|
11022 |
|
11023 |
/**
|
11029 |
* @uses FS_Api
|
11030 |
*
|
11031 |
* @param bool $background Hints the method if it's a background sync. If false, it means that was initiated by
|
11032 |
+
* the admin.
|
11033 |
*/
|
11034 |
private function _sync_license( $background = false ) {
|
11035 |
$this->_logger->entrance();
|
11091 |
if ( $this->is_array_instanceof( $licenses, 'FS_Plugin_License' ) ) {
|
11092 |
$this->_update_licenses( $licenses, $addon->slug );
|
11093 |
|
11094 |
+
if ( ! $this->is_addon_installed( $addon->id ) && FS_License_Manager::has_premium_license( $licenses ) ) {
|
11095 |
$plans_result = $this->get_api_site_or_plugin_scope()->get( "/addons/{$addon_id}/plans.json" );
|
11096 |
|
11097 |
if ( ! isset( $plans_result->error ) ) {
|
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 |
}
|
11127 |
* @uses FS_Api
|
11128 |
*
|
11129 |
* @param bool $background Hints the method if it's a background sync. If false, it means that was initiated by
|
11130 |
+
* the admin.
|
11131 |
*/
|
11132 |
private function _sync_plugin_license( $background = false ) {
|
11133 |
$this->_logger->entrance();
|
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 |
|
11550 |
}
|
11551 |
}
|
11552 |
|
11553 |
+
// Updated site plan to default.
|
11554 |
$this->_sync_plans();
|
11555 |
$this->_site->plan->id = $this->_plans[0]->id;
|
11556 |
// Unlink license from site.
|
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 |
}
|
11874 |
* @since 1.0.4
|
11875 |
*
|
11876 |
* @param bool|number $addon_id
|
11877 |
+
* @param bool $flush Since 1.1.7.3
|
11878 |
+
* @param int $expiration Since 1.2.2.7
|
11879 |
*
|
11880 |
* @return object|false Plugin latest tag info.
|
11881 |
*/
|
11882 |
+
function _fetch_latest_version( $addon_id = false, $flush = true, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
11883 |
$this->_logger->entrance();
|
11884 |
|
11885 |
/**
|
11894 |
|
11895 |
$tag = $this->get_api_site_or_plugin_scope()->get(
|
11896 |
$this->_get_latest_version_endpoint( $addon_id, 'json' ),
|
11897 |
+
$flush,
|
11898 |
+
$expiration
|
11899 |
);
|
11900 |
|
11901 |
$latest_version = ( is_object( $tag ) && isset( $tag->version ) ) ? $tag->version : 'couldn\'t get';
|
12015 |
* @uses FS_Api
|
12016 |
*
|
12017 |
* @param bool $background Hints the method if it's a background updates check. If false, it means that
|
12018 |
+
* was initiated by the admin.
|
12019 |
* @param bool|number $plugin_id
|
12020 |
* @param bool $flush Since 1.1.7.3
|
12021 |
+
* @param int $expiration Since 1.2.2.7
|
12022 |
*/
|
12023 |
+
private function check_updates(
|
12024 |
+
$background = false,
|
12025 |
+
$plugin_id = false,
|
12026 |
+
$flush = true,
|
12027 |
+
$expiration = WP_FS__TIME_24_HOURS_IN_SEC
|
12028 |
+
) {
|
12029 |
$this->_logger->entrance();
|
12030 |
|
12031 |
// Check if there's a newer version for download.
|
12032 |
+
$new_version = $this->_fetch_newer_version( $plugin_id, $flush, $expiration );
|
12033 |
|
12034 |
$update = null;
|
12035 |
if ( is_object( $new_version ) ) {
|
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 |
|
12068 |
* @author Vova Feldman (@svovaf)
|
12069 |
* @since 1.0.4
|
12070 |
*
|
12071 |
+
* @param bool $flush Since 1.1.7.3 add 24 hour cache by default.
|
12072 |
*
|
12073 |
* @return FS_Plugin[]
|
12074 |
*
|
12280 |
*/
|
12281 |
private function update_user_name() {
|
12282 |
$this->_logger->entrance();
|
12283 |
+
$name = fs_request_get( 'fs_user_name_' . $this->get_unique_affix(), '' );
|
12284 |
|
12285 |
$api = $this->get_api_user_scope();
|
12286 |
$user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,first,last", 'put', array(
|
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 {
|
12340 |
*
|
12341 |
* @return string
|
12342 |
*/
|
12343 |
+
function get_activation_url( $params = array() ) {
|
12344 |
+
if ( $this->is_addon() && $this->has_free_plan() ) {
|
12345 |
/**
|
12346 |
* @author Vova Feldman (@svovaf)
|
12347 |
* @since 1.2.1.7 Add-on's activation is the parent's module activation.
|
12361 |
* @return string
|
12362 |
*/
|
12363 |
function get_reconnect_url( $params = array() ) {
|
12364 |
+
$params['fs_action'] = 'reset_anonymous_mode';
|
12365 |
+
$params['fs_unique_affix'] = $this->get_unique_affix();
|
12366 |
|
12367 |
+
return $this->get_activation_url( $params );
|
12368 |
}
|
12369 |
|
12370 |
/**
|
12371 |
+
* Get the URL of the page that should be loaded after the user connect
|
12372 |
+
* or skip in the opt-in screen.
|
12373 |
*
|
12374 |
* @author Vova Feldman (@svovaf)
|
12375 |
* @since 1.1.3
|
12376 |
*
|
12377 |
* @param string $filter Filter name.
|
12378 |
+
* @param array $params Since 1.2.2.7
|
12379 |
*
|
12380 |
* @return string
|
12381 |
*/
|
12382 |
+
function get_after_activation_url( $filter, $params = array() ) {
|
12383 |
+
if ( $this->is_free_wp_org_theme() &&
|
12384 |
+
fs_request_has( 'pending_activation' )
|
12385 |
+
) {
|
12386 |
+
$first_time_path = '';
|
12387 |
+
} else {
|
12388 |
+
$first_time_path = $this->_menu->get_first_time_path();
|
12389 |
+
}
|
12390 |
|
12391 |
+
return add_query_arg( $params, $this->apply_filters(
|
12392 |
$filter,
|
12393 |
empty( $first_time_path ) ?
|
12394 |
$this->_get_admin_page_url() :
|
12395 |
$first_time_path
|
12396 |
+
) );
|
12397 |
}
|
12398 |
|
12399 |
/**
|
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 );
|
12468 |
|
12469 |
if ( $plugin_id == $this->get_id() ) {
|
12470 |
$this->_deactivate_license();
|
12471 |
+
|
12472 |
+
if ( $this->is_only_premium() ) {
|
12473 |
+
// Clear user and site.
|
12474 |
+
$this->_site = null;
|
12475 |
+
$this->_user = null;
|
12476 |
+
|
12477 |
+
fs_redirect( $this->get_activation_url() );
|
12478 |
+
}
|
12479 |
} else {
|
12480 |
if ( $this->is_addon_activated( $plugin_id ) ) {
|
12481 |
$fs_addon = self::get_instance_by_id( $plugin_id );
|
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.
|
12524 |
case 'update_email':
|
12525 |
check_admin_referer( 'update_email' );
|
12526 |
|
12527 |
+
$new_email = fs_request_get( 'fs_email_' . $this->get_unique_affix(), '' );
|
12528 |
$result = $this->update_email( $new_email );
|
12529 |
|
12530 |
if ( isset( $result->error ) ) {
|
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;
|
12593 |
|
12594 |
return;
|
12595 |
|
12596 |
+
case $this->get_unique_affix() . '_sync_license':
|
12597 |
$this->_sync_license();
|
12598 |
|
12599 |
return;
|
12615 |
$this->_logger->log( $action );
|
12616 |
|
12617 |
$site_property = substr( $p, strlen( 'site_' ) );
|
12618 |
+
$site_property_value = fs_request_get( 'fs_' . $p . '_' . $this->get_unique_affix(), '' );
|
12619 |
$this->get_site()->{$site_property} = $site_property_value;
|
12620 |
|
12621 |
// Store account after modification.
|
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 |
}
|
12680 |
$this->do_action( 'account_page_load_before_departure' );
|
12681 |
}
|
12682 |
|
12683 |
+
/**
|
12684 |
+
* Renders the "Affiliation" page.
|
12685 |
+
*
|
12686 |
+
* @author Leo Fajardo (@leorw)
|
12687 |
+
* @since 1.2.3
|
12688 |
+
*/
|
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 );
|
12697 |
+
echo $this->apply_filters( "/forms/affiliation.php", fs_get_template( '/forms/affiliation.php', $vars ) );
|
12698 |
+
}
|
12699 |
+
|
12700 |
+
|
12701 |
/**
|
12702 |
* Render account page.
|
12703 |
*
|
12708 |
$this->_logger->entrance();
|
12709 |
|
12710 |
$template = 'account.php';
|
12711 |
+
$vars = array( 'id' => $this->_module_id );
|
|
|
|
|
|
|
|
|
12712 |
|
12713 |
/**
|
12714 |
* Added filter to the template to allow developers wrapping the template
|
12729 |
function _connect_page_render() {
|
12730 |
$this->_logger->entrance();
|
12731 |
|
12732 |
+
$vars = array( 'id' => $this->_module_id );
|
12733 |
|
12734 |
/**
|
12735 |
* Added filter to the template to allow developers wrapping the template
|
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 |
}
|
12781 |
function _addons_page_render() {
|
12782 |
$this->_logger->entrance();
|
12783 |
|
12784 |
+
$vars = array( 'id' => $this->_module_id );
|
12785 |
|
12786 |
/**
|
12787 |
* Added filter to the template to allow developers wrapping the template
|
12804 |
function _pricing_page_render() {
|
12805 |
$this->_logger->entrance();
|
12806 |
|
12807 |
+
$vars = array( 'id' => $this->_module_id );
|
12808 |
|
12809 |
if ( 'true' === fs_request_get( 'checkout', false ) ) {
|
12810 |
fs_require_once_template( 'checkout.php', $vars );
|
12826 |
function _contact_page_render() {
|
12827 |
$this->_logger->entrance();
|
12828 |
|
12829 |
+
$vars = array( 'id' => $this->_module_id );
|
12830 |
fs_require_once_template( 'contact.php', $vars );
|
12831 |
}
|
12832 |
|
12833 |
#endregion ------------------------------------------------------------------------
|
12834 |
|
12835 |
/**
|
12836 |
+
* Hide all admin notices to prevent distractions.
|
12837 |
*
|
12838 |
* @author Vova Feldman (@svovaf)
|
12839 |
* @since 1.0.3
|
12855 |
}
|
12856 |
|
12857 |
/**
|
12858 |
+
* Attach to admin_head hook to hide all admin notices.
|
12859 |
*
|
12860 |
* @author Vova Feldman (@svovaf)
|
12861 |
* @since 1.0.3
|
12890 |
function get_api_user_scope( $flush = false ) {
|
12891 |
if ( ! isset( $this->_user_api ) || $flush ) {
|
12892 |
$this->_user_api = FS_Api::instance(
|
12893 |
+
$this->_module_id,
|
12894 |
'user',
|
12895 |
$this->_user->id,
|
12896 |
$this->_user->public_key,
|
12916 |
function get_api_site_scope( $flush = false ) {
|
12917 |
if ( ! isset( $this->_site_api ) || $flush ) {
|
12918 |
$this->_site_api = FS_Api::instance(
|
12919 |
+
$this->_module_id,
|
12920 |
'install',
|
12921 |
$this->_site->id,
|
12922 |
$this->_site->public_key,
|
12941 |
function get_api_plugin_scope() {
|
12942 |
if ( ! isset( $this->_plugin_api ) ) {
|
12943 |
$this->_plugin_api = FS_Api::instance(
|
12944 |
+
$this->_module_id,
|
12945 |
'plugin',
|
12946 |
$this->_plugin->id,
|
12947 |
$this->_plugin->public_key,
|
12990 |
* @since 1.2.1.5
|
12991 |
*/
|
12992 |
function _fix_start_trial_menu_item_url() {
|
12993 |
+
$template_args = array( 'id' => $this->_module_id );
|
12994 |
fs_require_template( 'add-trial-to-pricing.php', $template_args );
|
12995 |
}
|
12996 |
|
12997 |
+
/**
|
12998 |
+
* Check if module is currently in a trial promotion mode.
|
12999 |
+
*
|
13000 |
+
* @author Vova Feldman (@svovaf)
|
13001 |
+
* @since 1.2.2.7
|
13002 |
+
*
|
13003 |
+
* @return bool
|
13004 |
+
*/
|
13005 |
+
function is_in_trial_promotion() {
|
13006 |
+
return $this->_admin_notices->has_sticky( 'trial_promotion' );
|
13007 |
+
}
|
13008 |
+
|
13009 |
/**
|
13010 |
* Show trial promotional notice (if any trial exist).
|
13011 |
*
|
13024 |
}
|
13025 |
|
13026 |
// Check if trial message is already shown.
|
13027 |
+
if ( $this->is_in_trial_promotion() ) {
|
13028 |
add_action( 'admin_footer', array( &$this, '_fix_start_trial_menu_item_url' ) );
|
13029 |
|
13030 |
$this->_menu->add_counter_to_menu_item( 1, 'fs-trial' );
|
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.
|
13109 |
// Not all paid plans have a trial - generate a string of those that have it.
|
13110 |
for ( $i = 0; $i < $trial_plans_count; $i ++ ) {
|
13111 |
$plans_string .= sprintf(
|
13112 |
+
' <a href="%s">%s</a>',
|
13113 |
$trial_url,
|
13114 |
$trial_plans[ $i ]->title
|
13115 |
);
|
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(
|
13155 |
return true;
|
13156 |
}
|
13157 |
|
13158 |
+
/**
|
13159 |
+
* Lets users/customers know that the product has an affiliate program.
|
13160 |
+
*
|
13161 |
+
* @author Leo Fajardo (@leorw)
|
13162 |
+
* @since 1.2.2.11
|
13163 |
+
*
|
13164 |
+
* @return bool Returns true if the notice has been added.
|
13165 |
+
*/
|
13166 |
+
function _add_affiliate_program_notice() {
|
13167 |
+
if ( ! $this->is_user_admin() ) {
|
13168 |
+
return false;
|
13169 |
+
}
|
13170 |
+
|
13171 |
+
if ( ! $this->is_user_in_admin() ) {
|
13172 |
+
return false;
|
13173 |
+
}
|
13174 |
+
|
13175 |
+
// Check if the notice is already shown.
|
13176 |
+
if ( $this->_admin_notices->has_sticky( 'affiliate_program' ) ) {
|
13177 |
+
return false;
|
13178 |
+
}
|
13179 |
+
|
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;
|
13186 |
+
}
|
13187 |
+
|
13188 |
+
if ( ! $this->apply_filters( 'show_affiliate_program_notice', true ) ) {
|
13189 |
+
// Developer explicitly asked not to show the notice about the affiliate program.
|
13190 |
+
return false;
|
13191 |
+
}
|
13192 |
+
|
13193 |
+
if ( $this->is_activation_mode() || $this->is_pending_activation() ) {
|
13194 |
+
// If not yet opted in/skipped, or pending activation, don't show the notice.
|
13195 |
+
return false;
|
13196 |
+
}
|
13197 |
+
|
13198 |
+
$last_time_notice_was_shown = $this->_storage->get( 'affiliate_program_notice_shown', false );
|
13199 |
+
$was_notice_shown_before = ( false !== $last_time_notice_was_shown );
|
13200 |
+
|
13201 |
+
/**
|
13202 |
+
* Do not show the notice if it was already shown before or less than 30 days have passed since the initial
|
13203 |
+
* activation with FS.
|
13204 |
+
*/
|
13205 |
+
if ( $was_notice_shown_before ||
|
13206 |
+
$this->_storage->install_timestamp > ( time() - ( WP_FS__TIME_24_HOURS_IN_SEC * 30 ) )
|
13207 |
+
) {
|
13208 |
+
return false;
|
13209 |
+
}
|
13210 |
+
|
13211 |
+
if ( ! $this->is_paying() &&
|
13212 |
+
FS_Plugin::AFFILIATE_MODERATION_CUSTOMERS == $this->_plugin->affiliate_moderation ) {
|
13213 |
+
// If the user is not a customer and the affiliate program is only for customers, don't show the notice.
|
13214 |
+
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 |
+
);
|
13222 |
+
|
13223 |
+
// HTML code for the "Learn more..." button.
|
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(
|
13231 |
+
$this->apply_filters( 'affiliate_program_notice', "{$message} {$button}" ),
|
13232 |
+
'affiliate_program',
|
13233 |
+
'',
|
13234 |
+
'promotion'
|
13235 |
+
);
|
13236 |
+
|
13237 |
+
$this->_storage->affiliate_program_notice_shown = WP_FS__SCRIPT_START_TIME;
|
13238 |
+
|
13239 |
+
return true;
|
13240 |
+
}
|
13241 |
+
|
13242 |
/**
|
13243 |
* @author Vova Feldman (@svovaf)
|
13244 |
* @since 1.2.1.5
|
13245 |
*/
|
13246 |
function _enqueue_common_css() {
|
13247 |
if ( $this->has_paid_plan() && ! $this->is_paying() ) {
|
13248 |
+
// Add basic CSS for admin-notices and menu-item colors.
|
13249 |
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
|
13250 |
}
|
13251 |
}
|
13252 |
|
13253 |
+
/**
|
13254 |
+
* @author Leo Fajardo (leorw)
|
13255 |
+
* @since 1.2.2
|
13256 |
+
*/
|
13257 |
+
function _show_theme_activation_optin_dialog() {
|
13258 |
+
fs_enqueue_local_style( 'fs_connect', '/admin/connect.css' );
|
13259 |
+
|
13260 |
+
add_action( 'admin_footer-themes.php', array( &$this, '_add_fs_theme_activation_dialog' ) );
|
13261 |
+
}
|
13262 |
+
|
13263 |
+
/**
|
13264 |
+
* @author Leo Fajardo (leorw)
|
13265 |
+
* @since 1.2.2
|
13266 |
+
*/
|
13267 |
+
function _add_fs_theme_activation_dialog() {
|
13268 |
+
$vars = array( 'id' => $this->_module_id );
|
13269 |
+
fs_require_once_template( 'connect.php', $vars );
|
13270 |
+
}
|
13271 |
+
|
13272 |
/* Action Links
|
13273 |
------------------------------------------------------------------------------------------------------------------*/
|
13274 |
private $_action_links_hooked = false;
|
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,
|
13388 |
'#',
|
13389 |
false,
|
13390 |
11,
|
13391 |
+
( 'activate-license ' . $this->get_unique_affix() )
|
13392 |
);
|
13393 |
}
|
13394 |
|
13405 |
|
13406 |
$this->_logger->entrance();
|
13407 |
|
13408 |
+
if ( fs_request_is_action_secure( $this->get_unique_affix() . '_reconnect' ) ) {
|
13409 |
+
if ( ! $this->is_registered() && $this->is_anonymous() ) {
|
13410 |
+
$this->connect_again();
|
13411 |
+
|
13412 |
+
return;
|
13413 |
+
}
|
13414 |
+
}
|
13415 |
+
|
13416 |
+
if ( ( $this->is_plugin() && ! self::is_plugins_page() ) ||
|
13417 |
+
( $this->is_theme() && ! self::is_themes_page() )
|
13418 |
+
) {
|
13419 |
+
// Only show tracking links on the plugins and themes pages.
|
13420 |
return;
|
13421 |
}
|
13422 |
|
13438 |
return;
|
13439 |
}
|
13440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13441 |
$url = '#';
|
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() :
|
13456 |
array(
|
13457 |
+
'nonce' => wp_create_nonce( $this->get_unique_affix() . '_reconnect' ),
|
13458 |
+
'fs_action' => ( $this->get_unique_affix() . '_reconnect' ),
|
13459 |
);
|
13460 |
|
13461 |
$url = $this->get_activation_url( $params );
|
13462 |
}
|
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,
|
13470 |
+
"opt-in-or-opt-out {$this->_slug}"
|
13471 |
+
);
|
13472 |
+
}
|
13473 |
}
|
13474 |
|
13475 |
/**
|
13482 |
*/
|
13483 |
function get_after_plugin_activation_redirect_url() {
|
13484 |
$url = false;
|
|
|
13485 |
|
13486 |
+
if ( ! $this->is_addon() || ! $this->has_free_plan() ) {
|
13487 |
$first_time_path = $this->_menu->get_first_time_path();
|
13488 |
+
$url = $this->is_activation_mode() ?
|
13489 |
+
$this->get_activation_url() :
|
|
|
13490 |
( empty( $first_time_path ) ?
|
13491 |
$this->_get_admin_page_url() :
|
13492 |
$first_time_path );
|
13493 |
} else {
|
13494 |
+
$plugin_fs = false;
|
13495 |
+
|
13496 |
if ( $this->is_parent_plugin_installed() ) {
|
13497 |
$plugin_fs = self::get_parent_instance();
|
13498 |
}
|
13571 |
*
|
13572 |
* @since 1.2.1.6 Always show the deactivation feedback form since we added automatic free version deactivation upon premium code activation.
|
13573 |
*/
|
13574 |
+
$deactivate_link .= '<i class="fs-module-id" data-module-id="' . $this->_module_id . '"></i>';
|
13575 |
|
13576 |
// Append deactivation link.
|
13577 |
$before_deactivate['deactivate'] = $deactivate_link;
|
13581 |
}
|
13582 |
|
13583 |
/**
|
13584 |
+
* Adds admin message.
|
13585 |
*
|
13586 |
* @author Vova Feldman (@svovaf)
|
13587 |
* @since 1.0.4
|
13595 |
}
|
13596 |
|
13597 |
/**
|
13598 |
+
* Adds sticky admin message.
|
13599 |
*
|
13600 |
* @author Vova Feldman (@svovaf)
|
13601 |
* @since 1.1.0
|
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 |
|
|
|
|
|
13653 |
/**
|
13654 |
+
* @author Vova Feldman (@svovaf)
|
13655 |
+
* @since 1.2.1.7
|
13656 |
+
*
|
13657 |
+
* @param string $key
|
13658 |
+
*
|
13659 |
+
* @return string
|
13660 |
*/
|
13661 |
+
function get_text( $key ) {
|
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 |
#----------------------------------------------------------------------------------
|
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 |
}
|
13939 |
|
13940 |
#endregion
|
13941 |
|
13942 |
+
#--------------------------------------------------------------------------------
|
13943 |
+
#region Tabs Integration
|
13944 |
+
#--------------------------------------------------------------------------------
|
13945 |
+
|
13946 |
+
#region Module's Original Tabs
|
13947 |
+
|
13948 |
+
/**
|
13949 |
+
* Inject a JavaScript logic to capture the theme tabs HTML.
|
13950 |
+
*
|
13951 |
+
* @author Vova Feldman (@svovaf)
|
13952 |
+
* @since 1.2.2.7
|
13953 |
+
*/
|
13954 |
+
function _tabs_capture() {
|
13955 |
+
$this->_logger->entrance();
|
13956 |
+
|
13957 |
+
if ( ! $this->is_theme_settings_page() ||
|
13958 |
+
! $this->is_matching_url( $this->main_menu_url() )
|
13959 |
+
) {
|
13960 |
+
return;
|
13961 |
+
}
|
13962 |
+
|
13963 |
+
$params = array(
|
13964 |
+
'id' => $this->_module_id,
|
13965 |
+
);
|
13966 |
+
|
13967 |
+
fs_require_once_template( 'tabs-capture-js.php', $params );
|
13968 |
+
}
|
13969 |
+
|
13970 |
+
/**
|
13971 |
+
* Cache theme's tabs HTML for a week. The cache will also be set as expired
|
13972 |
+
* after version and type (free/premium) changes, in addition to the week period.
|
13973 |
+
*
|
13974 |
+
* @author Vova Feldman (@svovaf)
|
13975 |
+
* @since 1.2.2.7
|
13976 |
+
*/
|
13977 |
+
function _store_tabs_ajax_action() {
|
13978 |
+
$this->_logger->entrance();
|
13979 |
+
|
13980 |
+
$this->check_ajax_referer( 'store_tabs' );
|
13981 |
+
|
13982 |
+
// Init filesystem if not yet initiated.
|
13983 |
+
WP_Filesystem();
|
13984 |
+
|
13985 |
+
// Get POST body HTML data.
|
13986 |
+
global $wp_filesystem;
|
13987 |
+
$tabs_html = $wp_filesystem->get_contents( "php://input" );
|
13988 |
+
|
13989 |
+
if ( is_string( $tabs_html ) ) {
|
13990 |
+
$tabs_html = trim( $tabs_html );
|
13991 |
+
}
|
13992 |
+
|
13993 |
+
if ( ! is_string( $tabs_html ) || empty( $tabs_html ) ) {
|
13994 |
+
self::shoot_ajax_failure();
|
13995 |
+
}
|
13996 |
+
|
13997 |
+
$this->_cache->set( 'tabs', $tabs_html, 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
13998 |
+
|
13999 |
+
self::shoot_ajax_success();
|
14000 |
+
}
|
14001 |
+
|
14002 |
+
/**
|
14003 |
+
* Cache theme's settings page custom styles. The cache will also be set as expired
|
14004 |
+
* after version and type (free/premium) changes, in addition to the week period.
|
14005 |
+
*
|
14006 |
+
* @author Vova Feldman (@svovaf)
|
14007 |
+
* @since 1.2.2.7
|
14008 |
+
*/
|
14009 |
+
function _store_tabs_styles() {
|
14010 |
+
$this->_logger->entrance();
|
14011 |
+
|
14012 |
+
if ( ! $this->is_theme_settings_page() ||
|
14013 |
+
! $this->is_matching_url( $this->main_menu_url() )
|
14014 |
+
) {
|
14015 |
+
return;
|
14016 |
+
}
|
14017 |
+
|
14018 |
+
$wp_styles = wp_styles();
|
14019 |
+
|
14020 |
+
$theme_styles_url = get_template_directory_uri();
|
14021 |
+
|
14022 |
+
$stylesheets = array();
|
14023 |
+
foreach ( $wp_styles->queue as $handler ) {
|
14024 |
+
if ( fs_starts_with( $handler, 'fs_' ) ) {
|
14025 |
+
// Assume that stylesheets that their handler starts with "fs_" belong to the SDK.
|
14026 |
+
continue;
|
14027 |
+
}
|
14028 |
+
|
14029 |
+
/**
|
14030 |
+
* @var _WP_Dependency $stylesheet
|
14031 |
+
*/
|
14032 |
+
$stylesheet = $wp_styles->registered[ $handler ];
|
14033 |
+
|
14034 |
+
if ( fs_starts_with( $stylesheet->src, $theme_styles_url ) ) {
|
14035 |
+
$stylesheets[] = $stylesheet->src;
|
14036 |
+
}
|
14037 |
+
}
|
14038 |
+
|
14039 |
+
if ( ! empty( $stylesheets ) ) {
|
14040 |
+
$this->_cache->set( 'tabs_stylesheets', $stylesheets, 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
14041 |
+
}
|
14042 |
+
}
|
14043 |
+
|
14044 |
+
/**
|
14045 |
+
* Check if module's original settings page has any tabs.
|
14046 |
+
*
|
14047 |
+
* @author Vova Feldman (@svovaf)
|
14048 |
+
* @since 1.2.2.7
|
14049 |
+
*
|
14050 |
+
* @return bool
|
14051 |
+
*/
|
14052 |
+
private function has_tabs() {
|
14053 |
+
return $this->_cache->has( 'tabs' );
|
14054 |
+
}
|
14055 |
+
|
14056 |
+
/**
|
14057 |
+
* Get module's settings page HTML content, starting
|
14058 |
+
* from the beginning of the <div class="wrap"> element,
|
14059 |
+
* until the tabs HTML (including).
|
14060 |
+
*
|
14061 |
+
* @author Vova Feldman (@svovaf)
|
14062 |
+
* @since 1.2.2.7
|
14063 |
+
*
|
14064 |
+
* @return string
|
14065 |
+
*/
|
14066 |
+
private function get_tabs_html() {
|
14067 |
+
$this->_logger->entrance();
|
14068 |
+
|
14069 |
+
return $this->_cache->get( 'tabs' );
|
14070 |
+
}
|
14071 |
+
|
14072 |
+
/**
|
14073 |
+
* Check if page should include tabs.
|
14074 |
+
*
|
14075 |
+
* @author Vova Feldman (@svovaf)
|
14076 |
+
* @since 1.2.2.7
|
14077 |
+
*
|
14078 |
+
* @return bool
|
14079 |
+
*/
|
14080 |
+
private function should_page_include_tabs()
|
14081 |
+
{
|
14082 |
+
if ( ! $this->has_settings_menu() ) {
|
14083 |
+
// Don't add tabs if no settings at all.
|
14084 |
+
return false;
|
14085 |
+
}
|
14086 |
+
|
14087 |
+
if ( ! $this->is_theme() ) {
|
14088 |
+
// Only add tabs to themes for now.
|
14089 |
+
return false;
|
14090 |
+
}
|
14091 |
+
|
14092 |
+
if ( ! $this->has_paid_plan() && ! $this->has_addons() ) {
|
14093 |
+
// Only add tabs to monetizing themes.
|
14094 |
+
return false;
|
14095 |
+
}
|
14096 |
+
|
14097 |
+
if ( ! $this->is_theme_settings_page() ) {
|
14098 |
+
// Only add tabs if browsing one of the theme's setting pages.
|
14099 |
+
return false;
|
14100 |
+
}
|
14101 |
+
|
14102 |
+
if ( $this->is_admin_page( 'pricing' ) && fs_request_get_bool( 'checkout' ) ) {
|
14103 |
+
// Don't add tabs on checkout page, we want to reduce distractions
|
14104 |
+
// as much as possible.
|
14105 |
+
return false;
|
14106 |
+
}
|
14107 |
+
|
14108 |
+
return true;
|
14109 |
+
}
|
14110 |
+
|
14111 |
+
/**
|
14112 |
+
* Add the tabs HTML before the setting's page content and
|
14113 |
+
* enqueue any required stylesheets.
|
14114 |
+
*
|
14115 |
+
* @author Vova Feldman (@svovaf)
|
14116 |
+
* @since 1.2.2.7
|
14117 |
+
*
|
14118 |
+
* @return bool If tabs were included.
|
14119 |
+
*/
|
14120 |
+
function _add_tabs_before_content() {
|
14121 |
+
$this->_logger->entrance();
|
14122 |
+
|
14123 |
+
if ( ! $this->should_page_include_tabs() ) {
|
14124 |
+
return false;
|
14125 |
+
}
|
14126 |
+
|
14127 |
+
/**
|
14128 |
+
* Enqueue the original stylesheets that are included in the
|
14129 |
+
* theme settings page. That way, if the theme settings has
|
14130 |
+
* some custom _styled_ content above the tabs UI, this
|
14131 |
+
* will make sure that the styling is preserved.
|
14132 |
+
*/
|
14133 |
+
$stylesheets = $this->_cache->get( 'tabs_stylesheets', array() );
|
14134 |
+
if ( is_array( $stylesheets ) ) {
|
14135 |
+
for ( $i = 0, $len = count( $stylesheets ); $i < $len; $i ++ ) {
|
14136 |
+
wp_enqueue_style( "fs_{$this->_module_id}_tabs_{$i}", $stylesheets[ $i ] );
|
14137 |
+
}
|
14138 |
+
}
|
14139 |
+
|
14140 |
+
// Cut closing </div> tag.
|
14141 |
+
echo substr( trim( $this->get_tabs_html() ), 0, - 6 );
|
14142 |
+
|
14143 |
+
return true;
|
14144 |
+
}
|
14145 |
+
|
14146 |
+
/**
|
14147 |
+
* Add the tabs closing HTML after the setting's page content.
|
14148 |
+
*
|
14149 |
+
* @author Vova Feldman (@svovaf)
|
14150 |
+
* @since 1.2.2.7
|
14151 |
+
*
|
14152 |
+
* @return bool If tabs closing HTML was included.
|
14153 |
+
*/
|
14154 |
+
function _add_tabs_after_content() {
|
14155 |
+
$this->_logger->entrance();
|
14156 |
+
|
14157 |
+
if ( ! $this->should_page_include_tabs() ) {
|
14158 |
+
return false;
|
14159 |
+
}
|
14160 |
+
|
14161 |
+
echo '</div>';
|
14162 |
+
|
14163 |
+
return true;
|
14164 |
+
}
|
14165 |
+
|
14166 |
+
#endregion
|
14167 |
+
|
14168 |
+
/**
|
14169 |
+
* Add in-page JavaScript to inject the Freemius tabs into
|
14170 |
+
* the module's setting tabs section.
|
14171 |
+
*
|
14172 |
+
* @author Vova Feldman (@svovaf)
|
14173 |
+
* @since 1.2.2.7
|
14174 |
+
*/
|
14175 |
+
function _add_freemius_tabs() {
|
14176 |
+
$this->_logger->entrance();
|
14177 |
+
|
14178 |
+
if ( ! $this->should_page_include_tabs() ) {
|
14179 |
+
return;
|
14180 |
+
}
|
14181 |
+
|
14182 |
+
$params = array( 'id' => $this->_module_id );
|
14183 |
+
fs_require_once_template( 'tabs.php', $params );
|
14184 |
+
}
|
14185 |
+
|
14186 |
+
#endregion
|
14187 |
+
|
14188 |
+
#--------------------------------------------------------------------------------
|
14189 |
+
#region Customizer Integration for Themes
|
14190 |
+
#--------------------------------------------------------------------------------
|
14191 |
+
|
14192 |
+
/**
|
14193 |
+
* @author Vova Feldman (@svovaf)
|
14194 |
+
* @since 1.2.2.7
|
14195 |
+
*
|
14196 |
+
* @param WP_Customize_Manager $customizer
|
14197 |
+
*/
|
14198 |
+
function _customizer_register($customizer) {
|
14199 |
+
$this->_logger->entrance();
|
14200 |
+
|
14201 |
+
if ( $this->is_pricing_page_visible() ) {
|
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(
|
14209 |
+
'sanitize_callback' => 'esc_html',
|
14210 |
+
) );
|
14211 |
+
|
14212 |
+
$customizer->add_control( new FS_Customizer_Upsell_Control( $customizer, 'freemius_upsell', array(
|
14213 |
+
'fs' => $this,
|
14214 |
+
'section' => 'freemius_upsell',
|
14215 |
+
'priority' => 100,
|
14216 |
+
) ) );
|
14217 |
+
}
|
14218 |
+
|
14219 |
+
if ( $this->is_page_visible( 'contact' ) || $this->is_page_visible( 'support' ) ) {
|
14220 |
+
require_once WP_FS__DIR_INCLUDES . '/customizer/class-fs-customizer-support-section.php';
|
14221 |
+
|
14222 |
+
// Main Documentation Link In Customizer Root.
|
14223 |
+
$customizer->add_section( new FS_Customizer_Support_Section( $customizer, 'freemius_support', array(
|
14224 |
+
'fs' => $this,
|
14225 |
+
'priority' => 1000,
|
14226 |
+
) ) );
|
14227 |
+
}
|
14228 |
+
}
|
14229 |
+
|
14230 |
+
#endregion
|
14231 |
+
|
14232 |
+
/**
|
14233 |
+
* If the theme has a paid version, add some custom
|
14234 |
+
* styling to the theme's premium version (if exists)
|
14235 |
+
* to highlight that it's the premium version of the
|
14236 |
+
* same theme, making it easier for identification
|
14237 |
+
* after the user upgrades and upload it to the site.
|
14238 |
+
*
|
14239 |
+
* @author Vova Feldman (@svovaf)
|
14240 |
+
* @since 1.2.2.7
|
14241 |
+
*/
|
14242 |
+
function _style_premium_theme() {
|
14243 |
+
$this->_logger->entrance();
|
14244 |
+
|
14245 |
+
if ( ! self::is_themes_page() ) {
|
14246 |
+
// Only include in the themes page.
|
14247 |
+
return;
|
14248 |
+
}
|
14249 |
+
|
14250 |
+
if ( ! $this->has_paid_plan() ) {
|
14251 |
+
// Only include if has any paid plans.
|
14252 |
+
return;
|
14253 |
+
}
|
14254 |
+
|
14255 |
+
$params = null;
|
14256 |
+
fs_require_once_template( '/js/jquery.content-change.php', $params );
|
14257 |
+
|
14258 |
+
$params = array(
|
14259 |
+
'slug' => $this->_slug,
|
14260 |
+
'id' => $this->_module_id,
|
14261 |
+
);
|
14262 |
+
|
14263 |
+
fs_require_template( '/js/style-premium-theme.php', $params );
|
14264 |
+
}
|
14265 |
+
|
14266 |
#----------------------------------------------------------------------------------
|
14267 |
#region Marketing
|
14268 |
#----------------------------------------------------------------------------------
|
14320 |
}
|
14321 |
|
14322 |
#endregion
|
14323 |
+
}
|
freemius/includes/class-fs-api.php
CHANGED
@@ -1,558 +1,558 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
-
* @since 1.0.4
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Class FS_Api
|
15 |
-
*
|
16 |
-
* Wraps Freemius API SDK to handle:
|
17 |
-
* 1. Clock sync.
|
18 |
-
* 2. Fallback to HTTP when HTTPS fails.
|
19 |
-
* 3. Adds caching layer to GET requests.
|
20 |
-
* 4. Adds consistency for failed requests by using last cached version.
|
21 |
-
*/
|
22 |
-
class FS_Api {
|
23 |
-
/**
|
24 |
-
* @var FS_Api[]
|
25 |
-
*/
|
26 |
-
private static $_instances = array();
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var FS_Option_Manager Freemius options, options-manager.
|
30 |
-
*/
|
31 |
-
private static $_options;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @var FS_Cache_Manager API Caching layer
|
35 |
-
*/
|
36 |
-
private static $_cache;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @var int Clock diff in seconds between current server to API server.
|
40 |
-
*/
|
41 |
-
private static $_clock_diff;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @var
|
45 |
-
*/
|
46 |
-
private $_api;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* @var string
|
50 |
-
*/
|
51 |
-
private $_slug;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* @var FS_Logger
|
55 |
-
* @since 1.0.4
|
56 |
-
*/
|
57 |
-
private $_logger;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* @param string $slug
|
61 |
-
* @param string $scope 'app', 'developer', 'user' or 'install'.
|
62 |
-
* @param number $id Element's id.
|
63 |
-
* @param string $public_key Public key.
|
64 |
-
* @param bool $is_sandbox
|
65 |
-
* @param bool|string $secret_key Element's secret key.
|
66 |
-
*
|
67 |
-
* @return FS_Api
|
68 |
-
*/
|
69 |
-
static function instance( $slug, $scope, $id, $public_key, $is_sandbox, $secret_key = false ) {
|
70 |
-
$identifier = md5( $slug . $scope . $id . $public_key . ( is_string( $secret_key ) ? $secret_key : '' ) . json_encode( $is_sandbox ) );
|
71 |
-
|
72 |
-
if ( ! isset( self::$_instances[ $identifier ] ) ) {
|
73 |
-
self::_init();
|
74 |
-
|
75 |
-
self::$_instances[ $identifier ] = new FS_Api( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox );
|
76 |
-
}
|
77 |
-
|
78 |
-
return self::$_instances[ $identifier ];
|
79 |
-
}
|
80 |
-
|
81 |
-
private static function _init() {
|
82 |
-
if ( isset( self::$_options ) ) {
|
83 |
-
return;
|
84 |
-
}
|
85 |
-
|
86 |
-
if ( ! class_exists( '
|
87 |
-
require_once WP_FS__DIR_SDK . '/
|
88 |
-
}
|
89 |
-
|
90 |
-
self::$_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true );
|
91 |
-
self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME );
|
92 |
-
|
93 |
-
self::$_clock_diff = self::$_options->get_option( 'api_clock_diff', 0 );
|
94 |
-
|
95 |
-
|
96 |
-
if ( self::$_options->get_option( 'api_force_http', false ) ) {
|
97 |
-
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* @param string $slug
|
103 |
-
* @param string $scope 'app', 'developer', 'user' or 'install'.
|
104 |
-
* @param number $id Element's id.
|
105 |
-
* @param string $public_key Public key.
|
106 |
-
* @param bool|string $secret_key Element's secret key.
|
107 |
-
* @param bool $is_sandbox
|
108 |
-
*/
|
109 |
-
private function __construct( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox ) {
|
110 |
-
$this->_api = new
|
111 |
-
|
112 |
-
$this->_slug = $slug;
|
113 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug . '_api', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Find clock diff between server and API server, and store the diff locally.
|
118 |
-
*
|
119 |
-
* @param bool|int $diff
|
120 |
-
*
|
121 |
-
* @return bool|int False if clock diff didn't change, otherwise returns the clock diff in seconds.
|
122 |
-
*/
|
123 |
-
private function _sync_clock_diff( $diff = false ) {
|
124 |
-
$this->_logger->entrance();
|
125 |
-
|
126 |
-
// Sync clock and store.
|
127 |
-
$new_clock_diff = ( false === $diff ) ?
|
128 |
-
|
129 |
-
$diff;
|
130 |
-
|
131 |
-
if ( $new_clock_diff === self::$_clock_diff ) {
|
132 |
-
return false;
|
133 |
-
}
|
134 |
-
|
135 |
-
self::$_clock_diff = $new_clock_diff;
|
136 |
-
|
137 |
-
// Update API clock's diff.
|
138 |
-
|
139 |
-
|
140 |
-
// Store new clock diff in storage.
|
141 |
-
self::$_options->set_option( 'api_clock_diff', self::$_clock_diff, true );
|
142 |
-
|
143 |
-
return $new_clock_diff;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Override API call to enable retry with servers' clock auto sync method.
|
148 |
-
*
|
149 |
-
* @param string $path
|
150 |
-
* @param string $method
|
151 |
-
* @param array $params
|
152 |
-
* @param bool $retry Is in retry or first call attempt.
|
153 |
-
*
|
154 |
-
* @return array|mixed|string|void
|
155 |
-
*/
|
156 |
-
private function _call( $path, $method = 'GET', $params = array(), $retry = false ) {
|
157 |
-
$this->_logger->entrance( $method . ':' . $path );
|
158 |
-
|
159 |
-
if ( self::is_temporary_down() ) {
|
160 |
-
$result = $this->get_temporary_unavailable_error();
|
161 |
-
} else {
|
162 |
-
$result = $this->_api->Api( $path, $method, $params );
|
163 |
-
|
164 |
-
if ( null !== $result &&
|
165 |
-
isset( $result->error ) &&
|
166 |
-
isset( $result->error->code ) &&
|
167 |
-
'request_expired' === $result->error->code
|
168 |
-
) {
|
169 |
-
if ( ! $retry ) {
|
170 |
-
$diff = isset( $result->error->timestamp ) ?
|
171 |
-
( time() - strtotime( $result->error->timestamp ) ) :
|
172 |
-
false;
|
173 |
-
|
174 |
-
// Try to sync clock diff.
|
175 |
-
if ( false !== $this->_sync_clock_diff( $diff ) ) {
|
176 |
-
// Retry call with new synced clock.
|
177 |
-
return $this->_call( $path, $method, $params, true );
|
178 |
-
}
|
179 |
-
}
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
if ( $this->_logger->is_on() && self::is_api_error( $result ) ) {
|
184 |
-
// Log API errors.
|
185 |
-
$this->_logger->api_error( $result );
|
186 |
-
}
|
187 |
-
|
188 |
-
return $result;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Override API call to wrap it in servers' clock sync method.
|
193 |
-
*
|
194 |
-
* @param string $path
|
195 |
-
* @param string $method
|
196 |
-
* @param array $params
|
197 |
-
*
|
198 |
-
* @return array|mixed|string|void
|
199 |
-
* @throws Freemius_Exception
|
200 |
-
*/
|
201 |
-
function call( $path, $method = 'GET', $params = array() ) {
|
202 |
-
return $this->_call( $path, $method, $params );
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Get API request URL signed via query string.
|
207 |
-
*
|
208 |
-
* @param string $path
|
209 |
-
*
|
210 |
-
* @return string
|
211 |
-
*/
|
212 |
-
function get_signed_url( $path ) {
|
213 |
-
return $this->_api->GetSignedUrl( $path );
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* @param string $path
|
218 |
-
* @param bool $flush
|
219 |
-
* @param int $expiration (optional) Time until expiration in seconds from now, defaults to 24 hours
|
220 |
-
*
|
221 |
-
* @return stdClass|mixed
|
222 |
-
*/
|
223 |
-
function get( $path = '/', $flush = false, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
224 |
-
$this->_logger->entrance( $path );
|
225 |
-
|
226 |
-
$cache_key = $this->get_cache_key( $path );
|
227 |
-
|
228 |
-
// Always flush during development.
|
229 |
-
if ( WP_FS__DEV_MODE || $this->_api->IsSandbox() ) {
|
230 |
-
$flush = true;
|
231 |
-
}
|
232 |
-
|
233 |
-
$cached_result = self::$_cache->get( $cache_key );
|
234 |
-
|
235 |
-
if ( $flush || ! self::$_cache->has_valid( $cache_key ) ) {
|
236 |
-
$result = $this->call( $path );
|
237 |
-
|
238 |
-
if ( ! is_object( $result ) || isset( $result->error ) ) {
|
239 |
-
// Api returned an error.
|
240 |
-
if ( is_object( $cached_result ) &&
|
241 |
-
! isset( $cached_result )
|
242 |
-
) {
|
243 |
-
// If there was an error during a newer data fetch,
|
244 |
-
// fallback to older data version.
|
245 |
-
$result = $cached_result;
|
246 |
-
|
247 |
-
if ( $this->_logger->is_on() ) {
|
248 |
-
$this->_logger->warn( 'Fallback to cached API result: ' . var_export( $cached_result, true ) );
|
249 |
-
}
|
250 |
-
} else {
|
251 |
-
// If no older data version, return result without
|
252 |
-
// caching the error.
|
253 |
-
return $result;
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
self::$_cache->set( $cache_key, $result, $expiration );
|
258 |
-
|
259 |
-
$cached_result = $result;
|
260 |
-
} else {
|
261 |
-
$this->_logger->log( 'Using cached API result.' );
|
262 |
-
}
|
263 |
-
|
264 |
-
return $cached_result;
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Check if there's a cached version of the API request.
|
269 |
-
*
|
270 |
-
* @author Vova Feldman (@svovaf)
|
271 |
-
* @since 1.2.1
|
272 |
-
*
|
273 |
-
* @param string $path
|
274 |
-
* @param string $method
|
275 |
-
* @param array $params
|
276 |
-
*
|
277 |
-
* @return bool
|
278 |
-
*/
|
279 |
-
function is_cached( $path, $method = 'GET', $params = array() ) {
|
280 |
-
$cache_key = $this->get_cache_key( $path, $method, $params );
|
281 |
-
|
282 |
-
return self::$_cache->has_valid( $cache_key );
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Invalidate a cached version of the API request.
|
287 |
-
*
|
288 |
-
* @author Vova Feldman (@svovaf)
|
289 |
-
* @since 1.2.1.5
|
290 |
-
*
|
291 |
-
* @param string $path
|
292 |
-
* @param string $method
|
293 |
-
* @param array $params
|
294 |
-
*/
|
295 |
-
function purge_cache( $path, $method = 'GET', $params = array() ) {
|
296 |
-
$this->_logger->entrance( "{$method}:{$path}" );
|
297 |
-
|
298 |
-
$cache_key = $this->get_cache_key( $path, $method, $params );
|
299 |
-
|
300 |
-
self::$_cache->purge( $cache_key );
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* @param string $path
|
305 |
-
* @param string $method
|
306 |
-
* @param array $params
|
307 |
-
*
|
308 |
-
* @return string
|
309 |
-
* @throws \Freemius_Exception
|
310 |
-
*/
|
311 |
-
private function get_cache_key( $path, $method = 'GET', $params = array() ) {
|
312 |
-
$canonized = $this->_api->CanonizePath( $path );
|
313 |
-
// $exploded = explode('/', $canonized);
|
314 |
-
// return $method . '_' . array_pop($exploded) . '_' . md5($canonized . json_encode($params));
|
315 |
-
return strtolower( $method . ':' . $canonized ) . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' );
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Test API connectivity.
|
320 |
-
*
|
321 |
-
* @author Vova Feldman (@svovaf)
|
322 |
-
* @since 1.0.9 If fails, try to fallback to HTTP.
|
323 |
-
* @since 1.1.6 Added a 5-min caching mechanism, to prevent from overloading the server if the API if
|
324 |
-
* temporary down.
|
325 |
-
*
|
326 |
-
* @return bool True if successful connectivity to the API.
|
327 |
-
*/
|
328 |
-
static function test() {
|
329 |
-
self::_init();
|
330 |
-
|
331 |
-
$cache_key = 'ping_test';
|
332 |
-
|
333 |
-
$test = self::$_cache->get_valid( $cache_key, null );
|
334 |
-
|
335 |
-
if ( is_null( $test ) ) {
|
336 |
-
$test =
|
337 |
-
|
338 |
-
if ( false === $test &&
|
339 |
-
// Fallback to HTTP, since HTTPS fails.
|
340 |
-
|
341 |
-
|
342 |
-
self::$_options->set_option( 'api_force_http', true, true );
|
343 |
-
|
344 |
-
$test =
|
345 |
-
|
346 |
-
if ( false === $test ) {
|
347 |
-
/**
|
348 |
-
* API connectivity test fail also in HTTP request, therefore,
|
349 |
-
* fallback to HTTPS to keep connection secure.
|
350 |
-
*
|
351 |
-
* @since 1.1.6
|
352 |
-
*/
|
353 |
-
self::$_options->set_option( 'api_force_http', false, true );
|
354 |
-
}
|
355 |
-
}
|
356 |
-
|
357 |
-
self::$_cache->set( $cache_key, $test, WP_FS__TIME_5_MIN_IN_SEC );
|
358 |
-
}
|
359 |
-
|
360 |
-
return $test;
|
361 |
-
}
|
362 |
-
|
363 |
-
/**
|
364 |
-
* Check if API is temporary down.
|
365 |
-
*
|
366 |
-
* @author Vova Feldman (@svovaf)
|
367 |
-
* @since 1.1.6
|
368 |
-
*
|
369 |
-
* @return bool
|
370 |
-
*/
|
371 |
-
static function is_temporary_down() {
|
372 |
-
self::_init();
|
373 |
-
|
374 |
-
$test = self::$_cache->get_valid( 'ping_test', null );
|
375 |
-
|
376 |
-
return ( false === $test );
|
377 |
-
}
|
378 |
-
|
379 |
-
/**
|
380 |
-
* @author Vova Feldman (@svovaf)
|
381 |
-
* @since 1.1.6
|
382 |
-
*
|
383 |
-
* @return object
|
384 |
-
*/
|
385 |
-
private function get_temporary_unavailable_error() {
|
386 |
-
return (object) array(
|
387 |
-
'error' => (object) array(
|
388 |
-
'type' => 'TemporaryUnavailable',
|
389 |
-
'message' => 'API is temporary unavailable, please retry in ' . ( self::$_cache->get_record_expiration( 'ping_test' ) - WP_FS__SCRIPT_START_TIME ) . ' sec.',
|
390 |
-
'code' => 'temporary_unavailable',
|
391 |
-
'http' => 503
|
392 |
-
)
|
393 |
-
);
|
394 |
-
}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* Ping API for connectivity test, and return result object.
|
398 |
-
*
|
399 |
-
* @author Vova Feldman (@svovaf)
|
400 |
-
* @since 1.0.9
|
401 |
-
*
|
402 |
-
* @param null|string $unique_anonymous_id
|
403 |
-
* @param array $params
|
404 |
-
*
|
405 |
-
* @return object
|
406 |
-
*/
|
407 |
-
function ping( $unique_anonymous_id = null, $params = array() ) {
|
408 |
-
$this->_logger->entrance();
|
409 |
-
|
410 |
-
if ( self::is_temporary_down() ) {
|
411 |
-
return $this->get_temporary_unavailable_error();
|
412 |
-
}
|
413 |
-
|
414 |
-
$pong = is_null( $unique_anonymous_id ) ?
|
415 |
-
|
416 |
-
$this->_call( 'ping.json?' . http_build_query( array_merge(
|
417 |
-
array( 'uid' => $unique_anonymous_id ),
|
418 |
-
$params
|
419 |
-
) ) );
|
420 |
-
|
421 |
-
if ( $this->is_valid_ping( $pong ) ) {
|
422 |
-
return $pong;
|
423 |
-
}
|
424 |
-
|
425 |
-
if ( self::should_try_with_http( $pong ) ) {
|
426 |
-
// Fallback to HTTP, since HTTPS fails.
|
427 |
-
|
428 |
-
|
429 |
-
self::$_options->set_option( 'api_force_http', true, true );
|
430 |
-
|
431 |
-
$pong = is_null( $unique_anonymous_id ) ?
|
432 |
-
|
433 |
-
$this->_call( 'ping.json?' . http_build_query( array_merge(
|
434 |
-
array( 'uid' => $unique_anonymous_id ),
|
435 |
-
$params
|
436 |
-
) ) );
|
437 |
-
|
438 |
-
if ( ! $this->is_valid_ping( $pong ) ) {
|
439 |
-
self::$_options->set_option( 'api_force_http', false, true );
|
440 |
-
}
|
441 |
-
}
|
442 |
-
|
443 |
-
return $pong;
|
444 |
-
}
|
445 |
-
|
446 |
-
/**
|
447 |
-
* Check if based on the API result we should try
|
448 |
-
* to re-run the same request with HTTP instead of HTTPS.
|
449 |
-
*
|
450 |
-
* @author Vova Feldman (@svovaf)
|
451 |
-
* @since 1.1.6
|
452 |
-
*
|
453 |
-
* @param $result
|
454 |
-
*
|
455 |
-
* @return bool
|
456 |
-
*/
|
457 |
-
private static function should_try_with_http( $result ) {
|
458 |
-
if ( !
|
459 |
-
return false;
|
460 |
-
}
|
461 |
-
|
462 |
-
return ( ! is_object( $result ) ||
|
463 |
-
! isset( $result->error ) ||
|
464 |
-
! isset( $result->error->code ) ||
|
465 |
-
! in_array( $result->error->code, array(
|
466 |
-
'curl_missing',
|
467 |
-
'cloudflare_ddos_protection',
|
468 |
-
'maintenance_mode',
|
469 |
-
'squid_cache_block',
|
470 |
-
'too_many_requests',
|
471 |
-
) ) );
|
472 |
-
|
473 |
-
}
|
474 |
-
|
475 |
-
/**
|
476 |
-
* Check if valid ping request result.
|
477 |
-
*
|
478 |
-
* @author Vova Feldman (@svovaf)
|
479 |
-
* @since 1.1.1
|
480 |
-
*
|
481 |
-
* @param mixed $pong
|
482 |
-
*
|
483 |
-
* @return bool
|
484 |
-
*/
|
485 |
-
function is_valid_ping( $pong ) {
|
486 |
-
return
|
487 |
-
}
|
488 |
-
|
489 |
-
function get_url( $path = '' ) {
|
490 |
-
return
|
491 |
-
}
|
492 |
-
|
493 |
-
/**
|
494 |
-
* Clear API cache.
|
495 |
-
*
|
496 |
-
* @author Vova Feldman (@svovaf)
|
497 |
-
* @since 1.0.9
|
498 |
-
*/
|
499 |
-
static function clear_cache() {
|
500 |
-
self::_init();
|
501 |
-
|
502 |
-
self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME );
|
503 |
-
self::$_cache->clear();
|
504 |
-
}
|
505 |
-
|
506 |
-
#----------------------------------------------------------------------------------
|
507 |
-
#region Error Handling
|
508 |
-
#----------------------------------------------------------------------------------
|
509 |
-
|
510 |
-
/**
|
511 |
-
* @author Vova Feldman (@svovaf)
|
512 |
-
* @since 1.2.1.5
|
513 |
-
*
|
514 |
-
* @param mixed $result
|
515 |
-
*
|
516 |
-
* @return bool Is API result contains an error.
|
517 |
-
*/
|
518 |
-
static function is_api_error( $result ) {
|
519 |
-
return ( is_object( $result ) && isset( $result->error ) ) ||
|
520 |
-
is_string( $result );
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Checks if given API result is a non-empty and not an error object.
|
525 |
-
*
|
526 |
-
* @author Vova Feldman (@svovaf)
|
527 |
-
* @since 1.2.1.5
|
528 |
-
*
|
529 |
-
* @param mixed $result
|
530 |
-
* @param string|null $required_property Optional property we want to verify that is set.
|
531 |
-
*
|
532 |
-
* @return bool
|
533 |
-
*/
|
534 |
-
static function is_api_result_object( $result, $required_property = null ) {
|
535 |
-
return (
|
536 |
-
is_object( $result ) &&
|
537 |
-
! isset( $result->error ) &&
|
538 |
-
( empty( $required_property ) || isset( $result->{$required_property} ) )
|
539 |
-
);
|
540 |
-
}
|
541 |
-
|
542 |
-
/**
|
543 |
-
* Checks if given API result is a non-empty entity object with non-empty ID.
|
544 |
-
*
|
545 |
-
* @author Vova Feldman (@svovaf)
|
546 |
-
* @since 1.2.1.5
|
547 |
-
*
|
548 |
-
* @param mixed $result
|
549 |
-
*
|
550 |
-
* @return bool
|
551 |
-
*/
|
552 |
-
static function is_api_result_entity( $result ) {
|
553 |
-
return self::is_api_result_object( $result, 'id' ) &&
|
554 |
-
FS_Entity::is_valid_id( $result->id );
|
555 |
-
}
|
556 |
-
|
557 |
-
#endregion
|
558 |
}
|
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 |
+
/**
|
14 |
+
* Class FS_Api
|
15 |
+
*
|
16 |
+
* Wraps Freemius API SDK to handle:
|
17 |
+
* 1. Clock sync.
|
18 |
+
* 2. Fallback to HTTP when HTTPS fails.
|
19 |
+
* 3. Adds caching layer to GET requests.
|
20 |
+
* 4. Adds consistency for failed requests by using last cached version.
|
21 |
+
*/
|
22 |
+
class FS_Api {
|
23 |
+
/**
|
24 |
+
* @var FS_Api[]
|
25 |
+
*/
|
26 |
+
private static $_instances = array();
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @var FS_Option_Manager Freemius options, options-manager.
|
30 |
+
*/
|
31 |
+
private static $_options;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @var FS_Cache_Manager API Caching layer
|
35 |
+
*/
|
36 |
+
private static $_cache;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @var int Clock diff in seconds between current server to API server.
|
40 |
+
*/
|
41 |
+
private static $_clock_diff;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @var Freemius_Api_WordPress
|
45 |
+
*/
|
46 |
+
private $_api;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* @var string
|
50 |
+
*/
|
51 |
+
private $_slug;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @var FS_Logger
|
55 |
+
* @since 1.0.4
|
56 |
+
*/
|
57 |
+
private $_logger;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @param string $slug
|
61 |
+
* @param string $scope 'app', 'developer', 'user' or 'install'.
|
62 |
+
* @param number $id Element's id.
|
63 |
+
* @param string $public_key Public key.
|
64 |
+
* @param bool $is_sandbox
|
65 |
+
* @param bool|string $secret_key Element's secret key.
|
66 |
+
*
|
67 |
+
* @return FS_Api
|
68 |
+
*/
|
69 |
+
static function instance( $slug, $scope, $id, $public_key, $is_sandbox, $secret_key = false ) {
|
70 |
+
$identifier = md5( $slug . $scope . $id . $public_key . ( is_string( $secret_key ) ? $secret_key : '' ) . json_encode( $is_sandbox ) );
|
71 |
+
|
72 |
+
if ( ! isset( self::$_instances[ $identifier ] ) ) {
|
73 |
+
self::_init();
|
74 |
+
|
75 |
+
self::$_instances[ $identifier ] = new FS_Api( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox );
|
76 |
+
}
|
77 |
+
|
78 |
+
return self::$_instances[ $identifier ];
|
79 |
+
}
|
80 |
+
|
81 |
+
private static function _init() {
|
82 |
+
if ( isset( self::$_options ) ) {
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( ! class_exists( 'Freemius_Api_WordPress' ) ) {
|
87 |
+
require_once WP_FS__DIR_SDK . '/FreemiusWordPress.php';
|
88 |
+
}
|
89 |
+
|
90 |
+
self::$_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true );
|
91 |
+
self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME );
|
92 |
+
|
93 |
+
self::$_clock_diff = self::$_options->get_option( 'api_clock_diff', 0 );
|
94 |
+
Freemius_Api_WordPress::SetClockDiff( self::$_clock_diff );
|
95 |
+
|
96 |
+
if ( self::$_options->get_option( 'api_force_http', false ) ) {
|
97 |
+
Freemius_Api_WordPress::SetHttp();
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @param string $slug
|
103 |
+
* @param string $scope 'app', 'developer', 'user' or 'install'.
|
104 |
+
* @param number $id Element's id.
|
105 |
+
* @param string $public_key Public key.
|
106 |
+
* @param bool|string $secret_key Element's secret key.
|
107 |
+
* @param bool $is_sandbox
|
108 |
+
*/
|
109 |
+
private function __construct( $slug, $scope, $id, $public_key, $secret_key, $is_sandbox ) {
|
110 |
+
$this->_api = new Freemius_Api_WordPress( $scope, $id, $public_key, $secret_key, $is_sandbox );
|
111 |
+
|
112 |
+
$this->_slug = $slug;
|
113 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug . '_api', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Find clock diff between server and API server, and store the diff locally.
|
118 |
+
*
|
119 |
+
* @param bool|int $diff
|
120 |
+
*
|
121 |
+
* @return bool|int False if clock diff didn't change, otherwise returns the clock diff in seconds.
|
122 |
+
*/
|
123 |
+
private function _sync_clock_diff( $diff = false ) {
|
124 |
+
$this->_logger->entrance();
|
125 |
+
|
126 |
+
// Sync clock and store.
|
127 |
+
$new_clock_diff = ( false === $diff ) ?
|
128 |
+
Freemius_Api_WordPress::FindClockDiff() :
|
129 |
+
$diff;
|
130 |
+
|
131 |
+
if ( $new_clock_diff === self::$_clock_diff ) {
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
+
self::$_clock_diff = $new_clock_diff;
|
136 |
+
|
137 |
+
// Update API clock's diff.
|
138 |
+
Freemius_Api_WordPress::SetClockDiff( self::$_clock_diff );
|
139 |
+
|
140 |
+
// Store new clock diff in storage.
|
141 |
+
self::$_options->set_option( 'api_clock_diff', self::$_clock_diff, true );
|
142 |
+
|
143 |
+
return $new_clock_diff;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Override API call to enable retry with servers' clock auto sync method.
|
148 |
+
*
|
149 |
+
* @param string $path
|
150 |
+
* @param string $method
|
151 |
+
* @param array $params
|
152 |
+
* @param bool $retry Is in retry or first call attempt.
|
153 |
+
*
|
154 |
+
* @return array|mixed|string|void
|
155 |
+
*/
|
156 |
+
private function _call( $path, $method = 'GET', $params = array(), $retry = false ) {
|
157 |
+
$this->_logger->entrance( $method . ':' . $path );
|
158 |
+
|
159 |
+
if ( self::is_temporary_down() ) {
|
160 |
+
$result = $this->get_temporary_unavailable_error();
|
161 |
+
} else {
|
162 |
+
$result = $this->_api->Api( $path, $method, $params );
|
163 |
+
|
164 |
+
if ( null !== $result &&
|
165 |
+
isset( $result->error ) &&
|
166 |
+
isset( $result->error->code ) &&
|
167 |
+
'request_expired' === $result->error->code
|
168 |
+
) {
|
169 |
+
if ( ! $retry ) {
|
170 |
+
$diff = isset( $result->error->timestamp ) ?
|
171 |
+
( time() - strtotime( $result->error->timestamp ) ) :
|
172 |
+
false;
|
173 |
+
|
174 |
+
// Try to sync clock diff.
|
175 |
+
if ( false !== $this->_sync_clock_diff( $diff ) ) {
|
176 |
+
// Retry call with new synced clock.
|
177 |
+
return $this->_call( $path, $method, $params, true );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
if ( $this->_logger->is_on() && self::is_api_error( $result ) ) {
|
184 |
+
// Log API errors.
|
185 |
+
$this->_logger->api_error( $result );
|
186 |
+
}
|
187 |
+
|
188 |
+
return $result;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Override API call to wrap it in servers' clock sync method.
|
193 |
+
*
|
194 |
+
* @param string $path
|
195 |
+
* @param string $method
|
196 |
+
* @param array $params
|
197 |
+
*
|
198 |
+
* @return array|mixed|string|void
|
199 |
+
* @throws Freemius_Exception
|
200 |
+
*/
|
201 |
+
function call( $path, $method = 'GET', $params = array() ) {
|
202 |
+
return $this->_call( $path, $method, $params );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Get API request URL signed via query string.
|
207 |
+
*
|
208 |
+
* @param string $path
|
209 |
+
*
|
210 |
+
* @return string
|
211 |
+
*/
|
212 |
+
function get_signed_url( $path ) {
|
213 |
+
return $this->_api->GetSignedUrl( $path );
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* @param string $path
|
218 |
+
* @param bool $flush
|
219 |
+
* @param int $expiration (optional) Time until expiration in seconds from now, defaults to 24 hours
|
220 |
+
*
|
221 |
+
* @return stdClass|mixed
|
222 |
+
*/
|
223 |
+
function get( $path = '/', $flush = false, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
224 |
+
$this->_logger->entrance( $path );
|
225 |
+
|
226 |
+
$cache_key = $this->get_cache_key( $path );
|
227 |
+
|
228 |
+
// Always flush during development.
|
229 |
+
if ( WP_FS__DEV_MODE || $this->_api->IsSandbox() ) {
|
230 |
+
$flush = true;
|
231 |
+
}
|
232 |
+
|
233 |
+
$cached_result = self::$_cache->get( $cache_key );
|
234 |
+
|
235 |
+
if ( $flush || ! self::$_cache->has_valid( $cache_key, $expiration ) ) {
|
236 |
+
$result = $this->call( $path );
|
237 |
+
|
238 |
+
if ( ! is_object( $result ) || isset( $result->error ) ) {
|
239 |
+
// Api returned an error.
|
240 |
+
if ( is_object( $cached_result ) &&
|
241 |
+
! isset( $cached_result )
|
242 |
+
) {
|
243 |
+
// If there was an error during a newer data fetch,
|
244 |
+
// fallback to older data version.
|
245 |
+
$result = $cached_result;
|
246 |
+
|
247 |
+
if ( $this->_logger->is_on() ) {
|
248 |
+
$this->_logger->warn( 'Fallback to cached API result: ' . var_export( $cached_result, true ) );
|
249 |
+
}
|
250 |
+
} else {
|
251 |
+
// If no older data version, return result without
|
252 |
+
// caching the error.
|
253 |
+
return $result;
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
self::$_cache->set( $cache_key, $result, $expiration );
|
258 |
+
|
259 |
+
$cached_result = $result;
|
260 |
+
} else {
|
261 |
+
$this->_logger->log( 'Using cached API result.' );
|
262 |
+
}
|
263 |
+
|
264 |
+
return $cached_result;
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Check if there's a cached version of the API request.
|
269 |
+
*
|
270 |
+
* @author Vova Feldman (@svovaf)
|
271 |
+
* @since 1.2.1
|
272 |
+
*
|
273 |
+
* @param string $path
|
274 |
+
* @param string $method
|
275 |
+
* @param array $params
|
276 |
+
*
|
277 |
+
* @return bool
|
278 |
+
*/
|
279 |
+
function is_cached( $path, $method = 'GET', $params = array() ) {
|
280 |
+
$cache_key = $this->get_cache_key( $path, $method, $params );
|
281 |
+
|
282 |
+
return self::$_cache->has_valid( $cache_key );
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Invalidate a cached version of the API request.
|
287 |
+
*
|
288 |
+
* @author Vova Feldman (@svovaf)
|
289 |
+
* @since 1.2.1.5
|
290 |
+
*
|
291 |
+
* @param string $path
|
292 |
+
* @param string $method
|
293 |
+
* @param array $params
|
294 |
+
*/
|
295 |
+
function purge_cache( $path, $method = 'GET', $params = array() ) {
|
296 |
+
$this->_logger->entrance( "{$method}:{$path}" );
|
297 |
+
|
298 |
+
$cache_key = $this->get_cache_key( $path, $method, $params );
|
299 |
+
|
300 |
+
self::$_cache->purge( $cache_key );
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* @param string $path
|
305 |
+
* @param string $method
|
306 |
+
* @param array $params
|
307 |
+
*
|
308 |
+
* @return string
|
309 |
+
* @throws \Freemius_Exception
|
310 |
+
*/
|
311 |
+
private function get_cache_key( $path, $method = 'GET', $params = array() ) {
|
312 |
+
$canonized = $this->_api->CanonizePath( $path );
|
313 |
+
// $exploded = explode('/', $canonized);
|
314 |
+
// return $method . '_' . array_pop($exploded) . '_' . md5($canonized . json_encode($params));
|
315 |
+
return strtolower( $method . ':' . $canonized ) . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' );
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Test API connectivity.
|
320 |
+
*
|
321 |
+
* @author Vova Feldman (@svovaf)
|
322 |
+
* @since 1.0.9 If fails, try to fallback to HTTP.
|
323 |
+
* @since 1.1.6 Added a 5-min caching mechanism, to prevent from overloading the server if the API if
|
324 |
+
* temporary down.
|
325 |
+
*
|
326 |
+
* @return bool True if successful connectivity to the API.
|
327 |
+
*/
|
328 |
+
static function test() {
|
329 |
+
self::_init();
|
330 |
+
|
331 |
+
$cache_key = 'ping_test';
|
332 |
+
|
333 |
+
$test = self::$_cache->get_valid( $cache_key, null );
|
334 |
+
|
335 |
+
if ( is_null( $test ) ) {
|
336 |
+
$test = Freemius_Api_WordPress::Test();
|
337 |
+
|
338 |
+
if ( false === $test && Freemius_Api_WordPress::IsHttps() ) {
|
339 |
+
// Fallback to HTTP, since HTTPS fails.
|
340 |
+
Freemius_Api_WordPress::SetHttp();
|
341 |
+
|
342 |
+
self::$_options->set_option( 'api_force_http', true, true );
|
343 |
+
|
344 |
+
$test = Freemius_Api_WordPress::Test();
|
345 |
+
|
346 |
+
if ( false === $test ) {
|
347 |
+
/**
|
348 |
+
* API connectivity test fail also in HTTP request, therefore,
|
349 |
+
* fallback to HTTPS to keep connection secure.
|
350 |
+
*
|
351 |
+
* @since 1.1.6
|
352 |
+
*/
|
353 |
+
self::$_options->set_option( 'api_force_http', false, true );
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
self::$_cache->set( $cache_key, $test, WP_FS__TIME_5_MIN_IN_SEC );
|
358 |
+
}
|
359 |
+
|
360 |
+
return $test;
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Check if API is temporary down.
|
365 |
+
*
|
366 |
+
* @author Vova Feldman (@svovaf)
|
367 |
+
* @since 1.1.6
|
368 |
+
*
|
369 |
+
* @return bool
|
370 |
+
*/
|
371 |
+
static function is_temporary_down() {
|
372 |
+
self::_init();
|
373 |
+
|
374 |
+
$test = self::$_cache->get_valid( 'ping_test', null );
|
375 |
+
|
376 |
+
return ( false === $test );
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* @author Vova Feldman (@svovaf)
|
381 |
+
* @since 1.1.6
|
382 |
+
*
|
383 |
+
* @return object
|
384 |
+
*/
|
385 |
+
private function get_temporary_unavailable_error() {
|
386 |
+
return (object) array(
|
387 |
+
'error' => (object) array(
|
388 |
+
'type' => 'TemporaryUnavailable',
|
389 |
+
'message' => 'API is temporary unavailable, please retry in ' . ( self::$_cache->get_record_expiration( 'ping_test' ) - WP_FS__SCRIPT_START_TIME ) . ' sec.',
|
390 |
+
'code' => 'temporary_unavailable',
|
391 |
+
'http' => 503
|
392 |
+
)
|
393 |
+
);
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Ping API for connectivity test, and return result object.
|
398 |
+
*
|
399 |
+
* @author Vova Feldman (@svovaf)
|
400 |
+
* @since 1.0.9
|
401 |
+
*
|
402 |
+
* @param null|string $unique_anonymous_id
|
403 |
+
* @param array $params
|
404 |
+
*
|
405 |
+
* @return object
|
406 |
+
*/
|
407 |
+
function ping( $unique_anonymous_id = null, $params = array() ) {
|
408 |
+
$this->_logger->entrance();
|
409 |
+
|
410 |
+
if ( self::is_temporary_down() ) {
|
411 |
+
return $this->get_temporary_unavailable_error();
|
412 |
+
}
|
413 |
+
|
414 |
+
$pong = is_null( $unique_anonymous_id ) ?
|
415 |
+
Freemius_Api_WordPress::Ping() :
|
416 |
+
$this->_call( 'ping.json?' . http_build_query( array_merge(
|
417 |
+
array( 'uid' => $unique_anonymous_id ),
|
418 |
+
$params
|
419 |
+
) ) );
|
420 |
+
|
421 |
+
if ( $this->is_valid_ping( $pong ) ) {
|
422 |
+
return $pong;
|
423 |
+
}
|
424 |
+
|
425 |
+
if ( self::should_try_with_http( $pong ) ) {
|
426 |
+
// Fallback to HTTP, since HTTPS fails.
|
427 |
+
Freemius_Api_WordPress::SetHttp();
|
428 |
+
|
429 |
+
self::$_options->set_option( 'api_force_http', true, true );
|
430 |
+
|
431 |
+
$pong = is_null( $unique_anonymous_id ) ?
|
432 |
+
Freemius_Api_WordPress::Ping() :
|
433 |
+
$this->_call( 'ping.json?' . http_build_query( array_merge(
|
434 |
+
array( 'uid' => $unique_anonymous_id ),
|
435 |
+
$params
|
436 |
+
) ) );
|
437 |
+
|
438 |
+
if ( ! $this->is_valid_ping( $pong ) ) {
|
439 |
+
self::$_options->set_option( 'api_force_http', false, true );
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
return $pong;
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Check if based on the API result we should try
|
448 |
+
* to re-run the same request with HTTP instead of HTTPS.
|
449 |
+
*
|
450 |
+
* @author Vova Feldman (@svovaf)
|
451 |
+
* @since 1.1.6
|
452 |
+
*
|
453 |
+
* @param $result
|
454 |
+
*
|
455 |
+
* @return bool
|
456 |
+
*/
|
457 |
+
private static function should_try_with_http( $result ) {
|
458 |
+
if ( ! Freemius_Api_WordPress::IsHttps() ) {
|
459 |
+
return false;
|
460 |
+
}
|
461 |
+
|
462 |
+
return ( ! is_object( $result ) ||
|
463 |
+
! isset( $result->error ) ||
|
464 |
+
! isset( $result->error->code ) ||
|
465 |
+
! in_array( $result->error->code, array(
|
466 |
+
'curl_missing',
|
467 |
+
'cloudflare_ddos_protection',
|
468 |
+
'maintenance_mode',
|
469 |
+
'squid_cache_block',
|
470 |
+
'too_many_requests',
|
471 |
+
) ) );
|
472 |
+
|
473 |
+
}
|
474 |
+
|
475 |
+
/**
|
476 |
+
* Check if valid ping request result.
|
477 |
+
*
|
478 |
+
* @author Vova Feldman (@svovaf)
|
479 |
+
* @since 1.1.1
|
480 |
+
*
|
481 |
+
* @param mixed $pong
|
482 |
+
*
|
483 |
+
* @return bool
|
484 |
+
*/
|
485 |
+
function is_valid_ping( $pong ) {
|
486 |
+
return Freemius_Api_WordPress::Test( $pong );
|
487 |
+
}
|
488 |
+
|
489 |
+
function get_url( $path = '' ) {
|
490 |
+
return Freemius_Api_WordPress::GetUrl( $path, $this->_api->IsSandbox() );
|
491 |
+
}
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Clear API cache.
|
495 |
+
*
|
496 |
+
* @author Vova Feldman (@svovaf)
|
497 |
+
* @since 1.0.9
|
498 |
+
*/
|
499 |
+
static function clear_cache() {
|
500 |
+
self::_init();
|
501 |
+
|
502 |
+
self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME );
|
503 |
+
self::$_cache->clear();
|
504 |
+
}
|
505 |
+
|
506 |
+
#----------------------------------------------------------------------------------
|
507 |
+
#region Error Handling
|
508 |
+
#----------------------------------------------------------------------------------
|
509 |
+
|
510 |
+
/**
|
511 |
+
* @author Vova Feldman (@svovaf)
|
512 |
+
* @since 1.2.1.5
|
513 |
+
*
|
514 |
+
* @param mixed $result
|
515 |
+
*
|
516 |
+
* @return bool Is API result contains an error.
|
517 |
+
*/
|
518 |
+
static function is_api_error( $result ) {
|
519 |
+
return ( is_object( $result ) && isset( $result->error ) ) ||
|
520 |
+
is_string( $result );
|
521 |
+
}
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Checks if given API result is a non-empty and not an error object.
|
525 |
+
*
|
526 |
+
* @author Vova Feldman (@svovaf)
|
527 |
+
* @since 1.2.1.5
|
528 |
+
*
|
529 |
+
* @param mixed $result
|
530 |
+
* @param string|null $required_property Optional property we want to verify that is set.
|
531 |
+
*
|
532 |
+
* @return bool
|
533 |
+
*/
|
534 |
+
static function is_api_result_object( $result, $required_property = null ) {
|
535 |
+
return (
|
536 |
+
is_object( $result ) &&
|
537 |
+
! isset( $result->error ) &&
|
538 |
+
( empty( $required_property ) || isset( $result->{$required_property} ) )
|
539 |
+
);
|
540 |
+
}
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Checks if given API result is a non-empty entity object with non-empty ID.
|
544 |
+
*
|
545 |
+
* @author Vova Feldman (@svovaf)
|
546 |
+
* @since 1.2.1.5
|
547 |
+
*
|
548 |
+
* @param mixed $result
|
549 |
+
*
|
550 |
+
* @return bool
|
551 |
+
*/
|
552 |
+
static function is_api_result_entity( $result ) {
|
553 |
+
return self::is_api_result_object( $result, 'id' ) &&
|
554 |
+
FS_Entity::is_valid_id( $result->id );
|
555 |
+
}
|
556 |
+
|
557 |
+
#endregion
|
558 |
}
|
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
|
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
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.4
|
7 |
*
|
8 |
* @link https://github.com/easydigitaldownloads/EDD-License-handler/blob/master/EDD_SL_Plugin_Updater.php
|
@@ -57,6 +57,11 @@
|
|
57 |
'pre_set_site_transient_update_plugins_filter'
|
58 |
) );
|
59 |
|
|
|
|
|
|
|
|
|
|
|
60 |
if ( ! $this->_fs->has_active_valid_license() ) {
|
61 |
/**
|
62 |
* If user has the premium plugin's code but do NOT have an active license,
|
@@ -100,7 +105,7 @@
|
|
100 |
}
|
101 |
|
102 |
/**
|
103 |
-
* Overrides
|
104 |
*
|
105 |
* @author Vova Feldman (@svovaf)
|
106 |
* @since 1.1.6
|
@@ -123,7 +128,7 @@
|
|
123 |
$plugin_update_row = preg_replace(
|
124 |
'/(\<div.+>)(.+)(\<a.+\<a.+)\<\/div\>/is',
|
125 |
'$1 $2 ' . sprintf(
|
126 |
-
$this->_fs->
|
127 |
'<a href="' . $this->_fs->pricing_url() . '">', '</a>',
|
128 |
$r->new_version ) .
|
129 |
'$4',
|
@@ -173,6 +178,24 @@
|
|
173 |
function pre_set_site_transient_update_plugins_filter( $transient_data ) {
|
174 |
$this->_logger->entrance();
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
if ( empty( $transient_data ) ||
|
177 |
defined( 'WP_FS__UNINSTALL_MODE' )
|
178 |
) {
|
@@ -181,7 +204,11 @@
|
|
181 |
|
182 |
if ( ! isset( $this->_update_details ) ) {
|
183 |
// Get plugin's newest update.
|
184 |
-
$new_version = $this->_fs->get_update(
|
|
|
|
|
|
|
|
|
185 |
|
186 |
$this->_update_details = false;
|
187 |
|
@@ -193,7 +220,7 @@
|
|
193 |
$plugin_details->new_version = $new_version->version;
|
194 |
$plugin_details->url = WP_FS__ADDRESS;
|
195 |
$plugin_details->package = $new_version->url;
|
196 |
-
$plugin_details->
|
197 |
|
198 |
/**
|
199 |
* Cache plugin details locally since set_site_transient( 'update_plugins' )
|
@@ -208,7 +235,11 @@
|
|
208 |
|
209 |
if ( is_object( $this->_update_details ) ) {
|
210 |
// Add plugin to transient data.
|
211 |
-
|
|
|
|
|
|
|
|
|
212 |
}
|
213 |
|
214 |
return $transient_data;
|
@@ -324,7 +355,7 @@ if ( !isset($info->error) ) {
|
|
324 |
$data->version = $this->_fs->get_plugin_version();
|
325 |
} else {
|
326 |
if ( $is_addon ) {
|
327 |
-
$data->name = $addon->title . ' ' . $this->_fs->
|
328 |
$data->slug = $addon->slug;
|
329 |
$data->url = WP_FS__ADDRESS;
|
330 |
$data->package = $new_version->url;
|
@@ -456,7 +487,7 @@ if ( !isset($info->error) ) {
|
|
456 |
if ( ! empty( $plugin_id ) && ! FS_Plugin::is_valid_id( $plugin_id ) ) {
|
457 |
// Invalid plugin ID.
|
458 |
return array(
|
459 |
-
'message' => $this->_fs->
|
460 |
'code' => 'invalid_module_id',
|
461 |
);
|
462 |
}
|
@@ -470,29 +501,27 @@ if ( !isset($info->error) ) {
|
|
470 |
if ( ! is_object( $addon ) ) {
|
471 |
// Invalid add-on ID.
|
472 |
return array(
|
473 |
-
'message' => $this->_fs->
|
474 |
'code' => 'invalid_module_id',
|
475 |
);
|
476 |
}
|
477 |
|
478 |
$slug = $addon->slug;
|
479 |
-
$title = $addon->title . ' ' . $this->_fs->
|
480 |
|
481 |
$is_addon = true;
|
482 |
} else {
|
483 |
$slug = $this->_fs->get_slug();
|
484 |
$title = $this->_fs->get_plugin_title() .
|
485 |
-
( $this->_fs->is_addon() ? ' ' . $this->_fs->
|
486 |
}
|
487 |
|
488 |
if ( $this->is_premium_plugin_active( $plugin_id ) ) {
|
489 |
// Premium version already activated.
|
490 |
return array(
|
491 |
-
'message' => $
|
492 |
-
|
493 |
-
|
494 |
-
'auto-install-error-premium-activated'
|
495 |
-
),
|
496 |
'code' => 'premium_installed',
|
497 |
);
|
498 |
}
|
@@ -521,7 +550,7 @@ if ( !isset($info->error) ) {
|
|
521 |
|
522 |
$skin_args = array(
|
523 |
'type' => 'web',
|
524 |
-
'title' => sprintf(
|
525 |
'url' => esc_url_raw( $install_url ),
|
526 |
'nonce' => 'install-plugin_' . $slug,
|
527 |
'plugin' => '',
|
@@ -562,7 +591,7 @@ if ( !isset($info->error) ) {
|
|
562 |
global $wp_filesystem;
|
563 |
|
564 |
$error_code = 'unable_to_connect_to_filesystem';
|
565 |
-
$error_message =
|
566 |
|
567 |
// Pass through the error from WP_Filesystem if one was raised.
|
568 |
if ( $wp_filesystem instanceof WP_Filesystem_Base &&
|
@@ -668,7 +697,7 @@ if ( !isset($info->error) ) {
|
|
668 |
} else {
|
669 |
return new WP_Error(
|
670 |
'rename_failed',
|
671 |
-
$this->_fs->
|
672 |
array(
|
673 |
'found' => $subdir_name,
|
674 |
'expected' => $desired_slug
|
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 |
* @link https://github.com/easydigitaldownloads/EDD-License-handler/blob/master/EDD_SL_Plugin_Updater.php
|
57 |
'pre_set_site_transient_update_plugins_filter'
|
58 |
) );
|
59 |
|
60 |
+
add_filter( 'pre_set_site_transient_update_themes', array(
|
61 |
+
&$this,
|
62 |
+
'pre_set_site_transient_update_plugins_filter'
|
63 |
+
) );
|
64 |
+
|
65 |
if ( ! $this->_fs->has_active_valid_license() ) {
|
66 |
/**
|
67 |
* If user has the premium plugin's code but do NOT have an active license,
|
105 |
}
|
106 |
|
107 |
/**
|
108 |
+
* Overrides default update message format with "renew your license" message.
|
109 |
*
|
110 |
* @author Vova Feldman (@svovaf)
|
111 |
* @since 1.1.6
|
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',
|
178 |
function pre_set_site_transient_update_plugins_filter( $transient_data ) {
|
179 |
$this->_logger->entrance();
|
180 |
|
181 |
+
/**
|
182 |
+
* "plugins" or "themes".
|
183 |
+
*
|
184 |
+
* @author Leo Fajardo (@leorw)
|
185 |
+
* @since 1.2.2
|
186 |
+
*/
|
187 |
+
$module_type = $this->_fs->get_module_type() . 's';
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Ensure that we don't mix plugins update info with themes update info.
|
191 |
+
*
|
192 |
+
* @author Leo Fajardo (@leorw)
|
193 |
+
* @since 1.2.2
|
194 |
+
*/
|
195 |
+
if ( "pre_set_site_transient_update_{$module_type}" !== current_filter() ) {
|
196 |
+
return $transient_data;
|
197 |
+
}
|
198 |
+
|
199 |
if ( empty( $transient_data ) ||
|
200 |
defined( 'WP_FS__UNINSTALL_MODE' )
|
201 |
) {
|
204 |
|
205 |
if ( ! isset( $this->_update_details ) ) {
|
206 |
// Get plugin's newest update.
|
207 |
+
$new_version = $this->_fs->get_update(
|
208 |
+
false,
|
209 |
+
fs_request_get_bool( 'force-check' ),
|
210 |
+
WP_FS__TIME_24_HOURS_IN_SEC / 24
|
211 |
+
);
|
212 |
|
213 |
$this->_update_details = false;
|
214 |
|
220 |
$plugin_details->new_version = $new_version->version;
|
221 |
$plugin_details->url = WP_FS__ADDRESS;
|
222 |
$plugin_details->package = $new_version->url;
|
223 |
+
$plugin_details->{ $this->_fs->get_module_type() } = $this->_fs->get_plugin_basename();
|
224 |
|
225 |
/**
|
226 |
* Cache plugin details locally since set_site_transient( 'update_plugins' )
|
235 |
|
236 |
if ( is_object( $this->_update_details ) ) {
|
237 |
// Add plugin to transient data.
|
238 |
+
if ( $this->_fs->is_plugin() ) {
|
239 |
+
$transient_data->response[ $this->_fs->get_plugin_basename() ] = $this->_update_details;
|
240 |
+
} else {
|
241 |
+
$transient_data->response[ $this->_update_details->theme ] = (array) $this->_update_details;
|
242 |
+
}
|
243 |
}
|
244 |
|
245 |
return $transient_data;
|
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
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/customizer/class-fs-customizer-support-section.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.2.2.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class Zerif_Customizer_Theme_Info_Main
|
15 |
+
*
|
16 |
+
* @since 1.0.0
|
17 |
+
* @access public
|
18 |
+
*/
|
19 |
+
class FS_Customizer_Support_Section extends WP_Customize_Section {
|
20 |
+
|
21 |
+
function __construct( $manager, $id, $args = array() ) {
|
22 |
+
$manager->register_section_type( 'FS_Customizer_Support_Section' );
|
23 |
+
|
24 |
+
parent::__construct( $manager, $id, $args );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* The type of customize section being rendered.
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
* @access public
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
public $type = 'freemius-support-section';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var Freemius
|
38 |
+
*/
|
39 |
+
public $fs = null;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Add custom parameters to pass to the JS via JSON.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
*/
|
46 |
+
public function json() {
|
47 |
+
$json = parent::json();
|
48 |
+
|
49 |
+
$is_contact_visible = $this->fs->is_page_visible( 'contact' );
|
50 |
+
$is_support_visible = $this->fs->is_page_visible( 'support' );
|
51 |
+
|
52 |
+
$json['theme_title'] = $this->fs->get_plugin_name();
|
53 |
+
|
54 |
+
if ( $is_contact_visible && $is_support_visible ) {
|
55 |
+
$json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
|
56 |
+
}
|
57 |
+
|
58 |
+
if ( $is_contact_visible ) {
|
59 |
+
$json['contact'] = array(
|
60 |
+
'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
|
61 |
+
'url' => $this->fs->contact_url(),
|
62 |
+
);
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( $is_support_visible ) {
|
66 |
+
$json['support'] = array(
|
67 |
+
'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
|
68 |
+
'url' => $this->fs->get_support_forum_url()
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
+
return $json;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Outputs the Underscore.js template.
|
77 |
+
*
|
78 |
+
* @since 1.0.0
|
79 |
+
*/
|
80 |
+
protected function render_template() {
|
81 |
+
?>
|
82 |
+
<li id="fs_customizer_support"
|
83 |
+
class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
|
84 |
+
<h3 class="accordion-section-title">
|
85 |
+
<span>{{ data.theme_title }}</span>
|
86 |
+
<# if ( data.contact && data.support ) { #>
|
87 |
+
<div class="button-group">
|
88 |
+
<# } #>
|
89 |
+
<# if ( data.contact ) { #>
|
90 |
+
<a class="button" href="{{ data.contact.url }}" target="_blank">{{ data.contact.label }} </a>
|
91 |
+
<# } #>
|
92 |
+
<# if ( data.support ) { #>
|
93 |
+
<a class="button" href="{{ data.support.url }}" target="_blank">{{ data.support.label }} </a>
|
94 |
+
<# } #>
|
95 |
+
<# if ( data.contact && data.support ) { #>
|
96 |
+
</div>
|
97 |
+
<# } #>
|
98 |
+
</h3>
|
99 |
+
</li>
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
}
|
freemius/includes/customizer/class-fs-customizer-upsell-control.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.2.2.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class FS_Customizer_Upsell_Control
|
15 |
+
*/
|
16 |
+
class FS_Customizer_Upsell_Control extends WP_Customize_Control {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Control type
|
20 |
+
*
|
21 |
+
* @var string control type
|
22 |
+
*/
|
23 |
+
public $type = 'freemius-upsell-control';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var Freemius
|
27 |
+
*/
|
28 |
+
public $fs = null;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param WP_Customize_Manager $manager the customize manager class.
|
32 |
+
* @param string $id id.
|
33 |
+
* @param array $args customizer manager parameters.
|
34 |
+
*/
|
35 |
+
public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
|
36 |
+
$manager->register_control_type( 'FS_Customizer_Upsell_Control' );
|
37 |
+
|
38 |
+
parent::__construct( $manager, $id, $args );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Enqueue resources for the control.
|
43 |
+
*/
|
44 |
+
public function enqueue() {
|
45 |
+
fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Json conversion
|
50 |
+
*/
|
51 |
+
public function to_json() {
|
52 |
+
$pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . ' ' . ( is_rtl() ? '←' : '➤' );
|
53 |
+
|
54 |
+
parent::to_json();
|
55 |
+
|
56 |
+
$this->json['button_text'] = $pricing_cta;
|
57 |
+
$this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
|
58 |
+
$this->fs->get_trial_url() :
|
59 |
+
$this->fs->get_upgrade_url();
|
60 |
+
|
61 |
+
// Load features.
|
62 |
+
$pricing = $this->fs->get_api_plugin_scope()->get( 'pricing.json' );
|
63 |
+
|
64 |
+
if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
|
65 |
+
// Add support features.
|
66 |
+
if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
|
67 |
+
$support_features = array(
|
68 |
+
'kb' => 'Help Center',
|
69 |
+
'forum' => 'Support Forum',
|
70 |
+
'email' => 'Priority Email Support',
|
71 |
+
'phone' => 'Phone Support',
|
72 |
+
'skype' => 'Skype Support',
|
73 |
+
'is_success_manager' => 'Personal Success Manager',
|
74 |
+
);
|
75 |
+
|
76 |
+
for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
|
77 |
+
if ( 'free' == $pricing->plans[$i]->name ) {
|
78 |
+
continue;
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( ! isset( $pricing->plans[ $i ]->features ) ||
|
82 |
+
! is_array( $pricing->plans[ $i ]->features ) ) {
|
83 |
+
$pricing->plans[$i]->features = array();
|
84 |
+
}
|
85 |
+
|
86 |
+
foreach ( $support_features as $key => $label ) {
|
87 |
+
$key = ( 'is_success_manager' !== $key ) ?
|
88 |
+
"support_{$key}" :
|
89 |
+
$key;
|
90 |
+
|
91 |
+
if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
|
92 |
+
|
93 |
+
$support_feature = new stdClass();
|
94 |
+
$support_feature->title = $label;
|
95 |
+
|
96 |
+
$pricing->plans[ $i ]->features[] = $support_feature;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
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 |
+
|
110 |
+
/**
|
111 |
+
* Control content
|
112 |
+
*/
|
113 |
+
public function content_template() {
|
114 |
+
?>
|
115 |
+
<div id="fs_customizer_upsell">
|
116 |
+
<# if ( data.plans ) { #>
|
117 |
+
<ul class="fs-customizer-plans">
|
118 |
+
<# for (i in data.plans) { #>
|
119 |
+
<# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
|
120 |
+
<li class="fs-customizer-plan">
|
121 |
+
<div class="fs-accordion-section-open">
|
122 |
+
<h2 class="fs-accordion-section-title menu-item">
|
123 |
+
<span>{{ data.plans[i].title }}</span>
|
124 |
+
<button type="button" class="button-link item-edit" aria-expanded="true">
|
125 |
+
<span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
|
126 |
+
<span class="toggle-indicator" aria-hidden="true"></span>
|
127 |
+
</button>
|
128 |
+
</h2>
|
129 |
+
<div class="fs-accordion-section-content">
|
130 |
+
<# if ( data.plans[i].description ) { #>
|
131 |
+
<h3>{{ data.plans[i].description }}</h3>
|
132 |
+
<# } #>
|
133 |
+
<# if ( data.plans[i].features ) { #>
|
134 |
+
<ul>
|
135 |
+
<# for ( j in data.plans[i].features ) { #>
|
136 |
+
<li><div class="fs-feature">
|
137 |
+
<span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
|
138 |
+
<# if ( data.plans[i].features[j].description ) { #>
|
139 |
+
<span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
|
140 |
+
<# } #>
|
141 |
+
</div></li>
|
142 |
+
<# } #>
|
143 |
+
</ul>
|
144 |
+
<# } #>
|
145 |
+
<# if ( 'free' != data.plans[i].name ) { #>
|
146 |
+
<a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
|
147 |
+
<# } #>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</li>
|
151 |
+
<# } #>
|
152 |
+
<# } #>
|
153 |
+
</ul>
|
154 |
+
<# } #>
|
155 |
+
</div>
|
156 |
+
<?php }
|
157 |
+
}
|
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
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.1.7.3
|
7 |
*/
|
8 |
|
@@ -24,8 +24,8 @@
|
|
24 |
}
|
25 |
|
26 |
static function requests_count() {
|
27 |
-
if ( class_exists( '
|
28 |
-
$logger =
|
29 |
} else {
|
30 |
$logger = array();
|
31 |
}
|
@@ -34,8 +34,8 @@
|
|
34 |
}
|
35 |
|
36 |
static function total_time() {
|
37 |
-
if ( class_exists( '
|
38 |
-
$logger =
|
39 |
} else {
|
40 |
$logger = array();
|
41 |
}
|
@@ -45,7 +45,7 @@
|
|
45 |
$total_time += $l['total'];
|
46 |
}
|
47 |
|
48 |
-
return number_format( 100 * $total_time, 2 ) . ' ' .
|
49 |
}
|
50 |
|
51 |
function render() {
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
* @since 1.1.7.3
|
7 |
*/
|
8 |
|
24 |
}
|
25 |
|
26 |
static function requests_count() {
|
27 |
+
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
28 |
+
$logger = Freemius_Api_WordPress::GetLogger();
|
29 |
} else {
|
30 |
$logger = array();
|
31 |
}
|
34 |
}
|
35 |
|
36 |
static function total_time() {
|
37 |
+
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
38 |
+
$logger = Freemius_Api_WordPress::GetLogger();
|
39 |
} else {
|
40 |
$logger = array();
|
41 |
}
|
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
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.1.7.3
|
7 |
*/
|
8 |
|
@@ -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 |
}
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
* @since 1.1.7.3
|
7 |
*/
|
8 |
|
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
ADDED
@@ -0,0 +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 |
+
}
|
freemius/includes/entities/class-fs-affiliate.php
ADDED
@@ -0,0 +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 |
+
}
|
freemius/includes/entities/class-fs-billing.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius for EDD Add-On
|
4 |
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-entity.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
@@ -42,9 +42,9 @@
|
|
42 |
* @param bool|object $entity
|
43 |
*/
|
44 |
function __construct( $entity = false ) {
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
|
49 |
$props = fs_get_object_public_vars( $this );
|
50 |
|
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 |
|
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 |
|
freemius/includes/entities/class-fs-payment.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-plugin-info.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-plugin-license.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.5
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-plugin-plan.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.5
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-plugin-tag.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.4
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-plugin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
@@ -25,6 +25,8 @@
|
|
25 |
*/
|
26 |
public $slug;
|
27 |
/**
|
|
|
|
|
28 |
* @var string 'plugin' or 'theme'
|
29 |
*/
|
30 |
public $type;
|
@@ -59,6 +61,17 @@
|
|
59 |
* @var bool
|
60 |
*/
|
61 |
public $is_live;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
#endregion Install Specific Properties
|
64 |
|
@@ -88,6 +101,16 @@
|
|
88 |
return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
static function get_type() {
|
92 |
return 'plugin';
|
93 |
}
|
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 |
|
25 |
*/
|
26 |
public $slug;
|
27 |
/**
|
28 |
+
* @since 1.2.2
|
29 |
+
*
|
30 |
* @var string 'plugin' or 'theme'
|
31 |
*/
|
32 |
public $type;
|
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 |
|
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 |
}
|
freemius/includes/entities/class-fs-pricing.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius for EDD Add-On
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-scope-entity.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.4
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-site.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-subscription.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.9
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/entities/class-fs-user.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/fs-core-functions.php
CHANGED
@@ -1,302 +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 |
// switch ($errno) {
|
302 |
// case E_USER_ERROR:
|
@@ -307,209 +386,233 @@
|
|
307 |
// case E_NOTICE:
|
308 |
// case E_USER_NOTICE:
|
309 |
// break;
|
310 |
-
//
|
311 |
// break;
|
312 |
// }
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
|
374 |
// if ( ! isset( $parsed_url['host'] ) ) {
|
375 |
// return $url;
|
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 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
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 |
if ( ! function_exists( 'fs_text' ) ) {
|
515 |
/**
|
@@ -523,12 +626,168 @@
|
|
523 |
*
|
524 |
* @return string
|
525 |
*
|
526 |
-
* @global $fs_text, $fs_text_overrides
|
527 |
*/
|
528 |
function fs_text( $key, $slug = 'freemius' ) {
|
529 |
return __fs( $key, $slug );
|
530 |
}
|
531 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
/**
|
533 |
* Output a translated text by key.
|
534 |
*
|
@@ -541,89 +800,319 @@
|
|
541 |
function fs_echo( $key, $slug = 'freemius' ) {
|
542 |
echo fs_text( $key, $slug );
|
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 |
#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:
|
386 |
// case E_NOTICE:
|
387 |
// case E_USER_NOTICE:
|
388 |
// break;
|
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 |
/**
|
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 |
*
|
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
@@ -1,459 +1,497 @@
|
|
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 |
-
return false;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (
|
71 |
-
|
72 |
-
return false;
|
73 |
-
}
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
header( "
|
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 |
-
*
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
*
|
391 |
-
*
|
392 |
-
*
|
393 |
-
*
|
394 |
-
* @
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
* @
|
403 |
-
*/
|
404 |
-
$
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
#endregion Actions / Filters -----------------------------------------
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* IMPORTANT:
|
4 |
+
* This file will be loaded based on the order of the plugins/themes load.
|
5 |
+
* If there's a theme and a plugin using Freemius, the plugin's essential
|
6 |
+
* file will always load first.
|
7 |
+
*
|
8 |
+
* @package Freemius
|
9 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
10 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
11 |
+
* @since 1.1.5
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! function_exists( 'fs_normalize_path' ) ) {
|
15 |
+
if ( function_exists( 'wp_normalize_path' ) ) {
|
16 |
+
/**
|
17 |
+
* Normalize a filesystem path.
|
18 |
+
*
|
19 |
+
* Replaces backslashes with forward slashes for Windows systems, and ensures
|
20 |
+
* no duplicate slashes exist.
|
21 |
+
*
|
22 |
+
* @param string $path Path to normalize.
|
23 |
+
*
|
24 |
+
* @return string Normalized path.
|
25 |
+
*/
|
26 |
+
function fs_normalize_path( $path ) {
|
27 |
+
return wp_normalize_path( $path );
|
28 |
+
}
|
29 |
+
} else {
|
30 |
+
function fs_normalize_path( $path ) {
|
31 |
+
$path = str_replace( '\\', '/', $path );
|
32 |
+
$path = preg_replace( '|/+|', '/', $path );
|
33 |
+
|
34 |
+
return $path;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
#region Core Redirect (copied from BuddyPress) -----------------------------------------
|
40 |
+
|
41 |
+
if ( ! function_exists( 'fs_redirect' ) ) {
|
42 |
+
/**
|
43 |
+
* Redirects to another page, with a workaround for the IIS Set-Cookie bug.
|
44 |
+
*
|
45 |
+
* @link http://support.microsoft.com/kb/q176113/
|
46 |
+
* @since 1.5.1
|
47 |
+
* @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
|
48 |
+
*
|
49 |
+
* @param string $location The path to redirect to.
|
50 |
+
* @param bool $exit If true, exit after redirect (Since 1.2.1.5).
|
51 |
+
* @param int $status Status code to use.
|
52 |
+
*
|
53 |
+
* @return bool False if $location is not set
|
54 |
+
*/
|
55 |
+
function fs_redirect( $location, $exit = true, $status = 302 ) {
|
56 |
+
global $is_IIS;
|
57 |
+
|
58 |
+
$file = '';
|
59 |
+
$line = '';
|
60 |
+
if ( headers_sent($file, $line) ) {
|
61 |
+
if ( WP_FS__DEBUG_SDK && class_exists( 'FS_Admin_Notice_Manager' ) ) {
|
62 |
+
$notices = FS_Admin_Notice_Manager::instance( 'global' );
|
63 |
+
|
64 |
+
$notices->add( "Freemius failed to redirect the page because the headers have been already sent from line <b><code>{$line}</code></b> in file <b><code>{$file}</code></b>. If it's unexpected, it usually happens due to invalid space and/or EOL character(s).", 'Oops...', 'error' );
|
65 |
+
}
|
66 |
+
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
71 |
+
// Don't redirect on AJAX calls.
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( ! $location ) // allows the wp_redirect filter to cancel a redirect
|
76 |
+
{
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
|
80 |
+
$location = fs_sanitize_redirect( $location );
|
81 |
+
|
82 |
+
if ( $is_IIS ) {
|
83 |
+
header( "Refresh: 0;url=$location" );
|
84 |
+
} else {
|
85 |
+
if ( php_sapi_name() != 'cgi-fcgi' ) {
|
86 |
+
status_header( $status );
|
87 |
+
} // This causes problems on IIS and some FastCGI setups
|
88 |
+
header( "Location: $location" );
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( $exit ) {
|
92 |
+
exit();
|
93 |
+
}
|
94 |
+
|
95 |
+
return true;
|
96 |
+
}
|
97 |
+
|
98 |
+
if ( ! function_exists( 'fs_sanitize_redirect' ) ) {
|
99 |
+
/**
|
100 |
+
* Sanitizes a URL for use in a redirect.
|
101 |
+
*
|
102 |
+
* @since 2.3
|
103 |
+
*
|
104 |
+
* @param string $location
|
105 |
+
*
|
106 |
+
* @return string redirect-sanitized URL
|
107 |
+
*/
|
108 |
+
function fs_sanitize_redirect( $location ) {
|
109 |
+
$location = preg_replace( '|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location );
|
110 |
+
$location = fs_kses_no_null( $location );
|
111 |
+
|
112 |
+
// remove %0d and %0a from location
|
113 |
+
$strip = array( '%0d', '%0a' );
|
114 |
+
$found = true;
|
115 |
+
while ( $found ) {
|
116 |
+
$found = false;
|
117 |
+
foreach ( (array) $strip as $val ) {
|
118 |
+
while ( strpos( $location, $val ) !== false ) {
|
119 |
+
$found = true;
|
120 |
+
$location = str_replace( $val, '', $location );
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
return $location;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( ! function_exists( 'fs_kses_no_null' ) ) {
|
130 |
+
/**
|
131 |
+
* Removes any NULL characters in $string.
|
132 |
+
*
|
133 |
+
* @since 1.0.0
|
134 |
+
*
|
135 |
+
* @param string $string
|
136 |
+
*
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
+
function fs_kses_no_null( $string ) {
|
140 |
+
$string = preg_replace( '/\0+/', '', $string );
|
141 |
+
$string = preg_replace( '/(\\\\0)+/', '', $string );
|
142 |
+
|
143 |
+
return $string;
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
#endregion Core Redirect (copied from BuddyPress) -----------------------------------------
|
149 |
+
|
150 |
+
if ( ! function_exists( '__fs' ) ) {
|
151 |
+
global $fs_text_overrides;
|
152 |
+
|
153 |
+
if ( ! isset( $fs_text_overrides ) ) {
|
154 |
+
$fs_text_overrides = array();
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
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
|
165 |
+
*
|
166 |
+
* @param string $key
|
167 |
+
* @param string $slug
|
168 |
+
*
|
169 |
+
* @return string
|
170 |
+
*
|
171 |
+
* @global $fs_text, $fs_text_overrides
|
172 |
+
*/
|
173 |
+
function __fs( $key, $slug = 'freemius' ) {
|
174 |
+
global $fs_text,
|
175 |
+
$fs_module_info_text,
|
176 |
+
$fs_text_overrides;
|
177 |
+
|
178 |
+
if ( isset( $fs_text_overrides[ $slug ] ) ) {
|
179 |
+
if ( isset( $fs_text_overrides[ $slug ][ $key ] ) ) {
|
180 |
+
return $fs_text_overrides[ $slug ][ $key ];
|
181 |
+
}
|
182 |
+
|
183 |
+
$lower_key = strtolower( $key );
|
184 |
+
if ( isset( $fs_text_overrides[ $slug ][ $lower_key ] ) ) {
|
185 |
+
return $fs_text_overrides[ $slug ][ $lower_key ];
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
if ( ! isset( $fs_text ) ) {
|
190 |
+
$dir = defined( 'WP_FS__DIR_INCLUDES' ) ?
|
191 |
+
WP_FS__DIR_INCLUDES :
|
192 |
+
dirname( __FILE__ );
|
193 |
+
|
194 |
+
require_once $dir . '/i18n.php';
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( isset( $fs_text[ $key ] ) ) {
|
198 |
+
return $fs_text[ $key ];
|
199 |
+
}
|
200 |
+
|
201 |
+
if ( isset( $fs_module_info_text[ $key ] ) ) {
|
202 |
+
return $fs_module_info_text[ $key ];
|
203 |
+
}
|
204 |
+
|
205 |
+
return $key;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Output a translated text by key.
|
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 |
+
*
|
218 |
+
* @param string $key
|
219 |
+
* @param string $slug
|
220 |
+
*/
|
221 |
+
function _efs( $key, $slug = 'freemius' ) {
|
222 |
+
fs_echo( $key, $slug );
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
if ( ! function_exists( 'fs_override_i18n' ) ) {
|
227 |
+
/**
|
228 |
+
* Override default i18n text phrases.
|
229 |
+
*
|
230 |
+
* @author Vova Feldman (@svovaf)
|
231 |
+
* @since 1.1.6
|
232 |
+
*
|
233 |
+
* @param string[] $key_value
|
234 |
+
* @param string $slug
|
235 |
+
*
|
236 |
+
* @global $fs_text_overrides
|
237 |
+
*/
|
238 |
+
function fs_override_i18n( array $key_value, $slug = 'freemius' ) {
|
239 |
+
global $fs_text_overrides;
|
240 |
+
|
241 |
+
if ( ! isset( $fs_text_overrides[ $slug ] ) ) {
|
242 |
+
$fs_text_overrides[ $slug ] = array();
|
243 |
+
}
|
244 |
+
|
245 |
+
foreach ( $key_value as $key => $value ) {
|
246 |
+
$fs_text_overrides[ $slug ][ $key ] = $value;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
if ( ! function_exists( 'fs_get_ip' ) ) {
|
252 |
+
/**
|
253 |
+
* Get client IP.
|
254 |
+
*
|
255 |
+
* @author Vova Feldman (@svovaf)
|
256 |
+
* @since 1.1.2
|
257 |
+
*
|
258 |
+
* @return string|null
|
259 |
+
*/
|
260 |
+
function fs_get_ip() {
|
261 |
+
$fields = array(
|
262 |
+
'HTTP_CF_CONNECTING_IP',
|
263 |
+
'HTTP_CLIENT_IP',
|
264 |
+
'HTTP_X_FORWARDED_FOR',
|
265 |
+
'HTTP_X_FORWARDED',
|
266 |
+
'HTTP_FORWARDED_FOR',
|
267 |
+
'HTTP_FORWARDED',
|
268 |
+
'REMOTE_ADDR',
|
269 |
+
);
|
270 |
+
|
271 |
+
foreach ( $fields as $ip_field ) {
|
272 |
+
if ( ! empty( $_SERVER[ $ip_field ] ) ) {
|
273 |
+
return $_SERVER[ $ip_field ];
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
return null;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Leverage backtrace to find caller plugin main file path.
|
283 |
+
*
|
284 |
+
* @author Vova Feldman (@svovaf)
|
285 |
+
* @since 1.0.6
|
286 |
+
*
|
287 |
+
* @return string
|
288 |
+
*/
|
289 |
+
function fs_find_caller_plugin_file() {
|
290 |
+
/**
|
291 |
+
* All the code below will be executed once on activation.
|
292 |
+
* If the user changes the main plugin's file name, the file_exists()
|
293 |
+
* will catch it.
|
294 |
+
*/
|
295 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
296 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
297 |
+
}
|
298 |
+
|
299 |
+
$all_plugins = get_plugins();
|
300 |
+
$all_plugins_paths = array();
|
301 |
+
|
302 |
+
// Get active plugin's main files real full names (might be symlinks).
|
303 |
+
foreach ( $all_plugins as $relative_path => &$data ) {
|
304 |
+
$all_plugins_paths[] = fs_normalize_path( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) );
|
305 |
+
}
|
306 |
+
|
307 |
+
$plugin_file = null;
|
308 |
+
for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
|
309 |
+
if ( empty( $bt[ $i ]['file'] ) ) {
|
310 |
+
continue;
|
311 |
+
}
|
312 |
+
|
313 |
+
if ( in_array( fs_normalize_path( $bt[ $i ]['file'] ), $all_plugins_paths ) ) {
|
314 |
+
$plugin_file = $bt[ $i ]['file'];
|
315 |
+
break;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
if ( is_null( $plugin_file ) ) {
|
320 |
+
// Throw an error to the developer in case of some edge case dev environment.
|
321 |
+
wp_die(
|
322 |
+
'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.',
|
323 |
+
'Error',
|
324 |
+
array( 'back_link' => true )
|
325 |
+
);
|
326 |
+
}
|
327 |
+
|
328 |
+
return $plugin_file;
|
329 |
+
}
|
330 |
+
|
331 |
+
require_once dirname( __FILE__ ) . '/supplements/fs-essential-functions-1.1.7.1.php';
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Update SDK newest version reference.
|
335 |
+
*
|
336 |
+
* @author Vova Feldman (@svovaf)
|
337 |
+
* @since 1.1.6
|
338 |
+
*
|
339 |
+
* @param string $sdk_relative_path
|
340 |
+
* @param string|bool $plugin_file
|
341 |
+
*
|
342 |
+
* @global $fs_active_plugins
|
343 |
+
*/
|
344 |
+
function fs_update_sdk_newest_version( $sdk_relative_path, $plugin_file = false ) {
|
345 |
+
/**
|
346 |
+
* If there is a plugin running an older version of FS (1.2.1 or below), the `fs_update_sdk_newest_version()`
|
347 |
+
* function in the older version will be used instead of this one. But since the older version is using
|
348 |
+
* the `is_plugin_active` function to check if a plugin is active, passing the theme's `plugin_path` to the
|
349 |
+
* `is_plugin_active` function will return false since the path is not a plugin path, so `in_activation` will be
|
350 |
+
* `true` for theme modules and the upgrading of the SDK version to 1.2.2 or newer version will work fine.
|
351 |
+
*
|
352 |
+
* Future versions that will call this function will use the proper logic here instead of just relying on the
|
353 |
+
* `is_plugin_active` function to fail for themes.
|
354 |
+
*
|
355 |
+
* @author Leo Fajardo (@leorw)
|
356 |
+
* @since 1.2.2
|
357 |
+
*/
|
358 |
+
|
359 |
+
global $fs_active_plugins;
|
360 |
+
|
361 |
+
$newest_sdk = $fs_active_plugins->plugins[ $sdk_relative_path ];
|
362 |
+
|
363 |
+
if ( ! is_string( $plugin_file ) ) {
|
364 |
+
$plugin_file = plugin_basename( fs_find_caller_plugin_file() );
|
365 |
+
}
|
366 |
+
|
367 |
+
if ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) {
|
368 |
+
$in_activation = ( ! is_plugin_active( $plugin_file ) );
|
369 |
+
} else {
|
370 |
+
$theme = wp_get_theme();
|
371 |
+
$in_activation = ( $newest_sdk->plugin_path == $theme->stylesheet );
|
372 |
+
}
|
373 |
+
|
374 |
+
$fs_active_plugins->newest = (object) array(
|
375 |
+
'plugin_path' => $plugin_file,
|
376 |
+
'sdk_path' => $sdk_relative_path,
|
377 |
+
'version' => $newest_sdk->version,
|
378 |
+
'in_activation' => $in_activation,
|
379 |
+
'timestamp' => time(),
|
380 |
+
);
|
381 |
+
|
382 |
+
// Update DB with latest SDK version and path.
|
383 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Reorder the plugins load order so the plugin with the newest Freemius SDK is loaded first.
|
388 |
+
*
|
389 |
+
* @author Vova Feldman (@svovaf)
|
390 |
+
* @since 1.1.6
|
391 |
+
*
|
392 |
+
* @return bool Was plugin order changed. Return false if plugin was loaded first anyways.
|
393 |
+
*
|
394 |
+
* @global $fs_active_plugins
|
395 |
+
*/
|
396 |
+
function fs_newest_sdk_plugin_first() {
|
397 |
+
global $fs_active_plugins;
|
398 |
+
|
399 |
+
/**
|
400 |
+
* @todo Multi-site network activated plugin are always loaded prior to site plugins so if there's a a plugin activated in the network mode that has an older version of the SDK of another plugin which is site activated that has new SDK version, the fs-essential-functions.php will be loaded from the older SDK. Same thing about MU plugins (loaded even before network activated plugins).
|
401 |
+
*
|
402 |
+
* @link https://github.com/Freemius/wordpress-sdk/issues/26
|
403 |
+
*/
|
404 |
+
// $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
|
405 |
+
|
406 |
+
$active_plugins = get_option( 'active_plugins' );
|
407 |
+
$newest_sdk_plugin_key = array_search( $fs_active_plugins->newest->plugin_path, $active_plugins );
|
408 |
+
if ( 0 == $newest_sdk_plugin_key ) {
|
409 |
+
// if it's 0 it's the first plugin already, no need to continue
|
410 |
+
return false;
|
411 |
+
}
|
412 |
+
|
413 |
+
array_splice( $active_plugins, $newest_sdk_plugin_key, 1 );
|
414 |
+
array_unshift( $active_plugins, $fs_active_plugins->newest->plugin_path );
|
415 |
+
update_option( 'active_plugins', $active_plugins );
|
416 |
+
|
417 |
+
return true;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Go over all Freemius SDKs in the system and find and "remember"
|
422 |
+
* the newest SDK which is associated with an active plugin.
|
423 |
+
*
|
424 |
+
* @author Vova Feldman (@svovaf)
|
425 |
+
* @since 1.1.6
|
426 |
+
*
|
427 |
+
* @global $fs_active_plugins
|
428 |
+
*/
|
429 |
+
function fs_fallback_to_newest_active_sdk() {
|
430 |
+
global $fs_active_plugins;
|
431 |
+
|
432 |
+
/**
|
433 |
+
* @var object $newest_sdk_data
|
434 |
+
*/
|
435 |
+
$newest_sdk_data = null;
|
436 |
+
$newest_sdk_path = null;
|
437 |
+
|
438 |
+
foreach ( $fs_active_plugins->plugins as $sdk_relative_path => $data ) {
|
439 |
+
if ( is_null( $newest_sdk_data ) || version_compare( $data->version, $newest_sdk_data->version, '>' )
|
440 |
+
) {
|
441 |
+
// If plugin inactive or SDK starter file doesn't exist, remove SDK reference.
|
442 |
+
if ( 'plugin' === $data->type ) {
|
443 |
+
$is_module_active = is_plugin_active( $data->plugin_path );
|
444 |
+
} else {
|
445 |
+
$active_theme = wp_get_theme();
|
446 |
+
$is_module_active = ( $data->plugin_path === $active_theme->get_template() );
|
447 |
+
}
|
448 |
+
|
449 |
+
$is_sdk_exists = file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $sdk_relative_path . '/start.php' ) );
|
450 |
+
|
451 |
+
if ( ! $is_module_active || ! $is_sdk_exists ) {
|
452 |
+
unset( $fs_active_plugins->plugins[ $sdk_relative_path ] );
|
453 |
+
|
454 |
+
// No need to store the data since it will be stored in fs_update_sdk_newest_version()
|
455 |
+
// or explicitly with update_option().
|
456 |
+
} else {
|
457 |
+
$newest_sdk_data = $data;
|
458 |
+
$newest_sdk_path = $sdk_relative_path;
|
459 |
+
}
|
460 |
+
}
|
461 |
+
}
|
462 |
+
|
463 |
+
if ( is_null( $newest_sdk_data ) ) {
|
464 |
+
// Couldn't find any SDK reference.
|
465 |
+
$fs_active_plugins = new stdClass();
|
466 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
467 |
+
} else {
|
468 |
+
fs_update_sdk_newest_version( $newest_sdk_path, $newest_sdk_data->plugin_path );
|
469 |
+
}
|
470 |
+
}
|
471 |
+
|
472 |
+
#region Actions / Filters -----------------------------------------
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Apply filter for specific plugin.
|
476 |
+
*
|
477 |
+
* @author Vova Feldman (@svovaf)
|
478 |
+
* @since 1.0.9
|
479 |
+
*
|
480 |
+
* @param string $module_unique_affix Module's unique affix.
|
481 |
+
* @param string $tag The name of the filter hook.
|
482 |
+
* @param mixed $value The value on which the filters hooked to `$tag` are applied on.
|
483 |
+
*
|
484 |
+
* @return mixed The filtered value after all hooked functions are applied to it.
|
485 |
+
*
|
486 |
+
* @uses apply_filters()
|
487 |
+
*/
|
488 |
+
function fs_apply_filter( $module_unique_affix, $tag, $value ) {
|
489 |
+
$args = func_get_args();
|
490 |
+
|
491 |
+
return call_user_func_array( 'apply_filters', array_merge(
|
492 |
+
array( "fs_{$tag}_{$module_unique_affix}" ),
|
493 |
+
array_slice( $args, 2 ) )
|
494 |
+
);
|
495 |
+
}
|
496 |
+
|
497 |
#endregion Actions / Filters -----------------------------------------
|
freemius/includes/fs-plugin-info-dialog.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.6
|
7 |
*/
|
8 |
|
@@ -36,7 +36,7 @@
|
|
36 |
|
37 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $fs->get_slug() . '_info', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
38 |
|
39 |
-
// Remove
|
40 |
remove_all_actions( 'install_plugins_pre_plugin-information' );
|
41 |
|
42 |
// Override action with custom plugins function for add-ons.
|
@@ -81,7 +81,7 @@
|
|
81 |
}
|
82 |
|
83 |
if ( ! isset( $selected_addon->info ) ) {
|
84 |
-
// Setup some
|
85 |
$selected_addon->info = new stdClass();
|
86 |
$selected_addon->info->selling_point_0 = 'Selling Point 1';
|
87 |
$selected_addon->info->selling_point_1 = 'Selling Point 2';
|
@@ -99,37 +99,34 @@
|
|
99 |
$has_pricing = false;
|
100 |
$has_features = false;
|
101 |
$plans = false;
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
105 |
if ( is_array( $plans ) ) {
|
106 |
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
|
|
|
|
|
|
107 |
$plans[ $i ] = new FS_Plugin_Plan( $plans[ $i ] );
|
108 |
$plan = $plans[ $i ];
|
109 |
|
110 |
-
|
111 |
-
|
112 |
-
// Update plan's pricing.
|
113 |
-
$plan->pricing = $pricing_result->pricing;
|
114 |
-
|
115 |
-
if ( is_array( $plan->pricing ) && ! empty( $plan->pricing ) ) {
|
116 |
-
$is_free = false;
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
}
|
121 |
}
|
122 |
|
|
|
|
|
123 |
$has_pricing = true;
|
124 |
}
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
is_array( $features_result->features ) &&
|
129 |
-
0 < count( $features_result->features )
|
130 |
-
) {
|
131 |
-
// Update plan's pricing.
|
132 |
-
$plan->features = $features_result->features;
|
133 |
|
134 |
$has_features = true;
|
135 |
}
|
@@ -313,7 +310,12 @@
|
|
313 |
|
314 |
if ( ! empty( $api->checkout_link ) && isset( $api->plans ) && 0 < is_array( $api->plans ) ) {
|
315 |
if ( is_null( $plan ) ) {
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
317 |
}
|
318 |
|
319 |
return ' <a class="button button-primary right" href="' . $this->_fs->addon_checkout_url(
|
@@ -323,8 +325,12 @@
|
|
323 |
$plan->has_trial()
|
324 |
) . '" target="_parent">' .
|
325 |
( ! $plan->has_trial() ?
|
326 |
-
|
327 |
-
sprintf(
|
|
|
|
|
|
|
|
|
328 |
) .
|
329 |
'</a>';
|
330 |
|
@@ -346,23 +352,23 @@
|
|
346 |
* plugin is wordpress.org compliant. Therefore, require a download
|
347 |
* since installing external plugins is not allowed by the wp.org guidelines.
|
348 |
*/
|
349 |
-
return ' <a class="button button-primary right" href="' . esc_url( $api->download_link ) . '" target="_blank">' .
|
350 |
} else {
|
351 |
if ( $status['url'] ) {
|
352 |
-
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' .
|
353 |
}
|
354 |
}
|
355 |
break;
|
356 |
case 'update_available':
|
357 |
if ( $status['url'] ) {
|
358 |
-
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' .
|
359 |
}
|
360 |
break;
|
361 |
case 'newer_installed':
|
362 |
-
return '<a class="button button-primary right disabled">' . sprintf(
|
363 |
break;
|
364 |
case 'latest_installed':
|
365 |
-
return '<a class="button button-primary right disabled">' .
|
366 |
break;
|
367 |
}
|
368 |
|
@@ -475,13 +481,13 @@
|
|
475 |
);
|
476 |
|
477 |
$plugins_section_titles = array(
|
478 |
-
'description' =>
|
479 |
-
'installation' =>
|
480 |
-
'faq' =>
|
481 |
-
'screenshots' =>
|
482 |
-
'changelog' =>
|
483 |
-
'reviews' =>
|
484 |
-
'other_notes' =>
|
485 |
);
|
486 |
|
487 |
// Sanitize HTML
|
@@ -496,7 +502,7 @@
|
|
496 |
}
|
497 |
|
498 |
// Add after $api->slug is ready.
|
499 |
-
$plugins_section_titles['features'] =
|
500 |
|
501 |
$_tab = esc_attr( $tab );
|
502 |
|
@@ -506,7 +512,7 @@
|
|
506 |
$section = array_shift( $section_titles );
|
507 |
}
|
508 |
|
509 |
-
iframe_header(
|
510 |
|
511 |
$_with_banner = '';
|
512 |
|
@@ -565,6 +571,10 @@
|
|
565 |
<div class="plugin-information-pricing">
|
566 |
<?php foreach ( $api->plans as $plan ) : ?>
|
567 |
<?php
|
|
|
|
|
|
|
|
|
568 |
/**
|
569 |
* @var FS_Plugin_Plan $plan
|
570 |
*/
|
@@ -574,7 +584,7 @@
|
|
574 |
<div class="fs-plan<?php if ( ! $is_multi_cycle ) {
|
575 |
echo ' fs-single-cycle';
|
576 |
} ?>" data-plan-id="<?php echo $plan->id ?>">
|
577 |
-
<h3 data-plan="<?php echo $plan->id ?>"><?php
|
578 |
<?php $has_annual = $first_pricing->has_annual() ?>
|
579 |
<?php $has_monthly = $first_pricing->has_monthly() ?>
|
580 |
<div class="nav-tab-wrapper">
|
@@ -599,9 +609,22 @@
|
|
599 |
<a class="nav-tab" data-billing-cycle="<?php echo $cycle ?>"
|
600 |
data-pricing="<?php echo esc_attr( json_encode( $prices ) ) ?>">
|
601 |
<?php if ( $is_featured ) : ?>
|
602 |
-
<label>★ <?php
|
603 |
<?php endif ?>
|
604 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
605 |
</a>
|
606 |
<?php endif ?>
|
607 |
<?php $i ++; endforeach ?>
|
@@ -612,21 +635,21 @@
|
|
612 |
_formatBillingFrequency = function (cycle) {
|
613 |
switch (cycle) {
|
614 |
case 'monthly':
|
615 |
-
return '<?php printf(
|
616 |
case 'annual':
|
617 |
-
return '<?php printf(
|
618 |
case 'lifetime':
|
619 |
-
return '<?php printf(
|
620 |
}
|
621 |
},
|
622 |
_formatLicensesTitle = function (pricing) {
|
623 |
switch (pricing.licenses) {
|
624 |
case 1:
|
625 |
-
return '<?php
|
626 |
case null:
|
627 |
-
return '<?php
|
628 |
default:
|
629 |
-
return '<?php
|
630 |
}
|
631 |
},
|
632 |
_formatPrice = function (pricing, cycle, multipleLicenses) {
|
@@ -636,14 +659,14 @@
|
|
636 |
var priceCycle;
|
637 |
switch (cycle) {
|
638 |
case 'monthly':
|
639 |
-
priceCycle = ' / <?php
|
640 |
break;
|
641 |
case 'lifetime':
|
642 |
priceCycle = '';
|
643 |
break;
|
644 |
case 'annual':
|
645 |
default:
|
646 |
-
priceCycle = ' / <?php
|
647 |
break;
|
648 |
}
|
649 |
|
@@ -695,7 +718,7 @@
|
|
695 |
|
696 |
// Render licenses prices.
|
697 |
if (1 == pricing.length) {
|
698 |
-
html = '<li><label><?php
|
699 |
} else {
|
700 |
for (var i = 0; i < pricing.length; i++) {
|
701 |
html += '<li><label><input name="pricing-<?php echo $plan->id ?>" type="radio" value="' + pricing[i].id + '">' + _formatPrice(pricing[i], billingCycle) + '</label></li>';
|
@@ -726,7 +749,7 @@
|
|
726 |
});
|
727 |
|
728 |
<?php if ( $has_annual ) : ?>
|
729 |
-
// Select annual by
|
730 |
$plan.find('.nav-tab[data-billing-cycle=annual]').click();
|
731 |
<?php else : ?>
|
732 |
// Select first tab.
|
@@ -741,7 +764,7 @@
|
|
741 |
<?php $annual_discount = ( $has_annual && $has_monthly ) ? $plan->pricing[0]->annual_discount_percentage() : 0 ?>
|
742 |
<?php if ( $annual_discount > 0 ) : ?>
|
743 |
<span
|
744 |
-
class="fs-annual-discount"><?php printf(
|
745 |
<?php endif ?>
|
746 |
<ul class="fs-licenses">
|
747 |
</ul>
|
@@ -751,10 +774,10 @@
|
|
751 |
<?php $trial_period = $this->get_trial_period( $plan ) ?>
|
752 |
<ul class="fs-trial-terms">
|
753 |
<li>
|
754 |
-
<i class="dashicons dashicons-yes"></i><?php
|
755 |
</li>
|
756 |
<li>
|
757 |
-
<i class="dashicons dashicons-yes"></i><?php printf(
|
758 |
</li>
|
759 |
</ul>
|
760 |
<?php endif ?>
|
@@ -765,85 +788,99 @@
|
|
765 |
<?php endif ?>
|
766 |
<?php endif ?>
|
767 |
<div>
|
768 |
-
<h3><?php
|
769 |
<ul>
|
770 |
<?php if ( ! empty( $api->version ) ) { ?>
|
771 |
-
<li><strong><?php
|
772 |
<?php
|
773 |
}
|
774 |
if ( ! empty( $api->author ) ) {
|
775 |
?>
|
776 |
<li>
|
777 |
-
<strong><?php
|
778 |
</li>
|
779 |
<?php
|
780 |
}
|
781 |
if ( ! empty( $api->last_updated ) ) {
|
782 |
?>
|
783 |
-
<li><strong><?php
|
784 |
title="<?php echo $api->last_updated; ?>">
|
785 |
-
<?php
|
|
|
|
|
|
|
|
|
786 |
</span></li>
|
787 |
<?php
|
788 |
}
|
789 |
if ( ! empty( $api->requires ) ) {
|
790 |
?>
|
791 |
<li>
|
792 |
-
<strong><?php
|
793 |
</li>
|
794 |
<?php
|
795 |
}
|
796 |
if ( ! empty( $api->tested ) ) {
|
797 |
?>
|
798 |
-
<li><strong><?php
|
799 |
</li>
|
800 |
<?php
|
801 |
}
|
802 |
if ( ! empty( $api->downloaded ) ) {
|
803 |
?>
|
804 |
<li>
|
805 |
-
<strong><?php
|
806 |
-
|
|
|
|
|
|
|
|
|
|
|
807 |
number_format_i18n( $api->downloaded )
|
808 |
-
); ?>
|
809 |
</li>
|
810 |
<?php
|
811 |
}
|
812 |
if ( ! empty( $api->slug ) && empty( $api->external ) ) {
|
813 |
?>
|
814 |
<li><a target="_blank"
|
815 |
-
href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php
|
816 |
</li>
|
817 |
<?php
|
818 |
}
|
819 |
if ( ! empty( $api->homepage ) ) {
|
820 |
?>
|
821 |
<li><a target="_blank"
|
822 |
-
href="<?php echo esc_url( $api->homepage ); ?>"><?php
|
823 |
</li>
|
824 |
<?php
|
825 |
}
|
826 |
if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
|
827 |
?>
|
828 |
<li><a target="_blank"
|
829 |
-
href="<?php echo esc_url( $api->donate_link ); ?>"><?php
|
830 |
</li>
|
831 |
<?php } ?>
|
832 |
</ul>
|
833 |
</div>
|
834 |
<?php if ( ! empty( $api->rating ) ) { ?>
|
835 |
-
<h3><?php
|
836 |
<?php wp_star_rating( array(
|
837 |
'rating' => $api->rating,
|
838 |
'type' => 'percent',
|
839 |
'number' => $api->num_ratings
|
840 |
) ); ?>
|
841 |
-
<small>(<?php
|
842 |
-
|
843 |
sprintf(
|
844 |
-
|
|
|
|
|
|
|
|
|
|
|
845 |
number_format_i18n( $api->num_ratings )
|
846 |
-
) )
|
847 |
<?php
|
848 |
}
|
849 |
|
@@ -852,7 +889,12 @@
|
|
852 |
// Avoid div-by-zero.
|
853 |
$_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
|
854 |
$stars_label = sprintf(
|
855 |
-
|
|
|
|
|
|
|
|
|
|
|
856 |
number_format_i18n( $key )
|
857 |
);
|
858 |
?>
|
@@ -860,7 +902,11 @@
|
|
860 |
<span class="counter-label"><a
|
861 |
href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
|
862 |
target="_blank"
|
863 |
-
title="<?php echo esc_attr( sprintf(
|
|
|
|
|
|
|
|
|
864 |
<span class="counter-back">
|
865 |
<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
|
866 |
</span>
|
@@ -871,7 +917,7 @@
|
|
871 |
}
|
872 |
if ( ! empty( $api->contributors ) ) {
|
873 |
?>
|
874 |
-
<h3><?php
|
875 |
<ul class="contributors">
|
876 |
<?php
|
877 |
foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) {
|
@@ -892,16 +938,16 @@
|
|
892 |
</ul>
|
893 |
<?php if ( ! empty( $api->donate_link ) ) { ?>
|
894 |
<a target="_blank"
|
895 |
-
href="<?php echo esc_url( $api->donate_link ); ?>"><?php
|
896 |
<?php } ?>
|
897 |
<?php } ?>
|
898 |
</div>
|
899 |
<div id="section-holder" class="wrap">
|
900 |
<?php
|
901 |
if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
902 |
-
echo '<div class="notice notice-warning"><p>' . '<strong>' .
|
903 |
} else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
904 |
-
echo '<div class="notice notice-warning"><p>' . '<strong>' .
|
905 |
}
|
906 |
|
907 |
foreach ( (array) $api->sections as $section_name => $content ) {
|
@@ -919,9 +965,11 @@
|
|
919 |
$missing_notice = array(
|
920 |
'type' => 'error',
|
921 |
'id' => md5( microtime() ),
|
922 |
-
'message' =>
|
|
|
|
|
923 |
);
|
924 |
-
fs_require_template( '
|
925 |
}
|
926 |
echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
|
927 |
echo $content;
|
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 |
|
36 |
|
37 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $fs->get_slug() . '_info', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
38 |
|
39 |
+
// Remove default plugin information action.
|
40 |
remove_all_actions( 'install_plugins_pre_plugin-information' );
|
41 |
|
42 |
// Override action with custom plugins function for add-ons.
|
81 |
}
|
82 |
|
83 |
if ( ! isset( $selected_addon->info ) ) {
|
84 |
+
// Setup some default info.
|
85 |
$selected_addon->info = new stdClass();
|
86 |
$selected_addon->info->selling_point_0 = 'Selling Point 1';
|
87 |
$selected_addon->info->selling_point_1 = 'Selling Point 2';
|
99 |
$has_pricing = false;
|
100 |
$has_features = false;
|
101 |
$plans = false;
|
102 |
+
|
103 |
+
$result = $this->_fs->get_api_plugin_scope()->get( "/addons/{$selected_addon->id}/pricing.json?type=visible" );
|
104 |
+
|
105 |
+
if ( ! isset( $result->error ) ) {
|
106 |
+
$plans = $result->plans;
|
107 |
+
|
108 |
if ( is_array( $plans ) ) {
|
109 |
for ( $i = 0, $len = count( $plans ); $i < $len; $i ++ ) {
|
110 |
+
$pricing = isset( $plans[ $i ]->pricing ) ? $plans[ $i ]->pricing : null;
|
111 |
+
$features = isset( $plans[ $i ]->features ) ? $plans[ $i ]->features : null;
|
112 |
+
|
113 |
$plans[ $i ] = new FS_Plugin_Plan( $plans[ $i ] );
|
114 |
$plan = $plans[ $i ];
|
115 |
|
116 |
+
if ( is_array( $pricing ) && 0 < count( $pricing ) ) {
|
117 |
+
$is_free = false;
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
+
foreach ( $pricing as &$prices ) {
|
120 |
+
$prices = new FS_Pricing( $prices );
|
|
|
121 |
}
|
122 |
|
123 |
+
$plan->pricing = $pricing;
|
124 |
+
|
125 |
$has_pricing = true;
|
126 |
}
|
127 |
|
128 |
+
if ( is_array( $features ) && 0 < count( $features ) ) {
|
129 |
+
$plan->features = $features;
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
$has_features = true;
|
132 |
}
|
310 |
|
311 |
if ( ! empty( $api->checkout_link ) && isset( $api->plans ) && 0 < is_array( $api->plans ) ) {
|
312 |
if ( is_null( $plan ) ) {
|
313 |
+
foreach ($api->plans as $p) {
|
314 |
+
if (!empty($p->pricing)) {
|
315 |
+
$plan = $p;
|
316 |
+
break;
|
317 |
+
}
|
318 |
+
}
|
319 |
}
|
320 |
|
321 |
return ' <a class="button button-primary right" href="' . $this->_fs->addon_checkout_url(
|
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 |
|
571 |
<div class="plugin-information-pricing">
|
572 |
<?php foreach ( $api->plans as $plan ) : ?>
|
573 |
<?php
|
574 |
+
if ( empty( $plan->pricing ) ) {
|
575 |
+
continue;
|
576 |
+
}
|
577 |
+
|
578 |
/**
|
579 |
* @var FS_Plugin_Plan $plan
|
580 |
*/
|
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>';
|
749 |
});
|
750 |
|
751 |
<?php if ( $has_annual ) : ?>
|
752 |
+
// Select annual by default.
|
753 |
$plan.find('.nav-tab[data-billing-cycle=annual]').click();
|
754 |
<?php else : ?>
|
755 |
// Select first tab.
|
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 |
}
|
974 |
echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
|
975 |
echo $content;
|
freemius/includes/i18n.php
CHANGED
@@ -2,8 +2,10 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.1.4
|
|
|
|
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -29,19 +31,19 @@
|
|
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 |
|
36 |
$fs_text = array(
|
37 |
'account' => _fs_text( 'Account' ),
|
38 |
-
'addon' => _fs_text( 'Add
|
39 |
'contact-us' => _fs_text( 'Contact Us' ),
|
40 |
'contact-support' => _fs_text( 'Contact Support' ),
|
41 |
'change-ownership' => _fs_text( 'Change Ownership' ),
|
42 |
'support' => _fs_text( 'Support' ),
|
43 |
'support-forum' => _fs_text( 'Support Forum' ),
|
44 |
-
'add-ons' => _fs_text( 'Add
|
45 |
'upgrade' => _fs_x( 'Upgrade', 'verb' ),
|
46 |
'awesome' => _fs_text( 'Awesome' ),
|
47 |
'pricing' => _fs_x( 'Pricing', 'noun' ),
|
@@ -91,12 +93,58 @@
|
|
91 |
'you-are-step-away' => _fs_text( 'You are just one step away - %s' ),
|
92 |
'activate-x-now' => _fs_x( 'Complete "%s" Activation Now',
|
93 |
'%s - plugin name. As complete "Jetpack" activation now' ),
|
94 |
-
'few-plugin-tweaks' => _fs_text( 'We made a few tweaks to the
|
95 |
-
'optin-x-now' => _fs_text( 'Opt
|
96 |
'error' => _fs_text( 'Error' ),
|
97 |
'failed-finding-main-path' => _fs_text( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.' ),
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
|
|
100 |
'expiration' => _fs_x( 'Expiration', 'as expiration date' ),
|
101 |
'license' => _fs_x( 'License', 'as software license' ),
|
102 |
'not-verified' => _fs_text( 'not verified' ),
|
@@ -128,7 +176,6 @@
|
|
128 |
'slug' => _fs_x( 'Slug', 'as WP plugin slug' ),
|
129 |
'id' => _fs_text( 'ID' ),
|
130 |
'users' => _fs_text( 'Users' ),
|
131 |
-
'plugin-installs' => _fs_text( 'Plugin Installs' ),
|
132 |
'module-installs' => _fs_text( '%s Installs' ),
|
133 |
'sites' => _fs_x( 'Sites', 'like websites' ),
|
134 |
'user-id' => _fs_text( 'User ID' ),
|
@@ -165,10 +212,10 @@
|
|
165 |
'activate-this-addon' => _fs_text( 'Activate this add-on' ),
|
166 |
'deactivate-license-confirm' => _fs_text( '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?' ),
|
167 |
'delete-account-x-confirm' => _fs_text( '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?' ),
|
168 |
-
'delete-account-confirm' => _fs_text( 'Deletion is not temporary. Only delete if you no longer want to use this
|
169 |
'downgrade-x-confirm' => _fs_text( 'Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s.' ),
|
170 |
'cancel-trial-confirm' => _fs_text( 'Cancelling the trial will immediately block access to all premium features. Are you sure?' ),
|
171 |
-
'after-downgrade-non-blocking' => _fs_text( 'You can still enjoy all %s features but you will not have access to
|
172 |
'after-downgrade-blocking' => _fs_text( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.' ),
|
173 |
'proceed-confirmation' => _fs_text( 'Are you sure you want to proceed?' ),
|
174 |
#endregion Account
|
@@ -178,32 +225,39 @@
|
|
178 |
#region Plugin Deactivation
|
179 |
'anonymous-feedback' => _fs_text( 'Anonymous feedback' ),
|
180 |
'quick-feedback' => _fs_text( 'Quick feedback' ),
|
181 |
-
'deactivation-share-reason' => _fs_text( 'If you have a moment, please let us know why you are
|
182 |
-
'
|
183 |
-
'deactivation
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
'cancel' => _fs_text( 'Cancel' ),
|
185 |
-
'reason-no-longer-needed' => _fs_text( 'I no longer need the
|
186 |
-
'reason-found-a-better-plugin' => _fs_text( 'I found a better
|
187 |
-
'reason-needed-for-a-short-period' => _fs_text( 'I only needed the
|
188 |
-
'reason-broke-my-site' => _fs_text( 'The
|
189 |
-
'reason-suddenly-stopped-working' => _fs_text( 'The
|
190 |
'reason-cant-pay-anymore' => _fs_text( "I can't pay for it anymore" ),
|
191 |
'reason-temporary-deactivation' => _fs_text( "It's a temporary deactivation. I'm just debugging an issue." ),
|
|
|
192 |
'reason-other' => _fs_x( 'Other',
|
193 |
-
'the text of the "other" reason for deactivating the
|
194 |
'ask-for-reason-message' => _fs_text( 'Kindly tell us the reason so we can improve.' ),
|
195 |
-
'placeholder-plugin-name' => _fs_text( "What's the
|
196 |
'placeholder-comfortable-price' => _fs_text( 'What price would you feel comfortable paying?' ),
|
197 |
'reason-couldnt-make-it-work' => _fs_text( "I couldn't understand how to make it work" ),
|
198 |
-
'reason-great-but-need-specific-feature' => _fs_text( "The
|
199 |
-
'reason-not-working' => _fs_text( 'The
|
200 |
'reason-not-what-i-was-looking-for' => _fs_text( "It's not what I was looking for" ),
|
201 |
-
'reason-didnt-work-as-expected' => _fs_text( "The
|
202 |
'placeholder-feature' => _fs_text( 'What feature?' ),
|
203 |
'placeholder-share-what-didnt-work' => _fs_text( "Kindly share what didn't work so we can fix it for future users..." ),
|
204 |
'placeholder-what-youve-been-looking-for' => _fs_text( "What you've been looking for?" ),
|
205 |
'placeholder-what-did-you-expect' => _fs_text( "What did you expect?" ),
|
206 |
-
'reason-didnt-work' => _fs_text( "The
|
207 |
'reason-dont-like-to-share-my-information' => _fs_text( "I don't like to share my information with you" ),
|
208 |
'dont-have-to-share-any-data' => _fs_text( "You might have missed it, but you don't have to share any data and can just %s the opt-in." ),
|
209 |
#endregion Plugin Deactivation
|
@@ -211,23 +265,23 @@
|
|
211 |
#region Connect
|
212 |
'hey-x' => _fs_x( 'Hey %s,', 'greeting' ),
|
213 |
'thanks-x' => _fs_x( 'Thanks %s!', 'a greeting. E.g. Thanks John!' ),
|
214 |
-
'connect-message' => _fs_text( 'Never miss an important update - opt
|
215 |
-
'connect-message_on-update' => _fs_text( 'Please help us improve %1$s! If you opt
|
216 |
'pending-activation-message' => _fs_text( '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.' ),
|
217 |
'complete-the-install' => _fs_text( 'complete the install' ),
|
218 |
'start-the-trial' => _fs_text( 'start the trial' ),
|
219 |
'thanks-for-purchasing' => _fs_text( 'Thanks for purchasing %s! To get started, please enter your license key:' ),
|
220 |
-
'license-sync-disclaimer' => _fs_text( 'The
|
221 |
'what-permissions' => _fs_text( 'What permissions are being granted?' ),
|
222 |
'permissions-profile' => _fs_text( 'Your Profile Overview' ),
|
223 |
'permissions-profile_desc' => _fs_text( 'Name and email address' ),
|
224 |
'permissions-site' => _fs_text( 'Your Site Overview' ),
|
225 |
'permissions-site_desc' => _fs_text( 'Site URL, WP version, PHP info, plugins & themes' ),
|
226 |
-
'permissions-events' => _fs_text( 'Current
|
227 |
'permissions-events_desc' => _fs_text( 'Activation, deactivation and uninstall' ),
|
228 |
'permissions-plugins_themes' => _fs_text( 'Plugins & Themes' ),
|
229 |
'permissions-plugins_themes_desc' => _fs_text( 'Titles, versions and state.' ),
|
230 |
-
'permissions-
|
231 |
'permissions-newsletter' => _fs_text( 'Newsletter' ),
|
232 |
'permissions-newsletter_desc' => _fs_text( 'Updates, announcements, marketing, no spam' ),
|
233 |
'privacy-policy' => _fs_text( 'Privacy Policy' ),
|
@@ -285,7 +339,7 @@
|
|
285 |
'scheduled-crons' => _fs_text( 'Scheduled Crons' ),
|
286 |
'cron-type' => _fs_text( 'Cron Type' ),
|
287 |
'plugins-themes-sync' => _fs_text( 'Plugins & Themes Sync' ),
|
288 |
-
'licenses'
|
289 |
'debug-log' => _fs_text( 'Debug Log' ),
|
290 |
'all' => _fs_text( 'All' ),
|
291 |
'file' => _fs_text( 'File' ),
|
@@ -319,7 +373,7 @@
|
|
319 |
'you-have-latest' => _fs_text( 'Seems like you got the latest release.' ),
|
320 |
'you-are-good' => _fs_text( 'You are all good!' ),
|
321 |
'user-exist-message' => _fs_text( 'Sorry, we could not complete the email update. Another user with the same email is already registered.' ),
|
322 |
-
'user-exist-message_ownership' => _fs_text( 'If you would like to give up the ownership of the
|
323 |
'email-updated-message' => _fs_text( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.' ),
|
324 |
'name-updated-message' => _fs_text( 'Your name was successfully updated.' ),
|
325 |
'x-updated' => _fs_text( 'You have successfully updated your %s.' ),
|
@@ -327,7 +381,7 @@
|
|
327 |
'verification-email-sent-message' => _fs_text( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.' ),
|
328 |
'addons-info-external-message' => _fs_text( 'Just letting you know that the add-ons information of %s is being pulled from an external server.' ),
|
329 |
'no-cc-required' => _fs_text( 'No credit card required' ),
|
330 |
-
'premium-activated-message' => _fs_text( 'Premium
|
331 |
'successful-version-upgrade-message' => _fs_text( 'The upgrade of %s was successfully completed.' ),
|
332 |
'activation-with-plan-x-message' => _fs_text( 'Your account was successfully activated with the %s plan.' ),
|
333 |
'download-latest-x-version-now' => _fs_text( 'Download the latest %s version now' ),
|
@@ -343,7 +397,7 @@
|
|
343 |
'email-verified-message' => _fs_text( 'Your email has been successfully verified - you are AWESOME!' ),
|
344 |
'plan-upgraded-message' => _fs_text( 'Your plan was successfully upgraded.' ),
|
345 |
'plan-changed-to-x-message' => _fs_text( 'Your plan was successfully changed to %s.' ),
|
346 |
-
'license-expired-blocking-message' => _fs_text( 'Your license has expired. You can still continue using the free
|
347 |
'license-cancelled' => _fs_text( 'Your license has been cancelled. If you think it\'s a mistake, please contact support.' ),
|
348 |
'trial-started-message' => _fs_text( 'Your trial has been successfully started.' ),
|
349 |
'license-activated-message' => _fs_text( 'Your license was successfully activated.' ),
|
@@ -367,11 +421,11 @@
|
|
367 |
'please-wait' => _fs_text( 'Please wait' ),
|
368 |
'trial-cancel-failure-message' => _fs_text( 'Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes.' ),
|
369 |
'trial-utilized' => _fs_text( 'You already utilized a trial before.' ),
|
370 |
-
'in-trial-mode' => _fs_text( 'You are already running the
|
371 |
'trial-plan-x-not-exist' => _fs_text( 'Plan %s do not exist, therefore, can\'t start a trial.' ),
|
372 |
'plan-x-no-trial' => _fs_text( 'Plan %s does not support a trial period.' ),
|
373 |
-
'no-trials' => _fs_text( 'None of the
|
374 |
-
'unexpected-api-error' => _fs_text( 'Unexpected API error. Please contact the
|
375 |
'no-commitment-for-x-days' => _fs_text( 'No commitment for %s days - cancel anytime!' ),
|
376 |
'license-expired-non-blocking-message' => _fs_text( '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.' ),
|
377 |
'could-not-activate-x' => _fs_text( 'Couldn\'t activate %s.' ),
|
@@ -385,17 +439,17 @@
|
|
385 |
'connectivity-test-maybe-temporary' => _fs_text( '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?' ),
|
386 |
'curl-missing-message' => _fs_text( '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.' ),
|
387 |
'curl-disabled-methods' => _fs_text( 'Disabled method(s):' ),
|
388 |
-
|
389 |
'x-requires-access-to-api' => _fs_x( '%s requires an access to our API.',
|
390 |
'as pluginX requires an access to our API' ),
|
391 |
'squid-blocks-connection-message' => _fs_text( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.' ),
|
392 |
'squid-no-clue-title' => _fs_text( 'I don\'t know what is Squid or ACL, help me!' ),
|
393 |
'squid-no-clue-desc' => _fs_text( '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.' ),
|
394 |
'sysadmin-title' => _fs_text( 'I\'m a system administrator' ),
|
395 |
-
'squid-sysadmin-desc' => _fs_text( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the
|
396 |
'curl-missing-no-clue-title' => _fs_text( 'I don\'t know what is cURL or how to install it, help me!' ),
|
397 |
'curl-missing-no-clue-desc' => _fs_text( '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.' ),
|
398 |
-
'curl-missing-sysadmin-desc' => _fs_text( '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
|
399 |
'happy-to-resolve-issue-asap' => _fs_text( '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.' ),
|
400 |
'contact-support-before-deactivation' => _fs_text( 'Sorry for the inconvenience and we are here to help if you give us a chance.' ),
|
401 |
'fix-issue-title' => _fs_text( 'Yes - I\'m giving you a chance to fix it' ),
|
@@ -450,7 +504,7 @@
|
|
450 |
/* translators: %1$s: Number of trial days; %2$s: Plan name; */
|
451 |
'start-trial-prompt-header' => _fs_text( 'You are 1-click away from starting your %1$s-day free trial of the %2$s plan.' ),
|
452 |
/* translators: %s: Link to freemius.com */
|
453 |
-
'start-trial-prompt-message' => _fs_text( 'For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt
|
454 |
|
455 |
#endregion
|
456 |
#--------------------------------------------------------------------------------
|
@@ -484,7 +538,12 @@
|
|
484 |
'auto-install-error-premium-addon-activated' => _fs_text( 'Premium add-on version already installed.' ),
|
485 |
'auto-install-error-invalid-license' => _fs_text( 'You do not have a valid license to access the premium version.' ),
|
486 |
'auto-install-error-serviceware' => _fs_text( 'Plugin is a "Serviceware" which means it does not have a premium code version.' ),
|
487 |
-
|
|
|
|
|
|
|
|
|
|
|
488 |
);
|
489 |
|
490 |
/**
|
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.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 |
|
38 |
$fs_text = array(
|
39 |
'account' => _fs_text( 'Account' ),
|
40 |
+
'addon' => _fs_text( 'Add-On' ),
|
41 |
'contact-us' => _fs_text( 'Contact Us' ),
|
42 |
'contact-support' => _fs_text( 'Contact Support' ),
|
43 |
'change-ownership' => _fs_text( 'Change Ownership' ),
|
44 |
'support' => _fs_text( 'Support' ),
|
45 |
'support-forum' => _fs_text( 'Support Forum' ),
|
46 |
+
'add-ons' => _fs_text( 'Add-Ons' ),
|
47 |
'upgrade' => _fs_x( 'Upgrade', 'verb' ),
|
48 |
'awesome' => _fs_text( 'Awesome' ),
|
49 |
'pricing' => _fs_x( 'Pricing', 'noun' ),
|
93 |
'you-are-step-away' => _fs_text( 'You are just one step away - %s' ),
|
94 |
'activate-x-now' => _fs_x( 'Complete "%s" Activation Now',
|
95 |
'%s - plugin name. As complete "Jetpack" activation now' ),
|
96 |
+
'few-plugin-tweaks' => _fs_text( 'We made a few tweaks to the %s, %s' ),
|
97 |
+
'optin-x-now' => _fs_text( 'Opt in to make "%s" Better!' ),
|
98 |
'error' => _fs_text( 'Error' ),
|
99 |
'failed-finding-main-path' => _fs_text( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.' ),
|
100 |
+
'learn-more' => _fs_text( 'Learn more' ),
|
101 |
+
|
102 |
+
#region Affiliation
|
103 |
+
'affiliation' => _fs_text( 'Affiliation' ),
|
104 |
+
'affiliate' => _fs_text( 'Affiliate' ),
|
105 |
+
'affiliate-tracking' => _fs_text( '%s tracking cookie after the first visit to maximize earnings potential.' ),
|
106 |
+
'renewals-commission' => _fs_text( 'Get commission for automated subscription renewals.' ),
|
107 |
+
'affiliate-application-accepted' => _fs_text( "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s." ),
|
108 |
+
'affiliate-application-thank-you' => _fs_text( "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." ),
|
109 |
+
'affiliate-application-rejected' => _fs_text( "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." ),
|
110 |
+
'affiliate-account-suspended' => _fs_text( 'Your affiliation account was temporarily suspended.' ),
|
111 |
+
'affiliate-account-blocked' => _fs_text( 'Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support.' ),
|
112 |
+
'become-an-ambassador' => _fs_text( 'Like the %s? Become our ambassador and earn cash ;-)' ),
|
113 |
+
'become-an-ambassador-admin-notice' => _fs_text( '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!' ),
|
114 |
+
'refer-new-customers' => _fs_text( 'Refer new customers to our %s and earn %s commission on each successful sale you refer!' ),
|
115 |
+
'program-summary' => _fs_text( 'Program Summary' ),
|
116 |
+
'commission-on-new-license-purchase' => _fs_text( '%s commission when a customer purchases a new license.' ),
|
117 |
+
'unlimited-commissions' => _fs_text( 'Unlimited commissions.' ),
|
118 |
+
'minimum-payout-amount' => _fs_text( '%s minimum payout amount.' ),
|
119 |
+
'payouts-unit-and-processing' => _fs_text( 'Payouts are in USD and processed monthly via PayPal.' ),
|
120 |
+
'commission-payment' => _fs_text( 'As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days.' ),
|
121 |
+
'become-an-affiliate' => _fs_text( 'Become an affiliate' ),
|
122 |
+
'apply-to-become-an-affiliate' => _fs_text( 'Apply to become an affiliate' ),
|
123 |
+
'full-name' => _fs_text( 'Full name' ),
|
124 |
+
'paypal-account-email-address' => _fs_text( 'PayPal account email address' ),
|
125 |
+
'promotion-methods' => _fs_text( 'Promotion methods' ),
|
126 |
+
'social-media' => _fs_text( 'Social media (Facebook, Twitter, etc.)' ),
|
127 |
+
'mobile-apps' => _fs_text( 'Mobile apps' ),
|
128 |
+
'statistics-information-field-label' => _fs_text( 'Website, email, and social media statistics (optional)' ),
|
129 |
+
'statistics-information-field-desc' => _fs_text( '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).' ),
|
130 |
+
'promotion-method-desc-field-label' => _fs_text( 'How will you promote us?' ),
|
131 |
+
'promotion-method-desc-field-desc' => _fs_text( 'Please provide details on how you intend to promote %s (please be as specific as possible).' ),
|
132 |
+
'domain-field-label' => _fs_text( 'Where are you going to promote the %s?' ),
|
133 |
+
'domain-field-desc' => _fs_text( 'Enter the domain of your website or other websites from where you plan to promote the %s.' ),
|
134 |
+
'extra-domain-fields-label' => _fs_text( 'Extra Domains' ),
|
135 |
+
'extra-domain-fields-desc' => _fs_text( 'Extra domains where you will be marketing the product from.' ),
|
136 |
+
'add-another-domain' => _fs_text( 'Add another domain' ),
|
137 |
+
'remove' => _fs_x( 'Remove', 'Remove domain' ),
|
138 |
+
'email-address-is-required' => _fs_text( 'Email address is required.' ),
|
139 |
+
'domain-is-required' => _fs_text( 'Domain is required.' ),
|
140 |
+
'invalid-domain' => _fs_text( 'Invalid domain' ),
|
141 |
+
'paypal-email-address-is-required' => _fs_text( 'PayPal email address is required.' ),
|
142 |
+
'processing' => _fs_text( 'Processing...' ),
|
143 |
+
'non-expiring' => _fs_text( 'Non-expiring' ),
|
144 |
+
'account-is-pending-activation' => _fs_text( 'Account is pending activation.' ),
|
145 |
+
#endregion Affiliation
|
146 |
|
147 |
+
#region Account
|
148 |
'expiration' => _fs_x( 'Expiration', 'as expiration date' ),
|
149 |
'license' => _fs_x( 'License', 'as software license' ),
|
150 |
'not-verified' => _fs_text( 'not verified' ),
|
176 |
'slug' => _fs_x( 'Slug', 'as WP plugin slug' ),
|
177 |
'id' => _fs_text( 'ID' ),
|
178 |
'users' => _fs_text( 'Users' ),
|
|
|
179 |
'module-installs' => _fs_text( '%s Installs' ),
|
180 |
'sites' => _fs_x( 'Sites', 'like websites' ),
|
181 |
'user-id' => _fs_text( 'User ID' ),
|
212 |
'activate-this-addon' => _fs_text( 'Activate this add-on' ),
|
213 |
'deactivate-license-confirm' => _fs_text( '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?' ),
|
214 |
'delete-account-x-confirm' => _fs_text( '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?' ),
|
215 |
+
'delete-account-confirm' => _fs_text( '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?' ),
|
216 |
'downgrade-x-confirm' => _fs_text( 'Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s.' ),
|
217 |
'cancel-trial-confirm' => _fs_text( 'Cancelling the trial will immediately block access to all premium features. Are you sure?' ),
|
218 |
+
'after-downgrade-non-blocking' => _fs_text( 'You can still enjoy all %s features but you will not have access to %s updates and support.' ),
|
219 |
'after-downgrade-blocking' => _fs_text( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.' ),
|
220 |
'proceed-confirmation' => _fs_text( 'Are you sure you want to proceed?' ),
|
221 |
#endregion Account
|
225 |
#region Plugin Deactivation
|
226 |
'anonymous-feedback' => _fs_text( 'Anonymous feedback' ),
|
227 |
'quick-feedback' => _fs_text( 'Quick feedback' ),
|
228 |
+
'deactivation-share-reason' => _fs_text( 'If you have a moment, please let us know why you are %s' ),
|
229 |
+
'deactivating' => _fs_text( 'deactivating' ),
|
230 |
+
'deactivation' => _fs_text( 'Deactivation' ),
|
231 |
+
'theme-switch' => _fs_text( 'Theme Switch' ),
|
232 |
+
'switching' => _fs_text( 'switching' ),
|
233 |
+
'switch' => _fs_text( 'Switch' ),
|
234 |
+
'activate-x' => _fs_text( 'Activate %s' ),
|
235 |
+
'deactivation-modal-button-confirm' => _fs_text( 'Yes - %s' ),
|
236 |
+
'deactivation-modal-button-submit' => _fs_text( 'Submit & %s' ),
|
237 |
'cancel' => _fs_text( 'Cancel' ),
|
238 |
+
'reason-no-longer-needed' => _fs_text( 'I no longer need the %s' ),
|
239 |
+
'reason-found-a-better-plugin' => _fs_text( 'I found a better %s' ),
|
240 |
+
'reason-needed-for-a-short-period' => _fs_text( 'I only needed the %s for a short period' ),
|
241 |
+
'reason-broke-my-site' => _fs_text( 'The %s broke my site' ),
|
242 |
+
'reason-suddenly-stopped-working' => _fs_text( 'The %s suddenly stopped working' ),
|
243 |
'reason-cant-pay-anymore' => _fs_text( "I can't pay for it anymore" ),
|
244 |
'reason-temporary-deactivation' => _fs_text( "It's a temporary deactivation. I'm just debugging an issue." ),
|
245 |
+
'reason-temporary-x' => _fs_text( "It's a temporary %s. I'm just debugging an issue." ),
|
246 |
'reason-other' => _fs_x( 'Other',
|
247 |
+
'the text of the "other" reason for deactivating the module that is shown in the modal box.' ),
|
248 |
'ask-for-reason-message' => _fs_text( 'Kindly tell us the reason so we can improve.' ),
|
249 |
+
'placeholder-plugin-name' => _fs_text( "What's the %s's name?" ),
|
250 |
'placeholder-comfortable-price' => _fs_text( 'What price would you feel comfortable paying?' ),
|
251 |
'reason-couldnt-make-it-work' => _fs_text( "I couldn't understand how to make it work" ),
|
252 |
+
'reason-great-but-need-specific-feature' => _fs_text( "The %s is great, but I need specific feature that you don't support" ),
|
253 |
+
'reason-not-working' => _fs_text( 'The %s is not working' ),
|
254 |
'reason-not-what-i-was-looking-for' => _fs_text( "It's not what I was looking for" ),
|
255 |
+
'reason-didnt-work-as-expected' => _fs_text( "The %s didn't work as expected" ),
|
256 |
'placeholder-feature' => _fs_text( 'What feature?' ),
|
257 |
'placeholder-share-what-didnt-work' => _fs_text( "Kindly share what didn't work so we can fix it for future users..." ),
|
258 |
'placeholder-what-youve-been-looking-for' => _fs_text( "What you've been looking for?" ),
|
259 |
'placeholder-what-did-you-expect' => _fs_text( "What did you expect?" ),
|
260 |
+
'reason-didnt-work' => _fs_text( "The %s didn't work" ),
|
261 |
'reason-dont-like-to-share-my-information' => _fs_text( "I don't like to share my information with you" ),
|
262 |
'dont-have-to-share-any-data' => _fs_text( "You might have missed it, but you don't have to share any data and can just %s the opt-in." ),
|
263 |
#endregion Plugin Deactivation
|
265 |
#region Connect
|
266 |
'hey-x' => _fs_x( 'Hey %s,', 'greeting' ),
|
267 |
'thanks-x' => _fs_x( 'Thanks %s!', 'a greeting. E.g. Thanks John!' ),
|
268 |
+
'connect-message' => _fs_text( 'Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s.' ),
|
269 |
+
'connect-message_on-update' => _fs_text( '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.' ),
|
270 |
'pending-activation-message' => _fs_text( '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.' ),
|
271 |
'complete-the-install' => _fs_text( 'complete the install' ),
|
272 |
'start-the-trial' => _fs_text( 'start the trial' ),
|
273 |
'thanks-for-purchasing' => _fs_text( 'Thanks for purchasing %s! To get started, please enter your license key:' ),
|
274 |
+
'license-sync-disclaimer' => _fs_text( '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.' ),
|
275 |
'what-permissions' => _fs_text( 'What permissions are being granted?' ),
|
276 |
'permissions-profile' => _fs_text( 'Your Profile Overview' ),
|
277 |
'permissions-profile_desc' => _fs_text( 'Name and email address' ),
|
278 |
'permissions-site' => _fs_text( 'Your Site Overview' ),
|
279 |
'permissions-site_desc' => _fs_text( 'Site URL, WP version, PHP info, plugins & themes' ),
|
280 |
+
'permissions-events' => _fs_text( 'Current %s Events' ),
|
281 |
'permissions-events_desc' => _fs_text( 'Activation, deactivation and uninstall' ),
|
282 |
'permissions-plugins_themes' => _fs_text( 'Plugins & Themes' ),
|
283 |
'permissions-plugins_themes_desc' => _fs_text( 'Titles, versions and state.' ),
|
284 |
+
'permissions-admin-notices' => _fs_text( 'Admin Notices' ),
|
285 |
'permissions-newsletter' => _fs_text( 'Newsletter' ),
|
286 |
'permissions-newsletter_desc' => _fs_text( 'Updates, announcements, marketing, no spam' ),
|
287 |
'privacy-policy' => _fs_text( 'Privacy Policy' ),
|
339 |
'scheduled-crons' => _fs_text( 'Scheduled Crons' ),
|
340 |
'cron-type' => _fs_text( 'Cron Type' ),
|
341 |
'plugins-themes-sync' => _fs_text( 'Plugins & Themes Sync' ),
|
342 |
+
'module-licenses' => _fs_text( '%s Licenses' ),
|
343 |
'debug-log' => _fs_text( 'Debug Log' ),
|
344 |
'all' => _fs_text( 'All' ),
|
345 |
'file' => _fs_text( 'File' ),
|
373 |
'you-have-latest' => _fs_text( 'Seems like you got the latest release.' ),
|
374 |
'you-are-good' => _fs_text( 'You are all good!' ),
|
375 |
'user-exist-message' => _fs_text( 'Sorry, we could not complete the email update. Another user with the same email is already registered.' ),
|
376 |
+
'user-exist-message_ownership' => _fs_text( 'If you would like to give up the ownership of the %s\'s account to %s click the Change Ownership button.' ),
|
377 |
'email-updated-message' => _fs_text( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.' ),
|
378 |
'name-updated-message' => _fs_text( 'Your name was successfully updated.' ),
|
379 |
'x-updated' => _fs_text( 'You have successfully updated your %s.' ),
|
381 |
'verification-email-sent-message' => _fs_text( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.' ),
|
382 |
'addons-info-external-message' => _fs_text( 'Just letting you know that the add-ons information of %s is being pulled from an external server.' ),
|
383 |
'no-cc-required' => _fs_text( 'No credit card required' ),
|
384 |
+
'premium-activated-message' => _fs_text( 'Premium %s version was successfully activated.' ),
|
385 |
'successful-version-upgrade-message' => _fs_text( 'The upgrade of %s was successfully completed.' ),
|
386 |
'activation-with-plan-x-message' => _fs_text( 'Your account was successfully activated with the %s plan.' ),
|
387 |
'download-latest-x-version-now' => _fs_text( 'Download the latest %s version now' ),
|
397 |
'email-verified-message' => _fs_text( 'Your email has been successfully verified - you are AWESOME!' ),
|
398 |
'plan-upgraded-message' => _fs_text( 'Your plan was successfully upgraded.' ),
|
399 |
'plan-changed-to-x-message' => _fs_text( 'Your plan was successfully changed to %s.' ),
|
400 |
+
'license-expired-blocking-message' => _fs_text( 'Your license has expired. You can still continue using the free %s forever.' ),
|
401 |
'license-cancelled' => _fs_text( 'Your license has been cancelled. If you think it\'s a mistake, please contact support.' ),
|
402 |
'trial-started-message' => _fs_text( 'Your trial has been successfully started.' ),
|
403 |
'license-activated-message' => _fs_text( 'Your license was successfully activated.' ),
|
421 |
'please-wait' => _fs_text( 'Please wait' ),
|
422 |
'trial-cancel-failure-message' => _fs_text( 'Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes.' ),
|
423 |
'trial-utilized' => _fs_text( 'You already utilized a trial before.' ),
|
424 |
+
'in-trial-mode' => _fs_text( 'You are already running the %s in a trial mode.' ),
|
425 |
'trial-plan-x-not-exist' => _fs_text( 'Plan %s do not exist, therefore, can\'t start a trial.' ),
|
426 |
'plan-x-no-trial' => _fs_text( 'Plan %s does not support a trial period.' ),
|
427 |
+
'no-trials' => _fs_text( 'None of the %s\'s plans supports a trial period.' ),
|
428 |
+
'unexpected-api-error' => _fs_text( 'Unexpected API error. Please contact the %s\'s author with the following error.' ),
|
429 |
'no-commitment-for-x-days' => _fs_text( 'No commitment for %s days - cancel anytime!' ),
|
430 |
'license-expired-non-blocking-message' => _fs_text( '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.' ),
|
431 |
'could-not-activate-x' => _fs_text( 'Couldn\'t activate %s.' ),
|
439 |
'connectivity-test-maybe-temporary' => _fs_text( '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?' ),
|
440 |
'curl-missing-message' => _fs_text( '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.' ),
|
441 |
'curl-disabled-methods' => _fs_text( 'Disabled method(s):' ),
|
442 |
+
'cloudflare-blocks-connection-message' => _fs_text( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.' ),
|
443 |
'x-requires-access-to-api' => _fs_x( '%s requires an access to our API.',
|
444 |
'as pluginX requires an access to our API' ),
|
445 |
'squid-blocks-connection-message' => _fs_text( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.' ),
|
446 |
'squid-no-clue-title' => _fs_text( 'I don\'t know what is Squid or ACL, help me!' ),
|
447 |
'squid-no-clue-desc' => _fs_text( '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.' ),
|
448 |
'sysadmin-title' => _fs_text( 'I\'m a system administrator' ),
|
449 |
+
'squid-sysadmin-desc' => _fs_text( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again.' ),
|
450 |
'curl-missing-no-clue-title' => _fs_text( 'I don\'t know what is cURL or how to install it, help me!' ),
|
451 |
'curl-missing-no-clue-desc' => _fs_text( '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.' ),
|
452 |
+
'curl-missing-sysadmin-desc' => _fs_text( '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.' ),
|
453 |
'happy-to-resolve-issue-asap' => _fs_text( '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.' ),
|
454 |
'contact-support-before-deactivation' => _fs_text( 'Sorry for the inconvenience and we are here to help if you give us a chance.' ),
|
455 |
'fix-issue-title' => _fs_text( 'Yes - I\'m giving you a chance to fix it' ),
|
504 |
/* translators: %1$s: Number of trial days; %2$s: Plan name; */
|
505 |
'start-trial-prompt-header' => _fs_text( 'You are 1-click away from starting your %1$s-day free trial of the %2$s plan.' ),
|
506 |
/* translators: %s: Link to freemius.com */
|
507 |
+
'start-trial-prompt-message' => _fs_text( '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.' ),
|
508 |
|
509 |
#endregion
|
510 |
#--------------------------------------------------------------------------------
|
538 |
'auto-install-error-premium-addon-activated' => _fs_text( 'Premium add-on version already installed.' ),
|
539 |
'auto-install-error-invalid-license' => _fs_text( 'You do not have a valid license to access the premium version.' ),
|
540 |
'auto-install-error-serviceware' => _fs_text( 'Plugin is a "Serviceware" which means it does not have a premium code version.' ),
|
541 |
+
#endregion
|
542 |
+
|
543 |
+
/* translators: %s: Page name */
|
544 |
+
'secure-x-page-header' => _fs_text( 'Secure HTTPS %s page, running from an external domain' ),
|
545 |
+
'pci-compliant' => _fs_text( 'PCI compliant' ),
|
546 |
+
'view-paid-features' => _fs_text( 'View paid features' ),
|
547 |
);
|
548 |
|
549 |
/**
|
freemius/includes/l10n.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.2.1.6
|
7 |
*/
|
8 |
|
@@ -20,66 +20,9 @@
|
|
20 |
* @return string
|
21 |
*/
|
22 |
function _fs_text( $text ) {
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Retrieve the translation of $text and escapes it for safe use in an attribute.
|
28 |
-
*
|
29 |
-
* @since 1.2.1.6
|
30 |
-
*
|
31 |
-
* @param string $text
|
32 |
-
*
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
function _fs_esc_attr( $text ) {
|
36 |
-
return esc_attr( translate( $text, 'freemius' ) );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Retrieve the translation of $text and escapes it for safe use in HTML output.
|
41 |
-
*
|
42 |
-
* @since 1.2.1.6
|
43 |
-
*
|
44 |
-
* @param string $text
|
45 |
-
*
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
function _fs_esc_html( $text ) {
|
49 |
-
return esc_html( translate( $text, 'freemius' ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Display translated text.
|
54 |
-
*
|
55 |
-
* @since 1.2.0
|
56 |
-
*
|
57 |
-
* @param string $text
|
58 |
-
*/
|
59 |
-
function _fs_echo( $text ) {
|
60 |
-
echo translate( $text, 'freemius' );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Display translated text that has been escaped for safe use in an attribute.
|
65 |
-
*
|
66 |
-
* @since 1.2.1.6
|
67 |
-
*
|
68 |
-
* @param string $text
|
69 |
-
*/
|
70 |
-
function _fs_esc_attr_echo( $text ) {
|
71 |
-
echo esc_attr( translate( $text, 'freemius' ) );
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Display translated text that has been escaped for safe use in HTML output.
|
76 |
-
*
|
77 |
-
* @since 1.2.1.6
|
78 |
-
*
|
79 |
-
* @param string $text
|
80 |
-
*/
|
81 |
-
function _fs_esc_html_echo( $text ) {
|
82 |
-
echo esc_html( translate( $text, 'freemius' ) );
|
83 |
}
|
84 |
|
85 |
/**
|
@@ -99,152 +42,7 @@
|
|
99 |
* @return string
|
100 |
*/
|
101 |
function _fs_x( $text, $context ) {
|
102 |
-
return translate_with_gettext_context( $text, $context, 'freemius' );
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Display translated string with gettext context.
|
107 |
-
*
|
108 |
-
* @since 1.2.1.6
|
109 |
-
*
|
110 |
-
* @param string $text
|
111 |
-
* @param string $context
|
112 |
-
*/
|
113 |
-
function _fs_ex( $text, $context ) {
|
114 |
// Avoid misleading Theme Check warning.
|
115 |
-
$fn = '
|
116 |
-
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Translate string with gettext context, and escapes it for safe use in an attribute.
|
121 |
-
*
|
122 |
-
* @since 1.2.1.6
|
123 |
-
*
|
124 |
-
* @param string $text
|
125 |
-
* @param string $context
|
126 |
-
*
|
127 |
-
* @return string
|
128 |
-
*/
|
129 |
-
function _fs_esc_attr_x( $text, $context ) {
|
130 |
-
return esc_attr( translate_with_gettext_context( $text, $context, 'freemius' ) );
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Translate string with gettext context, and escapes it for safe use in HTML output.
|
135 |
-
*
|
136 |
-
* @since 2.9.0
|
137 |
-
*
|
138 |
-
* @param string $text
|
139 |
-
* @param string $context
|
140 |
-
*
|
141 |
-
* @return string
|
142 |
-
*/
|
143 |
-
function _fs_esc_html_x( $text, $context ) {
|
144 |
-
return esc_html( translate_with_gettext_context( $text, $context, 'freemius' ) );
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Translates and retrieves the singular or plural form based on the supplied number.
|
149 |
-
*
|
150 |
-
* @since 1.2.1.6
|
151 |
-
*
|
152 |
-
* @param string $single
|
153 |
-
* @param string $plural
|
154 |
-
* @param int $number
|
155 |
-
*
|
156 |
-
* @return string
|
157 |
-
*/
|
158 |
-
function _fs_n( $single, $plural, $number ) {
|
159 |
-
$translations = get_translations_for_domain( 'freemius' );
|
160 |
-
$translation = $translations->translate_plural( $single, $plural, $number );
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Filters the singular or plural form of a string.
|
164 |
-
*
|
165 |
-
* @since WP 2.2.0
|
166 |
-
*
|
167 |
-
* @param string $translation
|
168 |
-
* @param string $single
|
169 |
-
* @param string $plural
|
170 |
-
* @param string $number
|
171 |
-
* @param string $domain
|
172 |
-
*/
|
173 |
-
return apply_filters( 'ngettext', $translation, $single, $plural, $number, 'freemius' );
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Translates and retrieves the singular or plural form based on the supplied number, with gettext context.
|
178 |
-
*
|
179 |
-
* @since 1.2.1.6
|
180 |
-
*
|
181 |
-
* @param string $single
|
182 |
-
* @param string $plural
|
183 |
-
* @param int $number
|
184 |
-
* @param string $context
|
185 |
-
*
|
186 |
-
* @return string
|
187 |
-
*/
|
188 |
-
function _fs_nx($single, $plural, $number, $context ) {
|
189 |
-
$translations = get_translations_for_domain( 'freemius' );
|
190 |
-
$translation = $translations->translate_plural( $single, $plural, $number, $context );
|
191 |
-
|
192 |
-
/**
|
193 |
-
* Filters the singular or plural form of a string with gettext context.
|
194 |
-
*
|
195 |
-
* @since WP 3.0
|
196 |
-
*
|
197 |
-
* @param string $translation
|
198 |
-
* @param string $single
|
199 |
-
* @param string $plural
|
200 |
-
* @param string $number
|
201 |
-
* @param string $context
|
202 |
-
* @param string $domain
|
203 |
-
*/
|
204 |
-
return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, 'freemius' );
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Registers plural strings in POT file, but does not translate them.
|
209 |
-
*
|
210 |
-
* Used when you want to keep structures with translatable plural
|
211 |
-
* strings and use them later when the number is known.
|
212 |
-
*
|
213 |
-
* @since 1.2.1.6
|
214 |
-
*
|
215 |
-
* @param string $singular
|
216 |
-
* @param string $plural
|
217 |
-
*
|
218 |
-
* @return array
|
219 |
-
*/
|
220 |
-
function _fs_n_noop( $singular, $plural ) {
|
221 |
-
return array(
|
222 |
-
'singular' => $singular,
|
223 |
-
'plural' => $plural,
|
224 |
-
'context' => null,
|
225 |
-
'domain' => 'freemius'
|
226 |
-
);
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Registers plural strings with gettext context in POT file, but does not translate them.
|
231 |
-
*
|
232 |
-
* Used when you want to keep structures with translatable plural
|
233 |
-
* strings and use them later when the number is known.
|
234 |
-
*
|
235 |
-
* @since 1.2.1.6
|
236 |
-
*
|
237 |
-
* @param string $singular
|
238 |
-
* @param string $plural
|
239 |
-
* @param string $context
|
240 |
-
*
|
241 |
-
* @return array
|
242 |
-
*/
|
243 |
-
function _fs_nx_noop( $singular, $plural, $context ) {
|
244 |
-
return array(
|
245 |
-
'singular' => $singular,
|
246 |
-
'plural' => $plural,
|
247 |
-
'context' => $context,
|
248 |
-
'domain' => 'freemius'
|
249 |
-
);
|
250 |
}
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
* @since 1.2.1.6
|
7 |
*/
|
8 |
|
20 |
* @return string
|
21 |
*/
|
22 |
function _fs_text( $text ) {
|
23 |
+
// Avoid misleading Theme Check warning.
|
24 |
+
$fn = 'translate';
|
25 |
+
return $fn( $text, 'freemius' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
/**
|
42 |
* @return string
|
43 |
*/
|
44 |
function _fs_x( $text, $context ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
// Avoid misleading Theme Check warning.
|
46 |
+
$fn = 'translate_with_gettext_context';
|
47 |
+
return $fn( $text, $context, 'freemius' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
freemius/includes/managers/class-fs-admin-menu-manager.php
CHANGED
@@ -1,782 +1,850 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
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 |
-
* @
|
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 |
-
$this->
|
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 |
-
* @return bool
|
248 |
-
*/
|
249 |
-
function
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
*
|
265 |
-
*
|
266 |
-
*
|
267 |
-
* @
|
268 |
-
*
|
269 |
-
* @param
|
270 |
-
*
|
271 |
-
* @return
|
272 |
-
*/
|
273 |
-
function
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
*
|
293 |
-
* @
|
294 |
-
*
|
295 |
-
* @return string
|
296 |
-
*/
|
297 |
-
function
|
298 |
-
return $this->
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
*
|
305 |
-
* @
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
*
|
315 |
-
* @
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
* @
|
326 |
-
*
|
327 |
-
*
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
*
|
338 |
-
* @
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
* @author Vova Feldman (@svovaf)
|
348 |
-
* @since 1.1.3
|
349 |
-
*
|
350 |
-
* @return string
|
351 |
-
*/
|
352 |
-
function
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
$this->
|
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 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
$
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
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 |
-
if (
|
569 |
-
return false;
|
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 |
-
*
|
687 |
-
* @
|
688 |
-
* @
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
$
|
721 |
-
|
722 |
-
$
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
*
|
738 |
-
*
|
739 |
-
*
|
740 |
-
*
|
741 |
-
*
|
742 |
-
*
|
743 |
-
*
|
744 |
-
*
|
745 |
-
*
|
746 |
-
*
|
747 |
-
*
|
748 |
-
*
|
749 |
-
*
|
750 |
-
*
|
751 |
-
*
|
752 |
-
*
|
753 |
-
*
|
754 |
-
*
|
755 |
-
*
|
756 |
-
* @
|
757 |
-
*
|
758 |
-
* @param string $
|
759 |
-
*
|
760 |
-
*
|
761 |
-
* @
|
762 |
-
*
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
}
|
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-admin-notice-manager.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.7
|
7 |
*/
|
8 |
|
@@ -11,10 +11,16 @@
|
|
11 |
}
|
12 |
|
13 |
class FS_Admin_Notice_Manager {
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* @var string
|
16 |
*/
|
17 |
-
protected $
|
18 |
/**
|
19 |
* @var string
|
20 |
*/
|
@@ -37,37 +43,40 @@
|
|
37 |
protected $_logger;
|
38 |
|
39 |
/**
|
40 |
-
* @param string $
|
41 |
* @param string $title
|
|
|
42 |
*
|
43 |
* @return FS_Admin_Notice_Manager
|
44 |
*/
|
45 |
-
static function instance( $
|
46 |
-
if ( ! isset( self::$_instances[ $
|
47 |
-
self::$_instances[ $
|
48 |
}
|
49 |
|
50 |
-
return self::$_instances[ $
|
51 |
}
|
52 |
|
53 |
-
protected function __construct( $
|
54 |
-
$this->
|
55 |
-
|
56 |
-
$this->
|
57 |
-
$this->
|
58 |
-
$this->_sticky_storage
|
59 |
|
60 |
if ( is_admin() ) {
|
61 |
if ( 0 < count( $this->_sticky_storage ) ) {
|
|
|
|
|
62 |
// If there are sticky notices for the current slug, add a callback
|
63 |
// to the AJAX action that handles message dismiss.
|
64 |
-
add_action( "wp_ajax_fs_dismiss_notice_action_{$
|
65 |
&$this,
|
66 |
'dismiss_notice_ajax_callback'
|
67 |
) );
|
68 |
|
69 |
-
foreach ( $this->_sticky_storage as $
|
70 |
-
// Add
|
71 |
$this->add(
|
72 |
$msg['message'],
|
73 |
$msg['title'],
|
@@ -102,7 +111,7 @@
|
|
102 |
*/
|
103 |
static function _add_sticky_dismiss_javascript() {
|
104 |
$params = array();
|
105 |
-
fs_require_once_template( 'sticky-
|
106 |
}
|
107 |
|
108 |
private static $_added_sticky_javascript = false;
|
@@ -120,7 +129,7 @@
|
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
* Handle admin_notices by printing the
|
124 |
*
|
125 |
* @author Vova Feldman (@svovaf)
|
126 |
* @since 1.0.4
|
@@ -141,7 +150,7 @@
|
|
141 |
}
|
142 |
|
143 |
foreach ( $this->_admin_messages[ $notice_type ] as $id => $msg ) {
|
144 |
-
fs_require_template( '
|
145 |
|
146 |
if ( $msg['sticky'] ) {
|
147 |
self::has_sticky_messages();
|
@@ -150,7 +159,7 @@
|
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
-
* Handle all_admin_notices by printing the
|
154 |
*
|
155 |
* @author Vova Feldman (@svovaf)
|
156 |
* @since 1.0.4
|
@@ -164,12 +173,12 @@
|
|
164 |
}
|
165 |
|
166 |
foreach ( $this->_admin_messages[ $notice_type ] as $id => $msg ) {
|
167 |
-
fs_require_template( 'all-
|
168 |
}
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
-
* Enqueue common stylesheet to style
|
173 |
*
|
174 |
* @author Vova Feldman (@svovaf)
|
175 |
* @since 1.0.7
|
@@ -179,7 +188,7 @@
|
|
179 |
}
|
180 |
|
181 |
/**
|
182 |
-
* Add
|
183 |
*
|
184 |
* @author Vova Feldman (@svovaf)
|
185 |
* @since 1.0.4
|
@@ -210,14 +219,14 @@
|
|
210 |
}
|
211 |
|
212 |
$message_object = array(
|
213 |
-
'message'
|
214 |
-
'title'
|
215 |
-
'type'
|
216 |
-
'sticky'
|
217 |
-
'id'
|
218 |
-
'all'
|
219 |
-
'
|
220 |
-
'plugin'
|
221 |
);
|
222 |
|
223 |
if ( $is_sticky && $store_if_sticky ) {
|
@@ -242,7 +251,7 @@
|
|
242 |
// Remove from sticky storage.
|
243 |
$this->_sticky_storage->remove( $id );
|
244 |
|
245 |
-
// Remove from current
|
246 |
if ( isset( $this->_admin_messages['all_admin_notices'] ) && isset( $this->_admin_messages['all_admin_notices'][ $id ] ) ) {
|
247 |
unset( $this->_admin_messages['all_admin_notices'][ $id ] );
|
248 |
}
|
@@ -267,7 +276,7 @@
|
|
267 |
}
|
268 |
|
269 |
/**
|
270 |
-
* Adds sticky
|
271 |
*
|
272 |
* @author Vova Feldman (@svovaf)
|
273 |
* @since 1.0.7
|
@@ -279,8 +288,10 @@
|
|
279 |
* @param bool $all_admin
|
280 |
*/
|
281 |
function add_sticky( $message, $id, $title = '', $type = 'success', $all_admin = false ) {
|
282 |
-
|
283 |
-
|
|
|
|
|
284 |
|
285 |
$this->add( $message, $title, $type, true, $all_admin, $id );
|
286 |
}
|
@@ -296,7 +307,7 @@
|
|
296 |
}
|
297 |
|
298 |
/**
|
299 |
-
* Add
|
300 |
*
|
301 |
* @author Vova Feldman (@svovaf)
|
302 |
* @since 1.0.4
|
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 |
|
11 |
}
|
12 |
|
13 |
class FS_Admin_Notice_Manager {
|
14 |
+
/**
|
15 |
+
* @since 1.2.2
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
protected $_module_unique_affix;
|
20 |
/**
|
21 |
* @var string
|
22 |
*/
|
23 |
+
protected $_id;
|
24 |
/**
|
25 |
* @var string
|
26 |
*/
|
43 |
protected $_logger;
|
44 |
|
45 |
/**
|
46 |
+
* @param string $id
|
47 |
* @param string $title
|
48 |
+
* @param string $module_unique_affix
|
49 |
*
|
50 |
* @return FS_Admin_Notice_Manager
|
51 |
*/
|
52 |
+
static function instance( $id, $title = '', $module_unique_affix = '' ) {
|
53 |
+
if ( ! isset( self::$_instances[ $id ] ) ) {
|
54 |
+
self::$_instances[ $id ] = new FS_Admin_Notice_Manager( $id, $title, $module_unique_affix );
|
55 |
}
|
56 |
|
57 |
+
return self::$_instances[ $id ];
|
58 |
}
|
59 |
|
60 |
+
protected function __construct( $id, $title = '', $module_unique_affix = '' ) {
|
61 |
+
$this->_id = $id;
|
62 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->_id . '_data', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
63 |
+
$this->_title = ! empty( $title ) ? $title : '';
|
64 |
+
$this->_module_unique_affix = $module_unique_affix;
|
65 |
+
$this->_sticky_storage = FS_Key_Value_Storage::instance( 'admin_notices', $this->_id );
|
66 |
|
67 |
if ( is_admin() ) {
|
68 |
if ( 0 < count( $this->_sticky_storage ) ) {
|
69 |
+
$ajax_action_suffix = str_replace( ':', '-', $this->_id );
|
70 |
+
|
71 |
// If there are sticky notices for the current slug, add a callback
|
72 |
// to the AJAX action that handles message dismiss.
|
73 |
+
add_action( "wp_ajax_fs_dismiss_notice_action_{$ajax_action_suffix}", array(
|
74 |
&$this,
|
75 |
'dismiss_notice_ajax_callback'
|
76 |
) );
|
77 |
|
78 |
+
foreach ( $this->_sticky_storage as $msg ) {
|
79 |
+
// Add admin notice.
|
80 |
$this->add(
|
81 |
$msg['message'],
|
82 |
$msg['title'],
|
111 |
*/
|
112 |
static function _add_sticky_dismiss_javascript() {
|
113 |
$params = array();
|
114 |
+
fs_require_once_template( 'sticky-admin-notice-js.php', $params );
|
115 |
}
|
116 |
|
117 |
private static $_added_sticky_javascript = false;
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
+
* Handle admin_notices by printing the admin messages stacked in the queue.
|
133 |
*
|
134 |
* @author Vova Feldman (@svovaf)
|
135 |
* @since 1.0.4
|
150 |
}
|
151 |
|
152 |
foreach ( $this->_admin_messages[ $notice_type ] as $id => $msg ) {
|
153 |
+
fs_require_template( 'admin-notice.php', $msg );
|
154 |
|
155 |
if ( $msg['sticky'] ) {
|
156 |
self::has_sticky_messages();
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
+
* Handle all_admin_notices by printing the admin messages stacked in the queue.
|
163 |
*
|
164 |
* @author Vova Feldman (@svovaf)
|
165 |
* @since 1.0.4
|
173 |
}
|
174 |
|
175 |
foreach ( $this->_admin_messages[ $notice_type ] as $id => $msg ) {
|
176 |
+
fs_require_template( 'all-admin-notice.php', $msg );
|
177 |
}
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
+
* Enqueue common stylesheet to style admin notice.
|
182 |
*
|
183 |
* @author Vova Feldman (@svovaf)
|
184 |
* @since 1.0.7
|
188 |
}
|
189 |
|
190 |
/**
|
191 |
+
* Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
|
192 |
*
|
193 |
* @author Vova Feldman (@svovaf)
|
194 |
* @since 1.0.4
|
219 |
}
|
220 |
|
221 |
$message_object = array(
|
222 |
+
'message' => $message,
|
223 |
+
'title' => $title,
|
224 |
+
'type' => $type,
|
225 |
+
'sticky' => $is_sticky,
|
226 |
+
'id' => $id,
|
227 |
+
'all' => $all_admin,
|
228 |
+
'manager_id' => $this->_id,
|
229 |
+
'plugin' => $this->_title,
|
230 |
);
|
231 |
|
232 |
if ( $is_sticky && $store_if_sticky ) {
|
251 |
// Remove from sticky storage.
|
252 |
$this->_sticky_storage->remove( $id );
|
253 |
|
254 |
+
// Remove from current admin messages.
|
255 |
if ( isset( $this->_admin_messages['all_admin_notices'] ) && isset( $this->_admin_messages['all_admin_notices'][ $id ] ) ) {
|
256 |
unset( $this->_admin_messages['all_admin_notices'][ $id ] );
|
257 |
}
|
276 |
}
|
277 |
|
278 |
/**
|
279 |
+
* Adds sticky admin notification.
|
280 |
*
|
281 |
* @author Vova Feldman (@svovaf)
|
282 |
* @since 1.0.7
|
288 |
* @param bool $all_admin
|
289 |
*/
|
290 |
function add_sticky( $message, $id, $title = '', $type = 'success', $all_admin = false ) {
|
291 |
+
if ( ! empty( $this->_module_unique_affix ) ) {
|
292 |
+
$message = fs_apply_filter( $this->_module_unique_affix, "sticky_message_{$id}", $message );
|
293 |
+
$title = fs_apply_filter( $this->_module_unique_affix, "sticky_title_{$id}", $title );
|
294 |
+
}
|
295 |
|
296 |
$this->add( $message, $title, $type, true, $all_admin, $id );
|
297 |
}
|
307 |
}
|
308 |
|
309 |
/**
|
310 |
+
* Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
|
311 |
*
|
312 |
* @author Vova Feldman (@svovaf)
|
313 |
* @since 1.0.4
|
freemius/includes/managers/class-fs-cache-manager.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.1.6
|
7 |
*/
|
8 |
|
@@ -115,18 +115,37 @@
|
|
115 |
* @author Vova Feldman (@svovaf)
|
116 |
* @since 1.1.6
|
117 |
*
|
118 |
-
* @param string
|
|
|
119 |
*
|
120 |
* @return bool
|
121 |
*/
|
122 |
-
function has_valid( $key ) {
|
123 |
$cache_entry = $this->_options->get_option( $key, false );
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
|
132 |
/**
|
@@ -147,10 +166,10 @@
|
|
147 |
isset( $cache_entry->timestamp ) &&
|
148 |
is_numeric( $cache_entry->timestamp )
|
149 |
) {
|
150 |
-
|
151 |
-
|
152 |
|
153 |
-
return $default;
|
154 |
}
|
155 |
|
156 |
/**
|
@@ -175,7 +194,7 @@
|
|
175 |
return $cache_entry->result;
|
176 |
}
|
177 |
|
178 |
-
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -189,8 +208,10 @@
|
|
189 |
function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
190 |
$this->_logger->entrance( 'key = ' . $key );
|
191 |
|
192 |
-
$cache_entry
|
|
|
193 |
$cache_entry->result = $value;
|
|
|
194 |
$cache_entry->timestamp = WP_FS__SCRIPT_START_TIME + $expiration;
|
195 |
$this->_options->set_option( $key, $cache_entry, true );
|
196 |
}
|
@@ -234,4 +255,27 @@
|
|
234 |
|
235 |
$this->_options->unset_option( $key, true );
|
236 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
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 |
|
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 |
/**
|
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 |
/**
|
194 |
return $cache_entry->result;
|
195 |
}
|
196 |
|
197 |
+
return is_object($default) ? clone $default : $default;
|
198 |
}
|
199 |
|
200 |
/**
|
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 |
}
|
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
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.7
|
7 |
*/
|
8 |
|
@@ -47,9 +47,11 @@
|
|
47 |
*/
|
48 |
protected $_id;
|
49 |
/**
|
|
|
|
|
50 |
* @var string
|
51 |
*/
|
52 |
-
protected $
|
53 |
/**
|
54 |
* @var array
|
55 |
*/
|
@@ -66,24 +68,24 @@
|
|
66 |
|
67 |
/**
|
68 |
* @param string $id
|
69 |
-
* @param string $
|
70 |
*
|
71 |
* @return FS_Key_Value_Storage
|
72 |
*/
|
73 |
-
static function instance( $id, $
|
74 |
-
$key = $id . ':' . $
|
75 |
if ( ! isset( self::$_instances[ $key ] ) ) {
|
76 |
-
self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $
|
77 |
}
|
78 |
|
79 |
return self::$_instances[ $key ];
|
80 |
}
|
81 |
|
82 |
-
protected function __construct( $id, $
|
83 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $
|
84 |
|
85 |
-
$this->
|
86 |
-
$this->_id
|
87 |
$this->load();
|
88 |
}
|
89 |
|
@@ -103,8 +105,8 @@
|
|
103 |
*/
|
104 |
function load() {
|
105 |
$all_plugins_data = $this->get_all_data();
|
106 |
-
$this->_data = isset( $all_plugins_data[ $this->
|
107 |
-
$all_plugins_data[ $this->
|
108 |
array();
|
109 |
}
|
110 |
|
@@ -130,7 +132,7 @@
|
|
130 |
|
131 |
$this->_data[ $key ] = $value;
|
132 |
|
133 |
-
$all_data[ $this->
|
134 |
|
135 |
$options_manager = $this->get_option_manager();
|
136 |
$options_manager->set_option( $this->_id, $all_data, $flush );
|
@@ -155,7 +157,7 @@
|
|
155 |
|
156 |
if ( $store ) {
|
157 |
$all_data = $this->get_all_data();
|
158 |
-
$all_data[ $this->
|
159 |
$options_manager = $this->get_option_manager();
|
160 |
$options_manager->set_option( $this->_id, $all_data, true );
|
161 |
}
|
@@ -171,7 +173,7 @@
|
|
171 |
$this->_data = array();
|
172 |
|
173 |
$all_data = $this->get_all_data();
|
174 |
-
unset( $all_data[ $this->
|
175 |
$options_manager = $this->get_option_manager();
|
176 |
$options_manager->set_option( $this->_id, $all_data, true );
|
177 |
}
|
@@ -192,7 +194,7 @@
|
|
192 |
|
193 |
if ( $store ) {
|
194 |
$all_data = $this->get_all_data();
|
195 |
-
$all_data[ $this->
|
196 |
$options_manager = $this->get_option_manager();
|
197 |
$options_manager->set_option( $this->_id, $all_data, true );
|
198 |
}
|
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 |
|
47 |
*/
|
48 |
protected $_id;
|
49 |
/**
|
50 |
+
* @since 1.2.2
|
51 |
+
*
|
52 |
* @var string
|
53 |
*/
|
54 |
+
protected $_secondary_id;
|
55 |
/**
|
56 |
* @var array
|
57 |
*/
|
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 |
|
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 |
|
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 );
|
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 |
}
|
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 |
}
|
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 |
}
|
freemius/includes/managers/class-fs-license-manager.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.6
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/managers/class-fs-option-manager.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.3
|
7 |
*/
|
8 |
|
@@ -211,12 +211,39 @@
|
|
211 |
$this->_logger->entrance( 'option = ' . $option );
|
212 |
|
213 |
if ( is_array( $this->_options ) ) {
|
214 |
-
|
|
|
|
|
215 |
} else if ( is_object( $this->_options ) ) {
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
@@ -234,10 +261,34 @@
|
|
234 |
$this->clear();
|
235 |
}
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
if ( is_array( $this->_options ) ) {
|
238 |
-
$this->_options[ $option ] = $
|
239 |
} else if ( is_object( $this->_options ) ) {
|
240 |
-
$this->_options->{$option} = $
|
241 |
}
|
242 |
|
243 |
if ( $flush ) {
|
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 |
|
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 |
/**
|
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 ) {
|
freemius/includes/managers/class-fs-plan-manager.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.6
|
7 |
*/
|
8 |
|
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 |
|
freemius/includes/managers/class-fs-plugin-manager.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @package Freemius
|
4 |
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license
|
6 |
* @since 1.0.6
|
7 |
*/
|
8 |
|
@@ -12,13 +12,17 @@
|
|
12 |
|
13 |
class FS_Plugin_Manager {
|
14 |
/**
|
15 |
-
* @
|
|
|
|
|
16 |
*/
|
17 |
-
protected $
|
18 |
/**
|
|
|
|
|
19 |
* @var FS_Plugin
|
20 |
*/
|
21 |
-
protected $
|
22 |
|
23 |
/**
|
24 |
* @var FS_Plugin_Manager[]
|
@@ -30,22 +34,36 @@
|
|
30 |
protected $_logger;
|
31 |
|
32 |
/**
|
33 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
*
|
35 |
* @return FS_Plugin_Manager
|
36 |
*/
|
37 |
-
static function instance( $
|
38 |
-
|
39 |
-
|
|
|
|
|
40 |
}
|
41 |
|
42 |
-
return self::$_instances[ $
|
43 |
-
|
44 |
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
$this->_slug = $slug;
|
49 |
$this->load();
|
50 |
}
|
51 |
|
@@ -53,8 +71,25 @@
|
|
53 |
return FS_Option_Manager::get_manager( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
54 |
}
|
55 |
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
/**
|
@@ -64,10 +99,42 @@
|
|
64 |
* @since 1.0.6
|
65 |
*/
|
66 |
function load() {
|
67 |
-
$
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -76,24 +143,23 @@
|
|
76 |
* @author Vova Feldman (@svovaf)
|
77 |
* @since 1.0.6
|
78 |
*
|
79 |
-
* @param bool|FS_Plugin $
|
80 |
* @param bool $flush
|
81 |
*
|
82 |
* @return bool|\FS_Plugin
|
83 |
*/
|
84 |
-
function store( $
|
85 |
-
|
86 |
-
|
87 |
-
if ( false !== $plugin ) {
|
88 |
-
$this->_plugin = $plugin;
|
89 |
}
|
90 |
|
91 |
-
$
|
|
|
92 |
|
93 |
$options_manager = $this->get_option_manager();
|
94 |
-
$options_manager->set_option( '
|
95 |
|
96 |
-
return $this->
|
97 |
}
|
98 |
|
99 |
/**
|
@@ -108,12 +174,12 @@
|
|
108 |
* @return bool True if plugin was updated.
|
109 |
*/
|
110 |
function update( FS_Plugin $plugin, $store = true ) {
|
111 |
-
if ( ! (
|
112 |
-
$this->
|
113 |
-
$this->
|
114 |
-
$this->
|
115 |
-
$this->
|
116 |
-
$this->
|
117 |
) {
|
118 |
$this->store( $plugin, $store );
|
119 |
|
@@ -131,7 +197,7 @@
|
|
131 |
* @param bool $store
|
132 |
*/
|
133 |
function set( FS_Plugin $plugin, $store = false ) {
|
134 |
-
$this->
|
135 |
|
136 |
if ( $store ) {
|
137 |
$this->store();
|
@@ -145,8 +211,8 @@
|
|
145 |
* @return bool|\FS_Plugin
|
146 |
*/
|
147 |
function get() {
|
148 |
-
return isset( $this->
|
149 |
-
$this->
|
150 |
false;
|
151 |
}
|
152 |
|
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 |
|
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[]
|
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 |
|
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 |
/**
|
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 |
/**
|
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 |
/**
|
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 |
|
197 |
* @param bool $store
|
198 |
*/
|
199 |
function set( FS_Plugin $plugin, $store = false ) {
|
200 |
+
$this->_module = $plugin;
|
201 |
|
202 |
if ( $store ) {
|
203 |
$this->store();
|
211 |
* @return bool|\FS_Plugin
|
212 |
*/
|
213 |
function get() {
|
214 |
+
return isset( $this->_module ) ?
|
215 |
+
$this->_module :
|
216 |
false;
|
217 |
}
|
218 |
|
freemius/includes/sdk/FreemiusBase.php
CHANGED
@@ -154,35 +154,62 @@
|
|
154 |
}
|
155 |
|
156 |
/**
|
157 |
-
* Base64
|
158 |
-
*
|
159 |
-
*
|
160 |
-
*
|
|
|
161 |
* No padded =
|
162 |
*
|
163 |
-
* @param string $input
|
164 |
*
|
165 |
* @return string
|
166 |
*/
|
167 |
protected static function Base64UrlDecode( $input ) {
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
/**
|
172 |
* Base64 encoding that does not need to be urlencode()ed.
|
173 |
-
*
|
174 |
-
*
|
175 |
-
*
|
|
|
176 |
*
|
177 |
* @param string $input string
|
178 |
*
|
179 |
-
* @return string
|
180 |
*/
|
181 |
protected static function Base64UrlEncode( $input ) {
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
$str = str_replace( '=', '', $str );
|
184 |
|
185 |
return $str;
|
186 |
}
|
187 |
-
|
188 |
}
|
154 |
}
|
155 |
|
156 |
/**
|
157 |
+
* Base64 decoding that does not need to be urldecode()-ed.
|
158 |
+
*
|
159 |
+
* Exactly the same as PHP base64 encode except it uses
|
160 |
+
* `-` instead of `+`
|
161 |
+
* `_` instead of `/`
|
162 |
* No padded =
|
163 |
*
|
164 |
+
* @param string $input Base64UrlEncoded() string
|
165 |
*
|
166 |
* @return string
|
167 |
*/
|
168 |
protected static function Base64UrlDecode( $input ) {
|
169 |
+
/**
|
170 |
+
* IMPORTANT NOTE:
|
171 |
+
* This is a hack suggested by @otto42 and @greenshady from
|
172 |
+
* the theme's review team. The usage of base64 for API
|
173 |
+
* signature encoding was approved in a Slack meeting
|
174 |
+
* held on Tue (10/25 2016).
|
175 |
+
*
|
176 |
+
* @todo Remove this hack once the base64 error is removed from the Theme Check.
|
177 |
+
*
|
178 |
+
* @since 1.2.2
|
179 |
+
* @author Vova Feldman (@svovaf)
|
180 |
+
*/
|
181 |
+
$fn = 'base64' . '_decode';
|
182 |
+
return $fn( strtr( $input, '-_', '+/' ) );
|
183 |
}
|
184 |
|
185 |
/**
|
186 |
* Base64 encoding that does not need to be urlencode()ed.
|
187 |
+
*
|
188 |
+
* Exactly the same as base64 encode except it uses
|
189 |
+
* `-` instead of `+
|
190 |
+
* `_` instead of `/`
|
191 |
*
|
192 |
* @param string $input string
|
193 |
*
|
194 |
+
* @return string Base64 encoded string
|
195 |
*/
|
196 |
protected static function Base64UrlEncode( $input ) {
|
197 |
+
/**
|
198 |
+
* IMPORTANT NOTE:
|
199 |
+
* This is a hack suggested by @otto42 and @greenshady from
|
200 |
+
* the theme's review team. The usage of base64 for API
|
201 |
+
* signature encoding was approved in a Slack meeting
|
202 |
+
* held on Tue (10/25 2016).
|
203 |
+
*
|
204 |
+
* @todo Remove this hack once the base64 error is removed from the Theme Check.
|
205 |
+
*
|
206 |
+
* @since 1.2.2
|
207 |
+
* @author Vova Feldman (@svovaf)
|
208 |
+
*/
|
209 |
+
$fn = 'base64' . '_encode';
|
210 |
+
$str = strtr( $fn( $input ), '+/', '-_' );
|
211 |
$str = str_replace( '=', '', $str );
|
212 |
|
213 |
return $str;
|
214 |
}
|
|
|
215 |
}
|
freemius/includes/sdk/{Freemius.php → FreemiusWordPress.php}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the GPL v2 (the "License"); you may
|
6 |
* not use this file except in compliance with the License. You may obtain
|
@@ -78,11 +78,11 @@
|
|
78 |
define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' );
|
79 |
}
|
80 |
|
81 |
-
if ( class_exists( '
|
82 |
return;
|
83 |
}
|
84 |
|
85 |
-
class
|
86 |
private static $_logger = array();
|
87 |
|
88 |
/**
|
@@ -172,32 +172,69 @@
|
|
172 |
/**
|
173 |
* Sign request with the following HTTP headers:
|
174 |
* Content-MD5: MD5(HTTP Request body)
|
175 |
-
* Date: Current date (i.e Sat, 14 Feb
|
176 |
* Authorization: FS {scope_entity_id}:{scope_entity_public_key}:base64encode(sha256(string_to_sign,
|
177 |
* {scope_entity_secret_key}))
|
178 |
*
|
179 |
* @param string $pResourceUrl
|
180 |
-
* @param array $
|
181 |
*
|
182 |
* @return array
|
183 |
*/
|
184 |
-
function SignRequest( $pResourceUrl, $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
$eol = "\n";
|
186 |
$content_md5 = '';
|
|
|
187 |
$now = ( time() - self::$_clock_diff );
|
188 |
$date = date( 'r', $now );
|
189 |
-
$content_type = '';
|
190 |
|
191 |
-
if (
|
192 |
-
$content_md5
|
193 |
-
$
|
194 |
-
$content_type = 'application/json';
|
195 |
}
|
196 |
|
197 |
-
$pCurlOptions[ CURLOPT_HTTPHEADER ][] = 'Date: ' . $date;
|
198 |
-
|
199 |
$string_to_sign = implode( $eol, array(
|
200 |
-
$
|
201 |
$content_md5,
|
202 |
$content_type,
|
203 |
$date,
|
@@ -208,20 +245,26 @@
|
|
208 |
// the signature uses public key hash encoding.
|
209 |
$auth_type = ( $this->_secret !== $this->_public ) ? 'FS' : 'FSP';
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
219 |
|
220 |
-
return $
|
221 |
}
|
222 |
|
223 |
/**
|
224 |
* Get API request URL signed via query string.
|
|
|
|
|
225 |
*
|
226 |
* @param string $pPath
|
227 |
*
|
@@ -229,72 +272,56 @@
|
|
229 |
*
|
230 |
* @return string
|
231 |
*/
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
|
236 |
-
|
237 |
-
$content_md5 = '';
|
238 |
-
$content_type = '';
|
239 |
-
$now = ( time() - self::$_clock_diff );
|
240 |
-
$date = date( 'r', $now );
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
// If secret and public keys are identical, it means that
|
251 |
-
// the signature uses public key hash encoding.
|
252 |
-
$auth_type = ( $this->_secret !== $this->_public ) ? 'FS' : 'FSP';
|
253 |
-
|
254 |
-
return Freemius_Api::GetUrl(
|
255 |
-
$pResourceUrl . '?' .
|
256 |
-
( 1 < count( $resource ) && ! empty( $resource[1] ) ? $resource[1] . '&' : '' ) .
|
257 |
-
http_build_query( array(
|
258 |
-
'auth_date' => $date,
|
259 |
-
'authorization' => $auth_type . ' ' . $this->_id . ':' .
|
260 |
-
$this->_public . ':' .
|
261 |
-
self::Base64UrlEncode( hash_hmac(
|
262 |
-
'sha256', $string_to_sign, $this->_secret
|
263 |
-
) )
|
264 |
-
) ), $this->_isSandbox );
|
265 |
-
}
|
266 |
|
267 |
/**
|
268 |
-
* @
|
269 |
-
*
|
|
|
|
|
270 |
*
|
271 |
* @return mixed
|
272 |
*/
|
273 |
-
private static function ExecuteRequest(
|
274 |
$start = microtime( true );
|
275 |
|
276 |
-
$
|
277 |
|
278 |
if ( FS_API__LOGGER_ON ) {
|
279 |
$end = microtime( true );
|
280 |
|
281 |
-
$has_body
|
|
|
282 |
|
283 |
self::$_logger[] = array(
|
284 |
'id' => count( self::$_logger ),
|
285 |
'start' => $start,
|
286 |
'end' => $end,
|
287 |
'total' => ( $end - $start ),
|
288 |
-
'method' => $
|
289 |
-
'path' => $
|
290 |
-
'body' => $has_body ? $
|
291 |
-
'result' => $
|
292 |
-
|
|
|
|
|
293 |
'backtrace' => debug_backtrace(),
|
294 |
);
|
295 |
}
|
296 |
|
297 |
-
return $
|
298 |
}
|
299 |
|
300 |
/**
|
@@ -308,7 +335,7 @@
|
|
308 |
* @param string $pCanonizedPath
|
309 |
* @param string $pMethod
|
310 |
* @param array $pParams
|
311 |
-
* @param null|
|
312 |
* @param bool $pIsSandbox
|
313 |
* @param null|callable $pBeforeExecutionFunction
|
314 |
*
|
@@ -320,14 +347,10 @@
|
|
320 |
$pCanonizedPath,
|
321 |
$pMethod = 'GET',
|
322 |
$pParams = array(),
|
323 |
-
$
|
324 |
$pIsSandbox = false,
|
325 |
$pBeforeExecutionFunction = null
|
326 |
) {
|
327 |
-
if ( ! FS_SDK__HAS_CURL ) {
|
328 |
-
self::ThrowNoCurlException();
|
329 |
-
}
|
330 |
-
|
331 |
// Connectivity errors simulation.
|
332 |
if ( FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
333 |
self::ThrowCloudFlareDDoSException();
|
@@ -335,105 +358,113 @@
|
|
335 |
self::ThrowSquidAclException();
|
336 |
}
|
337 |
|
338 |
-
if (
|
339 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
}
|
341 |
|
342 |
-
$
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
CURLOPT_HTTPHEADER => array(),
|
348 |
-
);
|
349 |
|
350 |
-
if (
|
351 |
if ( is_array( $pParams ) && 0 < count( $pParams ) ) {
|
352 |
-
$
|
353 |
-
$
|
354 |
-
$opts[ CURLOPT_POSTFIELDS ] = json_encode( $pParams );
|
355 |
}
|
356 |
-
|
357 |
-
$opts[ CURLOPT_RETURNTRANSFER ] = true;
|
358 |
}
|
359 |
|
360 |
$request_url = self::GetUrl( $pCanonizedPath, $pIsSandbox );
|
361 |
|
362 |
-
$opts[ CURLOPT_URL ] = $request_url;
|
363 |
-
$opts[ CURLOPT_CUSTOMREQUEST ] = $pMethod;
|
364 |
-
|
365 |
$resource = explode( '?', $pCanonizedPath );
|
366 |
|
367 |
-
// Disable the 'Expect: 100-continue' behaviour. This causes
|
368 |
// for 2 seconds if the server does not support this header.
|
369 |
-
$
|
370 |
|
371 |
if ( 'https' === substr( strtolower( $request_url ), 0, 5 ) ) {
|
372 |
-
$
|
373 |
-
$opts[ CURLOPT_SSL_VERIFYPEER ] = false;
|
374 |
}
|
375 |
|
376 |
if ( false !== $pBeforeExecutionFunction &&
|
377 |
is_callable( $pBeforeExecutionFunction )
|
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 |
}
|
408 |
}
|
409 |
-
}
|
410 |
|
411 |
-
|
412 |
-
|
|
|
413 |
}
|
414 |
|
415 |
-
|
416 |
|
417 |
-
if ( empty( $
|
418 |
return null;
|
419 |
}
|
420 |
|
421 |
-
$decoded = json_decode( $
|
422 |
|
423 |
if ( is_null( $decoded ) ) {
|
424 |
-
if ( preg_match( '/Please turn JavaScript on/i', $
|
425 |
-
preg_match( '/text\/javascript/', $
|
426 |
) {
|
427 |
-
self::ThrowCloudFlareDDoSException( $
|
428 |
-
} else if ( preg_match( '/Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect./', $
|
429 |
-
preg_match( '/squid/', $
|
430 |
) {
|
431 |
-
self::ThrowSquidAclException( $
|
432 |
} else {
|
433 |
$decoded = (object) array(
|
434 |
'error' => (object) array(
|
435 |
'type' => 'Unknown',
|
436 |
-
'message' => $
|
437 |
'code' => 'unknown',
|
438 |
'http' => 402
|
439 |
)
|
@@ -447,13 +478,13 @@
|
|
447 |
|
448 |
/**
|
449 |
* Makes an HTTP request. This method can be overridden by subclasses if
|
450 |
-
* developers want to do fancier things or use something other than
|
451 |
-
* make the request.
|
452 |
*
|
453 |
-
* @param string
|
454 |
-
* @param string
|
455 |
-
* @param array
|
456 |
-
* @param null|
|
457 |
*
|
458 |
* @return object[]|object|null
|
459 |
*
|
@@ -463,7 +494,7 @@
|
|
463 |
$pCanonizedPath,
|
464 |
$pMethod = 'GET',
|
465 |
$pParams = array(),
|
466 |
-
$
|
467 |
) {
|
468 |
$resource = explode( '?', $pCanonizedPath );
|
469 |
|
@@ -474,15 +505,32 @@
|
|
474 |
$pCanonizedPath,
|
475 |
$pMethod,
|
476 |
$pParams,
|
477 |
-
$
|
478 |
$this->_isSandbox,
|
479 |
$sign_request ? array( &$this, 'SignRequest' ) : null
|
480 |
);
|
481 |
}
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
#----------------------------------------------------------------------------------
|
484 |
#region Connectivity Test
|
485 |
#----------------------------------------------------------------------------------
|
|
|
486 |
/**
|
487 |
* If successful connectivity to the API endpoint using ping.json endpoint.
|
488 |
*
|
@@ -539,56 +587,83 @@
|
|
539 |
#----------------------------------------------------------------------------------
|
540 |
|
541 |
/**
|
542 |
-
* @param
|
543 |
*
|
544 |
-
* @
|
545 |
*/
|
546 |
-
private static function
|
547 |
-
$
|
548 |
-
'error' => array(
|
549 |
-
'code' => curl_errno( $pCurlHandler ),
|
550 |
-
'message' => curl_error( $pCurlHandler ),
|
551 |
-
'type' => 'CurlException',
|
552 |
-
),
|
553 |
-
) );
|
554 |
|
555 |
-
|
556 |
-
throw $e;
|
557 |
}
|
558 |
|
559 |
/**
|
560 |
-
* @param
|
561 |
*
|
562 |
* @throws Freemius_Exception
|
563 |
*/
|
564 |
-
private static function
|
565 |
-
$
|
566 |
-
'
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
|
|
|
|
|
|
|
|
574 |
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
}
|
582 |
|
583 |
-
throw
|
584 |
-
'error' => (object) array(
|
585 |
-
'type' => 'cUrlMissing',
|
586 |
-
'message' => $pResult,
|
587 |
-
'code' => 'curl_missing',
|
588 |
-
'http' => 402
|
589 |
-
),
|
590 |
-
'missing_methods' => $missing_methods,
|
591 |
-
) );
|
592 |
}
|
593 |
|
594 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Copyright 2016 Freemius, Inc.
|
4 |
*
|
5 |
* Licensed under the GPL v2 (the "License"); you may
|
6 |
* not use this file except in compliance with the License. You may obtain
|
78 |
define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' );
|
79 |
}
|
80 |
|
81 |
+
if ( class_exists( 'Freemius_Api_WordPress' ) ) {
|
82 |
return;
|
83 |
}
|
84 |
|
85 |
+
class Freemius_Api_WordPress extends Freemius_Api_Base {
|
86 |
private static $_logger = array();
|
87 |
|
88 |
/**
|
172 |
/**
|
173 |
* Sign request with the following HTTP headers:
|
174 |
* Content-MD5: MD5(HTTP Request body)
|
175 |
+
* Date: Current date (i.e Sat, 14 Feb 2016 20:24:46 +0000)
|
176 |
* Authorization: FS {scope_entity_id}:{scope_entity_public_key}:base64encode(sha256(string_to_sign,
|
177 |
* {scope_entity_secret_key}))
|
178 |
*
|
179 |
* @param string $pResourceUrl
|
180 |
+
* @param array $pWPRemoteArgs
|
181 |
*
|
182 |
* @return array
|
183 |
*/
|
184 |
+
function SignRequest( $pResourceUrl, $pWPRemoteArgs ) {
|
185 |
+
$auth = $this->GenerateAuthorizationParams(
|
186 |
+
$pResourceUrl,
|
187 |
+
$pWPRemoteArgs['method'],
|
188 |
+
! empty( $pWPRemoteArgs['body'] ) ? $pWPRemoteArgs['body'] : ''
|
189 |
+
);
|
190 |
+
|
191 |
+
$pWPRemoteArgs['headers']['Date'] = $auth['date'];
|
192 |
+
$pWPRemoteArgs['headers']['Authorization'] = $auth['authorization'];
|
193 |
+
|
194 |
+
if ( ! empty( $auth['content_md5'] ) ) {
|
195 |
+
$pWPRemoteArgs['headers']['Content-MD5'] = $auth['content_md5'];
|
196 |
+
}
|
197 |
+
|
198 |
+
return $pWPRemoteArgs;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Generate Authorization request headers:
|
203 |
+
*
|
204 |
+
* Content-MD5: MD5(HTTP Request body)
|
205 |
+
* Date: Current date (i.e Sat, 14 Feb 2016 20:24:46 +0000)
|
206 |
+
* Authorization: FS {scope_entity_id}:{scope_entity_public_key}:base64encode(sha256(string_to_sign,
|
207 |
+
* {scope_entity_secret_key}))
|
208 |
+
*
|
209 |
+
* @author Vova Feldman
|
210 |
+
*
|
211 |
+
* @param string $pResourceUrl
|
212 |
+
* @param string $pMethod
|
213 |
+
* @param string $pPostParams
|
214 |
+
*
|
215 |
+
* @return array
|
216 |
+
* @throws Freemius_Exception
|
217 |
+
*/
|
218 |
+
function GenerateAuthorizationParams(
|
219 |
+
$pResourceUrl,
|
220 |
+
$pMethod = 'GET',
|
221 |
+
$pPostParams = ''
|
222 |
+
) {
|
223 |
+
$pMethod = strtoupper( $pMethod );
|
224 |
+
|
225 |
$eol = "\n";
|
226 |
$content_md5 = '';
|
227 |
+
$content_type = '';
|
228 |
$now = ( time() - self::$_clock_diff );
|
229 |
$date = date( 'r', $now );
|
|
|
230 |
|
231 |
+
if ( in_array( $pMethod, array( 'POST', 'PUT' ) ) && ! empty( $pPostParams ) ) {
|
232 |
+
$content_md5 = md5( $pPostParams );
|
233 |
+
$content_type = 'application/json';
|
|
|
234 |
}
|
235 |
|
|
|
|
|
236 |
$string_to_sign = implode( $eol, array(
|
237 |
+
$pMethod,
|
238 |
$content_md5,
|
239 |
$content_type,
|
240 |
$date,
|
245 |
// the signature uses public key hash encoding.
|
246 |
$auth_type = ( $this->_secret !== $this->_public ) ? 'FS' : 'FSP';
|
247 |
|
248 |
+
$auth = array(
|
249 |
+
'date' => $date,
|
250 |
+
'authorization' => $auth_type . ' ' . $this->_id . ':' .
|
251 |
+
$this->_public . ':' .
|
252 |
+
self::Base64UrlEncode( hash_hmac(
|
253 |
+
'sha256', $string_to_sign, $this->_secret
|
254 |
+
) )
|
255 |
+
);
|
256 |
+
|
257 |
+
if ( ! empty( $content_md5 ) ) {
|
258 |
+
$auth['content_md5'] = $content_md5;
|
259 |
+
}
|
260 |
|
261 |
+
return $auth;
|
262 |
}
|
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
|
291 |
+
*
|
292 |
+
* @param string $pUrl
|
293 |
+
* @param array $pWPRemoteArgs
|
294 |
*
|
295 |
* @return mixed
|
296 |
*/
|
297 |
+
private static function ExecuteRequest( $pUrl, &$pWPRemoteArgs ) {
|
298 |
$start = microtime( true );
|
299 |
|
300 |
+
$response = wp_remote_request( $pUrl, $pWPRemoteArgs );
|
301 |
|
302 |
if ( FS_API__LOGGER_ON ) {
|
303 |
$end = microtime( true );
|
304 |
|
305 |
+
$has_body = ( isset( $pWPRemoteArgs['body'] ) && ! empty( $pWPRemoteArgs['body'] ) );
|
306 |
+
$is_http_error = is_wp_error( $response );
|
307 |
|
308 |
self::$_logger[] = array(
|
309 |
'id' => count( self::$_logger ),
|
310 |
'start' => $start,
|
311 |
'end' => $end,
|
312 |
'total' => ( $end - $start ),
|
313 |
+
'method' => $pWPRemoteArgs['method'],
|
314 |
+
'path' => $pUrl,
|
315 |
+
'body' => $has_body ? $pWPRemoteArgs['body'] : null,
|
316 |
+
'result' => ! $is_http_error ?
|
317 |
+
$response['body'] :
|
318 |
+
json_encode( $response->get_error_messages() ),
|
319 |
+
'code' => ! $is_http_error ? $response['response']['code'] : null,
|
320 |
'backtrace' => debug_backtrace(),
|
321 |
);
|
322 |
}
|
323 |
|
324 |
+
return $response;
|
325 |
}
|
326 |
|
327 |
/**
|
335 |
* @param string $pCanonizedPath
|
336 |
* @param string $pMethod
|
337 |
* @param array $pParams
|
338 |
+
* @param null|array $pWPRemoteArgs
|
339 |
* @param bool $pIsSandbox
|
340 |
* @param null|callable $pBeforeExecutionFunction
|
341 |
*
|
347 |
$pCanonizedPath,
|
348 |
$pMethod = 'GET',
|
349 |
$pParams = array(),
|
350 |
+
$pWPRemoteArgs = null,
|
351 |
$pIsSandbox = false,
|
352 |
$pBeforeExecutionFunction = null
|
353 |
) {
|
|
|
|
|
|
|
|
|
354 |
// Connectivity errors simulation.
|
355 |
if ( FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
356 |
self::ThrowCloudFlareDDoSException();
|
358 |
self::ThrowSquidAclException();
|
359 |
}
|
360 |
|
361 |
+
if ( empty( $pWPRemoteArgs ) ) {
|
362 |
+
$user_agent = 'Freemius/WordPress-SDK/' . Freemius_Api_Base::VERSION . '; ' .
|
363 |
+
home_url();
|
364 |
+
|
365 |
+
$pWPRemoteArgs = array(
|
366 |
+
'method' => strtoupper( $pMethod ),
|
367 |
+
'connect_timeout' => 10,
|
368 |
+
'timeout' => 60,
|
369 |
+
'follow_redirects' => true,
|
370 |
+
'redirection' => 5,
|
371 |
+
'user-agent' => $user_agent,
|
372 |
+
'blocking' => true,
|
373 |
+
);
|
374 |
}
|
375 |
|
376 |
+
if ( ! isset( $pWPRemoteArgs['headers'] ) ||
|
377 |
+
! is_array( $pWPRemoteArgs['headers'] )
|
378 |
+
) {
|
379 |
+
$pWPRemoteArgs['headers'] = array();
|
380 |
+
}
|
|
|
|
|
381 |
|
382 |
+
if ( in_array( $pMethod, array( 'POST', 'PUT' ) ) ) {
|
383 |
if ( is_array( $pParams ) && 0 < count( $pParams ) ) {
|
384 |
+
$pWPRemoteArgs['headers']['Content-type'] = 'application/json';
|
385 |
+
$pWPRemoteArgs['body'] = json_encode( $pParams );
|
|
|
386 |
}
|
|
|
|
|
387 |
}
|
388 |
|
389 |
$request_url = self::GetUrl( $pCanonizedPath, $pIsSandbox );
|
390 |
|
|
|
|
|
|
|
391 |
$resource = explode( '?', $pCanonizedPath );
|
392 |
|
393 |
+
// Disable the 'Expect: 100-continue' behaviour. This causes cURL to wait
|
394 |
// for 2 seconds if the server does not support this header.
|
395 |
+
$pWPRemoteArgs['headers']['Expect'] = '';
|
396 |
|
397 |
if ( 'https' === substr( strtolower( $request_url ), 0, 5 ) ) {
|
398 |
+
$pWPRemoteArgs['sslverify'] = false;
|
|
|
399 |
}
|
400 |
|
401 |
if ( false !== $pBeforeExecutionFunction &&
|
402 |
is_callable( $pBeforeExecutionFunction )
|
403 |
) {
|
404 |
+
$pWPRemoteArgs = call_user_func( $pBeforeExecutionFunction, $resource[0], $pWPRemoteArgs );
|
405 |
}
|
406 |
|
407 |
+
$result = self::ExecuteRequest( $request_url, $pWPRemoteArgs );
|
408 |
+
|
409 |
+
if ( is_wp_error( $result ) ) {
|
410 |
+
/**
|
411 |
+
* @var WP_Error $result
|
412 |
+
*/
|
413 |
+
if ( self::IsCurlError( $result ) ) {
|
414 |
+
/**
|
415 |
+
* With dual stacked DNS responses, it's possible for a server to
|
416 |
+
* have IPv6 enabled but not have IPv6 connectivity. If this is
|
417 |
+
* the case, cURL will try IPv4 first and if that fails, then it will
|
418 |
+
* fall back to IPv6 and the error EHOSTUNREACH is returned by the
|
419 |
+
* operating system.
|
420 |
+
*/
|
421 |
+
$matches = array();
|
422 |
+
$regex = '/Failed to connect to ([^:].*): Network is unreachable/';
|
423 |
+
if ( preg_match( $regex, $result->get_error_message( 'http_request_failed' ), $matches ) ) {
|
424 |
+
/**
|
425 |
+
* Validate IP before calling `inet_pton()` to avoid PHP un-catchable warning.
|
426 |
+
* @author Vova Feldman (@svovaf)
|
427 |
+
*/
|
428 |
+
if ( filter_var( $matches[1], FILTER_VALIDATE_IP ) ) {
|
429 |
+
if ( strlen( inet_pton( $matches[1] ) ) === 16 ) {
|
430 |
+
// error_log('Invalid IPv6 configuration on server, Please disable or get native IPv6 on your server.');
|
431 |
+
// Hook to an action triggered just before cURL is executed to resolve the IP version to v4.
|
432 |
+
add_action( 'http_api_curl', 'Freemius_Api_WordPress::CurlResolveToIPv4', 10, 1 );
|
433 |
+
|
434 |
+
// Re-run request.
|
435 |
+
$result = self::ExecuteRequest( $request_url, $pWPRemoteArgs );
|
436 |
+
}
|
437 |
+
}
|
438 |
}
|
439 |
}
|
|
|
440 |
|
441 |
+
if ( is_wp_error( $result ) ) {
|
442 |
+
self::ThrowWPRemoteException( $result );
|
443 |
+
}
|
444 |
}
|
445 |
|
446 |
+
$response_body = $result['body'];
|
447 |
|
448 |
+
if ( empty( $response_body ) ) {
|
449 |
return null;
|
450 |
}
|
451 |
|
452 |
+
$decoded = json_decode( $response_body );
|
453 |
|
454 |
if ( is_null( $decoded ) ) {
|
455 |
+
if ( preg_match( '/Please turn JavaScript on/i', $response_body ) &&
|
456 |
+
preg_match( '/text\/javascript/', $response_body )
|
457 |
) {
|
458 |
+
self::ThrowCloudFlareDDoSException( $response_body );
|
459 |
+
} else if ( preg_match( '/Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect./', $response_body ) &&
|
460 |
+
preg_match( '/squid/', $response_body )
|
461 |
) {
|
462 |
+
self::ThrowSquidAclException( $response_body );
|
463 |
} else {
|
464 |
$decoded = (object) array(
|
465 |
'error' => (object) array(
|
466 |
'type' => 'Unknown',
|
467 |
+
'message' => $response_body,
|
468 |
'code' => 'unknown',
|
469 |
'http' => 402
|
470 |
)
|
478 |
|
479 |
/**
|
480 |
* Makes an HTTP request. This method can be overridden by subclasses if
|
481 |
+
* developers want to do fancier things or use something other than wp_remote_request()
|
482 |
+
* to make the request.
|
483 |
*
|
484 |
+
* @param string $pCanonizedPath The URL to make the request to
|
485 |
+
* @param string $pMethod HTTP method
|
486 |
+
* @param array $pParams The parameters to use for the POST body
|
487 |
+
* @param null|array $pWPRemoteArgs wp_remote_request options.
|
488 |
*
|
489 |
* @return object[]|object|null
|
490 |
*
|
494 |
$pCanonizedPath,
|
495 |
$pMethod = 'GET',
|
496 |
$pParams = array(),
|
497 |
+
$pWPRemoteArgs = null
|
498 |
) {
|
499 |
$resource = explode( '?', $pCanonizedPath );
|
500 |
|
505 |
$pCanonizedPath,
|
506 |
$pMethod,
|
507 |
$pParams,
|
508 |
+
$pWPRemoteArgs,
|
509 |
$this->_isSandbox,
|
510 |
$sign_request ? array( &$this, 'SignRequest' ) : null
|
511 |
);
|
512 |
}
|
513 |
|
514 |
+
/**
|
515 |
+
* Sets CURLOPT_IPRESOLVE to CURL_IPRESOLVE_V4 for cURL-Handle provided as parameter
|
516 |
+
*
|
517 |
+
* @param resource $handle A cURL handle returned by curl_init()
|
518 |
+
*
|
519 |
+
* @return resource $handle A cURL handle returned by curl_init() with CURLOPT_IPRESOLVE set to
|
520 |
+
* CURL_IPRESOLVE_V4
|
521 |
+
*
|
522 |
+
* @link https://gist.github.com/golderweb/3a2aaec2d56125cc004e
|
523 |
+
*/
|
524 |
+
static function CurlResolveToIPv4( $handle ) {
|
525 |
+
curl_setopt( $handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
|
526 |
+
|
527 |
+
return $handle;
|
528 |
+
}
|
529 |
+
|
530 |
#----------------------------------------------------------------------------------
|
531 |
#region Connectivity Test
|
532 |
#----------------------------------------------------------------------------------
|
533 |
+
|
534 |
/**
|
535 |
* If successful connectivity to the API endpoint using ping.json endpoint.
|
536 |
*
|
587 |
#----------------------------------------------------------------------------------
|
588 |
|
589 |
/**
|
590 |
+
* @param \WP_Error $pError
|
591 |
*
|
592 |
+
* @return bool
|
593 |
*/
|
594 |
+
private static function IsCurlError( WP_Error $pError ) {
|
595 |
+
$message = $pError->get_error_message( 'http_request_failed' );
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
|
597 |
+
return ( 0 === strpos( $message, 'cURL' ) );
|
|
|
598 |
}
|
599 |
|
600 |
/**
|
601 |
+
* @param WP_Error $pError
|
602 |
*
|
603 |
* @throws Freemius_Exception
|
604 |
*/
|
605 |
+
private static function ThrowWPRemoteException( WP_Error $pError ) {
|
606 |
+
if ( self::IsCurlError( $pError ) ) {
|
607 |
+
$message = $pError->get_error_message( 'http_request_failed' );
|
608 |
+
|
609 |
+
#region Check if there are any missing cURL methods.
|
610 |
+
|
611 |
+
$curl_required_methods = array(
|
612 |
+
'curl_version',
|
613 |
+
'curl_exec',
|
614 |
+
'curl_init',
|
615 |
+
'curl_close',
|
616 |
+
'curl_setopt',
|
617 |
+
'curl_setopt_array',
|
618 |
+
'curl_error',
|
619 |
+
);
|
620 |
|
621 |
+
// Find all missing methods.
|
622 |
+
$missing_methods = array();
|
623 |
+
foreach ( $curl_required_methods as $m ) {
|
624 |
+
if ( ! function_exists( $m ) ) {
|
625 |
+
$missing_methods[] = $m;
|
626 |
+
}
|
627 |
+
}
|
628 |
+
|
629 |
+
if ( ! empty( $missing_methods ) ) {
|
630 |
+
throw new Freemius_Exception( array(
|
631 |
+
'error' => (object) array(
|
632 |
+
'type' => 'cUrlMissing',
|
633 |
+
'message' => $message,
|
634 |
+
'code' => 'curl_missing',
|
635 |
+
'http' => 402
|
636 |
+
),
|
637 |
+
'missing_methods' => $missing_methods,
|
638 |
+
) );
|
639 |
}
|
640 |
+
|
641 |
+
#endregion
|
642 |
+
|
643 |
+
// cURL error - "cURL error {{errno}}: {{error}}".
|
644 |
+
$parts = explode( ':', substr( $message, strlen( 'cURL error ' ) ), 2 );
|
645 |
+
|
646 |
+
$code = ( 0 < count( $parts ) ) ? $parts[0] : 'http_request_failed';
|
647 |
+
$message = ( 1 < count( $parts ) ) ? $parts[1] : $message;
|
648 |
+
|
649 |
+
$e = new Freemius_Exception( array(
|
650 |
+
'error' => array(
|
651 |
+
'code' => $code,
|
652 |
+
'message' => $message,
|
653 |
+
'type' => 'CurlException',
|
654 |
+
),
|
655 |
+
) );
|
656 |
+
} else {
|
657 |
+
$e = new Freemius_Exception( array(
|
658 |
+
'error' => array(
|
659 |
+
'code' => $pError->get_error_code(),
|
660 |
+
'message' => $pError->get_error_message(),
|
661 |
+
'type' => 'WPRemoteException',
|
662 |
+
),
|
663 |
+
) );
|
664 |
}
|
665 |
|
666 |
+
throw $e;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
667 |
}
|
668 |
|
669 |
/**
|
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
|
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.mo
CHANGED
Binary file
|
freemius/languages/freemius-da_DK.po
CHANGED
@@ -7,7 +7,7 @@ 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-
|
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"
|
@@ -26,8 +26,8 @@ msgid "Account"
|
|
26 |
msgstr "Konto"
|
27 |
|
28 |
#: includes/i18n.php:38
|
29 |
-
msgid "Add
|
30 |
-
msgstr "
|
31 |
|
32 |
#: includes/i18n.php:39
|
33 |
msgid "Contact Us"
|
@@ -50,8 +50,8 @@ msgid "Support Forum"
|
|
50 |
msgstr "Supportforum"
|
51 |
|
52 |
#: includes/i18n.php:44
|
53 |
-
msgid "Add
|
54 |
-
msgstr "
|
55 |
|
56 |
#: includes/i18n.php:45
|
57 |
msgctxt "verb"
|
@@ -84,7 +84,7 @@ msgstr "Nedgrader"
|
|
84 |
#: includes/i18n.php:51
|
85 |
msgctxt "verb"
|
86 |
msgid "Cancel Subscription"
|
87 |
-
msgstr "
|
88 |
|
89 |
#: includes/i18n.php:52
|
90 |
msgid "Cancel Trial"
|
@@ -268,8 +268,8 @@ 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
|
272 |
-
msgstr "
|
273 |
|
274 |
#: includes/i18n.php:95
|
275 |
msgid "Opt-in to make \"%s\" Better!"
|
@@ -413,1378 +413,1414 @@ msgid "Users"
|
|
413 |
msgstr "Brugere"
|
414 |
|
415 |
#: includes/i18n.php:131
|
416 |
-
msgid "Plugin Installs"
|
417 |
-
msgstr "Plugin-installationer"
|
418 |
-
|
419 |
-
#: includes/i18n.php:132
|
420 |
msgid "%s Installs"
|
421 |
msgstr "%s installeringer"
|
422 |
|
423 |
-
#: includes/i18n.php:
|
424 |
msgctxt "like websites"
|
425 |
msgid "Sites"
|
426 |
msgstr "Websteder"
|
427 |
|
428 |
-
#: includes/i18n.php:
|
429 |
msgid "User ID"
|
430 |
msgstr "Bruger-ID"
|
431 |
|
432 |
-
#: includes/i18n.php:
|
433 |
msgid "Site ID"
|
434 |
msgstr "Websteds-ID"
|
435 |
|
436 |
-
#: includes/i18n.php:
|
437 |
msgid "Public Key"
|
438 |
msgstr "Offentlig nøgle"
|
439 |
|
440 |
-
#: includes/i18n.php:
|
441 |
msgid "Secret Key"
|
442 |
msgstr "Privat nøgle"
|
443 |
|
444 |
-
#: includes/i18n.php:
|
445 |
msgctxt "as secret encryption key missing"
|
446 |
msgid "No Secret"
|
447 |
msgstr "Ingen privat nøgle"
|
448 |
|
449 |
-
#: includes/i18n.php:
|
450 |
msgid "No ID"
|
451 |
msgstr "Intet ID"
|
452 |
|
453 |
-
#: includes/i18n.php:
|
454 |
msgctxt "as synchronize license"
|
455 |
msgid "Sync License"
|
456 |
msgstr "Synkroniser licens"
|
457 |
|
458 |
-
#: includes/i18n.php:
|
459 |
msgctxt "as synchronize"
|
460 |
msgid "Sync"
|
461 |
msgstr "Synkroniser"
|
462 |
|
463 |
-
#: includes/i18n.php:
|
464 |
msgid "Activate License"
|
465 |
msgstr "Aktiver licens"
|
466 |
|
467 |
-
#: includes/i18n.php:
|
468 |
msgid "Activate Free Version"
|
469 |
msgstr "Aktiver gratis version"
|
470 |
|
471 |
-
#: includes/i18n.php:
|
472 |
msgid "Please enter the license key that you received in the email right after the purchase:"
|
473 |
msgstr "Please enter the license key that you received in the email right after the purchase:"
|
474 |
|
475 |
-
#: includes/i18n.php:
|
476 |
msgid "Activating license..."
|
477 |
msgstr "Aktiverer licens..."
|
478 |
|
479 |
-
#: includes/i18n.php:
|
480 |
msgid "Change License"
|
481 |
msgstr "Skift licens"
|
482 |
|
483 |
-
#: includes/i18n.php:
|
484 |
msgid "Update License"
|
485 |
msgstr "Opdater licens"
|
486 |
|
487 |
-
#: includes/i18n.php:
|
488 |
msgid "Deactivate License"
|
489 |
msgstr "Deaktiver licens"
|
490 |
|
491 |
-
#: includes/i18n.php:
|
492 |
msgid "Activate"
|
493 |
msgstr "Aktiver"
|
494 |
|
495 |
-
#: includes/i18n.php:
|
496 |
msgid "Deactivate"
|
497 |
msgstr "Deaktiver"
|
498 |
|
499 |
-
#: includes/i18n.php:
|
500 |
msgid "Skip & Deactivate"
|
501 |
msgstr "Spring over & deaktiver"
|
502 |
|
503 |
-
#: includes/i18n.php:
|
504 |
msgid "Skip & %s"
|
505 |
msgstr "Spring over & %s"
|
506 |
|
507 |
-
#: includes/i18n.php:
|
508 |
msgid "No - just deactivate"
|
509 |
msgstr "Nej - bare deaktiver"
|
510 |
|
511 |
-
#: includes/i18n.php:
|
512 |
msgid "Yes - do your thing"
|
513 |
msgstr "Yes - do your thing"
|
514 |
|
515 |
-
#: includes/i18n.php:
|
516 |
msgctxt "active mode"
|
517 |
msgid "Active"
|
518 |
msgstr "Aktiv"
|
519 |
|
520 |
-
#: includes/i18n.php:
|
521 |
msgctxt "is active mode?"
|
522 |
msgid "Is Active"
|
523 |
msgstr "Er aktiv"
|
524 |
|
525 |
-
#: includes/i18n.php:
|
526 |
msgid "Install Now"
|
527 |
msgstr "Installer nu"
|
528 |
|
529 |
-
#: includes/i18n.php:
|
530 |
msgid "Install Update Now"
|
531 |
msgstr "Installer opdatering nu"
|
532 |
|
533 |
-
#: includes/i18n.php:
|
534 |
msgid "More information about %s"
|
535 |
msgstr "Mere information om %s"
|
536 |
|
537 |
-
#: includes/i18n.php:
|
538 |
msgid "Localhost"
|
539 |
msgstr "Localhost"
|
540 |
|
541 |
-
#: includes/i18n.php:
|
542 |
msgctxt "as activate Professional plan"
|
543 |
msgid "Activate %s Plan"
|
544 |
-
msgstr "Aktiver
|
545 |
|
546 |
-
#: includes/i18n.php:
|
547 |
msgctxt "as 5 licenses left"
|
548 |
msgid "%s left"
|
549 |
msgstr "%s tilbage"
|
550 |
|
551 |
-
#: includes/i18n.php:
|
552 |
msgid "Last license"
|
553 |
msgstr "Seneste license"
|
554 |
|
555 |
-
#: includes/i18n.php:
|
556 |
msgid "What is your %s?"
|
557 |
msgstr "What is your %s?"
|
558 |
|
559 |
-
#: includes/i18n.php:
|
560 |
msgid "Activate this add-on"
|
561 |
msgstr "Aktiver denne tilføjelse"
|
562 |
|
563 |
-
#: includes/i18n.php:
|
564 |
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?"
|
565 |
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?"
|
566 |
|
567 |
-
#: includes/i18n.php:
|
568 |
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?"
|
569 |
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?"
|
570 |
|
571 |
-
#: includes/i18n.php:
|
572 |
-
msgid "Deletion is not temporary. Only delete if you no longer want to use this
|
573 |
-
msgstr "Deletion is not temporary. Only delete if you no longer want to use this
|
574 |
|
575 |
-
#: includes/i18n.php:
|
576 |
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
577 |
msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
578 |
|
579 |
-
#: includes/i18n.php:
|
580 |
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
581 |
msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
582 |
|
583 |
-
#: includes/i18n.php:
|
584 |
-
msgid "You can still enjoy all %s features but you will not have access to
|
585 |
-
msgstr "You can still enjoy all %s features but you will not have access to
|
586 |
|
587 |
-
#: includes/i18n.php:
|
588 |
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
589 |
msgstr "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
590 |
|
591 |
-
#: includes/i18n.php:
|
592 |
msgid "Are you sure you want to proceed?"
|
593 |
msgstr "Er du sikker på, du vil fortsætte?"
|
594 |
|
595 |
-
#: includes/i18n.php:
|
596 |
msgid "Add Ons for %s"
|
597 |
msgstr "Tilføjelser til %s"
|
598 |
|
599 |
-
#: includes/i18n.php:
|
600 |
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."
|
601 |
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."
|
602 |
|
603 |
-
#: includes/i18n.php:
|
604 |
msgid "Anonymous feedback"
|
605 |
msgstr "Anonym feedback"
|
606 |
|
607 |
-
#: includes/i18n.php:
|
608 |
msgid "Quick feedback"
|
609 |
msgstr "Hurtig feedback"
|
610 |
|
|
|
|
|
|
|
|
|
611 |
#: includes/i18n.php:181
|
612 |
-
msgid "
|
613 |
-
msgstr "
|
614 |
|
615 |
#: includes/i18n.php:182
|
616 |
-
msgid "
|
617 |
-
msgstr "
|
618 |
|
619 |
#: includes/i18n.php:183
|
620 |
-
msgid "
|
621 |
-
msgstr "
|
622 |
|
623 |
#: includes/i18n.php:184
|
624 |
-
msgid "
|
625 |
-
msgstr "
|
626 |
|
627 |
#: includes/i18n.php:185
|
628 |
-
msgid "
|
629 |
-
msgstr "
|
630 |
|
631 |
#: includes/i18n.php:186
|
632 |
-
msgid "
|
633 |
-
msgstr "
|
634 |
|
635 |
#: includes/i18n.php:187
|
636 |
-
msgid "
|
637 |
-
msgstr "
|
638 |
|
639 |
#: includes/i18n.php:188
|
640 |
-
msgid "
|
641 |
-
msgstr "
|
642 |
|
643 |
#: includes/i18n.php:189
|
644 |
-
msgid "
|
645 |
-
msgstr "
|
646 |
|
647 |
#: includes/i18n.php:190
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
msgid "I can't pay for it anymore"
|
649 |
msgstr "Jeg kan ikke længere betale for det"
|
650 |
|
651 |
-
#: includes/i18n.php:
|
652 |
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
653 |
msgstr "Det er en midlertidig deaktivering. Jeg prøver at fejlfinde et problem."
|
654 |
|
655 |
-
#: includes/i18n.php:
|
|
|
|
|
|
|
|
|
656 |
msgctxt ""
|
657 |
msgid "Other"
|
658 |
-
msgstr "
|
659 |
|
660 |
-
#: includes/i18n.php:
|
661 |
msgid "Kindly tell us the reason so we can improve."
|
662 |
msgstr "Fortæl os venligst årsagen, så vi kan forbedre det."
|
663 |
|
664 |
-
#: includes/i18n.php:
|
665 |
-
msgid "What's the
|
666 |
-
msgstr "
|
667 |
|
668 |
-
#: includes/i18n.php:
|
669 |
msgid "What price would you feel comfortable paying?"
|
670 |
msgstr "What price would you feel comfortable paying?"
|
671 |
|
672 |
-
#: includes/i18n.php:
|
673 |
msgid "I couldn't understand how to make it work"
|
674 |
msgstr "Jeg forstod ikke, hvordan jeg skulle få det til at fungere."
|
675 |
|
676 |
-
#: includes/i18n.php:
|
677 |
-
msgid "The
|
678 |
-
msgstr "
|
679 |
|
680 |
-
#: includes/i18n.php:
|
681 |
-
msgid "The
|
682 |
-
msgstr "
|
683 |
|
684 |
-
#: includes/i18n.php:
|
685 |
msgid "It's not what I was looking for"
|
686 |
msgstr "Det er ikke, hvad jeg søgte"
|
687 |
|
688 |
-
#: includes/i18n.php:
|
689 |
-
msgid "The
|
690 |
-
msgstr "
|
691 |
|
692 |
-
#: includes/i18n.php:
|
693 |
msgid "What feature?"
|
694 |
msgstr "Hvilken feature?"
|
695 |
|
696 |
-
#: includes/i18n.php:
|
697 |
msgid "Kindly share what didn't work so we can fix it for future users..."
|
698 |
msgstr "Kindly share what didn't work so we can fix it for future users..."
|
699 |
|
700 |
-
#: includes/i18n.php:
|
701 |
msgid "What you've been looking for?"
|
702 |
msgstr "What you've been looking for?"
|
703 |
|
704 |
-
#: includes/i18n.php:
|
705 |
msgid "What did you expect?"
|
706 |
msgstr "Hvad forventede du?"
|
707 |
|
708 |
-
#: includes/i18n.php:
|
709 |
-
msgid "The
|
710 |
-
msgstr "
|
711 |
|
712 |
-
#: includes/i18n.php:
|
713 |
msgid "I don't like to share my information with you"
|
714 |
msgstr "I don't like to share my information with you"
|
715 |
|
716 |
-
#: includes/i18n.php:
|
717 |
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
718 |
msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
719 |
|
720 |
-
#: includes/i18n.php:
|
721 |
msgctxt "greeting"
|
722 |
msgid "Hey %s,"
|
723 |
msgstr "Hey %s,"
|
724 |
|
725 |
-
#: includes/i18n.php:
|
726 |
msgctxt "a greeting. E.g. Thanks John!"
|
727 |
msgid "Thanks %s!"
|
728 |
msgstr "Tak %s!"
|
729 |
|
730 |
-
#: includes/i18n.php:
|
731 |
msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
732 |
msgstr "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
733 |
|
734 |
-
#: includes/i18n.php:
|
735 |
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."
|
736 |
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."
|
737 |
|
738 |
-
#: includes/i18n.php:
|
739 |
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."
|
740 |
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."
|
741 |
|
742 |
-
#: includes/i18n.php:
|
743 |
msgid "complete the install"
|
744 |
msgstr "færdiggør installeringen"
|
745 |
|
746 |
-
#: includes/i18n.php:
|
747 |
msgid "start the trial"
|
748 |
msgstr "start prøveperioden"
|
749 |
|
750 |
-
#: includes/i18n.php:
|
751 |
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
752 |
msgstr "Thanks for purchasing %s! To get started, please enter your license key:"
|
753 |
|
754 |
-
#: includes/i18n.php:
|
755 |
-
msgid "The
|
756 |
-
msgstr "The
|
757 |
|
758 |
-
#: includes/i18n.php:
|
759 |
msgid "What permissions are being granted?"
|
760 |
msgstr "Hvilke tilladelser bliver givet?"
|
761 |
|
762 |
-
#: includes/i18n.php:
|
763 |
msgid "Your Profile Overview"
|
764 |
msgstr "Overblik af din profil"
|
765 |
|
766 |
-
#: includes/i18n.php:
|
767 |
msgid "Name and email address"
|
768 |
msgstr "Navn og e-mailadresse"
|
769 |
|
770 |
-
#: includes/i18n.php:
|
771 |
msgid "Your Site Overview"
|
772 |
msgstr "Overblik af dit websted"
|
773 |
|
774 |
-
#: includes/i18n.php:
|
775 |
msgid "Site URL, WP version, PHP info, plugins & themes"
|
776 |
msgstr "Websteds-URL, WP version, PHP info, plugins og temaer"
|
777 |
|
778 |
-
#: includes/i18n.php:
|
779 |
-
msgid "Current
|
780 |
-
msgstr "
|
781 |
|
782 |
-
#: includes/i18n.php:
|
783 |
msgid "Activation, deactivation and uninstall"
|
784 |
msgstr "Aktivering, deaktivering og afinstallering"
|
785 |
|
786 |
-
#: includes/i18n.php:
|
787 |
msgid "Plugins & Themes"
|
788 |
msgstr "Plugins & Temaer"
|
789 |
|
790 |
-
#: includes/i18n.php:
|
791 |
msgid "Titles, versions and state."
|
792 |
msgstr "Titler, versioner og tilstand."
|
793 |
|
794 |
-
#: includes/i18n.php:
|
795 |
msgid "Admin Notices"
|
796 |
msgstr "Admin Notices"
|
797 |
|
798 |
-
#: includes/i18n.php:
|
799 |
msgid "Newsletter"
|
800 |
msgstr "Nyhedsbrev"
|
801 |
|
802 |
-
#: includes/i18n.php:
|
803 |
msgid "Updates, announcements, marketing, no spam"
|
804 |
msgstr "Updates, announcements, marketing, no spam"
|
805 |
|
806 |
-
#: includes/i18n.php:
|
807 |
msgid "Privacy Policy"
|
808 |
msgstr "Privatlivspolitik"
|
809 |
|
810 |
-
#: includes/i18n.php:
|
811 |
msgid "Terms of Service"
|
812 |
msgstr "Servicevilkår"
|
813 |
|
814 |
-
#: includes/i18n.php:
|
815 |
msgctxt "as activating plugin"
|
816 |
msgid "Activating"
|
817 |
msgstr "Aktiverer"
|
818 |
|
819 |
-
#: includes/i18n.php:
|
820 |
msgctxt "as in the process of sending an email"
|
821 |
msgid "Sending email"
|
822 |
msgstr "Sender e-mail"
|
823 |
|
824 |
-
#: includes/i18n.php:
|
825 |
msgctxt "button label"
|
826 |
msgid "Allow & Continue"
|
827 |
msgstr "Tillad & Fortsæt"
|
828 |
|
829 |
-
#: includes/i18n.php:
|
830 |
msgctxt "button label"
|
831 |
msgid "Agree & Activate License"
|
832 |
msgstr "Accepter & aktiver licens"
|
833 |
|
834 |
-
#: includes/i18n.php:
|
835 |
msgctxt "verb"
|
836 |
msgid "Skip"
|
837 |
msgstr "Spring over"
|
838 |
|
839 |
-
#: includes/i18n.php:
|
840 |
msgid "Click here to use the plugin anonymously"
|
841 |
msgstr "Klik her for at benytte pluginnet anonymt"
|
842 |
|
843 |
-
#: includes/i18n.php:
|
844 |
msgid "Re-send activation email"
|
845 |
msgstr "Gensend e-mail om aktivering"
|
846 |
|
847 |
-
#: includes/i18n.php:
|
848 |
msgid "License key"
|
849 |
msgstr "Licensnøgle"
|
850 |
|
851 |
-
#: includes/i18n.php:
|
852 |
msgid "Send License Key"
|
853 |
msgstr "Send licensnøgle"
|
854 |
|
855 |
-
#: includes/i18n.php:
|
856 |
msgid "Sending license key"
|
857 |
msgstr "Sender licensnøgle"
|
858 |
|
859 |
-
#: includes/i18n.php:
|
860 |
msgid "Have a license key?"
|
861 |
msgstr "Har du en licensnøgle?"
|
862 |
|
863 |
-
#: includes/i18n.php:
|
864 |
msgid "Don't have a license key?"
|
865 |
msgstr "Har du ikke en licensnøgle?"
|
866 |
|
867 |
-
#: includes/i18n.php:
|
868 |
msgid "Can't find your license key?"
|
869 |
msgstr "Kan du ikke finde din licensnøgle?"
|
870 |
|
871 |
-
#: includes/i18n.php:
|
872 |
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
873 |
msgstr "We couldn't find your email address in the system, are you sure it's the right address?"
|
874 |
|
875 |
-
#: includes/i18n.php:
|
876 |
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
877 |
msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
878 |
|
879 |
-
#: includes/i18n.php:
|
880 |
msgid "Opt In"
|
881 |
msgstr "Tilmeld"
|
882 |
|
883 |
-
#: includes/i18n.php:
|
884 |
msgid "Opt Out"
|
885 |
msgstr "Frameld"
|
886 |
|
887 |
-
#: includes/i18n.php:
|
888 |
msgid "On second thought - I want to continue helping"
|
889 |
msgstr "Ved nærmere eftertanke - Jeg vil fortsætte med at hjælpe"
|
890 |
|
891 |
-
#: includes/i18n.php:
|
892 |
msgid "Opting out..."
|
893 |
msgstr "Framelder..."
|
894 |
|
895 |
-
#: includes/i18n.php:
|
896 |
msgid "Opting in..."
|
897 |
msgstr "Tilmelder..."
|
898 |
|
899 |
-
#: includes/i18n.php:
|
900 |
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
901 |
msgstr "We appreciate your help in making the %s better by letting us track some usage data."
|
902 |
|
903 |
-
#: includes/i18n.php:
|
904 |
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."
|
905 |
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."
|
906 |
|
907 |
-
#: includes/i18n.php:
|
908 |
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
909 |
msgstr "Ved at klikke \"Frameld\" vil vi ikke længere sende data fra %s til %s."
|
910 |
|
911 |
-
#: includes/i18n.php:
|
912 |
msgid "Screenshots"
|
913 |
msgstr "Skærmbilleder"
|
914 |
|
915 |
-
#: includes/i18n.php:
|
916 |
msgid "Click to view full-size screenshot %d"
|
917 |
msgstr "Click to view full-size screenshot %d"
|
918 |
|
919 |
-
#: includes/i18n.php:
|
920 |
msgid "Freemius Debug"
|
921 |
msgstr "Freemius Debug"
|
922 |
|
923 |
-
#: includes/i18n.php:
|
924 |
msgctxt "as turned on"
|
925 |
msgid "On"
|
926 |
msgstr "Til"
|
927 |
|
928 |
-
#: includes/i18n.php:
|
929 |
msgctxt "as turned off"
|
930 |
msgid "Off"
|
931 |
msgstr "Fra"
|
932 |
|
933 |
-
#: includes/i18n.php:
|
934 |
msgctxt "as code debugging"
|
935 |
msgid "Debugging"
|
936 |
msgstr "Fejlfinding"
|
937 |
|
938 |
-
#: includes/i18n.php:
|
939 |
msgid "Freemius State"
|
940 |
msgstr "Freemius tilstand"
|
941 |
|
942 |
-
#: includes/i18n.php:
|
943 |
msgctxt "as connection was successful"
|
944 |
msgid "Connected"
|
945 |
msgstr "Forbundet"
|
946 |
|
947 |
-
#: includes/i18n.php:
|
948 |
msgctxt "as connection blocked"
|
949 |
msgid "Blocked"
|
950 |
msgstr "Blokeret"
|
951 |
|
952 |
-
#: includes/i18n.php:
|
953 |
msgctxt "as application program interface"
|
954 |
msgid "API"
|
955 |
msgstr "API"
|
956 |
|
957 |
-
#: includes/i18n.php:
|
958 |
msgctxt "as software development kit versions"
|
959 |
msgid "SDK"
|
960 |
msgstr "SDK"
|
961 |
|
962 |
-
#: includes/i18n.php:
|
963 |
msgctxt "as software development kit versions"
|
964 |
msgid "SDK Versions"
|
965 |
msgstr "SDK-versioner"
|
966 |
|
967 |
-
#: includes/i18n.php:
|
968 |
msgctxt "as plugin folder path"
|
969 |
msgid "Plugin Path"
|
970 |
msgstr "Plugin-sti"
|
971 |
|
972 |
-
#: includes/i18n.php:
|
973 |
msgctxt "as sdk path"
|
974 |
msgid "SDK Path"
|
975 |
msgstr "SDK-sti"
|
976 |
|
977 |
-
#: includes/i18n.php:
|
978 |
msgid "Add Ons of Plugin %s"
|
979 |
msgstr "Tilføjelser til plugin %s"
|
980 |
|
981 |
-
#: includes/i18n.php:
|
982 |
msgid "Are you sure you want to delete all Freemius data?"
|
983 |
msgstr "Er du sikker på, du vil slette al Freemius data?"
|
984 |
|
985 |
-
#: includes/i18n.php:
|
986 |
msgid "Actions"
|
987 |
msgstr "Handlinger"
|
988 |
|
989 |
-
#: includes/i18n.php:
|
990 |
msgid "Delete All Accounts"
|
991 |
msgstr "Slet alle konti"
|
992 |
|
993 |
-
#: includes/i18n.php:
|
994 |
msgid "Start Fresh"
|
995 |
msgstr "Start forfra"
|
996 |
|
997 |
-
#: includes/i18n.php:
|
998 |
msgid "Clear API Cache"
|
999 |
msgstr "Ryd API-cache"
|
1000 |
|
1001 |
-
#: includes/i18n.php:
|
1002 |
msgid "Sync Data From Server"
|
1003 |
msgstr "Synkroniser data fra server"
|
1004 |
|
1005 |
-
#: includes/i18n.php:
|
1006 |
msgid "Scheduled Crons"
|
1007 |
msgstr "Planlagte cron jobs"
|
1008 |
|
1009 |
-
#: includes/i18n.php:
|
1010 |
msgid "Cron Type"
|
1011 |
msgstr "Cron Type"
|
1012 |
|
1013 |
-
#: includes/i18n.php:
|
1014 |
msgid "Plugins & Themes Sync"
|
1015 |
msgstr "Synkronisering af plugins og temaer"
|
1016 |
|
1017 |
-
#: includes/i18n.php:
|
1018 |
-
msgid "Licenses"
|
1019 |
-
msgstr "
|
1020 |
|
1021 |
-
#: includes/i18n.php:
|
1022 |
msgid "Debug Log"
|
1023 |
msgstr "Fejlfindingslog"
|
1024 |
|
1025 |
-
#: includes/i18n.php:
|
1026 |
msgid "All"
|
1027 |
msgstr "Alle"
|
1028 |
|
1029 |
-
#: includes/i18n.php:
|
1030 |
msgid "File"
|
1031 |
msgstr "Fil"
|
1032 |
|
1033 |
-
#: includes/i18n.php:
|
1034 |
msgid "Function"
|
1035 |
msgstr "Funktion"
|
1036 |
|
1037 |
-
#: includes/i18n.php:
|
1038 |
msgid "Process ID"
|
1039 |
msgstr "Proces-ID"
|
1040 |
|
1041 |
-
#: includes/i18n.php:
|
1042 |
msgid "Logger"
|
1043 |
msgstr "Logger"
|
1044 |
|
1045 |
-
#: includes/i18n.php:
|
1046 |
msgid "Message"
|
1047 |
msgstr "Besked"
|
1048 |
|
1049 |
-
#: includes/i18n.php:
|
1050 |
msgid "Download"
|
1051 |
msgstr "Download"
|
1052 |
|
1053 |
-
#: includes/i18n.php:
|
1054 |
msgid "Filter"
|
1055 |
msgstr "Filter"
|
1056 |
|
1057 |
-
#: includes/i18n.php:
|
1058 |
msgid "Type"
|
1059 |
msgstr "Type"
|
1060 |
|
1061 |
-
#: includes/i18n.php:
|
1062 |
msgid "All Types"
|
1063 |
msgstr "Alle typer"
|
1064 |
|
1065 |
-
#: includes/i18n.php:
|
1066 |
msgid "All Requests"
|
1067 |
msgstr "Alle forespørgsler"
|
1068 |
|
1069 |
-
#: includes/i18n.php:
|
1070 |
msgctxt "as congratulations"
|
1071 |
msgid "Congrats"
|
1072 |
msgstr "Tillykke"
|
1073 |
|
1074 |
-
#: includes/i18n.php:
|
1075 |
msgctxt "exclamation"
|
1076 |
msgid "Oops"
|
1077 |
msgstr "Ups"
|
1078 |
|
1079 |
-
#: includes/i18n.php:
|
1080 |
msgctxt "interjection expressing joy or exuberance"
|
1081 |
msgid "Yee-haw"
|
1082 |
msgstr "Yee-haw"
|
1083 |
|
1084 |
-
#: includes/i18n.php:
|
1085 |
msgctxt ""
|
1086 |
msgid "W00t"
|
1087 |
msgstr "W00t"
|
1088 |
|
1089 |
-
#: includes/i18n.php:
|
1090 |
msgctxt "a positive response"
|
1091 |
msgid "Right on"
|
1092 |
msgstr "Sådan"
|
1093 |
|
1094 |
-
#: includes/i18n.php:
|
1095 |
msgctxt ""
|
1096 |
msgid "Hmm"
|
1097 |
msgstr "Hmm"
|
1098 |
|
1099 |
-
#: includes/i18n.php:
|
1100 |
msgid "O.K"
|
1101 |
msgstr "O.K"
|
1102 |
|
1103 |
-
#: includes/i18n.php:
|
1104 |
msgctxt "exclamation"
|
1105 |
msgid "Hey"
|
1106 |
msgstr "Hey"
|
1107 |
|
1108 |
-
#: includes/i18n.php:
|
1109 |
msgctxt "advance notice of something that will need attention."
|
1110 |
msgid "Heads up"
|
1111 |
msgstr "Se her"
|
1112 |
|
1113 |
-
#: includes/i18n.php:
|
1114 |
msgid "Seems like you got the latest release."
|
1115 |
msgstr "Det ser ud til, at du har den seneste udgivelse."
|
1116 |
|
1117 |
-
#: includes/i18n.php:
|
1118 |
msgid "You are all good!"
|
1119 |
msgstr "Det var det!"
|
1120 |
|
1121 |
-
#: includes/i18n.php:
|
1122 |
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1123 |
msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1124 |
|
1125 |
-
#: includes/i18n.php:
|
1126 |
-
msgid "If you would like to give up the ownership of the
|
1127 |
-
msgstr "If you would like to give up the ownership of the
|
1128 |
|
1129 |
-
#: includes/i18n.php:
|
1130 |
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1131 |
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1132 |
|
1133 |
-
#: includes/i18n.php:
|
1134 |
msgid "Your name was successfully updated."
|
1135 |
msgstr "Dit navn er blevet opdateret."
|
1136 |
|
1137 |
-
#: includes/i18n.php:
|
1138 |
msgid "You have successfully updated your %s."
|
1139 |
msgstr "Opdatering af %s blev gennemført."
|
1140 |
|
1141 |
-
#: includes/i18n.php:
|
1142 |
msgid "Please provide your full name."
|
1143 |
msgstr "Indtast venligst dit fulde navn."
|
1144 |
|
1145 |
-
#: includes/i18n.php:
|
1146 |
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1147 |
msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1148 |
|
1149 |
-
#: includes/i18n.php:
|
1150 |
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1151 |
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1152 |
|
1153 |
-
#: includes/i18n.php:
|
1154 |
msgid "No credit card required"
|
1155 |
msgstr "Betalingskort ikke påkrævet"
|
1156 |
|
1157 |
-
#: includes/i18n.php:
|
1158 |
-
msgid "Premium
|
1159 |
-
msgstr "Premium
|
1160 |
|
1161 |
-
#: includes/i18n.php:
|
1162 |
msgid "The upgrade of %s was successfully completed."
|
1163 |
msgstr "Opgraderingen af %s blev fuldendt."
|
1164 |
|
1165 |
-
#: includes/i18n.php:
|
1166 |
msgid "Your account was successfully activated with the %s plan."
|
1167 |
msgstr "Din konto blev aktiveret med planen %s."
|
1168 |
|
1169 |
-
#: includes/i18n.php:
|
1170 |
msgid "Download the latest %s version now"
|
1171 |
msgstr "Download den seneste version af %s nu"
|
1172 |
|
1173 |
-
#: includes/i18n.php:
|
1174 |
msgid "Please follow these steps to complete the upgrade"
|
1175 |
msgstr "Følg venligst disse trin for at færdiggøre opgraderingen"
|
1176 |
|
1177 |
-
#: includes/i18n.php:
|
1178 |
msgid "Download the latest %s version"
|
1179 |
msgstr "Download den seneste version af %s"
|
1180 |
|
1181 |
-
#: includes/i18n.php:
|
1182 |
msgid "Download the latest version"
|
1183 |
msgstr "Download den seneste version"
|
1184 |
|
1185 |
-
#: includes/i18n.php:
|
1186 |
msgid "Deactivate the free version"
|
1187 |
msgstr "Deaktiver den gratis version"
|
1188 |
|
1189 |
-
#: includes/i18n.php:
|
1190 |
msgid "Upload and activate the downloaded version"
|
1191 |
msgstr "Upload og aktiver den downloadede version"
|
1192 |
|
1193 |
-
#: includes/i18n.php:
|
1194 |
msgid "How to upload and activate?"
|
1195 |
msgstr "Upload og aktivering, hvordan?"
|
1196 |
|
1197 |
-
#: includes/i18n.php:
|
1198 |
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1199 |
msgid "%s Add-on was successfully purchased."
|
1200 |
msgstr "Betalingen for tilføjelsen %s blev gennemført."
|
1201 |
|
1202 |
-
#: includes/i18n.php:
|
1203 |
msgid "Your %s Add-on plan was successfully upgraded."
|
1204 |
msgstr "Your %s Add-on plan was successfully upgraded."
|
1205 |
|
1206 |
-
#: includes/i18n.php:
|
1207 |
msgid "Your email has been successfully verified - you are AWESOME!"
|
1208 |
msgstr "Your email has been successfully verified - you are AWESOME!"
|
1209 |
|
1210 |
-
#: includes/i18n.php:
|
1211 |
msgid "Your plan was successfully upgraded."
|
1212 |
msgstr "Din plan er blevet opgraderet."
|
1213 |
|
1214 |
-
#: includes/i18n.php:
|
1215 |
msgid "Your plan was successfully changed to %s."
|
1216 |
msgstr "Din plan er blevet ændret til %s."
|
1217 |
|
1218 |
-
#: includes/i18n.php:
|
1219 |
-
msgid "Your license has expired. You can still continue using the free
|
1220 |
-
msgstr "
|
1221 |
|
1222 |
-
#: includes/i18n.php:
|
1223 |
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
1224 |
msgstr "Din licens er blevet annulleret. Hvis du mener, dette er en fejl, så kontakt venligst support."
|
1225 |
|
1226 |
-
#: includes/i18n.php:
|
1227 |
msgid "Your trial has been successfully started."
|
1228 |
msgstr "Din prøveperiode er begyndt."
|
1229 |
|
1230 |
-
#: includes/i18n.php:
|
1231 |
msgid "Your license was successfully activated."
|
1232 |
msgstr "Din licens er blevet aktiveret."
|
1233 |
|
1234 |
-
#: includes/i18n.php:
|
1235 |
msgid "It looks like your site currently doesn't have an active license."
|
1236 |
msgstr "Det ser ud til, at dit websted endnu ikke har en aktiv licens."
|
1237 |
|
1238 |
-
#: includes/i18n.php:
|
1239 |
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
1240 |
msgstr "Din licens blev deaktiveret, du er tilbage på planen %s."
|
1241 |
|
1242 |
-
#: includes/i18n.php:
|
1243 |
msgid "It looks like the license deactivation failed."
|
1244 |
msgstr "Det ser ud til, at licens-deaktiveringen mislykkedes."
|
1245 |
|
1246 |
-
#: includes/i18n.php:
|
1247 |
msgid "It looks like the license could not be activated."
|
1248 |
msgstr "Det ser ud til, at licensen ikke kunne aktiveres."
|
1249 |
|
1250 |
-
#: includes/i18n.php:
|
1251 |
msgid "Error received from the server:"
|
1252 |
msgstr "Fejl modtager fra serveren:"
|
1253 |
|
1254 |
-
#: includes/i18n.php:
|
1255 |
msgid "Your trial has expired. You can still continue using all our free features."
|
1256 |
msgstr "Din prøveperiode er udløbet. Du kan fortsat bruge alle vores gratis funktioner."
|
1257 |
|
1258 |
-
#: includes/i18n.php:
|
1259 |
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
1260 |
msgstr "Din plan blev nedgraderet. Licensen til din %s plan vil udløbe om %s."
|
1261 |
|
1262 |
-
#: includes/i18n.php:
|
1263 |
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1264 |
msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1265 |
|
1266 |
-
#: includes/i18n.php:
|
1267 |
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1268 |
msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1269 |
|
1270 |
-
#: includes/i18n.php:
|
1271 |
msgid "Your %s free trial was successfully cancelled."
|
1272 |
msgstr "Din gratis prøveperiode for %s er blevet annulleret."
|
1273 |
|
1274 |
-
#: includes/i18n.php:
|
1275 |
msgctxt "%s - numeric version number"
|
1276 |
msgid "Version %s was released."
|
1277 |
msgstr "Version %s er blevet udgivet."
|
1278 |
|
1279 |
-
#: includes/i18n.php:
|
1280 |
msgid "Please download %s."
|
1281 |
msgstr "Download venligst %s."
|
1282 |
|
1283 |
-
#: includes/i18n.php:
|
1284 |
msgctxt "%s - plan name, as the latest professional version here"
|
1285 |
msgid "the latest %s version here"
|
1286 |
msgstr "den seneste version af %s her"
|
1287 |
|
1288 |
-
#: includes/i18n.php:
|
1289 |
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1290 |
msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1291 |
|
1292 |
-
#: includes/i18n.php:
|
1293 |
msgctxt "call to action"
|
1294 |
msgid "Start free trial"
|
1295 |
msgstr "Start gratis prøveperiode"
|
1296 |
|
1297 |
-
#: includes/i18n.php:
|
1298 |
msgid "Starting trial"
|
1299 |
msgstr "Starter prøveperiode"
|
1300 |
|
1301 |
-
#: includes/i18n.php:
|
1302 |
msgid "Please wait"
|
1303 |
msgstr "Vent venligst"
|
1304 |
|
1305 |
-
#: includes/i18n.php:
|
1306 |
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1307 |
msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1308 |
|
1309 |
-
#: includes/i18n.php:
|
1310 |
msgid "You already utilized a trial before."
|
1311 |
msgstr "Du har allerede brugt din prøveperiode."
|
1312 |
|
1313 |
-
#: includes/i18n.php:
|
1314 |
-
msgid "You are already running the
|
1315 |
-
msgstr "
|
1316 |
|
1317 |
-
#: includes/i18n.php:
|
1318 |
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1319 |
msgstr "Plan %s eksisterer ikke og kan derfor ikke starte prøveperiode."
|
1320 |
|
1321 |
-
#: includes/i18n.php:
|
1322 |
msgid "Plan %s does not support a trial period."
|
1323 |
msgstr "Plan %s understøtter ikke en prøveperiode."
|
1324 |
|
1325 |
-
#: includes/i18n.php:
|
1326 |
-
msgid "None of the
|
1327 |
-
msgstr "
|
1328 |
|
1329 |
-
#: includes/i18n.php:
|
1330 |
-
msgid "Unexpected API error. Please contact the
|
1331 |
-
msgstr "Unexpected API error. Please contact the
|
1332 |
|
1333 |
-
#: includes/i18n.php:
|
1334 |
msgid "No commitment for %s days - cancel anytime!"
|
1335 |
msgstr "Ingen bindinger i %s dage - annuller når som helst!"
|
1336 |
|
1337 |
-
#: includes/i18n.php:
|
1338 |
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."
|
1339 |
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."
|
1340 |
|
1341 |
-
#: includes/i18n.php:
|
1342 |
msgid "Couldn't activate %s."
|
1343 |
msgstr "Kunne ikke aktivere %s."
|
1344 |
|
1345 |
-
#: includes/i18n.php:
|
1346 |
msgid "Please contact us with the following message:"
|
1347 |
msgstr "Kontakt os venligst med følgende besked:"
|
1348 |
|
1349 |
-
#: includes/i18n.php:
|
1350 |
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."
|
1351 |
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."
|
1352 |
|
1353 |
-
#: includes/i18n.php:
|
1354 |
msgid "Please contact us here"
|
1355 |
msgstr "Kontakt os her"
|
1356 |
|
1357 |
-
#: includes/i18n.php:
|
1358 |
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1359 |
msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1360 |
|
1361 |
-
#: includes/i18n.php:
|
1362 |
msgid "From unknown reason, the API connectivity test failed."
|
1363 |
msgstr "From unknown reason, the API connectivity test failed."
|
1364 |
|
1365 |
-
#: includes/i18n.php:
|
1366 |
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?"
|
1367 |
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?"
|
1368 |
|
1369 |
-
#: includes/i18n.php:
|
1370 |
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."
|
1371 |
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."
|
1372 |
|
1373 |
-
#: includes/i18n.php:
|
1374 |
msgid "Disabled method(s):"
|
1375 |
msgstr "Disabled method(s):"
|
1376 |
|
1377 |
-
#: includes/i18n.php:
|
1378 |
msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1379 |
msgstr "Af en ukendt årsag blokerer CloudFlare, vores firewall, forbindelsen."
|
1380 |
|
1381 |
-
#: includes/i18n.php:
|
1382 |
msgctxt "as pluginX requires an access to our API"
|
1383 |
msgid "%s requires an access to our API."
|
1384 |
msgstr "%s påkræver adgang til vores API."
|
1385 |
|
1386 |
-
#: includes/i18n.php:
|
1387 |
msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
|
1388 |
msgstr "Det ser ud til, at din server benytter Squid ACL (access control lists), som blokerer forbindelsen."
|
1389 |
|
1390 |
-
#: includes/i18n.php:
|
1391 |
msgid "I don't know what is Squid or ACL, help me!"
|
1392 |
msgstr "Jeg ved ikke hvad Squid eller ACL er. Hjælp mig!"
|
1393 |
|
1394 |
-
#: includes/i18n.
|
1395 |
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."
|
1396 |
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."
|
1397 |
|
1398 |
-
#: includes/i18n.php:
|
1399 |
msgid "I'm a system administrator"
|
1400 |
msgstr "Jeg er en system-administrator"
|
1401 |
|
1402 |
-
#: includes/i18n.php:
|
1403 |
-
msgid "Great, please whitelist the following domains: %s. Once you are done, deactivate the
|
1404 |
-
msgstr "
|
1405 |
|
1406 |
-
#: includes/i18n.php:
|
1407 |
msgid "I don't know what is cURL or how to install it, help me!"
|
1408 |
msgstr "Jeg ved ikke hvad cURL er, eller hvordan jeg installerer det. Hjælp mig!"
|
1409 |
|
1410 |
-
#: includes/i18n.php:
|
1411 |
-
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
|
1412 |
-
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
|
1413 |
|
1414 |
-
#: includes/i18n.php:
|
1415 |
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."
|
1416 |
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."
|
1417 |
|
1418 |
-
#: includes/i18n.php:
|
1419 |
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1420 |
msgstr "Vi beklager ulejligheden, og vi er her for at hjælpe, hvis du giver os chancen."
|
1421 |
|
1422 |
-
#: includes/i18n.php:
|
1423 |
msgid "Yes - I'm giving you a chance to fix it"
|
1424 |
msgstr "Ja - jeg giver jer en chance for at rette det"
|
1425 |
|
1426 |
-
#: includes/i18n.php:
|
1427 |
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."
|
1428 |
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."
|
1429 |
|
1430 |
-
#: includes/i18n.php:
|
1431 |
msgid "Let's try your previous version"
|
1432 |
msgstr "Lad os prøve din forrige version"
|
1433 |
|
1434 |
-
#: includes/i18n.php:
|
1435 |
msgid "Uninstall this version and install the previous one."
|
1436 |
msgstr "Afinstaller denne version og installer den forrige."
|
1437 |
|
1438 |
-
#: includes/i18n.php:
|
1439 |
msgid "That's exhausting, please deactivate"
|
1440 |
msgstr "Det er udmattende, deaktiver venligst"
|
1441 |
|
1442 |
-
#: includes/i18n.php:
|
1443 |
msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1444 |
msgstr "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1445 |
|
1446 |
-
#: includes/i18n.php:
|
1447 |
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."
|
1448 |
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."
|
1449 |
|
1450 |
-
#: includes/i18n.php:
|
1451 |
msgctxt "%1s - plugin title, %2s - API domain"
|
1452 |
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1453 |
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1454 |
|
1455 |
-
#: includes/i18n.php:
|
1456 |
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1457 |
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1458 |
|
1459 |
-
#: includes/i18n.php:
|
1460 |
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."
|
1461 |
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."
|
1462 |
|
1463 |
-
#: includes/i18n.php:
|
1464 |
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1465 |
msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1466 |
|
1467 |
-
#: includes/i18n.php:
|
1468 |
msgid "%s is the new owner of the account."
|
1469 |
msgstr "%s er den nye ejer af kontoen."
|
1470 |
|
1471 |
-
#: includes/i18n.php:
|
1472 |
msgctxt "addonX cannot run without pluginY"
|
1473 |
msgid "%s cannot run without %s."
|
1474 |
msgstr "%s virker ikke uden %s."
|
1475 |
|
1476 |
-
#: includes/i18n.php:
|
1477 |
msgctxt "addonX cannot run..."
|
1478 |
msgid "%s cannot run without the plugin."
|
1479 |
msgstr "%s virker ikke uden pluginnet."
|
1480 |
|
1481 |
-
#: includes/i18n.php:
|
1482 |
msgctxt "pluginX activation was successfully..."
|
1483 |
msgid "%s activation was successfully completed."
|
1484 |
msgstr "Aktivering af %s blev gennemført."
|
1485 |
|
1486 |
-
#: includes/i18n.php:
|
1487 |
msgctxt "Plugin installer section title"
|
1488 |
msgid "Features & Pricing"
|
1489 |
msgstr "Funktioner og priser"
|
1490 |
|
1491 |
-
#: includes/i18n.php:
|
1492 |
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1493 |
msgstr "Add-on must be deployed to WordPress.org or Freemius."
|
1494 |
|
1495 |
-
#: includes/i18n.php:
|
1496 |
msgid "Paid add-on must be deployed to Freemius."
|
1497 |
msgstr "Paid add-on must be deployed to Freemius."
|
1498 |
|
1499 |
-
#: includes/i18n.php:
|
1500 |
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1501 |
msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1502 |
|
1503 |
-
#: includes/i18n.php:
|
1504 |
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."
|
1505 |
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."
|
1506 |
|
1507 |
-
#: includes/i18n.php:
|
1508 |
msgctxt "as every month"
|
1509 |
msgid "Monthly"
|
1510 |
msgstr "Månedligt"
|
1511 |
|
1512 |
-
#: includes/i18n.php:
|
1513 |
msgctxt "as monthly period"
|
1514 |
msgid "mo"
|
1515 |
msgstr "md"
|
1516 |
|
1517 |
-
#: includes/i18n.php:
|
1518 |
msgctxt "as once a year"
|
1519 |
msgid "Annual"
|
1520 |
msgstr "Årligt"
|
1521 |
|
1522 |
-
#: includes/i18n.php:
|
1523 |
msgctxt "as once a year"
|
1524 |
msgid "Annually"
|
1525 |
msgstr "Årligt"
|
1526 |
|
1527 |
-
#: includes/i18n.php:
|
1528 |
msgctxt "as once a year"
|
1529 |
msgid "Once"
|
1530 |
msgstr "Engangsbeløb"
|
1531 |
|
1532 |
-
#: includes/i18n.php:
|
1533 |
msgctxt "as annual period"
|
1534 |
msgid "year"
|
1535 |
msgstr "år"
|
1536 |
|
1537 |
-
#: includes/i18n.php:
|
1538 |
msgid "Lifetime"
|
1539 |
msgstr "Livstid"
|
1540 |
|
1541 |
-
#: includes/i18n.php:
|
1542 |
msgctxt "e.g. the best product"
|
1543 |
msgid "Best"
|
1544 |
msgstr "Bedste"
|
1545 |
|
1546 |
-
#: includes/i18n.php:
|
1547 |
msgctxt "e.g. billed monthly"
|
1548 |
msgid "Billed %s"
|
1549 |
msgstr "Faktureret %s"
|
1550 |
|
1551 |
-
#: includes/i18n.php:
|
1552 |
msgctxt "as a discount of $5 or 10%"
|
1553 |
msgid "Save %s"
|
1554 |
msgstr "Spar %s"
|
1555 |
|
1556 |
-
#: includes/i18n.php:
|
1557 |
msgid "View details"
|
1558 |
msgstr "Vis detaljer"
|
1559 |
|
1560 |
-
#: includes/i18n.php:
|
1561 |
msgctxt "button label"
|
1562 |
msgid "Approve & Start Trial"
|
1563 |
msgstr "Godkend & start prøveperiode"
|
1564 |
|
1565 |
-
#: includes/i18n.php:
|
1566 |
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1567 |
msgstr "Du er 1 klik fra at begynde din %1$s dages gratis prøveperiode af planen %2$s."
|
1568 |
|
1569 |
-
#: includes/i18n.php:453
|
1570 |
-
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 plugin to periodically send data to %s to check for version updates and to validate your trial."
|
1571 |
-
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 plugin to periodically send data to %s to check for version updates and to validate your trial."
|
1572 |
-
|
1573 |
#: includes/i18n.php:459
|
|
|
|
|
|
|
|
|
1574 |
msgid "Business name"
|
1575 |
msgstr "Firmanavn"
|
1576 |
|
1577 |
-
#: includes/i18n.php:
|
1578 |
msgid "Tax / VAT ID"
|
1579 |
msgstr "Moms / VAT ID"
|
1580 |
|
1581 |
-
#: includes/i18n.php:
|
1582 |
msgid "Address Line %d"
|
1583 |
msgstr "Adresselinje %d"
|
1584 |
|
1585 |
-
#: includes/i18n.php:
|
1586 |
msgid "Country"
|
1587 |
msgstr "Land"
|
1588 |
|
1589 |
-
#: includes/i18n.php:
|
1590 |
msgid "Select Country"
|
1591 |
msgstr "Vælg land"
|
1592 |
|
1593 |
-
#: includes/i18n.php:
|
1594 |
msgid "City"
|
1595 |
msgstr "By"
|
1596 |
|
1597 |
-
#: includes/i18n.php:
|
1598 |
msgid "Town"
|
1599 |
msgstr "By"
|
1600 |
|
1601 |
-
#: includes/i18n.php:
|
1602 |
msgid "State"
|
1603 |
msgstr "Stat"
|
1604 |
|
1605 |
-
#: includes/i18n.php:
|
1606 |
msgid "Province"
|
1607 |
msgstr "Provins"
|
1608 |
|
1609 |
-
#: includes/i18n.php:
|
1610 |
msgid "ZIP / Postal Code"
|
1611 |
msgstr "ZIP / Postnummer"
|
1612 |
|
1613 |
-
#: includes/i18n.php:
|
1614 |
msgid "Installing plugin: %s"
|
1615 |
msgstr "Installing plugin: %s"
|
1616 |
|
1617 |
-
#: includes/i18n.php:
|
1618 |
msgid "Automatic Installation"
|
1619 |
msgstr "Automatic Installation"
|
1620 |
|
1621 |
-
#: includes/i18n.php:
|
1622 |
msgid "%s sec"
|
1623 |
msgstr "%s sec"
|
1624 |
|
1625 |
-
#: includes/i18n.php:
|
1626 |
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."
|
1627 |
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."
|
1628 |
|
1629 |
-
#: includes/i18n.php:
|
1630 |
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."
|
1631 |
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."
|
1632 |
|
1633 |
-
#: includes/i18n.php:
|
1634 |
msgid "Cancel Installation"
|
1635 |
msgstr "Cancel Installation"
|
1636 |
|
1637 |
-
#: includes/i18n.php:
|
1638 |
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
1639 |
msgstr "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
1640 |
|
1641 |
-
#: includes/i18n.php:
|
1642 |
msgid "Invalid module ID."
|
1643 |
msgstr "Invalid module ID."
|
1644 |
|
1645 |
-
#: includes/i18n.php:
|
1646 |
msgid "Auto installation only works for opted-in users."
|
1647 |
msgstr "Auto installation only works for opted-in users."
|
1648 |
|
1649 |
-
#: includes/i18n.php:
|
1650 |
msgid "Premium version already active."
|
1651 |
msgstr "Premium version already active."
|
1652 |
|
1653 |
-
#: includes/i18n.php:
|
1654 |
msgid "Premium add-on version already installed."
|
1655 |
msgstr "Premium add-on version already installed."
|
1656 |
|
1657 |
-
#: includes/i18n.php:
|
1658 |
msgid "You do not have a valid license to access the premium version."
|
1659 |
msgstr "You do not have a valid license to access the premium version."
|
1660 |
|
1661 |
-
#: includes/i18n.php:
|
1662 |
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
1663 |
msgstr "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
1664 |
|
1665 |
-
#: includes/i18n.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1666 |
msgctxt "Plugin installer section title"
|
1667 |
msgid "Description"
|
1668 |
msgstr "Beskrivelse"
|
1669 |
|
1670 |
-
#: includes/i18n.php:
|
1671 |
msgctxt "Plugin installer section title"
|
1672 |
msgid "Installation"
|
1673 |
msgstr "Installering"
|
1674 |
|
1675 |
-
#: includes/i18n.php:
|
1676 |
msgctxt "Plugin installer section title"
|
1677 |
msgid "FAQ"
|
1678 |
msgstr "FAQ"
|
1679 |
|
1680 |
-
#: includes/i18n.php:
|
1681 |
msgctxt "Plugin installer section title"
|
1682 |
msgid "Changelog"
|
1683 |
msgstr "Ændringslog"
|
1684 |
|
1685 |
-
#: includes/i18n.php:
|
1686 |
msgctxt "Plugin installer section title"
|
1687 |
msgid "Reviews"
|
1688 |
msgstr "Anmeldelser"
|
1689 |
|
1690 |
-
#: includes/i18n.php:
|
1691 |
msgctxt "Plugin installer section title"
|
1692 |
msgid "Other Notes"
|
1693 |
msgstr "Andre noter"
|
1694 |
|
1695 |
-
#: includes/i18n.php:
|
1696 |
msgid "%s star"
|
1697 |
msgstr "%s stjerne"
|
1698 |
|
1699 |
-
#: includes/i18n.php:
|
1700 |
msgid "%s stars"
|
1701 |
msgstr "%s stjerner"
|
1702 |
|
1703 |
-
#: includes/i18n.php:
|
1704 |
msgid "%s rating"
|
1705 |
msgstr "%s vurdering"
|
1706 |
|
1707 |
-
#: includes/i18n.php:
|
1708 |
msgid "%s ratings"
|
1709 |
msgstr "%s vurderinger"
|
1710 |
|
1711 |
-
#: includes/i18n.php:
|
1712 |
msgid "%s time"
|
1713 |
msgstr "%s gang"
|
1714 |
|
1715 |
-
#: includes/i18n.php:
|
1716 |
msgid "%s times"
|
1717 |
msgstr "%s gange"
|
1718 |
|
1719 |
-
#: includes/i18n.php:
|
1720 |
msgid "Click to see reviews that provided a rating of %s"
|
1721 |
msgstr "Click to see reviews that provided a rating of %s"
|
1722 |
|
1723 |
-
#: includes/i18n.php:
|
1724 |
msgid "Last Updated"
|
1725 |
msgstr "Senest opdateret"
|
1726 |
|
1727 |
-
#: includes/i18n.php:
|
1728 |
msgid "Requires WordPress Version:"
|
1729 |
msgstr "Kræver WordPress-version:"
|
1730 |
|
1731 |
-
#: includes/i18n.php:
|
1732 |
msgctxt "as the plugin author"
|
1733 |
msgid "Author:"
|
1734 |
msgstr "Forfatter:"
|
1735 |
|
1736 |
-
#: includes/i18n.php:
|
1737 |
msgid "Compatible up to:"
|
1738 |
msgstr "Kompatibel op til:"
|
1739 |
|
1740 |
-
#: includes/i18n.php:
|
1741 |
msgid "Downloaded:"
|
1742 |
msgstr "Hentet:"
|
1743 |
|
1744 |
-
#: includes/i18n.php:
|
1745 |
msgid "WordPress.org Plugin Page"
|
1746 |
msgstr "WordPress.org Plugin-side"
|
1747 |
|
1748 |
-
#: includes/i18n.php:
|
1749 |
msgid "Plugin Homepage"
|
1750 |
msgstr "Plugin-websted"
|
1751 |
|
1752 |
-
#: includes/i18n.php:
|
1753 |
msgid "Donate to this plugin"
|
1754 |
msgstr "Donér til dette plugin"
|
1755 |
|
1756 |
-
#: includes/i18n.php:
|
1757 |
msgid "Average Rating"
|
1758 |
msgstr "Gennemsnitlig vurdering"
|
1759 |
|
1760 |
-
#: includes/i18n.php:
|
1761 |
msgid "based on %s"
|
1762 |
msgstr "baseret på %s"
|
1763 |
|
1764 |
-
#: includes/i18n.php:
|
1765 |
msgid "Warning:"
|
1766 |
msgstr "Advarsel:"
|
1767 |
|
1768 |
-
#: includes/i18n.php:
|
1769 |
msgid "Contributors"
|
1770 |
msgstr "Bidragsydere"
|
1771 |
|
1772 |
-
#: includes/i18n.php:
|
1773 |
msgid "Plugin Install"
|
1774 |
msgstr "Plugin Install"
|
1775 |
|
1776 |
-
#: includes/i18n.php:
|
1777 |
msgid "This plugin has not been tested with your current version of WordPress."
|
1778 |
msgstr "This plugin has not been tested with your current version of WordPress."
|
1779 |
|
1780 |
-
#: includes/i18n.php:
|
1781 |
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1782 |
msgstr "This plugin has not been marked as compatible with your version of WordPress."
|
1783 |
|
1784 |
-
#: includes/i18n.php:
|
1785 |
msgid "Newer Version (%s) Installed"
|
1786 |
msgstr "Nyere version (%s) installeret"
|
1787 |
|
1788 |
-
#: includes/i18n.php:
|
1789 |
msgid "Latest Version Installed"
|
1790 |
msgstr "Seneste version installeret"
|
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"
|
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"
|
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"
|
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"
|
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!"
|
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
@@ -1,1788 +1,1976 @@
|
|
1 |
-
# Copyright (C) 2017 freemius
|
2 |
-
# This file is distributed under the same license as the freemius package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: freemius\n"
|
6 |
-
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
7 |
-
"POT-Creation-Date: \n"
|
8 |
-
"PO-Revision-Date: \n"
|
9 |
-
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
10 |
-
"Language: \n"
|
11 |
-
"Language-Team: Freemius Team <
|
12 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
-
"Content-Transfer-Encoding: 8bit\n"
|
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/
|
27 |
-
msgid "
|
28 |
-
msgstr "
|
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 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
msgid "
|
80 |
-
msgstr "
|
81 |
-
|
82 |
-
#: includes/
|
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 |
-
msgid "
|
128 |
-
msgstr "
|
129 |
-
|
130 |
-
#: includes/
|
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 |
-
msgid "
|
158 |
-
msgstr "
|
159 |
-
|
160 |
-
#: includes/
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
msgid "
|
167 |
-
msgstr "
|
168 |
-
|
169 |
-
#: includes/
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
msgid "
|
176 |
-
msgstr "
|
177 |
-
|
178 |
-
#: includes/
|
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 |
-
msgid "
|
209 |
-
msgstr "
|
210 |
-
|
211 |
-
#: includes/
|
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 |
-
msgid "
|
287 |
-
msgstr "
|
288 |
-
|
289 |
-
#: includes/
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
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 |
-
msgid "
|
440 |
-
msgstr "
|
441 |
-
|
442 |
-
#: includes/
|
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 |
-
msgid "
|
521 |
-
msgstr "
|
522 |
-
|
523 |
-
#: includes/
|
524 |
-
msgid "
|
525 |
-
msgstr "
|
526 |
-
|
527 |
-
#: includes/
|
528 |
-
msgid "
|
529 |
-
msgstr "
|
530 |
-
|
531 |
-
#: includes/
|
532 |
-
msgid "
|
533 |
-
msgstr "
|
534 |
-
|
535 |
-
#: includes/
|
536 |
-
msgid "
|
537 |
-
msgstr "
|
538 |
-
|
539 |
-
#: includes/
|
540 |
-
msgctxt "
|
541 |
-
msgid "
|
542 |
-
msgstr "
|
543 |
-
|
544 |
-
#: includes/
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
msgid "
|
551 |
-
msgstr "
|
552 |
-
|
553 |
-
#: includes/
|
554 |
-
msgid "
|
555 |
-
msgstr "
|
556 |
-
|
557 |
-
#: includes/
|
558 |
-
msgid "
|
559 |
-
msgstr "
|
560 |
-
|
561 |
-
#: includes/
|
562 |
-
msgid "
|
563 |
-
msgstr "
|
564 |
-
|
565 |
-
#: includes/
|
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 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
msgid "
|
692 |
-
msgstr "
|
693 |
-
|
694 |
-
#: includes/
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
msgid "
|
716 |
-
msgstr "
|
717 |
-
|
718 |
-
#: includes/
|
719 |
-
msgctxt "
|
720 |
-
msgid "
|
721 |
-
msgstr "
|
722 |
-
|
723 |
-
#: includes/
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
msgid "
|
730 |
-
msgstr "
|
731 |
-
|
732 |
-
#: includes/
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
msgid "
|
754 |
-
msgstr "
|
755 |
-
|
756 |
-
#: includes/
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
msgid "
|
786 |
-
msgstr "
|
787 |
-
|
788 |
-
#: includes/
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
msgid "
|
835 |
-
msgstr "
|
836 |
-
|
837 |
-
#: includes/
|
838 |
-
msgid "
|
839 |
-
msgstr "
|
840 |
-
|
841 |
-
#: includes/
|
842 |
-
msgid "
|
843 |
-
msgstr "
|
844 |
-
|
845 |
-
#: includes/
|
846 |
-
msgid "
|
847 |
-
msgstr "
|
848 |
-
|
849 |
-
#: includes/
|
850 |
-
msgid "
|
851 |
-
msgstr "
|
852 |
-
|
853 |
-
#: includes/
|
854 |
-
msgid "
|
855 |
-
msgstr "
|
856 |
-
|
857 |
-
#: includes/
|
858 |
-
msgid "
|
859 |
-
msgstr "
|
860 |
-
|
861 |
-
#: includes/
|
862 |
-
msgid "
|
863 |
-
msgstr "
|
864 |
-
|
865 |
-
#: includes/
|
866 |
-
msgid "
|
867 |
-
msgstr "
|
868 |
-
|
869 |
-
#: includes/
|
870 |
-
msgid "
|
871 |
-
msgstr "
|
872 |
-
|
873 |
-
#: includes/
|
874 |
-
msgid "
|
875 |
-
msgstr "
|
876 |
-
|
877 |
-
#: includes/
|
878 |
-
msgid "
|
879 |
-
msgstr "
|
880 |
-
|
881 |
-
#: includes/
|
882 |
-
msgid "
|
883 |
-
msgstr "
|
884 |
-
|
885 |
-
#: includes/
|
886 |
-
msgid "
|
887 |
-
msgstr "
|
888 |
-
|
889 |
-
#: includes/
|
890 |
-
msgid "
|
891 |
-
msgstr "
|
892 |
-
|
893 |
-
#: includes/
|
894 |
-
msgid "
|
895 |
-
msgstr "
|
896 |
-
|
897 |
-
#: includes/
|
898 |
-
msgid "
|
899 |
-
msgstr "
|
900 |
-
|
901 |
-
#: includes/
|
902 |
-
msgid "
|
903 |
-
msgstr "
|
904 |
-
|
905 |
-
#: includes/
|
906 |
-
msgid "
|
907 |
-
msgstr "
|
908 |
-
|
909 |
-
#: includes/
|
910 |
-
msgid "
|
911 |
-
msgstr "
|
912 |
-
|
913 |
-
#: includes/
|
914 |
-
msgid "
|
915 |
-
msgstr "
|
916 |
-
|
917 |
-
#:
|
918 |
-
msgid "
|
919 |
-
msgstr "
|
920 |
-
|
921 |
-
#:
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
msgid "
|
973 |
-
msgstr "
|
974 |
-
|
975 |
-
#:
|
976 |
-
msgid "
|
977 |
-
msgstr "
|
978 |
-
|
979 |
-
#: includes/
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
msgid "
|
1085 |
-
msgstr "
|
1086 |
-
|
1087 |
-
#:
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
msgid "
|
1125 |
-
msgstr "
|
1126 |
-
|
1127 |
-
#:
|
1128 |
-
msgid "
|
1129 |
-
msgstr "
|
1130 |
-
|
1131 |
-
#:
|
1132 |
-
msgid "
|
1133 |
-
msgstr "
|
1134 |
-
|
1135 |
-
#:
|
1136 |
-
msgid "
|
1137 |
-
msgstr "
|
1138 |
-
|
1139 |
-
#:
|
1140 |
-
msgid "
|
1141 |
-
msgstr "
|
1142 |
-
|
1143 |
-
#:
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
msgid "
|
1293 |
-
msgstr "
|
1294 |
-
|
1295 |
-
#:
|
1296 |
-
msgid "
|
1297 |
-
msgstr "
|
1298 |
-
|
1299 |
-
#:
|
1300 |
-
msgid "
|
1301 |
-
msgstr "
|
1302 |
-
|
1303 |
-
#:
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
msgid "
|
1325 |
-
msgstr "
|
1326 |
-
|
1327 |
-
#:
|
1328 |
-
msgid "
|
1329 |
-
msgstr "
|
1330 |
-
|
1331 |
-
#:
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
msgid "
|
1422 |
-
msgstr "
|
1423 |
-
|
1424 |
-
#:
|
1425 |
-
msgid "
|
1426 |
-
msgstr "
|
1427 |
-
|
1428 |
-
#:
|
1429 |
-
msgid "
|
1430 |
-
msgstr "
|
1431 |
-
|
1432 |
-
#:
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
msgid "
|
1451 |
-
msgstr "
|
1452 |
-
|
1453 |
-
#:
|
1454 |
-
msgid "
|
1455 |
-
msgstr "
|
1456 |
-
|
1457 |
-
#:
|
1458 |
-
msgid "
|
1459 |
-
msgstr "
|
1460 |
-
|
1461 |
-
#:
|
1462 |
-
msgid "
|
1463 |
-
msgstr "
|
1464 |
-
|
1465 |
-
#:
|
1466 |
-
msgid "
|
1467 |
-
msgstr "
|
1468 |
-
|
1469 |
-
#:
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
msgid "
|
1508 |
-
msgstr "
|
1509 |
-
|
1510 |
-
#:
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
msgid "
|
1528 |
-
msgstr "
|
1529 |
-
|
1530 |
-
#: includes/
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
msgid "
|
1537 |
-
msgstr "
|
1538 |
-
|
1539 |
-
#: includes/
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
#:
|
1660 |
-
msgid "
|
1661 |
-
msgstr "
|
1662 |
-
|
1663 |
-
#:
|
1664 |
-
msgctxt "
|
1665 |
-
msgid "
|
1666 |
-
msgstr "
|
1667 |
-
|
1668 |
-
#:
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
msgid "
|
1686 |
-
msgstr "
|
1687 |
-
|
1688 |
-
#:
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2017 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: freemius\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
7 |
+
"POT-Creation-Date: \n"
|
8 |
+
"PO-Revision-Date: \n"
|
9 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
10 |
+
"Language: \n"
|
11 |
+
"Language-Team: Freemius Team <admin@freemius.com>\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
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"
|
1239 |
+
|
1240 |
+
#: templates/connect.php:128
|
1241 |
+
msgid "Allow & Continue"
|
1242 |
+
msgstr "Permitir y Continuar"
|
1243 |
+
|
1244 |
+
#: templates/connect.php:131
|
1245 |
+
msgid "Re-send activation email"
|
1246 |
+
msgstr "Reenviar correo electrónico de activación"
|
1247 |
+
|
1248 |
+
#: templates/connect.php:135
|
1249 |
+
msgid "Thanks %s!"
|
1250 |
+
msgstr "¡Gracias %s!"
|
1251 |
+
|
1252 |
+
#: templates/connect.php143, templates/forms/license-activation.php:43
|
1253 |
+
msgid "Agree & Activate License"
|
1254 |
+
msgstr "De Acuerdo y Activar Licencia"
|
1255 |
+
|
1256 |
+
#: templates/connect.php147, templates/connect.php:170
|
1257 |
+
msgctxt "greeting"
|
1258 |
+
msgid "Hey %s,"
|
1259 |
+
msgstr "Hey %s,"
|
1260 |
+
|
1261 |
+
#: templates/connect.php:148
|
1262 |
+
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
1263 |
+
msgstr "¡Gracias por comprar %s! Para empezar, escribe tu clave de licencia:"
|
1264 |
+
|
1265 |
+
#: templates/connect.php:154
|
1266 |
+
msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1267 |
+
msgstr "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1268 |
+
|
1269 |
+
#: templates/connect.php:159
|
1270 |
+
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."
|
1271 |
+
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."
|
1272 |
+
|
1273 |
+
#: templates/connect.php189, templates/forms/license-activation.php:46
|
1274 |
+
msgid "License key"
|
1275 |
+
msgstr "Clave de licencia"
|
1276 |
+
|
1277 |
+
#: templates/connect.php192, templates/forms/license-activation.php:19
|
1278 |
+
msgid "Can't find your license key?"
|
1279 |
+
msgstr "¿No puedes encontrar tu clave de licencia?"
|
1280 |
+
|
1281 |
+
#: templates/connect.php199, templates/forms/deactivation/retry-skip.php:20
|
1282 |
+
msgctxt "verb"
|
1283 |
+
msgid "Skip"
|
1284 |
+
msgstr "Saltar"
|
1285 |
+
|
1286 |
+
#: templates/connect.php:228
|
1287 |
+
msgid "Your Profile Overview"
|
1288 |
+
msgstr "Resumen del Perfil"
|
1289 |
+
|
1290 |
+
#: templates/connect.php:229
|
1291 |
+
msgid "Name and email address"
|
1292 |
+
msgstr "Nombre y dirección de correo electrónico"
|
1293 |
+
|
1294 |
+
#: templates/connect.php:234
|
1295 |
+
msgid "Your Site Overview"
|
1296 |
+
msgstr "Resumen del Sitio"
|
1297 |
+
|
1298 |
+
#: templates/connect.php:235
|
1299 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
1300 |
+
msgstr "URL del sitio web, Versión de WP, PHP info, plugins y temas"
|
1301 |
+
|
1302 |
+
#: templates/connect.php:240
|
1303 |
+
msgid "Admin Notices"
|
1304 |
+
msgstr "Avisos de Administración"
|
1305 |
+
|
1306 |
+
#: templates/connect.php241, templates/connect.php:263
|
1307 |
+
msgid "Updates, announcements, marketing, no spam"
|
1308 |
+
msgstr "Actualizaciones, anuncios, marketing, sin spam"
|
1309 |
+
|
1310 |
+
#: templates/connect.php:246
|
1311 |
+
msgid "Current %s Events"
|
1312 |
+
msgstr "Eventos de %s Actuales"
|
1313 |
+
|
1314 |
+
#: templates/connect.php:247
|
1315 |
+
msgid "Activation, deactivation and uninstall"
|
1316 |
+
msgstr "Activación, desactivación y desinstalación"
|
1317 |
+
|
1318 |
+
#: templates/connect.php:262
|
1319 |
+
msgid "Newsletter"
|
1320 |
+
msgstr "Boletín"
|
1321 |
+
|
1322 |
+
#: templates/connect.php279, templates/forms/license-activation.php:38
|
1323 |
+
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."
|
1324 |
+
msgstr "%1$s periódicamente enviará datos a %2$s para comprobar las actualizaciones de seguridad, nuevas funcionalidades y verificar la validez de tu licencia."
|
1325 |
+
|
1326 |
+
#: templates/connect.php:284
|
1327 |
+
msgid "What permissions are being granted?"
|
1328 |
+
msgstr "¿Qué permisos se otorgan?"
|
1329 |
+
|
1330 |
+
#: templates/connect.php:305
|
1331 |
+
msgid "Don't have a license key?"
|
1332 |
+
msgstr "¿No tienes una clave de licencia?"
|
1333 |
+
|
1334 |
+
#: templates/connect.php:306
|
1335 |
+
msgid "Activate Free Version"
|
1336 |
+
msgstr "Activar Versión Gratuita"
|
1337 |
+
|
1338 |
+
#: templates/connect.php:308
|
1339 |
+
msgid "Have a license key?"
|
1340 |
+
msgstr "¿Tienes una Clave de Licencia?"
|
1341 |
+
|
1342 |
+
#: templates/connect.php:316
|
1343 |
+
msgid "Privacy Policy"
|
1344 |
+
msgstr "Política de Privacidad"
|
1345 |
+
|
1346 |
+
#: templates/connect.php:318
|
1347 |
+
msgid "Terms of Service"
|
1348 |
+
msgstr "Términos de Servicio"
|
1349 |
+
|
1350 |
+
#: templates/connect.php:436
|
1351 |
+
msgctxt "as in the process of sending an email"
|
1352 |
+
msgid "Sending email"
|
1353 |
+
msgstr "Enviando correo electrónico"
|
1354 |
+
|
1355 |
+
#: templates/connect.php:437
|
1356 |
+
msgctxt "as activating plugin"
|
1357 |
+
msgid "Activating"
|
1358 |
+
msgstr "Activando"
|
1359 |
+
|
1360 |
+
#: templates/contact.php:74
|
1361 |
+
msgid "Contact"
|
1362 |
+
msgstr "Contact"
|
1363 |
+
|
1364 |
+
#: templates/debug.php:17
|
1365 |
+
msgctxt "as turned off"
|
1366 |
+
msgid "Off"
|
1367 |
+
msgstr "Apagado"
|
1368 |
+
|
1369 |
+
#: templates/debug.php:18
|
1370 |
+
msgctxt "as turned on"
|
1371 |
+
msgid "On"
|
1372 |
+
msgstr "Encendido"
|
1373 |
+
|
1374 |
+
#: templates/debug.php:20
|
1375 |
+
msgid "SDK"
|
1376 |
+
msgstr "SDK"
|
1377 |
+
|
1378 |
+
#: templates/debug.php:24
|
1379 |
+
msgctxt "as code debugging"
|
1380 |
+
msgid "Debugging"
|
1381 |
+
msgstr "Depurando"
|
1382 |
+
|
1383 |
+
#: templates/debug.php54, templates/debug.php226, templates/debug.php:314
|
1384 |
+
msgid "Actions"
|
1385 |
+
msgstr "Acciones"
|
1386 |
+
|
1387 |
+
#: templates/debug.php:64
|
1388 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1389 |
+
msgstr "¿Está seguro que desea eliminar todos los datos de Freemius?"
|
1390 |
+
|
1391 |
+
#: templates/debug.php:64
|
1392 |
+
msgid "Delete All Accounts"
|
1393 |
+
msgstr "Borrar Todas las Cuentas"
|
1394 |
+
|
1395 |
+
#: templates/debug.php:71
|
1396 |
+
msgid "Clear API Cache"
|
1397 |
+
msgstr "Borrar Caché de la API"
|
1398 |
+
|
1399 |
+
#: templates/debug.php:78
|
1400 |
+
msgid "Sync Data From Server"
|
1401 |
+
msgstr "Sincronizar Datos Desde el Servidor"
|
1402 |
+
|
1403 |
+
#: templates/debug.php:82
|
1404 |
+
msgid "Load DB Option"
|
1405 |
+
msgstr "Cargar opción de BD"
|
1406 |
+
|
1407 |
+
#: templates/debug.php:85
|
1408 |
+
msgid "Set DB Option"
|
1409 |
+
msgstr "Guardar opción en BD"
|
1410 |
+
|
1411 |
+
#: templates/debug.php:162
|
1412 |
+
msgid "Key"
|
1413 |
+
msgstr "Key"
|
1414 |
+
|
1415 |
+
#: templates/debug.php:163
|
1416 |
+
msgid "Value"
|
1417 |
+
msgstr "Value"
|
1418 |
+
|
1419 |
+
#: templates/debug.php:179
|
1420 |
+
msgctxt "as software development kit versions"
|
1421 |
+
msgid "SDK Versions"
|
1422 |
+
msgstr "Versiones SDK"
|
1423 |
+
|
1424 |
+
#: templates/debug.php:184
|
1425 |
+
msgid "SDK Path"
|
1426 |
+
msgstr "Ruta del SDK"
|
1427 |
+
|
1428 |
+
#: templates/debug.php185, templates/debug.php:224
|
1429 |
+
msgid "Module Path"
|
1430 |
+
msgstr "Module Path"
|
1431 |
+
|
1432 |
+
#: templates/debug.php:186
|
1433 |
+
msgid "Is Active"
|
1434 |
+
msgstr "Está Activo"
|
1435 |
+
|
1436 |
+
#: templates/debug.php214, templates/debug/plugins-themes-sync.php:35
|
1437 |
+
msgid "Plugins"
|
1438 |
+
msgstr "Plugins"
|
1439 |
+
|
1440 |
+
#: templates/debug.php214, templates/debug/plugins-themes-sync.php:56
|
1441 |
+
msgid "Themes"
|
1442 |
+
msgstr "Temas"
|
1443 |
+
|
1444 |
+
#: templates/debug.php219, templates/debug.php309, templates/debug.php353,
|
1445 |
+
#: templates/debug/scheduled-crons.php:81
|
1446 |
+
msgid "Slug"
|
1447 |
+
msgstr "Ruta"
|
1448 |
+
|
1449 |
+
#: templates/debug.php221, templates/debug.php:352
|
1450 |
+
msgid "Title"
|
1451 |
+
msgstr "Título"
|
1452 |
+
|
1453 |
+
#: templates/debug.php:222
|
1454 |
+
msgctxt "as application program interface"
|
1455 |
+
msgid "API"
|
1456 |
+
msgstr "API"
|
1457 |
+
|
1458 |
+
#: templates/debug.php:223
|
1459 |
+
msgid "Freemius State"
|
1460 |
+
msgstr "Estado Freemius"
|
1461 |
+
|
1462 |
+
#: templates/debug.php:255
|
1463 |
+
msgctxt "as connection was successful"
|
1464 |
+
msgid "Connected"
|
1465 |
+
msgstr "Conectado"
|
1466 |
+
|
1467 |
+
#: templates/debug.php:256
|
1468 |
+
msgctxt "as connection blocked"
|
1469 |
+
msgid "Blocked"
|
1470 |
+
msgstr "Bloqueado"
|
1471 |
+
|
1472 |
+
#: templates/debug.php:277
|
1473 |
+
msgid "Simulate Trial"
|
1474 |
+
msgstr "Simular período de prueba"
|
1475 |
+
|
1476 |
+
#: templates/debug.php:302
|
1477 |
+
msgid "%s Installs"
|
1478 |
+
msgstr "%s Instalaciones"
|
1479 |
+
|
1480 |
+
#: templates/debug.php:304
|
1481 |
+
msgctxt "like websites"
|
1482 |
+
msgid "Sites"
|
1483 |
+
msgstr "Sitios"
|
1484 |
+
|
1485 |
+
#: templates/debug.php:347
|
1486 |
+
msgid "Add Ons of module %s"
|
1487 |
+
msgstr "Add Ons of module %s"
|
1488 |
+
|
1489 |
+
#: templates/debug.php:384
|
1490 |
+
msgid "Users"
|
1491 |
+
msgstr "Usuarios"
|
1492 |
+
|
1493 |
+
#: templates/debug.php:391
|
1494 |
+
msgid "Verified"
|
1495 |
+
msgstr "Verificado"
|
1496 |
+
|
1497 |
+
#: templates/debug.php:413
|
1498 |
+
msgid "%s Licenses"
|
1499 |
+
msgstr "%s Licencias"
|
1500 |
+
|
1501 |
+
#: templates/debug.php:418
|
1502 |
+
msgid "Plugin ID"
|
1503 |
+
msgstr "Plugin ID"
|
1504 |
+
|
1505 |
+
#: templates/debug.php:420
|
1506 |
+
msgid "Plan ID"
|
1507 |
+
msgstr "Plan ID"
|
1508 |
+
|
1509 |
+
#: templates/debug.php:421
|
1510 |
+
msgid "Quota"
|
1511 |
+
msgstr "Quota"
|
1512 |
+
|
1513 |
+
#: templates/debug.php:422
|
1514 |
+
msgid "Activated"
|
1515 |
+
msgstr "Activated"
|
1516 |
+
|
1517 |
+
#: templates/debug.php:423
|
1518 |
+
msgid "Blocking"
|
1519 |
+
msgstr "Blocking"
|
1520 |
+
|
1521 |
+
#: templates/debug.php:425
|
1522 |
+
msgctxt "as expiration date"
|
1523 |
+
msgid "Expiration"
|
1524 |
+
msgstr "Caducidad"
|
1525 |
+
|
1526 |
+
#: templates/debug.php:454
|
1527 |
+
msgid "Debug Log"
|
1528 |
+
msgstr "Log de Debug"
|
1529 |
+
|
1530 |
+
#: templates/debug.php:458
|
1531 |
+
msgid "All Types"
|
1532 |
+
msgstr "Todos los Tipos"
|
1533 |
+
|
1534 |
+
#: templates/debug.php:465
|
1535 |
+
msgid "All Requests"
|
1536 |
+
msgstr "Todas las Peticiones"
|
1537 |
+
|
1538 |
+
#: templates/debug.php470, templates/debug.php499,
|
1539 |
+
#: templates/debug/logger.php:25
|
1540 |
+
msgid "File"
|
1541 |
+
msgstr "Archivo"
|
1542 |
+
|
1543 |
+
#: templates/debug.php471, templates/debug.php497,
|
1544 |
+
#: templates/debug/logger.php:23
|
1545 |
+
msgid "Function"
|
1546 |
+
msgstr "Función"
|
1547 |
+
|
1548 |
+
#: templates/debug.php:472
|
1549 |
+
msgid "Process ID"
|
1550 |
+
msgstr "ID del Proceso"
|
1551 |
+
|
1552 |
+
#: templates/debug.php:473
|
1553 |
+
msgid "Logger"
|
1554 |
+
msgstr "Logger"
|
1555 |
+
|
1556 |
+
#: templates/debug.php474, templates/debug.php498,
|
1557 |
+
#: templates/debug/logger.php:24
|
1558 |
+
msgid "Message"
|
1559 |
+
msgstr "Mensaje"
|
1560 |
+
|
1561 |
+
#: templates/debug.php:476
|
1562 |
+
msgid "Filter"
|
1563 |
+
msgstr "Filtro"
|
1564 |
+
|
1565 |
+
#: templates/debug.php:484
|
1566 |
+
msgid "Download"
|
1567 |
+
msgstr "Descarga"
|
1568 |
+
|
1569 |
+
#: templates/debug.php495, templates/debug/logger.php:22
|
1570 |
+
msgid "Type"
|
1571 |
+
msgstr "Tipo"
|
1572 |
+
|
1573 |
+
#: templates/debug.php500, templates/debug/logger.php:26
|
1574 |
+
msgid "Timestamp"
|
1575 |
+
msgstr "Timestamp"
|
1576 |
+
|
1577 |
+
#: templates/secure-https-header.php:28
|
1578 |
+
msgid "Secure HTTPS %s page, running from an external domain"
|
1579 |
+
msgstr "Página segura HTTPS %s, desde un dominio externo"
|
1580 |
+
|
1581 |
+
#: includes/customizer/class-fs-customizer-support-section.php55,
|
1582 |
+
#: templates/plugin-info/features.php:43
|
1583 |
+
msgid "Support"
|
1584 |
+
msgstr "Soporte"
|
1585 |
+
|
1586 |
+
#: includes/debug/class-fs-debug-bar-panel.php48,
|
1587 |
+
#: templates/debug/api-calls.php54, templates/debug/logger.php:62
|
1588 |
+
msgctxt "milliseconds"
|
1589 |
+
msgid "ms"
|
1590 |
+
msgstr "ms"
|
1591 |
+
|
1592 |
+
#: includes/debug/debug-bar-start.php:41
|
1593 |
+
msgid "Freemius API"
|
1594 |
+
msgstr "API Freemius"
|
1595 |
+
|
1596 |
+
#: includes/debug/debug-bar-start.php:42
|
1597 |
+
msgid "Requests"
|
1598 |
+
msgstr "Peticiones"
|
1599 |
+
|
1600 |
+
#: templates/account/billing.php:28
|
1601 |
+
msgctxt "verb"
|
1602 |
+
msgid "Update"
|
1603 |
+
msgstr "Actualizar"
|
1604 |
+
|
1605 |
+
#: templates/account/billing.php:39
|
1606 |
+
msgid "Billing"
|
1607 |
+
msgstr "Facturación"
|
1608 |
+
|
1609 |
+
#: templates/account/billing.php44, templates/account/billing.php:44
|
1610 |
+
msgid "Business name"
|
1611 |
+
msgstr "Nombre de la empresa"
|
1612 |
+
|
1613 |
+
#: templates/account/billing.php45, templates/account/billing.php:45
|
1614 |
+
msgid "Tax / VAT ID"
|
1615 |
+
msgstr "Tax / Núm IVA"
|
1616 |
+
|
1617 |
+
#: templates/account/billing.php48, templates/account/billing.php48,
|
1618 |
+
#: templates/account/billing.php49, templates/account/billing.php:49
|
1619 |
+
msgid "Address Line %d"
|
1620 |
+
msgstr "Línea de la dirección %d"
|
1621 |
+
|
1622 |
+
#: templates/account/billing.php52, templates/account/billing.php:52
|
1623 |
+
msgid "City"
|
1624 |
+
msgstr "Ciudad"
|
1625 |
+
|
1626 |
+
#: templates/account/billing.php52, templates/account/billing.php:52
|
1627 |
+
msgid "Town"
|
1628 |
+
msgstr "Municipio"
|
1629 |
+
|
1630 |
+
#: templates/account/billing.php53, templates/account/billing.php:53
|
1631 |
+
msgid "ZIP / Postal Code"
|
1632 |
+
msgstr "Código Postal"
|
1633 |
+
|
1634 |
+
#: templates/account/billing.php:308
|
1635 |
+
msgid "Country"
|
1636 |
+
msgstr "País"
|
1637 |
+
|
1638 |
+
#: templates/account/billing.php:310
|
1639 |
+
msgid "Select Country"
|
1640 |
+
msgstr "Seleccionar País"
|
1641 |
+
|
1642 |
+
#: templates/account/billing.php317, templates/account/billing.php:318
|
1643 |
+
msgid "State"
|
1644 |
+
msgstr "Estado"
|
1645 |
+
|
1646 |
+
#: templates/account/billing.php317, templates/account/billing.php:318
|
1647 |
+
msgid "Province"
|
1648 |
+
msgstr "Provincia"
|
1649 |
+
|
1650 |
+
#: templates/account/payments.php:29
|
1651 |
+
msgid "Payments"
|
1652 |
+
msgstr "Pagos"
|
1653 |
+
|
1654 |
+
#: templates/account/payments.php:36
|
1655 |
+
msgid "Date"
|
1656 |
+
msgstr "Fecha"
|
1657 |
+
|
1658 |
+
#: templates/account/payments.php:37
|
1659 |
+
msgid "Amount"
|
1660 |
+
msgstr "Cantidad"
|
1661 |
+
|
1662 |
+
#: templates/account/payments.php38, templates/account/payments.php:50
|
1663 |
+
msgid "Invoice"
|
1664 |
+
msgstr "Factura"
|
1665 |
+
|
1666 |
+
#: templates/debug/api-calls.php:56
|
1667 |
+
msgid "API"
|
1668 |
+
msgstr "API"
|
1669 |
+
|
1670 |
+
#: templates/debug/api-calls.php:68
|
1671 |
+
msgid "Method"
|
1672 |
+
msgstr "Método"
|
1673 |
+
|
1674 |
+
#: templates/debug/api-calls.php:69
|
1675 |
+
msgid "Code"
|
1676 |
+
msgstr "Código"
|
1677 |
+
|
1678 |
+
#: templates/debug/api-calls.php:70
|
1679 |
+
msgid "Length"
|
1680 |
+
msgstr "Longitud"
|
1681 |
+
|
1682 |
+
#: templates/debug/api-calls.php:71
|
1683 |
+
msgctxt "as file/folder path"
|
1684 |
+
msgid "Path"
|
1685 |
+
msgstr "Ruta"
|
1686 |
+
|
1687 |
+
#: templates/debug/api-calls.php:73
|
1688 |
+
msgid "Body"
|
1689 |
+
msgstr "Cuerpo"
|
1690 |
+
|
1691 |
+
#: templates/debug/api-calls.php:75
|
1692 |
+
msgid "Result"
|
1693 |
+
msgstr "Resultado"
|
1694 |
+
|
1695 |
+
#: templates/debug/api-calls.php:76
|
1696 |
+
msgid "Start"
|
1697 |
+
msgstr "Inicio"
|
1698 |
+
|
1699 |
+
#: templates/debug/api-calls.php:77
|
1700 |
+
msgid "End"
|
1701 |
+
msgstr "Fin"
|
1702 |
+
|
1703 |
+
#: templates/debug/logger.php:15
|
1704 |
+
msgid "Log"
|
1705 |
+
msgstr "Log"
|
1706 |
+
|
1707 |
+
#. translators: %s: time period (e.g. In "2 hours")
|
1708 |
+
#: templates/debug/plugins-themes-sync.php18,
|
1709 |
+
#: templates/debug/scheduled-crons.php:92
|
1710 |
+
msgid "In %s"
|
1711 |
+
msgstr "En %s"
|
1712 |
+
|
1713 |
+
#. translators: %s: time period (e.g. "2 hours" ago)
|
1714 |
+
#: templates/debug/plugins-themes-sync.php20,
|
1715 |
+
#: templates/debug/scheduled-crons.php:94
|
1716 |
+
msgid "%s ago"
|
1717 |
+
msgstr "hace %s"
|
1718 |
+
|
1719 |
+
#: templates/debug/plugins-themes-sync.php21,
|
1720 |
+
#: templates/debug/scheduled-crons.php:75
|
1721 |
+
msgctxt "seconds"
|
1722 |
+
msgid "sec"
|
1723 |
+
msgstr "sec"
|
1724 |
+
|
1725 |
+
#: templates/debug/plugins-themes-sync.php:23
|
1726 |
+
msgid "Plugins & Themes Sync"
|
1727 |
+
msgstr "Sincronizar Plugins y Temas"
|
1728 |
+
|
1729 |
+
#: templates/debug/plugins-themes-sync.php:28
|
1730 |
+
msgid "Total"
|
1731 |
+
msgstr "Total"
|
1732 |
+
|
1733 |
+
#: templates/debug/plugins-themes-sync.php29,
|
1734 |
+
#: templates/debug/scheduled-crons.php:85
|
1735 |
+
msgid "Last"
|
1736 |
+
msgstr "Último"
|
1737 |
+
|
1738 |
+
#: templates/debug/scheduled-crons.php:77
|
1739 |
+
msgid "Scheduled Crons"
|
1740 |
+
msgstr "Crons Programados"
|
1741 |
+
|
1742 |
+
#: templates/debug/scheduled-crons.php:82
|
1743 |
+
msgid "Module"
|
1744 |
+
msgstr "Módulo"
|
1745 |
+
|
1746 |
+
#: templates/debug/scheduled-crons.php:83
|
1747 |
+
msgid "Module Type"
|
1748 |
+
msgstr "Tipo de Módulo"
|
1749 |
+
|
1750 |
+
#: templates/debug/scheduled-crons.php:84
|
1751 |
+
msgid "Cron Type"
|
1752 |
+
msgstr "Tipo de Cron"
|
1753 |
+
|
1754 |
+
#: templates/debug/scheduled-crons.php:86
|
1755 |
+
msgid "Next"
|
1756 |
+
msgstr "Siguiente"
|
1757 |
+
|
1758 |
+
#: templates/forms/affiliation.php:81
|
1759 |
+
msgid "Non-expiring"
|
1760 |
+
msgstr "Non-expiring"
|
1761 |
+
|
1762 |
+
#: templates/forms/affiliation.php:84
|
1763 |
+
msgid "Apply to become an affiliate"
|
1764 |
+
msgstr "Apply to become an affiliate"
|
1765 |
+
|
1766 |
+
#: templates/forms/affiliation.php:103
|
1767 |
+
msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
1768 |
+
msgstr "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
1769 |
+
|
1770 |
+
#: templates/forms/affiliation.php:114
|
1771 |
+
msgid "Thank you for applying for our affili
|