From d405c8dbb9636df85ee5228b85f0b32700d93c9e Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Fri, 23 Aug 2024 08:49:22 -0700 Subject: [PATCH 01/10] check defined of constant before setting --- CHANGES.md | 1 + git-updater.php | 2 +- src/Git_Updater/GU_Freemius.php | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ef26943f0..699f0b903 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,5 @@ #### [unreleased] +* check existence of `FS__RESOLVE_CLONE_AS` before setting #### 12.5.0 / 2024-08-16 * update `class-parser.php` diff --git a/git-updater.php b/git-updater.php index 11d13a1a4..895b32e1d 100644 --- a/git-updater.php +++ b/git-updater.php @@ -12,7 +12,7 @@ * Plugin Name: Git Updater * Plugin URI: https://git-updater.com * Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist. - * Version: 12.5.0 + * Version: 12.5.0.1 * Author: Andy Fragen * License: MIT * Domain Path: /languages diff --git a/src/Git_Updater/GU_Freemius.php b/src/Git_Updater/GU_Freemius.php index f7ce0731e..d58097d44 100644 --- a/src/Git_Updater/GU_Freemius.php +++ b/src/Git_Updater/GU_Freemius.php @@ -102,7 +102,9 @@ function gu_fs() { $this->remove_fs_plugin_updater_hooks( $gu_fs ); // Hopefully eliminate clone resolution popup as single license for unlimited sites. - define( 'FS__RESOLVE_CLONE_AS', 'long_term_duplicate' ); + if ( ! defined( 'FS__RESOLVE_CLONE_AS' ) ) { + define( 'FS__RESOLVE_CLONE_AS', 'long_term_duplicate' ); + } } /** From 0f64f73163f4f1f21e0857dd55ac331d92f00d0f Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Fri, 6 Sep 2024 09:48:41 -0700 Subject: [PATCH 02/10] Remove extra space --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index f214181bb..d1b0fb2a6 100644 --- a/readme.txt +++ b/readme.txt @@ -11,7 +11,7 @@ License: MIT ## Description -This plugin was originally designed to simply update any GitHub hosted WordPress plugin or theme. Currently, plugins or themes hosted on Bitbucket, GitLab, Gitea, or Gist are also supported via additional API plugins. Additionally, self-hosted git servers are supported. +This plugin was originally designed to simply update any GitHub hosted WordPress plugin or theme. Currently, plugins or themes hosted on Bitbucket, GitLab, Gitea, or Gist are also supported via additional API plugins. Additionally, self-hosted git servers are supported. Your plugin or theme **must** contain a header in the style.css header or in the plugin's header denoting the location on GitHub. The format is as follows. From 43c27a525c1f88eaef11aa89f641f8cc2bceb6d0 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Wed, 11 Sep 2024 10:06:09 -0700 Subject: [PATCH 03/10] update Freemius/WordPress-sdk --- composer.lock | 12 +- vendor/composer/installed.json | 14 +- vendor/composer/installed.php | 10 +- .../assets/css/admin/account.css | 2 +- .../wordpress-sdk/assets/css/admin/common.css | 2 +- .../assets/css/admin/dialog-boxes.css | 2 +- .../wordpress-sdk/includes/class-freemius.php | 508 +++--------------- .../includes/class-fs-logger.php | 17 +- .../includes/class-fs-plugin-updater.php | 57 +- .../includes/class-fs-storage.php | 1 + .../entities/class-fs-plugin-plan.php | 8 + .../includes/entities/class-fs-site.php | 5 +- .../managers/class-fs-debug-manager.php | 508 ++++++++++++++++++ vendor/freemius/wordpress-sdk/require.php | 1 + vendor/freemius/wordpress-sdk/start.php | 2 +- .../wordpress-sdk/templates/debug.php | 65 ++- 16 files changed, 744 insertions(+), 470 deletions(-) create mode 100644 vendor/freemius/wordpress-sdk/includes/managers/class-fs-debug-manager.php diff --git a/composer.lock b/composer.lock index 4679bf3df..36a8fee91 100644 --- a/composer.lock +++ b/composer.lock @@ -254,16 +254,16 @@ }, { "name": "freemius/wordpress-sdk", - "version": "2.7.4", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Freemius/wordpress-sdk.git", - "reference": "2741ba2b4f819b5018f68529036e505ef1e7c349" + "reference": "227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/2741ba2b4f819b5018f68529036e505ef1e7c349", - "reference": "2741ba2b4f819b5018f68529036e505ef1e7c349", + "url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca", + "reference": "227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca", "shasum": "" }, "require": { @@ -296,9 +296,9 @@ ], "support": { "issues": "https://github.com/Freemius/wordpress-sdk/issues", - "source": "https://github.com/Freemius/wordpress-sdk/tree/2.7.4" + "source": "https://github.com/Freemius/wordpress-sdk/tree/2.8.0" }, - "time": "2024-08-07T14:07:59+00:00" + "time": "2024-09-11T13:23:51+00:00" } ], "packages-dev": [ diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 1ae0c841a..5bda57528 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -344,17 +344,17 @@ }, { "name": "freemius/wordpress-sdk", - "version": "2.7.4", - "version_normalized": "2.7.4.0", + "version": "2.8.0", + "version_normalized": "2.8.0.0", "source": { "type": "git", "url": "https://github.com/Freemius/wordpress-sdk.git", - "reference": "2741ba2b4f819b5018f68529036e505ef1e7c349" + "reference": "227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/2741ba2b4f819b5018f68529036e505ef1e7c349", - "reference": "2741ba2b4f819b5018f68529036e505ef1e7c349", + "url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca", + "reference": "227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca", "shasum": "" }, "require": { @@ -369,7 +369,7 @@ "szepeviktor/phpstan-wordpress": "^1.3", "wp-coding-standards/wpcs": "^2.3" }, - "time": "2024-08-07T14:07:59+00:00", + "time": "2024-09-11T13:23:51+00:00", "type": "library", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -389,7 +389,7 @@ ], "support": { "issues": "https://github.com/Freemius/wordpress-sdk/issues", - "source": "https://github.com/Freemius/wordpress-sdk/tree/2.7.4" + "source": "https://github.com/Freemius/wordpress-sdk/tree/2.8.0" }, "install-path": "../freemius/wordpress-sdk" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index c45889652..d8abb370e 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'afragen/git-updater', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '29201878027bbafc282f6a025f724bee312c0a86', + 'reference' => '0f64f73163f4f1f21e0857dd55ac331d92f00d0f', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ 'afragen/git-updater' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '29201878027bbafc282f6a025f724bee312c0a86', + 'reference' => '0f64f73163f4f1f21e0857dd55ac331d92f00d0f', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -78,9 +78,9 @@ 'dev_requirement' => false, ), 'freemius/wordpress-sdk' => array( - 'pretty_version' => '2.7.4', - 'version' => '2.7.4.0', - 'reference' => '2741ba2b4f819b5018f68529036e505ef1e7c349', + 'pretty_version' => '2.8.0', + 'version' => '2.8.0.0', + 'reference' => '227cbff52aeed7fc71b0d9c8cd7c3c5a621610ca', 'type' => 'library', 'install_path' => __DIR__ . '/../freemius/wordpress-sdk', 'aliases' => array(), diff --git a/vendor/freemius/wordpress-sdk/assets/css/admin/account.css b/vendor/freemius/wordpress-sdk/assets/css/admin/account.css index c9f5abd71..6e0feb487 100755 --- a/vendor/freemius/wordpress-sdk/assets/css/admin/account.css +++ b/vendor/freemius/wordpress-sdk/assets/css/admin/account.css @@ -1 +1 @@ -label.fs-tag,span.fs-tag{background:#ffba00;border-radius:3px;color:#fff;display:inline-block;font-size:11px;line-height:11px;padding:5px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id=license_not_whitelabeled].success,.fs-notice[data-id=license_whitelabeled].success{border-left-color:#00a0d2;color:inherit}.fs-notice[data-id=license_not_whitelabeled].success label.fs-plugin-title,.fs-notice[data-id=license_whitelabeled].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{border-bottom:1px solid #f1f1f1;font-size:1.3em;line-height:1.4;margin:0 0 12px;padding:12px 15px}#fs_account h3 .dashicons{font-size:1.3em;height:26px;width:26px}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{font-size:.9em;position:absolute;right:15px;top:17px}#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:700}.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 code,.fs-key-value-table input[type=text],.fs-key-value-table var{background:none;color:#0073aa;font-size:16px}.fs-key-value-table input[type=text]{font-weight:700;width:100%}.fs-field-beta_program label{margin-left:7px}label.fs-tag{border-radius:3px;color:#fff;display:inline-block;font-size:11px;line-height:11px;padding:5px;vertical-align:baseline}label.fs-tag,label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{border:1px solid #e5e5e5;max-height:200px;overflow:auto}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none!important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{color:gray;text-align:right;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{white-space:nowrap;width:1px}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{font-weight:700;text-align:left}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:700}#fs_billing_address{width:100%}#fs_billing_address tr td{padding:5px;width:50%}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:700}#fs_billing_address input,#fs_billing_address select{display:block;margin-top:5px;width:100%}#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{background:none;border-color:transparent;border-bottom:1px dashed #ccc;color:#777;padding-left:0}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{background:none;border-color:transparent;border-bottom:1px dashed #ccc;color:#777;padding-left:0}#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%}@media screen and (max-width:639px){#fs_account .fs-header-actions{margin:0 0 12px;padding:0 15px 12px;position:static}#fs_account .fs-header-actions li{display:inline-block;float:none}#fs_account #fs_account_details,#fs_account #fs_account_details tbody,#fs_account #fs_account_details td,#fs_account #fs_account_details th,#fs_account #fs_account_details tr{display:block}#fs_account #fs_account_details tr td:first-child{text-align:left}#fs_account #fs_account_details tr td:nth-child(2){padding:0 12px}#fs_account #fs_account_details tr td:nth-child(2) code{margin:0;padding:0}#fs_account #fs_account_details tr td:nth-child(2) label{margin-left:0}#fs_account #fs_account_details tr td:nth-child(3){text-align:left}#fs_account #fs_account_details tr.fs-field-plan td:nth-child(2) .button-group{float:none;margin:12px 0}} \ No newline at end of file +label.fs-tag,span.fs-tag{background:#ffba00;border-radius:3px;color:#fff;display:inline-block;font-size:11px;line-height:11px;padding:5px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id=license_not_whitelabeled].success,.fs-notice[data-id=license_whitelabeled].success{border-left-color:#00a0d2;color:inherit}.fs-notice[data-id=license_not_whitelabeled].success label.fs-plugin-title,.fs-notice[data-id=license_whitelabeled].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{border-bottom:1px solid #f1f1f1;font-size:1.3em;line-height:1.4;margin:0 0 12px;padding:12px 15px}#fs_account h3 .dashicons{font-size:1.3em;height:26px;width:26px}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{font-size:.9em;position:absolute;right:15px;top:17px}#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:700}.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 code,.fs-key-value-table input[type=text],.fs-key-value-table var{background:none;color:#0073aa;font-size:16px}.fs-key-value-table input[type=text]{font-weight:700;width:100%}.fs-field-beta_program label{margin-left:7px}label.fs-tag{border-radius:3px;color:#fff;display:inline-block;font-size:11px;line-height:11px;padding:5px;vertical-align:baseline}label.fs-tag,label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{border:1px solid #e5e5e5;max-height:200px;overflow:auto}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none!important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{color:gray;text-align:right;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{white-space:nowrap;width:1px}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{font-weight:700;text-align:left}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:700}#fs_billing_address{width:100%}#fs_billing_address tr td{padding:5px;width:50%}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:700}#fs_billing_address input,#fs_billing_address select{display:block;margin-top:5px;width:100%}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent}#fs_billing_address input::placeholder,#fs_billing_address select::placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{background:none;border-color:transparent;border-bottom:1px dashed #ccc;color:#777;padding-left:0}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{background:none;border-color:transparent;border-bottom:1px dashed #ccc;color:#777;padding-left:0}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::placeholder,#fs_billing_address.fs-read-mode select::placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}@media screen and (max-width:639px){#fs_account .fs-header-actions{margin:0 0 12px;padding:0 15px 12px;position:static}#fs_account .fs-header-actions li{display:inline-block;float:none}#fs_account #fs_account_details,#fs_account #fs_account_details tbody,#fs_account #fs_account_details td,#fs_account #fs_account_details th,#fs_account #fs_account_details tr{display:block}#fs_account #fs_account_details tr td:first-child{text-align:left}#fs_account #fs_account_details tr td:nth-child(2){padding:0 12px}#fs_account #fs_account_details tr td:nth-child(2) code{margin:0;padding:0}#fs_account #fs_account_details tr td:nth-child(2) label{margin-left:0}#fs_account #fs_account_details tr td:nth-child(3){text-align:left}#fs_account #fs_account_details tr.fs-field-plan td:nth-child(2) .button-group{float:none;margin:12px 0}} \ No newline at end of file diff --git a/vendor/freemius/wordpress-sdk/assets/css/admin/common.css b/vendor/freemius/wordpress-sdk/assets/css/admin/common.css index fae281017..a005ed46e 100755 --- a/vendor/freemius/wordpress-sdk/assets/css/admin/common.css +++ b/vendor/freemius/wordpress-sdk/assets/css/admin/common.css @@ -1 +1 @@ -.fs-badge{background:#71ae00;border-radius:3px 0 0 3px;border-right:0;box-shadow:0 2px 1px -1px rgba(0,0,0,.3);color:#fff;font-weight:700;padding:5px 10px;position:absolute;right:0;text-transform:uppercase;top:10px}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{margin-top:10px;position:relative;text-align:center;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{background:#ececec;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);box-shadow:0 0 4px rgba(0,0,0,.1),inset 0 1px 3px 0 rgba(0,0,0,.1);color:#ccc;cursor:pointer;display:inline-block;height:18px;padding:6px 6px 5px;position:relative;text-shadow:0 1px 1px hsla(0,0%,100%,.8)}.fs-switch span{display:inline-block;text-transform:uppercase;width:35px}.fs-switch .fs-toggle{background-color:#fff;background-image:linear-gradient(180deg,#ececec,#fff);border:1px solid rgba(0,0,0,.3);border-radius:4px;box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.5);height:25px;position:absolute;top:1px;transition:.4s cubic-bezier(.54,1.6,.5,1);width:37px;z-index:999}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{border-radius:24px;padding:4px 25px;top:8px}.fs-switch.fs-round .fs-toggle{border-radius:24px;height:24px;top:0;width:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{border-radius:18px;height:18px;top:0;width:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}body.fs-loading,body.fs-loading *{cursor:wait!important}#fs_frame{font-size:0;line-height:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media(max-width:600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px!important}.fs-notice.success{color:green}.fs-notice.promotion{background-color:#f2fcff!important;border-color:#00a0d2!important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{color:#aaa;cursor:pointer;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{display:inline-block;margin-top:7px}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,.3);border-radius:0 0 3px 3px;bottom:auto;color:#fff;cursor:auto;font-size:12px;font-weight:700;left:10px;padding:2px 10px;position:absolute;right:auto;top:100%}div.fs-notice.promotion,div.fs-notice.success,div.fs-notice.updated{display:block!important}#fs_connect .fs-error .fs-api-request-error-details,#fs_connect .fs-error .fs-api-request-error-show-details-link,#fs_connect .fs-error ol,.fs-modal .notice-error .fs-api-request-error-details,.fs-modal .notice-error .fs-api-request-error-show-details-link,.fs-modal .notice-error ol,.fs-notice.error .fs-api-request-error-details,.fs-notice.error .fs-api-request-error-show-details-link,.fs-notice.error ol{text-align:left}#fs_connect .fs-error ol,.fs-modal .notice-error ol,.fs-notice.error ol{list-style-type:disc}#fs_connect .fs-error .fs-api-request-error-show-details-link,.fs-modal .notice-error .fs-api-request-error-show-details-link,.fs-notice.error .fs-api-request-error-show-details-link{box-shadow:none;color:#2271b1;text-decoration:none}#fs_connect .fs-error .fs-api-request-error-details,.fs-modal .notice-error .fs-api-request-error-details,.fs-notice.error .fs-api-request-error-details{border:1px solid #ccc;max-height:150px;overflow:auto;padding:5px}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{background:#ebfdeb;box-shadow:0 2px 2px rgba(6,113,6,.3);color:green;filter:alpha(opacity=95);left:160px;opacity:.95;padding:10px 20px;position:fixed;right:0;top:32px;z-index:9999}.fs-secure-notice:hover{filter:alpha(opacity=100);opacity:1}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width:960px){.fs-secure-notice{left:36px}}@media screen and (max-width:600px){.fs-secure-notice{display:none}}@media screen and (max-width:1250px){#fs_promo_tab{display:none}}@media screen and (max-width:782px){.fs-secure-notice{left:0;text-align:center;top:46px}}span.fs-submenu-item.fs-sub:before{content:"↳";padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:"↲"}.fs-submenu-item.pricing.upgrade-mode{color:#adff2f}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{background:url(/wp-admin/images/wpspin_light-2x.gif);background-size:contain;border:0;display:inline-block;height:20px;margin-bottom:-2px;margin-right:5px;vertical-align:sub;width:20px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{background-color:#d54e21;border:0;color:#f9f9f9;margin-top:10px;padding:10px} \ No newline at end of file +.fs-badge{background:#71ae00;border-radius:3px 0 0 3px;border-right:0;box-shadow:0 2px 1px -1px rgba(0,0,0,.3);color:#fff;font-weight:700;padding:5px 10px;position:absolute;right:0;text-transform:uppercase;top:10px}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{margin-top:10px;position:relative;text-align:center;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{background:#ececec;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);box-shadow:0 0 4px rgba(0,0,0,.1),inset 0 1px 3px 0 rgba(0,0,0,.1);color:#ccc;cursor:pointer;display:inline-block;height:18px;padding:6px 6px 5px;position:relative;text-shadow:0 1px 1px hsla(0,0%,100%,.8)}.fs-switch span{display:inline-block;text-transform:uppercase;width:35px}.fs-switch .fs-toggle{background-color:#fff;background-image:linear-gradient(180deg,#ececec,#fff);border:1px solid rgba(0,0,0,.3);border-radius:4px;box-shadow:inset 0 1px 0 0 hsla(0,0%,100%,.5);height:25px;position:absolute;top:1px;transition:.4s cubic-bezier(.54,1.6,.5,1);width:37px;z-index:999}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{border-radius:24px;padding:4px 25px;top:8px}.fs-switch.fs-round .fs-toggle{border-radius:24px;height:24px;top:0;width:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{border-radius:18px;height:18px;top:0;width:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}body.fs-loading,body.fs-loading *{cursor:wait!important}#fs_frame{font-size:0;line-height:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media(max-width:600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px!important}.fs-notice.success{color:green}.fs-notice.promotion{background-color:#f2fcff!important;border-color:#00a0d2!important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{color:#aaa;cursor:pointer;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{display:inline-block;margin-top:7px}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,.3);border-radius:0 0 3px 3px;bottom:auto;color:#fff;cursor:auto;font-size:12px;font-weight:700;left:10px;padding:2px 10px;position:absolute;right:auto;top:100%}div.fs-notice.promotion,div.fs-notice.success,div.fs-notice.updated{display:block!important}#fs_connect .fs-error .fs-api-request-error-details,#fs_connect .fs-error .fs-api-request-error-show-details-link,#fs_connect .fs-error ol,.fs-modal .notice-error .fs-api-request-error-details,.fs-modal .notice-error .fs-api-request-error-show-details-link,.fs-modal .notice-error ol,.fs-notice.error .fs-api-request-error-details,.fs-notice.error .fs-api-request-error-show-details-link,.fs-notice.error ol{text-align:left}#fs_connect .fs-error ol,.fs-modal .notice-error ol,.fs-notice.error ol{list-style-type:disc}#fs_connect .fs-error .fs-api-request-error-show-details-link,.fs-modal .notice-error .fs-api-request-error-show-details-link,.fs-notice.error .fs-api-request-error-show-details-link{box-shadow:none;color:#2271b1;text-decoration:none}#fs_connect .fs-error .fs-api-request-error-details,.fs-modal .notice-error .fs-api-request-error-details,.fs-notice.error .fs-api-request-error-details{border:1px solid #ccc;max-height:150px;overflow:auto;padding:5px}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{background:#ebfdeb;box-shadow:0 2px 2px rgba(6,113,6,.3);color:green;left:160px;opacity:.95;padding:10px 20px;position:fixed;right:0;top:32px;z-index:9989}.fs-secure-notice:hover{opacity:1}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width:960px){.fs-secure-notice{left:36px}}@media screen and (max-width:600px){.fs-secure-notice{display:none}}@media screen and (max-width:1250px){#fs_promo_tab{display:none}}@media screen and (max-width:782px){.fs-secure-notice{left:0;text-align:center;top:46px}}span.fs-submenu-item.fs-sub:before{content:"↳";padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:"↲"}.fs-submenu-item.pricing.upgrade-mode{color:#adff2f}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{background:url(/wp-admin/images/wpspin_light-2x.gif);background-size:contain;border:0;display:inline-block;height:20px;margin-bottom:-2px;margin-right:5px;vertical-align:sub;width:20px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{background-color:#d54e21;border:0;color:#f9f9f9;margin-top:10px;padding:10px} \ No newline at end of file diff --git a/vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css b/vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css index ff6dc13d6..562b7bb8a 100644 --- a/vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css +++ b/vendor/freemius/wordpress-sdk/assets/css/admin/dialog-boxes.css @@ -1 +1 @@ -.fs-modal{background:rgba(0,0,0,.6);display:none;height:100%;overflow:auto;position:fixed;top:0;width:100%;z-index:100000}@media(min-width:961px){.fs-modal{padding-left:160px}.rtl .fs-modal{padding-left:0;padding-right:160px}}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;left:50%;margin-left:-298px;padding-bottom:30px;position:absolute;top:-100%;width:596px;z-index:100001}@media(max-width:650px){.fs-modal .fs-modal-dialog{box-sizing:border-box;margin-left:-50%;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,.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{background:#fefefe;border:0;padding:20px}.fs-modal .fs-modal-header{background:#fbfbfb;border-bottom:1px solid #eee;margin-bottom:-10px;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{color:#cacaca;font-size:1.2em;font-weight:700;letter-spacing:.6px;margin:0;padding:0;text-shadow:1px 1px 1px #fff;text-transform:uppercase;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{border-radius:20px;color:#bbb;cursor:pointer;padding:3px;position:absolute;right:10px;top:12px;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{background:#aaa;color:#fff}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-size:20px;font-weight:700;margin-top:0}.fs-modal .fs-modal-footer{border-top:1px solid #eee;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:last-of-type{margin:0}.fs-modal .fs-modal-panel>.notice.inline{display:none;margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{left:20px;right:auto}.rtl .fs-modal .fs-modal-footer{text-align:left}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .internal-message,.fs-modal.fs-modal-deactivation-feedback .reason-input{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea,.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;display:none;padding:7px}@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 .internal-message,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input{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,.fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:left;line-height:30px}.rtl .fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.rtl .fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:right}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0!important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{font-size:16px;line-height:1.5em;margin-bottom:0;margin-top:10px}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:700;margin-bottom:0;padding:0 25px}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;position:relative;top:5px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-license-options-container table,.fs-license-options-container table .fs-available-license-key,.fs-license-options-container table select,.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{float:left;margin-right:5px;position:relative;top:6px}.fs-license-options-container table .fs-other-license-key-container div{display:block;height:30px;overflow:hidden;position:relative;top:2px;width:auto}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{border-collapse:collapse;width:100%}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type=radio]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{padding-left:3px;padding-right:3px;width:1%}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key,.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-multisite-options-container{border:1px solid #ccc;margin-top:20px;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:700}.fs-multisite-options-container.fs-apply-on-all-sites{border:0;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media(max-width:650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}.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-left:0;margin-right:7px}a.show-license-resend-modal{display:inline-block;margin-top:4px}.fs-modal.fs-modal-email-address-update .fs-modal-body input[type=text]{width:100%}.fs-modal.fs-modal-email-address-update p{margin-bottom:0}.fs-modal.fs-modal-email-address-update ul{margin:1em .5em}.fs-modal.fs-modal-email-address-update ul li label span{float:left;margin-top:0}.fs-modal.fs-modal-email-address-update ul li label span:last-child{display:block;float:none;margin-left:20px}.fs-ajax-loader{height:20px;margin:auto;position:relative;width:170px}.fs-ajax-loader .fs-ajax-loader-bar{animation-direction:normal;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;animation-name:bounce_ajaxLoader;background-color:#0074a3;height:20px;position:absolute;top:0;transform:.3;width:20px}.fs-ajax-loader .fs-ajax-loader-bar-1{animation-delay:.6s;-o-animation-delay:.6s;-ms-animation-delay:.6s;-webkit-animation-delay:.6s;-moz-animation-delay:.6s;left:0}.fs-ajax-loader .fs-ajax-loader-bar-2{animation-delay:.75s;-o-animation-delay:.75s;-ms-animation-delay:.75s;-webkit-animation-delay:.75s;-moz-animation-delay:.75s;left:19px}.fs-ajax-loader .fs-ajax-loader-bar-3{animation-delay:.9s;-o-animation-delay:.9s;-ms-animation-delay:.9s;-webkit-animation-delay:.9s;-moz-animation-delay:.9s;left:38px}.fs-ajax-loader .fs-ajax-loader-bar-4{animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s;left:57px}.fs-ajax-loader .fs-ajax-loader-bar-5{animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s;left:76px}.fs-ajax-loader .fs-ajax-loader-bar-6{animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s;left:95px}.fs-ajax-loader .fs-ajax-loader-bar-7{animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s;left:114px}.fs-ajax-loader .fs-ajax-loader-bar-8{animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s;left:133px}@keyframes bounce_ajaxLoader{0%{background-color:#0074a3;transform:scale(1)}to{background-color:#fff;transform:scale(.3)}}.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons,.fs-modal-auto-install #request-filesystem-credentials-form h2{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;max-width:100%;padding:10px 10px 5px;width:300px}.fs-modal-auto-install #request-filesystem-credentials-form fieldset,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form>div{display:block;margin:0 auto;max-width:100%;width:300px}.button-primary.warn{background:#f56a48;border-color:#ec6544 #d2593c #d2593c;box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{background:#e76444!important;border-color:#d85e40!important;color:#f5b3a1!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important} \ No newline at end of file +.fs-modal{background:rgba(0,0,0,.6);display:none;height:100%;overflow:auto;position:fixed;top:0;width:100%;z-index:100000}@media(min-width:961px){.fs-modal{padding-left:160px}.rtl .fs-modal{padding-left:0;padding-right:160px}}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;left:50%;margin-left:-298px;padding-bottom:30px;position:absolute;top:-100%;width:596px;z-index:100001}@media(max-width:650px){.fs-modal .fs-modal-dialog{box-sizing:border-box;margin-left:-50%;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,.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{background:#fefefe;border:0;padding:20px}.fs-modal .fs-modal-header{background:#fbfbfb;border-bottom:1px solid #eee;margin-bottom:-10px;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{color:#cacaca;font-size:1.2em;font-weight:700;letter-spacing:.6px;margin:0;padding:0;text-shadow:1px 1px 1px #fff;text-transform:uppercase;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{border-radius:20px;color:#bbb;cursor:pointer;padding:3px;position:absolute;right:10px;top:12px;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{background:#aaa;color:#fff}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-size:20px;font-weight:700;margin-top:0}.fs-modal .fs-modal-footer{border-top:1px solid #eee;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:last-of-type{margin:0}.fs-modal .fs-modal-panel>.notice.inline{display:none;margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{left:20px;right:auto}.rtl .fs-modal .fs-modal-footer{text-align:left}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .internal-message,.fs-modal.fs-modal-deactivation-feedback .reason-input{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea,.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;display:none;padding:7px}@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 .internal-message,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input{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,.fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:left;line-height:30px}.rtl .fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label,.rtl .fs-modal.fs-modal-deactivation-feedback .feedback-from-snooze-label{float:right}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0!important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{font-size:16px;line-height:1.5em;margin-bottom:0;margin-top:10px}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:700;margin-bottom:0;padding:0 25px}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;position:relative;top:5px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-license-options-container table,.fs-license-options-container table .fs-available-license-key,.fs-license-options-container table select,.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{float:left;margin-right:5px;position:relative;top:6px}.fs-license-options-container table .fs-other-license-key-container div{display:block;height:30px;overflow:hidden;position:relative;top:2px;width:auto}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{border-collapse:collapse;width:100%}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type=radio]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{padding-left:3px;padding-right:3px;width:1%}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key,.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-multisite-options-container{border:1px solid #ccc;margin-top:20px;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:700}.fs-multisite-options-container.fs-apply-on-all-sites{border:0;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media(max-width:650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}.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-left:0;margin-right:7px}a.show-license-resend-modal{display:inline-block;margin-top:4px}.fs-modal.fs-modal-email-address-update .fs-modal-body input[type=text]{width:100%}.fs-modal.fs-modal-email-address-update p{margin-bottom:0}.fs-modal.fs-modal-email-address-update ul{margin:1em .5em}.fs-modal.fs-modal-email-address-update ul li label span{float:left;margin-top:0}.fs-modal.fs-modal-email-address-update ul li label span:last-child{display:block;float:none;margin-left:20px}.fs-ajax-loader{height:20px;margin:auto;position:relative;width:170px}.fs-ajax-loader .fs-ajax-loader-bar{animation-direction:normal;animation-duration:1.5s;animation-iteration-count:infinite;animation-name:bounce_ajaxLoader;background-color:#0074a3;height:20px;position:absolute;top:0;transform:scale(.3);width:20px}.fs-ajax-loader .fs-ajax-loader-bar-1{animation-delay:.6s;left:0}.fs-ajax-loader .fs-ajax-loader-bar-2{animation-delay:.75s;left:19px}.fs-ajax-loader .fs-ajax-loader-bar-3{animation-delay:.9s;left:38px}.fs-ajax-loader .fs-ajax-loader-bar-4{animation-delay:1.05s;left:57px}.fs-ajax-loader .fs-ajax-loader-bar-5{animation-delay:1.2s;left:76px}.fs-ajax-loader .fs-ajax-loader-bar-6{animation-delay:1.35s;left:95px}.fs-ajax-loader .fs-ajax-loader-bar-7{animation-delay:1.5s;left:114px}.fs-ajax-loader .fs-ajax-loader-bar-8{animation-delay:1.65s;left:133px}@keyframes bounce_ajaxLoader{0%{background-color:#0074a3;transform:scale(1)}to{background-color:#fff;transform:scale(.3)}}.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons,.fs-modal-auto-install #request-filesystem-credentials-form h2{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;max-width:100%;padding:10px 10px 5px;width:300px}.fs-modal-auto-install #request-filesystem-credentials-form fieldset,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form>div{display:block;margin:0 auto;max-width:100%;width:300px}.button-primary.warn{background:#f56a48;border-color:#ec6544 #d2593c #d2593c;box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{background:#e76444!important;border-color:#d85e40!important;color:#f5b3a1!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important} \ No newline at end of file diff --git a/vendor/freemius/wordpress-sdk/includes/class-freemius.php b/vendor/freemius/wordpress-sdk/includes/class-freemius.php index 43abe3c9e..10741798b 100755 --- a/vendor/freemius/wordpress-sdk/includes/class-freemius.php +++ b/vendor/freemius/wordpress-sdk/includes/class-freemius.php @@ -1257,7 +1257,7 @@ private static function migrate_accounts_to_network() { * * @return bool */ - private static function set_network_upgrade_mode( FS_Storage $storage ) { + public static function set_network_upgrade_mode( FS_Storage $storage ) { return $storage->is_network_activation = true; } @@ -1583,6 +1583,8 @@ private function register_constructor_hooks() { ) { add_action( 'admin_init', array( &$this, 'connect_again' ) ); } + + FS_DebugManager::register_hooks(); } /** @@ -2701,7 +2703,7 @@ static function is_deactivation_snoozed() { * @author Vova Feldman (@svovaf) * @since 2.4.3 */ - private static function reset_deactivation_snoozing( $period = 0 ) { + public static function reset_deactivation_snoozing( $period = 0 ) { $value = ( 0 === $period ) ? null : 'true'; if ( ! is_multisite() || fs_is_network_admin() ) { @@ -3418,20 +3420,7 @@ private static function _load_required_static() { self::$_global_admin_notices = FS_Admin_Notices::instance( 'global' ); - if ( ! WP_FS__DEMO_MODE ) { - add_action( ( fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu', array( - 'Freemius', - '_add_debug_section' - ) ); - } - - add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) ); - - self::add_ajax_action_static( 'get_debug_log', array( 'Freemius', '_get_debug_log' ) ); - - self::add_ajax_action_static( 'get_db_option', array( 'Freemius', '_get_db_option' ) ); - - self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) ); + FS_DebugManager::load_required_static(); if ( 0 == did_action( 'plugins_loaded' ) ) { add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 ); @@ -3458,6 +3447,14 @@ private static function _load_required_static() { self::$_statics_loaded = true; } + public static function get_static_logger() { + return self::$_static_logger; + } + + public static function get_accounts() { + return self::$_accounts; + } + #-------------------------------------------------------------------------------- #region Clone #-------------------------------------------------------------------------------- @@ -3626,7 +3623,7 @@ function _handle_long_term_duplicate() { * * @since 2.1.3 */ - private static function migrate_options_to_network() { + public static function migrate_options_to_network() { self::migrate_accounts_to_network(); // Migrate API options from site level to network level. @@ -3666,325 +3663,6 @@ static function _load_textdomain() { #endregion - #---------------------------------------------------------------------------------- - #region Debugging - #---------------------------------------------------------------------------------- - - /** - * @author Vova Feldman (@svovaf) - * @since 1.0.8 - */ - static function _add_debug_section() { - if ( ! is_super_admin() ) { - // Add debug page only for super-admins. - return; - } - - self::$_static_logger->entrance(); - - $title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION ); - - if ( WP_FS__DEV_MODE ) { - // Add top-level debug menu item. - $hook = FS_Admin_Menu_Manager::add_page( - $title, - $title, - 'manage_options', - 'freemius', - array( 'Freemius', '_debug_page_render' ) - ); - } else { - // Add hidden debug page. - $hook = FS_Admin_Menu_Manager::add_subpage( - '', - $title, - $title, - 'manage_options', - 'freemius', - array( 'Freemius', '_debug_page_render' ) - ); - } - - if ( ! empty( $hook ) ) { - add_action( "load-$hook", array( 'Freemius', '_debug_page_actions' ) ); - } - } - - /** - * @author Vova Feldman (@svovaf) - * @since 1.1.7.3 - */ - static function _toggle_debug_mode() { - check_admin_referer( 'fs_toggle_debug_mode' ); - - if ( ! is_super_admin() ) { - return; - } - - $is_on = fs_request_get( 'is_on', false, 'post' ); - - if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) { - update_option( 'fs_debug_mode', $is_on ); - - // Turn on/off storage logging. - FS_Logger::_set_storage_logging( ( 1 == $is_on ) ); - } - - exit; - } - - /** - * @author Vova Feldman (@svovaf) - * @since 1.2.1.6 - */ - static function _get_debug_log() { - check_admin_referer( 'fs_get_debug_log' ); - - if ( ! is_super_admin() ) { - return; - } - - $limit = min( ! empty( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 200, 200 ); - $offset = min( ! empty( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 200, 200 ); - - $logs = FS_Logger::load_db_logs( - fs_request_get( 'filters', false, 'post' ), - $limit, - $offset - ); - - self::shoot_ajax_success( $logs ); - } - - /** - * @author Vova Feldman (@svovaf) - * @since 1.2.1.7 - */ - static function _get_db_option() { - check_admin_referer( 'fs_get_db_option' ); - - $option_name = fs_request_get( 'option_name' ); - - if ( ! is_super_admin() || - ! fs_starts_with( $option_name, 'fs_' ) - ) { - self::shoot_ajax_failure(); - } - - $value = get_option( $option_name ); - - $result = array( - 'name' => $option_name, - ); - - if ( false !== $value ) { - if ( ! is_string( $value ) ) { - $value = json_encode( $value ); - } - - $result['value'] = $value; - } - - self::shoot_ajax_success( $result ); - } - - /** - * @author Vova Feldman (@svovaf) - * @since 1.2.1.7 - */ - static function _set_db_option() { - check_admin_referer( 'fs_set_db_option' ); - - $option_name = fs_request_get( 'option_name' ); - - if ( ! is_super_admin() || - ! fs_starts_with( $option_name, 'fs_' ) - ) { - self::shoot_ajax_failure(); - } - - $option_value = fs_request_get_raw( 'option_value' ); - - if ( ! empty( $option_value ) ) { - update_option( $option_name, $option_value ); - } - - self::shoot_ajax_success(); - } - - /** - * @author Vova Feldman (@svovaf) - * @since 1.0.8 - */ - static function _debug_page_actions() { - self::_clean_admin_content_section(); - - if ( fs_request_is_action( 'restart_freemius' ) ) { - check_admin_referer( 'restart_freemius' ); - - if ( ! is_multisite() ) { - // Clear accounts data. - self::$_accounts->clear( null, true ); - } else { - $sites = self::get_sites(); - foreach ( $sites as $site ) { - $blog_id = self::get_site_blog_id( $site ); - self::$_accounts->clear( $blog_id, true ); - } - - // Clear network level storage. - self::$_accounts->clear( true, true ); - } - - // Clear SDK reference cache. - delete_option( 'fs_active_plugins' ); - } else if ( fs_request_is_action( 'clear_updates_data' ) ) { - check_admin_referer( 'clear_updates_data' ); - - if ( ! is_multisite() ) { - set_site_transient( 'update_plugins', null ); - set_site_transient( 'update_themes', null ); - } else { - $current_blog_id = get_current_blog_id(); - - $sites = self::get_sites(); - foreach ( $sites as $site ) { - switch_to_blog( self::get_site_blog_id( $site ) ); - - set_site_transient( 'update_plugins', null ); - set_site_transient( 'update_themes', null ); - } - - switch_to_blog( $current_blog_id ); - } - } else if ( fs_request_is_action( 'reset_deactivation_snoozing' ) ) { - check_admin_referer( 'reset_deactivation_snoozing' ); - - self::reset_deactivation_snoozing(); - } else if ( fs_request_is_action( 'simulate_trial' ) ) { - check_admin_referer( 'simulate_trial' ); - - $fs = freemius( fs_request_get( 'module_id' ) ); - - // Update SDK install to at least 24 hours before. - $fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC ); - // Unset the trial shown timestamp. - unset( $fs->_storage->trial_promotion_shown ); - } else if ( fs_request_is_action( 'simulate_network_upgrade' ) ) { - check_admin_referer( 'simulate_network_upgrade' ); - - $fs = freemius( fs_request_get( 'module_id' ) ); - - self::set_network_upgrade_mode( $fs->_storage ); - } else if ( fs_request_is_action( 'delete_install' ) ) { - check_admin_referer( 'delete_install' ); - - self::_delete_site_by_slug( - fs_request_get( 'slug' ), - fs_request_get( 'module_type' ), - true, - fs_request_get( 'blog_id', null ) - ); - } else if ( fs_request_is_action( 'delete_user' ) ) { - check_admin_referer( 'delete_user' ); - - self::delete_user( fs_request_get( 'user_id' ) ); - } else if ( fs_request_is_action( 'download_logs' ) ) { - check_admin_referer( 'download_logs' ); - - $download_url = FS_Logger::download_db_logs( - fs_request_get( 'filters', false, 'post' ) - ); - - if ( false === $download_url ) { - wp_die( 'Oops... there was an error while generating the logs download file. Please try again and if it doesn\'t work contact support@freemius.com.' ); - } - - fs_redirect( $download_url ); - } else if ( fs_request_is_action( 'migrate_options_to_network' ) ) { - check_admin_referer( 'migrate_options_to_network' ); - - self::migrate_options_to_network(); - } - } - - /** - * @author Leo Fajardo (@leorw) - * @since 2.5.0 - * - * @return array - */ - static function get_all_modules_sites() { - self::$_static_logger->entrance(); - - $sites_by_type = array( - WP_FS__MODULE_TYPE_PLUGIN => array(), - WP_FS__MODULE_TYPE_THEME => array(), - ); - - $module_types = array_keys( $sites_by_type ); - - if ( ! is_multisite() ) { - foreach ( $module_types as $type ) { - $sites_by_type[ $type ] = self::get_all_sites( $type ); - - foreach ( $sites_by_type[ $type ] as $slug => $install ) { - $sites_by_type[ $type ][ $slug ] = array( $install ); - } - } - } else { - $sites = self::get_sites(); - - foreach ( $sites as $site ) { - $blog_id = self::get_site_blog_id( $site ); - - foreach ( $module_types as $type ) { - $installs = self::get_all_sites( $type, $blog_id ); - - foreach ( $installs as $slug => $install ) { - if ( ! isset( $sites_by_type[ $type ][ $slug ] ) ) { - $sites_by_type[ $type ][ $slug ] = array(); - } - - $install->blog_id = $blog_id; - - $sites_by_type[ $type ][ $slug ][] = $install; - } - - } - } - } - - return $sites_by_type; - } - - /** - * @author Vova Feldman (@svovaf) - * @since 1.0.8 - */ - static function _debug_page_render() { - self::$_static_logger->entrance(); - - $all_modules_sites = self::get_all_modules_sites(); - - $licenses_by_module_type = self::get_all_licenses_by_module_type(); - - $vars = array( - 'plugin_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_PLUGIN ], - 'theme_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_THEME ], - 'users' => self::get_all_users(), - 'addons' => self::get_all_addons(), - 'account_addons' => self::get_all_account_addons(), - 'plugin_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_PLUGIN ], - 'theme_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_THEME ] - ); - - fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' ); - fs_require_once_template( 'debug.php', $vars ); - } - - #endregion - #---------------------------------------------------------------------------------- #region Connectivity Issues #---------------------------------------------------------------------------------- @@ -7482,31 +7160,6 @@ static function _delete_site_by_slug( $slug, $module_type, $store = true, $blog_ return $install_id; } - /** - * Delete user. - * - * @author Vova Feldman (@svovaf) - * @since 2.0.0 - * - * @param number $user_id - * @param bool $store - * - * @return false|int The user ID if deleted. Otherwise, FALSE (when install not exist). - */ - private static function delete_user( $user_id, $store = true ) { - $users = self::get_all_users(); - - if ( ! is_array( $users ) || ! isset( $users[ $user_id ] ) ) { - return false; - } - - unset( $users[ $user_id ] ); - - self::$_accounts->set_option( 'users', $users, $store ); - - return $user_id; - } - /** * Delete plugin's plans information. * @@ -10642,7 +10295,7 @@ static function get_all_users() { * * @return array[string]FS_Site */ - private static function get_all_sites( + public static function get_all_sites( $module_type = WP_FS__MODULE_TYPE_PLUGIN, $blog_id = null, $is_backup = false @@ -10671,7 +10324,7 @@ private static function get_all_sites( * * @return mixed */ - private static function get_account_option( $option_name, $module_type = null, $network_level_or_blog_id = null ) { + public static function get_account_option( $option_name, $module_type = null, $network_level_or_blog_id = null ) { if ( ! is_null( $module_type ) && WP_FS__MODULE_TYPE_PLUGIN !== $module_type ) { $option_name = $module_type . '_' . $option_name; } @@ -10802,36 +10455,6 @@ private static function get_all_licenses( $module_id = null ) { return $licenses; } - /** - * @author Leo Fajardo (@leorw) - * @since 2.0.0 - * - * @return array - */ - private static function get_all_licenses_by_module_type() { - $licenses = self::get_account_option( 'all_licenses' ); - - $licenses_by_module_type = array( - WP_FS__MODULE_TYPE_PLUGIN => array(), - WP_FS__MODULE_TYPE_THEME => array() - ); - - if ( ! is_array( $licenses ) ) { - return $licenses_by_module_type; - } - - foreach ( $licenses as $module_id => $module_licenses ) { - $fs = self::get_instance_by_id( $module_id ); - if ( false === $fs ) { - continue; - } - - $licenses_by_module_type[ $fs->_module_type ] = array_merge( $licenses_by_module_type[ $fs->_module_type ], $module_licenses ); - } - - return $licenses_by_module_type; - } - /** * @author Leo Fajardo (@leorw) * @since 2.0.0 @@ -10974,7 +10597,7 @@ private static function get_all_updates() { * * @return array|false */ - private static function get_all_addons() { + public static function get_all_addons() { $addons = self::maybe_get_entities_account_option( 'addons', array() ); if ( ! is_array( $addons ) ) { @@ -10990,7 +10613,7 @@ private static function get_all_addons() { * * @return number[]|false */ - private static function get_all_account_addons() { + public static function get_all_account_addons() { $addons = self::$_accounts->get_option( 'account_addons', array() ); if ( ! is_array( $addons ) ) { @@ -11107,6 +10730,16 @@ function get_site() { return $this->_site; } + /** + * @author Daniele Alessandra (@danielealessandra) + * @return FS_Storage + * @since 2.6.2 + * + */ + public function get_storage() { + return $this->_storage; + } + /** * @author Leo Fajardo (@leorw) * @since 2.5.0 @@ -15041,6 +14674,20 @@ function pricing_url( $billing_cycle = WP_FS__PERIOD_ANNUALLY, $is_trial = false $this->_parent->addon_url( $this->_slug ) : $this->_get_admin_page_url( 'pricing', $params ); + return $this->get_pricing_url_with_filter( $url ); + } + + /** + * Retrieves the filtered pricing URL. + * + * @author Leo Fajardo (@leorw) + * @since 2.7.4 + * + * @param string $url + * + * @return string + */ + private function get_pricing_url_with_filter( $url ) { return $this->apply_filters( 'pricing_url', $url ); } @@ -19167,18 +18814,34 @@ private function add_submenu_items() { } } - // Add upgrade/pricing page. - $this->add_submenu_item( - $pricing_cta_text . '  ' . ( is_rtl() ? $this->get_text_x_inline( '←', 'ASCII arrow left icon', 'symbol_arrow-left' ) : $this->get_text_x_inline( '➤', 'ASCII arrow right icon', 'symbol_arrow-right' ) ), - array( &$this, '_pricing_page_render' ), - $this->get_plugin_name() . ' – ' . $this->get_text_x_inline( 'Pricing', 'noun', 'pricing' ), - 'manage_options', - 'pricing', - 'Freemius::_clean_admin_content_section', - WP_FS__LOWEST_PRIORITY, - ( $add_submenu_items && $show_pricing ), - $pricing_class - ); + $custom_pricing_url = $this->get_pricing_url_with_filter( null ); + $pricing_menu_title = $pricing_cta_text . '  ' . ( is_rtl() ? $this->get_text_x_inline( '←', 'ASCII arrow left icon', 'symbol_arrow-left' ) : $this->get_text_x_inline( '➤', 'ASCII arrow right icon', 'symbol_arrow-right' ) ); + $show_pricing_submenu_item = ( $add_submenu_items && $show_pricing ); + + // Add upgrade/pricing submenu item. + if ( ! is_null( $custom_pricing_url ) ) { + $this->add_submenu_link_item( + $pricing_menu_title, + $custom_pricing_url, + 'pricing', + 'manage_options', + WP_FS__LOWEST_PRIORITY, + $show_pricing_submenu_item, + $pricing_class + ); + } else { + $this->add_submenu_item( + $pricing_menu_title, + array( &$this, '_pricing_page_render' ), + $this->get_plugin_name() . ' – ' . $this->get_text_x_inline( 'Pricing', 'noun', 'pricing' ), + 'manage_options', + 'pricing', + 'Freemius::_clean_admin_content_section', + WP_FS__LOWEST_PRIORITY, + $show_pricing_submenu_item, + $pricing_class + ); + } } } @@ -19467,6 +19130,7 @@ function add_submenu_item( * @param string $capability * @param int $priority * @param bool $show_submenu + * @param string $class */ function add_submenu_link_item( $menu_title, @@ -19474,7 +19138,8 @@ function add_submenu_link_item( $menu_slug = false, $capability = 'read', $priority = WP_FS__DEFAULT_PRIORITY, - $show_submenu = true + $show_submenu = true, + $class = '' ) { $this->_logger->entrance( 'Title = ' . $menu_title . '; Url = ' . $url ); @@ -19488,7 +19153,8 @@ function add_submenu_link_item( $menu_slug, $capability, $priority, - $show_submenu + $show_submenu, + $class ); return; @@ -19508,6 +19174,7 @@ function add_submenu_link_item( 'render_function' => 'fs_dummy', 'before_render_function' => '', 'show_submenu' => $show_submenu, + 'class' => $class, ); } @@ -24884,27 +24551,6 @@ private function add_after_plan_activation_or_upgrade_instructions_notice( $is_u ); } - /** - * @author Leo Fajardo (@leorw) - * @since 2.1.0 - * - * @param string $url - * @param array $request - */ - private static function enrich_request_for_debug( &$url, &$request ) { - if ( WP_FS__DEBUG_SDK || isset( $_COOKIE['XDEBUG_SESSION'] ) ) { - $url = add_query_arg( 'XDEBUG_SESSION_START', rand( 0, 9999999 ), $url ); - $url = add_query_arg( 'XDEBUG_SESSION', 'PHPSTORM', $url ); - - $request['cookies'] = array( - new WP_Http_Cookie( array( - 'name' => 'XDEBUG_SESSION', - 'value' => 'PHPSTORM', - ) ) - ); - } - } - /** * @author Leo Fajardo (@leorw) * @since 2.1.0 @@ -24934,7 +24580,7 @@ static function safe_remote_post( if ( false === $response ) { if ( $maybe_enrich_request_for_debug ) { - self::enrich_request_for_debug( $url, $request ); + FS_DebugManager::enrich_request_for_debug( $url, $request ); } if ( ! isset( $request['method'] ) ) { diff --git a/vendor/freemius/wordpress-sdk/includes/class-fs-logger.php b/vendor/freemius/wordpress-sdk/includes/class-fs-logger.php index 6dde8aa30..c5f0c52a1 100644 --- a/vendor/freemius/wordpress-sdk/includes/class-fs-logger.php +++ b/vendor/freemius/wordpress-sdk/includes/class-fs-logger.php @@ -32,6 +32,9 @@ class FS_Logger { */ private static $_abspathLength; + /** + * @var FS_Logger[] $LOGGERS + */ private static $LOGGERS = array(); private static $LOG = array(); private static $CNT = 0; @@ -124,7 +127,6 @@ function on() { self::hook_footer(); } - function echo_on() { $this->on(); @@ -320,6 +322,11 @@ public static function _set_storage_logging( $is_on = true ) { $table = "{$wpdb->prefix}fs_logger"; + /** + * Drop logging table in any case. + */ + $result = $wpdb->query( "DROP TABLE IF EXISTS $table;" ); + if ( $is_on ) { /** * Create logging table. @@ -329,7 +336,7 @@ public static function _set_storage_logging( $is_on = true ) { * * @link https://core.trac.wordpress.org/ticket/2695 */ - $result = $wpdb->query( "CREATE TABLE {$table} ( + $result = $wpdb->query( "CREATE TABLE IF NOT EXISTS {$table} ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `process_id` INT UNSIGNED NOT NULL, `user_name` VARCHAR(64) NOT NULL, @@ -348,15 +355,11 @@ public static function _set_storage_logging( $is_on = true ) { KEY `process_logger` (`process_id` ASC, `logger` ASC), KEY `function` (`function` ASC), KEY `type` (`type` ASC))" ); - } else { - /** - * Drop logging table. - */ - $result = $wpdb->query( "DROP TABLE IF EXISTS $table;" ); } if ( false !== $result ) { update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) ); + self::$_isStorageLoggingOn = $is_on; } return ( false !== $result ); diff --git a/vendor/freemius/wordpress-sdk/includes/class-fs-plugin-updater.php b/vendor/freemius/wordpress-sdk/includes/class-fs-plugin-updater.php index 65594b7ab..b34893519 100755 --- a/vendor/freemius/wordpress-sdk/includes/class-fs-plugin-updater.php +++ b/vendor/freemius/wordpress-sdk/includes/class-fs-plugin-updater.php @@ -106,6 +106,8 @@ private function filters() { if ( ! $this->_fs->has_any_active_valid_license() ) { add_action( 'admin_head', array( &$this, 'catch_plugin_information_dialog_contents' ) ); + } else { + add_action( 'admin_footer', array( &$this, '_add_fs_allow_updater_and_dialog_request_param' ) ); } if ( ! WP_FS__IS_PRODUCTION_MODE ) { @@ -129,15 +131,48 @@ private function filters() { } } + /** + * @author Leo Fajardo (@leorw) + * @since 2.7.4 + */ + function _add_fs_allow_updater_and_dialog_request_param() { + if ( ! $this->is_plugin_information_dialog_for_plugin() ) { + return; + } + ?> + + _fs->get_slug() === fs_request_get_raw( 'plugin', false ) + ); + } + /** * @author Leo Fajardo (@leorw) * @since 2.1.4 */ function catch_plugin_information_dialog_contents() { - if ( - 'plugin-information' !== fs_request_get( 'tab', false ) || - $this->_fs->get_slug() !== fs_request_get_raw( 'plugin', false ) - ) { + if ( ! $this->is_plugin_information_dialog_for_plugin() ) { return; } @@ -616,7 +651,7 @@ function pre_set_site_transient_update_plugins_filter( $transient_data ) { $slug = $this->_fs->get_slug(); - if ( $this->_fs->is_org_repo_compliant() && $this->_fs->is_freemium() ) { + if ( $this->can_fetch_data_from_wp_org() ) { if ( ! isset( $this->_translation_updates ) ) { $this->_translation_updates = array(); @@ -873,6 +908,16 @@ static function _fetch_plugin_info_from_repository( $action, $args ) { return $res; } + /** + * Returns true if the product can fetch data from WordPress.org. + * + * @author Leo Fajardo (@leorw) + * @since 2.7.4 + */ + private function can_fetch_data_from_wp_org() { + return ( $this->_fs->is_org_repo_compliant() && $this->_fs->is_freemium() ); + } + /** * Fetches module translation updates from wordpress.org. * @@ -1057,7 +1102,7 @@ function plugins_api_filter( $data, $action = '', $args = null ) { } $plugin_in_repo = false; - if ( ! $is_addon ) { + if ( ! $is_addon && $this->can_fetch_data_from_wp_org() ) { // Try to fetch info from .org repository. $data = self::_fetch_plugin_info_from_repository( $action, $args ); diff --git a/vendor/freemius/wordpress-sdk/includes/class-fs-storage.php b/vendor/freemius/wordpress-sdk/includes/class-fs-storage.php index 74e46e7f3..6567a6349 100644 --- a/vendor/freemius/wordpress-sdk/includes/class-fs-storage.php +++ b/vendor/freemius/wordpress-sdk/includes/class-fs-storage.php @@ -20,6 +20,7 @@ * @property bool|null $is_extensions_tracking_allowed * @property bool|null $is_diagnostic_tracking_allowed * @property object $sync_cron + * @property bool|int $install_timestamp */ class FS_Storage { /** diff --git a/vendor/freemius/wordpress-sdk/includes/entities/class-fs-plugin-plan.php b/vendor/freemius/wordpress-sdk/includes/entities/class-fs-plugin-plan.php index 5bc6bc2d4..e89e2bce2 100755 --- a/vendor/freemius/wordpress-sdk/includes/entities/class-fs-plugin-plan.php +++ b/vendor/freemius/wordpress-sdk/includes/entities/class-fs-plugin-plan.php @@ -92,6 +92,14 @@ class FS_Plugin_Plan extends FS_Entity { * @var bool Is hidden plan. */ public $is_hidden; + /** + * @var FS_Pricing[] + */ + public $pricing; + /** + * @var object[] + */ + public $features; #endregion Properties diff --git a/vendor/freemius/wordpress-sdk/includes/entities/class-fs-site.php b/vendor/freemius/wordpress-sdk/includes/entities/class-fs-site.php index f9012d056..e8049bae3 100755 --- a/vendor/freemius/wordpress-sdk/includes/entities/class-fs-site.php +++ b/vendor/freemius/wordpress-sdk/includes/entities/class-fs-site.php @@ -182,6 +182,7 @@ static function is_localhost_by_address( $url ) { fs_ends_with( $subdomain, '.staging.wpengine.com' ) || fs_ends_with( $subdomain, '.dev.wpengine.com' ) || fs_ends_with( $subdomain, '.wpengine.com' ) || + fs_ends_with( $subdomain, '.wpenginepowered.com' ) || // Pantheon ( fs_ends_with( $subdomain, 'pantheonsite.io' ) && ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) || @@ -201,7 +202,9 @@ static function is_localhost_by_address( $url ) { // Vendasta ( fs_ends_with( $subdomain, '.websitepro-staging.com' ) || fs_ends_with( $subdomain, '.websitepro.hosting' ) ) || // InstaWP - fs_ends_with( $subdomain, '.instawp.xyz' ) + fs_ends_with( $subdomain, '.instawp.xyz' ) || + // 10Web Hosting + ( fs_ends_with( $subdomain, '-dev.10web.site' ) || fs_ends_with( $subdomain, '-dev.10web.cloud' ) ) ); } diff --git a/vendor/freemius/wordpress-sdk/includes/managers/class-fs-debug-manager.php b/vendor/freemius/wordpress-sdk/includes/managers/class-fs-debug-manager.php new file mode 100644 index 000000000..f8b8e130c --- /dev/null +++ b/vendor/freemius/wordpress-sdk/includes/managers/class-fs-debug-manager.php @@ -0,0 +1,508 @@ +entrance(); + + $title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION ); + + if ( WP_FS__DEV_MODE ) { + // Add top-level debug menu item. + $hook = FS_Admin_Menu_Manager::add_page( + $title, + $title, + 'manage_options', + 'freemius', + array( self::class, '_debug_page_render' ) + ); + } else { + // Add hidden debug page. + $hook = FS_Admin_Menu_Manager::add_subpage( + '', + $title, + $title, + 'manage_options', + 'freemius', + array( self::class, '_debug_page_render' ) + ); + } + + if ( ! empty( $hook ) ) { + add_action( "load-$hook", array( self::class, '_debug_page_actions' ) ); + } + } + + /** + * @author Vova Feldman (@svovaf) + * Moved from Freemius + * + * @since 1.0.8 + */ + static function _debug_page_actions() { + Freemius::_clean_admin_content_section(); + + if ( fs_request_is_action( 'restart_freemius' ) ) { + check_admin_referer( 'restart_freemius' ); + + if ( ! is_multisite() ) { + // Clear accounts data. + Freemius::get_accounts()->clear( null, true ); + } else { + $sites = Freemius::get_sites(); + foreach ( $sites as $site ) { + $blog_id = Freemius::get_site_blog_id( $site ); + Freemius::get_accounts()->clear( $blog_id, true ); + } + + // Clear network level storage. + Freemius::get_accounts()->clear( true, true ); + } + + // Clear SDK reference cache. + delete_option( 'fs_active_plugins' ); + } else if ( fs_request_is_action( 'clear_updates_data' ) ) { + check_admin_referer( 'clear_updates_data' ); + + if ( ! is_multisite() ) { + set_site_transient( 'update_plugins', null ); + set_site_transient( 'update_themes', null ); + } else { + $current_blog_id = get_current_blog_id(); + + $sites = Freemius::get_sites(); + foreach ( $sites as $site ) { + switch_to_blog( Freemius::get_site_blog_id( $site ) ); + + set_site_transient( 'update_plugins', null ); + set_site_transient( 'update_themes', null ); + } + + switch_to_blog( $current_blog_id ); + } + } else if ( fs_request_is_action( 'reset_deactivation_snoozing' ) ) { + check_admin_referer( 'reset_deactivation_snoozing' ); + + Freemius::reset_deactivation_snoozing(); + } else if ( fs_request_is_action( 'simulate_trial' ) ) { + check_admin_referer( 'simulate_trial' ); + + $fs = freemius( fs_request_get( 'module_id' ) ); + + // Update SDK install to at least 24 hours before. + $fs->get_storage()->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC ); + // Unset the trial shown timestamp. + unset( $fs->get_storage()->trial_promotion_shown ); + } else if ( fs_request_is_action( 'simulate_network_upgrade' ) ) { + check_admin_referer( 'simulate_network_upgrade' ); + + $fs = freemius( fs_request_get( 'module_id' ) ); + + Freemius::set_network_upgrade_mode( $fs->get_storage() ); + } else if ( fs_request_is_action( 'delete_install' ) ) { + check_admin_referer( 'delete_install' ); + + Freemius::_delete_site_by_slug( + fs_request_get( 'slug' ), + fs_request_get( 'module_type' ), + true, + fs_request_get( 'blog_id', null ) + ); + } else if ( fs_request_is_action( 'delete_user' ) ) { + check_admin_referer( 'delete_user' ); + + self::delete_user( fs_request_get( 'user_id' ) ); + } else if ( fs_request_is_action( 'download_logs' ) ) { + check_admin_referer( 'download_logs' ); + + $download_url = FS_Logger::download_db_logs( + fs_request_get( 'filters', false, 'post' ) + ); + + if ( false === $download_url ) { + wp_die( 'Oops... there was an error while generating the logs download file. Please try again and if it doesn\'t work contact support@freemius.com.' ); + } + + fs_redirect( $download_url ); + } else if ( fs_request_is_action( 'migrate_options_to_network' ) ) { + check_admin_referer( 'migrate_options_to_network' ); + + Freemius::migrate_options_to_network(); + } + } + + /** + * @author Vova Feldman (@svovaf) + * Moved from Freemius + * + * @since 1.0.8 + */ + static function _debug_page_render() { + Freemius::get_static_logger()->entrance(); + + $all_modules_sites = self::get_all_modules_sites(); + + $licenses_by_module_type = self::get_all_licenses_by_module_type(); + + $vars = array( + 'plugin_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_PLUGIN ], + 'theme_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_THEME ], + 'users' => Freemius::get_all_users(), + 'addons' => Freemius::get_all_addons(), + 'account_addons' => Freemius::get_all_account_addons(), + 'plugin_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_PLUGIN ], + 'theme_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_THEME ], + ); + + fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' ); + fs_require_once_template( 'debug.php', $vars ); + } + + /** + * @author Vova Feldman (@svovaf) + * Moved from Freemius + * + * @since 1.2.1.6 + */ + static function _get_debug_log() { + check_admin_referer( 'fs_get_debug_log' ); + + if ( ! is_super_admin() ) { + return; + } + + if (!FS_Logger::is_storage_logging_on()) { + return; + } + + $limit = min( ! empty( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 200, 200 ); + $offset = min( ! empty( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 200, 200 ); + + $logs = FS_Logger::load_db_logs( + fs_request_get( 'filters', false, 'post' ), + $limit, + $offset + ); + + Freemius::shoot_ajax_success( $logs ); + } + + /** + * @author Vova Feldman (@svovaf) + * Moved from Freemius + * + * @since 1.2.1.7 + */ + static function _get_db_option() { + check_admin_referer( 'fs_get_db_option' ); + + $option_name = fs_request_get( 'option_name' ); + + if ( ! is_super_admin() || + ! fs_starts_with( $option_name, 'fs_' ) + ) { + Freemius::shoot_ajax_failure(); + } + + $value = get_option( $option_name ); + + $result = array( + 'name' => $option_name, + ); + + if ( false !== $value ) { + if ( ! is_string( $value ) ) { + $value = json_encode( $value ); + } + + $result['value'] = $value; + } + + Freemius::shoot_ajax_success( $result ); + } + + /** + * @author Vova Feldman (@svovaf) + * Moved from Freemius + * + * @since 1.2.1.7 + */ + static function _set_db_option() { + check_admin_referer( 'fs_set_db_option' ); + + $option_name = fs_request_get( 'option_name' ); + + if ( ! is_super_admin() || + ! fs_starts_with( $option_name, 'fs_' ) + ) { + Freemius::shoot_ajax_failure(); + } + + $option_value = fs_request_get_raw( 'option_value' ); + + if ( ! empty( $option_value ) ) { + update_option( $option_name, $option_value ); + } + + Freemius::shoot_ajax_success(); + } + + /** + * @author Vova Feldman (@svovaf) + * Moved from Freemius + * + * @since 1.1.7.3 + */ + static function _toggle_debug_mode() { + check_admin_referer( 'fs_toggle_debug_mode' ); + + if ( ! is_super_admin() ) { + return; + } + + $is_on = fs_request_get( 'is_on', false, 'post' ); + + if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) { + if ( $is_on ) { + self::_turn_on_debug_mode(); + } else { + self::_turn_off_debug_mode(); + } + + // Logic to turn debugging off automatically + if ( 1 == $is_on ) { + // Plan a single event triggering after 24 hours to turn debugging off. + wp_schedule_single_event( time() + 24 * HOUR_IN_SECONDS, 'fs_debug_turn_off_logging_hook' ); + } else { + // Cancels any planned event when debugging is turned off manually. + $timestamp = wp_next_scheduled( 'fs_debug_turn_off_logging_hook' ); + if ( $timestamp ) { + wp_unschedule_event( $timestamp, 'fs_debug_turn_off_logging_hook' ); + } + } + } + + exit; + } + + /** + * @author Daniele Alessandra (@danielealessandra) + * @since 2.6.2 + * + */ + static function _turn_off_debug_mode() { + self::update_debug_mode_option( 0 ); + FS_Logger::_set_storage_logging( false ); + } + + /** + * @author Daniele Alessandra (@danielealessandra) + * @since 2.6.2 + * + */ + static function _turn_on_debug_mode() { + self::update_debug_mode_option( 1 ); + FS_Logger::_set_storage_logging(); + } + + /** + * @author Leo Fajardo (@leorw) + * Moved from Freemius + * + * @param string $url + * @param array $request + * + * @since 2.1.0 + * + */ + public static function enrich_request_for_debug( &$url, &$request ) { + if ( WP_FS__DEBUG_SDK || isset( $_COOKIE['XDEBUG_SESSION'] ) ) { + $url = add_query_arg( 'XDEBUG_SESSION_START', rand( 0, 9999999 ), $url ); + $url = add_query_arg( 'XDEBUG_SESSION', 'PHPSTORM', $url ); + + $request['cookies'] = array( + new WP_Http_Cookie( array( + 'name' => 'XDEBUG_SESSION', + 'value' => 'PHPSTORM', + ) ), + ); + } + } + + /** + * @author Leo Fajardo (@leorw) + * Moved from Freemius + * + * @return array + * + * @since 2.0.0 + * + */ + private static function get_all_licenses_by_module_type() { + $licenses = Freemius::get_account_option( 'all_licenses' ); + + $licenses_by_module_type = array( + WP_FS__MODULE_TYPE_PLUGIN => array(), + WP_FS__MODULE_TYPE_THEME => array(), + ); + + if ( ! is_array( $licenses ) ) { + return $licenses_by_module_type; + } + + foreach ( $licenses as $module_id => $module_licenses ) { + $fs = Freemius::get_instance_by_id( $module_id ); + if ( false === $fs ) { + continue; + } + + $licenses_by_module_type[ $fs->get_module_type() ] = array_merge( $licenses_by_module_type[ $fs->get_module_type() ], + $module_licenses ); + } + + return $licenses_by_module_type; + } + + /** + * @author Leo Fajardo (@leorw) + * Moved from Freemius + * + * @return array + * + * @since 2.5.0 + * + */ + static function get_all_modules_sites() { + Freemius::get_static_logger()->entrance(); + + $sites_by_type = array( + WP_FS__MODULE_TYPE_PLUGIN => array(), + WP_FS__MODULE_TYPE_THEME => array(), + ); + + $module_types = array_keys( $sites_by_type ); + + if ( ! is_multisite() ) { + foreach ( $module_types as $type ) { + $sites_by_type[ $type ] = Freemius::get_all_sites( $type ); + + foreach ( $sites_by_type[ $type ] as $slug => $install ) { + $sites_by_type[ $type ][ $slug ] = array( $install ); + } + } + } else { + $sites = Freemius::get_sites(); + + foreach ( $sites as $site ) { + $blog_id = Freemius::get_site_blog_id( $site ); + + foreach ( $module_types as $type ) { + $installs = Freemius::get_all_sites( $type, $blog_id ); + + foreach ( $installs as $slug => $install ) { + if ( ! isset( $sites_by_type[ $type ][ $slug ] ) ) { + $sites_by_type[ $type ][ $slug ] = array(); + } + + $install->blog_id = $blog_id; + + $sites_by_type[ $type ][ $slug ][] = $install; + } + } + } + } + + return $sites_by_type; + } + + /** + * Delete user. + * + * @author Vova Feldman (@svovaf) + * + * @param number $user_id + * @param bool $store + * + * @return false|int The user ID if deleted. Otherwise, FALSE (when install not exist). + * @since 2.0.0 + * + */ + public static function delete_user( $user_id, $store = true ) { + $users = Freemius::get_all_users(); + + if ( ! is_array( $users ) || ! isset( $users[ $user_id ] ) ) { + return false; + } + + unset( $users[ $user_id ] ); + + self::$_accounts->set_option( 'users', $users, $store ); + + return $user_id; + } + + /** + * @author Daniele Alessandra (@danielealessandra) + * + * @return void + * @since 2.6.2 + * + */ + public static function load_required_static() { + if ( ! WP_FS__DEMO_MODE ) { + add_action( ( fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu', array( + self::class, + '_add_debug_section', + ) ); + } + + add_action( "wp_ajax_fs_toggle_debug_mode", array( self::class, '_toggle_debug_mode' ) ); + + Freemius::add_ajax_action_static( 'get_debug_log', array( self::class, '_get_debug_log' ) ); + Freemius::add_ajax_action_static( 'get_db_option', array( self::class, '_get_db_option' ) ); + Freemius::add_ajax_action_static( 'set_db_option', array( self::class, '_set_db_option' ) ); + } + + /** + * @author Daniele Alessandra (@danielealessandra) + * + * @return void + * + * @since 2.6.2 + */ + public static function register_hooks() { + add_action( 'fs_debug_turn_off_logging_hook', array( self::class, '_turn_off_debug_mode' ) ); + } + + /** + * @author Daniele Alessandra (@danielealessandra) + * + * @param int $is_on + * + * @return void + * + * @since 2.6.2 + */ + private static function update_debug_mode_option( $is_on ) { + update_option( 'fs_debug_mode', $is_on ); + } + + } diff --git a/vendor/freemius/wordpress-sdk/require.php b/vendor/freemius/wordpress-sdk/require.php index cc194d2d9..bff3fc39e 100644 --- a/vendor/freemius/wordpress-sdk/require.php +++ b/vendor/freemius/wordpress-sdk/require.php @@ -50,6 +50,7 @@ require_once WP_FS__DIR_INCLUDES . '/class-fs-api.php'; require_once WP_FS__DIR_INCLUDES . '/class-fs-plugin-updater.php'; require_once WP_FS__DIR_INCLUDES . '/class-fs-security.php'; + require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-debug-manager.php'; require_once WP_FS__DIR_INCLUDES . '/class-fs-options.php'; require_once WP_FS__DIR_INCLUDES . '/class-fs-storage.php'; require_once WP_FS__DIR_INCLUDES . '/class-fs-admin-notices.php'; diff --git a/vendor/freemius/wordpress-sdk/start.php b/vendor/freemius/wordpress-sdk/start.php index a5a5ef772..0a3acfd4d 100644 --- a/vendor/freemius/wordpress-sdk/start.php +++ b/vendor/freemius/wordpress-sdk/start.php @@ -15,7 +15,7 @@ * * @var string */ - $this_sdk_version = '2.7.4'; + $this_sdk_version = '2.8.0'; #region SDK Selection Logic -------------------------------------------------------------------- diff --git a/vendor/freemius/wordpress-sdk/templates/debug.php b/vendor/freemius/wordpress-sdk/templates/debug.php index 4626f6469..0427c08d6 100644 --- a/vendor/freemius/wordpress-sdk/templates/debug.php +++ b/vendor/freemius/wordpress-sdk/templates/debug.php @@ -17,19 +17,26 @@ $off_text = fs_text_x_inline( 'Off', 'as turned off' ); $on_text = fs_text_x_inline( 'On', 'as turned on' ); + // For some reason css was missing + fs_enqueue_local_style( 'fs_common', '/admin/common.css' ); + $has_any_active_clone = false; $is_multisite = is_multisite(); + + $auto_off_timestamp = wp_next_scheduled( 'fs_debug_turn_off_logging_hook' ) * 1000; ?>

newest->version ?>

-
+ +