Version Description
- Added: preparation for automatic translation packages
- Added: prevent adding duplicate sidebar titles
- Fixed: sidebar quick select would in rare cases not show sidebars
- Fixed: UI improvements
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 3.4.3 |
Comparing to | |
See all releases |
Code changes from version 3.3.3 to 3.4.3
- admin/admin.php +110 -0
- admin/db-updates.php +33 -50
- admin/post_type_sidebar.php +345 -324
- admin/screen_widgets.php +102 -0
- admin/sidebar-edit.php +828 -372
- admin/sidebar-list-table.php +634 -0
- admin/sidebar-overview.php +237 -174
- app.php +58 -115
- cas_uninstall.php +1 -1
- changelog.txt +30 -0
- content-aware-sidebars.php +7 -15
- css/flatpickr.dark.min.css +1 -0
- css/icon.png +0 -0
- css/style.css +6 -6
- freemius.php +3 -22
- js/cas_admin.js +128 -40
- js/cas_admin.min.js +7 -7
- js/flatpickr.min.js +3 -0
- js/general.js +61 -0
- js/suggest-sidebars.js +12 -10
- js/suggest-sidebars.min.js +2 -2
- js/widgets.js +2 -2
- js/widgets.min.js +2 -2
- lib/freemius/.codeclimate.yml +6 -0
- lib/freemius/README.md +7 -4
- lib/freemius/assets/css/admin/account.css +1 -1
- lib/freemius/assets/css/admin/common.css +1 -1
- lib/freemius/assets/css/admin/dialog-boxes.css +2 -3
- lib/freemius/assets/js/jquery.ba-postmessage.js +0 -222
- lib/freemius/assets/js/jquery.ba-postmessage.min.js +0 -9
- lib/freemius/assets/js/postmessage.js +28 -3
- lib/freemius/assets/scss/_mixins.scss +11 -8
- lib/freemius/assets/scss/admin/_deactivation-feedback.scss +13 -0
- lib/freemius/assets/scss/admin/_license-key-resend.scss +18 -9
- lib/freemius/assets/scss/admin/_modal-common.scss +51 -0
- lib/freemius/assets/scss/admin/account.scss +66 -0
- lib/freemius/assets/scss/admin/common.scss +26 -0
- lib/freemius/assets/scss/admin/dialog-boxes.scss +1 -0
- lib/freemius/config.php +132 -60
- lib/freemius/gulpfile.js +42 -0
- lib/freemius/includes/class-freemius-abstract.php +87 -14
- lib/freemius/includes/class-freemius.php +1794 -598
- lib/freemius/includes/class-fs-api.php +108 -5
- lib/freemius/includes/class-fs-logger.php +27 -1
- lib/freemius/includes/class-fs-plugin-updater.php +5 -2
- lib/freemius/includes/class-fs-security.php +19 -1
- lib/freemius/includes/entities/class-fs-billing.php +95 -0
- lib/freemius/includes/entities/class-fs-entity.php +1 -1
- lib/freemius/includes/entities/class-fs-plugin-license.php +24 -2
- lib/freemius/includes/entities/class-fs-plugin-plan.php +5 -0
- lib/freemius/includes/entities/class-fs-plugin.php +4 -0
- lib/freemius/includes/entities/class-fs-site.php +21 -0
- lib/freemius/includes/fs-core-functions.php +59 -7
- lib/freemius/includes/fs-essential-functions.php +29 -6
- lib/freemius/includes/fs-plugin-info-dialog.php +5 -11
- lib/freemius/includes/i18n.php +371 -321
- lib/freemius/includes/l10n.php +250 -0
- lib/freemius/includes/managers/class-fs-admin-menu-manager.php +24 -2
- lib/freemius/includes/managers/class-fs-admin-notice-manager.php +4 -1
- lib/freemius/includes/managers/class-fs-license-manager.php +3 -0
- lib/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php +4 -1
- lib/freemius/includes/sdk/Exceptions/EmptyArgumentException.php +4 -1
- lib/freemius/includes/sdk/Exceptions/Exception.php +66 -67
- lib/freemius/includes/sdk/Exceptions/InvalidArgumentException.php +3 -1
- lib/freemius/includes/sdk/Exceptions/OAuthException.php +7 -7
- lib/freemius/includes/sdk/Freemius.php +15 -8
- lib/freemius/includes/sdk/FreemiusBase.php +14 -4
- lib/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +4 -2
- lib/freemius/languages/freemius-da_DK.mo +0 -0
- lib/freemius/languages/freemius-da_DK.po +1661 -0
- lib/freemius/languages/freemius-en.mo +0 -0
- lib/freemius/languages/freemius-en.po +1522 -0
- lib/freemius/languages/freemius-he.mo +0 -0
- lib/freemius/languages/freemius-he.po +1661 -0
- lib/freemius/languages/freemius-it_IT.mo +0 -0
- lib/freemius/languages/freemius-it_IT.po +1668 -0
- lib/freemius/languages/freemius.pot +1525 -0
- lib/freemius/package.json +32 -0
- lib/freemius/start.php +10 -12
- lib/freemius/templates/account.php +36 -8
- lib/freemius/templates/add-ons.php +9 -7
- lib/freemius/templates/add-trial-to-pricing.php +31 -0
- lib/freemius/templates/all-admin-notice.php +4 -0
- lib/freemius/templates/billing.php +404 -4
- lib/freemius/templates/checkout.php +43 -63
- lib/freemius/templates/connect.php +77 -18
- lib/freemius/templates/contact.php +3 -0
- lib/freemius/templates/debug.php +76 -4
- lib/freemius/templates/debug/logger.php +10 -4
- lib/freemius/templates/debug/scheduled-crons.php +33 -24
- lib/freemius/templates/email.php +3 -0
- lib/freemius/templates/firewall-issues-js.php +2 -2
- lib/freemius/templates/forms/deactivation/contact.php +3 -0
- lib/freemius/templates/forms/deactivation/form.php +61 -11
- lib/freemius/templates/forms/deactivation/retry-skip.php +4 -1
- lib/freemius/templates/forms/license-activation.php +29 -29
- lib/freemius/templates/forms/optout.php +211 -0
- lib/freemius/templates/forms/resend-key.php +16 -22
- lib/freemius/templates/forms/trial-start.php +174 -0
- lib/freemius/templates/plugin-icon.php +57 -23
- lib/freemius/templates/plugin-info/description.php +2 -0
- lib/freemius/templates/plugin-info/features.php +2 -0
- lib/freemius/templates/plugin-info/screenshots.php +2 -0
- lib/freemius/templates/pricing.php +24 -10
- lib/freemius/templates/sticky-admin-notice-js.php +1 -1
- lib/wp-content-aware-engine/assets/css/condition_groups.css +1 -1
- lib/wp-content-aware-engine/assets/js/backbone.epoxy.min.js +6 -0
- lib/wp-content-aware-engine/assets/js/condition_groups.js +97 -23
- lib/wp-content-aware-engine/assets/js/condition_groups.min.js +1 -1
- lib/wp-content-aware-engine/bootstrap.php +93 -0
- lib/wp-content-aware-engine/core.php +123 -84
- lib/wp-content-aware-engine/meta.php +0 -1
- lib/wp-content-aware-engine/module/author.php +1 -2
- lib/wp-content-aware-engine/module/base.php +6 -10
- lib/wp-content-aware-engine/module/bp_member.php +6 -5
- lib/wp-content-aware-engine/module/date.php +0 -1
- lib/wp-content-aware-engine/module/page_template.php +0 -2
- lib/wp-content-aware-engine/module/pods.php +0 -2
- lib/wp-content-aware-engine/module/post_type.php +58 -30
- lib/wp-content-aware-engine/module/static.php +0 -1
- lib/wp-content-aware-engine/module/taxonomy.php +2 -5
- lib/wp-content-aware-engine/view/group_template.php +20 -6
- lib/wp-content-aware-engine/view/meta_box.php +1 -1
- lib/wp-db-updater/wp-db-updater.php +20 -2
- readme.txt +73 -52
- sidebar.php +45 -75
admin/admin.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
+
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
+
*/
|
8 |
+
|
9 |
+
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
10 |
+
header('Status: 403 Forbidden');
|
11 |
+
header('HTTP/1.1 403 Forbidden');
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
abstract class CAS_Admin {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Screen identifier
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
protected $_screen;
|
22 |
+
|
23 |
+
public function __construct() {
|
24 |
+
add_action('admin_menu',
|
25 |
+
array($this,'add_menu'),99);
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Set up screen and menu if necessary
|
30 |
+
*
|
31 |
+
* @since 3.4
|
32 |
+
*/
|
33 |
+
public function add_menu() {
|
34 |
+
$this->_screen = $this->get_screen();
|
35 |
+
add_action('load-'.$this->_screen,
|
36 |
+
array($this,'prepare_screen'));
|
37 |
+
add_action('load-'.$this->_screen,
|
38 |
+
array($this,'add_scripts_styles'));
|
39 |
+
add_action('load-'.$this->_screen,
|
40 |
+
array($this,'prepare_upgrade_modal'));
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get current screen
|
45 |
+
*
|
46 |
+
* @since 3.4
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
abstract public function get_screen();
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Prepare screen load
|
53 |
+
*
|
54 |
+
* @since 3.4
|
55 |
+
* @return void
|
56 |
+
*/
|
57 |
+
abstract public function prepare_screen();
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Register and enqueue scripts styles
|
61 |
+
* for screen
|
62 |
+
*
|
63 |
+
* @since 3.4
|
64 |
+
*/
|
65 |
+
abstract public function add_scripts_styles();
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Prepare plugin upgrade modal
|
69 |
+
*
|
70 |
+
* @since 3.4.1
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
public function prepare_upgrade_modal() {
|
74 |
+
if ( cas_fs()->is_not_paying() ) {
|
75 |
+
add_thickbox();
|
76 |
+
//enqueue scripts here
|
77 |
+
add_action('admin_footer',
|
78 |
+
array($this,'render_upgrade_modal'));
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Render plugin upgrade modal
|
84 |
+
*
|
85 |
+
* @since 3.4.1
|
86 |
+
* @return void
|
87 |
+
*/
|
88 |
+
public function render_upgrade_modal() {
|
89 |
+
$features = array(
|
90 |
+
__('Extra condition types','content-aware-sidebars'),
|
91 |
+
__('Widget Revisions','content-aware-sidebars'),
|
92 |
+
__('Visibility for roles','content-aware-sidebars'),
|
93 |
+
__('Time Schedule','content-aware-sidebars'),
|
94 |
+
__('Sync widgets across themes','content-aware-sidebars')
|
95 |
+
);
|
96 |
+
echo '<a style="display:none;" class="thickbox js-cas-pro-popup" href="#TB_inline?width=630&height=230&inlineId=pro-popup-notice" title="'.__('Buy Content Aware Sidebars Pro','content-aware-sidebars').'"></a>';
|
97 |
+
echo '<div id="pro-popup-notice" style="display:none;">';
|
98 |
+
echo '<img style="margin-top:15px;" class="alignright" src="'.plugins_url('../css/icon.png', __FILE__).'" width="128" height="128" />';
|
99 |
+
echo '
|
100 |
+
<h2>'.__('Get All Features With Content Aware Sidebars Pro','content-aware-sidebars').'</h2>';
|
101 |
+
echo '<p>'.sprintf(__('Power up your sidebars with: %s and more.','content-aware-sidebars'),strtolower(implode(', ', $features))).'</p>';
|
102 |
+
echo '<p>'.__('You can upgrade without leaving the admin panel by clicking below.','content-aware-sidebars');
|
103 |
+
echo '<br />'.__('Free updates and email support included.','content-aware-sidebars').'</p>';
|
104 |
+
echo '<p><a class="button-primary" target="_blank" href="'.esc_url(cas_fs()->get_upgrade_url()).'">'.__('Buy Now','content-aware-sidebars').'</a> <a href="" class="button-secondary js-cas-pro-read-more" target="_blank" href="">'.__('Read More','content-aware-sidebars').'</a></p>';
|
105 |
+
echo '</div>';
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
//
|
admin/db-updates.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
@@ -12,12 +12,42 @@ if (!defined('CAS_App::PLUGIN_VERSION')) {
|
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
-
$cas_db_updater = new WP_DB_Updater('cas_db_version',CAS_App::PLUGIN_VERSION);
|
16 |
-
$cas_db_updater->register_version_update('0.8','cas_update_to_08');
|
17 |
$cas_db_updater->register_version_update('1.1','cas_update_to_11');
|
18 |
$cas_db_updater->register_version_update('2.0','cas_update_to_20');
|
19 |
$cas_db_updater->register_version_update('3.0','cas_update_to_30');
|
20 |
$cas_db_updater->register_version_update('3.1','cas_update_to_31');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
/**
|
23 |
* Version 3.0 -> 3.1
|
@@ -220,51 +250,4 @@ function cas_update_to_11() {
|
|
220 |
return true;
|
221 |
}
|
222 |
|
223 |
-
/**
|
224 |
-
* Version 0 -> 0.8
|
225 |
-
* Introduces database version management, adds preficed keys to metadata
|
226 |
-
*
|
227 |
-
* @global object $wpdb
|
228 |
-
* @return boolean
|
229 |
-
*/
|
230 |
-
function cas_update_to_08() {
|
231 |
-
global $wpdb;
|
232 |
-
|
233 |
-
$metadata = array(
|
234 |
-
'post_types',
|
235 |
-
'taxonomies',
|
236 |
-
'authors',
|
237 |
-
'page_templates',
|
238 |
-
'static',
|
239 |
-
'exposure',
|
240 |
-
'handle',
|
241 |
-
'host',
|
242 |
-
'merge-pos'
|
243 |
-
);
|
244 |
-
|
245 |
-
// Get all sidebars
|
246 |
-
$posts = $wpdb->get_col($wpdb->prepare("
|
247 |
-
SELECT ID
|
248 |
-
FROM $wpdb->posts
|
249 |
-
WHERE post_type = %s
|
250 |
-
",'sidebar'));
|
251 |
-
|
252 |
-
//Check if there is any
|
253 |
-
if(!empty($posts)) {
|
254 |
-
//Update the meta keys
|
255 |
-
foreach($metadata as $meta) {
|
256 |
-
$wpdb->query("
|
257 |
-
UPDATE $wpdb->postmeta
|
258 |
-
SET meta_key = '_cas_".$meta."'
|
259 |
-
WHERE meta_key = '".$meta."'
|
260 |
-
AND post_id IN(".implode(',',$posts).")
|
261 |
-
");
|
262 |
-
}
|
263 |
-
// Clear cache for new meta keys
|
264 |
-
wp_cache_flush();
|
265 |
-
}
|
266 |
-
|
267 |
-
return true;
|
268 |
-
}
|
269 |
-
|
270 |
//eol
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
+
$cas_db_updater = new WP_DB_Updater('cas_db_version',CAS_App::PLUGIN_VERSION, true);
|
|
|
16 |
$cas_db_updater->register_version_update('1.1','cas_update_to_11');
|
17 |
$cas_db_updater->register_version_update('2.0','cas_update_to_20');
|
18 |
$cas_db_updater->register_version_update('3.0','cas_update_to_30');
|
19 |
$cas_db_updater->register_version_update('3.1','cas_update_to_31');
|
20 |
+
$cas_db_updater->register_version_update('3.4','cas_update_to_34');
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Version 3.3.3 -> 3.4
|
24 |
+
* Inherit condition exposure from sidebar
|
25 |
+
* Remove sidebar exposure
|
26 |
+
*
|
27 |
+
* @since 3.4
|
28 |
+
* @return boolean
|
29 |
+
*/
|
30 |
+
function cas_update_to_34() {
|
31 |
+
global $wpdb;
|
32 |
+
|
33 |
+
$wpdb->query("
|
34 |
+
UPDATE $wpdb->posts AS c
|
35 |
+
INNER JOIN $wpdb->posts AS s ON s.ID = c.post_parent
|
36 |
+
INNER JOIN $wpdb->postmeta AS e ON e.post_id = s.ID
|
37 |
+
SET c.menu_order = e.meta_value
|
38 |
+
WHERE c.post_type = 'condition_group'
|
39 |
+
AND e.meta_key = '_ca_exposure'
|
40 |
+
");
|
41 |
+
|
42 |
+
$wpdb->query("
|
43 |
+
DELETE FROM $wpdb->postmeta
|
44 |
+
WHERE meta_key = '_ca_exposure'
|
45 |
+
");
|
46 |
+
|
47 |
+
wp_cache_flush();
|
48 |
+
|
49 |
+
return true;
|
50 |
+
}
|
51 |
|
52 |
/**
|
53 |
* Version 3.0 -> 3.1
|
250 |
return true;
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
//eol
|
admin/post_type_sidebar.php
CHANGED
@@ -1,325 +1,346 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Content Aware Sidebars
|
4 |
-
* @author Joachim Jensen <jv@intox.dk>
|
5 |
-
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
-
*/
|
8 |
-
|
9 |
-
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
10 |
-
header('Status: 403 Forbidden');
|
11 |
-
header('HTTP/1.1 403 Forbidden');
|
12 |
-
exit;
|
13 |
-
}
|
14 |
-
|
15 |
-
class CAS_Post_Type_Sidebar {
|
16 |
-
|
17 |
-
const MODULE_NAME = 'post_type';
|
18 |
-
|
19 |
-
protected static $_theme_sidebars = array();
|
20 |
-
|
21 |
-
public function __construct(){
|
22 |
-
add_action('admin_init',
|
23 |
-
array(__CLASS__,'initiate'));
|
24 |
-
add_action('widgets_init',
|
25 |
-
array(__CLASS__,'get_theme_sidebars'),98);
|
26 |
-
}
|
27 |
-
|
28 |
-
public static function initiate() {
|
29 |
-
$module = WPCACore::modules()->get(self::MODULE_NAME);
|
30 |
-
if(self::$_theme_sidebars && $module) {
|
31 |
-
foreach ($module->_post_types()->get_all() as $post_type) {
|
32 |
-
add_action('add_meta_boxes_'.$post_type->name,
|
33 |
-
array(__CLASS__,'create_meta_boxes'));
|
34 |
-
add_action('save_post_'.$post_type->name,
|
35 |
-
array(__CLASS__,'save_post_sidebars'),10,2);
|
36 |
-
add_action('admin_enqueue_scripts',
|
37 |
-
array(__CLASS__,'enqueue_scripts'),8);
|
38 |
-
}
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Gather theme sidebars for later use
|
44 |
-
*
|
45 |
-
* @since 3.3
|
46 |
-
* @return void
|
47 |
-
*/
|
48 |
-
public static function get_theme_sidebars() {
|
49 |
-
if(is_admin()) {
|
50 |
-
global $wp_registered_sidebars;
|
51 |
-
foreach($wp_registered_sidebars as $sidebar) {
|
52 |
-
//todo: check for cas id, issue after switching themes
|
53 |
-
self::$_theme_sidebars[$sidebar['id']] = array(
|
54 |
-
'label' => $sidebar['name'],
|
55 |
-
'options' => array(),
|
56 |
-
'select' => array()
|
57 |
-
);
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Save sidebars and conditions for post
|
64 |
-
*
|
65 |
-
* @since 3.3
|
66 |
-
* @param int $post_id
|
67 |
-
* @param WP_Post $post
|
68 |
-
* @return void
|
69 |
-
*/
|
70 |
-
public static function save_post_sidebars($post_id, $post) {
|
71 |
-
|
72 |
-
// Save button pressed
|
73 |
-
if (!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
74 |
-
return;
|
75 |
-
|
76 |
-
// Check post permissions
|
77 |
-
if (!current_user_can('edit_post', $post_id))
|
78 |
-
return;
|
79 |
-
|
80 |
-
if($post->post_status == 'auto-draft') {
|
81 |
-
return;
|
82 |
-
}
|
83 |
-
|
84 |
-
// Check autosave
|
85 |
-
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
86 |
-
return;
|
87 |
-
|
88 |
-
$meta_key = WPCACore::PREFIX . self::MODULE_NAME;
|
89 |
-
$new = isset($_POST['
|
90 |
-
|
91 |
-
$relations = array();
|
92 |
-
foreach(self::_get_content_sidebars(array($post_id)) as $relation) {
|
93 |
-
$relations[$relation->ID] = $relation->group_id;
|
94 |
-
}
|
95 |
-
|
96 |
-
$user_can_create_sidebar = current_user_can(CAS_App::CAPABILITY);
|
97 |
-
|
98 |
-
foreach ($new as $host => $sidebar_id_string) {
|
99 |
-
$sidebar_ids = explode(',', $sidebar_id_string);
|
100 |
-
foreach ($sidebar_ids as $sidebar_id) {
|
101 |
-
//Post has sidebar already
|
102 |
-
if(isset($relations[$sidebar_id])) {
|
103 |
-
unset($relations[$sidebar_id]);
|
104 |
-
//Discard empty
|
105 |
-
} elseif($sidebar_id) {
|
106 |
-
|
107 |
-
$condition_group_id = 0;
|
108 |
-
|
109 |
-
//New sidebar
|
110 |
-
//check permissions here
|
111 |
-
if($sidebar_id[0] == '_') {
|
112 |
-
if($user_can_create_sidebar) {
|
113 |
-
$id = wp_insert_post(array(
|
114 |
-
'post_title' => str_replace('
|
115 |
-
'post_status' =>
|
116 |
-
'post_type' => CAS_App::TYPE_SIDEBAR
|
117 |
-
));
|
118 |
-
if($id) {
|
119 |
-
//wp_insert_post does not handle meta before WP4.4
|
120 |
-
add_post_meta($id, WPCACore::PREFIX.'host', $host);
|
121 |
-
$condition_group_id = WPCACore::add_condition_group($id);
|
122 |
-
}
|
123 |
-
}
|
124 |
-
} else {
|
125 |
-
//Add post to group with other posts
|
126 |
-
$id = intval($sidebar_id);
|
127 |
-
$condition_groups = get_posts(array(
|
128 |
-
'posts_per_page' => 1,
|
129 |
-
'meta_key' => $meta_key,
|
130 |
-
'meta_value' => $post->post_type,
|
131 |
-
'meta_compare' => '!=',
|
132 |
-
'post_parent' => $id,
|
133 |
-
'post_type' => WPCACore::TYPE_CONDITION_GROUP,
|
134 |
-
'post_status' => WPCACore::STATUS_PUBLISHED
|
135 |
-
));
|
136 |
-
if($condition_groups) {
|
137 |
-
$condition_group_id = $condition_groups[0]->ID;
|
138 |
-
} else {
|
139 |
-
$condition_group_id = WPCACore::add_condition_group($id);
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
if($condition_group_id) {
|
144 |
-
add_post_meta($condition_group_id, $meta_key, $post_id);
|
145 |
-
//add_post_meta($condition_group_id, $meta_key.'_direct', 1);
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
149 |
-
}
|
150 |
-
|
151 |
-
//remove old relations
|
152 |
-
//todo: sanity check if post is added to several groups?
|
153 |
-
foreach ($relations as $sidebar_id => $group_id) {
|
154 |
-
//group with no post_type meta will be removed
|
155 |
-
//even if it has other meta (unlikely)
|
156 |
-
$group_meta = get_post_meta($group_id, $meta_key);
|
157 |
-
if(count($group_meta) <= 1) {
|
158 |
-
wp_delete_post($group_id);
|
159 |
-
} else {
|
160 |
-
delete_post_meta($group_id, $meta_key, $post_id);
|
161 |
-
}
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Create sidebar meta box for post types
|
167 |
-
*
|
168 |
-
* @since 3.3
|
169 |
-
* @param WP_Post $post
|
170 |
-
* @return void
|
171 |
-
*/
|
172 |
-
public static function create_meta_boxes($post) {
|
173 |
-
add_meta_box(
|
174 |
-
'cas-content-sidebars',
|
175 |
-
__('Sidebars - Quick Select','content-aware-sidebars'),
|
176 |
-
array(__CLASS__, 'render_sidebars_metabox'),
|
177 |
-
$post->post_type,
|
178 |
-
'side',
|
179 |
-
'default'
|
180 |
-
);
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Render sidebar metabox for post types
|
185 |
-
*
|
186 |
-
* @since 3.3
|
187 |
-
* @param WP_Post $post
|
188 |
-
* @return void
|
189 |
-
*/
|
190 |
-
public static function render_sidebars_metabox($post) {
|
191 |
-
|
192 |
-
$module = WPCACore::modules()->get(self::MODULE_NAME);
|
193 |
-
|
194 |
-
$post_sidebars = array();
|
195 |
-
foreach(self::_get_content_sidebars(array($post->ID)) as $sidebar) {
|
196 |
-
$post_sidebars[$sidebar->ID] = $sidebar->ID;
|
197 |
-
}
|
198 |
-
|
199 |
-
$sidebars = CAS_App::instance()->manager()->sidebars;
|
200 |
-
|
201 |
-
$host_meta = CAS_App::instance()->manager()->metadata()->get('host');
|
202 |
-
foreach ($sidebars as $sidebar) {
|
203 |
-
$host_id = $host_meta->get_data($sidebar->ID);
|
204 |
-
if(isset(self::$_theme_sidebars[$host_id])) {
|
205 |
-
self::$_theme_sidebars[$host_id]['options'][
|
206 |
-
'id' => $sidebar->ID,
|
207 |
-
'text' => $sidebar->post_title
|
208 |
-
);
|
209 |
-
}
|
210 |
-
if(isset($post_sidebars[$sidebar->ID])) {
|
211 |
-
self::$_theme_sidebars[$host_id]['select'][$sidebar->ID] = $sidebar->ID;
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
$labels = array(
|
216 |
-
'canCreate' => current_user_can(CAS_App::CAPABILITY),
|
217 |
-
'createNew' => __('Create New','content-aware-sidebars'),
|
218 |
-
'labelNew' => __('New','content-aware-sidebars')
|
219 |
-
);
|
220 |
-
if($labels['canCreate']) {
|
221 |
-
$labels['notFound'] = __('Type to Add New Sidebar');
|
222 |
-
} else {
|
223 |
-
$labels['notFound'] = __('No sidebars found');
|
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 |
//eol
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
+
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
+
*/
|
8 |
+
|
9 |
+
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
10 |
+
header('Status: 403 Forbidden');
|
11 |
+
header('HTTP/1.1 403 Forbidden');
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
class CAS_Post_Type_Sidebar {
|
16 |
+
|
17 |
+
const MODULE_NAME = 'post_type';
|
18 |
+
|
19 |
+
protected static $_theme_sidebars = array();
|
20 |
+
|
21 |
+
public function __construct(){
|
22 |
+
add_action('admin_init',
|
23 |
+
array(__CLASS__,'initiate'));
|
24 |
+
add_action('widgets_init',
|
25 |
+
array(__CLASS__,'get_theme_sidebars'),98);
|
26 |
+
}
|
27 |
+
|
28 |
+
public static function initiate() {
|
29 |
+
$module = WPCACore::modules()->get(self::MODULE_NAME);
|
30 |
+
if(self::$_theme_sidebars && $module) {
|
31 |
+
foreach ($module->_post_types()->get_all() as $post_type) {
|
32 |
+
add_action('add_meta_boxes_'.$post_type->name,
|
33 |
+
array(__CLASS__,'create_meta_boxes'));
|
34 |
+
add_action('save_post_'.$post_type->name,
|
35 |
+
array(__CLASS__,'save_post_sidebars'),10,2);
|
36 |
+
add_action('admin_enqueue_scripts',
|
37 |
+
array(__CLASS__,'enqueue_scripts'),8);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Gather theme sidebars for later use
|
44 |
+
*
|
45 |
+
* @since 3.3
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public static function get_theme_sidebars() {
|
49 |
+
if(is_admin()) {
|
50 |
+
global $wp_registered_sidebars;
|
51 |
+
foreach($wp_registered_sidebars as $sidebar) {
|
52 |
+
//todo: check for cas id, issue after switching themes
|
53 |
+
self::$_theme_sidebars[$sidebar['id']] = array(
|
54 |
+
'label' => $sidebar['name'],
|
55 |
+
'options' => array(),
|
56 |
+
'select' => array()
|
57 |
+
);
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Save sidebars and conditions for post
|
64 |
+
*
|
65 |
+
* @since 3.3
|
66 |
+
* @param int $post_id
|
67 |
+
* @param WP_Post $post
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
+
public static function save_post_sidebars($post_id, $post) {
|
71 |
+
|
72 |
+
// Save button pressed
|
73 |
+
if (!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
74 |
+
return;
|
75 |
+
|
76 |
+
// Check post permissions
|
77 |
+
if (!current_user_can('edit_post', $post_id))
|
78 |
+
return;
|
79 |
+
|
80 |
+
if($post->post_status == 'auto-draft') {
|
81 |
+
return;
|
82 |
+
}
|
83 |
+
|
84 |
+
// Check autosave
|
85 |
+
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
86 |
+
return;
|
87 |
+
|
88 |
+
$meta_key = WPCACore::PREFIX . self::MODULE_NAME;
|
89 |
+
$new = isset($_POST['cas_sidebars']) ? $_POST['cas_sidebars'] : array();
|
90 |
+
|
91 |
+
$relations = array();
|
92 |
+
foreach(self::_get_content_sidebars(array($post_id)) as $relation) {
|
93 |
+
$relations[$relation->ID] = $relation->group_id;
|
94 |
+
}
|
95 |
+
|
96 |
+
$user_can_create_sidebar = current_user_can(CAS_App::CAPABILITY);
|
97 |
+
|
98 |
+
foreach ($new as $host => $sidebar_id_string) {
|
99 |
+
$sidebar_ids = explode(',', $sidebar_id_string);
|
100 |
+
foreach ($sidebar_ids as $sidebar_id) {
|
101 |
+
//Post has sidebar already
|
102 |
+
if(isset($relations[$sidebar_id])) {
|
103 |
+
unset($relations[$sidebar_id]);
|
104 |
+
//Discard empty
|
105 |
+
} elseif($sidebar_id) {
|
106 |
+
|
107 |
+
$condition_group_id = 0;
|
108 |
+
|
109 |
+
//New sidebar
|
110 |
+
//check permissions here
|
111 |
+
if($sidebar_id[0] == '_') {
|
112 |
+
if($user_can_create_sidebar) {
|
113 |
+
$id = wp_insert_post(array(
|
114 |
+
'post_title' => str_replace('__',',',substr($sidebar_id,1)),
|
115 |
+
'post_status' => CAS_App::STATUS_INACTIVE,
|
116 |
+
'post_type' => CAS_App::TYPE_SIDEBAR
|
117 |
+
));
|
118 |
+
if($id) {
|
119 |
+
//wp_insert_post does not handle meta before WP4.4
|
120 |
+
add_post_meta($id, WPCACore::PREFIX.'host', $host);
|
121 |
+
$condition_group_id = WPCACore::add_condition_group($id);
|
122 |
+
}
|
123 |
+
}
|
124 |
+
} else {
|
125 |
+
//Add post to group with other posts
|
126 |
+
$id = intval($sidebar_id);
|
127 |
+
$condition_groups = get_posts(array(
|
128 |
+
'posts_per_page' => 1,
|
129 |
+
'meta_key' => $meta_key,
|
130 |
+
'meta_value' => $post->post_type,
|
131 |
+
'meta_compare' => '!=',
|
132 |
+
'post_parent' => $id,
|
133 |
+
'post_type' => WPCACore::TYPE_CONDITION_GROUP,
|
134 |
+
'post_status' => WPCACore::STATUS_PUBLISHED
|
135 |
+
));
|
136 |
+
if($condition_groups) {
|
137 |
+
$condition_group_id = $condition_groups[0]->ID;
|
138 |
+
} else {
|
139 |
+
$condition_group_id = WPCACore::add_condition_group($id);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
if($condition_group_id) {
|
144 |
+
add_post_meta($condition_group_id, $meta_key, $post_id);
|
145 |
+
//add_post_meta($condition_group_id, $meta_key.'_direct', 1);
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
//remove old relations
|
152 |
+
//todo: sanity check if post is added to several groups?
|
153 |
+
foreach ($relations as $sidebar_id => $group_id) {
|
154 |
+
//group with no post_type meta will be removed
|
155 |
+
//even if it has other meta (unlikely)
|
156 |
+
$group_meta = get_post_meta($group_id, $meta_key);
|
157 |
+
if(count($group_meta) <= 1) {
|
158 |
+
wp_delete_post($group_id);
|
159 |
+
} else {
|
160 |
+
delete_post_meta($group_id, $meta_key, $post_id);
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Create sidebar meta box for post types
|
167 |
+
*
|
168 |
+
* @since 3.3
|
169 |
+
* @param WP_Post $post
|
170 |
+
* @return void
|
171 |
+
*/
|
172 |
+
public static function create_meta_boxes($post) {
|
173 |
+
add_meta_box(
|
174 |
+
'cas-content-sidebars',
|
175 |
+
__('Sidebars - Quick Select','content-aware-sidebars'),
|
176 |
+
array(__CLASS__, 'render_sidebars_metabox'),
|
177 |
+
$post->post_type,
|
178 |
+
'side',
|
179 |
+
'default'
|
180 |
+
);
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Render sidebar metabox for post types
|
185 |
+
*
|
186 |
+
* @since 3.3
|
187 |
+
* @param WP_Post $post
|
188 |
+
* @return void
|
189 |
+
*/
|
190 |
+
public static function render_sidebars_metabox($post) {
|
191 |
+
|
192 |
+
$module = WPCACore::modules()->get(self::MODULE_NAME);
|
193 |
+
|
194 |
+
$post_sidebars = array();
|
195 |
+
foreach(self::_get_content_sidebars(array($post->ID)) as $sidebar) {
|
196 |
+
$post_sidebars[$sidebar->ID] = $sidebar->ID;
|
197 |
+
}
|
198 |
+
|
199 |
+
$sidebars = CAS_App::instance()->manager()->sidebars;
|
200 |
+
|
201 |
+
$host_meta = CAS_App::instance()->manager()->metadata()->get('host');
|
202 |
+
foreach ($sidebars as $sidebar) {
|
203 |
+
$host_id = $host_meta->get_data($sidebar->ID);
|
204 |
+
if(isset(self::$_theme_sidebars[$host_id])) {
|
205 |
+
self::$_theme_sidebars[$host_id]['options'][] = array(
|
206 |
+
'id' => $sidebar->ID,
|
207 |
+
'text' => $sidebar->post_title.self::sidebar_states($sidebar)
|
208 |
+
);
|
209 |
+
}
|
210 |
+
if(isset($post_sidebars[$sidebar->ID])) {
|
211 |
+
self::$_theme_sidebars[$host_id]['select'][$sidebar->ID] = $sidebar->ID;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
$labels = array(
|
216 |
+
'canCreate' => current_user_can(CAS_App::CAPABILITY),
|
217 |
+
'createNew' => __('Create New','content-aware-sidebars'),
|
218 |
+
'labelNew' => __('New','content-aware-sidebars')
|
219 |
+
);
|
220 |
+
if($labels['canCreate']) {
|
221 |
+
$labels['notFound'] = __('Type to Add New Sidebar');
|
222 |
+
} else {
|
223 |
+
$labels['notFound'] = __('No sidebars found');
|
224 |
+
}
|
225 |
+
$labels['sidebars'] = self::$_theme_sidebars;
|
226 |
+
wp_localize_script('cas/sidebars/suggest', 'CAS', $labels);
|
227 |
+
|
228 |
+
$post_type = get_post_type_object($post->post_type);
|
229 |
+
$content = array(
|
230 |
+
__('Author')
|
231 |
+
);
|
232 |
+
if($post_type->hierarchical) {
|
233 |
+
$content[] = __('Child Page','content-aware-sidebars');
|
234 |
+
}
|
235 |
+
if($post_type->name == 'page') {
|
236 |
+
$content[] = __('Page Template','content-aware-sidebars');
|
237 |
+
}
|
238 |
+
$taxonomies = get_object_taxonomies($post,'objects');
|
239 |
+
if($taxonomies) {
|
240 |
+
foreach ($taxonomies as $tax) {
|
241 |
+
$content[] = $tax->labels->singular_name;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
$content[] = __('Archive Page','content-aware-sidebars');
|
245 |
+
|
246 |
+
$i = 0;
|
247 |
+
$limit = 3;
|
248 |
+
foreach (self::$_theme_sidebars as $id => $sidebar) {
|
249 |
+
|
250 |
+
if($i == $limit) {
|
251 |
+
echo '<div class="cas-more" style="display:none;">';
|
252 |
+
}
|
253 |
+
|
254 |
+
echo '<div><label style="display:block;padding:8px 0 4px;font-weight:bold;" for="ca_sidebars_'.$id.'">'.$sidebar['label'].'</label>';
|
255 |
+
|
256 |
+
echo '<input id="ca_sidebars_'.$id.'" class="js-cas-sidebars" type="text" name="cas_sidebars['.$id.']" value="'.implode(",", $sidebar['select']).'" placeholder="'.__('Default').'" /></div>';
|
257 |
+
$i++;
|
258 |
+
}
|
259 |
+
if($i > $limit) {
|
260 |
+
echo '</div>';
|
261 |
+
echo '<div style="text-align:center;"><button class="js-cas-more button button-small" data-toggle=".cas-more"><span class="dashicons dashicons-arrow-down-alt2"></span></button></div>';
|
262 |
+
}
|
263 |
+
|
264 |
+
echo '<p class="howto">'.sprintf(__('Note: Selected Sidebars are displayed on this %s specifically.','content-aware-sidebars'),strtolower($post_type->labels->singular_name)).' ';
|
265 |
+
|
266 |
+
$content = array_slice($content, 0, 3);
|
267 |
+
$link = '<a href="'.admin_url('admin.php?page=wpcas').'">'.__('Sidebar Manager').'</a>';
|
268 |
+
echo sprintf(__('Display sidebars per %s etc. with the %s.','content-aware-sidebars'),strtolower(implode(', ', $content)),$link).'</p>';
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Get sidebar status for display
|
273 |
+
*
|
274 |
+
* @since 3.4.1
|
275 |
+
* @param WP_Post $post
|
276 |
+
* @return string
|
277 |
+
*/
|
278 |
+
public static function sidebar_states($post) {
|
279 |
+
switch ($post->post_status) {
|
280 |
+
case CAS_App::STATUS_ACTIVE:
|
281 |
+
$status = '';
|
282 |
+
break;
|
283 |
+
case CAS_App::STATUS_SCHEDULED;
|
284 |
+
$status = ' ('.__( 'Scheduled' ).')';
|
285 |
+
break;
|
286 |
+
default:
|
287 |
+
$status = ' ('.__( 'Inactive' ).')';
|
288 |
+
break;
|
289 |
+
}
|
290 |
+
return $status;
|
291 |
+
}
|
292 |
+
|
293 |
+
public static function enqueue_scripts($hook) {
|
294 |
+
$screen = get_current_screen();
|
295 |
+
$module = WPCACore::modules()->get(self::MODULE_NAME);
|
296 |
+
|
297 |
+
if($screen->base == 'post' && $module->_post_types()->has($screen->post_type)) {
|
298 |
+
//we keep a select2 3.5 version because
|
299 |
+
//some plugins (woocommerce) depend on it
|
300 |
+
$select2 = 'select2';
|
301 |
+
wp_register_script(
|
302 |
+
$select2,
|
303 |
+
plugins_url('/js/select2.min.js',dirname(__FILE__)),
|
304 |
+
array('jquery'),
|
305 |
+
'3.5.4',
|
306 |
+
false
|
307 |
+
);
|
308 |
+
wp_enqueue_style(
|
309 |
+
WPCACore::PREFIX.'select2',
|
310 |
+
plugins_url('/css/select2/select2.css', dirname(__FILE__)),
|
311 |
+
array(),
|
312 |
+
'3.5.4'
|
313 |
+
);
|
314 |
+
wp_enqueue_script('cas/sidebars/suggest', plugins_url('/js/suggest-sidebars.js', dirname(__FILE__)), array($select2), CAS_App::PLUGIN_VERSION, true);
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Get sidebars for select post types
|
320 |
+
*
|
321 |
+
* @since 3.3
|
322 |
+
* @param array $posts
|
323 |
+
* @return array
|
324 |
+
*/
|
325 |
+
protected static function _get_content_sidebars($posts = null) {
|
326 |
+
if(is_array($posts) && $posts) {
|
327 |
+
global $wpdb;
|
328 |
+
return $wpdb->get_results(
|
329 |
+
"SELECT meta.meta_value, sidebars.ID, sidebars.post_title, groups.ID as group_id
|
330 |
+
FROM $wpdb->posts sidebars
|
331 |
+
INNER JOIN $wpdb->posts groups ON groups.post_parent = sidebars.ID
|
332 |
+
INNER JOIN $wpdb->postmeta meta ON meta.post_id = groups.ID
|
333 |
+
WHERE sidebars.post_status <> 'trash'
|
334 |
+
AND sidebars.post_type = '".CAS_App::TYPE_SIDEBAR."'
|
335 |
+
AND groups.post_status = '".WPCACore::STATUS_PUBLISHED."'
|
336 |
+
AND meta.meta_key = '".WPCACore::PREFIX.self::MODULE_NAME."'
|
337 |
+
AND meta.meta_value IN (".implode(",", $posts).")
|
338 |
+
ORDER BY sidebars.post_title ASC"
|
339 |
+
);
|
340 |
+
}
|
341 |
+
return false;
|
342 |
+
}
|
343 |
+
|
344 |
+
}
|
345 |
+
|
346 |
//eol
|
admin/screen_widgets.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
+
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
+
*/
|
8 |
+
|
9 |
+
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
10 |
+
header('Status: 403 Forbidden');
|
11 |
+
header('HTTP/1.1 403 Forbidden');
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
class CAS_Admin_Screen_Widgets extends CAS_Admin {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Get current screen
|
19 |
+
*
|
20 |
+
* @since 3.4
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function get_screen() {
|
24 |
+
return 'widgets.php';
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Prepare screen load
|
29 |
+
*
|
30 |
+
* @since 3.4
|
31 |
+
* @return void
|
32 |
+
*/
|
33 |
+
public function prepare_screen() {
|
34 |
+
add_action( 'dynamic_sidebar_before',
|
35 |
+
array($this,'render_sidebar_controls'));
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Render controls for custom sidebars
|
40 |
+
*
|
41 |
+
* @since 3.3
|
42 |
+
* @param string $index
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
+
public function render_sidebar_controls($index) {
|
46 |
+
//trashed custom sidebars not included
|
47 |
+
$sidebars = CAS_App::instance()->_manager->sidebars;
|
48 |
+
if(isset($sidebars[$index])) {
|
49 |
+
$sidebar = $sidebars[$index];
|
50 |
+
$link = admin_url('post.php?post='.$sidebar->ID);
|
51 |
+
$edit_link = admin_url('admin.php?page=wpcas-edit&sidebar_id='.$sidebar->ID);
|
52 |
+
|
53 |
+
switch($sidebar->post_status) {
|
54 |
+
case CAS_App::STATUS_ACTIVE:
|
55 |
+
$status = __('Active');
|
56 |
+
break;
|
57 |
+
case CAS_App::STATUS_SCHEDULED:
|
58 |
+
$status = __('Scheduled');
|
59 |
+
break;
|
60 |
+
default:
|
61 |
+
$status = __('Inactive');
|
62 |
+
}
|
63 |
+
?>
|
64 |
+
<div class="cas-settings">
|
65 |
+
<div class="sidebar-status">
|
66 |
+
<input type="checkbox" class="js-cas-pro-notice sidebar-status-input sidebar-status-<?php echo $sidebar->post_status; ?>" id="cas-status-<?php echo $sidebar->ID; ?>" value="<?php echo $sidebar->ID; ?>" data-url="https://dev.institute/wordpress/sidebars-pro/pricing/?utm_source=plugin&utm_medium=popup&utm_content=sidebar-status&utm_campaign=cas" <?php checked($sidebar->post_status, CAS_App::STATUS_ACTIVE) ?>>
|
67 |
+
<label title="<?php echo $status; ?>" class="sidebar-status-label" for="cas-status-<?php echo $sidebar->ID; ?>">
|
68 |
+
</label>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<a title="<?php esc_attr_e('Edit Sidebar','content-aware-sidebars') ?>" class="dashicons dashicons-admin-generic cas-sidebar-link" href="<?php echo $edit_link; ?>"></a><a title="<?php esc_attr_e('Revisions') ?>" class="js-cas-pro-notice cas-sidebar-link" data-url="https://dev.institute/wordpress/sidebars-pro/pricing/?utm_source=plugin&utm_medium=popup&utm_content=widget-revisions&utm_campaign=cas" href="<?php echo add_query_arg('action','cas-revisions',$link); ?>"><i class="dashicons dashicons-backup"></i> <?php _e('Revisions') ?></a>
|
72 |
+
</div>
|
73 |
+
<?php
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Register and enqueue scripts styles
|
79 |
+
* for screen
|
80 |
+
*
|
81 |
+
* @since 3.4
|
82 |
+
*/
|
83 |
+
public function add_scripts_styles() {
|
84 |
+
wp_register_style('cas/admin/style', plugins_url('../css/style.css', __FILE__), array(), CAS_App::PLUGIN_VERSION);
|
85 |
+
wp_enqueue_style('cas/admin/style');
|
86 |
+
|
87 |
+
$sidebar = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
88 |
+
|
89 |
+
wp_register_script('cas/admin/widgets', plugins_url('../js/widgets.min.js', __FILE__), array('jquery'), CAS_App::PLUGIN_VERSION, true);
|
90 |
+
wp_enqueue_script('cas/admin/widgets');
|
91 |
+
wp_localize_script( 'cas/admin/widgets', 'CASAdmin', array(
|
92 |
+
'addNew' => $sidebar->labels->add_new_item,
|
93 |
+
'collapse' => __('Collapse','content-aware-sidebars'),
|
94 |
+
'expand' => __('Expand','content-aware-sidebars'),
|
95 |
+
'filterSidebars' => __('Filter Sidebars','content-aware-sidebars'),
|
96 |
+
'filterWidgets' => __('Filter Widgets', 'content-aware-sidebars')
|
97 |
+
));
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
//
|
admin/sidebar-edit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
@@ -12,45 +12,48 @@ if (!defined('CAS_App::PLUGIN_VERSION')) {
|
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
-
final class CAS_Sidebar_Edit {
|
16 |
-
|
17 |
-
private $_tour_manager;
|
18 |
|
19 |
/**
|
20 |
-
*
|
21 |
-
*
|
22 |
-
* @since 3.1
|
23 |
*/
|
|
|
|
|
24 |
public function __construct() {
|
|
|
25 |
|
26 |
-
$this->_tour_manager = new WP_Pointer_Tour(
|
27 |
|
28 |
add_action('delete_post',
|
29 |
array($this,'remove_sidebar_widgets'));
|
30 |
add_action('save_post_'.CAS_App::TYPE_SIDEBAR,
|
31 |
array($this,'save_post'),10,2);
|
32 |
-
add_action('add_meta_boxes_'.CAS_App::TYPE_SIDEBAR,
|
33 |
-
array($this,'create_meta_boxes'));
|
34 |
-
add_action('in_admin_header',
|
35 |
-
array($this,'meta_box_whitelist'),99);
|
36 |
-
|
37 |
-
add_action('wp_ajax_cas_dismiss_review_notice',
|
38 |
-
array($this,'ajax_review_clicked'));
|
39 |
-
|
40 |
add_action('wpca/meta_box/before',
|
41 |
array($this,'show_description'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
if (
|
|
|
|
|
44 |
add_action('wpca/meta_box/after',
|
45 |
array($this,'show_review_link'));
|
46 |
add_filter('wpca/modules/list',
|
47 |
array($this,'add_to_module_list'),99);
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
-
|
50 |
-
add_filter('post_updated_messages',
|
51 |
-
array($this,'sidebar_updated_messages'));
|
52 |
-
add_filter('bulk_post_updated_messages',
|
53 |
-
array($this,'sidebar_updated_bulk_messages'), 10, 2 );
|
54 |
}
|
55 |
|
56 |
/**
|
@@ -61,7 +64,7 @@ final class CAS_Sidebar_Edit {
|
|
61 |
*/
|
62 |
public function add_to_module_list($list) {
|
63 |
if(get_post_type() == CAS_App::TYPE_SIDEBAR) {
|
64 |
-
$list[''] = __('URLs (
|
65 |
}
|
66 |
return $list;
|
67 |
}
|
@@ -102,94 +105,514 @@ final class CAS_Sidebar_Edit {
|
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
-
*
|
106 |
-
*
|
107 |
-
* @
|
108 |
-
* @return
|
109 |
*/
|
110 |
-
public function
|
111 |
-
$
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
6 => __('Sidebar published.','content-aware-sidebars').$manage_widgets,
|
120 |
-
7 => __('Sidebar saved.','content-aware-sidebars'),
|
121 |
-
8 => __('Sidebar submitted.','content-aware-sidebars').$manage_widgets,
|
122 |
-
9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>.','content-aware-sidebars'),
|
123 |
-
// translators: Publish box date format, see http://php.net/date
|
124 |
-
date_i18n(__('M j, Y @ G:i'),strtotime(get_the_ID()))).$manage_widgets,
|
125 |
-
10 => __('Sidebar draft updated.','content-aware-sidebars'),
|
126 |
);
|
127 |
-
return $messages;
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
-
*
|
132 |
*
|
133 |
-
* @since 3.
|
134 |
-
* @
|
135 |
-
* @param array $counts
|
136 |
-
* @return array
|
137 |
*/
|
138 |
-
public function
|
139 |
-
|
140 |
-
$
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
);
|
147 |
-
|
148 |
}
|
149 |
|
150 |
/**
|
151 |
-
*
|
152 |
-
*
|
|
|
|
|
|
|
153 |
*/
|
154 |
-
public function
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
-
|
|
|
|
|
|
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
|
163 |
-
|
164 |
-
$whitelist = array(
|
165 |
-
'cas-plugin-links' => 'cas-plugin-links',
|
166 |
-
'cas-upgrade-pro' => 'cas-upgrade-pro',
|
167 |
-
'cas-news' => 'cas-news',
|
168 |
-
'cas-support' => 'cas-support',
|
169 |
-
'cas-groups' => 'cas-groups',
|
170 |
-
'cas-rules' => 'cas-rules',
|
171 |
-
'cas-options' => 'cas-options',
|
172 |
-
'submitdiv' => 'submitdiv',
|
173 |
-
'revisionsdiv' => 'revisionsdiv',
|
174 |
-
'slugdiv' => 'slugdiv',
|
175 |
-
);
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
foreach($context_v as $priority_k => $priority_v) {
|
181 |
-
// Loop through boxes
|
182 |
-
foreach($priority_v as $box_k => $box_v) {
|
183 |
-
// If box is not whitelisted, remove it
|
184 |
-
if(!isset($whitelist[$box_k])) {
|
185 |
-
$wp_meta_boxes[CAS_App::TYPE_SIDEBAR][$context_k][$priority_k][$box_k] = false;
|
186 |
-
//unset($whitelist[$box_k]);
|
187 |
}
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
}
|
190 |
}
|
191 |
}
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
/**
|
194 |
* Set pointers for tour and enqueue script
|
195 |
*
|
@@ -241,7 +664,7 @@ final class CAS_Sidebar_Edit {
|
|
241 |
array(
|
242 |
'content' => sprintf( '<h3>%s</h3><p>%s</p>',
|
243 |
'3. '.__( 'Options, options', 'content-aware-sidebars' ),
|
244 |
-
wpautop(__( "Should the sidebar
|
245 |
'ref_id' => '#cas-options',
|
246 |
'position' => array(
|
247 |
'edge' => 'right',
|
@@ -271,11 +694,9 @@ final class CAS_Sidebar_Edit {
|
|
271 |
public function create_meta_boxes($post) {
|
272 |
|
273 |
$this->create_pointers();
|
274 |
-
|
275 |
CAS_App::instance()->manager()->populate_metadata();
|
276 |
|
277 |
$boxes = array();
|
278 |
-
|
279 |
$boxes[] = array(
|
280 |
'id' => 'submitdiv',
|
281 |
'title' => __('Publish'),
|
@@ -283,17 +704,22 @@ final class CAS_Sidebar_Edit {
|
|
283 |
'context' => 'side',
|
284 |
'priority' => 'high'
|
285 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
if ( cas_fs()->is_not_paying() ) {
|
288 |
-
|
289 |
-
// $boxes[] = array(
|
290 |
-
// 'id' => 'cas-upgrade-pro',
|
291 |
-
// 'title' => __('Content Aware Sidebars PRO', 'content-aware-sidebars'),
|
292 |
-
// 'callback' => 'meta_box_upgrade',
|
293 |
-
// 'context' => 'side',
|
294 |
-
// 'priority' => 'low'
|
295 |
-
// );
|
296 |
-
|
297 |
$boxes[] = array(
|
298 |
'id' => 'cas-plugin-links',
|
299 |
'title' => __('Content Aware Sidebars', 'content-aware-sidebars'),
|
@@ -301,25 +727,16 @@ final class CAS_Sidebar_Edit {
|
|
301 |
'context' => 'side',
|
302 |
'priority' => 'default'
|
303 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
}
|
305 |
-
|
306 |
-
|
307 |
-
// 'id' => 'cas-news',
|
308 |
-
// 'title' => __('Get a free Content Aware Sidebars Premium Bundle', 'content-aware-sidebars'),
|
309 |
-
// 'callback' => 'meta_box_news',
|
310 |
-
// 'context' => 'normal',
|
311 |
-
// 'priority' => 'high'
|
312 |
-
// ),
|
313 |
-
//About
|
314 |
-
// array(
|
315 |
-
// 'id' => 'cas-support',
|
316 |
-
// 'title' => __('Support the Author of Content Aware Sidebars', 'content-aware-sidebars'),
|
317 |
-
// 'callback' => 'meta_box_author_words',
|
318 |
-
// 'context' => 'normal',
|
319 |
-
// 'priority' => 'high'
|
320 |
-
// ),
|
321 |
-
//Options
|
322 |
-
|
323 |
$boxes[] = array(
|
324 |
'id' => 'cas-options',
|
325 |
'title' => __('Options', 'content-aware-sidebars'),
|
@@ -334,29 +751,20 @@ final class CAS_Sidebar_Edit {
|
|
334 |
$box['id'],
|
335 |
$box['title'],
|
336 |
array($this, $box['callback']),
|
337 |
-
CAS_App::
|
338 |
$box['context'],
|
339 |
$box['priority']
|
340 |
);
|
341 |
}
|
342 |
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
'
|
349 |
-
'<p>'.__('Content added to a condition group uses logical conjunction, while condition groups themselves use logical disjunction. '.
|
350 |
-
'This means that content added to a group should be associated, as they are treated as such, and that the groups do not interfere with each other. Thus it is possible to have both extremely focused and at the same time distinct conditions.','content-aware-sidebars').'</p>',
|
351 |
-
) );
|
352 |
-
$screen->set_help_sidebar( '<h4>'.__('More Information').'</h4>'.
|
353 |
-
'<p><a href="https://dev.institute/wordpress/sidebars-pro/faq/?utm_source=plugin&utm_medium=referral&utm_content=help-tab&utm_campaign=cas" target="_blank">'.__('FAQ','content-aware-sidebars').'</a></p>'.
|
354 |
-
'<p><a href="http://wordpress.org/support/plugin/content-aware-sidebars" target="_blank">'.__('Forum Support','content-aware-sidebars').'</a></p>'
|
355 |
-
);
|
356 |
-
|
357 |
-
if ( cas_fs()->is_not_paying() ) {
|
358 |
-
add_action( 'admin_notices', array($this,'admin_notice_review'));
|
359 |
}
|
|
|
360 |
}
|
361 |
|
362 |
/**
|
@@ -366,57 +774,106 @@ final class CAS_Sidebar_Edit {
|
|
366 |
* @return void
|
367 |
*/
|
368 |
public function admin_notice_review() {
|
369 |
-
$has_reviewed = get_user_option(
|
370 |
if($has_reviewed === false) {
|
371 |
$tour_taken = $this->_tour_manager->get_user_option();
|
372 |
-
if($tour_taken && (time() - $tour_taken) >= WEEK_IN_SECONDS
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
'<
|
377 |
-
'
|
378 |
-
|
379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
echo '</div>';
|
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 |
/**
|
@@ -426,9 +883,9 @@ final class CAS_Sidebar_Edit {
|
|
426 |
public function meta_box_options($post) {
|
427 |
|
428 |
$columns = array(
|
429 |
-
'handle'
|
430 |
-
'
|
431 |
-
'
|
432 |
);
|
433 |
|
434 |
foreach ($columns as $key => $value) {
|
@@ -454,10 +911,6 @@ final class CAS_Sidebar_Edit {
|
|
454 |
|
455 |
echo '</p></span>';
|
456 |
|
457 |
-
echo '<span>';
|
458 |
-
echo '<strong>'.__('Order').'</strong>';
|
459 |
-
echo '<p><label for="menu_order" class="screen-reader-text">'.__('Order').'</label>';
|
460 |
-
echo '<input type="number" value="'.$post->menu_order.'" id="menu_order" size="4" name="menu_order"></p></span>';
|
461 |
}
|
462 |
|
463 |
/**
|
@@ -471,40 +924,18 @@ final class CAS_Sidebar_Edit {
|
|
471 |
?>
|
472 |
<div style="overflow:hidden;">
|
473 |
<ul>
|
474 |
-
<li><a href="<?php echo esc_url(cas_fs()->get_upgrade_url()); ?>"><?php _e('Priority Email Support','content-aware-sidebars'); ?></a></li>
|
475 |
-
<li><a href="https://wordpress.org/support/plugin/content-aware-sidebars/" target="_blank"><?php _e('Forum Support','content-aware-sidebars'); ?></a></li>
|
476 |
<?php if($locale != "en_US") : ?>
|
477 |
<li><a href="https://www.transifex.com/projects/p/content-aware-sidebars/" target="_blank"><?php _e('Translate the plugin into your language','content-aware-sidebars'); ?></a></li>
|
478 |
<?php endif; ?>
|
479 |
-
<li><a href="https://dev.institute/
|
|
|
|
|
|
|
|
|
480 |
</ul>
|
481 |
</div>
|
482 |
<?php
|
483 |
}
|
484 |
-
|
485 |
-
/**
|
486 |
-
* Meta box for author words
|
487 |
-
* @return void
|
488 |
-
*/
|
489 |
-
public function meta_box_author_words() {
|
490 |
-
?>
|
491 |
-
<div style="overflow:hidden;">
|
492 |
-
<div style="float:left;width:40%;border-left:#ebebeb 1px solid;border-right:#ebebeb 1px solid;box-sizing:border-box;-moz-box-sizing:border-box;">
|
493 |
-
<p><strong><?php _e('Or you could:','content-aware-sidebars'); ?></strong></p>
|
494 |
-
<ul>
|
495 |
-
<li><a href="http://wordpress.org/extend/plugins/content-aware-sidebars/" target="_blank"><?php _e('Translate the plugin into your language','content-aware-sidebars'); ?></a></li>
|
496 |
-
</ul>
|
497 |
-
</div>
|
498 |
-
<div style="float:left;width:20%;">
|
499 |
-
<p><a href="https://twitter.com/intoxstudio" class="twitter-follow-button" data-show-count="false">Follow @intoxstudio</a>
|
500 |
-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p>
|
501 |
-
<p>
|
502 |
-
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fintoxstudio&width=450&height=21&colorscheme=light&layout=button_count&action=like&show_faces=false&send=false&appId=436031373100972" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
|
503 |
-
</p>
|
504 |
-
</div>
|
505 |
-
</div>
|
506 |
-
<?php
|
507 |
-
}
|
508 |
|
509 |
/**
|
510 |
* Meta box to submit form fields
|
@@ -518,184 +949,71 @@ final class CAS_Sidebar_Edit {
|
|
518 |
* @return void
|
519 |
*/
|
520 |
public function meta_box_submit( $post, $args = array() ) {
|
521 |
-
global $action;
|
522 |
|
523 |
-
|
524 |
-
$can_publish = current_user_can($post_type_object->cap->publish_posts);
|
525 |
-
?>
|
526 |
-
<div class="submitbox" id="submitpost">
|
527 |
|
528 |
-
<div
|
529 |
|
530 |
-
|
531 |
-
|
532 |
-
|
|
|
|
|
|
|
|
|
533 |
</div>
|
534 |
-
|
535 |
-
<div id="minor-publishing-actions">
|
536 |
-
<div id="save-action">
|
537 |
-
<?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?>
|
538 |
-
<input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button" />
|
539 |
-
<span class="spinner"></span>
|
540 |
-
<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
|
541 |
-
<input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" class="button" />
|
542 |
-
<span class="spinner"></span>
|
543 |
-
<?php } ?>
|
544 |
</div>
|
|
|
|
|
|
|
545 |
<?php
|
546 |
-
?>
|
547 |
-
<div class="clear"></div>
|
548 |
-
</div><!-- #minor-publishing-actions -->
|
549 |
|
550 |
-
|
|
|
|
|
551 |
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
switch ( $post->post_status ) {
|
556 |
-
case 'private':
|
557 |
-
case 'publish':
|
558 |
-
_e('Published');
|
559 |
break;
|
560 |
-
case
|
561 |
-
|
562 |
break;
|
563 |
-
case
|
564 |
-
|
565 |
break;
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
break;
|
570 |
}
|
571 |
-
?>
|
572 |
-
</span>
|
573 |
-
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?>
|
574 |
-
<a href="#post_status" class="edit-post-status hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
|
575 |
-
|
576 |
-
<div id="post-status-select" class="hide-if-js">
|
577 |
-
<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" />
|
578 |
-
<select name='post_status' id='post_status'>
|
579 |
-
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) : ?>
|
580 |
-
<option<?php selected( $post->post_status, $post->post_status ); ?> value='publish'><?php _e('Published') ?></option>
|
581 |
-
<?php elseif ( 'future' == $post->post_status ) : ?>
|
582 |
-
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option>
|
583 |
-
<?php endif; ?>
|
584 |
-
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
|
585 |
-
<?php if ( 'auto-draft' == $post->post_status ) : ?>
|
586 |
-
<option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e('Draft') ?></option>
|
587 |
-
<?php else : ?>
|
588 |
-
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option>
|
589 |
-
<?php endif; ?>
|
590 |
-
</select>
|
591 |
-
<a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a>
|
592 |
-
<a href="#post_status" class="cancel-post-status hide-if-no-js button-cancel"><?php _e('Cancel'); ?></a>
|
593 |
-
</div>
|
594 |
|
595 |
-
|
596 |
-
</
|
597 |
|
598 |
-
|
599 |
-
/* translators: Publish box date format, see http://php.net/date */
|
600 |
-
$datef = __( 'M j, Y @ H:i' );
|
601 |
-
if ( 0 != $post->ID ) {
|
602 |
-
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
603 |
-
$stamp = __('Scheduled for: <b>%1$s</b>');
|
604 |
-
} elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
|
605 |
-
$stamp = __('Published on: <b>%1$s</b>');
|
606 |
-
} elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
|
607 |
-
$stamp = __('Publish <b>immediately</b>');
|
608 |
-
} elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
|
609 |
-
$stamp = __('Schedule for: <b>%1$s</b>');
|
610 |
-
} else { // draft, 1 or more saves, date specified
|
611 |
-
$stamp = __('Publish on: <b>%1$s</b>');
|
612 |
-
}
|
613 |
-
$date = date_i18n( $datef, strtotime( $post->post_date ) );
|
614 |
-
} else { // draft (no saves, and thus no date specified)
|
615 |
-
$stamp = __('Publish <b>immediately</b>');
|
616 |
-
$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
|
617 |
-
}
|
618 |
-
|
619 |
-
|
620 |
-
if ( post_type_supports($post->post_type, 'revisions') && 'auto-draft' != $post->post_status ) {
|
621 |
$revisions = wp_get_post_revisions( $post->ID );
|
622 |
$revision_count = count($revisions);
|
623 |
-
|
624 |
-
|
625 |
-
if ( $revision_count > 1 ) {
|
626 |
-
reset( $revisions ); // Reset pointer for key()
|
627 |
-
$revision_id = key( $revisions );
|
628 |
?>
|
629 |
-
<
|
630 |
<?php printf( __( 'Widget Revisions: %s' ), '<b>' . number_format_i18n( $revision_count ) . '</b>' ); ?>
|
631 |
-
<a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $revision_id ) ); ?>"
|
632 |
-
</
|
633 |
<?php
|
634 |
-
|
635 |
-
}
|
636 |
-
elseif ( $post->post_status != 'auto-draft' && cas_fs()->is_not_paying() ) {
|
637 |
?>
|
638 |
-
<
|
639 |
-
<?php printf( __( 'Widget Revisions: %s' ), '<b
|
640 |
-
|
|
|
641 |
<?php
|
642 |
}
|
|
|
643 |
|
644 |
-
|
645 |
-
<div class="misc-pub-section curtime misc-pub-curtime">
|
646 |
-
<span id="timestamp">
|
647 |
-
<?php printf($stamp, $date); ?></span>
|
648 |
-
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
|
649 |
-
<fieldset id="timestampdiv" class="hide-if-js">
|
650 |
-
<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
|
651 |
-
<?php touch_time( ( $action === 'edit' ), 1 ); ?>
|
652 |
-
</fieldset>
|
653 |
-
</div><?php // /misc-pub-section ?>
|
654 |
-
<?php endif; ?>
|
655 |
-
|
656 |
-
</div>
|
657 |
-
<div class="clear"></div>
|
658 |
-
</div>
|
659 |
-
|
660 |
-
<div id="major-publishing-actions">
|
661 |
-
<div id="delete-action">
|
662 |
-
<?php
|
663 |
-
if ( current_user_can( "delete_post", $post->ID ) ) {
|
664 |
-
if ( !EMPTY_TRASH_DAYS )
|
665 |
-
$delete_text = __('Delete Permanently');
|
666 |
-
else
|
667 |
-
$delete_text = __('Move to Trash');
|
668 |
-
?>
|
669 |
-
<a class="submitdelete deletion" href="<?php echo get_delete_post_link($post->ID); ?>"><?php echo $delete_text; ?></a><?php
|
670 |
-
} ?>
|
671 |
-
</div>
|
672 |
-
|
673 |
-
<div id="publishing-action">
|
674 |
-
<span class="spinner"></span>
|
675 |
-
<?php
|
676 |
-
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
|
677 |
-
if ( $can_publish ) :
|
678 |
-
if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
|
679 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
|
680 |
-
<?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false ); ?>
|
681 |
-
<?php else : ?>
|
682 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
|
683 |
-
<?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false ); ?>
|
684 |
-
<?php endif;
|
685 |
-
else : ?>
|
686 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" />
|
687 |
-
<?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false ); ?>
|
688 |
-
<?php
|
689 |
-
endif;
|
690 |
-
} else { ?>
|
691 |
-
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" />
|
692 |
-
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
|
693 |
-
<?php
|
694 |
-
} ?>
|
695 |
-
</div>
|
696 |
-
<div class="clear"></div>
|
697 |
-
</div>
|
698 |
-
</div>
|
699 |
|
700 |
<?php
|
701 |
}
|
@@ -712,7 +1030,7 @@ final class CAS_Sidebar_Edit {
|
|
712 |
$dismiss = time();
|
713 |
}
|
714 |
|
715 |
-
echo json_encode(update_user_option(get_current_user_id(),
|
716 |
die();
|
717 |
}
|
718 |
|
@@ -756,11 +1074,8 @@ final class CAS_Sidebar_Edit {
|
|
756 |
*/
|
757 |
public function save_post($post_id,$post) {
|
758 |
|
759 |
-
// Save button pressed
|
760 |
-
if (!isset($_POST['original_publish']) && !isset($_POST['save_post']))
|
761 |
-
return;
|
762 |
-
|
763 |
//Verify nonce, check_admin_referer dies on false
|
|
|
764 |
if(!(isset($_POST[WPCACore::NONCE])
|
765 |
&& wp_verify_nonce($_POST[WPCACore::NONCE], WPCACore::PREFIX.$post_id)))
|
766 |
return;
|
@@ -794,7 +1109,7 @@ final class CAS_Sidebar_Edit {
|
|
794 |
if(isset($old[$meta])) {
|
795 |
unset($old[$meta]);
|
796 |
} else {
|
797 |
-
add_post_meta($post_id,
|
798 |
}
|
799 |
}
|
800 |
foreach ($old as $meta => $v) {
|
@@ -805,6 +1120,36 @@ final class CAS_Sidebar_Edit {
|
|
805 |
}
|
806 |
}
|
807 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
808 |
/**
|
809 |
* Remove widget when its sidebar is removed
|
810 |
* @param int $post_id
|
@@ -841,6 +1186,117 @@ final class CAS_Sidebar_Edit {
|
|
841 |
wp_set_sidebars_widgets($sidebars_widgets);
|
842 |
}
|
843 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
}
|
845 |
|
846 |
//eol
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
+
final class CAS_Sidebar_Edit extends CAS_Admin {
|
|
|
|
|
16 |
|
17 |
/**
|
18 |
+
* Intro tour manager
|
19 |
+
* @var WP_Pointer_Tour
|
|
|
20 |
*/
|
21 |
+
private $_tour_manager;
|
22 |
+
|
23 |
public function __construct() {
|
24 |
+
parent::__construct();
|
25 |
|
26 |
+
$this->_tour_manager = new WP_Pointer_Tour(CAS_App::META_PREFIX.'cas_tour');
|
27 |
|
28 |
add_action('delete_post',
|
29 |
array($this,'remove_sidebar_widgets'));
|
30 |
add_action('save_post_'.CAS_App::TYPE_SIDEBAR,
|
31 |
array($this,'save_post'),10,2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
add_action('wpca/meta_box/before',
|
33 |
array($this,'show_description'));
|
34 |
+
add_action('cas/admin/add_meta_boxes',
|
35 |
+
array($this,'create_meta_boxes'));
|
36 |
+
|
37 |
+
add_filter('wp_insert_post_data',
|
38 |
+
array($this,'add_duplicate_title_suffix'),99,2);
|
39 |
+
add_filter( 'get_edit_post_link',
|
40 |
+
array($this,'get_edit_post_link'), 10, 3 );
|
41 |
+
add_filter( 'get_delete_post_link',
|
42 |
+
array($this,'get_delete_post_link'), 10, 3 );
|
43 |
|
44 |
+
if (cas_fs()->is_not_paying() ) {
|
45 |
+
add_action('wp_ajax_cas_dismiss_review_notice',
|
46 |
+
array($this,'ajax_review_clicked'));
|
47 |
add_action('wpca/meta_box/after',
|
48 |
array($this,'show_review_link'));
|
49 |
add_filter('wpca/modules/list',
|
50 |
array($this,'add_to_module_list'),99);
|
51 |
+
add_action( 'all_admin_notices',
|
52 |
+
array($this,'admin_notice_review'));
|
53 |
+
add_action( 'admin_enqueue_scripts',
|
54 |
+
array($this,'add_general_scripts_styles')
|
55 |
+
);
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
64 |
*/
|
65 |
public function add_to_module_list($list) {
|
66 |
if(get_post_type() == CAS_App::TYPE_SIDEBAR) {
|
67 |
+
$list[''] = __('URLs (Pro Feature)','content-aware-sidebars');
|
68 |
}
|
69 |
return $list;
|
70 |
}
|
105 |
}
|
106 |
|
107 |
/**
|
108 |
+
* Set up admin menu and get current screen
|
109 |
+
*
|
110 |
+
* @since 3.4
|
111 |
+
* @return string
|
112 |
*/
|
113 |
+
public function get_screen() {
|
114 |
+
$post_type_object = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
115 |
+
return add_submenu_page(
|
116 |
+
CAS_App::BASE_SCREEN,
|
117 |
+
$post_type_object->labels->add_new_item,
|
118 |
+
$post_type_object->labels->add_new,
|
119 |
+
$post_type_object->cap->edit_posts,
|
120 |
+
CAS_App::BASE_SCREEN.'-edit',
|
121 |
+
array($this,'render_screen')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
);
|
|
|
123 |
}
|
124 |
|
125 |
/**
|
126 |
+
* Prepare screen load
|
127 |
*
|
128 |
+
* @since 3.4
|
129 |
+
* @return void
|
|
|
|
|
130 |
*/
|
131 |
+
public function prepare_screen() {
|
132 |
+
|
133 |
+
global $nav_tabs, $post, $title, $active_post_lock;
|
134 |
+
|
135 |
+
$post_type = CAS_App::TYPE_SIDEBAR;
|
136 |
+
$post_type_object = get_post_type_object( $post_type );
|
137 |
+
$post_id = isset($_REQUEST['sidebar_id']) ? $_REQUEST['sidebar_id'] : 0;
|
138 |
+
|
139 |
+
//process actions
|
140 |
+
$this->process_actions($post_id);
|
141 |
+
|
142 |
+
if ( is_multisite() ) {
|
143 |
+
add_action( 'admin_footer', '_admin_notice_post_locked' );
|
144 |
+
} else {
|
145 |
+
$check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) );
|
146 |
+
if ( count( $check_users ) > 1 )
|
147 |
+
add_action( 'admin_footer', '_admin_notice_post_locked' );
|
148 |
+
unset( $check_users );
|
149 |
+
}
|
150 |
+
|
151 |
+
wp_enqueue_script('post');
|
152 |
+
|
153 |
+
if ( wp_is_mobile() ) {
|
154 |
+
wp_enqueue_script( 'jquery-touch-punch' );
|
155 |
+
}
|
156 |
+
|
157 |
+
// Add the local autosave notice HTML
|
158 |
+
//add_action( 'admin_footer', '_local_storage_notice' );
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Edit mode
|
162 |
+
*/
|
163 |
+
if($post_id) {
|
164 |
+
$post = get_post($post_id, OBJECT, 'edit');
|
165 |
+
|
166 |
+
if ( ! $post )
|
167 |
+
wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) );
|
168 |
+
if ( ! current_user_can( 'edit_post', $post_id ) )
|
169 |
+
wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
|
170 |
+
if ( 'trash' == $post->post_status )
|
171 |
+
wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) );
|
172 |
+
|
173 |
+
if ( ! empty( $_GET['get-post-lock'] ) ) {
|
174 |
+
check_admin_referer( 'lock-post_' . $post_id );
|
175 |
+
wp_set_post_lock( $post_id );
|
176 |
+
wp_redirect( get_edit_post_link( $post_id, 'url' ) );
|
177 |
+
exit();
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( ! wp_check_post_lock( $post->ID ) ) {
|
181 |
+
$active_post_lock = wp_set_post_lock( $post->ID );
|
182 |
+
//wp_enqueue_script('autosave');
|
183 |
+
}
|
184 |
+
|
185 |
+
$title = $post_type_object->labels->edit_item;
|
186 |
+
|
187 |
+
/**
|
188 |
+
* New Mode
|
189 |
+
*/
|
190 |
+
} else {
|
191 |
+
|
192 |
+
if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
|
193 |
+
wp_die(
|
194 |
+
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
195 |
+
'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
|
196 |
+
403
|
197 |
+
);
|
198 |
+
}
|
199 |
+
|
200 |
+
//wp_enqueue_script( 'autosave' );
|
201 |
+
|
202 |
+
$post = get_default_post_to_edit( $post_type, true );
|
203 |
+
|
204 |
+
$title = $post_type_object->labels->add_new_item;
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
$nav_tabs = array(
|
209 |
+
'conditions' => __('Conditions','content-aware-sidebars'),
|
210 |
+
'schedule' => __('Schedule'),
|
211 |
+
'advanced' => __('Advanced')
|
212 |
+
);
|
213 |
+
$nav_tabs = apply_filters('cas/admin/nav-tabs', $nav_tabs);
|
214 |
+
|
215 |
+
do_action( 'cas/admin/add_meta_boxes', $post );
|
216 |
+
|
217 |
+
// foreach ($nav_tabs as $id => $label) {
|
218 |
+
// do_action( 'do_meta_boxes', CAS_App::BASE_SCREEN.'-edit', 'section-'.$id, $post );
|
219 |
+
// }
|
220 |
+
//do_action( 'do_meta_boxes', CAS_App::BASE_SCREEN.'-edit', 'normal', $post );
|
221 |
+
//do_action( 'do_meta_boxes', CAS_App::BASE_SCREEN.'-edit', 'side', $post );
|
222 |
+
|
223 |
+
$screen = get_current_screen();
|
224 |
+
|
225 |
+
$screen->add_help_tab( array(
|
226 |
+
'id' => CAS_App::META_PREFIX.'help',
|
227 |
+
'title' => __('Condition Groups','content-aware-sidebars'),
|
228 |
+
'content' => '<p>'.__('Each created condition group describe some specific content (conditions) that the current sidebar should be displayed with.','content-aware-sidebars').'</p>'.
|
229 |
+
'<p>'.__('Content added to a condition group uses logical conjunction, while condition groups themselves use logical disjunction. '.
|
230 |
+
'This means that content added to a group should be associated, as they are treated as such, and that the groups do not interfere with each other. Thus it is possible to have both extremely focused and at the same time distinct conditions.','content-aware-sidebars').'</p>',
|
231 |
+
) );
|
232 |
+
$screen->set_help_sidebar( '<h4>'.__('More Information').'</h4>'.
|
233 |
+
'<p><a href="https://dev.institute/docs/content-aware-sidebars/faq/?utm_source=plugin&utm_medium=referral&utm_content=help-tab&utm_campaign=cas" target="_blank">'.__('FAQ','content-aware-sidebars').'</a></p>'.
|
234 |
+
'<p><a href="http://wordpress.org/support/plugin/content-aware-sidebars" target="_blank">'.__('Forum Support','content-aware-sidebars').'</a></p>'
|
235 |
);
|
236 |
+
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
+
* Process actions
|
241 |
+
*
|
242 |
+
* @since 3.4
|
243 |
+
* @param int $post_id
|
244 |
+
* @return void
|
245 |
*/
|
246 |
+
public function process_actions($post_id) {
|
247 |
+
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
248 |
+
if ( isset( $_POST['deletepost'] ) )
|
249 |
+
$action = 'delete';
|
250 |
+
|
251 |
+
if($action && $post_id) {
|
252 |
+
//wp_reset_vars( array( 'action' ) );
|
253 |
+
$sendback = wp_get_referer();
|
254 |
+
$sendback = remove_query_arg(
|
255 |
+
array('action','trashed', 'untrashed', 'deleted', 'ids'),
|
256 |
+
$sendback
|
257 |
+
);
|
258 |
|
259 |
+
$post = get_post( $post_id );
|
260 |
+
if ( ! $post ) {
|
261 |
+
wp_die( __( 'The item no longer exists.' ) );
|
262 |
+
}
|
263 |
|
264 |
+
switch($action) {
|
265 |
+
case 'editpost':
|
266 |
+
check_admin_referer('update-post_' . $post_id);
|
267 |
|
268 |
+
$post_id = $this->update_sidebar_type();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
+
// Session cookie flag that the post was saved
|
271 |
+
if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) {
|
272 |
+
setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
}
|
274 |
+
|
275 |
+
$status = get_post_status( $post_id );
|
276 |
+
if(isset($_POST['original_post_status']) && $_POST['original_post_status'] == $status) {
|
277 |
+
$message = 1;
|
278 |
+
} else {
|
279 |
+
switch ( $status ) {
|
280 |
+
case CAS_App::STATUS_SCHEDULED:
|
281 |
+
//gets scheduled
|
282 |
+
$message = 9;
|
283 |
+
break;
|
284 |
+
case CAS_App::STATUS_INACTIVE:
|
285 |
+
//gets deactivated
|
286 |
+
$message = 10;
|
287 |
+
break;
|
288 |
+
case CAS_App::STATUS_ACTIVE:
|
289 |
+
//gets activated
|
290 |
+
$message = 6;
|
291 |
+
break;
|
292 |
+
default:
|
293 |
+
$message = 1;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
|
297 |
+
$sendback = add_query_arg(array(
|
298 |
+
'sidebar_id' => $post_id,
|
299 |
+
'message' => $message,
|
300 |
+
'page' => 'wpcas-edit'
|
301 |
+
), $sendback);
|
302 |
+
wp_safe_redirect($sendback);
|
303 |
+
exit();
|
304 |
+
case 'trash':
|
305 |
+
check_admin_referer('trash-post_' . $post_id);
|
306 |
+
|
307 |
+
if ( ! current_user_can( 'delete_post', $post_id ) )
|
308 |
+
wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
|
309 |
+
|
310 |
+
if ( $user_id = wp_check_post_lock( $post_id ) ) {
|
311 |
+
$user = get_userdata( $user_id );
|
312 |
+
wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
|
313 |
+
}
|
314 |
+
|
315 |
+
if ( ! wp_trash_post( $post_id ) )
|
316 |
+
wp_die( __( 'Error in moving to Trash.' ) );
|
317 |
+
|
318 |
+
$sendback = remove_query_arg('sidebar_id',$sendback);
|
319 |
+
|
320 |
+
wp_safe_redirect(add_query_arg(
|
321 |
+
array(
|
322 |
+
'page' => 'wpcas',
|
323 |
+
'trashed' => 1,
|
324 |
+
'ids' => $post_id
|
325 |
+
), $sendback ));
|
326 |
+
exit();
|
327 |
+
case 'untrash':
|
328 |
+
check_admin_referer('untrash-post_' . $post_id);
|
329 |
+
|
330 |
+
if ( ! current_user_can( 'delete_post', $post_id ) )
|
331 |
+
wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
|
332 |
+
|
333 |
+
if ( ! wp_untrash_post( $post_id ) )
|
334 |
+
wp_die( __( 'Error in restoring from Trash.' ) );
|
335 |
+
|
336 |
+
wp_safe_redirect( add_query_arg('untrashed', 1, $sendback) );
|
337 |
+
exit();
|
338 |
+
case 'delete':
|
339 |
+
check_admin_referer('delete-post_' . $post_id);
|
340 |
+
|
341 |
+
if ( ! current_user_can( 'delete_post', $post_id ) )
|
342 |
+
wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
|
343 |
+
|
344 |
+
if ( ! wp_delete_post( $post_id, true ) )
|
345 |
+
wp_die( __( 'Error in deleting.' ) );
|
346 |
+
|
347 |
+
$sendback = remove_query_arg('sidebar_id',$sendback);
|
348 |
+
wp_safe_redirect( add_query_arg(array(
|
349 |
+
'page' => 'wpcas',
|
350 |
+
'deleted' => 1
|
351 |
+
), $sendback ));
|
352 |
+
exit();
|
353 |
+
default:
|
354 |
+
do_action('cas/admin/action', $action, $post_id);
|
355 |
+
break;
|
356 |
}
|
357 |
}
|
358 |
}
|
359 |
|
360 |
+
/**
|
361 |
+
* Render screen
|
362 |
+
*
|
363 |
+
* @since 3.4
|
364 |
+
* @return void
|
365 |
+
*/
|
366 |
+
public function render_screen() {
|
367 |
+
|
368 |
+
global $nav_tabs, $post, $title, $active_post_lock;
|
369 |
+
|
370 |
+
$post_ID = $post->ID;
|
371 |
+
$post_type_object = get_post_type_object( $post->post_type );
|
372 |
+
|
373 |
+
$messages = $this->sidebar_updated_messages($post);
|
374 |
+
$message = false;
|
375 |
+
if ( isset($_GET['message']) ) {
|
376 |
+
$_GET['message'] = absint( $_GET['message'] );
|
377 |
+
if ( isset($messages[$_GET['message']]) )
|
378 |
+
$message = $messages[$_GET['message']];
|
379 |
+
}
|
380 |
+
|
381 |
+
$notice = false;
|
382 |
+
$form_extra = '';
|
383 |
+
if ( 'auto-draft' == $post->post_status ) {
|
384 |
+
if (isset($_REQUEST['sidebar_id']) ) {
|
385 |
+
$post->post_title = '';
|
386 |
+
}
|
387 |
+
//$autosave = false;
|
388 |
+
$form_extra .= "<input type='hidden' id='auto_draft' name='auto_draft' value='1' />";
|
389 |
+
}
|
390 |
+
// else {
|
391 |
+
// $autosave = wp_get_post_autosave( $post_ID );
|
392 |
+
// }
|
393 |
+
|
394 |
+
// Detect if there exists an autosave newer than the post and if that autosave is different than the post
|
395 |
+
// if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
|
396 |
+
// foreach ( _wp_post_revision_fields( $post ) as $autosave_field => $_autosave_field ) {
|
397 |
+
// if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) {
|
398 |
+
// $notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>' ), get_edit_post_link( $autosave->ID ) );
|
399 |
+
// break;
|
400 |
+
// }
|
401 |
+
// }
|
402 |
+
// // If this autosave isn't different from the current post, begone.
|
403 |
+
// if ( ! $notice )
|
404 |
+
// wp_delete_post_revision( $autosave->ID );
|
405 |
+
// unset($autosave_field, $_autosave_field);
|
406 |
+
// }
|
407 |
+
|
408 |
+
//Not only for decoration
|
409 |
+
//Older wp versions inject updated message after first h2
|
410 |
+
if (version_compare(get_bloginfo('version'), '4.3', '<')) {
|
411 |
+
$tag = 'h2';
|
412 |
+
} else {
|
413 |
+
$tag = 'h1';
|
414 |
+
}
|
415 |
+
|
416 |
+
echo '<div class="wrap">';
|
417 |
+
echo '<'.$tag.'>';
|
418 |
+
echo esc_html( $title );
|
419 |
+
if ( isset($_REQUEST['sidebar_id']) && current_user_can( $post_type_object->cap->create_posts ) ) {
|
420 |
+
echo ' <a href="' . esc_url( admin_url( 'admin.php?page=wpcas-edit' ) ) . '" class="page-title-action add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
421 |
+
}
|
422 |
+
echo '</'.$tag.'>';
|
423 |
+
if ( $message ) {
|
424 |
+
echo '<div id="message" class="updated notice notice-success is-dismissible"><p>'.$message.'</p></div>';
|
425 |
+
}
|
426 |
+
echo '<form name="post" action="admin.php?page=wpcas-edit" method="post" id="post">';
|
427 |
+
$referer = wp_get_referer();
|
428 |
+
wp_nonce_field('update-post_' . $post_ID);
|
429 |
+
echo '<input type="hidden" id="user-id" name="user_ID" value="'.(int)get_current_user_id().'" />';
|
430 |
+
echo '<input type="hidden" id="hiddenaction" name="action" value="editpost" />';
|
431 |
+
echo '<input type="hidden" id="post_author" name="post_author" value="'.esc_attr($post->post_author).'" />';
|
432 |
+
echo '<input type="hidden" id="original_post_status" name="original_post_status" value="'.esc_attr( $post->post_status).'" />';
|
433 |
+
echo '<input type="hidden" id="referredby" name="referredby" value="'.($referer ? esc_url( $referer ) : '').'" />';
|
434 |
+
echo '<input type="hidden" id="post_ID" name="sidebar_id" value="'.esc_attr($post_ID).'" />';
|
435 |
+
if ( ! empty( $active_post_lock ) ) {
|
436 |
+
echo '<input type="hidden" id="active_post_lock" value="'.esc_attr(implode( ':', $active_post_lock )).'" />';
|
437 |
+
}
|
438 |
+
if ( get_post_status( $post ) != CAS_App::STATUS_INACTIVE) {
|
439 |
+
wp_original_referer_field(true, 'previous');
|
440 |
+
}
|
441 |
+
echo $form_extra;
|
442 |
+
|
443 |
+
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
444 |
+
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
445 |
+
|
446 |
+
echo '<div id="poststuff">';
|
447 |
+
echo '<div id="post-body" class="metabox-holder columns-'.(1 == get_current_screen()->get_columns() ? '1' : '2').'">';
|
448 |
+
echo '<div id="post-body-content">';
|
449 |
+
echo '<div id="titlediv">';
|
450 |
+
echo '<div id="titlewrap">';
|
451 |
+
echo '<label class="screen-reader-text" id="title-prompt-text" for="title">'.__( 'Enter title here' ).'</label>';
|
452 |
+
echo '<input type="text" name="post_title" size="30" value="'.esc_attr( $post->post_title ).'" id="title" spellcheck="true" autocomplete="off" />';
|
453 |
+
echo '</div></div>';
|
454 |
+
$this->render_section_nav($nav_tabs);
|
455 |
+
echo '</div>';
|
456 |
+
$this->render_sections($nav_tabs,$post,$post->post_type);
|
457 |
+
echo '</div>';
|
458 |
+
echo '<br class="clear" />';
|
459 |
+
echo '</div></form></div>';
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Render tab navigation
|
464 |
+
*
|
465 |
+
* @since 3.4
|
466 |
+
* @param array $tabs
|
467 |
+
* @return void
|
468 |
+
*/
|
469 |
+
public function render_section_nav($tabs) {
|
470 |
+
echo '<h2 class="nav-tab-wrapper js-cas-tabs hide-if-no-js " style="padding-bottom:0;">';
|
471 |
+
foreach ($tabs as $id => $label) {
|
472 |
+
echo '<a class="js-nav-link nav-tab" href="#top#section-'.$id.'">'.$label.'</a>';
|
473 |
+
}
|
474 |
+
echo '</h2>';
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Render meta box sections
|
479 |
+
*
|
480 |
+
* @since 3.4
|
481 |
+
* @param array $tabs
|
482 |
+
* @param WP_Post $post
|
483 |
+
* @param string $post_type
|
484 |
+
* @return void
|
485 |
+
*/
|
486 |
+
public function render_sections($tabs, $post, $post_type) {
|
487 |
+
echo '<div id="postbox-container-1" class="postbox-container">';
|
488 |
+
do_meta_boxes(CAS_App::BASE_SCREEN.'-edit', 'side', $post);
|
489 |
+
echo '</div>';
|
490 |
+
echo '<div id="postbox-container-2" class="postbox-container">';
|
491 |
+
foreach ($tabs as $id => $label) {
|
492 |
+
$name = 'section-'.$id;
|
493 |
+
echo '<div id="'.$name.'" class="cas-section">';
|
494 |
+
do_meta_boxes(CAS_App::BASE_SCREEN.'-edit', $name, $post);
|
495 |
+
echo '</div>';
|
496 |
+
}
|
497 |
+
//boxes across sections
|
498 |
+
do_meta_boxes(CAS_App::BASE_SCREEN.'-edit', 'normal', $post);
|
499 |
+
echo '</div>';
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Update sidebar post type
|
504 |
+
*
|
505 |
+
* @since 3.4
|
506 |
+
* @return int
|
507 |
+
*/
|
508 |
+
public function update_sidebar_type() {
|
509 |
+
global $wpdb;
|
510 |
+
|
511 |
+
$post_ID = (int) $_POST['sidebar_id'];
|
512 |
+
$post = get_post( $post_ID );
|
513 |
+
$post_data['post_type'] = CAS_App::TYPE_SIDEBAR;
|
514 |
+
$post_data['ID'] = (int) $post_ID;
|
515 |
+
$post_data['post_title'] = $_POST['post_title'];
|
516 |
+
$post_data['comment_status'] = 'closed';
|
517 |
+
$post_data['ping_status'] = 'closed';
|
518 |
+
$post_data['post_author'] = get_current_user_id();
|
519 |
+
$post_data['menu_order'] = intval($_POST['menu_order']);
|
520 |
+
|
521 |
+
$ptype = get_post_type_object($post_data['post_type']);
|
522 |
+
|
523 |
+
if ( !current_user_can( 'edit_post', $post_ID ) ) {
|
524 |
+
wp_die( __('Sorry, you are not allowed to edit this post.' ));
|
525 |
+
} elseif (! current_user_can( $ptype->cap->create_posts ) ) {
|
526 |
+
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
|
527 |
+
} elseif ( $post_data['post_author'] != $_POST['post_author']
|
528 |
+
&& ! current_user_can( $ptype->cap->edit_others_posts ) ) {
|
529 |
+
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
|
530 |
+
}
|
531 |
+
|
532 |
+
if ( isset($_POST['post_status']) ) {
|
533 |
+
$post_data['post_status'] = CAS_App::STATUS_ACTIVE;
|
534 |
+
//if sidebar has been future before, we need to reset date
|
535 |
+
if($_POST['post_status'] != $_POST['original_post_status']) {
|
536 |
+
$post_data['post_date'] = current_time( 'mysql' );
|
537 |
+
}
|
538 |
+
} elseif($_POST['sidebar_activate']) {
|
539 |
+
$post_data['post_status'] = CAS_App::STATUS_SCHEDULED;
|
540 |
+
$post_data['post_date'] = $_POST['sidebar_activate'];
|
541 |
+
} else {
|
542 |
+
$post_data['post_status'] = CAS_App::STATUS_INACTIVE;
|
543 |
+
}
|
544 |
+
|
545 |
+
if($post_data['post_status'] != CAS_App::STATUS_INACTIVE
|
546 |
+
&& $_POST['sidebar_deactivate']) {
|
547 |
+
$this->reschedule_deactivation($post_ID,$_POST['sidebar_deactivate']);
|
548 |
+
} else {
|
549 |
+
$this->reschedule_deactivation($post_ID);
|
550 |
+
}
|
551 |
+
|
552 |
+
if(isset($post_data['post_date'])) {
|
553 |
+
$post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
|
554 |
+
}
|
555 |
+
|
556 |
+
if ( post_type_supports( CAS_App::TYPE_SIDEBAR, 'revisions' ) ) {
|
557 |
+
$revisions = wp_get_post_revisions( $post_ID, array(
|
558 |
+
'order' => 'ASC',
|
559 |
+
'posts_per_page' => 1
|
560 |
+
));
|
561 |
+
$revision = current( $revisions );
|
562 |
+
// Check if the revisions have been upgraded
|
563 |
+
if ( $revisions && _wp_get_post_revision_version( $revision ) < 1 )
|
564 |
+
_wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) );
|
565 |
+
}
|
566 |
+
|
567 |
+
update_post_meta( $post_ID, '_edit_last', $post_data['post_author'] );
|
568 |
+
$success = wp_update_post( $post_data );
|
569 |
+
wp_set_post_lock( $post_ID );
|
570 |
+
|
571 |
+
return $post_ID;
|
572 |
+
}
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Handle schedule for deactivation
|
576 |
+
*
|
577 |
+
* @since 3.4
|
578 |
+
* @param int $post_id
|
579 |
+
* @param string $time
|
580 |
+
* @return void
|
581 |
+
*/
|
582 |
+
public function reschedule_deactivation($post_id, $time = false) {
|
583 |
+
$name = 'cas/event/deactivate';
|
584 |
+
if (wp_next_scheduled($name,array($post_id)) !== false) {
|
585 |
+
wp_clear_scheduled_hook($name,array($post_id));
|
586 |
+
}
|
587 |
+
|
588 |
+
if($time) {
|
589 |
+
//Requires to be in GMT
|
590 |
+
$utime = get_gmt_from_date($time,'U');
|
591 |
+
wp_schedule_single_event($utime,$name,array($post_id));
|
592 |
+
update_post_meta($post_id, CAS_App::META_PREFIX.'deactivate_time',$time);
|
593 |
+
} else {
|
594 |
+
delete_post_meta($post_id, CAS_App::META_PREFIX.'deactivate_time');
|
595 |
+
}
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Create update messages
|
600 |
+
*
|
601 |
+
* @param array $messages
|
602 |
+
* @return array
|
603 |
+
*/
|
604 |
+
public function sidebar_updated_messages($post) {
|
605 |
+
$manage_widgets = sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets','content-aware-sidebars'));
|
606 |
+
return array(
|
607 |
+
1 => __('Sidebar updated.','content-aware-sidebars').$manage_widgets,
|
608 |
+
6 => __('Sidebar activated.','content-aware-sidebars').$manage_widgets,
|
609 |
+
9 => sprintf(__('Sidebar scheduled for: <strong>%1$s</strong>.','content-aware-sidebars'),
|
610 |
+
// translators: Publish box date format, see http://php.net/date
|
611 |
+
date_i18n(__('M j, Y @ G:i'),strtotime($post->post_date))).$manage_widgets,
|
612 |
+
10 => __('Sidebar deactivated.','content-aware-sidebars').$manage_widgets,
|
613 |
+
);
|
614 |
+
}
|
615 |
+
|
616 |
/**
|
617 |
* Set pointers for tour and enqueue script
|
618 |
*
|
664 |
array(
|
665 |
'content' => sprintf( '<h3>%s</h3><p>%s</p>',
|
666 |
'3. '.__( 'Options, options', 'content-aware-sidebars' ),
|
667 |
+
wpautop(__( "Should the sidebar merge with a target sidebar or replace it? Maybe you want to insert it in your content with a shortcode.\n\nDisplay the sidebar for everyone or make it visible only for logged-in users.\n\n You are in control.", 'content-aware-sidebars' ) )),
|
668 |
'ref_id' => '#cas-options',
|
669 |
'position' => array(
|
670 |
'edge' => 'right',
|
694 |
public function create_meta_boxes($post) {
|
695 |
|
696 |
$this->create_pointers();
|
|
|
697 |
CAS_App::instance()->manager()->populate_metadata();
|
698 |
|
699 |
$boxes = array();
|
|
|
700 |
$boxes[] = array(
|
701 |
'id' => 'submitdiv',
|
702 |
'title' => __('Publish'),
|
704 |
'context' => 'side',
|
705 |
'priority' => 'high'
|
706 |
);
|
707 |
+
$boxes[] = array(
|
708 |
+
'id' => 'cas-status',
|
709 |
+
'title' => __('Sidebar Status', 'content-aware-sidebars'),
|
710 |
+
'callback' => 'meta_box_status',
|
711 |
+
'context' => 'section-schedule',
|
712 |
+
'priority' => 'default'
|
713 |
+
);
|
714 |
+
$boxes[] = array(
|
715 |
+
'id' => 'cas-advanced',
|
716 |
+
'title' => __('Advanced', 'content-aware-sidebars'),
|
717 |
+
'callback' => 'meta_box_advanced',
|
718 |
+
'context' => 'section-advanced',
|
719 |
+
'priority' => 'default'
|
720 |
+
);
|
721 |
|
722 |
if ( cas_fs()->is_not_paying() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
$boxes[] = array(
|
724 |
'id' => 'cas-plugin-links',
|
725 |
'title' => __('Content Aware Sidebars', 'content-aware-sidebars'),
|
727 |
'context' => 'side',
|
728 |
'priority' => 'default'
|
729 |
);
|
730 |
+
$boxes[] = array(
|
731 |
+
'id' => 'cas-schedule',
|
732 |
+
'title' => __('Time Schedule', 'content-aware-sidebars'),
|
733 |
+
'callback' => 'meta_box_schedule',
|
734 |
+
'context' => 'section-schedule',
|
735 |
+
'priority' => 'default'
|
736 |
+
);
|
737 |
}
|
738 |
+
|
739 |
+
//Options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
740 |
$boxes[] = array(
|
741 |
'id' => 'cas-options',
|
742 |
'title' => __('Options', 'content-aware-sidebars'),
|
751 |
$box['id'],
|
752 |
$box['title'],
|
753 |
array($this, $box['callback']),
|
754 |
+
CAS_App::BASE_SCREEN.'-edit',
|
755 |
$box['context'],
|
756 |
$box['priority']
|
757 |
);
|
758 |
}
|
759 |
|
760 |
+
add_action('admin_enqueue_scripts',
|
761 |
+
array('WPCACore','enqueue_scripts_styles'),9);
|
762 |
+
//todo: refactor add of meta box
|
763 |
+
//with new bootstrapper, legacy core might be loaded
|
764 |
+
if(method_exists('WPCACore', 'render_group_meta_box')) {
|
765 |
+
WPCACore::render_group_meta_box($post,CAS_App::BASE_SCREEN.'-edit','section-conditions','default');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
}
|
767 |
+
|
768 |
}
|
769 |
|
770 |
/**
|
774 |
* @return void
|
775 |
*/
|
776 |
public function admin_notice_review() {
|
777 |
+
$has_reviewed = get_user_option(CAS_App::META_PREFIX.'cas_review');
|
778 |
if($has_reviewed === false) {
|
779 |
$tour_taken = $this->_tour_manager->get_user_option();
|
780 |
+
if($tour_taken && (time() - $tour_taken) >= WEEK_IN_SECONDS) {
|
781 |
+
$current_user = wp_get_current_user();
|
782 |
+
|
783 |
+
//updated class for wp4.0 and below
|
784 |
+
echo '<div class="notice notice-success updated js-cas-notice-review">';
|
785 |
+
echo '<p>';
|
786 |
+
printf(__("Hey %s, it's Joachim from %s. You have used this free plugin for some time now, and I hope you like it!",'content-aware-sidebars'),
|
787 |
+
'<strong>'.$current_user->display_name.'</strong>',
|
788 |
+
'<strong>Content Aware Sidebars</strong>'
|
789 |
+
);
|
790 |
+
echo '<br>';
|
791 |
+
printf(__("I have spent countless hours developing it, and it would mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s",'content-aware-sidebars'),
|
792 |
+
'<strong><a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/content-aware-sidebars?filter=5#postform">',
|
793 |
+
'</a></strong>'
|
794 |
+
);
|
795 |
+
echo '</p>';
|
796 |
+
echo '<p><a target="_blank" class="button-primary" href="https://wordpress.org/support/view/plugin-reviews/content-aware-sidebars?filter=5#postform">'.__('Review Content Aware Sidebars','content-aware-sidebars').'</a> <button class="button-secondary">'.__("No thanks",'content-aware-sidebars').'</button></p>';
|
797 |
echo '</div>';
|
798 |
}
|
799 |
}
|
800 |
}
|
801 |
|
802 |
+
public function meta_box_status($post) {
|
803 |
+
$activate_date = $post->post_status == CAS_App::STATUS_SCHEDULED ? $post->post_date : '';
|
804 |
+
$deactivate_date = get_post_meta($post->ID, CAS_App::META_PREFIX.'deactivate_time',true);
|
805 |
+
|
806 |
+
echo '<table class="form-table cas-form-table" width="100%"><tbody>';
|
807 |
+
echo '<tr><td scope="row">'.__("Status",'content-aware-sidebars').'</td>';
|
808 |
+
echo '<td>';
|
809 |
+
echo '<label class="cae-toggle">';
|
810 |
+
echo '<input class="js-cas-status" type="checkbox" name="post_status" value="'.CAS_App::STATUS_ACTIVE.'" '.checked( in_array($post->post_status,array(CAS_App::STATUS_ACTIVE,'auto-draft')),true,false).' />';
|
811 |
+
echo '<div class="cae-toggle-bar"></div></label>';
|
812 |
+
echo '</td></tr>';
|
813 |
+
|
814 |
+
echo '<tr><td scope="row">'.__("Activate",'content-aware-sidebars').'</td>';
|
815 |
+
echo '<td>';
|
816 |
+
echo '<span class="js-cas-activation">';
|
817 |
+
echo '<input type="text" name="sidebar_activate" value="'.$activate_date.'" data-input placeholder="'.esc_attr__('Select date','content-aware-sidebars').'">';
|
818 |
+
echo '<button type="button" class="button button-small" data-toggle><span class="dashicons dashicons-calendar"></span></button>';
|
819 |
+
echo '<button type="button" class="button button-small" data-clear><span class="dashicons dashicons-no-alt"></span></button>';
|
820 |
+
echo '</span>';
|
821 |
+
echo '</td></tr>';
|
822 |
+
|
823 |
+
echo '<tr><td scope="row">'.__("Deactivate",'content-aware-sidebars').'</td>';
|
824 |
+
echo '<td>';
|
825 |
+
echo '<span class="js-cas-expiry">';
|
826 |
+
echo '<input type="text" name="sidebar_deactivate" value="'.$deactivate_date.'" data-input placeholder="'.esc_attr__('Never','content-aware-sidebars').'">';
|
827 |
+
echo '<button type="button" class="button button-small" data-toggle><span class="dashicons dashicons-calendar"></span></button>';
|
828 |
+
echo '<button type="button" class="button button-small" data-clear><span class="dashicons dashicons-no-alt"></span></button>';
|
829 |
+
echo '</span>';
|
830 |
+
echo '</td></tr>';
|
831 |
+
|
832 |
+
echo '</tbody></table>';
|
833 |
+
|
834 |
}
|
835 |
|
836 |
+
public function meta_box_schedule($post) {
|
837 |
+
global $wp_locale;
|
838 |
+
|
839 |
+
echo '<p>'.__('Display sidebar only in given time ranges on select days.').' <span class="cas-pro-label">'.__('Pro','content-aware-sidebars').'</span></p>';
|
840 |
+
echo '<div>';
|
841 |
+
|
842 |
+
$i = $start = get_option('start_of_week',0);
|
843 |
+
$count = count($wp_locale->weekday);
|
844 |
+
$days = array_values($wp_locale->weekday);
|
845 |
+
do {
|
846 |
+
echo '<div>';
|
847 |
+
echo '<label>';
|
848 |
+
echo '<input type="checkbox" class="js-cas-pro-notice" data-url="https://dev.institute/wordpress/sidebars-pro/pricing/?utm_source=plugin&utm_medium=popup&utm_content=time-schedule&utm_campaign=cas" /> '.ucfirst($days[$i]).' (8:00 - 17:00)';
|
849 |
+
echo '</label>';
|
850 |
+
echo '<div class="cas-schedule-slide ui-slider ui-slider-horizontal ui-state-disabled ui-slider-disabled">';
|
851 |
+
echo '<div class="ui-slider-range" style="left: 30%; width: 40%;"></div>';
|
852 |
+
echo '<span class="ui-slider-handle ui-state-default" style="left: 30%;"></span>';
|
853 |
+
echo '<span class="ui-slider-handle ui-state-default" style="left: 70%;"></span>';
|
854 |
+
echo '</div>';
|
855 |
+
echo '</div>';
|
856 |
+
$i = ($i + 1) % $count;
|
857 |
+
} while($i != $start);
|
858 |
+
echo '</div>';
|
859 |
+
}
|
860 |
|
861 |
+
public function meta_box_advanced($post) {
|
862 |
+
echo '<div>';
|
863 |
+
echo '<strong>'.__('Order').'</strong>';
|
864 |
+
echo '<p><label for="menu_order" class="screen-reader-text">'.__('Order').'</label>';
|
865 |
+
echo '<input type="number" value="'.$post->menu_order.'" id="menu_order" size="4" name="menu_order"></p></div>';
|
866 |
+
|
867 |
+
if ( current_user_can( "delete_post", $post->ID ) ) {
|
868 |
+
echo '<div style="overflow:hidden;">';
|
869 |
+
if ( !EMPTY_TRASH_DAYS )
|
870 |
+
$delete_text = __('Delete Permanently');
|
871 |
+
else
|
872 |
+
$delete_text = __('Move to Trash');
|
873 |
+
|
874 |
+
echo '<a class="wpca-pull-right cas-delete" href="'.get_delete_post_link($post->ID).'">'.$delete_text.'</a>';
|
875 |
+
echo '</div>';
|
876 |
+
}
|
877 |
}
|
878 |
|
879 |
/**
|
883 |
public function meta_box_options($post) {
|
884 |
|
885 |
$columns = array(
|
886 |
+
'handle',
|
887 |
+
'host',
|
888 |
+
'merge_pos'
|
889 |
);
|
890 |
|
891 |
foreach ($columns as $key => $value) {
|
911 |
|
912 |
echo '</p></span>';
|
913 |
|
|
|
|
|
|
|
|
|
914 |
}
|
915 |
|
916 |
/**
|
924 |
?>
|
925 |
<div style="overflow:hidden;">
|
926 |
<ul>
|
|
|
|
|
927 |
<?php if($locale != "en_US") : ?>
|
928 |
<li><a href="https://www.transifex.com/projects/p/content-aware-sidebars/" target="_blank"><?php _e('Translate the plugin into your language','content-aware-sidebars'); ?></a></li>
|
929 |
<?php endif; ?>
|
930 |
+
<li><a href="https://dev.institute/docs/content-aware-sidebars/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank"><?php _e('Documentation','content-aware-sidebars'); ?></a></li>
|
931 |
+
<li><a href="https://dev.institute/docs/content-aware-sidebars/getting-started/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank"><?php _e('Get Started','content-aware-sidebars'); ?></a></li>
|
932 |
+
<li><a href="https://dev.institute/docs/content-aware-sidebars/faq/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank"><?php _e('FAQ','content-aware-sidebars'); ?></a></li>
|
933 |
+
<!--<li><a href="<?php echo esc_url(cas_fs()->get_upgrade_url()); ?>"><?php _e('Priority Email Support','content-aware-sidebars'); ?></a></li>-->
|
934 |
+
<li><a href="https://wordpress.org/support/plugin/content-aware-sidebars/" target="_blank"><?php _e('Forum Support','content-aware-sidebars'); ?></a></li>
|
935 |
</ul>
|
936 |
</div>
|
937 |
<?php
|
938 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
939 |
|
940 |
/**
|
941 |
* Meta box to submit form fields
|
949 |
* @return void
|
950 |
*/
|
951 |
public function meta_box_submit( $post, $args = array() ) {
|
|
|
952 |
|
953 |
+
?>
|
|
|
|
|
|
|
954 |
|
955 |
+
<div class="cas-save">
|
956 |
|
957 |
+
<div class="wpca-pull-right">
|
958 |
+
<?php
|
959 |
+
if ( $post->post_status == 'auto-draft' ) {
|
960 |
+
submit_button( __( 'Save' ), 'primary button-large', 'publish', false );
|
961 |
+
} else {
|
962 |
+
submit_button( __( 'Update' ), 'primary button-large', 'save', false );
|
963 |
+
} ?>
|
964 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
965 |
</div>
|
966 |
+
<ul class="cas-overview-actions">
|
967 |
+
<li><span class="dashicons dashicons-post-status"></span> <?php _e("Status:"); ?>
|
968 |
+
<strong>
|
969 |
<?php
|
|
|
|
|
|
|
970 |
|
971 |
+
/* translators: Publish box date format, see http://php.net/date */
|
972 |
+
$datef = __( 'M j, Y' );
|
973 |
+
$date = date_i18n( $datef, strtotime( $post->post_date ) );
|
974 |
|
975 |
+
switch ($post->post_status) {
|
976 |
+
case CAS_App::STATUS_SCHEDULED:
|
977 |
+
$stamp = __('Activates on <b>%1$s</b>');
|
|
|
|
|
|
|
|
|
978 |
break;
|
979 |
+
case CAS_App::STATUS_ACTIVE:
|
980 |
+
$stamp = __('Active');
|
981 |
break;
|
982 |
+
case CAS_App::STATUS_INACTIVE:
|
983 |
+
$stamp = __('Inactive');
|
984 |
break;
|
985 |
+
default:
|
986 |
+
$stamp = __('New');
|
987 |
+
$date = date_i18n( $datef, strtotime( current_time('mysql') ) );
|
988 |
break;
|
989 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
990 |
|
991 |
+
printf($stamp,$date);
|
992 |
+
echo '</strong> <a class="js-nav-link" href="#top#section-schedule">'.__('Edit').'</a>';
|
993 |
|
994 |
+
if ( post_type_supports($post->post_type, 'revisions') ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
995 |
$revisions = wp_get_post_revisions( $post->ID );
|
996 |
$revision_count = count($revisions);
|
997 |
+
reset( $revisions ); // Reset pointer for key()
|
998 |
+
$revision_id = key( $revisions );
|
|
|
|
|
|
|
999 |
?>
|
1000 |
+
<li><span class="dashicons dashicons-backup"></span>
|
1001 |
<?php printf( __( 'Widget Revisions: %s' ), '<b>' . number_format_i18n( $revision_count ) . '</b>' ); ?>
|
1002 |
+
<a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $revision_id ) ); ?>" title="<?php esc_attr_e( 'Browse revisions' ); ?>"><?php _ex( 'Browse', 'revisions' ); ?></a>
|
1003 |
+
</li>
|
1004 |
<?php
|
1005 |
+
|
1006 |
+
} elseif (cas_fs()->is_not_paying() ) {
|
|
|
1007 |
?>
|
1008 |
+
<li><span class="dashicons dashicons-backup"></span>
|
1009 |
+
<?php printf( __( 'Widget Revisions: %s' ), '<b>0</b>' );
|
1010 |
+
echo ' <b><a href="'.esc_url(cas_fs()->get_upgrade_url()).'">'.__( 'Enable').'</a></b>'; ?>
|
1011 |
+
</li>
|
1012 |
<?php
|
1013 |
}
|
1014 |
+
?>
|
1015 |
|
1016 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
|
1018 |
<?php
|
1019 |
}
|
1030 |
$dismiss = time();
|
1031 |
}
|
1032 |
|
1033 |
+
echo json_encode(update_user_option(get_current_user_id(),CAS_App::META_PREFIX.'cas_review', $dismiss));
|
1034 |
die();
|
1035 |
}
|
1036 |
|
1074 |
*/
|
1075 |
public function save_post($post_id,$post) {
|
1076 |
|
|
|
|
|
|
|
|
|
1077 |
//Verify nonce, check_admin_referer dies on false
|
1078 |
+
//TODO: check other nonce instead
|
1079 |
if(!(isset($_POST[WPCACore::NONCE])
|
1080 |
&& wp_verify_nonce($_POST[WPCACore::NONCE], WPCACore::PREFIX.$post_id)))
|
1081 |
return;
|
1109 |
if(isset($old[$meta])) {
|
1110 |
unset($old[$meta]);
|
1111 |
} else {
|
1112 |
+
add_post_meta($post_id, CAS_App::META_PREFIX.$field->get_id(), $meta);
|
1113 |
}
|
1114 |
}
|
1115 |
foreach ($old as $meta => $v) {
|
1120 |
}
|
1121 |
}
|
1122 |
|
1123 |
+
/**
|
1124 |
+
* Add suffix when creating sidebar with existing name
|
1125 |
+
* Does not stop duplicate titles on update
|
1126 |
+
*
|
1127 |
+
* @since 3.4.3
|
1128 |
+
* @param array $insert_data
|
1129 |
+
* @param array $data
|
1130 |
+
* @return array
|
1131 |
+
*/
|
1132 |
+
public function add_duplicate_title_suffix($insert_data, $data) {
|
1133 |
+
if($data['post_type'] == CAS_App::TYPE_SIDEBAR && !$data['ID']) {
|
1134 |
+
$sidebars = CAS_App::instance()->manager()->sidebars;
|
1135 |
+
$sidebar_titles = array();
|
1136 |
+
foreach ($sidebars as $sidebar) {
|
1137 |
+
$sidebar_titles[$sidebar->post_title] = 1;
|
1138 |
+
}
|
1139 |
+
//if title exists, add a suffix
|
1140 |
+
$i = 0;
|
1141 |
+
$title = wp_unslash($insert_data['post_title']);
|
1142 |
+
$new_title = $title;
|
1143 |
+
while(isset($sidebar_titles[$new_title])) {
|
1144 |
+
$new_title = $title.' ('.++$i.')';
|
1145 |
+
}
|
1146 |
+
if($i) {
|
1147 |
+
$insert_data['post_title'] = wp_slash($new_title);
|
1148 |
+
}
|
1149 |
+
}
|
1150 |
+
return $insert_data;
|
1151 |
+
}
|
1152 |
+
|
1153 |
/**
|
1154 |
* Remove widget when its sidebar is removed
|
1155 |
* @param int $post_id
|
1186 |
wp_set_sidebars_widgets($sidebars_widgets);
|
1187 |
}
|
1188 |
|
1189 |
+
/**
|
1190 |
+
* Get sidebar edit link
|
1191 |
+
* TODO: Consider changing post type _edit_link instead
|
1192 |
+
*
|
1193 |
+
* @since 3.4
|
1194 |
+
* @param string $link
|
1195 |
+
* @param int $post_id
|
1196 |
+
* @param string $context
|
1197 |
+
* @return string
|
1198 |
+
*/
|
1199 |
+
public function get_edit_post_link($link, $post_id, $context) {
|
1200 |
+
$post = get_post($post_id);
|
1201 |
+
if($post->post_type == CAS_App::TYPE_SIDEBAR) {
|
1202 |
+
$sep = '&';
|
1203 |
+
if($context == 'display') {
|
1204 |
+
$sep = '&';
|
1205 |
+
}
|
1206 |
+
$link = admin_url('admin.php?page=wpcas-edit'.$sep.'sidebar_id='.$post_id);
|
1207 |
+
}
|
1208 |
+
return $link;
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
/**
|
1212 |
+
* Get sidebar delete link
|
1213 |
+
* TODO: Consider changing post type _edit_link instead
|
1214 |
+
*
|
1215 |
+
* @since 3.4
|
1216 |
+
* @param string $link
|
1217 |
+
* @param int $post_id
|
1218 |
+
* @param boolean $force_delete
|
1219 |
+
* @return string
|
1220 |
+
*/
|
1221 |
+
public function get_delete_post_link($link, $post_id, $force_delete) {
|
1222 |
+
$post = get_post($post_id);
|
1223 |
+
if($post->post_type == CAS_App::TYPE_SIDEBAR) {
|
1224 |
+
|
1225 |
+
$action = ( $force_delete || !EMPTY_TRASH_DAYS ) ? 'delete' : 'trash';
|
1226 |
+
|
1227 |
+
$link = add_query_arg(
|
1228 |
+
'action',
|
1229 |
+
$action,
|
1230 |
+
admin_url('admin.php?page=wpcas-edit&sidebar_id='.$post_id)
|
1231 |
+
);
|
1232 |
+
$link = wp_nonce_url( $link, "$action-post_{$post_id}" );
|
1233 |
+
}
|
1234 |
+
return $link;
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
/**
|
1238 |
+
* Add general scripts to admin screens
|
1239 |
+
*
|
1240 |
+
* @since 3.4.1
|
1241 |
+
*/
|
1242 |
+
public function add_general_scripts_styles() {
|
1243 |
+
wp_register_script('cas/admin/general', plugins_url('../js/general.js', __FILE__), array('jquery'), CAS_App::PLUGIN_VERSION, true);
|
1244 |
+
wp_enqueue_script('cas/admin/general');
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
/**
|
1248 |
+
* Register and enqueue scripts styles
|
1249 |
+
* for screen
|
1250 |
+
*
|
1251 |
+
* @since 3.4
|
1252 |
+
*/
|
1253 |
+
public function add_scripts_styles() {
|
1254 |
+
|
1255 |
+
wp_register_script('flatpickr', plugins_url('../js/flatpickr.min.js', __FILE__), array(), '2.3.4', false);
|
1256 |
+
|
1257 |
+
wp_register_script('cas/admin/edit', plugins_url('../js/cas_admin.min.js', __FILE__), array('jquery','flatpickr'), CAS_App::PLUGIN_VERSION, false);
|
1258 |
+
|
1259 |
+
wp_register_style('flatpickr', plugins_url('../css/flatpickr.dark.min.css', __FILE__), array(), '2.3.4');
|
1260 |
+
wp_register_style('cas/admin/style', plugins_url('../css/style.css', __FILE__), array('flatpickr'), CAS_App::PLUGIN_VERSION);
|
1261 |
+
|
1262 |
+
$visibility = array();
|
1263 |
+
foreach (CAS_App::instance()->_manager->metadata()->get('visibility')->get_input_list() as $k => $v) {
|
1264 |
+
$visibility[] = array(
|
1265 |
+
'id' => $k,
|
1266 |
+
'text' => $v
|
1267 |
+
);
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
if(cas_fs()->is_not_paying()) {
|
1271 |
+
$visibility[] = array(
|
1272 |
+
'id' => 'pro',
|
1273 |
+
'text' => __('User Roles available in Pro','content-aware-sidebars'),
|
1274 |
+
'disabled' => true
|
1275 |
+
);
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
global $wp_locale;
|
1279 |
+
|
1280 |
+
wp_enqueue_script('cas/admin/edit');
|
1281 |
+
wp_localize_script( 'cas/admin/edit', 'CASAdmin', array(
|
1282 |
+
'allVisibility' => __('All Users','content-aware-sidebars'),
|
1283 |
+
'visibility' => $visibility,
|
1284 |
+
'weekdays' => array(
|
1285 |
+
'shorthand' => array_values($wp_locale->weekday_abbrev),
|
1286 |
+
'longhand' => array_values($wp_locale->weekday)
|
1287 |
+
),
|
1288 |
+
'months' => array(
|
1289 |
+
'shorthand' => array_values($wp_locale->month_abbrev),
|
1290 |
+
'longhand' => array_values($wp_locale->month)
|
1291 |
+
),
|
1292 |
+
'weekStart' => get_option('start_of_week',0),
|
1293 |
+
'dateFormat' => __( 'F j, Y' ) //default long date
|
1294 |
+
));
|
1295 |
+
|
1296 |
+
wp_enqueue_style('cas/admin/style');
|
1297 |
+
|
1298 |
+
}
|
1299 |
+
|
1300 |
}
|
1301 |
|
1302 |
//eol
|
admin/sidebar-list-table.php
ADDED
@@ -0,0 +1,634 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Content Aware Sidebars
|
4 |
+
* @author Joachim Jensen <jv@intox.dk>
|
5 |
+
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
+
*/
|
8 |
+
|
9 |
+
if (!defined('ABSPATH')) {
|
10 |
+
header('Status: 403 Forbidden');
|
11 |
+
header('HTTP/1.1 403 Forbidden');
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
if ( ! class_exists( 'WP_List_Table' ) ) {
|
16 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
17 |
+
}
|
18 |
+
|
19 |
+
class CAS_Sidebar_List_Table extends WP_List_Table {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Trash view
|
23 |
+
* @var boolean
|
24 |
+
*/
|
25 |
+
private $is_trash;
|
26 |
+
|
27 |
+
public function __construct( $args = array() ) {
|
28 |
+
$post_type_object = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
29 |
+
parent::__construct(array(
|
30 |
+
'singular' => $post_type_object->labels->singular_name,
|
31 |
+
'plural' => $post_type_object->labels->name,
|
32 |
+
'ajax' => false,
|
33 |
+
'screen' => isset( $args['screen'] ) ? $args['screen'] : null
|
34 |
+
));
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Load filtered sidebars for current query
|
39 |
+
*
|
40 |
+
* @since 3.4
|
41 |
+
* @return void
|
42 |
+
*/
|
43 |
+
public function prepare_items() {
|
44 |
+
global $avail_post_stati, $wp_query;
|
45 |
+
|
46 |
+
$this->_column_headers = $this->get_column_info();
|
47 |
+
|
48 |
+
$avail_post_stati = get_available_post_statuses(CAS_App::TYPE_SIDEBAR);
|
49 |
+
|
50 |
+
$per_page = $this->get_items_per_page( 'cas_sidebars_per_page', 20 );
|
51 |
+
$current_page = $this->get_pagenum();
|
52 |
+
|
53 |
+
$args = array(
|
54 |
+
'post_type' => CAS_App::TYPE_SIDEBAR,
|
55 |
+
'post_status' => array(
|
56 |
+
CAS_App::STATUS_ACTIVE,
|
57 |
+
CAS_App::STATUS_INACTIVE,
|
58 |
+
CAS_App::STATUS_SCHEDULED
|
59 |
+
),
|
60 |
+
'posts_per_page' => $per_page,
|
61 |
+
'paged' => $current_page,
|
62 |
+
'orderby' => 'title',
|
63 |
+
'order' => 'asc',
|
64 |
+
'update_post_term_cache' => false
|
65 |
+
);
|
66 |
+
|
67 |
+
if(isset($_REQUEST['s']) && strlen($_REQUEST['s'])) {
|
68 |
+
$args['s'] = $_REQUEST['s'];
|
69 |
+
}
|
70 |
+
|
71 |
+
//Make sure post_status!=all if present to avoid auto-drafts
|
72 |
+
if(isset($_REQUEST['post_status']) && $_REQUEST['post_status'] != 'all') {
|
73 |
+
$args['post_status'] = $_REQUEST['post_status'];
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( isset( $_REQUEST['orderby'] ) ) {
|
77 |
+
$meta = str_replace('meta_', '', $_REQUEST['orderby']);
|
78 |
+
if($meta != $_REQUEST['orderby']) {
|
79 |
+
$args['orderby'] = 'meta_value';
|
80 |
+
$args['meta_key'] = CAS_App::META_PREFIX . $meta;
|
81 |
+
} else {
|
82 |
+
$args['orderby'] = $_REQUEST['orderby'];
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( isset( $_REQUEST['order'] ) ) {
|
87 |
+
$args['order'] = $_REQUEST['order'] == 'asc' ? 'asc' : 'desc';
|
88 |
+
}
|
89 |
+
|
90 |
+
$wp_query = new WP_Query($args);
|
91 |
+
|
92 |
+
if ( $wp_query->found_posts || $current_page === 1 ) {
|
93 |
+
$total_items = $wp_query->found_posts;
|
94 |
+
} else {
|
95 |
+
$post_counts = (array) wp_count_posts( CAS_App::TYPE_SIDEBAR );
|
96 |
+
|
97 |
+
if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'] , $avail_post_stati ) ) {
|
98 |
+
$total_items = $post_counts[ $_REQUEST['post_status'] ];
|
99 |
+
} else {
|
100 |
+
$total_items = array_sum( $post_counts );
|
101 |
+
|
102 |
+
// Subtract post types that are not included in the admin all list.
|
103 |
+
foreach ( get_post_stati( array( 'show_in_admin_all_list' => false ) ) as $state ) {
|
104 |
+
$total_items -= $post_counts[ $state ];
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
$this->items = $wp_query->posts;
|
110 |
+
$this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] == 'trash';
|
111 |
+
$this->set_pagination_args( array(
|
112 |
+
'total_items' => $total_items,
|
113 |
+
'total_pages' => ceil( $total_items / $per_page ),
|
114 |
+
'per_page' => $per_page
|
115 |
+
) );
|
116 |
+
|
117 |
+
//Make sure filter is run
|
118 |
+
CAS_App::instance()->manager()->populate_metadata();
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Render on no items
|
123 |
+
*
|
124 |
+
* @since 3.4
|
125 |
+
* @return void
|
126 |
+
*/
|
127 |
+
public function no_items() {
|
128 |
+
if ( $this->is_trash ) {
|
129 |
+
echo get_post_type_object( CAS_App::TYPE_SIDEBAR )->labels->not_found_in_trash;
|
130 |
+
} else {
|
131 |
+
//todo show more text to get started
|
132 |
+
echo get_post_type_object( CAS_App::TYPE_SIDEBAR )->labels->not_found;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Get link to view
|
138 |
+
*
|
139 |
+
* @since 3.4
|
140 |
+
* @param array $args
|
141 |
+
* @param string $label
|
142 |
+
* @param string $class
|
143 |
+
* @return string
|
144 |
+
*/
|
145 |
+
public function get_view_link( $args, $label, $class = '' ) {
|
146 |
+
$screen = get_current_screen();
|
147 |
+
$args['page'] = $screen->parent_base;
|
148 |
+
$url = add_query_arg( $args, 'admin.php' );
|
149 |
+
|
150 |
+
$class_html = '';
|
151 |
+
if ( ! empty( $class ) ) {
|
152 |
+
$class_html = sprintf(
|
153 |
+
' class="%s"',
|
154 |
+
esc_attr( $class )
|
155 |
+
);
|
156 |
+
}
|
157 |
+
|
158 |
+
return sprintf(
|
159 |
+
'<a href="%s"%s>%s</a>',
|
160 |
+
esc_url( $url ),
|
161 |
+
$class_html,
|
162 |
+
$label
|
163 |
+
);
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Get views (sidebar statuses)
|
168 |
+
*
|
169 |
+
* @since 3.4
|
170 |
+
* @return array
|
171 |
+
*/
|
172 |
+
public function get_views() {
|
173 |
+
global $locked_post_status, $avail_post_stati;
|
174 |
+
|
175 |
+
if ( !empty($locked_post_status) )
|
176 |
+
return array();
|
177 |
+
|
178 |
+
$status_links = array();
|
179 |
+
$num_posts = wp_count_posts( CAS_App::TYPE_SIDEBAR ); //do not include private
|
180 |
+
$total_posts = array_sum( (array) $num_posts );
|
181 |
+
$class = '';
|
182 |
+
|
183 |
+
// Subtract post types that are not included in the admin all list.
|
184 |
+
foreach ( get_post_stati( array( 'show_in_admin_all_list' => false ) ) as $state ) {
|
185 |
+
$total_posts -= $num_posts->$state;
|
186 |
+
}
|
187 |
+
|
188 |
+
if ( empty( $class ) && ( !isset($_REQUEST['post_status']) || isset( $_REQUEST['all_posts'] ) ) ) {
|
189 |
+
$class = 'current';
|
190 |
+
}
|
191 |
+
|
192 |
+
$all_inner_html = sprintf(
|
193 |
+
_nx(
|
194 |
+
'All <span class="count">(%s)</span>',
|
195 |
+
'All <span class="count">(%s)</span>',
|
196 |
+
$total_posts,
|
197 |
+
'sidebars'
|
198 |
+
),
|
199 |
+
number_format_i18n( $total_posts )
|
200 |
+
);
|
201 |
+
|
202 |
+
$status_links['all'] = $this->get_view_link( array(), $all_inner_html, $class );
|
203 |
+
|
204 |
+
//no way to change post status per post type, replace here instead
|
205 |
+
$label_replacement = array(
|
206 |
+
CAS_App::STATUS_ACTIVE => _n_noop( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', 'content-aware-sidebars'),
|
207 |
+
CAS_App::STATUS_INACTIVE => _n_noop( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', 'content-aware-sidebars')
|
208 |
+
);
|
209 |
+
|
210 |
+
foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) {
|
211 |
+
$class = '';
|
212 |
+
|
213 |
+
$status_name = $status->name;
|
214 |
+
|
215 |
+
if ( ! in_array( $status_name, $avail_post_stati ) || empty( $num_posts->$status_name ) ) {
|
216 |
+
continue;
|
217 |
+
}
|
218 |
+
|
219 |
+
if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] ) {
|
220 |
+
$class = 'current';
|
221 |
+
}
|
222 |
+
|
223 |
+
$status_args = array(
|
224 |
+
'post_status' => $status_name
|
225 |
+
);
|
226 |
+
|
227 |
+
$label_count = $status->label_count;
|
228 |
+
if(isset($label_replacement[$status->name])) {
|
229 |
+
$label_count = $label_replacement[$status->name];
|
230 |
+
}
|
231 |
+
|
232 |
+
$status_label = sprintf(
|
233 |
+
translate_nooped_plural( $label_count, $num_posts->$status_name ),
|
234 |
+
number_format_i18n( $num_posts->$status_name )
|
235 |
+
);
|
236 |
+
|
237 |
+
$status_links[ $status_name ] = $this->get_view_link( $status_args, $status_label, $class );
|
238 |
+
}
|
239 |
+
|
240 |
+
return $status_links;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Get bulk actions
|
245 |
+
*
|
246 |
+
* @since 3.4
|
247 |
+
* @return array
|
248 |
+
*/
|
249 |
+
public function get_bulk_actions() {
|
250 |
+
$actions = array();
|
251 |
+
$post_type_obj = get_post_type_object( CAS_App::TYPE_SIDEBAR);
|
252 |
+
|
253 |
+
if ( current_user_can( $post_type_obj->cap->edit_posts ) ) {
|
254 |
+
if ( $this->is_trash ) {
|
255 |
+
$actions['untrash'] = __( 'Restore' );
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {
|
260 |
+
if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) {
|
261 |
+
$actions['delete'] = __( 'Delete Permanently' );
|
262 |
+
} else {
|
263 |
+
$actions['trash'] = __( 'Move to Trash' );
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
//todo: add filter
|
268 |
+
return $actions;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Render extra table navigation and actions
|
273 |
+
*
|
274 |
+
* @since 3.4
|
275 |
+
* @param string $which
|
276 |
+
* @return void
|
277 |
+
*/
|
278 |
+
public function extra_tablenav( $which ) {
|
279 |
+
|
280 |
+
echo '<div class="alignleft actions">';
|
281 |
+
if ( $this->is_trash && current_user_can( get_post_type_object( CAS_App::TYPE_SIDEBAR )->cap->edit_others_posts ) ) {
|
282 |
+
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
283 |
+
}
|
284 |
+
echo '</div>';
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Get current action
|
289 |
+
*
|
290 |
+
* @since 3.4
|
291 |
+
* @return string
|
292 |
+
*/
|
293 |
+
public function current_action() {
|
294 |
+
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
|
295 |
+
return 'delete_all';
|
296 |
+
|
297 |
+
return parent::current_action();
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Get columns
|
302 |
+
*
|
303 |
+
* @since 3.4
|
304 |
+
* @return array
|
305 |
+
*/
|
306 |
+
public function get_columns() {
|
307 |
+
|
308 |
+
$posts_columns = array();
|
309 |
+
$posts_columns['cb'] = '<input type="checkbox" />';
|
310 |
+
$posts_columns['title'] = _x( 'Title', 'column name' );
|
311 |
+
$posts_columns['handle'] = _x('Action','option', "content-aware-sidebars");
|
312 |
+
$posts_columns['widgets'] = __('Widgets');
|
313 |
+
$posts_columns['visibility'] = __('Visibility',"content-aware-sidebars");
|
314 |
+
$posts_columns['status'] = __( 'Status' );
|
315 |
+
|
316 |
+
return apply_filters('cas/admin/columns', $posts_columns);
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Get sortable columns
|
321 |
+
*
|
322 |
+
* @since 3.4
|
323 |
+
* @return array
|
324 |
+
*/
|
325 |
+
public function get_sortable_columns() {
|
326 |
+
$columns = array(
|
327 |
+
'title' => array('title', true),
|
328 |
+
'status' => 'post_status',
|
329 |
+
'handle' => 'meta_handle'
|
330 |
+
);
|
331 |
+
return $columns;
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Get default column name
|
336 |
+
*
|
337 |
+
* @since 3.4
|
338 |
+
* @return string
|
339 |
+
*/
|
340 |
+
protected function get_default_primary_column_name() {
|
341 |
+
return 'title';
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Get classes for rows
|
346 |
+
* Older WP versions do not add striped
|
347 |
+
*
|
348 |
+
* @since 3.4
|
349 |
+
* @return array
|
350 |
+
*/
|
351 |
+
public function get_table_classes() {
|
352 |
+
return array( 'widefat', 'fixed', 'striped', $this->_args['plural'] );
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Render checkbox column
|
357 |
+
*
|
358 |
+
* @since 3.4
|
359 |
+
* @param WP_Post $post
|
360 |
+
* @return void
|
361 |
+
*/
|
362 |
+
public function column_cb( $post ) {
|
363 |
+
if ( current_user_can( 'edit_post', $post->ID ) ): ?>
|
364 |
+
<label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>"><?php
|
365 |
+
printf( __( 'Select %s' ), _draft_or_post_title($post) );
|
366 |
+
?></label>
|
367 |
+
<input id="cb-select-<?php echo $post->ID; ?>" type="checkbox" name="post[]" value="<?php echo $post->ID; ?>" />
|
368 |
+
<div class="locked-indicator"></div>
|
369 |
+
<?php endif;
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Render title column wrapper
|
374 |
+
*
|
375 |
+
* @since 3.4
|
376 |
+
* @param WP_Post $post
|
377 |
+
* @param array $classes
|
378 |
+
* @param array $data
|
379 |
+
* @param string $primary
|
380 |
+
* @return void
|
381 |
+
*/
|
382 |
+
protected function _column_title( $post, $classes, $data, $primary) {
|
383 |
+
echo '<td class="' . $classes . ' page-title" ', $data, '>';
|
384 |
+
echo $this->column_title( $post );
|
385 |
+
echo '</td>';
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Render title column
|
390 |
+
*
|
391 |
+
* @since 3.4
|
392 |
+
* @param WP_Post $post
|
393 |
+
* @return void
|
394 |
+
*/
|
395 |
+
public function column_title( $post ) {
|
396 |
+
|
397 |
+
echo "<strong>";
|
398 |
+
|
399 |
+
$can_edit_post = current_user_can( 'edit_post', $post->ID );
|
400 |
+
$title = _draft_or_post_title($post);
|
401 |
+
|
402 |
+
if ( $can_edit_post && $post->post_status != 'trash' ) {
|
403 |
+
printf(
|
404 |
+
'<a class="" href="%s" aria-label="%s">%s</a>',
|
405 |
+
get_edit_post_link( $post->ID ),
|
406 |
+
/* translators: %s: post title */
|
407 |
+
esc_attr( sprintf( __( '“%s” (Edit)' ), $title ) ),
|
408 |
+
$title
|
409 |
+
);
|
410 |
+
} else {
|
411 |
+
echo $title;
|
412 |
+
}
|
413 |
+
|
414 |
+
echo "</strong>\n";
|
415 |
+
|
416 |
+
if ( $can_edit_post && $post->post_status != 'trash' ) {
|
417 |
+
$lock_holder = wp_check_post_lock( $post->ID );
|
418 |
+
|
419 |
+
if ( $lock_holder ) {
|
420 |
+
$lock_holder = get_userdata( $lock_holder );
|
421 |
+
$locked_avatar = get_avatar( $lock_holder->ID, 18 );
|
422 |
+
$locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
|
423 |
+
} else {
|
424 |
+
$locked_avatar = $locked_text = '';
|
425 |
+
}
|
426 |
+
|
427 |
+
echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
|
428 |
+
}
|
429 |
+
|
430 |
+
echo $this->handle_row_actions( $post, 'title', 'title' );
|
431 |
+
}
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Render sidebar action column
|
435 |
+
*
|
436 |
+
* @since 3.4
|
437 |
+
* @param WP_Post $post
|
438 |
+
* @return void
|
439 |
+
*/
|
440 |
+
public function column_handle($post) {
|
441 |
+
$metadata = CAS_App::instance()->manager()->metadata()->get("handle");
|
442 |
+
|
443 |
+
$return = "";
|
444 |
+
if($metadata) {
|
445 |
+
$return = $metadata->get_list_data($post->ID);
|
446 |
+
if($metadata->get_data($post->ID) != 2) {
|
447 |
+
$host = CAS_App::instance()->manager()->metadata()->get('host')->get_list_data($post->ID);
|
448 |
+
$return .= ": " . ($host ? $host : '<span style="color:red;">' . __('Please update Host Sidebar', "content-aware-sidebars") . '</span>');
|
449 |
+
|
450 |
+
}
|
451 |
+
if($metadata->get_data($post->ID) != 3) {
|
452 |
+
$pos = CAS_App::instance()->manager()->metadata()->get("merge_pos")->get_data($post->ID,true);
|
453 |
+
$pos_icon = $pos ? "up" : "down";
|
454 |
+
$pos_title = array(
|
455 |
+
__("Add sidebar at the top during merge","content-aware-sidebars"),
|
456 |
+
__("Add sidebar at the bottom during merge","content-aware-sidebars")
|
457 |
+
);
|
458 |
+
$return .= '<span title="'.$pos_title[$pos].'" class="dashicons dashicons-arrow-'.$pos_icon.'-alt"></span>';
|
459 |
+
}
|
460 |
+
|
461 |
+
}
|
462 |
+
echo $return;
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Render sidebar widgets column
|
467 |
+
*
|
468 |
+
* @since 3.4
|
469 |
+
* @param WP_Post $post
|
470 |
+
* @return void
|
471 |
+
*/
|
472 |
+
public function column_widgets($post) {
|
473 |
+
$sidebars_widgets = wp_get_sidebars_widgets();
|
474 |
+
$count = isset($sidebars_widgets[CAS_App::SIDEBAR_PREFIX . $post->ID]) ? count($sidebars_widgets[CAS_App::SIDEBAR_PREFIX . $post->ID]) : 0;
|
475 |
+
return '<a href="'.admin_url('widgets.php').'" title="' . esc_attr__('Manage Widgets', 'content-aware-sidebars') . '">' .$count . '</a>';
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Render sidebar visibility column
|
480 |
+
*
|
481 |
+
* @since 3.4
|
482 |
+
* @param WP_Post $post
|
483 |
+
* @return void
|
484 |
+
*/
|
485 |
+
public function column_visibility($post) {
|
486 |
+
$metadata = CAS_App::instance()->manager()->metadata()->get("visibility");
|
487 |
+
if($metadata) {
|
488 |
+
$data = $metadata->get_data($post->ID,true,false);
|
489 |
+
if($data) {
|
490 |
+
$list = $metadata->get_input_list();
|
491 |
+
foreach ($data as $k => $v) {
|
492 |
+
if(isset($list[$v])) {
|
493 |
+
$data[$k] = $list[$v];
|
494 |
+
}
|
495 |
+
}
|
496 |
+
echo implode(", ", $data);
|
497 |
+
return;
|
498 |
+
}
|
499 |
+
}
|
500 |
+
_e("All Users","content-aware-sidebars");
|
501 |
+
}
|
502 |
+
|
503 |
+
/**
|
504 |
+
* Render sidebar status column
|
505 |
+
*
|
506 |
+
* @since 3.4
|
507 |
+
* @param WP_Post $post
|
508 |
+
* @return void
|
509 |
+
*/
|
510 |
+
public function column_status( $post ) {
|
511 |
+
switch ($post->post_status) {
|
512 |
+
case CAS_App::STATUS_ACTIVE:
|
513 |
+
echo '<strong>'.__( 'Active' ).'</strong>';
|
514 |
+
$deactivate_date = get_post_meta($post->ID, CAS_App::META_PREFIX.'deactivate_time',true);
|
515 |
+
if($deactivate_date) {
|
516 |
+
$h_time = mysql2date( __( 'Y/m/d' ), $deactivate_date );
|
517 |
+
$t_time = mysql2date( __( 'Y/m/d g:i:s a' ), $deactivate_date );
|
518 |
+
echo '<br />'.sprintf(__('Until %s','content-aware-sidebars'),'<abbr title="' . $t_time . '">' . $h_time . '</abbr>');
|
519 |
+
}
|
520 |
+
break;
|
521 |
+
case CAS_App::STATUS_SCHEDULED;
|
522 |
+
|
523 |
+
$t_time = get_the_time( __( 'Y/m/d g:i:s a' ), $post );
|
524 |
+
$time = get_post_time( 'G', true, $post );
|
525 |
+
|
526 |
+
$time_diff = time() - $time;
|
527 |
+
$h_time = mysql2date( __( 'Y/m/d' ), $post->post_date );
|
528 |
+
|
529 |
+
if ( $time_diff > 0 ) {
|
530 |
+
echo '<strong class="error-message">' . __( 'Missed schedule' ) . '</strong>';
|
531 |
+
} else {
|
532 |
+
_e( 'Scheduled' );
|
533 |
+
}
|
534 |
+
echo '<br /><abbr title="' . $t_time . '">' . $h_time . '</abbr>';
|
535 |
+
break;
|
536 |
+
default:
|
537 |
+
_e( 'Inactive' );
|
538 |
+
break;
|
539 |
+
}
|
540 |
+
}
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Render arbitrary column
|
544 |
+
*
|
545 |
+
* @since 3.4
|
546 |
+
* @param WP_post $post
|
547 |
+
* @param string $column_name
|
548 |
+
* @return void
|
549 |
+
*/
|
550 |
+
public function column_default( $post, $column_name ) {
|
551 |
+
do_action('cas/admin/columns/render',$post,$column_name);
|
552 |
+
}
|
553 |
+
|
554 |
+
/**
|
555 |
+
* Render row
|
556 |
+
*
|
557 |
+
* @since 3.4
|
558 |
+
* @param WP_Post $item
|
559 |
+
* @return void
|
560 |
+
*/
|
561 |
+
public function single_row( $item ) {
|
562 |
+
$class = '';
|
563 |
+
if($item->post_status == CAS_App::STATUS_ACTIVE) {
|
564 |
+
$class = ' class="active"';
|
565 |
+
}
|
566 |
+
echo '<tr'.$class.'>';
|
567 |
+
$this->single_row_columns( $item );
|
568 |
+
echo '</tr>';
|
569 |
+
}
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Get row actions
|
573 |
+
*
|
574 |
+
* @since 3.4
|
575 |
+
* @param WP_Post $post
|
576 |
+
* @param string $column_name
|
577 |
+
* @param string $primary
|
578 |
+
* @return string
|
579 |
+
*/
|
580 |
+
protected function handle_row_actions( $post, $column_name, $primary ) {
|
581 |
+
if ( $primary !== $column_name ) {
|
582 |
+
return '';
|
583 |
+
}
|
584 |
+
|
585 |
+
$post_type_object = get_post_type_object( $post->post_type );
|
586 |
+
$actions = array();
|
587 |
+
$title = _draft_or_post_title();
|
588 |
+
|
589 |
+
if (current_user_can( 'edit_post', $post->ID ) && $post->post_status != 'trash') {
|
590 |
+
$actions['edit'] = sprintf(
|
591 |
+
'<a href="%s" aria-label="%s">%s</a>',
|
592 |
+
get_edit_post_link( $post->ID ),
|
593 |
+
/* translators: %s: post title */
|
594 |
+
esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ),
|
595 |
+
__( 'Edit' )
|
596 |
+
);
|
597 |
+
|
598 |
+
$link = admin_url('post.php?post='.$post->ID);
|
599 |
+
$actions['widget_revisions'] = '<a href="'.add_query_arg('action','cas-revisions',$link).'" title="' . esc_attr__('Widget Revisions', 'content-aware-sidebars') . '">' . __('Widget Revisions', 'content-aware-sidebars') . '</a>';
|
600 |
+
}
|
601 |
+
|
602 |
+
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
603 |
+
if ($post->post_status == 'trash') {
|
604 |
+
$actions['untrash'] = sprintf(
|
605 |
+
'<a href="%s" aria-label="%s">%s</a>',
|
606 |
+
wp_nonce_url( get_edit_post_link( $post->ID, 'display' ).'&action=untrash', 'untrash-post_' . $post->ID ),
|
607 |
+
/* translators: %s: post title */
|
608 |
+
esc_attr( sprintf( __( 'Restore “%s” from the Trash' ), $title ) ),
|
609 |
+
__( 'Restore' )
|
610 |
+
);
|
611 |
+
} elseif ( EMPTY_TRASH_DAYS ) {
|
612 |
+
$actions['trash'] = sprintf(
|
613 |
+
'<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
|
614 |
+
get_delete_post_link( $post->ID ),
|
615 |
+
/* translators: %s: post title */
|
616 |
+
esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $title ) ),
|
617 |
+
_x( 'Trash', 'verb' )
|
618 |
+
);
|
619 |
+
}
|
620 |
+
if ($post->post_status == 'trash' || ! EMPTY_TRASH_DAYS ) {
|
621 |
+
$actions['delete'] = sprintf(
|
622 |
+
'<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
|
623 |
+
get_delete_post_link( $post->ID, '', true ),
|
624 |
+
/* translators: %s: post title */
|
625 |
+
esc_attr( sprintf( __( 'Delete “%s” permanently' ), $title ) ),
|
626 |
+
__( 'Delete Permanently' )
|
627 |
+
);
|
628 |
+
}
|
629 |
+
}
|
630 |
+
|
631 |
+
return $this->row_actions( $actions );
|
632 |
+
}
|
633 |
+
|
634 |
+
}
|
admin/sidebar-overview.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
@@ -12,227 +12,290 @@ if (!defined('CAS_App::PLUGIN_VERSION')) {
|
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
-
final class CAS_Sidebar_Overview {
|
16 |
|
17 |
/**
|
18 |
-
*
|
19 |
-
* @var
|
20 |
*/
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
/**
|
24 |
-
*
|
25 |
*
|
26 |
-
* @since
|
|
|
27 |
*/
|
28 |
-
public function
|
|
|
29 |
|
30 |
-
|
31 |
-
array($this,'init_columns'));
|
32 |
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
}
|
45 |
|
46 |
-
|
47 |
/**
|
48 |
-
*
|
49 |
*
|
50 |
-
* @since 3.
|
51 |
-
* @
|
52 |
-
* @return array
|
53 |
*/
|
54 |
-
public function
|
55 |
-
$new_columns = array();
|
56 |
-
foreach ($this->columns as $id => $column) {
|
57 |
-
$new_columns[$id] = isset($column['title']) ? $column['title'] : $columns[$id];
|
58 |
-
}
|
59 |
-
return $new_columns;
|
60 |
-
}
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
public function admin_column_sortable_headers($columns) {
|
70 |
-
foreach ($this->columns as $id => $column) {
|
71 |
-
if($column['sortable']) {
|
72 |
-
$columns[$id] = $id;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
return $columns;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Manage custom column sorting
|
80 |
-
*
|
81 |
-
* @since 3.1
|
82 |
-
* @param array $vars
|
83 |
-
* @return array
|
84 |
-
*/
|
85 |
-
public function admin_column_orderby($vars) {
|
86 |
-
$orderby = isset($vars['orderby']) ? $vars['orderby'] : '';
|
87 |
-
if (isset($this->columns[$orderby]) && $this->columns[$orderby]['sortable']) {
|
88 |
-
$vars = array_merge($vars, array(
|
89 |
-
'meta_key' => WPCACore::PREFIX . $orderby,
|
90 |
-
'orderby' => 'meta_value'
|
91 |
-
));
|
92 |
}
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
-
|
96 |
/**
|
97 |
-
* Render
|
98 |
*
|
99 |
-
* @since 3.
|
100 |
-
* @param string $column_name
|
101 |
-
* @param int $post_id
|
102 |
* @return void
|
103 |
*/
|
104 |
-
public function
|
105 |
-
$
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
-
}
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
$link = admin_url('post.php?post='.$post->ID);
|
122 |
-
|
123 |
-
//$new_actions['mng_widgets'] = '<a href="widgets.php" title="' . esc_attr__('Manage Widgets', 'content-aware-sidebars') . '">' . __('Manage Widgets', 'content-aware-sidebars') . '</a>';
|
124 |
-
$new_actions['widget_revisions'] = '<a href="'.add_query_arg('action','cas-revisions',$link).'" title="' . esc_attr__('Widget Revisions', 'content-aware-sidebars') . '">' . __('Widget Revisions', 'content-aware-sidebars') . '</a>';
|
125 |
-
//Append new actions just before trash action
|
126 |
-
array_splice($actions, -1, 0, $new_actions);
|
127 |
-
unset($actions['inline hide-if-no-js']);
|
128 |
}
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
-
*
|
134 |
*
|
135 |
-
* @since 3.
|
136 |
* @return void
|
137 |
*/
|
138 |
-
public function
|
139 |
-
CAS_App::instance()->manager()->populate_metadata();
|
140 |
-
$this->columns = array(
|
141 |
-
'cb' => array(
|
142 |
-
'sortable' => false
|
143 |
-
),
|
144 |
-
'title' => array(
|
145 |
-
'sortable' => false
|
146 |
-
),
|
147 |
-
'handle' => array(
|
148 |
-
'title' => _x('Handle','option', 'content-aware-sidebars'),
|
149 |
-
'sortable' => true
|
150 |
-
),
|
151 |
-
'widgets' => array(
|
152 |
-
'title' => __('Widgets'),
|
153 |
-
'sortable' => false
|
154 |
-
),
|
155 |
-
'visibility' => array(
|
156 |
-
'title' => __('Visibility','content-aware-sidebars'),
|
157 |
-
'sortable' => false
|
158 |
-
),
|
159 |
-
'date' => array(
|
160 |
-
'sortable' => false
|
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 |
-
__('Add sidebar at the top during merge','content-aware-sidebars'),
|
189 |
-
__('Add sidebar at the bottom during merge','content-aware-sidebars')
|
190 |
-
);
|
191 |
-
$return .= '<span title="'.$pos_title[$pos].'" class="dashicons dashicons-arrow-'.$pos_icon.'-alt"></span>';
|
192 |
}
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
}
|
195 |
-
|
196 |
}
|
197 |
|
198 |
/**
|
199 |
-
*
|
200 |
*
|
201 |
-
* @since
|
202 |
-
* @param
|
203 |
-
* @param
|
204 |
-
* @
|
205 |
*/
|
206 |
-
|
207 |
-
$
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
}
|
220 |
-
|
|
|
|
|
221 |
}
|
222 |
|
223 |
/**
|
224 |
-
*
|
|
|
225 |
*
|
226 |
-
* @since
|
227 |
-
* @param string $column_name
|
228 |
-
* @param int $post_id
|
229 |
-
* @return int
|
230 |
*/
|
231 |
-
|
232 |
-
|
233 |
-
$count = isset($sidebars_widgets[CAS_App::SIDEBAR_PREFIX . $post_id]) ? count($sidebars_widgets[CAS_App::SIDEBAR_PREFIX . $post_id]) : 0;
|
234 |
-
return '<a href="'.admin_url('widgets.php').'" title="' . esc_attr__('Manage Widgets', 'content-aware-sidebars') . '">' .$count . '</a>';
|
235 |
|
|
|
236 |
}
|
237 |
|
238 |
}
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
+
final class CAS_Sidebar_Overview extends CAS_Admin {
|
16 |
|
17 |
/**
|
18 |
+
* Sidebar table
|
19 |
+
* @var CAS_Sidebar_List_Table
|
20 |
*/
|
21 |
+
public $table;
|
22 |
+
|
23 |
+
public function __construct() {
|
24 |
+
parent::__construct();
|
25 |
+
|
26 |
+
if(is_admin()) {
|
27 |
+
add_filter('set-screen-option',
|
28 |
+
array($this,'set_screen_option'), 10, 3);
|
29 |
+
}
|
30 |
+
}
|
31 |
|
32 |
/**
|
33 |
+
* Setup admin menus and get current screen
|
34 |
*
|
35 |
+
* @since 3.4
|
36 |
+
* @return string
|
37 |
*/
|
38 |
+
public function get_screen() {
|
39 |
+
global $_wp_last_object_menu;
|
40 |
|
41 |
+
$post_type_object = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
|
|
42 |
|
43 |
+
add_menu_page(
|
44 |
+
$post_type_object->labels->name,
|
45 |
+
$post_type_object->labels->name,
|
46 |
+
$post_type_object->cap->edit_posts,
|
47 |
+
CAS_App::BASE_SCREEN,
|
48 |
+
array($this,'render_screen'),
|
49 |
+
$post_type_object->menu_icon,
|
50 |
+
++$_wp_last_object_menu
|
51 |
+
);
|
52 |
|
53 |
+
return add_submenu_page(
|
54 |
+
CAS_App::BASE_SCREEN,
|
55 |
+
$post_type_object->labels->name,
|
56 |
+
$post_type_object->labels->all_items,
|
57 |
+
$post_type_object->cap->edit_posts,
|
58 |
+
CAS_App::BASE_SCREEN,
|
59 |
+
array($this,'render_screen')
|
60 |
+
);
|
61 |
}
|
62 |
|
|
|
63 |
/**
|
64 |
+
* Prepare screen load
|
65 |
*
|
66 |
+
* @since 3.4
|
67 |
+
* @return void
|
|
|
68 |
*/
|
69 |
+
public function prepare_screen() {
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
$post_type_object = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
72 |
+
if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
|
73 |
+
wp_die(
|
74 |
+
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
75 |
+
'<p>' . __( 'You are not allowed to edit posts in this post type.' ) . '</p>',
|
76 |
+
403
|
77 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
+
|
80 |
+
add_screen_option( 'per_page', array(
|
81 |
+
'default' => 20,
|
82 |
+
'option' => 'cas_sidebars_per_page'
|
83 |
+
));
|
84 |
+
|
85 |
+
$this->table = new CAS_Sidebar_List_Table();
|
86 |
+
$this->process_actions();//todo:add func to table to actions
|
87 |
+
$this->table->prepare_items();
|
88 |
+
|
89 |
}
|
90 |
+
|
91 |
/**
|
92 |
+
* Render screen
|
93 |
*
|
94 |
+
* @since 3.4
|
|
|
|
|
95 |
* @return void
|
96 |
*/
|
97 |
+
public function render_screen() {
|
98 |
+
$post_type_object = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
99 |
+
|
100 |
+
//Not only for decoration
|
101 |
+
//Older wp versions inject updated message after first h2
|
102 |
+
if (version_compare(get_bloginfo('version'), '4.3', '<')) {
|
103 |
+
$tag = 'h2';
|
104 |
+
} else {
|
105 |
+
$tag = 'h1';
|
106 |
}
|
|
|
107 |
|
108 |
+
echo '<div class="wrap">';
|
109 |
+
echo '<'.$tag.'>';
|
110 |
+
echo esc_html( $post_type_object->labels->name );
|
111 |
+
|
112 |
+
if ( current_user_can( $post_type_object->cap->create_posts ) ) {
|
113 |
+
echo ' <a href="' . esc_url( admin_url( 'admin.php?page=wpcas-edit' ) ) . '" class="add-new-h2 page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
|
114 |
+
}
|
115 |
+
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
116 |
+
/* translators: %s: search keywords */
|
117 |
+
printf( ' <span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', get_search_query() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
+
|
120 |
+
echo '</'.$tag.'>';
|
121 |
+
|
122 |
+
$this->bulk_messages();
|
123 |
+
|
124 |
+
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
|
125 |
+
|
126 |
+
$this->table->views();
|
127 |
+
|
128 |
+
echo '<form id="posts-filter" method="get">';
|
129 |
+
|
130 |
+
$this->table->search_box( $post_type_object->labels->search_items, 'post' );
|
131 |
+
|
132 |
+
echo '<input type="hidden" name="page" value="wpcas" />';
|
133 |
+
echo '<input type="hidden" name="post_status" class="post_status_page" value="'.(!empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all').'" />';
|
134 |
+
|
135 |
+
$this->table->display();
|
136 |
+
|
137 |
+
echo '</form></div>';
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
+
* Process actions
|
142 |
*
|
143 |
+
* @since 3.4
|
144 |
* @return void
|
145 |
*/
|
146 |
+
public function process_actions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
+
$post_type = CAS_App::TYPE_SIDEBAR;
|
149 |
+
$doaction = $this->table->current_action();
|
150 |
+
|
151 |
+
if ( $doaction ) {
|
152 |
+
|
153 |
+
check_admin_referer('bulk-sidebars');
|
154 |
+
|
155 |
+
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() );
|
156 |
+
|
157 |
+
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
158 |
+
|
159 |
+
if ( 'delete_all' == $doaction ) {
|
160 |
+
global $wpdb;
|
161 |
+
$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", CAS_App::TYPE_SIDEBAR, 'trash' ) );
|
162 |
+
|
163 |
+
$doaction = 'delete';
|
164 |
+
} elseif ( isset( $_REQUEST['ids'] ) ) {
|
165 |
+
$post_ids = explode( ',', $_REQUEST['ids'] );
|
166 |
+
} elseif ( !empty( $_REQUEST['post'] ) ) {
|
167 |
+
$post_ids = array_map('intval', $_REQUEST['post']);
|
168 |
}
|
169 |
+
|
170 |
+
if ( !isset( $post_ids ) ) {
|
171 |
+
wp_redirect( $sendback );
|
172 |
+
exit;
|
|
|
|
|
|
|
|
|
173 |
}
|
174 |
+
|
175 |
+
switch ( $doaction ) {
|
176 |
+
case 'trash':
|
177 |
+
$trashed = $locked = 0;
|
178 |
+
|
179 |
+
foreach ( (array) $post_ids as $post_id ) {
|
180 |
+
if ( !current_user_can( 'delete_post', $post_id) )
|
181 |
+
wp_die( __('You are not allowed to move this item to the Trash.') );
|
182 |
+
|
183 |
+
if ( wp_check_post_lock( $post_id ) ) {
|
184 |
+
$locked++;
|
185 |
+
continue;
|
186 |
+
}
|
187 |
+
|
188 |
+
if ( !wp_trash_post($post_id) )
|
189 |
+
wp_die( __('Error in moving to Trash.') );
|
190 |
+
|
191 |
+
$trashed++;
|
192 |
+
}
|
193 |
+
|
194 |
+
$sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids), 'locked' => $locked ), $sendback );
|
195 |
+
break;
|
196 |
+
case 'untrash':
|
197 |
+
$untrashed = 0;
|
198 |
+
foreach ( (array) $post_ids as $post_id ) {
|
199 |
+
if ( !current_user_can( 'delete_post', $post_id) )
|
200 |
+
wp_die( __('You are not allowed to restore this item from the Trash.') );
|
201 |
+
|
202 |
+
if ( !wp_untrash_post($post_id) )
|
203 |
+
wp_die( __('Error in restoring from Trash.') );
|
204 |
+
|
205 |
+
$untrashed++;
|
206 |
+
}
|
207 |
+
$sendback = add_query_arg('untrashed', $untrashed, $sendback);
|
208 |
+
break;
|
209 |
+
case 'delete':
|
210 |
+
$deleted = 0;
|
211 |
+
foreach ( (array) $post_ids as $post_id ) {
|
212 |
+
$post_del = get_post($post_id);
|
213 |
+
|
214 |
+
if ( !current_user_can( 'delete_post', $post_id ) )
|
215 |
+
wp_die( __('You are not allowed to delete this item.') );
|
216 |
+
|
217 |
+
if ( !wp_delete_post($post_id) )
|
218 |
+
wp_die( __('Error in deleting.') );
|
219 |
+
|
220 |
+
$deleted++;
|
221 |
+
}
|
222 |
+
$sendback = add_query_arg('deleted', $deleted, $sendback);
|
223 |
+
break;
|
224 |
+
}
|
225 |
+
|
226 |
+
$sendback = remove_query_arg( array('action', 'action2', 'post_status', 'post', 'bulk_edit'), $sendback );
|
227 |
+
|
228 |
+
wp_safe_redirect($sendback);
|
229 |
+
exit;
|
230 |
+
} elseif ( ! empty($_REQUEST['_wp_http_referer']) ) {
|
231 |
+
wp_safe_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) );
|
232 |
+
exit;
|
233 |
}
|
234 |
+
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
+
* Set screen options on save
|
239 |
*
|
240 |
+
* @since 3.4
|
241 |
+
* @param string $status
|
242 |
+
* @param string $option
|
243 |
+
* @param string $value
|
244 |
*/
|
245 |
+
public function set_screen_option($status, $option, $value) {
|
246 |
+
if ($option == 'cas_sidebars_per_page') {
|
247 |
+
return $value;
|
248 |
+
}
|
249 |
+
return $status;
|
250 |
+
}
|
251 |
+
|
252 |
+
public function bulk_messages() {
|
253 |
+
|
254 |
+
$bulk_counts = array(
|
255 |
+
'updated' => isset($_REQUEST['updated'] )? absint( $_REQUEST['updated'] ) : 0,
|
256 |
+
'locked' => isset($_REQUEST['locked'] ) ? absint( $_REQUEST['locked'] ) : 0,
|
257 |
+
'deleted' => isset($_REQUEST['deleted'] ) ? absint( $_REQUEST['deleted'] ) : 0,
|
258 |
+
'trashed' => isset($_REQUEST['trashed'] ) ? absint( $_REQUEST['trashed'] ) : 0,
|
259 |
+
'untrashed' => isset($_REQUEST['untrashed'] ) ? absint( $_REQUEST['untrashed'] ) : 0
|
260 |
+
);
|
261 |
+
|
262 |
+
$manage_widgets = sprintf(' <a href="%1$s">%2$s</a>','widgets.php',__('Manage widgets','content-aware-sidebars'));
|
263 |
+
|
264 |
+
$bulk_messages = array(
|
265 |
+
'updated' => _n( '%s sidebar updated.', '%s sidebars updated.', $bulk_counts['updated'], 'content-aware-sidebars').$manage_widgets,
|
266 |
+
'locked' => _n( '%s sidebar not updated, somebody is editing it.', '%s sidebars not updated, somebody is editing them.', $bulk_counts['locked'], 'content-aware-sidebars'),
|
267 |
+
'deleted' => _n( '%s sidebar permanently deleted.', '%s sidebars permanently deleted.', $bulk_counts['deleted'], 'content-aware-sidebars'),
|
268 |
+
'trashed' => _n( '%s sidebar moved to the Trash.', '%s sidebars moved to the Trash.', $bulk_counts['trashed'], 'content-aware-sidebars'),
|
269 |
+
'untrashed' => _n( '%s sidebar restored from the Trash.', '%s sidebars restored from the Trash.', $bulk_counts['untrashed'], 'content-aware-sidebars'),
|
270 |
+
);
|
271 |
+
|
272 |
+
$bulk_counts = array_filter( $bulk_counts );
|
273 |
+
|
274 |
+
$messages = array();
|
275 |
+
foreach ( $bulk_counts as $message => $count ) {
|
276 |
+
if ( isset( $bulk_messages[ $message ] ) )
|
277 |
+
$messages[] = sprintf( $bulk_messages[ $message ], number_format_i18n( $count ) );
|
278 |
+
|
279 |
+
if ( $message == 'trashed' && isset( $_REQUEST['ids'] ) ) {
|
280 |
+
$ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] );
|
281 |
+
$messages[] = '<a href="' . esc_url( wp_nonce_url( "admin.php?page=wpcas&doaction=undo&action=untrash&ids=$ids", "bulk-sidebars" ) ) . '">' . __('Undo') . '</a>';
|
282 |
}
|
283 |
}
|
284 |
+
|
285 |
+
if ( $messages )
|
286 |
+
echo '<div id="message" class="updated notice is-dismissible"><p>' . join( ' ', $messages ) . '</p></div>';
|
287 |
}
|
288 |
|
289 |
/**
|
290 |
+
* Register and enqueue scripts styles
|
291 |
+
* for screen
|
292 |
*
|
293 |
+
* @since 3.4
|
|
|
|
|
|
|
294 |
*/
|
295 |
+
public function add_scripts_styles() {
|
296 |
+
wp_register_style('cas/admin/style', plugins_url('../css/style.css', __FILE__), array(), CAS_App::PLUGIN_VERSION);
|
|
|
|
|
297 |
|
298 |
+
wp_enqueue_style('cas/admin/style');
|
299 |
}
|
300 |
|
301 |
}
|
app.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
|
9 |
if (!defined('ABSPATH')) {
|
@@ -17,7 +17,7 @@ final class CAS_App {
|
|
17 |
/**
|
18 |
* Plugin version
|
19 |
*/
|
20 |
-
const PLUGIN_VERSION = '3.
|
21 |
|
22 |
/**
|
23 |
* Prefix for sidebar id
|
@@ -29,11 +29,28 @@ final class CAS_App {
|
|
29 |
*/
|
30 |
const TYPE_SIDEBAR = 'sidebar';
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Capability to manage sidebars
|
34 |
*/
|
35 |
const CAPABILITY = 'edit_theme_options';
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
private $manager;
|
38 |
|
39 |
/**
|
@@ -61,6 +78,10 @@ final class CAS_App {
|
|
61 |
|
62 |
$this->_manager = new CAS_Sidebar_Manager();
|
63 |
|
|
|
|
|
|
|
|
|
64 |
$this->add_actions();
|
65 |
$this->add_filters();
|
66 |
|
@@ -79,12 +100,14 @@ final class CAS_App {
|
|
79 |
protected function add_actions() {
|
80 |
add_action('init',
|
81 |
array($this,'load_textdomain'));
|
|
|
|
|
|
|
|
|
82 |
|
83 |
if(is_admin()) {
|
84 |
add_action('plugins_loaded',
|
85 |
array($this,'redirect_revision_link'));
|
86 |
-
add_action('admin_enqueue_scripts',
|
87 |
-
array($this,'load_admin_scripts'));
|
88 |
}
|
89 |
}
|
90 |
|
@@ -99,10 +122,6 @@ final class CAS_App {
|
|
99 |
$file = plugin_basename( plugin_dir_path( __FILE__ )).'/content-aware-sidebars.php';
|
100 |
add_filter('plugin_action_links_'.$file,
|
101 |
array($this,'plugin_action_links'), 10, 4 );
|
102 |
-
if ( cas_fs()->is_not_paying() ) {
|
103 |
-
add_filter('admin_footer_text',
|
104 |
-
array($this,'admin_footer_text'),99);
|
105 |
-
}
|
106 |
}
|
107 |
}
|
108 |
|
@@ -117,23 +136,23 @@ final class CAS_App {
|
|
117 |
}
|
118 |
|
119 |
/**
|
120 |
-
*
|
121 |
*
|
122 |
-
* @since 3.
|
123 |
-
* @param
|
124 |
-
* @return
|
125 |
*/
|
126 |
-
public function
|
127 |
-
$
|
128 |
-
if($
|
129 |
-
$
|
130 |
-
'
|
131 |
-
'
|
132 |
-
'
|
133 |
-
'
|
134 |
-
|
135 |
}
|
136 |
-
|
137 |
}
|
138 |
|
139 |
/**
|
@@ -161,6 +180,23 @@ final class CAS_App {
|
|
161 |
return array_merge($new_actions,$actions);
|
162 |
}
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
/**
|
165 |
* Redirect revision link to upgrade
|
166 |
*
|
@@ -177,99 +213,6 @@ final class CAS_App {
|
|
177 |
}
|
178 |
}
|
179 |
|
180 |
-
/**
|
181 |
-
* Load scripts and styles for administration
|
182 |
-
* @param string $hook
|
183 |
-
* @return void
|
184 |
-
*/
|
185 |
-
public function load_admin_scripts($hook) {
|
186 |
-
|
187 |
-
$current_screen = get_current_screen();
|
188 |
-
|
189 |
-
if($current_screen->post_type == CAS_App::TYPE_SIDEBAR) {
|
190 |
-
|
191 |
-
wp_register_script('cas/admin/edit', plugins_url('/js/cas_admin.min.js', __FILE__), array('jquery'), CAS_App::PLUGIN_VERSION, true);
|
192 |
-
|
193 |
-
wp_register_style('cas/admin/style', plugins_url('/css/style.css', __FILE__), array(), CAS_App::PLUGIN_VERSION);
|
194 |
-
|
195 |
-
//Sidebar editor
|
196 |
-
if ($current_screen->base == 'post') {
|
197 |
-
|
198 |
-
//Other plugins add buggy scripts
|
199 |
-
//causing the screen to stop working
|
200 |
-
//temporary as we move forward...
|
201 |
-
$script_whitelist = array(
|
202 |
-
'common',
|
203 |
-
'admin-bar',
|
204 |
-
'autosave',
|
205 |
-
'post',
|
206 |
-
'utils',
|
207 |
-
'svg-painter',
|
208 |
-
'wp-auth-check',
|
209 |
-
'bp-confirm',
|
210 |
-
'suggest',
|
211 |
-
'heartbeat',
|
212 |
-
'jquery',
|
213 |
-
'yoast-seo-admin-global-script',
|
214 |
-
'select2',
|
215 |
-
'backbone',
|
216 |
-
'backbone.trackit',
|
217 |
-
'_ca_condition-groups',
|
218 |
-
);
|
219 |
-
global $wp_scripts;
|
220 |
-
$script_whitelist = array_flip($script_whitelist);
|
221 |
-
foreach ($wp_scripts->queue as $script) {
|
222 |
-
if(!isset($script_whitelist[$script])) {
|
223 |
-
wp_dequeue_script($script);
|
224 |
-
}
|
225 |
-
}
|
226 |
-
|
227 |
-
$visibility = array();
|
228 |
-
foreach ($this->_manager->metadata()->get('visibility')->get_input_list() as $k => $v) {
|
229 |
-
$visibility[] = array(
|
230 |
-
'id' => $k,
|
231 |
-
'text' => $v
|
232 |
-
);
|
233 |
-
}
|
234 |
-
|
235 |
-
if(cas_fs()->is_not_paying()) {
|
236 |
-
$visibility[] = array(
|
237 |
-
'id' => 'pro',
|
238 |
-
'text' => __('User Roles available in Pro','content-aware-sidebars'),
|
239 |
-
'disabled' => true
|
240 |
-
);
|
241 |
-
}
|
242 |
-
|
243 |
-
wp_enqueue_script('cas/admin/edit');
|
244 |
-
wp_localize_script( 'cas/admin/edit', 'CASAdmin', array(
|
245 |
-
'allVisibility' => __('All Users','content-aware-sidebars'),
|
246 |
-
'visibility' => $visibility
|
247 |
-
));
|
248 |
-
wp_enqueue_style('cas/admin/style');
|
249 |
-
//Sidebar overview
|
250 |
-
} else if ($hook == 'edit.php') {
|
251 |
-
wp_enqueue_style('cas/admin/style');
|
252 |
-
}
|
253 |
-
} else if($current_screen->base == 'widgets') {
|
254 |
-
wp_register_style('cas/admin/style', plugins_url('/css/style.css', __FILE__), array(), CAS_App::PLUGIN_VERSION);
|
255 |
-
wp_enqueue_style('cas/admin/style');
|
256 |
-
|
257 |
-
$sidebar = get_post_type_object(CAS_App::TYPE_SIDEBAR);
|
258 |
-
|
259 |
-
wp_register_script('cas/admin/widgets', plugins_url('/js/widgets.min.js', __FILE__), array('jquery'), CAS_App::PLUGIN_VERSION, true);
|
260 |
-
wp_enqueue_script('cas/admin/widgets');
|
261 |
-
wp_localize_script( 'cas/admin/widgets', 'CASAdmin', array(
|
262 |
-
'addNew' => $sidebar->labels->add_new_item,
|
263 |
-
'collapse' => __('Collapse','content-aware-sidebars'),
|
264 |
-
'expand' => __('Expand','content-aware-sidebars'),
|
265 |
-
'filterSidebars' => __('Filter Sidebars','content-aware-sidebars'),
|
266 |
-
'filterWidgets' => __('Filter Widgets', 'content-aware-sidebars')
|
267 |
-
));
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
}
|
272 |
-
|
273 |
}
|
274 |
|
275 |
//eol
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
|
9 |
if (!defined('ABSPATH')) {
|
17 |
/**
|
18 |
* Plugin version
|
19 |
*/
|
20 |
+
const PLUGIN_VERSION = '3.4.3';
|
21 |
|
22 |
/**
|
23 |
* Prefix for sidebar id
|
29 |
*/
|
30 |
const TYPE_SIDEBAR = 'sidebar';
|
31 |
|
32 |
+
/**
|
33 |
+
* Sidebar statuses
|
34 |
+
*/
|
35 |
+
const STATUS_ACTIVE = 'publish';
|
36 |
+
const STATUS_INACTIVE = 'draft';
|
37 |
+
const STATUS_SCHEDULED = 'future';
|
38 |
+
|
39 |
/**
|
40 |
* Capability to manage sidebars
|
41 |
*/
|
42 |
const CAPABILITY = 'edit_theme_options';
|
43 |
|
44 |
+
/**
|
45 |
+
* Base admin screen name
|
46 |
+
*/
|
47 |
+
const BASE_SCREEN = 'wpcas';
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Prefix for metadata keys
|
51 |
+
*/
|
52 |
+
const META_PREFIX = '_ca_';
|
53 |
+
|
54 |
private $manager;
|
55 |
|
56 |
/**
|
78 |
|
79 |
$this->_manager = new CAS_Sidebar_Manager();
|
80 |
|
81 |
+
if(is_admin()) {
|
82 |
+
new CAS_Admin_Screen_Widgets();
|
83 |
+
}
|
84 |
+
|
85 |
$this->add_actions();
|
86 |
$this->add_filters();
|
87 |
|
100 |
protected function add_actions() {
|
101 |
add_action('init',
|
102 |
array($this,'load_textdomain'));
|
103 |
+
add_action('admin_bar_menu',
|
104 |
+
array($this,'admin_bar_menu'),99);
|
105 |
+
add_action('cas/event/deactivate',
|
106 |
+
array($this,'scheduled_deactivation'));
|
107 |
|
108 |
if(is_admin()) {
|
109 |
add_action('plugins_loaded',
|
110 |
array($this,'redirect_revision_link'));
|
|
|
|
|
111 |
}
|
112 |
}
|
113 |
|
122 |
$file = plugin_basename( plugin_dir_path( __FILE__ )).'/content-aware-sidebars.php';
|
123 |
add_filter('plugin_action_links_'.$file,
|
124 |
array($this,'plugin_action_links'), 10, 4 );
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
}
|
127 |
|
136 |
}
|
137 |
|
138 |
/**
|
139 |
+
* Add admin bar link to create sidebars
|
140 |
*
|
141 |
+
* @since 3.4
|
142 |
+
* @param [type] $wp_admin_bar
|
143 |
+
* @return void
|
144 |
*/
|
145 |
+
public function admin_bar_menu($wp_admin_bar) {
|
146 |
+
$post_type = get_post_type_object(self::TYPE_SIDEBAR);
|
147 |
+
if (current_user_can( $post_type->cap->create_posts ) ) {
|
148 |
+
$wp_admin_bar->add_menu( array(
|
149 |
+
'parent' => 'new-content',
|
150 |
+
'id' => self::BASE_SCREEN,
|
151 |
+
'title' => $post_type->labels->singular_name,
|
152 |
+
'href' => admin_url( 'admin.php?page=wpcas-edit' )
|
153 |
+
) );
|
154 |
}
|
155 |
+
|
156 |
}
|
157 |
|
158 |
/**
|
180 |
return array_merge($new_actions,$actions);
|
181 |
}
|
182 |
|
183 |
+
/**
|
184 |
+
* Callback for scheduled deactivation
|
185 |
+
*
|
186 |
+
* @since 3.4
|
187 |
+
* @param int $post_id
|
188 |
+
* @return void
|
189 |
+
*/
|
190 |
+
public function scheduled_deactivation($post_id) {
|
191 |
+
$success = wp_update_post(array(
|
192 |
+
'ID' => $post_id,
|
193 |
+
'post_status' => self::STATUS_INACTIVE
|
194 |
+
));
|
195 |
+
if($success) {
|
196 |
+
delete_post_meta($post_id, self::META_PREFIX.'deactivate_time');
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
/**
|
201 |
* Redirect revision link to upgrade
|
202 |
*
|
213 |
}
|
214 |
}
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
//eol
|
cas_uninstall.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
|
9 |
if (!defined('ABSPATH')) {
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
|
9 |
if (!defined('ABSPATH')) {
|
changelog.txt
CHANGED
@@ -1,3 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 2.6.3 =
|
2 |
|
3 |
* Fixed: sidebars would not be displayed on front page
|
1 |
+
= 3.0.1 =
|
2 |
+
|
3 |
+
* Added: wp4.4 compatibility
|
4 |
+
|
5 |
+
= 3.0 =
|
6 |
+
|
7 |
+
* Added: plugin rewritten with wp-content-aware-engine to take care of everything related to conditional content
|
8 |
+
* Added: migrate existing sidebar data to wp-content-aware-engine standards
|
9 |
+
* Added: negation of condition groups
|
10 |
+
* Added: new api to add modules
|
11 |
+
* Added: new action and filter hooks
|
12 |
+
* Added: intro tour
|
13 |
+
* Added: ca_display_sidebar deprecates display_ca_sidebar
|
14 |
+
* Added: filter for sidebars on widgets screen
|
15 |
+
* Added: add sidebar from widgets screen
|
16 |
+
* Added: filter for available widgets on widgets screen
|
17 |
+
* Added: more simple information meta box
|
18 |
+
* Added: gui improvements in sidebar editor
|
19 |
+
* Added: bulk update messages translatable
|
20 |
+
* Added: draft post status included in post type lists
|
21 |
+
* Added: arabic, bulgarian, croatian, czech, estonian, french (canada), greek, hebrew, indonesian, japanese, persian, vietnamese translations
|
22 |
+
* Fixed: uninstall script cleans residual data better
|
23 |
+
* Fixed: posts page and front page excluded from page post type list
|
24 |
+
* Fixed: updated translations
|
25 |
+
* Fixed: finnish translation included properly
|
26 |
+
* Fixed: minimum requirement wp3.8
|
27 |
+
* Removed: all action and filter hooks (moved to wp-content-aware-engine under new names)
|
28 |
+
* Removed: deprecated icons
|
29 |
+
* Removed: screenshots
|
30 |
+
|
31 |
= 2.6.3 =
|
32 |
|
33 |
* Fixed: sidebars would not be displayed on front page
|
content-aware-sidebars.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress/sidebars-pro/
|
11 |
Description: Unlimited custom sidebars for any post, page, category etc.
|
12 |
-
Version: 3.
|
13 |
Author: Joachim Jensen
|
14 |
Author URI: https://dev.institute
|
15 |
Text Domain: content-aware-sidebars
|
@@ -17,7 +17,7 @@ Domain Path: /lang/
|
|
17 |
License: GPLv3
|
18 |
|
19 |
Content Aware Sidebars Plugin
|
20 |
-
Copyright (C) 2011-
|
21 |
|
22 |
This program is free software: you can redistribute it and/or modify
|
23 |
it under the terms of the GNU General Public License as published by
|
@@ -46,16 +46,19 @@ if(!class_exists('CAS_App')) {
|
|
46 |
// Load dependencies
|
47 |
$cas_dir_path = plugin_dir_path( __FILE__ );
|
48 |
|
49 |
-
require($cas_dir_path.'lib/wp-content-aware-engine/
|
50 |
require($cas_dir_path.'app.php');
|
51 |
|
52 |
if(is_admin()) {
|
53 |
require($cas_dir_path.'lib/wp-db-updater/wp-db-updater.php');
|
54 |
require($cas_dir_path.'lib/wp-pointer-tour/wp-pointer-tour.php');
|
55 |
require($cas_dir_path.'admin/db-updates.php');
|
|
|
56 |
require($cas_dir_path.'admin/post_type_sidebar.php');
|
|
|
57 |
require($cas_dir_path.'admin/sidebar-overview.php');
|
58 |
require($cas_dir_path.'admin/sidebar-edit.php');
|
|
|
59 |
}
|
60 |
|
61 |
require($cas_dir_path.'sidebar.php');
|
@@ -75,17 +78,6 @@ if(!class_exists('CAS_App')) {
|
|
75 |
CAS_App::instance()->manager()->manual_sidebar($args);
|
76 |
}
|
77 |
|
78 |
-
/**
|
79 |
-
* Template wrapper to display content aware sidebars
|
80 |
-
*
|
81 |
-
* @deprecated 3.0 ca_display_sidebar()
|
82 |
-
* @param array|string $args
|
83 |
-
* @return void
|
84 |
-
*/
|
85 |
-
function display_ca_sidebar($args = array()) {
|
86 |
-
_deprecated_function( __FUNCTION__, '3.0', 'ca_display_sidebar()' );
|
87 |
-
ca_display_sidebar($args);
|
88 |
-
}
|
89 |
}
|
90 |
|
91 |
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress/sidebars-pro/
|
11 |
Description: Unlimited custom sidebars for any post, page, category etc.
|
12 |
+
Version: 3.4.3
|
13 |
Author: Joachim Jensen
|
14 |
Author URI: https://dev.institute
|
15 |
Text Domain: content-aware-sidebars
|
17 |
License: GPLv3
|
18 |
|
19 |
Content Aware Sidebars Plugin
|
20 |
+
Copyright (C) 2011-2017 Joachim Jensen - jv@intox.dk
|
21 |
|
22 |
This program is free software: you can redistribute it and/or modify
|
23 |
it under the terms of the GNU General Public License as published by
|
46 |
// Load dependencies
|
47 |
$cas_dir_path = plugin_dir_path( __FILE__ );
|
48 |
|
49 |
+
require($cas_dir_path.'lib/wp-content-aware-engine/bootstrap.php');
|
50 |
require($cas_dir_path.'app.php');
|
51 |
|
52 |
if(is_admin()) {
|
53 |
require($cas_dir_path.'lib/wp-db-updater/wp-db-updater.php');
|
54 |
require($cas_dir_path.'lib/wp-pointer-tour/wp-pointer-tour.php');
|
55 |
require($cas_dir_path.'admin/db-updates.php');
|
56 |
+
require($cas_dir_path.'admin/admin.php');
|
57 |
require($cas_dir_path.'admin/post_type_sidebar.php');
|
58 |
+
require($cas_dir_path.'admin/sidebar-list-table.php');
|
59 |
require($cas_dir_path.'admin/sidebar-overview.php');
|
60 |
require($cas_dir_path.'admin/sidebar-edit.php');
|
61 |
+
require($cas_dir_path.'admin/screen_widgets.php');
|
62 |
}
|
63 |
|
64 |
require($cas_dir_path.'sidebar.php');
|
78 |
CAS_App::instance()->manager()->manual_sidebar($args);
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
|
css/flatpickr.dark.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.flatpickr-calendar{background:transparent;overflow:hidden;max-height:0;opacity:0;visibility:hidden;text-align:center;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:293.75px;box-sizing:border-box;-webkit-transition:top .1s cubic-bezier(0,1,.5,1);transition:top .1s cubic-bezier(0,1,.5,1);z-index:99999999;background:rgba(35,40,60,.95);box-shadow:1px 0 0 #23283c,-1px 0 0 #23283c,0 1px 0 #23283c,0 -1px 0 #23283c,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;visibility:visible;overflow:visible;max-height:640px}.flatpickr-calendar.open{display:inline-block;-webkit-animation:flatpickrFadeInDown .3s cubic-bezier(0,1,.5,1);animation:flatpickrFadeInDown .3s cubic-bezier(0,1,.5,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:relative;top:2px}.flatpickr-calendar.static.open{display:block}.flatpickr-calendar.hasWeeks{width:auto}.flatpickr-calendar.dateIsPicked.hasTime .flatpickr-time{height:40px;border-top:1px solid #23283c}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#23283c}.flatpickr-calendar.arrowTop:after{border-bottom-color:rgba(35,40,60,.95)}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#23283c}.flatpickr-calendar.arrowBottom:after{border-top-color:rgba(35,40,60,.95)}.flatpickr-month{background:transparent;color:#fff;fill:#fff;height:28px;line-height:24px;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flatpickr-next-month,.flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:10px;height:16px;line-height:16px}.flatpickr-next-month i,.flatpickr-prev-month i{position:relative}.flatpickr-next-month.flatpickr-prev-month,.flatpickr-prev-month.flatpickr-prev-month{left:calc(3.57% - 1.5px)}.flatpickr-next-month.flatpickr-next-month,.flatpickr-prev-month.flatpickr-next-month{right:calc(3.57% - 1.5px)}.flatpickr-next-month:hover,.flatpickr-prev-month:hover{color:#eee}.flatpickr-next-month:hover svg,.flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-next-month svg,.flatpickr-prev-month svg{width:14px}.flatpickr-next-month svg path,.flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid hsla(0,0%,100%,.05);box-sizing:border-box}.numInputWrapper span:hover{background:hsla(48,26%,81%,.1)}.numInputWrapper span:active{background:hsla(48,26%,81%,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute;top:33%}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid hsla(0,0%,100%,.6)}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid hsla(0,0%,100%,.6)}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:hsla(0,0%,100%,.5)}.numInputWrapper:hover{background:hsla(48,26%,81%,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;top:5px;display:inline-block;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;padding-left:7px}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:#fff}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:#fff}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:default;padding:0 0 0 .5ch;margin:0;display:inline;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:hsla(0,0%,100%,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden}.flatpickr-days,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{padding:0 2.375px;outline:0;text-align:left;width:293.75px;box-sizing:border-box;display:inline-block;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;box-sizing:border-box;color:hsla(0,0%,100%,.95);cursor:pointer;font-weight:400;width:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:38px;height:38px;line-height:38px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:rgba(73,84,126,.95);border-color:rgba(73,84,126,.95)}.flatpickr-day.today{border-color:#eee}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#eee;background:#eee;color:#23283c}.flatpickr-day.endRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#2f87ff;color:#fff;border-color:#2f87ff}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.inRange{border-radius:0;box-shadow:-3.75px 0 0 rgba(73,84,126,.95),3.75px 0 0 rgba(73,84,126,.95)}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{pointer-events:none}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:hsla(0,0%,100%,.3);background:transparent;border-color:transparent;cursor:default}span.flatpickr-weekday{cursor:default;font-size:90%;color:hsla(0,0%,100%,.54);height:27.166666666666668px;line-height:24px;background:transparent;text-align:center;display:block;float:left;width:14.28%;font-weight:700;margin:0;padding-top:3.166666666666667px}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:1px 12px 0;box-shadow:1px 0 0 #23283c}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%}.flatpickr-weekwrapper span.flatpickr-day{display:block;width:100%;max-width:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-ms-flexbox;display:flex;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;-webkit-transition:height .33s cubic-bezier(0,1,.5,1);transition:height .33s cubic-bezier(0,1,.5,1);display:-webkit-box;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-ms-flex:1;flex:1 1 0%;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:hsla(0,0%,100%,.95)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:hsla(0,0%,100%,.95)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;cursor:pointer;color:hsla(0,0%,100%,.95);font-size:14px;position:relative;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:hsla(0,0%,100%,.95);font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover{background:rgba(80,93,139,.95)}.hasTime .flatpickr-days,.hasWeeks .flatpickr-days{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.hasWeeks .flatpickr-days{border-left:0}@media (-ms-high-contrast:none){.flatpickr-month{padding:0}.flatpickr-month svg{top:0!important}}@-webkit-keyframes flatpickrFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes flatpickrFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:none;transform:none}}
|
css/icon.png
ADDED
Binary file
|
css/style.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
/*!
|
2 |
-
* @package Content Aware Sidebars
|
3 |
-
* @author Joachim Jensen <jv@intox.dk>
|
4 |
-
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
-
|
1 |
+
/*!
|
2 |
+
* @package Content Aware Sidebars
|
3 |
+
* @author Joachim Jensen <jv@intox.dk>
|
4 |
+
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
+
*/#cas-rules .cas-heart{color:#ac170a}.cas-section{display:none}.nav-tab-active:focus{box-shadow:none}#submitdiv .hndle,#submitdiv .handlediv{display:none}#submitdiv .cas-save{background:#f5f5f5;border-bottom:1px solid #ddd;overflow:hidden;padding:7px 10px}#submitdiv .cas-overview-actions{padding:0 10px}#submitdiv .cas-overview-actions .dashicons{color:#82878c}#submitdiv .cas-overview-actions li{margin-bottom:14px}.cas-pro-label{background-color:#31c455;border-radius:5px;color:#fff;padding:3px 8px 3px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}a.cas-delete{color:#a00;text-decoration:none}a.cas-delete:hover{color:red}.cas-schedule-slide.ui-slider{position:relative;margin:12px;border-radius:4px;background:#c5c5c5;color:#333}.cas-schedule-slide.ui-slider .ui-slider-handle{position:absolute;z-index:2;height:24px;width:24px;-ms-touch-action:none;touch-action:none;text-align:center;border-radius:12px;transition:background 200ms ease}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-default{border:1px solid #c5c5c5;background:#fff;box-shadow:0 0 0 9px #fff inset,0 1px 2px rgba(0,0,0,.15)}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-active{background:#7ad03a}.cas-schedule-slide.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background:#7ad03a}.cas-schedule-slide.ui-slider.ui-state-disabled{opacity:.35;cursor:default!important;pointer-events:none}.cas-schedule-slide.ui-slider.ui-slider-horizontal{height:4px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-handle{margin-left:-12px;top:-12px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-max{right:0}.button.button-cas-upgrade{background:#dd1d0c;color:#fff;border-color:#ac170a;font-weight:700;box-shadow:0 0 0 1px rgba(255,255,255,.3) inset,0 1px 0 #ac170a}.button.button-cas-upgrade:hover{color:#fff;border-color:#ac170a;background:#eb5c50}.button.button-cas-upgrade:active,.button.button-cas-upgrade:focus{color:#fff;background:#dd1d0c;border-color:#ac170a;box-shadow:inset 0 2px 0 #ac170a;vertical-align:top}#cas-plugin-links.postbox{background-color:#ddecf4;border-color:#9fcadf;box-shadow:0 0 0 1px #fff inset,0 1px 1px rgba(0,0,0,.04)}#cas-plugin-links .hndle{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-widgets{width:8%}.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-handle{width:25%}.wp-list-table.fixed .column-status{width:12%}.widget-liquid-right .widgets-holder-wrap .cas-settings{border-top:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf;background-color:#f7f7f7;margin-left:-8px;margin-right:-8px;margin-bottom:10px;overflow:hidden}.widget-liquid-right .widgets-holder-wrap .sidebar-status{margin:10px 10px 0;float:right;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input{display:none}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-label{display:block;overflow:hidden;cursor:pointer;height:16px;padding:0;line-height:16px;border-radius:16px;background-color:#dc3232;box-shadow:0 0 2px rgba(0,0,0,.2) inset;transition:background-color .2s ease-in}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-label:before{content:"";display:block;width:12px;height:12px;margin:0;background:#FFF;position:absolute;top:2px;bottom:0;right:14px;border-radius:16px;transition:right .2s ease-in 0s;box-shadow:0 1px 2px rgba(0,0,0,.2)}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-left:1px solid #dfdfdf;border-right:1px solid #dfdfdf;padding:8px 10px;color:#444;text-decoration:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{color:#2ea2cc}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:first-of-type{border:0}.widget-liquid-right .widgets-holder-wrap.closed .cas-settings{display:none}.widget-liquid-right .widgets-holder-wrap div[id^=ca-sidebar]{box-shadow:inset 0 4px 0 #75d7ef}.cas-form-table tr td:first-child{min-width:30%}.cas-schedule-days{text-transform:uppercase;overflow:hidden;display:inline-block;border:1px solid #dfdfdf;margin:0;border-radius:3px}.cas-schedule-days li{float:left;margin:0}.cas-schedule-days input{display:none}.cas-schedule-days label{transition:background 200ms;background:#0085BA;display:block;padding:8px 12px;color:#fff}.cas-schedule-days label:hover{background:#007aab}.cas-schedule-days input:checked+label{color:inherit;background:#f1f1f1}.cas-schedule-days input:checked+label:hover{background:#e9e9e9}.cas-filter-sidebar{margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 16px 0 0;float:right;display:inline-block}.cas-filter-sidebar .button,.cas-filter-sidebar input{margin:12px 0 11px}.cas-filter-sidebar input{float:right}.cas-filter-widget{margin:10px 0}body.branch-3-9 .cas-filter-sidebar.wp-filter{background:#fff none repeat scroll 0 0;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;color:#555;display:inline-block;font-size:13px;margin:9pt 0 25px;padding:0 10px;position:relative;width:100%}body.branch-3-9 .cas-filter-sidebar.wp-filter input{padding:3px 5px;line-height:initial}body.branch-3-9 .cas-filter-widget{padding:3px 5px;line-height:initial}
|
freemius.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* @package Content Aware Sidebars
|
5 |
* @author Joachim Jensen <jv@intox.dk>
|
6 |
* @license GPLv3
|
7 |
-
* @copyright
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'CAS_App::PLUGIN_VERSION' ) ) {
|
@@ -29,7 +29,7 @@ function cas_fs()
|
|
29 |
'has_addons' => false,
|
30 |
'has_paid_plans' => true,
|
31 |
'menu' => array(
|
32 |
-
'slug' => '
|
33 |
'support' => false,
|
34 |
),
|
35 |
'is_live' => true,
|
@@ -61,25 +61,6 @@ function cas_fs_connect_message_update(
|
|
61 |
);
|
62 |
}
|
63 |
|
64 |
-
function cas_fs_connect_message(
|
65 |
-
$message,
|
66 |
-
$user_first_name,
|
67 |
-
$plugin_title,
|
68 |
-
$user_login,
|
69 |
-
$site_link,
|
70 |
-
$freemius_link
|
71 |
-
)
|
72 |
-
{
|
73 |
-
return sprintf(
|
74 |
-
__fs( 'hey-x' ) . '<br>' . __( 'To get the most out of this plugin, %2$s needs to connect your user, %3$s at %4$s, to %5$s.', 'content-aware-sidebars' ),
|
75 |
-
$user_first_name,
|
76 |
-
'<b>' . $plugin_title . '</b>',
|
77 |
-
'<b>' . $user_login . '</b>',
|
78 |
-
$site_link,
|
79 |
-
$freemius_link
|
80 |
-
);
|
81 |
-
}
|
82 |
-
|
83 |
$cas_fs->add_filter(
|
84 |
'connect_message_on_update',
|
85 |
'cas_fs_connect_message_update',
|
@@ -88,7 +69,7 @@ $cas_fs->add_filter(
|
|
88 |
);
|
89 |
$cas_fs->add_filter(
|
90 |
'connect_message',
|
91 |
-
'
|
92 |
10,
|
93 |
6
|
94 |
);
|
4 |
* @package Content Aware Sidebars
|
5 |
* @author Joachim Jensen <jv@intox.dk>
|
6 |
* @license GPLv3
|
7 |
+
* @copyright 2017 by Joachim Jensen
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'CAS_App::PLUGIN_VERSION' ) ) {
|
29 |
'has_addons' => false,
|
30 |
'has_paid_plans' => true,
|
31 |
'menu' => array(
|
32 |
+
'slug' => 'wpcas',
|
33 |
'support' => false,
|
34 |
),
|
35 |
'is_live' => true,
|
61 |
);
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
$cas_fs->add_filter(
|
65 |
'connect_message_on_update',
|
66 |
'cas_fs_connect_message_update',
|
69 |
);
|
70 |
$cas_fs->add_filter(
|
71 |
'connect_message',
|
72 |
+
'cas_fs_connect_message_update',
|
73 |
10,
|
74 |
6
|
75 |
);
|
js/cas_admin.js
CHANGED
@@ -2,21 +2,140 @@
|
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
*/
|
7 |
|
8 |
(function($) {
|
9 |
|
10 |
var cas_options = {
|
11 |
|
12 |
-
|
|
|
13 |
|
14 |
init: function() {
|
15 |
-
|
16 |
this.addHandleListener();
|
17 |
-
this.reviewNoticeHandler();
|
18 |
this.suggestVisibility();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
|
|
|
|
|
|
20 |
},
|
21 |
|
22 |
/**
|
@@ -27,11 +146,11 @@
|
|
27 |
* @since 2.1
|
28 |
*/
|
29 |
addHandleListener: function() {
|
30 |
-
var host = $("
|
31 |
-
var code = $('<p>Shortcode:</p><code>[ca-sidebar id='
|
32 |
-
'<p>Template Tag:</p><code>ca_display_sidebar();</code>');
|
33 |
var merge_pos = $('span.merge-pos');
|
34 |
-
host.
|
35 |
$("select[name='handle']").change(function(){
|
36 |
var handle = $(this);
|
37 |
host.attr("disabled", handle.val() == 2);
|
@@ -79,37 +198,6 @@
|
|
79 |
if($elem.data('value')) {
|
80 |
$elem.val($elem.data('value').toString().split(',')).trigger('change');
|
81 |
}
|
82 |
-
},
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Handle clicks on review notice
|
86 |
-
* Sends dismiss event to backend
|
87 |
-
*
|
88 |
-
* @since 3.1
|
89 |
-
* @return {void}
|
90 |
-
*/
|
91 |
-
reviewNoticeHandler: function() {
|
92 |
-
$notice = $(".js-cas-notice-review");
|
93 |
-
$notice.on("click","a, button", function(e) {
|
94 |
-
$this = $(this);
|
95 |
-
$.ajax({
|
96 |
-
url: ajaxurl,
|
97 |
-
data:{
|
98 |
-
'action': 'cas_dismiss_review_notice',
|
99 |
-
'dismiss': $this.attr("href") ? 1 : 0
|
100 |
-
},
|
101 |
-
dataType: 'JSON',
|
102 |
-
type: 'POST',
|
103 |
-
success:function(data){
|
104 |
-
$notice.fadeOut(400,function() {
|
105 |
-
$notice.remove();
|
106 |
-
});
|
107 |
-
},
|
108 |
-
error: function(xhr, desc, e) {
|
109 |
-
console.log(xhr.responseText);
|
110 |
-
}
|
111 |
-
});
|
112 |
-
});
|
113 |
}
|
114 |
};
|
115 |
|
@@ -117,4 +205,4 @@
|
|
117 |
cas_options.init();
|
118 |
});
|
119 |
|
120 |
-
})(jQuery);
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
*/
|
7 |
|
8 |
(function($) {
|
9 |
|
10 |
var cas_options = {
|
11 |
|
12 |
+
current_section: 0,
|
13 |
+
sections: [],
|
14 |
|
15 |
init: function() {
|
16 |
+
this.tabController();
|
17 |
this.addHandleListener();
|
|
|
18 |
this.suggestVisibility();
|
19 |
+
this.initSidebarActivation();
|
20 |
+
},
|
21 |
+
|
22 |
+
initSidebarActivation: function() {
|
23 |
+
Flatpickr.l10ns.default.weekdays = CASAdmin.weekdays;
|
24 |
+
Flatpickr.l10ns.default.months = CASAdmin.months;
|
25 |
+
Flatpickr.l10ns.default.firstDayOfWeek = CASAdmin.weekStart;
|
26 |
+
|
27 |
+
var config = {
|
28 |
+
wrap: true,
|
29 |
+
clickOpens: true,
|
30 |
+
enableTime: true,
|
31 |
+
time_24hr: true,
|
32 |
+
allowInput: true,
|
33 |
+
enableSeconds: true,
|
34 |
+
altInput: true,
|
35 |
+
altFormat: CASAdmin.dateFormat + ' @ H:i:S',
|
36 |
+
minDate: null,
|
37 |
+
maxDate: null
|
38 |
+
},
|
39 |
+
activate = flatpickr('.js-cas-activation',config),
|
40 |
+
deactivate = flatpickr('.js-cas-expiry',config),
|
41 |
+
$toggle = $('.js-cas-status');
|
42 |
+
|
43 |
+
activate.config.onChange = function(dateObj, dateStr, instance) {
|
44 |
+
console.log("activate");
|
45 |
+
if(dateStr || deactivate.config.minDate) {
|
46 |
+
deactivate.set("minDate", dateStr ? new Date(dateObj).fp_incr(1) : null);
|
47 |
+
}
|
48 |
+
if(dateStr) {
|
49 |
+
$toggle.prop('checked',false);
|
50 |
+
} else if(!$toggle.is(':checked')) {
|
51 |
+
deactivate.clear();
|
52 |
+
}
|
53 |
+
};
|
54 |
+
|
55 |
+
deactivate.config.onChange = function(dateObj, dateStr, instance) {
|
56 |
+
console.log("deactivate");
|
57 |
+
if(dateStr || activate.config.maxDate) {
|
58 |
+
activate.set("maxDate", dateStr ? new Date(dateObj).fp_incr(-1) : null);
|
59 |
+
}
|
60 |
+
};
|
61 |
+
|
62 |
+
$toggle.on('change',function(e) {
|
63 |
+
if($(this).is(':checked')) {
|
64 |
+
activate.clear();
|
65 |
+
} else if(!activate.selectedDates.length) {
|
66 |
+
deactivate.clear();
|
67 |
+
}
|
68 |
+
});
|
69 |
+
},
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Initiate tabs dynamically
|
73 |
+
*
|
74 |
+
* @since 3.4
|
75 |
+
* @return {void}
|
76 |
+
*/
|
77 |
+
initTabSections: function() {
|
78 |
+
$(".js-cas-tabs").find(".nav-tab").each(function() {
|
79 |
+
var start = this.href.lastIndexOf("#");
|
80 |
+
if(start >= 0) {
|
81 |
+
var section = this.href.substr(start);
|
82 |
+
cas_options.sections.push(section);
|
83 |
+
$(section).hide();
|
84 |
+
//.find("input, select").attr("disabled",true);
|
85 |
+
}
|
86 |
+
});
|
87 |
+
},
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Manage tab clicks
|
91 |
+
*
|
92 |
+
* @since 3.4
|
93 |
+
* @return {void}
|
94 |
+
*/
|
95 |
+
tabController: function() {
|
96 |
+
this.initTabSections();
|
97 |
+
this.setCurrentSection(window.location.hash);
|
98 |
+
$("#poststuff")
|
99 |
+
.on("click",".js-nav-link",function(e) {
|
100 |
+
cas_options.setCurrentSection(this.href);
|
101 |
+
});
|
102 |
+
},
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Find section index based on
|
106 |
+
* hash in a URL string
|
107 |
+
*
|
108 |
+
* @since 3.4
|
109 |
+
* @param {string} url
|
110 |
+
* @return {int}
|
111 |
+
*/
|
112 |
+
findSectionByURL: function(url) {
|
113 |
+
var section = this.sections.indexOf(url.substring(url.lastIndexOf("#")));
|
114 |
+
return section >= 0 ? section : null;
|
115 |
+
},
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Set and display current section and tab
|
119 |
+
* hide previous current section
|
120 |
+
*
|
121 |
+
* @since 3.4
|
122 |
+
* @param {string} url
|
123 |
+
*/
|
124 |
+
setCurrentSection: function(url) {
|
125 |
+
var section = this.findSectionByURL(url) || 0,
|
126 |
+
$tabs = $(".js-cas-tabs").find(".nav-tab");
|
127 |
+
if($tabs.eq(section).is(":visible")) {
|
128 |
+
$(this.sections[this.current_section])
|
129 |
+
.hide();
|
130 |
+
//.find("input, select").attr("disabled",true);
|
131 |
+
this.current_section = section;
|
132 |
+
$(this.sections[this.current_section])
|
133 |
+
.show();
|
134 |
+
//.find("input, select").attr("disabled",false);
|
135 |
|
136 |
+
$tabs.removeClass("nav-tab-active");
|
137 |
+
$tabs.eq(this.current_section).addClass("nav-tab-active");
|
138 |
+
}
|
139 |
},
|
140 |
|
141 |
/**
|
146 |
* @since 2.1
|
147 |
*/
|
148 |
addHandleListener: function() {
|
149 |
+
var host = $("span.host");
|
150 |
+
var code = $('<div><p>Shortcode:</p><code>[ca-sidebar id='+$('#current_sidebar').val()+']</code>'+
|
151 |
+
'<p>Template Tag:</p><code>ca_display_sidebar();</code></div>');
|
152 |
var merge_pos = $('span.merge-pos');
|
153 |
+
host.after(code);
|
154 |
$("select[name='handle']").change(function(){
|
155 |
var handle = $(this);
|
156 |
host.attr("disabled", handle.val() == 2);
|
198 |
if($elem.data('value')) {
|
199 |
$elem.val($elem.data('value').toString().split(',')).trigger('change');
|
200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
};
|
203 |
|
205 |
cas_options.init();
|
206 |
});
|
207 |
|
208 |
+
})(jQuery);
|
js/cas_admin.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
/*!
|
2 |
-
* @package Content Aware Sidebars
|
3 |
-
* @author Joachim Jensen <jv@intox.dk>
|
4 |
-
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
-
*/
|
7 |
-
!function(a){var b={
|
1 |
+
/*!
|
2 |
+
* @package Content Aware Sidebars
|
3 |
+
* @author Joachim Jensen <jv@intox.dk>
|
4 |
+
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
+
*/
|
7 |
+
!function(a){var b={current_section:0,sections:[],init:function(){this.tabController(),this.addHandleListener(),this.suggestVisibility(),this.initSidebarActivation()},initSidebarActivation:function(){Flatpickr.l10ns["default"].weekdays=CASAdmin.weekdays,Flatpickr.l10ns["default"].months=CASAdmin.months,Flatpickr.l10ns["default"].firstDayOfWeek=CASAdmin.weekStart;var b={wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:!0,allowInput:!0,enableSeconds:!0,altInput:!0,altFormat:CASAdmin.dateFormat+" @ H:i:S",minDate:null,maxDate:null},c=flatpickr(".js-cas-activation",b),d=flatpickr(".js-cas-expiry",b),e=a(".js-cas-status");c.config.onChange=function(a,b){(b||d.config.minDate)&&d.set("minDate",b?new Date(a).fp_incr(1):null),b?e.prop("checked",!1):e.is(":checked")||d.clear()},d.config.onChange=function(a,b){(b||c.config.maxDate)&&c.set("maxDate",b?new Date(a).fp_incr(-1):null)},e.on("change",function(){a(this).is(":checked")?c.clear():c.selectedDates.length||d.clear()})},initTabSections:function(){a(".js-cas-tabs").find(".nav-tab").each(function(){var c=this.href.lastIndexOf("#");if(c>=0){var d=this.href.substr(c);b.sections.push(d),a(d).hide()}})},tabController:function(){this.initTabSections(),this.setCurrentSection(window.location.hash),a("#poststuff").on("click",".js-nav-link",function(){b.setCurrentSection(this.href)})},findSectionByURL:function(a){var b=this.sections.indexOf(a.substring(a.lastIndexOf("#")));return b>=0?b:null},setCurrentSection:function(b){var c=this.findSectionByURL(b)||0,d=a(".js-cas-tabs").find(".nav-tab");d.eq(c).is(":visible")&&(a(this.sections[this.current_section]).hide(),this.current_section=c,a(this.sections[this.current_section]).show(),d.removeClass("nav-tab-active"),d.eq(this.current_section).addClass("nav-tab-active"))},addHandleListener:function(){var b=a("span.host"),c=a("<div><p>Shortcode:</p><code>[ca-sidebar id="+a("#current_sidebar").val()+"]</code><p>Template Tag:</p><code>ca_display_sidebar();</code></div>"),d=a("span.merge-pos");b.after(c),a("select[name='handle']").change(function(){var e=a(this);b.attr("disabled",2==e.val()),2==e.val()?(b.hide(),c.show()):(b.show(),c.hide()),3==e.val()?d.hide():d.show()}).change()},suggestVisibility:function(){var b=a(".js-cas-visibility");b.select2({theme:"wpca",placeholder:CASAdmin.allVisibility,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,nextSearchTerm:function(a,b){return b},data:CASAdmin.visibility}).on("select2:selecting",function(){b.data("forceOpen",!0)}).on("select2:close",function(a){b.data("forceOpen")&&(a.preventDefault(),b.select2("open"),b.data("forceOpen",!1))}),b.data("value")&&b.val(b.data("value").toString().split(",")).trigger("change")}};a(document).ready(function(){b.init()})}(jQuery);
|
js/flatpickr.min.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! flatpickr v2.3.4, @license MIT */
|
2 |
+
function Flatpickr(e,t){function n(){e._flatpickr&&C(e._flatpickr),e._flatpickr=ae,ae.element=e,ae.instanceConfig=t||{},B(),N(),F(),J(),W(),U(),ae.isOpen=ae.config.inline,ae.changeMonth=b,ae.clear=w,ae.close=y,ae.destroy=C,ae.formatDate=E,ae.jumpToDate=s,ae.open=S,ae.redraw=H,ae.set=P,ae.setDate=R,ae.toggle=K,ae.isMobile=!ae.config.disableMobile&&!ae.config.inline&&"single"===ae.config.mode&&!ae.config.disable.length&&!ae.config.enable.length&&!ae.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ae.isMobile||f(),c(),ae.isMobile||Object.defineProperty(ae,"dateIsPicked",{set:function(e){return e?ae.calendarContainer.classList.add("dateIsPicked"):void ae.calendarContainer.classList.remove("dateIsPicked")}}),ae.dateIsPicked=ae.selectedDates.length>0||ae.config.noCalendar,ae.selectedDates.length&&(ae.config.enableTime&&r(),G()),ae.config.weekNumbers&&(ae.calendarContainer.style.width=ae.days.clientWidth+ae.weekWrapper.clientWidth+"px"),q("Ready")}function a(e){ae.config.noCalendar&&!ae.selectedDates.length&&(ae.selectedDates=[ae.now]),ne(e),ae.selectedDates.length&&(!ae.minDateHasTime||"input"!==e.type||e.target.value.length>=2?(i(),G()):setTimeout(function(){i(),G()},1e3))}function i(){if(ae.config.enableTime){var e=parseInt(ae.hourElement.value,10)||0,t=parseInt(ae.minuteElement.value,10)||0,n=ae.config.enableSeconds?parseInt(ae.secondElement.value,10)||0:0;ae.amPM&&(e=e%12+12*("PM"===ae.amPM.textContent)),ae.minDateHasTime&&0===te(ae.latestSelectedDateObj,ae.config.minDate)?(e=Math.max(e,ae.config.minDate.getHours()),e===ae.config.minDate.getHours()&&(t=Math.max(t,ae.config.minDate.getMinutes()))):ae.maxDateHasTime&&0===te(ae.latestSelectedDateObj,ae.config.maxDate)&&(e=Math.min(e,ae.config.maxDate.getHours()),e===ae.config.maxDate.getHours()&&(t=Math.min(t,ae.config.maxDate.getMinutes()))),o(e,t,n)}}function r(e){var t=e||ae.latestSelectedDateObj;t&&o(t.getHours(),t.getMinutes(),t.getSeconds())}function o(e,t,n){ae.selectedDates.length&&ae.latestSelectedDateObj.setHours(e%24,t,n||0,0),ae.config.enableTime&&!ae.isMobile&&(ae.hourElement.value=ae.pad(ae.config.time_24hr?e:(12+e)%12+12*(e%12===0)),ae.minuteElement.value=ae.pad(t),!ae.config.time_24hr&&ae.selectedDates.length&&(ae.amPM.textContent=ae.latestSelectedDateObj.getHours()>=12?"PM":"AM"),ae.config.enableSeconds&&(ae.secondElement.value=ae.pad(n)))}function l(e){4===e.target.value.length&&(ae.currentYearElement.blur(),x(e.target.value),e.target.value=ae.currentYear)}function c(){return ae.config.wrap&&["open","close","toggle","clear"].forEach(function(e){try{ae.element.querySelector("[data-"+e+"]").addEventListener("click",ae[e])}catch(e){}}),void 0!==window.document.createEvent&&(ae.changeEvent=window.document.createEvent("HTMLEvents"),ae.changeEvent.initEvent("change",!1,!0)),ae.isMobile?z():(ae.debouncedResize=ee(Y,50),ae.triggerChange=function(){q("Change")},ae.debouncedChange=ee(ae.triggerChange,300),"range"===ae.config.mode&&ae.days&&ae.days.addEventListener("mouseover",L),window.document.addEventListener("keydown",I),ae.config.inline||ae.config.static||window.addEventListener("resize",ae.debouncedResize),window.ontouchstart&&window.document.addEventListener("touchstart",k),window.document.addEventListener("click",k),window.document.addEventListener("blur",k),ae.config.clickOpens&&(ae.altInput||ae.input).addEventListener("focus",S),ae.config.noCalendar||(ae.prevMonthNav.addEventListener("click",function(){return b(-1)}),ae.nextMonthNav.addEventListener("click",function(){return b(1)}),ae.currentYearElement.addEventListener("wheel",function(e){return ee(X(e),50)}),ae.currentYearElement.addEventListener("focus",function(){ae.currentYearElement.select()}),ae.currentYearElement.addEventListener("input",l),ae.currentYearElement.addEventListener("increment",l),ae.days.addEventListener("click",_)),void(ae.config.enableTime&&(ae.timeContainer.addEventListener("transitionend",j),ae.timeContainer.addEventListener("wheel",function(e){return ee(a(e),5)}),ae.timeContainer.addEventListener("input",a),ae.timeContainer.addEventListener("increment",a),ae.timeContainer.addEventListener("increment",ae.debouncedChange),ae.timeContainer.addEventListener("wheel",ae.debouncedChange),ae.timeContainer.addEventListener("input",ae.triggerChange),ae.hourElement.addEventListener("focus",function(){ae.hourElement.select()}),ae.minuteElement.addEventListener("focus",function(){ae.minuteElement.select()}),ae.secondElement&&ae.secondElement.addEventListener("focus",function(){ae.secondElement.select()}),ae.amPM&&ae.amPM.addEventListener("click",function(e){a(e),ae.triggerChange(e)}))))}function s(e){e=e?ae.parseDate(e):ae.latestSelectedDateObj||(ae.config.minDate>ae.now?ae.config.minDate:ae.config.maxDate&&ae.config.maxDate<ae.now?ae.config.maxDate:ae.now);try{ae.currentYear=e.getFullYear(),ae.currentMonth=e.getMonth()}catch(t){console.error(t.stack),console.warn("Invalid date supplied: "+e)}ae.redraw()}function d(e,t){var n=e.target.parentNode.childNodes[0];n.value=parseInt(n.value,10)+t*(n.step||1);try{n.dispatchEvent(new Event("increment",{bubbles:!0}))}catch(e){var a=window.document.createEvent("CustomEvent");a.initCustomEvent("increment",!0,!0,{}),n.dispatchEvent(a)}}function u(e){var t=Z("div","numInputWrapper"),n=Z("input","numInput "+e),a=Z("span","arrowUp"),i=Z("span","arrowDown");return n.type="text",t.appendChild(n),t.appendChild(a),t.appendChild(i),a.addEventListener("click",function(e){return d(e,1)}),i.addEventListener("click",function(e){return d(e,-1)}),t}function f(){var e=window.document.createDocumentFragment();ae.calendarContainer=Z("div","flatpickr-calendar"),ae.numInputType=navigator.userAgent.indexOf("MSIE 9.0")>0?"text":"number",ae.config.noCalendar||(e.appendChild(g()),ae.innerContainer=Z("div","flatpickr-innerContainer"),ae.config.weekNumbers&&ae.innerContainer.appendChild(v()),ae.rContainer=Z("div","flatpickr-rContainer"),ae.rContainer.appendChild(D()),ae.rContainer.appendChild(m()),ae.innerContainer.appendChild(ae.rContainer),e.appendChild(ae.innerContainer)),ae.config.enableTime&&e.appendChild(h()),"range"===ae.config.mode&&ae.calendarContainer.classList.add("rangeMode"),ae.calendarContainer.appendChild(e),ae.config.inline||ae.config.static?(ae.calendarContainer.classList.add(ae.config.inline?"inline":"static"),j(),ae.config.appendTo&&ae.config.appendTo.nodeType?ae.config.appendTo.appendChild(ae.calendarContainer):ae.element.parentNode.insertBefore(ae.calendarContainer,(ae.altInput||ae.input).nextSibling)):window.document.body.appendChild(ae.calendarContainer)}function p(e,t,n){var a=T(t,!0),i=Z("span","flatpickr-day "+e,t.getDate());return i.dateObj=t,0===te(t,ae.now)&&i.classList.add("today"),a?(i.tabIndex=0,V(t)&&(i.classList.add("selected"),"range"===ae.config.mode?i.classList.add(0===te(t,ae.selectedDates[0])?"startRange":"endRange"):ae.selectedDateElem=i)):(i.classList.add("disabled"),ae.selectedDates[0]&&t>ae.minRangeDate&&t<ae.selectedDates[0]?ae.minRangeDate=t:ae.selectedDates[0]&&t<ae.maxRangeDate&&t>ae.selectedDates[0]&&(ae.maxRangeDate=t)),"range"===ae.config.mode&&($(t)&&!V(t)&&i.classList.add("inRange"),1===ae.selectedDates.length&&(t<ae.minRangeDate||t>ae.maxRangeDate)&&i.classList.add("notAllowed")),ae.config.weekNumbers&&"prevMonthDay"!==e&&n%7===1&&ae.weekNumbers.insertAdjacentHTML("beforeend","<span class='disabled flatpickr-day'>"+ae.config.getWeek(t)+"</span>"),q("DayCreate",i),i}function m(){ae.days||(ae.days=Z("div","flatpickr-days"),ae.days.tabIndex=-1),ae.firstOfMonth=(new Date(ae.currentYear,ae.currentMonth,1).getDay()-ae.l10n.firstDayOfWeek+7)%7,ae.prevMonthDays=ae.utils.getDaysinMonth((ae.currentMonth-1+12)%12);var e=ae.utils.getDaysinMonth(),t=window.document.createDocumentFragment(),n=ae.prevMonthDays+1-ae.firstOfMonth;ae.config.weekNumbers&&ae.weekNumbers.firstChild&&(ae.weekNumbers.textContent=""),"range"===ae.config.mode&&(ae.minRangeDate=new Date(ae.currentYear,ae.currentMonth-1,n),ae.maxRangeDate=new Date(ae.currentYear,ae.currentMonth+1,(42-ae.firstOfMonth)%e)),ae.days.firstChild&&(ae.days.textContent="");for(var a=0;n<=ae.prevMonthDays;a++,n++)t.appendChild(p("prevMonthDay",new Date(ae.currentYear,ae.currentMonth-1,n),n));for(n=1;n<=e;n++)t.appendChild(p("",new Date(ae.currentYear,ae.currentMonth,n),n));for(var i=e+1;i<=42-ae.firstOfMonth;i++)t.appendChild(p("nextMonthDay",new Date(ae.currentYear,ae.currentMonth+1,i%e),i));return ae.days.appendChild(t),ae.days}function g(){var e=window.document.createDocumentFragment();ae.monthNav=Z("div","flatpickr-month"),ae.prevMonthNav=Z("span","flatpickr-prev-month"),ae.prevMonthNav.innerHTML=ae.config.prevArrow,ae.currentMonthElement=Z("span","cur-month");var t=u("cur-year");return ae.currentYearElement=t.childNodes[0],ae.currentYearElement.title=ae.l10n.scrollTitle,ae.config.minDate&&(ae.currentYearElement.min=ae.config.minDate.getFullYear()),ae.config.maxDate&&(ae.currentYearElement.max=ae.config.maxDate.getFullYear(),ae.currentYearElement.disabled=ae.config.minDate&&ae.config.minDate.getFullYear()===ae.config.maxDate.getFullYear()),ae.nextMonthNav=Z("span","flatpickr-next-month"),ae.nextMonthNav.innerHTML=ae.config.nextArrow,ae.navigationCurrentMonth=Z("span","flatpickr-current-month"),ae.navigationCurrentMonth.appendChild(ae.currentMonthElement),ae.navigationCurrentMonth.appendChild(t),e.appendChild(ae.prevMonthNav),e.appendChild(ae.navigationCurrentMonth),e.appendChild(ae.nextMonthNav),ae.monthNav.appendChild(e),Q(),ae.monthNav}function h(){ae.calendarContainer.classList.add("hasTime"),ae.config.noCalendar&&ae.calendarContainer.classList.add("noCalendar"),ae.timeContainer=Z("div","flatpickr-time"),ae.timeContainer.tabIndex=-1;var e=Z("span","flatpickr-time-separator",":"),t=u("flatpickr-hour");ae.hourElement=t.childNodes[0];var n=u("flatpickr-minute");if(ae.minuteElement=n.childNodes[0],ae.hourElement.tabIndex=ae.minuteElement.tabIndex=0,ae.hourElement.pattern=ae.minuteElement.pattern="\\d*",ae.hourElement.value=ae.pad(ae.latestSelectedDateObj?ae.latestSelectedDateObj.getHours():ae.config.defaultHour),ae.minuteElement.value=ae.pad(ae.latestSelectedDateObj?ae.latestSelectedDateObj.getMinutes():ae.config.defaultMinute),ae.hourElement.step=ae.config.hourIncrement,ae.minuteElement.step=ae.config.minuteIncrement,ae.hourElement.min=ae.config.time_24hr?0:1,ae.hourElement.max=ae.config.time_24hr?23:12,ae.minuteElement.min=0,ae.minuteElement.max=59,ae.hourElement.title=ae.minuteElement.title=ae.l10n.scrollTitle,ae.timeContainer.appendChild(t),ae.timeContainer.appendChild(e),ae.timeContainer.appendChild(n),ae.config.time_24hr&&ae.timeContainer.classList.add("time24hr"),ae.config.enableSeconds){ae.timeContainer.classList.add("hasSeconds");var a=u("flatpickr-second");ae.secondElement=a.childNodes[0],ae.secondElement.pattern=ae.hourElement.pattern,ae.secondElement.value=ae.latestSelectedDateObj?ae.pad(ae.latestSelectedDateObj.getSeconds()):"00",ae.secondElement.step=ae.minuteElement.step,ae.secondElement.min=ae.minuteElement.min,ae.secondElement.max=ae.minuteElement.max,ae.timeContainer.appendChild(Z("span","flatpickr-time-separator",":")),ae.timeContainer.appendChild(a)}return ae.config.time_24hr||(ae.amPM=Z("span","flatpickr-am-pm",["AM","PM"][ae.hourElement.value>11|0]),ae.amPM.title=ae.l10n.toggleTitle,ae.amPM.tabIndex=0,ae.timeContainer.appendChild(ae.amPM)),ae.timeContainer}function D(){ae.weekdayContainer||(ae.weekdayContainer=Z("div","flatpickr-weekdays"));var e=ae.l10n.firstDayOfWeek,t=ae.l10n.weekdays.shorthand.slice();return e>0&&e<t.length&&(t=[].concat(t.splice(e,t.length),t.splice(0,e))),ae.weekdayContainer.innerHTML="\n\t\t<span class=flatpickr-weekday>\n\t\t\t"+t.join("</span><span class=flatpickr-weekday>")+"\n\t\t</span>\n\t\t",ae.weekdayContainer}function v(){return ae.calendarContainer.classList.add("hasWeeks"),ae.weekWrapper=Z("div","flatpickr-weekwrapper"),ae.weekWrapper.appendChild(Z("span","flatpickr-weekday",ae.l10n.weekAbbreviation)),ae.weekNumbers=Z("div","flatpickr-weeks"),ae.weekWrapper.appendChild(ae.weekNumbers),ae.weekWrapper}function b(e,t){ae.currentMonth="undefined"==typeof t||t?ae.currentMonth+e:e,x(),Q(),m(),ae.config.noCalendar||ae.days.focus(),q("MonthChange")}function w(e){ae.input.value="",ae.altInput&&(ae.altInput.value=""),ae.mobileInput&&(ae.mobileInput.value=""),ae.selectedDates=[],ae.latestSelectedDateObj=null,ae.dateIsPicked=!1,ae.redraw(),e!==!1&&q("Change")}function y(){ae.isOpen=!1,ae.isMobile||(ae.calendarContainer.classList.remove("open"),(ae.altInput||ae.input).classList.remove("active")),q("Close")}function C(e){e=e||ae,e.clear(!1),window.document.removeEventListener("keydown",I),window.removeEventListener("resize",e.debouncedResize),window.document.removeEventListener("click",k),window.document.removeEventListener("touchstart",k),window.document.removeEventListener("blur",k),e.timeContainer&&e.timeContainer.removeEventListener("transitionend",j),e.mobileInput&&e.mobileInput.parentNode?e.mobileInput.parentNode.removeChild(e.mobileInput):e.calendarContainer&&e.calendarContainer.parentNode&&e.calendarContainer.parentNode.removeChild(e.calendarContainer),e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput)),e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeEventListener("focus",S),e.input.removeAttribute("readonly"),delete e.input._flatpickr}function M(e){for(var t=e;t;){if(/flatpickr-day|flatpickr-calendar/.test(t.className))return!0;t=t.parentNode}return!1}function k(e){var t=ae.element.contains(e.target)||e.target===ae.input||e.target===ae.altInput||e.path&&(~e.path.indexOf(ae.input)||~e.path.indexOf(ae.altInput));!ae.isOpen||ae.config.inline||M(e.target)||t||(e.preventDefault(),ae.close(),"range"===ae.config.mode&&1===ae.selectedDates.length&&(ae.clear(),ae.redraw()))}function E(e,t){if(ae.config.formatDate)return ae.config.formatDate(e,t);var n=e.split("");return n.map(function(e,a){return ae.formats[e]&&"\\"!==n[a-1]?ae.formats[e](t):"\\"!==e?e:""}).join("")}function x(e){ae.currentMonth<0||ae.currentMonth>11?(ae.currentYear+=ae.currentMonth%11,ae.currentMonth=(ae.currentMonth+12)%12,q("YearChange")):e&&(!ae.currentYearElement.min||e>=ae.currentYearElement.min)&&(!ae.currentYearElement.max||e<=ae.currentYearElement.max)&&(ae.currentYear=parseInt(e,10)||ae.currentYear,ae.config.maxDate&&ae.currentYear===ae.config.maxDate.getFullYear()?ae.currentMonth=Math.min(ae.config.maxDate.getMonth(),ae.currentMonth):ae.config.minDate&&ae.currentYear===ae.config.minDate.getFullYear()&&(ae.currentMonth=Math.max(ae.config.minDate.getMonth(),ae.currentMonth)),ae.redraw(),q("YearChange"))}function T(e,t){var n=te(e,ae.config.minDate,"undefined"!=typeof t?t:!ae.minDateHasTime)<0,a=te(e,ae.config.maxDate,"undefined"!=typeof t?t:!ae.maxDateHasTime)>0;if(n||a)return!1;if(!ae.config.enable.length&&!ae.config.disable.length)return!0;for(var i,r=ae.parseDate(e,!0),o=ae.config.enable.length>0,l=o?ae.config.enable:ae.config.disable,c=0;c<l.length;c++){if(i=l[c],i instanceof Function&&i(r))return o;if(i instanceof Date&&i.getTime()===r.getTime())return o;if("string"==typeof i&&ae.parseDate(i,!0).getTime()===r.getTime())return o;if("object"===("undefined"==typeof i?"undefined":_typeof(i))&&i.from&&i.to&&r>=i.from&&r<=i.to)return o}return!o}function I(e){if(ae.isOpen)switch(e.which){case 13:ae.timeContainer&&ae.timeContainer.contains(e.target)?G():_(e);break;case 27:ae.clear(),ae.redraw(),ae.close();break;case 37:e.target!==ae.input&e.target!==ae.altInput&&b(-1);break;case 38:e.preventDefault(),ae.timeContainer&&ae.timeContainer.contains(e.target)?a(e):(ae.currentYear++,ae.redraw());break;case 39:e.target!==ae.input&e.target!==ae.altInput&&b(1);break;case 40:e.preventDefault(),ae.timeContainer&&ae.timeContainer.contains(e.target)?a(e):(ae.currentYear--,ae.redraw())}}function L(e){if(1===ae.selectedDates.length&&e.target.classList.contains("flatpickr-day")){for(var t=e.target.dateObj,n=ae.parseDate(ae.selectedDates[0],!0),a=Math.min(t.getTime(),ae.selectedDates[0].getTime()),i=Math.max(t.getTime(),ae.selectedDates[0].getTime()),r=!1,o=a;o<i;o+=ae.utils.duration.DAY)if(!T(new Date(o))){r=!0;break}for(var l=ae.days.childNodes[0].dateObj.getTime(),c=0;c<42;c++,l+=ae.utils.duration.DAY){var s=l<ae.minRangeDate.getTime()||l>ae.maxRangeDate.getTime();if(s)ae.days.childNodes[c].classList.add("notAllowed"),ae.days.childNodes[c].classList.remove("inRange","startRange","endRange");else if(!r||s){ae.days.childNodes[c].classList.remove("startRange","inRange","endRange","notAllowed");var d=Math.max(ae.minRangeDate.getTime(),a),u=Math.min(ae.maxRangeDate.getTime(),i);e.target.classList.add(t<ae.selectedDates[0]?"startRange":"endRange"),n>t&&l===n.getTime()?ae.days.childNodes[c].classList.add("endRange"):n<t&&l===n.getTime()?ae.days.childNodes[c].classList.add("startRange"):l>d&&l<u&&ae.days.childNodes[c].classList.add("inRange")}}}}function Y(){!ae.isOpen||ae.config.static||ae.config.inline||j()}function S(e){return ae.isMobile?(e&&(e.preventDefault(),e.target.blur()),setTimeout(function(){ae.mobileInput.click()},0),void q("Open")):void(ae.isOpen||(ae.altInput||ae.input).disabled||ae.config.inline||(ae.calendarContainer.classList.add("open"),ae.config.static||ae.config.inline||j(),ae.isOpen=!0,ae.config.allowInput||((ae.altInput||ae.input).blur(),(ae.config.noCalendar?ae.timeContainer:ae.selectedDateElem?ae.selectedDateElem:ae.days).focus()),(ae.altInput||ae.input).classList.add("active"),q("Open")))}function O(e){return function(t){var n=ae.config["_"+e+"Date"]=ae.parseDate(t),a=ae.config["_"+("min"===e?"max":"min")+"Date"];ae.selectedDates&&(ae.selectedDates=ae.selectedDates.filter(T),G()),ae.days&&H(),ae.currentYearElement&&(t&&n instanceof Date?(ae[e+"DateHasTime"]=n.getHours()||n.getMinutes()||n.getSeconds(),ae.currentYearElement[e]=n.getFullYear()):ae.currentYearElement.removeAttribute(e),ae.currentYearElement.disabled=a&&n&&a.getFullYear()===n.getFullYear())}}function N(){var e=["utc","wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];ae.config=Object.create(Flatpickr.defaultConfig),Object.defineProperty(ae.config,"minDate",{get:function(){return this._minDate},set:O("min")}),Object.defineProperty(ae.config,"maxDate",{get:function(){return this._maxDate},set:O("max")});var t=_extends({},ae.instanceConfig,JSON.parse(JSON.stringify(ae.element.dataset||{})));_extends(ae.config,t);for(var n=0;n<e.length;n++)ae.config[e[n]]=ae.config[e[n]]===!0||"true"===ae.config[e[n]];!t.dateFormat&&t.enableTime&&(ae.config.dateFormat=ae.config.noCalendar?"H:i"+(ae.config.enableSeconds?":S":""):Flatpickr.defaultConfig.dateFormat+" H:i"+(ae.config.enableSeconds?":S":"")),t.altInput&&t.enableTime&&!t.altFormat&&(ae.config.altFormat=ae.config.noCalendar?"h:i"+(ae.config.enableSeconds?":S K":" K"):Flatpickr.defaultConfig.altFormat+(" h:i"+(ae.config.enableSeconds?":S":"")+" K"))}function F(){"object"!==_typeof(ae.config.locale)&&"undefined"==typeof Flatpickr.l10ns[ae.config.locale]&&console.warn("flatpickr: invalid locale "+ae.config.locale),ae.l10n=_extends(Object.create(Flatpickr.l10ns.default),"object"===_typeof(ae.config.locale)?ae.config.locale:"default"!==ae.config.locale?Flatpickr.l10ns[ae.config.locale]||{}:{})}function j(e){if(!e||e.target===ae.timeContainer){var t=ae.calendarContainer.offsetHeight,n=ae.calendarContainer.offsetWidth,a=ae.altInput||ae.input,i=a.getBoundingClientRect(),r=window.innerHeight-i.bottom+a.offsetHeight,o=void 0;if(r<t+60?(o=window.pageYOffset-t+i.top-2,ae.calendarContainer.classList.remove("arrowTop"),ae.calendarContainer.classList.add("arrowBottom")):(o=window.pageYOffset+a.offsetHeight+i.top+2,ae.calendarContainer.classList.remove("arrowBottom"),ae.calendarContainer.classList.add("arrowTop")),!ae.config.static&&!ae.config.inline){ae.calendarContainer.style.top=o+"px";var l=window.pageXOffset+i.left,c=window.document.body.offsetWidth-i.right;l+n<=window.document.body.offsetWidth?(ae.calendarContainer.style.left=l+"px",ae.calendarContainer.style.right="auto",ae.calendarContainer.classList.remove("rightMost")):(ae.calendarContainer.style.left="auto",ae.calendarContainer.style.right=c+"px",ae.calendarContainer.classList.add("rightMost"))}}}function H(){ae.config.noCalendar||ae.isMobile||(D(),Q(),m())}function _(e){if(e.preventDefault(),ae.config.allowInput&&13===e.which&&e.target===(ae.altInput||ae.input))return ae.setDate((ae.altInput||ae.input).value),e.target.blur();if(e.target.classList.contains("flatpickr-day")&&!e.target.classList.contains("disabled")&&!e.target.classList.contains("notAllowed")){var t=ae.latestSelectedDateObj=new Date(e.target.dateObj.getTime());if(ae.selectedDateElem=e.target,"single"===ae.config.mode)ae.selectedDates=[t];else if("multiple"===ae.config.mode){var n=V(t);n?ae.selectedDates.splice(n,1):ae.selectedDates.push(t)}else"range"===ae.config.mode&&(2===ae.selectedDates.length&&ae.clear(),ae.selectedDates.push(t),ae.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));i(),t.getMonth()!==ae.currentMonth&&"range"!==ae.config.mode&&(ae.currentYear=t.getFullYear(),ae.currentMonth=t.getMonth(),Q()),m(),ae.minDateHasTime&&ae.config.enableTime&&0===te(t,ae.config.minDate)&&r(ae.config.minDate),G(),setTimeout(function(){return ae.dateIsPicked=!0},50),"range"===ae.config.mode&&1===ae.selectedDates.length&&L(e),"single"!==ae.config.mode||ae.config.enableTime||ae.close(),q("Change")}}function P(e,t){ae.config[e]=t,ae.redraw(),s()}function A(e){if(Array.isArray(e))ae.selectedDates=e.map(ae.parseDate);else if(e)switch(ae.config.mode){case"single":ae.selectedDates=[ae.parseDate(e)];break;case"multiple":ae.selectedDates=e.split("; ").map(ae.parseDate);break;case"range":ae.selectedDates=e.split(ae.l10n.rangeSeparator).map(ae.parseDate)}ae.selectedDates=ae.selectedDates.filter(function(e){return e instanceof Date&&e.getTime()&&T(e,!1)}),ae.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function R(e,t){return e?(A(e),ae.selectedDates.length>0?(ae.dateIsPicked=!0,ae.latestSelectedDateObj=ae.selectedDates[0]):ae.latestSelectedDateObj=null,ae.redraw(),s(),r(),G(),void(t===!0&&q("Change"))):ae.clear()}function W(){function e(e){for(var t=e.length;t--;)"string"==typeof e[t]||+e[t]?e[t]=ae.parseDate(e[t],!0):e[t]&&e[t].from&&e[t].to&&(e[t].from=ae.parseDate(e[t].from),e[t].to=ae.parseDate(e[t].to));return e.filter(function(e){return e})}ae.selectedDates=[],ae.now=new Date,A(ae.config.defaultDate||ae.input.value),ae.config.disable.length&&(ae.config.disable=e(ae.config.disable)),ae.config.enable.length&&(ae.config.enable=e(ae.config.enable));var t=ae.selectedDates.length?ae.selectedDates[0]:ae.config.minDate&&ae.config.minDate.getTime()>ae.now?ae.config.minDate:ae.config.maxDate&&ae.config.maxDate.getTime()<ae.now?ae.config.maxDate:ae.now;ae.currentYear=t.getFullYear(),ae.currentMonth=t.getMonth(),ae.selectedDates.length&&(ae.latestSelectedDateObj=ae.selectedDates[0]),ae.minDateHasTime=ae.config.minDate&&(ae.config.minDate.getHours()||ae.config.minDate.getMinutes()||ae.config.minDate.getSeconds()),ae.maxDateHasTime=ae.config.maxDate&&(ae.config.maxDate.getHours()||ae.config.maxDate.getMinutes()||ae.config.maxDate.getSeconds()),Object.defineProperty(ae,"latestSelectedDateObj",{get:function(){return ae._selectedDateObj||ae.selectedDates[ae.selectedDates.length-1]||null},set:function(e){ae._selectedDateObj=e}})}function U(){ae.utils={duration:{DAY:864e5},getDaysinMonth:function(e,t){return e="undefined"==typeof e?ae.currentMonth:e,t="undefined"==typeof t?ae.currentYear:t,1===e&&(t%4===0&&t%100!==0||t%400===0)?29:ae.l10n.daysInMonth[e]},monthToStr:function(e,t){return t="undefined"==typeof t?ae.config.shorthandCurrentMonth:t,ae.l10n.months[(t?"short":"long")+"hand"][e]}}}function B(){ae.formats={D:function(e){return ae.l10n.weekdays.shorthand[ae.formats.w(e)]},F:function(e){return ae.utils.monthToStr(ae.formats.n(e)-1,!1)},H:function(e){return Flatpickr.prototype.pad(e.getHours())},J:function(e){return e.getDate()+ae.l10n.ordinal(e.getDate())},K:function(e){return e.getHours()>11?"PM":"AM"},M:function(e){return ae.utils.monthToStr(e.getMonth(),!0)},S:function(e){return Flatpickr.prototype.pad(e.getSeconds())},U:function(e){return e.getTime()/1e3},Y:function(e){return e.getFullYear()},d:function(e){return Flatpickr.prototype.pad(ae.formats.j(e))},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Flatpickr.prototype.pad(e.getMinutes())},j:function(e){return e.getDate()},l:function(e){return ae.l10n.weekdays.longhand[ae.formats.w(e)]},m:function(e){return Flatpickr.prototype.pad(ae.formats.n(e))},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(ae.formats.Y(e)).substring(2)}}}function J(){return ae.input=ae.config.wrap?ae.element.querySelector("[data-input]"):ae.element,ae.input?(ae.input._type=ae.input.type,ae.input.type="text",ae.input.classList.add("flatpickr-input"),ae.config.altInput&&(ae.altInput=Z(ae.input.nodeName,ae.input.className+" "+ae.config.altInputClass),ae.altInput.placeholder=ae.input.placeholder,ae.altInput.type="text",ae.input.type="hidden",ae.input.parentNode&&ae.input.parentNode.insertBefore(ae.altInput,ae.input.nextSibling)),void(ae.config.allowInput||(ae.altInput||ae.input).setAttribute("readonly","readonly"))):console.warn("Error: invalid input element specified",ae.input)}function z(){var e=ae.config.enableTime?ae.config.noCalendar?"time":"datetime-local":"date";ae.mobileInput=Z("input",ae.input.className+" flatpickr-mobile"),ae.mobileInput.step="any",ae.mobileInput.tabIndex=1,ae.mobileInput.type=e,ae.mobileInput.disabled=ae.input.disabled,ae.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",ae.selectedDates.length&&(ae.mobileInput.defaultValue=ae.mobileInput.value=E(ae.mobileFormatStr,ae.selectedDates[0])),ae.config.minDate&&(ae.mobileInput.min=E("Y-m-d",ae.config.minDate)),ae.config.maxDate&&(ae.mobileInput.max=E("Y-m-d",ae.config.maxDate)),ae.input.type="hidden",ae.config.altInput&&(ae.altInput.type="hidden");try{ae.input.parentNode.insertBefore(ae.mobileInput,ae.input.nextSibling)}catch(e){}ae.mobileInput.addEventListener("change",function(e){ae.latestSelectedDateObj=ae.parseDate(e.target.value),ae.setDate(ae.latestSelectedDateObj),q("Change"),q("Close")})}function K(){ae.isOpen?ae.close():ae.open()}function q(e,t){if(ae.config["on"+e])for(var n=Array.isArray(ae.config["on"+e])?ae.config["on"+e]:[ae.config["on"+e]],a=0;a<n.length;a++)n[a](ae.selectedDates,ae.input.value,ae,t);if("Change"===e)if("function"==typeof Event&&Event.constructor)ae.input.dispatchEvent(new Event("change",{bubbles:!0})),ae.input.dispatchEvent(new Event("input",{bubbles:!0}));else{if(void 0!==window.document.createEvent)return ae.input.dispatchEvent(ae.changeEvent);ae.input.fireEvent("onchange")}}function V(e){for(var t=0;t<ae.selectedDates.length;t++)if(0===te(ae.selectedDates[t],e))return""+t;return!1}function $(e){return!("range"!==ae.config.mode||ae.selectedDates.length<2)&&(te(e,ae.selectedDates[0])>=0&&te(e,ae.selectedDates[1])<=0)}function Q(){if(!ae.config.noCalendar&&!ae.isMobile&&ae.monthNav){if(ae.currentMonthElement.textContent=ae.utils.monthToStr(ae.currentMonth)+" ",ae.currentYearElement.value=ae.currentYear,ae.config.minDate){var e=ae.currentYear===ae.config.minDate.getFullYear()?ae.currentMonth<=ae.config.minDate.getMonth():ae.currentYear<ae.config.minDate.getFullYear();ae.prevMonthNav.style.display=e?"none":"block"}else ae.prevMonthNav.style.display="block";if(ae.config.maxDate){var t=ae.currentYear===ae.config.maxDate.getFullYear()?ae.currentMonth+1>ae.config.maxDate.getMonth():ae.currentYear>ae.config.maxDate.getFullYear();ae.nextMonthNav.style.display=t?"none":"block"}else ae.nextMonthNav.style.display="block"}}function G(){if(!ae.selectedDates.length)return ae.clear();ae.isMobile&&(ae.mobileInput.value=ae.selectedDates.length?E(ae.mobileFormatStr,ae.latestSelectedDateObj):"");var e="range"!==ae.config.mode?"; ":ae.l10n.rangeSeparator;ae.input.value=ae.selectedDates.map(function(e){return E(ae.config.dateFormat,e)}).join(e),ae.config.altInput&&(ae.altInput.value=ae.selectedDates.map(function(e){return E(ae.config.altFormat,e)}).join(e)),q("ValueUpdate")}function X(e){e.preventDefault();var t=Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY)),n=parseInt(e.target.value,10)+t;x(n),e.target.value=ae.currentYear}function Z(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,n&&(a.textContent=n),a}function ee(e,t,n){var a=void 0;return function(){for(var i=arguments.length,r=Array(i),o=0;o<i;o++)r[o]=arguments[o];var l=this,c=function(){a=null,n||e.apply(l,r)};clearTimeout(a),a=setTimeout(c,t),n&&!a&&e.apply(l,r)}}function te(e,t,n){return e instanceof Date&&t instanceof Date&&(n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime())}function ne(e){if(e.preventDefault(),e&&((e.target.value||e.target.textContent).length>=2||"keydown"!==e.type&&"input"!==e.type)&&e.target.blur(),ae.amPM&&e.target===ae.amPM)return e.target.textContent=["AM","PM"]["AM"===e.target.textContent|0];var t=Number(e.target.min),n=Number(e.target.max),a=Number(e.target.step),i=parseInt(e.target.value,10),r=Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY)),o=Number(i);switch(e.type){case"wheel":o=i+a*r;break;case"keydown":o=i+a*(38===e.which?1:-1)}"input"!==e.type||2===e.target.value.length?(o<t?o=n+o+(e.target!==ae.hourElement)+(e.target===ae.hourElement&&!ae.amPM):o>n&&(o=e.target===ae.hourElement?o-n-!ae.amPM:t),ae.amPM&&e.target===ae.hourElement&&(1===a?o+i===23:Math.abs(o-i)>a)&&(ae.amPM.textContent="PM"===ae.amPM.textContent?"AM":"PM"),e.target.value=ae.pad(o)):e.target.value=o}var ae=this;return n(),ae}function _flatpickr(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i<n.length;i++)try{n[i]._flatpickr=new Flatpickr(n[i],t||{}),a.push(n[i]._flatpickr)}catch(e){console.warn(e,e.stack)}return 1===a.length?a[0]:a}function flatpickr(e,t){return _flatpickr(window.document.querySelectorAll(e),t)}var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Flatpickr.defaultConfig={mode:"single",utc:!1,wrap:!1,weekNumbers:!1,allowInput:!1,clickOpens:!0,time_24hr:!1,enableTime:!1,noCalendar:!1,dateFormat:"Y-m-d",altInput:!1,altInputClass:"flatpickr-input form-control input",altFormat:"F j, Y",defaultDate:null,minDate:null,maxDate:null,parseDate:null,formatDate:null,getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},enable:[],disable:[],shorthandCurrentMonth:!1,inline:!1,static:!1,appendTo:null,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",enableSeconds:!1,hourIncrement:1,minuteIncrement:5,defaultHour:12,defaultMinute:0,disableMobile:!1,locale:"default",onChange:null,onOpen:null,onClose:null,onReady:null,onValueUpdate:null,onDayCreate:null},Flatpickr.l10ns={en:{weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
|
3 |
+
longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle"}},Flatpickr.l10ns.default=Object.create(Flatpickr.l10ns.en),Flatpickr.localize=function(e){return _extends(Flatpickr.l10ns.default,e||{})},Flatpickr.setDefaults=function(e){return _extends(Flatpickr.defaultConfig,e||{})},Flatpickr.prototype={pad:function(e){return("0"+e).slice(-2)},parseDate:function(e,t){if(!e)return null;var n=/(\d+)/g,a=/^(\d{1,2})[:\s](\d\d)?[:\s]?(\d\d)?\s?(a|p)?/i,i=/^(\d+)$/g,r=e;if(e.toFixed||i.test(e))e=new Date(e);else if("string"==typeof e)if(e=e.trim(),"today"===e)e=new Date,t=!0;else if(this.config&&this.config.parseDate)e=this.config.parseDate(e);else if(a.test(e)){var o=e.match(a),l=o[4]?o[1]%12+("p"===o[4].toLowerCase()?12:0):o[1];e=new Date,e.setHours(l,o[2]||0,o[3]||0)}else if(/Z$/.test(e)||/GMT$/.test(e))e=new Date(e);else if(n.test(e)&&/^[0-9]/.test(e)){var c=e.match(n);e=new Date(c[0]+"/"+(c[1]||1)+"/"+(c[2]||1)+" "+(c[3]||0)+":"+(c[4]||0)+":"+(c[5]||0))}else e=new Date(e);else e instanceof Date&&(e=new Date(e.getTime()));return e instanceof Date?(this.config&&this.config.utc&&!e.fp_isUTC&&(e=e.fp_toUTC()),t===!0&&e.setHours(0,0,0,0),e):(console.warn("flatpickr: invalid date "+r),console.info(this.element),null)}},"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return _flatpickr(this,e)},HTMLElement.prototype.flatpickr=function(e){return _flatpickr([this],e)}),"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return _flatpickr(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+parseInt(e,10))},Date.prototype.fp_isUTC=!1,Date.prototype.fp_toUTC=function(){var e=new Date(this.getUTCFullYear(),this.getUTCMonth(),this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds());return e.fp_isUTC=!0,e},!window.document.documentElement.classList&&Object.defineProperty&&"undefined"!=typeof HTMLElement&&Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function e(e){return function(n){var a=t.className.split(/\s+/),i=a.indexOf(n);e(a,i,n),t.className=a.join(" ")}}var t=this,n={add:e(function(e,t,n){~t||e.push(n)}),remove:e(function(e,t){~t&&e.splice(t,1)}),toggle:e(function(e,t,n){~t?e.splice(t,1):e.push(n)}),contains:function(e){return!!~t.className.split(/\s+/).indexOf(e)},item:function(e){return t.className.split(/\s+/)[e]||null}};return Object.defineProperty(n,"length",{get:function(){return t.className.split(/\s+/).length}}),n}}),"undefined"!=typeof module&&(module.exports=Flatpickr);
|
js/general.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* @package Content Aware Sidebars
|
3 |
+
* @author Joachim Jensen <jv@intox.dk>
|
4 |
+
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
+
*/
|
7 |
+
|
8 |
+
(function($) {
|
9 |
+
|
10 |
+
var cas_general = {
|
11 |
+
|
12 |
+
init: function() {
|
13 |
+
this.upgradeNoticeHandler();
|
14 |
+
this.reviewNoticeHandler();
|
15 |
+
},
|
16 |
+
|
17 |
+
upgradeNoticeHandler: function() {
|
18 |
+
$('.js-cas-pro-notice').on('click',function(e) {
|
19 |
+
e.preventDefault();
|
20 |
+
$('.js-cas-pro-read-more').attr('href',$(this).data('url'));
|
21 |
+
$('.js-cas-pro-popup').trigger('click');
|
22 |
+
});
|
23 |
+
},
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Handle clicks on review notice
|
27 |
+
* Sends dismiss event to backend
|
28 |
+
*
|
29 |
+
* @since 3.1
|
30 |
+
* @return {void}
|
31 |
+
*/
|
32 |
+
reviewNoticeHandler: function() {
|
33 |
+
$notice = $(".js-cas-notice-review");
|
34 |
+
$notice.on("click","a, button", function(e) {
|
35 |
+
$this = $(this);
|
36 |
+
$.ajax({
|
37 |
+
url: ajaxurl,
|
38 |
+
data:{
|
39 |
+
'action': 'cas_dismiss_review_notice',
|
40 |
+
'dismiss': $this.attr("href") ? 1 : 0
|
41 |
+
},
|
42 |
+
dataType: 'JSON',
|
43 |
+
type: 'POST',
|
44 |
+
success:function(data){
|
45 |
+
$notice.fadeOut(400,function() {
|
46 |
+
$notice.remove();
|
47 |
+
});
|
48 |
+
},
|
49 |
+
error: function(xhr, desc, e) {
|
50 |
+
console.log(xhr.responseText);
|
51 |
+
}
|
52 |
+
});
|
53 |
+
});
|
54 |
+
}
|
55 |
+
};
|
56 |
+
|
57 |
+
$(document).ready(function(){
|
58 |
+
cas_general.init();
|
59 |
+
});
|
60 |
+
|
61 |
+
})(jQuery);
|
js/suggest-sidebars.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
*/
|
7 |
|
8 |
(function($) {
|
@@ -46,10 +46,11 @@
|
|
46 |
* @since 3.3
|
47 |
*/
|
48 |
suggestSidebars: function() {
|
49 |
-
var
|
50 |
-
|
51 |
-
$
|
52 |
-
|
|
|
53 |
containerCssClass:'cas-select2',
|
54 |
dropdownCssClass: 'cas-select2',
|
55 |
minimumInputLength: 0,
|
@@ -57,18 +58,19 @@
|
|
57 |
allowClear:false,
|
58 |
multiple: true,
|
59 |
//maximumSelectionSize: 1,
|
60 |
-
data
|
61 |
width:"100%",
|
|
|
62 |
//tokenSeparators: ['|'],
|
63 |
// nextSearchTerm: function(selectedObject, currentSearchTerm) {
|
64 |
// return currentSearchTerm;
|
65 |
// },
|
66 |
createSearchChoice:function(term, data) {
|
67 |
-
if (CAS.canCreate && term && $(data).filter(function() {
|
68 |
return this.text.localeCompare(term) === 0;
|
69 |
-
}).length === 0) {
|
70 |
return {
|
71 |
-
id: '_'+term.replace(",","
|
72 |
text: term
|
73 |
};
|
74 |
}
|
@@ -84,7 +86,7 @@
|
|
84 |
return CAS.notFound;
|
85 |
}
|
86 |
});
|
87 |
-
}
|
88 |
}
|
89 |
};
|
90 |
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
*/
|
7 |
|
8 |
(function($) {
|
46 |
* @since 3.3
|
47 |
*/
|
48 |
suggestSidebars: function() {
|
49 |
+
var hostSidebar;
|
50 |
+
for(hostSidebar in CAS.sidebars) {
|
51 |
+
$elem = $('#ca_sidebars_'+hostSidebar);
|
52 |
+
console.log(CAS.sidebars[hostSidebar]['options']);
|
53 |
+
$elem.select2({
|
54 |
containerCssClass:'cas-select2',
|
55 |
dropdownCssClass: 'cas-select2',
|
56 |
minimumInputLength: 0,
|
58 |
allowClear:false,
|
59 |
multiple: true,
|
60 |
//maximumSelectionSize: 1,
|
61 |
+
data:CAS.sidebars[hostSidebar]['options'],
|
62 |
width:"100%",
|
63 |
+
createSearchChoicePosition:'bottom',
|
64 |
//tokenSeparators: ['|'],
|
65 |
// nextSearchTerm: function(selectedObject, currentSearchTerm) {
|
66 |
// return currentSearchTerm;
|
67 |
// },
|
68 |
createSearchChoice:function(term, data) {
|
69 |
+
if (CAS.canCreate && term/* && $(data).filter(function() {
|
70 |
return this.text.localeCompare(term) === 0;
|
71 |
+
}).length === 0*/) {
|
72 |
return {
|
73 |
+
id: '_'+term.replace(",","__"),
|
74 |
text: term
|
75 |
};
|
76 |
}
|
86 |
return CAS.notFound;
|
87 |
}
|
88 |
});
|
89 |
+
}
|
90 |
}
|
91 |
};
|
92 |
|
js/suggest-sidebars.min.js
CHANGED
@@ -2,6 +2,6 @@
|
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
*/
|
7 |
-
!function(a){var b={init:function(){this.suggestSidebars(),this.toggleSidebarInputs()},toggleSidebarInputs:function(){a(".js-cas-more").click(function(b){b.preventDefault();var c=a(this),d=a(c.data("toggle")),e=c.children(":first");e.hasClass("dashicons-arrow-down-alt2")?(e.addClass("dashicons-arrow-up-alt2").removeClass("dashicons-arrow-down-alt2"),d.slideDown()):(e.addClass("dashicons-arrow-down-alt2").removeClass("dashicons-arrow-up-alt2"),d.slideUp())})},suggestSidebars:function(){var b
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
*/
|
7 |
+
!function(a){var b={init:function(){this.suggestSidebars(),this.toggleSidebarInputs()},toggleSidebarInputs:function(){a(".js-cas-more").click(function(b){b.preventDefault();var c=a(this),d=a(c.data("toggle")),e=c.children(":first");e.hasClass("dashicons-arrow-down-alt2")?(e.addClass("dashicons-arrow-up-alt2").removeClass("dashicons-arrow-down-alt2"),d.slideDown()):(e.addClass("dashicons-arrow-down-alt2").removeClass("dashicons-arrow-up-alt2"),d.slideUp())})},suggestSidebars:function(){var b;for(b in CAS.sidebars)$elem=a("#ca_sidebars_"+b),$elem.select2({containerCssClass:"cas-select2",dropdownCssClass:"cas-select2",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,multiple:!0,data:CAS.sidebars[b].options,width:"100%",createSearchChoicePosition:"bottom",createSearchChoice:function(a){return CAS.canCreate&&a?{id:"_"+a.replace(",","__"),text:a}:null},formatSelection:function(a){return(a.id>0?"":"<b>("+CAS.labelNew+")</b> ")+a.text},formatResult:function(a){return(a.id>0?"":"<b>"+CAS.createNew+":</b> ")+a.text},formatNoMatches:function(){return CAS.notFound}})}};a(document).ready(function(){b.init()})}(jQuery);
|
js/widgets.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
*/
|
7 |
|
8 |
(function($) {
|
@@ -75,7 +75,7 @@
|
|
75 |
addSidebarToolbar: function() {
|
76 |
|
77 |
var box = '<div class="wp-filter cas-filter-sidebar">'+
|
78 |
-
'<a href="
|
79 |
'<input type="search" class="js-cas-filter" placeholder="'+CASAdmin.filterSidebars+'...">'+
|
80 |
'<a href="#" class="js-sidebars-toggle sidebars-toggle" data-toggle="0">'+CASAdmin.collapse+'</a>'+
|
81 |
'<a href="#" class="js-sidebars-toggle sidebars-toggle" data-toggle="1">'+CASAdmin.expand+'</a>'+
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
*/
|
7 |
|
8 |
(function($) {
|
75 |
addSidebarToolbar: function() {
|
76 |
|
77 |
var box = '<div class="wp-filter cas-filter-sidebar">'+
|
78 |
+
'<a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a>'+
|
79 |
'<input type="search" class="js-cas-filter" placeholder="'+CASAdmin.filterSidebars+'...">'+
|
80 |
'<a href="#" class="js-sidebars-toggle sidebars-toggle" data-toggle="0">'+CASAdmin.collapse+'</a>'+
|
81 |
'<a href="#" class="js-sidebars-toggle sidebars-toggle" data-toggle="1">'+CASAdmin.expand+'</a>'+
|
js/widgets.min.js
CHANGED
@@ -2,6 +2,6 @@
|
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
-
* @copyright
|
6 |
*/
|
7 |
-
!function(a){var b={$sidebarContainer:a(".widget-liquid-right"),$widgetContainer:a("#available-widgets"),$widgets:null,init:function(){this.addSidebarToolbar(),this.addWidgetSearch()},addWidgetSearch:function(){this.$widgets=a(".widget",this.$widgetContainer).get().reverse(),a(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter-widget" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener()},searchWidgetListener:function(){var b,c=this,d="";this.$widgetContainer.on("keyup",".js-cas-widget-filter",function(){var e=a(this).val();e!=d&&(d=e,b&&clearTimeout(b),b=setTimeout(function(){a(c.$widgets).each(function(b,c){var d=a(c);d.find(".widget-title :nth-child(1)").text().search(new RegExp(e,"i"))<0?d.fadeOut():(d.prependTo(d.parent()),d.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var a='<div class="wp-filter cas-filter-sidebar"><a href="
|
2 |
* @package Content Aware Sidebars
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
*/
|
7 |
+
!function(a){var b={$sidebarContainer:a(".widget-liquid-right"),$widgetContainer:a("#available-widgets"),$widgets:null,init:function(){this.addSidebarToolbar(),this.addWidgetSearch()},addWidgetSearch:function(){this.$widgets=a(".widget",this.$widgetContainer).get().reverse(),a(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter-widget" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener()},searchWidgetListener:function(){var b,c=this,d="";this.$widgetContainer.on("keyup",".js-cas-widget-filter",function(){var e=a(this).val();e!=d&&(d=e,b&&clearTimeout(b),b=setTimeout(function(){a(c.$widgets).each(function(b,c){var d=a(c);d.find(".widget-title :nth-child(1)").text().search(new RegExp(e,"i"))<0?d.fadeOut():(d.prependTo(d.parent()),d.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var a='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><input type="search" class="js-cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."><a href="#" class="js-sidebars-toggle sidebars-toggle" data-toggle="0">'+CASAdmin.collapse+'</a><a href="#" class="js-sidebars-toggle sidebars-toggle" data-toggle="1">'+CASAdmin.expand+"</a></div>";this.$sidebarContainer.prepend(a),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var b=a(document),c=this.$sidebarContainer.find(".widgets-holder-wrap");a("body").on("click",".js-sidebars-toggle",function(d){d.preventDefault();var e=!!a(this).data("toggle");c.toggleClass("closed",!e),e&&c.children(".widgets-sortables").sortable("refresh"),b.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var b,c=this,d="";this.$sidebarContainer.on("keyup",".js-cas-filter",function(){var e=a(this).val();e!=d&&(d=e,b&&clearTimeout(b),b=setTimeout(function(){a(".widgets-holder-wrap",c.$sidebarContainer).each(function(b,c){var d=a(c);d.find(".sidebar-name :nth-child(2)").text().search(new RegExp(e,"i"))<0?d.fadeOut():d.fadeIn()})},250))})}};a(document).ready(function(){b.init()})}(jQuery);
|
lib/freemius/.codeclimate.yml
CHANGED
@@ -8,6 +8,12 @@ engines:
|
|
8 |
enabled: false
|
9 |
Squiz Commenting InlineComment SpacingBefore:
|
10 |
enabled: false
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
ratings:
|
12 |
paths:
|
13 |
- "**.php"
|
8 |
enabled: false
|
9 |
Squiz Commenting InlineComment SpacingBefore:
|
10 |
enabled: false
|
11 |
+
Squiz Commenting InlineComment WrongStyle:
|
12 |
+
enabled: false
|
13 |
+
Generic Commenting DocComment MissingShort:
|
14 |
+
enabled: false
|
15 |
+
Generic WhiteSpace ScopeIndent IncorrectExact:
|
16 |
+
enabled: false
|
17 |
ratings:
|
18 |
paths:
|
19 |
- "**.php"
|
lib/freemius/README.md
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
Freemius WordPress SDK
|
2 |
======================
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
If you are a WordPress plugin developer and you are interested to monetize with Freemius [apply to our closed beta here](http://bit.ly/freemius-beta):
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
|
11 |
**Below you'll find the integration instructions for our WordPress SDK.**
|
12 |
|
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 |
|
lib/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 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}
|
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%}
|
lib/freemius/assets/css/admin/common.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.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:0px 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)}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@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'}
|
1 |
+
.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:0px 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)}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@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}
|
lib/freemius/assets/css/admin/dialog-boxes.css
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
-
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}
|
2 |
-
|
3 |
-
a.show-license-resend-modal{margin-top:4px;display:inline-block}
|
1 |
+
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend .fs-modal-body input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{margin-top:2px}}
|
2 |
+
.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}
|
|
lib/freemius/assets/js/jquery.ba-postmessage.js
DELETED
@@ -1,222 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery postMessage - v0.5 - 9/11/2009
|
3 |
-
* http://benalman.com/projects/jquery-postmessage-plugin/
|
4 |
-
*
|
5 |
-
* Copyright (c) 2009 "Cowboy" Ben Alman
|
6 |
-
* Dual licensed under the MIT and GPL licenses.
|
7 |
-
* http://benalman.com/about/license/
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Script: jQuery postMessage: Cross-domain scripting goodness
|
11 |
-
//
|
12 |
-
// *Version: 0.5, Last updated: 9/11/2009*
|
13 |
-
//
|
14 |
-
// Project Home - http://benalman.com/projects/jquery-postmessage-plugin/
|
15 |
-
// GitHub - http://github.com/cowboy/jquery-postmessage/
|
16 |
-
// Source - http://github.com/cowboy/jquery-postmessage/raw/master/jquery.ba-postmessage.js
|
17 |
-
// (Minified) - http://github.com/cowboy/jquery-postmessage/raw/master/jquery.ba-postmessage.min.js (0.9kb)
|
18 |
-
//
|
19 |
-
// About: License
|
20 |
-
//
|
21 |
-
// Copyright (c) 2009 "Cowboy" Ben Alman,
|
22 |
-
// Dual licensed under the MIT and GPL licenses.
|
23 |
-
// http://benalman.com/about/license/
|
24 |
-
//
|
25 |
-
// About: Examples
|
26 |
-
//
|
27 |
-
// This working example, complete with fully commented code, illustrates one
|
28 |
-
// way in which this plugin can be used.
|
29 |
-
//
|
30 |
-
// Iframe resizing - http://benalman.com/code/projects/jquery-postmessage/examples/iframe/
|
31 |
-
//
|
32 |
-
// About: Support and Testing
|
33 |
-
//
|
34 |
-
// Information about what version or versions of jQuery this plugin has been
|
35 |
-
// tested with and what browsers it has been tested in.
|
36 |
-
//
|
37 |
-
// jQuery Versions - 1.3.2
|
38 |
-
// Browsers Tested - Internet Explorer 6-8, Firefox 3, Safari 3-4, Chrome, Opera 9.
|
39 |
-
//
|
40 |
-
// About: Release History
|
41 |
-
//
|
42 |
-
// 0.5 - (9/11/2009) Improved cache-busting
|
43 |
-
// 0.4 - (8/25/2009) Initial release
|
44 |
-
|
45 |
-
(function($){
|
46 |
-
'$:nomunge'; // Used by YUI compressor.
|
47 |
-
|
48 |
-
// A few vars used in non-awesome browsers.
|
49 |
-
var interval_id,
|
50 |
-
last_hash,
|
51 |
-
cache_bust = 1,
|
52 |
-
|
53 |
-
// A var used in awesome browsers.
|
54 |
-
rm_callback,
|
55 |
-
|
56 |
-
// A few convenient shortcuts.
|
57 |
-
window = this,
|
58 |
-
FALSE = !1,
|
59 |
-
|
60 |
-
// Reused internal strings.
|
61 |
-
postMessage = 'postMessage',
|
62 |
-
addEventListener = 'addEventListener',
|
63 |
-
|
64 |
-
p_receiveMessage,
|
65 |
-
|
66 |
-
// I couldn't get window.postMessage to actually work in Opera 9.64!
|
67 |
-
has_postMessage = window[postMessage] && !$.browser.opera;
|
68 |
-
|
69 |
-
// Method: jQuery.postMessage
|
70 |
-
//
|
71 |
-
// This method will call window.postMessage if available, setting the
|
72 |
-
// targetOrigin parameter to the base of the target_url parameter for maximum
|
73 |
-
// security in browsers that support it. If window.postMessage is not available,
|
74 |
-
// the target window's location.hash will be used to pass the message. If an
|
75 |
-
// object is passed as the message param, it will be serialized into a string
|
76 |
-
// using the jQuery.param method.
|
77 |
-
//
|
78 |
-
// Usage:
|
79 |
-
//
|
80 |
-
// > jQuery.postMessage( message, target_url [, target ] );
|
81 |
-
//
|
82 |
-
// Arguments:
|
83 |
-
//
|
84 |
-
// message - (String) A message to be passed to the other frame.
|
85 |
-
// message - (Object) An object to be serialized into a params string, using
|
86 |
-
// the jQuery.param method.
|
87 |
-
// target_url - (String) The URL of the other frame this window is
|
88 |
-
// attempting to communicate with. This must be the exact URL (including
|
89 |
-
// any query string) of the other window for this script to work in
|
90 |
-
// browsers that don't support window.postMessage.
|
91 |
-
// target - (Object) A reference to the other frame this window is
|
92 |
-
// attempting to communicate with. If omitted, defaults to `parent`.
|
93 |
-
//
|
94 |
-
// Returns:
|
95 |
-
//
|
96 |
-
// Nothing.
|
97 |
-
|
98 |
-
$[postMessage] = function( message, target_url, target ) {
|
99 |
-
if ( !target_url ) { return; }
|
100 |
-
|
101 |
-
// Serialize the message if not a string. Note that this is the only real
|
102 |
-
// jQuery dependency for this script. If removed, this script could be
|
103 |
-
// written as very basic JavaScript.
|
104 |
-
message = typeof message === 'string' ? message : $.param( message );
|
105 |
-
|
106 |
-
// Default to parent if unspecified.
|
107 |
-
target = target || parent;
|
108 |
-
|
109 |
-
if ( has_postMessage ) {
|
110 |
-
// The browser supports window.postMessage, so call it with a targetOrigin
|
111 |
-
// set appropriately, based on the target_url parameter.
|
112 |
-
target[postMessage]( message, target_url.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
|
113 |
-
|
114 |
-
} else if ( target_url ) {
|
115 |
-
// The browser does not support window.postMessage, so set the location
|
116 |
-
// of the target to target_url#message. A bit ugly, but it works! A cache
|
117 |
-
// bust parameter is added to ensure that repeat messages trigger the
|
118 |
-
// callback.
|
119 |
-
target.location = target_url.replace( /#.*$/, '' ) + '#' + (+new Date) + (cache_bust++) + '&' + message;
|
120 |
-
}
|
121 |
-
};
|
122 |
-
|
123 |
-
// Method: jQuery.receiveMessage
|
124 |
-
//
|
125 |
-
// Register a single callback for either a window.postMessage call, if
|
126 |
-
// supported, or if unsupported, for any change in the current window
|
127 |
-
// location.hash. If window.postMessage is supported and source_origin is
|
128 |
-
// specified, the source window will be checked against this for maximum
|
129 |
-
// security. If window.postMessage is unsupported, a polling loop will be
|
130 |
-
// started to watch for changes to the location.hash.
|
131 |
-
//
|
132 |
-
// Note that for simplicity's sake, only a single callback can be registered
|
133 |
-
// at one time. Passing no params will unbind this event (or stop the polling
|
134 |
-
// loop), and calling this method a second time with another callback will
|
135 |
-
// unbind the event (or stop the polling loop) first, before binding the new
|
136 |
-
// callback.
|
137 |
-
//
|
138 |
-
// Also note that if window.postMessage is available, the optional
|
139 |
-
// source_origin param will be used to test the event.origin property. From
|
140 |
-
// the MDC window.postMessage docs: This string is the concatenation of the
|
141 |
-
// protocol and "://", the host name if one exists, and ":" followed by a port
|
142 |
-
// number if a port is present and differs from the default port for the given
|
143 |
-
// protocol. Examples of typical origins are https://example.org (implying
|
144 |
-
// port 443), http://example.net (implying port 80), and http://example.com:8080.
|
145 |
-
//
|
146 |
-
// Usage:
|
147 |
-
//
|
148 |
-
// > jQuery.receiveMessage( callback [, source_origin ] [, delay ] );
|
149 |
-
//
|
150 |
-
// Arguments:
|
151 |
-
//
|
152 |
-
// callback - (Function) This callback will execute whenever a <jQuery.postMessage>
|
153 |
-
// message is received, provided the source_origin matches. If callback is
|
154 |
-
// omitted, any existing receiveMessage event bind or polling loop will be
|
155 |
-
// canceled.
|
156 |
-
// source_origin - (String) If window.postMessage is available and this value
|
157 |
-
// is not equal to the event.origin property, the callback will not be
|
158 |
-
// called.
|
159 |
-
// source_origin - (Function) If window.postMessage is available and this
|
160 |
-
// function returns false when passed the event.origin property, the
|
161 |
-
// callback will not be called.
|
162 |
-
// delay - (Number) An optional zero-or-greater delay in milliseconds at
|
163 |
-
// which the polling loop will execute (for browser that don't support
|
164 |
-
// window.postMessage). If omitted, defaults to 100.
|
165 |
-
//
|
166 |
-
// Returns:
|
167 |
-
//
|
168 |
-
// Nothing!
|
169 |
-
|
170 |
-
$.receiveMessage = p_receiveMessage = function( callback, source_origin, delay ) {
|
171 |
-
if ( has_postMessage ) {
|
172 |
-
// Since the browser supports window.postMessage, the callback will be
|
173 |
-
// bound to the actual event associated with window.postMessage.
|
174 |
-
|
175 |
-
if ( callback ) {
|
176 |
-
// Unbind an existing callback if it exists.
|
177 |
-
rm_callback && p_receiveMessage();
|
178 |
-
|
179 |
-
// Bind the callback. A reference to the callback is stored for ease of
|
180 |
-
// unbinding.
|
181 |
-
rm_callback = function(e) {
|
182 |
-
if ( ( typeof source_origin === 'string' && e.origin !== source_origin )
|
183 |
-
|| ( $.isFunction( source_origin ) && source_origin( e.origin ) === FALSE ) ) {
|
184 |
-
return FALSE;
|
185 |
-
}
|
186 |
-
callback( e );
|
187 |
-
};
|
188 |
-
}
|
189 |
-
|
190 |
-
if ( window[addEventListener] ) {
|
191 |
-
window[ callback ? addEventListener : 'removeEventListener' ]( 'message', rm_callback, FALSE );
|
192 |
-
} else {
|
193 |
-
window[ callback ? 'attachEvent' : 'detachEvent' ]( 'onmessage', rm_callback );
|
194 |
-
}
|
195 |
-
|
196 |
-
} else {
|
197 |
-
// Since the browser sucks, a polling loop will be started, and the
|
198 |
-
// callback will be called whenever the location.hash changes.
|
199 |
-
|
200 |
-
interval_id && clearInterval( interval_id );
|
201 |
-
interval_id = null;
|
202 |
-
|
203 |
-
if ( callback ) {
|
204 |
-
delay = typeof source_origin === 'number'
|
205 |
-
? source_origin
|
206 |
-
: typeof delay === 'number'
|
207 |
-
? delay
|
208 |
-
: 100;
|
209 |
-
|
210 |
-
interval_id = setInterval(function(){
|
211 |
-
var hash = document.location.hash,
|
212 |
-
re = /^#?\d+&/;
|
213 |
-
if ( hash !== last_hash && re.test( hash ) ) {
|
214 |
-
last_hash = hash;
|
215 |
-
callback({ data: hash.replace( re, '' ) });
|
216 |
-
}
|
217 |
-
}, delay );
|
218 |
-
}
|
219 |
-
}
|
220 |
-
};
|
221 |
-
|
222 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/freemius/assets/js/jquery.ba-postmessage.min.js
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery postMessage - v0.5 - 9/11/2009
|
3 |
-
* http://benalman.com/projects/jquery-postmessage-plugin/
|
4 |
-
*
|
5 |
-
* Copyright (c) 2009 "Cowboy" Ben Alman
|
6 |
-
* Dual licensed under the MIT and GPL licenses.
|
7 |
-
* http://benalman.com/about/license/
|
8 |
-
*/
|
9 |
-
(function($){var g,d,j=1,a,b=this,f=!1,h="postMessage",e="addEventListener",c,i=b[h]&&!$.browser.opera;$[h]=function(k,l,m){if(!l){return}k=typeof k==="string"?k:$.param(k);m=m||parent;if(i){m[h](k,l.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}else{if(l){m.location=l.replace(/#.*$/,"")+"#"+(+new Date)+(j++)+"&"+k}}};$.receiveMessage=c=function(l,m,k){if(i){if(l){a&&c();a=function(n){if((typeof m==="string"&&n.origin!==m)||($.isFunction(m)&&m(n.origin)===f)){return f}l(n)}}if(b[e]){b[l?e:"removeEventListener"]("message",a,f)}else{b[l?"attachEvent":"detachEvent"]("onmessage",a)}}else{g&&clearInterval(g);g=null;if(l){k=typeof m==="number"?m:typeof k==="number"?k:100;g=setInterval(function(){var o=document.location.hash,n=/^#?\d+&/;if(o!==d&&n.test(o)){d=o;l({data:o.replace(n,"")})}},k)}}}})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/freemius/assets/js/postmessage.js
CHANGED
@@ -24,10 +24,13 @@
|
|
24 |
}
|
25 |
}
|
26 |
}, _base_url);
|
27 |
-
}
|
|
|
|
|
|
|
28 |
|
29 |
return {
|
30 |
-
init : function (url)
|
31 |
{
|
32 |
_base_url = url;
|
33 |
_init();
|
@@ -36,6 +39,16 @@
|
|
36 |
FS.PostMessage.receiveOnce('forward', function (data){
|
37 |
window.location = data.url;
|
38 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
},
|
40 |
init_child : function ()
|
41 |
{
|
@@ -46,8 +59,14 @@
|
|
46 |
// Post height of a child right after window is loaded.
|
47 |
$(window).bind('load', function () {
|
48 |
FS.PostMessage.postHeight();
|
49 |
-
});
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
},
|
52 |
postHeight : function (diff, wrapper) {
|
53 |
diff = diff || 0;
|
@@ -56,6 +75,12 @@
|
|
56 |
height: diff + $(wrapper).outerHeight(true)
|
57 |
});
|
58 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
post : function (type, data, iframe)
|
60 |
{
|
61 |
console.debug('PostMessage.post', type);
|
24 |
}
|
25 |
}
|
26 |
}, _base_url);
|
27 |
+
},
|
28 |
+
_hasParent = ('' !== _parent_url),
|
29 |
+
$window = $(window),
|
30 |
+
$html = $('html');
|
31 |
|
32 |
return {
|
33 |
+
init : function (url, iframes)
|
34 |
{
|
35 |
_base_url = url;
|
36 |
_init();
|
39 |
FS.PostMessage.receiveOnce('forward', function (data){
|
40 |
window.location = data.url;
|
41 |
});
|
42 |
+
|
43 |
+
iframes = iframes || [];
|
44 |
+
|
45 |
+
if (iframes.length > 0) {
|
46 |
+
$window.on('scroll', function () {
|
47 |
+
for (var i = 0; i < iframes.length; i++) {
|
48 |
+
FS.PostMessage.postScroll(iframes[i]);
|
49 |
+
}
|
50 |
+
});
|
51 |
+
}
|
52 |
},
|
53 |
init_child : function ()
|
54 |
{
|
59 |
// Post height of a child right after window is loaded.
|
60 |
$(window).bind('load', function () {
|
61 |
FS.PostMessage.postHeight();
|
|
|
62 |
|
63 |
+
// Post message that window was loaded.
|
64 |
+
FS.PostMessage.post('loaded');
|
65 |
+
});
|
66 |
+
},
|
67 |
+
hasParent : function ()
|
68 |
+
{
|
69 |
+
return _hasParent;
|
70 |
},
|
71 |
postHeight : function (diff, wrapper) {
|
72 |
diff = diff || 0;
|
75 |
height: diff + $(wrapper).outerHeight(true)
|
76 |
});
|
77 |
},
|
78 |
+
postScroll : function (iframe) {
|
79 |
+
this.post('scroll', {
|
80 |
+
top: $window.scrollTop(),
|
81 |
+
height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
|
82 |
+
}, iframe);
|
83 |
+
},
|
84 |
post : function (type, data, iframe)
|
85 |
{
|
86 |
console.debug('PostMessage.post', type);
|
lib/freemius/assets/scss/_mixins.scss
CHANGED
@@ -200,14 +200,6 @@ $useIEFilters: 0;
|
|
200 |
filter: alpha(opacity=$opacity-ie); //IE8
|
201 |
}
|
202 |
|
203 |
-
@mixin sprite($img, $width, $height: $width, $display: block)
|
204 |
-
{
|
205 |
-
display: $display;
|
206 |
-
background-image: url('#{$img}');
|
207 |
-
|
208 |
-
@include size($width, $height);
|
209 |
-
}
|
210 |
-
|
211 |
@mixin size($width, $height: $width)
|
212 |
{
|
213 |
width: $width;
|
@@ -221,4 +213,15 @@ $useIEFilters: 0;
|
|
221 |
display: table;
|
222 |
clear: both;
|
223 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
200 |
filter: alpha(opacity=$opacity-ie); //IE8
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
@mixin size($width, $height: $width)
|
204 |
{
|
205 |
width: $width;
|
213 |
display: table;
|
214 |
clear: both;
|
215 |
}
|
216 |
+
}
|
217 |
+
|
218 |
+
// Placeholder text
|
219 |
+
@mixin placeholder($color: $input-color-placeholder) {
|
220 |
+
// Firefox
|
221 |
+
&::-moz-placeholder {
|
222 |
+
color: $color;
|
223 |
+
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
|
224 |
+
}
|
225 |
+
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
226 |
+
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
227 |
}
|
lib/freemius/assets/scss/admin/_deactivation-feedback.scss
CHANGED
@@ -35,6 +35,19 @@
|
|
35 |
}
|
36 |
}
|
37 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
#the-list .deactivate > .fs-slug {
|
35 |
}
|
36 |
}
|
37 |
}
|
38 |
+
|
39 |
+
.anonymous-feedback-label {
|
40 |
+
float: left;
|
41 |
+
}
|
42 |
+
|
43 |
+
.fs-modal-panel {
|
44 |
+
margin-top: 0 !important;
|
45 |
+
|
46 |
+
h3 {
|
47 |
+
margin-top: 0;
|
48 |
+
line-height: 1.5em;
|
49 |
+
}
|
50 |
+
}
|
51 |
}
|
52 |
|
53 |
#the-list .deactivate > .fs-slug {
|
lib/freemius/assets/scss/admin/_license-key-resend.scss
CHANGED
@@ -1,13 +1,4 @@
|
|
1 |
.fs-modal.fs-modal-license-key-resend {
|
2 |
-
.button-close {
|
3 |
-
float: right;
|
4 |
-
margin: 5px;
|
5 |
-
|
6 |
-
&:hover {
|
7 |
-
cursor: pointer;
|
8 |
-
}
|
9 |
-
}
|
10 |
-
|
11 |
.fs-modal-body {
|
12 |
.input-container > .email-address-container {
|
13 |
overflow: hidden;
|
@@ -29,6 +20,24 @@
|
|
29 |
}
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
a.show-license-resend-modal {
|
33 |
margin-top: 4px;
|
34 |
display: inline-block;
|
1 |
.fs-modal.fs-modal-license-key-resend {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
.fs-modal-body {
|
3 |
.input-container > .email-address-container {
|
4 |
overflow: hidden;
|
20 |
}
|
21 |
}
|
22 |
|
23 |
+
.rtl
|
24 |
+
{
|
25 |
+
.fs-modal.fs-modal-license-key-resend {
|
26 |
+
.fs-modal-body {
|
27 |
+
.input-container > .email-address-container {
|
28 |
+
padding-left: 2px;
|
29 |
+
padding-right: 0;
|
30 |
+
}
|
31 |
+
|
32 |
+
.button-container {
|
33 |
+
float: left;
|
34 |
+
margin-right: 7px;
|
35 |
+
margin-left: 0;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
a.show-license-resend-modal {
|
42 |
margin-top: 4px;
|
43 |
display: inline-block;
|
lib/freemius/assets/scss/admin/_modal-common.scss
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
@import "../colors";
|
|
|
2 |
|
3 |
.fs-modal {
|
4 |
position: fixed;
|
@@ -52,6 +53,43 @@
|
|
52 |
padding: 20px;
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
.fs-modal-body {
|
56 |
border-bottom: 0;
|
57 |
|
@@ -61,6 +99,7 @@
|
|
61 |
|
62 |
h2 {
|
63 |
font-size: 20px;
|
|
|
64 |
}
|
65 |
|
66 |
> div {
|
@@ -99,6 +138,18 @@
|
|
99 |
}
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
body.has-fs-modal {
|
103 |
overflow: hidden;
|
104 |
}
|
1 |
@import "../colors";
|
2 |
+
@import "../mixins";
|
3 |
|
4 |
.fs-modal {
|
5 |
position: fixed;
|
53 |
padding: 20px;
|
54 |
}
|
55 |
|
56 |
+
.fs-modal-header {
|
57 |
+
border-bottom: #eeeeee solid 1px;
|
58 |
+
background: #fbfbfb;
|
59 |
+
padding: 15px 20px;
|
60 |
+
position: relative;
|
61 |
+
margin-bottom: -10px;
|
62 |
+
// z-index: 2;
|
63 |
+
|
64 |
+
h4 {
|
65 |
+
margin: 0;
|
66 |
+
padding: 0;
|
67 |
+
text-transform: uppercase;
|
68 |
+
font-size: 1.2em;
|
69 |
+
font-weight: bold;
|
70 |
+
color: #cacaca;
|
71 |
+
text-shadow: 1px 1px 1px #fff;
|
72 |
+
letter-spacing: 0.6px;
|
73 |
+
-webkit-font-smoothing: antialiased;
|
74 |
+
}
|
75 |
+
|
76 |
+
.fs-close {
|
77 |
+
position: absolute;
|
78 |
+
right: 10px;
|
79 |
+
top: 12px;
|
80 |
+
cursor: pointer;
|
81 |
+
color: #bbb;
|
82 |
+
@include border-radius(20px);
|
83 |
+
padding: 3px;
|
84 |
+
@include transition(all 0.2s ease-in-out);
|
85 |
+
|
86 |
+
&:hover {
|
87 |
+
color: #fff;
|
88 |
+
background: #aaa;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
.fs-modal-body {
|
94 |
border-bottom: 0;
|
95 |
|
99 |
|
100 |
h2 {
|
101 |
font-size: 20px;
|
102 |
+
line-height: 1.5em;
|
103 |
}
|
104 |
|
105 |
> div {
|
138 |
}
|
139 |
}
|
140 |
|
141 |
+
.rtl
|
142 |
+
{
|
143 |
+
.fs-modal {
|
144 |
+
.fs-modal-header {
|
145 |
+
.fs-close {
|
146 |
+
right: auto;
|
147 |
+
left: 20px;
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
body.has-fs-modal {
|
154 |
overflow: hidden;
|
155 |
}
|
lib/freemius/assets/scss/admin/account.scss
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
#fs_account
|
2 |
{
|
3 |
.postbox,
|
@@ -166,6 +168,10 @@ label.fs-tag
|
|
166 |
vertical-align: middle;
|
167 |
}
|
168 |
|
|
|
|
|
|
|
|
|
169 |
td:first-child,
|
170 |
th:first-child
|
171 |
{
|
@@ -181,4 +187,64 @@ label.fs-tag
|
|
181 |
{
|
182 |
font-weight: bold;
|
183 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
}
|
1 |
+
@import "../start";
|
2 |
+
|
3 |
#fs_account
|
4 |
{
|
5 |
.postbox,
|
168 |
vertical-align: middle;
|
169 |
}
|
170 |
|
171 |
+
thead {
|
172 |
+
white-space: nowrap;
|
173 |
+
}
|
174 |
+
|
175 |
td:first-child,
|
176 |
th:first-child
|
177 |
{
|
187 |
{
|
188 |
font-weight: bold;
|
189 |
}
|
190 |
+
}
|
191 |
+
|
192 |
+
#fs_billing_address {
|
193 |
+
width: 100%;
|
194 |
+
|
195 |
+
tr {
|
196 |
+
td {
|
197 |
+
width: 50%;
|
198 |
+
padding: 5px;
|
199 |
+
}
|
200 |
+
|
201 |
+
&:first-of-type {
|
202 |
+
td {
|
203 |
+
padding-top: 0;
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
@mixin read-mode {
|
209 |
+
border-color: transparent;
|
210 |
+
color: #777;
|
211 |
+
border-bottom: 1px dashed #ccc;
|
212 |
+
padding-left: 0;
|
213 |
+
background: none;
|
214 |
+
}
|
215 |
+
|
216 |
+
span {
|
217 |
+
font-weight: bold;
|
218 |
+
}
|
219 |
+
|
220 |
+
input, select {
|
221 |
+
@include placeholder(transparent);
|
222 |
+
|
223 |
+
display: block;
|
224 |
+
width: 100%;
|
225 |
+
margin-top: 5px;
|
226 |
+
|
227 |
+
&.fs-read-mode {
|
228 |
+
@include read-mode();
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
&.fs-read-mode {
|
234 |
+
td span {
|
235 |
+
display: none;
|
236 |
+
}
|
237 |
+
|
238 |
+
input, select
|
239 |
+
{
|
240 |
+
@include read-mode();
|
241 |
+
@include placeholder(#ccc);
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
|
246 |
+
button {
|
247 |
+
display: block;
|
248 |
+
width: 100%;
|
249 |
+
}
|
250 |
}
|
lib/freemius/assets/scss/admin/common.scss
CHANGED
@@ -108,6 +108,12 @@
|
|
108 |
}
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
@media screen and (max-width: 782px) {
|
112 |
.fs-secure-notice
|
113 |
{
|
@@ -131,4 +137,24 @@ span.fs-submenu-item.fs-sub:before
|
|
131 |
// Add small RTL arrow.
|
132 |
content: '\21B2';
|
133 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
108 |
}
|
109 |
}
|
110 |
|
111 |
+
@media screen and (max-width:500px) {
|
112 |
+
#fs_promo_tab {
|
113 |
+
display: none;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
@media screen and (max-width: 782px) {
|
118 |
.fs-secure-notice
|
119 |
{
|
137 |
// Add small RTL arrow.
|
138 |
content: '\21B2';
|
139 |
}
|
140 |
+
}
|
141 |
+
|
142 |
+
.fs-submenu-item
|
143 |
+
{
|
144 |
+
&.pricing
|
145 |
+
{
|
146 |
+
&.upgrade-mode
|
147 |
+
{
|
148 |
+
color: greenyellow;
|
149 |
+
}
|
150 |
+
|
151 |
+
&.trial-mode
|
152 |
+
{
|
153 |
+
color: #83e2ff;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
#adminmenu .update-plugins.fs-trial {
|
159 |
+
background-color: #00b9eb;
|
160 |
}
|
lib/freemius/assets/scss/admin/dialog-boxes.scss
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
@import "modal-common";
|
2 |
@import "deactivation-feedback";
|
3 |
@import "license-activation";
|
1 |
+
@import "../start";
|
2 |
@import "modal-common";
|
3 |
@import "deactivation-feedback";
|
4 |
@import "license-activation";
|
lib/freemius/config.php
CHANGED
@@ -10,14 +10,17 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
-
|
|
|
|
|
14 |
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
15 |
define( 'WP_FS__DEV_MODE', false );
|
16 |
}
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
21 |
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
22 |
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
23 |
}
|
@@ -40,6 +43,8 @@
|
|
40 |
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
41 |
}
|
42 |
|
|
|
|
|
43 |
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
44 |
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
45 |
}
|
@@ -87,18 +92,36 @@
|
|
87 |
}
|
88 |
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
94 |
-
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
95 |
-
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
96 |
-
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
97 |
-
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
98 |
-
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
99 |
-
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
100 |
-
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
/**
|
104 |
* Domain / URL / Address
|
@@ -117,42 +140,87 @@
|
|
117 |
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
118 |
}
|
119 |
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
|
127 |
-
|
128 |
-
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
129 |
|
130 |
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
131 |
// By default, run with Freemius production servers.
|
132 |
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
133 |
}
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
138 |
-
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
139 |
-
} else {
|
140 |
-
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
141 |
-
is_string( WP_FS__REMOTE_ADDR ) &&
|
142 |
-
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) == '127.' ||
|
143 |
-
WP_FS__REMOTE_ADDR == '::1' )
|
144 |
-
);
|
145 |
}
|
146 |
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
// Set API address for local testing.
|
151 |
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
152 |
-
|
153 |
-
|
|
|
|
|
|
|
|
|
154 |
}
|
155 |
|
|
|
|
|
156 |
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
157 |
|
158 |
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
@@ -163,17 +231,6 @@
|
|
163 |
}
|
164 |
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
165 |
|
166 |
-
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
167 |
-
// Checks if CloudFlare's HTTPS (Flexible SSL support)
|
168 |
-
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) ||
|
169 |
-
// Check if HTTPS request.
|
170 |
-
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
171 |
-
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
172 |
-
);
|
173 |
-
|
174 |
-
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
175 |
-
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
176 |
-
|
177 |
/**
|
178 |
* Billing Frequencies
|
179 |
*/
|
@@ -191,14 +248,21 @@
|
|
191 |
/**
|
192 |
* Times in seconds
|
193 |
*/
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
|
|
196 |
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
-
/**
|
200 |
-
* Debugging
|
201 |
-
*/
|
202 |
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
203 |
$debug_mode = get_option( 'fs_debug_mode', null );
|
204 |
|
@@ -210,20 +274,28 @@
|
|
210 |
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
211 |
}
|
212 |
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
215 |
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
216 |
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
217 |
}
|
218 |
|
219 |
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
220 |
error_reporting( E_ALL );
|
221 |
-
ini_set( 'error_reporting', E_ALL );
|
222 |
-
ini_set( 'display_errors', true );
|
223 |
-
ini_set( 'html_errors', true );
|
224 |
}
|
225 |
|
|
|
226 |
|
227 |
-
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
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 |
}
|
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 |
}
|
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
|
140 |
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
141 |
}
|
142 |
|
143 |
+
#--------------------------------------------------------------------------------
|
144 |
+
#region HTTP
|
145 |
+
#--------------------------------------------------------------------------------
|
146 |
+
|
147 |
+
if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
|
148 |
+
define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
|
149 |
}
|
150 |
+
|
151 |
+
if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
|
152 |
+
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
153 |
+
// Checks if CloudFlare's HTTPS (Flexible SSL support).
|
154 |
+
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
|
155 |
+
'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
156 |
+
) ||
|
157 |
+
// Check if HTTPS request.
|
158 |
+
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
159 |
+
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
160 |
+
);
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
|
164 |
+
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
165 |
+
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
166 |
+
}
|
167 |
+
|
168 |
+
if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
|
169 |
+
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
170 |
+
}
|
171 |
+
|
172 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
|
173 |
+
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
174 |
+
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
175 |
+
} else {
|
176 |
+
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
177 |
+
is_string( WP_FS__REMOTE_ADDR ) &&
|
178 |
+
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
|
179 |
+
WP_FS__REMOTE_ADDR === '::1' )
|
180 |
+
);
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
185 |
+
define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
|
186 |
+
false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
|
187 |
}
|
188 |
|
189 |
+
#endregion
|
|
|
190 |
|
191 |
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
192 |
// By default, run with Freemius production servers.
|
193 |
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
194 |
}
|
195 |
|
196 |
+
if ( ! defined( 'WP_FS__ADDRESS' ) ) {
|
197 |
+
define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
|
200 |
+
|
201 |
+
#--------------------------------------------------------------------------------
|
202 |
+
#region API
|
203 |
+
#--------------------------------------------------------------------------------
|
204 |
+
|
205 |
+
if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
|
206 |
+
define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' );
|
207 |
+
}
|
208 |
+
if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
|
209 |
+
define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
|
210 |
+
}
|
211 |
|
212 |
// Set API address for local testing.
|
213 |
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
214 |
+
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
215 |
+
define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
|
216 |
+
}
|
217 |
+
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
218 |
+
define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
|
219 |
+
}
|
220 |
}
|
221 |
|
222 |
+
#endregion
|
223 |
+
|
224 |
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
225 |
|
226 |
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
231 |
}
|
232 |
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
/**
|
235 |
* Billing Frequencies
|
236 |
*/
|
248 |
/**
|
249 |
* Times in seconds
|
250 |
*/
|
251 |
+
if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
|
252 |
+
define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
|
253 |
+
}
|
254 |
+
if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
|
255 |
+
define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
|
256 |
+
}
|
257 |
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
258 |
+
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
259 |
+
define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 );
|
260 |
+
}
|
261 |
+
|
262 |
+
#--------------------------------------------------------------------------------
|
263 |
+
#region Debugging
|
264 |
+
#--------------------------------------------------------------------------------
|
265 |
|
|
|
|
|
|
|
266 |
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
267 |
$debug_mode = get_option( 'fs_debug_mode', null );
|
268 |
|
274 |
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
275 |
}
|
276 |
|
277 |
+
if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
|
278 |
+
define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
|
279 |
+
}
|
280 |
+
if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
|
281 |
+
define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
|
282 |
+
}
|
283 |
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
284 |
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
285 |
}
|
286 |
|
287 |
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
288 |
error_reporting( E_ALL );
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
+
#endregion
|
292 |
|
293 |
+
if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
|
294 |
+
define( 'WP_FS__SCRIPT_START_TIME', time() );
|
295 |
+
}
|
296 |
+
if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
|
297 |
+
define( 'WP_FS__DEFAULT_PRIORITY', 10 );
|
298 |
+
}
|
299 |
+
if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
|
300 |
+
define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
|
301 |
+
}
|
lib/freemius/gulpfile.js
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var gulp = require('gulp');
|
2 |
+
var wpPot = require('gulp-wp-pot');
|
3 |
+
var gettext = require('gulp-gettext');
|
4 |
+
var sort = require('gulp-sort');
|
5 |
+
var pofill = require('gulp-pofill');
|
6 |
+
var rename = require('gulp-rename');
|
7 |
+
|
8 |
+
gulp.task('default', function () {
|
9 |
+
// Create POT out of i18n.php.
|
10 |
+
gulp.src('includes/i18n.php')
|
11 |
+
.pipe(sort())
|
12 |
+
.pipe(wpPot( {
|
13 |
+
destFile:'freemius.pot',
|
14 |
+
package: 'freemius',
|
15 |
+
bugReport: 'https://github.com/Freemius/wordpress-sdk/issues',
|
16 |
+
lastTranslator: 'Vova Feldman <vova@freemius.com>',
|
17 |
+
team: 'Freemius Team <admin@freemius.com>'
|
18 |
+
} ))
|
19 |
+
.pipe(gulp.dest('languages/'));
|
20 |
+
|
21 |
+
// Create English PO out of the POT.
|
22 |
+
gulp.src('languages/freemius.pot')
|
23 |
+
.pipe(pofill({
|
24 |
+
items: function(item) {
|
25 |
+
// If msgstr is empty, use identity translation
|
26 |
+
if (!item.msgstr.length) {
|
27 |
+
item.msgstr = [''];
|
28 |
+
}
|
29 |
+
if (!item.msgstr[0]) {
|
30 |
+
item.msgstr[0] = item.msgid;
|
31 |
+
}
|
32 |
+
return item;
|
33 |
+
}
|
34 |
+
}))
|
35 |
+
.pipe(rename('freemius-en.po'))
|
36 |
+
.pipe(gulp.dest('languages/'));
|
37 |
+
|
38 |
+
// Compile POs to MOs.
|
39 |
+
gulp.src('languages/*.po')
|
40 |
+
.pipe(gettext())
|
41 |
+
.pipe(gulp.dest('languages/'))
|
42 |
+
});
|
lib/freemius/includes/class-freemius-abstract.php
CHANGED
@@ -22,7 +22,9 @@
|
|
22 |
*/
|
23 |
abstract class Freemius_Abstract {
|
24 |
|
25 |
-
|
|
|
|
|
26 |
|
27 |
/**
|
28 |
* Check if user registered with Freemius by connecting his account.
|
@@ -50,9 +52,73 @@
|
|
50 |
*/
|
51 |
abstract function is_activation_mode();
|
52 |
|
53 |
-
#endregion
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
/**
|
58 |
* Check if plugin must be WordPress.org compliant.
|
@@ -75,7 +141,7 @@
|
|
75 |
return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
|
76 |
}
|
77 |
|
78 |
-
#endregion
|
79 |
|
80 |
/**
|
81 |
* Check if user in trial or in free plan (not paying).
|
@@ -119,7 +185,9 @@
|
|
119 |
*/
|
120 |
abstract function can_use_premium_code();
|
121 |
|
122 |
-
|
|
|
|
|
123 |
|
124 |
/**
|
125 |
* All logic wrapped in methods with "__premium_only()" suffix will be only
|
@@ -225,9 +293,11 @@
|
|
225 |
return $this->is_premium() && $this->can_use_premium_code();
|
226 |
}
|
227 |
|
228 |
-
#endregion
|
229 |
|
230 |
-
|
|
|
|
|
231 |
|
232 |
/**
|
233 |
* Check if the user in a trial.
|
@@ -247,9 +317,11 @@
|
|
247 |
*/
|
248 |
abstract function is_trial_utilized();
|
249 |
|
250 |
-
#endregion
|
251 |
|
252 |
-
|
|
|
|
|
253 |
|
254 |
/**
|
255 |
* Check if plugin using the free plan.
|
@@ -340,12 +412,11 @@
|
|
340 |
* @return bool
|
341 |
*/
|
342 |
function is_freemium() {
|
343 |
-
return
|
344 |
-
$this->has_paid_plan() &&
|
345 |
$this->has_free_plan();
|
346 |
}
|
347 |
|
348 |
-
#endregion
|
349 |
|
350 |
/**
|
351 |
* Check if running payments in sandbox mode.
|
@@ -408,7 +479,9 @@
|
|
408 |
*/
|
409 |
abstract function is_plugin_new_install();
|
410 |
|
411 |
-
|
|
|
|
|
412 |
|
413 |
/**
|
414 |
* Check if current user purchased any other plugins before.
|
@@ -450,5 +523,5 @@
|
|
450 |
*/
|
451 |
abstract function is_business();
|
452 |
|
453 |
-
#endregion
|
454 |
}
|
22 |
*/
|
23 |
abstract class Freemius_Abstract {
|
24 |
|
25 |
+
#----------------------------------------------------------------------------------
|
26 |
+
#region Identity
|
27 |
+
#----------------------------------------------------------------------------------
|
28 |
|
29 |
/**
|
30 |
* Check if user registered with Freemius by connecting his account.
|
52 |
*/
|
53 |
abstract function is_activation_mode();
|
54 |
|
55 |
+
#endregion
|
56 |
|
57 |
+
#----------------------------------------------------------------------------------
|
58 |
+
#region Usage Tracking
|
59 |
+
#----------------------------------------------------------------------------------
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
63 |
+
*
|
64 |
+
* @author Leo Fajardo (@leorw)
|
65 |
+
* @since 1.2.1.5
|
66 |
+
*
|
67 |
+
* @return bool
|
68 |
+
*/
|
69 |
+
abstract function is_tracking_allowed();
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Returns TRUE if the user never opted-in or manually opted-out.
|
73 |
+
*
|
74 |
+
* @author Vova Feldman (@svovaf)
|
75 |
+
* @since 1.2.1.5
|
76 |
+
*
|
77 |
+
* @return bool
|
78 |
+
*/
|
79 |
+
function is_tracking_prohibited() {
|
80 |
+
return ! $this->is_registered() || ! $this->is_tracking_allowed();
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Opt-out from usage tracking.
|
85 |
+
*
|
86 |
+
* Note: This will not delete the account information but will stop all tracking.
|
87 |
+
*
|
88 |
+
* Returns:
|
89 |
+
* 1. FALSE - If the user never opted-in.
|
90 |
+
* 2. TRUE - If successfully opted-out.
|
91 |
+
* 3. object - API Result on failure.
|
92 |
+
*
|
93 |
+
* @author Leo Fajardo (@leorw)
|
94 |
+
* @since 1.2.1.5
|
95 |
+
*
|
96 |
+
* @return bool|object
|
97 |
+
*/
|
98 |
+
abstract function stop_tracking();
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Opt-in back into usage tracking.
|
102 |
+
*
|
103 |
+
* Note: This will only work if the user opted-in previously.
|
104 |
+
*
|
105 |
+
* Returns:
|
106 |
+
* 1. FALSE - If the user never opted-in.
|
107 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
108 |
+
* 3. object - API result on failure.
|
109 |
+
*
|
110 |
+
* @author Leo Fajardo (@leorw)
|
111 |
+
* @since 1.2.1.5
|
112 |
+
*
|
113 |
+
* @return bool|object
|
114 |
+
*/
|
115 |
+
abstract function allow_tracking();
|
116 |
+
|
117 |
+
#endregion
|
118 |
+
|
119 |
+
#----------------------------------------------------------------------------------
|
120 |
+
#region Permissions
|
121 |
+
#----------------------------------------------------------------------------------
|
122 |
|
123 |
/**
|
124 |
* Check if plugin must be WordPress.org compliant.
|
141 |
return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
|
142 |
}
|
143 |
|
144 |
+
#endregion
|
145 |
|
146 |
/**
|
147 |
* Check if user in trial or in free plan (not paying).
|
185 |
*/
|
186 |
abstract function can_use_premium_code();
|
187 |
|
188 |
+
#----------------------------------------------------------------------------------
|
189 |
+
#region Premium Only
|
190 |
+
#----------------------------------------------------------------------------------
|
191 |
|
192 |
/**
|
193 |
* All logic wrapped in methods with "__premium_only()" suffix will be only
|
293 |
return $this->is_premium() && $this->can_use_premium_code();
|
294 |
}
|
295 |
|
296 |
+
#endregion
|
297 |
|
298 |
+
#----------------------------------------------------------------------------------
|
299 |
+
#region Trial
|
300 |
+
#----------------------------------------------------------------------------------
|
301 |
|
302 |
/**
|
303 |
* Check if the user in a trial.
|
317 |
*/
|
318 |
abstract function is_trial_utilized();
|
319 |
|
320 |
+
#endregion
|
321 |
|
322 |
+
#----------------------------------------------------------------------------------
|
323 |
+
#region Plans
|
324 |
+
#----------------------------------------------------------------------------------
|
325 |
|
326 |
/**
|
327 |
* Check if plugin using the free plan.
|
412 |
* @return bool
|
413 |
*/
|
414 |
function is_freemium() {
|
415 |
+
return $this->has_paid_plan() &&
|
|
|
416 |
$this->has_free_plan();
|
417 |
}
|
418 |
|
419 |
+
#endregion
|
420 |
|
421 |
/**
|
422 |
* Check if running payments in sandbox mode.
|
479 |
*/
|
480 |
abstract function is_plugin_new_install();
|
481 |
|
482 |
+
#----------------------------------------------------------------------------------
|
483 |
+
#region Marketing
|
484 |
+
#----------------------------------------------------------------------------------
|
485 |
|
486 |
/**
|
487 |
* Check if current user purchased any other plugins before.
|
523 |
*/
|
524 |
abstract function is_business();
|
525 |
|
526 |
+
#endregion
|
527 |
}
|
lib/freemius/includes/class-freemius.php
CHANGED
@@ -114,6 +114,19 @@
|
|
114 |
*/
|
115 |
private $_has_paid_plans;
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/**
|
118 |
* @since 1.0.7
|
119 |
* @var bool Hints the SDK if the plugin is WordPress.org compliant.
|
@@ -227,18 +240,46 @@
|
|
227 |
*/
|
228 |
private static $_instances = array();
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
/* Ctor
|
232 |
------------------------------------------------------------------------------------------------------------------*/
|
233 |
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
$this->_slug = $slug;
|
236 |
|
237 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
238 |
|
239 |
$this->_storage = FS_Key_Value_Storage::instance( 'plugin_data', $this->_slug );
|
240 |
|
241 |
-
$this->_plugin_main_file_path = $this->_find_caller_plugin_file();
|
242 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
243 |
$this->_plugin_basename = plugin_basename( $this->_plugin_main_file_path );
|
244 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
@@ -422,12 +463,25 @@
|
|
422 |
* @since 1.0.9
|
423 |
*/
|
424 |
private function _register_hooks() {
|
|
|
|
|
425 |
if ( is_admin() ) {
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
|
432 |
/**
|
433 |
* Part of the mechanism to identify new plugin install vs. plugin update.
|
@@ -456,9 +510,29 @@
|
|
456 |
|
457 |
add_action( 'init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
|
458 |
|
|
|
|
|
|
|
|
|
|
|
459 |
$this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
|
460 |
|
461 |
$this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
}
|
463 |
|
464 |
/**
|
@@ -483,7 +557,21 @@
|
|
483 |
* @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
|
484 |
*/
|
485 |
private function clear_module_main_file_cache() {
|
486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
}
|
488 |
|
489 |
/**
|
@@ -492,28 +580,15 @@
|
|
492 |
*/
|
493 |
private function _register_account_hooks() {
|
494 |
if ( is_admin() ) {
|
495 |
-
if ( ! $this->is_ajax() ) {
|
496 |
-
if ( $this->apply_filters( 'show_trial', true ) && $this->has_trial_plan() ) {
|
497 |
-
$last_time_trial_promotion_shown = $this->_storage->get( 'trial_promotion_shown', false );
|
498 |
-
if ( ! $this->_site->is_trial_utilized() &&
|
499 |
-
(
|
500 |
-
// Show promotion if never shown it yet and 24 hours after initial activation.
|
501 |
-
( false === $last_time_trial_promotion_shown && $this->_storage->activation_timestamp < ( time() - WP_FS__TIME_24_HOURS_IN_SEC ) ) ||
|
502 |
-
// Show promotion in every 30 days.
|
503 |
-
( is_numeric( $last_time_trial_promotion_shown ) && 30 * WP_FS__TIME_24_HOURS_IN_SEC < time() - $last_time_trial_promotion_shown ) )
|
504 |
-
) {
|
505 |
-
$this->add_action( 'after_init_plugin_registered', array( &$this, '_add_trial_notice' ) );
|
506 |
-
}
|
507 |
-
}
|
508 |
-
}
|
509 |
-
|
510 |
// If user is paying or in trial and have the free version installed,
|
511 |
// assume that the deactivation is for the upgrade process.
|
512 |
if ( ! $this->is_paying_or_trial() || $this->is_premium() ) {
|
513 |
-
|
|
|
|
|
|
|
514 |
|
515 |
-
|
516 |
-
if ( 'plugins.php' === $pagenow ) {
|
517 |
add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
|
518 |
}
|
519 |
}
|
@@ -532,18 +607,54 @@
|
|
532 |
* @author Vova Feldman (@svovaf)
|
533 |
* @since 1.0.6
|
534 |
*
|
|
|
|
|
535 |
* @return string
|
536 |
*
|
537 |
* @uses fs_find_caller_plugin_file
|
538 |
*/
|
539 |
-
private function _find_caller_plugin_file() {
|
540 |
// Try to load the cached value of the file path.
|
541 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
542 |
-
|
|
|
543 |
return $this->_storage->plugin_main_file->path;
|
544 |
}
|
545 |
}
|
546 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
$plugin_file = fs_find_caller_plugin_file();
|
548 |
|
549 |
$this->_storage->plugin_main_file = (object) array(
|
@@ -554,7 +665,9 @@
|
|
554 |
}
|
555 |
|
556 |
|
557 |
-
|
|
|
|
|
558 |
|
559 |
/**
|
560 |
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
|
@@ -631,21 +744,21 @@
|
|
631 |
}
|
632 |
|
633 |
$reason_found_better_plugin = array(
|
634 |
-
'id' =>
|
635 |
'text' => __fs( 'reason-found-a-better-plugin', $this->_slug ),
|
636 |
'input_type' => 'textfield',
|
637 |
'input_placeholder' => __fs( 'placeholder-plugin-name', $this->_slug )
|
638 |
);
|
639 |
|
640 |
$reason_temporary_deactivation = array(
|
641 |
-
'id' =>
|
642 |
'text' => __fs( 'reason-temporary-deactivation', $this->_slug ),
|
643 |
'input_type' => '',
|
644 |
'input_placeholder' => ''
|
645 |
);
|
646 |
|
647 |
$reason_other = array(
|
648 |
-
'id' =>
|
649 |
'text' => __fs( 'reason-other', $this->_slug ),
|
650 |
'input_type' => 'textfield',
|
651 |
'input_placeholder' => ''
|
@@ -653,27 +766,27 @@
|
|
653 |
|
654 |
$long_term_user_reasons = array(
|
655 |
array(
|
656 |
-
'id' =>
|
657 |
'text' => __fs( 'reason-no-longer-needed', $this->_slug ),
|
658 |
'input_type' => '',
|
659 |
'input_placeholder' => ''
|
660 |
),
|
661 |
$reason_found_better_plugin,
|
662 |
array(
|
663 |
-
'id' =>
|
664 |
'text' => __fs( 'reason-needed-for-a-short-period', $this->_slug ),
|
665 |
'input_type' => '',
|
666 |
'input_placeholder' => ''
|
667 |
),
|
668 |
array(
|
669 |
-
'id' =>
|
670 |
'text' => __fs( 'reason-broke-my-site', $this->_slug ),
|
671 |
'input_type' => '',
|
672 |
'input_placeholder' => '',
|
673 |
'internal_message' => $contact_support_template
|
674 |
),
|
675 |
array(
|
676 |
-
'id' =>
|
677 |
'text' => __fs( 'reason-suddenly-stopped-working', $this->_slug ),
|
678 |
'input_type' => '',
|
679 |
'input_placeholder' => '',
|
@@ -683,7 +796,7 @@
|
|
683 |
|
684 |
if ( $this->is_paying() ) {
|
685 |
$long_term_user_reasons[] = array(
|
686 |
-
'id' =>
|
687 |
'text' => __fs( 'reason-cant-pay-anymore', $this->_slug ),
|
688 |
'input_type' => 'textfield',
|
689 |
'input_placeholder' => __fs( 'placeholder-comfortable-price', $this->_slug )
|
@@ -691,7 +804,7 @@
|
|
691 |
}
|
692 |
|
693 |
$reason_dont_share_info = array(
|
694 |
-
'id' =>
|
695 |
'text' => __fs( 'reason-dont-like-to-share-my-information', $this->_slug ),
|
696 |
'input_type' => '',
|
697 |
'input_placeholder' => ''
|
@@ -708,26 +821,21 @@
|
|
708 |
$reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
|
709 |
}
|
710 |
|
711 |
-
$long_term_user_reasons[] = $reason_temporary_deactivation;
|
712 |
-
$long_term_user_reasons[] = $reason_other;
|
713 |
-
|
714 |
$uninstall_reasons = array(
|
715 |
'long-term' => $long_term_user_reasons,
|
716 |
'non-registered-and-non-anonymous-short-term' => array(
|
717 |
array(
|
718 |
-
'id' =>
|
719 |
'text' => __fs( 'reason-didnt-work', $this->_slug ),
|
720 |
'input_type' => '',
|
721 |
'input_placeholder' => ''
|
722 |
),
|
723 |
$reason_dont_share_info,
|
724 |
-
$reason_found_better_plugin
|
725 |
-
$reason_temporary_deactivation,
|
726 |
-
$reason_other
|
727 |
),
|
728 |
'short-term' => array(
|
729 |
array(
|
730 |
-
'id' =>
|
731 |
'text' => __fs( 'reason-couldnt-make-it-work', $this->_slug ),
|
732 |
'input_type' => '',
|
733 |
'input_placeholder' => '',
|
@@ -735,34 +843,39 @@
|
|
735 |
),
|
736 |
$reason_found_better_plugin,
|
737 |
array(
|
738 |
-
'id' =>
|
739 |
'text' => __fs( 'reason-great-but-need-specific-feature', $this->_slug ),
|
740 |
'input_type' => 'textarea',
|
741 |
'input_placeholder' => __fs( 'placeholder-feature', $this->_slug )
|
742 |
),
|
743 |
array(
|
744 |
-
'id' =>
|
745 |
'text' => __fs( 'reason-not-working', $this->_slug ),
|
746 |
'input_type' => 'textarea',
|
747 |
'input_placeholder' => __fs( 'placeholder-share-what-didnt-work', $this->_slug )
|
748 |
),
|
749 |
array(
|
750 |
-
'id' =>
|
751 |
'text' => __fs( 'reason-not-what-i-was-looking-for', $this->_slug ),
|
752 |
'input_type' => 'textarea',
|
753 |
'input_placeholder' => __fs( 'placeholder-what-youve-been-looking-for', $this->_slug )
|
754 |
),
|
755 |
array(
|
756 |
-
'id' =>
|
757 |
'text' => __fs( 'reason-didnt-work-as-expected', $this->_slug ),
|
758 |
'input_type' => 'textarea',
|
759 |
'input_placeholder' => __fs( 'placeholder-what-did-you-expect', $this->_slug )
|
760 |
-
)
|
761 |
-
$reason_temporary_deactivation,
|
762 |
-
$reason_other
|
763 |
)
|
764 |
);
|
765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
$uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
|
767 |
|
768 |
return $uninstall_reasons[ $user_type ];
|
@@ -775,15 +888,22 @@
|
|
775 |
* @since 1.1.2
|
776 |
*/
|
777 |
function _submit_uninstall_reason_action() {
|
778 |
-
|
|
|
|
|
|
|
779 |
exit;
|
780 |
}
|
781 |
|
782 |
-
$reason_info =
|
|
|
|
|
|
|
783 |
|
784 |
$reason = (object) array(
|
785 |
-
'id'
|
786 |
-
'info'
|
|
|
787 |
);
|
788 |
|
789 |
$this->_storage->store( 'uninstall_reason', $reason );
|
@@ -793,9 +913,11 @@
|
|
793 |
exit;
|
794 |
}
|
795 |
|
796 |
-
#endregion
|
797 |
|
798 |
-
|
|
|
|
|
799 |
|
800 |
/**
|
801 |
* Main singleton instance.
|
@@ -803,11 +925,12 @@
|
|
803 |
* @author Vova Feldman (@svovaf)
|
804 |
* @since 1.0.0
|
805 |
*
|
806 |
-
* @param $slug
|
|
|
807 |
*
|
808 |
* @return Freemius
|
809 |
*/
|
810 |
-
static function instance( $slug ) {
|
811 |
$slug = strtolower( $slug );
|
812 |
|
813 |
if ( ! isset( self::$_instances[ $slug ] ) ) {
|
@@ -815,7 +938,7 @@
|
|
815 |
self::_load_required_static();
|
816 |
}
|
817 |
|
818 |
-
self::$_instances[ $slug ] = new Freemius( $slug );
|
819 |
}
|
820 |
|
821 |
return self::$_instances[ $slug ];
|
@@ -1078,10 +1201,42 @@
|
|
1078 |
|
1079 |
add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
|
1080 |
|
|
|
|
|
1081 |
self::$_statics_loaded = true;
|
1082 |
}
|
1083 |
|
1084 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1085 |
|
1086 |
/**
|
1087 |
* @author Vova Feldman (@svovaf)
|
@@ -1142,10 +1297,22 @@
|
|
1142 |
if ( fs_request_is_action( 'restart_freemius' ) ) {
|
1143 |
check_admin_referer( 'restart_freemius' );
|
1144 |
|
|
|
1145 |
self::$_accounts->clear( true );
|
1146 |
|
|
|
|
|
|
|
|
|
1147 |
|
1148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1149 |
}
|
1150 |
}
|
1151 |
|
@@ -1177,9 +1344,11 @@
|
|
1177 |
fs_require_once_template( 'debug.php', $vars );
|
1178 |
}
|
1179 |
|
1180 |
-
#endregion
|
1181 |
|
1182 |
-
|
|
|
|
|
1183 |
|
1184 |
/**
|
1185 |
* Check if Freemius should be turned on for the current plugin install.
|
@@ -1322,8 +1491,11 @@
|
|
1322 |
$this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
|
1323 |
/**
|
1324 |
* @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration.
|
|
|
|
|
1325 |
*/
|
1326 |
$this->_is_on = $this->_storage->connectivity_test['is_active'] ||
|
|
|
1327 |
( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF );
|
1328 |
|
1329 |
return $this->_has_api_connection;
|
@@ -1460,8 +1632,8 @@
|
|
1460 |
* @param bool $is_first_failure
|
1461 |
*/
|
1462 |
function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
|
1463 |
-
if ( $this->_enable_anonymous ) {
|
1464 |
-
// Don't add message if can run anonymously.
|
1465 |
return;
|
1466 |
}
|
1467 |
|
@@ -1774,9 +1946,11 @@
|
|
1774 |
fs_require_once_template( 'firewall-issues-js.php', $params );
|
1775 |
}
|
1776 |
|
1777 |
-
#endregion
|
1778 |
|
1779 |
-
|
|
|
|
|
1780 |
|
1781 |
/**
|
1782 |
* Generates and sends an HTML email with customizable sections.
|
@@ -1925,9 +2099,11 @@
|
|
1925 |
return $sections;
|
1926 |
}
|
1927 |
|
1928 |
-
#endregion
|
1929 |
|
1930 |
-
|
|
|
|
|
1931 |
|
1932 |
/**
|
1933 |
* Init plugin's Freemius instance.
|
@@ -1981,16 +2157,16 @@
|
|
1981 |
if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
|
1982 |
$this->_admin_notices->has_sticky( 'failed_connect_api' )
|
1983 |
) {
|
1984 |
-
if ( ! $this->_enable_anonymous ) {
|
1985 |
// If anonymous mode is disabled, add firewall admin-notice message.
|
1986 |
add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
|
1987 |
|
1988 |
-
|
1989 |
&$this,
|
1990 |
'_email_about_firewall_issue'
|
1991 |
) );
|
1992 |
|
1993 |
-
|
1994 |
&$this,
|
1995 |
'_retry_connectivity_test'
|
1996 |
) );
|
@@ -2018,34 +2194,32 @@
|
|
2018 |
}
|
2019 |
}
|
2020 |
|
2021 |
-
if ( $this->has_api_connectivity()
|
2022 |
-
|
2023 |
-
* Schedule daily data sync cron if:
|
2024 |
-
*
|
2025 |
-
* 1. User opted-in (for tracking).
|
2026 |
-
* 2. If plugin has add-ons (update add-ons data).
|
2027 |
-
* 3. If skipped, but later upgraded (opted-in via upgrade).
|
2028 |
-
*
|
2029 |
-
* @author Vova Feldman (@svovaf)
|
2030 |
-
* @since 1.1.7.3
|
2031 |
-
*
|
2032 |
-
*/
|
2033 |
-
if ( $this->is_registered() ||
|
2034 |
-
( ! $this->is_activation_mode() && $this->_has_addons )
|
2035 |
-
) {
|
2036 |
-
|
2037 |
$this->hook_callback_to_sync_cron();
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2041 |
}
|
2042 |
-
}
|
2043 |
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
|
|
2049 |
}
|
2050 |
}
|
2051 |
|
@@ -2064,8 +2238,7 @@
|
|
2064 |
}
|
2065 |
|
2066 |
if ( $this->is_user_in_admin() ) {
|
2067 |
-
|
2068 |
-
if ( 'plugins.php' === $pagenow ) {
|
2069 |
$this->hook_plugin_action_links();
|
2070 |
}
|
2071 |
|
@@ -2166,26 +2339,168 @@
|
|
2166 |
$this->do_action( 'after_init_addon_pending_activations' );
|
2167 |
}
|
2168 |
}
|
|
|
2169 |
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
$this->_add_license_action_link();
|
2178 |
-
$this->_require_license_activation_dialog();
|
2179 |
-
}
|
2180 |
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2189 |
}
|
2190 |
}
|
2191 |
|
@@ -2220,7 +2535,7 @@
|
|
2220 |
$parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null );
|
2221 |
// $parent_slug = $this->get_option( $plugin_info['parent'], 'slug', null );
|
2222 |
// $parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null );
|
2223 |
-
$parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
|
2224 |
}
|
2225 |
|
2226 |
if ( false === $id ) {
|
@@ -2279,6 +2594,17 @@
|
|
2279 |
$this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
|
2280 |
}
|
2281 |
$this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2282 |
}
|
2283 |
|
2284 |
/**
|
@@ -2400,11 +2726,9 @@
|
|
2400 |
function _plugin_code_type_changed() {
|
2401 |
$this->_logger->entrance();
|
2402 |
|
2403 |
-
// Schedule code type changes event.
|
2404 |
-
// $this->sync_install();
|
2405 |
-
$this->schedule_install_sync();
|
2406 |
-
|
2407 |
if ( $this->is_premium() ) {
|
|
|
|
|
2408 |
// Activated premium code.
|
2409 |
$this->do_action( 'after_premium_version_activation' );
|
2410 |
|
@@ -2413,6 +2737,7 @@
|
|
2413 |
'trial_started',
|
2414 |
'plan_upgraded',
|
2415 |
'plan_changed',
|
|
|
2416 |
) );
|
2417 |
|
2418 |
$this->_admin_notices->add_sticky(
|
@@ -2421,6 +2746,9 @@
|
|
2421 |
__fs( 'woot', $this->_slug ) . '!'
|
2422 |
);
|
2423 |
} else {
|
|
|
|
|
|
|
2424 |
// Activated free code (after had the premium before).
|
2425 |
$this->do_action( 'after_free_version_reactivation' );
|
2426 |
|
@@ -2429,16 +2757,16 @@
|
|
2429 |
sprintf(
|
2430 |
__fs( 'you-have-x-license', $this->_slug ),
|
2431 |
$this->_site->plan->title
|
2432 |
-
) .
|
2433 |
-
__fs( 'download-x-version-now', $this->_slug ),
|
2434 |
-
$this->_site->plan->title
|
2435 |
-
) ),
|
2436 |
'plan_upgraded',
|
2437 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
2438 |
);
|
2439 |
}
|
2440 |
}
|
2441 |
|
|
|
|
|
|
|
2442 |
/**
|
2443 |
* Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid
|
2444 |
* triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version
|
@@ -2456,9 +2784,11 @@
|
|
2456 |
$this->_storage->prev_is_premium = $this->_plugin->is_premium;
|
2457 |
}
|
2458 |
|
2459 |
-
#endregion
|
2460 |
|
2461 |
-
|
|
|
|
|
2462 |
|
2463 |
/**
|
2464 |
* Check if add-on installed and activated on site.
|
@@ -2655,8 +2985,8 @@
|
|
2655 |
$this->_parent->_admin_notices->add_sticky(
|
2656 |
sprintf(
|
2657 |
__fs( ( $is_after_trial_cancel ?
|
2658 |
-
|
2659 |
-
|
2660 |
$this->_parent->_slug
|
2661 |
),
|
2662 |
'<b>' . $this->_plugin->title . '</b>'
|
@@ -2678,9 +3008,11 @@
|
|
2678 |
return false;
|
2679 |
}
|
2680 |
|
2681 |
-
#endregion
|
2682 |
|
2683 |
-
|
|
|
|
|
2684 |
|
2685 |
/**
|
2686 |
* Set Freemius into sandbox mode for debugging.
|
@@ -2709,7 +3041,7 @@
|
|
2709 |
return ( ! $this->is_live() ) || isset( $this->_plugin->secret_key );
|
2710 |
}
|
2711 |
|
2712 |
-
#endregion
|
2713 |
|
2714 |
/**
|
2715 |
* Check if running test vs. live plugin.
|
@@ -2774,7 +3106,9 @@
|
|
2774 |
return $this->_is_org_compliant;
|
2775 |
}
|
2776 |
|
2777 |
-
|
|
|
|
|
2778 |
|
2779 |
/**
|
2780 |
* @author Vova Feldman (@svovaf)
|
@@ -2831,11 +3165,6 @@
|
|
2831 |
}
|
2832 |
}
|
2833 |
|
2834 |
-
if ( ! $this->is_addon() && $this->_has_addons ) {
|
2835 |
-
// Sync add-ons collection.
|
2836 |
-
$this->_sync_addons( true );
|
2837 |
-
}
|
2838 |
-
|
2839 |
$this->do_action( 'after_sync_cron' );
|
2840 |
}
|
2841 |
|
@@ -2963,7 +3292,9 @@
|
|
2963 |
|
2964 |
#endregion Daily Sync Cron ------------------------------------------------------------------
|
2965 |
|
2966 |
-
|
|
|
|
|
2967 |
|
2968 |
/**
|
2969 |
* @author Vova Feldman (@svovaf)
|
@@ -3088,8 +3419,9 @@
|
|
3088 |
* @since 1.0.7
|
3089 |
*
|
3090 |
* @param bool|string $email
|
|
|
3091 |
*/
|
3092 |
-
function _add_pending_activation_notice( $email = false ) {
|
3093 |
if ( ! is_string( $email ) ) {
|
3094 |
$current_user = self::_get_current_wp_user();
|
3095 |
$email = $current_user->user_email;
|
@@ -3099,7 +3431,8 @@
|
|
3099 |
sprintf(
|
3100 |
__fs( 'pending-activation-message', $this->_slug ),
|
3101 |
'<b>' . $this->get_plugin_name() . '</b>',
|
3102 |
-
'<b>' . $email . '</b>'
|
|
|
3103 |
),
|
3104 |
'activation_pending',
|
3105 |
'Thanks!'
|
@@ -3146,9 +3479,7 @@
|
|
3146 |
|
3147 |
$this->skip_connection();
|
3148 |
|
3149 |
-
|
3150 |
-
exit();
|
3151 |
-
}
|
3152 |
}
|
3153 |
|
3154 |
if ( ! $this->is_addon() && ! $this->is_registered() && ! $this->is_anonymous() ) {
|
@@ -3237,11 +3568,11 @@
|
|
3237 |
jQuery(document).ready(function ($) {
|
3238 |
if ('undefined' !== typeof(jQuery().pointer)) {
|
3239 |
|
3240 |
-
var element = <?php echo $this->apply_filters('optin_pointer_element', '$("#non_existing_element");') ?>;
|
3241 |
|
3242 |
if (element.length > 0) {
|
3243 |
var optin = $(element).pointer($.extend(true, {}, {
|
3244 |
-
content : <?php echo json_encode($pointer_content) ?>,
|
3245 |
position : {
|
3246 |
edge : 'left',
|
3247 |
align: 'center'
|
@@ -3251,10 +3582,10 @@
|
|
3251 |
return '';
|
3252 |
},
|
3253 |
pointerWidth: 482
|
3254 |
-
}, <?php echo $this->apply_filters('optin_pointer_options_json', '{}') ?>));
|
3255 |
|
3256 |
<?php
|
3257 |
-
echo $this->apply_filters('optin_pointer_execute', "
|
3258 |
|
3259 |
optin.pointer('open');
|
3260 |
|
@@ -3263,12 +3594,12 @@
|
|
3263 |
.parents('.wp-pointer.wp-pointer-top')
|
3264 |
.addClass('fs-opt-in-pointer');
|
3265 |
|
3266 |
-
", 'element', 'optin') ?>
|
3267 |
}
|
3268 |
}
|
3269 |
});
|
3270 |
// ]]></script>
|
3271 |
-
|
3272 |
}
|
3273 |
|
3274 |
/**
|
@@ -3384,6 +3715,18 @@
|
|
3384 |
$this->_storage->is_plugin_new_install;
|
3385 |
}
|
3386 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3387 |
/**
|
3388 |
* Plugin activated hook.
|
3389 |
*
|
@@ -3405,17 +3748,32 @@
|
|
3405 |
FS_Api::clear_cache();
|
3406 |
|
3407 |
if ( $this->is_registered() ) {
|
|
|
|
|
3408 |
// Schedule re-activation event and sync.
|
3409 |
// $this->sync_install( array(), true );
|
3410 |
$this->schedule_install_sync();
|
3411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3412 |
/**
|
3413 |
-
*
|
|
|
|
|
|
|
3414 |
*/
|
3415 |
-
if (
|
3416 |
-
|
3417 |
-
|
3418 |
|
|
|
|
|
3419 |
$this->_admin_notices->add(
|
3420 |
sprintf( __fs( 'successful-version-upgrade-message', $this->_slug ), sprintf( '<b>%s</b>', $this->_plugin->title ) ),
|
3421 |
__fs( 'woot', $this->_slug ) . '!'
|
@@ -3626,9 +3984,7 @@
|
|
3626 |
|
3627 |
$this->reset_anonymous_mode();
|
3628 |
|
3629 |
-
|
3630 |
-
exit();
|
3631 |
-
}
|
3632 |
}
|
3633 |
|
3634 |
/**
|
@@ -3835,7 +4191,8 @@
|
|
3835 |
}
|
3836 |
|
3837 |
// Get active theme.
|
3838 |
-
$active_theme
|
|
|
3839 |
|
3840 |
// Check if there's a change in themes.
|
3841 |
$all_themes = wp_get_themes();
|
@@ -3845,7 +4202,7 @@
|
|
3845 |
|
3846 |
$themes_signature = '';
|
3847 |
foreach ( $all_themes as $slug => $data ) {
|
3848 |
-
$is_active = ( $slug === $
|
3849 |
$themes_signature .= $slug . ',' .
|
3850 |
$data->version . ',' .
|
3851 |
( $is_active ? '1' : '0' ) . ';';
|
@@ -3861,7 +4218,7 @@
|
|
3861 |
|
3862 |
// Update existing themes info.
|
3863 |
foreach ( $all_cached_themes->themes as $slug => $data ) {
|
3864 |
-
$is_active = ( $slug === $
|
3865 |
|
3866 |
if ( ! isset( $all_themes[ $slug ] ) ) {
|
3867 |
// Plugin uninstalled.
|
@@ -3887,7 +4244,7 @@
|
|
3887 |
// Find new themes that weren't yet seen before.
|
3888 |
foreach ( $all_themes as $slug => $data ) {
|
3889 |
if ( ! isset( $all_cached_themes->themes[ $slug ] ) ) {
|
3890 |
-
$is_active = ( $slug === $
|
3891 |
|
3892 |
// New plugin.
|
3893 |
$new_plugin = array(
|
@@ -3953,11 +4310,13 @@
|
|
3953 |
'language' => get_bloginfo( 'language' ),
|
3954 |
'charset' => get_bloginfo( 'charset' ),
|
3955 |
'platform_version' => get_bloginfo( 'version' ),
|
|
|
3956 |
'programming_language_version' => phpversion(),
|
3957 |
'title' => get_bloginfo( 'name' ),
|
3958 |
'url' => get_site_url(),
|
3959 |
// Special params.
|
3960 |
'is_active' => true,
|
|
|
3961 |
'is_uninstalled' => false,
|
3962 |
), $override );
|
3963 |
}
|
@@ -3987,7 +4346,7 @@
|
|
3987 |
|
3988 |
foreach ( $check_properties as $p => $v ) {
|
3989 |
if ( property_exists( $this->_site, $p ) ) {
|
3990 |
-
if ( ! empty( $this->_site->{$p} ) &&
|
3991 |
$this->_site->{$p} != $v
|
3992 |
) {
|
3993 |
$this->_site->{$p} = $v;
|
@@ -4023,7 +4382,7 @@
|
|
4023 |
// Send updated values to FS.
|
4024 |
$site = $this->get_api_site_scope()->call( '/', 'put', $params );
|
4025 |
|
4026 |
-
if (
|
4027 |
// I successfully sent install update, clear scheduled sync if exist.
|
4028 |
$this->clear_install_sync_cron();
|
4029 |
}
|
@@ -4042,8 +4401,6 @@
|
|
4042 |
*
|
4043 |
* @param string[] string $override
|
4044 |
* @param bool $flush
|
4045 |
-
*
|
4046 |
-
* @return false|object|string
|
4047 |
*/
|
4048 |
private function sync_install( $override = array(), $flush = false ) {
|
4049 |
$this->_logger->entrance();
|
@@ -4055,7 +4412,7 @@
|
|
4055 |
return;
|
4056 |
}
|
4057 |
|
4058 |
-
if ( $this->
|
4059 |
// Failed to sync, don't update locally.
|
4060 |
return;
|
4061 |
}
|
@@ -4068,10 +4425,98 @@
|
|
4068 |
}
|
4069 |
|
4070 |
/**
|
4071 |
-
*
|
4072 |
*
|
4073 |
-
*
|
4074 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4075 |
*
|
4076 |
* @param bool $check_user Enforce checking if user have plugins activation privileges.
|
4077 |
*/
|
@@ -4082,16 +4527,22 @@
|
|
4082 |
return;
|
4083 |
}
|
4084 |
|
4085 |
-
$params
|
|
|
4086 |
if ( isset( $this->_storage->uninstall_reason ) ) {
|
4087 |
-
$
|
4088 |
-
$params['
|
|
|
4089 |
}
|
4090 |
|
4091 |
-
if ( ! $this->is_registered() && isset( $
|
4092 |
// Send anonymous uninstall event only if user submitted a feedback.
|
4093 |
-
$
|
4094 |
-
|
|
|
|
|
|
|
|
|
4095 |
} else {
|
4096 |
// Send uninstall event.
|
4097 |
$this->send_install_update( array_merge( $params, array(
|
@@ -4152,7 +4603,9 @@
|
|
4152 |
}
|
4153 |
}
|
4154 |
|
4155 |
-
|
|
|
|
|
4156 |
|
4157 |
/**
|
4158 |
* Load WordPress core plugin.php essential module.
|
@@ -4162,6 +4615,8 @@
|
|
4162 |
*/
|
4163 |
private static function require_plugin_essentials() {
|
4164 |
if ( ! function_exists( 'get_plugins' ) ) {
|
|
|
|
|
4165 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
4166 |
}
|
4167 |
}
|
@@ -4226,6 +4681,28 @@
|
|
4226 |
return $this->_plugin->id;
|
4227 |
}
|
4228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4229 |
/**
|
4230 |
* @author Vova Feldman (@svovaf)
|
4231 |
* @since 1.0.1
|
@@ -4450,7 +4927,7 @@
|
|
4450 |
* @author Vova Feldman (@svovaf)
|
4451 |
* @since 1.0.6
|
4452 |
*
|
4453 |
-
* @return FS_Plugin[]
|
4454 |
*/
|
4455 |
private static function get_all_addons() {
|
4456 |
$addons = self::$_accounts->get_option( 'addons', array() );
|
@@ -4489,6 +4966,18 @@
|
|
4489 |
return is_object( $this->_user );
|
4490 |
}
|
4491 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4492 |
/**
|
4493 |
* @author Vova Feldman (@svovaf)
|
4494 |
* @since 1.0.4
|
@@ -4527,39 +5016,22 @@
|
|
4527 |
*
|
4528 |
* @since 1.1.7.3 If not yet loaded, fetch data from the API.
|
4529 |
*
|
|
|
|
|
4530 |
* @return FS_Plugin[]|false
|
4531 |
*/
|
4532 |
-
function get_addons() {
|
4533 |
$this->_logger->entrance();
|
4534 |
|
4535 |
-
$
|
4536 |
-
|
4537 |
-
/**
|
4538 |
-
* @since 1.1.7.3 If not yet loaded, fetch data from the API.
|
4539 |
-
*/
|
4540 |
-
if ( ! is_array( $all_addons ) ||
|
4541 |
-
! isset( $all_addons[ $this->_plugin->id ] ) ||
|
4542 |
-
! is_array( $all_addons[ $this->_plugin->id ] ) ||
|
4543 |
-
empty( $all_addons[ $this->_plugin->id ] )
|
4544 |
-
) {
|
4545 |
-
if ( $this->_has_addons ) {
|
4546 |
-
$addons = $this->_sync_addons();
|
4547 |
-
|
4548 |
-
if ( ! empty( $addons ) ) {
|
4549 |
-
$all_addons = self::get_all_addons();
|
4550 |
-
}
|
4551 |
-
}
|
4552 |
-
}
|
4553 |
-
|
4554 |
-
if ( ! is_array( $all_addons ) ||
|
4555 |
-
! isset( $all_addons[ $this->_plugin->id ] ) ||
|
4556 |
-
! is_array( $all_addons[ $this->_plugin->id ] ) ||
|
4557 |
-
empty( $all_addons[ $this->_plugin->id ] )
|
4558 |
-
) {
|
4559 |
return false;
|
4560 |
}
|
4561 |
|
4562 |
-
|
|
|
|
|
|
|
|
|
4563 |
}
|
4564 |
|
4565 |
/**
|
@@ -4633,16 +5105,18 @@
|
|
4633 |
*
|
4634 |
* @param string $slug
|
4635 |
*
|
|
|
|
|
4636 |
* @return FS_Plugin|false
|
4637 |
*/
|
4638 |
-
function get_addon_by_slug( $slug ) {
|
4639 |
$this->_logger->entrance();
|
4640 |
|
4641 |
-
$addons = $this->get_addons();
|
4642 |
|
4643 |
if ( is_array( $addons ) ) {
|
4644 |
foreach ( $addons as $addon ) {
|
4645 |
-
if ( $slug
|
4646 |
return $addon;
|
4647 |
}
|
4648 |
}
|
@@ -4651,7 +5125,9 @@
|
|
4651 |
return false;
|
4652 |
}
|
4653 |
|
4654 |
-
|
|
|
|
|
4655 |
|
4656 |
/**
|
4657 |
* Check if running premium plugin code.
|
@@ -4693,10 +5169,12 @@
|
|
4693 |
* @author Vova Feldman (@svovaf)
|
4694 |
* @since 1.0.9
|
4695 |
*
|
4696 |
-
* @return FS_Plugin_Plan
|
4697 |
*/
|
4698 |
function get_plan() {
|
4699 |
-
return is_object( $this->_site->plan ) ?
|
|
|
|
|
4700 |
}
|
4701 |
|
4702 |
/**
|
@@ -4730,7 +5208,7 @@
|
|
4730 |
return false;
|
4731 |
}
|
4732 |
|
4733 |
-
return $this->
|
4734 |
}
|
4735 |
|
4736 |
/**
|
@@ -4769,7 +5247,7 @@
|
|
4769 |
}
|
4770 |
|
4771 |
/**
|
4772 |
-
* Check if the user has an
|
4773 |
*
|
4774 |
* @since 1.0.9
|
4775 |
*
|
@@ -4789,7 +5267,7 @@
|
|
4789 |
return (
|
4790 |
! $this->is_trial() &&
|
4791 |
'free' !== $this->_site->plan->name &&
|
4792 |
-
$this->
|
4793 |
);
|
4794 |
}
|
4795 |
|
@@ -4844,7 +5322,7 @@
|
|
4844 |
* @author Vova Feldman (@svovaf)
|
4845 |
* @since 1.0.5
|
4846 |
*
|
4847 |
-
* @return FS_Plugin_License
|
4848 |
*/
|
4849 |
function _get_available_premium_license() {
|
4850 |
$this->_logger->entrance();
|
@@ -4874,7 +5352,8 @@
|
|
4874 |
*/
|
4875 |
function _sync_plans() {
|
4876 |
$plans = $this->_fetch_plugin_plans();
|
4877 |
-
|
|
|
4878 |
$this->_plans = $plans;
|
4879 |
$this->_store_plans();
|
4880 |
}
|
@@ -4890,7 +5369,7 @@
|
|
4890 |
*
|
4891 |
* @param number $id
|
4892 |
*
|
4893 |
-
* @return FS_Plugin_Plan
|
4894 |
*/
|
4895 |
function _get_plan_by_id( $id ) {
|
4896 |
$this->_logger->entrance();
|
@@ -4944,7 +5423,8 @@
|
|
4944 |
*/
|
4945 |
function _sync_licenses( $site_license_id = false ) {
|
4946 |
$licenses = $this->_fetch_licenses( false, $site_license_id );
|
4947 |
-
|
|
|
4948 |
$this->_licenses = $licenses;
|
4949 |
$this->_store_licenses();
|
4950 |
}
|
@@ -4963,7 +5443,7 @@
|
|
4963 |
*
|
4964 |
* @param number $id
|
4965 |
*
|
4966 |
-
* @return FS_Plugin_License
|
4967 |
*/
|
4968 |
function _get_license_by_id( $id ) {
|
4969 |
$this->_logger->entrance();
|
@@ -5174,7 +5654,8 @@
|
|
5174 |
* @return bool
|
5175 |
*/
|
5176 |
function has_paid_plan() {
|
5177 |
-
return $this->_has_paid_plans ||
|
|
|
5178 |
}
|
5179 |
|
5180 |
/**
|
@@ -5187,6 +5668,17 @@
|
|
5187 |
*/
|
5188 |
function has_trial_plan() {
|
5189 |
if ( ! $this->is_registered() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5190 |
return false;
|
5191 |
}
|
5192 |
|
@@ -5204,7 +5696,7 @@
|
|
5204 |
* @return bool
|
5205 |
*/
|
5206 |
function has_free_plan() {
|
5207 |
-
return ! $this->is_only_premium()
|
5208 |
}
|
5209 |
|
5210 |
/**
|
@@ -5216,46 +5708,64 @@
|
|
5216 |
* @since 1.1.9
|
5217 |
*/
|
5218 |
function _add_license_activation_dialog_box() {
|
5219 |
-
if ( $this->is_addon() ) {
|
5220 |
-
$sync_license_url = $this->get_parent_instance()->_get_sync_license_url( $this->_plugin->id, true );
|
5221 |
-
} else {
|
5222 |
-
$sync_license_url = $this->_get_sync_license_url( $this->_plugin->id, true );
|
5223 |
-
}
|
5224 |
-
|
5225 |
$vars = array(
|
5226 |
-
'slug'
|
5227 |
-
// Avoid having HTML entity like "&" in the URL which breaks the redirection to the "Account" page.
|
5228 |
-
'sync-license-url' => html_entity_decode( $sync_license_url )
|
5229 |
);
|
5230 |
|
5231 |
fs_require_template( 'forms/license-activation.php', $vars );
|
5232 |
fs_require_template( 'forms/resend-key.php', $vars );
|
5233 |
}
|
5234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5235 |
/**
|
5236 |
* Prepare page to include all required UI and logic for the license activation dialog.
|
5237 |
*
|
5238 |
* @author Vova Feldman (@svovaf)
|
5239 |
* @since 1.2.0
|
5240 |
*/
|
5241 |
-
function
|
5242 |
-
if (
|
5243 |
-
|
5244 |
-
|
5245 |
-
|
5246 |
-
}
|
5247 |
|
5248 |
-
|
5249 |
-
|
5250 |
-
|
5251 |
-
|
5252 |
-
|
5253 |
-
|
5254 |
-
|
5255 |
-
|
5256 |
-
|
5257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5258 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
5259 |
}
|
5260 |
|
5261 |
/**
|
@@ -5263,29 +5773,40 @@
|
|
5263 |
* @since 1.1.9
|
5264 |
*/
|
5265 |
function _activate_license_ajax_action() {
|
5266 |
-
$license_key = trim( fs_request_get('license_key') );
|
5267 |
|
5268 |
if ( empty( $license_key ) ) {
|
5269 |
exit;
|
5270 |
}
|
5271 |
|
5272 |
-
$slug
|
5273 |
-
$fs
|
5274 |
-
$error
|
|
|
5275 |
|
5276 |
if ( $this->is_registered() ) {
|
5277 |
$api = $fs->get_api_site_scope();
|
5278 |
-
$install = $api->call( '/', 'put',
|
5279 |
-
|
5280 |
-
|
5281 |
-
)
|
5282 |
-
);
|
5283 |
|
5284 |
if ( isset( $install->error ) ) {
|
5285 |
$error = $install->error->message;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5286 |
}
|
5287 |
} else {
|
5288 |
-
$this->opt_in( false, false, false, $license_key );
|
|
|
|
|
|
|
|
|
5289 |
}
|
5290 |
|
5291 |
$result = array(
|
@@ -5294,6 +5815,8 @@
|
|
5294 |
|
5295 |
if ( false !== $error ) {
|
5296 |
$result['error'] = $error;
|
|
|
|
|
5297 |
}
|
5298 |
|
5299 |
echo json_encode( $result );
|
@@ -5301,6 +5824,75 @@
|
|
5301 |
exit;
|
5302 |
}
|
5303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5304 |
/**
|
5305 |
* @author Leo Fajardo (@leorw)
|
5306 |
* @since 1.2.0
|
@@ -5350,7 +5942,23 @@
|
|
5350 |
exit;
|
5351 |
}
|
5352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5353 |
#region URL Generators
|
|
|
5354 |
|
5355 |
/**
|
5356 |
* Alias to pricing_url().
|
@@ -5594,7 +6202,7 @@
|
|
5594 |
$ajax_action = fs_request_get( 'action' );
|
5595 |
|
5596 |
foreach ( $actions as $action ) {
|
5597 |
-
if ( $ajax_action === $action ) {
|
5598 |
return true;
|
5599 |
}
|
5600 |
}
|
@@ -5649,6 +6257,12 @@
|
|
5649 |
* @return string
|
5650 |
*/
|
5651 |
function _get_admin_page_url( $page = '', $params = array() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
5652 |
if ( ! $this->_menu->is_top_level() ) {
|
5653 |
$parent_slug = $this->_menu->get_parent_slug();
|
5654 |
$menu_file = ( false !== strpos( $parent_slug, '.php' ) ) ?
|
@@ -5725,7 +6339,7 @@
|
|
5725 |
self::require_pluggable_essentials();
|
5726 |
|
5727 |
return ( $add_action_nonce && is_string( $action ) ) ?
|
5728 |
-
|
5729 |
$this->_get_admin_page_url( 'account', $params );
|
5730 |
}
|
5731 |
|
@@ -5920,9 +6534,7 @@
|
|
5920 |
$this->_set_account( $user, $site, $plans );
|
5921 |
|
5922 |
// Reload the page with the keys.
|
5923 |
-
|
5924 |
-
exit();
|
5925 |
-
}
|
5926 |
}
|
5927 |
}
|
5928 |
|
@@ -5950,7 +6562,9 @@
|
|
5950 |
return false;
|
5951 |
}
|
5952 |
|
5953 |
-
|
|
|
|
|
5954 |
|
5955 |
/***
|
5956 |
* Load account information (user + site).
|
@@ -5992,7 +6606,7 @@
|
|
5992 |
// Load plans.
|
5993 |
$this->_plans = $plans[ $this->_slug ];
|
5994 |
if ( ! is_array( $this->_plans ) || empty( $this->_plans ) ) {
|
5995 |
-
$this->_sync_plans(
|
5996 |
} else {
|
5997 |
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
5998 |
if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) {
|
@@ -6061,33 +6675,50 @@
|
|
6061 |
|
6062 |
$current_user = self::_get_current_wp_user();
|
6063 |
|
6064 |
-
$
|
6065 |
-
|
6066 |
-
|
6067 |
-
|
6068 |
-
'
|
6069 |
-
|
6070 |
-
'plugin_slug' => $this->_slug,
|
6071 |
-
'plugin_id' => $this->get_id(),
|
6072 |
-
'plugin_public_key' => $this->get_public_key(),
|
6073 |
-
'plugin_version' => $this->get_plugin_version(),
|
6074 |
-
'return_url' => wp_nonce_url( $this->_get_admin_page_url(
|
6075 |
'',
|
6076 |
-
array( 'fs_action' => $
|
6077 |
-
)
|
6078 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6079 |
'account',
|
6080 |
array( 'fs_action' => 'sync_user' )
|
6081 |
), 'sync_user' ),
|
6082 |
-
'site_uid'
|
6083 |
-
'site_url'
|
6084 |
-
'site_name'
|
6085 |
-
'platform_version'
|
6086 |
-
'
|
6087 |
-
'
|
6088 |
-
'
|
|
|
|
|
|
|
|
|
6089 |
);
|
6090 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6091 |
if ( WP_FS__SKIP_EMAIL_ACTIVATION && $this->has_secret_key() ) {
|
6092 |
// Even though rand() is known for its security issues,
|
6093 |
// the timestamp adds another layer of protection.
|
@@ -6107,17 +6738,32 @@
|
|
6107 |
}
|
6108 |
|
6109 |
/**
|
|
|
|
|
|
|
6110 |
* @author Vova Feldman (@svovaf)
|
6111 |
* @since 1.1.7.4
|
6112 |
*
|
6113 |
* @param string|bool $email
|
6114 |
* @param string|bool $first
|
6115 |
* @param string|bool $last
|
6116 |
-
* @param string|bool $
|
6117 |
-
*
|
6118 |
-
*
|
6119 |
-
|
6120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6121 |
$this->_logger->entrance();
|
6122 |
|
6123 |
if ( false === $email ) {
|
@@ -6125,11 +6771,20 @@
|
|
6125 |
$email = $current_user->user_email;
|
6126 |
}
|
6127 |
|
6128 |
-
|
6129 |
-
|
6130 |
-
|
|
|
|
|
|
|
|
|
6131 |
|
6132 |
-
|
|
|
|
|
|
|
|
|
|
|
6133 |
}
|
6134 |
|
6135 |
$user_info = array();
|
@@ -6145,8 +6800,19 @@
|
|
6145 |
|
6146 |
$params = $this->get_opt_in_params( $user_info );
|
6147 |
|
6148 |
-
|
6149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6150 |
}
|
6151 |
|
6152 |
$params['format'] = 'json';
|
@@ -6165,26 +6831,45 @@
|
|
6165 |
if ( $response instanceof WP_Error ) {
|
6166 |
if ( 'https://' === substr( $url, 0, 8 ) &&
|
6167 |
isset( $response->errors ) &&
|
6168 |
-
isset( $response->errors['http_request_failed'] )
|
6169 |
-
false !== strpos( $response->errors['http_request_failed'][0], 'sslv3 alert handshake' )
|
6170 |
) {
|
6171 |
-
|
6172 |
-
$url = 'http://' . substr( $url, 8 );
|
6173 |
|
6174 |
-
|
6175 |
-
|
6176 |
-
'
|
6177 |
-
'timeout' => 15,
|
6178 |
-
) );
|
6179 |
-
}
|
6180 |
|
6181 |
-
|
6182 |
-
|
|
|
|
|
|
|
|
|
6183 |
}
|
6184 |
}
|
6185 |
|
6186 |
if ( is_wp_error( $response ) ) {
|
6187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6188 |
}
|
6189 |
|
6190 |
$decoded = @json_decode( $response['body'] );
|
@@ -6193,15 +6878,25 @@
|
|
6193 |
return false;
|
6194 |
}
|
6195 |
|
6196 |
-
if (
|
6197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6198 |
} else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) {
|
6199 |
// Pending activation, add message.
|
6200 |
-
$this->set_pending_confirmation(
|
6201 |
-
|
6202 |
-
|
|
|
|
|
|
|
6203 |
} else if ( isset( $decoded->install_secret_key ) ) {
|
6204 |
-
$this->install_with_new_user(
|
6205 |
$decoded->user_id,
|
6206 |
$decoded->user_public_key,
|
6207 |
$decoded->user_secret_key,
|
@@ -6210,11 +6905,9 @@
|
|
6210 |
$decoded->install_secret_key,
|
6211 |
false
|
6212 |
);
|
6213 |
-
|
6214 |
-
return true;
|
6215 |
}
|
6216 |
|
6217 |
-
return
|
6218 |
}
|
6219 |
|
6220 |
/**
|
@@ -6227,7 +6920,7 @@
|
|
6227 |
* @param FS_Site $site
|
6228 |
* @param bool $redirect
|
6229 |
*
|
6230 |
-
* @return
|
6231 |
*/
|
6232 |
function setup_account( FS_User $user, FS_Site $site, $redirect = true ) {
|
6233 |
$this->_user = $user;
|
@@ -6253,6 +6946,8 @@
|
|
6253 |
$this->_license = $this->_get_license_by_id( $site->license_id );
|
6254 |
}
|
6255 |
|
|
|
|
|
6256 |
if ( $this->is_pending_activation() ) {
|
6257 |
// Remove pending activation sticky notice (if still exist).
|
6258 |
$this->_admin_notices->remove_sticky( 'activation_pending' );
|
@@ -6260,7 +6955,7 @@
|
|
6260 |
// Remove plugin from pending activation mode.
|
6261 |
unset( $this->_storage->is_pending_activation );
|
6262 |
|
6263 |
-
if ( ! $this->
|
6264 |
$this->_admin_notices->add_sticky(
|
6265 |
sprintf( __fs( 'plugin-x-activation-message', $this->_slug ), '<b>' . $this->get_plugin_name() . '</b>' ),
|
6266 |
'activation_complete'
|
@@ -6268,18 +6963,30 @@
|
|
6268 |
}
|
6269 |
}
|
6270 |
|
6271 |
-
if ( $this->
|
6272 |
-
$this->
|
6273 |
-
|
6274 |
-
|
6275 |
-
|
6276 |
-
|
6277 |
-
|
6278 |
-
|
6279 |
-
|
6280 |
-
|
6281 |
-
|
6282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6283 |
}
|
6284 |
|
6285 |
$plugin_id = fs_request_get( 'plugin_id', false );
|
@@ -6289,14 +6996,12 @@
|
|
6289 |
$this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
|
6290 |
}
|
6291 |
|
|
|
|
|
6292 |
if ( is_numeric( $plugin_id ) ) {
|
6293 |
if ( $plugin_id != $this->_plugin->id ) {
|
6294 |
// Add-on was installed - sync license right after install.
|
6295 |
-
|
6296 |
-
) {
|
6297 |
-
exit();
|
6298 |
-
}
|
6299 |
-
|
6300 |
}
|
6301 |
} else {
|
6302 |
/**
|
@@ -6308,10 +7013,17 @@
|
|
6308 |
}
|
6309 |
|
6310 |
// Reload the page with the keys.
|
6311 |
-
|
6312 |
-
|
6313 |
-
|
|
|
|
|
|
|
|
|
|
|
6314 |
}
|
|
|
|
|
6315 |
}
|
6316 |
|
6317 |
/**
|
@@ -6330,8 +7042,6 @@
|
|
6330 |
if ( fs_request_is_action( $this->_slug . '_activate_new' ) ) {
|
6331 |
// check_admin_referer( $this->_slug . '_activate_new' );
|
6332 |
|
6333 |
-
$this->_admin_notices->remove_sticky( 'connect_account' );
|
6334 |
-
|
6335 |
if ( fs_request_has( 'user_secret_key' ) ) {
|
6336 |
$this->install_with_new_user(
|
6337 |
fs_request_get( 'user_id' ),
|
@@ -6360,6 +7070,8 @@
|
|
6360 |
* @param string $install_public_key
|
6361 |
* @param string $install_secret_key
|
6362 |
* @param bool $redirect
|
|
|
|
|
6363 |
*/
|
6364 |
private function install_with_new_user(
|
6365 |
$user_id,
|
@@ -6390,26 +7102,49 @@
|
|
6390 |
$site = new FS_Site( $site_result );
|
6391 |
$this->_site = $site;
|
6392 |
|
6393 |
-
$this->setup_account( $this->_user, $this->_site, $redirect );
|
6394 |
}
|
6395 |
|
6396 |
/**
|
6397 |
* @author Vova Feldman (@svovaf)
|
6398 |
* @since 1.1.7.4
|
6399 |
*
|
6400 |
-
* @param bool $email
|
6401 |
-
* @param bool
|
|
|
|
|
|
|
|
|
6402 |
*/
|
6403 |
-
private function set_pending_confirmation(
|
|
|
|
|
|
|
|
|
|
|
6404 |
// Install must be activated via email since
|
6405 |
// user with the same email already exist.
|
6406 |
$this->_storage->is_pending_activation = true;
|
6407 |
-
$this->_add_pending_activation_notice( $email );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6408 |
|
6409 |
// Reload the page with with pending activation message.
|
6410 |
-
if ( $redirect
|
6411 |
-
|
6412 |
}
|
|
|
|
|
6413 |
}
|
6414 |
|
6415 |
/**
|
@@ -6428,7 +7163,13 @@
|
|
6428 |
if ( fs_request_is_action( $this->_slug . '_activate_existing' ) && fs_request_is_post() ) {
|
6429 |
// check_admin_referer( 'activate_existing_' . $this->_plugin->public_key );
|
6430 |
|
6431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6432 |
}
|
6433 |
}
|
6434 |
|
@@ -6437,11 +7178,18 @@
|
|
6437 |
* @author Vova Feldman (@svovaf)
|
6438 |
* @since 1.1.7.4
|
6439 |
*
|
6440 |
-
* @param bool $
|
|
|
|
|
|
|
|
|
|
|
6441 |
*/
|
6442 |
-
private function install_with_current_user(
|
6443 |
-
$
|
6444 |
-
|
|
|
|
|
6445 |
// Get current logged WP user.
|
6446 |
$current_user = self::_get_current_wp_user();
|
6447 |
|
@@ -6455,24 +7203,30 @@
|
|
6455 |
'uid' => $this->get_anonymous_id(),
|
6456 |
);
|
6457 |
|
6458 |
-
/**
|
6459 |
-
* @author Vova Feldman (@svovaf)
|
6460 |
-
* @since 1.1.9 Add license key if given.
|
6461 |
-
*/
|
6462 |
-
$license_key = fs_request_get( 'license_secret_key' );
|
6463 |
-
|
6464 |
if ( ! empty( $license_key ) ) {
|
6465 |
-
$
|
|
|
|
|
|
|
6466 |
}
|
6467 |
|
|
|
|
|
6468 |
// Install the plugin.
|
6469 |
$install = $this->get_api_user_scope()->call(
|
6470 |
"/plugins/{$this->get_id()}/installs.json",
|
6471 |
'post',
|
6472 |
-
$
|
6473 |
);
|
6474 |
|
6475 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6476 |
$this->_admin_notices->add(
|
6477 |
sprintf( __fs( 'could-not-activate-x', $this->_slug ), $this->get_plugin_name() ) . ' ' .
|
6478 |
__fs( 'contact-us-with-error-message', $this->_slug ) . ' ' . '<b>' . $install->error->message . '</b>',
|
@@ -6480,17 +7234,17 @@
|
|
6480 |
'error'
|
6481 |
);
|
6482 |
|
6483 |
-
|
|
|
|
|
|
|
|
|
6484 |
}
|
6485 |
|
6486 |
$site = new FS_Site( $install );
|
6487 |
$this->_site = $site;
|
6488 |
-
// $this->_enrich_site_plan( false );
|
6489 |
|
6490 |
-
|
6491 |
-
// $this->_sync_plans();
|
6492 |
-
|
6493 |
-
$this->setup_account( $this->_user, $this->_site, $redirect );
|
6494 |
}
|
6495 |
|
6496 |
/**
|
@@ -6549,9 +7303,11 @@
|
|
6549 |
$this->_activate_license( true );
|
6550 |
}
|
6551 |
|
6552 |
-
#endregion
|
6553 |
|
6554 |
-
|
|
|
|
|
6555 |
|
6556 |
private $_menu_items = array();
|
6557 |
|
@@ -6609,8 +7365,6 @@
|
|
6609 |
/**
|
6610 |
* @author Vova Feldman (@svovaf)
|
6611 |
* @since 1.0.1
|
6612 |
-
*
|
6613 |
-
* @return string
|
6614 |
*/
|
6615 |
function _redirect_on_clicked_menu_link() {
|
6616 |
$this->_logger->entrance();
|
@@ -6622,7 +7376,7 @@
|
|
6622 |
foreach ( $this->_menu_items as $priority => $items ) {
|
6623 |
foreach ( $items as $item ) {
|
6624 |
if ( isset( $item['url'] ) ) {
|
6625 |
-
if ( $page === strtolower( $item['menu_slug'] ) ) {
|
6626 |
$this->_logger->log( 'Redirecting to ' . $item['url'] );
|
6627 |
|
6628 |
fs_redirect( $item['url'] );
|
@@ -6712,6 +7466,30 @@
|
|
6712 |
}
|
6713 |
}
|
6714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6715 |
/**
|
6716 |
* @author Vova Feldman (@svovaf)
|
6717 |
* @since 1.0.0
|
@@ -6779,16 +7557,32 @@
|
|
6779 |
// to support add-ons checkout but don't add the submenu item.
|
6780 |
// || (isset( $_GET['page'] ) && $this->_menu->get_slug( 'pricing' ) == $_GET['page']);
|
6781 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6782 |
// Add upgrade/pricing page.
|
6783 |
$this->add_submenu_item(
|
6784 |
-
|
6785 |
array( &$this, '_pricing_page_render' ),
|
6786 |
$this->get_plugin_name() . ' – ' . __fs( 'pricing', $this->_slug ),
|
6787 |
'manage_options',
|
6788 |
'pricing',
|
6789 |
'Freemius::_clean_admin_content_section',
|
6790 |
WP_FS__LOWEST_PRIORITY,
|
6791 |
-
$show_pricing
|
|
|
6792 |
);
|
6793 |
}
|
6794 |
}
|
@@ -6817,22 +7611,36 @@
|
|
6817 |
*/
|
6818 |
private function embed_submenu_items() {
|
6819 |
$item_template = $this->_menu->is_top_level() ?
|
6820 |
-
'<span class="fs-submenu-item">%s</span>' :
|
6821 |
-
'<span class="fs-submenu-item fs-sub">%s</span>';
|
|
|
|
|
6822 |
|
6823 |
ksort( $this->_menu_items );
|
6824 |
|
6825 |
foreach ( $this->_menu_items as $priority => $items ) {
|
6826 |
foreach ( $items as $item ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6827 |
if ( ! isset( $item['url'] ) ) {
|
6828 |
$hook = add_submenu_page(
|
6829 |
$item['show_submenu'] ?
|
6830 |
$this->get_top_level_menu_slug() :
|
6831 |
null,
|
6832 |
$item['page_title'],
|
6833 |
-
|
6834 |
-
$
|
6835 |
-
$
|
6836 |
$item['render_function']
|
6837 |
);
|
6838 |
|
@@ -6843,9 +7651,9 @@
|
|
6843 |
add_submenu_page(
|
6844 |
$this->get_top_level_menu_slug(),
|
6845 |
$item['page_title'],
|
6846 |
-
|
6847 |
-
$
|
6848 |
-
$
|
6849 |
array( $this, '' )
|
6850 |
);
|
6851 |
}
|
@@ -6865,6 +7673,16 @@
|
|
6865 |
|
6866 |
$menu_slug = $this->_menu->get_top_level_menu_slug();
|
6867 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6868 |
if ( empty( $submenu[ $menu_slug ] ) ) {
|
6869 |
return;
|
6870 |
}
|
@@ -6928,7 +7746,7 @@
|
|
6928 |
$this->apply_filters( 'support_forum_submenu', __fs( 'support-forum', $this->_slug ) ),
|
6929 |
$this->apply_filters( 'support_forum_url', 'https://wordpress.org/support/plugin/' . $this->_slug ),
|
6930 |
'wp-support-forum',
|
6931 |
-
|
6932 |
50
|
6933 |
);
|
6934 |
}
|
@@ -6947,6 +7765,7 @@
|
|
6947 |
* @param bool|callable $before_render_function
|
6948 |
* @param int $priority
|
6949 |
* @param bool $show_submenu
|
|
|
6950 |
*/
|
6951 |
function add_submenu_item(
|
6952 |
$menu_title,
|
@@ -6956,7 +7775,8 @@
|
|
6956 |
$menu_slug = false,
|
6957 |
$before_render_function = false,
|
6958 |
$priority = WP_FS__DEFAULT_PRIORITY,
|
6959 |
-
$show_submenu = true
|
|
|
6960 |
) {
|
6961 |
$this->_logger->entrance( 'Title = ' . $menu_title );
|
6962 |
|
@@ -6972,7 +7792,8 @@
|
|
6972 |
$menu_slug,
|
6973 |
$before_render_function,
|
6974 |
$priority,
|
6975 |
-
$show_submenu
|
|
|
6976 |
);
|
6977 |
|
6978 |
return;
|
@@ -6987,10 +7808,11 @@
|
|
6987 |
'page_title' => is_string( $page_title ) ? $page_title : $menu_title,
|
6988 |
'menu_title' => $menu_title,
|
6989 |
'capability' => $capability,
|
6990 |
-
'menu_slug' =>
|
6991 |
'render_function' => $render_function,
|
6992 |
'before_render_function' => $before_render_function,
|
6993 |
'show_submenu' => $show_submenu,
|
|
|
6994 |
);
|
6995 |
}
|
6996 |
|
@@ -7037,7 +7859,7 @@
|
|
7037 |
$this->_menu_items[ $priority ][] = array(
|
7038 |
'menu_title' => $menu_title,
|
7039 |
'capability' => $capability,
|
7040 |
-
'menu_slug' =>
|
7041 |
'url' => $url,
|
7042 |
'page_title' => $menu_title,
|
7043 |
'render_function' => 'fs_dummy',
|
@@ -7057,8 +7879,20 @@
|
|
7057 |
*
|
7058 |
* @return string
|
7059 |
*/
|
7060 |
-
|
7061 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7062 |
}
|
7063 |
|
7064 |
/**
|
@@ -7103,6 +7937,76 @@
|
|
7103 |
add_action( $this->get_action_tag( $tag ), $function_to_add, $priority, $accepted_args );
|
7104 |
}
|
7105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7106 |
/**
|
7107 |
* Apply filter, specific for the current context plugin.
|
7108 |
*
|
@@ -7190,6 +8094,12 @@
|
|
7190 |
private function _store_site( $store = true ) {
|
7191 |
$this->_logger->entrance();
|
7192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7193 |
$encrypted_site = clone $this->_site;
|
7194 |
$encrypted_site->plan = $this->_encrypt_entity( $this->_site->plan );
|
7195 |
|
@@ -7261,6 +8171,12 @@
|
|
7261 |
private function _store_user( $store = true ) {
|
7262 |
$this->_logger->entrance();
|
7263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7264 |
$users = self::get_all_users();
|
7265 |
$users[ $this->_user->id ] = $this->_user;
|
7266 |
self::$_accounts->set_option( 'users', $users, $store );
|
@@ -7424,37 +8340,11 @@
|
|
7424 |
* @link https://github.com/Freemius/wordpress-sdk/issues/6
|
7425 |
*/
|
7426 |
if ( ! $is_menu_item_account_visible ) {
|
7427 |
-
|
7428 |
-
exit();
|
7429 |
-
}
|
7430 |
}
|
7431 |
}
|
7432 |
}
|
7433 |
|
7434 |
-
/**
|
7435 |
-
* @author Vova Feldman (@svovaf)
|
7436 |
-
* @since 1.0.5
|
7437 |
-
* @uses FS_Api
|
7438 |
-
*
|
7439 |
-
* @param bool $flush
|
7440 |
-
*
|
7441 |
-
* @return object|\FS_Site
|
7442 |
-
*/
|
7443 |
-
private function _fetch_site( $flush = false ) {
|
7444 |
-
$this->_logger->entrance();
|
7445 |
-
$api = $this->get_api_site_scope();
|
7446 |
-
|
7447 |
-
$site = $api->get( '/', $flush );
|
7448 |
-
|
7449 |
-
if ( ! isset( $site->error ) ) {
|
7450 |
-
$site = new FS_Site( $site );
|
7451 |
-
$site->slug = $this->_slug;
|
7452 |
-
$site->version = $this->get_plugin_version();
|
7453 |
-
}
|
7454 |
-
|
7455 |
-
return $site;
|
7456 |
-
}
|
7457 |
-
|
7458 |
/**
|
7459 |
* @param bool $store
|
7460 |
*
|
@@ -7561,7 +8451,7 @@
|
|
7561 |
|
7562 |
$result = $api->get( '/plans.json', true );
|
7563 |
|
7564 |
-
if (
|
7565 |
for ( $i = 0, $len = count( $result->plans ); $i < $len; $i ++ ) {
|
7566 |
$result->plans[ $i ] = new FS_Plugin_Plan( $result->plans[ $i ] );
|
7567 |
}
|
@@ -7595,7 +8485,11 @@
|
|
7595 |
|
7596 |
$is_site_license_synced = false;
|
7597 |
|
7598 |
-
|
|
|
|
|
|
|
|
|
7599 |
for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
|
7600 |
$result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
|
7601 |
|
@@ -7605,6 +8499,9 @@
|
|
7605 |
}
|
7606 |
|
7607 |
$result = $result->licenses;
|
|
|
|
|
|
|
7608 |
}
|
7609 |
|
7610 |
if ( ! $is_site_license_synced ) {
|
@@ -7614,24 +8511,41 @@
|
|
7614 |
// Try to retrieve a foreign license that is linked to the install.
|
7615 |
$api_result = $api->call( '/licenses.json' );
|
7616 |
|
7617 |
-
if (
|
|
|
|
|
7618 |
$licenses = $api_result->licenses;
|
7619 |
|
7620 |
if ( ! empty( $licenses ) ) {
|
7621 |
$result[] = new FS_Plugin_License( $licenses[0] );
|
7622 |
}
|
|
|
|
|
7623 |
}
|
7624 |
} else if ( is_object( $this->_license ) ) {
|
7625 |
// Fetch foreign license by ID and license key.
|
7626 |
$license = $api->get( "/licenses/{$this->_license->id}.json?license_key=" .
|
7627 |
urlencode( $this->_license->secret_key ) );
|
7628 |
|
7629 |
-
if (
|
7630 |
$result[] = new FS_Plugin_License( $license );
|
|
|
|
|
7631 |
}
|
7632 |
}
|
7633 |
}
|
7634 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7635 |
return $result;
|
7636 |
}
|
7637 |
|
@@ -7665,6 +8579,25 @@
|
|
7665 |
return $result;
|
7666 |
}
|
7667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7668 |
/**
|
7669 |
* @author Vova Feldman (@svovaf)
|
7670 |
* @since 1.0.4
|
@@ -7755,8 +8688,10 @@
|
|
7755 |
/**
|
7756 |
* Check if site assigned with active license.
|
7757 |
*
|
7758 |
-
* @author
|
7759 |
-
* @since
|
|
|
|
|
7760 |
*/
|
7761 |
function has_active_license() {
|
7762 |
return (
|
@@ -7766,6 +8701,21 @@
|
|
7766 |
);
|
7767 |
}
|
7768 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7769 |
/**
|
7770 |
* Check if site assigned with license with enabled features.
|
7771 |
*
|
@@ -7862,7 +8812,7 @@
|
|
7862 |
$licenses = $this->_fetch_licenses( $addon->id );
|
7863 |
|
7864 |
// Sync add-on licenses.
|
7865 |
-
if (
|
7866 |
$this->_update_licenses( $licenses, $addon->slug );
|
7867 |
|
7868 |
if ( ! $this->is_addon_installed( $addon->slug ) && FS_License_Manager::has_premium_license( $licenses ) ) {
|
@@ -7912,12 +8862,16 @@
|
|
7912 |
private function _sync_plugin_license( $background = false ) {
|
7913 |
$this->_logger->entrance();
|
7914 |
|
7915 |
-
|
|
|
|
|
|
|
|
|
7916 |
$site = $this->send_install_update( array(), true );
|
7917 |
|
7918 |
$plan_change = 'none';
|
7919 |
|
7920 |
-
if ( $this->
|
7921 |
// Show API messages only if not background sync or if paying customer.
|
7922 |
if ( ! $background || $this->is_paying() ) {
|
7923 |
// Try to ping API to see if not blocked.
|
@@ -7996,7 +8950,7 @@
|
|
7996 |
// For trial with subscription use-case.
|
7997 |
$new_license = is_null( $site->license_id ) ? null : $this->_get_license_by_id( $site->license_id );
|
7998 |
|
7999 |
-
if ( is_object( $new_license ) &&
|
8000 |
$this->_site = $site;
|
8001 |
$this->_update_site_license( $new_license );
|
8002 |
$this->_store_licenses();
|
@@ -8074,18 +9028,17 @@
|
|
8074 |
|
8075 |
$this->_admin_notices->add(
|
8076 |
sprintf(
|
8077 |
-
__fs( 'plan-did-not-change-message', $this->_slug )
|
8078 |
-
sprintf(
|
8079 |
-
'<a href="%s">%s</a>',
|
8080 |
-
$this->contact_url(
|
8081 |
-
'bug',
|
8082 |
-
sprintf( __fs( 'plan-did-not-change-email-message', $this->_slug ),
|
8083 |
-
strtoupper( $plan->name )
|
8084 |
-
)
|
8085 |
-
),
|
8086 |
-
__fs( 'contact-us-here', $this->_slug )
|
8087 |
-
),
|
8088 |
'<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . __fs( 'trial', $this->_slug ) : '' ) . '</b></i>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8089 |
),
|
8090 |
__fs( 'hmm', $this->_slug ) . '...'
|
8091 |
);
|
@@ -8096,11 +9049,7 @@
|
|
8096 |
sprintf(
|
8097 |
__fs( 'plan-upgraded-message', $this->_slug ),
|
8098 |
'<i>' . $this->get_plugin_name() . '</i>'
|
8099 |
-
) .
|
8100 |
-
__fs( 'download-latest-x-version', $this->_slug ),
|
8101 |
-
$this->_site->plan->title
|
8102 |
-
) )
|
8103 |
-
),
|
8104 |
'plan_upgraded',
|
8105 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
8106 |
);
|
@@ -8162,10 +9111,7 @@
|
|
8162 |
sprintf(
|
8163 |
__fs( 'trial-started-message', $this->_slug ),
|
8164 |
'<i>' . $this->get_plugin_name() . '</i>'
|
8165 |
-
) .
|
8166 |
-
__fs( 'download-latest-x-version', $this->_slug ),
|
8167 |
-
$this->_storage->trial_plan->title
|
8168 |
-
) ) ),
|
8169 |
'trial_started',
|
8170 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
8171 |
);
|
@@ -8242,11 +9188,19 @@
|
|
8242 |
$api = $this->get_api_site_scope();
|
8243 |
$license = $api->call( "/licenses/{$premium_license->id}.json", 'put', $api_request_params );
|
8244 |
|
8245 |
-
if ( $this->
|
8246 |
if ( ! $background ) {
|
8247 |
-
$this->_admin_notices->add(
|
8248 |
-
|
8249 |
-
__fs( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8250 |
__fs( 'hmm', $this->_slug ) . '...',
|
8251 |
'error'
|
8252 |
);
|
@@ -8259,7 +9213,7 @@
|
|
8259 |
|
8260 |
// Updated site plan.
|
8261 |
$site = $this->get_api_site_scope()->get( '/', true );
|
8262 |
-
if (
|
8263 |
$this->_site = new FS_Site( $site );
|
8264 |
}
|
8265 |
$this->_update_site_license( $premium_license );
|
@@ -8270,10 +9224,7 @@
|
|
8270 |
if ( ! $background ) {
|
8271 |
$this->_admin_notices->add_sticky(
|
8272 |
__fs( 'license-activated-message', $this->_slug ) .
|
8273 |
-
|
8274 |
-
__fs( 'download-latest-x-version', $this->_slug ),
|
8275 |
-
$this->_site->plan->title
|
8276 |
-
) ) ),
|
8277 |
'license_activated',
|
8278 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
8279 |
);
|
@@ -8362,7 +9313,7 @@
|
|
8362 |
|
8363 |
$plan_downgraded = false;
|
8364 |
$plan = false;
|
8365 |
-
if (
|
8366 |
$prev_plan_id = $this->_site->plan->id;
|
8367 |
|
8368 |
// Update new site plan id.
|
@@ -8478,7 +9429,7 @@
|
|
8478 |
$api = $this->get_api_site_scope();
|
8479 |
$plan = $api->call( "plans/{$plan->id}/trials.json", 'post' );
|
8480 |
|
8481 |
-
if ( $this->
|
8482 |
// Some API error while trying to start the trial.
|
8483 |
$this->_admin_notices->add(
|
8484 |
__fs( 'unexpected-api-error', $this->_slug ) . ' ' . var_export( $plan, true ),
|
@@ -8521,7 +9472,7 @@
|
|
8521 |
|
8522 |
$trial_cancelled = false;
|
8523 |
|
8524 |
-
if (
|
8525 |
$prev_trial_ends = $this->_site->trial_ends;
|
8526 |
|
8527 |
if ( $this->is_paid_trial() ) {
|
@@ -8555,9 +9506,6 @@
|
|
8555 |
// Store site updates.
|
8556 |
$this->_store_site();
|
8557 |
|
8558 |
-
// Clear trial plan information.
|
8559 |
-
unset( $this->_storage->trial_plan );
|
8560 |
-
|
8561 |
if ( ! $this->is_addon() ||
|
8562 |
! $this->deactivate_premium_only_addon_without_license( true )
|
8563 |
) {
|
@@ -8565,6 +9513,9 @@
|
|
8565 |
sprintf( __fs( 'trial-cancel-message', $this->_slug ), $this->_storage->trial_plan->title )
|
8566 |
);
|
8567 |
}
|
|
|
|
|
|
|
8568 |
} else {
|
8569 |
$this->_admin_notices->add(
|
8570 |
__fs( 'trial-cancel-failure-message', $this->_slug ),
|
@@ -8595,7 +9546,7 @@
|
|
8595 |
* @return bool
|
8596 |
*/
|
8597 |
private function _can_download_premium() {
|
8598 |
-
return $this->
|
8599 |
( $this->is_trial() && ! $this->get_trial_plan()->is_free() );
|
8600 |
}
|
8601 |
|
@@ -8661,47 +9612,9 @@
|
|
8661 |
return ( is_object( $tag ) && isset( $tag->version ) ) ? $tag : false;
|
8662 |
}
|
8663 |
|
8664 |
-
|
8665 |
-
|
8666 |
-
|
8667 |
-
* Download latest plugin version, based on plan.
|
8668 |
-
* The download will be fetched via the API first.
|
8669 |
-
*
|
8670 |
-
* @author Vova Feldman (@svovaf)
|
8671 |
-
* @since 1.0.4
|
8672 |
-
*
|
8673 |
-
* @param bool|number $plugin_id
|
8674 |
-
*
|
8675 |
-
* @uses FS_Api
|
8676 |
-
*
|
8677 |
-
* @deprecated
|
8678 |
-
*/
|
8679 |
-
private function _download_latest( $plugin_id = false ) {
|
8680 |
-
$this->_logger->entrance();
|
8681 |
-
|
8682 |
-
$is_addon = $this->_is_addon_id( $plugin_id );
|
8683 |
-
|
8684 |
-
$is_premium = $this->_can_download_premium();
|
8685 |
-
|
8686 |
-
$latest = $this->get_api_site_scope()->call(
|
8687 |
-
$this->_get_latest_version_endpoint( $plugin_id, 'zip' )
|
8688 |
-
);
|
8689 |
-
|
8690 |
-
$slug = $this->_slug;
|
8691 |
-
if ( $is_addon ) {
|
8692 |
-
$addon = $this->get_addon( $plugin_id );
|
8693 |
-
$slug = is_object( $addon ) ? $addon->slug : 'addon';
|
8694 |
-
}
|
8695 |
-
|
8696 |
-
if ( ! is_object( $latest ) ) {
|
8697 |
-
header( "Content-Type: application/zip" );
|
8698 |
-
header( "Content-Disposition: attachment; filename={$slug}" . ( ! $is_addon && $is_premium ? '-premium' : '' ) . ".zip" );
|
8699 |
-
header( "Content-Length: " . strlen( $latest ) );
|
8700 |
-
echo $latest;
|
8701 |
-
|
8702 |
-
exit();
|
8703 |
-
}
|
8704 |
-
}
|
8705 |
|
8706 |
/**
|
8707 |
* Download latest plugin version, based on plan.
|
@@ -8851,7 +9764,7 @@
|
|
8851 |
* @author Vova Feldman (@svovaf)
|
8852 |
* @since 1.0.4
|
8853 |
*
|
8854 |
-
* @param bool $flush Since 1.1.7.3
|
8855 |
*
|
8856 |
* @return FS_Plugin[]
|
8857 |
*
|
@@ -8860,10 +9773,26 @@
|
|
8860 |
private function _sync_addons( $flush = false ) {
|
8861 |
$this->_logger->entrance();
|
8862 |
|
8863 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8864 |
|
8865 |
$addons = array();
|
8866 |
-
if (
|
|
|
|
|
8867 |
for ( $i = 0, $len = count( $result->plugins ); $i < $len; $i ++ ) {
|
8868 |
$addons[ $i ] = new FS_Plugin( $result->plugins[ $i ] );
|
8869 |
}
|
@@ -8910,6 +9839,10 @@
|
|
8910 |
return $user;
|
8911 |
}
|
8912 |
|
|
|
|
|
|
|
|
|
8913 |
/**
|
8914 |
* @author Vova Feldman (@svovaf)
|
8915 |
* @since 1.1.1
|
@@ -8919,8 +9852,53 @@
|
|
8919 |
* @return bool Is API result contains an error.
|
8920 |
*/
|
8921 |
private function is_api_error( $result ) {
|
8922 |
-
return (
|
8923 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8924 |
}
|
8925 |
|
8926 |
/**
|
@@ -9054,10 +10032,27 @@
|
|
9054 |
* @author Vova Feldman (@svovaf)
|
9055 |
* @since 1.1.2
|
9056 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9057 |
* @return string
|
9058 |
*/
|
9059 |
-
|
9060 |
-
|
|
|
|
|
|
|
9061 |
}
|
9062 |
|
9063 |
/**
|
@@ -9070,7 +10065,7 @@
|
|
9070 |
*
|
9071 |
* @return string
|
9072 |
*/
|
9073 |
-
|
9074 |
$first_time_path = $this->_menu->get_first_time_path();
|
9075 |
|
9076 |
return $this->apply_filters(
|
@@ -9107,17 +10102,13 @@
|
|
9107 |
$this->_site = null;
|
9108 |
$this->_user = null;
|
9109 |
|
9110 |
-
|
9111 |
-
exit();
|
9112 |
-
}
|
9113 |
} else {
|
9114 |
if ( $this->is_addon_activated( $plugin_id ) ) {
|
9115 |
$fs_addon = self::get_instance_by_id( $plugin_id );
|
9116 |
$fs_addon->delete_account_event();
|
9117 |
|
9118 |
-
|
9119 |
-
exit();
|
9120 |
-
}
|
9121 |
}
|
9122 |
}
|
9123 |
|
@@ -9125,7 +10116,13 @@
|
|
9125 |
|
9126 |
case 'downgrade_account':
|
9127 |
check_admin_referer( $action );
|
9128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9129 |
|
9130 |
return;
|
9131 |
|
@@ -9333,7 +10330,8 @@
|
|
9333 |
|
9334 |
if ( $this->has_paid_plan() &&
|
9335 |
! $this->has_any_license() &&
|
9336 |
-
! $this->is_sync_executed()
|
|
|
9337 |
) {
|
9338 |
/**
|
9339 |
* If no licenses found and no sync job was executed during the last 24 hours,
|
@@ -9443,7 +10441,9 @@
|
|
9443 |
}
|
9444 |
}
|
9445 |
|
9446 |
-
|
|
|
|
|
9447 |
|
9448 |
/**
|
9449 |
* Render contact-us page.
|
@@ -9458,7 +10458,7 @@
|
|
9458 |
fs_require_once_template( 'contact.php', $vars );
|
9459 |
}
|
9460 |
|
9461 |
-
#endregion
|
9462 |
|
9463 |
/**
|
9464 |
* Hide all admin notices to prevent distractions.
|
@@ -9606,114 +10606,187 @@
|
|
9606 |
$this->_storage->has_trial_plan = FS_Plan_Manager::instance()->has_trial_plan( $plans );
|
9607 |
}
|
9608 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9609 |
/**
|
9610 |
* Show trial promotional notice (if any trial exist).
|
9611 |
*
|
9612 |
* @author Vova Feldman (@svovaf)
|
9613 |
* @since 1.0.9
|
|
|
|
|
9614 |
*/
|
9615 |
function _add_trial_notice() {
|
9616 |
-
|
9617 |
-
|
9618 |
-
return;
|
9619 |
}
|
9620 |
|
9621 |
-
|
9622 |
-
|
9623 |
-
return;
|
9624 |
}
|
9625 |
|
9626 |
// Check if trial message is already shown.
|
9627 |
if ( $this->_admin_notices->has_sticky( 'trial_promotion' ) ) {
|
9628 |
-
|
|
|
|
|
|
|
|
|
9629 |
}
|
9630 |
|
9631 |
-
|
9632 |
-
|
|
|
|
|
9633 |
|
9634 |
-
|
9635 |
-
|
9636 |
-
return;
|
9637 |
}
|
9638 |
|
9639 |
-
|
9640 |
-
|
9641 |
-
|
9642 |
-
|
9643 |
-
|
9644 |
-
|
9645 |
-
|
9646 |
-
|
9647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9648 |
|
|
|
|
|
|
|
|
|
9649 |
|
9650 |
-
$
|
|
|
9651 |
|
9652 |
-
if
|
9653 |
-
|
9654 |
-
|
9655 |
-
|
9656 |
-
|
9657 |
-
|
9658 |
-
|
9659 |
-
|
9660 |
-
|
9661 |
-
|
9662 |
-
|
9663 |
-
|
9664 |
-
|
9665 |
-
|
9666 |
-
|
9667 |
-
|
9668 |
-
|
9669 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9670 |
}
|
9671 |
|
9672 |
-
|
9673 |
-
|
9674 |
-
|
9675 |
-
|
9676 |
-
|
9677 |
-
|
9678 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9679 |
}
|
9680 |
|
9681 |
-
$message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9682 |
|
9683 |
-
//
|
9684 |
-
$
|
9685 |
'<a style="margin-left: 10px; vertical-align: super;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
9686 |
-
$
|
9687 |
__fs( 'start-free-trial', $this->_slug )
|
9688 |
);
|
9689 |
|
9690 |
$this->_admin_notices->add_sticky(
|
9691 |
-
$this->apply_filters( 'trial_promotion_message', $message ),
|
9692 |
'trial_promotion',
|
9693 |
'',
|
9694 |
'promotion'
|
9695 |
);
|
9696 |
|
9697 |
$this->_storage->trial_promotion_shown = WP_FS__SCRIPT_START_TIME;
|
9698 |
-
}
|
9699 |
|
9700 |
-
|
9701 |
-
|
9702 |
-
private $_action_links_hooked = false;
|
9703 |
-
private $_action_links = array();
|
9704 |
|
9705 |
/**
|
9706 |
* @author Vova Feldman (@svovaf)
|
9707 |
-
* @since 1.
|
9708 |
-
*
|
9709 |
-
* @return bool
|
9710 |
*/
|
9711 |
-
|
9712 |
-
$this->
|
9713 |
-
|
9714 |
-
|
|
|
9715 |
}
|
9716 |
|
|
|
|
|
|
|
|
|
|
|
9717 |
/**
|
9718 |
* Hook to plugin action links filter.
|
9719 |
*
|
@@ -9814,6 +10887,11 @@
|
|
9814 |
return;
|
9815 |
}
|
9816 |
|
|
|
|
|
|
|
|
|
|
|
9817 |
$link_text = __fs(
|
9818 |
$this->is_free_plan() ? 'activate-license' : 'change-license',
|
9819 |
$this->_slug
|
@@ -9828,6 +10906,77 @@
|
|
9828 |
);
|
9829 |
}
|
9830 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9831 |
/**
|
9832 |
* Get the URL of the page that should be loaded right after the plugin activation.
|
9833 |
*
|
@@ -9878,7 +11027,6 @@
|
|
9878 |
|
9879 |
if ( is_string( $url ) ) {
|
9880 |
fs_redirect( $url );
|
9881 |
-
exit();
|
9882 |
}
|
9883 |
}
|
9884 |
|
@@ -9969,6 +11117,46 @@
|
|
9969 |
$this->_admin_notices->add_sticky( $message, $id, $title, $type );
|
9970 |
}
|
9971 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9972 |
/* Plugin Auto-Updates (@since 1.0.4)
|
9973 |
------------------------------------------------------------------------------------------------------------------*/
|
9974 |
/**
|
@@ -10020,7 +11208,9 @@
|
|
10020 |
return $update;
|
10021 |
}
|
10022 |
|
10023 |
-
|
|
|
|
|
10024 |
|
10025 |
/**
|
10026 |
* Check if Freemius in SDK upgrade mode.
|
@@ -10041,8 +11231,6 @@
|
|
10041 |
*
|
10042 |
* @author Vova Feldman (@svovaf)
|
10043 |
* @since 1.0.9
|
10044 |
-
*
|
10045 |
-
* @return bool
|
10046 |
*/
|
10047 |
function set_sdk_upgrade_complete() {
|
10048 |
$this->_storage->sdk_upgrade_mode = false;
|
@@ -10074,9 +11262,11 @@
|
|
10074 |
$this->_storage->plugin_upgrade_mode = false;
|
10075 |
}
|
10076 |
|
10077 |
-
#endregion
|
10078 |
|
10079 |
-
|
|
|
|
|
10080 |
|
10081 |
/**
|
10082 |
* Check if specific permission requested.
|
@@ -10092,9 +11282,11 @@
|
|
10092 |
return isset( $this->_permissions[ $permission ] ) && ( true === $this->_permissions[ $permission ] );
|
10093 |
}
|
10094 |
|
10095 |
-
#endregion
|
10096 |
|
10097 |
-
|
|
|
|
|
10098 |
|
10099 |
/**
|
10100 |
* Check if current user purchased any other plugins before.
|
@@ -10106,6 +11298,7 @@
|
|
10106 |
*/
|
10107 |
function has_purchased_before() {
|
10108 |
// TODO: Implement has_purchased_before() method.
|
|
|
10109 |
}
|
10110 |
|
10111 |
/**
|
@@ -10118,6 +11311,7 @@
|
|
10118 |
*/
|
10119 |
function is_agency() {
|
10120 |
// TODO: Implement is_agency() method.
|
|
|
10121 |
}
|
10122 |
|
10123 |
/**
|
@@ -10130,6 +11324,7 @@
|
|
10130 |
*/
|
10131 |
function is_developer() {
|
10132 |
// TODO: Implement is_developer() method.
|
|
|
10133 |
}
|
10134 |
|
10135 |
/**
|
@@ -10142,7 +11337,8 @@
|
|
10142 |
*/
|
10143 |
function is_business() {
|
10144 |
// TODO: Implement is_business() method.
|
|
|
10145 |
}
|
10146 |
|
10147 |
-
#endregion
|
10148 |
-
}
|
114 |
*/
|
115 |
private $_has_paid_plans;
|
116 |
|
117 |
+
/**
|
118 |
+
* @since 1.2.1.5
|
119 |
+
* @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but
|
120 |
+
* without a specified period, if positive - the number of trial days.
|
121 |
+
*/
|
122 |
+
private $_trial_days = - 1;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @since 1.2.1.5
|
126 |
+
* @var bool Hints the SDK if the trial requires a payment method or not.
|
127 |
+
*/
|
128 |
+
private $_is_trial_require_payment = false;
|
129 |
+
|
130 |
/**
|
131 |
* @since 1.0.7
|
132 |
* @var bool Hints the SDK if the plugin is WordPress.org compliant.
|
240 |
*/
|
241 |
private static $_instances = array();
|
242 |
|
243 |
+
#region Uninstall Reasons IDs
|
244 |
+
|
245 |
+
const REASON_NO_LONGER_NEEDED = 1;
|
246 |
+
const REASON_FOUND_A_BETTER_PLUGIN = 2;
|
247 |
+
const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
|
248 |
+
const REASON_BROKE_MY_SITE = 4;
|
249 |
+
const REASON_SUDDENLY_STOPPED_WORKING = 5;
|
250 |
+
const REASON_CANT_PAY_ANYMORE = 6;
|
251 |
+
const REASON_OTHER = 7;
|
252 |
+
const REASON_DIDNT_WORK = 8;
|
253 |
+
const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
|
254 |
+
const REASON_COULDNT_MAKE_IT_WORK = 10;
|
255 |
+
const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
|
256 |
+
const REASON_NOT_WORKING = 12;
|
257 |
+
const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
|
258 |
+
const REASON_DIDNT_WORK_AS_EXPECTED = 14;
|
259 |
+
const REASON_TEMPORARY_DEACTIVATION = 15;
|
260 |
+
|
261 |
+
#endregion
|
262 |
|
263 |
/* Ctor
|
264 |
------------------------------------------------------------------------------------------------------------------*/
|
265 |
|
266 |
+
/**
|
267 |
+
* Main singleton instance.
|
268 |
+
*
|
269 |
+
* @author Vova Feldman (@svovaf)
|
270 |
+
* @since 1.0.0
|
271 |
+
*
|
272 |
+
* @param string $slug
|
273 |
+
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
274 |
+
*/
|
275 |
+
private function __construct( $slug, $is_init = false ) {
|
276 |
$this->_slug = $slug;
|
277 |
|
278 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
279 |
|
280 |
$this->_storage = FS_Key_Value_Storage::instance( 'plugin_data', $this->_slug );
|
281 |
|
282 |
+
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
283 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
284 |
$this->_plugin_basename = plugin_basename( $this->_plugin_main_file_path );
|
285 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
463 |
* @since 1.0.9
|
464 |
*/
|
465 |
private function _register_hooks() {
|
466 |
+
$this->_logger->entrance();
|
467 |
+
|
468 |
if ( is_admin() ) {
|
469 |
+
$plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
|
470 |
+
|
471 |
+
/**
|
472 |
+
* @since 1.2.2
|
473 |
+
*
|
474 |
+
* Hook to both free and premium version activations to support
|
475 |
+
* auto deactivation on the other version activation.
|
476 |
+
*/
|
477 |
+
register_activation_hook(
|
478 |
+
$plugin_dir . $this->_free_plugin_basename,
|
479 |
+
array( &$this, '_activate_plugin_event_hook' )
|
480 |
+
);
|
481 |
+
register_activation_hook(
|
482 |
+
$plugin_dir . $this->premium_plugin_basename(),
|
483 |
+
array( &$this, '_activate_plugin_event_hook' )
|
484 |
+
);
|
485 |
|
486 |
/**
|
487 |
* Part of the mechanism to identify new plugin install vs. plugin update.
|
510 |
|
511 |
add_action( 'init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
|
512 |
|
513 |
+
add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
|
514 |
+
add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
|
515 |
+
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
516 |
+
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
517 |
+
|
518 |
$this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
|
519 |
|
520 |
$this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
521 |
+
|
522 |
+
add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
|
523 |
+
add_action( 'admin_init', array( &$this, '_enqueue_common_css' ) );
|
524 |
+
|
525 |
+
/**
|
526 |
+
* Handle request to reset anonymous mode for `get_reconnect_url()`.
|
527 |
+
*
|
528 |
+
* @author Vova Feldman (@svovaf)
|
529 |
+
* @since 1.2.1.5
|
530 |
+
*/
|
531 |
+
if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
|
532 |
+
$this->_slug === fs_request_get( 'fs_slug' )
|
533 |
+
) {
|
534 |
+
add_action( 'admin_init', array( &$this, 'connect_again' ) );
|
535 |
+
}
|
536 |
}
|
537 |
|
538 |
/**
|
557 |
* @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
|
558 |
*/
|
559 |
private function clear_module_main_file_cache() {
|
560 |
+
if ( ! isset( $this->_storage->plugin_main_file ) ||
|
561 |
+
empty( $this->_storage->plugin_main_file->path )
|
562 |
+
) {
|
563 |
+
return;
|
564 |
+
}
|
565 |
+
|
566 |
+
$plugin_main_file = clone $this->_storage->plugin_main_file;
|
567 |
+
|
568 |
+
// Store cached path (2nd layer cache).
|
569 |
+
$plugin_main_file->prev_path = $plugin_main_file->path;
|
570 |
+
|
571 |
+
// Clear cached path.
|
572 |
+
unset( $plugin_main_file->path );
|
573 |
+
|
574 |
+
$this->_storage->plugin_main_file = $plugin_main_file;
|
575 |
}
|
576 |
|
577 |
/**
|
580 |
*/
|
581 |
private function _register_account_hooks() {
|
582 |
if ( is_admin() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
583 |
// If user is paying or in trial and have the free version installed,
|
584 |
// assume that the deactivation is for the upgrade process.
|
585 |
if ( ! $this->is_paying_or_trial() || $this->is_premium() ) {
|
586 |
+
$this->add_ajax_action(
|
587 |
+
'submit_uninstall_reason',
|
588 |
+
array( &$this, '_submit_uninstall_reason_action' )
|
589 |
+
);
|
590 |
|
591 |
+
if ( $this->is_plugins_page() ) {
|
|
|
592 |
add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
|
593 |
}
|
594 |
}
|
607 |
* @author Vova Feldman (@svovaf)
|
608 |
* @since 1.0.6
|
609 |
*
|
610 |
+
* @param bool $is_init Is initiation sequence.
|
611 |
+
*
|
612 |
* @return string
|
613 |
*
|
614 |
* @uses fs_find_caller_plugin_file
|
615 |
*/
|
616 |
+
private function _find_caller_plugin_file( $is_init = false ) {
|
617 |
// Try to load the cached value of the file path.
|
618 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
619 |
+
$plugin_main_file = $this->_storage->plugin_main_file;
|
620 |
+
if ( isset( $plugin_main_file->path ) && file_exists( $plugin_main_file->path ) ) {
|
621 |
return $this->_storage->plugin_main_file->path;
|
622 |
}
|
623 |
}
|
624 |
|
625 |
+
/**
|
626 |
+
* @since 1.2.1
|
627 |
+
*
|
628 |
+
* `clear_module_main_file_cache()` is clearing the plugin's cached path on
|
629 |
+
* deactivation. Therefore, if any plugin/theme was initiating `Freemius`
|
630 |
+
* with that plugin's slug, it was overriding the empty plugin path with a wrong path.
|
631 |
+
*
|
632 |
+
* So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
|
633 |
+
* when the class instantiator isn't the module.
|
634 |
+
*/
|
635 |
+
if ( ! $is_init ) {
|
636 |
+
// Fetch prev path cache.
|
637 |
+
if ( isset( $this->_storage->plugin_main_file ) &&
|
638 |
+
isset( $this->_storage->plugin_main_file->prev_path )
|
639 |
+
) {
|
640 |
+
if ( file_exists( $this->_storage->plugin_main_file->prev_path ) ) {
|
641 |
+
return $this->_storage->plugin_main_file->prev_path;
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
wp_die(
|
646 |
+
__fs( 'failed-finding-main-path', $this->_slug ),
|
647 |
+
__fs( 'error' ),
|
648 |
+
array( 'back_link' => true )
|
649 |
+
);
|
650 |
+
}
|
651 |
+
|
652 |
+
/**
|
653 |
+
* @since 1.2.1
|
654 |
+
*
|
655 |
+
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
656 |
+
*/
|
657 |
+
// Find caller module.
|
658 |
$plugin_file = fs_find_caller_plugin_file();
|
659 |
|
660 |
$this->_storage->plugin_main_file = (object) array(
|
665 |
}
|
666 |
|
667 |
|
668 |
+
#----------------------------------------------------------------------------------
|
669 |
+
#region Deactivation Feedback Form
|
670 |
+
#----------------------------------------------------------------------------------
|
671 |
|
672 |
/**
|
673 |
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
|
744 |
}
|
745 |
|
746 |
$reason_found_better_plugin = array(
|
747 |
+
'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
|
748 |
'text' => __fs( 'reason-found-a-better-plugin', $this->_slug ),
|
749 |
'input_type' => 'textfield',
|
750 |
'input_placeholder' => __fs( 'placeholder-plugin-name', $this->_slug )
|
751 |
);
|
752 |
|
753 |
$reason_temporary_deactivation = array(
|
754 |
+
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
755 |
'text' => __fs( 'reason-temporary-deactivation', $this->_slug ),
|
756 |
'input_type' => '',
|
757 |
'input_placeholder' => ''
|
758 |
);
|
759 |
|
760 |
$reason_other = array(
|
761 |
+
'id' => self::REASON_OTHER,
|
762 |
'text' => __fs( 'reason-other', $this->_slug ),
|
763 |
'input_type' => 'textfield',
|
764 |
'input_placeholder' => ''
|
766 |
|
767 |
$long_term_user_reasons = array(
|
768 |
array(
|
769 |
+
'id' => self::REASON_NO_LONGER_NEEDED,
|
770 |
'text' => __fs( 'reason-no-longer-needed', $this->_slug ),
|
771 |
'input_type' => '',
|
772 |
'input_placeholder' => ''
|
773 |
),
|
774 |
$reason_found_better_plugin,
|
775 |
array(
|
776 |
+
'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
|
777 |
'text' => __fs( 'reason-needed-for-a-short-period', $this->_slug ),
|
778 |
'input_type' => '',
|
779 |
'input_placeholder' => ''
|
780 |
),
|
781 |
array(
|
782 |
+
'id' => self::REASON_BROKE_MY_SITE,
|
783 |
'text' => __fs( 'reason-broke-my-site', $this->_slug ),
|
784 |
'input_type' => '',
|
785 |
'input_placeholder' => '',
|
786 |
'internal_message' => $contact_support_template
|
787 |
),
|
788 |
array(
|
789 |
+
'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
|
790 |
'text' => __fs( 'reason-suddenly-stopped-working', $this->_slug ),
|
791 |
'input_type' => '',
|
792 |
'input_placeholder' => '',
|
796 |
|
797 |
if ( $this->is_paying() ) {
|
798 |
$long_term_user_reasons[] = array(
|
799 |
+
'id' => self::REASON_CANT_PAY_ANYMORE,
|
800 |
'text' => __fs( 'reason-cant-pay-anymore', $this->_slug ),
|
801 |
'input_type' => 'textfield',
|
802 |
'input_placeholder' => __fs( 'placeholder-comfortable-price', $this->_slug )
|
804 |
}
|
805 |
|
806 |
$reason_dont_share_info = array(
|
807 |
+
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
808 |
'text' => __fs( 'reason-dont-like-to-share-my-information', $this->_slug ),
|
809 |
'input_type' => '',
|
810 |
'input_placeholder' => ''
|
821 |
$reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
|
822 |
}
|
823 |
|
|
|
|
|
|
|
824 |
$uninstall_reasons = array(
|
825 |
'long-term' => $long_term_user_reasons,
|
826 |
'non-registered-and-non-anonymous-short-term' => array(
|
827 |
array(
|
828 |
+
'id' => self::REASON_DIDNT_WORK,
|
829 |
'text' => __fs( 'reason-didnt-work', $this->_slug ),
|
830 |
'input_type' => '',
|
831 |
'input_placeholder' => ''
|
832 |
),
|
833 |
$reason_dont_share_info,
|
834 |
+
$reason_found_better_plugin
|
|
|
|
|
835 |
),
|
836 |
'short-term' => array(
|
837 |
array(
|
838 |
+
'id' => self::REASON_COULDNT_MAKE_IT_WORK,
|
839 |
'text' => __fs( 'reason-couldnt-make-it-work', $this->_slug ),
|
840 |
'input_type' => '',
|
841 |
'input_placeholder' => '',
|
843 |
),
|
844 |
$reason_found_better_plugin,
|
845 |
array(
|
846 |
+
'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
|
847 |
'text' => __fs( 'reason-great-but-need-specific-feature', $this->_slug ),
|
848 |
'input_type' => 'textarea',
|
849 |
'input_placeholder' => __fs( 'placeholder-feature', $this->_slug )
|
850 |
),
|
851 |
array(
|
852 |
+
'id' => self::REASON_NOT_WORKING,
|
853 |
'text' => __fs( 'reason-not-working', $this->_slug ),
|
854 |
'input_type' => 'textarea',
|
855 |
'input_placeholder' => __fs( 'placeholder-share-what-didnt-work', $this->_slug )
|
856 |
),
|
857 |
array(
|
858 |
+
'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
|
859 |
'text' => __fs( 'reason-not-what-i-was-looking-for', $this->_slug ),
|
860 |
'input_type' => 'textarea',
|
861 |
'input_placeholder' => __fs( 'placeholder-what-youve-been-looking-for', $this->_slug )
|
862 |
),
|
863 |
array(
|
864 |
+
'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
|
865 |
'text' => __fs( 'reason-didnt-work-as-expected', $this->_slug ),
|
866 |
'input_type' => 'textarea',
|
867 |
'input_placeholder' => __fs( 'placeholder-what-did-you-expect', $this->_slug )
|
868 |
+
)
|
|
|
|
|
869 |
)
|
870 |
);
|
871 |
|
872 |
+
// Randomize the reasons for the current user type.
|
873 |
+
shuffle( $uninstall_reasons[ $user_type ] );
|
874 |
+
|
875 |
+
// Keep the following reasons as the last items in the list.
|
876 |
+
$uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
|
877 |
+
$uninstall_reasons[ $user_type ][] = $reason_other;
|
878 |
+
|
879 |
$uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
|
880 |
|
881 |
return $uninstall_reasons[ $user_type ];
|
888 |
* @since 1.1.2
|
889 |
*/
|
890 |
function _submit_uninstall_reason_action() {
|
891 |
+
$reason_id = fs_request_get( 'reason_id' );
|
892 |
+
|
893 |
+
// Check if the given reason ID is an unsigned integer.
|
894 |
+
if ( ! ctype_digit( $reason_id ) ) {
|
895 |
exit;
|
896 |
}
|
897 |
|
898 |
+
$reason_info = trim( fs_request_get( 'reason_info', '' ) );
|
899 |
+
if ( ! empty( $reason_info ) ) {
|
900 |
+
$reason_info = substr( $reason_info, 0, 128 );
|
901 |
+
}
|
902 |
|
903 |
$reason = (object) array(
|
904 |
+
'id' => $reason_id,
|
905 |
+
'info' => $reason_info,
|
906 |
+
'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
|
907 |
);
|
908 |
|
909 |
$this->_storage->store( 'uninstall_reason', $reason );
|
913 |
exit;
|
914 |
}
|
915 |
|
916 |
+
#endregion
|
917 |
|
918 |
+
#----------------------------------------------------------------------------------
|
919 |
+
#region Instance
|
920 |
+
#----------------------------------------------------------------------------------
|
921 |
|
922 |
/**
|
923 |
* Main singleton instance.
|
925 |
* @author Vova Feldman (@svovaf)
|
926 |
* @since 1.0.0
|
927 |
*
|
928 |
+
* @param string $slug
|
929 |
+
* @param bool $is_init Is initiation sequence.
|
930 |
*
|
931 |
* @return Freemius
|
932 |
*/
|
933 |
+
static function instance( $slug, $is_init = false ) {
|
934 |
$slug = strtolower( $slug );
|
935 |
|
936 |
if ( ! isset( self::$_instances[ $slug ] ) ) {
|
938 |
self::_load_required_static();
|
939 |
}
|
940 |
|
941 |
+
self::$_instances[ $slug ] = new Freemius( $slug, $is_init );
|
942 |
}
|
943 |
|
944 |
return self::$_instances[ $slug ];
|
1201 |
|
1202 |
add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
|
1203 |
|
1204 |
+
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
|
1205 |
+
|
1206 |
self::$_statics_loaded = true;
|
1207 |
}
|
1208 |
|
1209 |
+
#----------------------------------------------------------------------------------
|
1210 |
+
#region Localization
|
1211 |
+
#----------------------------------------------------------------------------------
|
1212 |
+
|
1213 |
+
/**
|
1214 |
+
* Load framework's text domain.
|
1215 |
+
*
|
1216 |
+
* @author Vova Feldman (@svovaf)
|
1217 |
+
* @since 1.2.1
|
1218 |
+
*/
|
1219 |
+
static function _load_textdomain() {
|
1220 |
+
if ( ! is_admin() ) {
|
1221 |
+
return;
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
global $fs_active_plugins;
|
1225 |
+
|
1226 |
+
load_plugin_textdomain(
|
1227 |
+
'freemius',
|
1228 |
+
false,
|
1229 |
+
$fs_active_plugins->newest->sdk_path . '/languages/'
|
1230 |
+
);
|
1231 |
+
|
1232 |
+
// @todo Load for themes.
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
#endregion
|
1236 |
+
|
1237 |
+
#----------------------------------------------------------------------------------
|
1238 |
+
#region Debugging
|
1239 |
+
#----------------------------------------------------------------------------------
|
1240 |
|
1241 |
/**
|
1242 |
* @author Vova Feldman (@svovaf)
|
1297 |
if ( fs_request_is_action( 'restart_freemius' ) ) {
|
1298 |
check_admin_referer( 'restart_freemius' );
|
1299 |
|
1300 |
+
// Clear accounts data.
|
1301 |
self::$_accounts->clear( true );
|
1302 |
|
1303 |
+
// Clear SDK reference cache.
|
1304 |
+
delete_option( 'fs_active_plugins' );
|
1305 |
+
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
1306 |
+
check_admin_referer( 'simulate_trial' );
|
1307 |
|
1308 |
+
$slug = fs_request_get( 'slug' );
|
1309 |
+
|
1310 |
+
$fs = freemius( $slug );
|
1311 |
+
|
1312 |
+
// Update SDK install to at least 24 hours before.
|
1313 |
+
$fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
|
1314 |
+
// Unset the trial shown timestamp.
|
1315 |
+
unset( $fs->_storage->trial_promotion_shown );
|
1316 |
}
|
1317 |
}
|
1318 |
|
1344 |
fs_require_once_template( 'debug.php', $vars );
|
1345 |
}
|
1346 |
|
1347 |
+
#endregion
|
1348 |
|
1349 |
+
#----------------------------------------------------------------------------------
|
1350 |
+
#region Connectivity Issues
|
1351 |
+
#----------------------------------------------------------------------------------
|
1352 |
|
1353 |
/**
|
1354 |
* Check if Freemius should be turned on for the current plugin install.
|
1491 |
$this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
|
1492 |
/**
|
1493 |
* @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration.
|
1494 |
+
*
|
1495 |
+
* @since 1.2.1.5 If the user running the premium version then ignore the 'is_active' flag and turn Freemius on to enable license key activation.
|
1496 |
*/
|
1497 |
$this->_is_on = $this->_storage->connectivity_test['is_active'] ||
|
1498 |
+
$this->is_premium() ||
|
1499 |
( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF );
|
1500 |
|
1501 |
return $this->_has_api_connection;
|
1632 |
* @param bool $is_first_failure
|
1633 |
*/
|
1634 |
function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
|
1635 |
+
if ( ! $this->is_premium() && $this->_enable_anonymous ) {
|
1636 |
+
// Don't add message if it's the free version and can run anonymously.
|
1637 |
return;
|
1638 |
}
|
1639 |
|
1946 |
fs_require_once_template( 'firewall-issues-js.php', $params );
|
1947 |
}
|
1948 |
|
1949 |
+
#endregion
|
1950 |
|
1951 |
+
#----------------------------------------------------------------------------------
|
1952 |
+
#region Email
|
1953 |
+
#----------------------------------------------------------------------------------
|
1954 |
|
1955 |
/**
|
1956 |
* Generates and sends an HTML email with customizable sections.
|
2099 |
return $sections;
|
2100 |
}
|
2101 |
|
2102 |
+
#endregion
|
2103 |
|
2104 |
+
#----------------------------------------------------------------------------------
|
2105 |
+
#region Initialization
|
2106 |
+
#----------------------------------------------------------------------------------
|
2107 |
|
2108 |
/**
|
2109 |
* Init plugin's Freemius instance.
|
2157 |
if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
|
2158 |
$this->_admin_notices->has_sticky( 'failed_connect_api' )
|
2159 |
) {
|
2160 |
+
if ( ! $this->_enable_anonymous || $this->is_premium() ) {
|
2161 |
// If anonymous mode is disabled, add firewall admin-notice message.
|
2162 |
add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
|
2163 |
|
2164 |
+
$this->add_ajax_action( 'resolve_firewall_issues', array(
|
2165 |
&$this,
|
2166 |
'_email_about_firewall_issue'
|
2167 |
) );
|
2168 |
|
2169 |
+
$this->add_ajax_action( 'retry_connectivity_test', array(
|
2170 |
&$this,
|
2171 |
'_retry_connectivity_test'
|
2172 |
) );
|
2194 |
}
|
2195 |
}
|
2196 |
|
2197 |
+
if ( $this->has_api_connectivity() ) {
|
2198 |
+
if ( $this->is_cron() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2199 |
$this->hook_callback_to_sync_cron();
|
2200 |
+
} else if ( $this->is_user_in_admin() ) {
|
2201 |
+
/**
|
2202 |
+
* Schedule daily data sync cron if:
|
2203 |
+
*
|
2204 |
+
* 1. User opted-in (for tracking).
|
2205 |
+
* 2. If skipped, but later upgraded (opted-in via upgrade).
|
2206 |
+
*
|
2207 |
+
* @author Vova Feldman (@svovaf)
|
2208 |
+
* @since 1.1.7.3
|
2209 |
+
*
|
2210 |
+
*/
|
2211 |
+
if ( $this->is_registered() ) {
|
2212 |
+
if ( ! $this->is_sync_cron_on() && $this->is_tracking_allowed() ) {
|
2213 |
+
$this->schedule_sync_cron();
|
2214 |
+
}
|
2215 |
}
|
|
|
2216 |
|
2217 |
+
/**
|
2218 |
+
* Check if requested for manual blocking background sync.
|
2219 |
+
*/
|
2220 |
+
if ( fs_request_has( 'background_sync' ) ) {
|
2221 |
+
$this->run_manual_sync();
|
2222 |
+
}
|
2223 |
}
|
2224 |
}
|
2225 |
|
2238 |
}
|
2239 |
|
2240 |
if ( $this->is_user_in_admin() ) {
|
2241 |
+
if ( $this->is_plugins_page() ) {
|
|
|
2242 |
$this->hook_plugin_action_links();
|
2243 |
}
|
2244 |
|
2339 |
$this->do_action( 'after_init_addon_pending_activations' );
|
2340 |
}
|
2341 |
}
|
2342 |
+
}
|
2343 |
|
2344 |
+
/**
|
2345 |
+
* @author Leo Fajardo (@leorw)
|
2346 |
+
*
|
2347 |
+
* @since 1.2.1.5
|
2348 |
+
*/
|
2349 |
+
function _stop_tracking_callback() {
|
2350 |
+
$result = $this->stop_tracking();
|
|
|
|
|
|
|
2351 |
|
2352 |
+
if ( true === $result ) {
|
2353 |
+
$this->shoot_ajax_success();
|
2354 |
+
}
|
2355 |
+
|
2356 |
+
$this->_logger->api_error( $result );
|
2357 |
+
|
2358 |
+
$this->shoot_ajax_failure(
|
2359 |
+
__fs( 'unexpected-api-error', $this->_slug ) .
|
2360 |
+
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
2361 |
+
$result->error->message :
|
2362 |
+
var_export( $result, true ) )
|
2363 |
+
);
|
2364 |
+
}
|
2365 |
+
|
2366 |
+
/**
|
2367 |
+
* @author Leo Fajardo (@leorw)
|
2368 |
+
* @since 1.2.1.5
|
2369 |
+
*/
|
2370 |
+
function _allow_tracking_callback() {
|
2371 |
+
$result = $this->allow_tracking();
|
2372 |
+
|
2373 |
+
if ( true === $result ) {
|
2374 |
+
$this->shoot_ajax_success();
|
2375 |
+
}
|
2376 |
+
|
2377 |
+
$this->_logger->api_error( $result );
|
2378 |
+
|
2379 |
+
$this->shoot_ajax_failure(
|
2380 |
+
__fs( 'unexpected-api-error', $this->_slug ) .
|
2381 |
+
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
2382 |
+
$result->error->message :
|
2383 |
+
var_export( $result, true ) )
|
2384 |
+
);
|
2385 |
+
}
|
2386 |
+
|
2387 |
+
/**
|
2388 |
+
* Opt-out from usage tracking.
|
2389 |
+
*
|
2390 |
+
* Note: This will not delete the account information but will stop all tracking.
|
2391 |
+
*
|
2392 |
+
* Returns:
|
2393 |
+
* 1. FALSE - If the user never opted-in.
|
2394 |
+
* 2. TRUE - If successfully opted-out.
|
2395 |
+
* 3. object - API result on failure.
|
2396 |
+
*
|
2397 |
+
* @author Leo Fajardo (@leorw)
|
2398 |
+
* @since 1.2.1.5
|
2399 |
+
*
|
2400 |
+
* @return bool|object
|
2401 |
+
*/
|
2402 |
+
function stop_tracking() {
|
2403 |
+
$this->_logger->entrance();
|
2404 |
+
|
2405 |
+
if ( ! $this->is_registered() ) {
|
2406 |
+
// User never opted-in.
|
2407 |
+
return false;
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
if ( $this->is_tracking_prohibited() ) {
|
2411 |
+
// Already disconnected.
|
2412 |
+
return true;
|
2413 |
+
}
|
2414 |
+
|
2415 |
+
// Send update to FS.
|
2416 |
+
$result = $this->get_api_site_scope()->call( '/?fields=is_disconnected', 'put', array(
|
2417 |
+
'is_disconnected' => true
|
2418 |
+
) );
|
2419 |
+
|
2420 |
+
if ( ! $this->is_api_result_entity( $result ) ||
|
2421 |
+
! isset( $result->is_disconnected ) ||
|
2422 |
+
! $result->is_disconnected
|
2423 |
+
) {
|
2424 |
+
$this->_logger->api_error( $result );
|
2425 |
+
|
2426 |
+
return $result;
|
2427 |
+
}
|
2428 |
+
|
2429 |
+
$this->_site->is_disconnected = $result->is_disconnected;
|
2430 |
+
$this->_store_site();
|
2431 |
+
|
2432 |
+
$this->clear_sync_cron();
|
2433 |
+
|
2434 |
+
// Successfully disconnected.
|
2435 |
+
return true;
|
2436 |
+
}
|
2437 |
+
|
2438 |
+
/**
|
2439 |
+
* Opt-in back into usage tracking.
|
2440 |
+
*
|
2441 |
+
* Note: This will only work if the user opted-in previously.
|
2442 |
+
*
|
2443 |
+
* Returns:
|
2444 |
+
* 1. FALSE - If the user never opted-in.
|
2445 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
2446 |
+
* 3. object - API result on failure.
|
2447 |
+
*
|
2448 |
+
* @author Leo Fajardo (@leorw)
|
2449 |
+
* @since 1.2.1.5
|
2450 |
+
*
|
2451 |
+
* @return bool|object
|
2452 |
+
*/
|
2453 |
+
function allow_tracking() {
|
2454 |
+
$this->_logger->entrance();
|
2455 |
+
|
2456 |
+
if ( ! $this->is_registered() ) {
|
2457 |
+
// User never opted-in.
|
2458 |
+
return false;
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
if ( $this->is_tracking_allowed() ) {
|
2462 |
+
// Tracking already allowed.
|
2463 |
+
return true;
|
2464 |
+
}
|
2465 |
+
|
2466 |
+
$result = $this->get_api_site_scope()->call( '/?is_disconnected', 'put', array(
|
2467 |
+
'is_disconnected' => false
|
2468 |
+
) );
|
2469 |
+
|
2470 |
+
if ( ! $this->is_api_result_entity( $result ) ||
|
2471 |
+
! isset( $result->is_disconnected ) ||
|
2472 |
+
$result->is_disconnected
|
2473 |
+
) {
|
2474 |
+
$this->_logger->api_error( $result );
|
2475 |
+
|
2476 |
+
return $result;
|
2477 |
+
}
|
2478 |
+
|
2479 |
+
$this->_site->is_disconnected = $result->is_disconnected;
|
2480 |
+
$this->_store_site();
|
2481 |
+
|
2482 |
+
$this->schedule_sync_cron();
|
2483 |
+
|
2484 |
+
// Successfully reconnected.
|
2485 |
+
return true;
|
2486 |
+
}
|
2487 |
+
|
2488 |
+
/**
|
2489 |
+
* If user opted-in and later disabled usage-tracking,
|
2490 |
+
* re-allow tracking for licensing and updates.
|
2491 |
+
*
|
2492 |
+
* @author Leo Fajardo (@leorw)
|
2493 |
+
*
|
2494 |
+
* @since 1.2.1.5
|
2495 |
+
*/
|
2496 |
+
private function reconnect_locally() {
|
2497 |
+
$this->_logger->entrance();
|
2498 |
+
|
2499 |
+
if ( $this->is_tracking_prohibited() &&
|
2500 |
+
$this->is_registered()
|
2501 |
+
) {
|
2502 |
+
$this->_site->is_disconnected = false;
|
2503 |
+
$this->_store_site();
|
2504 |
}
|
2505 |
}
|
2506 |
|
2535 |
$parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null );
|
2536 |
// $parent_slug = $this->get_option( $plugin_info['parent'], 'slug', null );
|
2537 |
// $parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null );
|
2538 |
+
// $parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
|
2539 |
}
|
2540 |
|
2541 |
if ( false === $id ) {
|
2594 |
$this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
|
2595 |
}
|
2596 |
$this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
|
2597 |
+
|
2598 |
+
if ( ! empty( $plugin_info['trial'] ) ) {
|
2599 |
+
$this->_trial_days = $this->get_numeric_option(
|
2600 |
+
$plugin_info['trial'],
|
2601 |
+
'days',
|
2602 |
+
// Default to 0 - trial without days specification.
|
2603 |
+
0
|
2604 |
+
);
|
2605 |
+
|
2606 |
+
$this->_is_trial_require_payment = $this->get_bool_option( $plugin_info['trial'], 'is_require_payment', false );
|
2607 |
+
}
|
2608 |
}
|
2609 |
|
2610 |
/**
|
2726 |
function _plugin_code_type_changed() {
|
2727 |
$this->_logger->entrance();
|
2728 |
|
|
|
|
|
|
|
|
|
2729 |
if ( $this->is_premium() ) {
|
2730 |
+
$this->reconnect_locally();
|
2731 |
+
|
2732 |
// Activated premium code.
|
2733 |
$this->do_action( 'after_premium_version_activation' );
|
2734 |
|
2737 |
'trial_started',
|
2738 |
'plan_upgraded',
|
2739 |
'plan_changed',
|
2740 |
+
'license_activated',
|
2741 |
) );
|
2742 |
|
2743 |
$this->_admin_notices->add_sticky(
|
2746 |
__fs( 'woot', $this->_slug ) . '!'
|
2747 |
);
|
2748 |
} else {
|
2749 |
+
// Remove sticky message related to premium code activation.
|
2750 |
+
$this->_admin_notices->remove_sticky( 'premium_activated' );
|
2751 |
+
|
2752 |
// Activated free code (after had the premium before).
|
2753 |
$this->do_action( 'after_free_version_reactivation' );
|
2754 |
|
2757 |
sprintf(
|
2758 |
__fs( 'you-have-x-license', $this->_slug ),
|
2759 |
$this->_site->plan->title
|
2760 |
+
) . $this->get_complete_upgrade_instructions(),
|
|
|
|
|
|
|
2761 |
'plan_upgraded',
|
2762 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
2763 |
);
|
2764 |
}
|
2765 |
}
|
2766 |
|
2767 |
+
// Schedule code type changes event.
|
2768 |
+
$this->schedule_install_sync();
|
2769 |
+
|
2770 |
/**
|
2771 |
* Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid
|
2772 |
* triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version
|
2784 |
$this->_storage->prev_is_premium = $this->_plugin->is_premium;
|
2785 |
}
|
2786 |
|
2787 |
+
#endregion
|
2788 |
|
2789 |
+
#----------------------------------------------------------------------------------
|
2790 |
+
#region Add-ons
|
2791 |
+
#----------------------------------------------------------------------------------
|
2792 |
|
2793 |
/**
|
2794 |
* Check if add-on installed and activated on site.
|
2985 |
$this->_parent->_admin_notices->add_sticky(
|
2986 |
sprintf(
|
2987 |
__fs( ( $is_after_trial_cancel ?
|
2988 |
+
'addon-trial-cancelled-message' :
|
2989 |
+
'addon-no-license-message' ),
|
2990 |
$this->_parent->_slug
|
2991 |
),
|
2992 |
'<b>' . $this->_plugin->title . '</b>'
|
3008 |
return false;
|
3009 |
}
|
3010 |
|
3011 |
+
#endregion
|
3012 |
|
3013 |
+
#----------------------------------------------------------------------------------
|
3014 |
+
#region Sandbox
|
3015 |
+
#----------------------------------------------------------------------------------
|
3016 |
|
3017 |
/**
|
3018 |
* Set Freemius into sandbox mode for debugging.
|
3041 |
return ( ! $this->is_live() ) || isset( $this->_plugin->secret_key );
|
3042 |
}
|
3043 |
|
3044 |
+
#endregion
|
3045 |
|
3046 |
/**
|
3047 |
* Check if running test vs. live plugin.
|
3106 |
return $this->_is_org_compliant;
|
3107 |
}
|
3108 |
|
3109 |
+
#----------------------------------------------------------------------------------
|
3110 |
+
#region Daily Sync Cron
|
3111 |
+
#----------------------------------------------------------------------------------
|
3112 |
|
3113 |
/**
|
3114 |
* @author Vova Feldman (@svovaf)
|
3165 |
}
|
3166 |
}
|
3167 |
|
|
|
|
|
|
|
|
|
|
|
3168 |
$this->do_action( 'after_sync_cron' );
|
3169 |
}
|
3170 |
|
3292 |
|
3293 |
#endregion Daily Sync Cron ------------------------------------------------------------------
|
3294 |
|
3295 |
+
#----------------------------------------------------------------------------------
|
3296 |
+
#region Async Install Sync
|
3297 |
+
#----------------------------------------------------------------------------------
|
3298 |
|
3299 |
/**
|
3300 |
* @author Vova Feldman (@svovaf)
|
3419 |
* @since 1.0.7
|
3420 |
*
|
3421 |
* @param bool|string $email
|
3422 |
+
* @param bool $is_pending_trial Since 1.2.1.5
|
3423 |
*/
|
3424 |
+
function _add_pending_activation_notice( $email = false, $is_pending_trial = false ) {
|
3425 |
if ( ! is_string( $email ) ) {
|
3426 |
$current_user = self::_get_current_wp_user();
|
3427 |
$email = $current_user->user_email;
|
3431 |
sprintf(
|
3432 |
__fs( 'pending-activation-message', $this->_slug ),
|
3433 |
'<b>' . $this->get_plugin_name() . '</b>',
|
3434 |
+
'<b>' . $email . '</b>',
|
3435 |
+
__fs( $is_pending_trial ? 'start-the-trial' : 'complete-the-install', $this->_slug )
|
3436 |
),
|
3437 |
'activation_pending',
|
3438 |
'Thanks!'
|
3479 |
|
3480 |
$this->skip_connection();
|
3481 |
|
3482 |
+
fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) );
|
|
|
|
|
3483 |
}
|
3484 |
|
3485 |
if ( ! $this->is_addon() && ! $this->is_registered() && ! $this->is_anonymous() ) {
|
3568 |
jQuery(document).ready(function ($) {
|
3569 |
if ('undefined' !== typeof(jQuery().pointer)) {
|
3570 |
|
3571 |
+
var element = <?php echo $this->apply_filters( 'optin_pointer_element', '$("#non_existing_element");' ) ?>;
|
3572 |
|
3573 |
if (element.length > 0) {
|
3574 |
var optin = $(element).pointer($.extend(true, {}, {
|
3575 |
+
content : <?php echo json_encode( $pointer_content ) ?>,
|
3576 |
position : {
|
3577 |
edge : 'left',
|
3578 |
align: 'center'
|
3582 |
return '';
|
3583 |
},
|
3584 |
pointerWidth: 482
|
3585 |
+
}, <?php echo $this->apply_filters( 'optin_pointer_options_json', '{}' ) ?>));
|
3586 |
|
3587 |
<?php
|
3588 |
+
echo $this->apply_filters( 'optin_pointer_execute', "
|
3589 |
|
3590 |
optin.pointer('open');
|
3591 |
|
3594 |
.parents('.wp-pointer.wp-pointer-top')
|
3595 |
.addClass('fs-opt-in-pointer');
|
3596 |
|
3597 |
+
", 'element', 'optin' ) ?>
|
3598 |
}
|
3599 |
}
|
3600 |
});
|
3601 |
// ]]></script>
|
3602 |
+
<?php
|
3603 |
}
|
3604 |
|
3605 |
/**
|
3715 |
$this->_storage->is_plugin_new_install;
|
3716 |
}
|
3717 |
|
3718 |
+
/**
|
3719 |
+
* Check if it's the first plugin release that is running Freemius.
|
3720 |
+
*
|
3721 |
+
* @author Vova Feldman (@svovaf)
|
3722 |
+
* @since 1.2.1.5
|
3723 |
+
*
|
3724 |
+
* @return bool
|
3725 |
+
*/
|
3726 |
+
function is_first_freemius_powered_version() {
|
3727 |
+
return empty( $this->_storage->plugin_last_version );
|
3728 |
+
}
|
3729 |
+
|
3730 |
/**
|
3731 |
* Plugin activated hook.
|
3732 |
*
|
3748 |
FS_Api::clear_cache();
|
3749 |
|
3750 |
if ( $this->is_registered() ) {
|
3751 |
+
$this->reconnect_locally();
|
3752 |
+
|
3753 |
// Schedule re-activation event and sync.
|
3754 |
// $this->sync_install( array(), true );
|
3755 |
$this->schedule_install_sync();
|
3756 |
|
3757 |
+
$is_premium_version_activation = ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) );
|
3758 |
+
|
3759 |
+
// 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
|
3760 |
+
// 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
|
3761 |
+
$other_version_basename = $is_premium_version_activation ?
|
3762 |
+
$this->_free_plugin_basename :
|
3763 |
+
$this->premium_plugin_basename();
|
3764 |
+
|
3765 |
/**
|
3766 |
+
* If the other module version is activate, deactivate it.
|
3767 |
+
*
|
3768 |
+
* @author Leo Fajardo (@leorw)
|
3769 |
+
* @since 1.2.2
|
3770 |
*/
|
3771 |
+
if ( is_plugin_active( $other_version_basename ) ) {
|
3772 |
+
deactivate_plugins( $other_version_basename );
|
3773 |
+
}
|
3774 |
|
3775 |
+
// If activating the premium module version, add an admin noitce to congratulate for an upgrade completion.
|
3776 |
+
if ( $is_premium_version_activation ) {
|
3777 |
$this->_admin_notices->add(
|
3778 |
sprintf( __fs( 'successful-version-upgrade-message', $this->_slug ), sprintf( '<b>%s</b>', $this->_plugin->title ) ),
|
3779 |
__fs( 'woot', $this->_slug ) . '!'
|
3984 |
|
3985 |
$this->reset_anonymous_mode();
|
3986 |
|
3987 |
+
fs_redirect( $this->get_activation_url() );
|
|
|
|
|
3988 |
}
|
3989 |
|
3990 |
/**
|
4191 |
}
|
4192 |
|
4193 |
// Get active theme.
|
4194 |
+
$active_theme = wp_get_theme();
|
4195 |
+
$active_theme_stylesheet = $active_theme->get_stylesheet();
|
4196 |
|
4197 |
// Check if there's a change in themes.
|
4198 |
$all_themes = wp_get_themes();
|
4202 |
|
4203 |
$themes_signature = '';
|
4204 |
foreach ( $all_themes as $slug => $data ) {
|
4205 |
+
$is_active = ( $slug === $active_theme_stylesheet );
|
4206 |
$themes_signature .= $slug . ',' .
|
4207 |
$data->version . ',' .
|
4208 |
( $is_active ? '1' : '0' ) . ';';
|
4218 |
|
4219 |
// Update existing themes info.
|
4220 |
foreach ( $all_cached_themes->themes as $slug => $data ) {
|
4221 |
+
$is_active = ( $slug === $active_theme_stylesheet );
|
4222 |
|
4223 |
if ( ! isset( $all_themes[ $slug ] ) ) {
|
4224 |
// Plugin uninstalled.
|
4244 |
// Find new themes that weren't yet seen before.
|
4245 |
foreach ( $all_themes as $slug => $data ) {
|
4246 |
if ( ! isset( $all_cached_themes->themes[ $slug ] ) ) {
|
4247 |
+
$is_active = ( $slug === $active_theme_stylesheet );
|
4248 |
|
4249 |
// New plugin.
|
4250 |
$new_plugin = array(
|
4310 |
'language' => get_bloginfo( 'language' ),
|
4311 |
'charset' => get_bloginfo( 'charset' ),
|
4312 |
'platform_version' => get_bloginfo( 'version' ),
|
4313 |
+
'sdk_version' => $this->version,
|
4314 |
'programming_language_version' => phpversion(),
|
4315 |
'title' => get_bloginfo( 'name' ),
|
4316 |
'url' => get_site_url(),
|
4317 |
// Special params.
|
4318 |
'is_active' => true,
|
4319 |
+
'is_disconnected' => $this->is_tracking_prohibited(),
|
4320 |
'is_uninstalled' => false,
|
4321 |
), $override );
|
4322 |
}
|
4346 |
|
4347 |
foreach ( $check_properties as $p => $v ) {
|
4348 |
if ( property_exists( $this->_site, $p ) ) {
|
4349 |
+
if ( ( is_bool( $this->_site->{$p} ) || ! empty( $this->_site->{$p} ) ) &&
|
4350 |
$this->_site->{$p} != $v
|
4351 |
) {
|
4352 |
$this->_site->{$p} = $v;
|
4382 |
// Send updated values to FS.
|
4383 |
$site = $this->get_api_site_scope()->call( '/', 'put', $params );
|
4384 |
|
4385 |
+
if ( $this->is_api_result_entity( $site ) ) {
|
4386 |
// I successfully sent install update, clear scheduled sync if exist.
|
4387 |
$this->clear_install_sync_cron();
|
4388 |
}
|
4401 |
*
|
4402 |
* @param string[] string $override
|
4403 |
* @param bool $flush
|
|
|
|
|
4404 |
*/
|
4405 |
private function sync_install( $override = array(), $flush = false ) {
|
4406 |
$this->_logger->entrance();
|
4412 |
return;
|
4413 |
}
|
4414 |
|
4415 |
+
if ( ! $this->is_api_result_entity( $site ) ) {
|
4416 |
// Failed to sync, don't update locally.
|
4417 |
return;
|
4418 |
}
|
4425 |
}
|
4426 |
|
4427 |
/**
|
4428 |
+
* Track install's custom event.
|
4429 |
*
|
4430 |
+
* IMPORTANT:
|
4431 |
+
* Custom event tracking is currently only supported for specific clients.
|
4432 |
+
* If you are not one of them, please don't use this method. If you will,
|
4433 |
+
* the API will simply ignore your request based on the plugin ID.
|
4434 |
+
*
|
4435 |
+
* Need custom tracking for your plugin or theme?
|
4436 |
+
* If you are interested in custom event tracking please contact yo@freemius.com
|
4437 |
+
* for further details.
|
4438 |
+
*
|
4439 |
+
* @author Vova Feldman (@svovaf)
|
4440 |
+
* @since 1.2.1
|
4441 |
+
*
|
4442 |
+
* @param string $name Event name.
|
4443 |
+
* @param array $properties Associative key/value array with primitive values only
|
4444 |
+
* @param bool $process_at A valid future date-time in the following format Y-m-d H:i:s.
|
4445 |
+
* @param bool $once If true, event will be tracked only once. IMPORTANT: Still trigger the API call.
|
4446 |
+
*
|
4447 |
+
* @return object|false Event data or FALSE on failure.
|
4448 |
+
*
|
4449 |
+
* @throws \Freemius_InvalidArgumentException
|
4450 |
+
*/
|
4451 |
+
public function track_event( $name, $properties = array(), $process_at = false, $once = false ) {
|
4452 |
+
$this->_logger->entrance( http_build_query( array( 'name' => $name, 'once' => $once ) ) );
|
4453 |
+
|
4454 |
+
if ( ! $this->is_registered() ) {
|
4455 |
+
return false;
|
4456 |
+
}
|
4457 |
+
|
4458 |
+
$event = array( 'type' => $name );
|
4459 |
+
|
4460 |
+
if ( is_numeric( $process_at ) && $process_at > time() ) {
|
4461 |
+
$event['process_at'] = $process_at;
|
4462 |
+
}
|
4463 |
+
|
4464 |
+
if ( $once ) {
|
4465 |
+
$event['once'] = true;
|
4466 |
+
}
|
4467 |
+
|
4468 |
+
if ( ! empty( $properties ) ) {
|
4469 |
+
// Verify associative array values are primitive.
|
4470 |
+
foreach ( $properties as $k => $v ) {
|
4471 |
+
if ( ! is_scalar( $v ) ) {
|
4472 |
+
throw new Freemius_InvalidArgumentException( 'The $properties argument must be an associative key/value array with primitive values only.' );
|
4473 |
+
}
|
4474 |
+
}
|
4475 |
+
|
4476 |
+
$event['properties'] = $properties;
|
4477 |
+
}
|
4478 |
+
|
4479 |
+
$result = $this->get_api_site_scope()->call( 'events.json', 'post', $event );
|
4480 |
+
|
4481 |
+
return $this->is_api_error( $result ) ?
|
4482 |
+
false :
|
4483 |
+
$result;
|
4484 |
+
}
|
4485 |
+
|
4486 |
+
/**
|
4487 |
+
* Track install's custom event only once, but it still triggers the API call.
|
4488 |
+
*
|
4489 |
+
* IMPORTANT:
|
4490 |
+
* Custom event tracking is currently only supported for specific clients.
|
4491 |
+
* If you are not one of them, please don't use this method. If you will,
|
4492 |
+
* the API will simply ignore your request based on the plugin ID.
|
4493 |
+
*
|
4494 |
+
* Need custom tracking for your plugin or theme?
|
4495 |
+
* If you are interested in custom event tracking please contact yo@freemius.com
|
4496 |
+
* for further details.
|
4497 |
+
*
|
4498 |
+
* @author Vova Feldman (@svovaf)
|
4499 |
+
* @since 1.2.1
|
4500 |
+
*
|
4501 |
+
* @param string $name Event name.
|
4502 |
+
* @param array $properties Associative key/value array with primitive values only
|
4503 |
+
* @param bool $process_at A valid future date-time in the following format Y-m-d H:i:s.
|
4504 |
+
*
|
4505 |
+
* @return object|false Event data or FALSE on failure.
|
4506 |
+
*
|
4507 |
+
* @throws \Freemius_InvalidArgumentException
|
4508 |
+
*
|
4509 |
+
* @user Freemius::track_event()
|
4510 |
+
*/
|
4511 |
+
public function track_event_once( $name, $properties = array(), $process_at = false ) {
|
4512 |
+
return $this->track_event( $name, $properties, $process_at, true );
|
4513 |
+
}
|
4514 |
+
|
4515 |
+
/**
|
4516 |
+
* Plugin uninstall hook.
|
4517 |
+
*
|
4518 |
+
* @author Vova Feldman (@svovaf)
|
4519 |
+
* @since 1.0.1
|
4520 |
*
|
4521 |
* @param bool $check_user Enforce checking if user have plugins activation privileges.
|
4522 |
*/
|
4527 |
return;
|
4528 |
}
|
4529 |
|
4530 |
+
$params = array();
|
4531 |
+
$uninstall_reason = null;
|
4532 |
if ( isset( $this->_storage->uninstall_reason ) ) {
|
4533 |
+
$uninstall_reason = $this->_storage->uninstall_reason;
|
4534 |
+
$params['reason_id'] = $uninstall_reason->id;
|
4535 |
+
$params['reason_info'] = $uninstall_reason->info;
|
4536 |
}
|
4537 |
|
4538 |
+
if ( ! $this->is_registered() && isset( $uninstall_reason ) ) {
|
4539 |
// Send anonymous uninstall event only if user submitted a feedback.
|
4540 |
+
if ( isset( $uninstall_reason->is_anonymous ) && ! $uninstall_reason->is_anonymous ) {
|
4541 |
+
$this->opt_in( false, false, false, false, true );
|
4542 |
+
} else {
|
4543 |
+
$params['uid'] = $this->get_anonymous_id();
|
4544 |
+
$this->get_api_plugin_scope()->call( 'uninstall.json', 'put', $params );
|
4545 |
+
}
|
4546 |
} else {
|
4547 |
// Send uninstall event.
|
4548 |
$this->send_install_update( array_merge( $params, array(
|
4603 |
}
|
4604 |
}
|
4605 |
|
4606 |
+
#----------------------------------------------------------------------------------
|
4607 |
+
#region Plugin Information
|
4608 |
+
#----------------------------------------------------------------------------------
|
4609 |
|
4610 |
/**
|
4611 |
* Load WordPress core plugin.php essential module.
|
4615 |
*/
|
4616 |
private static function require_plugin_essentials() {
|
4617 |
if ( ! function_exists( 'get_plugins' ) ) {
|
4618 |
+
self::$_static_logger->log( 'Including wp-admin/includes/plugin.php...' );
|
4619 |
+
|
4620 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
4621 |
}
|
4622 |
}
|
4681 |
return $this->_plugin->id;
|
4682 |
}
|
4683 |
|
4684 |
+
/**
|
4685 |
+
* @author Vova Feldman (@svovaf)
|
4686 |
+
* @since 1.2.1.5
|
4687 |
+
*
|
4688 |
+
* @return string Freemius SDK version
|
4689 |
+
*/
|
4690 |
+
function get_sdk_version() {
|
4691 |
+
return $this->version;
|
4692 |
+
}
|
4693 |
+
|
4694 |
+
/**
|
4695 |
+
* @author Vova Feldman (@svovaf)
|
4696 |
+
* @since 1.2.1.5
|
4697 |
+
*
|
4698 |
+
* @return number Parent plugin ID (if parent exist).
|
4699 |
+
*/
|
4700 |
+
function get_parent_id() {
|
4701 |
+
return $this->is_addon() ?
|
4702 |
+
$this->get_parent_instance()->get_id() :
|
4703 |
+
$this->_plugin->id;
|
4704 |
+
}
|
4705 |
+
|
4706 |
/**
|
4707 |
* @author Vova Feldman (@svovaf)
|
4708 |
* @since 1.0.1
|
4927 |
* @author Vova Feldman (@svovaf)
|
4928 |
* @since 1.0.6
|
4929 |
*
|
4930 |
+
* @return array<number,FS_Plugin[]>|false
|
4931 |
*/
|
4932 |
private static function get_all_addons() {
|
4933 |
$addons = self::$_accounts->get_option( 'addons', array() );
|
4966 |
return is_object( $this->_user );
|
4967 |
}
|
4968 |
|
4969 |
+
/**
|
4970 |
+
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
4971 |
+
*
|
4972 |
+
* @author Leo Fajardo (@leorw)
|
4973 |
+
* @since 1.2.1.5
|
4974 |
+
*
|
4975 |
+
* @return bool
|
4976 |
+
*/
|
4977 |
+
function is_tracking_allowed() {
|
4978 |
+
return ( is_object( $this->_site ) && true !== $this->_site->is_disconnected );
|
4979 |
+
}
|
4980 |
+
|
4981 |
/**
|
4982 |
* @author Vova Feldman (@svovaf)
|
4983 |
* @since 1.0.4
|
5016 |
*
|
5017 |
* @since 1.1.7.3 If not yet loaded, fetch data from the API.
|
5018 |
*
|
5019 |
+
* @param bool $flush
|
5020 |
+
*
|
5021 |
* @return FS_Plugin[]|false
|
5022 |
*/
|
5023 |
+
function get_addons( $flush = false ) {
|
5024 |
$this->_logger->entrance();
|
5025 |
|
5026 |
+
if ( ! $this->_has_addons ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5027 |
return false;
|
5028 |
}
|
5029 |
|
5030 |
+
$addons = $this->_sync_addons( $flush );
|
5031 |
+
|
5032 |
+
return ( ! is_array( $addons ) || empty( $addons ) ) ?
|
5033 |
+
false :
|
5034 |
+
$addons;
|
5035 |
}
|
5036 |
|
5037 |
/**
|
5105 |
*
|
5106 |
* @param string $slug
|
5107 |
*
|
5108 |
+
* @param bool $flush
|
5109 |
+
*
|
5110 |
* @return FS_Plugin|false
|
5111 |
*/
|
5112 |
+
function get_addon_by_slug( $slug, $flush = false ) {
|
5113 |
$this->_logger->entrance();
|
5114 |
|
5115 |
+
$addons = $this->get_addons( $flush );
|
5116 |
|
5117 |
if ( is_array( $addons ) ) {
|
5118 |
foreach ( $addons as $addon ) {
|
5119 |
+
if ( $slug === $addon->slug ) {
|
5120 |
return $addon;
|
5121 |
}
|
5122 |
}
|
5125 |
return false;
|
5126 |
}
|
5127 |
|
5128 |
+
#----------------------------------------------------------------------------------
|
5129 |
+
#region Plans & Licensing
|
5130 |
+
#----------------------------------------------------------------------------------
|
5131 |
|
5132 |
/**
|
5133 |
* Check if running premium plugin code.
|
5169 |
* @author Vova Feldman (@svovaf)
|
5170 |
* @since 1.0.9
|
5171 |
*
|
5172 |
+
* @return FS_Plugin_Plan|false
|
5173 |
*/
|
5174 |
function get_plan() {
|
5175 |
+
return is_object( $this->_site->plan ) ?
|
5176 |
+
$this->_site->plan :
|
5177 |
+
false;
|
5178 |
}
|
5179 |
|
5180 |
/**
|
5208 |
return false;
|
5209 |
}
|
5210 |
|
5211 |
+
return $this->has_active_valid_license() && ( $this->_site->trial_plan_id == $this->_license->plan_id );
|
5212 |
}
|
5213 |
|
5214 |
/**
|
5247 |
}
|
5248 |
|
5249 |
/**
|
5250 |
+
* Check if the user has an activate, non-expired license on current plugin's install.
|
5251 |
*
|
5252 |
* @since 1.0.9
|
5253 |
*
|
5267 |
return (
|
5268 |
! $this->is_trial() &&
|
5269 |
'free' !== $this->_site->plan->name &&
|
5270 |
+
$this->has_active_valid_license()
|
5271 |
);
|
5272 |
}
|
5273 |
|
5322 |
* @author Vova Feldman (@svovaf)
|
5323 |
* @since 1.0.5
|
5324 |
*
|
5325 |
+
* @return FS_Plugin_License|false
|
5326 |
*/
|
5327 |
function _get_available_premium_license() {
|
5328 |
$this->_logger->entrance();
|
5352 |
*/
|
5353 |
function _sync_plans() {
|
5354 |
$plans = $this->_fetch_plugin_plans();
|
5355 |
+
|
5356 |
+
if ( $this->is_array_instanceof( $plans, 'FS_Plugin_Plan' ) ) {
|
5357 |
$this->_plans = $plans;
|
5358 |
$this->_store_plans();
|
5359 |
}
|
5369 |
*
|
5370 |
* @param number $id
|
5371 |
*
|
5372 |
+
* @return FS_Plugin_Plan|false
|
5373 |
*/
|
5374 |
function _get_plan_by_id( $id ) {
|
5375 |
$this->_logger->entrance();
|
5423 |
*/
|
5424 |
function _sync_licenses( $site_license_id = false ) {
|
5425 |
$licenses = $this->_fetch_licenses( false, $site_license_id );
|
5426 |
+
|
5427 |
+
if ( $this->is_array_instanceof( $licenses, 'FS_Plugin_License' ) ) {
|
5428 |
$this->_licenses = $licenses;
|
5429 |
$this->_store_licenses();
|
5430 |
}
|
5443 |
*
|
5444 |
* @param number $id
|
5445 |
*
|
5446 |
+
* @return FS_Plugin_License|false
|
5447 |
*/
|
5448 |
function _get_license_by_id( $id ) {
|
5449 |
$this->_logger->entrance();
|
5654 |
* @return bool
|
5655 |
*/
|
5656 |
function has_paid_plan() {
|
5657 |
+
return $this->_has_paid_plans ||
|
5658 |
+
FS_Plan_Manager::instance()->has_paid_plan( $this->_plans );
|
5659 |
}
|
5660 |
|
5661 |
/**
|
5668 |
*/
|
5669 |
function has_trial_plan() {
|
5670 |
if ( ! $this->is_registered() ) {
|
5671 |
+
/**
|
5672 |
+
* @author Vova Feldman(@svovaf)
|
5673 |
+
* @since 1.2.1.5
|
5674 |
+
*
|
5675 |
+
* Allow setting a trial from the SDK without calling the API.
|
5676 |
+
* But, if the user did opt-in, continue using the real data from the API.
|
5677 |
+
*/
|
5678 |
+
if ( $this->_trial_days >= 0 ) {
|
5679 |
+
return true;
|
5680 |
+
}
|
5681 |
+
|
5682 |
return false;
|
5683 |
}
|
5684 |
|
5696 |
* @return bool
|
5697 |
*/
|
5698 |
function has_free_plan() {
|
5699 |
+
return ! $this->is_only_premium();
|
5700 |
}
|
5701 |
|
5702 |
/**
|
5708 |
* @since 1.1.9
|
5709 |
*/
|
5710 |
function _add_license_activation_dialog_box() {
|
|
|
|
|
|
|
|
|
|
|
|
|
5711 |
$vars = array(
|
5712 |
+
'slug' => $this->_slug,
|
|
|
|
|
5713 |
);
|
5714 |
|
5715 |
fs_require_template( 'forms/license-activation.php', $vars );
|
5716 |
fs_require_template( 'forms/resend-key.php', $vars );
|
5717 |
}
|
5718 |
|
5719 |
+
/**
|
5720 |
+
* Displays the opt-out dialog box when the user clicks on the "Opt Out" link on the "Plugins"
|
5721 |
+
* page.
|
5722 |
+
*
|
5723 |
+
* @author Leo Fajardo (@leorw)
|
5724 |
+
* @since 1.2.1.5
|
5725 |
+
*/
|
5726 |
+
function _add_optout_dialog() {
|
5727 |
+
$vars = array(
|
5728 |
+
'slug' => $this->_slug,
|
5729 |
+
);
|
5730 |
+
|
5731 |
+
fs_require_template( 'forms/optout.php', $vars );
|
5732 |
+
}
|
5733 |
+
|
5734 |
/**
|
5735 |
* Prepare page to include all required UI and logic for the license activation dialog.
|
5736 |
*
|
5737 |
* @author Vova Feldman (@svovaf)
|
5738 |
* @since 1.2.0
|
5739 |
*/
|
5740 |
+
function _add_license_activation() {
|
5741 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
5742 |
+
// Only admins can activate a license.
|
5743 |
+
return;
|
5744 |
+
}
|
|
|
5745 |
|
5746 |
+
if ( ! $this->has_paid_plan() ) {
|
5747 |
+
// Module doesn't have any paid plans.
|
5748 |
+
return;
|
5749 |
+
}
|
5750 |
+
|
5751 |
+
if ( ! $this->is_premium() ) {
|
5752 |
+
// Only add license activation logic to the premium version.
|
5753 |
+
return;
|
5754 |
+
}
|
5755 |
+
|
5756 |
+
// Add license activation link and AJAX request handler.
|
5757 |
+
if ( $this->is_plugins_page() ) {
|
5758 |
+
/**
|
5759 |
+
* @since 1.2.0 Add license action link only on plugins page.
|
5760 |
+
*/
|
5761 |
+
$this->_add_license_action_link();
|
5762 |
}
|
5763 |
+
|
5764 |
+
// Add license activation AJAX callback.
|
5765 |
+
$this->add_ajax_action( 'activate_license', array( &$this, '_activate_license_ajax_action' ) );
|
5766 |
+
|
5767 |
+
// Add resend license AJAX callback.
|
5768 |
+
$this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
|
5769 |
}
|
5770 |
|
5771 |
/**
|
5773 |
* @since 1.1.9
|
5774 |
*/
|
5775 |
function _activate_license_ajax_action() {
|
5776 |
+
$license_key = trim( fs_request_get( 'license_key' ) );
|
5777 |
|
5778 |
if ( empty( $license_key ) ) {
|
5779 |
exit;
|
5780 |
}
|
5781 |
|
5782 |
+
$slug = $_POST['slug'];
|
5783 |
+
$fs = ( ( $slug === $this->_slug ) ? $this : self::instance( $slug ) );
|
5784 |
+
$error = false;
|
5785 |
+
$next_page = false;
|
5786 |
|
5787 |
if ( $this->is_registered() ) {
|
5788 |
$api = $fs->get_api_site_scope();
|
5789 |
+
$install = $api->call( '/', 'put', array(
|
5790 |
+
'license_key' => $this->apply_filters( 'license_key', $license_key )
|
5791 |
+
) );
|
|
|
|
|
5792 |
|
5793 |
if ( isset( $install->error ) ) {
|
5794 |
$error = $install->error->message;
|
5795 |
+
} else {
|
5796 |
+
$fs = $this->is_addon() ?
|
5797 |
+
$this->get_parent_instance() :
|
5798 |
+
$this;
|
5799 |
+
|
5800 |
+
$next_page = $fs->_get_sync_license_url( $this->get_id(), true );
|
5801 |
+
|
5802 |
+
$this->reconnect_locally();
|
5803 |
}
|
5804 |
} else {
|
5805 |
+
$next_page = $this->opt_in( false, false, false, $license_key );
|
5806 |
+
|
5807 |
+
if ( isset( $next_page->error ) ) {
|
5808 |
+
$error = $next_page->error;
|
5809 |
+
}
|
5810 |
}
|
5811 |
|
5812 |
$result = array(
|
5815 |
|
5816 |
if ( false !== $error ) {
|
5817 |
$result['error'] = $error;
|
5818 |
+
} else {
|
5819 |
+
$result['next_page'] = $next_page;
|
5820 |
}
|
5821 |
|
5822 |
echo json_encode( $result );
|
5824 |
exit;
|
5825 |
}
|
5826 |
|
5827 |
+
/**
|
5828 |
+
* Billing update AJAX callback.
|
5829 |
+
*
|
5830 |
+
* @author Vova Feldman (@svovaf)
|
5831 |
+
* @since 1.2.1.5
|
5832 |
+
*/
|
5833 |
+
function _update_billing_ajax_action() {
|
5834 |
+
check_ajax_referer( $this->get_action_tag( 'update_billing' ), 'security' );
|
5835 |
+
|
5836 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
5837 |
+
// Only for admins.
|
5838 |
+
$this->shoot_ajax_failure();
|
5839 |
+
}
|
5840 |
+
|
5841 |
+
$billing = fs_request_get( 'billing' );
|
5842 |
+
|
5843 |
+
$api = $this->get_api_user_scope();
|
5844 |
+
$result = $api->call( '/billing.json', 'put', array_merge( $billing, array(
|
5845 |
+
'plugin_id' => $this->get_parent_id(),
|
5846 |
+
) ) );
|
5847 |
+
|
5848 |
+
if ( ! $this->is_api_result_entity( $result ) ) {
|
5849 |
+
$this->shoot_ajax_failure();
|
5850 |
+
}
|
5851 |
+
|
5852 |
+
// Purge cached billing.
|
5853 |
+
$this->get_api_user_scope()->purge_cache( 'billing.json' );
|
5854 |
+
|
5855 |
+
$this->shoot_ajax_success();
|
5856 |
+
}
|
5857 |
+
|
5858 |
+
/**
|
5859 |
+
* Trial start for anonymous users (AJAX callback).
|
5860 |
+
*
|
5861 |
+
* @author Vova Feldman (@svovaf)
|
5862 |
+
* @since 1.2.1.5
|
5863 |
+
*/
|
5864 |
+
function _start_trial_ajax_action() {
|
5865 |
+
check_ajax_referer( $this->get_action_tag( 'start_trial' ), 'security' );
|
5866 |
+
|
5867 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
5868 |
+
// Only for admins.
|
5869 |
+
$this->shoot_ajax_failure();
|
5870 |
+
}
|
5871 |
+
|
5872 |
+
$trial_data = fs_request_get( 'trial' );
|
5873 |
+
|
5874 |
+
$next_page = $this->opt_in(
|
5875 |
+
false,
|
5876 |
+
false,
|
5877 |
+
false,
|
5878 |
+
false,
|
5879 |
+
false,
|
5880 |
+
$trial_data['plan_id']
|
5881 |
+
);
|
5882 |
+
|
5883 |
+
if ( is_object( $next_page ) && $this->is_api_error( $next_page ) ) {
|
5884 |
+
$this->shoot_ajax_failure(
|
5885 |
+
isset( $next_page->error ) ?
|
5886 |
+
$next_page->error->message :
|
5887 |
+
var_export( $next_page, true )
|
5888 |
+
);
|
5889 |
+
}
|
5890 |
+
|
5891 |
+
$this->shoot_ajax_success( array(
|
5892 |
+
'next_page' => $next_page,
|
5893 |
+
) );
|
5894 |
+
}
|
5895 |
+
|
5896 |
/**
|
5897 |
* @author Leo Fajardo (@leorw)
|
5898 |
* @since 1.2.0
|
5942 |
exit;
|
5943 |
}
|
5944 |
|
5945 |
+
/**
|
5946 |
+
* Helper method to check if user in the plugins page.
|
5947 |
+
*
|
5948 |
+
* @author Vova Feldman (@svovaf)
|
5949 |
+
* @since 1.2.1.5
|
5950 |
+
*
|
5951 |
+
* @return bool
|
5952 |
+
*/
|
5953 |
+
private function is_plugins_page() {
|
5954 |
+
global $pagenow;
|
5955 |
+
|
5956 |
+
return ( 'plugins.php' === $pagenow );
|
5957 |
+
}
|
5958 |
+
|
5959 |
+
#----------------------------------------------------------------------------------
|
5960 |
#region URL Generators
|
5961 |
+
#----------------------------------------------------------------------------------
|
5962 |
|
5963 |
/**
|
5964 |
* Alias to pricing_url().
|
6202 |
$ajax_action = fs_request_get( 'action' );
|
6203 |
|
6204 |
foreach ( $actions as $action ) {
|
6205 |
+
if ( $ajax_action === $this->get_action_tag( $action ) ) {
|
6206 |
return true;
|
6207 |
}
|
6208 |
}
|
6257 |
* @return string
|
6258 |
*/
|
6259 |
function _get_admin_page_url( $page = '', $params = array() ) {
|
6260 |
+
if ( 0 < count( $params ) ) {
|
6261 |
+
foreach ( $params as $k => $v ) {
|
6262 |
+
$params[ $k ] = urlencode( $v );
|
6263 |
+
}
|
6264 |
+
}
|
6265 |
+
|
6266 |
if ( ! $this->_menu->is_top_level() ) {
|
6267 |
$parent_slug = $this->_menu->get_parent_slug();
|
6268 |
$menu_file = ( false !== strpos( $parent_slug, '.php' ) ) ?
|
6339 |
self::require_pluggable_essentials();
|
6340 |
|
6341 |
return ( $add_action_nonce && is_string( $action ) ) ?
|
6342 |
+
fs_nonce_url( $this->_get_admin_page_url( 'account', $params ), $action ) :
|
6343 |
$this->_get_admin_page_url( 'account', $params );
|
6344 |
}
|
6345 |
|
6534 |
$this->_set_account( $user, $site, $plans );
|
6535 |
|
6536 |
// Reload the page with the keys.
|
6537 |
+
fs_redirect( $this->_get_admin_page_url() );
|
|
|
|
|
6538 |
}
|
6539 |
}
|
6540 |
|
6562 |
return false;
|
6563 |
}
|
6564 |
|
6565 |
+
#----------------------------------------------------------------------------------
|
6566 |
+
#region Account (Loading, Updates & Activation)
|
6567 |
+
#----------------------------------------------------------------------------------
|
6568 |
|
6569 |
/***
|
6570 |
* Load account information (user + site).
|
6606 |
// Load plans.
|
6607 |
$this->_plans = $plans[ $this->_slug ];
|
6608 |
if ( ! is_array( $this->_plans ) || empty( $this->_plans ) ) {
|
6609 |
+
$this->_sync_plans();
|
6610 |
} else {
|
6611 |
for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) {
|
6612 |
if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) {
|
6675 |
|
6676 |
$current_user = self::_get_current_wp_user();
|
6677 |
|
6678 |
+
$activation_action = $this->_slug . '_activate_new';
|
6679 |
+
$return_url = $this->is_anonymous() ?
|
6680 |
+
// If skipped already, then return to the account page.
|
6681 |
+
$this->get_account_url( $activation_action, array(), false ) :
|
6682 |
+
// Return to the module's main page.
|
6683 |
+
$this->_get_admin_page_url(
|
|
|
|
|
|
|
|
|
|
|
6684 |
'',
|
6685 |
+
array( 'fs_action' => $activation_action )
|
6686 |
+
);
|
6687 |
+
|
6688 |
+
$params = array(
|
6689 |
+
'user_firstname' => $current_user->user_firstname,
|
6690 |
+
'user_lastname' => $current_user->user_lastname,
|
6691 |
+
'user_nickname' => $current_user->user_nicename,
|
6692 |
+
'user_email' => $current_user->user_email,
|
6693 |
+
'user_ip' => WP_FS__REMOTE_ADDR,
|
6694 |
+
'plugin_slug' => $this->_slug,
|
6695 |
+
'plugin_id' => $this->get_id(),
|
6696 |
+
'plugin_public_key' => $this->get_public_key(),
|
6697 |
+
'plugin_version' => $this->get_plugin_version(),
|
6698 |
+
'return_url' => fs_nonce_url( $return_url, $activation_action ),
|
6699 |
+
'account_url' => fs_nonce_url( $this->_get_admin_page_url(
|
6700 |
'account',
|
6701 |
array( 'fs_action' => 'sync_user' )
|
6702 |
), 'sync_user' ),
|
6703 |
+
'site_uid' => $this->get_anonymous_id(),
|
6704 |
+
'site_url' => get_site_url(),
|
6705 |
+
'site_name' => get_bloginfo( 'name' ),
|
6706 |
+
'platform_version' => get_bloginfo( 'version' ),
|
6707 |
+
'sdk_version' => $this->version,
|
6708 |
+
'programming_language_version' => phpversion(),
|
6709 |
+
'language' => get_bloginfo( 'language' ),
|
6710 |
+
'charset' => get_bloginfo( 'charset' ),
|
6711 |
+
'is_premium' => $this->is_premium(),
|
6712 |
+
'is_active' => true,
|
6713 |
+
'is_uninstalled' => false,
|
6714 |
);
|
6715 |
|
6716 |
+
if ( $this->is_pending_activation() &&
|
6717 |
+
! empty( $this->_storage->pending_license_key )
|
6718 |
+
) {
|
6719 |
+
$params['license_key'] = $this->_storage->pending_license_key;
|
6720 |
+
}
|
6721 |
+
|
6722 |
if ( WP_FS__SKIP_EMAIL_ACTIVATION && $this->has_secret_key() ) {
|
6723 |
// Even though rand() is known for its security issues,
|
6724 |
// the timestamp adds another layer of protection.
|
6738 |
}
|
6739 |
|
6740 |
/**
|
6741 |
+
* 1. If successful opt-in or pending activation returns the next page that the user should be redirected to.
|
6742 |
+
* 2. If there was an API error, return the API result.
|
6743 |
+
*
|
6744 |
* @author Vova Feldman (@svovaf)
|
6745 |
* @since 1.1.7.4
|
6746 |
*
|
6747 |
* @param string|bool $email
|
6748 |
* @param string|bool $first
|
6749 |
* @param string|bool $last
|
6750 |
+
* @param string|bool $license_key
|
6751 |
+
* @param bool $is_uninstall If "true", this means that the module is currently being uninstalled.
|
6752 |
+
* In this case, the user and site info will be sent to the server but no
|
6753 |
+
* data will be saved to the WP installation's database.
|
6754 |
+
* @param number|bool $trial_plan_id
|
6755 |
+
*
|
6756 |
+
* @return string|object
|
6757 |
+
* @use WP_Error
|
6758 |
+
*/
|
6759 |
+
function opt_in(
|
6760 |
+
$email = false,
|
6761 |
+
$first = false,
|
6762 |
+
$last = false,
|
6763 |
+
$license_key = false,
|
6764 |
+
$is_uninstall = false,
|
6765 |
+
$trial_plan_id = false
|
6766 |
+
) {
|
6767 |
$this->_logger->entrance();
|
6768 |
|
6769 |
if ( false === $email ) {
|
6771 |
$email = $current_user->user_email;
|
6772 |
}
|
6773 |
|
6774 |
+
/**
|
6775 |
+
* @since 1.2.1 If activating with license key, ignore the context-user
|
6776 |
+
* since the user will be automatically loaded from the license.
|
6777 |
+
*/
|
6778 |
+
if ( empty( $license_key ) ) {
|
6779 |
+
// Clean up pending license if opt-ing in again.
|
6780 |
+
$this->_storage->remove( 'pending_license_key' );
|
6781 |
|
6782 |
+
if ( ! $is_uninstall ) {
|
6783 |
+
$fs_user = Freemius::_get_user_by_email( $email );
|
6784 |
+
if ( is_object( $fs_user ) && ! $this->is_pending_activation() ) {
|
6785 |
+
return $this->install_with_current_user( false, $trial_plan_id );
|
6786 |
+
}
|
6787 |
+
}
|
6788 |
}
|
6789 |
|
6790 |
$user_info = array();
|
6800 |
|
6801 |
$params = $this->get_opt_in_params( $user_info );
|
6802 |
|
6803 |
+
$filtered_license_key = false;
|
6804 |
+
if ( is_string( $license_key ) ) {
|
6805 |
+
$filtered_license_key = $this->apply_filters( 'license_key', $license_key );
|
6806 |
+
$params['license_key'] = $filtered_license_key;
|
6807 |
+
} else if ( FS_Plugin_Plan::is_valid_id( $trial_plan_id ) ) {
|
6808 |
+
$params['trial_plan_id'] = $trial_plan_id;
|
6809 |
+
}
|
6810 |
+
|
6811 |
+
if ( $is_uninstall ) {
|
6812 |
+
$params['uninstall_params'] = array(
|
6813 |
+
'reason_id' => $this->_storage->uninstall_reason->id,
|
6814 |
+
'reason_info' => $this->_storage->uninstall_reason->info
|
6815 |
+
);
|
6816 |
}
|
6817 |
|
6818 |
$params['format'] = 'json';
|
6831 |
if ( $response instanceof WP_Error ) {
|
6832 |
if ( 'https://' === substr( $url, 0, 8 ) &&
|
6833 |
isset( $response->errors ) &&
|
6834 |
+
isset( $response->errors['http_request_failed'] )
|
|
|
6835 |
) {
|
6836 |
+
$http_error = strtolower( $response->errors['http_request_failed'][0] );
|
|
|
6837 |
|
6838 |
+
if ( false !== strpos( $http_error, 'ssl' ) ) {
|
6839 |
+
// Failed due to old version of cURL or Open SSL (SSLv3 is not supported by CloudFlare).
|
6840 |
+
$url = 'http://' . substr( $url, 8 );
|
|
|
|
|
|
|
6841 |
|
6842 |
+
$response = wp_remote_post( $url, array(
|
6843 |
+
'method' => 'POST',
|
6844 |
+
'body' => $params,
|
6845 |
+
'timeout' => 15,
|
6846 |
+
) );
|
6847 |
+
}
|
6848 |
}
|
6849 |
}
|
6850 |
|
6851 |
if ( is_wp_error( $response ) ) {
|
6852 |
+
/**
|
6853 |
+
* @var WP_Error $response
|
6854 |
+
*/
|
6855 |
+
$result = new stdClass();
|
6856 |
+
|
6857 |
+
$error_code = $response->get_error_code();
|
6858 |
+
$error_type = str_replace( ' ', '', ucwords( str_replace( '_', ' ', $error_code ) ) );
|
6859 |
+
|
6860 |
+
$result->error = (object) array(
|
6861 |
+
'type' => $error_type,
|
6862 |
+
'message' => $response->get_error_message(),
|
6863 |
+
'code' => $error_code,
|
6864 |
+
'http' => 402
|
6865 |
+
);
|
6866 |
+
|
6867 |
+
return $result;
|
6868 |
+
}
|
6869 |
+
|
6870 |
+
// Module is being uninstalled, don't handle the returned data.
|
6871 |
+
if ( $is_uninstall ) {
|
6872 |
+
return true;
|
6873 |
}
|
6874 |
|
6875 |
$decoded = @json_decode( $response['body'] );
|
6878 |
return false;
|
6879 |
}
|
6880 |
|
6881 |
+
if ( ! $this->is_api_result_object( $decoded ) ) {
|
6882 |
+
if ( ! empty( $params['license_key'] ) ) {
|
6883 |
+
// Pass the fully entered license key to the failure handler.
|
6884 |
+
$params['license_key'] = $license_key;
|
6885 |
+
}
|
6886 |
+
|
6887 |
+
return $is_uninstall ?
|
6888 |
+
$decoded :
|
6889 |
+
$this->apply_filters( 'after_install_failure', $decoded, $params );
|
6890 |
} else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) {
|
6891 |
// Pending activation, add message.
|
6892 |
+
return $this->set_pending_confirmation(
|
6893 |
+
true,
|
6894 |
+
false,
|
6895 |
+
$filtered_license_key,
|
6896 |
+
! empty( $params['trial_plan_id'] )
|
6897 |
+
);
|
6898 |
} else if ( isset( $decoded->install_secret_key ) ) {
|
6899 |
+
return $this->install_with_new_user(
|
6900 |
$decoded->user_id,
|
6901 |
$decoded->user_public_key,
|
6902 |
$decoded->user_secret_key,
|
6905 |
$decoded->install_secret_key,
|
6906 |
false
|
6907 |
);
|
|
|
|
|
6908 |
}
|
6909 |
|
6910 |
+
return $decoded;
|
6911 |
}
|
6912 |
|
6913 |
/**
|
6920 |
* @param FS_Site $site
|
6921 |
* @param bool $redirect
|
6922 |
*
|
6923 |
+
* @return string If redirect is `false`, returns the next page the user should be redirected to.
|
6924 |
*/
|
6925 |
function setup_account( FS_User $user, FS_Site $site, $redirect = true ) {
|
6926 |
$this->_user = $user;
|
6946 |
$this->_license = $this->_get_license_by_id( $site->license_id );
|
6947 |
}
|
6948 |
|
6949 |
+
$this->_admin_notices->remove_sticky( 'connect_account' );
|
6950 |
+
|
6951 |
if ( $this->is_pending_activation() ) {
|
6952 |
// Remove pending activation sticky notice (if still exist).
|
6953 |
$this->_admin_notices->remove_sticky( 'activation_pending' );
|
6955 |
// Remove plugin from pending activation mode.
|
6956 |
unset( $this->_storage->is_pending_activation );
|
6957 |
|
6958 |
+
if ( ! $this->is_paying_or_trial() ) {
|
6959 |
$this->_admin_notices->add_sticky(
|
6960 |
sprintf( __fs( 'plugin-x-activation-message', $this->_slug ), '<b>' . $this->get_plugin_name() . '</b>' ),
|
6961 |
'activation_complete'
|
6963 |
}
|
6964 |
}
|
6965 |
|
6966 |
+
if ( $this->is_paying_or_trial() && ! $this->is_premium() ) {
|
6967 |
+
if ( $this->is_paying() ) {
|
6968 |
+
$this->_admin_notices->add_sticky(
|
6969 |
+
sprintf(
|
6970 |
+
__fs( 'activation-with-plan-x-message', $this->_slug ),
|
6971 |
+
$this->_site->plan->title
|
6972 |
+
) . $this->get_complete_upgrade_instructions(),
|
6973 |
+
'plan_upgraded',
|
6974 |
+
__fs( 'yee-haw', $this->_slug ) . '!'
|
6975 |
+
);
|
6976 |
+
} else {
|
6977 |
+
$this->_admin_notices->add_sticky(
|
6978 |
+
sprintf(
|
6979 |
+
__fs( 'trial-started-message', $this->_slug ),
|
6980 |
+
'<i>' . $this->get_plugin_name() . '</i>'
|
6981 |
+
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
6982 |
+
'trial_started',
|
6983 |
+
__fs( 'yee-haw', $this->_slug ) . '!'
|
6984 |
+
);
|
6985 |
+
}
|
6986 |
+
|
6987 |
+
$this->_admin_notices->remove_sticky( array(
|
6988 |
+
'trial_promotion',
|
6989 |
+
) );
|
6990 |
}
|
6991 |
|
6992 |
$plugin_id = fs_request_get( 'plugin_id', false );
|
6996 |
$this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
|
6997 |
}
|
6998 |
|
6999 |
+
$next_page = '';
|
7000 |
+
|
7001 |
if ( is_numeric( $plugin_id ) ) {
|
7002 |
if ( $plugin_id != $this->_plugin->id ) {
|
7003 |
// Add-on was installed - sync license right after install.
|
7004 |
+
$next_page = $this->_get_sync_license_url( $plugin_id );
|
|
|
|
|
|
|
|
|
7005 |
}
|
7006 |
} else {
|
7007 |
/**
|
7013 |
}
|
7014 |
|
7015 |
// Reload the page with the keys.
|
7016 |
+
$next_page = $this->is_anonymous() ?
|
7017 |
+
// If user previously skipped, redirect to account page.
|
7018 |
+
$this->get_account_url() :
|
7019 |
+
$this->get_after_activation_url( 'after_connect_url' );
|
7020 |
+
}
|
7021 |
+
|
7022 |
+
if ( ! empty( $next_page ) && $redirect ) {
|
7023 |
+
fs_redirect( $next_page );
|
7024 |
}
|
7025 |
+
|
7026 |
+
return $next_page;
|
7027 |
}
|
7028 |
|
7029 |
/**
|
7042 |
if ( fs_request_is_action( $this->_slug . '_activate_new' ) ) {
|
7043 |
// check_admin_referer( $this->_slug . '_activate_new' );
|
7044 |
|
|
|
|
|
7045 |
if ( fs_request_has( 'user_secret_key' ) ) {
|
7046 |
$this->install_with_new_user(
|
7047 |
fs_request_get( 'user_id' ),
|
7070 |
* @param string $install_public_key
|
7071 |
* @param string $install_secret_key
|
7072 |
* @param bool $redirect
|
7073 |
+
*
|
7074 |
+
* @return string If redirect is `false`, returns the next page the user should be redirected to.
|
7075 |
*/
|
7076 |
private function install_with_new_user(
|
7077 |
$user_id,
|
7102 |
$site = new FS_Site( $site_result );
|
7103 |
$this->_site = $site;
|
7104 |
|
7105 |
+
return $this->setup_account( $this->_user, $this->_site, $redirect );
|
7106 |
}
|
7107 |
|
7108 |
/**
|
7109 |
* @author Vova Feldman (@svovaf)
|
7110 |
* @since 1.1.7.4
|
7111 |
*
|
7112 |
+
* @param string|bool $email
|
7113 |
+
* @param bool $redirect
|
7114 |
+
* @param string|bool $license_key Since 1.2.1.5
|
7115 |
+
* @param bool $is_pending_trial Since 1.2.1.5
|
7116 |
+
*
|
7117 |
+
* @return string Since 1.2.1.5 if $redirect is `false`, return the pending activation page.
|
7118 |
*/
|
7119 |
+
private function set_pending_confirmation(
|
7120 |
+
$email = false,
|
7121 |
+
$redirect = true,
|
7122 |
+
$license_key = false,
|
7123 |
+
$is_pending_trial = false
|
7124 |
+
) {
|
7125 |
// Install must be activated via email since
|
7126 |
// user with the same email already exist.
|
7127 |
$this->_storage->is_pending_activation = true;
|
7128 |
+
$this->_add_pending_activation_notice( $email, $is_pending_trial );
|
7129 |
+
|
7130 |
+
if ( ! empty( $license_key ) ) {
|
7131 |
+
$this->_storage->pending_license_key = $license_key;
|
7132 |
+
}
|
7133 |
+
|
7134 |
+
// Remove the opt-in sticky notice.
|
7135 |
+
$this->_admin_notices->remove_sticky( array(
|
7136 |
+
'connect_account',
|
7137 |
+
'trial_promotion',
|
7138 |
+
) );
|
7139 |
+
|
7140 |
+
$next_page = $this->get_after_activation_url( 'after_pending_connect_url' );
|
7141 |
|
7142 |
// Reload the page with with pending activation message.
|
7143 |
+
if ( $redirect ) {
|
7144 |
+
fs_redirect( $next_page );
|
7145 |
}
|
7146 |
+
|
7147 |
+
return $next_page;
|
7148 |
}
|
7149 |
|
7150 |
/**
|
7163 |
if ( fs_request_is_action( $this->_slug . '_activate_existing' ) && fs_request_is_post() ) {
|
7164 |
// check_admin_referer( 'activate_existing_' . $this->_plugin->public_key );
|
7165 |
|
7166 |
+
/**
|
7167 |
+
* @author Vova Feldman (@svovaf)
|
7168 |
+
* @since 1.1.9 Add license key if given.
|
7169 |
+
*/
|
7170 |
+
$license_key = fs_request_get( 'license_secret_key' );
|
7171 |
+
|
7172 |
+
$this->install_with_current_user( $license_key );
|
7173 |
}
|
7174 |
}
|
7175 |
|
7178 |
* @author Vova Feldman (@svovaf)
|
7179 |
* @since 1.1.7.4
|
7180 |
*
|
7181 |
+
* @param string|bool $license_key
|
7182 |
+
* @param number|bool $trial_plan_id
|
7183 |
+
* @param bool $redirect
|
7184 |
+
*
|
7185 |
+
* @return string|object If redirect is `false`, returns the next page the user should be redirected to, or the
|
7186 |
+
* API error object if failed to install.
|
7187 |
*/
|
7188 |
+
private function install_with_current_user(
|
7189 |
+
$license_key = false,
|
7190 |
+
$trial_plan_id = false,
|
7191 |
+
$redirect = true
|
7192 |
+
) {
|
7193 |
// Get current logged WP user.
|
7194 |
$current_user = self::_get_current_wp_user();
|
7195 |
|
7203 |
'uid' => $this->get_anonymous_id(),
|
7204 |
);
|
7205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7206 |
if ( ! empty( $license_key ) ) {
|
7207 |
+
$filtered_license_key = $this->apply_filters( 'license_key', $license_key );
|
7208 |
+
$extra_install_params['license_key'] = $filtered_license_key;
|
7209 |
+
} else if ( FS_Plugin_Plan::is_valid_id( $trial_plan_id ) ) {
|
7210 |
+
$extra_install_params['trial_plan_id'] = $trial_plan_id;
|
7211 |
}
|
7212 |
|
7213 |
+
$args = $this->get_install_data_for_api( $extra_install_params, false, false );
|
7214 |
+
|
7215 |
// Install the plugin.
|
7216 |
$install = $this->get_api_user_scope()->call(
|
7217 |
"/plugins/{$this->get_id()}/installs.json",
|
7218 |
'post',
|
7219 |
+
$args
|
7220 |
);
|
7221 |
|
7222 |
+
if ( ! $this->is_api_result_entity( $install ) ) {
|
7223 |
+
if ( ! empty( $args['license_key'] ) ) {
|
7224 |
+
// Pass full the fully entered license key to the failure handler.
|
7225 |
+
$args['license_key'] = $license_key;
|
7226 |
+
}
|
7227 |
+
|
7228 |
+
$install = $this->apply_filters( 'after_install_failure', $install, $args );
|
7229 |
+
|
7230 |
$this->_admin_notices->add(
|
7231 |
sprintf( __fs( 'could-not-activate-x', $this->_slug ), $this->get_plugin_name() ) . ' ' .
|
7232 |
__fs( 'contact-us-with-error-message', $this->_slug ) . ' ' . '<b>' . $install->error->message . '</b>',
|
7234 |
'error'
|
7235 |
);
|
7236 |
|
7237 |
+
if ( $redirect ) {
|
7238 |
+
fs_redirect( $this->get_activation_url( array( 'error' => $install->error->message ) ) );
|
7239 |
+
}
|
7240 |
+
|
7241 |
+
return $install;
|
7242 |
}
|
7243 |
|
7244 |
$site = new FS_Site( $install );
|
7245 |
$this->_site = $site;
|
|
|
7246 |
|
7247 |
+
return $this->setup_account( $this->_user, $this->_site, $redirect );
|
|
|
|
|
|
|
7248 |
}
|
7249 |
|
7250 |
/**
|
7303 |
$this->_activate_license( true );
|
7304 |
}
|
7305 |
|
7306 |
+
#endregion
|
7307 |
|
7308 |
+
#----------------------------------------------------------------------------------
|
7309 |
+
#region Admin Menu Items
|
7310 |
+
#----------------------------------------------------------------------------------
|
7311 |
|
7312 |
private $_menu_items = array();
|
7313 |
|
7365 |
/**
|
7366 |
* @author Vova Feldman (@svovaf)
|
7367 |
* @since 1.0.1
|
|
|
|
|
7368 |
*/
|
7369 |
function _redirect_on_clicked_menu_link() {
|
7370 |
$this->_logger->entrance();
|
7376 |
foreach ( $this->_menu_items as $priority => $items ) {
|
7377 |
foreach ( $items as $item ) {
|
7378 |
if ( isset( $item['url'] ) ) {
|
7379 |
+
if ( $page === $this->_menu->get_slug( strtolower( $item['menu_slug'] ) ) ) {
|
7380 |
$this->_logger->log( 'Redirecting to ' . $item['url'] );
|
7381 |
|
7382 |
fs_redirect( $item['url'] );
|
7466 |
}
|
7467 |
}
|
7468 |
|
7469 |
+
/**
|
7470 |
+
* @author Leo Fajardo (leorw)
|
7471 |
+
* @since 1.2.1
|
7472 |
+
*
|
7473 |
+
* return string
|
7474 |
+
*/
|
7475 |
+
function get_top_level_menu_capability() {
|
7476 |
+
global $menu;
|
7477 |
+
|
7478 |
+
$top_level_menu_slug = $this->get_top_level_menu_slug();
|
7479 |
+
|
7480 |
+
foreach ( $menu as $menu_info ) {
|
7481 |
+
/**
|
7482 |
+
* The second element in the menu info array is the capability/role that has access to the menu and the
|
7483 |
+
* third element is the menu slug.
|
7484 |
+
*/
|
7485 |
+
if ( $menu_info[2] === $top_level_menu_slug ) {
|
7486 |
+
return $menu_info[1];
|
7487 |
+
}
|
7488 |
+
}
|
7489 |
+
|
7490 |
+
return 'read';
|
7491 |
+
}
|
7492 |
+
|
7493 |
/**
|
7494 |
* @author Vova Feldman (@svovaf)
|
7495 |
* @since 1.0.0
|
7557 |
// to support add-ons checkout but don't add the submenu item.
|
7558 |
// || (isset( $_GET['page'] ) && $this->_menu->get_slug( 'pricing' ) == $_GET['page']);
|
7559 |
|
7560 |
+
$pricing_cta_slug = 'upgrade';
|
7561 |
+
$pricing_class = 'upgrade-mode';
|
7562 |
+
if ( $show_pricing ) {
|
7563 |
+
if ( $this->_admin_notices->has_sticky( 'trial_promotion' ) &&
|
7564 |
+
! $this->is_paying_or_trial()
|
7565 |
+
) {
|
7566 |
+
// If running a trial promotion, modify the pricing to load the trial.
|
7567 |
+
$pricing_cta_slug = 'start-trial';
|
7568 |
+
$pricing_class = 'trial-mode';
|
7569 |
+
} else if ( $this->is_paying() ) {
|
7570 |
+
$pricing_cta_slug = 'pricing';
|
7571 |
+
$pricing_class = '';
|
7572 |
+
}
|
7573 |
+
}
|
7574 |
+
|
7575 |
// Add upgrade/pricing page.
|
7576 |
$this->add_submenu_item(
|
7577 |
+
__fs( $pricing_cta_slug, $this->_slug ) . ' ➤',
|
7578 |
array( &$this, '_pricing_page_render' ),
|
7579 |
$this->get_plugin_name() . ' – ' . __fs( 'pricing', $this->_slug ),
|
7580 |
'manage_options',
|
7581 |
'pricing',
|
7582 |
'Freemius::_clean_admin_content_section',
|
7583 |
WP_FS__LOWEST_PRIORITY,
|
7584 |
+
$show_pricing,
|
7585 |
+
$pricing_class
|
7586 |
);
|
7587 |
}
|
7588 |
}
|
7611 |
*/
|
7612 |
private function embed_submenu_items() {
|
7613 |
$item_template = $this->_menu->is_top_level() ?
|
7614 |
+
'<span class="fs-submenu-item %s %s %s">%s</span>' :
|
7615 |
+
'<span class="fs-submenu-item fs-sub %s %s %s">%s</span>';
|
7616 |
+
|
7617 |
+
$top_level_menu_capability = $this->get_top_level_menu_capability();
|
7618 |
|
7619 |
ksort( $this->_menu_items );
|
7620 |
|
7621 |
foreach ( $this->_menu_items as $priority => $items ) {
|
7622 |
foreach ( $items as $item ) {
|
7623 |
+
$capability = ( ! empty( $item['capability'] ) ? $item['capability'] : $top_level_menu_capability );
|
7624 |
+
|
7625 |
+
$menu_item = sprintf(
|
7626 |
+
$item_template,
|
7627 |
+
$this->_slug,
|
7628 |
+
$item['menu_slug'],
|
7629 |
+
! empty( $item['class'] ) ? $item['class'] : '',
|
7630 |
+
$item['menu_title']
|
7631 |
+
);
|
7632 |
+
|
7633 |
+
$menu_slug = $this->_menu->get_slug( $item['menu_slug'] );
|
7634 |
+
|
7635 |
if ( ! isset( $item['url'] ) ) {
|
7636 |
$hook = add_submenu_page(
|
7637 |
$item['show_submenu'] ?
|
7638 |
$this->get_top_level_menu_slug() :
|
7639 |
null,
|
7640 |
$item['page_title'],
|
7641 |
+
$menu_item,
|
7642 |
+
$capability,
|
7643 |
+
$menu_slug,
|
7644 |
$item['render_function']
|
7645 |
);
|
7646 |
|
7651 |
add_submenu_page(
|
7652 |
$this->get_top_level_menu_slug(),
|
7653 |
$item['page_title'],
|
7654 |
+
$menu_item,
|
7655 |
+
$capability,
|
7656 |
+
$menu_slug,
|
7657 |
array( $this, '' )
|
7658 |
);
|
7659 |
}
|
7673 |
|
7674 |
$menu_slug = $this->_menu->get_top_level_menu_slug();
|
7675 |
|
7676 |
+
/**
|
7677 |
+
* Before "admin_menu" fires, WordPress will loop over the default submenus and remove pages for which the user
|
7678 |
+
* does not have permissions. So in case a plugin does not have top-level menu but does have submenus under any
|
7679 |
+
* of the default menus, only users that have the right role can access its sub-submenus (Account, Contact Us,
|
7680 |
+
* Support Forum, etc.) since $submenu[ $menu_slug ] will be empty if the user doesn't have permission.
|
7681 |
+
*
|
7682 |
+
* In case a plugin does not have submenus under any of the default menus but does have submenus under the menu
|
7683 |
+
* of another plugin, only users that have the right role can access its sub-submenus since we will use the
|
7684 |
+
* capability needed to access the parent menu as the capability for the submenus that we will add.
|
7685 |
+
*/
|
7686 |
if ( empty( $submenu[ $menu_slug ] ) ) {
|
7687 |
return;
|
7688 |
}
|
7746 |
$this->apply_filters( 'support_forum_submenu', __fs( 'support-forum', $this->_slug ) ),
|
7747 |
$this->apply_filters( 'support_forum_url', 'https://wordpress.org/support/plugin/' . $this->_slug ),
|
7748 |
'wp-support-forum',
|
7749 |
+
null,
|
7750 |
50
|
7751 |
);
|
7752 |
}
|
7765 |
* @param bool|callable $before_render_function
|
7766 |
* @param int $priority
|
7767 |
* @param bool $show_submenu
|
7768 |
+
* @param string $class Since 1.2.1.5 can add custom classes to menu items.
|
7769 |
*/
|
7770 |
function add_submenu_item(
|
7771 |
$menu_title,
|
7775 |
$menu_slug = false,
|
7776 |
$before_render_function = false,
|
7777 |
$priority = WP_FS__DEFAULT_PRIORITY,
|
7778 |
+
$show_submenu = true,
|
7779 |
+
$class = ''
|
7780 |
) {
|
7781 |
$this->_logger->entrance( 'Title = ' . $menu_title );
|
7782 |
|
7792 |
$menu_slug,
|
7793 |
$before_render_function,
|
7794 |
$priority,
|
7795 |
+
$show_submenu,
|
7796 |
+
$class
|
7797 |
);
|
7798 |
|
7799 |
return;
|
7808 |
'page_title' => is_string( $page_title ) ? $page_title : $menu_title,
|
7809 |
'menu_title' => $menu_title,
|
7810 |
'capability' => $capability,
|
7811 |
+
'menu_slug' => is_string( $menu_slug ) ? $menu_slug : strtolower( $menu_title ),
|
7812 |
'render_function' => $render_function,
|
7813 |
'before_render_function' => $before_render_function,
|
7814 |
'show_submenu' => $show_submenu,
|
7815 |
+
'class' => $class,
|
7816 |
);
|
7817 |
}
|
7818 |
|
7859 |
$this->_menu_items[ $priority ][] = array(
|
7860 |
'menu_title' => $menu_title,
|
7861 |
'capability' => $capability,
|
7862 |
+
'menu_slug' => is_string( $menu_slug ) ? $menu_slug : strtolower( $menu_title ),
|
7863 |
'url' => $url,
|
7864 |
'page_title' => $menu_title,
|
7865 |
'render_function' => 'fs_dummy',
|
7879 |
*
|
7880 |
* @return string
|
7881 |
*/
|
7882 |
+
public function get_action_tag( $tag ) {
|
7883 |
+
return "fs_{$tag}_{$this->_slug}";
|
7884 |
+
}
|
7885 |
+
|
7886 |
+
/**
|
7887 |
+
* @author Vova Feldman (@svovaf)
|
7888 |
+
* @since 1.2.1
|
7889 |
+
*
|
7890 |
+
* @param string $tag
|
7891 |
+
*
|
7892 |
+
* @return string
|
7893 |
+
*/
|
7894 |
+
private function get_ajax_action_tag( $tag ) {
|
7895 |
+
return 'wp_ajax_' . $this->get_action_tag( $tag );
|
7896 |
}
|
7897 |
|
7898 |
/**
|
7937 |
add_action( $this->get_action_tag( $tag ), $function_to_add, $priority, $accepted_args );
|
7938 |
}
|
7939 |
|
7940 |
+
/**
|
7941 |
+
* Add AJAX action, specific for the current context plugin.
|
7942 |
+
*
|
7943 |
+
* @author Vova Feldman (@svovaf)
|
7944 |
+
* @since 1.2.1
|
7945 |
+
*
|
7946 |
+
* @param string $tag
|
7947 |
+
* @param callable $function_to_add
|
7948 |
+
* @param int $priority
|
7949 |
+
* @param int $accepted_args
|
7950 |
+
*
|
7951 |
+
* @uses add_action()
|
7952 |
+
*
|
7953 |
+
* @return bool True if action added, false if no need to add the action since the AJAX call isn't matching.
|
7954 |
+
*/
|
7955 |
+
function add_ajax_action( $tag, $function_to_add, $priority = WP_FS__DEFAULT_PRIORITY, $accepted_args = 1 ) {
|
7956 |
+
$this->_logger->entrance( $tag );
|
7957 |
+
|
7958 |
+
if ( ! $this->is_ajax_action( $tag ) ) {
|
7959 |
+
return false;
|
7960 |
+
}
|
7961 |
+
|
7962 |
+
add_action( $this->get_ajax_action_tag( $tag ), $function_to_add, $priority, $accepted_args );
|
7963 |
+
|
7964 |
+
$this->_logger->info( "$tag AJAX callback action added." );
|
7965 |
+
|
7966 |
+
return true;
|
7967 |
+
}
|
7968 |
+
|
7969 |
+
/**
|
7970 |
+
* Send a JSON response back to an Ajax request.
|
7971 |
+
*
|
7972 |
+
* @author Vova Feldman (@svovaf)
|
7973 |
+
* @since 1.2.1.5
|
7974 |
+
*
|
7975 |
+
* @param mixed $response
|
7976 |
+
*/
|
7977 |
+
function shoot_ajax_response( $response ) {
|
7978 |
+
wp_send_json( $response );
|
7979 |
+
}
|
7980 |
+
|
7981 |
+
/**
|
7982 |
+
* Send a JSON response back to an Ajax request, indicating success.
|
7983 |
+
*
|
7984 |
+
* @author Vova Feldman (@svovaf)
|
7985 |
+
* @since 1.2.1.5
|
7986 |
+
*
|
7987 |
+
* @param mixed $data Data to encode as JSON, then print and exit.
|
7988 |
+
*/
|
7989 |
+
function shoot_ajax_success( $data = null ) {
|
7990 |
+
wp_send_json_success( $data );
|
7991 |
+
}
|
7992 |
+
|
7993 |
+
/**
|
7994 |
+
* Send a JSON response back to an Ajax request, indicating failure.
|
7995 |
+
*
|
7996 |
+
* @author Vova Feldman (@svovaf)
|
7997 |
+
* @since 1.2.1.5
|
7998 |
+
*
|
7999 |
+
* @param mixed $error Optional error message.
|
8000 |
+
*/
|
8001 |
+
function shoot_ajax_failure( $error = '' ) {
|
8002 |
+
$result = array( 'success' => false );
|
8003 |
+
if ( ! empty( $error ) ) {
|
8004 |
+
$result['error'] = $error;
|
8005 |
+
}
|
8006 |
+
|
8007 |
+
wp_send_json( $result );
|
8008 |
+
}
|
8009 |
+
|
8010 |
/**
|
8011 |
* Apply filter, specific for the current context plugin.
|
8012 |
*
|
8094 |
private function _store_site( $store = true ) {
|
8095 |
$this->_logger->entrance();
|
8096 |
|
8097 |
+
if ( empty( $this->_site->id ) ) {
|
8098 |
+
$this->_logger->error( "Empty install ID, can't store site." );
|
8099 |
+
|
8100 |
+
return;
|
8101 |
+
}
|
8102 |
+
|
8103 |
$encrypted_site = clone $this->_site;
|
8104 |
$encrypted_site->plan = $this->_encrypt_entity( $this->_site->plan );
|
8105 |
|
8171 |
private function _store_user( $store = true ) {
|
8172 |
$this->_logger->entrance();
|
8173 |
|
8174 |
+
if ( empty( $this->_user->id ) ) {
|
8175 |
+
$this->_logger->error( "Empty user ID, can't store user." );
|
8176 |
+
|
8177 |
+
return;
|
8178 |
+
}
|
8179 |
+
|
8180 |
$users = self::get_all_users();
|
8181 |
$users[ $this->_user->id ] = $this->_user;
|
8182 |
self::$_accounts->set_option( 'users', $users, $store );
|
8340 |
* @link https://github.com/Freemius/wordpress-sdk/issues/6
|
8341 |
*/
|
8342 |
if ( ! $is_menu_item_account_visible ) {
|
8343 |
+
fs_redirect( $this->_get_admin_page_url() );
|
|
|
|
|
8344 |
}
|
8345 |
}
|
8346 |
}
|
8347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8348 |
/**
|
8349 |
* @param bool $store
|
8350 |
*
|
8451 |
|
8452 |
$result = $api->get( '/plans.json', true );
|
8453 |
|
8454 |
+
if ( $this->is_api_result_object( $result, 'plans' ) && is_array( $result->plans ) ) {
|
8455 |
for ( $i = 0, $len = count( $result->plans ); $i < $len; $i ++ ) {
|
8456 |
$result->plans[ $i ] = new FS_Plugin_Plan( $result->plans[ $i ] );
|
8457 |
}
|
8485 |
|
8486 |
$is_site_license_synced = false;
|
8487 |
|
8488 |
+
$api_errors = array();
|
8489 |
+
|
8490 |
+
if ( $this->is_api_result_object( $result, 'licenses' ) &&
|
8491 |
+
is_array( $result->licenses )
|
8492 |
+
) {
|
8493 |
for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
|
8494 |
$result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
|
8495 |
|
8499 |
}
|
8500 |
|
8501 |
$result = $result->licenses;
|
8502 |
+
} else {
|
8503 |
+
$api_errors[] = $result;
|
8504 |
+
$result = array();
|
8505 |
}
|
8506 |
|
8507 |
if ( ! $is_site_license_synced ) {
|
8511 |
// Try to retrieve a foreign license that is linked to the install.
|
8512 |
$api_result = $api->call( '/licenses.json' );
|
8513 |
|
8514 |
+
if ( $this->is_api_result_object( $api_result, 'licenses' ) &&
|
8515 |
+
is_array( $api_result->licenses )
|
8516 |
+
) {
|
8517 |
$licenses = $api_result->licenses;
|
8518 |
|
8519 |
if ( ! empty( $licenses ) ) {
|
8520 |
$result[] = new FS_Plugin_License( $licenses[0] );
|
8521 |
}
|
8522 |
+
} else {
|
8523 |
+
$api_errors[] = $api_result;
|
8524 |
}
|
8525 |
} else if ( is_object( $this->_license ) ) {
|
8526 |
// Fetch foreign license by ID and license key.
|
8527 |
$license = $api->get( "/licenses/{$this->_license->id}.json?license_key=" .
|
8528 |
urlencode( $this->_license->secret_key ) );
|
8529 |
|
8530 |
+
if ( $this->is_api_result_entity( $license ) ) {
|
8531 |
$result[] = new FS_Plugin_License( $license );
|
8532 |
+
} else {
|
8533 |
+
$api_errors[] = $license;
|
8534 |
}
|
8535 |
}
|
8536 |
}
|
8537 |
|
8538 |
+
if ( is_array( $result ) && 0 < count( $result ) ) {
|
8539 |
+
// If found at least one license, return license collection even if there are errors.
|
8540 |
+
return $result;
|
8541 |
+
}
|
8542 |
+
|
8543 |
+
if ( ! empty( $api_errors ) ) {
|
8544 |
+
// If found any errors and no licenses, return first error.
|
8545 |
+
return $api_errors[0];
|
8546 |
+
}
|
8547 |
+
|
8548 |
+
// Fallback to empty licenses list.
|
8549 |
return $result;
|
8550 |
}
|
8551 |
|
8579 |
return $result;
|
8580 |
}
|
8581 |
|
8582 |
+
/**
|
8583 |
+
* @author Vova Feldman (@svovaf)
|
8584 |
+
* @since 1.2.1.5
|
8585 |
+
* @uses FS_Api
|
8586 |
+
*
|
8587 |
+
* @return \FS_Billing|mixed
|
8588 |
+
*/
|
8589 |
+
function _fetch_billing() {
|
8590 |
+
require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-billing.php';
|
8591 |
+
|
8592 |
+
$billing = $this->get_api_user_scope()->call( 'billing.json' );
|
8593 |
+
|
8594 |
+
if ( $this->is_api_result_entity( $billing ) ) {
|
8595 |
+
$billing = new FS_Billing( $billing );
|
8596 |
+
}
|
8597 |
+
|
8598 |
+
return $billing;
|
8599 |
+
}
|
8600 |
+
|
8601 |
/**
|
8602 |
* @author Vova Feldman (@svovaf)
|
8603 |
* @since 1.0.4
|
8688 |
/**
|
8689 |
* Check if site assigned with active license.
|
8690 |
*
|
8691 |
+
* @author Vova Feldman (@svovaf)
|
8692 |
+
* @since 1.0.6
|
8693 |
+
*
|
8694 |
+
* @deprecated Please use has_active_valid_license() instead because license can be cancelled.
|
8695 |
*/
|
8696 |
function has_active_license() {
|
8697 |
return (
|
8701 |
);
|
8702 |
}
|
8703 |
|
8704 |
+
/**
|
8705 |
+
* Check if site assigned with active & valid (not expired) license.
|
8706 |
+
*
|
8707 |
+
* @author Vova Feldman (@svovaf)
|
8708 |
+
* @since 1.2.1
|
8709 |
+
*/
|
8710 |
+
function has_active_valid_license() {
|
8711 |
+
return (
|
8712 |
+
is_object( $this->_license ) &&
|
8713 |
+
is_numeric( $this->_license->id ) &&
|
8714 |
+
$this->_license->is_active() &&
|
8715 |
+
$this->_license->is_valid()
|
8716 |
+
);
|
8717 |
+
}
|
8718 |
+
|
8719 |
/**
|
8720 |
* Check if site assigned with license with enabled features.
|
8721 |
*
|
8812 |
$licenses = $this->_fetch_licenses( $addon->id );
|
8813 |
|
8814 |
// Sync add-on licenses.
|
8815 |
+
if ( $this->is_array_instanceof( $licenses, 'FS_Plugin_License' ) ) {
|
8816 |
$this->_update_licenses( $licenses, $addon->slug );
|
8817 |
|
8818 |
if ( ! $this->is_addon_installed( $addon->slug ) && FS_License_Manager::has_premium_license( $licenses ) ) {
|
8862 |
private function _sync_plugin_license( $background = false ) {
|
8863 |
$this->_logger->entrance();
|
8864 |
|
8865 |
+
/**
|
8866 |
+
* Sync site info.
|
8867 |
+
*
|
8868 |
+
* @todo This line will execute install sync on a daily basis, even if running the free version (for opted-in users). The reason we want to keep it that way is for cases when the user was a paying customer, then there was a failure in subscription payment, and then after some time the payment was successful. This could be heavily optimized. For example, we can skip the $flush if the current install was never associated with a paid version.
|
8869 |
+
*/
|
8870 |
$site = $this->send_install_update( array(), true );
|
8871 |
|
8872 |
$plan_change = 'none';
|
8873 |
|
8874 |
+
if ( ! $this->is_api_result_entity( $site ) ) {
|
8875 |
// Show API messages only if not background sync or if paying customer.
|
8876 |
if ( ! $background || $this->is_paying() ) {
|
8877 |
// Try to ping API to see if not blocked.
|
8950 |
// For trial with subscription use-case.
|
8951 |
$new_license = is_null( $site->license_id ) ? null : $this->_get_license_by_id( $site->license_id );
|
8952 |
|
8953 |
+
if ( is_object( $new_license ) && $new_license->is_valid() ) {
|
8954 |
$this->_site = $site;
|
8955 |
$this->_update_site_license( $new_license );
|
8956 |
$this->_store_licenses();
|
9028 |
|
9029 |
$this->_admin_notices->add(
|
9030 |
sprintf(
|
9031 |
+
__fs( 'plan-did-not-change-message', $this->_slug ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9032 |
'<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . __fs( 'trial', $this->_slug ) : '' ) . '</b></i>'
|
9033 |
+
) . ' ' . sprintf(
|
9034 |
+
'<a href="%s">%s</a>',
|
9035 |
+
$this->contact_url(
|
9036 |
+
'bug',
|
9037 |
+
sprintf( __fs( 'plan-did-not-change-email-message', $this->_slug ),
|
9038 |
+
strtoupper( $plan->name )
|
9039 |
+
)
|
9040 |
+
),
|
9041 |
+
__fs( 'contact-us-here', $this->_slug )
|
9042 |
),
|
9043 |
__fs( 'hmm', $this->_slug ) . '...'
|
9044 |
);
|
9049 |
sprintf(
|
9050 |
__fs( 'plan-upgraded-message', $this->_slug ),
|
9051 |
'<i>' . $this->get_plugin_name() . '</i>'
|
9052 |
+
) . $this->get_complete_upgrade_instructions(),
|
|
|
|
|
|
|
|
|
9053 |
'plan_upgraded',
|
9054 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
9055 |
);
|
9111 |
sprintf(
|
9112 |
__fs( 'trial-started-message', $this->_slug ),
|
9113 |
'<i>' . $this->get_plugin_name() . '</i>'
|
9114 |
+
) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
|
|
|
|
|
|
|
9115 |
'trial_started',
|
9116 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
9117 |
);
|
9188 |
$api = $this->get_api_site_scope();
|
9189 |
$license = $api->call( "/licenses/{$premium_license->id}.json", 'put', $api_request_params );
|
9190 |
|
9191 |
+
if ( ! $this->is_api_result_entity( $license ) ) {
|
9192 |
if ( ! $background ) {
|
9193 |
+
$this->_admin_notices->add( sprintf(
|
9194 |
+
'%s %s',
|
9195 |
+
__fs( 'license-activation-failed-message', $this->_slug ),
|
9196 |
+
( is_object( $license ) && isset( $license->error ) ?
|
9197 |
+
$license->error->message :
|
9198 |
+
sprintf( '%s<br><code>%s</code>',
|
9199 |
+
__fs( 'server-error-message', $this->_slug ),
|
9200 |
+
var_export( $license, true )
|
9201 |
+
)
|
9202 |
+
)
|
9203 |
+
),
|
9204 |
__fs( 'hmm', $this->_slug ) . '...',
|
9205 |
'error'
|
9206 |
);
|
9213 |
|
9214 |
// Updated site plan.
|
9215 |
$site = $this->get_api_site_scope()->get( '/', true );
|
9216 |
+
if ( $this->is_api_result_entity( $site ) ) {
|
9217 |
$this->_site = new FS_Site( $site );
|
9218 |
}
|
9219 |
$this->_update_site_license( $premium_license );
|
9224 |
if ( ! $background ) {
|
9225 |
$this->_admin_notices->add_sticky(
|
9226 |
__fs( 'license-activated-message', $this->_slug ) .
|
9227 |
+
$this->get_complete_upgrade_instructions(),
|
|
|
|
|
|
|
9228 |
'license_activated',
|
9229 |
__fs( 'yee-haw', $this->_slug ) . '!'
|
9230 |
);
|
9313 |
|
9314 |
$plan_downgraded = false;
|
9315 |
$plan = false;
|
9316 |
+
if ( $this->is_api_result_entity( $site ) ) {
|
9317 |
$prev_plan_id = $this->_site->plan->id;
|
9318 |
|
9319 |
// Update new site plan id.
|
9429 |
$api = $this->get_api_site_scope();
|
9430 |
$plan = $api->call( "plans/{$plan->id}/trials.json", 'post' );
|
9431 |
|
9432 |
+
if ( ! $this->is_api_result_entity( $plan ) ) {
|
9433 |
// Some API error while trying to start the trial.
|
9434 |
$this->_admin_notices->add(
|
9435 |
__fs( 'unexpected-api-error', $this->_slug ) . ' ' . var_export( $plan, true ),
|
9472 |
|
9473 |
$trial_cancelled = false;
|
9474 |
|
9475 |
+
if ( $this->is_api_result_entity( $site ) ) {
|
9476 |
$prev_trial_ends = $this->_site->trial_ends;
|
9477 |
|
9478 |
if ( $this->is_paid_trial() ) {
|
9506 |
// Store site updates.
|
9507 |
$this->_store_site();
|
9508 |
|
|
|
|
|
|
|
9509 |
if ( ! $this->is_addon() ||
|
9510 |
! $this->deactivate_premium_only_addon_without_license( true )
|
9511 |
) {
|
9513 |
sprintf( __fs( 'trial-cancel-message', $this->_slug ), $this->_storage->trial_plan->title )
|
9514 |
);
|
9515 |
}
|
9516 |
+
|
9517 |
+
// Clear trial plan information.
|
9518 |
+
unset( $this->_storage->trial_plan );
|
9519 |
} else {
|
9520 |
$this->_admin_notices->add(
|
9521 |
__fs( 'trial-cancel-failure-message', $this->_slug ),
|
9546 |
* @return bool
|
9547 |
*/
|
9548 |
private function _can_download_premium() {
|
9549 |
+
return $this->has_active_valid_license() ||
|
9550 |
( $this->is_trial() && ! $this->get_trial_plan()->is_free() );
|
9551 |
}
|
9552 |
|
9612 |
return ( is_object( $tag ) && isset( $tag->version ) ) ? $tag : false;
|
9613 |
}
|
9614 |
|
9615 |
+
#----------------------------------------------------------------------------------
|
9616 |
+
#region Download Plugin
|
9617 |
+
#----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9618 |
|
9619 |
/**
|
9620 |
* Download latest plugin version, based on plan.
|
9764 |
* @author Vova Feldman (@svovaf)
|
9765 |
* @since 1.0.4
|
9766 |
*
|
9767 |
+
* @param bool $flush Since 1.1.7.3 add 24 hour cache by default.
|
9768 |
*
|
9769 |
* @return FS_Plugin[]
|
9770 |
*
|
9773 |
private function _sync_addons( $flush = false ) {
|
9774 |
$this->_logger->entrance();
|
9775 |
|
9776 |
+
$api = $this->get_api_site_or_plugin_scope();
|
9777 |
+
|
9778 |
+
/**
|
9779 |
+
* @since 1.2.1
|
9780 |
+
*
|
9781 |
+
* If there's a cached version of the add-ons and not asking
|
9782 |
+
* for a flush, just use the currently stored add-ons.
|
9783 |
+
*/
|
9784 |
+
if ( ! $flush && $api->is_cached( '/addons.json?enriched=true' ) ) {
|
9785 |
+
$addons = self::get_all_addons();
|
9786 |
+
|
9787 |
+
return $addons[ $this->_plugin->id ];
|
9788 |
+
}
|
9789 |
+
|
9790 |
+
$result = $api->get( '/addons.json?enriched=true', $flush );
|
9791 |
|
9792 |
$addons = array();
|
9793 |
+
if ( $this->is_api_result_object( $result, 'plugins' ) &&
|
9794 |
+
is_array( $result->plugins )
|
9795 |
+
) {
|
9796 |
for ( $i = 0, $len = count( $result->plugins ); $i < $len; $i ++ ) {
|
9797 |
$addons[ $i ] = new FS_Plugin( $result->plugins[ $i ] );
|
9798 |
}
|
9839 |
return $user;
|
9840 |
}
|
9841 |
|
9842 |
+
#----------------------------------------------------------------------------------
|
9843 |
+
#region API Error Handling
|
9844 |
+
#----------------------------------------------------------------------------------
|
9845 |
+
|
9846 |
/**
|
9847 |
* @author Vova Feldman (@svovaf)
|
9848 |
* @since 1.1.1
|
9852 |
* @return bool Is API result contains an error.
|
9853 |
*/
|
9854 |
private function is_api_error( $result ) {
|
9855 |
+
return FS_Api::is_api_error( $result );
|
9856 |
+
}
|
9857 |
+
|
9858 |
+
/**
|
9859 |
+
* Checks if given API result is a non-empty and not an error object.
|
9860 |
+
*
|
9861 |
+
* @author Vova Feldman (@svovaf)
|
9862 |
+
* @since 1.2.1.5
|
9863 |
+
*
|
9864 |
+
* @param mixed $result
|
9865 |
+
* @param string|null $required_property Optional property we want to verify that is set.
|
9866 |
+
*
|
9867 |
+
* @return bool
|
9868 |
+
*/
|
9869 |
+
function is_api_result_object( $result, $required_property = null ) {
|
9870 |
+
return FS_Api::is_api_result_object( $result, $required_property );
|
9871 |
+
}
|
9872 |
+
|
9873 |
+
/**
|
9874 |
+
* Checks if given API result is a non-empty entity object with non-empty ID.
|
9875 |
+
*
|
9876 |
+
* @author Vova Feldman (@svovaf)
|
9877 |
+
* @since 1.2.1.5
|
9878 |
+
*
|
9879 |
+
* @param mixed $result
|
9880 |
+
*
|
9881 |
+
* @return bool
|
9882 |
+
*/
|
9883 |
+
private function is_api_result_entity( $result ) {
|
9884 |
+
return FS_Api::is_api_result_entity( $result );
|
9885 |
+
}
|
9886 |
+
|
9887 |
+
#endregion
|
9888 |
+
|
9889 |
+
/**
|
9890 |
+
* Make sure a given argument is an array of a specific type.
|
9891 |
+
*
|
9892 |
+
* @author Vova Feldman (@svovaf)
|
9893 |
+
* @since 1.2.1.5
|
9894 |
+
*
|
9895 |
+
* @param mixed $array
|
9896 |
+
* @param string $class
|
9897 |
+
*
|
9898 |
+
* @return bool
|
9899 |
+
*/
|
9900 |
+
private function is_array_instanceof( $array, $class ) {
|
9901 |
+
return ( is_array( $array ) && ( empty( $array ) || $array[0] instanceof $class ) );
|
9902 |
}
|
9903 |
|
9904 |
/**
|
10032 |
* @author Vova Feldman (@svovaf)
|
10033 |
* @since 1.1.2
|
10034 |
*
|
10035 |
+
* @param array $params
|
10036 |
+
*
|
10037 |
+
* @return string
|
10038 |
+
*/
|
10039 |
+
private function get_activation_url( $params = array() ) {
|
10040 |
+
return $this->apply_filters( 'connect_url', $this->_get_admin_page_url( '', $params ) );
|
10041 |
+
}
|
10042 |
+
|
10043 |
+
/**
|
10044 |
+
* @author Vova Feldman (@svovaf)
|
10045 |
+
* @since 1.2.1.5
|
10046 |
+
*
|
10047 |
+
* @param array $params
|
10048 |
+
*
|
10049 |
* @return string
|
10050 |
*/
|
10051 |
+
function get_reconnect_url( $params = array() ) {
|
10052 |
+
$params['fs_action'] = 'reset_anonymous_mode';
|
10053 |
+
$params['fs_slug'] = $this->_slug;
|
10054 |
+
|
10055 |
+
return $this->apply_filters( 'connect_url', $this->_get_admin_page_url( '', $params ) );
|
10056 |
}
|
10057 |
|
10058 |
/**
|
10065 |
*
|
10066 |
* @return string
|
10067 |
*/
|
10068 |
+
function get_after_activation_url( $filter ) {
|
10069 |
$first_time_path = $this->_menu->get_first_time_path();
|
10070 |
|
10071 |
return $this->apply_filters(
|
10102 |
$this->_site = null;
|
10103 |
$this->_user = null;
|
10104 |
|
10105 |
+
fs_redirect( $this->get_activation_url() );
|
|
|
|
|
10106 |
} else {
|
10107 |
if ( $this->is_addon_activated( $plugin_id ) ) {
|
10108 |
$fs_addon = self::get_instance_by_id( $plugin_id );
|
10109 |
$fs_addon->delete_account_event();
|
10110 |
|
10111 |
+
fs_redirect( $this->_get_admin_page_url( 'account' ) );
|
|
|
|
|
10112 |
}
|
10113 |
}
|
10114 |
|
10116 |
|
10117 |
case 'downgrade_account':
|
10118 |
check_admin_referer( $action );
|
10119 |
+
|
10120 |
+
if ( $plugin_id == $this->get_id() ) {
|
10121 |
+
$this->_downgrade_site();
|
10122 |
+
} else if ( $this->is_addon_activated( $plugin_id ) ) {
|
10123 |
+
$fs_addon = self::get_instance_by_id( $plugin_id );
|
10124 |
+
$fs_addon->_downgrade_site();
|
10125 |
+
}
|
10126 |
|
10127 |
return;
|
10128 |
|
10330 |
|
10331 |
if ( $this->has_paid_plan() &&
|
10332 |
! $this->has_any_license() &&
|
10333 |
+
! $this->is_sync_executed() &&
|
10334 |
+
$this->is_tracking_allowed()
|
10335 |
) {
|
10336 |
/**
|
10337 |
* If no licenses found and no sync job was executed during the last 24 hours,
|
10441 |
}
|
10442 |
}
|
10443 |
|
10444 |
+
#----------------------------------------------------------------------------------
|
10445 |
+
#region Contact Us
|
10446 |
+
#----------------------------------------------------------------------------------
|
10447 |
|
10448 |
/**
|
10449 |
* Render contact-us page.
|
10458 |
fs_require_once_template( 'contact.php', $vars );
|
10459 |
}
|
10460 |
|
10461 |
+
#endregion ------------------------------------------------------------------------
|
10462 |
|
10463 |
/**
|
10464 |
* Hide all admin notices to prevent distractions.
|
10606 |
$this->_storage->has_trial_plan = FS_Plan_Manager::instance()->has_trial_plan( $plans );
|
10607 |
}
|
10608 |
|
10609 |
+
/**
|
10610 |
+
* During trial promotion the "upgrade" submenu item turns to
|
10611 |
+
* "start trial" to encourage the trial. Since we want to keep
|
10612 |
+
* the same menu item handler and there's no robust way to
|
10613 |
+
* add new arguments to the menu item link's querystring,
|
10614 |
+
* use JavaScript to find the menu item and update the href of
|
10615 |
+
* the link.
|
10616 |
+
*
|
10617 |
+
* @author Vova Feldman (@svovaf)
|
10618 |
+
* @since 1.2.1.5
|
10619 |
+
*/
|
10620 |
+
function _fix_start_trial_menu_item_url() {
|
10621 |
+
$template_args = array( 'slug' => $this->_slug );
|
10622 |
+
fs_require_template( 'add-trial-to-pricing.php', $template_args );
|
10623 |
+
}
|
10624 |
+
|
10625 |
/**
|
10626 |
* Show trial promotional notice (if any trial exist).
|
10627 |
*
|
10628 |
* @author Vova Feldman (@svovaf)
|
10629 |
* @since 1.0.9
|
10630 |
+
*
|
10631 |
+
* @return bool If trial notice added.
|
10632 |
*/
|
10633 |
function _add_trial_notice() {
|
10634 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
10635 |
+
return false;
|
|
|
10636 |
}
|
10637 |
|
10638 |
+
if ( ! $this->is_user_in_admin() ) {
|
10639 |
+
return false;
|
|
|
10640 |
}
|
10641 |
|
10642 |
// Check if trial message is already shown.
|
10643 |
if ( $this->_admin_notices->has_sticky( 'trial_promotion' ) ) {
|
10644 |
+
add_action( 'admin_footer', array( &$this, '_fix_start_trial_menu_item_url' ) );
|
10645 |
+
|
10646 |
+
$this->_menu->add_counter_to_menu_item( 1, 'fs-trial' );
|
10647 |
+
|
10648 |
+
return false;
|
10649 |
}
|
10650 |
|
10651 |
+
if ( $this->is_premium() && ! WP_FS__DEV_MODE ) {
|
10652 |
+
// Don't show trial if running the premium code, unless running in DEV mode.
|
10653 |
+
return false;
|
10654 |
+
}
|
10655 |
|
10656 |
+
if ( ! $this->has_trial_plan() ) {
|
10657 |
+
// No plans with trial.
|
10658 |
+
return false;
|
10659 |
}
|
10660 |
|
10661 |
+
if ( ! $this->apply_filters( 'show_trial', true ) ) {
|
10662 |
+
// Developer explicitly asked not to show the trial promo.
|
10663 |
+
return false;
|
10664 |
+
}
|
10665 |
+
|
10666 |
+
if ( $this->is_registered() ) {
|
10667 |
+
// Check if trial already utilized.
|
10668 |
+
if ( $this->_site->is_trial_utilized() ) {
|
10669 |
+
return false;
|
10670 |
+
}
|
10671 |
+
|
10672 |
+
if ( $this->is_paying_or_trial() ) {
|
10673 |
+
// Don't show trial if paying or already in trial.
|
10674 |
+
return false;
|
10675 |
+
}
|
10676 |
+
}
|
10677 |
|
10678 |
+
if ( $this->is_activation_mode() || $this->is_pending_activation() ) {
|
10679 |
+
// If not yet opted-in/skipped, or pending activation, don't show trial.
|
10680 |
+
return false;
|
10681 |
+
}
|
10682 |
|
10683 |
+
$last_time_trial_promotion_shown = $this->_storage->get( 'trial_promotion_shown', false );
|
10684 |
+
$was_promotion_shown_before = ( false !== $last_time_trial_promotion_shown );
|
10685 |
|
10686 |
+
// Show promotion if never shown before and 24 hours after initial activation with FS.
|
10687 |
+
if ( ! $was_promotion_shown_before &&
|
10688 |
+
$this->_storage->install_timestamp > ( time() - WP_FS__TIME_24_HOURS_IN_SEC )
|
10689 |
+
) {
|
10690 |
+
return false;
|
10691 |
+
}
|
10692 |
+
|
10693 |
+
// OR if promotion was shown before, try showing it every 30 days.
|
10694 |
+
if ( $was_promotion_shown_before &&
|
10695 |
+
30 * WP_FS__TIME_24_HOURS_IN_SEC > time() - $last_time_trial_promotion_shown
|
10696 |
+
) {
|
10697 |
+
return false;
|
10698 |
+
}
|
10699 |
+
|
10700 |
+
$trial_period = $this->_trial_days;
|
10701 |
+
$require_payment = $this->_is_trial_require_payment;
|
10702 |
+
$trial_url = $this->get_trial_url();
|
10703 |
+
$plans_string = strtolower( __fs( 'awesome', $this->_slug ) );
|
10704 |
+
|
10705 |
+
if ( $this->is_registered() ) {
|
10706 |
+
// If opted-in, override trial with up to date data from API.
|
10707 |
+
$trial_plans = FS_Plan_Manager::instance()->get_trial_plans( $this->_plans );
|
10708 |
+
$trial_plans_count = count( $trial_plans );
|
10709 |
+
|
10710 |
+
if ( 0 === $trial_plans_count ) {
|
10711 |
+
// If there's no plans with a trial just exit.
|
10712 |
+
return false;
|
10713 |
}
|
10714 |
|
10715 |
+
/**
|
10716 |
+
* @var FS_Plugin_Plan $paid_plan
|
10717 |
+
*/
|
10718 |
+
$paid_plan = $trial_plans[0];
|
10719 |
+
$require_payment = $paid_plan->is_require_subscription;
|
10720 |
+
$trial_period = $paid_plan->trial_period;
|
10721 |
+
|
10722 |
+
$total_paid_plans = count( $this->_plans ) - ( FS_Plan_Manager::instance()->has_free_plan( $this->_plans ) ? 1 : 0 );
|
10723 |
+
|
10724 |
+
if ( $total_paid_plans !== $trial_plans_count ) {
|
10725 |
+
// Not all paid plans have a trial - generate a string of those that have it.
|
10726 |
+
for ( $i = 0; $i < $trial_plans_count; $i ++ ) {
|
10727 |
+
$plans_string .= sprintf(
|
10728 |
+
'<a href="%s">%s</a>',
|
10729 |
+
$trial_url,
|
10730 |
+
$trial_plans[ $i ]->title
|
10731 |
+
);
|
10732 |
+
|
10733 |
+
if ( $i < $trial_plans_count - 2 ) {
|
10734 |
+
$plans_string .= ', ';
|
10735 |
+
} else if ( $i == $trial_plans_count - 2 ) {
|
10736 |
+
$plans_string .= ' and ';
|
10737 |
+
}
|
10738 |
+
}
|
10739 |
+
}
|
10740 |
}
|
10741 |
|
10742 |
+
$message = sprintf(
|
10743 |
+
__fs( 'hey', $this->_slug ) . '! ' . __fs( 'trial-x-promotion-message', $this->_slug ),
|
10744 |
+
sprintf( '<b>%s</b>', $this->get_plugin_name() ),
|
10745 |
+
$plans_string,
|
10746 |
+
$trial_period
|
10747 |
+
);
|
10748 |
+
|
10749 |
+
// "No Credit-Card Required" or "No Commitment for N Days".
|
10750 |
+
$cc_string = $require_payment ?
|
10751 |
+
sprintf( __fs( 'no-commitment-for-x-days', $this->_slug ), $trial_period ) :
|
10752 |
+
__fs( 'no-cc-required', $this->_slug ) . '!';
|
10753 |
+
|
10754 |
|
10755 |
+
// Start trial button.
|
10756 |
+
$button = ' ' . sprintf(
|
10757 |
'<a style="margin-left: 10px; vertical-align: super;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
10758 |
+
$trial_url,
|
10759 |
__fs( 'start-free-trial', $this->_slug )
|
10760 |
);
|
10761 |
|
10762 |
$this->_admin_notices->add_sticky(
|
10763 |
+
$this->apply_filters( 'trial_promotion_message', "{$message} {$cc_string} {$button}" ),
|
10764 |
'trial_promotion',
|
10765 |
'',
|
10766 |
'promotion'
|
10767 |
);
|
10768 |
|
10769 |
$this->_storage->trial_promotion_shown = WP_FS__SCRIPT_START_TIME;
|
|
|
10770 |
|
10771 |
+
return true;
|
10772 |
+
}
|
|
|
|
|
10773 |
|
10774 |
/**
|
10775 |
* @author Vova Feldman (@svovaf)
|
10776 |
+
* @since 1.2.1.5
|
|
|
|
|
10777 |
*/
|
10778 |
+
function _enqueue_common_css() {
|
10779 |
+
if ( $this->has_paid_plan() && ! $this->is_paying() ) {
|
10780 |
+
// Add basic CSS for admin-notices and menu-item colors.
|
10781 |
+
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
|
10782 |
+
}
|
10783 |
}
|
10784 |
|
10785 |
+
/* Action Links
|
10786 |
+
------------------------------------------------------------------------------------------------------------------*/
|
10787 |
+
private $_action_links_hooked = false;
|
10788 |
+
private $_action_links = array();
|
10789 |
+
|
10790 |
/**
|
10791 |
* Hook to plugin action links filter.
|
10792 |
*
|
10887 |
return;
|
10888 |
}
|
10889 |
|
10890 |
+
if ( ! $this->is_ajax() ) {
|
10891 |
+
// Inject license activation dialog UI and client side code.
|
10892 |
+
add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
|
10893 |
+
}
|
10894 |
+
|
10895 |
$link_text = __fs(
|
10896 |
$this->is_free_plan() ? 'activate-license' : 'change-license',
|
10897 |
$this->_slug
|
10906 |
);
|
10907 |
}
|
10908 |
|
10909 |
+
/**
|
10910 |
+
* Adds "Opt in" or "Opt out" link to the main "Plugins" page link actions collection.
|
10911 |
+
*
|
10912 |
+
* @author Leo Fajardo (@leorw)
|
10913 |
+
* @since 1.2.1.5
|
10914 |
+
*/
|
10915 |
+
function _add_tracking_links() {
|
10916 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
10917 |
+
return;
|
10918 |
+
}
|
10919 |
+
|
10920 |
+
$this->_logger->entrance();
|
10921 |
+
|
10922 |
+
if ( ! $this->is_enable_anonymous() ) {
|
10923 |
+
// Don't allow to opt-out if anonymous mode is disabled.
|
10924 |
+
return;
|
10925 |
+
}
|
10926 |
+
|
10927 |
+
if ( ! $this->is_free_plan() ) {
|
10928 |
+
// Don't allow to opt-out if running in paid plan.
|
10929 |
+
return;
|
10930 |
+
}
|
10931 |
+
|
10932 |
+
if ( $this->add_ajax_action( 'stop_tracking', array( &$this, '_stop_tracking_callback' ) ) ) {
|
10933 |
+
return;
|
10934 |
+
}
|
10935 |
+
|
10936 |
+
if ( $this->add_ajax_action( 'allow_tracking', array( &$this, '_allow_tracking_callback' ) ) ) {
|
10937 |
+
return;
|
10938 |
+
}
|
10939 |
+
|
10940 |
+
if ( fs_request_is_action_secure( $this->_slug . '_reconnect' ) ) {
|
10941 |
+
if ( ! $this->is_registered() && $this->is_anonymous() ) {
|
10942 |
+
$this->connect_again();
|
10943 |
+
|
10944 |
+
return;
|
10945 |
+
}
|
10946 |
+
}
|
10947 |
+
|
10948 |
+
$url = '#';
|
10949 |
+
|
10950 |
+
if ( $this->is_registered() ) {
|
10951 |
+
if ( $this->is_tracking_allowed() ) {
|
10952 |
+
$link_text_id = 'opt-out';
|
10953 |
+
} else {
|
10954 |
+
$link_text_id = 'opt-in';
|
10955 |
+
}
|
10956 |
+
|
10957 |
+
add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) );
|
10958 |
+
} else {
|
10959 |
+
$link_text_id = 'opt-in';
|
10960 |
+
|
10961 |
+
$params = ! $this->is_anonymous() ?
|
10962 |
+
array() :
|
10963 |
+
array(
|
10964 |
+
'nonce' => wp_create_nonce( $this->_slug . '_reconnect' ),
|
10965 |
+
'fs_action' => ( $this->_slug . '_reconnect' ),
|
10966 |
+
);
|
10967 |
+
|
10968 |
+
$url = $this->get_activation_url( $params );
|
10969 |
+
}
|
10970 |
+
|
10971 |
+
$this->add_plugin_action_link(
|
10972 |
+
__fs( $link_text_id, $this->_slug ),
|
10973 |
+
$url,
|
10974 |
+
false,
|
10975 |
+
13,
|
10976 |
+
"opt-in-or-opt-out {$this->_slug}"
|
10977 |
+
);
|
10978 |
+
}
|
10979 |
+
|
10980 |
/**
|
10981 |
* Get the URL of the page that should be loaded right after the plugin activation.
|
10982 |
*
|
11027 |
|
11028 |
if ( is_string( $url ) ) {
|
11029 |
fs_redirect( $url );
|
|
|
11030 |
}
|
11031 |
}
|
11032 |
|
11117 |
$this->_admin_notices->add_sticky( $message, $id, $title, $type );
|
11118 |
}
|
11119 |
|
11120 |
+
/**
|
11121 |
+
* Helper function that returns the final steps for the upgrade completion.
|
11122 |
+
*
|
11123 |
+
* If the module is already running the premium code, returns an empty string.
|
11124 |
+
*
|
11125 |
+
* @author Vova Feldman (@svovaf)
|
11126 |
+
* @since 1.2.1
|
11127 |
+
*
|
11128 |
+
* @param string $plan_title
|
11129 |
+
*
|
11130 |
+
* @return string
|
11131 |
+
*/
|
11132 |
+
private function get_complete_upgrade_instructions( $plan_title = '' ) {
|
11133 |
+
if ( $this->is_premium() ) {
|
11134 |
+
return '';
|
11135 |
+
}
|
11136 |
+
|
11137 |
+
if ( empty( $plan_title ) ) {
|
11138 |
+
$plan_title = $this->_site->plan->title;
|
11139 |
+
}
|
11140 |
+
|
11141 |
+
// @since 1.2.1.5 The free version is auto deactivated.
|
11142 |
+
$deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ?
|
11143 |
+
( '<li>' . __fs( 'deactivate-free-version', $this->_slug ) . '.</li>' ) :
|
11144 |
+
'';
|
11145 |
+
|
11146 |
+
return sprintf(
|
11147 |
+
' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
|
11148 |
+
__fs( 'follow-steps-to-complete-upgrade', $this->_slug ),
|
11149 |
+
$this->_get_latest_download_link( sprintf(
|
11150 |
+
__fs( 'download-latest-x-version', $this->_slug ),
|
11151 |
+
$plan_title
|
11152 |
+
) ),
|
11153 |
+
$deactivation_step,
|
11154 |
+
__fs( 'upload-and-activate', $this->_slug ),
|
11155 |
+
'//bit.ly/upload-wp-plugin',
|
11156 |
+
__fs( 'howto-upload-activate', $this->_slug )
|
11157 |
+
);
|
11158 |
+
}
|
11159 |
+
|
11160 |
/* Plugin Auto-Updates (@since 1.0.4)
|
11161 |
------------------------------------------------------------------------------------------------------------------*/
|
11162 |
/**
|
11208 |
return $update;
|
11209 |
}
|
11210 |
|
11211 |
+
#----------------------------------------------------------------------------------
|
11212 |
+
#region Versioning
|
11213 |
+
#----------------------------------------------------------------------------------
|
11214 |
|
11215 |
/**
|
11216 |
* Check if Freemius in SDK upgrade mode.
|
11231 |
*
|
11232 |
* @author Vova Feldman (@svovaf)
|
11233 |
* @since 1.0.9
|
|
|
|
|
11234 |
*/
|
11235 |
function set_sdk_upgrade_complete() {
|
11236 |
$this->_storage->sdk_upgrade_mode = false;
|
11262 |
$this->_storage->plugin_upgrade_mode = false;
|
11263 |
}
|
11264 |
|
11265 |
+
#endregion
|
11266 |
|
11267 |
+
#----------------------------------------------------------------------------------
|
11268 |
+
#region Permissions
|
11269 |
+
#----------------------------------------------------------------------------------
|
11270 |
|
11271 |
/**
|
11272 |
* Check if specific permission requested.
|
11282 |
return isset( $this->_permissions[ $permission ] ) && ( true === $this->_permissions[ $permission ] );
|
11283 |
}
|
11284 |
|
11285 |
+
#endregion
|
11286 |
|
11287 |
+
#----------------------------------------------------------------------------------
|
11288 |
+
#region Marketing
|
11289 |
+
#----------------------------------------------------------------------------------
|
11290 |
|
11291 |
/**
|
11292 |
* Check if current user purchased any other plugins before.
|
11298 |
*/
|
11299 |
function has_purchased_before() {
|
11300 |
// TODO: Implement has_purchased_before() method.
|
11301 |
+
throw new Exception( 'not implemented' );
|
11302 |
}
|
11303 |
|
11304 |
/**
|
11311 |
*/
|
11312 |
function is_agency() {
|
11313 |
// TODO: Implement is_agency() method.
|
11314 |
+
throw new Exception( 'not implemented' );
|
11315 |
}
|
11316 |
|
11317 |
/**
|
11324 |
*/
|
11325 |
function is_developer() {
|
11326 |
// TODO: Implement is_developer() method.
|
11327 |
+
throw new Exception( 'not implemented' );
|
11328 |
}
|
11329 |
|
11330 |
/**
|
11337 |
*/
|
11338 |
function is_business() {
|
11339 |
// TODO: Implement is_business() method.
|
11340 |
+
throw new Exception( 'not implemented' );
|
11341 |
}
|
11342 |
|
11343 |
+
#endregion
|
11344 |
+
}
|
lib/freemius/includes/class-fs-api.php
CHANGED
@@ -180,9 +180,9 @@
|
|
180 |
}
|
181 |
}
|
182 |
|
183 |
-
if (
|
184 |
// Log API errors.
|
185 |
-
$this->_logger->
|
186 |
}
|
187 |
|
188 |
return $result;
|
@@ -243,6 +243,10 @@
|
|
243 |
// If there was an error during a newer data fetch,
|
244 |
// fallback to older data version.
|
245 |
$result = $cached_result;
|
|
|
|
|
|
|
|
|
246 |
} else {
|
247 |
// If no older data version, return result without
|
248 |
// caching the error.
|
@@ -253,16 +257,62 @@
|
|
253 |
self::$_cache->set( $cache_key, $result, $expiration );
|
254 |
|
255 |
$cached_result = $result;
|
|
|
|
|
256 |
}
|
257 |
|
258 |
return $cached_result;
|
259 |
}
|
260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
private function get_cache_key( $path, $method = 'GET', $params = array() ) {
|
262 |
$canonized = $this->_api->CanonizePath( $path );
|
263 |
// $exploded = explode('/', $canonized);
|
264 |
// return $method . '_' . array_pop($exploded) . '_' . md5($canonized . json_encode($params));
|
265 |
-
return $method . ':' . $canonized . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' );
|
266 |
}
|
267 |
|
268 |
/**
|
@@ -334,7 +384,7 @@
|
|
334 |
*/
|
335 |
private function get_temporary_unavailable_error() {
|
336 |
return (object) array(
|
337 |
-
'error' => array(
|
338 |
'type' => 'TemporaryUnavailable',
|
339 |
'message' => 'API is temporary unavailable, please retry in ' . ( self::$_cache->get_record_expiration( 'ping_test' ) - WP_FS__SCRIPT_START_TIME ) . ' sec.',
|
340 |
'code' => 'temporary_unavailable',
|
@@ -450,6 +500,59 @@
|
|
450 |
self::_init();
|
451 |
|
452 |
self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME );
|
453 |
-
self::$_cache->clear(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
}
|
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;
|
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.
|
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 |
/**
|
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',
|
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 |
}
|
lib/freemius/includes/class-fs-logger.php
CHANGED
@@ -138,6 +138,32 @@
|
|
138 |
$this->_log( $message, 'error', $wrapper );
|
139 |
}
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
function entrance( $message = '', $wrapper = false ) {
|
142 |
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
143 |
|
@@ -155,7 +181,7 @@
|
|
155 |
}
|
156 |
|
157 |
private static function format_html( $log ) {
|
158 |
-
return '<div style="font-size:
|
159 |
}
|
160 |
|
161 |
static function dump() {
|
138 |
$this->_log( $message, 'error', $wrapper );
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* Log API error.
|
143 |
+
*
|
144 |
+
* @author Vova Feldman (@svovaf)
|
145 |
+
* @since 1.2.1.5
|
146 |
+
*
|
147 |
+
* @param mixed $api_result
|
148 |
+
* @param bool $wrapper
|
149 |
+
*/
|
150 |
+
function api_error( $api_result, $wrapper = false ) {
|
151 |
+
$message = '';
|
152 |
+
if ( is_object( $api_result ) && isset( $api_result->error ) ) {
|
153 |
+
$message = $api_result->error->message;
|
154 |
+
} else if ( is_object( $api_result ) ) {
|
155 |
+
$message = var_export( $api_result, true );
|
156 |
+
} else if ( is_string( $api_result ) ) {
|
157 |
+
$message = $api_result;
|
158 |
+
} else if ( empty( $api_result ) ) {
|
159 |
+
$message = 'Empty API result.';
|
160 |
+
}
|
161 |
+
|
162 |
+
$message = 'API Error: ' . $message;
|
163 |
+
|
164 |
+
$this->_log( $message, 'error', $wrapper );
|
165 |
+
}
|
166 |
+
|
167 |
function entrance( $message = '', $wrapper = false ) {
|
168 |
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
169 |
|
181 |
}
|
182 |
|
183 |
private static function format_html( $log ) {
|
184 |
+
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['type'] . '] <b><code style="color: #c4b1e0;">' . $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>';
|
185 |
}
|
186 |
|
187 |
static function dump() {
|
lib/freemius/includes/class-fs-plugin-updater.php
CHANGED
@@ -57,7 +57,7 @@
|
|
57 |
'pre_set_site_transient_update_plugins_filter'
|
58 |
) );
|
59 |
|
60 |
-
if ( ! $this->_fs->
|
61 |
/**
|
62 |
* If user has the premium plugin's code but do NOT have an active license,
|
63 |
* encourage him to upgrade by showing that there's a new release, but instead
|
@@ -100,6 +100,9 @@
|
|
100 |
*
|
101 |
* @author Vova Feldman (@svovaf)
|
102 |
* @since 1.1.6
|
|
|
|
|
|
|
103 |
*/
|
104 |
function edit_and_echo_plugin_update_row( $file, $plugin_data ) {
|
105 |
$plugin_update_row = ob_get_clean();
|
@@ -108,7 +111,7 @@
|
|
108 |
if ( ! isset( $current->response[ $file ] ) ) {
|
109 |
echo $plugin_update_row;
|
110 |
|
111 |
-
return
|
112 |
}
|
113 |
|
114 |
$r = $current->response[ $file ];
|
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,
|
63 |
* encourage him to upgrade by showing that there's a new release, but instead
|
100 |
*
|
101 |
* @author Vova Feldman (@svovaf)
|
102 |
* @since 1.1.6
|
103 |
+
*
|
104 |
+
* @param string $file
|
105 |
+
* @param array $plugin_data
|
106 |
*/
|
107 |
function edit_and_echo_plugin_update_row( $file, $plugin_data ) {
|
108 |
$plugin_update_row = ob_get_clean();
|
111 |
if ( ! isset( $current->response[ $file ] ) ) {
|
112 |
echo $plugin_update_row;
|
113 |
|
114 |
+
return;
|
115 |
}
|
116 |
|
117 |
$r = $current->response[ $file ];
|
lib/freemius/includes/class-fs-security.php
CHANGED
@@ -27,7 +27,11 @@
|
|
27 |
public static function instance() {
|
28 |
if ( ! isset( self::$_instance ) ) {
|
29 |
self::$_instance = new FS_Security();
|
30 |
-
self::$_logger = FS_Logger::get_logger(
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
return self::$_instance;
|
@@ -36,6 +40,13 @@
|
|
36 |
private function __construct() {
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
|
40 |
return md5(
|
41 |
$timestamp .
|
@@ -46,6 +57,13 @@
|
|
46 |
);
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
|
50 |
if ( false === $timestamp ) {
|
51 |
$timestamp = time();
|
27 |
public static function instance() {
|
28 |
if ( ! isset( self::$_instance ) ) {
|
29 |
self::$_instance = new FS_Security();
|
30 |
+
self::$_logger = FS_Logger::get_logger(
|
31 |
+
WP_FS__SLUG,
|
32 |
+
WP_FS__DEBUG_SDK,
|
33 |
+
WP_FS__ECHO_DEBUG_SDK
|
34 |
+
);
|
35 |
}
|
36 |
|
37 |
return self::$_instance;
|
40 |
private function __construct() {
|
41 |
}
|
42 |
|
43 |
+
/**
|
44 |
+
* @param \FS_Scope_Entity $entity
|
45 |
+
* @param int $timestamp
|
46 |
+
* @param string $action
|
47 |
+
*
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
|
51 |
return md5(
|
52 |
$timestamp .
|
57 |
);
|
58 |
}
|
59 |
|
60 |
+
/**
|
61 |
+
* @param \FS_Scope_Entity $entity
|
62 |
+
* @param int|bool $timestamp
|
63 |
+
* @param string $action
|
64 |
+
*
|
65 |
+
* @return array
|
66 |
+
*/
|
67 |
function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
|
68 |
if ( false === $timestamp ) {
|
69 |
$timestamp = time();
|
lib/freemius/includes/entities/class-fs-billing.php
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius for EDD Add-On
|
4 |
+
* @copyright Copyright (c) 2016, Freemius, Inc.
|
5 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
6 |
+
* @since 1.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Billing extends FS_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var int
|
19 |
+
*/
|
20 |
+
public $entity_id;
|
21 |
+
/**
|
22 |
+
* @var string (Enum) Linked entity type. One of: developer, plugin, user, install
|
23 |
+
*/
|
24 |
+
public $entity_type;
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $business_name;
|
29 |
+
/**
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
public $first;
|
33 |
+
/**
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public $last;
|
37 |
+
/**
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
public $email;
|
41 |
+
/**
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
public $phone;
|
45 |
+
/**
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
public $website;
|
49 |
+
/**
|
50 |
+
* @var string Tax or VAT ID.
|
51 |
+
*/
|
52 |
+
public $tax_id;
|
53 |
+
/**
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
public $address_street;
|
57 |
+
/**
|
58 |
+
* @var string
|
59 |
+
*/
|
60 |
+
public $address_apt;
|
61 |
+
/**
|
62 |
+
* @var string
|
63 |
+
*/
|
64 |
+
public $address_city;
|
65 |
+
/**
|
66 |
+
* @var string
|
67 |
+
*/
|
68 |
+
public $address_country;
|
69 |
+
/**
|
70 |
+
* @var string Two chars country code.
|
71 |
+
*/
|
72 |
+
public $address_country_code;
|
73 |
+
/**
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
public $address_state;
|
77 |
+
/**
|
78 |
+
* @var number Numeric ZIP code (cab be with leading zeros).
|
79 |
+
*/
|
80 |
+
public $address_zip;
|
81 |
+
|
82 |
+
#endregion Properties
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @param object|bool $event
|
87 |
+
*/
|
88 |
+
function __construct( $event = false ) {
|
89 |
+
parent::__construct( $event );
|
90 |
+
}
|
91 |
+
|
92 |
+
static function get_type() {
|
93 |
+
return 'billing';
|
94 |
+
}
|
95 |
+
}
|
lib/freemius/includes/entities/class-fs-entity.php
CHANGED
@@ -39,7 +39,7 @@
|
|
39 |
public $created;
|
40 |
|
41 |
/**
|
42 |
-
* @param bool|
|
43 |
*/
|
44 |
function __construct( $entity = false ) {
|
45 |
if ( ! ( $entity instanceof stdClass ) ) {
|
39 |
public $created;
|
40 |
|
41 |
/**
|
42 |
+
* @param bool|object $entity
|
43 |
*/
|
44 |
function __construct( $entity = false ) {
|
45 |
if ( ! ( $entity instanceof stdClass ) ) {
|
lib/freemius/includes/entities/class-fs-plugin-license.php
CHANGED
@@ -87,7 +87,7 @@
|
|
87 |
* @return int
|
88 |
*/
|
89 |
function left() {
|
90 |
-
if ( $this->is_expired() ) {
|
91 |
return 0;
|
92 |
}
|
93 |
|
@@ -120,6 +120,18 @@
|
|
120 |
return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
/**
|
124 |
* @author Vova Feldman (@svovaf)
|
125 |
* @since 1.0.6
|
@@ -163,6 +175,16 @@
|
|
163 |
( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
164 |
}
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
/**
|
167 |
* Check if license's plan features are enabled.
|
168 |
*
|
@@ -175,7 +197,7 @@
|
|
175 |
* @return bool
|
176 |
*/
|
177 |
function is_features_enabled() {
|
178 |
-
return ( ! $this->is_block_features || ! $this->is_expired() );
|
179 |
}
|
180 |
|
181 |
/**
|
87 |
* @return int
|
88 |
*/
|
89 |
function left() {
|
90 |
+
if ( ! $this->is_active() || $this->is_expired() ) {
|
91 |
return 0;
|
92 |
}
|
93 |
|
120 |
return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
|
121 |
}
|
122 |
|
123 |
+
/**
|
124 |
+
* Check if license is not expired.
|
125 |
+
*
|
126 |
+
* @author Vova Feldman (@svovaf)
|
127 |
+
* @since 1.2.1
|
128 |
+
*
|
129 |
+
* @return bool
|
130 |
+
*/
|
131 |
+
function is_valid() {
|
132 |
+
return ! $this->is_expired();
|
133 |
+
}
|
134 |
+
|
135 |
/**
|
136 |
* @author Vova Feldman (@svovaf)
|
137 |
* @since 1.0.6
|
175 |
( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
|
176 |
}
|
177 |
|
178 |
+
/**
|
179 |
+
* @author Vova Feldman (@svovaf)
|
180 |
+
* @since 1.2.1
|
181 |
+
*
|
182 |
+
* @return bool
|
183 |
+
*/
|
184 |
+
function is_active() {
|
185 |
+
return ( ! $this->is_cancelled );
|
186 |
+
}
|
187 |
+
|
188 |
/**
|
189 |
* Check if license's plan features are enabled.
|
190 |
*
|
197 |
* @return bool
|
198 |
*/
|
199 |
function is_features_enabled() {
|
200 |
+
return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
|
201 |
}
|
202 |
|
203 |
/**
|
lib/freemius/includes/entities/class-fs-plugin-plan.php
CHANGED
@@ -10,6 +10,11 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
class FS_Plugin_Plan extends FS_Entity {
|
14 |
|
15 |
#region Properties
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* Class FS_Plugin_Plan
|
15 |
+
*
|
16 |
+
* @property FS_Pricing[] $pricing
|
17 |
+
*/
|
18 |
class FS_Plugin_Plan extends FS_Entity {
|
19 |
|
20 |
#region Properties
|
lib/freemius/includes/entities/class-fs-plugin.php
CHANGED
@@ -24,6 +24,10 @@
|
|
24 |
* @var string
|
25 |
*/
|
26 |
public $slug;
|
|
|
|
|
|
|
|
|
27 |
|
28 |
#region Install Specific Properties
|
29 |
|
24 |
* @var string
|
25 |
*/
|
26 |
public $slug;
|
27 |
+
/**
|
28 |
+
* @var string 'plugin' or 'theme'
|
29 |
+
*/
|
30 |
+
public $type;
|
31 |
|
32 |
#region Install Specific Properties
|
33 |
|
lib/freemius/includes/entities/class-fs-site.php
CHANGED
@@ -51,6 +51,15 @@
|
|
51 |
* @var string Platform version (e.g WordPress version).
|
52 |
*/
|
53 |
public $platform_version;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* @var string Programming language version (e.g PHP version).
|
56 |
*/
|
@@ -77,6 +86,14 @@
|
|
77 |
* @var bool
|
78 |
*/
|
79 |
public $is_premium = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
/**
|
82 |
* @param stdClass|bool $site
|
@@ -89,6 +106,10 @@
|
|
89 |
if ( is_object( $site ) ) {
|
90 |
$this->plan->id = $site->plan_id;
|
91 |
}
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
static function get_type() {
|
51 |
* @var string Platform version (e.g WordPress version).
|
52 |
*/
|
53 |
public $platform_version;
|
54 |
+
/**
|
55 |
+
* Freemius SDK version
|
56 |
+
*
|
57 |
+
* @author Leo Fajardo (@leorw)
|
58 |
+
* @since 1.2.2
|
59 |
+
*
|
60 |
+
* @var string SDK version (e.g.: 1.2.2)
|
61 |
+
*/
|
62 |
+
public $sdk_version;
|
63 |
/**
|
64 |
* @var string Programming language version (e.g PHP version).
|
65 |
*/
|
86 |
* @var bool
|
87 |
*/
|
88 |
public $is_premium = false;
|
89 |
+
/**
|
90 |
+
* @author Leo Fajardo (@leorw)
|
91 |
+
*
|
92 |
+
* @since 1.2.1.5
|
93 |
+
*
|
94 |
+
* @var bool
|
95 |
+
*/
|
96 |
+
public $is_disconnected = false;
|
97 |
|
98 |
/**
|
99 |
* @param stdClass|bool $site
|
106 |
if ( is_object( $site ) ) {
|
107 |
$this->plan->id = $site->plan_id;
|
108 |
}
|
109 |
+
|
110 |
+
if ( ! is_bool( $this->is_disconnected ) ) {
|
111 |
+
$this->is_disconnected = false;
|
112 |
+
}
|
113 |
}
|
114 |
|
115 |
static function get_type() {
|
lib/freemius/includes/fs-core-functions.php
CHANGED
@@ -56,7 +56,7 @@
|
|
56 |
ob_start();
|
57 |
|
58 |
$VARS = &$params;
|
59 |
-
|
60 |
|
61 |
return ob_get_clean();
|
62 |
}
|
@@ -150,6 +150,40 @@
|
|
150 |
return ( strtolower( $action ) === fs_get_action( $action_key ) );
|
151 |
}
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
function fs_is_plugin_page( $menu_slug ) {
|
154 |
return ( is_admin() && $_REQUEST['page'] === $menu_slug );
|
155 |
}
|
@@ -279,9 +313,26 @@
|
|
279 |
|
280 |
set_error_handler('fs_error_handler');*/
|
281 |
|
282 |
-
|
283 |
-
|
284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
}
|
286 |
|
287 |
if ( ! function_exists( 'fs_starts_with' ) ) {
|
@@ -350,7 +401,7 @@
|
|
350 |
return '';
|
351 |
}
|
352 |
|
353 |
-
//
|
354 |
$keys = fs_urlencode_rfc3986( array_keys( $params ) );
|
355 |
$values = fs_urlencode_rfc3986( array_values( $params ) );
|
356 |
$params = array_combine( $keys, $values );
|
@@ -364,7 +415,9 @@
|
|
364 |
$lower_param = strtolower( $parameter );
|
365 |
|
366 |
// Skip ignore params.
|
367 |
-
if ( in_array( $lower_param, $ignore_params ) ||
|
|
|
|
|
368 |
continue;
|
369 |
}
|
370 |
|
@@ -450,4 +503,3 @@
|
|
450 |
// If both have priority return the winner.
|
451 |
return ( $a['priority'] < $b['priority'] ) ? - 1 : 1;
|
452 |
}
|
453 |
-
|
56 |
ob_start();
|
57 |
|
58 |
$VARS = &$params;
|
59 |
+
require( fs_get_template_path( $path ) );
|
60 |
|
61 |
return ob_get_clean();
|
62 |
}
|
150 |
return ( strtolower( $action ) === fs_get_action( $action_key ) );
|
151 |
}
|
152 |
|
153 |
+
/**
|
154 |
+
* @author Vova Feldman (@svovaf)
|
155 |
+
* @since 1.0.0
|
156 |
+
*
|
157 |
+
* @since 1.2.1.5 Allow nonce verification.
|
158 |
+
*
|
159 |
+
* @param string $action
|
160 |
+
* @param string $action_key
|
161 |
+
* @param string $nonce_key
|
162 |
+
*
|
163 |
+
* @return bool
|
164 |
+
*/
|
165 |
+
function fs_request_is_action_secure(
|
166 |
+
$action,
|
167 |
+
$action_key = 'action',
|
168 |
+
$nonce_key = 'nonce'
|
169 |
+
) {
|
170 |
+
if ( strtolower( $action ) !== fs_get_action( $action_key ) ) {
|
171 |
+
return false;
|
172 |
+
}
|
173 |
+
|
174 |
+
$nonce = ! empty( $_REQUEST[ $nonce_key ] ) ?
|
175 |
+
$_REQUEST[ $nonce_key ] :
|
176 |
+
'';
|
177 |
+
|
178 |
+
if ( empty( $nonce ) ||
|
179 |
+
( false === wp_verify_nonce( $nonce, $action ) )
|
180 |
+
) {
|
181 |
+
return false;
|
182 |
+
}
|
183 |
+
|
184 |
+
return true;
|
185 |
+
}
|
186 |
+
|
187 |
function fs_is_plugin_page( $menu_slug ) {
|
188 |
return ( is_admin() && $_REQUEST['page'] === $menu_slug );
|
189 |
}
|
313 |
|
314 |
set_error_handler('fs_error_handler');*/
|
315 |
|
316 |
+
if ( ! function_exists( 'fs_nonce_url' ) ) {
|
317 |
+
/**
|
318 |
+
* Retrieve URL with nonce added to URL query.
|
319 |
+
*
|
320 |
+
* Originally was using `wp_nonce_url()` but the new version
|
321 |
+
* changed the return value to escaped URL, that's not the expected
|
322 |
+
* behaviour.
|
323 |
+
*
|
324 |
+
* @author Vova Feldman (@svovaf)
|
325 |
+
* @since ~1.1.3
|
326 |
+
*
|
327 |
+
* @param string $actionurl URL to add nonce action.
|
328 |
+
* @param int|string $action Optional. Nonce action name. Default -1.
|
329 |
+
* @param string $name Optional. Nonce name. Default '_wpnonce'.
|
330 |
+
*
|
331 |
+
* @return string Escaped URL with nonce action added.
|
332 |
+
*/
|
333 |
+
function fs_nonce_url( $actionurl, $action = - 1, $name = '_wpnonce' ) {
|
334 |
+
return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
|
335 |
+
}
|
336 |
}
|
337 |
|
338 |
if ( ! function_exists( 'fs_starts_with' ) ) {
|
401 |
return '';
|
402 |
}
|
403 |
|
404 |
+
// Url encode both keys and values
|
405 |
$keys = fs_urlencode_rfc3986( array_keys( $params ) );
|
406 |
$values = fs_urlencode_rfc3986( array_values( $params ) );
|
407 |
$params = array_combine( $keys, $values );
|
415 |
$lower_param = strtolower( $parameter );
|
416 |
|
417 |
// Skip ignore params.
|
418 |
+
if ( in_array( $lower_param, $ignore_params ) ||
|
419 |
+
( false !== $params_prefix && fs_starts_with( $lower_param, $params_prefix ) )
|
420 |
+
) {
|
421 |
continue;
|
422 |
}
|
423 |
|
503 |
// If both have priority return the winner.
|
504 |
return ( $a['priority'] < $b['priority'] ) ? - 1 : 1;
|
505 |
}
|
|
lib/freemius/includes/fs-essential-functions.php
CHANGED
@@ -41,15 +41,29 @@
|
|
41 |
* @since 1.5.1
|
42 |
* @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
|
43 |
*
|
44 |
-
* @param string $location The path to redirect to
|
45 |
-
* @param
|
|
|
46 |
*
|
47 |
* @return bool False if $location is not set
|
48 |
*/
|
49 |
-
function fs_redirect( $location, $status = 302 ) {
|
50 |
global $is_IIS;
|
51 |
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
return false;
|
54 |
}
|
55 |
|
@@ -69,6 +83,10 @@
|
|
69 |
header( "Location: $location" );
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
72 |
return true;
|
73 |
}
|
74 |
|
@@ -148,7 +166,9 @@
|
|
148 |
global $fs_text, $fs_text_overrides;
|
149 |
|
150 |
if ( ! isset( $fs_text ) ) {
|
151 |
-
|
|
|
|
|
152 |
}
|
153 |
|
154 |
if ( isset( $fs_text_overrides[ $slug ] ) ) {
|
@@ -354,6 +374,9 @@
|
|
354 |
function fs_fallback_to_newest_active_sdk() {
|
355 |
global $fs_active_plugins;
|
356 |
|
|
|
|
|
|
|
357 |
$newest_sdk_data = null;
|
358 |
$newest_sdk_path = null;
|
359 |
|
@@ -404,7 +427,7 @@
|
|
404 |
$args = func_get_args();
|
405 |
|
406 |
return call_user_func_array( 'apply_filters', array_merge(
|
407 |
-
array(
|
408 |
array_slice( $args, 2 ) )
|
409 |
);
|
410 |
}
|
41 |
* @since 1.5.1
|
42 |
* @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
|
43 |
*
|
44 |
+
* @param string $location The path to redirect to.
|
45 |
+
* @param bool $exit If true, exit after redirect (Since 1.2.1.5).
|
46 |
+
* @param int $status Status code to use.
|
47 |
*
|
48 |
* @return bool False if $location is not set
|
49 |
*/
|
50 |
+
function fs_redirect( $location, $exit = true, $status = 302 ) {
|
51 |
global $is_IIS;
|
52 |
|
53 |
+
$file = '';
|
54 |
+
$line = '';
|
55 |
+
if ( headers_sent($file, $line) ) {
|
56 |
+
if ( WP_FS__DEBUG_SDK && class_exists( 'FS_Admin_Notice_Manager' ) ) {
|
57 |
+
$notices = FS_Admin_Notice_Manager::instance( 'global' );
|
58 |
+
|
59 |
+
$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' );
|
60 |
+
}
|
61 |
+
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
66 |
+
// Don't redirect on AJAX calls.
|
67 |
return false;
|
68 |
}
|
69 |
|
83 |
header( "Location: $location" );
|
84 |
}
|
85 |
|
86 |
+
if ( $exit ) {
|
87 |
+
exit();
|
88 |
+
}
|
89 |
+
|
90 |
return true;
|
91 |
}
|
92 |
|
166 |
global $fs_text, $fs_text_overrides;
|
167 |
|
168 |
if ( ! isset( $fs_text ) ) {
|
169 |
+
$dir = defined( 'WP_FS__DIR_INCLUDES' ) ? WP_FS__DIR_INCLUDES : dirname( __FILE__ );
|
170 |
+
require_once( $dir . '/l10n.php' );
|
171 |
+
require_once( $dir . '/i18n.php' );
|
172 |
}
|
173 |
|
174 |
if ( isset( $fs_text_overrides[ $slug ] ) ) {
|
374 |
function fs_fallback_to_newest_active_sdk() {
|
375 |
global $fs_active_plugins;
|
376 |
|
377 |
+
/**
|
378 |
+
* @var object $newest_sdk_data
|
379 |
+
*/
|
380 |
$newest_sdk_data = null;
|
381 |
$newest_sdk_path = null;
|
382 |
|
427 |
$args = func_get_args();
|
428 |
|
429 |
return call_user_func_array( 'apply_filters', array_merge(
|
430 |
+
array( "fs_{$tag}_{$slug}" ),
|
431 |
array_slice( $args, 2 ) )
|
432 |
);
|
433 |
}
|
lib/freemius/includes/fs-plugin-info-dialog.php
CHANGED
@@ -74,14 +74,7 @@
|
|
74 |
}
|
75 |
|
76 |
// Find add-on by slug.
|
77 |
-
$
|
78 |
-
$selected_addon = false;
|
79 |
-
foreach ( $addons as $addon ) {
|
80 |
-
if ( $addon->slug == $args->slug ) {
|
81 |
-
$selected_addon = $addon;
|
82 |
-
break;
|
83 |
-
}
|
84 |
-
}
|
85 |
|
86 |
if ( false === $selected_addon ) {
|
87 |
return $data;
|
@@ -106,7 +99,7 @@
|
|
106 |
$has_pricing = false;
|
107 |
$has_features = false;
|
108 |
$plans = false;
|
109 |
-
$plans_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans.json" );
|
110 |
if ( ! isset( $plans_result->error ) ) {
|
111 |
$plans = $plans_result->plans;
|
112 |
if ( is_array( $plans ) ) {
|
@@ -341,7 +334,6 @@
|
|
341 |
} else if ( ! empty( $api->download_link ) ) {
|
342 |
$status = install_plugin_install_status( $api );
|
343 |
|
344 |
-
|
345 |
// Hosted on WordPress.org.
|
346 |
switch ( $status['status'] ) {
|
347 |
case 'install':
|
@@ -376,6 +368,8 @@
|
|
376 |
|
377 |
}
|
378 |
}
|
|
|
|
|
379 |
}
|
380 |
|
381 |
/**
|
@@ -603,7 +597,7 @@
|
|
603 |
}
|
604 |
?>
|
605 |
<a class="nav-tab" data-billing-cycle="<?php echo $cycle ?>"
|
606 |
-
data-pricing="<?php
|
607 |
<?php if ( $is_featured ) : ?>
|
608 |
<label>★ <?php _efs( 'best', $api->slug ) ?> ★</label>
|
609 |
<?php endif ?>
|
74 |
}
|
75 |
|
76 |
// Find add-on by slug.
|
77 |
+
$selected_addon = $this->_fs->get_addon_by_slug($args->slug, WP_FS__DEV_MODE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
if ( false === $selected_addon ) {
|
80 |
return $data;
|
99 |
$has_pricing = false;
|
100 |
$has_features = false;
|
101 |
$plans = false;
|
102 |
+
$plans_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans.json?type=visible" );
|
103 |
if ( ! isset( $plans_result->error ) ) {
|
104 |
$plans = $plans_result->plans;
|
105 |
if ( is_array( $plans ) ) {
|
334 |
} else if ( ! empty( $api->download_link ) ) {
|
335 |
$status = install_plugin_install_status( $api );
|
336 |
|
|
|
337 |
// Hosted on WordPress.org.
|
338 |
switch ( $status['status'] ) {
|
339 |
case 'install':
|
368 |
|
369 |
}
|
370 |
}
|
371 |
+
|
372 |
+
return '';
|
373 |
}
|
374 |
|
375 |
/**
|
597 |
}
|
598 |
?>
|
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 _efs( 'best', $api->slug ) ?> ★</label>
|
603 |
<?php endif ?>
|
lib/freemius/includes/i18n.php
CHANGED
@@ -32,353 +32,403 @@
|
|
32 |
global $fs_text;
|
33 |
|
34 |
$fs_text = array(
|
35 |
-
'account'
|
36 |
-
'addon'
|
37 |
-
'contact-us'
|
38 |
-
'contact-support'
|
39 |
-
'change-ownership'
|
40 |
-
'support'
|
41 |
-
'support-forum'
|
42 |
-
'add-ons'
|
43 |
-
'upgrade'
|
44 |
-
'awesome'
|
45 |
-
'pricing'
|
46 |
-
'price'
|
47 |
-
'unlimited-updates'
|
48 |
-
'downgrade'
|
49 |
-
'cancel-trial'
|
50 |
-
'free-trial'
|
51 |
-
'start-free-x'
|
52 |
-
'no-commitment-x'
|
53 |
-
'after-x-pay-as-little-y'
|
54 |
-
'details'
|
55 |
-
'account-details'
|
56 |
-
'delete'
|
57 |
-
'show'
|
58 |
-
'hide'
|
59 |
-
'edit'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
'
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
67 |
-
'
|
68 |
-
'
|
69 |
-
'
|
70 |
-
'download-x-version
|
71 |
-
'download-
|
72 |
-
'
|
73 |
-
'
|
74 |
-
'
|
75 |
-
'
|
76 |
-
'
|
77 |
-
'
|
78 |
-
'
|
79 |
-
'
|
80 |
-
'
|
81 |
-
'license
|
82 |
-
'license-
|
83 |
-
'
|
84 |
-
'
|
85 |
-
'
|
86 |
-
'
|
87 |
-
'
|
88 |
-
'
|
89 |
-
'
|
90 |
-
'
|
91 |
-
'
|
|
|
|
|
92 |
#region Account
|
93 |
|
94 |
-
'expiration'
|
95 |
-
'license'
|
96 |
-
'not-verified'
|
97 |
-
'verify-email'
|
98 |
-
'expires-in'
|
99 |
-
'renews-in'
|
100 |
-
'no-expiration'
|
101 |
-
'expired'
|
102 |
-
'cancelled'
|
103 |
-
'in-x'
|
104 |
-
'x-ago'
|
105 |
-
'version'
|
106 |
-
'name'
|
107 |
-
'email'
|
108 |
-
'email-address'
|
109 |
-
'verified'
|
110 |
-
'plugin'
|
111 |
-
'plugins'
|
112 |
-
'themes'
|
113 |
-
'path'
|
114 |
-
'title'
|
115 |
-
'free-version'
|
116 |
-
'premium-version'
|
117 |
-
'slug'
|
118 |
-
'id'
|
119 |
-
'users'
|
120 |
-
'plugin-installs'
|
121 |
-
'sites'
|
122 |
-
'user-id'
|
123 |
-
'site-id'
|
124 |
-
'public-key'
|
125 |
-
'secret-key'
|
126 |
-
'no-secret'
|
127 |
-
'no-id'
|
128 |
-
'sync-license'
|
129 |
-
'sync'
|
130 |
-
'activate-license'
|
131 |
-
'activate-free-version'
|
132 |
-
'activate-license-message'
|
133 |
-
'activating-license'
|
134 |
-
'change-license'
|
135 |
-
'update-license'
|
136 |
-
'deactivate-license'
|
137 |
-
'activate'
|
138 |
-
'deactivate'
|
139 |
-
'skip-deactivate'
|
140 |
-
'no-deactivate'
|
141 |
-
'yes-do-your-thing'
|
142 |
-
'active'
|
143 |
-
'is-active'
|
144 |
-
'install-now'
|
145 |
-
'install-update-now'
|
146 |
-
'more-information-about-x'
|
147 |
-
'localhost'
|
148 |
-
'activate-x-plan'
|
149 |
-
'x-left'
|
150 |
-
'last-license'
|
151 |
-
'what-is-your-x'
|
152 |
-
'activate-this-addon'
|
153 |
-
'deactivate-license-confirm'
|
154 |
-
'delete-account-x-confirm'
|
155 |
-
'delete-account-confirm'
|
156 |
-
'downgrade-x-confirm'
|
157 |
-
'cancel-trial-confirm'
|
158 |
-
'after-downgrade-non-blocking'
|
159 |
-
'after-downgrade-blocking'
|
160 |
-
'proceed-confirmation'
|
161 |
#endregion Account
|
162 |
|
163 |
-
'add-ons-for-x' =>
|
164 |
-
'add-ons-missing' =>
|
165 |
#region Plugin Deactivation
|
166 |
-
'
|
167 |
-
'
|
168 |
-
'deactivation-
|
169 |
-
'deactivation-modal-button-
|
170 |
-
'
|
171 |
-
'
|
172 |
-
'reason-
|
173 |
-
'reason-
|
174 |
-
'reason-
|
175 |
-
'reason-
|
176 |
-
'reason-
|
177 |
-
'reason-
|
178 |
-
'
|
179 |
-
'
|
180 |
-
'
|
181 |
-
'
|
182 |
-
'
|
183 |
-
'reason-
|
184 |
-
'reason-
|
185 |
-
'reason-
|
186 |
-
'
|
187 |
-
'
|
188 |
-
'placeholder-
|
189 |
-
'placeholder-what-
|
190 |
-
'
|
191 |
-
'
|
192 |
-
'
|
|
|
|
|
193 |
#endregion Plugin Deactivation
|
194 |
|
195 |
#region Connect
|
196 |
-
'hey-x' =>
|
197 |
-
'thanks-x' =>
|
198 |
-
'connect-message' =>
|
199 |
-
'connect-message_on-update' =>
|
200 |
-
'pending-activation-message' =>
|
201 |
-
'
|
202 |
-
'
|
203 |
-
'
|
204 |
-
'
|
205 |
-
'permissions
|
206 |
-
'permissions-
|
207 |
-
'permissions-
|
208 |
-
'permissions-
|
209 |
-
'permissions-
|
210 |
-
'permissions-
|
211 |
-
'permissions-
|
212 |
-
'permissions-
|
213 |
-
'permissions-
|
214 |
-
'
|
215 |
-
'
|
216 |
-
'
|
217 |
-
'
|
218 |
-
'
|
219 |
-
'
|
220 |
-
'
|
221 |
-
'
|
222 |
-
'
|
223 |
-
'
|
224 |
-
'
|
225 |
-
'
|
226 |
-
'
|
227 |
-
'
|
228 |
-
'
|
229 |
-
'
|
230 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
#endregion Connect
|
232 |
|
233 |
#region Screenshots
|
234 |
-
'screenshots' =>
|
235 |
-
'view-full-size-x' =>
|
236 |
#endregion Screenshots
|
237 |
|
238 |
#region Debug
|
239 |
-
'freemius-debug' =>
|
240 |
-
'on' =>
|
241 |
-
'off' =>
|
242 |
-
'debugging' =>
|
243 |
-
'freemius-state' =>
|
244 |
-
'connected' =>
|
245 |
-
'blocked' =>
|
246 |
-
'api' =>
|
247 |
-
'sdk' =>
|
248 |
-
'sdk-versions' =>
|
249 |
-
'plugin-path' =>
|
250 |
-
'sdk-path' =>
|
251 |
-
'addons-of-x' =>
|
252 |
-
'delete-all-confirm' =>
|
253 |
-
'actions' =>
|
254 |
-
'delete-all-accounts' =>
|
255 |
-
'start-fresh' =>
|
256 |
-
'clear-api-cache' =>
|
257 |
-
'sync-data-from-server' =>
|
258 |
-
'scheduled-crons' =>
|
259 |
-
'plugins-themes-sync' =>
|
260 |
#endregion Debug
|
261 |
|
262 |
#region Expressions
|
263 |
-
'congrats' =>
|
264 |
-
'oops' =>
|
265 |
-
'yee-haw' =>
|
266 |
-
'woot' =>
|
267 |
-
'right-on' =>
|
268 |
-
'hmm' =>
|
269 |
-
'ok' =>
|
270 |
-
'hey' =>
|
271 |
-
'heads-up' =>
|
272 |
#endregion Expressions
|
273 |
|
274 |
#region Admin Notices
|
275 |
-
'you-have-latest' =>
|
276 |
-
'you-are-good' =>
|
277 |
-
'user-exist-message' =>
|
278 |
-
'user-exist-message_ownership' =>
|
279 |
-
'email-updated-message' =>
|
280 |
-
'name-updated-message' =>
|
281 |
-
'x-updated' =>
|
282 |
-
'name-update-failed-message' =>
|
283 |
-
'verification-email-sent-message' =>
|
284 |
-
'addons-info-external-message' =>
|
285 |
-
'no-cc-required' =>
|
286 |
-
'premium-activated-message' =>
|
287 |
-
'successful-version-upgrade-message' =>
|
288 |
-
'activation-with-plan-x-message' =>
|
289 |
-
'download-latest-x-version'
|
290 |
-
'
|
291 |
-
'
|
292 |
-
'
|
293 |
-
'
|
294 |
-
'
|
295 |
-
'
|
296 |
-
'
|
297 |
-
'
|
298 |
-
'
|
299 |
-
'
|
300 |
-
'
|
301 |
-
'license-
|
302 |
-
'license-
|
303 |
-
'
|
304 |
-
'
|
305 |
-
'
|
306 |
-
'
|
307 |
-
'
|
308 |
-
'
|
309 |
-
'
|
310 |
-
'
|
311 |
-
'
|
312 |
-
'
|
313 |
-
'trial-
|
314 |
-
'
|
315 |
-
'
|
316 |
-
'
|
317 |
-
'
|
318 |
-
'trial-
|
319 |
-
'
|
320 |
-
'
|
321 |
-
'
|
322 |
-
'
|
323 |
-
'
|
324 |
-
'
|
325 |
-
'
|
326 |
-
'plan-
|
327 |
-
'
|
328 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
#endregion Admin Notices
|
330 |
#region Connectivity Issues
|
331 |
-
'connectivity-test-fails-message' =>
|
332 |
-
'connectivity-test-maybe-temporary' =>
|
333 |
-
'curl-missing-message' =>
|
334 |
-
'cloudflare-blocks-connection-message' =>
|
335 |
-
'x-requires-access-to-api' =>
|
336 |
-
'squid-blocks-connection-message' =>
|
337 |
-
'squid-no-clue-title' =>
|
338 |
-
'squid-no-clue-desc' =>
|
339 |
-
'sysadmin-title' =>
|
340 |
-
'squid-sysadmin-desc' =>
|
341 |
-
'curl-missing-no-clue-title' =>
|
342 |
-
'curl-missing-no-clue-desc' =>
|
343 |
-
'curl-missing-sysadmin-desc' =>
|
344 |
-
'happy-to-resolve-issue-asap' =>
|
345 |
-
'contact-support-before-deactivation' =>
|
346 |
-
'fix-issue-title' =>
|
347 |
-
'fix-issue-desc' =>
|
348 |
-
'install-previous-title' =>
|
349 |
-
'install-previous-desc' =>
|
350 |
-
'deactivate-plugin-title' =>
|
351 |
-
'deactivate-plugin-desc' =>
|
352 |
-
'fix-request-sent-message' =>
|
353 |
-
'server-blocking-access' =>
|
354 |
-
'wrong-authentication-param-message' =>
|
355 |
#endregion Connectivity Issues
|
356 |
#region Change Owner
|
357 |
-
'change-owner-request-sent-x' =>
|
358 |
-
'change-owner-request_owner-confirmed' =>
|
359 |
-
'change-owner-request_candidate-confirmed' =>
|
360 |
#endregion Change Owner
|
361 |
-
'addon-x-cannot-run-without-y' =>
|
362 |
-
'addon-x-cannot-run-without-parent' =>
|
363 |
-
'plugin-x-activation-message' =>
|
364 |
-
'features-and-pricing' =>
|
365 |
-
'free-addon-not-deployed' =>
|
366 |
-
'paid-addon-not-deployed' =>
|
|
|
367 |
#region Add-On Licensing
|
368 |
-
|
369 |
-
'addon-
|
370 |
-
|
|
|
|
|
371 |
#region Billing Cycles
|
372 |
-
|
373 |
-
'
|
374 |
-
'
|
375 |
-
'
|
376 |
-
'
|
377 |
-
'
|
378 |
-
'
|
379 |
-
'
|
380 |
-
'
|
381 |
-
'
|
|
|
382 |
#endregion Billing Cycles
|
383 |
-
'view-details' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
);
|
32 |
global $fs_text;
|
33 |
|
34 |
$fs_text = array(
|
35 |
+
'account' => _fs__( 'Account' ),
|
36 |
+
'addon' => _fs__( 'Add On' ),
|
37 |
+
'contact-us' => _fs__( 'Contact Us' ),
|
38 |
+
'contact-support' => _fs__( 'Contact Support' ),
|
39 |
+
'change-ownership' => _fs__( 'Change Ownership' ),
|
40 |
+
'support' => _fs__( 'Support' ),
|
41 |
+
'support-forum' => _fs__( 'Support Forum' ),
|
42 |
+
'add-ons' => _fs__( 'Add Ons' ),
|
43 |
+
'upgrade' => _fs_x( 'Upgrade', 'verb' ),
|
44 |
+
'awesome' => _fs__( 'Awesome' ),
|
45 |
+
'pricing' => _fs_x( 'Pricing', 'noun' ),
|
46 |
+
'price' => _fs_x( 'Price', 'noun' ),
|
47 |
+
'unlimited-updates' => _fs__( 'Unlimited Updates' ),
|
48 |
+
'downgrade' => _fs_x( 'Downgrade', 'verb' ),
|
49 |
+
'cancel-trial' => _fs__( 'Cancel Trial' ),
|
50 |
+
'free-trial' => _fs__( 'Free Trial' ),
|
51 |
+
'start-free-x' => _fs__( 'Start my free %s' ),
|
52 |
+
'no-commitment-x' => _fs__( 'No commitment for %s - cancel anytime' ),
|
53 |
+
'after-x-pay-as-little-y' => _fs__( 'After your free %s, pay as little as %s' ),
|
54 |
+
'details' => _fs__( 'Details' ),
|
55 |
+
'account-details' => _fs__( 'Account Details' ),
|
56 |
+
'delete' => _fs_x( 'Delete', 'verb' ),
|
57 |
+
'show' => _fs_x( 'Show', 'verb' ),
|
58 |
+
'hide' => _fs_x( 'Hide', 'verb' ),
|
59 |
+
'edit' => _fs_x( 'Edit', 'verb' ),
|
60 |
+
'update' => _fs_x( 'Update', 'verb' ),
|
61 |
+
'date' => _fs__( 'Date' ),
|
62 |
+
'amount' => _fs__( 'Amount' ),
|
63 |
+
'invoice' => _fs__( 'Invoice' ),
|
64 |
+
'billing' => _fs__( 'Billing' ),
|
65 |
+
'payments' => _fs__( 'Payments' ),
|
66 |
+
'delete-account' => _fs__( 'Delete Account' ),
|
67 |
+
'dismiss' => _fs_x( 'Dismiss', 'as close a window' ),
|
68 |
+
'plan' => _fs_x( 'Plan', 'as product pricing plan' ),
|
69 |
+
'change-plan' => _fs__( 'Change Plan' ),
|
70 |
+
'download-x-version' => _fs_x( 'Download %s Version', 'as download professional version' ),
|
71 |
+
'download-x-version-now' => _fs_x( 'Download %s version now', 'as download professional version now' ),
|
72 |
+
'download-latest' => _fs_x( 'Download Latest', 'as download latest version' ),
|
73 |
+
'you-have-x-license' => _fs_x( 'You have a %s license.', 'E.g. you have a professional license.' ),
|
74 |
+
'new' => _fs__( 'New' ),
|
75 |
+
'free' => _fs__( 'Free' ),
|
76 |
+
'trial' => _fs_x( 'Trial', 'as trial plan' ),
|
77 |
+
'start-trial' => _fs_x( 'Start Trial', 'as starting a trial plan' ),
|
78 |
+
'purchase' => _fs_x( 'Purchase', 'verb' ),
|
79 |
+
'purchase-license' => _fs__( 'Purchase License' ),
|
80 |
+
'buy' => _fs_x( 'Buy', 'verb' ),
|
81 |
+
'buy-license' => _fs__( 'Buy License' ),
|
82 |
+
'license-single-site' => _fs__( 'Single Site License' ),
|
83 |
+
'license-unlimited' => _fs__( 'Unlimited Licenses' ),
|
84 |
+
'license-x-sites' => _fs__( 'Up to %s Sites' ),
|
85 |
+
'renew-license-now' => _fs__( '%sRenew your license now%s to access version %s features and support.' ),
|
86 |
+
'ask-for-upgrade-email-address' => _fs__( "Enter the email address you've used for the upgrade below and we will resend you the license key." ),
|
87 |
+
'x-plan' => _fs_x( '%s Plan', 'e.g. Professional Plan' ),
|
88 |
+
'you-are-step-away' => _fs__( 'You are just one step away - %s' ),
|
89 |
+
'activate-x-now' => _fs_x( 'Complete "%s" Activation Now', '%s - plugin name. As complete "Jetpack" activation now' ),
|
90 |
+
'few-plugin-tweaks' => _fs__( 'We made a few tweaks to the plugin, %s' ),
|
91 |
+
'optin-x-now' => _fs__( 'Opt-in to make "%s" Better!' ),
|
92 |
+
'error' => _fs__( 'Error' ),
|
93 |
+
'failed-finding-main-path' => _fs__( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.' ),
|
94 |
#region Account
|
95 |
|
96 |
+
'expiration' => _fs_x( 'Expiration', 'as expiration date' ),
|
97 |
+
'license' => _fs_x( 'License', 'as software license' ),
|
98 |
+
'not-verified' => _fs__( 'not verified' ),
|
99 |
+
'verify-email' => _fs__( 'Verify Email' ),
|
100 |
+
'expires-in' => _fs_x( 'Expires in %s', 'e.g. expires in 2 months' ),
|
101 |
+
'renews-in' => _fs_x( 'Auto renews in %s', 'e.g. auto renews in 2 months' ),
|
102 |
+
'no-expiration' => _fs__( 'No expiration' ),
|
103 |
+
'expired' => _fs__( 'Expired' ),
|
104 |
+
'cancelled' => _fs__( 'Cancelled' ),
|
105 |
+
'in-x' => _fs_x( 'In %s', 'e.g. In 2 hours' ),
|
106 |
+
'x-ago' => _fs_x( '%s ago', 'e.g. 2 min ago' ),
|
107 |
+
'version' => _fs_x( 'Version', 'as plugin version' ),
|
108 |
+
'name' => _fs__( 'Name' ),
|
109 |
+
'email' => _fs__( 'Email' ),
|
110 |
+
'email-address' => _fs__( 'Email address' ),
|
111 |
+
'verified' => _fs__( 'Verified' ),
|
112 |
+
'plugin' => _fs__( 'Plugin' ),
|
113 |
+
'plugins' => _fs__( 'Plugins' ),
|
114 |
+
'themes' => _fs__( 'Themes' ),
|
115 |
+
'path' => _fs_x( 'Path', 'as file/folder path' ),
|
116 |
+
'title' => _fs__( 'Title' ),
|
117 |
+
'free-version' => _fs__( 'Free version' ),
|
118 |
+
'premium-version' => _fs__( 'Premium version' ),
|
119 |
+
'slug' => _fs_x( 'Slug', 'as WP plugin slug' ),
|
120 |
+
'id' => _fs__( 'ID' ),
|
121 |
+
'users' => _fs__( 'Users' ),
|
122 |
+
'plugin-installs' => _fs__( 'Plugin Installs' ),
|
123 |
+
'sites' => _fs_x( 'Sites', 'like websites' ),
|
124 |
+
'user-id' => _fs__( 'User ID' ),
|
125 |
+
'site-id' => _fs__( 'Site ID' ),
|
126 |
+
'public-key' => _fs__( 'Public Key' ),
|
127 |
+
'secret-key' => _fs__( 'Secret Key' ),
|
128 |
+
'no-secret' => _fs_x( 'No Secret', 'as secret encryption key missing' ),
|
129 |
+
'no-id' => _fs__( 'No ID' ),
|
130 |
+
'sync-license' => _fs_x( 'Sync License', 'as synchronize license' ),
|
131 |
+
'sync' => _fs_x( 'Sync', 'as synchronize' ),
|
132 |
+
'activate-license' => _fs__( 'Activate License' ),
|
133 |
+
'activate-free-version' => _fs__( 'Activate Free Version' ),
|
134 |
+
'activate-license-message' => _fs__( 'Please enter the license key that you received in the email right after the purchase:' ),
|
135 |
+
'activating-license' => _fs__( 'Activating license...' ),
|
136 |
+
'change-license' => _fs__( 'Change License' ),
|
137 |
+
'update-license' => _fs__( 'Update License' ),
|
138 |
+
'deactivate-license' => _fs__( 'Deactivate License' ),
|
139 |
+
'activate' => _fs__( 'Activate' ),
|
140 |
+
'deactivate' => _fs__( 'Deactivate' ),
|
141 |
+
'skip-deactivate' => _fs__( 'Skip & Deactivate' ),
|
142 |
+
'no-deactivate' => _fs__( 'No - just deactivate' ),
|
143 |
+
'yes-do-your-thing' => _fs__( 'Yes - do your thing' ),
|
144 |
+
'active' => _fs_x( 'Active', 'active mode' ),
|
145 |
+
'is-active' => _fs_x( 'Is Active', 'is active mode?' ),
|
146 |
+
'install-now' => _fs__( 'Install Now' ),
|
147 |
+
'install-update-now' => _fs__( 'Install Update Now' ),
|
148 |
+
'more-information-about-x' => _fs__( 'More information about %s' ),
|
149 |
+
'localhost' => _fs__( 'Localhost' ),
|
150 |
+
'activate-x-plan' => _fs_x( 'Activate %s Plan', 'as activate Professional plan' ),
|
151 |
+
'x-left' => _fs_x( '%s left', 'as 5 licenses left' ),
|
152 |
+
'last-license' => _fs__( 'Last license' ),
|
153 |
+
'what-is-your-x' => _fs__( 'What is your %s?' ),
|
154 |
+
'activate-this-addon' => _fs__( 'Activate this add-on' ),
|
155 |
+
'deactivate-license-confirm' => _fs__( '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?' ),
|
156 |
+
'delete-account-x-confirm' => _fs__( '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?' ),
|
157 |
+
'delete-account-confirm' => _fs__( 'Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?' ),
|
158 |
+
'downgrade-x-confirm' => _fs__( 'Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s.' ),
|
159 |
+
'cancel-trial-confirm' => _fs__( 'Cancelling the trial will immediately block access to all premium features. Are you sure?' ),
|
160 |
+
'after-downgrade-non-blocking' => _fs__( 'You can still enjoy all %s features but you will not have access to plugin updates and support.' ),
|
161 |
+
'after-downgrade-blocking' => _fs__( 'Once your license expire you can still use the Free version but you will NOT have access to the %s features.' ),
|
162 |
+
'proceed-confirmation' => _fs__( 'Are you sure you want to proceed?' ),
|
163 |
#endregion Account
|
164 |
|
165 |
+
'add-ons-for-x' => _fs__( 'Add Ons for %s' ),
|
166 |
+
'add-ons-missing' => _fs__( 'We could\'nt load the add-ons list. It\'s probably an issue on our side, please try to come back in few minutes.' ),
|
167 |
#region Plugin Deactivation
|
168 |
+
'anonymous-feedback' => _fs__( 'Anonymous feedback' ),
|
169 |
+
'quick-feedback' => _fs__( 'Quick feedback' ),
|
170 |
+
'deactivation-share-reason' => _fs__( 'If you have a moment, please let us know why you are deactivating' ),
|
171 |
+
'deactivation-modal-button-confirm' => _fs__( 'Yes - Deactivate' ),
|
172 |
+
'deactivation-modal-button-submit' => _fs__( 'Submit & Deactivate' ),
|
173 |
+
'cancel' => _fs__( 'Cancel' ),
|
174 |
+
'reason-no-longer-needed' => _fs__( 'I no longer need the plugin' ),
|
175 |
+
'reason-found-a-better-plugin' => _fs__( 'I found a better plugin' ),
|
176 |
+
'reason-needed-for-a-short-period' => _fs__( 'I only needed the plugin for a short period' ),
|
177 |
+
'reason-broke-my-site' => _fs__( 'The plugin broke my site' ),
|
178 |
+
'reason-suddenly-stopped-working' => _fs__( 'The plugin suddenly stopped working' ),
|
179 |
+
'reason-cant-pay-anymore' => _fs__( "I can't pay for it anymore" ),
|
180 |
+
'reason-temporary-deactivation' => _fs__( "It's a temporary deactivation. I'm just debugging an issue." ),
|
181 |
+
'reason-other' => _x( 'Other', 'the text of the "other" reason for deactivating the plugin that is shown in the modal box.' ),
|
182 |
+
'ask-for-reason-message' => _fs__( 'Kindly tell us the reason so we can improve.' ),
|
183 |
+
'placeholder-plugin-name' => _fs__( "What's the plugin's name?" ),
|
184 |
+
'placeholder-comfortable-price' => _fs__( 'What price would you feel comfortable paying?' ),
|
185 |
+
'reason-couldnt-make-it-work' => _fs__( "I couldn't understand how to make it work" ),
|
186 |
+
'reason-great-but-need-specific-feature' => _fs__( "The plugin is great, but I need specific feature that you don't support" ),
|
187 |
+
'reason-not-working' => _fs__( 'The plugin is not working' ),
|
188 |
+
'reason-not-what-i-was-looking-for' => _fs__( "It's not what I was looking for" ),
|
189 |
+
'reason-didnt-work-as-expected' => _fs__( "The plugin didn't work as expected" ),
|
190 |
+
'placeholder-feature' => _fs__( 'What feature?' ),
|
191 |
+
'placeholder-share-what-didnt-work' => _fs__( "Kindly share what didn't work so we can fix it for future users..." ),
|
192 |
+
'placeholder-what-youve-been-looking-for' => _fs__( "What you've been looking for?" ),
|
193 |
+
'placeholder-what-did-you-expect' => _fs__( "What did you expect?" ),
|
194 |
+
'reason-didnt-work' => _fs__( "The plugin didn't work" ),
|
195 |
+
'reason-dont-like-to-share-my-information' => _fs__( "I don't like to share my information with you" ),
|
196 |
+
'dont-have-to-share-any-data' => _fs__( "You might have missed it, but you don't have to share any data and can just %s the opt-in." ),
|
197 |
#endregion Plugin Deactivation
|
198 |
|
199 |
#region Connect
|
200 |
+
'hey-x' => _fs_x( 'Hey %s,', 'greeting' ),
|
201 |
+
'thanks-x' => _fs_x( 'Thanks %s!', 'a greeting. E.g. Thanks John!' ),
|
202 |
+
'connect-message' => _fs__( 'Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s.' ),
|
203 |
+
'connect-message_on-update' => _fs__( '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.' ),
|
204 |
+
'pending-activation-message' => _fs__( '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 |
+
'complete-the-install' => _fs__( 'complete the install' ),
|
206 |
+
'start-the-trial' => _fs__( 'start the trial' ),
|
207 |
+
'thanks-for-purchasing' => _fs__( 'Thanks for purchasing %s! To get started, please enter your license key:' ),
|
208 |
+
'license-sync-disclaimer' => _fs__( 'The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license.' ),
|
209 |
+
'what-permissions' => _fs__( 'What permissions are being granted?' ),
|
210 |
+
'permissions-profile' => _fs__( 'Your Profile Overview' ),
|
211 |
+
'permissions-profile_desc' => _fs__( 'Name and email address' ),
|
212 |
+
'permissions-site' => _fs__( 'Your Site Overview' ),
|
213 |
+
'permissions-site_desc' => _fs__( 'Site URL, WP version, PHP info, plugins & themes' ),
|
214 |
+
'permissions-events' => _fs__( 'Current Plugin Events' ),
|
215 |
+
'permissions-events_desc' => _fs__( 'Activation, deactivation and uninstall' ),
|
216 |
+
'permissions-plugins_themes' => _fs__( 'Plugins & Themes' ),
|
217 |
+
'permissions-plugins_themes_desc' => _fs__( 'Titles, versions and state.' ),
|
218 |
+
'permissions-admin-notices' => _fs__( 'Admin Notices' ),
|
219 |
+
'permissions-newsletter' => _fs__( 'Newsletter' ),
|
220 |
+
'permissions-newsletter_desc' => _fs__( 'Updates, announcements, marketing, no spam' ),
|
221 |
+
'privacy-policy' => _fs__( 'Privacy Policy' ),
|
222 |
+
'tos' => _fs__( 'Terms of Service' ),
|
223 |
+
'activating' => _fs_x( 'Activating', 'as activating plugin' ),
|
224 |
+
'sending-email' => _fs_x( 'Sending email', 'as in the process of sending an email' ),
|
225 |
+
'opt-in-connect' => _fs_x( 'Allow & Continue', 'button label' ),
|
226 |
+
'agree-activate-license' => _fs_x( 'Agree & Activate License', 'button label' ),
|
227 |
+
'skip' => _fs_x( 'Skip', 'verb' ),
|
228 |
+
'click-here-to-use-plugin-anonymously' => _fs__( 'Click here to use the plugin anonymously' ),
|
229 |
+
'resend-activation-email' => _fs__( 'Re-send activation email' ),
|
230 |
+
'license-key' => _fs__( 'License key' ),
|
231 |
+
'send-license-key' => _fs__( 'Send License Key' ),
|
232 |
+
'sending-license-key' => _fs__( 'Sending license key' ),
|
233 |
+
'have-license-key' => _fs__( 'Have a license key?' ),
|
234 |
+
'dont-have-license-key' => _fs__( 'Don\'t have a license key?' ),
|
235 |
+
'cant-find-license-key' => _fs__( "Can't find your license key?" ),
|
236 |
+
'email-not-found' => _fs__( "We couldn't find your email address in the system, are you sure it's the right address?" ),
|
237 |
+
'no-active-licenses' => _fs__( "We can't see any active licenses associated with that email address, are you sure it's the right address?" ),
|
238 |
+
'opt-in' => _fs__( 'Opt In' ),
|
239 |
+
'opt-out' => _fs__( 'Opt Out' ),
|
240 |
+
'opt-out-cancel' => _fs__( 'On second thought - I want to continue helping' ),
|
241 |
+
'opting-out' => _fs__( 'Opting out...' ),
|
242 |
+
'opting-in' => _fs__( 'Opting in...' ),
|
243 |
+
'opt-out-message-appreciation' => _fs__( 'We appreciate your help in making the %s better by letting us track some usage data.' ),
|
244 |
+
'opt-out-message-usage-tracking' => _fs__( "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." ),
|
245 |
+
'opt-out-message-clicking-opt-out' => _fs__( 'By clicking "Opt Out", we will no longer be sending any data from %s to %s.' ),
|
246 |
#endregion Connect
|
247 |
|
248 |
#region Screenshots
|
249 |
+
'screenshots' => _fs__( 'Screenshots' ),
|
250 |
+
'view-full-size-x' => _fs__( 'Click to view full-size screenshot %d' ),
|
251 |
#endregion Screenshots
|
252 |
|
253 |
#region Debug
|
254 |
+
'freemius-debug' => _fs__( 'Freemius Debug' ),
|
255 |
+
'on' => _fs_x( 'On', 'as turned on' ),
|
256 |
+
'off' => _fs_x( 'Off', 'as turned off' ),
|
257 |
+
'debugging' => _fs_x( 'Debugging', 'as code debugging' ),
|
258 |
+
'freemius-state' => _fs__( 'Freemius State' ),
|
259 |
+
'connected' => _fs_x( 'Connected', 'as connection was successful' ),
|
260 |
+
'blocked' => _fs_x( 'Blocked', 'as connection blocked' ),
|
261 |
+
'api' => _fs_x( 'API', 'as application program interface' ),
|
262 |
+
'sdk' => _fs_x( 'SDK', 'as software development kit versions' ),
|
263 |
+
'sdk-versions' => _fs_x( 'SDK Versions', 'as software development kit versions' ),
|
264 |
+
'plugin-path' => _fs_x( 'Plugin Path', 'as plugin folder path' ),
|
265 |
+
'sdk-path' => _fs_x( 'SDK Path', 'as sdk path' ),
|
266 |
+
'addons-of-x' => _fs__( 'Add Ons of Plugin %s' ),
|
267 |
+
'delete-all-confirm' => _fs__( 'Are you sure you want to delete all Freemius data?' ),
|
268 |
+
'actions' => _fs__( 'Actions' ),
|
269 |
+
'delete-all-accounts' => _fs__( 'Delete All Accounts' ),
|
270 |
+
'start-fresh' => _fs__( 'Start Fresh' ),
|
271 |
+
'clear-api-cache' => _fs__( 'Clear API Cache' ),
|
272 |
+
'sync-data-from-server' => _fs__( 'Sync Data From Server' ),
|
273 |
+
'scheduled-crons' => _fs__( 'Scheduled Crons' ),
|
274 |
+
'plugins-themes-sync' => _fs__( 'Plugins & Themes Sync' ),
|
275 |
#endregion Debug
|
276 |
|
277 |
#region Expressions
|
278 |
+
'congrats' => _fs_x( 'Congrats', 'as congratulations' ),
|
279 |
+
'oops' => _fs_x( 'Oops', 'exclamation' ),
|
280 |
+
'yee-haw' => _fs_x( 'Yee-haw', 'interjection expressing joy or exuberance' ),
|
281 |
+
'woot' => _fs_x( 'W00t', '(especially in electronic communication) used to express elation, enthusiasm, or triumph.' ),
|
282 |
+
'right-on' => _fs_x( 'Right on', 'a positive response' ),
|
283 |
+
'hmm' => _fs_x( 'Hmm', 'something somebody says when they are thinking about what you have just said. ' ),
|
284 |
+
'ok' => _fs__( 'O.K' ),
|
285 |
+
'hey' => _fs_x( 'Hey', 'exclamation' ),
|
286 |
+
'heads-up' => _fs_x( 'Heads up', 'advance notice of something that will need attention.' ),
|
287 |
#endregion Expressions
|
288 |
|
289 |
#region Admin Notices
|
290 |
+
'you-have-latest' => _fs__( 'Seems like you got the latest release.' ),
|
291 |
+
'you-are-good' => _fs__( 'You are all good!' ),
|
292 |
+
'user-exist-message' => _fs__( 'Sorry, we could not complete the email update. Another user with the same email is already registered.' ),
|
293 |
+
'user-exist-message_ownership' => _fs__( 'If you would like to give up the ownership of the plugin\'s account to %s click the Change Ownership button.' ),
|
294 |
+
'email-updated-message' => _fs__( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.' ),
|
295 |
+
'name-updated-message' => _fs__( 'Your name was successfully updated.' ),
|
296 |
+
'x-updated' => _fs__( 'You have successfully updated your %s.' ),
|
297 |
+
'name-update-failed-message' => _fs__( 'Please provide your full name.' ),
|
298 |
+
'verification-email-sent-message' => _fs__( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.' ),
|
299 |
+
'addons-info-external-message' => _fs__( 'Just letting you know that the add-ons information of %s is being pulled from an external server.' ),
|
300 |
+
'no-cc-required' => _fs__( 'No credit card required' ),
|
301 |
+
'premium-activated-message' => _fs__( 'Premium plugin version was successfully activated.' ),
|
302 |
+
'successful-version-upgrade-message' => _fs__( 'The upgrade of %s was successfully completed.' ),
|
303 |
+
'activation-with-plan-x-message' => _fs__( 'Your account was successfully activated with the %s plan.' ),
|
304 |
+
'download-latest-x-version-now' => _fs__( 'Download the latest %s version now' ),
|
305 |
+
'follow-steps-to-complete-upgrade' => _fs__( 'Please follow these steps to complete the upgrade' ),
|
306 |
+
'download-latest-x-version' => _fs__( 'Download the latest %s version' ),
|
307 |
+
'download-latest-version' => _fs__( 'Download the latest version' ),
|
308 |
+
'deactivate-free-version' => _fs__( 'Deactivate the free version' ),
|
309 |
+
'upload-and-activate' => _fs__( 'Upload and activate the downloaded version' ),
|
310 |
+
'howto-upload-activate' => _fs__( 'How to upload and activate?' ),
|
311 |
+
'addon-successfully-purchased-message' => _fs_x( '%s Add-on was successfully purchased.', '%s - product name, e.g. Facebook add-on was successfully...' ),
|
312 |
+
'addon-successfully-upgraded-message' => _fs__( 'Your %s Add-on plan was successfully upgraded.' ),
|
313 |
+
'email-verified-message' => _fs__( 'Your email has been successfully verified - you are AWESOME!' ),
|
314 |
+
'plan-upgraded-message' => _fs__( 'Your plan was successfully upgraded.' ),
|
315 |
+
'plan-changed-to-x-message' => _fs__( 'Your plan was successfully changed to %s.' ),
|
316 |
+
'license-expired-blocking-message' => _fs__( 'Your license has expired. You can still continue using the free plugin forever.' ),
|
317 |
+
'license-cancelled' => _fs__( 'Your license has been cancelled. If you think it\'s a mistake, please contact support.' ),
|
318 |
+
'trial-started-message' => _fs__( 'Your trial has been successfully started.' ),
|
319 |
+
'license-activated-message' => _fs__( 'Your license was successfully activated.' ),
|
320 |
+
'no-active-license-message' => _fs__( 'It looks like your site currently doesn\'t have an active license.' ),
|
321 |
+
'license-deactivation-message' => _fs__( 'Your license was successfully deactivated, you are back to the %s plan.' ),
|
322 |
+
'license-deactivation-failed-message' => _fs__( 'It looks like the license deactivation failed.' ),
|
323 |
+
'license-activation-failed-message' => _fs__( 'It looks like the license could not be activated.' ),
|
324 |
+
'server-error-message' => _fs__( 'Error received from the server:' ),
|
325 |
+
'trial-expired-message' => _fs__( 'Your trial has expired. You can still continue using all our free features.' ),
|
326 |
+
'plan-x-downgraded-message' => _fs__( 'Your plan was successfully downgraded. Your %s plan license will expire in %s.' ),
|
327 |
+
'plan-downgraded-failure-message' => _fs__( 'Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes.' ),
|
328 |
+
'trial-cancel-no-trial-message' => _fs__( 'It looks like you are not in trial mode anymore so there\'s nothing to cancel :)' ),
|
329 |
+
'trial-cancel-message' => _fs__( 'Your %s free trial was successfully cancelled.' ),
|
330 |
+
'version-x-released' => _fs_x( 'Version %s was released.', '%s - numeric version number' ),
|
331 |
+
'please-download-x' => _fs__( 'Please download %s.' ),
|
332 |
+
'latest-x-version' => _fs_x( 'the latest %s version here', '%s - plan name, as the latest professional version here' ),
|
333 |
+
'trial-x-promotion-message' => _fs__( 'How do you like %s so far? Test all our %s premium features with a %d-day free trial.' ),
|
334 |
+
'start-free-trial' => _fs_x( 'Start free trial', 'call to action' ),
|
335 |
+
'starting-trial' => _fs__( 'Starting trial' ),
|
336 |
+
'please-wait' => _fs__( 'Please wait' ),
|
337 |
+
'trial-cancel-failure-message' => _fs__( 'Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes.' ),
|
338 |
+
'trial-utilized' => _fs__( 'You already utilized a trial before.' ),
|
339 |
+
'in-trial-mode' => _fs__( 'You are already running the plugin in a trial mode.' ),
|
340 |
+
'trial-plan-x-not-exist' => _fs__( 'Plan %s do not exist, therefore, can\'t start a trial.' ),
|
341 |
+
'plan-x-no-trial' => _fs__( 'Plan %s does not support a trial period.' ),
|
342 |
+
'no-trials' => _fs__( 'None of the plugin\'s plans supports a trial period.' ),
|
343 |
+
'unexpected-api-error' => _fs__( 'Unexpected API error. Please contact the plugin\'s author with the following error.' ),
|
344 |
+
'no-commitment-for-x-days' => _fs__( 'No commitment for %s days - cancel anytime!' ),
|
345 |
+
'license-expired-non-blocking-message' => _fs__( '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.' ),
|
346 |
+
'could-not-activate-x' => _fs__( 'Couldn\'t activate %s.' ),
|
347 |
+
'contact-us-with-error-message' => _fs__( 'Please contact us with the following message:' ),
|
348 |
+
'plan-did-not-change-message' => _fs__( '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.' ),
|
349 |
+
'contact-us-here' => _fs__( 'Please contact us here' ),
|
350 |
+
'plan-did-not-change-email-message' => _fs__( 'I have upgraded my account but when I try to Sync the License, the plan remains %s.' ),
|
351 |
#endregion Admin Notices
|
352 |
#region Connectivity Issues
|
353 |
+
'connectivity-test-fails-message' => _fs__( 'From unknown reason, the API connectivity test failed.' ),
|
354 |
+
'connectivity-test-maybe-temporary' => _fs__( '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?' ),
|
355 |
+
'curl-missing-message' => _fs__( 'We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server.' ),
|
356 |
+
'cloudflare-blocks-connection-message' => _fs__( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.' ),
|
357 |
+
'x-requires-access-to-api' => _fs_x( '%s requires an access to our API.', 'as pluginX requires an access to our API' ),
|
358 |
+
'squid-blocks-connection-message' => _fs__( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.' ),
|
359 |
+
'squid-no-clue-title' => _fs__( 'I don\'t know what is Squid or ACL, help me!' ),
|
360 |
+
'squid-no-clue-desc' => _fs__( '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.' ),
|
361 |
+
'sysadmin-title' => _fs__( 'I\'m a system administrator' ),
|
362 |
+
'squid-sysadmin-desc' => _fs__( 'Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again.' ),
|
363 |
+
'curl-missing-no-clue-title' => _fs__( 'I don\'t know what is cURL or how to install it, help me!' ),
|
364 |
+
'curl-missing-no-clue-desc' => _fs__( '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.' ),
|
365 |
+
'curl-missing-sysadmin-desc' => _fs__( 'Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the plugin and reactivate it back again.' ),
|
366 |
+
'happy-to-resolve-issue-asap' => _fs__( '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.' ),
|
367 |
+
'contact-support-before-deactivation' => _fs__( 'Sorry for the inconvenience and we are here to help if you give us a chance.' ),
|
368 |
+
'fix-issue-title' => _fs__( 'Yes - I\'m giving you a chance to fix it' ),
|
369 |
+
'fix-issue-desc' => _fs__( '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.' ),
|
370 |
+
'install-previous-title' => _fs__( 'Let\'s try your previous version' ),
|
371 |
+
'install-previous-desc' => _fs__( 'Uninstall this version and install the previous one.' ),
|
372 |
+
'deactivate-plugin-title' => _fs__( 'That\'s exhausting, please deactivate' ),
|
373 |
+
'deactivate-plugin-desc' => _fs__( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.' ),
|
374 |
+
'fix-request-sent-message' => _fs__( '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.' ),
|
375 |
+
'server-blocking-access' => _fs_x( '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' ),
|
376 |
+
'wrong-authentication-param-message' => _fs__( 'It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again.' ),
|
377 |
#endregion Connectivity Issues
|
378 |
#region Change Owner
|
379 |
+
'change-owner-request-sent-x' => _fs__( '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.' ),
|
380 |
+
'change-owner-request_owner-confirmed' => _fs__( 'Thanks for confirming the ownership change. An email was just sent to %s for final approval.' ),
|
381 |
+
'change-owner-request_candidate-confirmed' => _fs__( '%s is the new owner of the account.' ),
|
382 |
#endregion Change Owner
|
383 |
+
'addon-x-cannot-run-without-y' => _fs_x( '%s cannot run without %s.', 'addonX cannot run without pluginY' ),
|
384 |
+
'addon-x-cannot-run-without-parent' => _fs_x( '%s cannot run without the plugin.', 'addonX cannot run...' ),
|
385 |
+
'plugin-x-activation-message' => _fs_x( '%s activation was successfully completed.', 'pluginX activation was successfully...' ),
|
386 |
+
'features-and-pricing' => _fs_x( 'Features & Pricing', 'Plugin installer section title' ),
|
387 |
+
'free-addon-not-deployed' => _fs__( 'Add-on must be deployed to WordPress.org or Freemius.' ),
|
388 |
+
'paid-addon-not-deployed' => _fs__( 'Paid add-on must be deployed to Freemius.' ),
|
389 |
+
#--------------------------------------------------------------------------------
|
390 |
#region Add-On Licensing
|
391 |
+
#--------------------------------------------------------------------------------
|
392 |
+
'addon-no-license-message' => _fs__( '%s is a premium only add-on. You have to purchase a license first before activating the plugin.' ),
|
393 |
+
'addon-trial-cancelled-message' => _fs__( '%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.' ),
|
394 |
+
#endregion
|
395 |
+
#--------------------------------------------------------------------------------
|
396 |
#region Billing Cycles
|
397 |
+
#--------------------------------------------------------------------------------
|
398 |
+
'monthly' => _fs_x( 'Monthly', 'as every month' ),
|
399 |
+
'mo' => _fs_x( 'mo', 'as monthly period' ),
|
400 |
+
'annual' => _fs_x( 'Annual', 'as once a year' ),
|
401 |
+
'annually' => _fs_x( 'Annually', 'as once a year' ),
|
402 |
+
'once' => _fs_x( 'Once', 'as once a year' ),
|
403 |
+
'year' => _fs_x( 'year', 'as annual period' ),
|
404 |
+
'lifetime' => _fs__( 'Lifetime' ),
|
405 |
+
'best' => _fs_x( 'Best', 'e.g. the best product' ),
|
406 |
+
'billed-x' => _fs_x( 'Billed %s', 'e.g. billed monthly' ),
|
407 |
+
'save-x' => _fs_x( 'Save %s', 'as a discount of $5 or 10%' ),
|
408 |
#endregion Billing Cycles
|
409 |
+
'view-details' => _fs__( 'View details' ),
|
410 |
+
#--------------------------------------------------------------------------------
|
411 |
+
#region Trial
|
412 |
+
#--------------------------------------------------------------------------------
|
413 |
+
'approve-start-trial' => _fs_x( 'Approve & Start Trial', 'button label' ),
|
414 |
+
/* translators: %1$s: Number of trial days; %2$s: Plan name; */
|
415 |
+
'start-trial-prompt-header' => _fs__( 'You are 1-click away from starting your %1$s-day free trial of the %2$s plan.' ),
|
416 |
+
/* translators: %s: Link to freemius.com */
|
417 |
+
'start-trial-prompt-message' => _fs__( '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.' ),
|
418 |
+
|
419 |
+
#endregion
|
420 |
+
#--------------------------------------------------------------------------------
|
421 |
+
#region Billing Details
|
422 |
+
#--------------------------------------------------------------------------------
|
423 |
+
'business-name' => _fs__( 'Business name' ),
|
424 |
+
'tax-vat-id' => _fs__( 'Tax / VAT ID' ),
|
425 |
+
'address-line-n' => _fs__( 'Address Line %d' ),
|
426 |
+
'country' => _fs__( 'Country' ),
|
427 |
+
'select-country' => _fs__( 'Select Country' ),
|
428 |
+
'city' => _fs__( 'City' ),
|
429 |
+
'town' => _fs__( 'Town' ),
|
430 |
+
'state' => _fs__( 'State' ),
|
431 |
+
'province' => _fs__( 'Province' ),
|
432 |
+
'zip-postal-code' => _fs__( 'ZIP / Postal Code' ),
|
433 |
+
#endregion
|
434 |
);
|
lib/freemius/includes/l10n.php
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
6 |
+
* @since 1.2.1.6
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Retrieve the translation of $text.
|
15 |
+
*
|
16 |
+
* @since 1.2.1.6
|
17 |
+
*
|
18 |
+
* @param string $text
|
19 |
+
*
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
function _fs__( $text ) {
|
23 |
+
return translate( $text, 'freemius' );
|
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_e( $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_e( $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_e( $text ) {
|
82 |
+
echo esc_html( translate( $text, 'freemius' ) );
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Retrieve translated string with gettext context.
|
87 |
+
*
|
88 |
+
* Quite a few times, there will be collisions with similar translatable text
|
89 |
+
* found in more than two places, but with different translated context.
|
90 |
+
*
|
91 |
+
* By including the context in the pot file, translators can translate the two
|
92 |
+
* strings differently.
|
93 |
+
*
|
94 |
+
* @since 1.2.1.6
|
95 |
+
*
|
96 |
+
* @param string $text
|
97 |
+
* @param string $context
|
98 |
+
*
|
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 |
+
* @return string
|
114 |
+
*/
|
115 |
+
function _fs_ex( $text, $context ) {
|
116 |
+
echo _x( $text, $context, 'freemius' );
|
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 |
+
}
|
lib/freemius/includes/managers/class-fs-admin-menu-manager.php
CHANGED
@@ -58,7 +58,7 @@
|
|
58 |
/**
|
59 |
* @since 1.1.3
|
60 |
*
|
61 |
-
* @var string
|
62 |
*/
|
63 |
private $_default_submenu_items;
|
64 |
/**
|
@@ -502,7 +502,6 @@
|
|
502 |
}
|
503 |
|
504 |
/**
|
505 |
-
*
|
506 |
* @author Vova Feldman (@svovaf)
|
507 |
* @since 1.1.4
|
508 |
*
|
@@ -545,5 +544,28 @@
|
|
545 |
return $hookname;
|
546 |
}
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
#endregion Top level menu Override
|
549 |
}
|
58 |
/**
|
59 |
* @since 1.1.3
|
60 |
*
|
61 |
+
* @var array<string,bool>
|
62 |
*/
|
63 |
private $_default_submenu_items;
|
64 |
/**
|
502 |
}
|
503 |
|
504 |
/**
|
|
|
505 |
* @author Vova Feldman (@svovaf)
|
506 |
* @since 1.1.4
|
507 |
*
|
544 |
return $hookname;
|
545 |
}
|
546 |
|
547 |
+
/**
|
548 |
+
* Adds a counter to the module's top level menu item.
|
549 |
+
*
|
550 |
+
* @author Vova Feldman (@svovaf)
|
551 |
+
* @since 1.2.1.5
|
552 |
+
*
|
553 |
+
* @param int $counter
|
554 |
+
* @param string $class
|
555 |
+
*/
|
556 |
+
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
|
557 |
+
global $menu;
|
558 |
+
|
559 |
+
// Find main menu item.
|
560 |
+
$found_menu = $this->find_top_level_menu();
|
561 |
+
|
562 |
+
if ( false === $menu ) {
|
563 |
+
return;
|
564 |
+
}
|
565 |
+
|
566 |
+
// Override menu label.
|
567 |
+
$menu[ $found_menu['position'] ][0] = $found_menu['menu'][0] . ' <span class="update-plugins ' . $class . ' count-' . $counter . '"><span>' . $counter . '</span></span>';
|
568 |
+
}
|
569 |
+
|
570 |
#endregion Top level menu Override
|
571 |
}
|
lib/freemius/includes/managers/class-fs-admin-notice-manager.php
CHANGED
@@ -61,7 +61,7 @@
|
|
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( "
|
65 |
&$this,
|
66 |
'dismiss_notice_ajax_callback'
|
67 |
) );
|
@@ -279,6 +279,9 @@
|
|
279 |
* @param bool $all_admin
|
280 |
*/
|
281 |
function add_sticky( $message, $id, $title = '', $type = 'success', $all_admin = false ) {
|
|
|
|
|
|
|
282 |
$this->add( $message, $title, $type, true, $all_admin, $id );
|
283 |
}
|
284 |
|
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_{$slug}", array(
|
65 |
&$this,
|
66 |
'dismiss_notice_ajax_callback'
|
67 |
) );
|
279 |
* @param bool $all_admin
|
280 |
*/
|
281 |
function add_sticky( $message, $id, $title = '', $type = 'success', $all_admin = false ) {
|
282 |
+
$message = fs_apply_filter( $this->_slug, "sticky_message_{$id}", $message );
|
283 |
+
$title = fs_apply_filter( $this->_slug, "sticky_title_{$id}", $title );
|
284 |
+
|
285 |
$this->add( $message, $title, $type, true, $all_admin, $id );
|
286 |
}
|
287 |
|
lib/freemius/includes/managers/class-fs-license-manager.php
CHANGED
@@ -90,6 +90,9 @@
|
|
90 |
static function has_premium_license( $licenses ) {
|
91 |
if ( is_array( $licenses ) ) {
|
92 |
foreach ( $licenses as $license ) {
|
|
|
|
|
|
|
93 |
if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
|
94 |
return true;
|
95 |
}
|
90 |
static function has_premium_license( $licenses ) {
|
91 |
if ( is_array( $licenses ) ) {
|
92 |
foreach ( $licenses as $license ) {
|
93 |
+
/**
|
94 |
+
* @var FS_Plugin_License $license
|
95 |
+
*/
|
96 |
if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
|
97 |
return true;
|
98 |
}
|
lib/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php
CHANGED
@@ -3,4 +3,7 @@
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
|
|
|
|
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
|
7 |
+
class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
|
8 |
+
}
|
9 |
+
}
|
lib/freemius/includes/sdk/Exceptions/EmptyArgumentException.php
CHANGED
@@ -3,4 +3,7 @@
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
|
|
|
|
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
|
7 |
+
class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
|
8 |
+
}
|
9 |
+
}
|
lib/freemius/includes/sdk/Exceptions/Exception.php
CHANGED
@@ -1,75 +1,74 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Make a new API Exception with the given result.
|
14 |
-
*
|
15 |
-
* @param array $result The result from the API server.
|
16 |
-
*/
|
17 |
-
public function __construct($result)
|
18 |
-
{
|
19 |
-
$this->_result = $result;
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
$code = $result['error']['code'];
|
29 |
-
if (isset($result['error']['message']))
|
30 |
-
$message = $result['error']['message'];
|
31 |
-
if (isset($result['error']['type']))
|
32 |
-
$type = $result['error']['type'];
|
33 |
-
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
parent::__construct($message, is_numeric($code) ? $code : 0);
|
39 |
-
}
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
return $this->_code;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getType()
|
57 |
-
{
|
58 |
-
return $this->_type;
|
59 |
-
}
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
*
|
64 |
-
* @return string The string representation of the error
|
65 |
-
*/
|
66 |
-
public function __toString()
|
67 |
-
{
|
68 |
-
$str = $this->getType() . ': ';
|
69 |
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
if ( ! class_exists( 'Freemius_Exception' ) ) {
|
3 |
+
/**
|
4 |
+
* Thrown when an API call returns an exception.
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Freemius_Exception extends Exception {
|
8 |
+
protected $_result;
|
9 |
+
protected $_type;
|
10 |
+
protected $_code;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
/**
|
13 |
+
* Make a new API Exception with the given result.
|
14 |
+
*
|
15 |
+
* @param array $result The result from the API server.
|
16 |
+
*/
|
17 |
+
public function __construct( $result ) {
|
18 |
+
$this->_result = $result;
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
$code = 0;
|
21 |
+
$message = 'Unknown error, please check GetResult().';
|
22 |
+
$type = '';
|
|
|
|
|
23 |
|
24 |
+
if ( isset( $result['error'] ) && is_array( $result['error'] ) ) {
|
25 |
+
if ( isset( $result['error']['code'] ) ) {
|
26 |
+
$code = $result['error']['code'];
|
27 |
+
}
|
28 |
+
if ( isset( $result['error']['message'] ) ) {
|
29 |
+
$message = $result['error']['message'];
|
30 |
+
}
|
31 |
+
if ( isset( $result['error']['type'] ) ) {
|
32 |
+
$type = $result['error']['type'];
|
33 |
+
}
|
34 |
+
}
|
35 |
|
36 |
+
$this->_type = $type;
|
37 |
+
$this->_code = $code;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
parent::__construct( $message, is_numeric( $code ) ? $code : 0 );
|
40 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
+
/**
|
43 |
+
* Return the associated result object returned by the API server.
|
44 |
+
*
|
45 |
+
* @return array The result from the API server
|
46 |
+
*/
|
47 |
+
public function getResult() {
|
48 |
+
return $this->_result;
|
49 |
+
}
|
50 |
|
51 |
+
public function getStringCode() {
|
52 |
+
return $this->_code;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getType() {
|
56 |
+
return $this->_type;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* To make debugging easier.
|
61 |
+
*
|
62 |
+
* @return string The string representation of the error
|
63 |
+
*/
|
64 |
+
public function __toString() {
|
65 |
+
$str = $this->getType() . ': ';
|
66 |
+
|
67 |
+
if ( $this->code != 0 ) {
|
68 |
+
$str .= $this->getStringCode() . ': ';
|
69 |
+
}
|
70 |
+
|
71 |
+
return $str . $this->getMessage();
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
lib/freemius/includes/sdk/Exceptions/InvalidArgumentException.php
CHANGED
@@ -3,4 +3,6 @@
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
|
|
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
|
7 |
+
class Freemius_InvalidArgumentException extends Freemius_Exception { }
|
8 |
+
}
|
lib/freemius/includes/sdk/Exceptions/OAuthException.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
if ( ! class_exists( 'Freemius_OAuthException' ) ) {
|
7 |
+
class Freemius_OAuthException extends Freemius_Exception {
|
8 |
+
public function __construct( $pResult ) {
|
9 |
+
parent::__construct( $pResult );
|
10 |
+
}
|
11 |
+
}
|
12 |
+
}
|
lib/freemius/includes/sdk/Freemius.php
CHANGED
@@ -17,7 +17,9 @@
|
|
17 |
|
18 |
require_once( dirname( __FILE__ ) . '/FreemiusBase.php' );
|
19 |
|
20 |
-
|
|
|
|
|
21 |
|
22 |
if ( ! defined( 'FS_SDK__SIMULATE_NO_CURL' ) ) {
|
23 |
define( 'FS_SDK__SIMULATE_NO_CURL', false );
|
@@ -31,7 +33,9 @@
|
|
31 |
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
32 |
}
|
33 |
|
34 |
-
|
|
|
|
|
35 |
|
36 |
if ( ! FS_SDK__HAS_CURL ) {
|
37 |
$curl_version = array( 'version' => '7.0.0' );
|
@@ -39,7 +43,9 @@
|
|
39 |
$curl_version = curl_version();
|
40 |
}
|
41 |
|
42 |
-
|
|
|
|
|
43 |
|
44 |
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
45 |
define( 'FS_API__LOGGER_ON', false );
|
@@ -52,6 +58,10 @@
|
|
52 |
define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' );
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
55 |
class Freemius_Api extends Freemius_Api_Base {
|
56 |
private static $_logger = array();
|
57 |
|
@@ -312,12 +322,9 @@
|
|
312 |
CURLOPT_RETURNTRANSFER => true,
|
313 |
CURLOPT_TIMEOUT => 60,
|
314 |
CURLOPT_USERAGENT => FS_SDK__USER_AGENT,
|
|
|
315 |
);
|
316 |
|
317 |
-
if ( ! isset( $opts[ CURLOPT_HTTPHEADER ] ) || ! is_array( $opts[ CURLOPT_HTTPHEADER ] ) ) {
|
318 |
-
$opts[ CURLOPT_HTTPHEADER ] = array();
|
319 |
-
}
|
320 |
-
|
321 |
if ( 'POST' === $pMethod || 'PUT' === $pMethod ) {
|
322 |
if ( is_array( $pParams ) && 0 < count( $pParams ) ) {
|
323 |
$opts[ CURLOPT_HTTPHEADER ][] = 'Content-Type: application/json';
|
@@ -328,7 +335,7 @@
|
|
328 |
$opts[ CURLOPT_RETURNTRANSFER ] = true;
|
329 |
}
|
330 |
|
331 |
-
$request_url =
|
332 |
|
333 |
$opts[ CURLOPT_URL ] = $request_url;
|
334 |
$opts[ CURLOPT_CUSTOMREQUEST ] = $pMethod;
|
17 |
|
18 |
require_once( dirname( __FILE__ ) . '/FreemiusBase.php' );
|
19 |
|
20 |
+
if ( ! defined( 'FS_SDK__USER_AGENT' ) ) {
|
21 |
+
define( 'FS_SDK__USER_AGENT', 'fs-php-' . Freemius_Api_Base::VERSION );
|
22 |
+
}
|
23 |
|
24 |
if ( ! defined( 'FS_SDK__SIMULATE_NO_CURL' ) ) {
|
25 |
define( 'FS_SDK__SIMULATE_NO_CURL', false );
|
33 |
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
34 |
}
|
35 |
|
36 |
+
if ( ! defined( 'FS_SDK__HAS_CURL' ) ) {
|
37 |
+
define( 'FS_SDK__HAS_CURL', ! FS_SDK__SIMULATE_NO_CURL && function_exists( 'curl_version' ) );
|
38 |
+
}
|
39 |
|
40 |
if ( ! FS_SDK__HAS_CURL ) {
|
41 |
$curl_version = array( 'version' => '7.0.0' );
|
43 |
$curl_version = curl_version();
|
44 |
}
|
45 |
|
46 |
+
if ( ! defined( 'FS_API__PROTOCOL' ) ) {
|
47 |
+
define( 'FS_API__PROTOCOL', version_compare( $curl_version['version'], '7.37', '>=' ) ? 'https' : 'http' );
|
48 |
+
}
|
49 |
|
50 |
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
51 |
define( 'FS_API__LOGGER_ON', false );
|
58 |
define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' );
|
59 |
}
|
60 |
|
61 |
+
if ( class_exists( 'Freemius_Api' ) ) {
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
class Freemius_Api extends Freemius_Api_Base {
|
66 |
private static $_logger = array();
|
67 |
|
322 |
CURLOPT_RETURNTRANSFER => true,
|
323 |
CURLOPT_TIMEOUT => 60,
|
324 |
CURLOPT_USERAGENT => FS_SDK__USER_AGENT,
|
325 |
+
CURLOPT_HTTPHEADER => array(),
|
326 |
);
|
327 |
|
|
|
|
|
|
|
|
|
328 |
if ( 'POST' === $pMethod || 'PUT' === $pMethod ) {
|
329 |
if ( is_array( $pParams ) && 0 < count( $pParams ) ) {
|
330 |
$opts[ CURLOPT_HTTPHEADER ][] = 'Content-Type: application/json';
|
335 |
$opts[ CURLOPT_RETURNTRANSFER ] = true;
|
336 |
}
|
337 |
|
338 |
+
$request_url = self::GetUrl( $pCanonizedPath, $pIsSandbox );
|
339 |
|
340 |
$opts[ CURLOPT_URL ] = $request_url;
|
341 |
$opts[ CURLOPT_CUSTOMREQUEST ] = $pMethod;
|
lib/freemius/includes/sdk/FreemiusBase.php
CHANGED
@@ -15,9 +15,15 @@
|
|
15 |
* under the License.
|
16 |
*/
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
if ( ! function_exists( 'json_decode' ) ) {
|
23 |
throw new Exception( 'Freemius needs the JSON PHP extension.' );
|
@@ -36,6 +42,10 @@
|
|
36 |
require_once FS_SDK__EXCEPTIONS_PATH . $e . '.php';
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
39 |
abstract class Freemius_Api_Base {
|
40 |
const VERSION = '1.0.4';
|
41 |
const FORMAT = 'json';
|
@@ -47,7 +57,7 @@
|
|
47 |
protected $_isSandbox;
|
48 |
|
49 |
/**
|
50 |
-
* @param string $pScope 'app', 'developer', 'user' or 'install'.
|
51 |
* @param number $pID Element's id.
|
52 |
* @param string $pPublic Public key.
|
53 |
* @param string $pSecret Element's secret key.
|
15 |
* under the License.
|
16 |
*/
|
17 |
|
18 |
+
if ( ! defined( 'FS_API__VERSION' ) ) {
|
19 |
+
define( 'FS_API__VERSION', '1' );
|
20 |
+
}
|
21 |
+
if ( ! defined( 'FS_SDK__PATH' ) ) {
|
22 |
+
define( 'FS_SDK__PATH', dirname( __FILE__ ) );
|
23 |
+
}
|
24 |
+
if ( ! defined( 'FS_SDK__EXCEPTIONS_PATH' ) ) {
|
25 |
+
define( 'FS_SDK__EXCEPTIONS_PATH', FS_SDK__PATH . '/Exceptions/' );
|
26 |
+
}
|
27 |
|
28 |
if ( ! function_exists( 'json_decode' ) ) {
|
29 |
throw new Exception( 'Freemius needs the JSON PHP extension.' );
|
42 |
require_once FS_SDK__EXCEPTIONS_PATH . $e . '.php';
|
43 |
}
|
44 |
|
45 |
+
if ( class_exists( 'Freemius_Api_Base' ) ) {
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
abstract class Freemius_Api_Base {
|
50 |
const VERSION = '1.0.4';
|
51 |
const FORMAT = 'json';
|
57 |
protected $_isSandbox;
|
58 |
|
59 |
/**
|
60 |
+
* @param string $pScope 'app', 'developer', 'plugin', 'user' or 'install'.
|
61 |
* @param number $pID Element's id.
|
62 |
* @param string $pPublic Public key.
|
63 |
* @param string $pSecret Element's secret key.
|
lib/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php
CHANGED
@@ -37,9 +37,11 @@
|
|
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 |
-
|
|
|
|
|
41 |
}
|
42 |
}
|
43 |
|
44 |
return null;
|
45 |
-
}
|
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 |
+
}
|
lib/freemius/languages/freemius-da_DK.mo
ADDED
Binary file
|
lib/freemius/languages/freemius-da_DK.po
ADDED
@@ -0,0 +1,1661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Joachim Jensen <jv@intox.dk>, 2016
|
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 |
+
"PO-Revision-Date: 2016-12-07 01:29+0000\n"
|
10 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
11 |
+
"Language-Team: Danish (Denmark) (http://www.transifex.com/freemius/wordpress-sdk/language/da_DK/)\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"Language: da_DK\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
21 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
22 |
+
|
23 |
+
#: includes/i18n.php41, includes/i18n.php:55
|
24 |
+
msgid "Yes - I'm in!"
|
25 |
+
msgstr "Ja - jeg er med!"
|
26 |
+
|
27 |
+
#: includes/i18n.php43, includes/i18n.php:57
|
28 |
+
msgid "Not today"
|
29 |
+
msgstr "Ikke i dag"
|
30 |
+
|
31 |
+
#: includes/i18n.php:69
|
32 |
+
msgid "Account"
|
33 |
+
msgstr "Konto"
|
34 |
+
|
35 |
+
#: includes/i18n.php:71
|
36 |
+
msgid "Add On"
|
37 |
+
msgstr "Tilføjelse"
|
38 |
+
|
39 |
+
#: includes/i18n.php:73
|
40 |
+
msgid "Contact Us"
|
41 |
+
msgstr "Kontakt os"
|
42 |
+
|
43 |
+
#: includes/i18n.php:75
|
44 |
+
msgid "Contact Support"
|
45 |
+
msgstr "Kontakt support"
|
46 |
+
|
47 |
+
#: includes/i18n.php:77
|
48 |
+
msgid "Change Ownership"
|
49 |
+
msgstr "Skift ejerskab"
|
50 |
+
|
51 |
+
#: includes/i18n.php:79
|
52 |
+
msgid "Support"
|
53 |
+
msgstr "Support"
|
54 |
+
|
55 |
+
#: includes/i18n.php:81
|
56 |
+
msgid "Support Forum"
|
57 |
+
msgstr "Supportforum"
|
58 |
+
|
59 |
+
#: includes/i18n.php:83
|
60 |
+
msgid "Add Ons"
|
61 |
+
msgstr "Tilføjelser"
|
62 |
+
|
63 |
+
#: includes/i18n.php:85
|
64 |
+
msgctxt "verb"
|
65 |
+
msgid "Upgrade"
|
66 |
+
msgstr "Opgrader"
|
67 |
+
|
68 |
+
#: includes/i18n.php:87
|
69 |
+
msgid "Awesome"
|
70 |
+
msgstr "Sejt"
|
71 |
+
|
72 |
+
#: includes/i18n.php:89
|
73 |
+
msgctxt "noun"
|
74 |
+
msgid "Pricing"
|
75 |
+
msgstr "Priser"
|
76 |
+
|
77 |
+
#: includes/i18n.php:91
|
78 |
+
msgctxt "noun"
|
79 |
+
msgid "Price"
|
80 |
+
msgstr "Pris"
|
81 |
+
|
82 |
+
#: includes/i18n.php:93
|
83 |
+
msgid "Unlimited Updates"
|
84 |
+
msgstr "Ubegrænsede opdateringer"
|
85 |
+
|
86 |
+
#: includes/i18n.php:95
|
87 |
+
msgctxt "verb"
|
88 |
+
msgid "Downgrade"
|
89 |
+
msgstr "Nedgrader"
|
90 |
+
|
91 |
+
#: includes/i18n.php:97
|
92 |
+
msgid "Cancel Trial"
|
93 |
+
msgstr "Annuller prøveperiode"
|
94 |
+
|
95 |
+
#: includes/i18n.php:99
|
96 |
+
msgid "Free Trial"
|
97 |
+
msgstr "Gratis prøveperiode"
|
98 |
+
|
99 |
+
#: includes/i18n.php:101
|
100 |
+
msgid "Start my free %s"
|
101 |
+
msgstr "Start min gratis %s"
|
102 |
+
|
103 |
+
#: includes/i18n.php:103
|
104 |
+
msgid "No commitment for %s - cancel anytime"
|
105 |
+
msgstr "Ingen bindinger ved %s - annuller når som helst"
|
106 |
+
|
107 |
+
#: includes/i18n.php:105
|
108 |
+
msgid "After your free %s, pay as little as %s"
|
109 |
+
msgstr "Efter din gratis %s er prisen kun %s"
|
110 |
+
|
111 |
+
#: includes/i18n.php:107
|
112 |
+
msgid "Details"
|
113 |
+
msgstr "Detaljer"
|
114 |
+
|
115 |
+
#: includes/i18n.php:109
|
116 |
+
msgid "Account Details"
|
117 |
+
msgstr "Kontodetaljer"
|
118 |
+
|
119 |
+
#: includes/i18n.php:111
|
120 |
+
msgctxt "verb"
|
121 |
+
msgid "Delete"
|
122 |
+
msgstr "Slet"
|
123 |
+
|
124 |
+
#: includes/i18n.php:113
|
125 |
+
msgctxt "verb"
|
126 |
+
msgid "Show"
|
127 |
+
msgstr "Vis"
|
128 |
+
|
129 |
+
#: includes/i18n.php:115
|
130 |
+
msgctxt "verb"
|
131 |
+
msgid "Hide"
|
132 |
+
msgstr "Skjul"
|
133 |
+
|
134 |
+
#: includes/i18n.php:117
|
135 |
+
msgctxt "verb"
|
136 |
+
msgid "Edit"
|
137 |
+
msgstr "Rediger"
|
138 |
+
|
139 |
+
#: includes/i18n.php:119
|
140 |
+
msgctxt "verb"
|
141 |
+
msgid "Update"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: includes/i18n.php:121
|
145 |
+
msgid "Date"
|
146 |
+
msgstr "Dato"
|
147 |
+
|
148 |
+
#: includes/i18n.php:123
|
149 |
+
msgid "Amount"
|
150 |
+
msgstr "Beløb"
|
151 |
+
|
152 |
+
#: includes/i18n.php:125
|
153 |
+
msgid "Invoice"
|
154 |
+
msgstr "Faktura"
|
155 |
+
|
156 |
+
#: includes/i18n.php:127
|
157 |
+
msgid "Billing"
|
158 |
+
msgstr "Betaling"
|
159 |
+
|
160 |
+
#: includes/i18n.php:129
|
161 |
+
msgid "Payments"
|
162 |
+
msgstr "Betalinger"
|
163 |
+
|
164 |
+
#: includes/i18n.php:131
|
165 |
+
msgid "Delete Account"
|
166 |
+
msgstr "Slet konto"
|
167 |
+
|
168 |
+
#: includes/i18n.php:133
|
169 |
+
msgctxt "as close a window"
|
170 |
+
msgid "Dismiss"
|
171 |
+
msgstr "Fjern"
|
172 |
+
|
173 |
+
#: includes/i18n.php:135
|
174 |
+
msgctxt "as product pricing plan"
|
175 |
+
msgid "Plan"
|
176 |
+
msgstr "Plan"
|
177 |
+
|
178 |
+
#: includes/i18n.php:137
|
179 |
+
msgid "Change Plan"
|
180 |
+
msgstr "Skift plan"
|
181 |
+
|
182 |
+
#: includes/i18n.php:139
|
183 |
+
msgctxt "as download professional version"
|
184 |
+
msgid "Download %s Version"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: includes/i18n.php:141
|
188 |
+
msgctxt "as download professional version now"
|
189 |
+
msgid "Download %s version now"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: includes/i18n.php:145
|
193 |
+
msgctxt "as download latest version"
|
194 |
+
msgid "Download Latest"
|
195 |
+
msgstr "Download seneste"
|
196 |
+
|
197 |
+
#: includes/i18n.php:147
|
198 |
+
msgctxt "E.g. you have a professional license."
|
199 |
+
msgid "You have a %s license."
|
200 |
+
msgstr "Du har en %s licens."
|
201 |
+
|
202 |
+
#: includes/i18n.php:151
|
203 |
+
msgid "New"
|
204 |
+
msgstr "Ny"
|
205 |
+
|
206 |
+
#: includes/i18n.php:153
|
207 |
+
msgid "Free"
|
208 |
+
msgstr "Gratis"
|
209 |
+
|
210 |
+
#: includes/i18n.php:155
|
211 |
+
msgctxt "as trial plan"
|
212 |
+
msgid "Trial"
|
213 |
+
msgstr "Prøveperiode"
|
214 |
+
|
215 |
+
#: includes/i18n.php:157
|
216 |
+
msgctxt "as starting a trial plan"
|
217 |
+
msgid "Start Trial"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: includes/i18n.php:159
|
221 |
+
msgctxt "verb"
|
222 |
+
msgid "Purchase"
|
223 |
+
msgstr "Køb"
|
224 |
+
|
225 |
+
#: includes/i18n.php:161
|
226 |
+
msgid "Purchase License"
|
227 |
+
msgstr "Køb licens"
|
228 |
+
|
229 |
+
#: includes/i18n.php:163
|
230 |
+
msgctxt "verb"
|
231 |
+
msgid "Buy"
|
232 |
+
msgstr "Køb"
|
233 |
+
|
234 |
+
#: includes/i18n.php:165
|
235 |
+
msgid "Buy License"
|
236 |
+
msgstr "Køb licens"
|
237 |
+
|
238 |
+
#: includes/i18n.php:167
|
239 |
+
msgid "Single Site License"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: includes/i18n.php:169
|
243 |
+
msgid "Unlimited Licenses"
|
244 |
+
msgstr "Ubegrænsede licenser"
|
245 |
+
|
246 |
+
#: includes/i18n.php:171
|
247 |
+
msgid "Up to %s Sites"
|
248 |
+
msgstr "Op til %s websteder"
|
249 |
+
|
250 |
+
#: includes/i18n.php:173
|
251 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: includes/i18n.php:177
|
255 |
+
msgid ""
|
256 |
+
"Enter the email address you've used for the upgrade below and we will resend"
|
257 |
+
" you the license key."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: includes/i18n.php:181
|
261 |
+
msgctxt "e.g. Professional Plan"
|
262 |
+
msgid "%s Plan"
|
263 |
+
msgstr "%s Plan"
|
264 |
+
|
265 |
+
#: includes/i18n.php:183
|
266 |
+
msgid "You are just one step away - %s"
|
267 |
+
msgstr "Du mangler kun ét skridt - %s"
|
268 |
+
|
269 |
+
#: includes/i18n.php:185
|
270 |
+
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
271 |
+
msgid "Complete \"%s\" Activation Now"
|
272 |
+
msgstr "Færdiggør aktivering af \"%s\" nu"
|
273 |
+
|
274 |
+
#: includes/i18n.php:189
|
275 |
+
msgid "We made a few tweaks to the plugin, %s"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: includes/i18n.php:191
|
279 |
+
msgid "Opt-in to make \"%s\" Better!"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: includes/i18n.php:193
|
283 |
+
msgid "Error"
|
284 |
+
msgstr "Fejl"
|
285 |
+
|
286 |
+
#: includes/i18n.php:195
|
287 |
+
msgid ""
|
288 |
+
"Freemius SDK couldn't find the plugin's main file. Please contact "
|
289 |
+
"sdk@freemius.com with the current error."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: includes/i18n.php:203
|
293 |
+
msgctxt "as expiration date"
|
294 |
+
msgid "Expiration"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: includes/i18n.php:205
|
298 |
+
msgctxt "as software license"
|
299 |
+
msgid "License"
|
300 |
+
msgstr "Licens"
|
301 |
+
|
302 |
+
#: includes/i18n.php:207
|
303 |
+
msgid "not verified"
|
304 |
+
msgstr "ikke verificeret"
|
305 |
+
|
306 |
+
#: includes/i18n.php:209
|
307 |
+
msgid "Verify Email"
|
308 |
+
msgstr "Verificer e-mail"
|
309 |
+
|
310 |
+
#: includes/i18n.php:211
|
311 |
+
msgctxt "e.g. expires in 2 months"
|
312 |
+
msgid "Expires in %s"
|
313 |
+
msgstr "Udløber om %s"
|
314 |
+
|
315 |
+
#: includes/i18n.php:213
|
316 |
+
msgctxt "e.g. auto renews in 2 months"
|
317 |
+
msgid "Auto renews in %s"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: includes/i18n.php:215
|
321 |
+
msgid "No expiration"
|
322 |
+
msgstr "Udløber ikke"
|
323 |
+
|
324 |
+
#: includes/i18n.php:217
|
325 |
+
msgid "Expired"
|
326 |
+
msgstr "Udløbet"
|
327 |
+
|
328 |
+
#: includes/i18n.php:219
|
329 |
+
msgid "Cancelled"
|
330 |
+
msgstr "Annulleret"
|
331 |
+
|
332 |
+
#: includes/i18n.php:221
|
333 |
+
msgctxt "e.g. In 2 hours"
|
334 |
+
msgid "In %s"
|
335 |
+
msgstr "Om %s"
|
336 |
+
|
337 |
+
#: includes/i18n.php:223
|
338 |
+
msgctxt "e.g. 2 min ago"
|
339 |
+
msgid "%s ago"
|
340 |
+
msgstr "%s siden"
|
341 |
+
|
342 |
+
#: includes/i18n.php:225
|
343 |
+
msgctxt "as plugin version"
|
344 |
+
msgid "Version"
|
345 |
+
msgstr "Version"
|
346 |
+
|
347 |
+
#: includes/i18n.php:227
|
348 |
+
msgid "Name"
|
349 |
+
msgstr "Navn"
|
350 |
+
|
351 |
+
#: includes/i18n.php:229
|
352 |
+
msgid "Email"
|
353 |
+
msgstr "E-mail"
|
354 |
+
|
355 |
+
#: includes/i18n.php:231
|
356 |
+
msgid "Email address"
|
357 |
+
msgstr "E-mailadresse"
|
358 |
+
|
359 |
+
#: includes/i18n.php:233
|
360 |
+
msgid "Verified"
|
361 |
+
msgstr "Verificeret"
|
362 |
+
|
363 |
+
#: includes/i18n.php:235
|
364 |
+
msgid "Plugin"
|
365 |
+
msgstr "Plugin"
|
366 |
+
|
367 |
+
#: includes/i18n.php:237
|
368 |
+
msgid "Plugins"
|
369 |
+
msgstr "Plugins"
|
370 |
+
|
371 |
+
#: includes/i18n.php:239
|
372 |
+
msgid "Themes"
|
373 |
+
msgstr "Temaer"
|
374 |
+
|
375 |
+
#: includes/i18n.php:241
|
376 |
+
msgctxt "as file/folder path"
|
377 |
+
msgid "Path"
|
378 |
+
msgstr "Sti"
|
379 |
+
|
380 |
+
#: includes/i18n.php:243
|
381 |
+
msgid "Title"
|
382 |
+
msgstr "Titel"
|
383 |
+
|
384 |
+
#: includes/i18n.php:245
|
385 |
+
msgid "Free version"
|
386 |
+
msgstr "Gratis version"
|
387 |
+
|
388 |
+
#: includes/i18n.php:247
|
389 |
+
msgid "Premium version"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/i18n.php:249
|
393 |
+
msgctxt "as WP plugin slug"
|
394 |
+
msgid "Slug"
|
395 |
+
msgstr "Kortnavn"
|
396 |
+
|
397 |
+
#: includes/i18n.php:251
|
398 |
+
msgid "ID"
|
399 |
+
msgstr "ID"
|
400 |
+
|
401 |
+
#: includes/i18n.php:253
|
402 |
+
msgid "Users"
|
403 |
+
msgstr "Brugere"
|
404 |
+
|
405 |
+
#: includes/i18n.php:255
|
406 |
+
msgid "Plugin Installs"
|
407 |
+
msgstr "Plugin-installationer"
|
408 |
+
|
409 |
+
#: includes/i18n.php:257
|
410 |
+
msgctxt "like websites"
|
411 |
+
msgid "Sites"
|
412 |
+
msgstr "Websteder"
|
413 |
+
|
414 |
+
#: includes/i18n.php:259
|
415 |
+
msgid "User ID"
|
416 |
+
msgstr "Bruger-ID"
|
417 |
+
|
418 |
+
#: includes/i18n.php:261
|
419 |
+
msgid "Site ID"
|
420 |
+
msgstr "Websteds-ID"
|
421 |
+
|
422 |
+
#: includes/i18n.php:263
|
423 |
+
msgid "Public Key"
|
424 |
+
msgstr "Offentlig nøgle"
|
425 |
+
|
426 |
+
#: includes/i18n.php:265
|
427 |
+
msgid "Secret Key"
|
428 |
+
msgstr "Privat nøgle"
|
429 |
+
|
430 |
+
#: includes/i18n.php:267
|
431 |
+
msgctxt "as secret encryption key missing"
|
432 |
+
msgid "No Secret"
|
433 |
+
msgstr "Ingen privat nøgle"
|
434 |
+
|
435 |
+
#: includes/i18n.php:269
|
436 |
+
msgid "No ID"
|
437 |
+
msgstr "Intet ID"
|
438 |
+
|
439 |
+
#: includes/i18n.php:271
|
440 |
+
msgctxt "as synchronize license"
|
441 |
+
msgid "Sync License"
|
442 |
+
msgstr "Synkroniser licens"
|
443 |
+
|
444 |
+
#: includes/i18n.php:273
|
445 |
+
msgctxt "as synchronize"
|
446 |
+
msgid "Sync"
|
447 |
+
msgstr "Synkroniser"
|
448 |
+
|
449 |
+
#: includes/i18n.php:275
|
450 |
+
msgid "Activate License"
|
451 |
+
msgstr "Aktiver licens"
|
452 |
+
|
453 |
+
#: includes/i18n.php:277
|
454 |
+
msgid "Activate Free Version"
|
455 |
+
msgstr "Aktiver gratis version"
|
456 |
+
|
457 |
+
#: includes/i18n.php:279
|
458 |
+
msgid ""
|
459 |
+
"Please enter the license key that you received in the email right after the "
|
460 |
+
"purchase:"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: includes/i18n.php:283
|
464 |
+
msgid "Activating license..."
|
465 |
+
msgstr "Aktiverer licens..."
|
466 |
+
|
467 |
+
#: includes/i18n.php:285
|
468 |
+
msgid "Change License"
|
469 |
+
msgstr "Skift licens"
|
470 |
+
|
471 |
+
#: includes/i18n.php:287
|
472 |
+
msgid "Update License"
|
473 |
+
msgstr "Opdater licens"
|
474 |
+
|
475 |
+
#: includes/i18n.php:289
|
476 |
+
msgid "Deactivate License"
|
477 |
+
msgstr "Deaktiver licens"
|
478 |
+
|
479 |
+
#: includes/i18n.php:291
|
480 |
+
msgid "Activate"
|
481 |
+
msgstr "Aktiver"
|
482 |
+
|
483 |
+
#: includes/i18n.php:293
|
484 |
+
msgid "Deactivate"
|
485 |
+
msgstr "Deaktiver"
|
486 |
+
|
487 |
+
#: includes/i18n.php:295
|
488 |
+
msgid "Skip & Deactivate"
|
489 |
+
msgstr "Spring over & deaktiver"
|
490 |
+
|
491 |
+
#: includes/i18n.php:297
|
492 |
+
msgid "No - just deactivate"
|
493 |
+
msgstr "Nej - bare deaktiver"
|
494 |
+
|
495 |
+
#: includes/i18n.php:299
|
496 |
+
msgid "Yes - do your thing"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: includes/i18n.php:301
|
500 |
+
msgctxt "active mode"
|
501 |
+
msgid "Active"
|
502 |
+
msgstr "Aktiv"
|
503 |
+
|
504 |
+
#: includes/i18n.php:303
|
505 |
+
msgctxt "is active mode?"
|
506 |
+
msgid "Is Active"
|
507 |
+
msgstr "Er aktiv"
|
508 |
+
|
509 |
+
#: includes/i18n.php:305
|
510 |
+
msgid "Install Now"
|
511 |
+
msgstr "Installer nu"
|
512 |
+
|
513 |
+
#: includes/i18n.php:307
|
514 |
+
msgid "Install Update Now"
|
515 |
+
msgstr "Installer opdatering nu"
|
516 |
+
|
517 |
+
#: includes/i18n.php:309
|
518 |
+
msgid "More information about %s"
|
519 |
+
msgstr "Mere information om %s"
|
520 |
+
|
521 |
+
#: includes/i18n.php:311
|
522 |
+
msgid "Localhost"
|
523 |
+
msgstr "Localhost"
|
524 |
+
|
525 |
+
#: includes/i18n.php:313
|
526 |
+
msgctxt "as activate Professional plan"
|
527 |
+
msgid "Activate %s Plan"
|
528 |
+
msgstr "Aktiver plan %s"
|
529 |
+
|
530 |
+
#: includes/i18n.php:315
|
531 |
+
msgctxt "as 5 licenses left"
|
532 |
+
msgid "%s left"
|
533 |
+
msgstr "%s tilbage"
|
534 |
+
|
535 |
+
#: includes/i18n.php:317
|
536 |
+
msgid "Last license"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: includes/i18n.php:319
|
540 |
+
msgid "What is your %s?"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: includes/i18n.php:321
|
544 |
+
msgid "Activate this add-on"
|
545 |
+
msgstr "Aktiver denne tilføjelse"
|
546 |
+
|
547 |
+
#: includes/i18n.php:323
|
548 |
+
msgid ""
|
549 |
+
"Deactivating your license will block all premium features, but will enable "
|
550 |
+
"you to activate the license on another site. Are you sure you want to "
|
551 |
+
"proceed?"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: includes/i18n.php:327
|
555 |
+
msgid ""
|
556 |
+
"Deleting the account will automatically deactivate your %s plan license so "
|
557 |
+
"you can use it on other sites. If you want to terminate the recurring "
|
558 |
+
"payments as well, click the \"Cancel\" button, and first \"Downgrade\" your "
|
559 |
+
"account. Are you sure you would like to continue with the deletion?"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: includes/i18n.php:331
|
563 |
+
msgid ""
|
564 |
+
"Deletion is not temporary. Only delete if you no longer want to use this "
|
565 |
+
"plugin anymore. Are you sure you would like to continue with the deletion?"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: includes/i18n.php:335
|
569 |
+
msgid ""
|
570 |
+
"Downgrading your plan will immediately stop all future recurring payments "
|
571 |
+
"and your %s plan license will expire in %s."
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: includes/i18n.php:339
|
575 |
+
msgid ""
|
576 |
+
"Cancelling the trial will immediately block access to all premium features. "
|
577 |
+
"Are you sure?"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: includes/i18n.php:343
|
581 |
+
msgid ""
|
582 |
+
"You can still enjoy all %s features but you will not have access to plugin "
|
583 |
+
"updates and support."
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: includes/i18n.php:347
|
587 |
+
msgid ""
|
588 |
+
"Once your license expire you can still use the Free version but you will NOT"
|
589 |
+
" have access to the %s features."
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: includes/i18n.php:351
|
593 |
+
msgid "Are you sure you want to proceed?"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: includes/i18n.php:357
|
597 |
+
msgid "Add Ons for %s"
|
598 |
+
msgstr "Tilføjelser til %s"
|
599 |
+
|
600 |
+
#: includes/i18n.php:359
|
601 |
+
msgid ""
|
602 |
+
"We could'nt load the add-ons list. It's probably an issue on our side, "
|
603 |
+
"please try to come back in few minutes."
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: includes/i18n.php:365
|
607 |
+
msgid "Anonymous feedback"
|
608 |
+
msgstr "Anonym feedback"
|
609 |
+
|
610 |
+
#: includes/i18n.php:367
|
611 |
+
msgid "Quick feedback"
|
612 |
+
msgstr "Hurtig feedback"
|
613 |
+
|
614 |
+
#: includes/i18n.php:369
|
615 |
+
msgid "If you have a moment, please let us know why you are deactivating"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: includes/i18n.php:373
|
619 |
+
msgid "Yes - Deactivate"
|
620 |
+
msgstr "Ja - deaktiver"
|
621 |
+
|
622 |
+
#: includes/i18n.php:375
|
623 |
+
msgid "Submit & Deactivate"
|
624 |
+
msgstr "Send & deaktiver"
|
625 |
+
|
626 |
+
#: includes/i18n.php:377
|
627 |
+
msgid "Cancel"
|
628 |
+
msgstr "Annuller"
|
629 |
+
|
630 |
+
#: includes/i18n.php:379
|
631 |
+
msgid "I no longer need the plugin"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: includes/i18n.php:381
|
635 |
+
msgid "I found a better plugin"
|
636 |
+
msgstr "Jeg har fundet et bedre plugin"
|
637 |
+
|
638 |
+
#: includes/i18n.php:383
|
639 |
+
msgid "I only needed the plugin for a short period"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: includes/i18n.php:385
|
643 |
+
msgid "The plugin broke my site"
|
644 |
+
msgstr "Pluginnet ødelagde mit websted"
|
645 |
+
|
646 |
+
#: includes/i18n.php:387
|
647 |
+
msgid "The plugin suddenly stopped working"
|
648 |
+
msgstr "Pluginnet virker ikke længere"
|
649 |
+
|
650 |
+
#: includes/i18n.php:389
|
651 |
+
msgid "I can't pay for it anymore"
|
652 |
+
msgstr "Jeg kan ikke længere betale for det"
|
653 |
+
|
654 |
+
#: includes/i18n.php:391
|
655 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: includes/i18n.php:395
|
659 |
+
msgctxt ""
|
660 |
+
"the text of the \"other\" reason for deactivating the plugin that is shown "
|
661 |
+
"in the modal box."
|
662 |
+
msgid "Other"
|
663 |
+
msgstr "Andet"
|
664 |
+
|
665 |
+
#: includes/i18n.php:399
|
666 |
+
msgid "Kindly tell us the reason so we can improve."
|
667 |
+
msgstr ""
|
668 |
+
|
669 |
+
#: includes/i18n.php:401
|
670 |
+
msgid "What's the plugin's name?"
|
671 |
+
msgstr ""
|
672 |
+
|
673 |
+
#: includes/i18n.php:403
|
674 |
+
msgid "What price would you feel comfortable paying?"
|
675 |
+
msgstr ""
|
676 |
+
|
677 |
+
#: includes/i18n.php:405
|
678 |
+
msgid "I couldn't understand how to make it work"
|
679 |
+
msgstr ""
|
680 |
+
|
681 |
+
#: includes/i18n.php:407
|
682 |
+
msgid ""
|
683 |
+
"The plugin is great, but I need specific feature that you don't support"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: includes/i18n.php:411
|
687 |
+
msgid "The plugin is not working"
|
688 |
+
msgstr "Pluginnet virker ikke"
|
689 |
+
|
690 |
+
#: includes/i18n.php:413
|
691 |
+
msgid "It's not what I was looking for"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: includes/i18n.php:415
|
695 |
+
msgid "The plugin didn't work as expected"
|
696 |
+
msgstr ""
|
697 |
+
|
698 |
+
#: includes/i18n.php:417
|
699 |
+
msgid "What feature?"
|
700 |
+
msgstr ""
|
701 |
+
|
702 |
+
#: includes/i18n.php:419
|
703 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
704 |
+
msgstr ""
|
705 |
+
|
706 |
+
#: includes/i18n.php:423
|
707 |
+
msgid "What you've been looking for?"
|
708 |
+
msgstr ""
|
709 |
+
|
710 |
+
#: includes/i18n.php:425
|
711 |
+
msgid "What did you expect?"
|
712 |
+
msgstr "Hvad forventede du?"
|
713 |
+
|
714 |
+
#: includes/i18n.php:427
|
715 |
+
msgid "The plugin didn't work"
|
716 |
+
msgstr "Pluginnet virkede ikke"
|
717 |
+
|
718 |
+
#: includes/i18n.php:429
|
719 |
+
msgid "I don't like to share my information with you"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: includes/i18n.php:431
|
723 |
+
msgid ""
|
724 |
+
"You might have missed it, but you don't have to share any data and can just "
|
725 |
+
"%s the opt-in."
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#: includes/i18n.php:441
|
729 |
+
msgctxt "greeting"
|
730 |
+
msgid "Hey %s,"
|
731 |
+
msgstr "Hey %s,"
|
732 |
+
|
733 |
+
#: includes/i18n.php:443
|
734 |
+
msgctxt "a greeting. E.g. Thanks John!"
|
735 |
+
msgid "Thanks %s!"
|
736 |
+
msgstr "Tak %s!"
|
737 |
+
|
738 |
+
#: includes/i18n.php:445
|
739 |
+
msgid ""
|
740 |
+
"Never miss an important update - opt-in to our security and feature updates "
|
741 |
+
"notifications, and non-sensitive diagnostic tracking with %4$s."
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#: includes/i18n.php:449
|
745 |
+
msgid ""
|
746 |
+
"Please help us improve %1$s! If you opt-in, some data about your usage of "
|
747 |
+
"%1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still "
|
748 |
+
"work just fine."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/i18n.php:453
|
752 |
+
msgid ""
|
753 |
+
"You should receive an activation email for %s to your mailbox at %s. Please "
|
754 |
+
"make sure you click the activation button in that email to %s."
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: includes/i18n.php:455
|
758 |
+
msgid "complete the install"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: includes/i18n.php:457
|
762 |
+
msgid "start the trial"
|
763 |
+
msgstr ""
|
764 |
+
|
765 |
+
#: includes/i18n.php:459
|
766 |
+
msgid ""
|
767 |
+
"Thanks for purchasing %s! To get started, please enter your license key:"
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: includes/i18n.php:463
|
771 |
+
msgid ""
|
772 |
+
"The plugin will be periodically sending data to %s to check for plugin "
|
773 |
+
"updates and verify the validity of your license."
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: includes/i18n.php:467
|
777 |
+
msgid "What permissions are being granted?"
|
778 |
+
msgstr "Hvilke tilladelser bliver givet?"
|
779 |
+
|
780 |
+
#: includes/i18n.php:469
|
781 |
+
msgid "Your Profile Overview"
|
782 |
+
msgstr "Overblik af din profil"
|
783 |
+
|
784 |
+
#: includes/i18n.php:471
|
785 |
+
msgid "Name and email address"
|
786 |
+
msgstr "Navn og e-mailadresse"
|
787 |
+
|
788 |
+
#: includes/i18n.php:473
|
789 |
+
msgid "Your Site Overview"
|
790 |
+
msgstr "Overblik af dit websted"
|
791 |
+
|
792 |
+
#: includes/i18n.php:475
|
793 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
794 |
+
msgstr ""
|
795 |
+
|
796 |
+
#: includes/i18n.php:479
|
797 |
+
msgid "Current Plugin Events"
|
798 |
+
msgstr "Nuværende plugin-begivenheder"
|
799 |
+
|
800 |
+
#: includes/i18n.php:481
|
801 |
+
msgid "Activation, deactivation and uninstall"
|
802 |
+
msgstr "Aktivering, deaktivering og afinstallering"
|
803 |
+
|
804 |
+
#: includes/i18n.php:483
|
805 |
+
msgid "Plugins & Themes"
|
806 |
+
msgstr "Plugins & Temaer"
|
807 |
+
|
808 |
+
#: includes/i18n.php:485
|
809 |
+
msgid "Titles, versions and state."
|
810 |
+
msgstr "Titler, versioner og tilstand."
|
811 |
+
|
812 |
+
#: includes/i18n.php:487
|
813 |
+
msgid "Admin Notices"
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: includes/i18n.php:489
|
817 |
+
msgid "Newsletter"
|
818 |
+
msgstr "Nyhedsbrev"
|
819 |
+
|
820 |
+
#: includes/i18n.php:491
|
821 |
+
msgid "Updates, announcements, marketing, no spam"
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: includes/i18n.php:493
|
825 |
+
msgid "Privacy Policy"
|
826 |
+
msgstr "Privatlivspolitik"
|
827 |
+
|
828 |
+
#: includes/i18n.php:495
|
829 |
+
msgid "Terms of Service"
|
830 |
+
msgstr "Servicevilkår"
|
831 |
+
|
832 |
+
#: includes/i18n.php:497
|
833 |
+
msgctxt "as activating plugin"
|
834 |
+
msgid "Activating"
|
835 |
+
msgstr "Aktiverer"
|
836 |
+
|
837 |
+
#: includes/i18n.php:499
|
838 |
+
msgctxt "as in the process of sending an email"
|
839 |
+
msgid "Sending email"
|
840 |
+
msgstr "Sender e-mail"
|
841 |
+
|
842 |
+
#: includes/i18n.php:503
|
843 |
+
msgctxt "button label"
|
844 |
+
msgid "Allow & Continue"
|
845 |
+
msgstr "Tillad & Fortsæt"
|
846 |
+
|
847 |
+
#: includes/i18n.php:505
|
848 |
+
msgctxt "button label"
|
849 |
+
msgid "Agree & Activate License"
|
850 |
+
msgstr "Accepter & aktiver licens"
|
851 |
+
|
852 |
+
#: includes/i18n.php:507
|
853 |
+
msgctxt "verb"
|
854 |
+
msgid "Skip"
|
855 |
+
msgstr "Spring over"
|
856 |
+
|
857 |
+
#: includes/i18n.php:509
|
858 |
+
msgid "Click here to use the plugin anonymously"
|
859 |
+
msgstr "Klik her for at benytte pluginnet anonymt"
|
860 |
+
|
861 |
+
#: includes/i18n.php:511
|
862 |
+
msgid "Re-send activation email"
|
863 |
+
msgstr "Gensend e-mail om aktivering"
|
864 |
+
|
865 |
+
#: includes/i18n.php:513
|
866 |
+
msgid "License key"
|
867 |
+
msgstr "Licensnøgle"
|
868 |
+
|
869 |
+
#: includes/i18n.php:515
|
870 |
+
msgid "Send License Key"
|
871 |
+
msgstr "Send licensnøgle"
|
872 |
+
|
873 |
+
#: includes/i18n.php:517
|
874 |
+
msgid "Sending license key"
|
875 |
+
msgstr "Sender licensnøgle"
|
876 |
+
|
877 |
+
#: includes/i18n.php:519
|
878 |
+
msgid "Have a license key?"
|
879 |
+
msgstr "Har du en licensnøgle?"
|
880 |
+
|
881 |
+
#: includes/i18n.php:521
|
882 |
+
msgid "Don't have a license key?"
|
883 |
+
msgstr "Har du ikke en licensnøgle?"
|
884 |
+
|
885 |
+
#: includes/i18n.php:523
|
886 |
+
msgid "Can't find your license key?"
|
887 |
+
msgstr "Kan du ikke finde din licensnøgle?"
|
888 |
+
|
889 |
+
#: includes/i18n.php:525
|
890 |
+
msgid ""
|
891 |
+
"We couldn't find your email address in the system, are you sure it's the "
|
892 |
+
"right address?"
|
893 |
+
msgstr ""
|
894 |
+
|
895 |
+
#: includes/i18n.php:529
|
896 |
+
msgid ""
|
897 |
+
"We can't see any active licenses associated with that email address, are you"
|
898 |
+
" sure it's the right address?"
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: includes/i18n.php:533
|
902 |
+
msgid "Opt In"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: includes/i18n.php:535
|
906 |
+
msgid "Opt Out"
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: includes/i18n.php:537
|
910 |
+
msgid "On second thought - I want to continue helping"
|
911 |
+
msgstr ""
|
912 |
+
|
913 |
+
#: includes/i18n.php:541
|
914 |
+
msgid "Opting out..."
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: includes/i18n.php:543
|
918 |
+
msgid "Opting in..."
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: includes/i18n.php:545
|
922 |
+
msgid ""
|
923 |
+
"We appreciate your help in making the %s better by letting us track some "
|
924 |
+
"usage data."
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/i18n.php:549
|
928 |
+
msgid ""
|
929 |
+
"Usage tracking is done in the name of making %s better. Making a better user"
|
930 |
+
" experience, prioritizing new features, and more good things. We'd really "
|
931 |
+
"appreciate if you'll reconsider letting us continue with the tracking."
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: includes/i18n.php:553
|
935 |
+
msgid ""
|
936 |
+
"By clicking \"Opt Out\", we will no longer be sending any data from %s to "
|
937 |
+
"%s."
|
938 |
+
msgstr ""
|
939 |
+
|
940 |
+
#: includes/i18n.php:563
|
941 |
+
msgid "Screenshots"
|
942 |
+
msgstr "Skærmbilleder"
|
943 |
+
|
944 |
+
#: includes/i18n.php:565
|
945 |
+
msgid "Click to view full-size screenshot %d"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: includes/i18n.php:573
|
949 |
+
msgid "Freemius Debug"
|
950 |
+
msgstr "Freemius Debug"
|
951 |
+
|
952 |
+
#: includes/i18n.php:575
|
953 |
+
msgctxt "as turned on"
|
954 |
+
msgid "On"
|
955 |
+
msgstr "Til"
|
956 |
+
|
957 |
+
#: includes/i18n.php:577
|
958 |
+
msgctxt "as turned off"
|
959 |
+
msgid "Off"
|
960 |
+
msgstr "Fra"
|
961 |
+
|
962 |
+
#: includes/i18n.php:579
|
963 |
+
msgctxt "as code debugging"
|
964 |
+
msgid "Debugging"
|
965 |
+
msgstr "Fejlfinding"
|
966 |
+
|
967 |
+
#: includes/i18n.php:581
|
968 |
+
msgid "Freemius State"
|
969 |
+
msgstr "Freemius tilstand"
|
970 |
+
|
971 |
+
#: includes/i18n.php:583
|
972 |
+
msgctxt "as connection was successful"
|
973 |
+
msgid "Connected"
|
974 |
+
msgstr "Forbundet"
|
975 |
+
|
976 |
+
#: includes/i18n.php:585
|
977 |
+
msgctxt "as connection blocked"
|
978 |
+
msgid "Blocked"
|
979 |
+
msgstr "Blokeret"
|
980 |
+
|
981 |
+
#: includes/i18n.php:587
|
982 |
+
msgctxt "as application program interface"
|
983 |
+
msgid "API"
|
984 |
+
msgstr "API"
|
985 |
+
|
986 |
+
#: includes/i18n.php:589
|
987 |
+
msgctxt "as software development kit versions"
|
988 |
+
msgid "SDK"
|
989 |
+
msgstr "SDK"
|
990 |
+
|
991 |
+
#: includes/i18n.php:591
|
992 |
+
msgctxt "as software development kit versions"
|
993 |
+
msgid "SDK Versions"
|
994 |
+
msgstr "SDK-versioner"
|
995 |
+
|
996 |
+
#: includes/i18n.php:595
|
997 |
+
msgctxt "as plugin folder path"
|
998 |
+
msgid "Plugin Path"
|
999 |
+
msgstr "Plugin-sti"
|
1000 |
+
|
1001 |
+
#: includes/i18n.php:597
|
1002 |
+
msgctxt "as sdk path"
|
1003 |
+
msgid "SDK Path"
|
1004 |
+
msgstr "SDK-sti"
|
1005 |
+
|
1006 |
+
#: includes/i18n.php:599
|
1007 |
+
msgid "Add Ons of Plugin %s"
|
1008 |
+
msgstr "Tilføjelser til plugin %s"
|
1009 |
+
|
1010 |
+
#: includes/i18n.php:601
|
1011 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1012 |
+
msgstr ""
|
1013 |
+
|
1014 |
+
#: includes/i18n.php:605
|
1015 |
+
msgid "Actions"
|
1016 |
+
msgstr "Handlinger"
|
1017 |
+
|
1018 |
+
#: includes/i18n.php:607
|
1019 |
+
msgid "Delete All Accounts"
|
1020 |
+
msgstr "Slet alle konti"
|
1021 |
+
|
1022 |
+
#: includes/i18n.php:609
|
1023 |
+
msgid "Start Fresh"
|
1024 |
+
msgstr "Start forfra"
|
1025 |
+
|
1026 |
+
#: includes/i18n.php:611
|
1027 |
+
msgid "Clear API Cache"
|
1028 |
+
msgstr "Ryd API-cache"
|
1029 |
+
|
1030 |
+
#: includes/i18n.php:613
|
1031 |
+
msgid "Sync Data From Server"
|
1032 |
+
msgstr "Synkroniser data fra server"
|
1033 |
+
|
1034 |
+
#: includes/i18n.php:615
|
1035 |
+
msgid "Scheduled Crons"
|
1036 |
+
msgstr "Planlagte cron jobs"
|
1037 |
+
|
1038 |
+
#: includes/i18n.php:617
|
1039 |
+
msgid "Plugins & Themes Sync"
|
1040 |
+
msgstr "Synkronisering af plugins og temaer"
|
1041 |
+
|
1042 |
+
#: includes/i18n.php:625
|
1043 |
+
msgctxt "as congratulations"
|
1044 |
+
msgid "Congrats"
|
1045 |
+
msgstr "Tillykke"
|
1046 |
+
|
1047 |
+
#: includes/i18n.php:627
|
1048 |
+
msgctxt "exclamation"
|
1049 |
+
msgid "Oops"
|
1050 |
+
msgstr "Ups"
|
1051 |
+
|
1052 |
+
#: includes/i18n.php:629
|
1053 |
+
msgctxt "interjection expressing joy or exuberance"
|
1054 |
+
msgid "Yee-haw"
|
1055 |
+
msgstr ""
|
1056 |
+
|
1057 |
+
#: includes/i18n.php:633
|
1058 |
+
msgctxt ""
|
1059 |
+
"(especially in electronic communication) used to express elation, "
|
1060 |
+
"enthusiasm, or triumph."
|
1061 |
+
msgid "W00t"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: includes/i18n.php:637
|
1065 |
+
msgctxt "a positive response"
|
1066 |
+
msgid "Right on"
|
1067 |
+
msgstr "Sådan"
|
1068 |
+
|
1069 |
+
#: includes/i18n.php:639
|
1070 |
+
msgctxt ""
|
1071 |
+
"something somebody says when they are thinking about what you have just "
|
1072 |
+
"said. "
|
1073 |
+
msgid "Hmm"
|
1074 |
+
msgstr "Hmm"
|
1075 |
+
|
1076 |
+
#: includes/i18n.php:643
|
1077 |
+
msgid "O.K"
|
1078 |
+
msgstr "O.K"
|
1079 |
+
|
1080 |
+
#: includes/i18n.php:645
|
1081 |
+
msgctxt "exclamation"
|
1082 |
+
msgid "Hey"
|
1083 |
+
msgstr "Hey"
|
1084 |
+
|
1085 |
+
#: includes/i18n.php:647
|
1086 |
+
msgctxt "advance notice of something that will need attention."
|
1087 |
+
msgid "Heads up"
|
1088 |
+
msgstr "Se her"
|
1089 |
+
|
1090 |
+
#: includes/i18n.php:657
|
1091 |
+
msgid "Seems like you got the latest release."
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: includes/i18n.php:659
|
1095 |
+
msgid "You are all good!"
|
1096 |
+
msgstr "Det var det!"
|
1097 |
+
|
1098 |
+
#: includes/i18n.php:661
|
1099 |
+
msgid ""
|
1100 |
+
"Sorry, we could not complete the email update. Another user with the same "
|
1101 |
+
"email is already registered."
|
1102 |
+
msgstr ""
|
1103 |
+
|
1104 |
+
#: includes/i18n.php:665
|
1105 |
+
msgid ""
|
1106 |
+
"If you would like to give up the ownership of the plugin's account to %s "
|
1107 |
+
"click the Change Ownership button."
|
1108 |
+
msgstr ""
|
1109 |
+
|
1110 |
+
#: includes/i18n.php:669
|
1111 |
+
msgid ""
|
1112 |
+
"Your email was successfully updated. You should receive an email with "
|
1113 |
+
"confirmation instructions in few moments."
|
1114 |
+
msgstr ""
|
1115 |
+
|
1116 |
+
#: includes/i18n.php:673
|
1117 |
+
msgid "Your name was successfully updated."
|
1118 |
+
msgstr "Dit navn er blevet opdateret."
|
1119 |
+
|
1120 |
+
#: includes/i18n.php:675
|
1121 |
+
msgid "You have successfully updated your %s."
|
1122 |
+
msgstr "Opdatering af %s blev gennemført."
|
1123 |
+
|
1124 |
+
#: includes/i18n.php:677
|
1125 |
+
msgid "Please provide your full name."
|
1126 |
+
msgstr "Indtast venligst dit fulde navn."
|
1127 |
+
|
1128 |
+
#: includes/i18n.php:679
|
1129 |
+
msgid ""
|
1130 |
+
"Verification mail was just sent to %s. If you can't find it after 5 min, "
|
1131 |
+
"please check your spam box."
|
1132 |
+
msgstr ""
|
1133 |
+
|
1134 |
+
#: includes/i18n.php:683
|
1135 |
+
msgid ""
|
1136 |
+
"Just letting you know that the add-ons information of %s is being pulled "
|
1137 |
+
"from an external server."
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: includes/i18n.php:687
|
1141 |
+
msgid "No credit card required"
|
1142 |
+
msgstr "Betalingskort ikke påkrævet"
|
1143 |
+
|
1144 |
+
#: includes/i18n.php:689
|
1145 |
+
msgid "Premium plugin version was successfully activated."
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: includes/i18n.php:693
|
1149 |
+
msgid "The upgrade of %s was successfully completed."
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: includes/i18n.php:695
|
1153 |
+
msgid "Your account was successfully activated with the %s plan."
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: includes/i18n.php:699
|
1157 |
+
msgid "Download the latest %s version now"
|
1158 |
+
msgstr "Download den seneste version af %s nu"
|
1159 |
+
|
1160 |
+
#: includes/i18n.php:701
|
1161 |
+
msgid "Please follow these steps to complete the upgrade"
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: includes/i18n.php:705
|
1165 |
+
msgid "Download the latest %s version"
|
1166 |
+
msgstr "Download den seneste version af %s"
|
1167 |
+
|
1168 |
+
#: includes/i18n.php:707
|
1169 |
+
msgid "Deactivate the free version"
|
1170 |
+
msgstr "Deaktiver den gratis version"
|
1171 |
+
|
1172 |
+
#: includes/i18n.php:709
|
1173 |
+
msgid "Upload and activate the downloaded version"
|
1174 |
+
msgstr "Upload og aktiver den downloadede version"
|
1175 |
+
|
1176 |
+
#: includes/i18n.php:711
|
1177 |
+
msgid "How to upload and activate?"
|
1178 |
+
msgstr "Upload og aktivering, hvordan?"
|
1179 |
+
|
1180 |
+
#: includes/i18n.php:713
|
1181 |
+
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1182 |
+
msgid "%s Add-on was successfully purchased."
|
1183 |
+
msgstr "Betalingen for tilføjelsen %s blev gennemført."
|
1184 |
+
|
1185 |
+
#: includes/i18n.php:717
|
1186 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
1187 |
+
msgstr ""
|
1188 |
+
|
1189 |
+
#: includes/i18n.php:721
|
1190 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
1191 |
+
msgstr ""
|
1192 |
+
|
1193 |
+
#: includes/i18n.php:725
|
1194 |
+
msgid "Your plan was successfully upgraded."
|
1195 |
+
msgstr "Din plan er blevet opgraderet."
|
1196 |
+
|
1197 |
+
#: includes/i18n.php:727
|
1198 |
+
msgid "Your plan was successfully changed to %s."
|
1199 |
+
msgstr "Din plan er blevet ændret til %s."
|
1200 |
+
|
1201 |
+
#: includes/i18n.php:729
|
1202 |
+
msgid ""
|
1203 |
+
"Your license has expired. You can still continue using the free plugin "
|
1204 |
+
"forever."
|
1205 |
+
msgstr ""
|
1206 |
+
|
1207 |
+
#: includes/i18n.php:733
|
1208 |
+
msgid ""
|
1209 |
+
"Your license has been cancelled. If you think it's a mistake, please contact"
|
1210 |
+
" support."
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: includes/i18n.php:737
|
1214 |
+
msgid "Your trial has been successfully started."
|
1215 |
+
msgstr "Din prøveperiode er begyndt."
|
1216 |
+
|
1217 |
+
#: includes/i18n.php:739
|
1218 |
+
msgid "Your license was successfully activated."
|
1219 |
+
msgstr "Din licens er blevet aktiveret."
|
1220 |
+
|
1221 |
+
#: includes/i18n.php:741
|
1222 |
+
msgid "It looks like your site currently doesn't have an active license."
|
1223 |
+
msgstr "Det ser ud til, at dit websted endnu ikke har en aktiv licens."
|
1224 |
+
|
1225 |
+
#: includes/i18n.php:745
|
1226 |
+
msgid ""
|
1227 |
+
"Your license was successfully deactivated, you are back to the %s plan."
|
1228 |
+
msgstr ""
|
1229 |
+
|
1230 |
+
#: includes/i18n.php:749
|
1231 |
+
msgid "It looks like the license deactivation failed."
|
1232 |
+
msgstr "Det ser ud til, at licens-deaktiveringen mislykkedes."
|
1233 |
+
|
1234 |
+
#: includes/i18n.php:753
|
1235 |
+
msgid "It looks like the license could not be activated."
|
1236 |
+
msgstr "Det ser ud til, at licensen ikke kunne aktiveres."
|
1237 |
+
|
1238 |
+
#: includes/i18n.php:757
|
1239 |
+
msgid "Error received from the server:"
|
1240 |
+
msgstr "Fejl modtager fra serveren:"
|
1241 |
+
|
1242 |
+
#: includes/i18n.php:759
|
1243 |
+
msgid ""
|
1244 |
+
"Your trial has expired. You can still continue using all our free features."
|
1245 |
+
msgstr "Din prøveperiode er udløbet. Du kan fortsat bruge alle vores gratis funktioner."
|
1246 |
+
|
1247 |
+
#: includes/i18n.php:763
|
1248 |
+
msgid ""
|
1249 |
+
"Your plan was successfully downgraded. Your %s plan license will expire in "
|
1250 |
+
"%s."
|
1251 |
+
msgstr ""
|
1252 |
+
|
1253 |
+
#: includes/i18n.php:767
|
1254 |
+
msgid ""
|
1255 |
+
"Seems like we are having some temporary issue with your plan downgrade. "
|
1256 |
+
"Please try again in few minutes."
|
1257 |
+
msgstr ""
|
1258 |
+
|
1259 |
+
#: includes/i18n.php:771
|
1260 |
+
msgid ""
|
1261 |
+
"It looks like you are not in trial mode anymore so there's nothing to cancel"
|
1262 |
+
" :)"
|
1263 |
+
msgstr ""
|
1264 |
+
|
1265 |
+
#: includes/i18n.php:775
|
1266 |
+
msgid "Your %s free trial was successfully cancelled."
|
1267 |
+
msgstr ""
|
1268 |
+
|
1269 |
+
#: includes/i18n.php:779
|
1270 |
+
msgctxt "%s - numeric version number"
|
1271 |
+
msgid "Version %s was released."
|
1272 |
+
msgstr "Version %s er blevet udgivet."
|
1273 |
+
|
1274 |
+
#: includes/i18n.php:783
|
1275 |
+
msgid "Please download %s."
|
1276 |
+
msgstr "Download venligst %s."
|
1277 |
+
|
1278 |
+
#: includes/i18n.php:785
|
1279 |
+
msgctxt "%s - plan name, as the latest professional version here"
|
1280 |
+
msgid "the latest %s version here"
|
1281 |
+
msgstr "den seneste version af %s her"
|
1282 |
+
|
1283 |
+
#: includes/i18n.php:789
|
1284 |
+
msgid ""
|
1285 |
+
"How do you like %s so far? Test all our %s premium features with a %d-day "
|
1286 |
+
"free trial."
|
1287 |
+
msgstr ""
|
1288 |
+
|
1289 |
+
#: includes/i18n.php:793
|
1290 |
+
msgctxt "call to action"
|
1291 |
+
msgid "Start free trial"
|
1292 |
+
msgstr "Start gratis prøveperiode"
|
1293 |
+
|
1294 |
+
#: includes/i18n.php:795
|
1295 |
+
msgid "Starting trial"
|
1296 |
+
msgstr ""
|
1297 |
+
|
1298 |
+
#: includes/i18n.php:797
|
1299 |
+
msgid "Please wait"
|
1300 |
+
msgstr ""
|
1301 |
+
|
1302 |
+
#: includes/i18n.php:799
|
1303 |
+
msgid ""
|
1304 |
+
"Seems like we are having some temporary issue with your trial cancellation. "
|
1305 |
+
"Please try again in few minutes."
|
1306 |
+
msgstr ""
|
1307 |
+
|
1308 |
+
#: includes/i18n.php:803
|
1309 |
+
msgid "You already utilized a trial before."
|
1310 |
+
msgstr "Du har allerede brugt din prøveperiode."
|
1311 |
+
|
1312 |
+
#: includes/i18n.php:805
|
1313 |
+
msgid "You are already running the plugin in a trial mode."
|
1314 |
+
msgstr ""
|
1315 |
+
|
1316 |
+
#: includes/i18n.php:809
|
1317 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: includes/i18n.php:813
|
1321 |
+
msgid "Plan %s does not support a trial period."
|
1322 |
+
msgstr "Plan %s understøtter ikke en prøveperiode."
|
1323 |
+
|
1324 |
+
#: includes/i18n.php:815
|
1325 |
+
msgid "None of the plugin's plans supports a trial period."
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: includes/i18n.php:819
|
1329 |
+
msgid ""
|
1330 |
+
"Unexpected API error. Please contact the plugin's author with the following "
|
1331 |
+
"error."
|
1332 |
+
msgstr ""
|
1333 |
+
|
1334 |
+
#: includes/i18n.php:823
|
1335 |
+
msgid "No commitment for %s days - cancel anytime!"
|
1336 |
+
msgstr "Ingen bindinger i %s dage - annuller når som helst!"
|
1337 |
+
|
1338 |
+
#: includes/i18n.php:825
|
1339 |
+
msgid ""
|
1340 |
+
"Your license has expired. You can still continue using all the %s features, "
|
1341 |
+
"but you'll need to renew your license to continue getting updates and "
|
1342 |
+
"support."
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: includes/i18n.php:829
|
1346 |
+
msgid "Couldn't activate %s."
|
1347 |
+
msgstr "Kunne ikke aktivere %s."
|
1348 |
+
|
1349 |
+
#: includes/i18n.php:831
|
1350 |
+
msgid "Please contact us with the following message:"
|
1351 |
+
msgstr "Kontakt os venligst med følgende besked:"
|
1352 |
+
|
1353 |
+
#: includes/i18n.php:833
|
1354 |
+
msgid ""
|
1355 |
+
"It looks like you are still on the %s plan. If you did upgrade or change "
|
1356 |
+
"your plan, it's probably an issue on our side - sorry."
|
1357 |
+
msgstr ""
|
1358 |
+
|
1359 |
+
#: includes/i18n.php:837
|
1360 |
+
msgid "Please contact us here"
|
1361 |
+
msgstr "Kontakt os her"
|
1362 |
+
|
1363 |
+
#: includes/i18n.php:839
|
1364 |
+
msgid ""
|
1365 |
+
"I have upgraded my account but when I try to Sync the License, the plan "
|
1366 |
+
"remains %s."
|
1367 |
+
msgstr ""
|
1368 |
+
|
1369 |
+
#: includes/i18n.php:847
|
1370 |
+
msgid "From unknown reason, the API connectivity test failed."
|
1371 |
+
msgstr ""
|
1372 |
+
|
1373 |
+
#: includes/i18n.php:851
|
1374 |
+
msgid ""
|
1375 |
+
"It's probably a temporary issue on our end. Just to be sure, with your "
|
1376 |
+
"permission, would it be o.k to run another connectivity test?"
|
1377 |
+
msgstr ""
|
1378 |
+
|
1379 |
+
#: includes/i18n.php:855
|
1380 |
+
msgid ""
|
1381 |
+
"We use PHP cURL library for the API calls, which is a very common library "
|
1382 |
+
"and usually installed out of the box. Unfortunately, cURL is not installed "
|
1383 |
+
"on your server."
|
1384 |
+
msgstr ""
|
1385 |
+
|
1386 |
+
#: includes/i18n.php:859
|
1387 |
+
msgid ""
|
1388 |
+
"From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1389 |
+
msgstr ""
|
1390 |
+
|
1391 |
+
#: includes/i18n.php:863
|
1392 |
+
msgctxt "as pluginX requires an access to our API"
|
1393 |
+
msgid "%s requires an access to our API."
|
1394 |
+
msgstr ""
|
1395 |
+
|
1396 |
+
#: includes/i18n.php:867
|
1397 |
+
msgid ""
|
1398 |
+
"It looks like your server is using Squid ACL (access control lists), which "
|
1399 |
+
"blocks the connection."
|
1400 |
+
msgstr ""
|
1401 |
+
|
1402 |
+
#: includes/i18n.php:871
|
1403 |
+
msgid "I don't know what is Squid or ACL, help me!"
|
1404 |
+
msgstr ""
|
1405 |
+
|
1406 |
+
#: includes/i18n.php873, includes/i18n.php:887
|
1407 |
+
msgid ""
|
1408 |
+
"We'll make sure to contact your hosting company and resolve the issue. You "
|
1409 |
+
"will get a follow-up email to %s once we have an update."
|
1410 |
+
msgstr ""
|
1411 |
+
|
1412 |
+
#: includes/i18n.php:877
|
1413 |
+
msgid "I'm a system administrator"
|
1414 |
+
msgstr "Jeg er en system-administrator"
|
1415 |
+
|
1416 |
+
#: includes/i18n.php:879
|
1417 |
+
msgid ""
|
1418 |
+
"Great, please whitelist the following domains: %s. Once you done, deactivate"
|
1419 |
+
" the plugin and activate it again."
|
1420 |
+
msgstr ""
|
1421 |
+
|
1422 |
+
#: includes/i18n.php:883
|
1423 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
1424 |
+
msgstr ""
|
1425 |
+
|
1426 |
+
#: includes/i18n.php:891
|
1427 |
+
msgid ""
|
1428 |
+
"Great, please install cURL and enable it in your php.ini file. To make sure "
|
1429 |
+
"it was successfully activated, use 'phpinfo()'. Once activated, deactivate "
|
1430 |
+
"the plugin and reactivate it back again."
|
1431 |
+
msgstr ""
|
1432 |
+
|
1433 |
+
#: includes/i18n.php:895
|
1434 |
+
msgid ""
|
1435 |
+
"We are sure it's an issue on our side and more than happy to resolve it for "
|
1436 |
+
"you ASAP if you give us a chance."
|
1437 |
+
msgstr ""
|
1438 |
+
|
1439 |
+
#: includes/i18n.php:899
|
1440 |
+
msgid ""
|
1441 |
+
"Sorry for the inconvenience and we are here to help if you give us a chance."
|
1442 |
+
msgstr ""
|
1443 |
+
|
1444 |
+
#: includes/i18n.php:903
|
1445 |
+
msgid "Yes - I'm giving you a chance to fix it"
|
1446 |
+
msgstr "Ja - jeg giver jer en chance for at rette det"
|
1447 |
+
|
1448 |
+
#: includes/i18n.php:905
|
1449 |
+
msgid ""
|
1450 |
+
"We will do our best to whitelist your server and resolve this issue ASAP. "
|
1451 |
+
"You will get a follow-up email to %s once we have an update."
|
1452 |
+
msgstr ""
|
1453 |
+
|
1454 |
+
#: includes/i18n.php:909
|
1455 |
+
msgid "Let's try your previous version"
|
1456 |
+
msgstr "Lad os prøve din forrige version"
|
1457 |
+
|
1458 |
+
#: includes/i18n.php:911
|
1459 |
+
msgid "Uninstall this version and install the previous one."
|
1460 |
+
msgstr "Afinstaller denne version og installer den forrige."
|
1461 |
+
|
1462 |
+
#: includes/i18n.php:915
|
1463 |
+
msgid "That's exhausting, please deactivate"
|
1464 |
+
msgstr ""
|
1465 |
+
|
1466 |
+
#: includes/i18n.php:917
|
1467 |
+
msgid ""
|
1468 |
+
"We feel your frustration and sincerely apologize for the inconvenience. Hope"
|
1469 |
+
" to see you again in the future."
|
1470 |
+
msgstr ""
|
1471 |
+
|
1472 |
+
#: includes/i18n.php:921
|
1473 |
+
msgid ""
|
1474 |
+
"Thank for giving us the chance to fix it! A message was just sent to our "
|
1475 |
+
"technical staff. We will get back to you as soon as we have an update to %s."
|
1476 |
+
" Appreciate your patience."
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: includes/i18n.php:925
|
1480 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
1481 |
+
msgid ""
|
1482 |
+
"Your server is blocking the access to Freemius' API, which is crucial for "
|
1483 |
+
"%1s synchronization. Please contact your host to whitelist %2s"
|
1484 |
+
msgstr ""
|
1485 |
+
|
1486 |
+
#: includes/i18n.php:929
|
1487 |
+
msgid ""
|
1488 |
+
"It seems like one of the authentication parameters is wrong. Update your "
|
1489 |
+
"Public Key, Secret Key & User ID, and try again."
|
1490 |
+
msgstr ""
|
1491 |
+
|
1492 |
+
#: includes/i18n.php:937
|
1493 |
+
msgid ""
|
1494 |
+
"Please check your mailbox, you should receive an email via %s to confirm the"
|
1495 |
+
" ownership change. From security reasons, you must confirm the change within"
|
1496 |
+
" the next 15 min. If you cannot find the email, please check your spam "
|
1497 |
+
"folder."
|
1498 |
+
msgstr ""
|
1499 |
+
|
1500 |
+
#: includes/i18n.php:941
|
1501 |
+
msgid ""
|
1502 |
+
"Thanks for confirming the ownership change. An email was just sent to %s for"
|
1503 |
+
" final approval."
|
1504 |
+
msgstr ""
|
1505 |
+
|
1506 |
+
#: includes/i18n.php:945
|
1507 |
+
msgid "%s is the new owner of the account."
|
1508 |
+
msgstr "%s er den nye ejer af kontoen."
|
1509 |
+
|
1510 |
+
#: includes/i18n.php:949
|
1511 |
+
msgctxt "addonX cannot run without pluginY"
|
1512 |
+
msgid "%s cannot run without %s."
|
1513 |
+
msgstr "%s virker ikke uden %s."
|
1514 |
+
|
1515 |
+
#: includes/i18n.php:953
|
1516 |
+
msgctxt "addonX cannot run..."
|
1517 |
+
msgid "%s cannot run without the plugin."
|
1518 |
+
msgstr "%s virker ikke uden pluginnet."
|
1519 |
+
|
1520 |
+
#: includes/i18n.php:957
|
1521 |
+
msgctxt "pluginX activation was successfully..."
|
1522 |
+
msgid "%s activation was successfully completed."
|
1523 |
+
msgstr "Aktivering af %s blev gennemført."
|
1524 |
+
|
1525 |
+
#: includes/i18n.php:961
|
1526 |
+
msgctxt "Plugin installer section title"
|
1527 |
+
msgid "Features & Pricing"
|
1528 |
+
msgstr "Funktioner og priser"
|
1529 |
+
|
1530 |
+
#: includes/i18n.php:965
|
1531 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1532 |
+
msgstr ""
|
1533 |
+
|
1534 |
+
#: includes/i18n.php:969
|
1535 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1536 |
+
msgstr ""
|
1537 |
+
|
1538 |
+
#: includes/i18n.php:977
|
1539 |
+
msgid ""
|
1540 |
+
"%s is a premium only add-on. You have to purchase a license first before "
|
1541 |
+
"activating the plugin."
|
1542 |
+
msgstr ""
|
1543 |
+
|
1544 |
+
#: includes/i18n.php:981
|
1545 |
+
msgid ""
|
1546 |
+
"%s free trial was successfully cancelled. Since the add-on is premium only "
|
1547 |
+
"it was automatically deactivated. If you like to use it in the future, "
|
1548 |
+
"you'll have to purchase a license."
|
1549 |
+
msgstr ""
|
1550 |
+
|
1551 |
+
#: includes/i18n.php:993
|
1552 |
+
msgctxt "as every month"
|
1553 |
+
msgid "Monthly"
|
1554 |
+
msgstr "Månedligt"
|
1555 |
+
|
1556 |
+
#: includes/i18n.php:995
|
1557 |
+
msgctxt "as monthly period"
|
1558 |
+
msgid "mo"
|
1559 |
+
msgstr "md"
|
1560 |
+
|
1561 |
+
#: includes/i18n.php:997
|
1562 |
+
msgctxt "as once a year"
|
1563 |
+
msgid "Annual"
|
1564 |
+
msgstr "Årligt"
|
1565 |
+
|
1566 |
+
#: includes/i18n.php:999
|
1567 |
+
msgctxt "as once a year"
|
1568 |
+
msgid "Annually"
|
1569 |
+
msgstr "Årligt"
|
1570 |
+
|
1571 |
+
#: includes/i18n.php:1001
|
1572 |
+
msgctxt "as once a year"
|
1573 |
+
msgid "Once"
|
1574 |
+
msgstr "Engangsbeløb"
|
1575 |
+
|
1576 |
+
#: includes/i18n.php:1003
|
1577 |
+
msgctxt "as annual period"
|
1578 |
+
msgid "year"
|
1579 |
+
msgstr "år"
|
1580 |
+
|
1581 |
+
#: includes/i18n.php:1005
|
1582 |
+
msgid "Lifetime"
|
1583 |
+
msgstr ""
|
1584 |
+
|
1585 |
+
#: includes/i18n.php:1007
|
1586 |
+
msgctxt "e.g. the best product"
|
1587 |
+
msgid "Best"
|
1588 |
+
msgstr "Bedste"
|
1589 |
+
|
1590 |
+
#: includes/i18n.php:1009
|
1591 |
+
msgctxt "e.g. billed monthly"
|
1592 |
+
msgid "Billed %s"
|
1593 |
+
msgstr ""
|
1594 |
+
|
1595 |
+
#: includes/i18n.php:1011
|
1596 |
+
msgctxt "as a discount of $5 or 10%"
|
1597 |
+
msgid "Save %s"
|
1598 |
+
msgstr "Spar %s"
|
1599 |
+
|
1600 |
+
#: includes/i18n.php:1015
|
1601 |
+
msgid "View details"
|
1602 |
+
msgstr "Vis detaljer"
|
1603 |
+
|
1604 |
+
#: includes/i18n.php:1023
|
1605 |
+
msgctxt "button label"
|
1606 |
+
msgid "Approve & Start Trial"
|
1607 |
+
msgstr ""
|
1608 |
+
|
1609 |
+
#: includes/i18n.php:1027
|
1610 |
+
msgid ""
|
1611 |
+
"You are 1-click away from starting your %1$s-day free trial of the %2$s "
|
1612 |
+
"plan."
|
1613 |
+
msgstr ""
|
1614 |
+
|
1615 |
+
#: includes/i18n.php:1031
|
1616 |
+
msgid ""
|
1617 |
+
"For compliance with the WordPress.org guidelines, before we start the trial "
|
1618 |
+
"we ask that you opt-in with your user and non-sensitive site information, "
|
1619 |
+
"allowing the plugin to periodically send data to %s to check for version "
|
1620 |
+
"updates and to validate your trial."
|
1621 |
+
msgstr ""
|
1622 |
+
|
1623 |
+
#: includes/i18n.php:1043
|
1624 |
+
msgid "Business name"
|
1625 |
+
msgstr ""
|
1626 |
+
|
1627 |
+
#: includes/i18n.php:1045
|
1628 |
+
msgid "Tax / VAT ID"
|
1629 |
+
msgstr ""
|
1630 |
+
|
1631 |
+
#: includes/i18n.php:1047
|
1632 |
+
msgid "Address Line %d"
|
1633 |
+
msgstr ""
|
1634 |
+
|
1635 |
+
#: includes/i18n.php:1049
|
1636 |
+
msgid "Country"
|
1637 |
+
msgstr ""
|
1638 |
+
|
1639 |
+
#: includes/i18n.php:1051
|
1640 |
+
msgid "Select Country"
|
1641 |
+
msgstr ""
|
1642 |
+
|
1643 |
+
#: includes/i18n.php:1053
|
1644 |
+
msgid "City"
|
1645 |
+
msgstr ""
|
1646 |
+
|
1647 |
+
#: includes/i18n.php:1055
|
1648 |
+
msgid "Town"
|
1649 |
+
msgstr ""
|
1650 |
+
|
1651 |
+
#: includes/i18n.php:1057
|
1652 |
+
msgid "State"
|
1653 |
+
msgstr ""
|
1654 |
+
|
1655 |
+
#: includes/i18n.php:1059
|
1656 |
+
msgid "Province"
|
1657 |
+
msgstr ""
|
1658 |
+
|
1659 |
+
#: includes/i18n.php:1061
|
1660 |
+
msgid "ZIP / Postal Code"
|
1661 |
+
msgstr ""
|
lib/freemius/languages/freemius-en.mo
ADDED
Binary file
|
lib/freemius/languages/freemius-en.po
ADDED
@@ -0,0 +1,1522 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: \n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language: \n"
|
9 |
+
"Language-Team: \n"
|
10 |
+
"Content-Type: \n"
|
11 |
+
"Content-Transfer-Encoding: \n"
|
12 |
+
"Plural-Forms: \n"
|
13 |
+
|
14 |
+
# Copyright (C) 2016 freemius
|
15 |
+
# This file is distributed under the same license as the freemius package.
|
16 |
+
#: includes/i18n.php:41, includes/i18n.php:55
|
17 |
+
msgid "Yes - I'm in!"
|
18 |
+
msgstr "Yes - I'm in!"
|
19 |
+
|
20 |
+
#: includes/i18n.php:43, includes/i18n.php:57
|
21 |
+
msgid "Not today"
|
22 |
+
msgstr "Not today"
|
23 |
+
|
24 |
+
#: includes/i18n.php:69
|
25 |
+
msgid "Account"
|
26 |
+
msgstr "Account"
|
27 |
+
|
28 |
+
#: includes/i18n.php:71
|
29 |
+
msgid "Add On"
|
30 |
+
msgstr "Add On"
|
31 |
+
|
32 |
+
#: includes/i18n.php:73
|
33 |
+
msgid "Contact Us"
|
34 |
+
msgstr "Contact Us"
|
35 |
+
|
36 |
+
#: includes/i18n.php:75
|
37 |
+
msgid "Contact Support"
|
38 |
+
msgstr "Contact Support"
|
39 |
+
|
40 |
+
#: includes/i18n.php:77
|
41 |
+
msgid "Change Ownership"
|
42 |
+
msgstr "Change Ownership"
|
43 |
+
|
44 |
+
#: includes/i18n.php:79
|
45 |
+
msgid "Support"
|
46 |
+
msgstr "Support"
|
47 |
+
|
48 |
+
#: includes/i18n.php:81
|
49 |
+
msgid "Support Forum"
|
50 |
+
msgstr "Support Forum"
|
51 |
+
|
52 |
+
#: includes/i18n.php:83
|
53 |
+
msgid "Add Ons"
|
54 |
+
msgstr "Add Ons"
|
55 |
+
|
56 |
+
#: includes/i18n.php:85
|
57 |
+
msgctxt "verb"
|
58 |
+
msgid "Upgrade"
|
59 |
+
msgstr "Upgrade"
|
60 |
+
|
61 |
+
#: includes/i18n.php:87
|
62 |
+
msgid "Awesome"
|
63 |
+
msgstr "Awesome"
|
64 |
+
|
65 |
+
#: includes/i18n.php:89
|
66 |
+
msgctxt "noun"
|
67 |
+
msgid "Pricing"
|
68 |
+
msgstr "Pricing"
|
69 |
+
|
70 |
+
#: includes/i18n.php:91
|
71 |
+
msgctxt "noun"
|
72 |
+
msgid "Price"
|
73 |
+
msgstr "Price"
|
74 |
+
|
75 |
+
#: includes/i18n.php:93
|
76 |
+
msgid "Unlimited Updates"
|
77 |
+
msgstr "Unlimited Updates"
|
78 |
+
|
79 |
+
#: includes/i18n.php:95
|
80 |
+
msgctxt "verb"
|
81 |
+
msgid "Downgrade"
|
82 |
+
msgstr "Downgrade"
|
83 |
+
|
84 |
+
#: includes/i18n.php:97
|
85 |
+
msgid "Cancel Trial"
|
86 |
+
msgstr "Cancel Trial"
|
87 |
+
|
88 |
+
#: includes/i18n.php:99
|
89 |
+
msgid "Free Trial"
|
90 |
+
msgstr "Free Trial"
|
91 |
+
|
92 |
+
#: includes/i18n.php:101
|
93 |
+
msgid "Start my free %s"
|
94 |
+
msgstr "Start my free %s"
|
95 |
+
|
96 |
+
#: includes/i18n.php:103
|
97 |
+
msgid "No commitment for %s - cancel anytime"
|
98 |
+
msgstr "No commitment for %s - cancel anytime"
|
99 |
+
|
100 |
+
#: includes/i18n.php:105
|
101 |
+
msgid "After your free %s, pay as little as %s"
|
102 |
+
msgstr "After your free %s, pay as little as %s"
|
103 |
+
|
104 |
+
#: includes/i18n.php:107
|
105 |
+
msgid "Details"
|
106 |
+
msgstr "Details"
|
107 |
+
|
108 |
+
#: includes/i18n.php:109
|
109 |
+
msgid "Account Details"
|
110 |
+
msgstr "Account Details"
|
111 |
+
|
112 |
+
#: includes/i18n.php:111
|
113 |
+
msgctxt "verb"
|
114 |
+
msgid "Delete"
|
115 |
+
msgstr "Delete"
|
116 |
+
|
117 |
+
#: includes/i18n.php:113
|
118 |
+
msgctxt "verb"
|
119 |
+
msgid "Show"
|
120 |
+
msgstr "Show"
|
121 |
+
|
122 |
+
#: includes/i18n.php:115
|
123 |
+
msgctxt "verb"
|
124 |
+
msgid "Hide"
|
125 |
+
msgstr "Hide"
|
126 |
+
|
127 |
+
#: includes/i18n.php:117
|
128 |
+
msgctxt "verb"
|
129 |
+
msgid "Edit"
|
130 |
+
msgstr "Edit"
|
131 |
+
|
132 |
+
#: includes/i18n.php:119
|
133 |
+
msgctxt "verb"
|
134 |
+
msgid "Update"
|
135 |
+
msgstr "Update"
|
136 |
+
|
137 |
+
#: includes/i18n.php:121
|
138 |
+
msgid "Date"
|
139 |
+
msgstr "Date"
|
140 |
+
|
141 |
+
#: includes/i18n.php:123
|
142 |
+
msgid "Amount"
|
143 |
+
msgstr "Amount"
|
144 |
+
|
145 |
+
#: includes/i18n.php:125
|
146 |
+
msgid "Invoice"
|
147 |
+
msgstr "Invoice"
|
148 |
+
|
149 |
+
#: includes/i18n.php:127
|
150 |
+
msgid "Billing"
|
151 |
+
msgstr "Billing"
|
152 |
+
|
153 |
+
#: includes/i18n.php:129
|
154 |
+
msgid "Payments"
|
155 |
+
msgstr "Payments"
|
156 |
+
|
157 |
+
#: includes/i18n.php:131
|
158 |
+
msgid "Delete Account"
|
159 |
+
msgstr "Delete Account"
|
160 |
+
|
161 |
+
#: includes/i18n.php:133
|
162 |
+
msgctxt "as close a window"
|
163 |
+
msgid "Dismiss"
|
164 |
+
msgstr "Dismiss"
|
165 |
+
|
166 |
+
#: includes/i18n.php:135
|
167 |
+
msgctxt "as product pricing plan"
|
168 |
+
msgid "Plan"
|
169 |
+
msgstr "Plan"
|
170 |
+
|
171 |
+
#: includes/i18n.php:137
|
172 |
+
msgid "Change Plan"
|
173 |
+
msgstr "Change Plan"
|
174 |
+
|
175 |
+
#: includes/i18n.php:139
|
176 |
+
msgctxt "as download professional version"
|
177 |
+
msgid "Download %s Version"
|
178 |
+
msgstr "Download %s Version"
|
179 |
+
|
180 |
+
#: includes/i18n.php:141
|
181 |
+
msgctxt "as download professional version now"
|
182 |
+
msgid "Download %s version now"
|
183 |
+
msgstr "Download %s version now"
|
184 |
+
|
185 |
+
#: includes/i18n.php:145
|
186 |
+
msgctxt "as download latest version"
|
187 |
+
msgid "Download Latest"
|
188 |
+
msgstr "Download Latest"
|
189 |
+
|
190 |
+
#: includes/i18n.php:147
|
191 |
+
msgctxt "E.g. you have a professional license."
|
192 |
+
msgid "You have a %s license."
|
193 |
+
msgstr "You have a %s license."
|
194 |
+
|
195 |
+
#: includes/i18n.php:151
|
196 |
+
msgid "New"
|
197 |
+
msgstr "New"
|
198 |
+
|
199 |
+
#: includes/i18n.php:153
|
200 |
+
msgid "Free"
|
201 |
+
msgstr "Free"
|
202 |
+
|
203 |
+
#: includes/i18n.php:155
|
204 |
+
msgctxt "as trial plan"
|
205 |
+
msgid "Trial"
|
206 |
+
msgstr "Trial"
|
207 |
+
|
208 |
+
#: includes/i18n.php:157
|
209 |
+
msgctxt "as starting a trial plan"
|
210 |
+
msgid "Start Trial"
|
211 |
+
msgstr "Start Trial"
|
212 |
+
|
213 |
+
#: includes/i18n.php:159
|
214 |
+
msgctxt "verb"
|
215 |
+
msgid "Purchase"
|
216 |
+
msgstr "Purchase"
|
217 |
+
|
218 |
+
#: includes/i18n.php:161
|
219 |
+
msgid "Purchase License"
|
220 |
+
msgstr "Purchase License"
|
221 |
+
|
222 |
+
#: includes/i18n.php:163
|
223 |
+
msgctxt "verb"
|
224 |
+
msgid "Buy"
|
225 |
+
msgstr "Buy"
|
226 |
+
|
227 |
+
#: includes/i18n.php:165
|
228 |
+
msgid "Buy License"
|
229 |
+
msgstr "Buy License"
|
230 |
+
|
231 |
+
#: includes/i18n.php:167
|
232 |
+
msgid "Single Site License"
|
233 |
+
msgstr "Single Site License"
|
234 |
+
|
235 |
+
#: includes/i18n.php:169
|
236 |
+
msgid "Unlimited Licenses"
|
237 |
+
msgstr "Unlimited Licenses"
|
238 |
+
|
239 |
+
#: includes/i18n.php:171
|
240 |
+
msgid "Up to %s Sites"
|
241 |
+
msgstr "Up to %s Sites"
|
242 |
+
|
243 |
+
#: includes/i18n.php:173
|
244 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
245 |
+
msgstr "%sRenew your license now%s to access version %s features and support."
|
246 |
+
|
247 |
+
#: includes/i18n.php:177
|
248 |
+
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
249 |
+
msgstr "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
250 |
+
|
251 |
+
#: includes/i18n.php:181
|
252 |
+
msgctxt "e.g. Professional Plan"
|
253 |
+
msgid "%s Plan"
|
254 |
+
msgstr "%s Plan"
|
255 |
+
|
256 |
+
#: includes/i18n.php:183
|
257 |
+
msgid "You are just one step away - %s"
|
258 |
+
msgstr "You are just one step away - %s"
|
259 |
+
|
260 |
+
#: includes/i18n.php:185
|
261 |
+
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
262 |
+
msgid "Complete \"%s\" Activation Now"
|
263 |
+
msgstr "Complete \"%s\" Activation Now"
|
264 |
+
|
265 |
+
#: includes/i18n.php:189
|
266 |
+
msgid "We made a few tweaks to the plugin, %s"
|
267 |
+
msgstr "We made a few tweaks to the plugin, %s"
|
268 |
+
|
269 |
+
#: includes/i18n.php:191
|
270 |
+
msgid "Opt-in to make \"%s\" Better!"
|
271 |
+
msgstr "Opt-in to make \"%s\" Better!"
|
272 |
+
|
273 |
+
#: includes/i18n.php:193
|
274 |
+
msgid "Error"
|
275 |
+
msgstr "Error"
|
276 |
+
|
277 |
+
#: includes/i18n.php:195
|
278 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
279 |
+
msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
280 |
+
|
281 |
+
#: includes/i18n.php:203
|
282 |
+
msgctxt "as expiration date"
|
283 |
+
msgid "Expiration"
|
284 |
+
msgstr "Expiration"
|
285 |
+
|
286 |
+
#: includes/i18n.php:205
|
287 |
+
msgctxt "as software license"
|
288 |
+
msgid "License"
|
289 |
+
msgstr "License"
|
290 |
+
|
291 |
+
#: includes/i18n.php:207
|
292 |
+
msgid "not verified"
|
293 |
+
msgstr "not verified"
|
294 |
+
|
295 |
+
#: includes/i18n.php:209
|
296 |
+
msgid "Verify Email"
|
297 |
+
msgstr "Verify Email"
|
298 |
+
|
299 |
+
#: includes/i18n.php:211
|
300 |
+
msgctxt "e.g. expires in 2 months"
|
301 |
+
msgid "Expires in %s"
|
302 |
+
msgstr "Expires in %s"
|
303 |
+
|
304 |
+
#: includes/i18n.php:213
|
305 |
+
msgctxt "e.g. auto renews in 2 months"
|
306 |
+
msgid "Auto renews in %s"
|
307 |
+
msgstr "Auto renews in %s"
|
308 |
+
|
309 |
+
#: includes/i18n.php:215
|
310 |
+
msgid "No expiration"
|
311 |
+
msgstr "No expiration"
|
312 |
+
|
313 |
+
#: includes/i18n.php:217
|
314 |
+
msgid "Expired"
|
315 |
+
msgstr "Expired"
|
316 |
+
|
317 |
+
#: includes/i18n.php:219
|
318 |
+
msgid "Cancelled"
|
319 |
+
msgstr "Cancelled"
|
320 |
+
|
321 |
+
#: includes/i18n.php:221
|
322 |
+
msgctxt "e.g. In 2 hours"
|
323 |
+
msgid "In %s"
|
324 |
+
msgstr "In %s"
|
325 |
+
|
326 |
+
#: includes/i18n.php:223
|
327 |
+
msgctxt "e.g. 2 min ago"
|
328 |
+
msgid "%s ago"
|
329 |
+
msgstr "%s ago"
|
330 |
+
|
331 |
+
#: includes/i18n.php:225
|
332 |
+
msgctxt "as plugin version"
|
333 |
+
msgid "Version"
|
334 |
+
msgstr "Version"
|
335 |
+
|
336 |
+
#: includes/i18n.php:227
|
337 |
+
msgid "Name"
|
338 |
+
msgstr "Name"
|
339 |
+
|
340 |
+
#: includes/i18n.php:229
|
341 |
+
msgid "Email"
|
342 |
+
msgstr "Email"
|
343 |
+
|
344 |
+
#: includes/i18n.php:231
|
345 |
+
msgid "Email address"
|
346 |
+
msgstr "Email address"
|
347 |
+
|
348 |
+
#: includes/i18n.php:233
|
349 |
+
msgid "Verified"
|
350 |
+
msgstr "Verified"
|
351 |
+
|
352 |
+
#: includes/i18n.php:235
|
353 |
+
msgid "Plugin"
|
354 |
+
msgstr "Plugin"
|
355 |
+
|
356 |
+
#: includes/i18n.php:237
|
357 |
+
msgid "Plugins"
|
358 |
+
msgstr "Plugins"
|
359 |
+
|
360 |
+
#: includes/i18n.php:239
|
361 |
+
msgid "Themes"
|
362 |
+
msgstr "Themes"
|
363 |
+
|
364 |
+
#: includes/i18n.php:241
|
365 |
+
msgctxt "as file/folder path"
|
366 |
+
msgid "Path"
|
367 |
+
msgstr "Path"
|
368 |
+
|
369 |
+
#: includes/i18n.php:243
|
370 |
+
msgid "Title"
|
371 |
+
msgstr "Title"
|
372 |
+
|
373 |
+
#: includes/i18n.php:245
|
374 |
+
msgid "Free version"
|
375 |
+
msgstr "Free version"
|
376 |
+
|
377 |
+
#: includes/i18n.php:247
|
378 |
+
msgid "Premium version"
|
379 |
+
msgstr "Premium version"
|
380 |
+
|
381 |
+
#: includes/i18n.php:249
|
382 |
+
msgctxt "as WP plugin slug"
|
383 |
+
msgid "Slug"
|
384 |
+
msgstr "Slug"
|
385 |
+
|
386 |
+
#: includes/i18n.php:251
|
387 |
+
msgid "ID"
|
388 |
+
msgstr "ID"
|
389 |
+
|
390 |
+
#: includes/i18n.php:253
|
391 |
+
msgid "Users"
|
392 |
+
msgstr "Users"
|
393 |
+
|
394 |
+
#: includes/i18n.php:255
|
395 |
+
msgid "Plugin Installs"
|
396 |
+
msgstr "Plugin Installs"
|
397 |
+
|
398 |
+
#: includes/i18n.php:257
|
399 |
+
msgctxt "like websites"
|
400 |
+
msgid "Sites"
|
401 |
+
msgstr "Sites"
|
402 |
+
|
403 |
+
#: includes/i18n.php:259
|
404 |
+
msgid "User ID"
|
405 |
+
msgstr "User ID"
|
406 |
+
|
407 |
+
#: includes/i18n.php:261
|
408 |
+
msgid "Site ID"
|
409 |
+
msgstr "Site ID"
|
410 |
+
|
411 |
+
#: includes/i18n.php:263
|
412 |
+
msgid "Public Key"
|
413 |
+
msgstr "Public Key"
|
414 |
+
|
415 |
+
#: includes/i18n.php:265
|
416 |
+
msgid "Secret Key"
|
417 |
+
msgstr "Secret Key"
|
418 |
+
|
419 |
+
#: includes/i18n.php:267
|
420 |
+
msgctxt "as secret encryption key missing"
|
421 |
+
msgid "No Secret"
|
422 |
+
msgstr "No Secret"
|
423 |
+
|
424 |
+
#: includes/i18n.php:269
|
425 |
+
msgid "No ID"
|
426 |
+
msgstr "No ID"
|
427 |
+
|
428 |
+
#: includes/i18n.php:271
|
429 |
+
msgctxt "as synchronize license"
|
430 |
+
msgid "Sync License"
|
431 |
+
msgstr "Sync License"
|
432 |
+
|
433 |
+
#: includes/i18n.php:273
|
434 |
+
msgctxt "as synchronize"
|
435 |
+
msgid "Sync"
|
436 |
+
msgstr "Sync"
|
437 |
+
|
438 |
+
#: includes/i18n.php:275
|
439 |
+
msgid "Activate License"
|
440 |
+
msgstr "Activate License"
|
441 |
+
|
442 |
+
#: includes/i18n.php:277
|
443 |
+
msgid "Activate Free Version"
|
444 |
+
msgstr "Activate Free Version"
|
445 |
+
|
446 |
+
#: includes/i18n.php:279
|
447 |
+
msgid "Please enter the license key that you received in the email right after the purchase:"
|
448 |
+
msgstr "Please enter the license key that you received in the email right after the purchase:"
|
449 |
+
|
450 |
+
#: includes/i18n.php:283
|
451 |
+
msgid "Activating license..."
|
452 |
+
msgstr "Activating license..."
|
453 |
+
|
454 |
+
#: includes/i18n.php:285
|
455 |
+
msgid "Change License"
|
456 |
+
msgstr "Change License"
|
457 |
+
|
458 |
+
#: includes/i18n.php:287
|
459 |
+
msgid "Update License"
|
460 |
+
msgstr "Update License"
|
461 |
+
|
462 |
+
#: includes/i18n.php:289
|
463 |
+
msgid "Deactivate License"
|
464 |
+
msgstr "Deactivate License"
|
465 |
+
|
466 |
+
#: includes/i18n.php:291
|
467 |
+
msgid "Activate"
|
468 |
+
msgstr "Activate"
|
469 |
+
|
470 |
+
#: includes/i18n.php:293
|
471 |
+
msgid "Deactivate"
|
472 |
+
msgstr "Deactivate"
|
473 |
+
|
474 |
+
#: includes/i18n.php:295
|
475 |
+
msgid "Skip & Deactivate"
|
476 |
+
msgstr "Skip & Deactivate"
|
477 |
+
|
478 |
+
#: includes/i18n.php:297
|
479 |
+
msgid "No - just deactivate"
|
480 |
+
msgstr "No - just deactivate"
|
481 |
+
|
482 |
+
#: includes/i18n.php:299
|
483 |
+
msgid "Yes - do your thing"
|
484 |
+
msgstr "Yes - do your thing"
|
485 |
+
|
486 |
+
#: includes/i18n.php:301
|
487 |
+
msgctxt "active mode"
|
488 |
+
msgid "Active"
|
489 |
+
msgstr "Active"
|
490 |
+
|
491 |
+
#: includes/i18n.php:303
|
492 |
+
msgctxt "is active mode?"
|
493 |
+
msgid "Is Active"
|
494 |
+
msgstr "Is Active"
|
495 |
+
|
496 |
+
#: includes/i18n.php:305
|
497 |
+
msgid "Install Now"
|
498 |
+
msgstr "Install Now"
|
499 |
+
|
500 |
+
#: includes/i18n.php:307
|
501 |
+
msgid "Install Update Now"
|
502 |
+
msgstr "Install Update Now"
|
503 |
+
|
504 |
+
#: includes/i18n.php:309
|
505 |
+
msgid "More information about %s"
|
506 |
+
msgstr "More information about %s"
|
507 |
+
|
508 |
+
#: includes/i18n.php:311
|
509 |
+
msgid "Localhost"
|
510 |
+
msgstr "Localhost"
|
511 |
+
|
512 |
+
#: includes/i18n.php:313
|
513 |
+
msgctxt "as activate Professional plan"
|
514 |
+
msgid "Activate %s Plan"
|
515 |
+
msgstr "Activate %s Plan"
|
516 |
+
|
517 |
+
#: includes/i18n.php:315
|
518 |
+
msgctxt "as 5 licenses left"
|
519 |
+
msgid "%s left"
|
520 |
+
msgstr "%s left"
|
521 |
+
|
522 |
+
#: includes/i18n.php:317
|
523 |
+
msgid "Last license"
|
524 |
+
msgstr "Last license"
|
525 |
+
|
526 |
+
#: includes/i18n.php:319
|
527 |
+
msgid "What is your %s?"
|
528 |
+
msgstr "What is your %s?"
|
529 |
+
|
530 |
+
#: includes/i18n.php:321
|
531 |
+
msgid "Activate this add-on"
|
532 |
+
msgstr "Activate this add-on"
|
533 |
+
|
534 |
+
#: includes/i18n.php:323
|
535 |
+
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?"
|
536 |
+
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?"
|
537 |
+
|
538 |
+
#: includes/i18n.php:327
|
539 |
+
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?"
|
540 |
+
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?"
|
541 |
+
|
542 |
+
#: includes/i18n.php:331
|
543 |
+
msgid "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?"
|
544 |
+
msgstr "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?"
|
545 |
+
|
546 |
+
#: includes/i18n.php:335
|
547 |
+
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
548 |
+
msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
549 |
+
|
550 |
+
#: includes/i18n.php:339
|
551 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
552 |
+
msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
553 |
+
|
554 |
+
#: includes/i18n.php:343
|
555 |
+
msgid "You can still enjoy all %s features but you will not have access to plugin updates and support."
|
556 |
+
msgstr "You can still enjoy all %s features but you will not have access to plugin updates and support."
|
557 |
+
|
558 |
+
#: includes/i18n.php:347
|
559 |
+
msgid "Once your license expire you can still use the Free version but you will NOT have access to the %s features."
|
560 |
+
msgstr "Once your license expire you can still use the Free version but you will NOT have access to the %s features."
|
561 |
+
|
562 |
+
#: includes/i18n.php:351
|
563 |
+
msgid "Are you sure you want to proceed?"
|
564 |
+
msgstr "Are you sure you want to proceed?"
|
565 |
+
|
566 |
+
#: includes/i18n.php:357
|
567 |
+
msgid "Add Ons for %s"
|
568 |
+
msgstr "Add Ons for %s"
|
569 |
+
|
570 |
+
#: includes/i18n.php:359
|
571 |
+
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."
|
572 |
+
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."
|
573 |
+
|
574 |
+
#: includes/i18n.php:365
|
575 |
+
msgid "Anonymous feedback"
|
576 |
+
msgstr "Anonymous feedback"
|
577 |
+
|
578 |
+
#: includes/i18n.php:367
|
579 |
+
msgid "Quick feedback"
|
580 |
+
msgstr "Quick feedback"
|
581 |
+
|
582 |
+
#: includes/i18n.php:369
|
583 |
+
msgid "If you have a moment, please let us know why you are deactivating"
|
584 |
+
msgstr "If you have a moment, please let us know why you are deactivating"
|
585 |
+
|
586 |
+
#: includes/i18n.php:373
|
587 |
+
msgid "Yes - Deactivate"
|
588 |
+
msgstr "Yes - Deactivate"
|
589 |
+
|
590 |
+
#: includes/i18n.php:375
|
591 |
+
msgid "Submit & Deactivate"
|
592 |
+
msgstr "Submit & Deactivate"
|
593 |
+
|
594 |
+
#: includes/i18n.php:377
|
595 |
+
msgid "Cancel"
|
596 |
+
msgstr "Cancel"
|
597 |
+
|
598 |
+
#: includes/i18n.php:379
|
599 |
+
msgid "I no longer need the plugin"
|
600 |
+
msgstr "I no longer need the plugin"
|
601 |
+
|
602 |
+
#: includes/i18n.php:381
|
603 |
+
msgid "I found a better plugin"
|
604 |
+
msgstr "I found a better plugin"
|
605 |
+
|
606 |
+
#: includes/i18n.php:383
|
607 |
+
msgid "I only needed the plugin for a short period"
|
608 |
+
msgstr "I only needed the plugin for a short period"
|
609 |
+
|
610 |
+
#: includes/i18n.php:385
|
611 |
+
msgid "The plugin broke my site"
|
612 |
+
msgstr "The plugin broke my site"
|
613 |
+
|
614 |
+
#: includes/i18n.php:387
|
615 |
+
msgid "The plugin suddenly stopped working"
|
616 |
+
msgstr "The plugin suddenly stopped working"
|
617 |
+
|
618 |
+
#: includes/i18n.php:389
|
619 |
+
msgid "I can't pay for it anymore"
|
620 |
+
msgstr "I can't pay for it anymore"
|
621 |
+
|
622 |
+
#: includes/i18n.php:391
|
623 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
624 |
+
msgstr "It's a temporary deactivation. I'm just debugging an issue."
|
625 |
+
|
626 |
+
#: includes/i18n.php:395
|
627 |
+
msgctxt "the text of the \"other\" reason for deactivating the plugin that is shown in the modal box."
|
628 |
+
msgid "Other"
|
629 |
+
msgstr "Other"
|
630 |
+
|
631 |
+
#: includes/i18n.php:399
|
632 |
+
msgid "Kindly tell us the reason so we can improve."
|
633 |
+
msgstr "Kindly tell us the reason so we can improve."
|
634 |
+
|
635 |
+
#: includes/i18n.php:401
|
636 |
+
msgid "What's the plugin's name?"
|
637 |
+
msgstr "What's the plugin's name?"
|
638 |
+
|
639 |
+
#: includes/i18n.php:403
|
640 |
+
msgid "What price would you feel comfortable paying?"
|
641 |
+
msgstr "What price would you feel comfortable paying?"
|
642 |
+
|
643 |
+
#: includes/i18n.php:405
|
644 |
+
msgid "I couldn't understand how to make it work"
|
645 |
+
msgstr "I couldn't understand how to make it work"
|
646 |
+
|
647 |
+
#: includes/i18n.php:407
|
648 |
+
msgid "The plugin is great, but I need specific feature that you don't support"
|
649 |
+
msgstr "The plugin is great, but I need specific feature that you don't support"
|
650 |
+
|
651 |
+
#: includes/i18n.php:411
|
652 |
+
msgid "The plugin is not working"
|
653 |
+
msgstr "The plugin is not working"
|
654 |
+
|
655 |
+
#: includes/i18n.php:413
|
656 |
+
msgid "It's not what I was looking for"
|
657 |
+
msgstr "It's not what I was looking for"
|
658 |
+
|
659 |
+
#: includes/i18n.php:415
|
660 |
+
msgid "The plugin didn't work as expected"
|
661 |
+
msgstr "The plugin didn't work as expected"
|
662 |
+
|
663 |
+
#: includes/i18n.php:417
|
664 |
+
msgid "What feature?"
|
665 |
+
msgstr "What feature?"
|
666 |
+
|
667 |
+
#: includes/i18n.php:419
|
668 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
669 |
+
msgstr "Kindly share what didn't work so we can fix it for future users..."
|
670 |
+
|
671 |
+
#: includes/i18n.php:423
|
672 |
+
msgid "What you've been looking for?"
|
673 |
+
msgstr "What you've been looking for?"
|
674 |
+
|
675 |
+
#: includes/i18n.php:425
|
676 |
+
msgid "What did you expect?"
|
677 |
+
msgstr "What did you expect?"
|
678 |
+
|
679 |
+
#: includes/i18n.php:427
|
680 |
+
msgid "The plugin didn't work"
|
681 |
+
msgstr "The plugin didn't work"
|
682 |
+
|
683 |
+
#: includes/i18n.php:429
|
684 |
+
msgid "I don't like to share my information with you"
|
685 |
+
msgstr "I don't like to share my information with you"
|
686 |
+
|
687 |
+
#: includes/i18n.php:431
|
688 |
+
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
689 |
+
msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
690 |
+
|
691 |
+
#: includes/i18n.php:441
|
692 |
+
msgctxt "greeting"
|
693 |
+
msgid "Hey %s,"
|
694 |
+
msgstr "Hey %s,"
|
695 |
+
|
696 |
+
#: includes/i18n.php:443
|
697 |
+
msgctxt "a greeting. E.g. Thanks John!"
|
698 |
+
msgid "Thanks %s!"
|
699 |
+
msgstr "Thanks %s!"
|
700 |
+
|
701 |
+
#: includes/i18n.php:445
|
702 |
+
msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
703 |
+
msgstr "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
704 |
+
|
705 |
+
#: includes/i18n.php:449
|
706 |
+
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."
|
707 |
+
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."
|
708 |
+
|
709 |
+
#: includes/i18n.php:453
|
710 |
+
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."
|
711 |
+
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."
|
712 |
+
|
713 |
+
#: includes/i18n.php:455
|
714 |
+
msgid "complete the install"
|
715 |
+
msgstr "complete the install"
|
716 |
+
|
717 |
+
#: includes/i18n.php:457
|
718 |
+
msgid "start the trial"
|
719 |
+
msgstr "start the trial"
|
720 |
+
|
721 |
+
#: includes/i18n.php:459
|
722 |
+
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
723 |
+
msgstr "Thanks for purchasing %s! To get started, please enter your license key:"
|
724 |
+
|
725 |
+
#: includes/i18n.php:463
|
726 |
+
msgid "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license."
|
727 |
+
msgstr "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license."
|
728 |
+
|
729 |
+
#: includes/i18n.php:467
|
730 |
+
msgid "What permissions are being granted?"
|
731 |
+
msgstr "What permissions are being granted?"
|
732 |
+
|
733 |
+
#: includes/i18n.php:469
|
734 |
+
msgid "Your Profile Overview"
|
735 |
+
msgstr "Your Profile Overview"
|
736 |
+
|
737 |
+
#: includes/i18n.php:471
|
738 |
+
msgid "Name and email address"
|
739 |
+
msgstr "Name and email address"
|
740 |
+
|
741 |
+
#: includes/i18n.php:473
|
742 |
+
msgid "Your Site Overview"
|
743 |
+
msgstr "Your Site Overview"
|
744 |
+
|
745 |
+
#: includes/i18n.php:475
|
746 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
747 |
+
msgstr "Site URL, WP version, PHP info, plugins & themes"
|
748 |
+
|
749 |
+
#: includes/i18n.php:479
|
750 |
+
msgid "Current Plugin Events"
|
751 |
+
msgstr "Current Plugin Events"
|
752 |
+
|
753 |
+
#: includes/i18n.php:481
|
754 |
+
msgid "Activation, deactivation and uninstall"
|
755 |
+
msgstr "Activation, deactivation and uninstall"
|
756 |
+
|
757 |
+
#: includes/i18n.php:483
|
758 |
+
msgid "Plugins & Themes"
|
759 |
+
msgstr "Plugins & Themes"
|
760 |
+
|
761 |
+
#: includes/i18n.php:485
|
762 |
+
msgid "Titles, versions and state."
|
763 |
+
msgstr "Titles, versions and state."
|
764 |
+
|
765 |
+
#: includes/i18n.php:487
|
766 |
+
msgid "Admin Notices"
|
767 |
+
msgstr "Admin Notices"
|
768 |
+
|
769 |
+
#: includes/i18n.php:489
|
770 |
+
msgid "Newsletter"
|
771 |
+
msgstr "Newsletter"
|
772 |
+
|
773 |
+
#: includes/i18n.php:491
|
774 |
+
msgid "Updates, announcements, marketing, no spam"
|
775 |
+
msgstr "Updates, announcements, marketing, no spam"
|
776 |
+
|
777 |
+
#: includes/i18n.php:493
|
778 |
+
msgid "Privacy Policy"
|
779 |
+
msgstr "Privacy Policy"
|
780 |
+
|
781 |
+
#: includes/i18n.php:495
|
782 |
+
msgid "Terms of Service"
|
783 |
+
msgstr "Terms of Service"
|
784 |
+
|
785 |
+
#: includes/i18n.php:497
|
786 |
+
msgctxt "as activating plugin"
|
787 |
+
msgid "Activating"
|
788 |
+
msgstr "Activating"
|
789 |
+
|
790 |
+
#: includes/i18n.php:499
|
791 |
+
msgctxt "as in the process of sending an email"
|
792 |
+
msgid "Sending email"
|
793 |
+
msgstr "Sending email"
|
794 |
+
|
795 |
+
#: includes/i18n.php:503
|
796 |
+
msgctxt "button label"
|
797 |
+
msgid "Allow & Continue"
|
798 |
+
msgstr "Allow & Continue"
|
799 |
+
|
800 |
+
#: includes/i18n.php:505
|
801 |
+
msgctxt "button label"
|
802 |
+
msgid "Agree & Activate License"
|
803 |
+
msgstr "Agree & Activate License"
|
804 |
+
|
805 |
+
#: includes/i18n.php:507
|
806 |
+
msgctxt "verb"
|
807 |
+
msgid "Skip"
|
808 |
+
msgstr "Skip"
|
809 |
+
|
810 |
+
#: includes/i18n.php:509
|
811 |
+
msgid "Click here to use the plugin anonymously"
|
812 |
+
msgstr "Click here to use the plugin anonymously"
|
813 |
+
|
814 |
+
#: includes/i18n.php:511
|
815 |
+
msgid "Re-send activation email"
|
816 |
+
msgstr "Re-send activation email"
|
817 |
+
|
818 |
+
#: includes/i18n.php:513
|
819 |
+
msgid "License key"
|
820 |
+
msgstr "License key"
|
821 |
+
|
822 |
+
#: includes/i18n.php:515
|
823 |
+
msgid "Send License Key"
|
824 |
+
msgstr "Send License Key"
|
825 |
+
|
826 |
+
#: includes/i18n.php:517
|
827 |
+
msgid "Sending license key"
|
828 |
+
msgstr "Sending license key"
|
829 |
+
|
830 |
+
#: includes/i18n.php:519
|
831 |
+
msgid "Have a license key?"
|
832 |
+
msgstr "Have a license key?"
|
833 |
+
|
834 |
+
#: includes/i18n.php:521
|
835 |
+
msgid "Don't have a license key?"
|
836 |
+
msgstr "Don't have a license key?"
|
837 |
+
|
838 |
+
#: includes/i18n.php:523
|
839 |
+
msgid "Can't find your license key?"
|
840 |
+
msgstr "Can't find your license key?"
|
841 |
+
|
842 |
+
#: includes/i18n.php:525
|
843 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
844 |
+
msgstr "We couldn't find your email address in the system, are you sure it's the right address?"
|
845 |
+
|
846 |
+
#: includes/i18n.php:529
|
847 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
848 |
+
msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
849 |
+
|
850 |
+
#: includes/i18n.php:533
|
851 |
+
msgid "Opt In"
|
852 |
+
msgstr "Opt In"
|
853 |
+
|
854 |
+
#: includes/i18n.php:535
|
855 |
+
msgid "Opt Out"
|
856 |
+
msgstr "Opt Out"
|
857 |
+
|
858 |
+
#: includes/i18n.php:537
|
859 |
+
msgid "On second thought - I want to continue helping"
|
860 |
+
msgstr "On second thought - I want to continue helping"
|
861 |
+
|
862 |
+
#: includes/i18n.php:541
|
863 |
+
msgid "Opting out..."
|
864 |
+
msgstr "Opting out..."
|
865 |
+
|
866 |
+
#: includes/i18n.php:543
|
867 |
+
msgid "Opting in..."
|
868 |
+
msgstr "Opting in..."
|
869 |
+
|
870 |
+
#: includes/i18n.php:545
|
871 |
+
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
872 |
+
msgstr "We appreciate your help in making the %s better by letting us track some usage data."
|
873 |
+
|
874 |
+
#: includes/i18n.php:549
|
875 |
+
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."
|
876 |
+
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."
|
877 |
+
|
878 |
+
#: includes/i18n.php:553
|
879 |
+
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
880 |
+
msgstr "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
881 |
+
|
882 |
+
#: includes/i18n.php:563
|
883 |
+
msgid "Screenshots"
|
884 |
+
msgstr "Screenshots"
|
885 |
+
|
886 |
+
#: includes/i18n.php:565
|
887 |
+
msgid "Click to view full-size screenshot %d"
|
888 |
+
msgstr "Click to view full-size screenshot %d"
|
889 |
+
|
890 |
+
#: includes/i18n.php:573
|
891 |
+
msgid "Freemius Debug"
|
892 |
+
msgstr "Freemius Debug"
|
893 |
+
|
894 |
+
#: includes/i18n.php:575
|
895 |
+
msgctxt "as turned on"
|
896 |
+
msgid "On"
|
897 |
+
msgstr "On"
|
898 |
+
|
899 |
+
#: includes/i18n.php:577
|
900 |
+
msgctxt "as turned off"
|
901 |
+
msgid "Off"
|
902 |
+
msgstr "Off"
|
903 |
+
|
904 |
+
#: includes/i18n.php:579
|
905 |
+
msgctxt "as code debugging"
|
906 |
+
msgid "Debugging"
|
907 |
+
msgstr "Debugging"
|
908 |
+
|
909 |
+
#: includes/i18n.php:581
|
910 |
+
msgid "Freemius State"
|
911 |
+
msgstr "Freemius State"
|
912 |
+
|
913 |
+
#: includes/i18n.php:583
|
914 |
+
msgctxt "as connection was successful"
|
915 |
+
msgid "Connected"
|
916 |
+
msgstr "Connected"
|
917 |
+
|
918 |
+
#: includes/i18n.php:585
|
919 |
+
msgctxt "as connection blocked"
|
920 |
+
msgid "Blocked"
|
921 |
+
msgstr "Blocked"
|
922 |
+
|
923 |
+
#: includes/i18n.php:587
|
924 |
+
msgctxt "as application program interface"
|
925 |
+
msgid "API"
|
926 |
+
msgstr "API"
|
927 |
+
|
928 |
+
#: includes/i18n.php:589
|
929 |
+
msgctxt "as software development kit versions"
|
930 |
+
msgid "SDK"
|
931 |
+
msgstr "SDK"
|
932 |
+
|
933 |
+
#: includes/i18n.php:591
|
934 |
+
msgctxt "as software development kit versions"
|
935 |
+
msgid "SDK Versions"
|
936 |
+
msgstr "SDK Versions"
|
937 |
+
|
938 |
+
#: includes/i18n.php:595
|
939 |
+
msgctxt "as plugin folder path"
|
940 |
+
msgid "Plugin Path"
|
941 |
+
msgstr "Plugin Path"
|
942 |
+
|
943 |
+
#: includes/i18n.php:597
|
944 |
+
msgctxt "as sdk path"
|
945 |
+
msgid "SDK Path"
|
946 |
+
msgstr "SDK Path"
|
947 |
+
|
948 |
+
#: includes/i18n.php:599
|
949 |
+
msgid "Add Ons of Plugin %s"
|
950 |
+
msgstr "Add Ons of Plugin %s"
|
951 |
+
|
952 |
+
#: includes/i18n.php:601
|
953 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
954 |
+
msgstr "Are you sure you want to delete all Freemius data?"
|
955 |
+
|
956 |
+
#: includes/i18n.php:605
|
957 |
+
msgid "Actions"
|
958 |
+
msgstr "Actions"
|
959 |
+
|
960 |
+
#: includes/i18n.php:607
|
961 |
+
msgid "Delete All Accounts"
|
962 |
+
msgstr "Delete All Accounts"
|
963 |
+
|
964 |
+
#: includes/i18n.php:609
|
965 |
+
msgid "Start Fresh"
|
966 |
+
msgstr "Start Fresh"
|
967 |
+
|
968 |
+
#: includes/i18n.php:611
|
969 |
+
msgid "Clear API Cache"
|
970 |
+
msgstr "Clear API Cache"
|
971 |
+
|
972 |
+
#: includes/i18n.php:613
|
973 |
+
msgid "Sync Data From Server"
|
974 |
+
msgstr "Sync Data From Server"
|
975 |
+
|
976 |
+
#: includes/i18n.php:615
|
977 |
+
msgid "Scheduled Crons"
|
978 |
+
msgstr "Scheduled Crons"
|
979 |
+
|
980 |
+
#: includes/i18n.php:617
|
981 |
+
msgid "Plugins & Themes Sync"
|
982 |
+
msgstr "Plugins & Themes Sync"
|
983 |
+
|
984 |
+
#: includes/i18n.php:625
|
985 |
+
msgctxt "as congratulations"
|
986 |
+
msgid "Congrats"
|
987 |
+
msgstr "Congrats"
|
988 |
+
|
989 |
+
#: includes/i18n.php:627
|
990 |
+
msgctxt "exclamation"
|
991 |
+
msgid "Oops"
|
992 |
+
msgstr "Oops"
|
993 |
+
|
994 |
+
#: includes/i18n.php:629
|
995 |
+
msgctxt "interjection expressing joy or exuberance"
|
996 |
+
msgid "Yee-haw"
|
997 |
+
msgstr "Yee-haw"
|
998 |
+
|
999 |
+
#: includes/i18n.php:633
|
1000 |
+
msgctxt "(especially in electronic communication) used to express elation, enthusiasm, or triumph."
|
1001 |
+
msgid "W00t"
|
1002 |
+
msgstr "W00t"
|
1003 |
+
|
1004 |
+
#: includes/i18n.php:637
|
1005 |
+
msgctxt "a positive response"
|
1006 |
+
msgid "Right on"
|
1007 |
+
msgstr "Right on"
|
1008 |
+
|
1009 |
+
#: includes/i18n.php:639
|
1010 |
+
msgctxt "something somebody says when they are thinking about what you have just said. "
|
1011 |
+
msgid "Hmm"
|
1012 |
+
msgstr "Hmm"
|
1013 |
+
|
1014 |
+
#: includes/i18n.php:643
|
1015 |
+
msgid "O.K"
|
1016 |
+
msgstr "O.K"
|
1017 |
+
|
1018 |
+
#: includes/i18n.php:645
|
1019 |
+
msgctxt "exclamation"
|
1020 |
+
msgid "Hey"
|
1021 |
+
msgstr "Hey"
|
1022 |
+
|
1023 |
+
#: includes/i18n.php:647
|
1024 |
+
msgctxt "advance notice of something that will need attention."
|
1025 |
+
msgid "Heads up"
|
1026 |
+
msgstr "Heads up"
|
1027 |
+
|
1028 |
+
#: includes/i18n.php:657
|
1029 |
+
msgid "Seems like you got the latest release."
|
1030 |
+
msgstr "Seems like you got the latest release."
|
1031 |
+
|
1032 |
+
#: includes/i18n.php:659
|
1033 |
+
msgid "You are all good!"
|
1034 |
+
msgstr "You are all good!"
|
1035 |
+
|
1036 |
+
#: includes/i18n.php:661
|
1037 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1038 |
+
msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1039 |
+
|
1040 |
+
#: includes/i18n.php:665
|
1041 |
+
msgid "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button."
|
1042 |
+
msgstr "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button."
|
1043 |
+
|
1044 |
+
#: includes/i18n.php:669
|
1045 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1046 |
+
msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1047 |
+
|
1048 |
+
#: includes/i18n.php:673
|
1049 |
+
msgid "Your name was successfully updated."
|
1050 |
+
msgstr "Your name was successfully updated."
|
1051 |
+
|
1052 |
+
#: includes/i18n.php:675
|
1053 |
+
msgid "You have successfully updated your %s."
|
1054 |
+
msgstr "You have successfully updated your %s."
|
1055 |
+
|
1056 |
+
#: includes/i18n.php:677
|
1057 |
+
msgid "Please provide your full name."
|
1058 |
+
msgstr "Please provide your full name."
|
1059 |
+
|
1060 |
+
#: includes/i18n.php:679
|
1061 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1062 |
+
msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1063 |
+
|
1064 |
+
#: includes/i18n.php:683
|
1065 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1066 |
+
msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1067 |
+
|
1068 |
+
#: includes/i18n.php:687
|
1069 |
+
msgid "No credit card required"
|
1070 |
+
msgstr "No credit card required"
|
1071 |
+
|
1072 |
+
#: includes/i18n.php:689
|
1073 |
+
msgid "Premium plugin version was successfully activated."
|
1074 |
+
msgstr "Premium plugin version was successfully activated."
|
1075 |
+
|
1076 |
+
#: includes/i18n.php:693
|
1077 |
+
msgid "The upgrade of %s was successfully completed."
|
1078 |
+
msgstr "The upgrade of %s was successfully completed."
|
1079 |
+
|
1080 |
+
#: includes/i18n.php:695
|
1081 |
+
msgid "Your account was successfully activated with the %s plan."
|
1082 |
+
msgstr "Your account was successfully activated with the %s plan."
|
1083 |
+
|
1084 |
+
#: includes/i18n.php:699
|
1085 |
+
msgid "Download the latest %s version now"
|
1086 |
+
msgstr "Download the latest %s version now"
|
1087 |
+
|
1088 |
+
#: includes/i18n.php:701
|
1089 |
+
msgid "Please follow these steps to complete the upgrade"
|
1090 |
+
msgstr "Please follow these steps to complete the upgrade"
|
1091 |
+
|
1092 |
+
#: includes/i18n.php:705
|
1093 |
+
msgid "Download the latest %s version"
|
1094 |
+
msgstr "Download the latest %s version"
|
1095 |
+
|
1096 |
+
#: includes/i18n.php:707
|
1097 |
+
msgid "Download the latest version"
|
1098 |
+
msgstr "Download the latest version"
|
1099 |
+
|
1100 |
+
#: includes/i18n.php:709
|
1101 |
+
msgid "Deactivate the free version"
|
1102 |
+
msgstr "Deactivate the free version"
|
1103 |
+
|
1104 |
+
#: includes/i18n.php:711
|
1105 |
+
msgid "Upload and activate the downloaded version"
|
1106 |
+
msgstr "Upload and activate the downloaded version"
|
1107 |
+
|
1108 |
+
#: includes/i18n.php:713
|
1109 |
+
msgid "How to upload and activate?"
|
1110 |
+
msgstr "How to upload and activate?"
|
1111 |
+
|
1112 |
+
#: includes/i18n.php:715
|
1113 |
+
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1114 |
+
msgid "%s Add-on was successfully purchased."
|
1115 |
+
msgstr "%s Add-on was successfully purchased."
|
1116 |
+
|
1117 |
+
#: includes/i18n.php:719
|
1118 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
1119 |
+
msgstr "Your %s Add-on plan was successfully upgraded."
|
1120 |
+
|
1121 |
+
#: includes/i18n.php:723
|
1122 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
1123 |
+
msgstr "Your email has been successfully verified - you are AWESOME!"
|
1124 |
+
|
1125 |
+
#: includes/i18n.php:727
|
1126 |
+
msgid "Your plan was successfully upgraded."
|
1127 |
+
msgstr "Your plan was successfully upgraded."
|
1128 |
+
|
1129 |
+
#: includes/i18n.php:729
|
1130 |
+
msgid "Your plan was successfully changed to %s."
|
1131 |
+
msgstr "Your plan was successfully changed to %s."
|
1132 |
+
|
1133 |
+
#: includes/i18n.php:731
|
1134 |
+
msgid "Your license has expired. You can still continue using the free plugin forever."
|
1135 |
+
msgstr "Your license has expired. You can still continue using the free plugin forever."
|
1136 |
+
|
1137 |
+
#: includes/i18n.php:735
|
1138 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
1139 |
+
msgstr "Your license has been cancelled. If you think it's a mistake, please contact support."
|
1140 |
+
|
1141 |
+
#: includes/i18n.php:739
|
1142 |
+
msgid "Your trial has been successfully started."
|
1143 |
+
msgstr "Your trial has been successfully started."
|
1144 |
+
|
1145 |
+
#: includes/i18n.php:741
|
1146 |
+
msgid "Your license was successfully activated."
|
1147 |
+
msgstr "Your license was successfully activated."
|
1148 |
+
|
1149 |
+
#: includes/i18n.php:743
|
1150 |
+
msgid "It looks like your site currently doesn't have an active license."
|
1151 |
+
msgstr "It looks like your site currently doesn't have an active license."
|
1152 |
+
|
1153 |
+
#: includes/i18n.php:747
|
1154 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
1155 |
+
msgstr "Your license was successfully deactivated, you are back to the %s plan."
|
1156 |
+
|
1157 |
+
#: includes/i18n.php:751
|
1158 |
+
msgid "It looks like the license deactivation failed."
|
1159 |
+
msgstr "It looks like the license deactivation failed."
|
1160 |
+
|
1161 |
+
#: includes/i18n.php:755
|
1162 |
+
msgid "It looks like the license could not be activated."
|
1163 |
+
msgstr "It looks like the license could not be activated."
|
1164 |
+
|
1165 |
+
#: includes/i18n.php:759
|
1166 |
+
msgid "Error received from the server:"
|
1167 |
+
msgstr "Error received from the server:"
|
1168 |
+
|
1169 |
+
#: includes/i18n.php:761
|
1170 |
+
msgid "Your trial has expired. You can still continue using all our free features."
|
1171 |
+
msgstr "Your trial has expired. You can still continue using all our free features."
|
1172 |
+
|
1173 |
+
#: includes/i18n.php:765
|
1174 |
+
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
1175 |
+
msgstr "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
1176 |
+
|
1177 |
+
#: includes/i18n.php:769
|
1178 |
+
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1179 |
+
msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1180 |
+
|
1181 |
+
#: includes/i18n.php:773
|
1182 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1183 |
+
msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1184 |
+
|
1185 |
+
#: includes/i18n.php:777
|
1186 |
+
msgid "Your %s free trial was successfully cancelled."
|
1187 |
+
msgstr "Your %s free trial was successfully cancelled."
|
1188 |
+
|
1189 |
+
#: includes/i18n.php:781
|
1190 |
+
msgctxt "%s - numeric version number"
|
1191 |
+
msgid "Version %s was released."
|
1192 |
+
msgstr "Version %s was released."
|
1193 |
+
|
1194 |
+
#: includes/i18n.php:785
|
1195 |
+
msgid "Please download %s."
|
1196 |
+
msgstr "Please download %s."
|
1197 |
+
|
1198 |
+
#: includes/i18n.php:787
|
1199 |
+
msgctxt "%s - plan name, as the latest professional version here"
|
1200 |
+
msgid "the latest %s version here"
|
1201 |
+
msgstr "the latest %s version here"
|
1202 |
+
|
1203 |
+
#: includes/i18n.php:791
|
1204 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1205 |
+
msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1206 |
+
|
1207 |
+
#: includes/i18n.php:795
|
1208 |
+
msgctxt "call to action"
|
1209 |
+
msgid "Start free trial"
|
1210 |
+
msgstr "Start free trial"
|
1211 |
+
|
1212 |
+
#: includes/i18n.php:797
|
1213 |
+
msgid "Starting trial"
|
1214 |
+
msgstr "Starting trial"
|
1215 |
+
|
1216 |
+
#: includes/i18n.php:799
|
1217 |
+
msgid "Please wait"
|
1218 |
+
msgstr "Please wait"
|
1219 |
+
|
1220 |
+
#: includes/i18n.php:801
|
1221 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1222 |
+
msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1223 |
+
|
1224 |
+
#: includes/i18n.php:805
|
1225 |
+
msgid "You already utilized a trial before."
|
1226 |
+
msgstr "You already utilized a trial before."
|
1227 |
+
|
1228 |
+
#: includes/i18n.php:807
|
1229 |
+
msgid "You are already running the plugin in a trial mode."
|
1230 |
+
msgstr "You are already running the plugin in a trial mode."
|
1231 |
+
|
1232 |
+
#: includes/i18n.php:811
|
1233 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1234 |
+
msgstr "Plan %s do not exist, therefore, can't start a trial."
|
1235 |
+
|
1236 |
+
#: includes/i18n.php:815
|
1237 |
+
msgid "Plan %s does not support a trial period."
|
1238 |
+
msgstr "Plan %s does not support a trial period."
|
1239 |
+
|
1240 |
+
#: includes/i18n.php:817
|
1241 |
+
msgid "None of the plugin's plans supports a trial period."
|
1242 |
+
msgstr "None of the plugin's plans supports a trial period."
|
1243 |
+
|
1244 |
+
#: includes/i18n.php:821
|
1245 |
+
msgid "Unexpected API error. Please contact the plugin's author with the following error."
|
1246 |
+
msgstr "Unexpected API error. Please contact the plugin's author with the following error."
|
1247 |
+
|
1248 |
+
#: includes/i18n.php:825
|
1249 |
+
msgid "No commitment for %s days - cancel anytime!"
|
1250 |
+
msgstr "No commitment for %s days - cancel anytime!"
|
1251 |
+
|
1252 |
+
#: includes/i18n.php:827
|
1253 |
+
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."
|
1254 |
+
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."
|
1255 |
+
|
1256 |
+
#: includes/i18n.php:831
|
1257 |
+
msgid "Couldn't activate %s."
|
1258 |
+
msgstr "Couldn't activate %s."
|
1259 |
+
|
1260 |
+
#: includes/i18n.php:833
|
1261 |
+
msgid "Please contact us with the following message:"
|
1262 |
+
msgstr "Please contact us with the following message:"
|
1263 |
+
|
1264 |
+
#: includes/i18n.php:835
|
1265 |
+
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."
|
1266 |
+
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."
|
1267 |
+
|
1268 |
+
#: includes/i18n.php:839
|
1269 |
+
msgid "Please contact us here"
|
1270 |
+
msgstr "Please contact us here"
|
1271 |
+
|
1272 |
+
#: includes/i18n.php:841
|
1273 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1274 |
+
msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1275 |
+
|
1276 |
+
#: includes/i18n.php:849
|
1277 |
+
msgid "From unknown reason, the API connectivity test failed."
|
1278 |
+
msgstr "From unknown reason, the API connectivity test failed."
|
1279 |
+
|
1280 |
+
#: includes/i18n.php:853
|
1281 |
+
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?"
|
1282 |
+
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?"
|
1283 |
+
|
1284 |
+
#: includes/i18n.php:857
|
1285 |
+
msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server."
|
1286 |
+
msgstr "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server."
|
1287 |
+
|
1288 |
+
#: includes/i18n.php:861
|
1289 |
+
msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1290 |
+
msgstr "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1291 |
+
|
1292 |
+
#: includes/i18n.php:865
|
1293 |
+
msgctxt "as pluginX requires an access to our API"
|
1294 |
+
msgid "%s requires an access to our API."
|
1295 |
+
msgstr "%s requires an access to our API."
|
1296 |
+
|
1297 |
+
#: includes/i18n.php:869
|
1298 |
+
msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
|
1299 |
+
msgstr "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
|
1300 |
+
|
1301 |
+
#: includes/i18n.php:873
|
1302 |
+
msgid "I don't know what is Squid or ACL, help me!"
|
1303 |
+
msgstr "I don't know what is Squid or ACL, help me!"
|
1304 |
+
|
1305 |
+
#: includes/i18n.php:875, includes/i18n.php:889
|
1306 |
+
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."
|
1307 |
+
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."
|
1308 |
+
|
1309 |
+
#: includes/i18n.php:879
|
1310 |
+
msgid "I'm a system administrator"
|
1311 |
+
msgstr "I'm a system administrator"
|
1312 |
+
|
1313 |
+
#: includes/i18n.php:881
|
1314 |
+
msgid "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again."
|
1315 |
+
msgstr "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again."
|
1316 |
+
|
1317 |
+
#: includes/i18n.php:885
|
1318 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
1319 |
+
msgstr "I don't know what is cURL or how to install it, help me!"
|
1320 |
+
|
1321 |
+
#: includes/i18n.php:893
|
1322 |
+
msgid "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again."
|
1323 |
+
msgstr "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again."
|
1324 |
+
|
1325 |
+
#: includes/i18n.php:897
|
1326 |
+
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."
|
1327 |
+
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."
|
1328 |
+
|
1329 |
+
#: includes/i18n.php:901
|
1330 |
+
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1331 |
+
msgstr "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1332 |
+
|
1333 |
+
#: includes/i18n.php:905
|
1334 |
+
msgid "Yes - I'm giving you a chance to fix it"
|
1335 |
+
msgstr "Yes - I'm giving you a chance to fix it"
|
1336 |
+
|
1337 |
+
#: includes/i18n.php:907
|
1338 |
+
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."
|
1339 |
+
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."
|
1340 |
+
|
1341 |
+
#: includes/i18n.php:911
|
1342 |
+
msgid "Let's try your previous version"
|
1343 |
+
msgstr "Let's try your previous version"
|
1344 |
+
|
1345 |
+
#: includes/i18n.php:913
|
1346 |
+
msgid "Uninstall this version and install the previous one."
|
1347 |
+
msgstr "Uninstall this version and install the previous one."
|
1348 |
+
|
1349 |
+
#: includes/i18n.php:917
|
1350 |
+
msgid "That's exhausting, please deactivate"
|
1351 |
+
msgstr "That's exhausting, please deactivate"
|
1352 |
+
|
1353 |
+
#: includes/i18n.php:919
|
1354 |
+
msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1355 |
+
msgstr "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1356 |
+
|
1357 |
+
#: includes/i18n.php:923
|
1358 |
+
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."
|
1359 |
+
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."
|
1360 |
+
|
1361 |
+
#: includes/i18n.php:927
|
1362 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
1363 |
+
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1364 |
+
msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1365 |
+
|
1366 |
+
#: includes/i18n.php:931
|
1367 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1368 |
+
msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1369 |
+
|
1370 |
+
#: includes/i18n.php:939
|
1371 |
+
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."
|
1372 |
+
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."
|
1373 |
+
|
1374 |
+
#: includes/i18n.php:943
|
1375 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1376 |
+
msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1377 |
+
|
1378 |
+
#: includes/i18n.php:947
|
1379 |
+
msgid "%s is the new owner of the account."
|
1380 |
+
msgstr "%s is the new owner of the account."
|
1381 |
+
|
1382 |
+
#: includes/i18n.php:951
|
1383 |
+
msgctxt "addonX cannot run without pluginY"
|
1384 |
+
msgid "%s cannot run without %s."
|
1385 |
+
msgstr "%s cannot run without %s."
|
1386 |
+
|
1387 |
+
#: includes/i18n.php:955
|
1388 |
+
msgctxt "addonX cannot run..."
|
1389 |
+
msgid "%s cannot run without the plugin."
|
1390 |
+
msgstr "%s cannot run without the plugin."
|
1391 |
+
|
1392 |
+
#: includes/i18n.php:959
|
1393 |
+
msgctxt "pluginX activation was successfully..."
|
1394 |
+
msgid "%s activation was successfully completed."
|
1395 |
+
msgstr "%s activation was successfully completed."
|
1396 |
+
|
1397 |
+
#: includes/i18n.php:963
|
1398 |
+
msgctxt "Plugin installer section title"
|
1399 |
+
msgid "Features & Pricing"
|
1400 |
+
msgstr "Features & Pricing"
|
1401 |
+
|
1402 |
+
#: includes/i18n.php:967
|
1403 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1404 |
+
msgstr "Add-on must be deployed to WordPress.org or Freemius."
|
1405 |
+
|
1406 |
+
#: includes/i18n.php:971
|
1407 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1408 |
+
msgstr "Paid add-on must be deployed to Freemius."
|
1409 |
+
|
1410 |
+
#: includes/i18n.php:979
|
1411 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1412 |
+
msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1413 |
+
|
1414 |
+
#: includes/i18n.php:983
|
1415 |
+
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."
|
1416 |
+
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."
|
1417 |
+
|
1418 |
+
#: includes/i18n.php:995
|
1419 |
+
msgctxt "as every month"
|
1420 |
+
msgid "Monthly"
|
1421 |
+
msgstr "Monthly"
|
1422 |
+
|
1423 |
+
#: includes/i18n.php:997
|
1424 |
+
msgctxt "as monthly period"
|
1425 |
+
msgid "mo"
|
1426 |
+
msgstr "mo"
|
1427 |
+
|
1428 |
+
#: includes/i18n.php:999
|
1429 |
+
msgctxt "as once a year"
|
1430 |
+
msgid "Annual"
|
1431 |
+
msgstr "Annual"
|
1432 |
+
|
1433 |
+
#: includes/i18n.php:1001
|
1434 |
+
msgctxt "as once a year"
|
1435 |
+
msgid "Annually"
|
1436 |
+
msgstr "Annually"
|
1437 |
+
|
1438 |
+
#: includes/i18n.php:1003
|
1439 |
+
msgctxt "as once a year"
|
1440 |
+
msgid "Once"
|
1441 |
+
msgstr "Once"
|
1442 |
+
|
1443 |
+
#: includes/i18n.php:1005
|
1444 |
+
msgctxt "as annual period"
|
1445 |
+
msgid "year"
|
1446 |
+
msgstr "year"
|
1447 |
+
|
1448 |
+
#: includes/i18n.php:1007
|
1449 |
+
msgid "Lifetime"
|
1450 |
+
msgstr "Lifetime"
|
1451 |
+
|
1452 |
+
#: includes/i18n.php:1009
|
1453 |
+
msgctxt "e.g. the best product"
|
1454 |
+
msgid "Best"
|
1455 |
+
msgstr "Best"
|
1456 |
+
|
1457 |
+
#: includes/i18n.php:1011
|
1458 |
+
msgctxt "e.g. billed monthly"
|
1459 |
+
msgid "Billed %s"
|
1460 |
+
msgstr "Billed %s"
|
1461 |
+
|
1462 |
+
#: includes/i18n.php:1013
|
1463 |
+
msgctxt "as a discount of $5 or 10%"
|
1464 |
+
msgid "Save %s"
|
1465 |
+
msgstr "Save %s"
|
1466 |
+
|
1467 |
+
#: includes/i18n.php:1017
|
1468 |
+
msgid "View details"
|
1469 |
+
msgstr "View details"
|
1470 |
+
|
1471 |
+
#: includes/i18n.php:1025
|
1472 |
+
msgctxt "button label"
|
1473 |
+
msgid "Approve & Start Trial"
|
1474 |
+
msgstr "Approve & Start Trial"
|
1475 |
+
|
1476 |
+
#: includes/i18n.php:1029
|
1477 |
+
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1478 |
+
msgstr "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1479 |
+
|
1480 |
+
#: includes/i18n.php:1033
|
1481 |
+
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."
|
1482 |
+
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."
|
1483 |
+
|
1484 |
+
#: includes/i18n.php:1045
|
1485 |
+
msgid "Business name"
|
1486 |
+
msgstr "Business name"
|
1487 |
+
|
1488 |
+
#: includes/i18n.php:1047
|
1489 |
+
msgid "Tax / VAT ID"
|
1490 |
+
msgstr "Tax / VAT ID"
|
1491 |
+
|
1492 |
+
#: includes/i18n.php:1049
|
1493 |
+
msgid "Address Line %d"
|
1494 |
+
msgstr "Address Line %d"
|
1495 |
+
|
1496 |
+
#: includes/i18n.php:1051
|
1497 |
+
msgid "Country"
|
1498 |
+
msgstr "Country"
|
1499 |
+
|
1500 |
+
#: includes/i18n.php:1053
|
1501 |
+
msgid "Select Country"
|
1502 |
+
msgstr "Select Country"
|
1503 |
+
|
1504 |
+
#: includes/i18n.php:1055
|
1505 |
+
msgid "City"
|
1506 |
+
msgstr "City"
|
1507 |
+
|
1508 |
+
#: includes/i18n.php:1057
|
1509 |
+
msgid "Town"
|
1510 |
+
msgstr "Town"
|
1511 |
+
|
1512 |
+
#: includes/i18n.php:1059
|
1513 |
+
msgid "State"
|
1514 |
+
msgstr "State"
|
1515 |
+
|
1516 |
+
#: includes/i18n.php:1061
|
1517 |
+
msgid "Province"
|
1518 |
+
msgstr "Province"
|
1519 |
+
|
1520 |
+
#: includes/i18n.php:1063
|
1521 |
+
msgid "ZIP / Postal Code"
|
1522 |
+
msgstr "ZIP / Postal Code"
|
lib/freemius/languages/freemius-he.mo
ADDED
Binary file
|
lib/freemius/languages/freemius-he.po
ADDED
@@ -0,0 +1,1661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Vova Feldman <vova@freemius.com>, 2016
|
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 |
+
"PO-Revision-Date: 2016-12-07 01:29+0000\n"
|
10 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
11 |
+
"Language-Team: Hebrew (http://www.transifex.com/freemius/wordpress-sdk/language/he/)\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"Language: he\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
21 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
22 |
+
|
23 |
+
#: includes/i18n.php41, includes/i18n.php:55
|
24 |
+
msgid "Yes - I'm in!"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: includes/i18n.php43, includes/i18n.php:57
|
28 |
+
msgid "Not today"
|
29 |
+
msgstr "לא היום"
|
30 |
+
|
31 |
+
#: includes/i18n.php:69
|
32 |
+
msgid "Account"
|
33 |
+
msgstr "חשבון"
|
34 |
+
|
35 |
+
#: includes/i18n.php:71
|
36 |
+
msgid "Add On"
|
37 |
+
msgstr "תוסף"
|
38 |
+
|
39 |
+
#: includes/i18n.php:73
|
40 |
+
msgid "Contact Us"
|
41 |
+
msgstr "יצירת קשר"
|
42 |
+
|
43 |
+
#: includes/i18n.php:75
|
44 |
+
msgid "Contact Support"
|
45 |
+
msgstr "צור קשר"
|
46 |
+
|
47 |
+
#: includes/i18n.php:77
|
48 |
+
msgid "Change Ownership"
|
49 |
+
msgstr "עדכון בעלות"
|
50 |
+
|
51 |
+
#: includes/i18n.php:79
|
52 |
+
msgid "Support"
|
53 |
+
msgstr "תמיכה"
|
54 |
+
|
55 |
+
#: includes/i18n.php:81
|
56 |
+
msgid "Support Forum"
|
57 |
+
msgstr "פורום תמיכה"
|
58 |
+
|
59 |
+
#: includes/i18n.php:83
|
60 |
+
msgid "Add Ons"
|
61 |
+
msgstr "תוספים"
|
62 |
+
|
63 |
+
#: includes/i18n.php:85
|
64 |
+
msgctxt "verb"
|
65 |
+
msgid "Upgrade"
|
66 |
+
msgstr "שדרג"
|
67 |
+
|
68 |
+
#: includes/i18n.php:87
|
69 |
+
msgid "Awesome"
|
70 |
+
msgstr "אדיר"
|
71 |
+
|
72 |
+
#: includes/i18n.php:89
|
73 |
+
msgctxt "noun"
|
74 |
+
msgid "Pricing"
|
75 |
+
msgstr "מחירון"
|
76 |
+
|
77 |
+
#: includes/i18n.php:91
|
78 |
+
msgctxt "noun"
|
79 |
+
msgid "Price"
|
80 |
+
msgstr "מחיר"
|
81 |
+
|
82 |
+
#: includes/i18n.php:93
|
83 |
+
msgid "Unlimited Updates"
|
84 |
+
msgstr "עדכונים ללא הגבלה"
|
85 |
+
|
86 |
+
#: includes/i18n.php:95
|
87 |
+
msgctxt "verb"
|
88 |
+
msgid "Downgrade"
|
89 |
+
msgstr "שנמך"
|
90 |
+
|
91 |
+
#: includes/i18n.php:97
|
92 |
+
msgid "Cancel Trial"
|
93 |
+
msgstr "ביט"
|
94 |
+
|
95 |
+
#: includes/i18n.php:99
|
96 |
+
msgid "Free Trial"
|
97 |
+
msgstr "ניסיון חינם"
|
98 |
+
|
99 |
+
#: includes/i18n.php:101
|
100 |
+
msgid "Start my free %s"
|
101 |
+
msgstr "התחל את %s הניסיון שלי"
|
102 |
+
|
103 |
+
#: includes/i18n.php:103
|
104 |
+
msgid "No commitment for %s - cancel anytime"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: includes/i18n.php:105
|
108 |
+
msgid "After your free %s, pay as little as %s"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: includes/i18n.php:107
|
112 |
+
msgid "Details"
|
113 |
+
msgstr "פרטים"
|
114 |
+
|
115 |
+
#: includes/i18n.php:109
|
116 |
+
msgid "Account Details"
|
117 |
+
msgstr "פרטי חשבון"
|
118 |
+
|
119 |
+
#: includes/i18n.php:111
|
120 |
+
msgctxt "verb"
|
121 |
+
msgid "Delete"
|
122 |
+
msgstr "מחק"
|
123 |
+
|
124 |
+
#: includes/i18n.php:113
|
125 |
+
msgctxt "verb"
|
126 |
+
msgid "Show"
|
127 |
+
msgstr "הצג"
|
128 |
+
|
129 |
+
#: includes/i18n.php:115
|
130 |
+
msgctxt "verb"
|
131 |
+
msgid "Hide"
|
132 |
+
msgstr "הסתר"
|
133 |
+
|
134 |
+
#: includes/i18n.php:117
|
135 |
+
msgctxt "verb"
|
136 |
+
msgid "Edit"
|
137 |
+
msgstr "ערוך"
|
138 |
+
|
139 |
+
#: includes/i18n.php:119
|
140 |
+
msgctxt "verb"
|
141 |
+
msgid "Update"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: includes/i18n.php:121
|
145 |
+
msgid "Date"
|
146 |
+
msgstr "תאריך"
|
147 |
+
|
148 |
+
#: includes/i18n.php:123
|
149 |
+
msgid "Amount"
|
150 |
+
msgstr "סכום"
|
151 |
+
|
152 |
+
#: includes/i18n.php:125
|
153 |
+
msgid "Invoice"
|
154 |
+
msgstr "חשבונית"
|
155 |
+
|
156 |
+
#: includes/i18n.php:127
|
157 |
+
msgid "Billing"
|
158 |
+
msgstr "בילינג"
|
159 |
+
|
160 |
+
#: includes/i18n.php:129
|
161 |
+
msgid "Payments"
|
162 |
+
msgstr "תשלומים"
|
163 |
+
|
164 |
+
#: includes/i18n.php:131
|
165 |
+
msgid "Delete Account"
|
166 |
+
msgstr "מחיקת חשבון"
|
167 |
+
|
168 |
+
#: includes/i18n.php:133
|
169 |
+
msgctxt "as close a window"
|
170 |
+
msgid "Dismiss"
|
171 |
+
msgstr "סגירה"
|
172 |
+
|
173 |
+
#: includes/i18n.php:135
|
174 |
+
msgctxt "as product pricing plan"
|
175 |
+
msgid "Plan"
|
176 |
+
msgstr "חבילה"
|
177 |
+
|
178 |
+
#: includes/i18n.php:137
|
179 |
+
msgid "Change Plan"
|
180 |
+
msgstr "שינוי חבילה"
|
181 |
+
|
182 |
+
#: includes/i18n.php:139
|
183 |
+
msgctxt "as download professional version"
|
184 |
+
msgid "Download %s Version"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: includes/i18n.php:141
|
188 |
+
msgctxt "as download professional version now"
|
189 |
+
msgid "Download %s version now"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: includes/i18n.php:145
|
193 |
+
msgctxt "as download latest version"
|
194 |
+
msgid "Download Latest"
|
195 |
+
msgstr "הורד גרסה אחרונה"
|
196 |
+
|
197 |
+
#: includes/i18n.php:147
|
198 |
+
msgctxt "E.g. you have a professional license."
|
199 |
+
msgid "You have a %s license."
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: includes/i18n.php:151
|
203 |
+
msgid "New"
|
204 |
+
msgstr "חדש"
|
205 |
+
|
206 |
+
#: includes/i18n.php:153
|
207 |
+
msgid "Free"
|
208 |
+
msgstr "חינם"
|
209 |
+
|
210 |
+
#: includes/i18n.php:155
|
211 |
+
msgctxt "as trial plan"
|
212 |
+
msgid "Trial"
|
213 |
+
msgstr "ניסיון"
|
214 |
+
|
215 |
+
#: includes/i18n.php:157
|
216 |
+
msgctxt "as starting a trial plan"
|
217 |
+
msgid "Start Trial"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: includes/i18n.php:159
|
221 |
+
msgctxt "verb"
|
222 |
+
msgid "Purchase"
|
223 |
+
msgstr "רכישה"
|
224 |
+
|
225 |
+
#: includes/i18n.php:161
|
226 |
+
msgid "Purchase License"
|
227 |
+
msgstr "קניית רישיון"
|
228 |
+
|
229 |
+
#: includes/i18n.php:163
|
230 |
+
msgctxt "verb"
|
231 |
+
msgid "Buy"
|
232 |
+
msgstr "קנייה"
|
233 |
+
|
234 |
+
#: includes/i18n.php:165
|
235 |
+
msgid "Buy License"
|
236 |
+
msgstr "קניית רישיון"
|
237 |
+
|
238 |
+
#: includes/i18n.php:167
|
239 |
+
msgid "Single Site License"
|
240 |
+
msgstr "רשיון לאתר אחד"
|
241 |
+
|
242 |
+
#: includes/i18n.php:169
|
243 |
+
msgid "Unlimited Licenses"
|
244 |
+
msgstr "רשיונות ללא הגבלה"
|
245 |
+
|
246 |
+
#: includes/i18n.php:171
|
247 |
+
msgid "Up to %s Sites"
|
248 |
+
msgstr "עד %s אתרים"
|
249 |
+
|
250 |
+
#: includes/i18n.php:173
|
251 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: includes/i18n.php:177
|
255 |
+
msgid ""
|
256 |
+
"Enter the email address you've used for the upgrade below and we will resend"
|
257 |
+
" you the license key."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: includes/i18n.php:181
|
261 |
+
msgctxt "e.g. Professional Plan"
|
262 |
+
msgid "%s Plan"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: includes/i18n.php:183
|
266 |
+
msgid "You are just one step away - %s"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: includes/i18n.php:185
|
270 |
+
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
271 |
+
msgid "Complete \"%s\" Activation Now"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: includes/i18n.php:189
|
275 |
+
msgid "We made a few tweaks to the plugin, %s"
|
276 |
+
msgstr "ביצענו מספר שינויים לתוסף, %s"
|
277 |
+
|
278 |
+
#: includes/i18n.php:191
|
279 |
+
msgid "Opt-in to make \"%s\" Better!"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: includes/i18n.php:193
|
283 |
+
msgid "Error"
|
284 |
+
msgstr "שגיאה"
|
285 |
+
|
286 |
+
#: includes/i18n.php:195
|
287 |
+
msgid ""
|
288 |
+
"Freemius SDK couldn't find the plugin's main file. Please contact "
|
289 |
+
"sdk@freemius.com with the current error."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: includes/i18n.php:203
|
293 |
+
msgctxt "as expiration date"
|
294 |
+
msgid "Expiration"
|
295 |
+
msgstr "תפוגה"
|
296 |
+
|
297 |
+
#: includes/i18n.php:205
|
298 |
+
msgctxt "as software license"
|
299 |
+
msgid "License"
|
300 |
+
msgstr "רישיון"
|
301 |
+
|
302 |
+
#: includes/i18n.php:207
|
303 |
+
msgid "not verified"
|
304 |
+
msgstr "לא מאומת"
|
305 |
+
|
306 |
+
#: includes/i18n.php:209
|
307 |
+
msgid "Verify Email"
|
308 |
+
msgstr "אמת כתובת דוא\"ל"
|
309 |
+
|
310 |
+
#: includes/i18n.php:211
|
311 |
+
msgctxt "e.g. expires in 2 months"
|
312 |
+
msgid "Expires in %s"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: includes/i18n.php:213
|
316 |
+
msgctxt "e.g. auto renews in 2 months"
|
317 |
+
msgid "Auto renews in %s"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: includes/i18n.php:215
|
321 |
+
msgid "No expiration"
|
322 |
+
msgstr "ללא תפוגה"
|
323 |
+
|
324 |
+
#: includes/i18n.php:217
|
325 |
+
msgid "Expired"
|
326 |
+
msgstr "פג תוקף"
|
327 |
+
|
328 |
+
#: includes/i18n.php:219
|
329 |
+
msgid "Cancelled"
|
330 |
+
msgstr "בוטל"
|
331 |
+
|
332 |
+
#: includes/i18n.php:221
|
333 |
+
msgctxt "e.g. In 2 hours"
|
334 |
+
msgid "In %s"
|
335 |
+
msgstr "בעוד %s"
|
336 |
+
|
337 |
+
#: includes/i18n.php:223
|
338 |
+
msgctxt "e.g. 2 min ago"
|
339 |
+
msgid "%s ago"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: includes/i18n.php:225
|
343 |
+
msgctxt "as plugin version"
|
344 |
+
msgid "Version"
|
345 |
+
msgstr "גרסה"
|
346 |
+
|
347 |
+
#: includes/i18n.php:227
|
348 |
+
msgid "Name"
|
349 |
+
msgstr "שם"
|
350 |
+
|
351 |
+
#: includes/i18n.php:229
|
352 |
+
msgid "Email"
|
353 |
+
msgstr "דוא\"ל"
|
354 |
+
|
355 |
+
#: includes/i18n.php:231
|
356 |
+
msgid "Email address"
|
357 |
+
msgstr "כתובת דוא\"ל"
|
358 |
+
|
359 |
+
#: includes/i18n.php:233
|
360 |
+
msgid "Verified"
|
361 |
+
msgstr "מאומת"
|
362 |
+
|
363 |
+
#: includes/i18n.php:235
|
364 |
+
msgid "Plugin"
|
365 |
+
msgstr "תוסף"
|
366 |
+
|
367 |
+
#: includes/i18n.php:237
|
368 |
+
msgid "Plugins"
|
369 |
+
msgstr "תוספים"
|
370 |
+
|
371 |
+
#: includes/i18n.php:239
|
372 |
+
msgid "Themes"
|
373 |
+
msgstr "תבניות"
|
374 |
+
|
375 |
+
#: includes/i18n.php:241
|
376 |
+
msgctxt "as file/folder path"
|
377 |
+
msgid "Path"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: includes/i18n.php:243
|
381 |
+
msgid "Title"
|
382 |
+
msgstr "כותרת"
|
383 |
+
|
384 |
+
#: includes/i18n.php:245
|
385 |
+
msgid "Free version"
|
386 |
+
msgstr "גירסה חינאמית"
|
387 |
+
|
388 |
+
#: includes/i18n.php:247
|
389 |
+
msgid "Premium version"
|
390 |
+
msgstr "גירסת פרימיום"
|
391 |
+
|
392 |
+
#: includes/i18n.php:249
|
393 |
+
msgctxt "as WP plugin slug"
|
394 |
+
msgid "Slug"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: includes/i18n.php:251
|
398 |
+
msgid "ID"
|
399 |
+
msgstr "מזהה"
|
400 |
+
|
401 |
+
#: includes/i18n.php:253
|
402 |
+
msgid "Users"
|
403 |
+
msgstr "משתמשים"
|
404 |
+
|
405 |
+
#: includes/i18n.php:255
|
406 |
+
msgid "Plugin Installs"
|
407 |
+
msgstr "התקנות תוסף"
|
408 |
+
|
409 |
+
#: includes/i18n.php:257
|
410 |
+
msgctxt "like websites"
|
411 |
+
msgid "Sites"
|
412 |
+
msgstr "אתרים"
|
413 |
+
|
414 |
+
#: includes/i18n.php:259
|
415 |
+
msgid "User ID"
|
416 |
+
msgstr "מזהה משתמש"
|
417 |
+
|
418 |
+
#: includes/i18n.php:261
|
419 |
+
msgid "Site ID"
|
420 |
+
msgstr "מזהה אתר"
|
421 |
+
|
422 |
+
#: includes/i18n.php:263
|
423 |
+
msgid "Public Key"
|
424 |
+
msgstr "מפתח פומבי"
|
425 |
+
|
426 |
+
#: includes/i18n.php:265
|
427 |
+
msgid "Secret Key"
|
428 |
+
msgstr "מפתח סודי"
|
429 |
+
|
430 |
+
#: includes/i18n.php:267
|
431 |
+
msgctxt "as secret encryption key missing"
|
432 |
+
msgid "No Secret"
|
433 |
+
msgstr "אין מפתח סודי"
|
434 |
+
|
435 |
+
#: includes/i18n.php:269
|
436 |
+
msgid "No ID"
|
437 |
+
msgstr "אין מזהה"
|
438 |
+
|
439 |
+
#: includes/i18n.php:271
|
440 |
+
msgctxt "as synchronize license"
|
441 |
+
msgid "Sync License"
|
442 |
+
msgstr "סינכרן רישיון"
|
443 |
+
|
444 |
+
#: includes/i18n.php:273
|
445 |
+
msgctxt "as synchronize"
|
446 |
+
msgid "Sync"
|
447 |
+
msgstr "סינכרון"
|
448 |
+
|
449 |
+
#: includes/i18n.php:275
|
450 |
+
msgid "Activate License"
|
451 |
+
msgstr "הפעלת רישיון"
|
452 |
+
|
453 |
+
#: includes/i18n.php:277
|
454 |
+
msgid "Activate Free Version"
|
455 |
+
msgstr "הפעלת גירסה חינאמית"
|
456 |
+
|
457 |
+
#: includes/i18n.php:279
|
458 |
+
msgid ""
|
459 |
+
"Please enter the license key that you received in the email right after the "
|
460 |
+
"purchase:"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: includes/i18n.php:283
|
464 |
+
msgid "Activating license..."
|
465 |
+
msgstr "מפעיל רישיון..."
|
466 |
+
|
467 |
+
#: includes/i18n.php:285
|
468 |
+
msgid "Change License"
|
469 |
+
msgstr "שינוי רישיון"
|
470 |
+
|
471 |
+
#: includes/i18n.php:287
|
472 |
+
msgid "Update License"
|
473 |
+
msgstr "עדכון רישיון"
|
474 |
+
|
475 |
+
#: includes/i18n.php:289
|
476 |
+
msgid "Deactivate License"
|
477 |
+
msgstr "שיחרור רישיון"
|
478 |
+
|
479 |
+
#: includes/i18n.php:291
|
480 |
+
msgid "Activate"
|
481 |
+
msgstr "הפעלה"
|
482 |
+
|
483 |
+
#: includes/i18n.php:293
|
484 |
+
msgid "Deactivate"
|
485 |
+
msgstr "כיבוי"
|
486 |
+
|
487 |
+
#: includes/i18n.php:295
|
488 |
+
msgid "Skip & Deactivate"
|
489 |
+
msgstr "דלג והמשך כיבוי"
|
490 |
+
|
491 |
+
#: includes/i18n.php:297
|
492 |
+
msgid "No - just deactivate"
|
493 |
+
msgstr "לא - פשוט כבה"
|
494 |
+
|
495 |
+
#: includes/i18n.php:299
|
496 |
+
msgid "Yes - do your thing"
|
497 |
+
msgstr "כן - בצעו את מה שצריך"
|
498 |
+
|
499 |
+
#: includes/i18n.php:301
|
500 |
+
msgctxt "active mode"
|
501 |
+
msgid "Active"
|
502 |
+
msgstr "מופעל"
|
503 |
+
|
504 |
+
#: includes/i18n.php:303
|
505 |
+
msgctxt "is active mode?"
|
506 |
+
msgid "Is Active"
|
507 |
+
msgstr "האם פעיל"
|
508 |
+
|
509 |
+
#: includes/i18n.php:305
|
510 |
+
msgid "Install Now"
|
511 |
+
msgstr "התקן עכשיו"
|
512 |
+
|
513 |
+
#: includes/i18n.php:307
|
514 |
+
msgid "Install Update Now"
|
515 |
+
msgstr "התקן עדכון במיידי"
|
516 |
+
|
517 |
+
#: includes/i18n.php:309
|
518 |
+
msgid "More information about %s"
|
519 |
+
msgstr ""
|
520 |
+
|
521 |
+
#: includes/i18n.php:311
|
522 |
+
msgid "Localhost"
|
523 |
+
msgstr "שרת לוקאלי"
|
524 |
+
|
525 |
+
#: includes/i18n.php:313
|
526 |
+
msgctxt "as activate Professional plan"
|
527 |
+
msgid "Activate %s Plan"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: includes/i18n.php:315
|
531 |
+
msgctxt "as 5 licenses left"
|
532 |
+
msgid "%s left"
|
533 |
+
msgstr "נשארו %s"
|
534 |
+
|
535 |
+
#: includes/i18n.php:317
|
536 |
+
msgid "Last license"
|
537 |
+
msgstr "רישיון אחרון"
|
538 |
+
|
539 |
+
#: includes/i18n.php:319
|
540 |
+
msgid "What is your %s?"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: includes/i18n.php:321
|
544 |
+
msgid "Activate this add-on"
|
545 |
+
msgstr "הפעל את התוסף"
|
546 |
+
|
547 |
+
#: includes/i18n.php:323
|
548 |
+
msgid ""
|
549 |
+
"Deactivating your license will block all premium features, but will enable "
|
550 |
+
"you to activate the license on another site. Are you sure you want to "
|
551 |
+
"proceed?"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: includes/i18n.php:327
|
555 |
+
msgid ""
|
556 |
+
"Deleting the account will automatically deactivate your %s plan license so "
|
557 |
+
"you can use it on other sites. If you want to terminate the recurring "
|
558 |
+
"payments as well, click the \"Cancel\" button, and first \"Downgrade\" your "
|
559 |
+
"account. Are you sure you would like to continue with the deletion?"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: includes/i18n.php:331
|
563 |
+
msgid ""
|
564 |
+
"Deletion is not temporary. Only delete if you no longer want to use this "
|
565 |
+
"plugin anymore. Are you sure you would like to continue with the deletion?"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: includes/i18n.php:335
|
569 |
+
msgid ""
|
570 |
+
"Downgrading your plan will immediately stop all future recurring payments "
|
571 |
+
"and your %s plan license will expire in %s."
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: includes/i18n.php:339
|
575 |
+
msgid ""
|
576 |
+
"Cancelling the trial will immediately block access to all premium features. "
|
577 |
+
"Are you sure?"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: includes/i18n.php:343
|
581 |
+
msgid ""
|
582 |
+
"You can still enjoy all %s features but you will not have access to plugin "
|
583 |
+
"updates and support."
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: includes/i18n.php:347
|
587 |
+
msgid ""
|
588 |
+
"Once your license expire you can still use the Free version but you will NOT"
|
589 |
+
" have access to the %s features."
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: includes/i18n.php:351
|
593 |
+
msgid "Are you sure you want to proceed?"
|
594 |
+
msgstr "האם את/ה בטוח רוצה להמשיך?"
|
595 |
+
|
596 |
+
#: includes/i18n.php:357
|
597 |
+
msgid "Add Ons for %s"
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: includes/i18n.php:359
|
601 |
+
msgid ""
|
602 |
+
"We could'nt load the add-ons list. It's probably an issue on our side, "
|
603 |
+
"please try to come back in few minutes."
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: includes/i18n.php:365
|
607 |
+
msgid "Anonymous feedback"
|
608 |
+
msgstr "פידבק אנונימי"
|
609 |
+
|
610 |
+
#: includes/i18n.php:367
|
611 |
+
msgid "Quick feedback"
|
612 |
+
msgstr "פידבק זריז"
|
613 |
+
|
614 |
+
#: includes/i18n.php:369
|
615 |
+
msgid "If you have a moment, please let us know why you are deactivating"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: includes/i18n.php:373
|
619 |
+
msgid "Yes - Deactivate"
|
620 |
+
msgstr "כן - "
|
621 |
+
|
622 |
+
#: includes/i18n.php:375
|
623 |
+
msgid "Submit & Deactivate"
|
624 |
+
msgstr "שלח וכבה"
|
625 |
+
|
626 |
+
#: includes/i18n.php:377
|
627 |
+
msgid "Cancel"
|
628 |
+
msgstr "בטל"
|
629 |
+
|
630 |
+
#: includes/i18n.php:379
|
631 |
+
msgid "I no longer need the plugin"
|
632 |
+
msgstr "אין לי צורך יותר בתוסף"
|
633 |
+
|
634 |
+
#: includes/i18n.php:381
|
635 |
+
msgid "I found a better plugin"
|
636 |
+
msgstr "מצאתי תוסף טוב יותר"
|
637 |
+
|
638 |
+
#: includes/i18n.php:383
|
639 |
+
msgid "I only needed the plugin for a short period"
|
640 |
+
msgstr "השתמשתי בתוסף לתקופה קצרה"
|
641 |
+
|
642 |
+
#: includes/i18n.php:385
|
643 |
+
msgid "The plugin broke my site"
|
644 |
+
msgstr "התוסף הרס לי את האתר"
|
645 |
+
|
646 |
+
#: includes/i18n.php:387
|
647 |
+
msgid "The plugin suddenly stopped working"
|
648 |
+
msgstr "התוסף לפתע הפסיק לעבוד"
|
649 |
+
|
650 |
+
#: includes/i18n.php:389
|
651 |
+
msgid "I can't pay for it anymore"
|
652 |
+
msgstr "אני לא יכול/ה להמשיך לשלם על זה"
|
653 |
+
|
654 |
+
#: includes/i18n.php:391
|
655 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
656 |
+
msgstr "כיבוי זמני לשם דיבאג."
|
657 |
+
|
658 |
+
#: includes/i18n.php:395
|
659 |
+
msgctxt ""
|
660 |
+
"the text of the \"other\" reason for deactivating the plugin that is shown "
|
661 |
+
"in the modal box."
|
662 |
+
msgid "Other"
|
663 |
+
msgstr "אחר"
|
664 |
+
|
665 |
+
#: includes/i18n.php:399
|
666 |
+
msgid "Kindly tell us the reason so we can improve."
|
667 |
+
msgstr "אנא שתף את הסיבה כדי שנוכל להשתפר."
|
668 |
+
|
669 |
+
#: includes/i18n.php:401
|
670 |
+
msgid "What's the plugin's name?"
|
671 |
+
msgstr "מהו שם התוסף?"
|
672 |
+
|
673 |
+
#: includes/i18n.php:403
|
674 |
+
msgid "What price would you feel comfortable paying?"
|
675 |
+
msgstr "מה המחיר שכן תרגיש\\י בנוח לשלם?"
|
676 |
+
|
677 |
+
#: includes/i18n.php:405
|
678 |
+
msgid "I couldn't understand how to make it work"
|
679 |
+
msgstr "לא הצלחתי להבין איך לגרום לזה לעבוד"
|
680 |
+
|
681 |
+
#: includes/i18n.php:407
|
682 |
+
msgid ""
|
683 |
+
"The plugin is great, but I need specific feature that you don't support"
|
684 |
+
msgstr "התוסף מעולה, אבל אני צריכ\\ה פיצ'ר ספציפי שלא נתמך"
|
685 |
+
|
686 |
+
#: includes/i18n.php:411
|
687 |
+
msgid "The plugin is not working"
|
688 |
+
msgstr "התוסף לא עובד"
|
689 |
+
|
690 |
+
#: includes/i18n.php:413
|
691 |
+
msgid "It's not what I was looking for"
|
692 |
+
msgstr "חיפשתי משהו אחר"
|
693 |
+
|
694 |
+
#: includes/i18n.php:415
|
695 |
+
msgid "The plugin didn't work as expected"
|
696 |
+
msgstr "התוסף לא עבד כמצופה"
|
697 |
+
|
698 |
+
#: includes/i18n.php:417
|
699 |
+
msgid "What feature?"
|
700 |
+
msgstr "איזה פיטצ'ר?"
|
701 |
+
|
702 |
+
#: includes/i18n.php:419
|
703 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
704 |
+
msgstr "אנא שתפ\\י מה לא עבד כדי שנוכל לתקן זאת עבור משתמשים עתידיים..."
|
705 |
+
|
706 |
+
#: includes/i18n.php:423
|
707 |
+
msgid "What you've been looking for?"
|
708 |
+
msgstr "מה חיפשת?"
|
709 |
+
|
710 |
+
#: includes/i18n.php:425
|
711 |
+
msgid "What did you expect?"
|
712 |
+
msgstr "למה ציפית?"
|
713 |
+
|
714 |
+
#: includes/i18n.php:427
|
715 |
+
msgid "The plugin didn't work"
|
716 |
+
msgstr "התוסף לא עבד"
|
717 |
+
|
718 |
+
#: includes/i18n.php:429
|
719 |
+
msgid "I don't like to share my information with you"
|
720 |
+
msgstr "אני לא אוהב את הרעיון של שיתוף מידע איתכם"
|
721 |
+
|
722 |
+
#: includes/i18n.php:431
|
723 |
+
msgid ""
|
724 |
+
"You might have missed it, but you don't have to share any data and can just "
|
725 |
+
"%s the opt-in."
|
726 |
+
msgstr "אולי פספסת את זה אבל אינך חייב\\ת לשתף כל מידע איתנו, ביכולתך %s על שיתוף המידע."
|
727 |
+
|
728 |
+
#: includes/i18n.php:441
|
729 |
+
msgctxt "greeting"
|
730 |
+
msgid "Hey %s,"
|
731 |
+
msgstr "היי %s,"
|
732 |
+
|
733 |
+
#: includes/i18n.php:443
|
734 |
+
msgctxt "a greeting. E.g. Thanks John!"
|
735 |
+
msgid "Thanks %s!"
|
736 |
+
msgstr "תודה %s!"
|
737 |
+
|
738 |
+
#: includes/i18n.php:445
|
739 |
+
msgid ""
|
740 |
+
"Never miss an important update - opt-in to our security and feature updates "
|
741 |
+
"notifications, and non-sensitive diagnostic tracking with %4$s."
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#: includes/i18n.php:449
|
745 |
+
msgid ""
|
746 |
+
"Please help us improve %1$s! If you opt-in, some data about your usage of "
|
747 |
+
"%1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still "
|
748 |
+
"work just fine."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/i18n.php:453
|
752 |
+
msgid ""
|
753 |
+
"You should receive an activation email for %s to your mailbox at %s. Please "
|
754 |
+
"make sure you click the activation button in that email to %s."
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: includes/i18n.php:455
|
758 |
+
msgid "complete the install"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: includes/i18n.php:457
|
762 |
+
msgid "start the trial"
|
763 |
+
msgstr ""
|
764 |
+
|
765 |
+
#: includes/i18n.php:459
|
766 |
+
msgid ""
|
767 |
+
"Thanks for purchasing %s! To get started, please enter your license key:"
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: includes/i18n.php:463
|
771 |
+
msgid ""
|
772 |
+
"The plugin will be periodically sending data to %s to check for plugin "
|
773 |
+
"updates and verify the validity of your license."
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: includes/i18n.php:467
|
777 |
+
msgid "What permissions are being granted?"
|
778 |
+
msgstr "מהן ההרשאות המוענקות?"
|
779 |
+
|
780 |
+
#: includes/i18n.php:469
|
781 |
+
msgid "Your Profile Overview"
|
782 |
+
msgstr "פרטים כלליים על הפרופיל"
|
783 |
+
|
784 |
+
#: includes/i18n.php:471
|
785 |
+
msgid "Name and email address"
|
786 |
+
msgstr "שם וכתובת דו\"אל"
|
787 |
+
|
788 |
+
#: includes/i18n.php:473
|
789 |
+
msgid "Your Site Overview"
|
790 |
+
msgstr "פרטים כלליים על האתר"
|
791 |
+
|
792 |
+
#: includes/i18n.php:475
|
793 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
794 |
+
msgstr "כתובת אתר, גרסת וורדפרס, פרטי PHP, תוספים ותבניות"
|
795 |
+
|
796 |
+
#: includes/i18n.php:479
|
797 |
+
msgid "Current Plugin Events"
|
798 |
+
msgstr "שינויי מצב בתוסף הנוכחי"
|
799 |
+
|
800 |
+
#: includes/i18n.php:481
|
801 |
+
msgid "Activation, deactivation and uninstall"
|
802 |
+
msgstr "הפעלה, כיבוי והסרה"
|
803 |
+
|
804 |
+
#: includes/i18n.php:483
|
805 |
+
msgid "Plugins & Themes"
|
806 |
+
msgstr "תוספים ותבניות"
|
807 |
+
|
808 |
+
#: includes/i18n.php:485
|
809 |
+
msgid "Titles, versions and state."
|
810 |
+
msgstr "שמות, גרסאות וסטאטוס."
|
811 |
+
|
812 |
+
#: includes/i18n.php:487
|
813 |
+
msgid "Admin Notices"
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: includes/i18n.php:489
|
817 |
+
msgid "Newsletter"
|
818 |
+
msgstr "ניוסלטר"
|
819 |
+
|
820 |
+
#: includes/i18n.php:491
|
821 |
+
msgid "Updates, announcements, marketing, no spam"
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: includes/i18n.php:493
|
825 |
+
msgid "Privacy Policy"
|
826 |
+
msgstr "מדיניות פרטיות"
|
827 |
+
|
828 |
+
#: includes/i18n.php:495
|
829 |
+
msgid "Terms of Service"
|
830 |
+
msgstr "תנאי השירות"
|
831 |
+
|
832 |
+
#: includes/i18n.php:497
|
833 |
+
msgctxt "as activating plugin"
|
834 |
+
msgid "Activating"
|
835 |
+
msgstr "מפעיל"
|
836 |
+
|
837 |
+
#: includes/i18n.php:499
|
838 |
+
msgctxt "as in the process of sending an email"
|
839 |
+
msgid "Sending email"
|
840 |
+
msgstr "שולח דוא\"ל"
|
841 |
+
|
842 |
+
#: includes/i18n.php:503
|
843 |
+
msgctxt "button label"
|
844 |
+
msgid "Allow & Continue"
|
845 |
+
msgstr "אפשר\\י והמשכ\\י"
|
846 |
+
|
847 |
+
#: includes/i18n.php:505
|
848 |
+
msgctxt "button label"
|
849 |
+
msgid "Agree & Activate License"
|
850 |
+
msgstr "הסכמה והפעלת רישיון"
|
851 |
+
|
852 |
+
#: includes/i18n.php:507
|
853 |
+
msgctxt "verb"
|
854 |
+
msgid "Skip"
|
855 |
+
msgstr "דלג"
|
856 |
+
|
857 |
+
#: includes/i18n.php:509
|
858 |
+
msgid "Click here to use the plugin anonymously"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: includes/i18n.php:511
|
862 |
+
msgid "Re-send activation email"
|
863 |
+
msgstr "שליחה חוזרת של מייל האקטיבציה"
|
864 |
+
|
865 |
+
#: includes/i18n.php:513
|
866 |
+
msgid "License key"
|
867 |
+
msgstr "מפתח רישיון"
|
868 |
+
|
869 |
+
#: includes/i18n.php:515
|
870 |
+
msgid "Send License Key"
|
871 |
+
msgstr "שליחת מפתח רישיון"
|
872 |
+
|
873 |
+
#: includes/i18n.php:517
|
874 |
+
msgid "Sending license key"
|
875 |
+
msgstr "שולח מפתח רישיון"
|
876 |
+
|
877 |
+
#: includes/i18n.php:519
|
878 |
+
msgid "Have a license key?"
|
879 |
+
msgstr "האם ברשותך רישיון?"
|
880 |
+
|
881 |
+
#: includes/i18n.php:521
|
882 |
+
msgid "Don't have a license key?"
|
883 |
+
msgstr "האם אין ברשותך מפתח רישיון?"
|
884 |
+
|
885 |
+
#: includes/i18n.php:523
|
886 |
+
msgid "Can't find your license key?"
|
887 |
+
msgstr "האם אינך מוצא את מפתח הרישיון?"
|
888 |
+
|
889 |
+
#: includes/i18n.php:525
|
890 |
+
msgid ""
|
891 |
+
"We couldn't find your email address in the system, are you sure it's the "
|
892 |
+
"right address?"
|
893 |
+
msgstr ""
|
894 |
+
|
895 |
+
#: includes/i18n.php:529
|
896 |
+
msgid ""
|
897 |
+
"We can't see any active licenses associated with that email address, are you"
|
898 |
+
" sure it's the right address?"
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: includes/i18n.php:533
|
902 |
+
msgid "Opt In"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#: includes/i18n.php:535
|
906 |
+
msgid "Opt Out"
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: includes/i18n.php:537
|
910 |
+
msgid "On second thought - I want to continue helping"
|
911 |
+
msgstr ""
|
912 |
+
|
913 |
+
#: includes/i18n.php:541
|
914 |
+
msgid "Opting out..."
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: includes/i18n.php:543
|
918 |
+
msgid "Opting in..."
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: includes/i18n.php:545
|
922 |
+
msgid ""
|
923 |
+
"We appreciate your help in making the %s better by letting us track some "
|
924 |
+
"usage data."
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/i18n.php:549
|
928 |
+
msgid ""
|
929 |
+
"Usage tracking is done in the name of making %s better. Making a better user"
|
930 |
+
" experience, prioritizing new features, and more good things. We'd really "
|
931 |
+
"appreciate if you'll reconsider letting us continue with the tracking."
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: includes/i18n.php:553
|
935 |
+
msgid ""
|
936 |
+
"By clicking \"Opt Out\", we will no longer be sending any data from %s to "
|
937 |
+
"%s."
|
938 |
+
msgstr ""
|
939 |
+
|
940 |
+
#: includes/i18n.php:563
|
941 |
+
msgid "Screenshots"
|
942 |
+
msgstr "צילומי מסך"
|
943 |
+
|
944 |
+
#: includes/i18n.php:565
|
945 |
+
msgid "Click to view full-size screenshot %d"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: includes/i18n.php:573
|
949 |
+
msgid "Freemius Debug"
|
950 |
+
msgstr ""
|
951 |
+
|
952 |
+
#: includes/i18n.php:575
|
953 |
+
msgctxt "as turned on"
|
954 |
+
msgid "On"
|
955 |
+
msgstr "דלוק"
|
956 |
+
|
957 |
+
#: includes/i18n.php:577
|
958 |
+
msgctxt "as turned off"
|
959 |
+
msgid "Off"
|
960 |
+
msgstr "כבוי"
|
961 |
+
|
962 |
+
#: includes/i18n.php:579
|
963 |
+
msgctxt "as code debugging"
|
964 |
+
msgid "Debugging"
|
965 |
+
msgstr "דיבוג"
|
966 |
+
|
967 |
+
#: includes/i18n.php:581
|
968 |
+
msgid "Freemius State"
|
969 |
+
msgstr ""
|
970 |
+
|
971 |
+
#: includes/i18n.php:583
|
972 |
+
msgctxt "as connection was successful"
|
973 |
+
msgid "Connected"
|
974 |
+
msgstr "מחובר"
|
975 |
+
|
976 |
+
#: includes/i18n.php:585
|
977 |
+
msgctxt "as connection blocked"
|
978 |
+
msgid "Blocked"
|
979 |
+
msgstr "חסום"
|
980 |
+
|
981 |
+
#: includes/i18n.php:587
|
982 |
+
msgctxt "as application program interface"
|
983 |
+
msgid "API"
|
984 |
+
msgstr "API"
|
985 |
+
|
986 |
+
#: includes/i18n.php:589
|
987 |
+
msgctxt "as software development kit versions"
|
988 |
+
msgid "SDK"
|
989 |
+
msgstr "SDK"
|
990 |
+
|
991 |
+
#: includes/i18n.php:591
|
992 |
+
msgctxt "as software development kit versions"
|
993 |
+
msgid "SDK Versions"
|
994 |
+
msgstr "גרסאות SDK"
|
995 |
+
|
996 |
+
#: includes/i18n.php:595
|
997 |
+
msgctxt "as plugin folder path"
|
998 |
+
msgid "Plugin Path"
|
999 |
+
msgstr ""
|
1000 |
+
|
1001 |
+
#: includes/i18n.php:597
|
1002 |
+
msgctxt "as sdk path"
|
1003 |
+
msgid "SDK Path"
|
1004 |
+
msgstr "מיקום SDK"
|
1005 |
+
|
1006 |
+
#: includes/i18n.php:599
|
1007 |
+
msgid "Add Ons of Plugin %s"
|
1008 |
+
msgstr ""
|
1009 |
+
|
1010 |
+
#: includes/i18n.php:601
|
1011 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1012 |
+
msgstr ""
|
1013 |
+
|
1014 |
+
#: includes/i18n.php:605
|
1015 |
+
msgid "Actions"
|
1016 |
+
msgstr "פעולות"
|
1017 |
+
|
1018 |
+
#: includes/i18n.php:607
|
1019 |
+
msgid "Delete All Accounts"
|
1020 |
+
msgstr "מחיקת כל החשבונות"
|
1021 |
+
|
1022 |
+
#: includes/i18n.php:609
|
1023 |
+
msgid "Start Fresh"
|
1024 |
+
msgstr "התחל מחדש"
|
1025 |
+
|
1026 |
+
#: includes/i18n.php:611
|
1027 |
+
msgid "Clear API Cache"
|
1028 |
+
msgstr "ניקוי מטמון ה-API"
|
1029 |
+
|
1030 |
+
#: includes/i18n.php:613
|
1031 |
+
msgid "Sync Data From Server"
|
1032 |
+
msgstr "סנכרון מידע מהשרת"
|
1033 |
+
|
1034 |
+
#: includes/i18n.php:615
|
1035 |
+
msgid "Scheduled Crons"
|
1036 |
+
msgstr ""
|
1037 |
+
|
1038 |
+
#: includes/i18n.php:617
|
1039 |
+
msgid "Plugins & Themes Sync"
|
1040 |
+
msgstr ""
|
1041 |
+
|
1042 |
+
#: includes/i18n.php:625
|
1043 |
+
msgctxt "as congratulations"
|
1044 |
+
msgid "Congrats"
|
1045 |
+
msgstr "מזל טוב"
|
1046 |
+
|
1047 |
+
#: includes/i18n.php:627
|
1048 |
+
msgctxt "exclamation"
|
1049 |
+
msgid "Oops"
|
1050 |
+
msgstr "אופס"
|
1051 |
+
|
1052 |
+
#: includes/i18n.php:629
|
1053 |
+
msgctxt "interjection expressing joy or exuberance"
|
1054 |
+
msgid "Yee-haw"
|
1055 |
+
msgstr ""
|
1056 |
+
|
1057 |
+
#: includes/i18n.php:633
|
1058 |
+
msgctxt ""
|
1059 |
+
"(especially in electronic communication) used to express elation, "
|
1060 |
+
"enthusiasm, or triumph."
|
1061 |
+
msgid "W00t"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: includes/i18n.php:637
|
1065 |
+
msgctxt "a positive response"
|
1066 |
+
msgid "Right on"
|
1067 |
+
msgstr ""
|
1068 |
+
|
1069 |
+
#: includes/i18n.php:639
|
1070 |
+
msgctxt ""
|
1071 |
+
"something somebody says when they are thinking about what you have just "
|
1072 |
+
"said. "
|
1073 |
+
msgid "Hmm"
|
1074 |
+
msgstr "הממ"
|
1075 |
+
|
1076 |
+
#: includes/i18n.php:643
|
1077 |
+
msgid "O.K"
|
1078 |
+
msgstr "אוקיי"
|
1079 |
+
|
1080 |
+
#: includes/i18n.php:645
|
1081 |
+
msgctxt "exclamation"
|
1082 |
+
msgid "Hey"
|
1083 |
+
msgstr "היי"
|
1084 |
+
|
1085 |
+
#: includes/i18n.php:647
|
1086 |
+
msgctxt "advance notice of something that will need attention."
|
1087 |
+
msgid "Heads up"
|
1088 |
+
msgstr "לתשמות לבך"
|
1089 |
+
|
1090 |
+
#: includes/i18n.php:657
|
1091 |
+
msgid "Seems like you got the latest release."
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: includes/i18n.php:659
|
1095 |
+
msgid "You are all good!"
|
1096 |
+
msgstr "את\\ה מסודר!"
|
1097 |
+
|
1098 |
+
#: includes/i18n.php:661
|
1099 |
+
msgid ""
|
1100 |
+
"Sorry, we could not complete the email update. Another user with the same "
|
1101 |
+
"email is already registered."
|
1102 |
+
msgstr ""
|
1103 |
+
|
1104 |
+
#: includes/i18n.php:665
|
1105 |
+
msgid ""
|
1106 |
+
"If you would like to give up the ownership of the plugin's account to %s "
|
1107 |
+
"click the Change Ownership button."
|
1108 |
+
msgstr ""
|
1109 |
+
|
1110 |
+
#: includes/i18n.php:669
|
1111 |
+
msgid ""
|
1112 |
+
"Your email was successfully updated. You should receive an email with "
|
1113 |
+
"confirmation instructions in few moments."
|
1114 |
+
msgstr ""
|
1115 |
+
|
1116 |
+
#: includes/i18n.php:673
|
1117 |
+
msgid "Your name was successfully updated."
|
1118 |
+
msgstr "שמך עודכן בהצלחה."
|
1119 |
+
|
1120 |
+
#: includes/i18n.php:675
|
1121 |
+
msgid "You have successfully updated your %s."
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: includes/i18n.php:677
|
1125 |
+
msgid "Please provide your full name."
|
1126 |
+
msgstr "נא למלא את שמך המלא."
|
1127 |
+
|
1128 |
+
#: includes/i18n.php:679
|
1129 |
+
msgid ""
|
1130 |
+
"Verification mail was just sent to %s. If you can't find it after 5 min, "
|
1131 |
+
"please check your spam box."
|
1132 |
+
msgstr ""
|
1133 |
+
|
1134 |
+
#: includes/i18n.php:683
|
1135 |
+
msgid ""
|
1136 |
+
"Just letting you know that the add-ons information of %s is being pulled "
|
1137 |
+
"from an external server."
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: includes/i18n.php:687
|
1141 |
+
msgid "No credit card required"
|
1142 |
+
msgstr "לא נדרש כרטיס אשראי"
|
1143 |
+
|
1144 |
+
#: includes/i18n.php:689
|
1145 |
+
msgid "Premium plugin version was successfully activated."
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: includes/i18n.php:693
|
1149 |
+
msgid "The upgrade of %s was successfully completed."
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: includes/i18n.php:695
|
1153 |
+
msgid "Your account was successfully activated with the %s plan."
|
1154 |
+
msgstr "חשבונך הופעל בהצלחה עם חבילת ה-%s."
|
1155 |
+
|
1156 |
+
#: includes/i18n.php:699
|
1157 |
+
msgid "Download the latest %s version now"
|
1158 |
+
msgstr "הורדת גרסת ה-%s העדכנית - עכשיו"
|
1159 |
+
|
1160 |
+
#: includes/i18n.php:701
|
1161 |
+
msgid "Please follow these steps to complete the upgrade"
|
1162 |
+
msgstr "נא לבצע את הצעדים הבאים להשלמת השידרוג"
|
1163 |
+
|
1164 |
+
#: includes/i18n.php:705
|
1165 |
+
msgid "Download the latest %s version"
|
1166 |
+
msgstr "הורד\\י את גרסת ה-%s העדכנית"
|
1167 |
+
|
1168 |
+
#: includes/i18n.php:707
|
1169 |
+
msgid "Deactivate the free version"
|
1170 |
+
msgstr "כבה\\י את הגרסה החינאמית"
|
1171 |
+
|
1172 |
+
#: includes/i18n.php:709
|
1173 |
+
msgid "Upload and activate the downloaded version"
|
1174 |
+
msgstr "העלה\\י והפעיל\\י את הגרסה שהורדת"
|
1175 |
+
|
1176 |
+
#: includes/i18n.php:711
|
1177 |
+
msgid "How to upload and activate?"
|
1178 |
+
msgstr "איך להעלות ולהפעיל?"
|
1179 |
+
|
1180 |
+
#: includes/i18n.php:713
|
1181 |
+
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1182 |
+
msgid "%s Add-on was successfully purchased."
|
1183 |
+
msgstr ""
|
1184 |
+
|
1185 |
+
#: includes/i18n.php:717
|
1186 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
1187 |
+
msgstr ""
|
1188 |
+
|
1189 |
+
#: includes/i18n.php:721
|
1190 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
1191 |
+
msgstr ""
|
1192 |
+
|
1193 |
+
#: includes/i18n.php:725
|
1194 |
+
msgid "Your plan was successfully upgraded."
|
1195 |
+
msgstr "החבילה הופעלה בהצלחה."
|
1196 |
+
|
1197 |
+
#: includes/i18n.php:727
|
1198 |
+
msgid "Your plan was successfully changed to %s."
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: includes/i18n.php:729
|
1202 |
+
msgid ""
|
1203 |
+
"Your license has expired. You can still continue using the free plugin "
|
1204 |
+
"forever."
|
1205 |
+
msgstr "פג תוקפו של הרישיון. עדיין ניתן להמשיך להשתמש בגרסה החינאמית של התוסף ללא מגבלת זמן."
|
1206 |
+
|
1207 |
+
#: includes/i18n.php:733
|
1208 |
+
msgid ""
|
1209 |
+
"Your license has been cancelled. If you think it's a mistake, please contact"
|
1210 |
+
" support."
|
1211 |
+
msgstr "רשיונך בוטל. אם לדעתך זו טעות, נא ליצור קשר עם התמיכה."
|
1212 |
+
|
1213 |
+
#: includes/i18n.php:737
|
1214 |
+
msgid "Your trial has been successfully started."
|
1215 |
+
msgstr "הניסיון שלך הופעל בהצלחה."
|
1216 |
+
|
1217 |
+
#: includes/i18n.php:739
|
1218 |
+
msgid "Your license was successfully activated."
|
1219 |
+
msgstr "הרישיון הופעל בהצלחה."
|
1220 |
+
|
1221 |
+
#: includes/i18n.php:741
|
1222 |
+
msgid "It looks like your site currently doesn't have an active license."
|
1223 |
+
msgstr "נראה לאתר עדיין אין רישיון פעיל."
|
1224 |
+
|
1225 |
+
#: includes/i18n.php:745
|
1226 |
+
msgid ""
|
1227 |
+
"Your license was successfully deactivated, you are back to the %s plan."
|
1228 |
+
msgstr "רישיונך נותק בהצלחה, חזרת לחבילת ה-%s"
|
1229 |
+
|
1230 |
+
#: includes/i18n.php:749
|
1231 |
+
msgid "It looks like the license deactivation failed."
|
1232 |
+
msgstr "נראה שניתוק הרישיון נכשל."
|
1233 |
+
|
1234 |
+
#: includes/i18n.php:753
|
1235 |
+
msgid "It looks like the license could not be activated."
|
1236 |
+
msgstr "נראה שלא ניתן להפעיל את הרישיון."
|
1237 |
+
|
1238 |
+
#: includes/i18n.php:757
|
1239 |
+
msgid "Error received from the server:"
|
1240 |
+
msgstr "הוחזרה שגיאה מהשרת:"
|
1241 |
+
|
1242 |
+
#: includes/i18n.php:759
|
1243 |
+
msgid ""
|
1244 |
+
"Your trial has expired. You can still continue using all our free features."
|
1245 |
+
msgstr "תקופת הניסיון נגמרה. ביכולתך להמשיך להשתמש בכל הפיטצ'רים החינאמיים."
|
1246 |
+
|
1247 |
+
#: includes/i18n.php:763
|
1248 |
+
msgid ""
|
1249 |
+
"Your plan was successfully downgraded. Your %s plan license will expire in "
|
1250 |
+
"%s."
|
1251 |
+
msgstr ""
|
1252 |
+
|
1253 |
+
#: includes/i18n.php:767
|
1254 |
+
msgid ""
|
1255 |
+
"Seems like we are having some temporary issue with your plan downgrade. "
|
1256 |
+
"Please try again in few minutes."
|
1257 |
+
msgstr ""
|
1258 |
+
|
1259 |
+
#: includes/i18n.php:771
|
1260 |
+
msgid ""
|
1261 |
+
"It looks like you are not in trial mode anymore so there's nothing to cancel"
|
1262 |
+
" :)"
|
1263 |
+
msgstr ""
|
1264 |
+
|
1265 |
+
#: includes/i18n.php:775
|
1266 |
+
msgid "Your %s free trial was successfully cancelled."
|
1267 |
+
msgstr ""
|
1268 |
+
|
1269 |
+
#: includes/i18n.php:779
|
1270 |
+
msgctxt "%s - numeric version number"
|
1271 |
+
msgid "Version %s was released."
|
1272 |
+
msgstr "גרסה %s הושקה."
|
1273 |
+
|
1274 |
+
#: includes/i18n.php:783
|
1275 |
+
msgid "Please download %s."
|
1276 |
+
msgstr ""
|
1277 |
+
|
1278 |
+
#: includes/i18n.php:785
|
1279 |
+
msgctxt "%s - plan name, as the latest professional version here"
|
1280 |
+
msgid "the latest %s version here"
|
1281 |
+
msgstr "גרסת ה-%s האחרונה כאן"
|
1282 |
+
|
1283 |
+
#: includes/i18n.php:789
|
1284 |
+
msgid ""
|
1285 |
+
"How do you like %s so far? Test all our %s premium features with a %d-day "
|
1286 |
+
"free trial."
|
1287 |
+
msgstr ""
|
1288 |
+
|
1289 |
+
#: includes/i18n.php:793
|
1290 |
+
msgctxt "call to action"
|
1291 |
+
msgid "Start free trial"
|
1292 |
+
msgstr "התחלת ניסיון חינם"
|
1293 |
+
|
1294 |
+
#: includes/i18n.php:795
|
1295 |
+
msgid "Starting trial"
|
1296 |
+
msgstr ""
|
1297 |
+
|
1298 |
+
#: includes/i18n.php:797
|
1299 |
+
msgid "Please wait"
|
1300 |
+
msgstr ""
|
1301 |
+
|
1302 |
+
#: includes/i18n.php:799
|
1303 |
+
msgid ""
|
1304 |
+
"Seems like we are having some temporary issue with your trial cancellation. "
|
1305 |
+
"Please try again in few minutes."
|
1306 |
+
msgstr ""
|
1307 |
+
|
1308 |
+
#: includes/i18n.php:803
|
1309 |
+
msgid "You already utilized a trial before."
|
1310 |
+
msgstr "הניסיון כבר נוצל בעבר."
|
1311 |
+
|
1312 |
+
#: includes/i18n.php:805
|
1313 |
+
msgid "You are already running the plugin in a trial mode."
|
1314 |
+
msgstr "התוסף כבר עכשיו בתקופת ניסיון."
|
1315 |
+
|
1316 |
+
#: includes/i18n.php:809
|
1317 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: includes/i18n.php:813
|
1321 |
+
msgid "Plan %s does not support a trial period."
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: includes/i18n.php:815
|
1325 |
+
msgid "None of the plugin's plans supports a trial period."
|
1326 |
+
msgstr "אף אחת מחבילות התוסף מאפשרת תקופת ניסיון."
|
1327 |
+
|
1328 |
+
#: includes/i18n.php:819
|
1329 |
+
msgid ""
|
1330 |
+
"Unexpected API error. Please contact the plugin's author with the following "
|
1331 |
+
"error."
|
1332 |
+
msgstr "שגיאת API בלתי צפוייה. נא לפנות למפתח התוסף עם השגיאה הבאה."
|
1333 |
+
|
1334 |
+
#: includes/i18n.php:823
|
1335 |
+
msgid "No commitment for %s days - cancel anytime!"
|
1336 |
+
msgstr ""
|
1337 |
+
|
1338 |
+
#: includes/i18n.php:825
|
1339 |
+
msgid ""
|
1340 |
+
"Your license has expired. You can still continue using all the %s features, "
|
1341 |
+
"but you'll need to renew your license to continue getting updates and "
|
1342 |
+
"support."
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: includes/i18n.php:829
|
1346 |
+
msgid "Couldn't activate %s."
|
1347 |
+
msgstr ""
|
1348 |
+
|
1349 |
+
#: includes/i18n.php:831
|
1350 |
+
msgid "Please contact us with the following message:"
|
1351 |
+
msgstr "אנא צור איתנו קשר יחד עם ההודעה הבאה:"
|
1352 |
+
|
1353 |
+
#: includes/i18n.php:833
|
1354 |
+
msgid ""
|
1355 |
+
"It looks like you are still on the %s plan. If you did upgrade or change "
|
1356 |
+
"your plan, it's probably an issue on our side - sorry."
|
1357 |
+
msgstr ""
|
1358 |
+
|
1359 |
+
#: includes/i18n.php:837
|
1360 |
+
msgid "Please contact us here"
|
1361 |
+
msgstr "אנא צור איתנו קשר כאן"
|
1362 |
+
|
1363 |
+
#: includes/i18n.php:839
|
1364 |
+
msgid ""
|
1365 |
+
"I have upgraded my account but when I try to Sync the License, the plan "
|
1366 |
+
"remains %s."
|
1367 |
+
msgstr "שידרגתי את החשבון שלי אבל כשאני מנסה לבצע סנכרון לרישיון החבילה נשארת %s"
|
1368 |
+
|
1369 |
+
#: includes/i18n.php:847
|
1370 |
+
msgid "From unknown reason, the API connectivity test failed."
|
1371 |
+
msgstr "יש בעיית תקשורת ל-API מסיבה בלתי ברורה."
|
1372 |
+
|
1373 |
+
#: includes/i18n.php:851
|
1374 |
+
msgid ""
|
1375 |
+
"It's probably a temporary issue on our end. Just to be sure, with your "
|
1376 |
+
"permission, would it be o.k to run another connectivity test?"
|
1377 |
+
msgstr "ככל הנראה זאת בעיה זמנית בצד שלנו. ברשותך, ורק כדי להיות בטוחים שזאת הבעיה, האם זה יהיה בסדר לבצע בדיקת תקשורת נוספת?"
|
1378 |
+
|
1379 |
+
#: includes/i18n.php:855
|
1380 |
+
msgid ""
|
1381 |
+
"We use PHP cURL library for the API calls, which is a very common library "
|
1382 |
+
"and usually installed out of the box. Unfortunately, cURL is not installed "
|
1383 |
+
"on your server."
|
1384 |
+
msgstr ""
|
1385 |
+
|
1386 |
+
#: includes/i18n.php:859
|
1387 |
+
msgid ""
|
1388 |
+
"From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1389 |
+
msgstr "מסיבה בלתי ברורה, CloudFlare, חומת האש שאנחנו משתמשים בה, חוסמת את התקשורת."
|
1390 |
+
|
1391 |
+
#: includes/i18n.php:863
|
1392 |
+
msgctxt "as pluginX requires an access to our API"
|
1393 |
+
msgid "%s requires an access to our API."
|
1394 |
+
msgstr "%s מחייב גישה ל-API שלנו."
|
1395 |
+
|
1396 |
+
#: includes/i18n.php:867
|
1397 |
+
msgid ""
|
1398 |
+
"It looks like your server is using Squid ACL (access control lists), which "
|
1399 |
+
"blocks the connection."
|
1400 |
+
msgstr ""
|
1401 |
+
|
1402 |
+
#: includes/i18n.php:871
|
1403 |
+
msgid "I don't know what is Squid or ACL, help me!"
|
1404 |
+
msgstr "אין לי מושג מה זה Squid או ACL - אשמח לעזרה!"
|
1405 |
+
|
1406 |
+
#: includes/i18n.php873, includes/i18n.php:887
|
1407 |
+
msgid ""
|
1408 |
+
"We'll make sure to contact your hosting company and resolve the issue. You "
|
1409 |
+
"will get a follow-up email to %s once we have an update."
|
1410 |
+
msgstr ""
|
1411 |
+
|
1412 |
+
#: includes/i18n.php:877
|
1413 |
+
msgid "I'm a system administrator"
|
1414 |
+
msgstr ""
|
1415 |
+
|
1416 |
+
#: includes/i18n.php:879
|
1417 |
+
msgid ""
|
1418 |
+
"Great, please whitelist the following domains: %s. Once you done, deactivate"
|
1419 |
+
" the plugin and activate it again."
|
1420 |
+
msgstr ""
|
1421 |
+
|
1422 |
+
#: includes/i18n.php:883
|
1423 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
1424 |
+
msgstr "אין לי מושג מה זה cURL או איך להתקין אותו - אשמח לעזרה!"
|
1425 |
+
|
1426 |
+
#: includes/i18n.php:891
|
1427 |
+
msgid ""
|
1428 |
+
"Great, please install cURL and enable it in your php.ini file. To make sure "
|
1429 |
+
"it was successfully activated, use 'phpinfo()'. Once activated, deactivate "
|
1430 |
+
"the plugin and reactivate it back again."
|
1431 |
+
msgstr ""
|
1432 |
+
|
1433 |
+
#: includes/i18n.php:895
|
1434 |
+
msgid ""
|
1435 |
+
"We are sure it's an issue on our side and more than happy to resolve it for "
|
1436 |
+
"you ASAP if you give us a chance."
|
1437 |
+
msgstr "זו בטח בעיה בצד שלנו ואנחנו נשמח לעזור כדי לפתור את העניין בהקדם האפשר, רק במידה ותאפשר\\י זאת."
|
1438 |
+
|
1439 |
+
#: includes/i18n.php:899
|
1440 |
+
msgid ""
|
1441 |
+
"Sorry for the inconvenience and we are here to help if you give us a chance."
|
1442 |
+
msgstr "מצטערים על חוסר הנעימות, אנחנו כאן כדי לעזור אם תאפשר\\י זאת."
|
1443 |
+
|
1444 |
+
#: includes/i18n.php:903
|
1445 |
+
msgid "Yes - I'm giving you a chance to fix it"
|
1446 |
+
msgstr "כן - אני נותן לך צ'אנס לתקן את זה"
|
1447 |
+
|
1448 |
+
#: includes/i18n.php:905
|
1449 |
+
msgid ""
|
1450 |
+
"We will do our best to whitelist your server and resolve this issue ASAP. "
|
1451 |
+
"You will get a follow-up email to %s once we have an update."
|
1452 |
+
msgstr ""
|
1453 |
+
|
1454 |
+
#: includes/i18n.php:909
|
1455 |
+
msgid "Let's try your previous version"
|
1456 |
+
msgstr "בוא ננסה את הגירסה הקודמת"
|
1457 |
+
|
1458 |
+
#: includes/i18n.php:911
|
1459 |
+
msgid "Uninstall this version and install the previous one."
|
1460 |
+
msgstr "הסר את הגרסה הנוכחית והתקן את הגרסה קודמת."
|
1461 |
+
|
1462 |
+
#: includes/i18n.php:915
|
1463 |
+
msgid "That's exhausting, please deactivate"
|
1464 |
+
msgstr "זה מתיש, אנא לכבות"
|
1465 |
+
|
1466 |
+
#: includes/i18n.php:917
|
1467 |
+
msgid ""
|
1468 |
+
"We feel your frustration and sincerely apologize for the inconvenience. Hope"
|
1469 |
+
" to see you again in the future."
|
1470 |
+
msgstr ""
|
1471 |
+
|
1472 |
+
#: includes/i18n.php:921
|
1473 |
+
msgid ""
|
1474 |
+
"Thank for giving us the chance to fix it! A message was just sent to our "
|
1475 |
+
"technical staff. We will get back to you as soon as we have an update to %s."
|
1476 |
+
" Appreciate your patience."
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: includes/i18n.php:925
|
1480 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
1481 |
+
msgid ""
|
1482 |
+
"Your server is blocking the access to Freemius' API, which is crucial for "
|
1483 |
+
"%1s synchronization. Please contact your host to whitelist %2s"
|
1484 |
+
msgstr ""
|
1485 |
+
|
1486 |
+
#: includes/i18n.php:929
|
1487 |
+
msgid ""
|
1488 |
+
"It seems like one of the authentication parameters is wrong. Update your "
|
1489 |
+
"Public Key, Secret Key & User ID, and try again."
|
1490 |
+
msgstr ""
|
1491 |
+
|
1492 |
+
#: includes/i18n.php:937
|
1493 |
+
msgid ""
|
1494 |
+
"Please check your mailbox, you should receive an email via %s to confirm the"
|
1495 |
+
" ownership change. From security reasons, you must confirm the change within"
|
1496 |
+
" the next 15 min. If you cannot find the email, please check your spam "
|
1497 |
+
"folder."
|
1498 |
+
msgstr ""
|
1499 |
+
|
1500 |
+
#: includes/i18n.php:941
|
1501 |
+
msgid ""
|
1502 |
+
"Thanks for confirming the ownership change. An email was just sent to %s for"
|
1503 |
+
" final approval."
|
1504 |
+
msgstr "תודה על אישור ביצוע החלפת הבעלות. הרגע נשלח מייל ל-%s כדי לקבל אישור סופי."
|
1505 |
+
|
1506 |
+
#: includes/i18n.php:945
|
1507 |
+
msgid "%s is the new owner of the account."
|
1508 |
+
msgstr "%s הינו הבעלים החד של חשבון זה."
|
1509 |
+
|
1510 |
+
#: includes/i18n.php:949
|
1511 |
+
msgctxt "addonX cannot run without pluginY"
|
1512 |
+
msgid "%s cannot run without %s."
|
1513 |
+
msgstr "%s לא יכול לעבוד ללא %s."
|
1514 |
+
|
1515 |
+
#: includes/i18n.php:953
|
1516 |
+
msgctxt "addonX cannot run..."
|
1517 |
+
msgid "%s cannot run without the plugin."
|
1518 |
+
msgstr ""
|
1519 |
+
|
1520 |
+
#: includes/i18n.php:957
|
1521 |
+
msgctxt "pluginX activation was successfully..."
|
1522 |
+
msgid "%s activation was successfully completed."
|
1523 |
+
msgstr ""
|
1524 |
+
|
1525 |
+
#: includes/i18n.php:961
|
1526 |
+
msgctxt "Plugin installer section title"
|
1527 |
+
msgid "Features & Pricing"
|
1528 |
+
msgstr "פיטצ'רים ומחירים"
|
1529 |
+
|
1530 |
+
#: includes/i18n.php:965
|
1531 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1532 |
+
msgstr ""
|
1533 |
+
|
1534 |
+
#: includes/i18n.php:969
|
1535 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1536 |
+
msgstr ""
|
1537 |
+
|
1538 |
+
#: includes/i18n.php:977
|
1539 |
+
msgid ""
|
1540 |
+
"%s is a premium only add-on. You have to purchase a license first before "
|
1541 |
+
"activating the plugin."
|
1542 |
+
msgstr ""
|
1543 |
+
|
1544 |
+
#: includes/i18n.php:981
|
1545 |
+
msgid ""
|
1546 |
+
"%s free trial was successfully cancelled. Since the add-on is premium only "
|
1547 |
+
"it was automatically deactivated. If you like to use it in the future, "
|
1548 |
+
"you'll have to purchase a license."
|
1549 |
+
msgstr ""
|
1550 |
+
|
1551 |
+
#: includes/i18n.php:993
|
1552 |
+
msgctxt "as every month"
|
1553 |
+
msgid "Monthly"
|
1554 |
+
msgstr "חודשי"
|
1555 |
+
|
1556 |
+
#: includes/i18n.php:995
|
1557 |
+
msgctxt "as monthly period"
|
1558 |
+
msgid "mo"
|
1559 |
+
msgstr ""
|
1560 |
+
|
1561 |
+
#: includes/i18n.php:997
|
1562 |
+
msgctxt "as once a year"
|
1563 |
+
msgid "Annual"
|
1564 |
+
msgstr "שנתי"
|
1565 |
+
|
1566 |
+
#: includes/i18n.php:999
|
1567 |
+
msgctxt "as once a year"
|
1568 |
+
msgid "Annually"
|
1569 |
+
msgstr "שנתי"
|
1570 |
+
|
1571 |
+
#: includes/i18n.php:1001
|
1572 |
+
msgctxt "as once a year"
|
1573 |
+
msgid "Once"
|
1574 |
+
msgstr "פעם אחת"
|
1575 |
+
|
1576 |
+
#: includes/i18n.php:1003
|
1577 |
+
msgctxt "as annual period"
|
1578 |
+
msgid "year"
|
1579 |
+
msgstr "שנה"
|
1580 |
+
|
1581 |
+
#: includes/i18n.php:1005
|
1582 |
+
msgid "Lifetime"
|
1583 |
+
msgstr "לכל החיים"
|
1584 |
+
|
1585 |
+
#: includes/i18n.php:1007
|
1586 |
+
msgctxt "e.g. the best product"
|
1587 |
+
msgid "Best"
|
1588 |
+
msgstr "הכי טוב"
|
1589 |
+
|
1590 |
+
#: includes/i18n.php:1009
|
1591 |
+
msgctxt "e.g. billed monthly"
|
1592 |
+
msgid "Billed %s"
|
1593 |
+
msgstr "מחוייב על בסיס %s"
|
1594 |
+
|
1595 |
+
#: includes/i18n.php:1011
|
1596 |
+
msgctxt "as a discount of $5 or 10%"
|
1597 |
+
msgid "Save %s"
|
1598 |
+
msgstr "שמירת %s"
|
1599 |
+
|
1600 |
+
#: includes/i18n.php:1015
|
1601 |
+
msgid "View details"
|
1602 |
+
msgstr "פרטים נוספים"
|
1603 |
+
|
1604 |
+
#: includes/i18n.php:1023
|
1605 |
+
msgctxt "button label"
|
1606 |
+
msgid "Approve & Start Trial"
|
1607 |
+
msgstr ""
|
1608 |
+
|
1609 |
+
#: includes/i18n.php:1027
|
1610 |
+
msgid ""
|
1611 |
+
"You are 1-click away from starting your %1$s-day free trial of the %2$s "
|
1612 |
+
"plan."
|
1613 |
+
msgstr ""
|
1614 |
+
|
1615 |
+
#: includes/i18n.php:1031
|
1616 |
+
msgid ""
|
1617 |
+
"For compliance with the WordPress.org guidelines, before we start the trial "
|
1618 |
+
"we ask that you opt-in with your user and non-sensitive site information, "
|
1619 |
+
"allowing the plugin to periodically send data to %s to check for version "
|
1620 |
+
"updates and to validate your trial."
|
1621 |
+
msgstr ""
|
1622 |
+
|
1623 |
+
#: includes/i18n.php:1043
|
1624 |
+
msgid "Business name"
|
1625 |
+
msgstr ""
|
1626 |
+
|
1627 |
+
#: includes/i18n.php:1045
|
1628 |
+
msgid "Tax / VAT ID"
|
1629 |
+
msgstr ""
|
1630 |
+
|
1631 |
+
#: includes/i18n.php:1047
|
1632 |
+
msgid "Address Line %d"
|
1633 |
+
msgstr ""
|
1634 |
+
|
1635 |
+
#: includes/i18n.php:1049
|
1636 |
+
msgid "Country"
|
1637 |
+
msgstr ""
|
1638 |
+
|
1639 |
+
#: includes/i18n.php:1051
|
1640 |
+
msgid "Select Country"
|
1641 |
+
msgstr ""
|
1642 |
+
|
1643 |
+
#: includes/i18n.php:1053
|
1644 |
+
msgid "City"
|
1645 |
+
msgstr ""
|
1646 |
+
|
1647 |
+
#: includes/i18n.php:1055
|
1648 |
+
msgid "Town"
|
1649 |
+
msgstr ""
|
1650 |
+
|
1651 |
+
#: includes/i18n.php:1057
|
1652 |
+
msgid "State"
|
1653 |
+
msgstr ""
|
1654 |
+
|
1655 |
+
#: includes/i18n.php:1059
|
1656 |
+
msgid "Province"
|
1657 |
+
msgstr ""
|
1658 |
+
|
1659 |
+
#: includes/i18n.php:1061
|
1660 |
+
msgid "ZIP / Postal Code"
|
1661 |
+
msgstr ""
|
lib/freemius/languages/freemius-it_IT.mo
ADDED
Binary file
|
lib/freemius/languages/freemius-it_IT.po
ADDED
@@ -0,0 +1,1668 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
# Translators:
|
4 |
+
# Pelly Benassi <plasmax@gmail.com>, 2016
|
5 |
+
# Daniele Scasciafratte Mte90 <mte90net@gmail.com>, 2015
|
6 |
+
# Pelly Benassi <plasmax@gmail.com>, 2016
|
7 |
+
# Vova Feldman <vova@freemius.com>, 2015-2016
|
8 |
+
msgid ""
|
9 |
+
msgstr ""
|
10 |
+
"Project-Id-Version: WordPress SDK\n"
|
11 |
+
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
12 |
+
"PO-Revision-Date: 2016-12-12 02:13+0000\n"
|
13 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
14 |
+
"Language-Team: Italian (Italy) (http://www.transifex.com/freemius/wordpress-sdk/language/it_IT/)\n"
|
15 |
+
"MIME-Version: 1.0\n"
|
16 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
17 |
+
"Content-Transfer-Encoding: 8bit\n"
|
18 |
+
"Language: it_IT\n"
|
19 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
+
"X-Poedit-Basepath: ..\n"
|
21 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
24 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
25 |
+
|
26 |
+
#: includes/i18n.php41, includes/i18n.php:55
|
27 |
+
msgid "Yes - I'm in!"
|
28 |
+
msgstr "Sì, ci sto!"
|
29 |
+
|
30 |
+
#: includes/i18n.php43, includes/i18n.php:57
|
31 |
+
msgid "Not today"
|
32 |
+
msgstr "Non oggi"
|
33 |
+
|
34 |
+
#: includes/i18n.php:69
|
35 |
+
msgid "Account"
|
36 |
+
msgstr "Account"
|
37 |
+
|
38 |
+
#: includes/i18n.php:71
|
39 |
+
msgid "Add On"
|
40 |
+
msgstr "Add-on"
|
41 |
+
|
42 |
+
#: includes/i18n.php:73
|
43 |
+
msgid "Contact Us"
|
44 |
+
msgstr "Contattaci"
|
45 |
+
|
46 |
+
#: includes/i18n.php:75
|
47 |
+
msgid "Contact Support"
|
48 |
+
msgstr "Contatta il supporto"
|
49 |
+
|
50 |
+
#: includes/i18n.php:77
|
51 |
+
msgid "Change Ownership"
|
52 |
+
msgstr "Cambia Proprietario"
|
53 |
+
|
54 |
+
#: includes/i18n.php:79
|
55 |
+
msgid "Support"
|
56 |
+
msgstr "Supporto"
|
57 |
+
|
58 |
+
#: includes/i18n.php:81
|
59 |
+
msgid "Support Forum"
|
60 |
+
msgstr "Forum di supporto"
|
61 |
+
|
62 |
+
#: includes/i18n.php:83
|
63 |
+
msgid "Add Ons"
|
64 |
+
msgstr "Add-on"
|
65 |
+
|
66 |
+
#: includes/i18n.php:85
|
67 |
+
msgctxt "verb"
|
68 |
+
msgid "Upgrade"
|
69 |
+
msgstr "Aggiornamento"
|
70 |
+
|
71 |
+
#: includes/i18n.php:87
|
72 |
+
msgid "Awesome"
|
73 |
+
msgstr "Fantastico"
|
74 |
+
|
75 |
+
#: includes/i18n.php:89
|
76 |
+
msgctxt "noun"
|
77 |
+
msgid "Pricing"
|
78 |
+
msgstr "Prezzi"
|
79 |
+
|
80 |
+
#: includes/i18n.php:91
|
81 |
+
msgctxt "noun"
|
82 |
+
msgid "Price"
|
83 |
+
msgstr "Prezzo"
|
84 |
+
|
85 |
+
#: includes/i18n.php:93
|
86 |
+
msgid "Unlimited Updates"
|
87 |
+
msgstr "Aggiornamenti Illimitati"
|
88 |
+
|
89 |
+
#: includes/i18n.php:95
|
90 |
+
msgctxt "verb"
|
91 |
+
msgid "Downgrade"
|
92 |
+
msgstr "Downgrade"
|
93 |
+
|
94 |
+
#: includes/i18n.php:97
|
95 |
+
msgid "Cancel Trial"
|
96 |
+
msgstr "Annulla prova gratuita"
|
97 |
+
|
98 |
+
#: includes/i18n.php:99
|
99 |
+
msgid "Free Trial"
|
100 |
+
msgstr "Prova gratuita"
|
101 |
+
|
102 |
+
#: includes/i18n.php:101
|
103 |
+
msgid "Start my free %s"
|
104 |
+
msgstr "Inizia la mia %s"
|
105 |
+
|
106 |
+
#: includes/i18n.php:103
|
107 |
+
msgid "No commitment for %s - cancel anytime"
|
108 |
+
msgstr "Nessun impegno con %s - cancella quando vuoi"
|
109 |
+
|
110 |
+
#: includes/i18n.php:105
|
111 |
+
msgid "After your free %s, pay as little as %s"
|
112 |
+
msgstr "Dopo il tuo %s gratuito, paghi solamente %s"
|
113 |
+
|
114 |
+
#: includes/i18n.php:107
|
115 |
+
msgid "Details"
|
116 |
+
msgstr "Dettagli"
|
117 |
+
|
118 |
+
#: includes/i18n.php:109
|
119 |
+
msgid "Account Details"
|
120 |
+
msgstr "Dettagli dell'account"
|
121 |
+
|
122 |
+
#: includes/i18n.php:111
|
123 |
+
msgctxt "verb"
|
124 |
+
msgid "Delete"
|
125 |
+
msgstr "Elimina"
|
126 |
+
|
127 |
+
#: includes/i18n.php:113
|
128 |
+
msgctxt "verb"
|
129 |
+
msgid "Show"
|
130 |
+
msgstr "Mostra"
|
131 |
+
|
132 |
+
#: includes/i18n.php:115
|
133 |
+
msgctxt "verb"
|
134 |
+
msgid "Hide"
|
135 |
+
msgstr "Nascondi"
|
136 |
+
|
137 |
+
#: includes/i18n.php:117
|
138 |
+
msgctxt "verb"
|
139 |
+
msgid "Edit"
|
140 |
+
msgstr "Modifica"
|
141 |
+
|
142 |
+
#: includes/i18n.php:119
|
143 |
+
msgctxt "verb"
|
144 |
+
msgid "Update"
|
145 |
+
msgstr "Aggiorna"
|
146 |
+
|
147 |
+
#: includes/i18n.php:121
|
148 |
+
msgid "Date"
|
149 |
+
msgstr "Data"
|
150 |
+
|
151 |
+
#: includes/i18n.php:123
|
152 |
+
msgid "Amount"
|
153 |
+
msgstr "Importo"
|
154 |
+
|
155 |
+
#: includes/i18n.php:125
|
156 |
+
msgid "Invoice"
|
157 |
+
msgstr "Fattura"
|
158 |
+
|
159 |
+
#: includes/i18n.php:127
|
160 |
+
msgid "Billing"
|
161 |
+
msgstr "Fatturazione"
|
162 |
+
|
163 |
+
#: includes/i18n.php:129
|
164 |
+
msgid "Payments"
|
165 |
+
msgstr "Pagamenti"
|
166 |
+
|
167 |
+
#: includes/i18n.php:131
|
168 |
+
msgid "Delete Account"
|
169 |
+
msgstr "Elimina Account"
|
170 |
+
|
171 |
+
#: includes/i18n.php:133
|
172 |
+
msgctxt "as close a window"
|
173 |
+
msgid "Dismiss"
|
174 |
+
msgstr "Chiudi"
|
175 |
+
|
176 |
+
#: includes/i18n.php:135
|
177 |
+
msgctxt "as product pricing plan"
|
178 |
+
msgid "Plan"
|
179 |
+
msgstr "Piano"
|
180 |
+
|
181 |
+
#: includes/i18n.php:137
|
182 |
+
msgid "Change Plan"
|
183 |
+
msgstr "Cambia piano"
|
184 |
+
|
185 |
+
#: includes/i18n.php:139
|
186 |
+
msgctxt "as download professional version"
|
187 |
+
msgid "Download %s Version"
|
188 |
+
msgstr "Scarica la versione %s"
|
189 |
+
|
190 |
+
#: includes/i18n.php:141
|
191 |
+
msgctxt "as download professional version now"
|
192 |
+
msgid "Download %s version now"
|
193 |
+
msgstr "Scarica la versione %s ora"
|
194 |
+
|
195 |
+
#: includes/i18n.php:145
|
196 |
+
msgctxt "as download latest version"
|
197 |
+
msgid "Download Latest"
|
198 |
+
msgstr "Scarica l'ultima versione"
|
199 |
+
|
200 |
+
#: includes/i18n.php:147
|
201 |
+
msgctxt "E.g. you have a professional license."
|
202 |
+
msgid "You have a %s license."
|
203 |
+
msgstr "Hai la licenza %s."
|
204 |
+
|
205 |
+
#: includes/i18n.php:151
|
206 |
+
msgid "New"
|
207 |
+
msgstr "Nuovo"
|
208 |
+
|
209 |
+
#: includes/i18n.php:153
|
210 |
+
msgid "Free"
|
211 |
+
msgstr "Gratuito"
|
212 |
+
|
213 |
+
#: includes/i18n.php:155
|
214 |
+
msgctxt "as trial plan"
|
215 |
+
msgid "Trial"
|
216 |
+
msgstr "Prova gratuita"
|
217 |
+
|
218 |
+
#: includes/i18n.php:157
|
219 |
+
msgctxt "as starting a trial plan"
|
220 |
+
msgid "Start Trial"
|
221 |
+
msgstr "Inizia il periodo di prova gratuito"
|
222 |
+
|
223 |
+
#: includes/i18n.php:159
|
224 |
+
msgctxt "verb"
|
225 |
+
msgid "Purchase"
|
226 |
+
msgstr "Acquisto"
|
227 |
+
|
228 |
+
#: includes/i18n.php:161
|
229 |
+
msgid "Purchase License"
|
230 |
+
msgstr "Acquista licenza"
|
231 |
+
|
232 |
+
#: includes/i18n.php:163
|
233 |
+
msgctxt "verb"
|
234 |
+
msgid "Buy"
|
235 |
+
msgstr "Compra"
|
236 |
+
|
237 |
+
#: includes/i18n.php:165
|
238 |
+
msgid "Buy License"
|
239 |
+
msgstr "Compra licenza"
|
240 |
+
|
241 |
+
#: includes/i18n.php:167
|
242 |
+
msgid "Single Site License"
|
243 |
+
msgstr "Licenza per sito singolo"
|
244 |
+
|
245 |
+
#: includes/i18n.php:169
|
246 |
+
msgid "Unlimited Licenses"
|
247 |
+
msgstr "Licenze illimitate"
|
248 |
+
|
249 |
+
#: includes/i18n.php:171
|
250 |
+
msgid "Up to %s Sites"
|
251 |
+
msgstr "Fino a %s siti"
|
252 |
+
|
253 |
+
#: includes/i18n.php:173
|
254 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
255 |
+
msgstr "%sRinnova la tua licenza ora%s per accedere a funzionalità e supporto della versione %s."
|
256 |
+
|
257 |
+
#: includes/i18n.php:177
|
258 |
+
msgid ""
|
259 |
+
"Enter the email address you've used for the upgrade below and we will resend"
|
260 |
+
" you the license key."
|
261 |
+
msgstr "Inserisci qui sotto l'indirizzo email che hai usato per registrare l'aggiornamento e ti invieremo di nuovo la chiave di licenza."
|
262 |
+
|
263 |
+
#: includes/i18n.php:181
|
264 |
+
msgctxt "e.g. Professional Plan"
|
265 |
+
msgid "%s Plan"
|
266 |
+
msgstr "Piano %s"
|
267 |
+
|
268 |
+
#: includes/i18n.php:183
|
269 |
+
msgid "You are just one step away - %s"
|
270 |
+
msgstr "Sei a un passo dalla fine - %s"
|
271 |
+
|
272 |
+
#: includes/i18n.php:185
|
273 |
+
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
274 |
+
msgid "Complete \"%s\" Activation Now"
|
275 |
+
msgstr "Completa l'attivazione di \"%s\" ora"
|
276 |
+
|
277 |
+
#: includes/i18n.php:189
|
278 |
+
msgid "We made a few tweaks to the plugin, %s"
|
279 |
+
msgstr "Abbiamo apportato alcune modifiche al plugin, %s"
|
280 |
+
|
281 |
+
#: includes/i18n.php:191
|
282 |
+
msgid "Opt-in to make \"%s\" Better!"
|
283 |
+
msgstr "Contribuisci a rendere \"%s\" migliore!"
|
284 |
+
|
285 |
+
#: includes/i18n.php:193
|
286 |
+
msgid "Error"
|
287 |
+
msgstr "Errore"
|
288 |
+
|
289 |
+
#: includes/i18n.php:195
|
290 |
+
msgid ""
|
291 |
+
"Freemius SDK couldn't find the plugin's main file. Please contact "
|
292 |
+
"sdk@freemius.com with the current error."
|
293 |
+
msgstr "L'SDK di Freemius non è riuscito a trovare il file principale del plugin. Per favore contatta sdk@freemius.com riportando l'errore."
|
294 |
+
|
295 |
+
#: includes/i18n.php:203
|
296 |
+
msgctxt "as expiration date"
|
297 |
+
msgid "Expiration"
|
298 |
+
msgstr "Scadenza"
|
299 |
+
|
300 |
+
#: includes/i18n.php:205
|
301 |
+
msgctxt "as software license"
|
302 |
+
msgid "License"
|
303 |
+
msgstr "Licenza"
|
304 |
+
|
305 |
+
#: includes/i18n.php:207
|
306 |
+
msgid "not verified"
|
307 |
+
msgstr "non verificato"
|
308 |
+
|
309 |
+
#: includes/i18n.php:209
|
310 |
+
msgid "Verify Email"
|
311 |
+
msgstr "Verifica email"
|
312 |
+
|
313 |
+
#: includes/i18n.php:211
|
314 |
+
msgctxt "e.g. expires in 2 months"
|
315 |
+
msgid "Expires in %s"
|
316 |
+
msgstr "Scade in %s"
|
317 |
+
|
318 |
+
#: includes/i18n.php:213
|
319 |
+
msgctxt "e.g. auto renews in 2 months"
|
320 |
+
msgid "Auto renews in %s"
|
321 |
+
msgstr "Rinnovo automatico in %s"
|
322 |
+
|
323 |
+
#: includes/i18n.php:215
|
324 |
+
msgid "No expiration"
|
325 |
+
msgstr "Nessuna scadenza"
|
326 |
+
|
327 |
+
#: includes/i18n.php:217
|
328 |
+
msgid "Expired"
|
329 |
+
msgstr "Scaduto"
|
330 |
+
|
331 |
+
#: includes/i18n.php:219
|
332 |
+
msgid "Cancelled"
|
333 |
+
msgstr "Annullato"
|
334 |
+
|
335 |
+
#: includes/i18n.php:221
|
336 |
+
msgctxt "e.g. In 2 hours"
|
337 |
+
msgid "In %s"
|
338 |
+
msgstr "In %s"
|
339 |
+
|
340 |
+
#: includes/i18n.php:223
|
341 |
+
msgctxt "e.g. 2 min ago"
|
342 |
+
msgid "%s ago"
|
343 |
+
msgstr "%s fa"
|
344 |
+
|
345 |
+
#: includes/i18n.php:225
|
346 |
+
msgctxt "as plugin version"
|
347 |
+
msgid "Version"
|
348 |
+
msgstr "Versione"
|
349 |
+
|
350 |
+
#: includes/i18n.php:227
|
351 |
+
msgid "Name"
|
352 |
+
msgstr "Nome"
|
353 |
+
|
354 |
+
#: includes/i18n.php:229
|
355 |
+
msgid "Email"
|
356 |
+
msgstr "Email"
|
357 |
+
|
358 |
+
#: includes/i18n.php:231
|
359 |
+
msgid "Email address"
|
360 |
+
msgstr "Indirizzo email"
|
361 |
+
|
362 |
+
#: includes/i18n.php:233
|
363 |
+
msgid "Verified"
|
364 |
+
msgstr "Verificato"
|
365 |
+
|
366 |
+
#: includes/i18n.php:235
|
367 |
+
msgid "Plugin"
|
368 |
+
msgstr "Plugin"
|
369 |
+
|
370 |
+
#: includes/i18n.php:237
|
371 |
+
msgid "Plugins"
|
372 |
+
msgstr "Plugin"
|
373 |
+
|
374 |
+
#: includes/i18n.php:239
|
375 |
+
msgid "Themes"
|
376 |
+
msgstr "Temi"
|
377 |
+
|
378 |
+
#: includes/i18n.php:241
|
379 |
+
msgctxt "as file/folder path"
|
380 |
+
msgid "Path"
|
381 |
+
msgstr "Percorso"
|
382 |
+
|
383 |
+
#: includes/i18n.php:243
|
384 |
+
msgid "Title"
|
385 |
+
msgstr "Titolo"
|
386 |
+
|
387 |
+
#: includes/i18n.php:245
|
388 |
+
msgid "Free version"
|
389 |
+
msgstr "Versione gratuita"
|
390 |
+
|
391 |
+
#: includes/i18n.php:247
|
392 |
+
msgid "Premium version"
|
393 |
+
msgstr "Versione premium"
|
394 |
+
|
395 |
+
#: includes/i18n.php:249
|
396 |
+
msgctxt "as WP plugin slug"
|
397 |
+
msgid "Slug"
|
398 |
+
msgstr "Slug"
|
399 |
+
|
400 |
+
#: includes/i18n.php:251
|
401 |
+
msgid "ID"
|
402 |
+
msgstr "ID"
|
403 |
+
|
404 |
+
#: includes/i18n.php:253
|
405 |
+
msgid "Users"
|
406 |
+
msgstr "Utenti"
|
407 |
+
|
408 |
+
#: includes/i18n.php:255
|
409 |
+
msgid "Plugin Installs"
|
410 |
+
msgstr "Installazioni Plugin"
|
411 |
+
|
412 |
+
#: includes/i18n.php:257
|
413 |
+
msgctxt "like websites"
|
414 |
+
msgid "Sites"
|
415 |
+
msgstr "Siti"
|
416 |
+
|
417 |
+
#: includes/i18n.php:259
|
418 |
+
msgid "User ID"
|
419 |
+
msgstr "ID utente"
|
420 |
+
|
421 |
+
#: includes/i18n.php:261
|
422 |
+
msgid "Site ID"
|
423 |
+
msgstr "ID del sito"
|
424 |
+
|
425 |
+
#: includes/i18n.php:263
|
426 |
+
msgid "Public Key"
|
427 |
+
msgstr "Chiave pubblica"
|
428 |
+
|
429 |
+
#: includes/i18n.php:265
|
430 |
+
msgid "Secret Key"
|
431 |
+
msgstr "Chiave segreta"
|
432 |
+
|
433 |
+
#: includes/i18n.php:267
|
434 |
+
msgctxt "as secret encryption key missing"
|
435 |
+
msgid "No Secret"
|
436 |
+
msgstr "Nessuna chiave"
|
437 |
+
|
438 |
+
#: includes/i18n.php:269
|
439 |
+
msgid "No ID"
|
440 |
+
msgstr "Nessun ID"
|
441 |
+
|
442 |
+
#: includes/i18n.php:271
|
443 |
+
msgctxt "as synchronize license"
|
444 |
+
msgid "Sync License"
|
445 |
+
msgstr "Sincronizza la licenza"
|
446 |
+
|
447 |
+
#: includes/i18n.php:273
|
448 |
+
msgctxt "as synchronize"
|
449 |
+
msgid "Sync"
|
450 |
+
msgstr "Sincronizza"
|
451 |
+
|
452 |
+
#: includes/i18n.php:275
|
453 |
+
msgid "Activate License"
|
454 |
+
msgstr "Attiva licenza"
|
455 |
+
|
456 |
+
#: includes/i18n.php:277
|
457 |
+
msgid "Activate Free Version"
|
458 |
+
msgstr "Attiva versione gratuita"
|
459 |
+
|
460 |
+
#: includes/i18n.php:279
|
461 |
+
msgid ""
|
462 |
+
"Please enter the license key that you received in the email right after the "
|
463 |
+
"purchase:"
|
464 |
+
msgstr "Per favore inserisci la chiave di licenza che hai ricevuto via mail subito dopo l'acquisto:"
|
465 |
+
|
466 |
+
#: includes/i18n.php:283
|
467 |
+
msgid "Activating license..."
|
468 |
+
msgstr "Sto attivando la licenza..."
|
469 |
+
|
470 |
+
#: includes/i18n.php:285
|
471 |
+
msgid "Change License"
|
472 |
+
msgstr "Cambia licenza"
|
473 |
+
|
474 |
+
#: includes/i18n.php:287
|
475 |
+
msgid "Update License"
|
476 |
+
msgstr "Aggiorna licenza"
|
477 |
+
|
478 |
+
#: includes/i18n.php:289
|
479 |
+
msgid "Deactivate License"
|
480 |
+
msgstr "Disattiva licenza"
|
481 |
+
|
482 |
+
#: includes/i18n.php:291
|
483 |
+
msgid "Activate"
|
484 |
+
msgstr "Attiva"
|
485 |
+
|
486 |
+
#: includes/i18n.php:293
|
487 |
+
msgid "Deactivate"
|
488 |
+
msgstr "Disattiva"
|
489 |
+
|
490 |
+
#: includes/i18n.php:295
|
491 |
+
msgid "Skip & Deactivate"
|
492 |
+
msgstr "Salta e disattiva"
|
493 |
+
|
494 |
+
#: includes/i18n.php:297
|
495 |
+
msgid "No - just deactivate"
|
496 |
+
msgstr "No - disattiva e basta"
|
497 |
+
|
498 |
+
#: includes/i18n.php:299
|
499 |
+
msgid "Yes - do your thing"
|
500 |
+
msgstr "Sì - fai pure"
|
501 |
+
|
502 |
+
#: includes/i18n.php:301
|
503 |
+
msgctxt "active mode"
|
504 |
+
msgid "Active"
|
505 |
+
msgstr "Attiva"
|
506 |
+
|
507 |
+
#: includes/i18n.php:303
|
508 |
+
msgctxt "is active mode?"
|
509 |
+
msgid "Is Active"
|
510 |
+
msgstr "è attiva"
|
511 |
+
|
512 |
+
#: includes/i18n.php:305
|
513 |
+
msgid "Install Now"
|
514 |
+
msgstr "Installa ora"
|
515 |
+
|
516 |
+
#: includes/i18n.php:307
|
517 |
+
msgid "Install Update Now"
|
518 |
+
msgstr "Installa l'aggiornamento ora"
|
519 |
+
|
520 |
+
#: includes/i18n.php:309
|
521 |
+
msgid "More information about %s"
|
522 |
+
msgstr "Ulteriori informazioni su %s"
|
523 |
+
|
524 |
+
#: includes/i18n.php:311
|
525 |
+
msgid "Localhost"
|
526 |
+
msgstr "Localhost"
|
527 |
+
|
528 |
+
#: includes/i18n.php:313
|
529 |
+
msgctxt "as activate Professional plan"
|
530 |
+
msgid "Activate %s Plan"
|
531 |
+
msgstr "Attivare il piano %s"
|
532 |
+
|
533 |
+
#: includes/i18n.php:315
|
534 |
+
msgctxt "as 5 licenses left"
|
535 |
+
msgid "%s left"
|
536 |
+
msgstr "%s rimanenti"
|
537 |
+
|
538 |
+
#: includes/i18n.php:317
|
539 |
+
msgid "Last license"
|
540 |
+
msgstr "Ultima licenza"
|
541 |
+
|
542 |
+
#: includes/i18n.php:319
|
543 |
+
msgid "What is your %s?"
|
544 |
+
msgstr "Qual è il tuo %s?"
|
545 |
+
|
546 |
+
#: includes/i18n.php:321
|
547 |
+
msgid "Activate this add-on"
|
548 |
+
msgstr "Attivare questo addon"
|
549 |
+
|
550 |
+
#: includes/i18n.php:323
|
551 |
+
msgid ""
|
552 |
+
"Deactivating your license will block all premium features, but will enable "
|
553 |
+
"you to activate the license on another site. Are you sure you want to "
|
554 |
+
"proceed?"
|
555 |
+
msgstr "La disattivazione della licenza bloccherà tutte le funzionalità premium, ma vi permetterà di attivare la licenza su un altro sito. Sei sicuro di voler procedere?"
|
556 |
+
|
557 |
+
#: includes/i18n.php:327
|
558 |
+
msgid ""
|
559 |
+
"Deleting the account will automatically deactivate your %s plan license so "
|
560 |
+
"you can use it on other sites. If you want to terminate the recurring "
|
561 |
+
"payments as well, click the \"Cancel\" button, and first \"Downgrade\" your "
|
562 |
+
"account. Are you sure you would like to continue with the deletion?"
|
563 |
+
msgstr "L'eliminazione dell'account disattiva automaticamente la tua licenza del piano %s quindi è possibile utilizzarlo su altri siti. Se si desidera anche terminare i pagamenti ricorrenti, fare clic sul pulsante \"Annulla\" ed effettuare il \"Downgrade\" del tuo account. Sei sicuro di voler continuare con l'eliminazione?"
|
564 |
+
|
565 |
+
#: includes/i18n.php:331
|
566 |
+
msgid ""
|
567 |
+
"Deletion is not temporary. Only delete if you no longer want to use this "
|
568 |
+
"plugin anymore. Are you sure you would like to continue with the deletion?"
|
569 |
+
msgstr "L'eliminazione non è temporanea. Cancella solo se non si desidera più utilizzare questo plugin. Sei sicuro di voler continuare con l'eliminazione?"
|
570 |
+
|
571 |
+
#: includes/i18n.php:335
|
572 |
+
msgid ""
|
573 |
+
"Downgrading your plan will immediately stop all future recurring payments "
|
574 |
+
"and your %s plan license will expire in %s."
|
575 |
+
msgstr "Effettuare il downgrade del piano interromperà immediatamente tutti i futuri pagamenti ricorrenti e la licenza del piano %s scadrà in %s."
|
576 |
+
|
577 |
+
#: includes/i18n.php:339
|
578 |
+
msgid ""
|
579 |
+
"Cancelling the trial will immediately block access to all premium features. "
|
580 |
+
"Are you sure?"
|
581 |
+
msgstr "Cancellando il periodo di prova gratuito bloccherai immediatamente l'accesso a tutte le funzionalità premium. Vuoi continuare?"
|
582 |
+
|
583 |
+
#: includes/i18n.php:343
|
584 |
+
msgid ""
|
585 |
+
"You can still enjoy all %s features but you will not have access to plugin "
|
586 |
+
"updates and support."
|
587 |
+
msgstr "Puoi ancora sfruttare tutte le funzionalità di %s, ma non avrai accesso al supporto ed agli aggiornamenti del plugin."
|
588 |
+
|
589 |
+
#: includes/i18n.php:347
|
590 |
+
msgid ""
|
591 |
+
"Once your license expire you can still use the Free version but you will NOT"
|
592 |
+
" have access to the %s features."
|
593 |
+
msgstr "Una volta scaduta la licenza, sarà possibile ancora utilizzare la versione gratuita ma non avrete accesso alle funzionalità di %s."
|
594 |
+
|
595 |
+
#: includes/i18n.php:351
|
596 |
+
msgid "Are you sure you want to proceed?"
|
597 |
+
msgstr "Sei sicuro di voler procedere?"
|
598 |
+
|
599 |
+
#: includes/i18n.php:357
|
600 |
+
msgid "Add Ons for %s"
|
601 |
+
msgstr "Add-on per %s"
|
602 |
+
|
603 |
+
#: includes/i18n.php:359
|
604 |
+
msgid ""
|
605 |
+
"We could'nt load the add-ons list. It's probably an issue on our side, "
|
606 |
+
"please try to come back in few minutes."
|
607 |
+
msgstr "Non siamo riusciti a caricare la lista degli add-on. Si tratta probabilmente di un problema nel nostro sistema, per favore riprova tra qualche minuto."
|
608 |
+
|
609 |
+
#: includes/i18n.php:365
|
610 |
+
msgid "Anonymous feedback"
|
611 |
+
msgstr "Feedback anonimo"
|
612 |
+
|
613 |
+
#: includes/i18n.php:367
|
614 |
+
msgid "Quick feedback"
|
615 |
+
msgstr "Feedback veloce"
|
616 |
+
|
617 |
+
#: includes/i18n.php:369
|
618 |
+
msgid "If you have a moment, please let us know why you are deactivating"
|
619 |
+
msgstr "Se hai un momento, potresti dirci perché lo hai disattivato?"
|
620 |
+
|
621 |
+
#: includes/i18n.php:373
|
622 |
+
msgid "Yes - Deactivate"
|
623 |
+
msgstr "Si - Disattiva"
|
624 |
+
|
625 |
+
#: includes/i18n.php:375
|
626 |
+
msgid "Submit & Deactivate"
|
627 |
+
msgstr "Invia & Disattiva"
|
628 |
+
|
629 |
+
#: includes/i18n.php:377
|
630 |
+
msgid "Cancel"
|
631 |
+
msgstr "Annulla"
|
632 |
+
|
633 |
+
#: includes/i18n.php:379
|
634 |
+
msgid "I no longer need the plugin"
|
635 |
+
msgstr "Non ho piú bisogno di questo plugin"
|
636 |
+
|
637 |
+
#: includes/i18n.php:381
|
638 |
+
msgid "I found a better plugin"
|
639 |
+
msgstr "Ho trovato un plugin migliore"
|
640 |
+
|
641 |
+
#: includes/i18n.php:383
|
642 |
+
msgid "I only needed the plugin for a short period"
|
643 |
+
msgstr "Avevo bisogno del plugin solo per un breve periodo"
|
644 |
+
|
645 |
+
#: includes/i18n.php:385
|
646 |
+
msgid "The plugin broke my site"
|
647 |
+
msgstr "Il plugin ha causato problemi al mio sito"
|
648 |
+
|
649 |
+
#: includes/i18n.php:387
|
650 |
+
msgid "The plugin suddenly stopped working"
|
651 |
+
msgstr "Il plugin ha smesso di funzionare"
|
652 |
+
|
653 |
+
#: includes/i18n.php:389
|
654 |
+
msgid "I can't pay for it anymore"
|
655 |
+
msgstr "Non posso piú pagarlo"
|
656 |
+
|
657 |
+
#: includes/i18n.php:391
|
658 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
659 |
+
msgstr "È una disattivazione temporanea. Sto solo cercando di risolvere un problema."
|
660 |
+
|
661 |
+
#: includes/i18n.php:395
|
662 |
+
msgctxt ""
|
663 |
+
"the text of the \"other\" reason for deactivating the plugin that is shown "
|
664 |
+
"in the modal box."
|
665 |
+
msgid "Other"
|
666 |
+
msgstr "Altro"
|
667 |
+
|
668 |
+
#: includes/i18n.php:399
|
669 |
+
msgid "Kindly tell us the reason so we can improve."
|
670 |
+
msgstr "Spiegandoci il motivo ci aiuterai a migliorare."
|
671 |
+
|
672 |
+
#: includes/i18n.php:401
|
673 |
+
msgid "What's the plugin's name?"
|
674 |
+
msgstr "Qual è il nome del plugin?"
|
675 |
+
|
676 |
+
#: includes/i18n.php:403
|
677 |
+
msgid "What price would you feel comfortable paying?"
|
678 |
+
msgstr "Che prezzo ritieni opportuno pagare?"
|
679 |
+
|
680 |
+
#: includes/i18n.php:405
|
681 |
+
msgid "I couldn't understand how to make it work"
|
682 |
+
msgstr "Non capisco come farlo funzionare"
|
683 |
+
|
684 |
+
#: includes/i18n.php:407
|
685 |
+
msgid ""
|
686 |
+
"The plugin is great, but I need specific feature that you don't support"
|
687 |
+
msgstr "Il plugin é ottimo ma ho bisogno di una funzionalitá specifica che non é supportata"
|
688 |
+
|
689 |
+
#: includes/i18n.php:411
|
690 |
+
msgid "The plugin is not working"
|
691 |
+
msgstr "Il plugin non funziona"
|
692 |
+
|
693 |
+
#: includes/i18n.php:413
|
694 |
+
msgid "It's not what I was looking for"
|
695 |
+
msgstr "Non é quello che stavo cercando"
|
696 |
+
|
697 |
+
#: includes/i18n.php:415
|
698 |
+
msgid "The plugin didn't work as expected"
|
699 |
+
msgstr "Il plugin non funziona come mi aspettavo"
|
700 |
+
|
701 |
+
#: includes/i18n.php:417
|
702 |
+
msgid "What feature?"
|
703 |
+
msgstr "Quale funzionalitá?"
|
704 |
+
|
705 |
+
#: includes/i18n.php:419
|
706 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
707 |
+
msgstr "Condividi cosa non ha funzionato in modo da migliorare il prodotto per gli utenti futuri..."
|
708 |
+
|
709 |
+
#: includes/i18n.php:423
|
710 |
+
msgid "What you've been looking for?"
|
711 |
+
msgstr "Che cosa stai cercando?"
|
712 |
+
|
713 |
+
#: includes/i18n.php:425
|
714 |
+
msgid "What did you expect?"
|
715 |
+
msgstr "Che cosa ti aspettavi?"
|
716 |
+
|
717 |
+
#: includes/i18n.php:427
|
718 |
+
msgid "The plugin didn't work"
|
719 |
+
msgstr "Il plugin non funziona"
|
720 |
+
|
721 |
+
#: includes/i18n.php:429
|
722 |
+
msgid "I don't like to share my information with you"
|
723 |
+
msgstr "Non voglio condividere i miei dati con te"
|
724 |
+
|
725 |
+
#: includes/i18n.php:431
|
726 |
+
msgid ""
|
727 |
+
"You might have missed it, but you don't have to share any data and can just "
|
728 |
+
"%s the opt-in."
|
729 |
+
msgstr "Potresti non averci fatto caso, ma non sei obbligato a condividere i tuoi dati e puoi semplicemente %s la tua partecipazione."
|
730 |
+
|
731 |
+
#: includes/i18n.php:441
|
732 |
+
msgctxt "greeting"
|
733 |
+
msgid "Hey %s,"
|
734 |
+
msgstr "Hey %s,"
|
735 |
+
|
736 |
+
#: includes/i18n.php:443
|
737 |
+
msgctxt "a greeting. E.g. Thanks John!"
|
738 |
+
msgid "Thanks %s!"
|
739 |
+
msgstr "Grazie %s!"
|
740 |
+
|
741 |
+
#: includes/i18n.php:445
|
742 |
+
msgid ""
|
743 |
+
"Never miss an important update - opt-in to our security and feature updates "
|
744 |
+
"notifications, and non-sensitive diagnostic tracking with %4$s."
|
745 |
+
msgstr "Non perdere nessun aggiornamento importante - iscriviti per ricevere notifiche su aggiornamenti relativi alla sicurezza e nuove versioni, oltre al tracciamento di diagnostica non sensibile con %4$s."
|
746 |
+
|
747 |
+
#: includes/i18n.php:449
|
748 |
+
msgid ""
|
749 |
+
"Please help us improve %1$s! If you opt-in, some data about your usage of "
|
750 |
+
"%1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still "
|
751 |
+
"work just fine."
|
752 |
+
msgstr "Aiutaci a migliorare %1$s! Se ti iscrivi, alcuni dati riguardanti il tuo utilizzo di %1$s verranno inviati a %4$s. Se salti questo passaggio, non c'è problema! %1$s funzionerà ugualmente."
|
753 |
+
|
754 |
+
#: includes/i18n.php:453
|
755 |
+
msgid ""
|
756 |
+
"You should receive an activation email for %s to your mailbox at %s. Please "
|
757 |
+
"make sure you click the activation button in that email to %s."
|
758 |
+
msgstr "Dovresti ricevere un'email di attivazione di %s all'indirizzo %s. Assicurati di fare clic sul pulsante di attivazione nell'email per &s."
|
759 |
+
|
760 |
+
#: includes/i18n.php:455
|
761 |
+
msgid "complete the install"
|
762 |
+
msgstr "completa l'installazione"
|
763 |
+
|
764 |
+
#: includes/i18n.php:457
|
765 |
+
msgid "start the trial"
|
766 |
+
msgstr "Inizia il periodo di prova gratuito"
|
767 |
+
|
768 |
+
#: includes/i18n.php:459
|
769 |
+
msgid ""
|
770 |
+
"Thanks for purchasing %s! To get started, please enter your license key:"
|
771 |
+
msgstr "Grazie per aver acquistato %s! Per iniziare, per favore inserisci la tua chiave di licenza:"
|
772 |
+
|
773 |
+
#: includes/i18n.php:463
|
774 |
+
msgid ""
|
775 |
+
"The plugin will be periodically sending data to %s to check for plugin "
|
776 |
+
"updates and verify the validity of your license."
|
777 |
+
msgstr "Il plugin invierà dati periodicamente a %s per controllare l'esistenza di aggiornamenti e verificare la validità della tua licenza."
|
778 |
+
|
779 |
+
#: includes/i18n.php:467
|
780 |
+
msgid "What permissions are being granted?"
|
781 |
+
msgstr "Quali autorizzazioni vengono concesse?"
|
782 |
+
|
783 |
+
#: includes/i18n.php:469
|
784 |
+
msgid "Your Profile Overview"
|
785 |
+
msgstr "Panoramica del tuo profilo"
|
786 |
+
|
787 |
+
#: includes/i18n.php:471
|
788 |
+
msgid "Name and email address"
|
789 |
+
msgstr "Nome ed indirizzo email"
|
790 |
+
|
791 |
+
#: includes/i18n.php:473
|
792 |
+
msgid "Your Site Overview"
|
793 |
+
msgstr "Panoramica del tuo sito"
|
794 |
+
|
795 |
+
#: includes/i18n.php:475
|
796 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
797 |
+
msgstr "URL del sito, versione di WP, informazioni PHP, plugin e temi"
|
798 |
+
|
799 |
+
#: includes/i18n.php:479
|
800 |
+
msgid "Current Plugin Events"
|
801 |
+
msgstr "Eventi correnti del plugin"
|
802 |
+
|
803 |
+
#: includes/i18n.php:481
|
804 |
+
msgid "Activation, deactivation and uninstall"
|
805 |
+
msgstr "Attiva, disattivazione e disinstallazione"
|
806 |
+
|
807 |
+
#: includes/i18n.php:483
|
808 |
+
msgid "Plugins & Themes"
|
809 |
+
msgstr "Plugin e temi"
|
810 |
+
|
811 |
+
#: includes/i18n.php:485
|
812 |
+
msgid "Titles, versions and state."
|
813 |
+
msgstr "Titoli, versioni e stato."
|
814 |
+
|
815 |
+
#: includes/i18n.php:487
|
816 |
+
msgid "Admin Notices"
|
817 |
+
msgstr "Avvisi amministratore"
|
818 |
+
|
819 |
+
#: includes/i18n.php:489
|
820 |
+
msgid "Newsletter"
|
821 |
+
msgstr "Newsletter"
|
822 |
+
|
823 |
+
#: includes/i18n.php:491
|
824 |
+
msgid "Updates, announcements, marketing, no spam"
|
825 |
+
msgstr "Aggiornamenti, annunci, marketing, no spam"
|
826 |
+
|
827 |
+
#: includes/i18n.php:493
|
828 |
+
msgid "Privacy Policy"
|
829 |
+
msgstr "Politica sulla privacy"
|
830 |
+
|
831 |
+
#: includes/i18n.php:495
|
832 |
+
msgid "Terms of Service"
|
833 |
+
msgstr "Termini del Servizio"
|
834 |
+
|
835 |
+
#: includes/i18n.php:497
|
836 |
+
msgctxt "as activating plugin"
|
837 |
+
msgid "Activating"
|
838 |
+
msgstr "Attivazione"
|
839 |
+
|
840 |
+
#: includes/i18n.php:499
|
841 |
+
msgctxt "as in the process of sending an email"
|
842 |
+
msgid "Sending email"
|
843 |
+
msgstr "Invio email"
|
844 |
+
|
845 |
+
#: includes/i18n.php:503
|
846 |
+
msgctxt "button label"
|
847 |
+
msgid "Allow & Continue"
|
848 |
+
msgstr "Consenti & Continua"
|
849 |
+
|
850 |
+
#: includes/i18n.php:505
|
851 |
+
msgctxt "button label"
|
852 |
+
msgid "Agree & Activate License"
|
853 |
+
msgstr "Accetta e attiva la licenza"
|
854 |
+
|
855 |
+
#: includes/i18n.php:507
|
856 |
+
msgctxt "verb"
|
857 |
+
msgid "Skip"
|
858 |
+
msgstr "Salta"
|
859 |
+
|
860 |
+
#: includes/i18n.php:509
|
861 |
+
msgid "Click here to use the plugin anonymously"
|
862 |
+
msgstr "Fai clic qui per usare il plugin anonimamente"
|
863 |
+
|
864 |
+
#: includes/i18n.php:511
|
865 |
+
msgid "Re-send activation email"
|
866 |
+
msgstr "Invia nuovamente l'email di attivazione"
|
867 |
+
|
868 |
+
#: includes/i18n.php:513
|
869 |
+
msgid "License key"
|
870 |
+
msgstr "Chiave di licenza"
|
871 |
+
|
872 |
+
#: includes/i18n.php:515
|
873 |
+
msgid "Send License Key"
|
874 |
+
msgstr "Invia chiave di licenza"
|
875 |
+
|
876 |
+
#: includes/i18n.php:517
|
877 |
+
msgid "Sending license key"
|
878 |
+
msgstr "Invio chiave di licenza"
|
879 |
+
|
880 |
+
#: includes/i18n.php:519
|
881 |
+
msgid "Have a license key?"
|
882 |
+
msgstr "Hai una chiave di licenza?"
|
883 |
+
|
884 |
+
#: includes/i18n.php:521
|
885 |
+
msgid "Don't have a license key?"
|
886 |
+
msgstr "Non hai una chiave di licenza?"
|
887 |
+
|
888 |
+
#: includes/i18n.php:523
|
889 |
+
msgid "Can't find your license key?"
|
890 |
+
msgstr "Non trovi la tua chiave di licenza?"
|
891 |
+
|
892 |
+
#: includes/i18n.php:525
|
893 |
+
msgid ""
|
894 |
+
"We couldn't find your email address in the system, are you sure it's the "
|
895 |
+
"right address?"
|
896 |
+
msgstr "Non siamo riusciti a trovare il tuo indirizzo email nel sistema, sei sicuro che sia l'indirizzo giusto?"
|
897 |
+
|
898 |
+
#: includes/i18n.php:529
|
899 |
+
msgid ""
|
900 |
+
"We can't see any active licenses associated with that email address, are you"
|
901 |
+
" sure it's the right address?"
|
902 |
+
msgstr "Non siamo riusciti a trovare alcuna licenza attiva associata al tuo indirizzo email, sei sicuro che sia l'indirizzo giusto?"
|
903 |
+
|
904 |
+
#: includes/i18n.php:533
|
905 |
+
msgid "Opt In"
|
906 |
+
msgstr "Iscriviti"
|
907 |
+
|
908 |
+
#: includes/i18n.php:535
|
909 |
+
msgid "Opt Out"
|
910 |
+
msgstr "Cancella iscrizione"
|
911 |
+
|
912 |
+
#: includes/i18n.php:537
|
913 |
+
msgid "On second thought - I want to continue helping"
|
914 |
+
msgstr "Ci ho ripensato, voglio continuare a fornire il mio aiuto"
|
915 |
+
|
916 |
+
#: includes/i18n.php:541
|
917 |
+
msgid "Opting out..."
|
918 |
+
msgstr "Cancellamento dell'iscrizione..."
|
919 |
+
|
920 |
+
#: includes/i18n.php:543
|
921 |
+
msgid "Opting in..."
|
922 |
+
msgstr "Iscrizione in corso..."
|
923 |
+
|
924 |
+
#: includes/i18n.php:545
|
925 |
+
msgid ""
|
926 |
+
"We appreciate your help in making the %s better by letting us track some "
|
927 |
+
"usage data."
|
928 |
+
msgstr "Ti ringraziamo per averci concesso di tracciare alcuni dati di utilizzo al fine di migliorare %s"
|
929 |
+
|
930 |
+
#: includes/i18n.php:549
|
931 |
+
msgid ""
|
932 |
+
"Usage tracking is done in the name of making %s better. Making a better user"
|
933 |
+
" experience, prioritizing new features, and more good things. We'd really "
|
934 |
+
"appreciate if you'll reconsider letting us continue with the tracking."
|
935 |
+
msgstr "Tracciamo l'utilizzo esclusivamente per rendere %s migliore, creando una migliore esperienza utente e dando priorità a nuove funzionalità, oltre a molte altre buone cose. Saremmo veramente felici di vederti cambiare idea e lasciarci continuare con il tracciamento."
|
936 |
+
|
937 |
+
#: includes/i18n.php:553
|
938 |
+
msgid ""
|
939 |
+
"By clicking \"Opt Out\", we will no longer be sending any data from %s to "
|
940 |
+
"%s."
|
941 |
+
msgstr "Cliccando su \"Cancella iscrizione\", non invieremo più nessuna informazione da %s a %s."
|
942 |
+
|
943 |
+
#: includes/i18n.php:563
|
944 |
+
msgid "Screenshots"
|
945 |
+
msgstr "Screenshots"
|
946 |
+
|
947 |
+
#: includes/i18n.php:565
|
948 |
+
msgid "Click to view full-size screenshot %d"
|
949 |
+
msgstr "Fare clic per visualizzare lo screenshot in grandi dimensioni %d"
|
950 |
+
|
951 |
+
#: includes/i18n.php:573
|
952 |
+
msgid "Freemius Debug"
|
953 |
+
msgstr "Debug Freemius"
|
954 |
+
|
955 |
+
#: includes/i18n.php:575
|
956 |
+
msgctxt "as turned on"
|
957 |
+
msgid "On"
|
958 |
+
msgstr "Attivo"
|
959 |
+
|
960 |
+
#: includes/i18n.php:577
|
961 |
+
msgctxt "as turned off"
|
962 |
+
msgid "Off"
|
963 |
+
msgstr "Non attivo"
|
964 |
+
|
965 |
+
#: includes/i18n.php:579
|
966 |
+
msgctxt "as code debugging"
|
967 |
+
msgid "Debugging"
|
968 |
+
msgstr "Debugging"
|
969 |
+
|
970 |
+
#: includes/i18n.php:581
|
971 |
+
msgid "Freemius State"
|
972 |
+
msgstr "Stato di Freemius"
|
973 |
+
|
974 |
+
#: includes/i18n.php:583
|
975 |
+
msgctxt "as connection was successful"
|
976 |
+
msgid "Connected"
|
977 |
+
msgstr "Connesso"
|
978 |
+
|
979 |
+
#: includes/i18n.php:585
|
980 |
+
msgctxt "as connection blocked"
|
981 |
+
msgid "Blocked"
|
982 |
+
msgstr "Bloccato"
|
983 |
+
|
984 |
+
#: includes/i18n.php:587
|
985 |
+
msgctxt "as application program interface"
|
986 |
+
msgid "API"
|
987 |
+
msgstr "API"
|
988 |
+
|
989 |
+
#: includes/i18n.php:589
|
990 |
+
msgctxt "as software development kit versions"
|
991 |
+
msgid "SDK"
|
992 |
+
msgstr "SDK"
|
993 |
+
|
994 |
+
#: includes/i18n.php:591
|
995 |
+
msgctxt "as software development kit versions"
|
996 |
+
msgid "SDK Versions"
|
997 |
+
msgstr "Versioni SDK"
|
998 |
+
|
999 |
+
#: includes/i18n.php:595
|
1000 |
+
msgctxt "as plugin folder path"
|
1001 |
+
msgid "Plugin Path"
|
1002 |
+
msgstr "Percorso del plugin"
|
1003 |
+
|
1004 |
+
#: includes/i18n.php:597
|
1005 |
+
msgctxt "as sdk path"
|
1006 |
+
msgid "SDK Path"
|
1007 |
+
msgstr "Percorso SDK"
|
1008 |
+
|
1009 |
+
#: includes/i18n.php:599
|
1010 |
+
msgid "Add Ons of Plugin %s"
|
1011 |
+
msgstr "Add-on del Plugin %s"
|
1012 |
+
|
1013 |
+
#: includes/i18n.php:601
|
1014 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1015 |
+
msgstr "Sei sicuro di voler eliminare tutti i dati di Freemius?"
|
1016 |
+
|
1017 |
+
#: includes/i18n.php:605
|
1018 |
+
msgid "Actions"
|
1019 |
+
msgstr "Azioni"
|
1020 |
+
|
1021 |
+
#: includes/i18n.php:607
|
1022 |
+
msgid "Delete All Accounts"
|
1023 |
+
msgstr "Eliminare tutti gli account"
|
1024 |
+
|
1025 |
+
#: includes/i18n.php:609
|
1026 |
+
msgid "Start Fresh"
|
1027 |
+
msgstr "Inizia da capo"
|
1028 |
+
|
1029 |
+
#: includes/i18n.php:611
|
1030 |
+
msgid "Clear API Cache"
|
1031 |
+
msgstr "Elimina cache API"
|
1032 |
+
|
1033 |
+
#: includes/i18n.php:613
|
1034 |
+
msgid "Sync Data From Server"
|
1035 |
+
msgstr "Sincronizza i dati dal server"
|
1036 |
+
|
1037 |
+
#: includes/i18n.php:615
|
1038 |
+
msgid "Scheduled Crons"
|
1039 |
+
msgstr "Azioni programmate"
|
1040 |
+
|
1041 |
+
#: includes/i18n.php:617
|
1042 |
+
msgid "Plugins & Themes Sync"
|
1043 |
+
msgstr "Sincronizzazione plugin e temi"
|
1044 |
+
|
1045 |
+
#: includes/i18n.php:625
|
1046 |
+
msgctxt "as congratulations"
|
1047 |
+
msgid "Congrats"
|
1048 |
+
msgstr "Congratulazioni"
|
1049 |
+
|
1050 |
+
#: includes/i18n.php:627
|
1051 |
+
msgctxt "exclamation"
|
1052 |
+
msgid "Oops"
|
1053 |
+
msgstr "Ops"
|
1054 |
+
|
1055 |
+
#: includes/i18n.php:629
|
1056 |
+
msgctxt "interjection expressing joy or exuberance"
|
1057 |
+
msgid "Yee-haw"
|
1058 |
+
msgstr "Evvai"
|
1059 |
+
|
1060 |
+
#: includes/i18n.php:633
|
1061 |
+
msgctxt ""
|
1062 |
+
"(especially in electronic communication) used to express elation, "
|
1063 |
+
"enthusiasm, or triumph."
|
1064 |
+
msgid "W00t"
|
1065 |
+
msgstr "Forte"
|
1066 |
+
|
1067 |
+
#: includes/i18n.php:637
|
1068 |
+
msgctxt "a positive response"
|
1069 |
+
msgid "Right on"
|
1070 |
+
msgstr "Sì"
|
1071 |
+
|
1072 |
+
#: includes/i18n.php:639
|
1073 |
+
msgctxt ""
|
1074 |
+
"something somebody says when they are thinking about what you have just "
|
1075 |
+
"said. "
|
1076 |
+
msgid "Hmm"
|
1077 |
+
msgstr "Uhm"
|
1078 |
+
|
1079 |
+
#: includes/i18n.php:643
|
1080 |
+
msgid "O.K"
|
1081 |
+
msgstr "OK"
|
1082 |
+
|
1083 |
+
#: includes/i18n.php:645
|
1084 |
+
msgctxt "exclamation"
|
1085 |
+
msgid "Hey"
|
1086 |
+
msgstr "Hey"
|
1087 |
+
|
1088 |
+
#: includes/i18n.php:647
|
1089 |
+
msgctxt "advance notice of something that will need attention."
|
1090 |
+
msgid "Heads up"
|
1091 |
+
msgstr "Attenzione"
|
1092 |
+
|
1093 |
+
#: includes/i18n.php:657
|
1094 |
+
msgid "Seems like you got the latest release."
|
1095 |
+
msgstr "Sembra che tu abbia la versione più recente."
|
1096 |
+
|
1097 |
+
#: includes/i18n.php:659
|
1098 |
+
msgid "You are all good!"
|
1099 |
+
msgstr "Sei fantastico!"
|
1100 |
+
|
1101 |
+
#: includes/i18n.php:661
|
1102 |
+
msgid ""
|
1103 |
+
"Sorry, we could not complete the email update. Another user with the same "
|
1104 |
+
"email is already registered."
|
1105 |
+
msgstr "Siamo spiacenti, non siamo riusciti a completare l'aggiornamento via email. Un altro utente con lo stesso indirizzo email è già registrato."
|
1106 |
+
|
1107 |
+
#: includes/i18n.php:665
|
1108 |
+
msgid ""
|
1109 |
+
"If you would like to give up the ownership of the plugin's account to %s "
|
1110 |
+
"click the Change Ownership button."
|
1111 |
+
msgstr "Se vuoi cedere la proprietá dell'account del plugin a %s clicca su Cambia Proprietà."
|
1112 |
+
|
1113 |
+
#: includes/i18n.php:669
|
1114 |
+
msgid ""
|
1115 |
+
"Your email was successfully updated. You should receive an email with "
|
1116 |
+
"confirmation instructions in few moments."
|
1117 |
+
msgstr "Il tuo indirizzo email è stato aggiornato correttamente. Riceverai un'email con le istruzioni di conferma in pochi istanti."
|
1118 |
+
|
1119 |
+
#: includes/i18n.php:673
|
1120 |
+
msgid "Your name was successfully updated."
|
1121 |
+
msgstr "Il tuo nome è stato aggiornato correttamente."
|
1122 |
+
|
1123 |
+
#: includes/i18n.php:675
|
1124 |
+
msgid "You have successfully updated your %s."
|
1125 |
+
msgstr "Hai aggiornato con successo il tuo %s."
|
1126 |
+
|
1127 |
+
#: includes/i18n.php:677
|
1128 |
+
msgid "Please provide your full name."
|
1129 |
+
msgstr "Per favore inserisci il tuo nome completo."
|
1130 |
+
|
1131 |
+
#: includes/i18n.php:679
|
1132 |
+
msgid ""
|
1133 |
+
"Verification mail was just sent to %s. If you can't find it after 5 min, "
|
1134 |
+
"please check your spam box."
|
1135 |
+
msgstr "L'email di verifica è stata inviata a %s. Se dopo 5 minuti non è ancora arrivata, per favore controlla nella tua casella di posta indesiderata."
|
1136 |
+
|
1137 |
+
#: includes/i18n.php:683
|
1138 |
+
msgid ""
|
1139 |
+
"Just letting you know that the add-ons information of %s is being pulled "
|
1140 |
+
"from an external server."
|
1141 |
+
msgstr "Le informazioni sugli add-on di %s vengono scaricate da un server esterno."
|
1142 |
+
|
1143 |
+
#: includes/i18n.php:687
|
1144 |
+
msgid "No credit card required"
|
1145 |
+
msgstr "Nessuna carta di credito richiesta"
|
1146 |
+
|
1147 |
+
#: includes/i18n.php:689
|
1148 |
+
msgid "Premium plugin version was successfully activated."
|
1149 |
+
msgstr "La versione Premium del plugin è stata attivata correttamente."
|
1150 |
+
|
1151 |
+
#: includes/i18n.php:693
|
1152 |
+
msgid "The upgrade of %s was successfully completed."
|
1153 |
+
msgstr "L'aggiornamento di %s è stato completato con successo."
|
1154 |
+
|
1155 |
+
#: includes/i18n.php:695
|
1156 |
+
msgid "Your account was successfully activated with the %s plan."
|
1157 |
+
msgstr "Il tuo account è stato attivato correttamente con il piano %s."
|
1158 |
+
|
1159 |
+
#: includes/i18n.php:699
|
1160 |
+
msgid "Download the latest %s version now"
|
1161 |
+
msgstr "Scarica l'ultima versione di %s"
|
1162 |
+
|
1163 |
+
#: includes/i18n.php:701
|
1164 |
+
msgid "Please follow these steps to complete the upgrade"
|
1165 |
+
msgstr "Segui i passi seguenti per completare l'aggiornamento"
|
1166 |
+
|
1167 |
+
#: includes/i18n.php:705
|
1168 |
+
msgid "Download the latest %s version"
|
1169 |
+
msgstr "Scarica l'ultima versione di %s"
|
1170 |
+
|
1171 |
+
#: includes/i18n.php:707
|
1172 |
+
msgid "Download the latest version"
|
1173 |
+
msgstr "Scarica l'ultima versione"
|
1174 |
+
|
1175 |
+
#: includes/i18n.php:709
|
1176 |
+
msgid "Deactivate the free version"
|
1177 |
+
msgstr "Disattiva la versione gratuita"
|
1178 |
+
|
1179 |
+
#: includes/i18n.php:711
|
1180 |
+
msgid "Upload and activate the downloaded version"
|
1181 |
+
msgstr "Carica e attiva la versione scaricata"
|
1182 |
+
|
1183 |
+
#: includes/i18n.php:713
|
1184 |
+
msgid "How to upload and activate?"
|
1185 |
+
msgstr "Come faccio a caricare ed attivare?"
|
1186 |
+
|
1187 |
+
#: includes/i18n.php:715
|
1188 |
+
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1189 |
+
msgid "%s Add-on was successfully purchased."
|
1190 |
+
msgstr "L' add-on %s è stato acquistato con successo."
|
1191 |
+
|
1192 |
+
#: includes/i18n.php:719
|
1193 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
1194 |
+
msgstr "Il piano del tuo add-on %s è stato aggiornato con successo."
|
1195 |
+
|
1196 |
+
#: includes/i18n.php:723
|
1197 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
1198 |
+
msgstr "Il tuo indirizzo email è stato verificato con successo - SEI UN GRANDE!"
|
1199 |
+
|
1200 |
+
#: includes/i18n.php:727
|
1201 |
+
msgid "Your plan was successfully upgraded."
|
1202 |
+
msgstr "Il piano è stato aggiornato con successo."
|
1203 |
+
|
1204 |
+
#: includes/i18n.php:729
|
1205 |
+
msgid "Your plan was successfully changed to %s."
|
1206 |
+
msgstr "Il piano è stato cambiato con successo a %s."
|
1207 |
+
|
1208 |
+
#: includes/i18n.php:731
|
1209 |
+
msgid ""
|
1210 |
+
"Your license has expired. You can still continue using the free plugin "
|
1211 |
+
"forever."
|
1212 |
+
msgstr "La licenza è scaduta. È comunque possibile continuare ad utilizzare il plugin gratuito per sempre."
|
1213 |
+
|
1214 |
+
#: includes/i18n.php:735
|
1215 |
+
msgid ""
|
1216 |
+
"Your license has been cancelled. If you think it's a mistake, please contact"
|
1217 |
+
" support."
|
1218 |
+
msgstr "La tua licenza è stata cancellata. Se credi sia un errore, per favore contatta il supporto."
|
1219 |
+
|
1220 |
+
#: includes/i18n.php:739
|
1221 |
+
msgid "Your trial has been successfully started."
|
1222 |
+
msgstr "La versione di prova è stata avviata correttamente."
|
1223 |
+
|
1224 |
+
#: includes/i18n.php:741
|
1225 |
+
msgid "Your license was successfully activated."
|
1226 |
+
msgstr "La tua licenza è stata attivata correttamente."
|
1227 |
+
|
1228 |
+
#: includes/i18n.php:743
|
1229 |
+
msgid "It looks like your site currently doesn't have an active license."
|
1230 |
+
msgstr "Sembra che il tuo sito non disponga di alcuna licenza attiva."
|
1231 |
+
|
1232 |
+
#: includes/i18n.php:747
|
1233 |
+
msgid ""
|
1234 |
+
"Your license was successfully deactivated, you are back to the %s plan."
|
1235 |
+
msgstr "La tua licenza é stata disattivata con successo, sei tornato al piano %s."
|
1236 |
+
|
1237 |
+
#: includes/i18n.php:751
|
1238 |
+
msgid "It looks like the license deactivation failed."
|
1239 |
+
msgstr "Sembra che la disattivazione della licenza non sia riuscita."
|
1240 |
+
|
1241 |
+
#: includes/i18n.php:755
|
1242 |
+
msgid "It looks like the license could not be activated."
|
1243 |
+
msgstr "Sembra che la licenza non possa essere attivata."
|
1244 |
+
|
1245 |
+
#: includes/i18n.php:759
|
1246 |
+
msgid "Error received from the server:"
|
1247 |
+
msgstr "Errore ricevuto dal server:"
|
1248 |
+
|
1249 |
+
#: includes/i18n.php:761
|
1250 |
+
msgid ""
|
1251 |
+
"Your trial has expired. You can still continue using all our free features."
|
1252 |
+
msgstr "La versione di prova è scaduta. Si può comunque continuare a utilizzare tutte le nostre funzioni gratuite."
|
1253 |
+
|
1254 |
+
#: includes/i18n.php:765
|
1255 |
+
msgid ""
|
1256 |
+
"Your plan was successfully downgraded. Your %s plan license will expire in "
|
1257 |
+
"%s."
|
1258 |
+
msgstr "Il tuo piano è stato declassato con successo. La licenza del piano %s scadrà in %s."
|
1259 |
+
|
1260 |
+
#: includes/i18n.php:769
|
1261 |
+
msgid ""
|
1262 |
+
"Seems like we are having some temporary issue with your plan downgrade. "
|
1263 |
+
"Please try again in few minutes."
|
1264 |
+
msgstr "Stiamo avendo qualche problema temporaneo con il downgrade del piano. Riprova tra qualche minuto."
|
1265 |
+
|
1266 |
+
#: includes/i18n.php:773
|
1267 |
+
msgid ""
|
1268 |
+
"It looks like you are not in trial mode anymore so there's nothing to cancel"
|
1269 |
+
" :)"
|
1270 |
+
msgstr "Sembra che tu non stia più usando la prova gratuita, quindi non c'è niente che tu debba annullare :)"
|
1271 |
+
|
1272 |
+
#: includes/i18n.php:777
|
1273 |
+
msgid "Your %s free trial was successfully cancelled."
|
1274 |
+
msgstr "Il tuo periodo di prova gratuito %s è stato annullato con successo."
|
1275 |
+
|
1276 |
+
#: includes/i18n.php:781
|
1277 |
+
msgctxt "%s - numeric version number"
|
1278 |
+
msgid "Version %s was released."
|
1279 |
+
msgstr "La versione %s é stata rilasciata."
|
1280 |
+
|
1281 |
+
#: includes/i18n.php:785
|
1282 |
+
msgid "Please download %s."
|
1283 |
+
msgstr "Scarica %s."
|
1284 |
+
|
1285 |
+
#: includes/i18n.php:787
|
1286 |
+
msgctxt "%s - plan name, as the latest professional version here"
|
1287 |
+
msgid "the latest %s version here"
|
1288 |
+
msgstr "l'ultima versione %s é quì"
|
1289 |
+
|
1290 |
+
#: includes/i18n.php:791
|
1291 |
+
msgid ""
|
1292 |
+
"How do you like %s so far? Test all our %s premium features with a %d-day "
|
1293 |
+
"free trial."
|
1294 |
+
msgstr "Come sta andando con %s? Prova tutte le funzionalità premium di %s con una prova gratuita di %d giorni."
|
1295 |
+
|
1296 |
+
#: includes/i18n.php:795
|
1297 |
+
msgctxt "call to action"
|
1298 |
+
msgid "Start free trial"
|
1299 |
+
msgstr "Inizia il periodo di prova gratuito"
|
1300 |
+
|
1301 |
+
#: includes/i18n.php:797
|
1302 |
+
msgid "Starting trial"
|
1303 |
+
msgstr "Inizio del periodo di prova gratuito"
|
1304 |
+
|
1305 |
+
#: includes/i18n.php:799
|
1306 |
+
msgid "Please wait"
|
1307 |
+
msgstr "Attendere"
|
1308 |
+
|
1309 |
+
#: includes/i18n.php:801
|
1310 |
+
msgid ""
|
1311 |
+
"Seems like we are having some temporary issue with your trial cancellation. "
|
1312 |
+
"Please try again in few minutes."
|
1313 |
+
msgstr "Stiamo avendo qualche problema temporaneo con l'annullamento del periodo di prova. Riprova tra qualche minuto."
|
1314 |
+
|
1315 |
+
#: includes/i18n.php:805
|
1316 |
+
msgid "You already utilized a trial before."
|
1317 |
+
msgstr "Hai già utilizzato una prova gratuita in passato."
|
1318 |
+
|
1319 |
+
#: includes/i18n.php:807
|
1320 |
+
msgid "You are already running the plugin in a trial mode."
|
1321 |
+
msgstr "Stai già usando il plugin in modalità di prova gratuita."
|
1322 |
+
|
1323 |
+
#: includes/i18n.php:811
|
1324 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1325 |
+
msgstr "Il piano %s non esiste, per questo motivo non è possibile iniziare il periodo di prova."
|
1326 |
+
|
1327 |
+
#: includes/i18n.php:815
|
1328 |
+
msgid "Plan %s does not support a trial period."
|
1329 |
+
msgstr "Il piano %s non supporta il periodo di prova."
|
1330 |
+
|
1331 |
+
#: includes/i18n.php:817
|
1332 |
+
msgid "None of the plugin's plans supports a trial period."
|
1333 |
+
msgstr "Non esiste alcun piano del plugin che offra il periodo di prova."
|
1334 |
+
|
1335 |
+
#: includes/i18n.php:821
|
1336 |
+
msgid ""
|
1337 |
+
"Unexpected API error. Please contact the plugin's author with the following "
|
1338 |
+
"error."
|
1339 |
+
msgstr "Errore inaspettato dell'API. Per favore contatta l'autore del plugin riportando il seguente errore."
|
1340 |
+
|
1341 |
+
#: includes/i18n.php:825
|
1342 |
+
msgid "No commitment for %s days - cancel anytime!"
|
1343 |
+
msgstr "Nessun impegno per %s giorni - puoi annullare in qualsiasi momento!"
|
1344 |
+
|
1345 |
+
#: includes/i18n.php:827
|
1346 |
+
msgid ""
|
1347 |
+
"Your license has expired. You can still continue using all the %s features, "
|
1348 |
+
"but you'll need to renew your license to continue getting updates and "
|
1349 |
+
"support."
|
1350 |
+
msgstr "La licenza è scaduta. È comunque possibile continuare a utilizzare tutte le funzionalità di %s, ma sarà necessario rinnovare la licenza per continuare a ricevere gli aggiornamenti ed il supporto."
|
1351 |
+
|
1352 |
+
#: includes/i18n.php:831
|
1353 |
+
msgid "Couldn't activate %s."
|
1354 |
+
msgstr "Non é stato possibile attivare %s."
|
1355 |
+
|
1356 |
+
#: includes/i18n.php:833
|
1357 |
+
msgid "Please contact us with the following message:"
|
1358 |
+
msgstr "Contattaci con il seguente messaggio:"
|
1359 |
+
|
1360 |
+
#: includes/i18n.php:835
|
1361 |
+
msgid ""
|
1362 |
+
"It looks like you are still on the %s plan. If you did upgrade or change "
|
1363 |
+
"your plan, it's probably an issue on our side - sorry."
|
1364 |
+
msgstr "Sembra che tu sia ancora usando il piano %s. Se hai effettuato un upgrade o cambiato il piano, è probabile che ci sia un problema nei nostri sistemi."
|
1365 |
+
|
1366 |
+
#: includes/i18n.php:839
|
1367 |
+
msgid "Please contact us here"
|
1368 |
+
msgstr "Contattaci qui"
|
1369 |
+
|
1370 |
+
#: includes/i18n.php:841
|
1371 |
+
msgid ""
|
1372 |
+
"I have upgraded my account but when I try to Sync the License, the plan "
|
1373 |
+
"remains %s."
|
1374 |
+
msgstr "Ho aggiornato il mio account, ma quando cerco di sincronizzare la licenza, il piano rimane %s."
|
1375 |
+
|
1376 |
+
#: includes/i18n.php:849
|
1377 |
+
msgid "From unknown reason, the API connectivity test failed."
|
1378 |
+
msgstr "Il test di connettività dell'API ha fallito per motivi sconosciuti."
|
1379 |
+
|
1380 |
+
#: includes/i18n.php:853
|
1381 |
+
msgid ""
|
1382 |
+
"It's probably a temporary issue on our end. Just to be sure, with your "
|
1383 |
+
"permission, would it be o.k to run another connectivity test?"
|
1384 |
+
msgstr "Si tratta probabilmente di un problema nei nostri sistemi. Per esserne sicuri, potresti darci il permesso di effettuare un ulteriore test della connettività? "
|
1385 |
+
|
1386 |
+
#: includes/i18n.php:857
|
1387 |
+
msgid ""
|
1388 |
+
"We use PHP cURL library for the API calls, which is a very common library "
|
1389 |
+
"and usually installed out of the box. Unfortunately, cURL is not installed "
|
1390 |
+
"on your server."
|
1391 |
+
msgstr "Utilizziamo la libreria PHP cURL per le chiamate alla nostra API. Questa libreria è molto comune ed è installata di base. Sfortunatamente cURL non è presente nel tuo server."
|
1392 |
+
|
1393 |
+
#: includes/i18n.php:861
|
1394 |
+
msgid ""
|
1395 |
+
"From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1396 |
+
msgstr "Per un motivo sconosciuto, CloudFlare, il firewall che utilizziamo, blocca la connessione."
|
1397 |
+
|
1398 |
+
#: includes/i18n.php:865
|
1399 |
+
msgctxt "as pluginX requires an access to our API"
|
1400 |
+
msgid "%s requires an access to our API."
|
1401 |
+
msgstr "%s richiede un accesso alla nostra API."
|
1402 |
+
|
1403 |
+
#: includes/i18n.php:869
|
1404 |
+
msgid ""
|
1405 |
+
"It looks like your server is using Squid ACL (access control lists), which "
|
1406 |
+
"blocks the connection."
|
1407 |
+
msgstr "Sembra che il tuo server stia usando Squid ACL (lista per il controllo degli accessi) il quale blocca la connessione."
|
1408 |
+
|
1409 |
+
#: includes/i18n.php:873
|
1410 |
+
msgid "I don't know what is Squid or ACL, help me!"
|
1411 |
+
msgstr "Non ho idea di cosa sia Squid o ACL, aiutami!"
|
1412 |
+
|
1413 |
+
#: includes/i18n.php875, includes/i18n.php:889
|
1414 |
+
msgid ""
|
1415 |
+
"We'll make sure to contact your hosting company and resolve the issue. You "
|
1416 |
+
"will get a follow-up email to %s once we have an update."
|
1417 |
+
msgstr "Contatteremo il tuo hosting e risolveremo il problema. Riceverai un' email a %s non appena ci saranno aggiornamenti."
|
1418 |
+
|
1419 |
+
#: includes/i18n.php:879
|
1420 |
+
msgid "I'm a system administrator"
|
1421 |
+
msgstr "Sono un sistemista"
|
1422 |
+
|
1423 |
+
#: includes/i18n.php:881
|
1424 |
+
msgid ""
|
1425 |
+
"Great, please whitelist the following domains: %s. Once you done, deactivate"
|
1426 |
+
" the plugin and activate it again."
|
1427 |
+
msgstr "Perfetto, aggiungi alla whitelist i seguenti domini: %s. Una volta che hai fatto, disattiva il plugin e attivalo di nuovo."
|
1428 |
+
|
1429 |
+
#: includes/i18n.php:885
|
1430 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
1431 |
+
msgstr "Non ho idea di cosa sia cURL o come installarlo, aiutami!"
|
1432 |
+
|
1433 |
+
#: includes/i18n.php:893
|
1434 |
+
msgid ""
|
1435 |
+
"Great, please install cURL and enable it in your php.ini file. To make sure "
|
1436 |
+
"it was successfully activated, use 'phpinfo()'. Once activated, deactivate "
|
1437 |
+
"the plugin and reactivate it back again."
|
1438 |
+
msgstr "Perfetto, installa cURL ed attivalo nel tuo file php.ini. Per essere sicuro di averlo attivato con successo, usa \"phpinfo()\". Una volta attivato disattva il plugin e attivalo di nuovo."
|
1439 |
+
|
1440 |
+
#: includes/i18n.php:897
|
1441 |
+
msgid ""
|
1442 |
+
"We are sure it's an issue on our side and more than happy to resolve it for "
|
1443 |
+
"you ASAP if you give us a chance."
|
1444 |
+
msgstr "Siamo sicuri che sia un nostro problema e siamo più che felici di risolverlo per te al più presto. Per poter procedere abbiamo bisogno del tuo consenso."
|
1445 |
+
|
1446 |
+
#: includes/i18n.php:901
|
1447 |
+
msgid ""
|
1448 |
+
"Sorry for the inconvenience and we are here to help if you give us a chance."
|
1449 |
+
msgstr "Siamo spiacenti per l'inconveniente e siamo qui per aiutarti con il tuo permesso."
|
1450 |
+
|
1451 |
+
#: includes/i18n.php:905
|
1452 |
+
msgid "Yes - I'm giving you a chance to fix it"
|
1453 |
+
msgstr "Sì - sto dandovi la possibilità di risolvere il problema"
|
1454 |
+
|
1455 |
+
#: includes/i18n.php:907
|
1456 |
+
msgid ""
|
1457 |
+
"We will do our best to whitelist your server and resolve this issue ASAP. "
|
1458 |
+
"You will get a follow-up email to %s once we have an update."
|
1459 |
+
msgstr "Faremo del nostro meglio per mettere il server in whitelist e risolvere il problema il prima possibile. Avrai un aggiornamento dello stato tramite email all'indirizzo %s."
|
1460 |
+
|
1461 |
+
#: includes/i18n.php:911
|
1462 |
+
msgid "Let's try your previous version"
|
1463 |
+
msgstr "Proviamo con la versione precedente"
|
1464 |
+
|
1465 |
+
#: includes/i18n.php:913
|
1466 |
+
msgid "Uninstall this version and install the previous one."
|
1467 |
+
msgstr "Disinstalla questa versione e installa quella precedente."
|
1468 |
+
|
1469 |
+
#: includes/i18n.php:917
|
1470 |
+
msgid "That's exhausting, please deactivate"
|
1471 |
+
msgstr "È estenuante, disattivalo"
|
1472 |
+
|
1473 |
+
#: includes/i18n.php:919
|
1474 |
+
msgid ""
|
1475 |
+
"We feel your frustration and sincerely apologize for the inconvenience. Hope"
|
1476 |
+
" to see you again in the future."
|
1477 |
+
msgstr "Capiamo la tua frustrazione e ci scusiamo per l'inconveniente. Speriamo di rivederti nuovamente in futuro."
|
1478 |
+
|
1479 |
+
#: includes/i18n.php:923
|
1480 |
+
msgid ""
|
1481 |
+
"Thank for giving us the chance to fix it! A message was just sent to our "
|
1482 |
+
"technical staff. We will get back to you as soon as we have an update to %s."
|
1483 |
+
" Appreciate your patience."
|
1484 |
+
msgstr "Grazie per averci dato la possibilità di risolvere il problema! È stato appena inviato un messaggio al nostro staff tecnico. Ti risponderemo non appena avremo un aggiornamento riguardante %s. Grazie per la tua pazienza."
|
1485 |
+
|
1486 |
+
#: includes/i18n.php:927
|
1487 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
1488 |
+
msgid ""
|
1489 |
+
"Your server is blocking the access to Freemius' API, which is crucial for "
|
1490 |
+
"%1s synchronization. Please contact your host to whitelist %2s"
|
1491 |
+
msgstr "Il tuo server sta bloccando l'accesso all'API di Freemius. L'accesso è cruciale per quanto riguarda la la sincronizzazione di %1s. Per favore contatta il tuo host per aggiungere %2s alla whitelist."
|
1492 |
+
|
1493 |
+
#: includes/i18n.php:931
|
1494 |
+
msgid ""
|
1495 |
+
"It seems like one of the authentication parameters is wrong. Update your "
|
1496 |
+
"Public Key, Secret Key & User ID, and try again."
|
1497 |
+
msgstr "Sembra che uno dei parametri di autenticazione sia sbagliato. Aggiorna la tua chiave pubblica, Secret Key & User ID e riprova."
|
1498 |
+
|
1499 |
+
#: includes/i18n.php:939
|
1500 |
+
msgid ""
|
1501 |
+
"Please check your mailbox, you should receive an email via %s to confirm the"
|
1502 |
+
" ownership change. From security reasons, you must confirm the change within"
|
1503 |
+
" the next 15 min. If you cannot find the email, please check your spam "
|
1504 |
+
"folder."
|
1505 |
+
msgstr "Verifica di aver ricevuto l'email da %s per confermare il cambiamento del proprietario. Per ragioni di sicurezza devi confermare il cambiamento entro 15 minuti. Se non trovi l'email controlla nella posta indesiderata."
|
1506 |
+
|
1507 |
+
#: includes/i18n.php:943
|
1508 |
+
msgid ""
|
1509 |
+
"Thanks for confirming the ownership change. An email was just sent to %s for"
|
1510 |
+
" final approval."
|
1511 |
+
msgstr "Grazie per aver confermato il cambiamento del proprietario. Un' email è stata appena inviata a %s per la conferma finale."
|
1512 |
+
|
1513 |
+
#: includes/i18n.php:947
|
1514 |
+
msgid "%s is the new owner of the account."
|
1515 |
+
msgstr "%s è il nuovo proprietario dell'account."
|
1516 |
+
|
1517 |
+
#: includes/i18n.php:951
|
1518 |
+
msgctxt "addonX cannot run without pluginY"
|
1519 |
+
msgid "%s cannot run without %s."
|
1520 |
+
msgstr "%s non può funzionare senza %s."
|
1521 |
+
|
1522 |
+
#: includes/i18n.php:955
|
1523 |
+
msgctxt "addonX cannot run..."
|
1524 |
+
msgid "%s cannot run without the plugin."
|
1525 |
+
msgstr "%s non può funzionare senza il plugin."
|
1526 |
+
|
1527 |
+
#: includes/i18n.php:959
|
1528 |
+
msgctxt "pluginX activation was successfully..."
|
1529 |
+
msgid "%s activation was successfully completed."
|
1530 |
+
msgstr "%s è stato attivato con successo."
|
1531 |
+
|
1532 |
+
#: includes/i18n.php:963
|
1533 |
+
msgctxt "Plugin installer section title"
|
1534 |
+
msgid "Features & Pricing"
|
1535 |
+
msgstr "Caratteristiche & prezzi"
|
1536 |
+
|
1537 |
+
#: includes/i18n.php:967
|
1538 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1539 |
+
msgstr "L'add-on dev'essere distribuito da WordPress.org o Freemius."
|
1540 |
+
|
1541 |
+
#: includes/i18n.php:971
|
1542 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1543 |
+
msgstr "Gli add-on a pagamento devono essere distribuiti da Freemius."
|
1544 |
+
|
1545 |
+
#: includes/i18n.php:979
|
1546 |
+
msgid ""
|
1547 |
+
"%s is a premium only add-on. You have to purchase a license first before "
|
1548 |
+
"activating the plugin."
|
1549 |
+
msgstr "%s è un add-on premium. Devi comprare una licenza prima di poter attivare il plugin."
|
1550 |
+
|
1551 |
+
#: includes/i18n.php:983
|
1552 |
+
msgid ""
|
1553 |
+
"%s free trial was successfully cancelled. Since the add-on is premium only "
|
1554 |
+
"it was automatically deactivated. If you like to use it in the future, "
|
1555 |
+
"you'll have to purchase a license."
|
1556 |
+
msgstr "Il periodo di prova gratuito %s è stato annullato con successo. Siccome l'add-on è premium, è stato disattivato automaticamente. Se vorrai usarlo in futuro, dovrai comprare una licenza."
|
1557 |
+
|
1558 |
+
#: includes/i18n.php:995
|
1559 |
+
msgctxt "as every month"
|
1560 |
+
msgid "Monthly"
|
1561 |
+
msgstr "Mensilmente"
|
1562 |
+
|
1563 |
+
#: includes/i18n.php:997
|
1564 |
+
msgctxt "as monthly period"
|
1565 |
+
msgid "mo"
|
1566 |
+
msgstr "mese"
|
1567 |
+
|
1568 |
+
#: includes/i18n.php:999
|
1569 |
+
msgctxt "as once a year"
|
1570 |
+
msgid "Annual"
|
1571 |
+
msgstr "Annuale"
|
1572 |
+
|
1573 |
+
#: includes/i18n.php:1001
|
1574 |
+
msgctxt "as once a year"
|
1575 |
+
msgid "Annually"
|
1576 |
+
msgstr "Annualmente"
|
1577 |
+
|
1578 |
+
#: includes/i18n.php:1003
|
1579 |
+
msgctxt "as once a year"
|
1580 |
+
msgid "Once"
|
1581 |
+
msgstr "Una volta"
|
1582 |
+
|
1583 |
+
#: includes/i18n.php:1005
|
1584 |
+
msgctxt "as annual period"
|
1585 |
+
msgid "year"
|
1586 |
+
msgstr "anno"
|
1587 |
+
|
1588 |
+
#: includes/i18n.php:1007
|
1589 |
+
msgid "Lifetime"
|
1590 |
+
msgstr "Tutta la vita"
|
1591 |
+
|
1592 |
+
#: includes/i18n.php:1009
|
1593 |
+
msgctxt "e.g. the best product"
|
1594 |
+
msgid "Best"
|
1595 |
+
msgstr "Migliore"
|
1596 |
+
|
1597 |
+
#: includes/i18n.php:1011
|
1598 |
+
msgctxt "e.g. billed monthly"
|
1599 |
+
msgid "Billed %s"
|
1600 |
+
msgstr "Fatturato %s"
|
1601 |
+
|
1602 |
+
#: includes/i18n.php:1013
|
1603 |
+
msgctxt "as a discount of $5 or 10%"
|
1604 |
+
msgid "Save %s"
|
1605 |
+
msgstr "Risparmia %s"
|
1606 |
+
|
1607 |
+
#: includes/i18n.php:1017
|
1608 |
+
msgid "View details"
|
1609 |
+
msgstr "Visualizza dettagli"
|
1610 |
+
|
1611 |
+
#: includes/i18n.php:1025
|
1612 |
+
msgctxt "button label"
|
1613 |
+
msgid "Approve & Start Trial"
|
1614 |
+
msgstr "Approva e inizia il periodo di prova gratuito"
|
1615 |
+
|
1616 |
+
#: includes/i18n.php:1029
|
1617 |
+
msgid ""
|
1618 |
+
"You are 1-click away from starting your %1$s-day free trial of the %2$s "
|
1619 |
+
"plan."
|
1620 |
+
msgstr "Sei a un clic di distanza dall'iniziare il tuo periodo di prova gratuito di %1$s giorni per il piano %2$s."
|
1621 |
+
|
1622 |
+
#: includes/i18n.php:1033
|
1623 |
+
msgid ""
|
1624 |
+
"For compliance with the WordPress.org guidelines, before we start the trial "
|
1625 |
+
"we ask that you opt-in with your user and non-sensitive site information, "
|
1626 |
+
"allowing the plugin to periodically send data to %s to check for version "
|
1627 |
+
"updates and to validate your trial."
|
1628 |
+
msgstr "Per seguire le linee guida di WordPress, prima di iniziare il periodo di prova ti chiediamo di iscriverti con il tuo utente e i dati non sensibili inerenti al tuo sito, così da permettere periodicamente al plugin di inviare dati a %s per poter controllare la presenza di nuove versioni e convalidare il tuo periodo di prova gratuito."
|
1629 |
+
|
1630 |
+
#: includes/i18n.php:1045
|
1631 |
+
msgid "Business name"
|
1632 |
+
msgstr "Nome della compagnia"
|
1633 |
+
|
1634 |
+
#: includes/i18n.php:1047
|
1635 |
+
msgid "Tax / VAT ID"
|
1636 |
+
msgstr "Numero Partita Iva o VAT"
|
1637 |
+
|
1638 |
+
#: includes/i18n.php:1049
|
1639 |
+
msgid "Address Line %d"
|
1640 |
+
msgstr "Riga indirizzo %d"
|
1641 |
+
|
1642 |
+
#: includes/i18n.php:1051
|
1643 |
+
msgid "Country"
|
1644 |
+
msgstr "Nazione"
|
1645 |
+
|
1646 |
+
#: includes/i18n.php:1053
|
1647 |
+
msgid "Select Country"
|
1648 |
+
msgstr "Seleziona Nazione"
|
1649 |
+
|
1650 |
+
#: includes/i18n.php:1055
|
1651 |
+
msgid "City"
|
1652 |
+
msgstr "Città"
|
1653 |
+
|
1654 |
+
#: includes/i18n.php:1057
|
1655 |
+
msgid "Town"
|
1656 |
+
msgstr "Cittadina"
|
1657 |
+
|
1658 |
+
#: includes/i18n.php:1059
|
1659 |
+
msgid "State"
|
1660 |
+
msgstr "Stato"
|
1661 |
+
|
1662 |
+
#: includes/i18n.php:1061
|
1663 |
+
msgid "Province"
|
1664 |
+
msgstr "Provincia"
|
1665 |
+
|
1666 |
+
#: includes/i18n.php:1063
|
1667 |
+
msgid "ZIP / Postal Code"
|
1668 |
+
msgstr "CAP"
|
lib/freemius/languages/freemius.pot
ADDED
@@ -0,0 +1,1525 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 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 |
+
"MIME-Version: 1.0\n"
|
8 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
+
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
11 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
12 |
+
"Language-Team: Freemius Team <admin@freemius.com>\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
18 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
+
#: includes/i18n.php:41, includes/i18n.php:55
|
20 |
+
msgid "Yes - I'm in!"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: includes/i18n.php:43, includes/i18n.php:57
|
24 |
+
msgid "Not today"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: includes/i18n.php:69
|
28 |
+
msgid "Account"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: includes/i18n.php:71
|
32 |
+
msgid "Add On"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: includes/i18n.php:73
|
36 |
+
msgid "Contact Us"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: includes/i18n.php:75
|
40 |
+
msgid "Contact Support"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: includes/i18n.php:77
|
44 |
+
msgid "Change Ownership"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: includes/i18n.php:79
|
48 |
+
msgid "Support"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: includes/i18n.php:81
|
52 |
+
msgid "Support Forum"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: includes/i18n.php:83
|
56 |
+
msgid "Add Ons"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/i18n.php:85
|
60 |
+
msgctxt "verb"
|
61 |
+
msgid "Upgrade"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: includes/i18n.php:87
|
65 |
+
msgid "Awesome"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: includes/i18n.php:89
|
69 |
+
msgctxt "noun"
|
70 |
+
msgid "Pricing"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: includes/i18n.php:91
|
74 |
+
msgctxt "noun"
|
75 |
+
msgid "Price"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: includes/i18n.php:93
|
79 |
+
msgid "Unlimited Updates"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: includes/i18n.php:95
|
83 |
+
msgctxt "verb"
|
84 |
+
msgid "Downgrade"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: includes/i18n.php:97
|
88 |
+
msgid "Cancel Trial"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: includes/i18n.php:99
|
92 |
+
msgid "Free Trial"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: includes/i18n.php:101
|
96 |
+
msgid "Start my free %s"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: includes/i18n.php:103
|
100 |
+
msgid "No commitment for %s - cancel anytime"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: includes/i18n.php:105
|
104 |
+
msgid "After your free %s, pay as little as %s"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: includes/i18n.php:107
|
108 |
+
msgid "Details"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: includes/i18n.php:109
|
112 |
+
msgid "Account Details"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: includes/i18n.php:111
|
116 |
+
msgctxt "verb"
|
117 |
+
msgid "Delete"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: includes/i18n.php:113
|
121 |
+
msgctxt "verb"
|
122 |
+
msgid "Show"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: includes/i18n.php:115
|
126 |
+
msgctxt "verb"
|
127 |
+
msgid "Hide"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: includes/i18n.php:117
|
131 |
+
msgctxt "verb"
|
132 |
+
msgid "Edit"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: includes/i18n.php:119
|
136 |
+
msgctxt "verb"
|
137 |
+
msgid "Update"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: includes/i18n.php:121
|
141 |
+
msgid "Date"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: includes/i18n.php:123
|
145 |
+
msgid "Amount"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: includes/i18n.php:125
|
149 |
+
msgid "Invoice"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: includes/i18n.php:127
|
153 |
+
msgid "Billing"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: includes/i18n.php:129
|
157 |
+
msgid "Payments"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: includes/i18n.php:131
|
161 |
+
msgid "Delete Account"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: includes/i18n.php:133
|
165 |
+
msgctxt "as close a window"
|
166 |
+
msgid "Dismiss"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: includes/i18n.php:135
|
170 |
+
msgctxt "as product pricing plan"
|
171 |
+
msgid "Plan"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: includes/i18n.php:137
|
175 |
+
msgid "Change Plan"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: includes/i18n.php:139
|
179 |
+
msgctxt "as download professional version"
|
180 |
+
msgid "Download %s Version"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: includes/i18n.php:141
|
184 |
+
msgctxt "as download professional version now"
|
185 |
+
msgid "Download %s version now"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: includes/i18n.php:145
|
189 |
+
msgctxt "as download latest version"
|
190 |
+
msgid "Download Latest"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: includes/i18n.php:147
|
194 |
+
msgctxt "E.g. you have a professional license."
|
195 |
+
msgid "You have a %s license."
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: includes/i18n.php:151
|
199 |
+
msgid "New"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: includes/i18n.php:153
|
203 |
+
msgid "Free"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: includes/i18n.php:155
|
207 |
+
msgctxt "as trial plan"
|
208 |
+
msgid "Trial"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: includes/i18n.php:157
|
212 |
+
msgctxt "as starting a trial plan"
|
213 |
+
msgid "Start Trial"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: includes/i18n.php:159
|
217 |
+
msgctxt "verb"
|
218 |
+
msgid "Purchase"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: includes/i18n.php:161
|
222 |
+
msgid "Purchase License"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: includes/i18n.php:163
|
226 |
+
msgctxt "verb"
|
227 |
+
msgid "Buy"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: includes/i18n.php:165
|
231 |
+
msgid "Buy License"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: includes/i18n.php:167
|
235 |
+
msgid "Single Site License"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: includes/i18n.php:169
|
239 |
+
msgid "Unlimited Licenses"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: includes/i18n.php:171
|
243 |
+
msgid "Up to %s Sites"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: includes/i18n.php:173
|
247 |
+
msgid "%sRenew your license now%s to access version %s features and support."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: includes/i18n.php:177
|
251 |
+
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: includes/i18n.php:181
|
255 |
+
msgctxt "e.g. Professional Plan"
|
256 |
+
msgid "%s Plan"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/i18n.php:183
|
260 |
+
msgid "You are just one step away - %s"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: includes/i18n.php:185
|
264 |
+
msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
|
265 |
+
msgid "Complete \"%s\" Activation Now"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: includes/i18n.php:189
|
269 |
+
msgid "We made a few tweaks to the plugin, %s"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: includes/i18n.php:191
|
273 |
+
msgid "Opt-in to make \"%s\" Better!"
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: includes/i18n.php:193
|
277 |
+
msgid "Error"
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: includes/i18n.php:195
|
281 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: includes/i18n.php:203
|
285 |
+
msgctxt "as expiration date"
|
286 |
+
msgid "Expiration"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: includes/i18n.php:205
|
290 |
+
msgctxt "as software license"
|
291 |
+
msgid "License"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: includes/i18n.php:207
|
295 |
+
msgid "not verified"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: includes/i18n.php:209
|
299 |
+
msgid "Verify Email"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: includes/i18n.php:211
|
303 |
+
msgctxt "e.g. expires in 2 months"
|
304 |
+
msgid "Expires in %s"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: includes/i18n.php:213
|
308 |
+
msgctxt "e.g. auto renews in 2 months"
|
309 |
+
msgid "Auto renews in %s"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: includes/i18n.php:215
|
313 |
+
msgid "No expiration"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: includes/i18n.php:217
|
317 |
+
msgid "Expired"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: includes/i18n.php:219
|
321 |
+
msgid "Cancelled"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: includes/i18n.php:221
|
325 |
+
msgctxt "e.g. In 2 hours"
|
326 |
+
msgid "In %s"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: includes/i18n.php:223
|
330 |
+
msgctxt "e.g. 2 min ago"
|
331 |
+
msgid "%s ago"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: includes/i18n.php:225
|
335 |
+
msgctxt "as plugin version"
|
336 |
+
msgid "Version"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: includes/i18n.php:227
|
340 |
+
msgid "Name"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: includes/i18n.php:229
|
344 |
+
msgid "Email"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: includes/i18n.php:231
|
348 |
+
msgid "Email address"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: includes/i18n.php:233
|
352 |
+
msgid "Verified"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: includes/i18n.php:235
|
356 |
+
msgid "Plugin"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: includes/i18n.php:237
|
360 |
+
msgid "Plugins"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: includes/i18n.php:239
|
364 |
+
msgid "Themes"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: includes/i18n.php:241
|
368 |
+
msgctxt "as file/folder path"
|
369 |
+
msgid "Path"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: includes/i18n.php:243
|
373 |
+
msgid "Title"
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: includes/i18n.php:245
|
377 |
+
msgid "Free version"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: includes/i18n.php:247
|
381 |
+
msgid "Premium version"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: includes/i18n.php:249
|
385 |
+
msgctxt "as WP plugin slug"
|
386 |
+
msgid "Slug"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: includes/i18n.php:251
|
390 |
+
msgid "ID"
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: includes/i18n.php:253
|
394 |
+
msgid "Users"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: includes/i18n.php:255
|
398 |
+
msgid "Plugin Installs"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: includes/i18n.php:257
|
402 |
+
msgctxt "like websites"
|
403 |
+
msgid "Sites"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: includes/i18n.php:259
|
407 |
+
msgid "User ID"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: includes/i18n.php:261
|
411 |
+
msgid "Site ID"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: includes/i18n.php:263
|
415 |
+
msgid "Public Key"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: includes/i18n.php:265
|
419 |
+
msgid "Secret Key"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: includes/i18n.php:267
|
423 |
+
msgctxt "as secret encryption key missing"
|
424 |
+
msgid "No Secret"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: includes/i18n.php:269
|
428 |
+
msgid "No ID"
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: includes/i18n.php:271
|
432 |
+
msgctxt "as synchronize license"
|
433 |
+
msgid "Sync License"
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: includes/i18n.php:273
|
437 |
+
msgctxt "as synchronize"
|
438 |
+
msgid "Sync"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: includes/i18n.php:275
|
442 |
+
msgid "Activate License"
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: includes/i18n.php:277
|
446 |
+
msgid "Activate Free Version"
|
447 |
+
msgstr ""
|
448 |
+
|
449 |
+
#: includes/i18n.php:279
|
450 |
+
msgid "Please enter the license key that you received in the email right after the purchase:"
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: includes/i18n.php:283
|
454 |
+
msgid "Activating license..."
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: includes/i18n.php:285
|
458 |
+
msgid "Change License"
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: includes/i18n.php:287
|
462 |
+
msgid "Update License"
|
463 |
+
msgstr ""
|
464 |
+
|
465 |
+
#: includes/i18n.php:289
|
466 |
+
msgid "Deactivate License"
|
467 |
+
msgstr ""
|
468 |
+
|
469 |
+
#: includes/i18n.php:291
|
470 |
+
msgid "Activate"
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: includes/i18n.php:293
|
474 |
+
msgid "Deactivate"
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#: includes/i18n.php:295
|
478 |
+
msgid "Skip & Deactivate"
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
+
#: includes/i18n.php:297
|
482 |
+
msgid "No - just deactivate"
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
+
#: includes/i18n.php:299
|
486 |
+
msgid "Yes - do your thing"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: includes/i18n.php:301
|
490 |
+
msgctxt "active mode"
|
491 |
+
msgid "Active"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: includes/i18n.php:303
|
495 |
+
msgctxt "is active mode?"
|
496 |
+
msgid "Is Active"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: includes/i18n.php:305
|
500 |
+
msgid "Install Now"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: includes/i18n.php:307
|
504 |
+
msgid "Install Update Now"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: includes/i18n.php:309
|
508 |
+
msgid "More information about %s"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: includes/i18n.php:311
|
512 |
+
msgid "Localhost"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: includes/i18n.php:313
|
516 |
+
msgctxt "as activate Professional plan"
|
517 |
+
msgid "Activate %s Plan"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: includes/i18n.php:315
|
521 |
+
msgctxt "as 5 licenses left"
|
522 |
+
msgid "%s left"
|
523 |
+
msgstr ""
|
524 |
+
|
525 |
+
#: includes/i18n.php:317
|
526 |
+
msgid "Last license"
|
527 |
+
msgstr ""
|
528 |
+
|
529 |
+
#: includes/i18n.php:319
|
530 |
+
msgid "What is your %s?"
|
531 |
+
msgstr ""
|
532 |
+
|
533 |
+
#: includes/i18n.php:321
|
534 |
+
msgid "Activate this add-on"
|
535 |
+
msgstr ""
|
536 |
+
|
537 |
+
#: includes/i18n.php:323
|
538 |
+
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?"
|
539 |
+
msgstr ""
|
540 |
+
|
541 |
+
#: includes/i18n.php:327
|
542 |
+
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?"
|
543 |
+
msgstr ""
|
544 |
+
|
545 |
+
#: includes/i18n.php:331
|
546 |
+
msgid "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?"
|
547 |
+
msgstr ""
|
548 |
+
|
549 |
+
#: includes/i18n.php:335
|
550 |
+
msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
551 |
+
msgstr ""
|
552 |
+
|
553 |
+
#: includes/i18n.php:339
|
554 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: includes/i18n.php:343
|
558 |
+
msgid "You can still enjoy all %s features but you will not have access to plugin updates and support."
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
+
#: includes/i18n.php:347
|
562 |
+
msgid "Once your license expire you can still use the Free version but you will NOT have access to the %s features."
|
563 |
+
msgstr ""
|
564 |
+
|
565 |
+
#: includes/i18n.php:351
|
566 |
+
msgid "Are you sure you want to proceed?"
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: includes/i18n.php:357
|
570 |
+
msgid "Add Ons for %s"
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: includes/i18n.php:359
|
574 |
+
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."
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: includes/i18n.php:365
|
578 |
+
msgid "Anonymous feedback"
|
579 |
+
msgstr ""
|
580 |
+
|
581 |
+
#: includes/i18n.php:367
|
582 |
+
msgid "Quick feedback"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: includes/i18n.php:369
|
586 |
+
msgid "If you have a moment, please let us know why you are deactivating"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: includes/i18n.php:373
|
590 |
+
msgid "Yes - Deactivate"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: includes/i18n.php:375
|
594 |
+
msgid "Submit & Deactivate"
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: includes/i18n.php:377
|
598 |
+
msgid "Cancel"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: includes/i18n.php:379
|
602 |
+
msgid "I no longer need the plugin"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: includes/i18n.php:381
|
606 |
+
msgid "I found a better plugin"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: includes/i18n.php:383
|
610 |
+
msgid "I only needed the plugin for a short period"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: includes/i18n.php:385
|
614 |
+
msgid "The plugin broke my site"
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: includes/i18n.php:387
|
618 |
+
msgid "The plugin suddenly stopped working"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: includes/i18n.php:389
|
622 |
+
msgid "I can't pay for it anymore"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: includes/i18n.php:391
|
626 |
+
msgid "It's a temporary deactivation. I'm just debugging an issue."
|
627 |
+
msgstr ""
|
628 |
+
|
629 |
+
#: includes/i18n.php:395
|
630 |
+
msgctxt "the text of the \"other\" reason for deactivating the plugin that is shown in the modal box."
|
631 |
+
msgid "Other"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: includes/i18n.php:399
|
635 |
+
msgid "Kindly tell us the reason so we can improve."
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: includes/i18n.php:401
|
639 |
+
msgid "What's the plugin's name?"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: includes/i18n.php:403
|
643 |
+
msgid "What price would you feel comfortable paying?"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: includes/i18n.php:405
|
647 |
+
msgid "I couldn't understand how to make it work"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: includes/i18n.php:407
|
651 |
+
msgid "The plugin is great, but I need specific feature that you don't support"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: includes/i18n.php:411
|
655 |
+
msgid "The plugin is not working"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: includes/i18n.php:413
|
659 |
+
msgid "It's not what I was looking for"
|
660 |
+
msgstr ""
|
661 |
+
|
662 |
+
#: includes/i18n.php:415
|
663 |
+
msgid "The plugin didn't work as expected"
|
664 |
+
msgstr ""
|
665 |
+
|
666 |
+
#: includes/i18n.php:417
|
667 |
+
msgid "What feature?"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: includes/i18n.php:419
|
671 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: includes/i18n.php:423
|
675 |
+
msgid "What you've been looking for?"
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: includes/i18n.php:425
|
679 |
+
msgid "What did you expect?"
|
680 |
+
msgstr ""
|
681 |
+
|
682 |
+
#: includes/i18n.php:427
|
683 |
+
msgid "The plugin didn't work"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: includes/i18n.php:429
|
687 |
+
msgid "I don't like to share my information with you"
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: includes/i18n.php:431
|
691 |
+
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: includes/i18n.php:441
|
695 |
+
msgctxt "greeting"
|
696 |
+
msgid "Hey %s,"
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: includes/i18n.php:443
|
700 |
+
msgctxt "a greeting. E.g. Thanks John!"
|
701 |
+
msgid "Thanks %s!"
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: includes/i18n.php:445
|
705 |
+
msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: includes/i18n.php:449
|
709 |
+
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."
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: includes/i18n.php:453
|
713 |
+
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."
|
714 |
+
msgstr ""
|
715 |
+
|
716 |
+
#: includes/i18n.php:455
|
717 |
+
msgid "complete the install"
|
718 |
+
msgstr ""
|
719 |
+
|
720 |
+
#: includes/i18n.php:457
|
721 |
+
msgid "start the trial"
|
722 |
+
msgstr ""
|
723 |
+
|
724 |
+
#: includes/i18n.php:459
|
725 |
+
msgid "Thanks for purchasing %s! To get started, please enter your license key:"
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#: includes/i18n.php:463
|
729 |
+
msgid "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license."
|
730 |
+
msgstr ""
|
731 |
+
|
732 |
+
#: includes/i18n.php:467
|
733 |
+
msgid "What permissions are being granted?"
|
734 |
+
msgstr ""
|
735 |
+
|
736 |
+
#: includes/i18n.php:469
|
737 |
+
msgid "Your Profile Overview"
|
738 |
+
msgstr ""
|
739 |
+
|
740 |
+
#: includes/i18n.php:471
|
741 |
+
msgid "Name and email address"
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#: includes/i18n.php:473
|
745 |
+
msgid "Your Site Overview"
|
746 |
+
msgstr ""
|
747 |
+
|
748 |
+
#: includes/i18n.php:475
|
749 |
+
msgid "Site URL, WP version, PHP info, plugins & themes"
|
750 |
+
msgstr ""
|
751 |
+
|
752 |
+
#: includes/i18n.php:479
|
753 |
+
msgid "Current Plugin Events"
|
754 |
+
msgstr ""
|
755 |
+
|
756 |
+
#: includes/i18n.php:481
|
757 |
+
msgid "Activation, deactivation and uninstall"
|
758 |
+
msgstr ""
|
759 |
+
|
760 |
+
#: includes/i18n.php:483
|
761 |
+
msgid "Plugins & Themes"
|
762 |
+
msgstr ""
|
763 |
+
|
764 |
+
#: includes/i18n.php:485
|
765 |
+
msgid "Titles, versions and state."
|
766 |
+
msgstr ""
|
767 |
+
|
768 |
+
#: includes/i18n.php:487
|
769 |
+
msgid "Admin Notices"
|
770 |
+
msgstr ""
|
771 |
+
|
772 |
+
#: includes/i18n.php:489
|
773 |
+
msgid "Newsletter"
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: includes/i18n.php:491
|
777 |
+
msgid "Updates, announcements, marketing, no spam"
|
778 |
+
msgstr ""
|
779 |
+
|
780 |
+
#: includes/i18n.php:493
|
781 |
+
msgid "Privacy Policy"
|
782 |
+
msgstr ""
|
783 |
+
|
784 |
+
#: includes/i18n.php:495
|
785 |
+
msgid "Terms of Service"
|
786 |
+
msgstr ""
|
787 |
+
|
788 |
+
#: includes/i18n.php:497
|
789 |
+
msgctxt "as activating plugin"
|
790 |
+
msgid "Activating"
|
791 |
+
msgstr ""
|
792 |
+
|
793 |
+
#: includes/i18n.php:499
|
794 |
+
msgctxt "as in the process of sending an email"
|
795 |
+
msgid "Sending email"
|
796 |
+
msgstr ""
|
797 |
+
|
798 |
+
#: includes/i18n.php:503
|
799 |
+
msgctxt "button label"
|
800 |
+
msgid "Allow & Continue"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: includes/i18n.php:505
|
804 |
+
msgctxt "button label"
|
805 |
+
msgid "Agree & Activate License"
|
806 |
+
msgstr ""
|
807 |
+
|
808 |
+
#: includes/i18n.php:507
|
809 |
+
msgctxt "verb"
|
810 |
+
msgid "Skip"
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: includes/i18n.php:509
|
814 |
+
msgid "Click here to use the plugin anonymously"
|
815 |
+
msgstr ""
|
816 |
+
|
817 |
+
#: includes/i18n.php:511
|
818 |
+
msgid "Re-send activation email"
|
819 |
+
msgstr ""
|
820 |
+
|
821 |
+
#: includes/i18n.php:513
|
822 |
+
msgid "License key"
|
823 |
+
msgstr ""
|
824 |
+
|
825 |
+
#: includes/i18n.php:515
|
826 |
+
msgid "Send License Key"
|
827 |
+
msgstr ""
|
828 |
+
|
829 |
+
#: includes/i18n.php:517
|
830 |
+
msgid "Sending license key"
|
831 |
+
msgstr ""
|
832 |
+
|
833 |
+
#: includes/i18n.php:519
|
834 |
+
msgid "Have a license key?"
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#: includes/i18n.php:521
|
838 |
+
msgid "Don't have a license key?"
|
839 |
+
msgstr ""
|
840 |
+
|
841 |
+
#: includes/i18n.php:523
|
842 |
+
msgid "Can't find your license key?"
|
843 |
+
msgstr ""
|
844 |
+
|
845 |
+
#: includes/i18n.php:525
|
846 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
847 |
+
msgstr ""
|
848 |
+
|
849 |
+
#: includes/i18n.php:529
|
850 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#: includes/i18n.php:533
|
854 |
+
msgid "Opt In"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: includes/i18n.php:535
|
858 |
+
msgid "Opt Out"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: includes/i18n.php:537
|
862 |
+
msgid "On second thought - I want to continue helping"
|
863 |
+
msgstr ""
|
864 |
+
|
865 |
+
#: includes/i18n.php:541
|
866 |
+
msgid "Opting out..."
|
867 |
+
msgstr ""
|
868 |
+
|
869 |
+
#: includes/i18n.php:543
|
870 |
+
msgid "Opting in..."
|
871 |
+
msgstr ""
|
872 |
+
|
873 |
+
#: includes/i18n.php:545
|
874 |
+
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
875 |
+
msgstr ""
|
876 |
+
|
877 |
+
#: includes/i18n.php:549
|
878 |
+
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."
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: includes/i18n.php:553
|
882 |
+
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: includes/i18n.php:563
|
886 |
+
msgid "Screenshots"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: includes/i18n.php:565
|
890 |
+
msgid "Click to view full-size screenshot %d"
|
891 |
+
msgstr ""
|
892 |
+
|
893 |
+
#: includes/i18n.php:573
|
894 |
+
msgid "Freemius Debug"
|
895 |
+
msgstr ""
|
896 |
+
|
897 |
+
#: includes/i18n.php:575
|
898 |
+
msgctxt "as turned on"
|
899 |
+
msgid "On"
|
900 |
+
msgstr ""
|
901 |
+
|
902 |
+
#: includes/i18n.php:577
|
903 |
+
msgctxt "as turned off"
|
904 |
+
msgid "Off"
|
905 |
+
msgstr ""
|
906 |
+
|
907 |
+
#: includes/i18n.php:579
|
908 |
+
msgctxt "as code debugging"
|
909 |
+
msgid "Debugging"
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#: includes/i18n.php:581
|
913 |
+
msgid "Freemius State"
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: includes/i18n.php:583
|
917 |
+
msgctxt "as connection was successful"
|
918 |
+
msgid "Connected"
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: includes/i18n.php:585
|
922 |
+
msgctxt "as connection blocked"
|
923 |
+
msgid "Blocked"
|
924 |
+
msgstr ""
|
925 |
+
|
926 |
+
#: includes/i18n.php:587
|
927 |
+
msgctxt "as application program interface"
|
928 |
+
msgid "API"
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: includes/i18n.php:589
|
932 |
+
msgctxt "as software development kit versions"
|
933 |
+
msgid "SDK"
|
934 |
+
msgstr ""
|
935 |
+
|
936 |
+
#: includes/i18n.php:591
|
937 |
+
msgctxt "as software development kit versions"
|
938 |
+
msgid "SDK Versions"
|
939 |
+
msgstr ""
|
940 |
+
|
941 |
+
#: includes/i18n.php:595
|
942 |
+
msgctxt "as plugin folder path"
|
943 |
+
msgid "Plugin Path"
|
944 |
+
msgstr ""
|
945 |
+
|
946 |
+
#: includes/i18n.php:597
|
947 |
+
msgctxt "as sdk path"
|
948 |
+
msgid "SDK Path"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: includes/i18n.php:599
|
952 |
+
msgid "Add Ons of Plugin %s"
|
953 |
+
msgstr ""
|
954 |
+
|
955 |
+
#: includes/i18n.php:601
|
956 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
957 |
+
msgstr ""
|
958 |
+
|
959 |
+
#: includes/i18n.php:605
|
960 |
+
msgid "Actions"
|
961 |
+
msgstr ""
|
962 |
+
|
963 |
+
#: includes/i18n.php:607
|
964 |
+
msgid "Delete All Accounts"
|
965 |
+
msgstr ""
|
966 |
+
|
967 |
+
#: includes/i18n.php:609
|
968 |
+
msgid "Start Fresh"
|
969 |
+
msgstr ""
|
970 |
+
|
971 |
+
#: includes/i18n.php:611
|
972 |
+
msgid "Clear API Cache"
|
973 |
+
msgstr ""
|
974 |
+
|
975 |
+
#: includes/i18n.php:613
|
976 |
+
msgid "Sync Data From Server"
|
977 |
+
msgstr ""
|
978 |
+
|
979 |
+
#: includes/i18n.php:615
|
980 |
+
msgid "Scheduled Crons"
|
981 |
+
msgstr ""
|
982 |
+
|
983 |
+
#: includes/i18n.php:617
|
984 |
+
msgid "Plugins & Themes Sync"
|
985 |
+
msgstr ""
|
986 |
+
|
987 |
+
#: includes/i18n.php:625
|
988 |
+
msgctxt "as congratulations"
|
989 |
+
msgid "Congrats"
|
990 |
+
msgstr ""
|
991 |
+
|
992 |
+
#: includes/i18n.php:627
|
993 |
+
msgctxt "exclamation"
|
994 |
+
msgid "Oops"
|
995 |
+
msgstr ""
|
996 |
+
|
997 |
+
#: includes/i18n.php:629
|
998 |
+
msgctxt "interjection expressing joy or exuberance"
|
999 |
+
msgid "Yee-haw"
|
1000 |
+
msgstr ""
|
1001 |
+
|
1002 |
+
#: includes/i18n.php:633
|
1003 |
+
msgctxt "(especially in electronic communication) used to express elation, enthusiasm, or triumph."
|
1004 |
+
msgid "W00t"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: includes/i18n.php:637
|
1008 |
+
msgctxt "a positive response"
|
1009 |
+
msgid "Right on"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: includes/i18n.php:639
|
1013 |
+
msgctxt "something somebody says when they are thinking about what you have just said. "
|
1014 |
+
msgid "Hmm"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: includes/i18n.php:643
|
1018 |
+
msgid "O.K"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: includes/i18n.php:645
|
1022 |
+
msgctxt "exclamation"
|
1023 |
+
msgid "Hey"
|
1024 |
+
msgstr ""
|
1025 |
+
|
1026 |
+
#: includes/i18n.php:647
|
1027 |
+
msgctxt "advance notice of something that will need attention."
|
1028 |
+
msgid "Heads up"
|
1029 |
+
msgstr ""
|
1030 |
+
|
1031 |
+
#: includes/i18n.php:657
|
1032 |
+
msgid "Seems like you got the latest release."
|
1033 |
+
msgstr ""
|
1034 |
+
|
1035 |
+
#: includes/i18n.php:659
|
1036 |
+
msgid "You are all good!"
|
1037 |
+
msgstr ""
|
1038 |
+
|
1039 |
+
#: includes/i18n.php:661
|
1040 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
1041 |
+
msgstr ""
|
1042 |
+
|
1043 |
+
#: includes/i18n.php:665
|
1044 |
+
msgid "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button."
|
1045 |
+
msgstr ""
|
1046 |
+
|
1047 |
+
#: includes/i18n.php:669
|
1048 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
1049 |
+
msgstr ""
|
1050 |
+
|
1051 |
+
#: includes/i18n.php:673
|
1052 |
+
msgid "Your name was successfully updated."
|
1053 |
+
msgstr ""
|
1054 |
+
|
1055 |
+
#: includes/i18n.php:675
|
1056 |
+
msgid "You have successfully updated your %s."
|
1057 |
+
msgstr ""
|
1058 |
+
|
1059 |
+
#: includes/i18n.php:677
|
1060 |
+
msgid "Please provide your full name."
|
1061 |
+
msgstr ""
|
1062 |
+
|
1063 |
+
#: includes/i18n.php:679
|
1064 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
1065 |
+
msgstr ""
|
1066 |
+
|
1067 |
+
#: includes/i18n.php:683
|
1068 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
1069 |
+
msgstr ""
|
1070 |
+
|
1071 |
+
#: includes/i18n.php:687
|
1072 |
+
msgid "No credit card required"
|
1073 |
+
msgstr ""
|
1074 |
+
|
1075 |
+
#: includes/i18n.php:689
|
1076 |
+
msgid "Premium plugin version was successfully activated."
|
1077 |
+
msgstr ""
|
1078 |
+
|
1079 |
+
#: includes/i18n.php:693
|
1080 |
+
msgid "The upgrade of %s was successfully completed."
|
1081 |
+
msgstr ""
|
1082 |
+
|
1083 |
+
#: includes/i18n.php:695
|
1084 |
+
msgid "Your account was successfully activated with the %s plan."
|
1085 |
+
msgstr ""
|
1086 |
+
|
1087 |
+
#: includes/i18n.php:699
|
1088 |
+
msgid "Download the latest %s version now"
|
1089 |
+
msgstr ""
|
1090 |
+
|
1091 |
+
#: includes/i18n.php:701
|
1092 |
+
msgid "Please follow these steps to complete the upgrade"
|
1093 |
+
msgstr ""
|
1094 |
+
|
1095 |
+
#: includes/i18n.php:705
|
1096 |
+
msgid "Download the latest %s version"
|
1097 |
+
msgstr ""
|
1098 |
+
|
1099 |
+
#: includes/i18n.php:707
|
1100 |
+
msgid "Download the latest version"
|
1101 |
+
msgstr ""
|
1102 |
+
|
1103 |
+
#: includes/i18n.php:709
|
1104 |
+
msgid "Deactivate the free version"
|
1105 |
+
msgstr ""
|
1106 |
+
|
1107 |
+
#: includes/i18n.php:711
|
1108 |
+
msgid "Upload and activate the downloaded version"
|
1109 |
+
msgstr ""
|
1110 |
+
|
1111 |
+
#: includes/i18n.php:713
|
1112 |
+
msgid "How to upload and activate?"
|
1113 |
+
msgstr ""
|
1114 |
+
|
1115 |
+
#: includes/i18n.php:715
|
1116 |
+
msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
|
1117 |
+
msgid "%s Add-on was successfully purchased."
|
1118 |
+
msgstr ""
|
1119 |
+
|
1120 |
+
#: includes/i18n.php:719
|
1121 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: includes/i18n.php:723
|
1125 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
1126 |
+
msgstr ""
|
1127 |
+
|
1128 |
+
#: includes/i18n.php:727
|
1129 |
+
msgid "Your plan was successfully upgraded."
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: includes/i18n.php:729
|
1133 |
+
msgid "Your plan was successfully changed to %s."
|
1134 |
+
msgstr ""
|
1135 |
+
|
1136 |
+
#: includes/i18n.php:731
|
1137 |
+
msgid "Your license has expired. You can still continue using the free plugin forever."
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: includes/i18n.php:735
|
1141 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: includes/i18n.php:739
|
1145 |
+
msgid "Your trial has been successfully started."
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: includes/i18n.php:741
|
1149 |
+
msgid "Your license was successfully activated."
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: includes/i18n.php:743
|
1153 |
+
msgid "It looks like your site currently doesn't have an active license."
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: includes/i18n.php:747
|
1157 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
1158 |
+
msgstr ""
|
1159 |
+
|
1160 |
+
#: includes/i18n.php:751
|
1161 |
+
msgid "It looks like the license deactivation failed."
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: includes/i18n.php:755
|
1165 |
+
msgid "It looks like the license could not be activated."
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: includes/i18n.php:759
|
1169 |
+
msgid "Error received from the server:"
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: includes/i18n.php:761
|
1173 |
+
msgid "Your trial has expired. You can still continue using all our free features."
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#: includes/i18n.php:765
|
1177 |
+
msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
|
1178 |
+
msgstr ""
|
1179 |
+
|
1180 |
+
#: includes/i18n.php:769
|
1181 |
+
msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
|
1182 |
+
msgstr ""
|
1183 |
+
|
1184 |
+
#: includes/i18n.php:773
|
1185 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
1186 |
+
msgstr ""
|
1187 |
+
|
1188 |
+
#: includes/i18n.php:777
|
1189 |
+
msgid "Your %s free trial was successfully cancelled."
|
1190 |
+
msgstr ""
|
1191 |
+
|
1192 |
+
#: includes/i18n.php:781
|
1193 |
+
msgctxt "%s - numeric version number"
|
1194 |
+
msgid "Version %s was released."
|
1195 |
+
msgstr ""
|
1196 |
+
|
1197 |
+
#: includes/i18n.php:785
|
1198 |
+
msgid "Please download %s."
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: includes/i18n.php:787
|
1202 |
+
msgctxt "%s - plan name, as the latest professional version here"
|
1203 |
+
msgid "the latest %s version here"
|
1204 |
+
msgstr ""
|
1205 |
+
|
1206 |
+
#: includes/i18n.php:791
|
1207 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
1208 |
+
msgstr ""
|
1209 |
+
|
1210 |
+
#: includes/i18n.php:795
|
1211 |
+
msgctxt "call to action"
|
1212 |
+
msgid "Start free trial"
|
1213 |
+
msgstr ""
|
1214 |
+
|
1215 |
+
#: includes/i18n.php:797
|
1216 |
+
msgid "Starting trial"
|
1217 |
+
msgstr ""
|
1218 |
+
|
1219 |
+
#: includes/i18n.php:799
|
1220 |
+
msgid "Please wait"
|
1221 |
+
msgstr ""
|
1222 |
+
|
1223 |
+
#: includes/i18n.php:801
|
1224 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
1225 |
+
msgstr ""
|
1226 |
+
|
1227 |
+
#: includes/i18n.php:805
|
1228 |
+
msgid "You already utilized a trial before."
|
1229 |
+
msgstr ""
|
1230 |
+
|
1231 |
+
#: includes/i18n.php:807
|
1232 |
+
msgid "You are already running the plugin in a trial mode."
|
1233 |
+
msgstr ""
|
1234 |
+
|
1235 |
+
#: includes/i18n.php:811
|
1236 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
1237 |
+
msgstr ""
|
1238 |
+
|
1239 |
+
#: includes/i18n.php:815
|
1240 |
+
msgid "Plan %s does not support a trial period."
|
1241 |
+
msgstr ""
|
1242 |
+
|
1243 |
+
#: includes/i18n.php:817
|
1244 |
+
msgid "None of the plugin's plans supports a trial period."
|
1245 |
+
msgstr ""
|
1246 |
+
|
1247 |
+
#: includes/i18n.php:821
|
1248 |
+
msgid "Unexpected API error. Please contact the plugin's author with the following error."
|
1249 |
+
msgstr ""
|
1250 |
+
|
1251 |
+
#: includes/i18n.php:825
|
1252 |
+
msgid "No commitment for %s days - cancel anytime!"
|
1253 |
+
msgstr ""
|
1254 |
+
|
1255 |
+
#: includes/i18n.php:827
|
1256 |
+
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."
|
1257 |
+
msgstr ""
|
1258 |
+
|
1259 |
+
#: includes/i18n.php:831
|
1260 |
+
msgid "Couldn't activate %s."
|
1261 |
+
msgstr ""
|
1262 |
+
|
1263 |
+
#: includes/i18n.php:833
|
1264 |
+
msgid "Please contact us with the following message:"
|
1265 |
+
msgstr ""
|
1266 |
+
|
1267 |
+
#: includes/i18n.php:835
|
1268 |
+
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."
|
1269 |
+
msgstr ""
|
1270 |
+
|
1271 |
+
#: includes/i18n.php:839
|
1272 |
+
msgid "Please contact us here"
|
1273 |
+
msgstr ""
|
1274 |
+
|
1275 |
+
#: includes/i18n.php:841
|
1276 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
1277 |
+
msgstr ""
|
1278 |
+
|
1279 |
+
#: includes/i18n.php:849
|
1280 |
+
msgid "From unknown reason, the API connectivity test failed."
|
1281 |
+
msgstr ""
|
1282 |
+
|
1283 |
+
#: includes/i18n.php:853
|
1284 |
+
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?"
|
1285 |
+
msgstr ""
|
1286 |
+
|
1287 |
+
#: includes/i18n.php:857
|
1288 |
+
msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server."
|
1289 |
+
msgstr ""
|
1290 |
+
|
1291 |
+
#: includes/i18n.php:861
|
1292 |
+
msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
|
1293 |
+
msgstr ""
|
1294 |
+
|
1295 |
+
#: includes/i18n.php:865
|
1296 |
+
msgctxt "as pluginX requires an access to our API"
|
1297 |
+
msgid "%s requires an access to our API."
|
1298 |
+
msgstr ""
|
1299 |
+
|
1300 |
+
#: includes/i18n.php:869
|
1301 |
+
msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
|
1302 |
+
msgstr ""
|
1303 |
+
|
1304 |
+
#: includes/i18n.php:873
|
1305 |
+
msgid "I don't know what is Squid or ACL, help me!"
|
1306 |
+
msgstr ""
|
1307 |
+
|
1308 |
+
#: includes/i18n.php:875, includes/i18n.php:889
|
1309 |
+
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."
|
1310 |
+
msgstr ""
|
1311 |
+
|
1312 |
+
#: includes/i18n.php:879
|
1313 |
+
msgid "I'm a system administrator"
|
1314 |
+
msgstr ""
|
1315 |
+
|
1316 |
+
#: includes/i18n.php:881
|
1317 |
+
msgid "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again."
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: includes/i18n.php:885
|
1321 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: includes/i18n.php:893
|
1325 |
+
msgid "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again."
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: includes/i18n.php:897
|
1329 |
+
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."
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#: includes/i18n.php:901
|
1333 |
+
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
1334 |
+
msgstr ""
|
1335 |
+
|
1336 |
+
#: includes/i18n.php:905
|
1337 |
+
msgid "Yes - I'm giving you a chance to fix it"
|
1338 |
+
msgstr ""
|
1339 |
+
|
1340 |
+
#: includes/i18n.php:907
|
1341 |
+
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."
|
1342 |
+
msgstr ""
|
1343 |
+
|
1344 |
+
#: includes/i18n.php:911
|
1345 |
+
msgid "Let's try your previous version"
|
1346 |
+
msgstr ""
|
1347 |
+
|
1348 |
+
#: includes/i18n.php:913
|
1349 |
+
msgid "Uninstall this version and install the previous one."
|
1350 |
+
msgstr ""
|
1351 |
+
|
1352 |
+
#: includes/i18n.php:917
|
1353 |
+
msgid "That's exhausting, please deactivate"
|
1354 |
+
msgstr ""
|
1355 |
+
|
1356 |
+
#: includes/i18n.php:919
|
1357 |
+
msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: includes/i18n.php:923
|
1361 |
+
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."
|
1362 |
+
msgstr ""
|
1363 |
+
|
1364 |
+
#: includes/i18n.php:927
|
1365 |
+
msgctxt "%1s - plugin title, %2s - API domain"
|
1366 |
+
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
|
1367 |
+
msgstr ""
|
1368 |
+
|
1369 |
+
#: includes/i18n.php:931
|
1370 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
1371 |
+
msgstr ""
|
1372 |
+
|
1373 |
+
#: includes/i18n.php:939
|
1374 |
+
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."
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: includes/i18n.php:943
|
1378 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
1379 |
+
msgstr ""
|
1380 |
+
|
1381 |
+
#: includes/i18n.php:947
|
1382 |
+
msgid "%s is the new owner of the account."
|
1383 |
+
msgstr ""
|
1384 |
+
|
1385 |
+
#: includes/i18n.php:951
|
1386 |
+
msgctxt "addonX cannot run without pluginY"
|
1387 |
+
msgid "%s cannot run without %s."
|
1388 |
+
msgstr ""
|
1389 |
+
|
1390 |
+
#: includes/i18n.php:955
|
1391 |
+
msgctxt "addonX cannot run..."
|
1392 |
+
msgid "%s cannot run without the plugin."
|
1393 |
+
msgstr ""
|
1394 |
+
|
1395 |
+
#: includes/i18n.php:959
|
1396 |
+
msgctxt "pluginX activation was successfully..."
|
1397 |
+
msgid "%s activation was successfully completed."
|
1398 |
+
msgstr ""
|
1399 |
+
|
1400 |
+
#: includes/i18n.php:963
|
1401 |
+
msgctxt "Plugin installer section title"
|
1402 |
+
msgid "Features & Pricing"
|
1403 |
+
msgstr ""
|
1404 |
+
|
1405 |
+
#: includes/i18n.php:967
|
1406 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1407 |
+
msgstr ""
|
1408 |
+
|
1409 |
+
#: includes/i18n.php:971
|
1410 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1411 |
+
msgstr ""
|
1412 |
+
|
1413 |
+
#: includes/i18n.php:979
|
1414 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
1415 |
+
msgstr ""
|
1416 |
+
|
1417 |
+
#: includes/i18n.php:983
|
1418 |
+
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."
|
1419 |
+
msgstr ""
|
1420 |
+
|
1421 |
+
#: includes/i18n.php:995
|
1422 |
+
msgctxt "as every month"
|
1423 |
+
msgid "Monthly"
|
1424 |
+
msgstr ""
|
1425 |
+
|
1426 |
+
#: includes/i18n.php:997
|
1427 |
+
msgctxt "as monthly period"
|
1428 |
+
msgid "mo"
|
1429 |
+
msgstr ""
|
1430 |
+
|
1431 |
+
#: includes/i18n.php:999
|
1432 |
+
msgctxt "as once a year"
|
1433 |
+
msgid "Annual"
|
1434 |
+
msgstr ""
|
1435 |
+
|
1436 |
+
#: includes/i18n.php:1001
|
1437 |
+
msgctxt "as once a year"
|
1438 |
+
msgid "Annually"
|
1439 |
+
msgstr ""
|
1440 |
+
|
1441 |
+
#: includes/i18n.php:1003
|
1442 |
+
msgctxt "as once a year"
|
1443 |
+
msgid "Once"
|
1444 |
+
msgstr ""
|
1445 |
+
|
1446 |
+
#: includes/i18n.php:1005
|
1447 |
+
msgctxt "as annual period"
|
1448 |
+
msgid "year"
|
1449 |
+
msgstr ""
|
1450 |
+
|
1451 |
+
#: includes/i18n.php:1007
|
1452 |
+
msgid "Lifetime"
|
1453 |
+
msgstr ""
|
1454 |
+
|
1455 |
+
#: includes/i18n.php:1009
|
1456 |
+
msgctxt "e.g. the best product"
|
1457 |
+
msgid "Best"
|
1458 |
+
msgstr ""
|
1459 |
+
|
1460 |
+
#: includes/i18n.php:1011
|
1461 |
+
msgctxt "e.g. billed monthly"
|
1462 |
+
msgid "Billed %s"
|
1463 |
+
msgstr ""
|
1464 |
+
|
1465 |
+
#: includes/i18n.php:1013
|
1466 |
+
msgctxt "as a discount of $5 or 10%"
|
1467 |
+
msgid "Save %s"
|
1468 |
+
msgstr ""
|
1469 |
+
|
1470 |
+
#: includes/i18n.php:1017
|
1471 |
+
msgid "View details"
|
1472 |
+
msgstr ""
|
1473 |
+
|
1474 |
+
#: includes/i18n.php:1025
|
1475 |
+
msgctxt "button label"
|
1476 |
+
msgid "Approve & Start Trial"
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: includes/i18n.php:1029
|
1480 |
+
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
1481 |
+
msgstr ""
|
1482 |
+
|
1483 |
+
#: includes/i18n.php:1033
|
1484 |
+
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."
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#: includes/i18n.php:1045
|
1488 |
+
msgid "Business name"
|
1489 |
+
msgstr ""
|
1490 |
+
|
1491 |
+
#: includes/i18n.php:1047
|
1492 |
+
msgid "Tax / VAT ID"
|
1493 |
+
msgstr ""
|
1494 |
+
|
1495 |
+
#: includes/i18n.php:1049
|
1496 |
+
msgid "Address Line %d"
|
1497 |
+
msgstr ""
|
1498 |
+
|
1499 |
+
#: includes/i18n.php:1051
|
1500 |
+
msgid "Country"
|
1501 |
+
msgstr ""
|
1502 |
+
|
1503 |
+
#: includes/i18n.php:1053
|
1504 |
+
msgid "Select Country"
|
1505 |
+
msgstr ""
|
1506 |
+
|
1507 |
+
#: includes/i18n.php:1055
|
1508 |
+
msgid "City"
|
1509 |
+
msgstr ""
|
1510 |
+
|
1511 |
+
#: includes/i18n.php:1057
|
1512 |
+
msgid "Town"
|
1513 |
+
msgstr ""
|
1514 |
+
|
1515 |
+
#: includes/i18n.php:1059
|
1516 |
+
msgid "State"
|
1517 |
+
msgstr ""
|
1518 |
+
|
1519 |
+
#: includes/i18n.php:1061
|
1520 |
+
msgid "Province"
|
1521 |
+
msgstr ""
|
1522 |
+
|
1523 |
+
#: includes/i18n.php:1063
|
1524 |
+
msgid "ZIP / Postal Code"
|
1525 |
+
msgstr ""
|
lib/freemius/package.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "freemius-wordpress-sdk",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"description": "",
|
5 |
+
"main": "gulpfile.js",
|
6 |
+
"dependencies": {
|
7 |
+
"gulp": "^3.9.1",
|
8 |
+
"gulp-gettext": "^0.3.0",
|
9 |
+
"gulp-pofill": "^1.0.0",
|
10 |
+
"gulp-rename": "^1.2.2",
|
11 |
+
"gulp-sort": "^2.0.0",
|
12 |
+
"gulp-wp-pot": "^1.3.1"
|
13 |
+
},
|
14 |
+
"scripts": {
|
15 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
16 |
+
},
|
17 |
+
"repository": {
|
18 |
+
"type": "git",
|
19 |
+
"url": "git+https://github.com/Freemius/wordpress-sdk.git"
|
20 |
+
},
|
21 |
+
"author": "Vova Feldman",
|
22 |
+
"license": "GPL-2.0",
|
23 |
+
"homepage": "https://freemius.com",
|
24 |
+
"devDependencies": {
|
25 |
+
"gulp": "^3.9.1",
|
26 |
+
"gulp-gettext": "^0.3.0",
|
27 |
+
"gulp-pofill": "^1.0.0",
|
28 |
+
"gulp-rename": "^1.2.2",
|
29 |
+
"gulp-sort": "^2.0.0",
|
30 |
+
"gulp-wp-pot": "^1.3.1"
|
31 |
+
}
|
32 |
+
}
|
lib/freemius/start.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
-
$this_sdk_version = '1.2.
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
@@ -84,9 +84,7 @@
|
|
84 |
}
|
85 |
|
86 |
// Refresh page.
|
87 |
-
|
88 |
-
exit();
|
89 |
-
}
|
90 |
}
|
91 |
} else {
|
92 |
if ( ! function_exists( 'get_plugins' ) ) {
|
@@ -144,9 +142,7 @@
|
|
144 |
if ( fs_newest_sdk_plugin_first() ) {
|
145 |
// Refresh page after re-order to make sure activated plugin loads newest SDK.
|
146 |
if ( class_exists( 'Freemius' ) ) {
|
147 |
-
|
148 |
-
exit();
|
149 |
-
}
|
150 |
}
|
151 |
}
|
152 |
}
|
@@ -283,23 +279,25 @@
|
|
283 |
* @param bool $is_premium Hints freemius if running the premium plugin or not.
|
284 |
*
|
285 |
* @return Freemius
|
|
|
|
|
286 |
*/
|
287 |
function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
|
288 |
-
$fs = Freemius::instance( $slug );
|
289 |
$fs->init( $plugin_id, $public_key, $is_live, $is_premium );
|
290 |
|
291 |
return $fs;
|
292 |
}
|
293 |
|
294 |
/**
|
295 |
-
* @param array
|
296 |
*
|
297 |
* @return Freemius
|
298 |
* @throws Freemius_Exception
|
299 |
*/
|
300 |
-
function fs_dynamic_init( $
|
301 |
-
$fs = Freemius::instance( $
|
302 |
-
$fs->dynamic_init( $
|
303 |
|
304 |
return $fs;
|
305 |
}
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
$this_sdk_version = '1.2.1.5';
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
84 |
}
|
85 |
|
86 |
// Refresh page.
|
87 |
+
fs_redirect( $_SERVER['REQUEST_URI'] );
|
|
|
|
|
88 |
}
|
89 |
} else {
|
90 |
if ( ! function_exists( 'get_plugins' ) ) {
|
142 |
if ( fs_newest_sdk_plugin_first() ) {
|
143 |
// Refresh page after re-order to make sure activated plugin loads newest SDK.
|
144 |
if ( class_exists( 'Freemius' ) ) {
|
145 |
+
fs_redirect( $_SERVER['REQUEST_URI'] );
|
|
|
|
|
146 |
}
|
147 |
}
|
148 |
}
|
279 |
* @param bool $is_premium Hints freemius if running the premium plugin or not.
|
280 |
*
|
281 |
* @return Freemius
|
282 |
+
*
|
283 |
+
* @deprecated Please use fs_dynamic_init().
|
284 |
*/
|
285 |
function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
|
286 |
+
$fs = Freemius::instance( $slug, true );
|
287 |
$fs->init( $plugin_id, $public_key, $is_live, $is_premium );
|
288 |
|
289 |
return $fs;
|
290 |
}
|
291 |
|
292 |
/**
|
293 |
+
* @param array<string,string> $module Plugin or Theme details.
|
294 |
*
|
295 |
* @return Freemius
|
296 |
* @throws Freemius_Exception
|
297 |
*/
|
298 |
+
function fs_dynamic_init( $module ) {
|
299 |
+
$fs = Freemius::instance( $module['slug'], true );
|
300 |
+
$fs->dynamic_init( $module );
|
301 |
|
302 |
return $fs;
|
303 |
}
|
lib/freemius/templates/account.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
/**
|
15 |
* @var Freemius $fs
|
@@ -33,7 +36,7 @@
|
|
33 |
$show_upgrade = ( $fs->has_paid_plan() && ! $is_paying && ! $is_paid_trial );
|
34 |
|
35 |
if ( $show_upgrade ) {
|
36 |
-
$fs->
|
37 |
}
|
38 |
?>
|
39 |
<div class="wrap">
|
@@ -81,7 +84,7 @@
|
|
81 |
</li>
|
82 |
<?php if ( $is_paying ) : ?>
|
83 |
<li>
|
84 |
-
 
|
85 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
86 |
<input type="hidden" name="fs_action" value="deactivate_license">
|
87 |
<?php wp_nonce_field( 'deactivate_license' ) ?>
|
@@ -95,7 +98,7 @@
|
|
95 |
$is_active_subscription
|
96 |
) : ?>
|
97 |
<li>
|
98 |
-
 
|
99 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
100 |
<input type="hidden" name="fs_action" value="downgrade_account">
|
101 |
<?php wp_nonce_field( 'downgrade_account' ) ?>
|
@@ -110,13 +113,13 @@
|
|
110 |
</li>
|
111 |
<?php endif ?>
|
112 |
<li>
|
113 |
-
 
|
114 |
<a href="<?php echo $fs->get_upgrade_url() ?>"><i
|
115 |
class="dashicons dashicons-grid-view"></i> <?php _efs( 'change-plan', $slug ) ?></a>
|
116 |
</li>
|
117 |
<?php elseif ( $is_paid_trial ) : ?>
|
118 |
<li>
|
119 |
-
 
|
120 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
121 |
<input type="hidden" name="fs_action" value="cancel_trial">
|
122 |
<?php wp_nonce_field( 'cancel_trial' ) ?>
|
@@ -127,7 +130,7 @@
|
|
127 |
</li>
|
128 |
<?php endif ?>
|
129 |
<li>
|
130 |
-
 
|
131 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
132 |
<input type="hidden" name="fs_action" value="<?php echo $slug ?>_sync_license">
|
133 |
<?php wp_nonce_field( $slug . '_sync_license' ) ?>
|
@@ -287,8 +290,8 @@
|
|
287 |
<?php else : ?>
|
288 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
|
289 |
method="POST" class="button-group">
|
290 |
-
<?php if ($show_upgrade) : ?>
|
291 |
-
<a class="button activate-license-trigger <?php echo $slug ?>" href="
|
292 |
<?php endif ?>
|
293 |
<input type="submit" class="button"
|
294 |
value="<?php _efs( 'sync-license', $slug ) ?>">
|
@@ -530,6 +533,31 @@
|
|
530 |
array( 'plugin_id' => $addon_id ),
|
531 |
false
|
532 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
} else if ( $is_paid_trial ) {
|
534 |
$buttons[] = fs_ui_get_action_button(
|
535 |
$slug,
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
/**
|
18 |
* @var Freemius $fs
|
36 |
$show_upgrade = ( $fs->has_paid_plan() && ! $is_paying && ! $is_paid_trial );
|
37 |
|
38 |
if ( $show_upgrade ) {
|
39 |
+
$fs->_add_license_activation_dialog_box();
|
40 |
}
|
41 |
?>
|
42 |
<div class="wrap">
|
84 |
</li>
|
85 |
<?php if ( $is_paying ) : ?>
|
86 |
<li>
|
87 |
+
•
|
88 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
89 |
<input type="hidden" name="fs_action" value="deactivate_license">
|
90 |
<?php wp_nonce_field( 'deactivate_license' ) ?>
|
98 |
$is_active_subscription
|
99 |
) : ?>
|
100 |
<li>
|
101 |
+
•
|
102 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
103 |
<input type="hidden" name="fs_action" value="downgrade_account">
|
104 |
<?php wp_nonce_field( 'downgrade_account' ) ?>
|
113 |
</li>
|
114 |
<?php endif ?>
|
115 |
<li>
|
116 |
+
•
|
117 |
<a href="<?php echo $fs->get_upgrade_url() ?>"><i
|
118 |
class="dashicons dashicons-grid-view"></i> <?php _efs( 'change-plan', $slug ) ?></a>
|
119 |
</li>
|
120 |
<?php elseif ( $is_paid_trial ) : ?>
|
121 |
<li>
|
122 |
+
•
|
123 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
124 |
<input type="hidden" name="fs_action" value="cancel_trial">
|
125 |
<?php wp_nonce_field( 'cancel_trial' ) ?>
|
130 |
</li>
|
131 |
<?php endif ?>
|
132 |
<li>
|
133 |
+
•
|
134 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
|
135 |
<input type="hidden" name="fs_action" value="<?php echo $slug ?>_sync_license">
|
136 |
<?php wp_nonce_field( $slug . '_sync_license' ) ?>
|
290 |
<?php else : ?>
|
291 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
|
292 |
method="POST" class="button-group">
|
293 |
+
<?php if ( $show_upgrade && $fs->is_premium() ) : ?>
|
294 |
+
<a class="button activate-license-trigger <?php echo $slug ?>" href="#"><?php _efs( 'activate-license', $slug ) ?></a>
|
295 |
<?php endif ?>
|
296 |
<input type="submit" class="button"
|
297 |
value="<?php _efs( 'sync-license', $slug ) ?>">
|
533 |
array( 'plugin_id' => $addon_id ),
|
534 |
false
|
535 |
);
|
536 |
+
|
537 |
+
$human_readable_license_expiration = human_time_diff( time(), strtotime( $license->expiration ) );
|
538 |
+
$downgrade_confirmation_message = sprintf( __fs( 'downgrade-x-confirm', $slug ),
|
539 |
+
$plan->title,
|
540 |
+
$human_readable_license_expiration );
|
541 |
+
|
542 |
+
$after_downgrade_message_id = ( ! $license->is_block_features ?
|
543 |
+
'after-downgrade-non-blocking' :
|
544 |
+
'after-downgrade-blocking' );
|
545 |
+
|
546 |
+
$after_downgrade_message = sprintf( __fs( $after_downgrade_message_id, $slug ), $plan->title );
|
547 |
+
|
548 |
+
if ( ! $license->is_lifetime() && $is_active_subscription ) {
|
549 |
+
$buttons[] = fs_ui_get_action_button(
|
550 |
+
$slug,
|
551 |
+
'account',
|
552 |
+
'downgrade_account',
|
553 |
+
__fs( 'downgrade', $slug ),
|
554 |
+
array( 'plugin_id' => $addon_id ),
|
555 |
+
false,
|
556 |
+
false,
|
557 |
+
( $downgrade_confirmation_message . ' ' . $after_downgrade_message ),
|
558 |
+
'POST'
|
559 |
+
);
|
560 |
+
}
|
561 |
} else if ( $is_paid_trial ) {
|
562 |
$buttons[] = fs_ui_get_action_button(
|
563 |
$slug,
|
lib/freemius/templates/add-ons.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
/**
|
15 |
* @var Freemius
|
@@ -130,13 +133,12 @@
|
|
130 |
<?php else : ?>
|
131 |
|
132 |
|
133 |
-
$('.fs-card.fs-addon')
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
});
|
140 |
|
141 |
<?php endif ?>
|
142 |
})(jQuery);
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
/**
|
18 |
* @var Freemius
|
133 |
<?php else : ?>
|
134 |
|
135 |
|
136 |
+
$('.fs-card.fs-addon')
|
137 |
+
.mouseover(function () {
|
138 |
+
$(this).find('.fs-cta .button').addClass('button-primary');
|
139 |
+
}).mouseout(function () {
|
140 |
+
$(this).find('.fs-cta .button').removeClass('button-primary');
|
141 |
+
});
|
|
|
142 |
|
143 |
<?php endif ?>
|
144 |
})(jQuery);
|
lib/freemius/templates/add-trial-to-pricing.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Add "&trial=true" to pricing menu item href when running in trial
|
4 |
+
* promotion context.
|
5 |
+
*
|
6 |
+
* @package Freemius
|
7 |
+
* @copyright Copyright (c) 2016, Freemius, Inc.
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 1.2.1.5
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @var array $VARS
|
18 |
+
*/
|
19 |
+
$slug = $VARS['slug'];
|
20 |
+
?>
|
21 |
+
<script type="text/javascript">
|
22 |
+
(function ($) {
|
23 |
+
$(document).ready(function () {
|
24 |
+
var $pricingMenu = $('.fs-submenu-item.<?php echo $slug ?>.pricing'),
|
25 |
+
$pricingMenuLink = $pricingMenu.parents('a');
|
26 |
+
|
27 |
+
// Add trial querystring param.
|
28 |
+
$pricingMenuLink.attr('href', $pricingMenuLink.attr('href') + '&trial=true');
|
29 |
+
});
|
30 |
+
})(jQuery);
|
31 |
+
</script>
|
lib/freemius/templates/all-admin-notice.php
CHANGED
@@ -9,6 +9,10 @@
|
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
exit;
|
11 |
}
|
|
|
|
|
|
|
|
|
12 |
?>
|
13 |
<div class="<?php
|
14 |
switch ($VARS['type']) {
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
exit;
|
11 |
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
?>
|
17 |
<div class="<?php
|
18 |
switch ($VARS['type']) {
|
lib/freemius/templates/billing.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
/**
|
15 |
* @var Freemius $fs
|
@@ -31,6 +34,14 @@
|
|
31 |
$is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
|
32 |
$is_paid_trial = $fs->is_paid_trial();
|
33 |
$show_upgrade = ( ! $is_paying && ! $is_paid_trial );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
?>
|
35 |
|
36 |
<div id="fs_account" class="wrap">
|
@@ -54,14 +65,305 @@
|
|
54 |
</h2>
|
55 |
|
56 |
<div id="poststuff">
|
57 |
-
<div>
|
58 |
<div class="has-sidebar has-right-sidebar">
|
59 |
<div class="has-sidebar-content">
|
60 |
<div class="postbox">
|
61 |
-
<h3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
<?php
|
64 |
-
$payments
|
65 |
?>
|
66 |
|
67 |
<div class="inside">
|
@@ -82,7 +384,8 @@
|
|
82 |
<td><?php echo $payment->id ?></td>
|
83 |
<td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
|
84 |
<td>$<?php echo $payment->gross ?></td>
|
85 |
-
<td><a href="<?php echo $fs->_get_invoice_api_url($payment->id) ?>"
|
|
|
86 |
target="_blank"><?php _efs( 'invoice', $slug ) ?></a></td>
|
87 |
</tr>
|
88 |
<?php $odd = ! $odd; endforeach ?>
|
@@ -95,6 +398,103 @@
|
|
95 |
</div>
|
96 |
</div>
|
97 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
<?php
|
99 |
$params = array(
|
100 |
'page' => 'account',
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
/**
|
18 |
* @var Freemius $fs
|
34 |
$is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
|
35 |
$is_paid_trial = $fs->is_paid_trial();
|
36 |
$show_upgrade = ( ! $is_paying && ! $is_paid_trial );
|
37 |
+
|
38 |
+
$billing = $fs->_fetch_billing();
|
39 |
+
$has_billing = ( $billing instanceof FS_Billing );
|
40 |
+
if ( ! $has_billing ) {
|
41 |
+
$billing = new FS_Billing();
|
42 |
+
}
|
43 |
+
|
44 |
+
$readonly_attr = $has_billing ? 'readonly' : '';
|
45 |
?>
|
46 |
|
47 |
<div id="fs_account" class="wrap">
|
65 |
</h2>
|
66 |
|
67 |
<div id="poststuff">
|
68 |
+
<div id="fs_billing">
|
69 |
<div class="has-sidebar has-right-sidebar">
|
70 |
<div class="has-sidebar-content">
|
71 |
<div class="postbox">
|
72 |
+
<h3><span class="dashicons dashicons-businessman"></span> <?php _efs( 'billing', $slug ) ?></h3>
|
73 |
+
<table id="fs_billing_address"<?php if ( $has_billing ) {
|
74 |
+
echo ' class="fs-read-mode"';
|
75 |
+
} ?>>
|
76 |
+
<tr>
|
77 |
+
<td><label><span><?php _efs( 'business-name', $slug ) ?>:</span> <input id="business_name" value="<?php echo $billing->business_name ?>" placeholder="<?php _efs( 'business-name', $slug ) ?>"></label></td>
|
78 |
+
<td><label><span><?php _efs( 'tax-vat-id', $slug ) ?>:</span> <input id="tax_id" value="<?php echo $billing->tax_id ?>" placeholder="<?php _efs( 'tax-vat-id', $slug ) ?>"></label></td>
|
79 |
+
</tr>
|
80 |
+
<tr>
|
81 |
+
<td><label><span><?php printf( __fs( 'address-line-n', $slug ), 1 ) ?>:</span> <input id="address_street" value="<?php echo $billing->address_street ?>" placeholder="<?php printf( __fs( 'address-line-n', $slug ), 1 ) ?>"></label></td>
|
82 |
+
<td><label><span><?php printf( __fs( 'address-line-n', $slug ), 2 ) ?>:</span> <input id="address_apt" value="<?php echo $billing->address_apt ?>" placeholder="<?php printf( __fs( 'address-line-n', $slug ), 2 ) ?>"></label></td>
|
83 |
+
</tr>
|
84 |
+
<tr>
|
85 |
+
<td><label><span><?php _efs( 'city', $slug ) ?> / <?php _efs( 'town', $slug ) ?>:</span> <input id="address_city" value="<?php echo $billing->address_city ?>" placeholder="<?php _efs( 'city', $slug ) ?> / <?php _efs( 'town', $slug ) ?>"></label></td>
|
86 |
+
<td><label><span><?php _efs( 'zip-postal-code', $slug ) ?>:</span> <input id="address_zip" value="<?php echo $billing->address_zip ?>" placeholder="<?php _efs( 'zip-postal-code', $slug ) ?>"></label></td>
|
87 |
+
</tr>
|
88 |
+
<tr>
|
89 |
+
<?php $countries = array(
|
90 |
+
'AF' => 'Afghanistan',
|
91 |
+
'AX' => 'Aland Islands',
|
92 |
+
'AL' => 'Albania',
|
93 |
+
'DZ' => 'Algeria',
|
94 |
+
'AS' => 'American Samoa',
|
95 |
+
'AD' => 'Andorra',
|
96 |
+
'AO' => 'Angola',
|
97 |
+
'AI' => 'Anguilla',
|
98 |
+
'AQ' => 'Antarctica',
|
99 |
+
'AG' => 'Antigua and Barbuda',
|
100 |
+
'AR' => 'Argentina',
|
101 |
+
'AM' => 'Armenia',
|
102 |
+
'AW' => 'Aruba',
|
103 |
+
'AU' => 'Australia',
|
104 |
+
'AT' => 'Austria',
|
105 |
+
'AZ' => 'Azerbaijan',
|
106 |
+
'BS' => 'Bahamas',
|
107 |
+
'BH' => 'Bahrain',
|
108 |
+
'BD' => 'Bangladesh',
|
109 |
+
'BB' => 'Barbados',
|
110 |
+
'BY' => 'Belarus',
|
111 |
+
'BE' => 'Belgium',
|
112 |
+
'BZ' => 'Belize',
|
113 |
+
'BJ' => 'Benin',
|
114 |
+
'BM' => 'Bermuda',
|
115 |
+
'BT' => 'Bhutan',
|
116 |
+
'BO' => 'Bolivia',
|
117 |
+
'BQ' => 'Bonaire, Saint Eustatius and Saba',
|
118 |
+
'BA' => 'Bosnia and Herzegovina',
|
119 |
+
'BW' => 'Botswana',
|
120 |
+
'BV' => 'Bouvet Island',
|
121 |
+
'BR' => 'Brazil',
|
122 |
+
'IO' => 'British Indian Ocean Territory',
|
123 |
+
'VG' => 'British Virgin Islands',
|
124 |
+
'BN' => 'Brunei',
|
125 |
+
'BG' => 'Bulgaria',
|
126 |
+
'BF' => 'Burkina Faso',
|
127 |
+
'BI' => 'Burundi',
|
128 |
+
'KH' => 'Cambodia',
|
129 |
+
'CM' => 'Cameroon',
|
130 |
+
'CA' => 'Canada',
|
131 |
+
'CV' => 'Cape Verde',
|
132 |
+
'KY' => 'Cayman Islands',
|
133 |
+
'CF' => 'Central African Republic',
|
134 |
+
'TD' => 'Chad',
|
135 |
+
'CL' => 'Chile',
|
136 |
+
'CN' => 'China',
|
137 |
+
'CX' => 'Christmas Island',
|
138 |
+
'CC' => 'Cocos Islands',
|
139 |
+
'CO' => 'Colombia',
|
140 |
+
'KM' => 'Comoros',
|
141 |
+
'CK' => 'Cook Islands',
|
142 |
+
'CR' => 'Costa Rica',
|
143 |
+
'HR' => 'Croatia',
|
144 |
+
'CU' => 'Cuba',
|
145 |
+
'CW' => 'Curacao',
|
146 |
+
'CY' => 'Cyprus',
|
147 |
+
'CZ' => 'Czech Republic',
|
148 |
+
'CD' => 'Democratic Republic of the Congo',
|
149 |
+
'DK' => 'Denmark',
|
150 |
+
'DJ' => 'Djibouti',
|
151 |
+
'DM' => 'Dominica',
|
152 |
+
'DO' => 'Dominican Republic',
|
153 |
+
'TL' => 'East Timor',
|
154 |
+
'EC' => 'Ecuador',
|
155 |
+
'EG' => 'Egypt',
|
156 |
+
'SV' => 'El Salvador',
|
157 |
+
'GQ' => 'Equatorial Guinea',
|
158 |
+
'ER' => 'Eritrea',
|
159 |
+
'EE' => 'Estonia',
|
160 |
+
'ET' => 'Ethiopia',
|
161 |
+
'FK' => 'Falkland Islands',
|
162 |
+
'FO' => 'Faroe Islands',
|
163 |
+
'FJ' => 'Fiji',
|
164 |
+
'FI' => 'Finland',
|
165 |
+
'FR' => 'France',
|
166 |
+
'GF' => 'French Guiana',
|
167 |
+
'PF' => 'French Polynesia',
|
168 |
+
'TF' => 'French Southern Territories',
|
169 |
+
'GA' => 'Gabon',
|
170 |
+
'GM' => 'Gambia',
|
171 |
+
'GE' => 'Georgia',
|
172 |
+
'DE' => 'Germany',
|
173 |
+
'GH' => 'Ghana',
|
174 |
+
'GI' => 'Gibraltar',
|
175 |
+
'GR' => 'Greece',
|
176 |
+
'GL' => 'Greenland',
|
177 |
+
'GD' => 'Grenada',
|
178 |
+
'GP' => 'Guadeloupe',
|
179 |
+
'GU' => 'Guam',
|
180 |
+
'GT' => 'Guatemala',
|
181 |
+
'GG' => 'Guernsey',
|
182 |
+
'GN' => 'Guinea',
|
183 |
+
'GW' => 'Guinea-Bissau',
|
184 |
+
'GY' => 'Guyana',
|
185 |
+
'HT' => 'Haiti',
|
186 |
+
'HM' => 'Heard Island and McDonald Islands',
|
187 |
+
'HN' => 'Honduras',
|
188 |
+
'HK' => 'Hong Kong',
|
189 |
+
'HU' => 'Hungary',
|
190 |
+
'IS' => 'Iceland',
|
191 |
+
'IN' => 'India',
|
192 |
+
'ID' => 'Indonesia',
|
193 |
+
'IR' => 'Iran',
|
194 |
+
'IQ' => 'Iraq',
|
195 |
+
'IE' => 'Ireland',
|
196 |
+
'IM' => 'Isle of Man',
|
197 |
+
'IL' => 'Israel',
|
198 |
+
'IT' => 'Italy',
|
199 |
+
'CI' => 'Ivory Coast',
|
200 |
+
'JM' => 'Jamaica',
|
201 |
+
'JP' => 'Japan',
|
202 |
+
'JE' => 'Jersey',
|
203 |
+
'JO' => 'Jordan',
|
204 |
+
'KZ' => 'Kazakhstan',
|
205 |
+
'KE' => 'Kenya',
|
206 |
+
'KI' => 'Kiribati',
|
207 |
+
'XK' => 'Kosovo',
|
208 |
+
'KW' => 'Kuwait',
|
209 |
+
'KG' => 'Kyrgyzstan',
|
210 |
+
'LA' => 'Laos',
|
211 |
+
'LV' => 'Latvia',
|
212 |
+
'LB' => 'Lebanon',
|
213 |
+
'LS' => 'Lesotho',
|
214 |
+
'LR' => 'Liberia',
|
215 |
+
'LY' => 'Libya',
|
216 |
+
'LI' => 'Liechtenstein',
|
217 |
+
'LT' => 'Lithuania',
|
218 |
+
'LU' => 'Luxembourg',
|
219 |
+
'MO' => 'Macao',
|
220 |
+
'MK' => 'Macedonia',
|
221 |
+
'MG' => 'Madagascar',
|
222 |
+
'MW' => 'Malawi',
|
223 |
+
'MY' => 'Malaysia',
|
224 |
+
'MV' => 'Maldives',
|
225 |
+
'ML' => 'Mali',
|
226 |
+
'MT' => 'Malta',
|
227 |
+
'MH' => 'Marshall Islands',
|
228 |
+
'MQ' => 'Martinique',
|
229 |
+
'MR' => 'Mauritania',
|
230 |
+
'MU' => 'Mauritius',
|
231 |
+
'YT' => 'Mayotte',
|
232 |
+
'MX' => 'Mexico',
|
233 |
+
'FM' => 'Micronesia',
|
234 |
+
'MD' => 'Moldova',
|
235 |
+
'MC' => 'Monaco',
|
236 |
+
'MN' => 'Mongolia',
|
237 |
+
'ME' => 'Montenegro',
|
238 |
+
'MS' => 'Montserrat',
|
239 |
+
'MA' => 'Morocco',
|
240 |
+
'MZ' => 'Mozambique',
|
241 |
+
'MM' => 'Myanmar',
|
242 |
+
'NA' => 'Namibia',
|
243 |
+
'NR' => 'Nauru',
|
244 |
+
'NP' => 'Nepal',
|
245 |
+
'NL' => 'Netherlands',
|
246 |
+
'NC' => 'New Caledonia',
|
247 |
+
'NZ' => 'New Zealand',
|
248 |
+
'NI' => 'Nicaragua',
|
249 |
+
'NE' => 'Niger',
|
250 |
+
'NG' => 'Nigeria',
|
251 |
+
'NU' => 'Niue',
|
252 |
+
'NF' => 'Norfolk Island',
|
253 |
+
'KP' => 'North Korea',
|
254 |
+
'MP' => 'Northern Mariana Islands',
|
255 |
+
'NO' => 'Norway',
|
256 |
+
'OM' => 'Oman',
|
257 |
+
'PK' => 'Pakistan',
|
258 |
+
'PW' => 'Palau',
|
259 |
+
'PS' => 'Palestinian Territory',
|
260 |
+
'PA' => 'Panama',
|
261 |
+
'PG' => 'Papua New Guinea',
|
262 |
+
'PY' => 'Paraguay',
|
263 |
+
'PE' => 'Peru',
|
264 |
+
'PH' => 'Philippines',
|
265 |
+
'PN' => 'Pitcairn',
|
266 |
+
'PL' => 'Poland',
|
267 |
+
'PT' => 'Portugal',
|
268 |
+
'PR' => 'Puerto Rico',
|
269 |
+
'QA' => 'Qatar',
|
270 |
+
'CG' => 'Republic of the Congo',
|
271 |
+
'RE' => 'Reunion',
|
272 |
+
'RO' => 'Romania',
|
273 |
+
'RU' => 'Russia',
|
274 |
+
'RW' => 'Rwanda',
|
275 |
+
'BL' => 'Saint Barthelemy',
|
276 |
+
'SH' => 'Saint Helena',
|
277 |
+
'KN' => 'Saint Kitts and Nevis',
|
278 |
+
'LC' => 'Saint Lucia',
|
279 |
+
'MF' => 'Saint Martin',
|
280 |
+
'PM' => 'Saint Pierre and Miquelon',
|
281 |
+
'VC' => 'Saint Vincent and the Grenadines',
|
282 |
+
'WS' => 'Samoa',
|
283 |
+
'SM' => 'San Marino',
|
284 |
+
'ST' => 'Sao Tome and Principe',
|
285 |
+
'SA' => 'Saudi Arabia',
|
286 |
+
'SN' => 'Senegal',
|
287 |
+
'RS' => 'Serbia',
|
288 |
+
'SC' => 'Seychelles',
|
289 |
+
'SL' => 'Sierra Leone',
|
290 |
+
'SG' => 'Singapore',
|
291 |
+
'SX' => 'Sint Maarten',
|
292 |
+
'SK' => 'Slovakia',
|
293 |
+
'SI' => 'Slovenia',
|
294 |
+
'SB' => 'Solomon Islands',
|
295 |
+
'SO' => 'Somalia',
|
296 |
+
'ZA' => 'South Africa',
|
297 |
+
'GS' => 'South Georgia and the South Sandwich Islands',
|
298 |
+
'KR' => 'South Korea',
|
299 |
+
'SS' => 'South Sudan',
|
300 |
+
'ES' => 'Spain',
|
301 |
+
'LK' => 'Sri Lanka',
|
302 |
+
'SD' => 'Sudan',
|
303 |
+
'SR' => 'Suriname',
|
304 |
+
'SJ' => 'Svalbard and Jan Mayen',
|
305 |
+
'SZ' => 'Swaziland',
|
306 |
+
'SE' => 'Sweden',
|
307 |
+
'CH' => 'Switzerland',
|
308 |
+
'SY' => 'Syria',
|
309 |
+
'TW' => 'Taiwan',
|
310 |
+
'TJ' => 'Tajikistan',
|
311 |
+
'TZ' => 'Tanzania',
|
312 |
+
'TH' => 'Thailand',
|
313 |
+
'TG' => 'Togo',
|
314 |
+
'TK' => 'Tokelau',
|
315 |
+
'TO' => 'Tonga',
|
316 |
+
'TT' => 'Trinidad and Tobago',
|
317 |
+
'TN' => 'Tunisia',
|
318 |
+
'TR' => 'Turkey',
|
319 |
+
'TM' => 'Turkmenistan',
|
320 |
+
'TC' => 'Turks and Caicos Islands',
|
321 |
+
'TV' => 'Tuvalu',
|
322 |
+
'VI' => 'U.S. Virgin Islands',
|
323 |
+
'UG' => 'Uganda',
|
324 |
+
'UA' => 'Ukraine',
|
325 |
+
'AE' => 'United Arab Emirates',
|
326 |
+
'GB' => 'United Kingdom',
|
327 |
+
'US' => 'United States',
|
328 |
+
'UM' => 'United States Minor Outlying Islands',
|
329 |
+
'UY' => 'Uruguay',
|
330 |
+
'UZ' => 'Uzbekistan',
|
331 |
+
'VU' => 'Vanuatu',
|
332 |
+
'VA' => 'Vatican',
|
333 |
+
'VE' => 'Venezuela',
|
334 |
+
'VN' => 'Vietnam',
|
335 |
+
'WF' => 'Wallis and Futuna',
|
336 |
+
'EH' => 'Western Sahara',
|
337 |
+
'YE' => 'Yemen',
|
338 |
+
'ZM' => 'Zambia',
|
339 |
+
'ZW' => 'Zimbabwe',
|
340 |
+
) ?>
|
341 |
+
<td><label><span><?php _efs( 'country', $slug ) ?>:</span> <select id="address_country_code">
|
342 |
+
<?php if ( empty( $billing->address_country_code ) ) : ?>
|
343 |
+
<option value=""
|
344 |
+
selected><?php _efs( 'select-country', $slug ) ?></option>
|
345 |
+
<?php endif ?>
|
346 |
+
<?php foreach ( $countries as $code => $country ) : ?>
|
347 |
+
<option
|
348 |
+
value="<?php echo $code ?>" <?php selected( $billing->address_country_code, $code ) ?>><?php echo $country ?></option>
|
349 |
+
<?php endforeach ?>
|
350 |
+
</select></label></td>
|
351 |
+
<td><label><span><?php _efs( 'state', $slug ) ?> / <?php _efs( 'province', $slug ) ?>:</span>
|
352 |
+
<input id="address_state" value="<?php echo $billing->address_state ?>" placeholder="<?php _efs( 'state', $slug ) ?> / <?php _efs( 'province', $slug ) ?>"></label></td>
|
353 |
+
</tr>
|
354 |
+
<tr>
|
355 |
+
<td colspan="2">
|
356 |
+
<button
|
357 |
+
class="button"><?php _efs( $has_billing ? 'edit' : 'update', $slug ) ?></button>
|
358 |
+
</td>
|
359 |
+
</tr>
|
360 |
+
</table>
|
361 |
+
</div>
|
362 |
+
<div class="postbox">
|
363 |
+
<h3><span class="dashicons dashicons-paperclip"></span> <?php _efs( 'payments', $slug ) ?></h3>
|
364 |
|
365 |
<?php
|
366 |
+
$payments = $fs->_fetch_payments();
|
367 |
?>
|
368 |
|
369 |
<div class="inside">
|
384 |
<td><?php echo $payment->id ?></td>
|
385 |
<td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
|
386 |
<td>$<?php echo $payment->gross ?></td>
|
387 |
+
<td><a href="<?php echo $fs->_get_invoice_api_url( $payment->id ) ?>"
|
388 |
+
class="button button-small"
|
389 |
target="_blank"><?php _efs( 'invoice', $slug ) ?></a></td>
|
390 |
</tr>
|
391 |
<?php $odd = ! $odd; endforeach ?>
|
398 |
</div>
|
399 |
</div>
|
400 |
</div>
|
401 |
+
<script type="text/javascript">
|
402 |
+
(function($){
|
403 |
+
var $billingAddress = $('#fs_billing_address'),
|
404 |
+
$billingInputs = $billingAddress.find('input, select');
|
405 |
+
|
406 |
+
var setPrevValues = function () {
|
407 |
+
$billingInputs.each(function () {
|
408 |
+
$(this).attr('data-val', $(this).val());
|
409 |
+
});
|
410 |
+
};
|
411 |
+
|
412 |
+
setPrevValues();
|
413 |
+
|
414 |
+
var hasBillingChanged = function () {
|
415 |
+
for (var i = 0, len = $billingInputs.length; i < len; i++){
|
416 |
+
var $this = $($billingInputs[i]);
|
417 |
+
if ($this.attr('data-val') !== $this.val()) {
|
418 |
+
return true;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
|
422 |
+
return false;
|
423 |
+
};
|
424 |
+
|
425 |
+
var isEditAllFieldsMode = false;
|
426 |
+
|
427 |
+
$billingAddress.find('.button').click(function(){
|
428 |
+
$billingAddress.toggleClass('fs-read-mode');
|
429 |
+
|
430 |
+
var isEditMode = !$billingAddress.hasClass('fs-read-mode');
|
431 |
+
|
432 |
+
$(this)
|
433 |
+
.html(isEditMode ? <?php echo json_encode(__fs('update', $slug)) ?> : <?php echo json_encode(__fs('edit', $slug)) ?>)
|
434 |
+
.toggleClass('button-primary');
|
435 |
+
|
436 |
+
if (isEditMode) {
|
437 |
+
$('#business_name').focus().select();
|
438 |
+
isEditAllFieldsMode = true;
|
439 |
+
} else {
|
440 |
+
isEditAllFieldsMode = false;
|
441 |
+
|
442 |
+
if (!hasBillingChanged())
|
443 |
+
return;
|
444 |
+
|
445 |
+
var billing = {};
|
446 |
+
|
447 |
+
$billingInputs.each(function(){
|
448 |
+
if ($(this).attr('data-val') !== $(this).val()) {
|
449 |
+
billing[$(this).attr('id')] = $(this).val();
|
450 |
+
}
|
451 |
+
});
|
452 |
+
|
453 |
+
$.ajax({
|
454 |
+
url : ajaxurl,
|
455 |
+
method : 'POST',
|
456 |
+
data : {
|
457 |
+
action : '<?php echo $fs->get_action_tag( 'update_billing' ) ?>',
|
458 |
+
security: '<?php echo wp_create_nonce( $fs->get_action_tag( 'update_billing' ) ) ?>',
|
459 |
+
slug : '<?php echo $slug ?>',
|
460 |
+
billing : billing
|
461 |
+
},
|
462 |
+
success: function (resultObj) {
|
463 |
+
if (resultObj.success) {
|
464 |
+
setPrevValues();
|
465 |
+
} else {
|
466 |
+
alert(resultObj.error);
|
467 |
+
}
|
468 |
+
}
|
469 |
+
});
|
470 |
+
}
|
471 |
+
});
|
472 |
+
|
473 |
+
$billingInputs
|
474 |
+
// Get into edit mode upon selection.
|
475 |
+
.focus(function () {
|
476 |
+
var isEditMode = !$billingAddress.hasClass('fs-read-mode');
|
477 |
+
|
478 |
+
if (isEditMode) {
|
479 |
+
return;
|
480 |
+
}
|
481 |
+
|
482 |
+
$billingAddress.toggleClass('fs-read-mode');
|
483 |
+
$billingAddress.find('.button')
|
484 |
+
.html(<?php echo json_encode( __fs( 'update', $slug ) ) ?>)
|
485 |
+
.toggleClass('button-primary');
|
486 |
+
})
|
487 |
+
// If blured after editing only one field without changes, exit edit mode.
|
488 |
+
.blur(function () {
|
489 |
+
if (!isEditAllFieldsMode && !hasBillingChanged()) {
|
490 |
+
$billingAddress.toggleClass('fs-read-mode');
|
491 |
+
$billingAddress.find('.button')
|
492 |
+
.html(<?php echo json_encode( __fs( 'edit', $slug ) ) ?>)
|
493 |
+
.toggleClass('button-primary');
|
494 |
+
}
|
495 |
+
});
|
496 |
+
})(jQuery);
|
497 |
+
</script>
|
498 |
<?php
|
499 |
$params = array(
|
500 |
'page' => 'account',
|
lib/freemius/templates/checkout.php
CHANGED
@@ -16,6 +16,9 @@
|
|
16 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
17 |
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
|
18 |
|
|
|
|
|
|
|
19 |
$slug = $VARS['slug'];
|
20 |
$fs = freemius( $slug );
|
21 |
|
@@ -29,13 +32,13 @@
|
|
29 |
|
30 |
// Get site context secure params.
|
31 |
if ( $fs->is_registered() ) {
|
32 |
-
$site
|
33 |
$plugin_id = fs_request_get( 'plugin_id', $fs->get_id() );
|
34 |
|
35 |
-
if ($plugin_id != $fs->get_id()) {
|
36 |
if ( $fs->is_addon_activated( $plugin_id ) ) {
|
37 |
$fs_addon = Freemius::get_instance_by_id( $plugin_id );
|
38 |
-
$site
|
39 |
}
|
40 |
}
|
41 |
|
@@ -54,17 +57,7 @@
|
|
54 |
'user_firstname' => $current_user->user_firstname,
|
55 |
'user_lastname' => $current_user->user_lastname,
|
56 |
'user_email' => $current_user->user_email,
|
57 |
-
|
58 |
-
// 'plugin_slug' => $slug,
|
59 |
-
// 'site_url' => get_site_url(),
|
60 |
-
// 'site_name' => get_bloginfo( 'name' ),
|
61 |
-
// 'platform_version' => get_bloginfo( 'version' ),
|
62 |
-
// 'language' => get_bloginfo( 'language' ),
|
63 |
-
// 'charset' => get_bloginfo( 'charset' ),
|
64 |
-
// 'account_url' => fs_nonce_url( $fs->_get_admin_page_url(
|
65 |
-
// 'account',
|
66 |
-
// array( 'fs_action' => 'sync_user' )
|
67 |
-
// ), 'sync_user' ),
|
68 |
) );
|
69 |
|
70 |
$fs_user = Freemius::_get_user_by_email( $current_user->user_email );
|
@@ -78,8 +71,7 @@
|
|
78 |
}
|
79 |
}
|
80 |
|
81 |
-
if ( $fs->is_payments_sandbox() )
|
82 |
-
{
|
83 |
// Append plugin secure token for sandbox mode authentication.
|
84 |
$context_params['sandbox'] = FS_Security::instance()->get_secure_token(
|
85 |
$fs->get_plugin(),
|
@@ -100,16 +92,13 @@
|
|
100 |
$query_params = array_merge( $context_params, $_GET, array(
|
101 |
// Current plugin version.
|
102 |
'plugin_version' => $fs->get_plugin_version(),
|
|
|
103 |
'return_url' => $return_url,
|
104 |
// Admin CSS URL for style/design competability.
|
105 |
// 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
|
106 |
) );
|
107 |
?>
|
108 |
-
<div class="
|
109 |
-
<i class="dashicons dashicons-lock"></i>
|
110 |
-
<span><b>Secure HTTPS Checkout</b> - PCI compliant, running via iframe from external domain</span>
|
111 |
-
</div>
|
112 |
-
<div id="fs_contact" class="wrap" style="margin: 40px 0 -65px -20px;">
|
113 |
<div id="iframe"></div>
|
114 |
<script type="text/javascript">
|
115 |
// http://stackoverflow.com/questions/4583703/jquery-post-request-not-ajax
|
@@ -162,32 +151,34 @@
|
|
162 |
$(function () {
|
163 |
|
164 |
var
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
FS.PostMessage.init(base_url);
|
177 |
FS.PostMessage.receiveOnce('height', function (data) {
|
178 |
var h = data.height;
|
179 |
if (!isNaN(h) && h > 0 && h != iframe_height) {
|
180 |
iframe_height = h;
|
181 |
-
|
|
|
|
|
182 |
}
|
183 |
});
|
184 |
|
185 |
FS.PostMessage.receiveOnce('install', function (data) {
|
186 |
// Post data to activation URL.
|
187 |
-
$.form('<?php echo fs_nonce_url($fs->_get_admin_page_url('account', array(
|
188 |
'fs_action' => $slug . '_activate_new',
|
189 |
-
'plugin_id' => isset($_GET['plugin_id']) ? $_GET['plugin_id'] : $fs->get_id()
|
190 |
-
|
191 |
user_id : data.user.id,
|
192 |
user_secret_key : data.user.secret_key,
|
193 |
user_public_key : data.user.public_key,
|
@@ -198,11 +189,11 @@
|
|
198 |
});
|
199 |
|
200 |
FS.PostMessage.receiveOnce('pending_activation', function (data) {
|
201 |
-
$.form('<?php echo fs_nonce_url($fs->_get_admin_page_url('account', array(
|
202 |
-
'fs_action'
|
203 |
-
'plugin_id'
|
204 |
'pending_activation' => true,
|
205 |
-
|
206 |
user_email: data.user_email
|
207 |
}).submit();
|
208 |
});
|
@@ -215,28 +206,17 @@
|
|
215 |
// and then click the purchase button, the context information
|
216 |
// of the user will be shared with Freemius in order to complete the
|
217 |
// purchase workflow and activate the license for the right user.
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
'account',
|
230 |
-
array('fs_action' => 'sync_user')
|
231 |
-
), 'sync_user') ?>',
|
232 |
-
activation_url : '<?php echo fs_nonce_url($fs->_get_admin_page_url('',
|
233 |
-
array(
|
234 |
-
'fs_action' => $slug . '_activate_new',
|
235 |
-
'plugin_id' => fs_request_get('plugin_id', $fs->get_id()),
|
236 |
-
|
237 |
-
)),
|
238 |
-
$slug . '_activate_new') ?>'
|
239 |
-
}, iframe[0]);
|
240 |
});
|
241 |
|
242 |
FS.PostMessage.receiveOnce('get_dimensions', function (data) {
|
16 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
17 |
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
|
18 |
|
19 |
+
/**
|
20 |
+
* @var array $VARS
|
21 |
+
*/
|
22 |
$slug = $VARS['slug'];
|
23 |
$fs = freemius( $slug );
|
24 |
|
32 |
|
33 |
// Get site context secure params.
|
34 |
if ( $fs->is_registered() ) {
|
35 |
+
$site = $fs->get_site();
|
36 |
$plugin_id = fs_request_get( 'plugin_id', $fs->get_id() );
|
37 |
|
38 |
+
if ( $plugin_id != $fs->get_id() ) {
|
39 |
if ( $fs->is_addon_activated( $plugin_id ) ) {
|
40 |
$fs_addon = Freemius::get_instance_by_id( $plugin_id );
|
41 |
+
$site = $fs_addon->get_site();
|
42 |
}
|
43 |
}
|
44 |
|
57 |
'user_firstname' => $current_user->user_firstname,
|
58 |
'user_lastname' => $current_user->user_lastname,
|
59 |
'user_email' => $current_user->user_email,
|
60 |
+
'home_url' => home_url(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
) );
|
62 |
|
63 |
$fs_user = Freemius::_get_user_by_email( $current_user->user_email );
|
71 |
}
|
72 |
}
|
73 |
|
74 |
+
if ( $fs->is_payments_sandbox() ) {
|
|
|
75 |
// Append plugin secure token for sandbox mode authentication.
|
76 |
$context_params['sandbox'] = FS_Security::instance()->get_secure_token(
|
77 |
$fs->get_plugin(),
|
92 |
$query_params = array_merge( $context_params, $_GET, array(
|
93 |
// Current plugin version.
|
94 |
'plugin_version' => $fs->get_plugin_version(),
|
95 |
+
'sdk_version' => WP_FS__SDK_VERSION,
|
96 |
'return_url' => $return_url,
|
97 |
// Admin CSS URL for style/design competability.
|
98 |
// 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
|
99 |
) );
|
100 |
?>
|
101 |
+
<div id="fs_checkout" class="wrap" style="margin: 0 0 -65px -20px;">
|
|
|
|
|
|
|
|
|
102 |
<div id="iframe"></div>
|
103 |
<script type="text/javascript">
|
104 |
// http://stackoverflow.com/questions/4583703/jquery-post-request-not-ajax
|
151 |
$(function () {
|
152 |
|
153 |
var
|
154 |
+
// Keep track of the iframe height.
|
155 |
+
iframe_height = 800,
|
156 |
+
base_url = '<?php echo WP_FS__ADDRESS ?>',
|
157 |
+
// Pass the parent page URL into the Iframe in a meaningful way (this URL could be
|
158 |
+
// passed via query string or hard coded into the child page, it depends on your needs).
|
159 |
+
src = base_url + '/checkout/?<?php echo ( isset( $_REQUEST['XDEBUG_SESSION'] ) ? 'XDEBUG_SESSION=' . $_REQUEST['XDEBUG_SESSION'] . '&' : '' ) . http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href),
|
160 |
+
|
161 |
+
// Append the Iframe into the DOM.
|
162 |
+
iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>')
|
163 |
+
.appendTo('#iframe');
|
164 |
+
|
165 |
+
FS.PostMessage.init(base_url, [iframe[0]]);
|
166 |
FS.PostMessage.receiveOnce('height', function (data) {
|
167 |
var h = data.height;
|
168 |
if (!isNaN(h) && h > 0 && h != iframe_height) {
|
169 |
iframe_height = h;
|
170 |
+
iframe.height(iframe_height + 'px');
|
171 |
+
|
172 |
+
FS.PostMessage.postScroll(iframe[0]);
|
173 |
}
|
174 |
});
|
175 |
|
176 |
FS.PostMessage.receiveOnce('install', function (data) {
|
177 |
// Post data to activation URL.
|
178 |
+
$.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array(
|
179 |
'fs_action' => $slug . '_activate_new',
|
180 |
+
'plugin_id' => isset( $_GET['plugin_id'] ) ? $_GET['plugin_id'] : $fs->get_id()
|
181 |
+
) ), $slug . '_activate_new' ) ?>', {
|
182 |
user_id : data.user.id,
|
183 |
user_secret_key : data.user.secret_key,
|
184 |
user_public_key : data.user.public_key,
|
189 |
});
|
190 |
|
191 |
FS.PostMessage.receiveOnce('pending_activation', function (data) {
|
192 |
+
$.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array(
|
193 |
+
'fs_action' => $slug . '_activate_new',
|
194 |
+
'plugin_id' => fs_request_get( 'plugin_id', $fs->get_id() ),
|
195 |
'pending_activation' => true,
|
196 |
+
) ), $slug . '_activate_new' ) ?>', {
|
197 |
user_email: data.user_email
|
198 |
}).submit();
|
199 |
});
|
206 |
// and then click the purchase button, the context information
|
207 |
// of the user will be shared with Freemius in order to complete the
|
208 |
// purchase workflow and activate the license for the right user.
|
209 |
+
<?php $install_data = array_merge( $fs->get_opt_in_params(),
|
210 |
+
array(
|
211 |
+
'activation_url' => fs_nonce_url( $fs->_get_admin_page_url( '',
|
212 |
+
array(
|
213 |
+
'fs_action' => $slug . '_activate_new',
|
214 |
+
'plugin_id' => fs_request_get( 'plugin_id', $fs->get_id() ),
|
215 |
+
|
216 |
+
) ),
|
217 |
+
$slug . '_activate_new' )
|
218 |
+
) ) ?>
|
219 |
+
FS.PostMessage.post('context', <?php echo json_encode( $install_data ) ?>, iframe[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
});
|
221 |
|
222 |
FS.PostMessage.receiveOnce('get_dimensions', function (data) {
|
lib/freemius/templates/connect.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
$is_pending_activation = $fs->is_pending_activation();
|
@@ -55,8 +58,11 @@
|
|
55 |
}
|
56 |
|
57 |
if ( $require_license_key ) {
|
58 |
-
$fs->
|
59 |
}
|
|
|
|
|
|
|
60 |
?>
|
61 |
<div id="fs_connect"
|
62 |
class="wrap<?php if ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) {
|
@@ -87,7 +93,8 @@
|
|
87 |
__fs( 'pending-activation-message', $slug ),
|
88 |
$first_name,
|
89 |
'<b>' . $fs->get_plugin_name() . '</b>',
|
90 |
-
'<b>' . $current_user->user_email . '</b>'
|
|
|
91 |
) );
|
92 |
} else if ( $require_license_key ) {
|
93 |
$button_label = 'agree-activate-license';
|
@@ -116,10 +123,9 @@
|
|
116 |
}
|
117 |
|
118 |
echo $fs->apply_filters( $filter,
|
|
|
119 |
sprintf(
|
120 |
-
__fs( 'hey-x', $slug ) . '<br>' .
|
121 |
__fs( $default_optin_message, $slug ),
|
122 |
-
$first_name,
|
123 |
'<b>' . $fs->get_plugin_name() . '</b>',
|
124 |
'<b>' . $current_user->user_login . '</b>',
|
125 |
'<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>',
|
@@ -145,12 +151,11 @@
|
|
145 |
</div>
|
146 |
<div class="fs-actions">
|
147 |
<?php if ( $fs->is_enable_anonymous() && ! $is_pending_activation && ! $require_license_key ) : ?>
|
148 |
-
<a href="<?php echo
|
149 |
class="button button-secondary" tabindex="2"><?php _efs( 'skip', $slug ) ?></a>
|
150 |
<?php endif ?>
|
151 |
|
152 |
-
<?php
|
153 |
-
<?php if ( is_object( $fs_user ) && ! $is_pending_activation ) : ?>
|
154 |
<form action="" method="POST">
|
155 |
<input type="hidden" name="fs_action" value="<?php echo $slug ?>_activate_existing">
|
156 |
<?php wp_nonce_field( 'activate_existing_' . $fs->get_public_key() ) ?>
|
@@ -187,6 +192,12 @@
|
|
187 |
'desc' => __fs( 'permissions-site_desc' ),
|
188 |
'priority' => 10,
|
189 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
'events' => array(
|
191 |
'icon-class' => 'dashicons dashicons-admin-plugins',
|
192 |
'label' => __fs( 'permissions-events' ),
|
@@ -225,14 +236,14 @@
|
|
225 |
<a class="fs-trigger" href="#" tabindex="1"><?php _efs( 'what-permissions', $slug ) ?></a>
|
226 |
<ul><?php
|
227 |
foreach ( $permissions as $id => $permission ) : ?>
|
228 |
-
<li id="fs-permission-<?php
|
229 |
-
class="fs-permission fs-<?php
|
230 |
-
<i class="<?php
|
231 |
|
232 |
<div>
|
233 |
-
<span><?php
|
234 |
|
235 |
-
<p><?php
|
236 |
</div>
|
237 |
</li>
|
238 |
<?php endforeach; ?>
|
@@ -264,12 +275,20 @@
|
|
264 |
var $primaryCta = $('.fs-actions .button.button-primary'),
|
265 |
$form = $('.fs-actions form'),
|
266 |
requireLicenseKey = <?php echo $require_license_key ? 'true' : 'false' ?>,
|
|
|
267 |
$licenseSecret,
|
268 |
$licenseKeyInput = $('#fs_license_key');
|
269 |
|
270 |
$('.fs-actions .button').on('click', function () {
|
271 |
// Set loading mode.
|
272 |
$(document.body).css({'cursor': 'wait'});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
});
|
274 |
|
275 |
$form.on('submit', function () {
|
@@ -278,13 +297,53 @@
|
|
278 |
* @since 1.1.9
|
279 |
*/
|
280 |
if (requireLicenseKey) {
|
281 |
-
if (
|
282 |
-
$
|
283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
}
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
-
|
287 |
-
|
|
|
288 |
}
|
289 |
|
290 |
return true;
|
@@ -292,7 +351,7 @@
|
|
292 |
|
293 |
$primaryCta.on('click', function () {
|
294 |
$(this).addClass('fs-loading');
|
295 |
-
$(this).html(
|
296 |
});
|
297 |
|
298 |
$('.fs-permissions .fs-trigger').on('click', function () {
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
$is_pending_activation = $fs->is_pending_activation();
|
58 |
}
|
59 |
|
60 |
if ( $require_license_key ) {
|
61 |
+
$fs->_add_license_activation_dialog_box();
|
62 |
}
|
63 |
+
|
64 |
+
$fs_user = Freemius::_get_user_by_email( $current_user->user_email );
|
65 |
+
$activate_with_current_user = is_object( $fs_user ) && ! $is_pending_activation;
|
66 |
?>
|
67 |
<div id="fs_connect"
|
68 |
class="wrap<?php if ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) {
|
93 |
__fs( 'pending-activation-message', $slug ),
|
94 |
$first_name,
|
95 |
'<b>' . $fs->get_plugin_name() . '</b>',
|
96 |
+
'<b>' . $current_user->user_email . '</b>',
|
97 |
+
__fs( 'complete-the-install', $slug )
|
98 |
) );
|
99 |
} else if ( $require_license_key ) {
|
100 |
$button_label = 'agree-activate-license';
|
123 |
}
|
124 |
|
125 |
echo $fs->apply_filters( $filter,
|
126 |
+
sprintf( __fs( 'hey-x', $slug ), $first_name ) . '<br>' .
|
127 |
sprintf(
|
|
|
128 |
__fs( $default_optin_message, $slug ),
|
|
|
129 |
'<b>' . $fs->get_plugin_name() . '</b>',
|
130 |
'<b>' . $current_user->user_login . '</b>',
|
131 |
'<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>',
|
151 |
</div>
|
152 |
<div class="fs-actions">
|
153 |
<?php if ( $fs->is_enable_anonymous() && ! $is_pending_activation && ! $require_license_key ) : ?>
|
154 |
+
<a href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' ) ?>"
|
155 |
class="button button-secondary" tabindex="2"><?php _efs( 'skip', $slug ) ?></a>
|
156 |
<?php endif ?>
|
157 |
|
158 |
+
<?php if ( $activate_with_current_user ) : ?>
|
|
|
159 |
<form action="" method="POST">
|
160 |
<input type="hidden" name="fs_action" value="<?php echo $slug ?>_activate_existing">
|
161 |
<?php wp_nonce_field( 'activate_existing_' . $fs->get_public_key() ) ?>
|
192 |
'desc' => __fs( 'permissions-site_desc' ),
|
193 |
'priority' => 10,
|
194 |
),
|
195 |
+
'notices' => array(
|
196 |
+
'icon-class' => 'dashicons dashicons-testimonial',
|
197 |
+
'label' => __fs( 'permissions-admin-notices' ),
|
198 |
+
'desc' => __fs( 'permissions-newsletter_desc' ),
|
199 |
+
'priority' => 13,
|
200 |
+
),
|
201 |
'events' => array(
|
202 |
'icon-class' => 'dashicons dashicons-admin-plugins',
|
203 |
'label' => __fs( 'permissions-events' ),
|
236 |
<a class="fs-trigger" href="#" tabindex="1"><?php _efs( 'what-permissions', $slug ) ?></a>
|
237 |
<ul><?php
|
238 |
foreach ( $permissions as $id => $permission ) : ?>
|
239 |
+
<li id="fs-permission-<?php echo esc_attr( $id ); ?>"
|
240 |
+
class="fs-permission fs-<?php echo esc_attr( $id ); ?>">
|
241 |
+
<i class="<?php echo esc_attr( $permission['icon-class'] ); ?>"></i>
|
242 |
|
243 |
<div>
|
244 |
+
<span><?php echo esc_html( $permission['label'] ); ?></span>
|
245 |
|
246 |
+
<p><?php echo esc_html( $permission['desc'] ); ?></p>
|
247 |
</div>
|
248 |
</li>
|
249 |
<?php endforeach; ?>
|
275 |
var $primaryCta = $('.fs-actions .button.button-primary'),
|
276 |
$form = $('.fs-actions form'),
|
277 |
requireLicenseKey = <?php echo $require_license_key ? 'true' : 'false' ?>,
|
278 |
+
hasContextUser = <?php echo $activate_with_current_user ? 'true' : 'false' ?>,
|
279 |
$licenseSecret,
|
280 |
$licenseKeyInput = $('#fs_license_key');
|
281 |
|
282 |
$('.fs-actions .button').on('click', function () {
|
283 |
// Set loading mode.
|
284 |
$(document.body).css({'cursor': 'wait'});
|
285 |
+
|
286 |
+
var $this = $(this);
|
287 |
+
$this.css({'cursor': 'wait'});
|
288 |
+
|
289 |
+
setTimeout(function () {
|
290 |
+
$this.attr('disabled', 'disabled');
|
291 |
+
}, 200);
|
292 |
});
|
293 |
|
294 |
$form.on('submit', function () {
|
297 |
* @since 1.1.9
|
298 |
*/
|
299 |
if (requireLicenseKey) {
|
300 |
+
if (!hasContextUser) {
|
301 |
+
$('.fs-error').remove();
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Use the AJAX opt-in when license key is required to potentially
|
305 |
+
* process the after install failure hook.
|
306 |
+
*
|
307 |
+
* @author Vova Feldman (@svovaf)
|
308 |
+
* @since 1.2.1.5
|
309 |
+
*/
|
310 |
+
$.ajax({
|
311 |
+
url : ajaxurl,
|
312 |
+
method : 'POST',
|
313 |
+
data : {
|
314 |
+
action : 'fs_activate_license_<?php echo $slug ?>',
|
315 |
+
slug : '<?php echo $slug ?>',
|
316 |
+
license_key: $licenseKeyInput.val()
|
317 |
+
},
|
318 |
+
success: function (result) {
|
319 |
+
var resultObj = $.parseJSON(result);
|
320 |
+
if (resultObj.success) {
|
321 |
+
// Redirect to the "Account" page and sync the license.
|
322 |
+
window.location.href = resultObj.next_page;
|
323 |
+
} else {
|
324 |
+
// Show error.
|
325 |
+
$('.fs-content').prepend('<p class="fs-error">' + resultObj.error + '</p>');
|
326 |
+
|
327 |
+
// Reset loading mode.
|
328 |
+
$primaryCta.removeClass('fs-loading').css({'cursor': 'auto'});
|
329 |
+
$primaryCta.html(<?php echo json_encode(__fs( $button_label, $slug )) ?>);
|
330 |
+
$primaryCta.prop('disabled', false);
|
331 |
+
$(document.body).css({'cursor': 'auto'});
|
332 |
+
}
|
333 |
+
}
|
334 |
+
});
|
335 |
+
|
336 |
+
return false;
|
337 |
}
|
338 |
+
else {
|
339 |
+
if (null == $licenseSecret) {
|
340 |
+
$licenseSecret = $('<input type="hidden" name="license_secret_key" value="" />');
|
341 |
+
$form.append($licenseSecret);
|
342 |
+
}
|
343 |
|
344 |
+
// Update secret key if premium only plugin.
|
345 |
+
$licenseSecret.val($licenseKeyInput.val());
|
346 |
+
}
|
347 |
}
|
348 |
|
349 |
return true;
|
351 |
|
352 |
$primaryCta.on('click', function () {
|
353 |
$(this).addClass('fs-loading');
|
354 |
+
$(this).html(<?php echo json_encode(__fs( $is_pending_activation ? 'sending-email' : 'activating' , $slug )) ?> +'...');
|
355 |
});
|
356 |
|
357 |
$('.fs-permissions .fs-trigger').on('click', function () {
|
lib/freemius/templates/contact.php
CHANGED
@@ -16,6 +16,9 @@
|
|
16 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
17 |
fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
|
18 |
|
|
|
|
|
|
|
19 |
$slug = $VARS['slug'];
|
20 |
$fs = freemius( $slug );
|
21 |
|
16 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
17 |
fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
|
18 |
|
19 |
+
/**
|
20 |
+
* @var array $VARS
|
21 |
+
*/
|
22 |
$slug = $VARS['slug'];
|
23 |
$fs = freemius( $slug );
|
24 |
|
lib/freemius/templates/debug.php
CHANGED
@@ -78,6 +78,58 @@
|
|
78 |
</tr>
|
79 |
</tbody>
|
80 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
<h2><?php _efs( 'sdk-versions' ) ?></h2>
|
82 |
<table id="fs_sdks" class="widefat">
|
83 |
<thead>
|
@@ -116,6 +168,7 @@
|
|
116 |
<th><?php _efs( 'freemius-state' ) ?></th>
|
117 |
<th><?php _efs( 'plugin-path' ) ?></th>
|
118 |
<th><?php _efs( 'public-key' ) ?></th>
|
|
|
119 |
</tr>
|
120 |
</thead>
|
121 |
<tbody>
|
@@ -123,24 +176,42 @@
|
|
123 |
<?php $is_active = is_plugin_active( $data->file ) ?>
|
124 |
<?php $fs = $is_active ? freemius( $slug ) : null ?>
|
125 |
<tr<?php if ( $is_active ) {
|
126 |
-
|
|
|
|
|
|
|
|
|
127 |
} ?>>
|
128 |
<td><?php echo $data->id ?></td>
|
129 |
<td><?php echo $slug ?></td>
|
130 |
<td><?php echo $data->version ?></td>
|
131 |
<td><?php echo $data->title ?></td>
|
132 |
-
<td
|
|
|
|
|
133 |
echo $fs->has_api_connectivity() ?
|
134 |
__fs( 'connected' ) :
|
135 |
__fs( 'blocked' );
|
136 |
} ?></td>
|
137 |
-
<td
|
|
|
|
|
138 |
echo $fs->is_on() ?
|
139 |
__fs( 'on' ) :
|
140 |
__fs( 'off' );
|
141 |
} ?></td>
|
142 |
<td><?php echo $data->file ?></td>
|
143 |
<td><?php echo $data->public_key ?></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
</tr>
|
145 |
<?php endforeach ?>
|
146 |
</tbody>
|
@@ -148,6 +219,7 @@
|
|
148 |
<?php endif ?>
|
149 |
<?php
|
150 |
/**
|
|
|
151 |
* @var FS_Site[] $sites
|
152 |
*/
|
153 |
$sites = $VARS['sites'];
|
@@ -239,7 +311,7 @@
|
|
239 |
<tr>
|
240 |
<td><?php echo $user->id ?></td>
|
241 |
<td><?php echo $user->get_name() ?></td>
|
242 |
-
<td><a href="mailto:<?php
|
243 |
<td><?php echo json_encode( $user->is_verified ) ?></td>
|
244 |
<td><?php echo $user->public_key ?></td>
|
245 |
<td><?php echo $user->secret_key ?></td>
|
78 |
</tr>
|
79 |
</tbody>
|
80 |
</table>
|
81 |
+
<?php
|
82 |
+
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
83 |
+
define( 'FS_API__ADDRESS', '://api.freemius.com' );
|
84 |
+
}
|
85 |
+
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
86 |
+
define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' );
|
87 |
+
}
|
88 |
+
|
89 |
+
$defines = array(
|
90 |
+
array(
|
91 |
+
'key' => 'WP_FS__REMOTE_ADDR',
|
92 |
+
'val' => WP_FS__REMOTE_ADDR,
|
93 |
+
),
|
94 |
+
array(
|
95 |
+
'key' => 'WP_FS__ADDRESS_PRODUCTION',
|
96 |
+
'val' => WP_FS__ADDRESS_PRODUCTION,
|
97 |
+
),
|
98 |
+
array(
|
99 |
+
'key' => 'FS_API__ADDRESS',
|
100 |
+
'val' => FS_API__ADDRESS,
|
101 |
+
),
|
102 |
+
array(
|
103 |
+
'key' => 'FS_API__SANDBOX_ADDRESS',
|
104 |
+
'val' => FS_API__SANDBOX_ADDRESS,
|
105 |
+
),
|
106 |
+
array(
|
107 |
+
'key' => 'WP_FS__DIR',
|
108 |
+
'val' => WP_FS__DIR,
|
109 |
+
),
|
110 |
+
)
|
111 |
+
?>
|
112 |
+
<br>
|
113 |
+
<table class="widefat">
|
114 |
+
<thead>
|
115 |
+
<tr>
|
116 |
+
<th><?php _efs( 'key' ) ?></th>
|
117 |
+
<th><?php _efs( 'value' ) ?></th>
|
118 |
+
</tr>
|
119 |
+
</thead>
|
120 |
+
<tbody>
|
121 |
+
<?php $alternate = false;
|
122 |
+
foreach ( $defines as $p ) : ?>
|
123 |
+
<tr<?php if ( $alternate ) {
|
124 |
+
echo ' class="alternate"';
|
125 |
+
} ?>>
|
126 |
+
<td><?php echo $p['key'] ?></td>
|
127 |
+
<td><?php echo $p['val'] ?></td>
|
128 |
+
</tr>
|
129 |
+
<?php $alternate = ! $alternate ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
</tbody>
|
132 |
+
</table>
|
133 |
<h2><?php _efs( 'sdk-versions' ) ?></h2>
|
134 |
<table id="fs_sdks" class="widefat">
|
135 |
<thead>
|
168 |
<th><?php _efs( 'freemius-state' ) ?></th>
|
169 |
<th><?php _efs( 'plugin-path' ) ?></th>
|
170 |
<th><?php _efs( 'public-key' ) ?></th>
|
171 |
+
<th><?php _efs( 'actions' ) ?></th>
|
172 |
</tr>
|
173 |
</thead>
|
174 |
<tbody>
|
176 |
<?php $is_active = is_plugin_active( $data->file ) ?>
|
177 |
<?php $fs = $is_active ? freemius( $slug ) : null ?>
|
178 |
<tr<?php if ( $is_active ) {
|
179 |
+
if ($fs->has_api_connectivity() && $fs->is_on()) {
|
180 |
+
echo ' style="background: #E6FFE6; font-weight: bold"';
|
181 |
+
}else{
|
182 |
+
echo ' style="background: #ffd0d0; font-weight: bold"';
|
183 |
+
}
|
184 |
} ?>>
|
185 |
<td><?php echo $data->id ?></td>
|
186 |
<td><?php echo $slug ?></td>
|
187 |
<td><?php echo $data->version ?></td>
|
188 |
<td><?php echo $data->title ?></td>
|
189 |
+
<td<?php if ( $is_active && ! $fs->has_api_connectivity() ) {
|
190 |
+
echo ' style="color: red; text-transform: uppercase;"';
|
191 |
+
} ?>><?php if ( $is_active ) {
|
192 |
echo $fs->has_api_connectivity() ?
|
193 |
__fs( 'connected' ) :
|
194 |
__fs( 'blocked' );
|
195 |
} ?></td>
|
196 |
+
<td<?php if ( $is_active && ! $fs->is_on() ) {
|
197 |
+
echo ' style="color: red; text-transform: uppercase;"';
|
198 |
+
} ?>><?php if ( $is_active ) {
|
199 |
echo $fs->is_on() ?
|
200 |
__fs( 'on' ) :
|
201 |
__fs( 'off' );
|
202 |
} ?></td>
|
203 |
<td><?php echo $data->file ?></td>
|
204 |
<td><?php echo $data->public_key ?></td>
|
205 |
+
<td>
|
206 |
+
<?php if ($is_active && $fs->has_trial_plan()) : ?>
|
207 |
+
<form action="" method="POST">
|
208 |
+
<input type="hidden" name="fs_action" value="simulate_trial">
|
209 |
+
<input type="hidden" name="slug" value="<?php echo $slug ?>">
|
210 |
+
<?php wp_nonce_field( 'simulate_trial' ) ?>
|
211 |
+
|
212 |
+
<button type="submit" class="button button-primary simulate-trial"><?php _efs( 'Simulate Trial' ) ?></button>
|
213 |
+
<?php endif ?>
|
214 |
+
</td>
|
215 |
</tr>
|
216 |
<?php endforeach ?>
|
217 |
</tbody>
|
219 |
<?php endif ?>
|
220 |
<?php
|
221 |
/**
|
222 |
+
* @var array $VARS
|
223 |
* @var FS_Site[] $sites
|
224 |
*/
|
225 |
$sites = $VARS['sites'];
|
311 |
<tr>
|
312 |
<td><?php echo $user->id ?></td>
|
313 |
<td><?php echo $user->get_name() ?></td>
|
314 |
+
<td><a href="mailto:<?php echo esc_attr( $user->email ) ?>"><?php echo $user->email ?></a></td>
|
315 |
<td><?php echo json_encode( $user->is_verified ) ?></td>
|
316 |
<td><?php echo $user->public_key ?></td>
|
317 |
<td><?php echo $user->secret_key ?></td>
|
lib/freemius/templates/debug/logger.php
CHANGED
@@ -30,27 +30,33 @@
|
|
30 |
|
31 |
<?php $i = 0;
|
32 |
foreach ( $log_book as $log ) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<tr<?php if ( $i % 2 ) {
|
34 |
echo ' class="alternate"';
|
35 |
} ?>>
|
36 |
<td><?php echo $log['cnt'] ?>.</td>
|
37 |
-
<td><?php echo $
|
38 |
<td><?php echo $log['type'] ?></td>
|
39 |
<td><b><code style="color: blue;"><?php echo $log['function'] ?></code></b></td>
|
40 |
<td>
|
41 |
<?php
|
42 |
printf(
|
43 |
'<a href="#" style="color: darkorange !important;" onclick="jQuery(this).parent().find(\'div\').toggle(); return false;"><nobr>%s</nobr></a>',
|
44 |
-
substr( $log['msg'], 0, 32 ) . ( 32 < strlen( $log['msg'] ) ? '...' : '' )
|
45 |
);
|
46 |
?>
|
47 |
<div style="display: none;">
|
48 |
-
<b style="color: darkorange;"><?php echo $log['msg'] ?></b>
|
49 |
</div>
|
50 |
</td>
|
51 |
<td><?php
|
52 |
if ( isset( $log['file'] ) ) {
|
53 |
-
echo substr( $log['file'], $
|
54 |
}
|
55 |
?></td>
|
56 |
<td><?php echo number_format( 100 * ( $log['timestamp'] - WP_FS__SCRIPT_START_TIME ), 2 ) . ' ' . __fs( 'ms' ) ?></td>
|
30 |
|
31 |
<?php $i = 0;
|
32 |
foreach ( $log_book as $log ) : ?>
|
33 |
+
<?php
|
34 |
+
/**
|
35 |
+
* @var FS_Logger $logger
|
36 |
+
*/
|
37 |
+
$logger = $log['logger'];
|
38 |
+
?>
|
39 |
<tr<?php if ( $i % 2 ) {
|
40 |
echo ' class="alternate"';
|
41 |
} ?>>
|
42 |
<td><?php echo $log['cnt'] ?>.</td>
|
43 |
+
<td><?php echo $logger->get_id() ?></td>
|
44 |
<td><?php echo $log['type'] ?></td>
|
45 |
<td><b><code style="color: blue;"><?php echo $log['function'] ?></code></b></td>
|
46 |
<td>
|
47 |
<?php
|
48 |
printf(
|
49 |
'<a href="#" style="color: darkorange !important;" onclick="jQuery(this).parent().find(\'div\').toggle(); return false;"><nobr>%s</nobr></a>',
|
50 |
+
esc_html( substr( $log['msg'], 0, 32 ) ) . ( 32 < strlen( $log['msg'] ) ? '...' : '' )
|
51 |
);
|
52 |
?>
|
53 |
<div style="display: none;">
|
54 |
+
<b style="color: darkorange;"><?php echo esc_html( $log['msg'] ) ?></b>
|
55 |
</div>
|
56 |
</td>
|
57 |
<td><?php
|
58 |
if ( isset( $log['file'] ) ) {
|
59 |
+
echo substr( $log['file'], $logger->get_file() ) . ':' . $log['line'] . ')';
|
60 |
}
|
61 |
?></td>
|
62 |
<td><?php echo number_format( 100 * ( $log['timestamp'] - WP_FS__SCRIPT_START_TIME ), 2 ) . ' ' . __fs( 'ms' ) ?></td>
|
lib/freemius/templates/debug/scheduled-crons.php
CHANGED
@@ -15,32 +15,41 @@
|
|
15 |
$scheduled_crons = array();
|
16 |
if ( is_array( $plugins ) && 0 < count( $plugins ) ) {
|
17 |
foreach ( $plugins as $slug => $data ) {
|
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 |
}
|
@@ -64,7 +73,7 @@
|
|
64 |
<td><?php echo $cron['name'] ?></td>
|
65 |
<td><?php echo $cron['type'] ?></td>
|
66 |
<td><?php
|
67 |
-
if (is_numeric($cron['last'])) {
|
68 |
$diff = abs( WP_FS__SCRIPT_START_TIME - $cron['last'] );
|
69 |
$human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
|
70 |
$diff . ' ' . __fs( 'sec' ) :
|
@@ -80,7 +89,7 @@
|
|
80 |
}
|
81 |
?></td>
|
82 |
<td><?php
|
83 |
-
if (is_numeric($cron['next'])) {
|
84 |
$diff = abs( WP_FS__SCRIPT_START_TIME - $cron['next'] );
|
85 |
$human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
|
86 |
$diff . ' ' . __fs( 'sec' ) :
|
15 |
$scheduled_crons = array();
|
16 |
if ( is_array( $plugins ) && 0 < count( $plugins ) ) {
|
17 |
foreach ( $plugins as $slug => $data ) {
|
18 |
+
/**
|
19 |
+
* @author Vova Feldman
|
20 |
+
*
|
21 |
+
* @since 1.2.1 Don't load data from inactive modules.
|
22 |
+
*/
|
23 |
+
if ( is_plugin_active( $data->file ) ) {
|
24 |
+
$fs = freemius( $slug );
|
25 |
|
26 |
+
$next_execution = $fs->next_sync_cron();
|
27 |
+
$last_execution = $fs->last_sync_cron();
|
28 |
|
29 |
+
if ( false !== $next_execution ) {
|
30 |
+
$scheduled_crons[ $slug ][] = array(
|
31 |
+
'name' => $fs->get_plugin_name(),
|
32 |
+
'slug' => $slug,
|
33 |
+
'type' => 'sync_cron',
|
34 |
+
'last' => $last_execution,
|
35 |
+
'next' => $next_execution,
|
36 |
+
);
|
37 |
+
}
|
38 |
|
39 |
+
$next_install_execution = $fs->next_install_sync();
|
40 |
+
$last_install_execution = $fs->last_install_sync();
|
41 |
|
42 |
+
if ( false !== $next_install_execution ||
|
43 |
+
false !== $last_install_execution
|
44 |
+
) {
|
45 |
+
$scheduled_crons[ $slug ][] = array(
|
46 |
+
'name' => $fs->get_plugin_name(),
|
47 |
+
'slug' => $slug,
|
48 |
+
'type' => 'install_sync',
|
49 |
+
'last' => $last_install_execution,
|
50 |
+
'next' => $next_install_execution,
|
51 |
+
);
|
52 |
+
}
|
53 |
}
|
54 |
}
|
55 |
}
|
73 |
<td><?php echo $cron['name'] ?></td>
|
74 |
<td><?php echo $cron['type'] ?></td>
|
75 |
<td><?php
|
76 |
+
if ( is_numeric( $cron['last'] ) ) {
|
77 |
$diff = abs( WP_FS__SCRIPT_START_TIME - $cron['last'] );
|
78 |
$human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
|
79 |
$diff . ' ' . __fs( 'sec' ) :
|
89 |
}
|
90 |
?></td>
|
91 |
<td><?php
|
92 |
+
if ( is_numeric( $cron['next'] ) ) {
|
93 |
$diff = abs( WP_FS__SCRIPT_START_TIME - $cron['next'] );
|
94 |
$human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
|
95 |
$diff . ' ' . __fs( 'sec' ) :
|
lib/freemius/templates/email.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$sections = $VARS['sections'];
|
14 |
?>
|
15 |
<table>
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$sections = $VARS['sections'];
|
17 |
?>
|
18 |
<table>
|
lib/freemius/templates/firewall-issues-js.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
slug = notice.attr('data-slug');
|
24 |
|
25 |
var data = {
|
26 |
-
action :
|
27 |
slug : slug,
|
28 |
error_type: error_type
|
29 |
};
|
@@ -40,7 +40,7 @@
|
|
40 |
}
|
41 |
|
42 |
if ('retry_ping' === error_type) {
|
43 |
-
data.action =
|
44 |
}
|
45 |
|
46 |
$(this).css({'cursor': 'wait'});
|
23 |
slug = notice.attr('data-slug');
|
24 |
|
25 |
var data = {
|
26 |
+
action : 'fs_resolve_firewall_issues_' + slug,
|
27 |
slug : slug,
|
28 |
error_type: error_type
|
29 |
};
|
40 |
}
|
41 |
|
42 |
if ('retry_ping' === error_type) {
|
43 |
+
data.action = 'fs_retry_connectivity_test_' + slug;
|
44 |
}
|
45 |
|
46 |
$(this).css({'cursor': 'wait'});
|
lib/freemius/templates/forms/deactivation/contact.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
|
lib/freemius/templates/forms/deactivation/form.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
|
@@ -46,6 +49,16 @@ HTML;
|
|
46 |
$reasons_list_items_html .= $reason_list_item_html;
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
|
50 |
?>
|
51 |
<script type="text/javascript">
|
@@ -54,19 +67,27 @@ HTML;
|
|
54 |
modalHtml =
|
55 |
'<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
|
56 |
+ ' <div class="fs-modal-dialog">'
|
|
|
|
|
|
|
57 |
+ ' <div class="fs-modal-body">'
|
58 |
+ ' <div class="fs-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
|
59 |
+ ' <div class="fs-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( __fs( 'deactivation-share-reason' , $slug ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
|
60 |
+ ' </div>'
|
61 |
+ ' <div class="fs-modal-footer">'
|
|
|
62 |
+ ' <a href="#" class="button button-secondary button-deactivate"></a>'
|
63 |
-
+ ' <a href="#" class="button button-primary button-close"><?php
|
64 |
+ ' </div>'
|
65 |
+ ' </div>'
|
66 |
+ '</div>',
|
67 |
-
$modal
|
68 |
-
$deactivateLink
|
69 |
-
|
|
|
|
|
|
|
|
|
70 |
|
71 |
$modal.appendTo($('body'));
|
72 |
|
@@ -146,9 +167,11 @@ HTML;
|
|
146 |
url : ajaxurl,
|
147 |
method : 'POST',
|
148 |
data : {
|
149 |
-
'action'
|
150 |
-
'
|
151 |
-
'
|
|
|
|
|
152 |
},
|
153 |
beforeSend: function () {
|
154 |
_parent.find('.fs-modal-footer .button').addClass('disabled');
|
@@ -176,6 +199,14 @@ HTML;
|
|
176 |
|
177 |
selectedReasonID = $selectedReasonOption.val();
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
var _parent = $(this).parents('li:first');
|
180 |
|
181 |
$modal.find('.reason-input').remove();
|
@@ -218,15 +249,27 @@ HTML;
|
|
218 |
}
|
219 |
|
220 |
closeModal();
|
|
|
221 |
});
|
222 |
}
|
223 |
|
224 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
// Get the selected radio input element.
|
226 |
-
var $selectedReasonOption = $modal.find('input[type="radio"]:checked')
|
227 |
-
selectedReason = $selectedReasonOption.parent().next().text().trim();
|
228 |
|
229 |
-
return (
|
|
|
|
|
|
|
|
|
230 |
}
|
231 |
|
232 |
function showModal() {
|
@@ -257,6 +300,13 @@ HTML;
|
|
257 |
|
258 |
$modal.find('.message').hide();
|
259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
var $deactivateButton = $modal.find('.button-deactivate');
|
261 |
|
262 |
/*
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
|
49 |
$reasons_list_items_html .= $reason_list_item_html;
|
50 |
}
|
51 |
|
52 |
+
$is_anonymous = ( ! $fs->is_registered() );
|
53 |
+
if ( $is_anonymous ) {
|
54 |
+
$anonymous_feedback_checkbox_html =
|
55 |
+
'<label class="anonymous-feedback-label"><input type="checkbox" class="anonymous-feedback-checkbox"> '
|
56 |
+
. __fs( 'anonymous-feedback', $slug )
|
57 |
+
. '</label>';
|
58 |
+
} else {
|
59 |
+
$anonymous_feedback_checkbox_html = '';
|
60 |
+
}
|
61 |
+
|
62 |
fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
|
63 |
?>
|
64 |
<script type="text/javascript">
|
67 |
modalHtml =
|
68 |
'<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
|
69 |
+ ' <div class="fs-modal-dialog">'
|
70 |
+
+ ' <div class="fs-modal-header">'
|
71 |
+
+ ' <h4><?php _efs('quick-feedback' , $slug) ?></h4>'
|
72 |
+
+ ' </div>'
|
73 |
+ ' <div class="fs-modal-body">'
|
74 |
+ ' <div class="fs-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
|
75 |
+ ' <div class="fs-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( __fs( 'deactivation-share-reason' , $slug ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
|
76 |
+ ' </div>'
|
77 |
+ ' <div class="fs-modal-footer">'
|
78 |
+
+ ' <?php echo $anonymous_feedback_checkbox_html ?>'
|
79 |
+ ' <a href="#" class="button button-secondary button-deactivate"></a>'
|
80 |
+
+ ' <a href="#" class="button button-primary button-close"><?php _efs( 'cancel' , $slug ) ?></a>'
|
81 |
+ ' </div>'
|
82 |
+ ' </div>'
|
83 |
+ '</div>',
|
84 |
+
$modal = $(modalHtml),
|
85 |
+
$deactivateLink = $('#the-list .deactivate > [data-slug=<?php echo $VARS['slug']; ?>].fs-slug').prev(),
|
86 |
+
$anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
|
87 |
+
isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
|
88 |
+
selectedReasonID = false,
|
89 |
+
otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
|
90 |
+
dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>;
|
91 |
|
92 |
$modal.appendTo($('body'));
|
93 |
|
167 |
url : ajaxurl,
|
168 |
method : 'POST',
|
169 |
data : {
|
170 |
+
'action' : '<?php echo $fs->get_action_tag( 'submit_uninstall_reason' ) ?>',
|
171 |
+
'slug' : '<?php echo $slug ?>',
|
172 |
+
'reason_id' : $radio.val(),
|
173 |
+
'reason_info' : userReason,
|
174 |
+
'is_anonymous': isAnonymousFeedback()
|
175 |
},
|
176 |
beforeSend: function () {
|
177 |
_parent.find('.fs-modal-footer .button').addClass('disabled');
|
199 |
|
200 |
selectedReasonID = $selectedReasonOption.val();
|
201 |
|
202 |
+
if ( isAnonymous ) {
|
203 |
+
if ( isReasonSelected( dontShareDataReasonID ) ) {
|
204 |
+
$anonymousFeedback.hide();
|
205 |
+
} else {
|
206 |
+
$anonymousFeedback.show();
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
var _parent = $(this).parents('li:first');
|
211 |
|
212 |
$modal.find('.reason-input').remove();
|
249 |
}
|
250 |
|
251 |
closeModal();
|
252 |
+
return false;
|
253 |
});
|
254 |
}
|
255 |
|
256 |
+
function isAnonymousFeedback() {
|
257 |
+
if ( ! isAnonymous ) {
|
258 |
+
return false;
|
259 |
+
}
|
260 |
+
|
261 |
+
return ( isReasonSelected( dontShareDataReasonID ) || $anonymousFeedback.find( 'input' ).prop( 'checked' ) );
|
262 |
+
}
|
263 |
+
|
264 |
+
function isReasonSelected( reasonID ) {
|
265 |
// Get the selected radio input element.
|
266 |
+
var $selectedReasonOption = $modal.find('input[type="radio"]:checked');
|
|
|
267 |
|
268 |
+
return ( reasonID == $selectedReasonOption.val() );
|
269 |
+
}
|
270 |
+
|
271 |
+
function isOtherReasonSelected() {
|
272 |
+
return isReasonSelected( otherReasonID );
|
273 |
}
|
274 |
|
275 |
function showModal() {
|
300 |
|
301 |
$modal.find('.message').hide();
|
302 |
|
303 |
+
if ( isAnonymous ) {
|
304 |
+
$anonymousFeedback.find( 'input' ).prop( 'checked', false );
|
305 |
+
|
306 |
+
// Hide, since by default there is no selected reason.
|
307 |
+
$anonymousFeedback.hide();
|
308 |
+
}
|
309 |
+
|
310 |
var $deactivateButton = $modal.find('.button-deactivate');
|
311 |
|
312 |
/*
|
lib/freemius/templates/forms/deactivation/retry-skip.php
CHANGED
@@ -10,10 +10,13 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
|
16 |
-
$skip_url =
|
17 |
$skip_text = strtolower( __fs( 'skip', $slug ) );
|
18 |
$use_plugin_anonymously_text = __fs( 'click-here-to-use-plugin-anonymously', $slug );
|
19 |
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
|
19 |
+
$skip_url = fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' );
|
20 |
$skip_text = strtolower( __fs( 'skip', $slug ) );
|
21 |
$use_plugin_anonymously_text = __fs( 'click-here-to-use-plugin-anonymously', $slug );
|
22 |
|
lib/freemius/templates/forms/license-activation.php
CHANGED
@@ -10,25 +10,27 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
|
16 |
-
// The URL to redirect to after successfully activating the license from the "Plugins" page.
|
17 |
-
$sync_license_url = $VARS['sync-license-url'];
|
18 |
-
|
19 |
$cant_find_license_key_text = __fs( 'cant-find-license-key', $slug );
|
20 |
$message_above_input_field = __fs( 'activate-license-message', $slug );
|
21 |
$message_below_input_field = '';
|
22 |
|
|
|
|
|
23 |
if ( $fs->is_registered() ) {
|
24 |
-
$activate_button_text =
|
25 |
} else {
|
26 |
$freemius_site_url = $fs->has_paid_plan() ?
|
27 |
'https://freemius.com/wordpress/' :
|
28 |
// Insights platform information.
|
29 |
'https://freemius.com/wordpress/usage-tracking/';
|
30 |
|
31 |
-
$freemius_link = '<a href="' . $freemius_site_url . '" target="_blank">freemius.com</a>';
|
32 |
|
33 |
$message_below_input_field = sprintf( __fs( 'license-sync-disclaimer', $slug ), $freemius_link );
|
34 |
|
@@ -37,11 +39,17 @@
|
|
37 |
|
38 |
$license_key_text = __fs( 'license-key' , $slug );
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
$modal_content_html = <<< HTML
|
41 |
<div class="notice notice-error inline license-activation-message"><p></p></div>
|
42 |
<p>{$message_above_input_field}</p>
|
43 |
-
<input class="license_key" type="text" placeholder="{$license_key_text}" />
|
44 |
-
<a class="show-license-resend-modal show-license-resend-modal-{$slug}" href="
|
45 |
<p>{$message_below_input_field}</p>
|
46 |
HTML;
|
47 |
|
@@ -54,12 +62,16 @@ HTML;
|
|
54 |
modalHtml =
|
55 |
'<div class="fs-modal fs-modal-license-activation">'
|
56 |
+ ' <div class="fs-modal-dialog">'
|
|
|
|
|
|
|
|
|
57 |
+ ' <div class="fs-modal-body">'
|
58 |
+ ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
|
59 |
+ ' </div>'
|
60 |
+ ' <div class="fs-modal-footer">'
|
61 |
-
+ ' <
|
62 |
-
+ ' <
|
63 |
+ ' </div>'
|
64 |
+ ' </div>'
|
65 |
+ '</div>',
|
@@ -68,13 +80,10 @@ HTML;
|
|
68 |
$activateLicenseButton = $modal.find('.button-activate-license'),
|
69 |
$licenseKeyInput = $modal.find('input.license_key'),
|
70 |
$licenseActivationMessage = $modal.find( '.license-activation-message' ),
|
71 |
-
pluginSlug = '<?php echo $slug
|
72 |
-
syncLicenseUrl = '<?php echo $sync_license_url; ?>';
|
73 |
|
74 |
$modal.appendTo($('body'));
|
75 |
|
76 |
-
registerEventHandlers();
|
77 |
-
|
78 |
function registerEventHandlers() {
|
79 |
$activateLicenseLink.click(function (evt) {
|
80 |
evt.preventDefault();
|
@@ -105,7 +114,7 @@ HTML;
|
|
105 |
}
|
106 |
});
|
107 |
|
108 |
-
$modal.on('click', '.button', function (evt) {
|
109 |
evt.preventDefault();
|
110 |
|
111 |
if ($(this).hasClass('disabled')) {
|
@@ -124,7 +133,7 @@ HTML;
|
|
124 |
url: ajaxurl,
|
125 |
method: 'POST',
|
126 |
data: {
|
127 |
-
action : '
|
128 |
slug : pluginSlug,
|
129 |
license_key: licenseKey
|
130 |
},
|
@@ -137,7 +146,7 @@ HTML;
|
|
137 |
closeModal();
|
138 |
|
139 |
// Redirect to the "Account" page and sync the license.
|
140 |
-
window.location.href =
|
141 |
} else {
|
142 |
showError( resultObj.error );
|
143 |
resetActivateLicenseButton();
|
@@ -147,23 +156,14 @@ HTML;
|
|
147 |
});
|
148 |
|
149 |
// If the user has clicked outside the window, close the modal.
|
150 |
-
$modal.on('click', function (
|
151 |
-
var $target = $(evt.target);
|
152 |
-
|
153 |
-
// If the user has clicked anywhere in the modal dialog, just return.
|
154 |
-
if ($target.hasClass('fs-modal-body') || $target.hasClass('fs-modal-footer')) {
|
155 |
-
return;
|
156 |
-
}
|
157 |
-
|
158 |
-
// If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
|
159 |
-
if (( !$target.hasClass('button-close') ) && ( $target.parents('.fs-modal-body').length > 0 || $target.parents('.fs-modal-footer').length > 0 )) {
|
160 |
-
return;
|
161 |
-
}
|
162 |
-
|
163 |
closeModal();
|
|
|
164 |
});
|
165 |
}
|
166 |
|
|
|
|
|
167 |
function showModal() {
|
168 |
resetModal();
|
169 |
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
|
|
|
|
|
|
|
19 |
$cant_find_license_key_text = __fs( 'cant-find-license-key', $slug );
|
20 |
$message_above_input_field = __fs( 'activate-license-message', $slug );
|
21 |
$message_below_input_field = '';
|
22 |
|
23 |
+
$header_title = __fs( $fs->is_free_plan() ? 'activate-license' : 'update-license', $slug );
|
24 |
+
|
25 |
if ( $fs->is_registered() ) {
|
26 |
+
$activate_button_text = $header_title;
|
27 |
} else {
|
28 |
$freemius_site_url = $fs->has_paid_plan() ?
|
29 |
'https://freemius.com/wordpress/' :
|
30 |
// Insights platform information.
|
31 |
'https://freemius.com/wordpress/usage-tracking/';
|
32 |
|
33 |
+
$freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="0">freemius.com</a>';
|
34 |
|
35 |
$message_below_input_field = sprintf( __fs( 'license-sync-disclaimer', $slug ), $freemius_link );
|
36 |
|
39 |
|
40 |
$license_key_text = __fs( 'license-key' , $slug );
|
41 |
|
42 |
+
/**
|
43 |
+
* IMPORTANT:
|
44 |
+
* DO NOT ADD MAXLENGTH OR LIMIT THE LICENSE KEY LENGTH SINCE
|
45 |
+
* WE DO WANT TO ALLOW INPUT OF LONGER KEYS (E.G. WooCommerce Keys)
|
46 |
+
* FOR MIGRATED MODULES.
|
47 |
+
*/
|
48 |
$modal_content_html = <<< HTML
|
49 |
<div class="notice notice-error inline license-activation-message"><p></p></div>
|
50 |
<p>{$message_above_input_field}</p>
|
51 |
+
<input class="license_key" type="text" placeholder="{$license_key_text}" tabindex="1" />
|
52 |
+
<a class="show-license-resend-modal show-license-resend-modal-{$slug}" href="!#" tabindex="2">{$cant_find_license_key_text}</a>
|
53 |
<p>{$message_below_input_field}</p>
|
54 |
HTML;
|
55 |
|
62 |
modalHtml =
|
63 |
'<div class="fs-modal fs-modal-license-activation">'
|
64 |
+ ' <div class="fs-modal-dialog">'
|
65 |
+
+ ' <div class="fs-modal-header">'
|
66 |
+
+ ' <h4><?php echo $header_title ?></h4>'
|
67 |
+
+ ' <a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="<?php _efs( 'dismiss' ) ?>"></i></a>'
|
68 |
+
+ ' </div>'
|
69 |
+ ' <div class="fs-modal-body">'
|
70 |
+ ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
|
71 |
+ ' </div>'
|
72 |
+ ' <div class="fs-modal-footer">'
|
73 |
+
+ ' <button class="button button-secondary button-close" tabindex="4"><?php _efs('cancel', $slug); ?></button>'
|
74 |
+
+ ' <button class="button button-primary button-activate-license" tabindex="3"><?php echo $activate_button_text; ?></button>'
|
75 |
+ ' </div>'
|
76 |
+ ' </div>'
|
77 |
+ '</div>',
|
80 |
$activateLicenseButton = $modal.find('.button-activate-license'),
|
81 |
$licenseKeyInput = $modal.find('input.license_key'),
|
82 |
$licenseActivationMessage = $modal.find( '.license-activation-message' ),
|
83 |
+
pluginSlug = '<?php echo $slug ?>';
|
|
|
84 |
|
85 |
$modal.appendTo($('body'));
|
86 |
|
|
|
|
|
87 |
function registerEventHandlers() {
|
88 |
$activateLicenseLink.click(function (evt) {
|
89 |
evt.preventDefault();
|
114 |
}
|
115 |
});
|
116 |
|
117 |
+
$modal.on('click', '.button-activate-license', function (evt) {
|
118 |
evt.preventDefault();
|
119 |
|
120 |
if ($(this).hasClass('disabled')) {
|
133 |
url: ajaxurl,
|
134 |
method: 'POST',
|
135 |
data: {
|
136 |
+
action : 'fs_activate_license_' + pluginSlug,
|
137 |
slug : pluginSlug,
|
138 |
license_key: licenseKey
|
139 |
},
|
146 |
closeModal();
|
147 |
|
148 |
// Redirect to the "Account" page and sync the license.
|
149 |
+
window.location.href = resultObj.next_page;
|
150 |
} else {
|
151 |
showError( resultObj.error );
|
152 |
resetActivateLicenseButton();
|
156 |
});
|
157 |
|
158 |
// If the user has clicked outside the window, close the modal.
|
159 |
+
$modal.on('click', '.fs-close, .button-secondary', function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
closeModal();
|
161 |
+
return false;
|
162 |
});
|
163 |
}
|
164 |
|
165 |
+
registerEventHandlers();
|
166 |
+
|
167 |
function showModal() {
|
168 |
resetModal();
|
169 |
|
lib/freemius/templates/forms/optout.php
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
6 |
+
* @since 1.2.1.5
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
+
$slug = $VARS['slug'];
|
17 |
+
$fs = freemius( $slug );
|
18 |
+
|
19 |
+
$action = $fs->is_tracking_allowed() ?
|
20 |
+
'stop_tracking' :
|
21 |
+
'allow_tracking';
|
22 |
+
|
23 |
+
$plugin_title = "<strong>{$fs->get_plugin()->title}</strong>";
|
24 |
+
$opt_out_button_text = __fs( 'opt-out', $slug );
|
25 |
+
// @todo Change 'plugin' with module type when migrating with 1.2.2 (themes version).
|
26 |
+
$opt_out_message_appreciation = sprintf( __fs( 'opt-out-message-appreciation', $slug ), 'plugin' );
|
27 |
+
$opt_out_message_usage_tracking = sprintf( __fs( 'opt-out-message-usage-tracking', $slug ),
|
28 |
+
$plugin_title );
|
29 |
+
$opt_out_message_clicking_opt_out = sprintf( __fs( 'opt-out-message-clicking-opt-out', $slug ),
|
30 |
+
$plugin_title,
|
31 |
+
'<a href="http://freemius.com" target="_blank">freemius.com</a>' );
|
32 |
+
|
33 |
+
$admin_notice_params = array(
|
34 |
+
'id' => '',
|
35 |
+
'slug' => $fs->get_id(),
|
36 |
+
'type' => 'success',
|
37 |
+
'sticky' => false,
|
38 |
+
'plugin' => $fs->get_plugin()->title,
|
39 |
+
'message' => $opt_out_message_appreciation
|
40 |
+
);
|
41 |
+
|
42 |
+
$admin_notice_html = fs_get_template( 'admin-notice.php', $admin_notice_params );
|
43 |
+
|
44 |
+
$modal_content_html = <<< HTML
|
45 |
+
<h2>{$opt_out_message_appreciation}</h2>
|
46 |
+
<div class="notice notice-error inline opt-out-error-message"><p></p></div>
|
47 |
+
<p>{$opt_out_message_usage_tracking}</p>
|
48 |
+
<p>{$opt_out_message_clicking_opt_out}</p>
|
49 |
+
HTML;
|
50 |
+
|
51 |
+
fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
|
52 |
+
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
|
53 |
+
?>
|
54 |
+
<script type="text/javascript">
|
55 |
+
(function( $ ) {
|
56 |
+
$( document ).ready(function() {
|
57 |
+
var modalContentHtml = <?php echo json_encode( $modal_content_html ) ?>,
|
58 |
+
modalHtml =
|
59 |
+
'<div class="fs-modal fs-modal-opt-out">'
|
60 |
+
+ ' <div class="fs-modal-dialog">'
|
61 |
+
+ ' <div class="fs-modal-header">'
|
62 |
+
+ ' <h4><?php echo $opt_out_button_text ?></h4>'
|
63 |
+
+ ' </div>'
|
64 |
+
+ ' <div class="fs-modal-body">'
|
65 |
+
+ ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
|
66 |
+
+ ' </div>'
|
67 |
+
+ ' <div class="fs-modal-footer">'
|
68 |
+
+ ' <button class="button button-secondary button-opt-out" tabindex="1"><?php echo $opt_out_button_text ?></button>'
|
69 |
+
+ ' <button class="button button-primary button-close" tabindex="2"><?php _efs( 'opt-out-cancel', $slug ) ?></button>'
|
70 |
+
+ ' </div>'
|
71 |
+
+ ' </div>'
|
72 |
+
+ '</div>',
|
73 |
+
$modal = $( modalHtml ),
|
74 |
+
$adminNotice = $( <?php echo json_encode( $admin_notice_html ) ?> ),
|
75 |
+
action = '<?php echo $action ?>',
|
76 |
+
optOutActionTag = '<?php echo $fs->get_action_tag( 'stop_tracking' ) ?>',
|
77 |
+
optInActionTag = '<?php echo $fs->get_action_tag( 'allow_tracking' ) ?>',
|
78 |
+
$actionLink = $( 'span.opt-in-or-opt-out.<?php echo $VARS['slug'] ?> a' ),
|
79 |
+
$optOutButton = $modal.find( '.button-opt-out' ),
|
80 |
+
$optOutErrorMessage = $modal.find( '.opt-out-error-message' ),
|
81 |
+
pluginSlug = '<?php echo $slug ?>';
|
82 |
+
|
83 |
+
$actionLink.attr( 'data-action', action );
|
84 |
+
$modal.appendTo( $( 'body' ) );
|
85 |
+
|
86 |
+
function registerEventHandlers() {
|
87 |
+
$actionLink.click(function( evt ) {
|
88 |
+
evt.preventDefault();
|
89 |
+
|
90 |
+
if ( 'stop_tracking' == $actionLink.attr( 'data-action' ) ) {
|
91 |
+
showModal();
|
92 |
+
} else {
|
93 |
+
optIn();
|
94 |
+
}
|
95 |
+
});
|
96 |
+
|
97 |
+
$modal.on( 'click', '.button-opt-out', function( evt ) {
|
98 |
+
evt.preventDefault();
|
99 |
+
|
100 |
+
if ( $( this ).hasClass( 'disabled' ) ) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
disableOptOutButton();
|
105 |
+
optOut();
|
106 |
+
});
|
107 |
+
|
108 |
+
// If the user has clicked outside the window, close the modal.
|
109 |
+
$modal.on( 'click', '.fs-close, .button-close', function() {
|
110 |
+
closeModal();
|
111 |
+
return false;
|
112 |
+
});
|
113 |
+
}
|
114 |
+
|
115 |
+
registerEventHandlers();
|
116 |
+
|
117 |
+
function showModal() {
|
118 |
+
resetModal();
|
119 |
+
|
120 |
+
// Display the dialog box.
|
121 |
+
$modal.addClass( 'active' );
|
122 |
+
$( 'body' ).addClass( 'has-fs-modal' );
|
123 |
+
}
|
124 |
+
|
125 |
+
function closeModal() {
|
126 |
+
$modal.removeClass( 'active' );
|
127 |
+
$( 'body' ).removeClass( 'has-fs-modal' );
|
128 |
+
}
|
129 |
+
|
130 |
+
function resetOptOutButton() {
|
131 |
+
enableOptOutButton();
|
132 |
+
$optOutButton.text( '<?php echo $opt_out_button_text; ?>' );
|
133 |
+
}
|
134 |
+
|
135 |
+
function resetModal() {
|
136 |
+
hideError();
|
137 |
+
resetOptOutButton();
|
138 |
+
}
|
139 |
+
|
140 |
+
function optIn() {
|
141 |
+
sendRequest();
|
142 |
+
}
|
143 |
+
|
144 |
+
function optOut() {
|
145 |
+
sendRequest();
|
146 |
+
}
|
147 |
+
|
148 |
+
function sendRequest() {
|
149 |
+
$.ajax({
|
150 |
+
url: ajaxurl,
|
151 |
+
method: 'POST',
|
152 |
+
data: {
|
153 |
+
action: ( 'stop_tracking' == action ? optOutActionTag : optInActionTag ),
|
154 |
+
slug : pluginSlug
|
155 |
+
},
|
156 |
+
beforeSend: function() {
|
157 |
+
if ( 'opt-in' == action ) {
|
158 |
+
$actionLink.text( '<?php _efs( 'opting-in', $slug ) ?>' )
|
159 |
+
} else {
|
160 |
+
$optOutButton.text( '<?php _efs( 'opting-out', $slug ) ?>' );
|
161 |
+
}
|
162 |
+
},
|
163 |
+
success: function( resultObj ) {
|
164 |
+
if ( resultObj.success ) {
|
165 |
+
if ( 'allow_tracking' == action ) {
|
166 |
+
action = 'stop_tracking';
|
167 |
+
$actionLink.text( '<?php _efs( 'opt-out', $slug ) ?>' );
|
168 |
+
showOptInAppreciationMessageAndScrollToTop();
|
169 |
+
} else {
|
170 |
+
action = 'allow_tracking';
|
171 |
+
$actionLink.text( '<?php _efs( 'opt-in', $slug ) ?>' );
|
172 |
+
closeModal();
|
173 |
+
|
174 |
+
if ( $adminNotice.length > 0 ) {
|
175 |
+
$adminNotice.remove();
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
$actionLink.attr( 'data-action', action );
|
180 |
+
} else {
|
181 |
+
showError( resultObj.error );
|
182 |
+
resetOptOutButton();
|
183 |
+
}
|
184 |
+
}
|
185 |
+
});
|
186 |
+
}
|
187 |
+
|
188 |
+
function enableOptOutButton() {
|
189 |
+
$optOutButton.removeClass( 'disabled' );
|
190 |
+
}
|
191 |
+
|
192 |
+
function disableOptOutButton() {
|
193 |
+
$optOutButton.addClass( 'disabled' );
|
194 |
+
}
|
195 |
+
|
196 |
+
function hideError() {
|
197 |
+
$optOutErrorMessage.hide();
|
198 |
+
}
|
199 |
+
|
200 |
+
function showOptInAppreciationMessageAndScrollToTop() {
|
201 |
+
$adminNotice.insertAfter( $( '#wpbody-content' ).find( ' > .wrap > h1' ) );
|
202 |
+
window.scrollTo(0, 0);
|
203 |
+
}
|
204 |
+
|
205 |
+
function showError( msg ) {
|
206 |
+
$optOutErrorMessage.find( ' > p' ).html( msg );
|
207 |
+
$optOutErrorMessage.show();
|
208 |
+
}
|
209 |
+
});
|
210 |
+
})( jQuery );
|
211 |
+
</script>
|
lib/freemius/templates/forms/resend-key.php
CHANGED
@@ -10,12 +10,15 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
|
16 |
$message_above_input_field = __fs( 'ask-for-upgrade-email-address', $slug );
|
17 |
$send_button_text = __fs( 'send-license-key', $slug );
|
18 |
-
$cancel_button_text = __fs( '
|
19 |
$email_address_placeholder = __fs( 'email-address', $slug );
|
20 |
|
21 |
$modal_content_html = <<< HTML
|
@@ -23,10 +26,10 @@
|
|
23 |
<p>{$message_above_input_field}</p>
|
24 |
<div class="input-container">
|
25 |
<div class="button-container">
|
26 |
-
<a href="#" class="button button-primary button-send-license-key disabled">{$send_button_text}</a>
|
27 |
</div>
|
28 |
<div class="email-address-container">
|
29 |
-
<input class="email-address" type="text" placeholder="{$email_address_placeholder}">
|
30 |
</div>
|
31 |
</div>
|
32 |
HTML;
|
@@ -40,7 +43,10 @@ HTML;
|
|
40 |
modalHtml =
|
41 |
'<div class="fs-modal fs-modal-license-key-resend">'
|
42 |
+ ' <div class="fs-modal-dialog">'
|
43 |
-
+ '
|
|
|
|
|
|
|
44 |
+ ' <div class="fs-modal-body">'
|
45 |
+ ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
|
46 |
+ ' </div>'
|
@@ -87,6 +93,11 @@ HTML;
|
|
87 |
}
|
88 |
});
|
89 |
|
|
|
|
|
|
|
|
|
|
|
90 |
$modal.on('click', '.button', function (evt) {
|
91 |
evt.preventDefault();
|
92 |
|
@@ -94,11 +105,6 @@ HTML;
|
|
94 |
return;
|
95 |
}
|
96 |
|
97 |
-
if ($(this).hasClass('button-close')) {
|
98 |
-
closeModal();
|
99 |
-
return;
|
100 |
-
}
|
101 |
-
|
102 |
var emailAddress = $emailAddressInput.val().trim();
|
103 |
|
104 |
disableSendLicenseKeyButton();
|
@@ -111,7 +117,7 @@ HTML;
|
|
111 |
url : ajaxurl,
|
112 |
method : 'POST',
|
113 |
data : {
|
114 |
-
action: 'resend_license_key',
|
115 |
slug : moduleSlug,
|
116 |
email : emailAddress
|
117 |
},
|
@@ -129,18 +135,6 @@ HTML;
|
|
129 |
}
|
130 |
});
|
131 |
});
|
132 |
-
|
133 |
-
// If the user has clicked outside the window, close the modal.
|
134 |
-
$modal.on('click', function (evt) {
|
135 |
-
var $target = $(evt.target);
|
136 |
-
|
137 |
-
// If the user has clicked anywhere in the modal dialog, just return.
|
138 |
-
if ($target.hasClass('fs-modal-body') || $target.parents('.fs-modal-body').length > 0) {
|
139 |
-
return;
|
140 |
-
}
|
141 |
-
|
142 |
-
closeModal();
|
143 |
-
});
|
144 |
}
|
145 |
|
146 |
function showModal() {
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
|
19 |
$message_above_input_field = __fs( 'ask-for-upgrade-email-address', $slug );
|
20 |
$send_button_text = __fs( 'send-license-key', $slug );
|
21 |
+
$cancel_button_text = __fs( 'cancel', $slug );
|
22 |
$email_address_placeholder = __fs( 'email-address', $slug );
|
23 |
|
24 |
$modal_content_html = <<< HTML
|
26 |
<p>{$message_above_input_field}</p>
|
27 |
<div class="input-container">
|
28 |
<div class="button-container">
|
29 |
+
<a href="#" class="button button-primary button-send-license-key disabled" tabindex="2">{$send_button_text}</a>
|
30 |
</div>
|
31 |
<div class="email-address-container">
|
32 |
+
<input class="email-address" type="text" placeholder="{$email_address_placeholder}" tabindex="1">
|
33 |
</div>
|
34 |
</div>
|
35 |
HTML;
|
43 |
modalHtml =
|
44 |
'<div class="fs-modal fs-modal-license-key-resend">'
|
45 |
+ ' <div class="fs-modal-dialog">'
|
46 |
+
+ ' <div class="fs-modal-header">'
|
47 |
+
+ ' <h4><?php echo $send_button_text ?></h4>'
|
48 |
+
+ ' <a href="#!" class="fs-close" tabindex="3" title="Close"><i class="dashicons dashicons-no" title="<?php _efs( 'dismiss' ) ?>"></i></a>'
|
49 |
+
+ ' </div>'
|
50 |
+ ' <div class="fs-modal-body">'
|
51 |
+ ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
|
52 |
+ ' </div>'
|
93 |
}
|
94 |
});
|
95 |
|
96 |
+
$modal.on('click', '.fs-close', function (){
|
97 |
+
closeModal();
|
98 |
+
return false;
|
99 |
+
});
|
100 |
+
|
101 |
$modal.on('click', '.button', function (evt) {
|
102 |
evt.preventDefault();
|
103 |
|
105 |
return;
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
var emailAddress = $emailAddressInput.val().trim();
|
109 |
|
110 |
disableSendLicenseKeyButton();
|
117 |
url : ajaxurl,
|
118 |
method : 'POST',
|
119 |
data : {
|
120 |
+
action: '<?php echo $fs->get_action_tag( 'resend_license_key' ) ?>',
|
121 |
slug : moduleSlug,
|
122 |
email : emailAddress
|
123 |
},
|
135 |
}
|
136 |
});
|
137 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
|
140 |
function showModal() {
|
lib/freemius/templates/forms/trial-start.php
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
6 |
+
* @since 1.2.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
+
$slug = $VARS['slug'];
|
17 |
+
$fs = freemius( $slug );
|
18 |
+
|
19 |
+
$message_header = sprintf(
|
20 |
+
__fs( 'start-trial-prompt-header', $slug ),
|
21 |
+
'<span class="var-trial_period"></span>',
|
22 |
+
'<span class="var-plan_title"></span>'
|
23 |
+
);
|
24 |
+
$message_content = sprintf(
|
25 |
+
__fs( 'start-trial-prompt-message', $slug ),
|
26 |
+
'<a href="https://freemius.com" target="_blank">freemius.com</a>'
|
27 |
+
);
|
28 |
+
|
29 |
+
$modal_content_html = <<< HTML
|
30 |
+
<div class="notice notice-error inline"><p></p></div>
|
31 |
+
<h3>{$message_header}</h3>
|
32 |
+
<p>{$message_content}</p>
|
33 |
+
HTML;
|
34 |
+
|
35 |
+
fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
|
36 |
+
?>
|
37 |
+
<script type="text/javascript">
|
38 |
+
(function ($) {
|
39 |
+
$(document).ready(function () {
|
40 |
+
var modalContentHtml = <?php echo json_encode( $modal_content_html ); ?>,
|
41 |
+
modalHtml =
|
42 |
+
'<div class="fs-modal fs-modal-license-key-resend">'
|
43 |
+
+ ' <div class="fs-modal-dialog">'
|
44 |
+
+ ' <div class="fs-modal-header">'
|
45 |
+
+ ' <h4><?php _efs( 'start-free-trial' ) ?></h4>'
|
46 |
+
+ ' </div>'
|
47 |
+
+ ' <div class="fs-modal-body">' + modalContentHtml + '</div>'
|
48 |
+
+ ' <div class="fs-modal-footer">'
|
49 |
+
+ ' <button class="button button-secondary button-close">' + <?php echo json_encode( __fs( 'cancel', $slug ) ) ?> +'</button>'
|
50 |
+
+ ' <button class="button button-primary button-connect">' + <?php echo json_encode( __fs( 'approve-start-trial', $slug ) ) ?> +'</button>'
|
51 |
+
+ ' </div>'
|
52 |
+
+ ' </div>'
|
53 |
+
+ '</div>',
|
54 |
+
$modal = $(modalHtml),
|
55 |
+
moduleSlug = '<?php echo $slug; ?>',
|
56 |
+
trialData;
|
57 |
+
|
58 |
+
$modal.appendTo($('body'));
|
59 |
+
|
60 |
+
var $errorNotice = $modal.find('.notice-error');
|
61 |
+
|
62 |
+
registerEventHandlers();
|
63 |
+
|
64 |
+
function registerEventHandlers() {
|
65 |
+
$modal.on('click', '.button-close', function () {
|
66 |
+
closeModal();
|
67 |
+
return false;
|
68 |
+
});
|
69 |
+
|
70 |
+
$modal.on('click', '.button-connect', function (evt) {
|
71 |
+
evt.preventDefault();
|
72 |
+
|
73 |
+
var $button = $(this);
|
74 |
+
|
75 |
+
$.ajax({
|
76 |
+
url : ajaxurl,
|
77 |
+
method : 'POST',
|
78 |
+
data : {
|
79 |
+
action : '<?php echo $fs->get_action_tag( 'start_trial' ) ?>',
|
80 |
+
security: '<?php echo wp_create_nonce( $fs->get_action_tag( 'start_trial' ) ) ?>',
|
81 |
+
slug : moduleSlug,
|
82 |
+
trial : trialData
|
83 |
+
},
|
84 |
+
beforeSend: function () {
|
85 |
+
// Disable all buttons during trial activation.
|
86 |
+
$modal.find('.button').prop('disabled', true);
|
87 |
+
|
88 |
+
$button.text('<?php _efs( 'starting-trial', $slug ) ?>...');
|
89 |
+
|
90 |
+
setLoadingMode();
|
91 |
+
},
|
92 |
+
success : function (resultObj) {
|
93 |
+
if (resultObj.success) {
|
94 |
+
$button.text('<?php _efs( 'please-wait', $slug ) ?>...');
|
95 |
+
|
96 |
+
// Redirect to the "Account" page and sync the license.
|
97 |
+
window.location.href = resultObj.data.next_page;
|
98 |
+
} else {
|
99 |
+
$button.text(<?php json_encode( __fs( 'approve-start-trial', $slug ) ) ?>);
|
100 |
+
|
101 |
+
resetLoadingMode();
|
102 |
+
showError(resultObj.error);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
});
|
106 |
+
});
|
107 |
+
}
|
108 |
+
|
109 |
+
window.openTrialConfirmationModal = function showModal(data) {
|
110 |
+
resetModal();
|
111 |
+
|
112 |
+
// Display the dialog box.
|
113 |
+
$modal.addClass('active');
|
114 |
+
|
115 |
+
trialData = data;
|
116 |
+
|
117 |
+
var $modalBody = $modal.find('.fs-modal-body'),
|
118 |
+
$var;
|
119 |
+
|
120 |
+
for (var key in data) {
|
121 |
+
if (data.hasOwnProperty(key)) {
|
122 |
+
$var = $modalBody.find('.var-' + key);
|
123 |
+
|
124 |
+
if ($var.length > 0)
|
125 |
+
$var.html(data[key]);
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
$('body').addClass('has-fs-modal');
|
130 |
+
};
|
131 |
+
|
132 |
+
function closeModal() {
|
133 |
+
$modal.removeClass('active');
|
134 |
+
|
135 |
+
$('body').removeClass('has-fs-modal');
|
136 |
+
}
|
137 |
+
|
138 |
+
function resetModal() {
|
139 |
+
hideError();
|
140 |
+
}
|
141 |
+
|
142 |
+
function hideError() {
|
143 |
+
$errorNotice.hide();
|
144 |
+
}
|
145 |
+
|
146 |
+
function setLoadingMode() {
|
147 |
+
$modal.find('.button')
|
148 |
+
// Re-enable all buttons.
|
149 |
+
.prop('disabled', trialData)
|
150 |
+
// Stop loading cursor.
|
151 |
+
.css({'cursor': 'wait'});
|
152 |
+
|
153 |
+
// Stop loading cursor.
|
154 |
+
$(document.body).css({'cursor': 'wait'});
|
155 |
+
}
|
156 |
+
|
157 |
+
function resetLoadingMode() {
|
158 |
+
$modal.find('.button')
|
159 |
+
// Re-enable all buttons.
|
160 |
+
.prop('disabled', false)
|
161 |
+
// Stop loading cursor.
|
162 |
+
.css({'cursor': 'initial'});
|
163 |
+
|
164 |
+
// Stop loading cursor.
|
165 |
+
$(document.body).css({'cursor': 'initial'});
|
166 |
+
}
|
167 |
+
|
168 |
+
function showError(msg) {
|
169 |
+
$errorNotice.find(' > p').html(msg);
|
170 |
+
$errorNotice.show();
|
171 |
+
}
|
172 |
+
});
|
173 |
+
})(jQuery);
|
174 |
+
</script>
|
lib/freemius/templates/plugin-icon.php
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
13 |
$slug = $VARS['slug'];
|
14 |
$fs = freemius( $slug );
|
15 |
|
@@ -26,9 +29,15 @@
|
|
26 |
$img_dir = WP_FS__DIR_IMG;
|
27 |
|
28 |
if ( 1 < count( $fs_active_plugins->plugins ) ) {
|
|
|
|
|
29 |
foreach ( $fs_active_plugins->plugins as $sdk_path => &$data ) {
|
30 |
if ( $data->plugin_path == $fs->get_plugin_basename() ) {
|
31 |
-
$img_dir =
|
|
|
|
|
|
|
|
|
32 |
break;
|
33 |
}
|
34 |
}
|
@@ -36,9 +45,10 @@
|
|
36 |
|
37 |
$icons = glob( fs_normalize_path( $img_dir . '/' . $slug . '.*' ) );
|
38 |
if ( ! is_array( $icons ) || 0 === count( $icons ) ) {
|
39 |
-
$icon_found
|
40 |
-
$local_path
|
41 |
-
|
|
|
42 |
|
43 |
if ( WP_FS__IS_LOCALHOST && $fs->is_org_repo_compliant() && $have_write_permissions ) {
|
44 |
/**
|
@@ -49,24 +59,48 @@
|
|
49 |
* already exist in the assets folder when the plugin is deployed to
|
50 |
* the repository.
|
51 |
*/
|
52 |
-
|
53 |
-
'-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
'
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
}
|
72 |
|
@@ -89,5 +123,5 @@
|
|
89 |
$relative_url = fs_img_url( substr( $icons[0], strlen( $icon_dir ) ), $icon_dir );
|
90 |
?>
|
91 |
<div class="fs-plugin-icon">
|
92 |
-
<img src="<?php echo $relative_url ?>" width="80" height="80"
|
93 |
-
</div>
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*/
|
16 |
$slug = $VARS['slug'];
|
17 |
$fs = freemius( $slug );
|
18 |
|
29 |
$img_dir = WP_FS__DIR_IMG;
|
30 |
|
31 |
if ( 1 < count( $fs_active_plugins->plugins ) ) {
|
32 |
+
$plugin_or_theme_img_dir = WP_PLUGIN_DIR;
|
33 |
+
|
34 |
foreach ( $fs_active_plugins->plugins as $sdk_path => &$data ) {
|
35 |
if ( $data->plugin_path == $fs->get_plugin_basename() ) {
|
36 |
+
$img_dir = $plugin_or_theme_img_dir
|
37 |
+
. '/'
|
38 |
+
. str_replace( '../themes/', '', $sdk_path )
|
39 |
+
. '/assets/img';
|
40 |
+
|
41 |
break;
|
42 |
}
|
43 |
}
|
45 |
|
46 |
$icons = glob( fs_normalize_path( $img_dir . '/' . $slug . '.*' ) );
|
47 |
if ( ! is_array( $icons ) || 0 === count( $icons ) ) {
|
48 |
+
$icon_found = false;
|
49 |
+
$local_path = fs_normalize_path( $img_dir . '/' . $slug . '.png' );
|
50 |
+
|
51 |
+
$have_write_permissions = ( 'direct' === get_filesystem_method( array(), fs_normalize_path( $img_dir ) ) );
|
52 |
|
53 |
if ( WP_FS__IS_LOCALHOST && $fs->is_org_repo_compliant() && $have_write_permissions ) {
|
54 |
/**
|
59 |
* already exist in the assets folder when the plugin is deployed to
|
60 |
* the repository.
|
61 |
*/
|
62 |
+
if ( ! function_exists( 'plugins_api' ) ) {
|
63 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
64 |
+
}
|
65 |
+
|
66 |
+
$plugin_information = plugins_api( 'plugin_information', array(
|
67 |
+
'slug' => $slug,
|
68 |
+
'fields' => array(
|
69 |
+
'sections' => false,
|
70 |
+
'tags' => false,
|
71 |
+
'icons' => true
|
72 |
+
)
|
73 |
+
) );
|
74 |
+
|
75 |
+
if (
|
76 |
+
! is_wp_error( $plugin_information )
|
77 |
+
&& isset( $plugin_information->icons )
|
78 |
+
&& ! empty( $plugin_information->icons )
|
79 |
+
) {
|
80 |
+
/**
|
81 |
+
* Get the smallest icon.
|
82 |
+
*
|
83 |
+
* @author Leo Fajardo (@leorw)
|
84 |
+
* @since 1.2.2
|
85 |
+
*/
|
86 |
+
$icon = end( $plugin_information->icons );
|
87 |
+
|
88 |
+
if ( 0 !== strpos( $icon, 'http' ) ) {
|
89 |
+
$icon = 'http:' . $icon;
|
90 |
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Get a clean file extension, e.g.: "jpg" and not "jpg?rev=1305765".
|
94 |
+
*
|
95 |
+
* @author Leo Fajardo (@leorw)
|
96 |
+
* @since 1.2.2
|
97 |
+
*/
|
98 |
+
$ext = pathinfo( strtok( $icon, '?' ), PATHINFO_EXTENSION );
|
99 |
+
|
100 |
+
$local_path = fs_normalize_path( $img_dir . '/' . $slug . '.' . $ext );
|
101 |
+
fs_download_image( $icon, $local_path );
|
102 |
+
|
103 |
+
$icon_found = true;
|
104 |
}
|
105 |
}
|
106 |
|
123 |
$relative_url = fs_img_url( substr( $icons[0], strlen( $icon_dir ) ), $icon_dir );
|
124 |
?>
|
125 |
<div class="fs-plugin-icon">
|
126 |
+
<img src="<?php echo $relative_url ?>" width="80" height="80"/>
|
127 |
+
</div>
|
lib/freemius/templates/plugin-info/description.php
CHANGED
@@ -11,6 +11,8 @@
|
|
11 |
}
|
12 |
|
13 |
/**
|
|
|
|
|
14 |
* @var FS_Plugin $plugin
|
15 |
*/
|
16 |
$plugin = $VARS['plugin'];
|
11 |
}
|
12 |
|
13 |
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*
|
16 |
* @var FS_Plugin $plugin
|
17 |
*/
|
18 |
$plugin = $VARS['plugin'];
|
lib/freemius/templates/plugin-info/features.php
CHANGED
@@ -11,6 +11,8 @@
|
|
11 |
}
|
12 |
|
13 |
/**
|
|
|
|
|
14 |
* @var FS_Plugin $plugin
|
15 |
*/
|
16 |
$plugin = $VARS['plugin'];
|
11 |
}
|
12 |
|
13 |
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*
|
16 |
* @var FS_Plugin $plugin
|
17 |
*/
|
18 |
$plugin = $VARS['plugin'];
|
lib/freemius/templates/plugin-info/screenshots.php
CHANGED
@@ -11,6 +11,8 @@
|
|
11 |
}
|
12 |
|
13 |
/**
|
|
|
|
|
14 |
* @var FS_Plugin $plugin
|
15 |
*/
|
16 |
$plugin = $VARS['plugin'];
|
11 |
}
|
12 |
|
13 |
/**
|
14 |
+
* @var array $VARS
|
15 |
+
*
|
16 |
* @var FS_Plugin $plugin
|
17 |
*/
|
18 |
$plugin = $VARS['plugin'];
|
lib/freemius/templates/pricing.php
CHANGED
@@ -15,6 +15,9 @@
|
|
15 |
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
16 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
17 |
|
|
|
|
|
|
|
18 |
$slug = $VARS['slug'];
|
19 |
$fs = freemius( $slug );
|
20 |
$timestamp = time();
|
@@ -32,6 +35,8 @@
|
|
32 |
$timestamp,
|
33 |
'upgrade'
|
34 |
) );
|
|
|
|
|
35 |
}
|
36 |
|
37 |
if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.)
|
@@ -50,7 +55,12 @@
|
|
50 |
'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
|
51 |
) );
|
52 |
?>
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
54 |
<div id="fs_pricing" class="wrap" style="margin: 0 0 -65px -20px;">
|
55 |
<div id="iframe"></div>
|
56 |
<form action="" method="POST">
|
@@ -66,16 +76,16 @@
|
|
66 |
(function ($, undef) {
|
67 |
$(function () {
|
68 |
var
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
|
80 |
FS.PostMessage.init(base_url);
|
81 |
|
@@ -93,6 +103,10 @@
|
|
93 |
scrollTop: $(document).scrollTop()
|
94 |
}, iframe[0]);
|
95 |
});
|
|
|
|
|
|
|
|
|
96 |
});
|
97 |
})(jQuery);
|
98 |
</script>
|
15 |
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
16 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
17 |
|
18 |
+
/**
|
19 |
+
* @var array $VARS
|
20 |
+
*/
|
21 |
$slug = $VARS['slug'];
|
22 |
$fs = freemius( $slug );
|
23 |
$timestamp = time();
|
35 |
$timestamp,
|
36 |
'upgrade'
|
37 |
) );
|
38 |
+
} else {
|
39 |
+
$context_params['home_url'] = home_url();
|
40 |
}
|
41 |
|
42 |
if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.)
|
55 |
'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
|
56 |
) );
|
57 |
?>
|
58 |
+
<?php if ( ! $fs->is_registered() ) {
|
59 |
+
$template_data = array(
|
60 |
+
'slug' => $slug,
|
61 |
+
);
|
62 |
+
fs_require_template( 'forms/trial-start.php', $template_data);
|
63 |
+
} ?>
|
64 |
<div id="fs_pricing" class="wrap" style="margin: 0 0 -65px -20px;">
|
65 |
<div id="iframe"></div>
|
66 |
<form action="" method="POST">
|
76 |
(function ($, undef) {
|
77 |
$(function () {
|
78 |
var
|
79 |
+
// Keep track of the iframe height.
|
80 |
+
iframe_height = 800,
|
81 |
+
base_url = '<?php echo WP_FS__ADDRESS ?>',
|
82 |
+
// Pass the parent page URL into the Iframe in a meaningful way (this URL could be
|
83 |
+
// passed via query string or hard coded into the child page, it depends on your needs).
|
84 |
+
src = base_url + '/pricing/?<?php echo http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href),
|
85 |
|
86 |
+
// Append the Iframe into the DOM.
|
87 |
+
iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>')
|
88 |
+
.appendTo('#iframe');
|
89 |
|
90 |
FS.PostMessage.init(base_url);
|
91 |
|
103 |
scrollTop: $(document).scrollTop()
|
104 |
}, iframe[0]);
|
105 |
});
|
106 |
+
|
107 |
+
FS.PostMessage.receive('start_trial', function (data) {
|
108 |
+
openTrialConfirmationModal(data);
|
109 |
+
});
|
110 |
});
|
111 |
})(jQuery);
|
112 |
</script>
|
lib/freemius/templates/sticky-admin-notice-js.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
|
24 |
notice.fadeOut('fast', function(){
|
25 |
var data = {
|
26 |
-
action:
|
27 |
slug: slug,
|
28 |
message_id: id
|
29 |
};
|
23 |
|
24 |
notice.fadeOut('fast', function(){
|
25 |
var data = {
|
26 |
+
action: 'fs_dismiss_notice_action_' + slug,
|
27 |
slug: slug,
|
28 |
message_id: id
|
29 |
};
|
lib/wp-content-aware-engine/assets/css/condition_groups.css
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
* @version 2.0
|
4 |
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
*/.wpca-alert{position:fixed;top:0;font-weight:700;color:#fff;font-size:1.3em;width:100%}.wpca-alert .wpca-error,.wpca-alert .wpca-success{box-sizing:border-box;text-align:center;border:1px solid;box-shadow:0 1px 3px rgba(0,0,0,.3);padding:15px 30px}.wpca-alert .wpca-success{background-color:#46b450;border-color:#388f40}.wpca-alert .wpca-error{background-color:#ff7058;border-color:#d13d25}@media (min-width:601px){.wpca-alert{width:auto;top:50px;left:50%}.wpca-error,.wpca-success{min-width:320px;position:relative;left:-50%;border-radius:2px}}@media (min-width:783px){.wpca-alert{top:40px}}#cas-groups{padding:6px 0 0}#cas-groups>ul{position:relative;margin:0;transition:all 1s ease;max-height:9999px;height:auto}.cas-group-body{-ms-box-sizing:border-box;box-sizing:border-box;border-width:1px;border-style:solid;border-color:#cfcfcf;padding:4px;background-color:#f1f1f1;overflow:hidden;position:relative;margin-bottom:0;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.08)}.cas-group-body .cas-group-cell{border-radius:2px;background-color:#fff;padding:10px;border:1px solid #cfcfcf}.cas-group-body .cas-group-cell.cas-group-options{border-width:0;overflow:hidden;background-color:#f1f1f1}.cas-group-body .cas-group-cell.cas-group-options>div{margin-bottom:10px}.cas-group-body .cas-group-cell.cas-group-options .button{float:right}.cas-group-single{margin:0}.cas-group-single:first-of-type>.cas-group-sep{display:none}.cas-group-single:first-of-type>.cas-group-sep.wpca-group-negate{display:table}.cas-group-single:first-of-type>.cas-group-sep.wpca-group-negate .wpca-sep-or,.cas-group-single:first-of-type>.cas-group-sep.wpca-group-negate:before{display:none}.cas-group-sep.wpca-group-negate .wpca-sep-not{display:inline}.cas-group-sep{display:table;margin:0 auto;color:#aaa;text-transform:uppercase;font-size:.9em;font-weight:700;line-height:1.1em;clear:both}.cas-group-sep:after,.cas-group-sep:before{position:relative;display:block;content:'';width:2px;height:8px;margin:0 auto;background-color:#cfcfcf}.cas-group-sep .wpca-sep-not{display:none}.cas-group-body .cas-group-sep{display:block;overflow:hidden;text-align:center;margin:5px -10px}.cas-group-body .cas-group-sep:after,.cas-group-body .cas-group-sep:before{background-color:transparent;border-top:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;content:"";display:inline-block;height:.15em;position:relative;vertical-align:middle;width:50%;margin-bottom:.15em}.cas-group-body .cas-group-sep:before{right:.5em;margin-left:-50%}.cas-group-body .cas-group-sep:after{left:.5em;margin-right:-50%}.cas-group-label{font-weight:700;margin:0 0 6px}.wpca-condition-remove{cursor:pointer;margin:0 8px 0 0;color:#aaa;transition:color .3s ease}.wpca-condition-remove:hover{color:#444}.cas-group-new{position:relative;background-color:#fff;border:1px solid #e9e9e9;border-radius:2px;box-shadow:0 0 0 4px #f9f9f9 inset,0 1px 1px rgba(0,0,0,.08);padding:15px;margin-bottom:10px;transition:all .5s ease}.cas-group-new:hover{border-color:#cfcfcf;box-shadow:0 0 0 4px #f1f1f1 inset,0 1px 1px rgba(0,0,0,.08)}@media (min-width:1041px){#cas-groups{padding:10px 0 0}.cas-group-label{float:left;width:180px;margin:5px 0 0}.cas-group-input{margin-left:181px}.cas-group-body{display:table;table-layout:fixed;width:100%}.cas-group-body .cas-group-cell{vertical-align:top;display:table-cell}.cas-group-body .cas-group-cell.cas-group-options{width:200px}.cas-group-body .cas-group-cell.cas-group-options .button{float:none;position:absolute;bottom:5px;right:5px}}.select2-container.select2-container--wpca{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container.select2-container--wpca .select2-search--inline{float:left}.select2-container.select2-container--wpca .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin:6px 0 0;padding:0}.select2-container.select2-container--wpca .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container.select2-container--wpca .select2-dropdown{background-color:#fff;border:1px solid #5b9dd9;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-container.select2-container--wpca .select2-results{display:block}.select2-container.select2-container--wpca .select2-results__options{list-style:none;margin:0;padding:0}.select2-container.select2-container--wpca .select2-results__option{padding:6px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container.select2-container--wpca .select2-results__option[aria-selected]{cursor:pointer}.select2-container--open.select2-container--wpca .select2-dropdown{left:0}.select2-container--open.select2-container--wpca .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open.select2-container--wpca .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--wpca .select2-selection--multiple{background-color:#fff;color:#444;border:1px solid #ddd;cursor:text;box-sizing:border-box;display:block;min-height:32px;line-height:1;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container--wpca .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--wpca .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--wpca .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--wpca .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--wpca .select2-selection--multiple .select2-selection__choice{background-color:#bfe7f1;color:#23282d;border:1px solid #439eb4;border-radius:2px;cursor:default;float:left;margin:4px 4px 0 0;padding:1px 6px 3px;max-width:100%;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;box-shadow:0 1px 0 0 rgba(255,255,255,.9) inset,0 1px 1px rgba(0,0,0,.1)}.select2-container--wpca .select2-selection--multiple .select2-selection__choice__remove{color:#439eb4;cursor:pointer;font-size:16px;display:inline-block;font-weight:700;margin-right:6px}.select2-container--wpca .select2-results__option[aria-selected=true],.select2-container--wpca.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--wpca .select2-selection--multiple .select2-selection__choice__remove:hover{color:#444}.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-search--inline,.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__choice,.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__placeholder{float:right}.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--wpca.select2-container--focus .select2-selection--multiple{border:1px solid #5b9dd9;background-color:#fafafa;outline:0}.select2-container--wpca.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--wpca.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--wpca.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--wpca.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--wpca.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--wpca .select2-search--dropdown .select2-search__field{border:1px solid #5b9dd9}.select2-container--wpca .select2-search--inline .select2-search__field{background:0 0;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--wpca .select2-search--inline .select2-search__field:not([placeholder='']){width:100%!important;margin-right:9999px}.select2-container--wpca .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--wpca .select2-results__option[role=group]{padding:0}.select2-container--wpca .select2-results__option[aria-disabled=true]{color:#999}.select2-container--wpca .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2-container--wpca .select2-results__group{cursor:default;display:block;padding:6px}
|
3 |
* @version 2.0
|
4 |
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
*/.wpca-pull-left{float:left}.cas-group-body .cas-group-cell.cas-group-options .button,.cas-group-body .cas-group-cell.cas-group-options .cae-toggle-bar,.wpca-pull-right{float:right}.wpca-alert{position:fixed;top:0;font-weight:700;color:#fff;font-size:1.3em;width:100%}.wpca-alert .wpca-error,.wpca-alert .wpca-success{box-sizing:border-box;text-align:center;border:1px solid;box-shadow:0 1px 3px rgba(0,0,0,.3);padding:15px 30px}.wpca-alert .wpca-success{background-color:#46b450;border-color:#388f40}.wpca-alert .wpca-error{background-color:#ff7058;border-color:#d13d25}@media (min-width:601px){.wpca-alert{width:auto;top:50px;left:50%}.wpca-error,.wpca-success{min-width:320px;position:relative;left:-50%;border-radius:2px}}@media (min-width:783px){.wpca-alert{top:40px}}#cas-groups{padding:6px 0 0}#cas-groups>ul{position:relative;margin:0;transition:all 1s ease;max-height:9999px;height:auto}.cas-group-body{-ms-box-sizing:border-box;box-sizing:border-box;border-width:1px;border-style:solid;border-color:#cfcfcf;padding:4px;background-color:#f1f1f1;overflow:hidden;position:relative;margin-bottom:0;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.08)}.cas-group-body .cas-group-cell{border-radius:2px;background-color:#fff;padding:10px;border:1px solid #cfcfcf}.cas-group-body .cas-group-cell.cas-group-options{border-width:0;overflow:hidden;background-color:#f1f1f1;padding-bottom:40px}.cas-group-body .cas-group-cell.cas-group-options>div{padding:5px 0;border-bottom:#ddd 1px solid}.cas-group-single{margin:0}.cas-group-single:first-of-type>.cas-group-sep{display:none}.cas-group-single:first-of-type>.cas-group-sep.wpca-group-negate{display:table}.cas-group-single:first-of-type>.cas-group-sep.wpca-group-negate .wpca-sep-or,.cas-group-single:first-of-type>.cas-group-sep.wpca-group-negate:before{display:none}.cas-group-sep.wpca-group-negate .wpca-sep-not{display:inline}.cas-group-sep{display:table;margin:0 auto;color:#aaa;text-transform:uppercase;font-size:.9em;font-weight:700;line-height:1.1em;clear:both}.cas-group-sep:after,.cas-group-sep:before{position:relative;display:block;content:'';width:2px;height:8px;margin:0 auto;background-color:#cfcfcf}.cas-group-sep .wpca-sep-not{display:none}.cas-group-body .cas-group-sep{display:block;overflow:hidden;text-align:center;margin:5px -10px}.cas-group-body .cas-group-sep:after,.cas-group-body .cas-group-sep:before{background-color:transparent;border-top:1px solid #DFDFDF;border-bottom:1px solid #DFDFDF;content:"";display:inline-block;height:.15em;position:relative;vertical-align:middle;width:50%;margin-bottom:.15em}.cas-group-body .cas-group-sep:before{right:.5em;margin-left:-50%}.cas-group-body .cas-group-sep:after{left:.5em;margin-right:-50%}.cas-group-label{font-weight:700;margin:0 0 6px}.wpca-condition-remove{cursor:pointer;margin:0 8px 0 0;color:#aaa;transition:color .3s ease}.wpca-condition-remove:hover{color:#444}.cas-group-new{position:relative;background-color:#fff;border:1px solid #e9e9e9;border-radius:2px;box-shadow:0 0 0 4px #f9f9f9 inset,0 1px 1px rgba(0,0,0,.08);padding:15px;margin-bottom:10px;transition:all .5s ease}.cas-group-new:hover{border-color:#cfcfcf;box-shadow:0 0 0 4px #f1f1f1 inset,0 1px 1px rgba(0,0,0,.08)}label.cae-toggle input{display:none}label.cae-toggle .cae-toggle-bar{overflow:hidden;cursor:pointer;position:relative;padding-right:30px;height:20px;line-height:20px;display:inline-block}label.cae-toggle .cae-toggle-bar:before{top:0;right:0;position:absolute;display:inline-block;width:30px;content:"";padding:0;height:inherit;line-height:inherit;border-radius:20px;background-color:#bbb;box-shadow:0 0 2px rgba(0,0,0,.2) inset;transition:background-color .2s ease-in}label.cae-toggle .cae-toggle-bar:after{content:"";display:block;width:18px;height:18px;margin:0;background:#FFF;position:absolute;top:1px;bottom:0;right:11px;border-radius:20px;transition:right .2s ease-in 0s;box-shadow:0 1px 2px rgba(0,0,0,.2)}label.cae-toggle input:checked+.cae-toggle-bar:before{background-color:#7ad03a}label.cae-toggle input:checked+.cae-toggle-bar:after{right:1px}@media (min-width:1041px){#cas-groups{padding:10px 0 0}.cas-group-label{float:left;width:180px;margin:5px 0 0}.cas-group-input{margin-left:181px}.cas-group-body{display:table;table-layout:fixed;width:100%}.cas-group-body .cas-group-cell{vertical-align:top;display:table-cell}.cas-group-body .cas-group-cell.cas-group-options{width:200px}.cas-group-body .cas-group-cell.cas-group-options .button{float:none;position:absolute;bottom:5px;right:5px}}.select2-container.select2-container--wpca{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container.select2-container--wpca .select2-search--inline{float:left}.select2-container.select2-container--wpca .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin:6px 0 0;padding:0}.select2-container.select2-container--wpca .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container.select2-container--wpca .select2-dropdown{background-color:#fff;border:1px solid #5b9dd9;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-container.select2-container--wpca .select2-results{display:block}.select2-container.select2-container--wpca .select2-results__options{list-style:none;margin:0;padding:0}.select2-container.select2-container--wpca .select2-results__option{padding:6px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container.select2-container--wpca .select2-results__option[aria-selected]{cursor:pointer}.select2-container--open.select2-container--wpca .select2-dropdown{left:0}.select2-container--open.select2-container--wpca .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open.select2-container--wpca .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--wpca .select2-selection--multiple{background-color:#fff;color:#444;border:1px solid #ddd;cursor:text;box-sizing:border-box;display:block;min-height:32px;line-height:1;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.select2-container--wpca .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--wpca .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--wpca .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--wpca .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--wpca .select2-selection--multiple .select2-selection__choice{background-color:#bfe7f1;color:#23282d;border:1px solid #439eb4;border-radius:2px;cursor:default;float:left;margin:4px 4px 0 0;padding:1px 6px 3px;max-width:100%;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;box-shadow:0 1px 0 0 rgba(255,255,255,.9) inset,0 1px 1px rgba(0,0,0,.1)}.select2-container--wpca .select2-selection--multiple .select2-selection__choice__remove{color:#439eb4;cursor:pointer;font-size:16px;display:inline-block;font-weight:700;margin-right:6px}.select2-container--wpca .select2-results__option[aria-selected=true],.select2-container--wpca.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--wpca .select2-selection--multiple .select2-selection__choice__remove:hover{color:#444}.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-search--inline,.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__choice,.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__placeholder{float:right}.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--wpca[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--wpca.select2-container--focus .select2-selection--multiple{border:1px solid #5b9dd9;background-color:#fafafa;outline:0}.select2-container--wpca.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--wpca.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--wpca.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--wpca.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--wpca.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--wpca .select2-search--dropdown .select2-search__field{border:1px solid #5b9dd9}.select2-container--wpca .select2-search--inline .select2-search__field{background:0 0;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--wpca .select2-search--inline .select2-search__field:not([placeholder='']){width:100%!important;margin-right:9999px}.select2-container--wpca .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--wpca .select2-results__option[role=group]{padding:0}.select2-container--wpca .select2-results__option[aria-disabled=true]{color:#999}.select2-container--wpca .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2-container--wpca .select2-results__group{cursor:default;display:block;padding:6px}
|
lib/wp-content-aware-engine/assets/js/backbone.epoxy.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Backbone.Epoxy 1.3.3
|
2 |
+
// (c) 2015 Greg MacWilliam
|
3 |
+
// Freely distributed under the MIT license
|
4 |
+
// http://epoxyjs.org
|
5 |
+
(function(t,e){"undefined"!=typeof exports?module.exports=e(require("underscore"),require("backbone")):"function"==typeof define&&define.amd?define(["underscore","backbone"],e):e(t._,t.Backbone)})(this,function(t,e){function n(t,e,n){return t._super.prototype[e].apply(t,n)}function i(e,n,r,o){for(var s in n)if(n.hasOwnProperty(s)){var u=n[s];if(e.hasComputed(s)){if(o.length&&t.contains(o,s))throw"Recursive setter: "+o.join(" > ");u=e.c()[s].set(u),u&&_(u)&&(r=i(e,u,r,o.concat(s)))}else r[s]=u}return r}function r(e,n,i,r){i=i||{},i.get&&b(i.get)&&(i._get=i.get),i.set&&b(i.set)&&(i._set=i.set),delete i.get,delete i.set,t.extend(this,i),this.model=e,this.name=n,this.deps=this.deps||[],r||this.init()}function o(e){return b(e)?e():(_(e)&&(e=t.clone(e),t.each(e,function(t,n){e[n]=o(t)})),e)}function s(t){return b(t)?{set:t}:t}function u(e){return function(){var n=arguments,i=b(e)?e:e.get,r=e.set;return function(e){return w(e)?i.apply(this,t.map(n,o)):n[0]((r?r:i).call(this,e))}}}function c(e,n,i,r,o){return(e=t.result(e,r))?($(e)?(o=o?o+"_":"",n["$"+r]=function(){return F&&F.push([e,"change"]),e},t.each(e.toJSON({computed:!0}),function(t,r){n[o+r]=function(t){return a(e,r,t,i)}})):C(e)&&(n["$"+r]=function(){return F&&F.push([e,"reset add remove sort update"]),e}),e):void 0}function a(e,n,i,r){if(F&&F.push([e,"change:"+n]),!w(i)){if(!_(i)||x(i)||t.isDate(i)){var o=i;i={},i[n]=o}return r&&r.save?e.save(i,r):e.set(i,r)}return e.get(n)}function h(t,e){if(":el"===e||":scope"===e)return t.$el;var n=t.$(e);return t.$el.is(e)&&(n=n.add(t.$el)),n}function l(e,n,i,r,o,s){try{var u=B[i]||(B[i]=Function("$f","$c","with($f){with($c){return{"+i+"}}}")),c=u(s,r)}catch(a){throw'Error parsing bindings: "'+i+'"\n>> '+a}var h=t.map(t.union(c.events||[],["change"]),function(t){return t+".epoxy"}).join(" ");t.each(c,function(t,i){if(o.hasOwnProperty(i))e.b().push(new g(e,n,o[i],t,h,r,c));else if(!q.hasOwnProperty(i))throw'binding handler "'+i+'" is not defined.'})}function d(t,e,n){return t&&t.hasOwnProperty(e)?w(n)?o(t[e]):t[e](n):void 0}function f(t,e){var n=[];if(e&&t)for(var i=0,r=e.length;r>i;i++)n.push(e[i]in t?t[e[i]]():null);return n}function p(t){var e=[];for(var n in t){var i=t[n];_(i)&&(i="{"+p(i)+"}"),S.test(n)||N.test(n)||(n='"'+n+'"'),e.push(n+":"+i)}return e.join(",")}function g(e,n,i,r,s,u,c){var a=this,h=n[0].tagName.toLowerCase(),l="input"==h||"select"==h||"textarea"==h||"true"==n.prop("contenteditable"),d=[],f=function(t){a.$el&&a.set(a.$el,o(r),t)};if(a.view=e,a.$el=n,a.evt=s,t.extend(a,i),r=a.init(a.$el,o(r),u,c)||r,F=d,f(),F=null,l&&i.get&&b(r)&&a.$el.on(s,function(t){r(a.get(a.$el,o(r),t))}),d.length)for(var p=0,g=d.length;g>p;p++)a.listenTo(d[p][0],d[p][1],f)}var v,m=e.Epoxy={},y=Array.prototype,w=t.isUndefined,b=t.isFunction,_=t.isObject,x=t.isArray,$=function(t){return t instanceof e.Model},C=function(t){return t instanceof e.Collection},O=function(){},V={mixin:function(t){t=t||{};for(var e in this.prototype)"bindings"===e&&t.bindings||this.prototype.hasOwnProperty(e)&&"constructor"!==e&&(t[e]=this.prototype[e]);return t}},k=["computeds"];m.Model=e.Model.extend({_super:e.Model,constructor:function(e,i){t.extend(this,t.pick(i||{},k)),n(this,"constructor",arguments),this.initComputeds(this.attributes,i)},getCopy:function(e){return t.clone(this.get(e))},get:function(t){return v&&v.push(["change:"+t,this]),this.hasComputed(t)?this.c()[t].get():n(this,"get",arguments)},set:function(e,r,o){var s=e;s&&!_(s)?(s={},s[e]=r):o=r,o=o||{};var u=this._setting=[];o.unset||(s=i(this,s,{},[])),delete this._setting;var c=n(this,"set",[s,o]);return o.silent||(!this.hasChanged()&&u.length&&this.trigger("change",this),t.each(u,function(t){this.trigger.apply(this,t)},this)),c},toJSON:function(e){var i=n(this,"toJSON",arguments);return e&&e.computed&&t.each(this.c(),function(t,e){i[e]=t.value}),i},destroy:function(){return this.clearComputeds(),n(this,"destroy",arguments)},c:function(){return this._c||(this._c={})},initComputeds:function(e){this.clearComputeds();var n=t.result(this,"computeds")||{};n=t.extend(n,t.pick(e||{},t.keys(n))),t.each(n,function(t,e){t._init=1,this.addComputed(e,t)},this),t.invoke(this.c(),"init")},addComputed:function(t,e,n){this.removeComputed(t);var i=e,o=i._init;if(b(e)){var s=2;i={},i._get=e,b(n)&&(i._set=n,s++),i.deps=y.slice.call(arguments,s)}return this.c()[t]=new r(this,t,i,o),this},hasComputed:function(t){return this.c().hasOwnProperty(t)},removeComputed:function(t){return this.hasComputed(t)&&(this.c()[t].dispose(),delete this.c()[t]),this},clearComputeds:function(){for(var t in this.c())this.removeComputed(t);return this},modifyArray:function(t,e,n){var i=this.get(t);if(x(i)&&b(y[e])){var r=y.slice.call(arguments,2),o=y[e].apply(i,r);return n=n||{},n.silent||this.trigger("change:"+t+" change",this,y,n),o}return null},modifyObject:function(t,e,n,i){var r=this.get(t),o=!1;return _(r)?(i=i||{},w(n)&&r.hasOwnProperty(e)?(delete r[e],o=!0):r[e]!==n&&(r[e]=n,o=!0),o&&!i.silent&&this.trigger("change:"+t+" change",this,r,i),r):null}},V),t.extend(r.prototype,e.Events,{init:function(){var e={},n=v=[];this.get(!0),v=null,n.length&&(t.each(n,function(n){var i=n[0],r=n[1];e[i]?t.contains(e[i],r)||e[i].push(r):e[i]=[r]}),t.each(e,function(e,n){for(var i=0,r=e.length;r>i;i++)this.listenTo(e[i],n,t.bind(this.get,this,!0))},this))},val:function(t){return this.model.get(t)},get:function(e){if(e===!0&&this._get){var n=this._get.apply(this.model,t.map(this.deps,this.val,this));this.change(n)}return this.value},set:function(t){if(this._get){if(this._set)return this._set.apply(this.model,arguments);throw"Cannot set read-only computed attribute."}return this.change(t),null},change:function(e){if(!t.isEqual(e,this.value)){this.value=e;var n=["change:"+this.name,this.model,e];this.model._setting?this.model._setting.push(n):(n[0]+=" change",this.model.trigger.apply(this.model,n))}},dispose:function(){this.stopListening(),this.off(),this.model=this.value=null}});var P={optionText:"label",optionValue:"value"},B={},E={attr:s(function(t,e){t.attr(e)}),checked:s({get:function(e,n,i){e.length>1&&(e=e.filter(i.target));var r=!!e.prop("checked"),o=e.val();if(this.isRadio(e))return o;if(x(n)){n=n.slice();var s=t.indexOf(n,o);return r&&0>s?n.push(o):!r&&s>-1&&n.splice(s,1),n}return r},set:function(e,n){e.length>1&&(e=e.filter('[value="'+n+'"]'));var i=!!n;this.isRadio(e)?i=n==e.val():x(n)&&(i=t.contains(n,e.val())),e.prop("checked",i)},isRadio:function(t){return"radio"===t.attr("type").toLowerCase()}}),classes:s(function(e,n){t.each(n,function(t,n){e.toggleClass(n,!!t)})}),collection:s({init:function(t,e,n,i){if(this.i=i.itemView?this.view[i.itemView]:this.view.itemView,!C(e))throw'Binding "collection" requires a Collection.';if(!b(this.i))throw'Binding "collection" requires an itemView.';this.v={}},set:function(e,n,i){var r,o=this.v,s=this.i,u=n.models,c=F;if(F=null,i=i||n,$(i))if(o.hasOwnProperty(i.cid))o[i.cid].remove(),delete o[i.cid];else{o[i.cid]=r=new s({model:i,collectionView:this.view});var a=t.indexOf(u,i),h=e.children();h.length>a?h.eq(a).before(r.$el):e.append(r.$el)}else if(C(i)){var l=u.length===t.size(o)&&n.every(function(t){return o.hasOwnProperty(t.cid)});e.children().detach();var d=document.createDocumentFragment();l?n.each(function(t){d.appendChild(o[t.cid].el)}):(this.clean(),n.each(function(t){o[t.cid]=r=new s({model:t,collectionView:this.view}),d.appendChild(r.el)},this)),e.append(d)}F=c},clean:function(){for(var t in this.v)this.v.hasOwnProperty(t)&&(this.v[t].remove(),delete this.v[t])}}),css:s(function(t,e){t.css(e)}),disabled:s(function(t,e){t.prop("disabled",!!e)}),enabled:s(function(t,e){t.prop("disabled",!e)}),html:s(function(t,e){t.html(e)}),options:s({init:function(t,e,n,i){this.e=i.optionsEmpty,this.d=i.optionsDefault,this.v=i.value},set:function(e,n){var i=this,r=o(i.e),s=o(i.d),u=o(i.v),c=C(n)?n.models:n,a=c.length,h=!0,l="";a||s||!r?(s&&(c=[s].concat(c)),t.each(c,function(t){l+=i.opt(t,a)})):(l+=i.opt(r,a),h=!1),e.html(l).prop("disabled",!h).val(u),0>e[0].selectedIndex&&e.children().length&&(e[0].selectedIndex=0);var d=e.val();i.v&&!t.isEqual(u,d)&&i.v(d)},opt:function(t){var e=t,n=t,i=P.optionText,r=P.optionValue;return _(t)&&(e=$(t)?t.get(i):t[i],n=$(t)?t.get(r):t[r]),['<option value="',n,'">',e,"</option>"].join("")},clean:function(){this.d=this.e=this.v=0}}),template:s({init:function(e,n,i){var r=e.find("script,template");return this.t=t.template(r.length?r.html():e.html()),x(n)?t.pick(i,n):void 0},set:function(t,e){e=$(e)?e.toJSON({computed:!0}):e,t.html(this.t(e))},clean:function(){this.t=null}}),text:s({get:function(t){return t.text()},set:function(t,e){t.text(e)}}),toggle:s(function(t,e){t.toggle(!!e)}),value:s({get:function(t){return t.val()},set:function(t,e){try{t.val()+""!=e+""&&t.val(e)}catch(n){}}})},j={all:u(function(){for(var t=arguments,e=0,n=t.length;n>e;e++)if(!t[e])return!1;return!0}),any:u(function(){for(var t=arguments,e=0,n=t.length;n>e;e++)if(t[e])return!0;return!1}),length:u(function(t){return t.length||0}),none:u(function(){for(var t=arguments,e=0,n=t.length;n>e;e++)if(t[e])return!1;return!0}),not:u(function(t){return!t}),format:u(function(t){for(var e=arguments,n=1,i=e.length;i>n;n++)t=t.replace(RegExp("\\$"+n,"g"),e[n]);return t}),select:u(function(t,e,n){return t?e:n}),csv:u({get:function(t){return t+="",t?t.split(","):[]},set:function(t){return x(t)?t.join(","):t}}),integer:u(function(t){return t?parseInt(t,10):0}),decimal:u(function(t){return t?parseFloat(t):0})},q={events:1,itemView:1,optionsDefault:1,optionsEmpty:1};m.binding={allowedParams:q,addHandler:function(t,e){E[t]=s(e)},addFilter:function(t,e){j[t]=u(e)},config:function(e){t.extend(P,e)},emptyCache:function(){B={}}};var F,M=["viewModel","bindings","bindingFilters","bindingHandlers","bindingSources","computeds"];m.View=e.View.extend({_super:e.View,constructor:function(e){t.extend(this,t.pick(e||{},M)),n(this,"constructor",arguments),this.applyBindings()},b:function(){return this._b||(this._b=[])},bindings:"data-bind",setterOptions:null,applyBindings:function(){this.removeBindings();var n=this,i=t.clone(t.result(n,"bindingSources")),r=n.bindings,o=n.setterOptions,a=t.clone(E),d=t.clone(j),g=n._c={};t.each(t.result(n,"bindingHandlers")||{},function(t,e){a[e]=s(t)}),t.each(t.result(n,"bindingFilters")||{},function(t,e){d[e]=u(t)}),n.model=c(n,g,o,"model"),n.viewModel=c(n,g,o,"viewModel"),n.collection=c(n,g,o,"collection"),n.collection&&n.collection.view&&(n.itemView=n.collection.view),i&&(t.each(i,function(t,e){i[e]=c(i,g,o,e,e)}),n.bindingSources=i),t.each(t.result(n,"computeds")||{},function(t,e){var i=b(t)?t:t.get,r=t.set,o=t.deps;g[e]=function(t){return!w(t)&&r?r.call(n,t):i.apply(n,f(n._c,o))}}),_(r)?t.each(r,function(t,e){var i=h(n,e);_(t)&&(t=p(t)),i.length&&l(n,i,t,g,a,d)}):h(n,"["+r+"]").each(function(){var t=e.$(this);l(n,t,t.attr(r),g,a,d)})},getBinding:function(t){return d(this._c,t)},setBinding:function(t,e){return d(this._c,t,e)},removeBindings:function(){if(this._c=null,this._b)for(;this._b.length;)this._b.pop().dispose()},remove:function(){this.removeBindings(),n(this,"remove",arguments)}},V);var S=/^[a-z_$][a-z0-9_$]*$/i,N=/^\s*(["']).*\1\s*$/;return t.extend(g.prototype,e.Events,{init:O,get:O,set:O,clean:O,dispose:function(){this.clean(),this.stopListening(),this.$el.off(this.evt),this.$el=this.view=null}}),m});
|
6 |
+
//@ sourceMappingURL=backbone.epoxy.min.map
|
lib/wp-content-aware-engine/assets/js/condition_groups.js
CHANGED
@@ -59,21 +59,33 @@ var CAE = CAE || {};
|
|
59 |
}),
|
60 |
|
61 |
Group: Backbone.Model.extend({
|
|
|
|
|
|
|
|
|
|
|
62 |
defaults : {
|
63 |
'id' : null,
|
64 |
-
'status' :
|
|
|
65 |
'options' : {}
|
66 |
},
|
67 |
initialize: function() {
|
|
|
|
|
|
|
|
|
68 |
if(!this.conditions) {
|
69 |
this.conditions = new CAE.Models.ConditionCollection();
|
70 |
}
|
71 |
-
//todo: listen to group options
|
72 |
//todo: listen to condition meta changes
|
73 |
//this.conditions.on("unsavedChanges",this.testChange,this);
|
|
|
74 |
},
|
75 |
// testChange: function(hasChanges, unsavedAttrs, model) {
|
76 |
-
|
|
|
77 |
// },
|
78 |
parse: function(response) {
|
79 |
if (_.has(response, "conditions")) {
|
@@ -126,7 +138,7 @@ var CAE = CAE || {};
|
|
126 |
};
|
127 |
|
128 |
/**
|
129 |
-
* Backbone
|
130 |
*
|
131 |
* @type {Object}
|
132 |
*/
|
@@ -178,7 +190,7 @@ var CAE = CAE || {};
|
|
178 |
}
|
179 |
}),
|
180 |
|
181 |
-
Condition: Backbone.View.extend({
|
182 |
tagName: "div",
|
183 |
className: "cas-condition",
|
184 |
events: {
|
@@ -211,8 +223,7 @@ var CAE = CAE || {};
|
|
211 |
if(!$elem.length) {
|
212 |
return;
|
213 |
}
|
214 |
-
var model = this.model
|
215 |
-
var type = this.model.get("module"),
|
216 |
data = this.model.get("values");
|
217 |
|
218 |
$elem.select2({
|
@@ -220,7 +231,7 @@ var CAE = CAE || {};
|
|
220 |
cachedResults: {},
|
221 |
quietMillis: 400,
|
222 |
searchTimer: null,
|
223 |
-
type:
|
224 |
theme:'wpca',
|
225 |
placeholder:$elem.data("wpca-placeholder"),
|
226 |
minimumInputLength: 0,
|
@@ -279,14 +290,15 @@ var CAE = CAE || {};
|
|
279 |
}
|
280 |
}),
|
281 |
|
282 |
-
Group: Backbone.View.extend({
|
|
|
|
|
283 |
tagName: "li",
|
284 |
className: "cas-group-single",
|
285 |
template: _.template($('#wpca-template-group').html()),
|
286 |
events: {
|
287 |
"change .js-wpca-add-and": "addConditionModel",
|
288 |
"click .js-wpca-save-group": "saveGroup",
|
289 |
-
"change .js-wpca-group-status": "statusChanged"
|
290 |
},
|
291 |
initialize: function() {
|
292 |
this.render();
|
@@ -298,6 +310,41 @@ var CAE = CAE || {};
|
|
298 |
this.$el.append(this.template(this.model.attributes));
|
299 |
this.model.conditions.each(this.addConditionViewFade,this);
|
300 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
addConditionModel: function(e) {
|
302 |
var $select = $(e.currentTarget);
|
303 |
if(!!$select.val() && !this.model.conditions.findWhere({module:$select.val()})) {
|
@@ -358,16 +405,21 @@ var CAE = CAE || {};
|
|
358 |
data.cas_group_id = this.model.get("id");
|
359 |
}
|
360 |
|
|
|
|
|
|
|
361 |
//todo: get data from model instead
|
362 |
-
//will require backend change
|
363 |
this.$el.find("input,select").each(function(i,obj) {
|
364 |
var $obj = $(obj);
|
365 |
var key = $obj.attr("name");
|
366 |
if(key && ($obj.attr("type") != "checkbox" || $obj.is(":checked"))) {
|
367 |
var value = $obj.val();
|
368 |
if(~key.indexOf('cas_condition')) {
|
369 |
-
if(!value
|
370 |
-
|
|
|
|
|
371 |
} else if(!$.isArray(value)) {
|
372 |
//not pretty...
|
373 |
value = [value];
|
@@ -383,6 +435,26 @@ var CAE = CAE || {};
|
|
383 |
}
|
384 |
|
385 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
$.ajax({
|
387 |
url: ajaxurl,
|
388 |
data:data,
|
@@ -392,27 +464,26 @@ var CAE = CAE || {};
|
|
392 |
|
393 |
wpca_admin.alert.success(response.message);
|
394 |
|
395 |
-
//backbone.trackit
|
396 |
-
self.model.conditions.each(function(model) {
|
397 |
-
model.restartTracking();
|
398 |
-
});
|
399 |
-
|
400 |
if(response.removed) {
|
401 |
self.removeModel();
|
402 |
}
|
403 |
else if(response.new_post_id) {
|
404 |
self.model.set("id",response.new_post_id);
|
405 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
},
|
407 |
error: function(xhr, desc, e) {
|
408 |
wpca_admin.alert.failure(xhr.responseText);
|
409 |
}
|
410 |
});
|
411 |
},
|
412 |
-
statusChanged: function(e) {
|
413 |
-
var negated = $(e.currentTarget).is(":checked");
|
414 |
-
this.$el.find(".cas-group-sep:first-child").toggleClass("wpca-group-negate",negated);
|
415 |
-
},
|
416 |
slideRemove: function() {
|
417 |
console.log("group view: group model was destroyed");
|
418 |
this.$el.slideUp(400,function() {
|
@@ -422,14 +493,17 @@ var CAE = CAE || {};
|
|
422 |
}),
|
423 |
|
424 |
GroupCollection: Backbone.View.extend({
|
|
|
425 |
el: "#cas-groups",
|
|
|
426 |
events: {
|
427 |
"change .js-wpca-add-or": "addGroupModel"
|
428 |
},
|
429 |
initialize: function() {
|
430 |
-
|
431 |
this.listenTo( this.collection, 'add', this.addGroupView );
|
432 |
this.listenTo( this.collection, 'add remove', this.changeLogicText );
|
|
|
433 |
},
|
434 |
render: function() {
|
435 |
this.collection.each(this.addGroupView,this);
|
59 |
}),
|
60 |
|
61 |
Group: Backbone.Model.extend({
|
62 |
+
//backbone.trackit
|
63 |
+
unsaved: {
|
64 |
+
prompt: WPCA.unsaved,
|
65 |
+
unloadWindowPrompt: true
|
66 |
+
},
|
67 |
defaults : {
|
68 |
'id' : null,
|
69 |
+
'status' : 'publish',
|
70 |
+
'exposure' : 1,
|
71 |
'options' : {}
|
72 |
},
|
73 |
initialize: function() {
|
74 |
+
//backbone.trackit
|
75 |
+
this.startTracking();
|
76 |
+
this.on("destroy",this.stopTracking,this);
|
77 |
+
|
78 |
if(!this.conditions) {
|
79 |
this.conditions = new CAE.Models.ConditionCollection();
|
80 |
}
|
81 |
+
//todo: listen to group options
|
82 |
//todo: listen to condition meta changes
|
83 |
//this.conditions.on("unsavedChanges",this.testChange,this);
|
84 |
+
//this.on("unsavedChanges",this.testChange,this);
|
85 |
},
|
86 |
// testChange: function(hasChanges, unsavedAttrs, model) {
|
87 |
+
// console.log(hasChanges);
|
88 |
+
// console.log(unsavedAttrs);
|
89 |
// },
|
90 |
parse: function(response) {
|
91 |
if (_.has(response, "conditions")) {
|
138 |
};
|
139 |
|
140 |
/**
|
141 |
+
* Backbone.Epoxy.View.
|
142 |
*
|
143 |
* @type {Object}
|
144 |
*/
|
190 |
}
|
191 |
}),
|
192 |
|
193 |
+
Condition: Backbone.Epoxy.View.extend({
|
194 |
tagName: "div",
|
195 |
className: "cas-condition",
|
196 |
events: {
|
223 |
if(!$elem.length) {
|
224 |
return;
|
225 |
}
|
226 |
+
var model = this.model,
|
|
|
227 |
data = this.model.get("values");
|
228 |
|
229 |
$elem.select2({
|
231 |
cachedResults: {},
|
232 |
quietMillis: 400,
|
233 |
searchTimer: null,
|
234 |
+
type:this.model.get('module'),
|
235 |
theme:'wpca',
|
236 |
placeholder:$elem.data("wpca-placeholder"),
|
237 |
minimumInputLength: 0,
|
290 |
}
|
291 |
}),
|
292 |
|
293 |
+
Group: Backbone.Epoxy.View.extend({
|
294 |
+
bindings: "data-vm", //wp conflict with data-bind
|
295 |
+
model: CAE.Models.Group,
|
296 |
tagName: "li",
|
297 |
className: "cas-group-single",
|
298 |
template: _.template($('#wpca-template-group').html()),
|
299 |
events: {
|
300 |
"change .js-wpca-add-and": "addConditionModel",
|
301 |
"click .js-wpca-save-group": "saveGroup",
|
|
|
302 |
},
|
303 |
initialize: function() {
|
304 |
this.render();
|
310 |
this.$el.append(this.template(this.model.attributes));
|
311 |
this.model.conditions.each(this.addConditionViewFade,this);
|
312 |
},
|
313 |
+
computeds: {
|
314 |
+
statusNegated: {
|
315 |
+
deps: ["status"],
|
316 |
+
get: function( status ) {
|
317 |
+
return status == 'negated';
|
318 |
+
},
|
319 |
+
set: function( bool ) {
|
320 |
+
var valid = bool ? 'negated' : 'publish';
|
321 |
+
this.setBinding("status", valid);
|
322 |
+
}
|
323 |
+
},
|
324 |
+
//ensure exposure number and state
|
325 |
+
exposureSingular: {
|
326 |
+
deps: ["exposure"],
|
327 |
+
get: function(exposure) {
|
328 |
+
return exposure <= 1;
|
329 |
+
},
|
330 |
+
set: function( bool ) {
|
331 |
+
var isArchive = this.getBinding('exposureArchive'),
|
332 |
+
val = !(bool && isArchive) ? 2 : (isArchive ? 1 : 0);
|
333 |
+
this.setBinding("exposure",val);
|
334 |
+
}
|
335 |
+
},
|
336 |
+
exposureArchive: {
|
337 |
+
deps: ["exposure"],
|
338 |
+
get: function(exposure) {
|
339 |
+
return exposure >= 1;
|
340 |
+
},
|
341 |
+
set: function( bool ) {
|
342 |
+
var isSingular = this.getBinding('exposureSingular'),
|
343 |
+
val = !(bool && isSingular) ? 0 : (isSingular ? 1 : 2);
|
344 |
+
this.setBinding("exposure",val);
|
345 |
+
}
|
346 |
+
}
|
347 |
+
},
|
348 |
addConditionModel: function(e) {
|
349 |
var $select = $(e.currentTarget);
|
350 |
if(!!$select.val() && !this.model.conditions.findWhere({module:$select.val()})) {
|
405 |
data.cas_group_id = this.model.get("id");
|
406 |
}
|
407 |
|
408 |
+
data['_ca_status'] = this.model.get('status');
|
409 |
+
data['_ca_exposure'] = this.model.get('exposure');
|
410 |
+
|
411 |
//todo: get data from model instead
|
412 |
+
//will require backend change?
|
413 |
this.$el.find("input,select").each(function(i,obj) {
|
414 |
var $obj = $(obj);
|
415 |
var key = $obj.attr("name");
|
416 |
if(key && ($obj.attr("type") != "checkbox" || $obj.is(":checked"))) {
|
417 |
var value = $obj.val();
|
418 |
if(~key.indexOf('cas_condition')) {
|
419 |
+
if(!value) {
|
420 |
+
if($obj.data("wpca-default") !== '') {
|
421 |
+
value = [$obj.data("wpca-default")];
|
422 |
+
}
|
423 |
} else if(!$.isArray(value)) {
|
424 |
//not pretty...
|
425 |
value = [value];
|
435 |
}
|
436 |
|
437 |
});
|
438 |
+
|
439 |
+
// data['cas_condition2'] = {};
|
440 |
+
|
441 |
+
// this.model.conditions.each(function(model) {
|
442 |
+
// var key = model.get('module').split('-');
|
443 |
+
// key = key[0];
|
444 |
+
|
445 |
+
// var ids = _.map(model.get('values'),function(val) {
|
446 |
+
// return val.id;
|
447 |
+
// });
|
448 |
+
|
449 |
+
// if(data.cas_condition2[key]) {
|
450 |
+
// ids = ids.concat(data.cas_condition2[key]);
|
451 |
+
// }
|
452 |
+
|
453 |
+
// data.cas_condition2[key] = ids;
|
454 |
+
// });
|
455 |
+
|
456 |
+
// console.log(data);
|
457 |
+
|
458 |
$.ajax({
|
459 |
url: ajaxurl,
|
460 |
data:data,
|
464 |
|
465 |
wpca_admin.alert.success(response.message);
|
466 |
|
|
|
|
|
|
|
|
|
|
|
467 |
if(response.removed) {
|
468 |
self.removeModel();
|
469 |
}
|
470 |
else if(response.new_post_id) {
|
471 |
self.model.set("id",response.new_post_id);
|
472 |
}
|
473 |
+
|
474 |
+
if(!response.removed) {
|
475 |
+
//backbone.trackit
|
476 |
+
self.model.restartTracking();
|
477 |
+
self.model.conditions.each(function(model) {
|
478 |
+
model.restartTracking();
|
479 |
+
});
|
480 |
+
}
|
481 |
},
|
482 |
error: function(xhr, desc, e) {
|
483 |
wpca_admin.alert.failure(xhr.responseText);
|
484 |
}
|
485 |
});
|
486 |
},
|
|
|
|
|
|
|
|
|
487 |
slideRemove: function() {
|
488 |
console.log("group view: group model was destroyed");
|
489 |
this.$el.slideUp(400,function() {
|
493 |
}),
|
494 |
|
495 |
GroupCollection: Backbone.View.extend({
|
496 |
+
//bindings: "data-vm", //wp conflict with data-bind
|
497 |
el: "#cas-groups",
|
498 |
+
collection: CAE.Models.GroupCollection,
|
499 |
events: {
|
500 |
"change .js-wpca-add-or": "addGroupModel"
|
501 |
},
|
502 |
initialize: function() {
|
503 |
+
|
504 |
this.listenTo( this.collection, 'add', this.addGroupView );
|
505 |
this.listenTo( this.collection, 'add remove', this.changeLogicText );
|
506 |
+
this.render();
|
507 |
},
|
508 |
render: function() {
|
509 |
this.collection.each(this.addGroupView,this);
|
lib/wp-content-aware-engine/assets/js/condition_groups.min.js
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
*/
|
7 |
-
var CAE=CAE||{};!function(a,b){"use strict";b.settings={views:{}},b.Models={Alert:Backbone.Model.extend({defaults:{text:"",cssClass:"updated"},sync:function(){return!1},url:"",reset:function(){this.set(this.defaults)}}),Condition:Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:{module:null,label:null,values:[],options:{}},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this)},sync:function(){return!1},url:""}),Group:Backbone.Model.extend({defaults:{id:null,status:
|
4 |
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
*/
|
7 |
+
var CAE=CAE||{};!function(a,b){"use strict";b.settings={views:{}},b.Models={Alert:Backbone.Model.extend({defaults:{text:"",cssClass:"updated"},sync:function(){return!1},url:"",reset:function(){this.set(this.defaults)}}),Condition:Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:{module:null,label:null,values:[],options:{}},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this)},sync:function(){return!1},url:""}),Group:Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:{id:null,status:"publish",exposure:1,options:{}},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this),this.conditions||(this.conditions=new b.Models.ConditionCollection)},parse:function(a){if(_.has(a,"conditions")){var c=[];for(var d in a.conditions)if(a.conditions.hasOwnProperty(d)){var e=[];for(var f in a.conditions[d].data)a.conditions[d].data.hasOwnProperty(f)&&e.push({text:a.conditions[d].data[f],id:f});c.push({label:a.conditions[d].label,module:d,values:e,options:a.conditions[d].options||{}})}this.conditions=new b.Models.ConditionCollection(c),delete a.conditions}return a},sync:function(){return!1},url:""}),GroupCollection:Backbone.Collection.extend({model:function(a,c){return new b.Models.Group(a,c)},parse:function(a){return a}}),ConditionCollection:Backbone.Collection.extend({model:function(a,c){return new b.Models.Condition(a,c)}})},b.Views={Alert:Backbone.View.extend({tagName:"div",className:"wpca-alert",template:_.template('<div class="<%= cssClass %>"><%= text %></div>'),timer:4e3,success:function(a){this.model.set({text:a,cssClass:"wpca-success"})},failure:function(a){this.model.set({text:a,cssClass:"wpca-error"})},dismiss:function(){this.model.reset()},initialize:function(){this.listenTo(this.model,"change",this.render),this.$el.appendTo("body")},render:function(){if(""!==this.model.get("text")){var a=this;this.$el.hide().html(this.template(this.model.attributes)).fadeIn("slow"),setTimeout(function(){a.$el.fadeOut("slow"),a.dismiss()},this.timer)}else this.$el.fadeOut("slow")}}),Condition:Backbone.Epoxy.View.extend({tagName:"div",className:"cas-condition",events:{"click .js-wpca-condition-remove":"removeModel"},initialize:function(){this.listenTo(this.model,"destroy",this.remove);var b=a("#wpca-template-"+this.model.get("module"));b.length?(this.template=_.template(b.html()),this.render()):this.model.destroy()},render:function(){this.$el.append(this.template(this.model.attributes)),this.createSuggestInput()},removeModel:function(a){var b=this;this.$el.slideUp(300,function(){b.model.destroy()})},createSuggestInput:function(){var a=this.$el.find(".js-wpca-suggest");if(a.length){var b=this.model,d=this.model.get("values");a.select2({more:!0,cachedResults:{},quietMillis:400,searchTimer:null,type:this.model.get("module"),theme:"wpca",placeholder:a.data("wpca-placeholder"),minimumInputLength:0,closeOnSelect:!0,width:"100%",language:{noResults:function(){return WPCA.noResults},searching:function(){return WPCA.searching+"..."}},nextSearchTerm:function(a,b){return b},data:d,dataAdapter:c.wpcaDataAdapter,ajax:{}}).on("select2:selecting",function(b){a.data("forceOpen",!0)}).on("select2:close",function(b){a.data("forceOpen")&&(b.preventDefault(),a.select2("open"),a.data("forceOpen",!1))}),d.length&&a.val(_.map(d,function(a){return a.id})).trigger("change"),a.on("change",function(c){var d=a.select2("data");b.set("values",d)})}}}),Group:Backbone.Epoxy.View.extend({bindings:"data-vm",model:b.Models.Group,tagName:"li",className:"cas-group-single",template:_.template(a("#wpca-template-group").html()),events:{"change .js-wpca-add-and":"addConditionModel","click .js-wpca-save-group":"saveGroup"},initialize:function(){this.render(),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model.conditions,"remove",this.conditionRemoved),this.listenTo(this.model.conditions,"add",this.addConditionViewSlide)},render:function(){this.$el.append(this.template(this.model.attributes)),this.model.conditions.each(this.addConditionViewFade,this)},computeds:{statusNegated:{deps:["status"],get:function(a){return"negated"==a},set:function(a){var b=a?"negated":"publish";this.setBinding("status",b)}},exposureSingular:{deps:["exposure"],get:function(a){return 1>=a},set:function(a){var b=this.getBinding("exposureArchive"),c=a&&b?b?1:0:2;this.setBinding("exposure",c)}},exposureArchive:{deps:["exposure"],get:function(a){return a>=1},set:function(a){var b=this.getBinding("exposureSingular"),c=a&&b?b?1:2:0;this.setBinding("exposure",c)}}},addConditionModel:function(c){var d=a(c.currentTarget);if(d.val()&&!this.model.conditions.findWhere({module:d.val()})){var e=new b.Models.Condition({module:d.val(),label:d.children(":selected").text()});this.model.conditions.add(e)}d.val(0).blur()},addConditionView:function(a){if(b.Views[a.get("module")])var c=new(b.Views[a.get("module")])({model:a});else var c=new b.Views.Condition({model:a});return c.$el.hide().appendTo(this.$el.find(".cas-content"))},addConditionViewSlide:function(a){this.addConditionView(a).slideDown(300)},addConditionViewFade:function(a){this.addConditionView(a).fadeIn(300)},conditionRemoved:function(a){this.model.conditions.length||(this.model.get("id")?this.saveGroup():this.removeModel())},removeModel:function(){var a=this;this.$el.slideUp(400,function(){a.model.destroy()})},saveGroup:function(b){var d={action:"wpca/add-rule",token:c.nonce,current_id:c.sidebarID},e=this;this.model.get("id")&&(d.cas_group_id=this.model.get("id")),d._ca_status=this.model.get("status"),d._ca_exposure=this.model.get("exposure"),this.$el.find("input,select").each(function(b,c){var e=a(c),f=e.attr("name");if(f&&("checkbox"!=e.attr("type")||e.is(":checked"))){var g=e.val();~f.indexOf("cas_condition")&&(g?a.isArray(g)||(g=[g]):""!==e.data("wpca-default")&&(g=[e.data("wpca-default")]),d[f]&&(g=g.concat(d[f]))),g&&(d[f]=g)}}),a.ajax({url:ajaxurl,data:d,dataType:"JSON",type:"POST",success:function(a){c.alert.success(a.message),a.removed?e.removeModel():a.new_post_id&&e.model.set("id",a.new_post_id),a.removed||(e.model.restartTracking(),e.model.conditions.each(function(a){a.restartTracking()}))},error:function(a,b,d){c.alert.failure(a.responseText)}})},slideRemove:function(){this.$el.slideUp(400,function(){this.remove()})}}),GroupCollection:Backbone.View.extend({el:"#cas-groups",collection:b.Models.GroupCollection,events:{"change .js-wpca-add-or":"addGroupModel"},initialize:function(){this.listenTo(this.collection,"add",this.addGroupView),this.listenTo(this.collection,"add remove",this.changeLogicText),this.render()},render:function(){this.collection.each(this.addGroupView,this),this.changeLogicText(),a(".js-wpca-add-or").focus()},addGroupModel:function(c){var d=a(c.currentTarget);if(d.val()){var e=new b.Models.Group,f=new b.Models.Condition({module:d.val(),label:d.children(":selected").text()});this.collection.add(e),e.conditions.add(f)}d.val(0).blur()},addGroupView:function(a){var c=new b.Views.Group({model:a});c.$el.hide().appendTo(this.$el.children("ul").first()).fadeIn(300)},changeLogicText:function(){this.$el.find("> .cas-group-sep").toggle(!!this.collection.length)}})},a.fn.select2.amd.define("select2/data/wpcaAdapter",["select2/data/array","select2/utils"],function(b,d){function e(a,b){e.__super__.constructor.call(this,a,b)}return d.Extend(e,b),e.prototype.query=function(b,d){b.term=b.term||"";var e=this.options.options,f=e.cachedResults[b.term],g=b.page||1;if(f&&f.page>=g){if(!(g>1))return void d({results:f.items,pagination:{more:f.more}});g=f.page}clearTimeout(e.searchTimer),e.searchTimer=setTimeout(function(){a.ajax({url:ajaxurl,data:{search:b.term,paged:g,action:"wpca/module/"+e.type,sidebar_id:c.sidebarID,nonce:c.nonce},dataType:"JSON",type:"POST",success:function(a){var c=a,h=!0;c.length<20&&(h=!1),f?e.cachedResults[b.term]={page:g,more:h,items:e.cachedResults[b.term].items.concat(c)}:e.cachedResults[b.term]={page:g,items:c,more:h},d({results:c,pagination:{more:h}})}})},e.quietMillis)},e});var c={nonce:a("#_ca_nonce").val(),sidebarID:a("#current_sidebar").val(),alert:null,wpcaDataAdapter:a.fn.select2.amd.require("select2/data/wpcaAdapter"),init:function(){this.alert=new b.Views.Alert({model:new b.Models.Alert}),b.conditionGroups=new b.Views.GroupCollection({collection:new b.Models.GroupCollection(WPCA.groups,{parse:!0})})}};a(document).ready(function(){c.init()})}(jQuery,CAE);
|
lib/wp-content-aware-engine/bootstrap.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package WP Content Aware Engine
|
4 |
+
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
+
* @license GPLv3
|
6 |
+
*/
|
7 |
+
|
8 |
+
if (!defined('ABSPATH')) {
|
9 |
+
header('Status: 403 Forbidden');
|
10 |
+
header('HTTP/1.1 403 Forbidden');
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Version of this WPCA
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
$this_wpca_version = '3.1.1';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class to make sure the latest
|
22 |
+
* version of WPCA gets loaded
|
23 |
+
*
|
24 |
+
* @since 3.0
|
25 |
+
*/
|
26 |
+
if(!class_exists('WPCALoader')) {
|
27 |
+
class WPCALoader {
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Absolute paths and versions
|
31 |
+
* @var array
|
32 |
+
*/
|
33 |
+
private static $_paths = array();
|
34 |
+
|
35 |
+
public function __construct() {
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Add path to loader
|
40 |
+
*
|
41 |
+
* @since 3.0
|
42 |
+
* @param string $path
|
43 |
+
* @param string $version
|
44 |
+
*/
|
45 |
+
public static function add($path,$version) {
|
46 |
+
self::$_paths[$path] = $version;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Load file for newest version
|
51 |
+
* and setup engine
|
52 |
+
*
|
53 |
+
* @since 3.0
|
54 |
+
* @return void
|
55 |
+
*/
|
56 |
+
public static function load() {
|
57 |
+
|
58 |
+
//legacy version present, cannot continue
|
59 |
+
if(class_exists('WPCACore')) {
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
|
63 |
+
arsort(self::$_paths);
|
64 |
+
|
65 |
+
foreach (self::$_paths as $path => $version) {
|
66 |
+
$file = $path.'core.php';
|
67 |
+
if(file_exists($file)) {
|
68 |
+
include($file);
|
69 |
+
define('WPCA_VERSION',$version);
|
70 |
+
WPCACore::init();
|
71 |
+
do_action('wpca/loaded');
|
72 |
+
break;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get all paths added to loader
|
79 |
+
* Sorted if called after plugins_loaded
|
80 |
+
*
|
81 |
+
* @since 3.0
|
82 |
+
* @return array
|
83 |
+
*/
|
84 |
+
public static function debug() {
|
85 |
+
return self::$_paths;
|
86 |
+
}
|
87 |
+
|
88 |
+
}
|
89 |
+
add_action('plugins_loaded',array('WPCALoader','load'),-1);
|
90 |
+
}
|
91 |
+
WPCALoader::add(plugin_dir_path( __FILE__ ),$this_wpca_version);
|
92 |
+
|
93 |
+
//
|
lib/wp-content-aware-engine/core.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package WP Content Aware Engine
|
4 |
-
* @version 2.0
|
5 |
* @copyright Joachim Jensen <jv@intox.dk>
|
6 |
* @license GPLv3
|
7 |
*/
|
@@ -26,6 +25,7 @@ if(!class_exists("WPCACore")) {
|
|
26 |
|
27 |
/**
|
28 |
* Engine version
|
|
|
29 |
*/
|
30 |
const VERSION = '2.0';
|
31 |
|
@@ -45,6 +45,12 @@ if(!class_exists("WPCACore")) {
|
|
45 |
const STATUS_NEGATED = 'negated';
|
46 |
const STATUS_PUBLISHED = 'publish';
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
/**
|
50 |
* Language domain
|
@@ -95,7 +101,7 @@ if(!class_exists("WPCACore")) {
|
|
95 |
if(is_admin()) {
|
96 |
|
97 |
add_action('admin_enqueue_scripts',
|
98 |
-
array(__CLASS__,'
|
99 |
add_action('delete_post',
|
100 |
array(__CLASS__,'sync_group_deletion'));
|
101 |
add_action('trashed_post',
|
@@ -339,6 +345,9 @@ if(!class_exists("WPCACore")) {
|
|
339 |
);
|
340 |
|
341 |
$context_data['WHERE'][] = "p.post_status IN ('".implode("','", $post_status)."')";
|
|
|
|
|
|
|
342 |
|
343 |
//Syntax changed in MySQL 5.5 and MariaDB 10.0 (reports as version 5.5)
|
344 |
$wpdb->query('SET'.(version_compare($wpdb->db_version(), '5.5', '>=') ? ' SESSION' : ' OPTION').' SQL_BIG_SELECTS = 1');
|
@@ -415,13 +424,14 @@ if(!class_exists("WPCACore")) {
|
|
415 |
if($valid) {
|
416 |
|
417 |
//todo: move exposure to group, later deprecate?
|
418 |
-
$metas = array(
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
)
|
|
|
425 |
|
426 |
$joins = array();
|
427 |
$wheres = array();
|
@@ -439,14 +449,16 @@ if(!class_exists("WPCACore")) {
|
|
439 |
h.meta_value handle
|
440 |
FROM $wpdb->posts p
|
441 |
INNER JOIN $wpdb->postmeta h ON h.post_id = p.ID AND h.meta_key = '".self::PREFIX."handle'
|
442 |
-
|
443 |
WHERE
|
444 |
p.post_type = '".$post_type."' AND
|
445 |
p.post_status = 'publish' AND
|
446 |
-
p.ID IN(".implode(',',$valid).")
|
447 |
-
|
448 |
ORDER BY p.menu_order ASC, h.meta_value DESC, p.post_date DESC
|
449 |
");
|
|
|
|
|
450 |
|
451 |
//diff orderby only works in WP4.0+
|
452 |
// $new_results = new WP_Query(array(
|
@@ -476,6 +488,9 @@ if(!class_exists("WPCACore")) {
|
|
476 |
foreach($results as $result) {
|
477 |
self::$post_cache[$post_type][$result->ID] = $result;
|
478 |
}
|
|
|
|
|
|
|
479 |
}
|
480 |
return self::$post_cache[$post_type];
|
481 |
}
|
@@ -488,14 +503,18 @@ if(!class_exists("WPCACore")) {
|
|
488 |
* @param WP_Post $post
|
489 |
*/
|
490 |
public static function add_group_meta_box($post_type,$post) {
|
491 |
-
|
|
|
492 |
|
493 |
-
|
|
|
|
|
|
|
494 |
$options = apply_filters("wpca/modules/list",array());
|
495 |
|
496 |
$view = WPCAView::make("meta_box",array(
|
497 |
-
'post_type'=> $post_type,
|
498 |
-
'nonce' => wp_nonce_field(self::PREFIX
|
499 |
'options' => $options
|
500 |
));
|
501 |
|
@@ -505,13 +524,13 @@ if(!class_exists("WPCACore")) {
|
|
505 |
'cas-rules',
|
506 |
$title,
|
507 |
array($view,'render'),
|
508 |
-
$
|
509 |
-
|
510 |
-
|
511 |
);
|
512 |
|
513 |
$template = WPCAView::make("group_template",array(
|
514 |
-
'post_type'=> $post_type,
|
515 |
'options' => $options
|
516 |
));
|
517 |
|
@@ -540,6 +559,7 @@ if(!class_exists("WPCACore")) {
|
|
540 |
|
541 |
return wp_insert_post(array(
|
542 |
'post_status' => self::STATUS_PUBLISHED,
|
|
|
543 |
'post_type' => self::TYPE_CONDITION_GROUP,
|
544 |
'post_author' => $post->post_author,
|
545 |
'post_parent' => $post->ID,
|
@@ -612,7 +632,8 @@ if(!class_exists("WPCACore")) {
|
|
612 |
|
613 |
wp_update_post(array(
|
614 |
'ID' => $post_id,
|
615 |
-
'post_status' =>
|
|
|
616 |
));
|
617 |
|
618 |
do_action('wpca/modules/save-data',$post_id);
|
@@ -630,6 +651,14 @@ if(!class_exists("WPCACore")) {
|
|
630 |
|
631 |
}
|
632 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
/**
|
634 |
* Register and enqueue scripts and styles
|
635 |
* for post edit screen
|
@@ -640,75 +669,85 @@ if(!class_exists("WPCACore")) {
|
|
640 |
*/
|
641 |
public static function enqueue_scripts_styles($hook) {
|
642 |
|
643 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
foreach ($groups as $group) {
|
650 |
-
$data[] = array(
|
651 |
-
"id" => $group->ID,
|
652 |
-
"status" => $group->post_status,
|
653 |
-
"options" => get_post_custom($group->ID),
|
654 |
-
"conditions" => apply_filters("wpca/modules/group-data",array(),$group->ID)
|
655 |
-
);
|
656 |
-
}
|
657 |
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
|
|
|
|
|
|
|
|
|
|
662 |
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
false
|
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 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* @package WP Content Aware Engine
|
|
|
4 |
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
*/
|
25 |
|
26 |
/**
|
27 |
* Engine version
|
28 |
+
* TODO: remove in favor of WPCA_VERSION
|
29 |
*/
|
30 |
const VERSION = '2.0';
|
31 |
|
45 |
const STATUS_NEGATED = 'negated';
|
46 |
const STATUS_PUBLISHED = 'publish';
|
47 |
|
48 |
+
/**
|
49 |
+
* Exposures for condition groups
|
50 |
+
*/
|
51 |
+
const EXP_SINGULAR = 0;
|
52 |
+
const EXP_SINGULAR_ARCHIVE = 1;
|
53 |
+
const EXP_ARCHIVE = 2;
|
54 |
|
55 |
/**
|
56 |
* Language domain
|
101 |
if(is_admin()) {
|
102 |
|
103 |
add_action('admin_enqueue_scripts',
|
104 |
+
array(__CLASS__,'add_group_script_styles'),9);
|
105 |
add_action('delete_post',
|
106 |
array(__CLASS__,'sync_group_deletion'));
|
107 |
add_action('trashed_post',
|
345 |
);
|
346 |
|
347 |
$context_data['WHERE'][] = "p.post_status IN ('".implode("','", $post_status)."')";
|
348 |
+
|
349 |
+
//exposure
|
350 |
+
$context_data['WHERE'][] = "p.menu_order ".(is_archive() || is_home() ? '>=' : '<=')." 1";
|
351 |
|
352 |
//Syntax changed in MySQL 5.5 and MariaDB 10.0 (reports as version 5.5)
|
353 |
$wpdb->query('SET'.(version_compare($wpdb->db_version(), '5.5', '>=') ? ' SESSION' : ' OPTION').' SQL_BIG_SELECTS = 1');
|
424 |
if($valid) {
|
425 |
|
426 |
//todo: move exposure to group, later deprecate?
|
427 |
+
$metas = array();
|
428 |
+
//$metas = array(
|
429 |
+
// 'exposure' => array(
|
430 |
+
// 'key' => self::PREFIX.'exposure',
|
431 |
+
// 'value' => 1,
|
432 |
+
// 'compare' => (is_archive() || is_home() ? '>=' : '<='),
|
433 |
+
// )
|
434 |
+
// );
|
435 |
|
436 |
$joins = array();
|
437 |
$wheres = array();
|
449 |
h.meta_value handle
|
450 |
FROM $wpdb->posts p
|
451 |
INNER JOIN $wpdb->postmeta h ON h.post_id = p.ID AND h.meta_key = '".self::PREFIX."handle'
|
452 |
+
|
453 |
WHERE
|
454 |
p.post_type = '".$post_type."' AND
|
455 |
p.post_status = 'publish' AND
|
456 |
+
p.ID IN(".implode(',',$valid).")
|
457 |
+
|
458 |
ORDER BY p.menu_order ASC, h.meta_value DESC, p.post_date DESC
|
459 |
");
|
460 |
+
//".implode(' ',$joins)."
|
461 |
+
//AND ".implode(' AND ',$wheres)."
|
462 |
|
463 |
//diff orderby only works in WP4.0+
|
464 |
// $new_results = new WP_Query(array(
|
488 |
foreach($results as $result) {
|
489 |
self::$post_cache[$post_type][$result->ID] = $result;
|
490 |
}
|
491 |
+
foreach(self::$post_cache as $post_type => $cache) {
|
492 |
+
self::$post_cache[$post_type] = apply_filters("wpca/posts/{$post_type}",$cache);
|
493 |
+
}
|
494 |
}
|
495 |
return self::$post_cache[$post_type];
|
496 |
}
|
503 |
* @param WP_Post $post
|
504 |
*/
|
505 |
public static function add_group_meta_box($post_type,$post) {
|
506 |
+
self::render_group_meta_box($post,$post_type,'normal','default');
|
507 |
+
}
|
508 |
|
509 |
+
public static function render_group_meta_box($post,$screen,$context = 'normal',$priority = 'default') {
|
510 |
+
if(self::post_types()->has($post->post_type)) {
|
511 |
+
|
512 |
+
$post_type_obj = self::post_types()->get($post->post_type);
|
513 |
$options = apply_filters("wpca/modules/list",array());
|
514 |
|
515 |
$view = WPCAView::make("meta_box",array(
|
516 |
+
'post_type'=> $post->post_type,
|
517 |
+
'nonce' => wp_nonce_field(self::PREFIX.$post->ID, self::NONCE, true, false),
|
518 |
'options' => $options
|
519 |
));
|
520 |
|
524 |
'cas-rules',
|
525 |
$title,
|
526 |
array($view,'render'),
|
527 |
+
$screen,
|
528 |
+
$context,
|
529 |
+
$priority
|
530 |
);
|
531 |
|
532 |
$template = WPCAView::make("group_template",array(
|
533 |
+
'post_type'=> $post->post_type,
|
534 |
'options' => $options
|
535 |
));
|
536 |
|
559 |
|
560 |
return wp_insert_post(array(
|
561 |
'post_status' => self::STATUS_PUBLISHED,
|
562 |
+
'menu_order' => self::EXP_SINGULAR_ARCHIVE,
|
563 |
'post_type' => self::TYPE_CONDITION_GROUP,
|
564 |
'post_author' => $post->post_author,
|
565 |
'post_parent' => $post->ID,
|
632 |
|
633 |
wp_update_post(array(
|
634 |
'ID' => $post_id,
|
635 |
+
'post_status' => $_POST[self::PREFIX.'status'] == self::STATUS_NEGATED ? self::STATUS_NEGATED : self::STATUS_PUBLISHED,
|
636 |
+
'menu_order' => (int)$_POST[self::PREFIX.'exposure']
|
637 |
));
|
638 |
|
639 |
do_action('wpca/modules/save-data',$post_id);
|
651 |
|
652 |
}
|
653 |
|
654 |
+
public static function add_group_script_styles($hook) {
|
655 |
+
$current_screen = get_current_screen();
|
656 |
+
|
657 |
+
if(self::post_types()->has($current_screen->post_type) && $current_screen->base == 'post') {
|
658 |
+
self::enqueue_scripts_styles($hook);
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
/**
|
663 |
* Register and enqueue scripts and styles
|
664 |
* for post edit screen
|
669 |
*/
|
670 |
public static function enqueue_scripts_styles($hook) {
|
671 |
|
672 |
+
$groups = self::_get_condition_groups(null,false);
|
673 |
+
$data = array();
|
674 |
+
foreach ($groups as $group) {
|
675 |
+
$data[] = array(
|
676 |
+
"id" => $group->ID,
|
677 |
+
"status" => $group->post_status,
|
678 |
+
"exposure" => $group->menu_order,
|
679 |
+
"options" => get_post_custom($group->ID),
|
680 |
+
"conditions" => apply_filters("wpca/modules/group-data",array(),$group->ID)
|
681 |
+
);
|
682 |
+
}
|
683 |
|
684 |
+
//Make sure to use packaged version
|
685 |
+
if(wp_script_is("select2","registered")) {
|
686 |
+
wp_deregister_script("select2");
|
687 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
688 |
|
689 |
+
//Add to head to take priority
|
690 |
+
//if being added under other name
|
691 |
+
wp_register_script(
|
692 |
+
'select2',
|
693 |
+
plugins_url('/assets/js/select2.min.js', __FILE__),
|
694 |
+
array('jquery'),
|
695 |
+
'4.0.3',
|
696 |
+
false
|
697 |
+
);
|
698 |
|
699 |
+
wp_register_script(
|
700 |
+
'backbone.trackit',
|
701 |
+
plugins_url('/assets/js/backbone.trackit.min.js', __FILE__),
|
702 |
+
array('backbone'),
|
703 |
+
'0.1.0',
|
704 |
+
true
|
705 |
+
);
|
|
|
|
|
706 |
|
707 |
+
wp_register_script(
|
708 |
+
'backbone.epoxy',
|
709 |
+
plugins_url('/assets/js/backbone.epoxy.min.js', __FILE__),
|
710 |
+
array('backbone'),
|
711 |
+
'1.3.3',
|
712 |
+
true
|
713 |
+
);
|
714 |
|
715 |
+
wp_register_script(
|
716 |
+
self::PREFIX.'condition-groups',
|
717 |
+
plugins_url('/assets/js/condition_groups.min.js', __FILE__),
|
718 |
+
array('jquery','select2','backbone','backbone.trackit','backbone.epoxy'),
|
719 |
+
WPCA_VERSION,
|
720 |
+
true
|
721 |
+
);
|
722 |
+
|
723 |
+
wp_register_style(
|
724 |
+
self::PREFIX.'condition-groups',
|
725 |
+
plugins_url('/assets/css/condition_groups.css', __FILE__),
|
726 |
+
array(),
|
727 |
+
WPCA_VERSION
|
728 |
+
);
|
729 |
|
730 |
+
wp_enqueue_script(self::PREFIX.'condition-groups');
|
731 |
+
wp_localize_script(self::PREFIX.'condition-groups', 'WPCA', array(
|
732 |
+
'save' => __('Save',self::DOMAIN),
|
733 |
+
'cancel' => __('Cancel',self::DOMAIN),
|
734 |
+
'or' => __('Or',self::DOMAIN),
|
735 |
+
'and' => __('And',self::DOMAIN),
|
736 |
+
'remove' => __('Remove',self::DOMAIN),
|
737 |
+
'searching' => __('Searching',self::DOMAIN),
|
738 |
+
'noResults' => __('No results found.',self::DOMAIN),
|
739 |
+
'prefix' => self::PREFIX,
|
740 |
+
'targetNegate' => __('Target all but this context',self::DOMAIN),
|
741 |
+
'targetThis' => __('Target this context',self::DOMAIN),
|
742 |
+
'unsaved' => __('Conditions have unsaved changes. Do you want to continue and discard these changes?',self::DOMAIN),
|
743 |
+
'groups' => $data
|
744 |
+
));
|
745 |
+
wp_enqueue_style(self::PREFIX.'condition-groups');
|
746 |
+
|
747 |
+
//todo: manage modules per post type, only load necessary ones
|
748 |
+
foreach(self::$module_manager->get_all() as $module) {
|
749 |
+
add_action('admin_footer',
|
750 |
+
array($module,'template_condition'),1);
|
751 |
}
|
752 |
|
753 |
}
|
lib/wp-content-aware-engine/meta.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package WP Content Aware Engine
|
4 |
-
* @version 1.0
|
5 |
* @copyright Joachim Jensen <jv@intox.dk>
|
6 |
* @license GPLv3
|
7 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* @package WP Content Aware Engine
|
|
|
4 |
* @copyright Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
*/
|
lib/wp-content-aware-engine/module/author.php
CHANGED
@@ -27,7 +27,6 @@ class WPCAModule_author extends WPCAModule_Base {
|
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
parent::__construct('author',__('Authors',WPCACore::DOMAIN));
|
30 |
-
$this->type_display = true;
|
31 |
$this->placeholder = __("All Authors",WPCACore::DOMAIN);
|
32 |
$this->default_value = $this->id;
|
33 |
}
|
@@ -69,7 +68,7 @@ class WPCAModule_author extends WPCAModule_Base {
|
|
69 |
$args['number'] = 20;
|
70 |
$args['fields'] = array('ID','display_name');
|
71 |
|
72 |
-
if($args['search']) {
|
73 |
$args['search'] = '*'.$args['search'].'*';
|
74 |
//display_name does not seem to be recognized, add it anyway
|
75 |
$args['search_columns'] = array( 'user_nicename', 'user_login', 'display_name' );
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
parent::__construct('author',__('Authors',WPCACore::DOMAIN));
|
|
|
30 |
$this->placeholder = __("All Authors",WPCACore::DOMAIN);
|
31 |
$this->default_value = $this->id;
|
32 |
}
|
68 |
$args['number'] = 20;
|
69 |
$args['fields'] = array('ID','display_name');
|
70 |
|
71 |
+
if(isset($args['search']) && $args['search']) {
|
72 |
$args['search'] = '*'.$args['search'].'*';
|
73 |
//display_name does not seem to be recognized, add it anyway
|
74 |
$args['search_columns'] = array( 'user_nicename', 'user_login', 'display_name' );
|
lib/wp-content-aware-engine/module/base.php
CHANGED
@@ -48,16 +48,12 @@ abstract class WPCAModule_Base {
|
|
48 |
|
49 |
/**
|
50 |
* Default condition value
|
|
|
|
|
51 |
* @var string
|
52 |
*/
|
53 |
protected $default_value = "";
|
54 |
|
55 |
-
/**
|
56 |
-
* Enable display for all content of type
|
57 |
-
*
|
58 |
-
* @var boolean
|
59 |
-
*/
|
60 |
-
protected $type_display = false;
|
61 |
|
62 |
/**
|
63 |
* Constructor
|
@@ -83,10 +79,10 @@ abstract class WPCAModule_Base {
|
|
83 |
if(is_admin()) {
|
84 |
add_action('wpca/modules/save-data',
|
85 |
array($this,'save_data'));
|
86 |
-
add_action('admin_footer-post.php',
|
87 |
-
|
88 |
-
add_action('admin_footer-post-new.php',
|
89 |
-
|
90 |
add_action('wp_ajax_wpca/module/'.$this->id,
|
91 |
array($this,'ajax_print_content'));
|
92 |
|
48 |
|
49 |
/**
|
50 |
* Default condition value
|
51 |
+
* Use to target any condition content
|
52 |
+
*
|
53 |
* @var string
|
54 |
*/
|
55 |
protected $default_value = "";
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
/**
|
59 |
* Constructor
|
79 |
if(is_admin()) {
|
80 |
add_action('wpca/modules/save-data',
|
81 |
array($this,'save_data'));
|
82 |
+
// add_action('admin_footer-post.php',
|
83 |
+
// array($this,'template_condition'),1);
|
84 |
+
// add_action('admin_footer-post-new.php',
|
85 |
+
// array($this,'template_condition'),1);
|
86 |
add_action('wp_ajax_wpca/module/'.$this->id,
|
87 |
array($this,'ajax_print_content'));
|
88 |
|
lib/wp-content-aware-engine/module/bp_member.php
CHANGED
@@ -32,9 +32,9 @@ class WPCAModule_bp_member extends WPCAModule_Base {
|
|
32 |
* Constructor
|
33 |
*/
|
34 |
public function __construct() {
|
35 |
-
parent::__construct('bp_member',__('BuddyPress
|
36 |
-
|
37 |
-
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -60,7 +60,7 @@ class WPCAModule_bp_member extends WPCAModule_Base {
|
|
60 |
protected function _get_content($args = array()) {
|
61 |
global $bp;
|
62 |
|
63 |
-
if($args['paged'] > 1) {
|
64 |
return array();
|
65 |
}
|
66 |
|
@@ -121,7 +121,7 @@ class WPCAModule_bp_member extends WPCAModule_Base {
|
|
121 |
*/
|
122 |
public function get_context_data() {
|
123 |
global $bp;
|
124 |
-
$data = array();
|
125 |
if(isset($bp->current_component)) {
|
126 |
$data[] = $bp->current_component;
|
127 |
if(isset($bp->current_action)) {
|
@@ -156,6 +156,7 @@ class WPCAModule_bp_member extends WPCAModule_Base {
|
|
156 |
* @return boolean
|
157 |
*/
|
158 |
public function static_is_content($content) {
|
|
|
159 |
return $content && !$this->in_context();
|
160 |
}
|
161 |
|
32 |
* Constructor
|
33 |
*/
|
34 |
public function __construct() {
|
35 |
+
parent::__construct('bp_member',__('BuddyPress Profiles',WPCACore::DOMAIN));
|
36 |
+
$this->default_value = 0;
|
37 |
+
$this->placeholder = __('All Sections',WPCACore::DOMAIN);
|
38 |
}
|
39 |
|
40 |
/**
|
60 |
protected function _get_content($args = array()) {
|
61 |
global $bp;
|
62 |
|
63 |
+
if(isset($args['paged']) && $args['paged'] > 1) {
|
64 |
return array();
|
65 |
}
|
66 |
|
121 |
*/
|
122 |
public function get_context_data() {
|
123 |
global $bp;
|
124 |
+
$data = array($this->default_value);
|
125 |
if(isset($bp->current_component)) {
|
126 |
$data[] = $bp->current_component;
|
127 |
if(isset($bp->current_action)) {
|
156 |
* @return boolean
|
157 |
*/
|
158 |
public function static_is_content($content) {
|
159 |
+
//TODO: test if deprecated
|
160 |
return $content && !$this->in_context();
|
161 |
}
|
162 |
|
lib/wp-content-aware-engine/module/date.php
CHANGED
@@ -31,7 +31,6 @@ class WPCAModule_date extends WPCAModule_Base {
|
|
31 |
);
|
32 |
$this->placeholder = __("Date Archives",WPCACore::DOMAIN);
|
33 |
$this->default_value = "0000-00-00";
|
34 |
-
$this->type_display = true;
|
35 |
}
|
36 |
|
37 |
/**
|
31 |
);
|
32 |
$this->placeholder = __("Date Archives",WPCACore::DOMAIN);
|
33 |
$this->default_value = "0000-00-00";
|
|
|
34 |
}
|
35 |
|
36 |
/**
|
lib/wp-content-aware-engine/module/page_template.php
CHANGED
@@ -33,8 +33,6 @@ class WPCAModule_page_template extends WPCAModule_Base {
|
|
33 |
*/
|
34 |
public function __construct() {
|
35 |
parent::__construct('page_template',__('Page Templates',WPCACore::DOMAIN));
|
36 |
-
|
37 |
-
$this->type_display = true;
|
38 |
$this->placeholder = __("All Templates",WPCACore::DOMAIN);
|
39 |
$this->default_value = $this->id;
|
40 |
}
|
33 |
*/
|
34 |
public function __construct() {
|
35 |
parent::__construct('page_template',__('Page Templates',WPCACore::DOMAIN));
|
|
|
|
|
36 |
$this->placeholder = __("All Templates",WPCACore::DOMAIN);
|
37 |
$this->default_value = $this->id;
|
38 |
}
|
lib/wp-content-aware-engine/module/pods.php
CHANGED
@@ -27,8 +27,6 @@ class WPCAModule_pods extends WPCAModule_Base {
|
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
parent::__construct('pods',__('Pods Pages',WPCACore::DOMAIN));
|
30 |
-
|
31 |
-
$this->type_display = true;
|
32 |
$this->placeholder = __("All Pods Pages",WPCACore::DOMAIN);
|
33 |
$this->default_value = $this->id;
|
34 |
}
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
parent::__construct('pods',__('Pods Pages',WPCACore::DOMAIN));
|
|
|
|
|
30 |
$this->placeholder = __("All Pods Pages",WPCACore::DOMAIN);
|
31 |
$this->default_value = $this->id;
|
32 |
}
|
lib/wp-content-aware-engine/module/post_type.php
CHANGED
@@ -28,13 +28,18 @@ class WPCAModule_post_type extends WPCAModule_Base {
|
|
28 |
* @var array
|
29 |
*/
|
30 |
private $_post_types;
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
/**
|
33 |
* Constructor
|
34 |
*/
|
35 |
public function __construct() {
|
36 |
parent::__construct('post_type',__('Post Types',WPCACore::DOMAIN));
|
37 |
-
$this->type_display = true;
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -47,7 +52,7 @@ class WPCAModule_post_type extends WPCAModule_Base {
|
|
47 |
parent::initiate();
|
48 |
|
49 |
add_action('transition_post_status',
|
50 |
-
array(
|
51 |
|
52 |
foreach ($this->_post_types()->get_all() as $post_type) {
|
53 |
add_action('wp_ajax_wpca/module/'.$this->id.'-'.$post_type->name,array($this,'ajax_print_content'));
|
@@ -276,11 +281,11 @@ class WPCAModule_post_type extends WPCAModule_Base {
|
|
276 |
public function template_condition() {
|
277 |
if(WPCACore::post_types()->has(get_post_type())) {
|
278 |
foreach($this->_post_types()->get_all() as $post_type) {
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
echo WPCAView::make("module/condition_".$this->id."_template",array(
|
285 |
'id' => $this->id,
|
286 |
'placeholder' => $placeholder,
|
@@ -332,7 +337,7 @@ class WPCAModule_post_type extends WPCAModule_Base {
|
|
332 |
|
333 |
|
334 |
/**
|
335 |
-
*
|
336 |
*
|
337 |
* @since 1.0
|
338 |
* @param string $new_status
|
@@ -342,41 +347,64 @@ class WPCAModule_post_type extends WPCAModule_Base {
|
|
342 |
*/
|
343 |
public function post_ancestry_check($new_status, $old_status, $post) {
|
344 |
|
345 |
-
if(!WPCACore::post_types()->has($post->post_type) && $post->post_type != WPCACore::TYPE_CONDITION_GROUP) {
|
346 |
-
|
347 |
-
$status = array(
|
|
|
|
|
|
|
|
|
348 |
// Only new posts are relevant
|
349 |
-
if(!
|
350 |
-
|
351 |
$post_type = get_post_type_object($post->post_type);
|
352 |
-
if($post_type->hierarchical && $post_type->public
|
353 |
-
|
354 |
// Get sidebars with post ancestor wanting to auto-select post
|
355 |
$query = new WP_Query(array(
|
356 |
-
'post_type'
|
357 |
-
'meta_query'
|
358 |
-
|
359 |
array(
|
360 |
-
'key'
|
361 |
-
'value'
|
362 |
-
'compare'
|
363 |
),
|
364 |
array(
|
365 |
-
'key'
|
366 |
-
'value'
|
367 |
-
'type'
|
368 |
-
'compare'
|
369 |
)
|
370 |
)
|
371 |
));
|
|
|
372 |
if($query && $query->found_posts) {
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
|
|
376 |
}
|
377 |
}
|
378 |
-
}
|
379 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
381 |
|
382 |
}
|
28 |
* @var array
|
29 |
*/
|
30 |
private $_post_types;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Conditions to inherit from post ancestors
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
private $_post_ancestor_conditions;
|
37 |
|
38 |
/**
|
39 |
* Constructor
|
40 |
*/
|
41 |
public function __construct() {
|
42 |
parent::__construct('post_type',__('Post Types',WPCACore::DOMAIN));
|
|
|
43 |
}
|
44 |
|
45 |
/**
|
52 |
parent::initiate();
|
53 |
|
54 |
add_action('transition_post_status',
|
55 |
+
array($this,'post_ancestry_check'),10,3);
|
56 |
|
57 |
foreach ($this->_post_types()->get_all() as $post_type) {
|
58 |
add_action('wp_ajax_wpca/module/'.$this->id.'-'.$post_type->name,array($this,'ajax_print_content'));
|
281 |
public function template_condition() {
|
282 |
if(WPCACore::post_types()->has(get_post_type())) {
|
283 |
foreach($this->_post_types()->get_all() as $post_type) {
|
284 |
+
|
285 |
+
$placeholder = $post_type->has_archive ? "/".sprintf(__("%s Archives",WPCACore::DOMAIN),$post_type->labels->singular_name) : "";
|
286 |
+
$placeholder = $post_type->name == "post" ? "/".__("Blog Page",WPCACore::DOMAIN) : $placeholder;
|
287 |
+
$placeholder = $post_type->labels->all_items.$placeholder;
|
288 |
+
|
289 |
echo WPCAView::make("module/condition_".$this->id."_template",array(
|
290 |
'id' => $this->id,
|
291 |
'placeholder' => $placeholder,
|
337 |
|
338 |
|
339 |
/**
|
340 |
+
* Check if post ancestors have sidebar conditions
|
341 |
*
|
342 |
* @since 1.0
|
343 |
* @param string $new_status
|
347 |
*/
|
348 |
public function post_ancestry_check($new_status, $old_status, $post) {
|
349 |
|
350 |
+
if(!WPCACore::post_types()->has($post->post_type) && $post->post_type != WPCACore::TYPE_CONDITION_GROUP && $post->post_parent) {
|
351 |
+
|
352 |
+
$status = array(
|
353 |
+
'publish' => 1,
|
354 |
+
'private' => 1,
|
355 |
+
'future' => 1
|
356 |
+
);
|
357 |
// Only new posts are relevant
|
358 |
+
if(!isset($status[$old_status]) && isset($status[$new_status])) {
|
359 |
+
|
360 |
$post_type = get_post_type_object($post->post_type);
|
361 |
+
if($post_type->hierarchical && $post_type->public) {
|
362 |
+
|
363 |
// Get sidebars with post ancestor wanting to auto-select post
|
364 |
$query = new WP_Query(array(
|
365 |
+
'post_type' => WPCACore::TYPE_CONDITION_GROUP,
|
366 |
+
'meta_query' => array(
|
367 |
+
'relation' => 'AND',
|
368 |
array(
|
369 |
+
'key' => WPCACore::PREFIX . $this->id,
|
370 |
+
'value' => WPCACore::PREFIX.'sub_' . $post->post_type,
|
371 |
+
'compare' => '='
|
372 |
),
|
373 |
array(
|
374 |
+
'key' => WPCACore::PREFIX . $this->id,
|
375 |
+
'value' => get_ancestors($post->ID,$post->post_type),
|
376 |
+
'type' => 'numeric',
|
377 |
+
'compare' => 'IN'
|
378 |
)
|
379 |
)
|
380 |
));
|
381 |
+
|
382 |
if($query && $query->found_posts) {
|
383 |
+
//Add conditions after Quick Select
|
384 |
+
//otherwise they will be removed there
|
385 |
+
$this->_post_ancestor_conditions = $query->posts;
|
386 |
+
add_action('save_post_'.$post->post_type,
|
387 |
+
array($this,'post_ancestry_add'),99,2);
|
388 |
}
|
389 |
}
|
390 |
+
}
|
391 |
+
}
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Add sidebar conditions from post ancestors
|
396 |
+
*
|
397 |
+
* @since 3.1.1
|
398 |
+
* @param int $post_id
|
399 |
+
* @param WP_Post $post
|
400 |
+
* @return void
|
401 |
+
*/
|
402 |
+
public function post_ancestry_add($post_id, $post) {
|
403 |
+
if($this->_post_ancestor_conditions) {
|
404 |
+
foreach($this->_post_ancestor_conditions as $condition) {
|
405 |
+
add_post_meta($condition->ID, WPCACore::PREFIX.$this->id, $post_id);
|
406 |
+
}
|
407 |
+
}
|
408 |
}
|
409 |
|
410 |
}
|
lib/wp-content-aware-engine/module/static.php
CHANGED
@@ -34,7 +34,6 @@ class WPCAModule_static extends WPCAModule_Base {
|
|
34 |
*/
|
35 |
public function __construct() {
|
36 |
parent::__construct('static',__('Static Pages',WPCACore::DOMAIN));
|
37 |
-
$this->type_display = false;
|
38 |
}
|
39 |
|
40 |
/**
|
34 |
*/
|
35 |
public function __construct() {
|
36 |
parent::__construct('static',__('Static Pages',WPCACore::DOMAIN));
|
|
|
37 |
}
|
38 |
|
39 |
/**
|
lib/wp-content-aware-engine/module/taxonomy.php
CHANGED
@@ -47,7 +47,6 @@ class WPCAModule_taxonomy extends WPCAModule_Base {
|
|
47 |
*/
|
48 |
public function __construct() {
|
49 |
parent::__construct('taxonomy',__('Taxonomies',WPCACore::DOMAIN));
|
50 |
-
$this->type_display = true;
|
51 |
}
|
52 |
|
53 |
public function initiate() {
|
@@ -292,10 +291,8 @@ class WPCAModule_taxonomy extends WPCAModule_Base {
|
|
292 |
public function template_condition() {
|
293 |
if(WPCACore::post_types()->has(get_post_type())) {
|
294 |
foreach($this->_get_taxonomies() as $taxonomy) {
|
295 |
-
|
296 |
-
|
297 |
-
$placeholder = $taxonomy->labels->all_items.$placeholder;
|
298 |
-
}
|
299 |
echo WPCAView::make("module/condition_".$this->id."_template",array(
|
300 |
'id' => $this->id,
|
301 |
'placeholder' => $placeholder,
|
47 |
*/
|
48 |
public function __construct() {
|
49 |
parent::__construct('taxonomy',__('Taxonomies',WPCACore::DOMAIN));
|
|
|
50 |
}
|
51 |
|
52 |
public function initiate() {
|
291 |
public function template_condition() {
|
292 |
if(WPCACore::post_types()->has(get_post_type())) {
|
293 |
foreach($this->_get_taxonomies() as $taxonomy) {
|
294 |
+
$placeholder = "/".sprintf(__("%s Archives",WPCACore::DOMAIN),$taxonomy->labels->singular_name);
|
295 |
+
$placeholder = $taxonomy->labels->all_items.$placeholder;
|
|
|
|
|
296 |
echo WPCAView::make("module/condition_".$this->id."_template",array(
|
297 |
'id' => $this->id,
|
298 |
'placeholder' => $placeholder,
|
lib/wp-content-aware-engine/view/group_template.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*/
|
7 |
?>
|
8 |
<script type="text/template" id="wpca-template-group">
|
9 |
-
<div class="cas-group-sep
|
10 |
<span class="wpca-sep-or"><?php _e('Or',WPCACore::DOMAIN); ?></span>
|
11 |
<span class="wpca-sep-not"><?php _e('Not',WPCACore::DOMAIN); ?></span>
|
12 |
</div>
|
@@ -24,12 +24,26 @@
|
|
24 |
</select>
|
25 |
</div>
|
26 |
</div>
|
27 |
-
<div class="cas-group-cell cas-group-options">
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<?php do_action("wpca/group/settings",$post_type); ?>
|
34 |
<input class="js-wpca-save-group button" type="button" value="<?php _e("Save Changes",WPCACore::DOMAIN); ?>" />
|
35 |
</div>
|
6 |
*/
|
7 |
?>
|
8 |
<script type="text/template" id="wpca-template-group">
|
9 |
+
<div class="cas-group-sep" data-vm="classes:{'wpca-group-negate': statusNegated}">
|
10 |
<span class="wpca-sep-or"><?php _e('Or',WPCACore::DOMAIN); ?></span>
|
11 |
<span class="wpca-sep-not"><?php _e('Not',WPCACore::DOMAIN); ?></span>
|
12 |
</div>
|
24 |
</select>
|
25 |
</div>
|
26 |
</div>
|
|
|
27 |
|
28 |
+
<div class="cas-group-cell cas-group-options">
|
29 |
+
<div>
|
30 |
+
<label class="cae-toggle">
|
31 |
+
<input data-vm="checked:statusNegated" class="js-cas-group-option js-wpca-group-status" type="checkbox" name="<?php echo WPCACore::PREFIX; ?>status" value="negated" />
|
32 |
+
<div class="cae-toggle-bar"></div><?php _e("Negate conditions",WPCACore::DOMAIN); ?>
|
33 |
+
</label>
|
34 |
+
</div>
|
35 |
+
<div>
|
36 |
+
<label class="cae-toggle">
|
37 |
+
<input data-vm="checked:exposureSingular" class="js-cas-option-exposure" type="checkbox" value="0" />
|
38 |
+
<div class="cae-toggle-bar"></div><?php _e("Singulars",WPCACore::DOMAIN); ?>
|
39 |
+
</label>
|
40 |
+
</div>
|
41 |
+
<div>
|
42 |
+
<label class="cae-toggle">
|
43 |
+
<input data-vm="checked:exposureArchive" class="js-cas-option-exposure" type="checkbox" value="2" />
|
44 |
+
<div class="cae-toggle-bar"></div><?php _e("Archives",WPCACore::DOMAIN); ?>
|
45 |
+
</label>
|
46 |
+
</div>
|
47 |
<?php do_action("wpca/group/settings",$post_type); ?>
|
48 |
<input class="js-wpca-save-group button" type="button" value="<?php _e("Save Changes",WPCACore::DOMAIN); ?>" />
|
49 |
</div>
|
lib/wp-content-aware-engine/view/meta_box.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<div id="cas-groups">
|
11 |
<?php do_action('wpca/meta_box/before',$post_type); ?>
|
12 |
<ul></ul>
|
13 |
-
<div class="cas-group-sep"
|
14 |
<?php _e('Or',WPCACore::DOMAIN); ?>
|
15 |
</div>
|
16 |
<div class="cas-group-new">
|
10 |
<div id="cas-groups">
|
11 |
<?php do_action('wpca/meta_box/before',$post_type); ?>
|
12 |
<ul></ul>
|
13 |
+
<div class="cas-group-sep">
|
14 |
<?php _e('Or',WPCACore::DOMAIN); ?>
|
15 |
</div>
|
16 |
<div class="cas-group-new">
|
lib/wp-db-updater/wp-db-updater.php
CHANGED
@@ -20,6 +20,13 @@ if(!class_exists("WP_DB_Updater")) {
|
|
20 |
*/
|
21 |
protected $version_key;
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* Version in database
|
25 |
* @var string
|
@@ -45,9 +52,10 @@ if(!class_exists("WP_DB_Updater")) {
|
|
45 |
* @param string $version_key
|
46 |
* @param string $plugin_version
|
47 |
*/
|
48 |
-
public function __construct($version_key,$plugin_version) {
|
49 |
$this->version_key = $version_key;
|
50 |
$this->plugin_version = $plugin_version;
|
|
|
51 |
|
52 |
add_action('wp_loaded',array($this,'run'));
|
53 |
}
|
@@ -62,7 +70,7 @@ if(!class_exists("WP_DB_Updater")) {
|
|
62 |
if(current_user_can(self::CAPABILITY)) {
|
63 |
$install_success = true;
|
64 |
// Check if database is up to date
|
65 |
-
if(!$this->is_version_installed($this->plugin_version)) {
|
66 |
//Run update installations
|
67 |
foreach ($this->versions as $version => $callback) {
|
68 |
if(!$this->is_version_installed($version) && function_exists($callback)) {
|
@@ -149,6 +157,16 @@ if(!class_exists("WP_DB_Updater")) {
|
|
149 |
protected function is_version_installed($version) {
|
150 |
return version_compare($this->get_installed_version(),$version,">=");
|
151 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
153 |
}
|
154 |
|
20 |
*/
|
21 |
protected $version_key;
|
22 |
|
23 |
+
/**
|
24 |
+
* Skip update procedures for new installations
|
25 |
+
*
|
26 |
+
* @var boolean
|
27 |
+
*/
|
28 |
+
protected $skip_new;
|
29 |
+
|
30 |
/**
|
31 |
* Version in database
|
32 |
* @var string
|
52 |
* @param string $version_key
|
53 |
* @param string $plugin_version
|
54 |
*/
|
55 |
+
public function __construct($version_key,$plugin_version,$skip_new = false) {
|
56 |
$this->version_key = $version_key;
|
57 |
$this->plugin_version = $plugin_version;
|
58 |
+
$this->skip_new = $skip_new;
|
59 |
|
60 |
add_action('wp_loaded',array($this,'run'));
|
61 |
}
|
70 |
if(current_user_can(self::CAPABILITY)) {
|
71 |
$install_success = true;
|
72 |
// Check if database is up to date
|
73 |
+
if(!$this->skip_upgrade() && !$this->is_version_installed($this->plugin_version)) {
|
74 |
//Run update installations
|
75 |
foreach ($this->versions as $version => $callback) {
|
76 |
if(!$this->is_version_installed($version) && function_exists($callback)) {
|
157 |
protected function is_version_installed($version) {
|
158 |
return version_compare($this->get_installed_version(),$version,">=");
|
159 |
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Is this a new installation of the plugin
|
163 |
+
*
|
164 |
+
* @since 1.1
|
165 |
+
* @return boolean
|
166 |
+
*/
|
167 |
+
protected function skip_upgrade() {
|
168 |
+
return $this->skip_new && $this->get_installed_version() == '0';
|
169 |
+
}
|
170 |
}
|
171 |
}
|
172 |
|
readme.txt
CHANGED
@@ -3,14 +3,16 @@ Contributors: intoxstudio, devinstitute, freemius
|
|
3 |
Donate link:
|
4 |
Tags: sidebar, sidebars, custom sidebars, page sidebars, replace sidebar, create sidebars, replace widget area, bbpress, buddypress, polylang, pods, conditional
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv3
|
9 |
|
10 |
Display custom sidebars on any post, page, category etc. Supports bbPress, BuddyPress, WooCommerce, Easy Digital Downloads and more.
|
11 |
|
12 |
== Description ==
|
13 |
|
|
|
|
|
14 |
Boost on-site SEO, upsell your products or add better-converting CTAs by displaying different sidebars for different contexts. Create post sidebars, page sidebars, category sidebars and more.
|
15 |
The sidebar manager makes it incredibly easy for anyone to create custom sidebars in any theme.
|
16 |
|
@@ -18,14 +20,14 @@ Developed with scalability and performance in mind, Content Aware Sidebars is th
|
|
18 |
|
19 |
No coding required!
|
20 |
|
21 |
-
####Create unlimited sidebars
|
22 |
|
23 |
* Easy-to-use Sidebar Manager
|
24 |
* **[NEW]** Create or select sidebars directly when editing a post
|
25 |
-
*
|
26 |
* Automatic support for Custom Post Types and Taxonomies
|
27 |
-
*
|
28 |
-
*
|
29 |
* Enhanced widget manager
|
30 |
* Optional Template Tag to display custom sidebars anywhere in your theme
|
31 |
* Optional Shortcode to display custom sidebars anywhere in your content
|
@@ -48,24 +50,24 @@ No coding required!
|
|
48 |
* Front Page
|
49 |
* bbPress User Profiles
|
50 |
* BuddyPress Member Pages
|
51 |
-
* Languages (qTranslate, Polylang, Transposh, WPML)
|
52 |
* Pods Pages
|
53 |
|
54 |
-
|
55 |
|
56 |
Negate conditions, e.g. display a sidebar on all pages except Page X.
|
57 |
|
58 |
####Sidebar Integrations and Support
|
59 |
|
60 |
-
* bbPress
|
61 |
-
* BuddyPress
|
62 |
* [Easy Digital Downloads](https://dev.institute/wordpress/sidebars-pro/easy-digital-downloads/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
63 |
-
* qTranslate X
|
64 |
-
* Pods
|
65 |
-
* Polylang
|
66 |
-
* Transposh Translation Filter
|
67 |
* [WooCommerce](https://dev.institute/wordpress/sidebars-pro/woocommerce/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
68 |
-
* [WPML](https://
|
69 |
|
70 |
> ####Content Aware Sidebars Pro
|
71 |
>
|
@@ -75,17 +77,18 @@ Negate conditions, e.g. display a sidebar on all pages except Page X.
|
|
75 |
> * Widget Revisions
|
76 |
> * Display sidebars on URLs + wildcards
|
77 |
> * Display sidebars on content from any day, month, year
|
|
|
78 |
> * Sidebar Visibility for Roles and Guests
|
79 |
-
> * 1-click Sidebar
|
80 |
> * Sync Widgets on Theme Switch
|
81 |
-
> * [and more...](https://dev.institute/wordpress/sidebars-pro/
|
82 |
>
|
83 |
> Install the free version and upgrade at any time directly from the admin panel via [Freemius](http://freemius.com/)!
|
84 |
|
85 |
####More Information
|
86 |
|
|
|
87 |
* [Github](https://github.com/intoxstudio/content-aware-sidebars)
|
88 |
-
* [Facebook](https://www.facebook.com/intoxstudio)
|
89 |
* [Twitter](https://twitter.com/intoxstudio)
|
90 |
|
91 |
== Installation ==
|
@@ -95,12 +98,14 @@ Negate conditions, e.g. display a sidebar on all pages except Page X.
|
|
95 |
1. Create your first sidebar under the menu *Sidebars > Add New*
|
96 |
1. Add widgets to the sidebar like any other sidebar
|
97 |
|
|
|
|
|
98 |
* Optional: Insert Template Tag `<?php ca_display_sidebar( $args ); ?>` in your theme for manually handled sidebars
|
99 |
* Optional: Insert Shortcode `[ca-sidebar id=]` in a post or page for manually handled sidebars
|
100 |
|
101 |
== Frequently Asked Questions ==
|
102 |
|
103 |
-
[Click here to view the FAQs for Content Aware Sidebars](https://dev.institute/
|
104 |
|
105 |
== Translations ==
|
106 |
|
@@ -118,19 +123,65 @@ Do you want to contribute and see your name here?
|
|
118 |
|
119 |
== Screenshots ==
|
120 |
|
121 |
-
[Click here to view the latest screenshots and examples of Content Aware Sidebars](https://dev.institute/wordpress/sidebars-pro/?utm_source=readme&utm_medium=referral&utm_content=screenshots&utm_campaign=cas)
|
122 |
|
123 |
== Upgrade Notice ==
|
124 |
|
125 |
-
= 3.
|
126 |
|
127 |
* Content Aware Sidebars data in your database will be updated automatically. It is highly recommended to backup this data before updating the plugin.
|
128 |
-
*
|
129 |
|
130 |
== Changelog ==
|
131 |
|
132 |
[View development on GitHub](https://github.com/intoxstudio/content-aware-sidebars)
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
= 3.3.3 =
|
135 |
|
136 |
* Added: counter-measure against plugins that add buggy scripts
|
@@ -269,34 +320,4 @@ Do you want to contribute and see your name here?
|
|
269 |
* Fixed: bumped versions for integrated plugins
|
270 |
* Removed: qtranslate module
|
271 |
|
272 |
-
= 3.0.1 =
|
273 |
-
|
274 |
-
* Added: wp4.4 compatibility
|
275 |
-
|
276 |
-
= 3.0 =
|
277 |
-
|
278 |
-
* Added: plugin rewritten with wp-content-aware-engine to take care of everything related to conditional content
|
279 |
-
* Added: migrate existing sidebar data to wp-content-aware-engine standards
|
280 |
-
* Added: negation of condition groups
|
281 |
-
* Added: new api to add modules
|
282 |
-
* Added: new action and filter hooks
|
283 |
-
* Added: intro tour
|
284 |
-
* Added: ca_display_sidebar deprecates display_ca_sidebar
|
285 |
-
* Added: filter for sidebars on widgets screen
|
286 |
-
* Added: add sidebar from widgets screen
|
287 |
-
* Added: filter for available widgets on widgets screen
|
288 |
-
* Added: more simple information meta box
|
289 |
-
* Added: gui improvements in sidebar editor
|
290 |
-
* Added: bulk update messages translatable
|
291 |
-
* Added: draft post status included in post type lists
|
292 |
-
* Added: arabic, bulgarian, croatian, czech, estonian, french (canada), greek, hebrew, indonesian, japanese, persian, vietnamese translations
|
293 |
-
* Fixed: uninstall script cleans residual data better
|
294 |
-
* Fixed: posts page and front page excluded from page post type list
|
295 |
-
* Fixed: updated translations
|
296 |
-
* Fixed: finnish translation included properly
|
297 |
-
* Fixed: minimum requirement wp3.8
|
298 |
-
* Removed: all action and filter hooks (moved to wp-content-aware-engine under new names)
|
299 |
-
* Removed: deprecated icons
|
300 |
-
* Removed: screenshots
|
301 |
-
|
302 |
See changelog.txt for previous changes.
|
3 |
Donate link:
|
4 |
Tags: sidebar, sidebars, custom sidebars, page sidebars, replace sidebar, create sidebars, replace widget area, bbpress, buddypress, polylang, pods, conditional
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 4.7
|
7 |
+
Stable tag: 3.4.3
|
8 |
License: GPLv3
|
9 |
|
10 |
Display custom sidebars on any post, page, category etc. Supports bbPress, BuddyPress, WooCommerce, Easy Digital Downloads and more.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
#### The Best Sidebar Plugin for WordPress
|
15 |
+
|
16 |
Boost on-site SEO, upsell your products or add better-converting CTAs by displaying different sidebars for different contexts. Create post sidebars, page sidebars, category sidebars and more.
|
17 |
The sidebar manager makes it incredibly easy for anyone to create custom sidebars in any theme.
|
18 |
|
20 |
|
21 |
No coding required!
|
22 |
|
23 |
+
####Create unlimited sidebars and widget areas
|
24 |
|
25 |
* Easy-to-use Sidebar Manager
|
26 |
* **[NEW]** Create or select sidebars directly when editing a post
|
27 |
+
* Merge with, replace and hide sidebars in any theme
|
28 |
* Automatic support for Custom Post Types and Taxonomies
|
29 |
+
* Schedule sidebars for later activation
|
30 |
+
* **[NEW]** Schedule sidebars for later deactivation
|
31 |
* Enhanced widget manager
|
32 |
* Optional Template Tag to display custom sidebars anywhere in your theme
|
33 |
* Optional Shortcode to display custom sidebars anywhere in your content
|
50 |
* Front Page
|
51 |
* bbPress User Profiles
|
52 |
* BuddyPress Member Pages
|
53 |
+
* Languages (qTranslate X, Polylang, Transposh, WPML)
|
54 |
* Pods Pages
|
55 |
|
56 |
+
Mix conditions in any way you like, e.g. display a sidebar on posts in Category X by author Y.
|
57 |
|
58 |
Negate conditions, e.g. display a sidebar on all pages except Page X.
|
59 |
|
60 |
####Sidebar Integrations and Support
|
61 |
|
62 |
+
* [bbPress](https://dev.institute/wordpress/sidebars-pro/bbpress/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
63 |
+
* [BuddyPress](https://dev.institute/wordpress/sidebars-pro/buddypress/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
64 |
* [Easy Digital Downloads](https://dev.institute/wordpress/sidebars-pro/easy-digital-downloads/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
65 |
+
* [qTranslate X](https://dev.institute/wordpress/sidebars-pro/multilingual-plugins/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
66 |
+
* [Pods](https://dev.institute/wordpress/sidebars-pro/pods/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
67 |
+
* [Polylang](https://dev.institute/wordpress/sidebars-pro/multilingual-plugins/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
68 |
+
* [Transposh Translation Filter](https://dev.institute/wordpress/sidebars-pro/multilingual-plugins/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
69 |
* [WooCommerce](https://dev.institute/wordpress/sidebars-pro/woocommerce/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
70 |
+
* [WPML](https://dev.institute/wordpress/sidebars-pro/multilingual-plugins/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
|
71 |
|
72 |
> ####Content Aware Sidebars Pro
|
73 |
>
|
77 |
> * Widget Revisions
|
78 |
> * Display sidebars on URLs + wildcards
|
79 |
> * Display sidebars on content from any day, month, year
|
80 |
+
> * Display sidebars in select time ranges on given days
|
81 |
> * Sidebar Visibility for Roles and Guests
|
82 |
+
> * 1-click Sidebar Activation
|
83 |
> * Sync Widgets on Theme Switch
|
84 |
+
> * [and more...](https://dev.institute/wordpress/sidebars-pro/features/?utm_source=readme&utm_medium=referral&utm_content=more&utm_campaign=cas)
|
85 |
>
|
86 |
> Install the free version and upgrade at any time directly from the admin panel via [Freemius](http://freemius.com/)!
|
87 |
|
88 |
####More Information
|
89 |
|
90 |
+
* [Documentation](https://dev.institute/docs/content-aware-sidebars/?utm_source=readme&utm_medium=referral&utm_content=info&utm_campaign=cas)
|
91 |
* [Github](https://github.com/intoxstudio/content-aware-sidebars)
|
|
|
92 |
* [Twitter](https://twitter.com/intoxstudio)
|
93 |
|
94 |
== Installation ==
|
98 |
1. Create your first sidebar under the menu *Sidebars > Add New*
|
99 |
1. Add widgets to the sidebar like any other sidebar
|
100 |
|
101 |
+
[Click here to get started with Content Aware Sidebars.](https://dev.institute/docs/content-aware-sidebars/getting-started/?utm_source=readme&utm_medium=referral&utm_content=install&utm_campaign=cas)
|
102 |
+
|
103 |
* Optional: Insert Template Tag `<?php ca_display_sidebar( $args ); ?>` in your theme for manually handled sidebars
|
104 |
* Optional: Insert Shortcode `[ca-sidebar id=]` in a post or page for manually handled sidebars
|
105 |
|
106 |
== Frequently Asked Questions ==
|
107 |
|
108 |
+
[Click here to view the FAQs for Content Aware Sidebars.](https://dev.institute/docs/content-aware-sidebars/faq/?utm_source=readme&utm_medium=referral&utm_content=faq&utm_campaign=cas)
|
109 |
|
110 |
== Translations ==
|
111 |
|
123 |
|
124 |
== Screenshots ==
|
125 |
|
126 |
+
[Click here to view the latest screenshots and examples of Content Aware Sidebars.](https://dev.institute/wordpress/sidebars-pro/?utm_source=readme&utm_medium=referral&utm_content=screenshots&utm_campaign=cas)
|
127 |
|
128 |
== Upgrade Notice ==
|
129 |
|
130 |
+
= 3.4 =
|
131 |
|
132 |
* Content Aware Sidebars data in your database will be updated automatically. It is highly recommended to backup this data before updating the plugin.
|
133 |
+
* Data from version 0.8 and below will not be updated during this process.
|
134 |
|
135 |
== Changelog ==
|
136 |
|
137 |
[View development on GitHub](https://github.com/intoxstudio/content-aware-sidebars)
|
138 |
|
139 |
+
= 3.4.3 =
|
140 |
+
|
141 |
+
* Added: preparation for automatic translation packages
|
142 |
+
* Added: prevent adding duplicate sidebar titles
|
143 |
+
* Fixed: sidebar quick select would in rare cases not show sidebars
|
144 |
+
* Fixed: UI improvements
|
145 |
+
|
146 |
+
= 3.4.2 =
|
147 |
+
|
148 |
+
* Added: freemius sdk updated
|
149 |
+
* Fixed: sidebar editor now works properly in IE browser
|
150 |
+
* Fixed: UI improvements
|
151 |
+
|
152 |
+
= 3.4.1 =
|
153 |
+
|
154 |
+
* Added: ability to target all buddypress profile sections
|
155 |
+
* Added: freemius opt-in message made more clear
|
156 |
+
* Added: links to docs
|
157 |
+
* Added: wordpress 4.7 support
|
158 |
+
* Fixed: sidebar order not being saved
|
159 |
+
* Fixed: "Automatically add new children of a selected ancestor" not working for post types
|
160 |
+
* Fixed: sidebar edit links on widgets screen
|
161 |
+
|
162 |
+
**Pro Plan:**
|
163 |
+
|
164 |
+
* Fixed: buddypress groups condition not selectable on new sidebars
|
165 |
+
|
166 |
+
= 3.4 =
|
167 |
+
|
168 |
+
* Added: sidebar list and editor screens completely rewritten for performance and extensibility
|
169 |
+
* Added: ability to schedule sidebar deactivation
|
170 |
+
* Added: exposure moved to condition groups, now called singulars or archives
|
171 |
+
* Added: freemius sdk updated
|
172 |
+
* Added: data update process will no longer be triggered on new installs
|
173 |
+
* Added: sidebar status now active/inactive instead of publish/draft
|
174 |
+
* Added: always load latest version of wp-content-aware-engine
|
175 |
+
* Fixed: sidebar quick select compatibility with other sidebar managers
|
176 |
+
* Removed: deprecated function display_ca_sidebar (use ca_display_sidebar)
|
177 |
+
|
178 |
+
**Pro Plan:**
|
179 |
+
|
180 |
+
* Added: display sidebars in time ranges on given days
|
181 |
+
* Fixed: initial widget revision could in some cases be malformed
|
182 |
+
* Fixed: bug when adding url and date conditions
|
183 |
+
* Fixed: bug with license activation if user had opted out of freemius
|
184 |
+
|
185 |
= 3.3.3 =
|
186 |
|
187 |
* Added: counter-measure against plugins that add buggy scripts
|
320 |
* Fixed: bumped versions for integrated plugins
|
321 |
* Removed: qtranslate module
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
See changelog.txt for previous changes.
|
sidebar.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
-
* @copyright
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
@@ -39,13 +39,10 @@ final class CAS_Sidebar_Manager {
|
|
39 |
new CAS_Sidebar_Overview();
|
40 |
new CAS_Sidebar_Edit();
|
41 |
new CAS_Post_Type_Sidebar();
|
42 |
-
|
43 |
-
add_action('load-widgets.php',
|
44 |
-
array($this,'load_widgets_screen'));
|
45 |
}
|
46 |
|
47 |
-
add_action('
|
48 |
-
array($this,'
|
49 |
add_action('wp_head',
|
50 |
array($this,'sidebar_notify_theme_customizer'));
|
51 |
add_action('init',
|
@@ -58,54 +55,20 @@ final class CAS_Sidebar_Manager {
|
|
58 |
add_shortcode( 'ca-sidebar',
|
59 |
array($this,'sidebar_shortcode'));
|
60 |
|
61 |
-
}
|
62 |
|
63 |
-
/**
|
64 |
-
* Widgets Screen functionality
|
65 |
-
*
|
66 |
-
* @since 3.3
|
67 |
-
* @return void
|
68 |
-
*/
|
69 |
-
public function load_widgets_screen() {
|
70 |
-
add_action( 'dynamic_sidebar_before',
|
71 |
-
array($this,'render_sidebar_controls'));
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
-
*
|
|
|
|
|
76 |
*
|
77 |
-
* @since 3.
|
78 |
-
* @param string $index
|
79 |
* @return void
|
80 |
*/
|
81 |
-
public function
|
82 |
-
|
83 |
-
|
84 |
-
$sidebar = $this->sidebars[$index];
|
85 |
-
$link = admin_url('post.php?post='.$sidebar->ID);
|
86 |
-
|
87 |
-
switch($sidebar->post_status) {
|
88 |
-
case 'publish':
|
89 |
-
$status = __('Published');
|
90 |
-
break;
|
91 |
-
case 'future':
|
92 |
-
$status = __('Scheduled');
|
93 |
-
break;
|
94 |
-
default:
|
95 |
-
$status = __('Draft');
|
96 |
-
}
|
97 |
-
?>
|
98 |
-
<div class="cas-settings">
|
99 |
-
<div class="sidebar-status">
|
100 |
-
<input type="checkbox" class="sidebar-status-input sidebar-status-<?php echo $sidebar->post_status; ?>" id="cas-status-<?php echo $sidebar->ID; ?>" value="<?php echo $sidebar->ID; ?>" <?php checked($sidebar->post_status, 'publish') ?> disabled="disabled">
|
101 |
-
<label title="<?php echo $status; ?>" class="sidebar-status-label" for="cas-status-<?php echo $sidebar->ID; ?>">
|
102 |
-
</label>
|
103 |
-
</div>
|
104 |
-
|
105 |
-
<a title="<?php esc_attr_e('Edit Sidebar','content-aware-sidebars') ?>" class="dashicons dashicons-admin-generic cas-sidebar-link" href="<?php echo add_query_arg('action','edit',$link); ?>"></a><a title="<?php esc_attr_e('Revisions') ?>" class="cas-sidebar-link" href="<?php echo add_query_arg('action','cas-revisions',$link); ?>"><i class="dashicons dashicons-backup"></i> <?php _e('Revisions') ?></a>
|
106 |
-
</div>
|
107 |
-
<?php
|
108 |
-
}
|
109 |
}
|
110 |
|
111 |
/**
|
@@ -146,33 +109,22 @@ final class CAS_Sidebar_Manager {
|
|
146 |
-1 => __('Logged-in Users', 'content-aware-sidebars')
|
147 |
)
|
148 |
),'visibility')
|
149 |
-
->add(new WPCAMeta(
|
150 |
-
'exposure',
|
151 |
-
__('Exposure', 'content-aware-sidebars'),
|
152 |
-
1,
|
153 |
-
'select',
|
154 |
-
array(
|
155 |
-
__('Singular', 'content-aware-sidebars'),
|
156 |
-
__('Singular & Archive', 'content-aware-sidebars'),
|
157 |
-
__('Archive', 'content-aware-sidebars')
|
158 |
-
)
|
159 |
-
),'exposure')
|
160 |
->add(new WPCAMeta(
|
161 |
'handle',
|
162 |
-
_x('
|
163 |
0,
|
164 |
'select',
|
165 |
array(
|
166 |
0 => __('Replace', 'content-aware-sidebars'),
|
167 |
1 => __('Merge', 'content-aware-sidebars'),
|
168 |
-
2 => __('
|
169 |
3 => __('Forced replace','content-aware-sidebars')
|
170 |
),
|
171 |
__('Replace host sidebar, merge with it or add sidebar manually.', 'content-aware-sidebars')
|
172 |
),'handle')
|
173 |
->add(new WPCAMeta(
|
174 |
'host',
|
175 |
-
__('
|
176 |
'sidebar-1',
|
177 |
'select',
|
178 |
$sidebar_list
|
@@ -202,9 +154,10 @@ final class CAS_Sidebar_Manager {
|
|
202 |
if($this->metadata) {
|
203 |
// Remove ability to set self to host
|
204 |
if(get_the_ID()) {
|
205 |
-
$
|
|
|
206 |
unset($sidebar_list[CAS_App::SIDEBAR_PREFIX.get_the_ID()]);
|
207 |
-
$
|
208 |
}
|
209 |
apply_filters('cas/metadata/populate',$this->metadata);
|
210 |
}
|
@@ -247,13 +200,21 @@ final class CAS_Sidebar_Manager {
|
|
247 |
'publish_posts' => CAS_App::CAPABILITY,
|
248 |
'read_private_posts' => CAS_App::CAPABILITY
|
249 |
),
|
250 |
-
'
|
251 |
-
'
|
252 |
-
'
|
253 |
-
'
|
254 |
-
'
|
255 |
-
'
|
256 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
));
|
258 |
|
259 |
WPCACore::post_types()->add(CAS_App::TYPE_SIDEBAR);
|
@@ -268,7 +229,11 @@ final class CAS_Sidebar_Manager {
|
|
268 |
$sidebars = get_posts(array(
|
269 |
'numberposts' => -1,
|
270 |
'post_type' => CAS_App::TYPE_SIDEBAR,
|
271 |
-
'post_status' => array(
|
|
|
|
|
|
|
|
|
272 |
'orderby' => 'title',
|
273 |
'order' => 'ASC'
|
274 |
));
|
@@ -291,12 +256,16 @@ final class CAS_Sidebar_Manager {
|
|
291 |
*/
|
292 |
public function update_sidebars() {
|
293 |
|
|
|
|
|
294 |
//Now reregister sidebars with proper content
|
295 |
foreach($this->sidebars as $post) {
|
296 |
|
|
|
|
|
297 |
$sidebar_args = array(
|
298 |
'name' => $post->post_title ? $post->post_title : __('(no title)'),
|
299 |
-
'description' => $
|
300 |
'id' => CAS_App::SIDEBAR_PREFIX.$post->ID
|
301 |
);
|
302 |
|
@@ -309,14 +278,15 @@ final class CAS_Sidebar_Manager {
|
|
309 |
$sidebar_args['before_title'] = '<h4 class="widget-title">';
|
310 |
$sidebar_args['after_title'] = '</h4>';
|
311 |
|
312 |
-
if ($
|
313 |
-
$
|
|
|
314 |
$sidebar_args['description'] .= ': ' . ($host ? $host : __('Please update Host Sidebar', 'content-aware-sidebars') );
|
315 |
|
316 |
//Set style from host to fix when content aware sidebar
|
317 |
//is called directly by other sidebar managers
|
318 |
global $wp_registered_sidebars;
|
319 |
-
$host_id = $
|
320 |
if(isset($wp_registered_sidebars[$host_id])) {
|
321 |
$sidebar_args['before_widget'] = $wp_registered_sidebars[$host_id]['before_widget'];
|
322 |
$sidebar_args['after_widget'] = $wp_registered_sidebars[$host_id]['after_widget'];
|
3 |
* @package Content Aware Sidebars
|
4 |
* @author Joachim Jensen <jv@intox.dk>
|
5 |
* @license GPLv3
|
6 |
+
* @copyright 2017 by Joachim Jensen
|
7 |
*/
|
8 |
|
9 |
if (!defined('CAS_App::PLUGIN_VERSION')) {
|
39 |
new CAS_Sidebar_Overview();
|
40 |
new CAS_Sidebar_Edit();
|
41 |
new CAS_Post_Type_Sidebar();
|
|
|
|
|
|
|
42 |
}
|
43 |
|
44 |
+
add_action('wpca/loaded',
|
45 |
+
array($this,'late_init'));
|
46 |
add_action('wp_head',
|
47 |
array($this,'sidebar_notify_theme_customizer'));
|
48 |
add_action('init',
|
55 |
add_shortcode( 'ca-sidebar',
|
56 |
array($this,'sidebar_shortcode'));
|
57 |
|
|
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
/**
|
62 |
+
* Initialize after WPCA has been loaded
|
63 |
+
* Makes sure the SDK can be used in actions/filters
|
64 |
+
* forcefully called earlier
|
65 |
*
|
66 |
+
* @since 3.4
|
|
|
67 |
* @return void
|
68 |
*/
|
69 |
+
public function late_init() {
|
70 |
+
add_action('sidebars_widgets',
|
71 |
+
array($this,'replace_sidebar'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
/**
|
109 |
-1 => __('Logged-in Users', 'content-aware-sidebars')
|
110 |
)
|
111 |
),'visibility')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
->add(new WPCAMeta(
|
113 |
'handle',
|
114 |
+
_x('Action','option', 'content-aware-sidebars'),
|
115 |
0,
|
116 |
'select',
|
117 |
array(
|
118 |
0 => __('Replace', 'content-aware-sidebars'),
|
119 |
1 => __('Merge', 'content-aware-sidebars'),
|
120 |
+
2 => __('Shortcode / Template Tag', 'content-aware-sidebars'),
|
121 |
3 => __('Forced replace','content-aware-sidebars')
|
122 |
),
|
123 |
__('Replace host sidebar, merge with it or add sidebar manually.', 'content-aware-sidebars')
|
124 |
),'handle')
|
125 |
->add(new WPCAMeta(
|
126 |
'host',
|
127 |
+
__('Target Sidebar', 'content-aware-sidebars'),
|
128 |
'sidebar-1',
|
129 |
'select',
|
130 |
$sidebar_list
|
154 |
if($this->metadata) {
|
155 |
// Remove ability to set self to host
|
156 |
if(get_the_ID()) {
|
157 |
+
$host_meta = $this->metadata()->get('host');
|
158 |
+
$sidebar_list = $host_meta->get_input_list();
|
159 |
unset($sidebar_list[CAS_App::SIDEBAR_PREFIX.get_the_ID()]);
|
160 |
+
$host_meta->set_input_list($sidebar_list);
|
161 |
}
|
162 |
apply_filters('cas/metadata/populate',$this->metadata);
|
163 |
}
|
200 |
'publish_posts' => CAS_App::CAPABILITY,
|
201 |
'read_private_posts' => CAS_App::CAPABILITY
|
202 |
),
|
203 |
+
'public' => false,
|
204 |
+
'hierarchical' => false,
|
205 |
+
'exclude_from_search' => true,
|
206 |
+
'publicly_queryable' => false,
|
207 |
+
'show_ui' => false,
|
208 |
+
'show_in_menu' => false,
|
209 |
+
'show_in_nav_menus' => false,
|
210 |
+
'show_in_admin_bar' => false,
|
211 |
+
'has_archive' => false,
|
212 |
+
'rewrite' => false,
|
213 |
+
'query_var' => false,
|
214 |
+
'supports' => array('title','page-attributes'),
|
215 |
+
'menu_icon' => 'dashicons-welcome-widgets-menus',
|
216 |
+
'can_export' => false,
|
217 |
+
'delete_with_user' => false
|
218 |
));
|
219 |
|
220 |
WPCACore::post_types()->add(CAS_App::TYPE_SIDEBAR);
|
229 |
$sidebars = get_posts(array(
|
230 |
'numberposts' => -1,
|
231 |
'post_type' => CAS_App::TYPE_SIDEBAR,
|
232 |
+
'post_status' => array(
|
233 |
+
CAS_App::STATUS_ACTIVE,
|
234 |
+
CAS_App::STATUS_INACTIVE,
|
235 |
+
CAS_App::STATUS_SCHEDULED
|
236 |
+
),
|
237 |
'orderby' => 'title',
|
238 |
'order' => 'ASC'
|
239 |
));
|
256 |
*/
|
257 |
public function update_sidebars() {
|
258 |
|
259 |
+
//TODO: check if this is necessary anymore or merge to 1 method
|
260 |
+
|
261 |
//Now reregister sidebars with proper content
|
262 |
foreach($this->sidebars as $post) {
|
263 |
|
264 |
+
$handle_meta = $this->metadata()->get('handle');
|
265 |
+
|
266 |
$sidebar_args = array(
|
267 |
'name' => $post->post_title ? $post->post_title : __('(no title)'),
|
268 |
+
'description' => $handle_meta->get_list_data($post->ID,true),
|
269 |
'id' => CAS_App::SIDEBAR_PREFIX.$post->ID
|
270 |
);
|
271 |
|
278 |
$sidebar_args['before_title'] = '<h4 class="widget-title">';
|
279 |
$sidebar_args['after_title'] = '</h4>';
|
280 |
|
281 |
+
if ($handle_meta->get_data($post->ID) != 2) {
|
282 |
+
$host_meta = $this->metadata()->get('host');
|
283 |
+
$host = $host_meta->get_list_data($post->ID,false);
|
284 |
$sidebar_args['description'] .= ': ' . ($host ? $host : __('Please update Host Sidebar', 'content-aware-sidebars') );
|
285 |
|
286 |
//Set style from host to fix when content aware sidebar
|
287 |
//is called directly by other sidebar managers
|
288 |
global $wp_registered_sidebars;
|
289 |
+
$host_id = $host_meta->get_data($post->ID);
|
290 |
if(isset($wp_registered_sidebars[$host_id])) {
|
291 |
$sidebar_args['before_widget'] = $wp_registered_sidebars[$host_id]['before_widget'];
|
292 |
$sidebar_args['after_widget'] = $wp_registered_sidebars[$host_id]['after_widget'];
|