Version Description
- [fixed] compatibility improvements
- [updated] wp-content-aware-engine library
- [updated] freemius sdk
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 3.16.2 |
Comparing to | |
See all releases |
Code changes from version 3.16.1 to 3.16.2
- app.php +1 -1
- assets/css/style.css +1 -1
- content-aware-sidebars.php +1 -1
- lib/freemius/assets/css/admin/checkout.css.map +1 -0
- lib/freemius/assets/css/admin/dialog-boxes.css +1 -2
- lib/freemius/assets/css/admin/dialog-boxes.css.map +1 -0
- lib/freemius/includes/class-freemius.php +563 -136
- lib/freemius/includes/class-fs-plugin-updater.php +8 -6
- lib/freemius/includes/entities/class-fs-user.php +12 -1
- lib/freemius/includes/fs-core-functions.php +1 -1
- lib/freemius/includes/fs-plugin-info-dialog.php +1 -1
- lib/freemius/includes/managers/class-fs-admin-notice-manager.php +25 -4
- lib/freemius/languages/freemius-cs_CZ.mo +0 -0
- lib/freemius/languages/freemius-da_DK.mo +0 -0
- lib/freemius/languages/freemius-en.mo +0 -0
- lib/freemius/languages/freemius-es_ES.mo +0 -0
- lib/freemius/languages/freemius-fr_FR.mo +0 -0
- lib/freemius/languages/freemius-he_IL.mo +0 -0
- lib/freemius/languages/freemius-hu_HU.mo +0 -0
- lib/freemius/languages/freemius-it_IT.mo +0 -0
- lib/freemius/languages/freemius-ja.mo +0 -0
- lib/freemius/languages/freemius-nl_NL.mo +0 -0
- lib/freemius/languages/freemius-ru_RU.mo +0 -0
- lib/freemius/languages/freemius-ta.mo +0 -0
- lib/freemius/languages/freemius-zh_CN.mo +0 -0
- lib/freemius/start.php +1 -1
- lib/freemius/templates/account.php +9 -2
- lib/freemius/templates/connect.php +11 -7
- lib/freemius/templates/debug.php +18 -1
- lib/freemius/templates/forms/deactivation/form.php +172 -49
- lib/freemius/templates/forms/email-address-update.php +347 -0
- lib/freemius/templates/plugin-info/features.php +1 -1
- lib/freemius/templates/pricing.php +11 -10
- lib/wp-content-aware-engine/bootstrap.php +1 -1
- lib/wp-content-aware-engine/core.php +19 -31
- readme.txt +11 -5
app.php
CHANGED
@@ -11,7 +11,7 @@ defined('ABSPATH') || exit;
|
|
11 |
final class CAS_App
|
12 |
{
|
13 |
const PLUGIN_VERSION_KEY = 'cas_db_version';
|
14 |
-
const PLUGIN_VERSION = '3.16.
|
15 |
|
16 |
/**
|
17 |
* Prefix for sidebar id
|
11 |
final class CAS_App
|
12 |
{
|
13 |
const PLUGIN_VERSION_KEY = 'cas_db_version';
|
14 |
+
const PLUGIN_VERSION = '3.16.2';
|
15 |
|
16 |
/**
|
17 |
* Prefix for sidebar id
|
assets/css/style.css
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
* @author Joachim Jensen <joachim@dev.institute>
|
4 |
* @license GPLv3
|
5 |
* @copyright 2021 by Joachim Jensen
|
6 |
-
*/#cas-rules .cas-heart{color:#ac170a}body.js .js-cas-visibility{max-height:30px;overflow:hidden}.cas-section,.js-cas-action{display:none}.nav-tab-wrapper.js-cas-tabs .nav-tab{position:relative}.nav-tab-active:focus{box-shadow:none}.cas-input-inline{display:inline-block}.cas-input-sm{max-width:80px;font-size:.8em;vertical-align:middle}.cas-metabox-holder .hndle{cursor:auto!important}#submitdiv .handlediv,#submitdiv .hndle,#submitdiv .postbox-header,.cas-metabox-holder .handle-actions,.cas-metabox-holder .handlediv{display:none!important}#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:0}#submitdiv .cas-overview-actions>li:not(:last-of-type){padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #eee}.cas-pro-label{font-size:.8em;background-color:#31c455;border-radius:5px;color:#fff;padding:2px 6px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}.button.button-cas-delete{color:#fff;text-decoration:none;background-color:#a00;border:1px solid #000}.button.button-cas-delete:hover{color:#fff;background-color:red}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;touch-action:none;text-align:center;border-radius:12px;transition:background .2s}.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;border-color:#999}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-focus:focus{outline:0}.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 .postbox-header{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}#cas-plugin-links .handle-actions{display:none!important}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-handler,.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-status,.wp-list-table.fixed .column-widgets{width:80px}.wp-list-table.fixed .column-status .dashicons{color:#999}.wp-list-table.fixed .column-status .sidebar-status{display:inline-block;margin-right:6px}.sidebar-status{margin:2px 0 0;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.sidebar-status .sidebar-status-input{display:none}.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}.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;box-shadow:0 1px 2px rgba(0,0,0,.2)}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .sidebar-name h2,.widget-liquid-right .widgets-holder-wrap .sidebar-name h3{text-overflow:ellipsis}.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{float:right;margin:10px 10px 0}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-right:1px solid #dfdfdf;padding:8px 10px;color:#888;text-decoration:none;transition:.4s;box-shadow:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{background-color:#fff;color:#222}.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{width:97%;margin:0 auto}.cas-form-table tr td:first-child{min-width:30%}.cas-form-table tr td{border-bottom:1px solid #eee}.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 .2s;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{max-width:calc(900px + 2%);margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 0 0 10px;display:inline-block}.cas-filter-sidebar .sidebars-toggle a{outline:0;box-shadow:none}.cas-filter-sidebar .button{margin:10px 0}.cas-filter-sidebar input{float:right}input.cas-filter{margin:10px 0}.wp-header-end{visibility:visible;margin:14px -20px 0;clear:both}@media (min-width:783px){.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .widget-liquid-left{position:absolute;top:50px}.cas-widget-manager:not(.widgets_access) .wrap .error,.cas-widget-manager:not(.widgets_access) .wrap .notice,.cas-widget-manager:not(.widgets_access) .wrap .postbox,.cas-widget-manager:not(.widgets_access) .wrap .updated,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) .update-nag{margin-left:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 4px 0 rgba(0,0,0,.1);width:32%;border-color:#dfdfdf;border-style:solid;border-width:0 1px 1px 0;left:160px}.cas-widget-manager:not(.widgets_access) #available-widgets input.cas-filter{width:100%}.cas-widget-manager:not(.widgets_access) #available-widgets .widget{padding-bottom:10px}.cas-widget-manager:not(.widgets_access) #available-widgets #widget-list{border-top:1px solid #dfdfdf;padding:3px;margin:0 -10px;background:#fff}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed){min-height:600px;bottom:0;border-bottom-width:0}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name{position:static}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{display:block;bottom:auto;right:10px}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .toggle-indicator{display:block}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #removing-widget{box-sizing:border-box;padding:10px 0 0;color:#c00;z-index:2;text-align:center;position:absolute;background-color:rgba(255,255,255,.6);border:4px dashed #c00;top:0;left:0;right:0;height:100%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .description{display:none}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{position:fixed;top:120px;padding:12px 10px;overflow-y:auto;overflow-x:hidden;width:calc(32% - 1px);bottom:0}.cas-widget-manager:not(.widgets_access).folded #available-widgets{left:36px;width:37.5%}.cas-widget-manager:not(.widgets_access).folded #available-widgets:not(.closed) #widget-list{width:calc(37.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl .wrap .error,.cas-widget-manager:not(.widgets_access).rtl .wrap .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap .postbox,.cas-widget-manager:not(.widgets_access).rtl .wrap .update-nag,.cas-widget-manager:not(.widgets_access).rtl .wrap .updated,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.cas-widget-manager:not(.widgets_access).rtl .update-nag{margin-right:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access).rtl #available-widgets{box-shadow:0 0 5px 0 rgba(0,0,0,.1);right:160px;left:auto;border-width:0 0 1px 1px}.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{left:10px;right:auto}.cas-widget-manager:not(.widgets_access).rtl.folded #available-widgets{left:auto;right:36px}.cas-widget-manager:not(.widgets_access) #widgets-right .widgets-sortables{z-index:2}.cas-widget-manager div.widget-liquid-right{padding:0;margin:0;width:58%;float:right;background:0 0}.cas-widget-manager div.widget-liquid-left{width:38%;margin:0;float:left;padding:0}.cas-widget-manager .fw-ext-sidebars-wrap-container{float:right}}@media (min-width:783px) and (max-width:960px){.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets{left:36px;width:36%}.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(36% - 1px)}.cas-widget-manager.auto-fold:not(.widgets_access).rtl #available-widgets{left:auto;right:36px}}@media (max-width:782px){input.cas-filter{width:100%}}@media (max-width:1249px){div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:inherit}}@media (min-width:1250px){.cas-widget-manager:not(.widgets_access) #widgets-left #available-widgets .widget:nth-child(even){float:left;margin:0 0 0 2%}.cas-widget-manager:not(.widgets_access) #available-widgets{width:34.5%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(34.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget{float:right;padding-left:2%}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget:nth-child(odd){margin-right:-2%}}.widgets-php #wpcontent .wrap .cs-wrap{margin:0!important}#cs-title-options,.custom-sidebars-add-new,div[id^=ca-sidebar]+.cs-toolbar{display:none}
|
3 |
* @author Joachim Jensen <joachim@dev.institute>
|
4 |
* @license GPLv3
|
5 |
* @copyright 2021 by Joachim Jensen
|
6 |
+
*/#cas-rules .cas-heart{color:#ac170a}body.js .js-cas-visibility{max-height:30px;overflow:hidden}.cas-section,.js-cas-action{display:none}.nav-tab-wrapper.js-cas-tabs .nav-tab{position:relative}.nav-tab-active:focus{box-shadow:none}.cas-input-inline{display:inline-block}.cas-input-sm{max-width:80px;font-size:.8em;vertical-align:middle}.cas-metabox-holder .hndle{cursor:auto!important}#submitdiv .handlediv,#submitdiv .hndle,#submitdiv .postbox-header,.cas-metabox-holder .handle-actions,.cas-metabox-holder .handlediv{display:none!important}#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:0}#submitdiv .cas-overview-actions>li:not(:last-of-type){padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #eee}.cas-pro-label{font-size:.8em;background-color:#31c455;border-radius:5px;color:#fff;padding:2px 6px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}.button.button-cas-delete{color:#fff;text-decoration:none;background-color:#a00;border:1px solid #000}.button.button-cas-delete:hover{color:#fff;background-color:red}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;touch-action:none;text-align:center;border-radius:12px;transition:background .2s}.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;border-color:#999}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-focus:focus{outline:0}.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 .postbox-header{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}#cas-plugin-links .handle-actions{display:none!important}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-handler,.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-status,.wp-list-table.fixed .column-widgets{width:80px}.wp-list-table.fixed .column-status .dashicons{color:#999}.wp-list-table.fixed .column-status .sidebar-status{display:inline-block;margin-right:6px}.sidebar-status{margin:2px 0 0;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.sidebar-status .sidebar-status-input{display:none}.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}.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;box-shadow:0 1px 2px rgba(0,0,0,.2)}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .sidebar-name h2,.widget-liquid-right .widgets-holder-wrap .sidebar-name h3{text-overflow:ellipsis}.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{float:right;margin:10px 10px 0}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-right:1px solid #dfdfdf;padding:8px 10px;color:#888;text-decoration:none;transition:.4s;box-shadow:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{background-color:#fff;color:#222}.widget-liquid-right .widgets-holder-wrap.closed .cas-settings{display:none}.widget-liquid-right .widgets-holder-wrap div[id^=ca-sidebar],.wp-block-widget-area .components-panel__body-title{box-shadow:inset 0 4px #75d7ef}.cas-form-table{width:97%;margin:0 auto}.cas-form-table tr td:first-child{min-width:30%}.cas-form-table tr td{border-bottom:1px solid #eee}.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 .2s;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{max-width:calc(900px + 2%);margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 0 0 10px;display:inline-block}.cas-filter-sidebar .sidebars-toggle a{outline:0;box-shadow:none}.cas-filter-sidebar .button{margin:10px 0}.cas-filter-sidebar input{float:right}input.cas-filter{margin:10px 0}.wp-header-end{visibility:visible;margin:14px -20px 0;clear:both}@media (min-width:783px){.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .widget-liquid-left{position:absolute;top:50px}.cas-widget-manager:not(.widgets_access) .wrap .error,.cas-widget-manager:not(.widgets_access) .wrap .notice,.cas-widget-manager:not(.widgets_access) .wrap .postbox,.cas-widget-manager:not(.widgets_access) .wrap .updated,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) .update-nag{margin-left:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 4px 0 rgba(0,0,0,.1);width:32%;border-color:#dfdfdf;border-style:solid;border-width:0 1px 1px 0;left:160px}.cas-widget-manager:not(.widgets_access) #available-widgets input.cas-filter{width:100%}.cas-widget-manager:not(.widgets_access) #available-widgets .widget{padding-bottom:10px}.cas-widget-manager:not(.widgets_access) #available-widgets #widget-list{border-top:1px solid #dfdfdf;padding:3px;margin:0 -10px;background:#fff}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed){min-height:600px;bottom:0;border-bottom-width:0}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name{position:static}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{display:block;bottom:auto;right:10px}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .toggle-indicator{display:block}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #removing-widget{box-sizing:border-box;padding:10px 0 0;color:#c00;z-index:2;text-align:center;position:absolute;background-color:rgba(255,255,255,.6);border:4px dashed #c00;top:0;left:0;right:0;height:100%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .description{display:none}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{position:fixed;top:120px;padding:12px 10px;overflow-y:auto;overflow-x:hidden;width:calc(32% - 1px);bottom:0}.cas-widget-manager:not(.widgets_access).folded #available-widgets{left:36px;width:37.5%}.cas-widget-manager:not(.widgets_access).folded #available-widgets:not(.closed) #widget-list{width:calc(37.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl .wrap .error,.cas-widget-manager:not(.widgets_access).rtl .wrap .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap .postbox,.cas-widget-manager:not(.widgets_access).rtl .wrap .update-nag,.cas-widget-manager:not(.widgets_access).rtl .wrap .updated,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.cas-widget-manager:not(.widgets_access).rtl .update-nag{margin-right:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access).rtl #available-widgets{box-shadow:0 0 5px 0 rgba(0,0,0,.1);right:160px;left:auto;border-width:0 0 1px 1px}.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{left:10px;right:auto}.cas-widget-manager:not(.widgets_access).rtl.folded #available-widgets{left:auto;right:36px}.cas-widget-manager:not(.widgets_access) #widgets-right .widgets-sortables{z-index:2}.cas-widget-manager div.widget-liquid-right{padding:0;margin:0;width:58%;float:right;background:0 0}.cas-widget-manager div.widget-liquid-left{width:38%;margin:0;float:left;padding:0}.cas-widget-manager .fw-ext-sidebars-wrap-container{float:right}}@media (min-width:783px) and (max-width:960px){.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets{left:36px;width:36%}.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(36% - 1px)}.cas-widget-manager.auto-fold:not(.widgets_access).rtl #available-widgets{left:auto;right:36px}}@media (max-width:782px){input.cas-filter{width:100%}}@media (max-width:1249px){div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:inherit}}@media (min-width:1250px){.cas-widget-manager:not(.widgets_access) #widgets-left #available-widgets .widget:nth-child(even){float:left;margin:0 0 0 2%}.cas-widget-manager:not(.widgets_access) #available-widgets{width:34.5%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(34.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget{float:right;padding-left:2%}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget:nth-child(odd){margin-right:-2%}}.widgets-php #wpcontent .wrap .cs-wrap{margin:0!important}#cs-title-options,.custom-sidebars-add-new,div[id^=ca-sidebar]+.cs-toolbar{display:none}
|
content-aware-sidebars.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress-sidebars/
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
-
Version: 3.16.
|
13 |
Author: Joachim Jensen - DEV Institute
|
14 |
Author URI: https://dev.institute
|
15 |
Requires at least: 5.0
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress-sidebars/
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
+
Version: 3.16.2
|
13 |
Author: Joachim Jensen - DEV Institute
|
14 |
Author URI: https://dev.institute
|
15 |
Requires at least: 5.0
|
lib/freemius/assets/css/admin/checkout.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../../scss/admin/checkout.scss"],"names":[],"mappings":"AAAA,qCACI,gBACI","file":"checkout.css"}
|
lib/freemius/assets/css/admin/dialog-boxes.css
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
|
2 |
-
.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
|
1 |
+
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media(max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eee 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:.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 .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eee solid 1px;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{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}.rtl .fs-modal .fs-modal-footer{text-align:left}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,.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{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type=radio]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media(max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-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{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:.3;-o-transform:.3;-ms-transform:.3;-webkit-transform:.3;transform:.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,.1) !important}/*# sourceMappingURL=dialog-boxes.css.map */
|
|
lib/freemius/assets/css/admin/dialog-boxes.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sourceRoot":"","sources":["../../scss/admin/_modal-common.scss","../../scss/_colors.scss","../../scss/_mixins.scss","../../scss/admin/_deactivation-feedback.scss","../../scss/admin/_subscription-cancellation.scss","../../scss/admin/_license-activation.scss","../../scss/admin/_user-change.scss","../../scss/admin/_data-debug-mode.scss","../../scss/admin/_multisite-options.scss","../../scss/admin/_license-key-resend.scss","../../scss/admin/_email-address-update.scss","../../scss/admin/_ajax-loader.scss","../../scss/admin/_auto-install.scss","../../scss/admin/_buttons.scss"],"names":[],"mappings":"AAGA,UACC,eACA,cACA,YACA,WACA,MACA,eACA,aACA,0BAEA,qBAEC,sBAGD,2BACC,uBACA,kBACA,SACA,mBACA,oBACA,UACA,eACA,YAEA,yBAVD,2BAWE,iBACA,sBACA,kBACA,mBACA,WAEA,qDACC,iBAKH,iBACC,cAEA,wBACC,cAGD,kCACC,QAKD,sCACC,oBCxB4B,QD2B7B,oCACC,iBC7BuB,QDkCxB,mCACC,oBC9ByB,QDiC1B,iCACC,iBCnCoB,QDwCrB,oCACC,oBC1C0B,QD6C3B,kCACC,iBC/CqB,QDoDvB,oDAEC,SACA,mBACA,aAGE,2BACI,6BACA,mBACA,kBACA,kBACN,oBAGM,8BACI,SACA,UACA,yBACA,gBACA,iBACA,cACA,6BACA,oBACA,mCAGJ,qCACI,kBACA,WACA,SACA,eACA,WErEP,mBFsEO,KErEV,sBFqEU,KEpEF,cFoEE,KACA,YEwDP,gBFvDO,oBEwDL,cFxDK,oBEyDN,eFzDM,oBE0DV,mBF1DU,oBE2DF,WF3DE,oBAEA,2CACI,WACA,gBAKZ,sGAEC,qBAMJ,yBACC,gBAEA,2BACC,eAGD,4BACC,eACA,kBAGD,6BACC,gBAEA,gCACC,iBACA,eACA,aAKH,2BACC,0BACA,iBAEA,mCACC,aAEA,gDACC,SAMF,yCACC,SACA,aAGD,uCACC,aASS,0CACI,WACA,UAId,gCACC,gBAKH,kBACC,gBGtMA,kHACC,sBAEA,kQACC,WAKD,0FACC,sBACA,YACA,aAGD,yBACC,6DACC,mBAEA,0JACC,iBAGD,mEACC,cAEA,wEACC,mBACA,iBAOL,wIAEC,WACA,iBAEA,kJACC,YAIC,yDACI,wBAEA,4DACI,aACA,kBAKZ,+BACC,aC1DA,wEACC,UACA,iBACA,eACA,gBAIM,iFACI,WACA,QACA,kBAEA,sFACI,YAIR,gFACI,cACA,iBAEA,qFACI,cACA,kBCvBd,0EACC,WAOD,6IACC,WAGD,mDACC,SAIA,0EACC,kBACA,QACA,WACA,iBAGD,wEACC,gBACA,WACA,YACA,cACA,QACA,kBAEA,8EACC,SAQJ,4BACC,eC1CA,2EACC,WAMF,wCACC,WACA,yBAEA,2CACC,cACA,kBAIA,uEACC,qBAGD,sFACC,gBACA,aAIF,0EACC,WAEA,8EACC,cACA,WAEA,sKACC,mBAGD,oFACC,SACA,iBACA,kBAGD,kFACC,WAEA,wFACC,WChDJ,4FACC,WCHH,gCACI,gBACA,sBACA,YAEA,kCACI,qBAEA,wCACI,gBAGJ,2CACI,iBAIR,sDACI,cACA,UAEA,4EACI,iBAEA,iGACI,aAKZ,yDACI,aACA,cAEA,kEACI,0BACA,gBClCR,+DAEI,gBACA,kBAKA,sEAEI,YAGJ,wDAEI,cACA,mBAMJ,qEAEI,WAGJ,mEAEI,YACA,gBAEA,yBALJ,mEAMQ,gBAYJ,oGAEI,iBACA,gBAGJ,4EAEI,WACA,iBACA,cAMhB,4BAEI,eACA,qBChEI,wEACI,WAIR,0CACI,gBAGJ,2CACI,gBAGI,yDACI,WACA,aAEA,oEACI,cACA,WACA,iBClBpB,gBAEI,kBACA,YACA,YACA,YAEA,oCAEI,kBACA,MACA,iBV8BY,QU7BZ,WACA,YT6KJ,yCACA,sCACA,qCACA,oCACA,iCAIA,gCACA,6BACA,4BACA,2BACA,wBAoBA,mCACA,sCACA,uCACA,2CACA,wCApBA,mCACA,gCACA,+BACA,8BACA,2BAhEA,eS5HuB,GT6HrB,aS7HqB,GT8HtB,cS9HsB,GT+H1B,kBS/H0B,GTgIjB,UShIiB,GAKnB,sCAEI,STyLR,qBACA,wBACA,yBACA,6BACA,0BS/LI,sCAEI,UTyLR,sBACA,yBACA,0BACA,8BACA,2BS/LI,sCAEI,UTyLR,qBACA,wBACA,yBACA,6BACA,0BS/LI,sCAEI,UTyLR,sBACA,yBACA,0BACA,8BACA,2BS/LI,sCAEI,UTyLR,qBACA,wBACA,yBACA,6BACA,0BS/LI,sCAEI,UTyLR,sBACA,yBACA,0BACA,8BACA,2BS/LI,sCAEI,WTyLR,qBACA,wBACA,yBACA,6BACA,0BS/LI,sCAEI,WTyLR,sBACA,yBACA,0BACA,8BACA,2BAzIC,kCS5CD,GT6GA,eS3GuB,ST4GrB,aS5GqB,ST6GtB,cS7GsB,ST8G1B,kBS9G0B,ST+GjB,US/GiB,SACnB,iBVKY,QUFhB,KTuGA,eSrGuB,WTsGrB,aStGqB,WTuGtB,cSvGsB,WTwG1B,kBSxG0B,WTyGjB,USzGiB,WACnB,iBA7CI,MTiFN,iCS7CF,GT6GA,eS3GuB,ST4GrB,aS5GqB,ST6GtB,cS7GsB,ST8G1B,kBS9G0B,ST+GjB,US/GiB,SACnB,iBVKY,QUFhB,KTuGA,eSrGuB,WTsGrB,aStGqB,WTuGtB,cSvGsB,WTwG1B,kBSxG0B,WTyGjB,USzGiB,WACnB,iBA7CI,MTkFL,gCS9CH,GT6GA,eS3GuB,ST4GrB,aS5GqB,ST6GtB,cS7GsB,ST8G1B,kBS9G0B,ST+GjB,US/GiB,SACnB,iBVKY,QUFhB,KTuGA,eSrGuB,WTsGrB,aStGqB,WTuGtB,cSvGsB,WTwG1B,kBSxG0B,WTyGjB,USzGiB,WACnB,iBA7CI,MTmFV,qCS/CE,GT6GA,eS3GuB,ST4GrB,aS5GqB,ST6GtB,cS7GsB,ST8G1B,kBS9G0B,ST+GjB,US/GiB,SACnB,iBVKY,QUFhB,KTuGA,eSrGuB,WTsGrB,aStGqB,WTuGtB,cSvGsB,WTwG1B,kBSxG0B,WTyGjB,USzGiB,WACnB,iBA7CI,MToFF,6BShDN,GT6GA,eS3GuB,ST4GrB,aS5GqB,ST6GtB,cS7GsB,ST8G1B,kBS9G0B,ST+GjB,US/GiB,SACnB,iBVKY,QUFhB,KTuGA,eSrGuB,WTsGrB,aStGqB,WTuGtB,cSvGsB,WTwG1B,kBSxG0B,WTyGjB,USzGiB,WACnB,iBA7CI,MCKJ,0KAGI,aAGJ,4OAII,wBACA,2BACA,MAhBI,MAiBJ,eAGJ,uMAII,MAxBI,MAyBJ,eACA,cACA,cC7BZ,qBACI,2BACA,sFACA,WZgD+B,QY/C/B,qCAEA,2BACI,WZ6CmC,QY5CnC,aZsCuB,QYnC3B,2BACI,+CAGJ,4BACI,WZqCkC,QYpClC,aZ6BuB,QY5BvB,iCAGJ,8BACI,yBACA,8BACA,gCACA","file":"dialog-boxes.css"}
|
lib/freemius/includes/class-freemius.php
CHANGED
@@ -408,8 +408,10 @@
|
|
408 |
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
409 |
*/
|
410 |
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
|
|
|
|
411 |
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
412 |
-
$this->store_id_slug_type_path_map( $module_id, $slug );
|
413 |
}
|
414 |
|
415 |
$this->_module_id = $module_id;
|
@@ -424,7 +426,7 @@
|
|
424 |
|
425 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
426 |
|
427 |
-
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
428 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
429 |
$this->_plugin_basename = $this->get_plugin_basename();
|
430 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
@@ -1642,7 +1644,11 @@
|
|
1642 |
|
1643 |
if ( $this->is_plugin() ) {
|
1644 |
if ( $this->_is_network_active ) {
|
1645 |
-
|
|
|
|
|
|
|
|
|
1646 |
}
|
1647 |
|
1648 |
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
@@ -1652,7 +1658,12 @@
|
|
1652 |
add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1653 |
add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1654 |
add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1655 |
-
|
|
|
|
|
|
|
|
|
|
|
1656 |
|
1657 |
add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1658 |
add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
@@ -1677,6 +1688,7 @@
|
|
1677 |
add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
|
1678 |
add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
|
1679 |
add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
|
|
|
1680 |
|
1681 |
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1682 |
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
@@ -2094,20 +2106,27 @@
|
|
2094 |
/**
|
2095 |
* Leverage backtrace to find caller plugin file path.
|
2096 |
*
|
2097 |
-
* @
|
2098 |
-
* @
|
2099 |
-
*
|
2100 |
-
* @param bool $is_init Is initiation sequence.
|
2101 |
*
|
2102 |
* @return string
|
|
|
|
|
|
|
2103 |
*/
|
2104 |
-
private function _find_caller_plugin_file( $is_init = false ) {
|
2105 |
// Try to load the cached value of the file path.
|
2106 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
2107 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
2108 |
if ( ! empty( $plugin_main_file->path ) ) {
|
2109 |
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
2110 |
if ( file_exists( $absolute_path ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
2111 |
return $absolute_path;
|
2112 |
}
|
2113 |
}
|
@@ -2148,12 +2167,11 @@
|
|
2148 |
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
2149 |
*/
|
2150 |
// Find caller module.
|
2151 |
-
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
2152 |
$this->_storage->plugin_main_file = (object) array(
|
2153 |
-
'path' => $
|
2154 |
);
|
2155 |
|
2156 |
-
return $this->get_absolute_path( $
|
2157 |
}
|
2158 |
|
2159 |
/**
|
@@ -2215,6 +2233,8 @@
|
|
2215 |
* @param number $module_id
|
2216 |
* @param string $slug
|
2217 |
*
|
|
|
|
|
2218 |
* @since 1.2.2
|
2219 |
*/
|
2220 |
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
@@ -2236,20 +2256,52 @@
|
|
2236 |
$store_option = true;
|
2237 |
}
|
2238 |
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2253 |
|
2254 |
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
2255 |
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
@@ -2260,6 +2312,8 @@
|
|
2260 |
if ( $store_option ) {
|
2261 |
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
2262 |
}
|
|
|
|
|
2263 |
}
|
2264 |
|
2265 |
/**
|
@@ -2273,8 +2327,10 @@
|
|
2273 |
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
2274 |
* SDK an internal file instead of directly from functions.php.
|
2275 |
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
|
|
|
|
2276 |
*/
|
2277 |
-
private function get_caller_main_file_and_type() {
|
2278 |
self::require_plugin_essentials();
|
2279 |
|
2280 |
$all_plugins = fs_get_plugins( true );
|
@@ -2413,10 +2469,12 @@
|
|
2413 |
}
|
2414 |
}
|
2415 |
|
2416 |
-
|
2417 |
'module_type' => $module_type,
|
2418 |
'path' => $caller_file_candidate
|
2419 |
);
|
|
|
|
|
2420 |
}
|
2421 |
|
2422 |
#----------------------------------------------------------------------------------
|
@@ -2440,7 +2498,7 @@
|
|
2440 |
/**
|
2441 |
* @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
|
2442 |
*/
|
2443 |
-
$show_deactivation_feedback_form =
|
2444 |
if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
|
2445 |
$show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
|
2446 |
} else if ( $this->is_addon() ) {
|
@@ -2545,7 +2603,7 @@
|
|
2545 |
$reason_temporary_deactivation = array(
|
2546 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
2547 |
'text' => sprintf(
|
2548 |
-
$this->get_text_inline( "It's a temporary %s
|
2549 |
strtolower( $this->is_plugin() ?
|
2550 |
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
2551 |
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
@@ -2710,6 +2768,14 @@
|
|
2710 |
|
2711 |
$this->_storage->store( 'uninstall_reason', $reason );
|
2712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2713 |
/**
|
2714 |
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
2715 |
* not support uninstall hook.
|
@@ -2731,6 +2797,73 @@
|
|
2731 |
exit;
|
2732 |
}
|
2733 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2734 |
/**
|
2735 |
* @author Leo Fajardo (@leorw)
|
2736 |
* @since 2.1.4
|
@@ -3573,8 +3706,8 @@
|
|
3573 |
static function _get_debug_log() {
|
3574 |
$logs = FS_Logger::load_db_logs(
|
3575 |
fs_request_get( 'filters', false, 'post' ),
|
3576 |
-
! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
|
3577 |
-
! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
|
3578 |
);
|
3579 |
|
3580 |
self::shoot_ajax_success( $logs );
|
@@ -3681,6 +3814,10 @@
|
|
3681 |
|
3682 |
switch_to_blog( $current_blog_id );
|
3683 |
}
|
|
|
|
|
|
|
|
|
3684 |
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
3685 |
check_admin_referer( 'simulate_trial' );
|
3686 |
|
@@ -3729,55 +3866,65 @@
|
|
3729 |
}
|
3730 |
|
3731 |
/**
|
3732 |
-
* @author
|
3733 |
-
* @since
|
|
|
|
|
3734 |
*/
|
3735 |
-
static function
|
3736 |
self::$_static_logger->entrance();
|
3737 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3738 |
if ( ! is_multisite() ) {
|
3739 |
-
$
|
3740 |
-
|
|
|
3741 |
} else {
|
3742 |
$sites = self::get_sites();
|
3743 |
|
3744 |
-
$all_plugins_installs = array();
|
3745 |
-
$all_themes_installs = array();
|
3746 |
-
|
3747 |
foreach ( $sites as $site ) {
|
3748 |
$blog_id = self::get_site_blog_id( $site );
|
3749 |
|
3750 |
-
|
3751 |
-
|
3752 |
-
foreach ( $plugins_installs as $slug => $install ) {
|
3753 |
-
if ( ! isset( $all_plugins_installs[ $slug ] ) ) {
|
3754 |
-
$all_plugins_installs[ $slug ] = array();
|
3755 |
-
}
|
3756 |
-
|
3757 |
-
$install->blog_id = $blog_id;
|
3758 |
|
3759 |
-
$
|
3760 |
-
|
|
|
|
|
3761 |
|
3762 |
-
|
3763 |
|
3764 |
-
|
3765 |
-
if ( ! isset( $all_themes_installs[ $slug ] ) ) {
|
3766 |
-
$all_themes_installs[ $slug ] = array();
|
3767 |
}
|
3768 |
|
3769 |
-
$install->blog_id = $blog_id;
|
3770 |
-
|
3771 |
-
$all_themes_installs[ $slug ][] = $install;
|
3772 |
}
|
3773 |
}
|
3774 |
}
|
3775 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3776 |
$licenses_by_module_type = self::get_all_licenses_by_module_type();
|
3777 |
|
3778 |
$vars = array(
|
3779 |
-
'plugin_sites' => $
|
3780 |
-
'theme_sites' => $
|
3781 |
'users' => self::get_all_users(),
|
3782 |
'addons' => self::get_all_addons(),
|
3783 |
'account_addons' => self::get_all_account_addons(),
|
@@ -3897,18 +4044,24 @@
|
|
3897 |
|
3898 |
$is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
|
3899 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3900 |
return $this->get_api_plugin_scope()->ping(
|
3901 |
$this->get_anonymous_id( $blog_id ),
|
3902 |
-
|
3903 |
-
'is_update' => json_encode( $is_update ),
|
3904 |
-
'version' => $version,
|
3905 |
-
'sdk' => $this->version,
|
3906 |
-
'is_admin' => json_encode( is_admin() ),
|
3907 |
-
'is_ajax' => json_encode( self::is_ajax() ),
|
3908 |
-
'is_cron' => json_encode( self::is_cron() ),
|
3909 |
-
'is_gdpr_test' => $is_gdpr_test,
|
3910 |
-
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
3911 |
-
)
|
3912 |
);
|
3913 |
}
|
3914 |
|
@@ -4074,6 +4227,17 @@
|
|
4074 |
return $unique_id;
|
4075 |
}
|
4076 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4077 |
/**
|
4078 |
* @author Vova Feldman (@svovaf)
|
4079 |
* @since 1.1.7.4
|
@@ -4884,10 +5048,8 @@
|
|
4884 |
* @since 1.1.7.3
|
4885 |
*
|
4886 |
*/
|
4887 |
-
if ( $this->is_registered() ) {
|
4888 |
-
|
4889 |
-
$this->schedule_sync_cron();
|
4890 |
-
}
|
4891 |
}
|
4892 |
|
4893 |
/**
|
@@ -4914,6 +5076,28 @@
|
|
4914 |
}
|
4915 |
|
4916 |
if ( $this->is_user_in_admin() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4917 |
if ( $this->is_addon() ) {
|
4918 |
if ( ! $this->is_parent_plugin_installed() ) {
|
4919 |
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
@@ -6914,6 +7098,24 @@
|
|
6914 |
return $this->is_cron_on( 'sync' );
|
6915 |
}
|
6916 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6917 |
/**
|
6918 |
* @author Vova Feldman (@svovaf)
|
6919 |
* @since 1.1.7.3
|
@@ -7108,13 +7310,20 @@
|
|
7108 |
/**
|
7109 |
* Show a notice that activation is currently pending.
|
7110 |
*
|
|
|
|
|
7111 |
* @author Vova Feldman (@svovaf)
|
7112 |
* @since 1.0.7
|
7113 |
*
|
7114 |
* @param bool|string $email
|
7115 |
* @param bool $is_pending_trial Since 1.2.1.5
|
|
|
7116 |
*/
|
7117 |
-
function _add_pending_activation_notice(
|
|
|
|
|
|
|
|
|
7118 |
if ( ! is_string( $email ) ) {
|
7119 |
$current_user = self::_get_current_wp_user();
|
7120 |
$email = $current_user->user_email;
|
@@ -7170,6 +7379,20 @@
|
|
7170 |
/**
|
7171 |
* Don't redirect if activating multiple plugins at once (bulk activation).
|
7172 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7173 |
} else if ( ! $is_migration ) {
|
7174 |
$this->_redirect_on_activation_hook();
|
7175 |
return;
|
@@ -7356,8 +7579,6 @@
|
|
7356 |
|
7357 |
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
7358 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
7359 |
-
|
7360 |
-
fs_enqueue_local_style( 'fs_connect', '/admin/connect.css' );
|
7361 |
}
|
7362 |
|
7363 |
/**
|
@@ -7780,7 +8001,9 @@
|
|
7780 |
$plugin_version = $this->_storage->is_anonymous_ms['version'];
|
7781 |
$network = true;
|
7782 |
} else {
|
7783 |
-
$plugin_version = $this->_storage->is_anonymous
|
|
|
|
|
7784 |
$network = false;
|
7785 |
}
|
7786 |
|
@@ -8603,7 +8826,7 @@
|
|
8603 |
* @uses Freemius::is_network_anonymous() to check if the super-admin network skipped.
|
8604 |
* @uses Freemius::is_network_delegated_connection() to check if the super-admin network delegated the connection to the site admins.
|
8605 |
*/
|
8606 |
-
function _after_new_blog_callback( $blog_id, $user_id, $domain, $path, $network_id, $meta ) {
|
8607 |
$this->_logger->entrance();
|
8608 |
|
8609 |
if ( $this->is_premium() &&
|
@@ -8701,6 +8924,27 @@
|
|
8701 |
}
|
8702 |
}
|
8703 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8704 |
/**
|
8705 |
* @author Vova Feldman (@svovaf)
|
8706 |
* @since 1.1.3
|
@@ -12868,6 +13112,75 @@
|
|
12868 |
fs_require_template( 'forms/resend-key.php', $vars );
|
12869 |
}
|
12870 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12871 |
/**
|
12872 |
* Returns a collection of IDs of installs that are associated with the context product and its add-ons, and activated with foreign licenses.
|
12873 |
*
|
@@ -13075,10 +13388,15 @@
|
|
13075 |
( $is_network_admin && $this->is_network_active() && ! $this->is_network_delegated_connection() ) ||
|
13076 |
( ! $is_network_admin && ( ! $this->is_network_active() || $this->is_delegated_connection() ) )
|
13077 |
) {
|
13078 |
-
|
13079 |
-
|
13080 |
-
|
13081 |
-
|
|
|
|
|
|
|
|
|
|
|
13082 |
}
|
13083 |
}
|
13084 |
|
@@ -13863,7 +14181,7 @@
|
|
13863 |
|
13864 |
$addon_info = $fs->_get_addon_info( $addon_id, $is_installed );
|
13865 |
|
13866 |
-
if ( ! $addon_info['is_connected'] ) {
|
13867 |
// Add-on is not associated with an install entity.
|
13868 |
continue;
|
13869 |
}
|
@@ -15134,12 +15452,17 @@
|
|
15134 |
}
|
15135 |
|
15136 |
/**
|
|
|
|
|
15137 |
* @author Leo Fajardo (@leorw)
|
15138 |
* @since 2.0.0
|
15139 |
*
|
|
|
|
|
|
|
15140 |
* @return array Active & public sites collection.
|
15141 |
*/
|
15142 |
-
static function get_sites() {
|
15143 |
if ( ! is_multisite() ) {
|
15144 |
return array();
|
15145 |
}
|
@@ -15161,6 +15484,8 @@
|
|
15161 |
'mature' => 0,
|
15162 |
'spam' => 0,
|
15163 |
'deleted' => 0,
|
|
|
|
|
15164 |
);
|
15165 |
|
15166 |
if ( function_exists( 'get_sites' ) ) {
|
@@ -15798,6 +16123,20 @@
|
|
15798 |
$this->switch_to_blog( $current_blog_id );
|
15799 |
}
|
15800 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15801 |
/**
|
15802 |
* Executed after site re-activation.
|
15803 |
*
|
@@ -16574,6 +16913,10 @@
|
|
16574 |
);
|
16575 |
}
|
16576 |
|
|
|
|
|
|
|
|
|
16577 |
return array_merge( $params, $override_with );
|
16578 |
}
|
16579 |
|
@@ -16792,7 +17135,8 @@
|
|
16792 |
true ),
|
16793 |
false,
|
16794 |
$filtered_license_key,
|
16795 |
-
! empty( $params['trial_plan_id'] )
|
|
|
16796 |
);
|
16797 |
} else if ( isset( $decoded->install_secret_key ) ) {
|
16798 |
return $this->install_with_new_user(
|
@@ -17067,7 +17411,13 @@
|
|
17067 |
);
|
17068 |
}
|
17069 |
} else if ( fs_request_has( 'pending_activation' ) ) {
|
17070 |
-
$this->set_pending_confirmation(
|
|
|
|
|
|
|
|
|
|
|
|
|
17071 |
}
|
17072 |
}
|
17073 |
}
|
@@ -17309,7 +17659,8 @@
|
|
17309 |
$email = false,
|
17310 |
$redirect = true,
|
17311 |
$license_key = false,
|
17312 |
-
$is_pending_trial = false
|
|
|
17313 |
) {
|
17314 |
if ( $this->_ignore_pending_mode ) {
|
17315 |
/**
|
@@ -17324,7 +17675,7 @@
|
|
17324 |
// Install must be activated via email since
|
17325 |
// user with the same email already exist.
|
17326 |
$this->_storage->is_pending_activation = true;
|
17327 |
-
$this->_add_pending_activation_notice( $email, $is_pending_trial );
|
17328 |
}
|
17329 |
|
17330 |
if ( ! empty( $license_key ) ) {
|
@@ -21468,9 +21819,11 @@
|
|
21468 |
private function get_latest_download_api_url( $plugin_id = false ) {
|
21469 |
$this->_logger->entrance();
|
21470 |
|
21471 |
-
|
21472 |
$this->_get_latest_version_endpoint( $plugin_id, 'zip' )
|
21473 |
);
|
|
|
|
|
21474 |
}
|
21475 |
|
21476 |
/**
|
@@ -21665,7 +22018,6 @@
|
|
21665 |
private function update_email( $new_email ) {
|
21666 |
$this->_logger->entrance();
|
21667 |
|
21668 |
-
|
21669 |
$api = $this->get_api_user_scope();
|
21670 |
$user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,email,is_verified", 'put', array(
|
21671 |
'email' => $new_email,
|
@@ -21681,7 +22033,6 @@
|
|
21681 |
$this->_store_user();
|
21682 |
} else {
|
21683 |
// handle different error cases.
|
21684 |
-
|
21685 |
}
|
21686 |
|
21687 |
return $user;
|
@@ -21757,15 +22108,32 @@
|
|
21757 |
* @uses FS_Api
|
21758 |
*
|
21759 |
* @param string $candidate_email
|
|
|
21760 |
*
|
21761 |
* @return bool Is ownership change successfully initiated.
|
21762 |
*/
|
21763 |
-
private function init_change_owner( $candidate_email ) {
|
21764 |
$this->_logger->entrance();
|
21765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21766 |
$api = $this->get_api_site_scope();
|
21767 |
$result = $api->call( "/users/{$this->_user->id}.json", 'put', array(
|
21768 |
'email' => $candidate_email,
|
|
|
|
|
21769 |
'after_confirm_url' => $this->_get_admin_page_url(
|
21770 |
'account',
|
21771 |
array( 'fs_action' => 'change_owner' )
|
@@ -21787,28 +22155,113 @@
|
|
21787 |
private function complete_change_owner() {
|
21788 |
$this->_logger->entrance();
|
21789 |
|
21790 |
-
$
|
21791 |
-
$site = new FS_Site( $site_result );
|
21792 |
-
$this->_site = $site;
|
21793 |
|
21794 |
-
|
21795 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21796 |
|
21797 |
// Validate install's user and given user.
|
21798 |
if ( $user->id != $this->_site->user_id ) {
|
|
|
|
|
21799 |
return false;
|
21800 |
}
|
21801 |
|
21802 |
-
$
|
21803 |
-
$user->secret_key = fs_request_get( 'user_secret_key' );
|
21804 |
|
21805 |
// Fetch new user information.
|
21806 |
-
$this->_user = $user;
|
21807 |
$user_result = $this->get_api_user_scope( true )->get();
|
21808 |
$user = new FS_User( $user_result );
|
21809 |
$this->_user = $user;
|
21810 |
|
21811 |
-
$this->_set_account( $user, $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21812 |
|
21813 |
return true;
|
21814 |
}
|
@@ -22220,10 +22673,15 @@
|
|
22220 |
$state = fs_request_get( 'state', 'init' );
|
22221 |
switch ( $state ) {
|
22222 |
case 'init':
|
22223 |
-
$candidate_email = fs_request_get( 'candidate_email'
|
|
|
22224 |
|
22225 |
-
if ( $this->init_change_owner( $candidate_email ) ) {
|
22226 |
-
|
|
|
|
|
|
|
|
|
22227 |
}
|
22228 |
break;
|
22229 |
case 'owner_confirmed':
|
@@ -22246,37 +22704,6 @@
|
|
22246 |
|
22247 |
return;
|
22248 |
|
22249 |
-
case 'update_email':
|
22250 |
-
check_admin_referer( 'update_email' );
|
22251 |
-
|
22252 |
-
$new_email = fs_request_get( 'fs_email_' . $this->get_unique_affix(), '' );
|
22253 |
-
$result = $this->update_email( $new_email );
|
22254 |
-
|
22255 |
-
if ( isset( $result->error ) ) {
|
22256 |
-
switch ( $result->error->code ) {
|
22257 |
-
case 'user_exist':
|
22258 |
-
$this->_admin_notices->add(
|
22259 |
-
$this->get_text_inline( 'Sorry, we could not complete the email update. Another user with the same email is already registered.', 'user-exist-message' ) . ' ' .
|
22260 |
-
sprintf( $this->get_text_inline( 'If you would like to give up the ownership of the %s\'s account to %s click the Change Ownership button.', 'user-exist-message_ownership' ), $this->_module_type, '<b>' . $new_email . '</b>' ) .
|
22261 |
-
sprintf(
|
22262 |
-
'<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s ➜</button></a>',
|
22263 |
-
$this->get_account_url( 'change_owner', array(
|
22264 |
-
'state' => 'init',
|
22265 |
-
'candidate_email' => $new_email
|
22266 |
-
) ),
|
22267 |
-
$this->get_text_inline( 'Change Ownership', 'change-ownership' )
|
22268 |
-
),
|
22269 |
-
$oops_text,
|
22270 |
-
'error'
|
22271 |
-
);
|
22272 |
-
break;
|
22273 |
-
}
|
22274 |
-
} else {
|
22275 |
-
$this->_admin_notices->add( $this->get_text_inline( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.', 'email-updated-message' ) );
|
22276 |
-
}
|
22277 |
-
|
22278 |
-
return;
|
22279 |
-
|
22280 |
case 'update_user_name':
|
22281 |
check_admin_referer( 'update_user_name' );
|
22282 |
|
@@ -23429,7 +23856,7 @@
|
|
23429 |
if (
|
23430 |
$this->is_addon() &&
|
23431 |
! $this->is_only_premium() &&
|
23432 |
-
$this->
|
23433 |
) {
|
23434 |
return;
|
23435 |
}
|
408 |
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
409 |
*/
|
410 |
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
411 |
+
$main_file = false;
|
412 |
+
|
413 |
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
414 |
+
$main_file = $this->store_id_slug_type_path_map( $module_id, $slug );
|
415 |
}
|
416 |
|
417 |
$this->_module_id = $module_id;
|
426 |
|
427 |
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
428 |
|
429 |
+
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init, $main_file );
|
430 |
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
431 |
$this->_plugin_basename = $this->get_plugin_basename();
|
432 |
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
1644 |
|
1645 |
if ( $this->is_plugin() ) {
|
1646 |
if ( $this->_is_network_active ) {
|
1647 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.1', '<' ) ) {
|
1648 |
+
add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
|
1649 |
+
} else {
|
1650 |
+
add_action( 'wp_insert_site', array( $this, '_after_wp_insert_site_callback' ) );
|
1651 |
+
}
|
1652 |
}
|
1653 |
|
1654 |
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
1658 |
add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1659 |
add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1660 |
add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1661 |
+
|
1662 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.1', '<' ) ) {
|
1663 |
+
add_action( 'deleted_blog', array( $this, '_after_site_deleted_callback' ), 10, 2 );
|
1664 |
+
} else {
|
1665 |
+
add_action( 'wp_delete_site', array( $this, '_after_wpsite_deleted_callback' ) );
|
1666 |
+
}
|
1667 |
|
1668 |
add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1669 |
add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1688 |
add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
|
1689 |
add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
|
1690 |
add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
|
1691 |
+
add_action( 'admin_init', array( &$this, '_add_email_address_update_option' ) );
|
1692 |
|
1693 |
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1694 |
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
2106 |
/**
|
2107 |
* Leverage backtrace to find caller plugin file path.
|
2108 |
*
|
2109 |
+
* @param bool $is_init Is initiation sequence.
|
2110 |
+
* @param string $main_file Since 2.4.3 expects the module's main file path to potentially purge the cached path.
|
|
|
|
|
2111 |
*
|
2112 |
* @return string
|
2113 |
+
* @since 1.0.6
|
2114 |
+
*
|
2115 |
+
* @author Vova Feldman (@svovaf)
|
2116 |
*/
|
2117 |
+
private function _find_caller_plugin_file( $is_init = false, $main_file = '' ) {
|
2118 |
// Try to load the cached value of the file path.
|
2119 |
if ( isset( $this->_storage->plugin_main_file ) ) {
|
2120 |
$plugin_main_file = $this->_storage->plugin_main_file;
|
2121 |
if ( ! empty( $plugin_main_file->path ) ) {
|
2122 |
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
2123 |
if ( file_exists( $absolute_path ) ) {
|
2124 |
+
if ( $is_init && $absolute_path !== $this->get_absolute_path( $main_file ) ) {
|
2125 |
+
// Update cached path if not matching the actual path.
|
2126 |
+
$plugin_main_file->path = $main_file;
|
2127 |
+
$this->_storage->plugin_main_file = $plugin_main_file;
|
2128 |
+
}
|
2129 |
+
|
2130 |
return $absolute_path;
|
2131 |
}
|
2132 |
}
|
2167 |
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
2168 |
*/
|
2169 |
// Find caller module.
|
|
|
2170 |
$this->_storage->plugin_main_file = (object) array(
|
2171 |
+
'path' => $main_file,
|
2172 |
);
|
2173 |
|
2174 |
+
return $this->get_absolute_path( $main_file );
|
2175 |
}
|
2176 |
|
2177 |
/**
|
2233 |
* @param number $module_id
|
2234 |
* @param string $slug
|
2235 |
*
|
2236 |
+
* @return string Since 2.4.3 return the module's main file path.
|
2237 |
+
*
|
2238 |
* @since 1.2.2
|
2239 |
*/
|
2240 |
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
2256 |
$store_option = true;
|
2257 |
}
|
2258 |
|
2259 |
+
$find_caller = empty( $id_slug_type_path_map[ $module_id ]['path'] );
|
2260 |
+
|
2261 |
+
if ( ! $find_caller ) {
|
2262 |
+
/**
|
2263 |
+
* This verification is for cases when suddenly the same module
|
2264 |
+
* is installed but with a different folder name.
|
2265 |
+
*
|
2266 |
+
* @author Vova Feldman (@svovaf)
|
2267 |
+
* @since 1.2.3
|
2268 |
+
*/
|
2269 |
+
$find_caller = ! file_exists( $this->get_absolute_path(
|
2270 |
+
$id_slug_type_path_map[ $module_id ]['path'],
|
2271 |
+
$id_slug_type_path_map[ $module_id ]['type']
|
2272 |
+
) );
|
2273 |
+
}
|
2274 |
+
|
2275 |
+
foreach ( $id_slug_type_path_map as $id => $data ) {
|
2276 |
+
if ( empty( $id ) ) {
|
2277 |
+
// Remove maps with empty module ID.
|
2278 |
+
unset( $id_slug_type_path_map[ $id ] );
|
2279 |
+
$store_option = true;
|
2280 |
+
continue;
|
2281 |
+
}
|
2282 |
+
|
2283 |
+
/**
|
2284 |
+
* If the module's main file path is identical to the main file path of another module then it means that the cached path of the current module or the other one with the same path is wrong, and therefore, we need to recalculate those paths.
|
2285 |
+
*
|
2286 |
+
* @author Vova Feldman (@svovaf)
|
2287 |
+
* @since 2.4.3
|
2288 |
+
*/
|
2289 |
+
if ( ! $find_caller ) {
|
2290 |
+
if ( $id == $module_id ) {
|
2291 |
+
continue;
|
2292 |
+
}
|
2293 |
+
|
2294 |
+
if (
|
2295 |
+
isset( $data['path'] ) &&
|
2296 |
+
$data['path'] === $id_slug_type_path_map[ $module_id ]['path']
|
2297 |
+
) {
|
2298 |
+
$find_caller = true;
|
2299 |
+
}
|
2300 |
+
}
|
2301 |
+
}
|
2302 |
+
|
2303 |
+
if ( $find_caller ) {
|
2304 |
+
$caller_main_file_and_type = $this->get_caller_main_file_and_type( $module_id );
|
2305 |
|
2306 |
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
2307 |
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
2312 |
if ( $store_option ) {
|
2313 |
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
2314 |
}
|
2315 |
+
|
2316 |
+
return $id_slug_type_path_map[ $module_id ]['path'];
|
2317 |
}
|
2318 |
|
2319 |
/**
|
2327 |
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
2328 |
* SDK an internal file instead of directly from functions.php.
|
2329 |
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
2330 |
+
*
|
2331 |
+
* @param number $module_id @since 2.4.3
|
2332 |
*/
|
2333 |
+
private function get_caller_main_file_and_type( $module_id ) {
|
2334 |
self::require_plugin_essentials();
|
2335 |
|
2336 |
$all_plugins = fs_get_plugins( true );
|
2469 |
}
|
2470 |
}
|
2471 |
|
2472 |
+
$caller_main_file_and_type = (object) array(
|
2473 |
'module_type' => $module_type,
|
2474 |
'path' => $caller_file_candidate
|
2475 |
);
|
2476 |
+
|
2477 |
+
return apply_filters( "fs_{$module_id}_caller_main_file_and_type", $caller_main_file_and_type );
|
2478 |
}
|
2479 |
|
2480 |
#----------------------------------------------------------------------------------
|
2498 |
/**
|
2499 |
* @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
|
2500 |
*/
|
2501 |
+
$show_deactivation_feedback_form = ! self::is_deactivation_snoozed();
|
2502 |
if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
|
2503 |
$show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
|
2504 |
} else if ( $this->is_addon() ) {
|
2603 |
$reason_temporary_deactivation = array(
|
2604 |
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
2605 |
'text' => sprintf(
|
2606 |
+
$this->get_text_inline( "It's a temporary %s - I'm troubleshooting an issue", 'reason-temporary-x' ),
|
2607 |
strtolower( $this->is_plugin() ?
|
2608 |
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
2609 |
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
2768 |
|
2769 |
$this->_storage->store( 'uninstall_reason', $reason );
|
2770 |
|
2771 |
+
if ( self::REASON_TEMPORARY_DEACTIVATION == $reason->id ) {
|
2772 |
+
$snooze_period = fs_request_get( 'snooze_period' );
|
2773 |
+
|
2774 |
+
if ( is_numeric( $snooze_period ) && 0 < $snooze_period ) {
|
2775 |
+
self::snooze_deactivation_form( (int) $snooze_period );
|
2776 |
+
}
|
2777 |
+
}
|
2778 |
+
|
2779 |
/**
|
2780 |
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
2781 |
* not support uninstall hook.
|
2797 |
exit;
|
2798 |
}
|
2799 |
|
2800 |
+
#--------------------------------------------------------------------------------
|
2801 |
+
#region Deactivation Feedback Snoozing
|
2802 |
+
#--------------------------------------------------------------------------------
|
2803 |
+
|
2804 |
+
/**
|
2805 |
+
* @author Vova Feldman (@svovaf)
|
2806 |
+
* @since 2.4.3
|
2807 |
+
*
|
2808 |
+
* @param int $period
|
2809 |
+
*
|
2810 |
+
* @return bool True if the value was set, false otherwise.
|
2811 |
+
*/
|
2812 |
+
private static function snooze_deactivation_form( $period ) {
|
2813 |
+
return ( 0 < $period && self::reset_deactivation_snoozing( $period ) );
|
2814 |
+
}
|
2815 |
+
|
2816 |
+
/**
|
2817 |
+
* Check if deactivation feedback form is snoozed.
|
2818 |
+
*
|
2819 |
+
* @author Vova Feldman (@svovaf)
|
2820 |
+
* @since 2.4.3
|
2821 |
+
*
|
2822 |
+
* @return bool
|
2823 |
+
*/
|
2824 |
+
static function is_deactivation_snoozed() {
|
2825 |
+
$is_snoozed = ( ! is_multisite() || fs_is_network_admin() ) ?
|
2826 |
+
get_transient( 'fs_snooze_period' ) :
|
2827 |
+
get_site_transient( 'fs_snooze_period' );
|
2828 |
+
|
2829 |
+
|
2830 |
+
return ( 'true' === $is_snoozed );
|
2831 |
+
}
|
2832 |
+
|
2833 |
+
/**
|
2834 |
+
* Reset deactivation snoozing. When `$period` is `0` will stop deactivation snoozing by deleting the transients. Otherwise, will set the transients for the selected period.
|
2835 |
+
*
|
2836 |
+
* @param int $period Period in seconds.
|
2837 |
+
*
|
2838 |
+
* @author Vova Feldman (@svovaf)
|
2839 |
+
* @since 2.4.3
|
2840 |
+
*/
|
2841 |
+
private static function reset_deactivation_snoozing( $period = 0 ) {
|
2842 |
+
$value = ( 0 === $period ) ? null : 'true';
|
2843 |
+
|
2844 |
+
if ( ! is_multisite() || fs_is_network_admin() ) {
|
2845 |
+
return set_transient( 'fs_snooze_period', $value, $period );
|
2846 |
+
} else {
|
2847 |
+
return set_site_transient( 'fs_snooze_period', $value, $period );
|
2848 |
+
}
|
2849 |
+
}
|
2850 |
+
|
2851 |
+
/**
|
2852 |
+
* The deactivation snooze expiration UNIX timestamp (in sec).
|
2853 |
+
*
|
2854 |
+
* @author Vova Feldman (@svovaf)
|
2855 |
+
* @since 2.4.3
|
2856 |
+
*
|
2857 |
+
* @return int
|
2858 |
+
*/
|
2859 |
+
static function deactivation_snooze_expires_at() {
|
2860 |
+
return ( ! is_multisite() || fs_is_network_admin() ) ?
|
2861 |
+
(int) get_option( '_transient_timeout_fs_snooze_period' ) :
|
2862 |
+
(int) get_site_option( '_site_transient_timeout_fs_snooze_period' );
|
2863 |
+
}
|
2864 |
+
|
2865 |
+
#endregion
|
2866 |
+
|
2867 |
/**
|
2868 |
* @author Leo Fajardo (@leorw)
|
2869 |
* @since 2.1.4
|
3706 |
static function _get_debug_log() {
|
3707 |
$logs = FS_Logger::load_db_logs(
|
3708 |
fs_request_get( 'filters', false, 'post' ),
|
3709 |
+
! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? intval( $_POST['limit'] ) : 200,
|
3710 |
+
! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? intval( $_POST['offset'] ) : 0
|
3711 |
);
|
3712 |
|
3713 |
self::shoot_ajax_success( $logs );
|
3814 |
|
3815 |
switch_to_blog( $current_blog_id );
|
3816 |
}
|
3817 |
+
} else if ( fs_request_is_action( 'reset_deactivation_snoozing' ) ) {
|
3818 |
+
check_admin_referer( 'reset_deactivation_snoozing' );
|
3819 |
+
|
3820 |
+
self::reset_deactivation_snoozing();
|
3821 |
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
3822 |
check_admin_referer( 'simulate_trial' );
|
3823 |
|
3866 |
}
|
3867 |
|
3868 |
/**
|
3869 |
+
* @author Leo Fajardo (@leorw)
|
3870 |
+
* @since 2.4.3
|
3871 |
+
*
|
3872 |
+
* @return array
|
3873 |
*/
|
3874 |
+
private static function get_all_modules_sites() {
|
3875 |
self::$_static_logger->entrance();
|
3876 |
|
3877 |
+
$sites_by_type = array(
|
3878 |
+
WP_FS__MODULE_TYPE_PLUGIN => array(),
|
3879 |
+
WP_FS__MODULE_TYPE_THEME => array(),
|
3880 |
+
);
|
3881 |
+
|
3882 |
+
$module_types = array_keys( $sites_by_type );
|
3883 |
+
|
3884 |
if ( ! is_multisite() ) {
|
3885 |
+
foreach ( $module_types as $type ) {
|
3886 |
+
$sites_by_type[ $type ] = self::get_all_sites( $type );
|
3887 |
+
}
|
3888 |
} else {
|
3889 |
$sites = self::get_sites();
|
3890 |
|
|
|
|
|
|
|
3891 |
foreach ( $sites as $site ) {
|
3892 |
$blog_id = self::get_site_blog_id( $site );
|
3893 |
|
3894 |
+
foreach ( $module_types as $type ) {
|
3895 |
+
$installs = self::get_all_sites( $type, $blog_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
3896 |
|
3897 |
+
foreach ( $installs as $slug => $install ) {
|
3898 |
+
if ( ! isset( $sites_by_type[ $type ][ $slug ] ) ) {
|
3899 |
+
$sites_by_type[ $type ][ $slug ] = array();
|
3900 |
+
}
|
3901 |
|
3902 |
+
$install->blog_id = $blog_id;
|
3903 |
|
3904 |
+
$sites_by_type[ $type ][ $slug ][] = $install;
|
|
|
|
|
3905 |
}
|
3906 |
|
|
|
|
|
|
|
3907 |
}
|
3908 |
}
|
3909 |
}
|
3910 |
|
3911 |
+
return $sites_by_type;
|
3912 |
+
}
|
3913 |
+
|
3914 |
+
/**
|
3915 |
+
* @author Vova Feldman (@svovaf)
|
3916 |
+
* @since 1.0.8
|
3917 |
+
*/
|
3918 |
+
static function _debug_page_render() {
|
3919 |
+
self::$_static_logger->entrance();
|
3920 |
+
|
3921 |
+
$all_modules_sites = self::get_all_modules_sites();
|
3922 |
+
|
3923 |
$licenses_by_module_type = self::get_all_licenses_by_module_type();
|
3924 |
|
3925 |
$vars = array(
|
3926 |
+
'plugin_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_PLUGIN ],
|
3927 |
+
'theme_sites' => $all_modules_sites[ WP_FS__MODULE_TYPE_THEME ],
|
3928 |
'users' => self::get_all_users(),
|
3929 |
'addons' => self::get_all_addons(),
|
3930 |
'account_addons' => self::get_all_account_addons(),
|
4044 |
|
4045 |
$is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
|
4046 |
|
4047 |
+
$params = array(
|
4048 |
+
'is_update' => json_encode( $is_update ),
|
4049 |
+
'version' => $version,
|
4050 |
+
'sdk' => $this->version,
|
4051 |
+
'is_admin' => json_encode( is_admin() ),
|
4052 |
+
'is_ajax' => json_encode( self::is_ajax() ),
|
4053 |
+
'is_cron' => json_encode( self::is_cron() ),
|
4054 |
+
'is_gdpr_test' => $is_gdpr_test,
|
4055 |
+
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
4056 |
+
);
|
4057 |
+
|
4058 |
+
if ( is_multisite() && function_exists( 'get_network' ) ) {
|
4059 |
+
$params['network_uid'] = $this->get_anonymous_network_id();
|
4060 |
+
}
|
4061 |
+
|
4062 |
return $this->get_api_plugin_scope()->ping(
|
4063 |
$this->get_anonymous_id( $blog_id ),
|
4064 |
+
$params
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4065 |
);
|
4066 |
}
|
4067 |
|
4227 |
return $unique_id;
|
4228 |
}
|
4229 |
|
4230 |
+
/**
|
4231 |
+
* Returns anonymous network ID.
|
4232 |
+
*
|
4233 |
+
* @since 2.4.3
|
4234 |
+
*
|
4235 |
+
* @return string
|
4236 |
+
*/
|
4237 |
+
function get_anonymous_network_id() {
|
4238 |
+
return $this->get_anonymous_id( get_network()->site_id );
|
4239 |
+
}
|
4240 |
+
|
4241 |
/**
|
4242 |
* @author Vova Feldman (@svovaf)
|
4243 |
* @since 1.1.7.4
|
5048 |
* @since 1.1.7.3
|
5049 |
*
|
5050 |
*/
|
5051 |
+
if ( $this->is_registered() && $this->is_tracking_allowed() ) {
|
5052 |
+
$this->maybe_schedule_sync_cron();
|
|
|
|
|
5053 |
}
|
5054 |
|
5055 |
/**
|
5076 |
}
|
5077 |
|
5078 |
if ( $this->is_user_in_admin() ) {
|
5079 |
+
if ( $this->is_registered() && fs_request_has( 'purchase_completed' ) ) {
|
5080 |
+
$this->_admin_notices->add_sticky(
|
5081 |
+
sprintf(
|
5082 |
+
/* translators: %s: License type (e.g. you have a professional license) */
|
5083 |
+
$this->get_text_inline( 'You have purchased a %s license.', 'you-have-x-license' ),
|
5084 |
+
fs_request_get( 'purchased_plan' )
|
5085 |
+
) .
|
5086 |
+
sprintf(
|
5087 |
+
$this->get_text_inline(" The %s's %sdownload link%s, license key, and installation instructions have been sent to %s. If you can't find the email after 5 min, please check your spam box.", 'post-purchase-email-sent-message' ),
|
5088 |
+
$this->get_module_label( true ),
|
5089 |
+
( FS_Plugin::is_valid_id( $this->get_bundle_id() ) ? "products' " : '' ),
|
5090 |
+
( FS_Plugin::is_valid_id( $this->get_bundle_id() ) ? 's' : '' ),
|
5091 |
+
sprintf(
|
5092 |
+
'<strong>%s</strong>',
|
5093 |
+
fs_request_get( 'purchase_email' )
|
5094 |
+
)
|
5095 |
+
),
|
5096 |
+
'plan_purchased',
|
5097 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
5098 |
+
);
|
5099 |
+
}
|
5100 |
+
|
5101 |
if ( $this->is_addon() ) {
|
5102 |
if ( ! $this->is_parent_plugin_installed() ) {
|
5103 |
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
7098 |
return $this->is_cron_on( 'sync' );
|
7099 |
}
|
7100 |
|
7101 |
+
/**
|
7102 |
+
* @author Leo Fajardo (@leorw)
|
7103 |
+
* @since 2.4.3
|
7104 |
+
*/
|
7105 |
+
private function maybe_schedule_sync_cron() {
|
7106 |
+
$next_schedule = $this->next_sync_cron();
|
7107 |
+
|
7108 |
+
// The event is properly scheduled, so no need to reschedule it.
|
7109 |
+
if (
|
7110 |
+
is_numeric( $next_schedule ) &&
|
7111 |
+
$next_schedule > time()
|
7112 |
+
) {
|
7113 |
+
return;
|
7114 |
+
}
|
7115 |
+
|
7116 |
+
$this->schedule_sync_cron();
|
7117 |
+
}
|
7118 |
+
|
7119 |
/**
|
7120 |
* @author Vova Feldman (@svovaf)
|
7121 |
* @since 1.1.7.3
|
7310 |
/**
|
7311 |
* Show a notice that activation is currently pending.
|
7312 |
*
|
7313 |
+
* @todo Add some sort of mechanism to allow users to update the email address they would like to opt-in with when $is_suspicious_email is true.
|
7314 |
+
*
|
7315 |
* @author Vova Feldman (@svovaf)
|
7316 |
* @since 1.0.7
|
7317 |
*
|
7318 |
* @param bool|string $email
|
7319 |
* @param bool $is_pending_trial Since 1.2.1.5
|
7320 |
+
* @param bool $is_suspicious_email Since 2.4.3 Set to true when there's an indication that email address the user opted in with is fake/dummy/placeholder.
|
7321 |
*/
|
7322 |
+
function _add_pending_activation_notice(
|
7323 |
+
$email = false,
|
7324 |
+
$is_pending_trial = false,
|
7325 |
+
$is_suspicious_email = false
|
7326 |
+
) {
|
7327 |
if ( ! is_string( $email ) ) {
|
7328 |
$current_user = self::_get_current_wp_user();
|
7329 |
$email = $current_user->user_email;
|
7379 |
/**
|
7380 |
* Don't redirect if activating multiple plugins at once (bulk activation).
|
7381 |
*/
|
7382 |
+
} else if (
|
7383 |
+
self::is_deactivation_snoozed() &&
|
7384 |
+
(
|
7385 |
+
// Either running the free code base.
|
7386 |
+
! $this->is_premium() ||
|
7387 |
+
// Or if has a free version.
|
7388 |
+
! $this->is_only_premium() ||
|
7389 |
+
// If premium only, don't redirect if license is activated.
|
7390 |
+
( $this->is_registered() && ! $this->can_use_premium_code() )
|
7391 |
+
)
|
7392 |
+
) {
|
7393 |
+
/**
|
7394 |
+
* Don't redirect if activating during the deactivation snooze period (aka troubleshooting), unless activating a paid product version that the admin didn't enter its license key yet.
|
7395 |
+
*/
|
7396 |
} else if ( ! $is_migration ) {
|
7397 |
$this->_redirect_on_activation_hook();
|
7398 |
return;
|
7579 |
|
7580 |
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
7581 |
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
|
|
|
|
7582 |
}
|
7583 |
|
7584 |
/**
|
8001 |
$plugin_version = $this->_storage->is_anonymous_ms['version'];
|
8002 |
$network = true;
|
8003 |
} else {
|
8004 |
+
$plugin_version = isset( $this->_storage->is_anonymous ) ?
|
8005 |
+
$this->_storage->is_anonymous['version'] :
|
8006 |
+
null;
|
8007 |
$network = false;
|
8008 |
}
|
8009 |
|
8826 |
* @uses Freemius::is_network_anonymous() to check if the super-admin network skipped.
|
8827 |
* @uses Freemius::is_network_delegated_connection() to check if the super-admin network delegated the connection to the site admins.
|
8828 |
*/
|
8829 |
+
public function _after_new_blog_callback( $blog_id, $user_id, $domain, $path, $network_id, $meta ) {
|
8830 |
$this->_logger->entrance();
|
8831 |
|
8832 |
if ( $this->is_premium() &&
|
8924 |
}
|
8925 |
}
|
8926 |
|
8927 |
+
/**
|
8928 |
+
* @author Vova Feldman (@svovaf)
|
8929 |
+
* @since 2.4.3
|
8930 |
+
*
|
8931 |
+
* @param \WP_Site $new_site
|
8932 |
+
*/
|
8933 |
+
public function _after_wp_insert_site_callback( WP_Site $new_site ) {
|
8934 |
+
$this->_logger->entrance();
|
8935 |
+
|
8936 |
+
$this->_after_new_blog_callback(
|
8937 |
+
$new_site->id,
|
8938 |
+
// Dummy user ID (not in use).
|
8939 |
+
0,
|
8940 |
+
$new_site->domain,
|
8941 |
+
$new_site->path,
|
8942 |
+
$new_site->network_id,
|
8943 |
+
// Dummy meta, not in use.
|
8944 |
+
array()
|
8945 |
+
);
|
8946 |
+
}
|
8947 |
+
|
8948 |
/**
|
8949 |
* @author Vova Feldman (@svovaf)
|
8950 |
* @since 1.1.3
|
13112 |
fs_require_template( 'forms/resend-key.php', $vars );
|
13113 |
}
|
13114 |
|
13115 |
+
/**
|
13116 |
+
* Displays an email address update dialog box when the user clicks on the email address "Edit" button on the "Account" page.
|
13117 |
+
*
|
13118 |
+
* @author Leo Fajardo (@leorw)
|
13119 |
+
* @since 2.4.3
|
13120 |
+
*/
|
13121 |
+
function _add_email_address_update_dialog_box() {
|
13122 |
+
$vars = array( 'id' => $this->_module_id );
|
13123 |
+
|
13124 |
+
fs_require_template( 'forms/email-address-update.php', $vars );
|
13125 |
+
}
|
13126 |
+
|
13127 |
+
/**
|
13128 |
+
* @author Leo Fajardo (@leorw)
|
13129 |
+
* @since 2.4.3
|
13130 |
+
*/
|
13131 |
+
function _add_email_address_update_option() {
|
13132 |
+
if ( ! $this->should_handle_user_change() ) {
|
13133 |
+
return;
|
13134 |
+
}
|
13135 |
+
|
13136 |
+
// Add email address update AJAX handler.
|
13137 |
+
$this->add_ajax_action( 'update_email_address', array( &$this, '_email_address_update_ajax_handler' ) );
|
13138 |
+
}
|
13139 |
+
|
13140 |
+
/**
|
13141 |
+
* @author Leo Fajardo (@leorw)
|
13142 |
+
* @since 2.4.3
|
13143 |
+
*/
|
13144 |
+
function _email_address_update_ajax_handler() {
|
13145 |
+
$this->check_ajax_referer( 'update_email_address' );
|
13146 |
+
|
13147 |
+
$new_email_address = fs_request_get( 'email_address' );
|
13148 |
+
$transfer_type = fs_request_get( 'transfer_type' );
|
13149 |
+
|
13150 |
+
$result = $this->update_email( $new_email_address );
|
13151 |
+
|
13152 |
+
if ( ! FS_Api::is_api_error( $result ) ) {
|
13153 |
+
self::shoot_ajax_success();
|
13154 |
+
}
|
13155 |
+
|
13156 |
+
$error = '';
|
13157 |
+
|
13158 |
+
if ( FS_Api::is_api_error_object( $result ) ) {
|
13159 |
+
switch ( $result->error->code ) {
|
13160 |
+
case 'user_exist':
|
13161 |
+
case 'account_verification_required':
|
13162 |
+
$error = array(
|
13163 |
+
'code' => 'change_ownership',
|
13164 |
+
'url' => $this->get_account_url( 'change_owner', array(
|
13165 |
+
'state' => 'init',
|
13166 |
+
'candidate_email' => $new_email_address,
|
13167 |
+
'transfer_type' => $transfer_type,
|
13168 |
+
) ),
|
13169 |
+
);
|
13170 |
+
|
13171 |
+
break;
|
13172 |
+
}
|
13173 |
+
}
|
13174 |
+
|
13175 |
+
if ( empty( $error ) ) {
|
13176 |
+
$error = is_object( $result ) ?
|
13177 |
+
var_export( $result->error, true ) :
|
13178 |
+
$result;
|
13179 |
+
}
|
13180 |
+
|
13181 |
+
self::shoot_ajax_failure( $error );
|
13182 |
+
}
|
13183 |
+
|
13184 |
/**
|
13185 |
* Returns a collection of IDs of installs that are associated with the context product and its add-ons, and activated with foreign licenses.
|
13186 |
*
|
13388 |
( $is_network_admin && $this->is_network_active() && ! $this->is_network_delegated_connection() ) ||
|
13389 |
( ! $is_network_admin && ( ! $this->is_network_active() || $this->is_delegated_connection() ) )
|
13390 |
) {
|
13391 |
+
if (
|
13392 |
+
$this->is_premium() ||
|
13393 |
+
( $this->has_paid_plan() && ! $this->has_premium_version() )
|
13394 |
+
) {
|
13395 |
+
/**
|
13396 |
+
* @since 1.2.0 Add license action link only on plugins page.
|
13397 |
+
*/
|
13398 |
+
$this->_add_license_action_link();
|
13399 |
+
}
|
13400 |
}
|
13401 |
}
|
13402 |
|
14181 |
|
14182 |
$addon_info = $fs->_get_addon_info( $addon_id, $is_installed );
|
14183 |
|
14184 |
+
if ( ! isset( $addon_info['is_connected'] ) || ! $addon_info['is_connected'] ) {
|
14185 |
// Add-on is not associated with an install entity.
|
14186 |
continue;
|
14187 |
}
|
15452 |
}
|
15453 |
|
15454 |
/**
|
15455 |
+
* @todo Implement pagination when accessing the subsites collection.
|
15456 |
+
*
|
15457 |
* @author Leo Fajardo (@leorw)
|
15458 |
* @since 2.0.0
|
15459 |
*
|
15460 |
+
* @param int $limit Default to 1,000
|
15461 |
+
* @param int $offset Default to 0
|
15462 |
+
*
|
15463 |
* @return array Active & public sites collection.
|
15464 |
*/
|
15465 |
+
static function get_sites( $limit = 1000, $offset = 0 ) {
|
15466 |
if ( ! is_multisite() ) {
|
15467 |
return array();
|
15468 |
}
|
15484 |
'mature' => 0,
|
15485 |
'spam' => 0,
|
15486 |
'deleted' => 0,
|
15487 |
+
'number' => $limit,
|
15488 |
+
'offset' => $offset,
|
15489 |
);
|
15490 |
|
15491 |
if ( function_exists( 'get_sites' ) ) {
|
16123 |
$this->switch_to_blog( $current_blog_id );
|
16124 |
}
|
16125 |
|
16126 |
+
/**
|
16127 |
+
* Executed after site deletion, called from wp_delete_site
|
16128 |
+
*
|
16129 |
+
* @author Dario Curvino (@dudo)
|
16130 |
+
* @since 2.4.3
|
16131 |
+
*
|
16132 |
+
* @param WP_Site $old_site
|
16133 |
+
*/
|
16134 |
+
public function _after_wpsite_deleted_callback( WP_Site $old_site ) {
|
16135 |
+
$this->_logger->entrance();
|
16136 |
+
|
16137 |
+
$this->_after_site_deleted_callback( $old_site->blog_id, true );
|
16138 |
+
}
|
16139 |
+
|
16140 |
/**
|
16141 |
* Executed after site re-activation.
|
16142 |
*
|
16913 |
);
|
16914 |
}
|
16915 |
|
16916 |
+
if ( is_multisite() && function_exists( 'get_network' ) ) {
|
16917 |
+
$params['network_uid'] = $this->get_anonymous_network_id();
|
16918 |
+
}
|
16919 |
+
|
16920 |
return array_merge( $params, $override_with );
|
16921 |
}
|
16922 |
|
17135 |
true ),
|
17136 |
false,
|
17137 |
$filtered_license_key,
|
17138 |
+
! empty( $params['trial_plan_id'] ),
|
17139 |
+
isset( $decoded->is_suspicious_email ) && $decoded->is_suspicious_email
|
17140 |
);
|
17141 |
} else if ( isset( $decoded->install_secret_key ) ) {
|
17142 |
return $this->install_with_new_user(
|
17411 |
);
|
17412 |
}
|
17413 |
} else if ( fs_request_has( 'pending_activation' ) ) {
|
17414 |
+
$this->set_pending_confirmation(
|
17415 |
+
fs_request_get( 'user_email' ),
|
17416 |
+
true,
|
17417 |
+
false,
|
17418 |
+
false,
|
17419 |
+
fs_request_get_bool( 'is_suspicious_email' )
|
17420 |
+
);
|
17421 |
}
|
17422 |
}
|
17423 |
}
|
17659 |
$email = false,
|
17660 |
$redirect = true,
|
17661 |
$license_key = false,
|
17662 |
+
$is_pending_trial = false,
|
17663 |
+
$is_suspicious_email = false
|
17664 |
) {
|
17665 |
if ( $this->_ignore_pending_mode ) {
|
17666 |
/**
|
17675 |
// Install must be activated via email since
|
17676 |
// user with the same email already exist.
|
17677 |
$this->_storage->is_pending_activation = true;
|
17678 |
+
$this->_add_pending_activation_notice( $email, $is_pending_trial, $is_suspicious_email );
|
17679 |
}
|
17680 |
|
17681 |
if ( ! empty( $license_key ) ) {
|
21819 |
private function get_latest_download_api_url( $plugin_id = false ) {
|
21820 |
$this->_logger->entrance();
|
21821 |
|
21822 |
+
$download_api_url = $this->get_api_site_scope()->get_signed_url(
|
21823 |
$this->_get_latest_version_endpoint( $plugin_id, 'zip' )
|
21824 |
);
|
21825 |
+
|
21826 |
+
return str_replace( 'http:', 'https:', $download_api_url );
|
21827 |
}
|
21828 |
|
21829 |
/**
|
22018 |
private function update_email( $new_email ) {
|
22019 |
$this->_logger->entrance();
|
22020 |
|
|
|
22021 |
$api = $this->get_api_user_scope();
|
22022 |
$user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,email,is_verified", 'put', array(
|
22023 |
'email' => $new_email,
|
22033 |
$this->_store_user();
|
22034 |
} else {
|
22035 |
// handle different error cases.
|
|
|
22036 |
}
|
22037 |
|
22038 |
return $user;
|
22108 |
* @uses FS_Api
|
22109 |
*
|
22110 |
* @param string $candidate_email
|
22111 |
+
* @param string $transfer_type
|
22112 |
*
|
22113 |
* @return bool Is ownership change successfully initiated.
|
22114 |
*/
|
22115 |
+
private function init_change_owner( $candidate_email, $transfer_type ) {
|
22116 |
$this->_logger->entrance();
|
22117 |
|
22118 |
+
$installs_info_by_slug_map = $this->get_parent_and_addons_installs_info();
|
22119 |
+
$install_ids = array();
|
22120 |
+
|
22121 |
+
foreach ( $installs_info_by_slug_map as $slug => $install_info ) {
|
22122 |
+
$install = $install_info['install'];
|
22123 |
+
|
22124 |
+
if ( $this->_user->id != $install->user_id ) {
|
22125 |
+
// Skip add-on installs that are not owned by the parent product's install's owner.
|
22126 |
+
continue;
|
22127 |
+
}
|
22128 |
+
|
22129 |
+
$install_ids[ $slug ] = $install->id;
|
22130 |
+
}
|
22131 |
+
|
22132 |
$api = $this->get_api_site_scope();
|
22133 |
$result = $api->call( "/users/{$this->_user->id}.json", 'put', array(
|
22134 |
'email' => $candidate_email,
|
22135 |
+
'transfer_type' => $transfer_type,
|
22136 |
+
'install_ids' => implode( ',', array_values( $install_ids ) ),
|
22137 |
'after_confirm_url' => $this->_get_admin_page_url(
|
22138 |
'account',
|
22139 |
array( 'fs_action' => 'change_owner' )
|
22155 |
private function complete_change_owner() {
|
22156 |
$this->_logger->entrance();
|
22157 |
|
22158 |
+
$install_ids = fs_request_get( 'install_ids' );
|
|
|
|
|
22159 |
|
22160 |
+
if ( ! empty( $install_ids ) ) {
|
22161 |
+
$install_ids = explode( ',', $install_ids );
|
22162 |
+
|
22163 |
+
foreach ( $install_ids as $key => $install_id ) {
|
22164 |
+
if ( ! FS_Site::is_valid_id( $install_id ) ) {
|
22165 |
+
unset( $install_ids[ $key ] );
|
22166 |
+
}
|
22167 |
+
}
|
22168 |
+
}
|
22169 |
+
|
22170 |
+
if ( ! is_array( $install_ids ) ) {
|
22171 |
+
$install_ids = array();
|
22172 |
+
}
|
22173 |
+
|
22174 |
+
$user = new FS_User();
|
22175 |
+
$user->id = fs_request_get( 'user_id' );
|
22176 |
+
$user->public_key = fs_request_get( 'user_public_key' );
|
22177 |
+
$user->secret_key = fs_request_get( 'user_secret_key' );
|
22178 |
+
|
22179 |
+
$prev_user = $this->_user;
|
22180 |
+
$this->_user = $user;
|
22181 |
+
|
22182 |
+
$result = $this->get_api_user_scope( true )->get(
|
22183 |
+
"/installs.json?install_ids=" . implode( ',', $install_ids )
|
22184 |
+
);
|
22185 |
+
|
22186 |
+
$current_blog_sites = self::get_all_sites( $this->get_module_type() );
|
22187 |
+
|
22188 |
+
if ( $this->is_api_result_object( $result, 'installs' ) ) {
|
22189 |
+
$site_id_slug_map = array();
|
22190 |
+
|
22191 |
+
foreach ( $current_blog_sites as $slug => $site ) {
|
22192 |
+
$site_id_slug_map[ $site->id ] = $slug;
|
22193 |
+
}
|
22194 |
+
|
22195 |
+
foreach ( $result->installs as $install ) {
|
22196 |
+
$site = new FS_Site( $install );
|
22197 |
+
|
22198 |
+
if ( ! isset( $site_id_slug_map[ $install->id ] ) ) {
|
22199 |
+
continue;
|
22200 |
+
}
|
22201 |
+
|
22202 |
+
$current_blog_sites[ $site_id_slug_map[ $install->id ] ] = clone $site;
|
22203 |
+
|
22204 |
+
if ( $this->_site->id == $site->id ) {
|
22205 |
+
$this->_site = $site;
|
22206 |
+
}
|
22207 |
+
}
|
22208 |
+
}
|
22209 |
|
22210 |
// Validate install's user and given user.
|
22211 |
if ( $user->id != $this->_site->user_id ) {
|
22212 |
+
$this->_user = $prev_user;
|
22213 |
+
|
22214 |
return false;
|
22215 |
}
|
22216 |
|
22217 |
+
$this->set_account_option( 'sites', $current_blog_sites, true );
|
|
|
22218 |
|
22219 |
// Fetch new user information.
|
|
|
22220 |
$user_result = $this->get_api_user_scope( true )->get();
|
22221 |
$user = new FS_User( $user_result );
|
22222 |
$this->_user = $user;
|
22223 |
|
22224 |
+
$this->_set_account( $user, $this->_site );
|
22225 |
+
|
22226 |
+
$remove_user = true;
|
22227 |
+
$all_modules_sites = self::get_all_modules_sites();
|
22228 |
+
|
22229 |
+
foreach ( $all_modules_sites as $sites_by_module_type ) {
|
22230 |
+
foreach ( $sites_by_module_type as $sites_by_slug ) {
|
22231 |
+
foreach ( $sites_by_slug as $site ) {
|
22232 |
+
if ( $prev_user->id == $site->user_id ) {
|
22233 |
+
$remove_user = false;
|
22234 |
+
break;
|
22235 |
+
}
|
22236 |
+
}
|
22237 |
+
|
22238 |
+
if ( ! $remove_user ) {
|
22239 |
+
break;
|
22240 |
+
}
|
22241 |
+
}
|
22242 |
+
|
22243 |
+
if ( ! $remove_user ) {
|
22244 |
+
break;
|
22245 |
+
}
|
22246 |
+
}
|
22247 |
+
|
22248 |
+
if ( $remove_user ) {
|
22249 |
+
$users = self::get_all_users();
|
22250 |
+
|
22251 |
+
if ( isset( $users[ $prev_user->id ] ) ) {
|
22252 |
+
unset( $users[ $prev_user->id ] );
|
22253 |
+
} else {
|
22254 |
+
// If the prev user wasn't found by the key, iterate over the users collection.
|
22255 |
+
foreach ( $users as $key => $user ) {
|
22256 |
+
if ( $user->id == $prev_user->id ) {
|
22257 |
+
unset( $users[ $key ] );
|
22258 |
+
break;
|
22259 |
+
}
|
22260 |
+
}
|
22261 |
+
}
|
22262 |
+
|
22263 |
+
$this->set_account_option( 'users', $users, true );
|
22264 |
+
}
|
22265 |
|
22266 |
return true;
|
22267 |
}
|
22673 |
$state = fs_request_get( 'state', 'init' );
|
22674 |
switch ( $state ) {
|
22675 |
case 'init':
|
22676 |
+
$candidate_email = fs_request_get( 'candidate_email' );
|
22677 |
+
$transfer_type = fs_request_get( 'transfer_type' );
|
22678 |
|
22679 |
+
if ( $this->init_change_owner( $candidate_email, $transfer_type ) ) {
|
22680 |
+
if ( 'transfer' === $transfer_type ) {
|
22681 |
+
$this->_admin_notices->add( sprintf( $this->get_text_inline( 'A confirmation email was just sent to %s. The email owner must confirm the update within the next 4 hours.', 'change-owner-request-sent-x-transfer' ), '<b>' . $this->_user->email . '</b>' ) );
|
22682 |
+
} else {
|
22683 |
+
$this->_admin_notices->add( sprintf( $this->get_text_inline( 'A confirmation email was just sent to %s. You must confirm the update within the next 4 hours. If you cannot find the email, please check your spam folder.', 'change-owner-request-sent-x' ), '<b>' . $this->_user->email . '</b>' ) );
|
22684 |
+
}
|
22685 |
}
|
22686 |
break;
|
22687 |
case 'owner_confirmed':
|
22704 |
|
22705 |
return;
|
22706 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22707 |
case 'update_user_name':
|
22708 |
check_admin_referer( 'update_user_name' );
|
22709 |
|
23856 |
if (
|
23857 |
$this->is_addon() &&
|
23858 |
! $this->is_only_premium() &&
|
23859 |
+
$this->get_parent_instance()->is_anonymous()
|
23860 |
) {
|
23861 |
return;
|
23862 |
}
|
lib/freemius/includes/class-fs-plugin-updater.php
CHANGED
@@ -240,7 +240,11 @@
|
|
240 |
* @since 2.0.0
|
241 |
*/
|
242 |
private function add_transient_filters() {
|
243 |
-
if (
|
|
|
|
|
|
|
|
|
244 |
$this->_logger->log( 'Opted out sites cannot receive automatic software updates.' );
|
245 |
|
246 |
return;
|
@@ -610,11 +614,9 @@
|
|
610 |
if ( ! isset( $this->_translation_updates ) ) {
|
611 |
$this->_translation_updates = array();
|
612 |
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
$this->_translation_updates = $translation_updates;
|
617 |
-
}
|
618 |
}
|
619 |
}
|
620 |
|
240 |
* @since 2.0.0
|
241 |
*/
|
242 |
private function add_transient_filters() {
|
243 |
+
if (
|
244 |
+
$this->_fs->is_premium() &&
|
245 |
+
$this->_fs->is_registered() &&
|
246 |
+
! $this->_fs->is_tracking_allowed()
|
247 |
+
) {
|
248 |
$this->_logger->log( 'Opted out sites cannot receive automatic software updates.' );
|
249 |
|
250 |
return;
|
614 |
if ( ! isset( $this->_translation_updates ) ) {
|
615 |
$this->_translation_updates = array();
|
616 |
|
617 |
+
$translation_updates = $this->fetch_wp_org_module_translation_updates( $module_type, $slug );
|
618 |
+
if ( ! empty( $translation_updates ) ) {
|
619 |
+
$this->_translation_updates = $translation_updates;
|
|
|
|
|
620 |
}
|
621 |
}
|
622 |
|
lib/freemius/includes/entities/class-fs-user.php
CHANGED
@@ -56,7 +56,18 @@
|
|
56 |
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
57 |
}
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
return 'user';
|
61 |
}
|
62 |
}
|
56 |
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
57 |
}
|
58 |
|
59 |
+
/**
|
60 |
+
* @author Leo Fajardo (@leorw)
|
61 |
+
* @since 2.4.2
|
62 |
+
*
|
63 |
+
* @return bool
|
64 |
+
*/
|
65 |
+
function is_beta() {
|
66 |
+
// Return `false` since this is just for backward compatibility.
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
|
70 |
+
static function get_type() {
|
71 |
return 'user';
|
72 |
}
|
73 |
}
|
lib/freemius/includes/fs-core-functions.php
CHANGED
@@ -1349,7 +1349,7 @@
|
|
1349 |
function fs_is_plugin_uninstall() {
|
1350 |
return (
|
1351 |
defined( 'WP_UNINSTALL_PLUGIN' ) ||
|
1352 |
-
( 0 < did_action( '
|
1353 |
);
|
1354 |
}
|
1355 |
}
|
1349 |
function fs_is_plugin_uninstall() {
|
1350 |
return (
|
1351 |
defined( 'WP_UNINSTALL_PLUGIN' ) ||
|
1352 |
+
( 0 < did_action( 'pre_uninstall_plugin' ) )
|
1353 |
);
|
1354 |
}
|
1355 |
}
|
lib/freemius/includes/fs-plugin-info-dialog.php
CHANGED
@@ -1306,8 +1306,8 @@
|
|
1306 |
<?php endif ?>
|
1307 |
</div>
|
1308 |
</div>
|
1309 |
-
</div>
|
1310 |
<?php endforeach ?>
|
|
|
1311 |
<?php endif ?>
|
1312 |
<?php endif ?>
|
1313 |
<div>
|
1306 |
<?php endif ?>
|
1307 |
</div>
|
1308 |
</div>
|
|
|
1309 |
<?php endforeach ?>
|
1310 |
+
</div>
|
1311 |
<?php endif ?>
|
1312 |
<?php endif ?>
|
1313 |
<div>
|
lib/freemius/includes/managers/class-fs-admin-notice-manager.php
CHANGED
@@ -219,9 +219,6 @@
|
|
219 |
return;
|
220 |
}
|
221 |
|
222 |
-
|
223 |
-
$show_admin_notices = ( ! $this->is_gutenberg_page() );
|
224 |
-
|
225 |
foreach ( $this->_notices as $id => $msg ) {
|
226 |
if ( isset( $msg['wp_user_id'] ) && is_numeric( $msg['wp_user_id'] ) ) {
|
227 |
if ( get_current_user_id() != $msg['wp_user_id'] ) {
|
@@ -264,7 +261,7 @@
|
|
264 |
$show_notice = call_user_func_array( 'fs_apply_filter', array(
|
265 |
$this->_module_unique_affix,
|
266 |
'show_admin_notice',
|
267 |
-
$show_admin_notices,
|
268 |
$msg
|
269 |
) );
|
270 |
|
@@ -318,6 +315,30 @@
|
|
318 |
return false;
|
319 |
}
|
320 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
/**
|
322 |
* Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
|
323 |
*
|
219 |
return;
|
220 |
}
|
221 |
|
|
|
|
|
|
|
222 |
foreach ( $this->_notices as $id => $msg ) {
|
223 |
if ( isset( $msg['wp_user_id'] ) && is_numeric( $msg['wp_user_id'] ) ) {
|
224 |
if ( get_current_user_id() != $msg['wp_user_id'] ) {
|
261 |
$show_notice = call_user_func_array( 'fs_apply_filter', array(
|
262 |
$this->_module_unique_affix,
|
263 |
'show_admin_notice',
|
264 |
+
$this->show_admin_notices(),
|
265 |
$msg
|
266 |
) );
|
267 |
|
315 |
return false;
|
316 |
}
|
317 |
|
318 |
+
/**
|
319 |
+
* Check if admin notices should be shown on page. E.g., we don't want to show notices in the Visual Editor.
|
320 |
+
*
|
321 |
+
* @author Xiaheng Chen (@xhchen)
|
322 |
+
* @since 2.4.2
|
323 |
+
*
|
324 |
+
* @return bool
|
325 |
+
*/
|
326 |
+
function show_admin_notices() {
|
327 |
+
global $pagenow;
|
328 |
+
|
329 |
+
if ( 'about.php' === $pagenow ) {
|
330 |
+
// Don't show admin notices on the About page.
|
331 |
+
return false;
|
332 |
+
}
|
333 |
+
|
334 |
+
if ( $this->is_gutenberg_page() ) {
|
335 |
+
// Don't show admin notices in Gutenberg (visual editor).
|
336 |
+
return false;
|
337 |
+
}
|
338 |
+
|
339 |
+
return true;
|
340 |
+
}
|
341 |
+
|
342 |
/**
|
343 |
* Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
|
344 |
*
|
lib/freemius/languages/freemius-cs_CZ.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-da_DK.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-en.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-es_ES.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-fr_FR.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-he_IL.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-hu_HU.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-it_IT.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-ja.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-nl_NL.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-ru_RU.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-ta.mo
CHANGED
Binary file
|
lib/freemius/languages/freemius-zh_CN.mo
CHANGED
Binary file
|
lib/freemius/start.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
-
$this_sdk_version = '2.4.2';
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
$this_sdk_version = '2.4.2.16';
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
lib/freemius/templates/account.php
CHANGED
@@ -46,6 +46,7 @@
|
|
46 |
$site = $fs->get_site();
|
47 |
$name = $user->get_name();
|
48 |
$license = $fs->_get_license();
|
|
|
49 |
$is_data_debug_mode = $fs->is_data_debug_mode();
|
50 |
$is_whitelabeled = $fs->is_whitelabeled();
|
51 |
$subscription = ( is_object( $license ) ?
|
@@ -62,6 +63,10 @@
|
|
62 |
$fs->_add_license_activation_dialog_box();
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
65 |
$ids_of_installs_activated_with_foreign_licenses = $fs->should_handle_user_change() ?
|
66 |
$fs->get_installs_ids_with_foreign_licenses() :
|
67 |
array();
|
@@ -645,7 +650,7 @@
|
|
645 |
<?php endif ?>
|
646 |
<?php
|
647 |
elseif ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
|
648 |
-
<?php if ( ! $is_whitelabeled ) : ?>
|
649 |
<button class="button button-small fs-toggle-visibility"><?php fs_esc_html_echo_x_inline( 'Show', 'verb', 'show', $slug ) ?></button>
|
650 |
<?php endif ?>
|
651 |
<?php if ('license_key' === $p['id']) : ?>
|
@@ -658,6 +663,7 @@
|
|
658 |
'user_name'
|
659 |
) ) )
|
660 |
) : ?>
|
|
|
661 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"
|
662 |
onsubmit="var val = prompt('<?php echo esc_attr( sprintf(
|
663 |
/* translators: %s: User's account property (e.g. name, email) */
|
@@ -668,9 +674,10 @@
|
|
668 |
<input type="hidden" name="fs_<?php echo $p['id'] ?>_<?php echo $fs->get_unique_affix() ?>"
|
669 |
value="">
|
670 |
<?php wp_nonce_field( 'update_' . $p['id'] ) ?>
|
671 |
-
<input type="submit" class="button button-small"
|
672 |
value="<?php echo fs_esc_attr_x_inline( 'Edit', 'verb', 'edit', $slug ) ?>">
|
673 |
</form>
|
|
|
674 |
<?php elseif ( 'user_id' === $p['id'] && ! empty( $ids_of_installs_activated_with_foreign_licenses ) ) : ?>
|
675 |
<input id="fs_change_user" type="submit" class="button button-small"
|
676 |
value="<?php echo fs_esc_attr_inline( 'Change User', 'change-user', $slug ) ?>">
|
46 |
$site = $fs->get_site();
|
47 |
$name = $user->get_name();
|
48 |
$license = $fs->_get_license();
|
49 |
+
$is_license_foreign = ( $user->id != $license->user_id );
|
50 |
$is_data_debug_mode = $fs->is_data_debug_mode();
|
51 |
$is_whitelabeled = $fs->is_whitelabeled();
|
52 |
$subscription = ( is_object( $license ) ?
|
63 |
$fs->_add_license_activation_dialog_box();
|
64 |
}
|
65 |
|
66 |
+
if ( $fs->should_handle_user_change() ) {
|
67 |
+
$fs->_add_email_address_update_dialog_box();
|
68 |
+
}
|
69 |
+
|
70 |
$ids_of_installs_activated_with_foreign_licenses = $fs->should_handle_user_change() ?
|
71 |
$fs->get_installs_ids_with_foreign_licenses() :
|
72 |
array();
|
650 |
<?php endif ?>
|
651 |
<?php
|
652 |
elseif ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
|
653 |
+
<?php if ( ! $is_whitelabeled && ( 'site_secret_key' === $p['id'] || ! $is_license_foreign ) ) : ?>
|
654 |
<button class="button button-small fs-toggle-visibility"><?php fs_esc_html_echo_x_inline( 'Show', 'verb', 'show', $slug ) ?></button>
|
655 |
<?php endif ?>
|
656 |
<?php if ('license_key' === $p['id']) : ?>
|
663 |
'user_name'
|
664 |
) ) )
|
665 |
) : ?>
|
666 |
+
<?php if ( 'email' !== $p['id'] || ! fs_is_network_admin() ) : ?>
|
667 |
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"
|
668 |
onsubmit="var val = prompt('<?php echo esc_attr( sprintf(
|
669 |
/* translators: %s: User's account property (e.g. name, email) */
|
674 |
<input type="hidden" name="fs_<?php echo $p['id'] ?>_<?php echo $fs->get_unique_affix() ?>"
|
675 |
value="">
|
676 |
<?php wp_nonce_field( 'update_' . $p['id'] ) ?>
|
677 |
+
<input type="submit" class="button button-small <?php if ( 'email' === $p['id'] ) echo 'button-edit-email-address' ?>"
|
678 |
value="<?php echo fs_esc_attr_x_inline( 'Edit', 'verb', 'edit', $slug ) ?>">
|
679 |
</form>
|
680 |
+
<?php endif ?>
|
681 |
<?php elseif ( 'user_id' === $p['id'] && ! empty( $ids_of_installs_activated_with_foreign_licenses ) ) : ?>
|
682 |
<input id="fs_change_user" type="submit" class="button button-small"
|
683 |
value="<?php echo fs_esc_attr_inline( 'Change User', 'change-user', $slug ) ?>">
|
lib/freemius/templates/connect.php
CHANGED
@@ -25,6 +25,15 @@
|
|
25 |
|
26 |
$fs->_enqueue_connect_essentials();
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
$current_user = Freemius::_get_current_wp_user();
|
29 |
|
30 |
$first_name = $current_user->user_firstname;
|
@@ -152,11 +161,11 @@
|
|
152 |
fs_require_once_template( 'plugin-icon.php', $vars );
|
153 |
?>
|
154 |
<i class="dashicons dashicons-plus fs-second"></i>
|
155 |
-
<img class="fs-connect-logo" width="80" height="80" src="//img.freemius.com/connect
|
156 |
</div>
|
157 |
<div class="fs-content">
|
158 |
<?php if ( ! empty( $error ) ) : ?>
|
159 |
-
<p class="fs-error"><?php echo esc_html( $error ) ?></p>
|
160 |
<?php endif ?>
|
161 |
<p><?php
|
162 |
$button_label = fs_text_inline( 'Allow & Continue', 'opt-in-connect', $slug );
|
@@ -208,11 +217,6 @@
|
|
208 |
|
209 |
$message = $fs->apply_filters(
|
210 |
$filter,
|
211 |
-
($is_network_upgrade_mode ?
|
212 |
-
'' :
|
213 |
-
/* translators: %s: name (e.g. Hey John,) */
|
214 |
-
$hey_x_text . '<br>'
|
215 |
-
) .
|
216 |
sprintf(
|
217 |
esc_html( $default_optin_message ),
|
218 |
'<b>' . esc_html( $fs->get_plugin_name() ) . '</b>',
|
25 |
|
26 |
$fs->_enqueue_connect_essentials();
|
27 |
|
28 |
+
/**
|
29 |
+
* Enqueueing the styles in `_enqueue_connect_essentials()` is too late, as we need them in the HEADER. Therefore, inject the styles inline to avoid FOUC.
|
30 |
+
*
|
31 |
+
* @author Vova Feldman (@svovaf)
|
32 |
+
*/
|
33 |
+
echo "<style>\n";
|
34 |
+
include WP_FS__DIR_CSS . '/admin/connect.css';
|
35 |
+
echo "</style>\n";
|
36 |
+
|
37 |
$current_user = Freemius::_get_current_wp_user();
|
38 |
|
39 |
$first_name = $current_user->user_firstname;
|
161 |
fs_require_once_template( 'plugin-icon.php', $vars );
|
162 |
?>
|
163 |
<i class="dashicons dashicons-plus fs-second"></i>
|
164 |
+
<img class="fs-connect-logo" width="80" height="80" src="//img.freemius.com/logo/connect.svg"/>
|
165 |
</div>
|
166 |
<div class="fs-content">
|
167 |
<?php if ( ! empty( $error ) ) : ?>
|
168 |
+
<p class="fs-error"><?php echo $fs->apply_filters( 'connect_error_esc_html', esc_html( $error ) ) ?></p>
|
169 |
<?php endif ?>
|
170 |
<p><?php
|
171 |
$button_label = fs_text_inline( 'Allow & Continue', 'opt-in-connect', $slug );
|
217 |
|
218 |
$message = $fs->apply_filters(
|
219 |
$filter,
|
|
|
|
|
|
|
|
|
|
|
220 |
sprintf(
|
221 |
esc_html( $default_optin_message ),
|
222 |
'<b>' . esc_html( $fs->get_plugin_name() ) . '</b>',
|
lib/freemius/templates/debug.php
CHANGED
@@ -77,6 +77,16 @@
|
|
77 |
<button class="button"><?php fs_esc_html_echo_inline( 'Clear Updates Transients' ) ?></button>
|
78 |
</form>
|
79 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<td>
|
81 |
<!-- Sync Data with Server -->
|
82 |
<form action="" method="POST">
|
@@ -480,8 +490,15 @@
|
|
480 |
* @var FS_User[] $users
|
481 |
*/
|
482 |
$users = $VARS['users'];
|
|
|
483 |
$users_with_developer_license_by_id = array();
|
484 |
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
foreach ( $module_types as $module_type ) {
|
486 |
/**
|
487 |
* @var FS_Plugin_License[] $licenses
|
@@ -574,7 +591,7 @@
|
|
574 |
<td><?php echo $license->is_block_features ? 'Blocking' : 'Flexible' ?></td>
|
575 |
<td><?php echo $license->is_whitelabeled ? 'Whitelabeled' : 'Normal' ?></td>
|
576 |
<td><?php
|
577 |
-
echo $license->is_whitelabeled ?
|
578 |
$license->get_html_escaped_masked_secret_key() :
|
579 |
esc_html( $license->secret_key );
|
580 |
?></td>
|
77 |
<button class="button"><?php fs_esc_html_echo_inline( 'Clear Updates Transients' ) ?></button>
|
78 |
</form>
|
79 |
</td>
|
80 |
+
<?php if ( Freemius::is_deactivation_snoozed() ) : ?>
|
81 |
+
<td>
|
82 |
+
<!-- Reset Deactivation Snoozing -->
|
83 |
+
<form action="" method="POST">
|
84 |
+
<input type="hidden" name="fs_action" value="reset_deactivation_snoozing">
|
85 |
+
<?php wp_nonce_field( 'reset_deactivation_snoozing' ) ?>
|
86 |
+
<button class="button"><?php fs_esc_html_echo_inline( 'Reset Deactivation Snoozing' ) ?> (Expires in <?php echo ( Freemius::deactivation_snooze_expires_at() - time() ) ?> sec)</button>
|
87 |
+
</form>
|
88 |
+
</td>
|
89 |
+
<?php endif ?>
|
90 |
<td>
|
91 |
<!-- Sync Data with Server -->
|
92 |
<form action="" method="POST">
|
490 |
* @var FS_User[] $users
|
491 |
*/
|
492 |
$users = $VARS['users'];
|
493 |
+
$user_ids_map = array();
|
494 |
$users_with_developer_license_by_id = array();
|
495 |
|
496 |
+
if ( is_array( $users ) && ! empty( $users ) ) {
|
497 |
+
foreach ( $users as $user ) {
|
498 |
+
$user_ids_map[ $user->id ] = true;
|
499 |
+
}
|
500 |
+
}
|
501 |
+
|
502 |
foreach ( $module_types as $module_type ) {
|
503 |
/**
|
504 |
* @var FS_Plugin_License[] $licenses
|
591 |
<td><?php echo $license->is_block_features ? 'Blocking' : 'Flexible' ?></td>
|
592 |
<td><?php echo $license->is_whitelabeled ? 'Whitelabeled' : 'Normal' ?></td>
|
593 |
<td><?php
|
594 |
+
echo ( $license->is_whitelabeled || ! isset( $user_ids_map[ $license->user_id ] ) ) ?
|
595 |
$license->get_html_escaped_masked_secret_key() :
|
596 |
esc_html( $license->secret_key );
|
597 |
?></td>
|
lib/freemius/templates/forms/deactivation/form.php
CHANGED
@@ -24,6 +24,7 @@
|
|
24 |
$anonymous_feedback_checkbox_html = '';
|
25 |
|
26 |
$reasons_list_items_html = '';
|
|
|
27 |
|
28 |
if ( $show_deactivation_feedback_form ) {
|
29 |
$reasons = $VARS['reasons'];
|
@@ -64,6 +65,41 @@ HTML;
|
|
64 |
fs_esc_html_inline( 'Anonymous feedback', 'anonymous-feedback', $slug )
|
65 |
);
|
66 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
// Aliases.
|
@@ -71,6 +107,13 @@ HTML;
|
|
71 |
$theme_text = fs_text_inline( 'Theme', 'theme', $slug );
|
72 |
$activate_x_text = fs_text_inline( 'Activate %s', 'activate-x', $slug );
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
|
75 |
|
76 |
if ( ! empty( $subscription_cancellation_dialog_box_template_params ) ) {
|
@@ -92,6 +135,7 @@ HTML;
|
|
92 |
+ ' </div>'
|
93 |
+ ' <div class="fs-modal-footer">'
|
94 |
+ ' <?php echo $anonymous_feedback_checkbox_html ?>'
|
|
|
95 |
+ ' <a href="#" class="button button-secondary button-deactivate"></a>'
|
96 |
+ ' <a href="#" class="button button-secondary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
|
97 |
+ ' </div>'
|
@@ -101,6 +145,7 @@ HTML;
|
|
101 |
selectedReasonID = false,
|
102 |
redirectLink = '',
|
103 |
$anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
|
|
|
104 |
isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
|
105 |
otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
|
106 |
dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
|
@@ -230,10 +275,6 @@ HTML;
|
|
230 |
} ?>
|
231 |
|
232 |
$modal.on('input propertychange', '.reason-input input', function () {
|
233 |
-
if (!isOtherReasonSelected()) {
|
234 |
-
return;
|
235 |
-
}
|
236 |
-
|
237 |
var reason = $(this).val().trim();
|
238 |
|
239 |
/**
|
@@ -241,9 +282,12 @@ HTML;
|
|
241 |
* to change the message color back to default.
|
242 |
*/
|
243 |
if (reason.length > 0) {
|
244 |
-
|
245 |
-
|
246 |
-
|
|
|
|
|
|
|
247 |
});
|
248 |
|
249 |
$modal.on('blur', '.reason-input input', function () {
|
@@ -260,8 +304,8 @@ HTML;
|
|
260 |
*/
|
261 |
if (0 === $userReason.val().trim().length) {
|
262 |
$('.message').addClass('error-message');
|
263 |
-
|
264 |
-
|
265 |
}, 150);
|
266 |
});
|
267 |
|
@@ -276,9 +320,28 @@ HTML;
|
|
276 |
var _this = $(this);
|
277 |
|
278 |
if (_this.hasClass('allow-deactivate')) {
|
279 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
if ( ! deleteThemeUpdateData ) {
|
283 |
// If no selected reason, just deactivate the plugin.
|
284 |
window.location.href = redirectLink;
|
@@ -292,8 +355,7 @@ HTML;
|
|
292 |
module_id: '<?php echo $fs->get_id() ?>'
|
293 |
},
|
294 |
beforeSend: function() {
|
295 |
-
_parent.find( '.fs-modal-footer .button' ).
|
296 |
-
_parent.find( '.fs-modal-footer .button-secondary' ).text( 'Processing...' );
|
297 |
},
|
298 |
complete : function() {
|
299 |
window.location.href = redirectLink;
|
@@ -304,28 +366,27 @@ HTML;
|
|
304 |
return;
|
305 |
}
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
}
|
314 |
|
315 |
$.ajax({
|
316 |
url : ajaxurl,
|
317 |
method : 'POST',
|
318 |
data : {
|
319 |
-
action
|
320 |
-
security
|
321 |
-
module_id
|
322 |
-
reason_id
|
323 |
-
reason_info
|
324 |
-
is_anonymous: isAnonymousFeedback()
|
|
|
325 |
},
|
326 |
beforeSend: function () {
|
327 |
-
_parent.find('.fs-modal-footer .button').
|
328 |
-
_parent.find('.fs-modal-footer .button-secondary').text('Processing...');
|
329 |
},
|
330 |
complete : function () {
|
331 |
// Do not show the dialog box, deactivate the plugin.
|
@@ -365,20 +426,17 @@ HTML;
|
|
365 |
|
366 |
$modal.find('.reason-input').remove();
|
367 |
$modal.find( '.internal-message' ).hide();
|
368 |
-
$modal.find('.button-deactivate').html('<?php echo esc_js(
|
369 |
-
fs_text_inline( 'Submit & %s', 'deactivation-modal-button-submit' , $slug ),
|
370 |
-
$fs->is_plugin() ?
|
371 |
-
$deactivate_text :
|
372 |
-
sprintf( $activate_x_text, $theme_text )
|
373 |
-
) ) ?>');
|
374 |
-
|
375 |
-
enableDeactivateButton();
|
376 |
|
377 |
if ( _parent.hasClass( 'has-internal-message' ) ) {
|
378 |
_parent.find( '.internal-message' ).show();
|
379 |
}
|
380 |
|
381 |
-
if (_parent.hasClass('has-input')) {
|
|
|
|
|
|
|
|
|
382 |
var inputType = _parent.data('input-type'),
|
383 |
inputPlaceholder = _parent.data('input-placeholder'),
|
384 |
reasonInputHtml = '<div class="reason-input"><span class="message"></span>' + ( ( 'textfield' === inputType ) ? '<input type="text" maxlength="128" />' : '<textarea rows="5" maxlength="128"></textarea>' ) + '</div>';
|
@@ -388,11 +446,60 @@ HTML;
|
|
388 |
|
389 |
if (isOtherReasonSelected()) {
|
390 |
showMessage('<?php echo esc_js( fs_text_inline( 'Kindly tell us the reason so we can improve.', 'ask-for-reason-message' , $slug ) ); ?>');
|
391 |
-
|
392 |
-
|
393 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
});
|
395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
// If the user has clicked outside the window, cancel it.
|
397 |
$modal.on('click', function (evt) {
|
398 |
var $target = $(evt.target);
|
@@ -453,8 +560,6 @@ HTML;
|
|
453 |
function resetModal() {
|
454 |
selectedReasonID = false;
|
455 |
|
456 |
-
enableDeactivateButton();
|
457 |
-
|
458 |
// Uncheck all radio buttons.
|
459 |
$modal.find('input[type="radio"]').prop('checked', false);
|
460 |
|
@@ -463,8 +568,8 @@ HTML;
|
|
463 |
|
464 |
$modal.find('.message').hide();
|
465 |
|
466 |
-
|
467 |
-
$anonymousFeedback.find( 'input' ).prop( 'checked', false );
|
468 |
|
469 |
// Hide, since by default there is no selected reason.
|
470 |
$anonymousFeedback.hide();
|
@@ -491,13 +596,31 @@ HTML;
|
|
491 |
$modal.find('.message').text(message).show();
|
492 |
}
|
493 |
|
494 |
-
|
495 |
-
|
496 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
|
498 |
-
|
499 |
-
|
500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
|
502 |
function showPanel(panelType) {
|
503 |
$modal.find( '.fs-modal-panel' ).removeClass( 'active' );
|
24 |
$anonymous_feedback_checkbox_html = '';
|
25 |
|
26 |
$reasons_list_items_html = '';
|
27 |
+
$snooze_select_html = '';
|
28 |
|
29 |
if ( $show_deactivation_feedback_form ) {
|
30 |
$reasons = $VARS['reasons'];
|
65 |
fs_esc_html_inline( 'Anonymous feedback', 'anonymous-feedback', $slug )
|
66 |
);
|
67 |
}
|
68 |
+
|
69 |
+
$snooze_periods = array(
|
70 |
+
array(
|
71 |
+
'increment' => fs_text_inline( 'hour', $slug ),
|
72 |
+
'quantity' => number_format_i18n(1),
|
73 |
+
'value' => 6 * WP_FS__TIME_10_MIN_IN_SEC,
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'increment' => fs_text_inline( 'hours', $slug ),
|
77 |
+
'quantity' => number_format_i18n(24),
|
78 |
+
'value' => WP_FS__TIME_24_HOURS_IN_SEC,
|
79 |
+
),
|
80 |
+
array(
|
81 |
+
'increment' => fs_text_inline( 'days', $slug ),
|
82 |
+
'quantity' => number_format_i18n(7),
|
83 |
+
'value' => WP_FS__TIME_WEEK_IN_SEC,
|
84 |
+
),
|
85 |
+
array(
|
86 |
+
'increment' => fs_text_inline( 'days', $slug ),
|
87 |
+
'quantity' => number_format_i18n(30),
|
88 |
+
'value' => 30 * WP_FS__TIME_24_HOURS_IN_SEC,
|
89 |
+
),
|
90 |
+
);
|
91 |
+
|
92 |
+
$snooze_select_html = '<select>';
|
93 |
+
foreach ($snooze_periods as $period) {
|
94 |
+
$snooze_select_html .= sprintf(
|
95 |
+
'<option value="%s">%s %s</option>',
|
96 |
+
$period['value'],
|
97 |
+
$period['quantity'],
|
98 |
+
$period['increment']
|
99 |
+
);
|
100 |
+
}
|
101 |
+
|
102 |
+
$snooze_select_html .= '</select>';
|
103 |
}
|
104 |
|
105 |
// Aliases.
|
107 |
$theme_text = fs_text_inline( 'Theme', 'theme', $slug );
|
108 |
$activate_x_text = fs_text_inline( 'Activate %s', 'activate-x', $slug );
|
109 |
|
110 |
+
$submit_deactivate_text = sprintf(
|
111 |
+
fs_text_inline( 'Submit & %s', 'deactivation-modal-button-submit', $slug ),
|
112 |
+
$fs->is_plugin() ?
|
113 |
+
$deactivate_text :
|
114 |
+
sprintf( $activate_x_text, $theme_text )
|
115 |
+
);
|
116 |
+
|
117 |
fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
|
118 |
|
119 |
if ( ! empty( $subscription_cancellation_dialog_box_template_params ) ) {
|
135 |
+ ' </div>'
|
136 |
+ ' <div class="fs-modal-footer">'
|
137 |
+ ' <?php echo $anonymous_feedback_checkbox_html ?>'
|
138 |
+
+ ' <label style="display: none" class="feedback-from-snooze-label"><input type="checkbox" class="feedback-from-snooze-checkbox"> <span><?php fs_esc_js_echo_inline( 'Snooze this panel during troubleshooting', 'snooze-panel-during-troubleshooting', $slug ) ?></span><span style="display: none"><?php fs_esc_js_echo_inline( 'Snooze this panel for', 'snooze-panel-for', $slug ) ?> <?php echo $snooze_select_html ?></span></label>'
|
139 |
+ ' <a href="#" class="button button-secondary button-deactivate"></a>'
|
140 |
+ ' <a href="#" class="button button-secondary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
|
141 |
+ ' </div>'
|
145 |
selectedReasonID = false,
|
146 |
redirectLink = '',
|
147 |
$anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
|
148 |
+
$feedbackSnooze = $modal.find( '.feedback-from-snooze-label' ),
|
149 |
isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
|
150 |
otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
|
151 |
dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
|
275 |
} ?>
|
276 |
|
277 |
$modal.on('input propertychange', '.reason-input input', function () {
|
|
|
|
|
|
|
|
|
278 |
var reason = $(this).val().trim();
|
279 |
|
280 |
/**
|
282 |
* to change the message color back to default.
|
283 |
*/
|
284 |
if (reason.length > 0) {
|
285 |
+
$('.message').removeClass('error-message');
|
286 |
+
}
|
287 |
+
|
288 |
+
toggleDeactivationButtonPrimary( reason.length > 0 );
|
289 |
+
|
290 |
+
changeDeactivateButtonText();
|
291 |
});
|
292 |
|
293 |
$modal.on('blur', '.reason-input input', function () {
|
304 |
*/
|
305 |
if (0 === $userReason.val().trim().length) {
|
306 |
$('.message').addClass('error-message');
|
307 |
+
changeDeactivateButtonText();
|
308 |
+
}
|
309 |
}, 150);
|
310 |
});
|
311 |
|
320 |
var _this = $(this);
|
321 |
|
322 |
if (_this.hasClass('allow-deactivate')) {
|
323 |
+
var
|
324 |
+
$radio = $modal.find('input[type="radio"]:checked'),
|
325 |
+
isReasonSelected = (0 < $radio.length),
|
326 |
+
userReason = '';
|
327 |
+
|
328 |
+
if ( isReasonSelected ) {
|
329 |
+
var $selectedReason = $radio.parents('li:first'),
|
330 |
+
$reasonInput = $selectedReason.find('textarea, input[type="text"]');
|
331 |
|
332 |
+
if ( 0 < $reasonInput.length ) {
|
333 |
+
userReason = $reasonInput.val().trim();
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
if ( otherReasonID == selectedReasonID && '' === userReason ) {
|
338 |
+
// If the 'Other' is selected and a reason is not provided (aka it's empty), treat it as if a reason wasn't selected at all.
|
339 |
+
isReasonSelected = false;
|
340 |
+
}
|
341 |
+
|
342 |
+
_parent.find( '.fs-modal-footer .button' ).addClass( 'disabled' );
|
343 |
+
|
344 |
+
if ( ! isReasonSelected ) {
|
345 |
if ( ! deleteThemeUpdateData ) {
|
346 |
// If no selected reason, just deactivate the plugin.
|
347 |
window.location.href = redirectLink;
|
355 |
module_id: '<?php echo $fs->get_id() ?>'
|
356 |
},
|
357 |
beforeSend: function() {
|
358 |
+
_parent.find( '.fs-modal-footer .button-deactivate' ).text( '<?php echo esc_js( fs_text_inline( 'Processing', 'processing', $slug ) ) ?>...' );
|
|
|
359 |
},
|
360 |
complete : function() {
|
361 |
window.location.href = redirectLink;
|
366 |
return;
|
367 |
}
|
368 |
|
369 |
+
var snoozePeriod = 0;
|
370 |
+
|
371 |
+
if ( <?php echo Freemius::REASON_TEMPORARY_DEACTIVATION ?> == selectedReasonID ) {
|
372 |
+
snoozePeriod = parseInt($feedbackSnooze.find('select').val(), 10);
|
373 |
+
}
|
374 |
+
|
|
|
375 |
|
376 |
$.ajax({
|
377 |
url : ajaxurl,
|
378 |
method : 'POST',
|
379 |
data : {
|
380 |
+
action : '<?php echo $fs->get_ajax_action( 'submit_uninstall_reason' ) ?>',
|
381 |
+
security : '<?php echo $fs->get_ajax_security( 'submit_uninstall_reason' ) ?>',
|
382 |
+
module_id : '<?php echo $fs->get_id() ?>',
|
383 |
+
reason_id : $radio.val(),
|
384 |
+
reason_info : userReason,
|
385 |
+
is_anonymous : isAnonymousFeedback(),
|
386 |
+
snooze_period: snoozePeriod
|
387 |
},
|
388 |
beforeSend: function () {
|
389 |
+
_parent.find('.fs-modal-footer .button-deactivate').text('<?php echo esc_js( fs_text_inline( 'Processing', 'processing', $slug ) ) ?>...');
|
|
|
390 |
},
|
391 |
complete : function () {
|
392 |
// Do not show the dialog box, deactivate the plugin.
|
426 |
|
427 |
$modal.find('.reason-input').remove();
|
428 |
$modal.find( '.internal-message' ).hide();
|
429 |
+
$modal.find('.button-deactivate').html('<?php echo esc_js( $submit_deactivate_text ) ?>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
|
431 |
if ( _parent.hasClass( 'has-internal-message' ) ) {
|
432 |
_parent.find( '.internal-message' ).show();
|
433 |
}
|
434 |
|
435 |
+
if ( ! _parent.hasClass('has-input') ) {
|
436 |
+
toggleDeactivationButtonPrimary( true );
|
437 |
+
} else {
|
438 |
+
toggleDeactivationButtonPrimary( false );
|
439 |
+
|
440 |
var inputType = _parent.data('input-type'),
|
441 |
inputPlaceholder = _parent.data('input-placeholder'),
|
442 |
reasonInputHtml = '<div class="reason-input"><span class="message"></span>' + ( ( 'textfield' === inputType ) ? '<input type="text" maxlength="128" />' : '<textarea rows="5" maxlength="128"></textarea>' ) + '</div>';
|
446 |
|
447 |
if (isOtherReasonSelected()) {
|
448 |
showMessage('<?php echo esc_js( fs_text_inline( 'Kindly tell us the reason so we can improve.', 'ask-for-reason-message' , $slug ) ); ?>');
|
449 |
+
changeDeactivateButtonText();
|
450 |
+
}
|
451 |
}
|
452 |
+
|
453 |
+
$anonymousFeedback.toggle( <?php echo Freemius::REASON_TEMPORARY_DEACTIVATION ?> != selectedReasonID );
|
454 |
+
$feedbackSnooze.toggle( <?php echo Freemius::REASON_TEMPORARY_DEACTIVATION ?> == selectedReasonID );
|
455 |
+
|
456 |
+
if ( <?php echo Freemius::REASON_TEMPORARY_DEACTIVATION ?> == selectedReasonID ) {
|
457 |
+
updateDeactivationButtonOnTrouble();
|
458 |
+
}
|
459 |
});
|
460 |
|
461 |
+
var toggleDeactivationButtonPrimary = function ( isPrimary ) {
|
462 |
+
if ( isPrimary ) {
|
463 |
+
$modal.find('.button-deactivate')
|
464 |
+
.removeClass( 'button-secondary' )
|
465 |
+
.addClass( 'button-primary' );
|
466 |
+
} else {
|
467 |
+
$modal.find('.button-deactivate')
|
468 |
+
.addClass( 'button-secondary' )
|
469 |
+
.removeClass( 'button-primary' );
|
470 |
+
}
|
471 |
+
};
|
472 |
+
|
473 |
+
var snooze = false;
|
474 |
+
|
475 |
+
var updateDeactivationButtonOnTrouble = function () {
|
476 |
+
if ( snooze ) {
|
477 |
+
$modal.find('.button-deactivate').html('<?php echo esc_js( sprintf(
|
478 |
+
fs_text_inline( 'Snooze & %s', 'snooze-modal-button-submit' , $slug ),
|
479 |
+
$fs->is_plugin() ?
|
480 |
+
$deactivate_text :
|
481 |
+
sprintf( $activate_x_text, $theme_text )
|
482 |
+
) ) ?>');
|
483 |
+
} else {
|
484 |
+
$modal.find('.button-deactivate').html('<?php echo esc_js(
|
485 |
+
$fs->is_plugin() ?
|
486 |
+
$deactivate_text :
|
487 |
+
sprintf( $activate_x_text, $theme_text )
|
488 |
+
) ?>');
|
489 |
+
}
|
490 |
+
};
|
491 |
+
|
492 |
+
$feedbackSnooze.on( 'click', 'input', function () {
|
493 |
+
var $spans = $feedbackSnooze.find( 'span' );
|
494 |
+
|
495 |
+
snooze = ( ! snooze );
|
496 |
+
|
497 |
+
$( $spans[0] ).toggle();
|
498 |
+
$( $spans[1] ).toggle();
|
499 |
+
|
500 |
+
updateDeactivationButtonOnTrouble();
|
501 |
+
});
|
502 |
+
|
503 |
// If the user has clicked outside the window, cancel it.
|
504 |
$modal.on('click', function (evt) {
|
505 |
var $target = $(evt.target);
|
560 |
function resetModal() {
|
561 |
selectedReasonID = false;
|
562 |
|
|
|
|
|
563 |
// Uncheck all radio buttons.
|
564 |
$modal.find('input[type="radio"]').prop('checked', false);
|
565 |
|
568 |
|
569 |
$modal.find('.message').hide();
|
570 |
|
571 |
+
if ( isAnonymous ) {
|
572 |
+
$anonymousFeedback.find( 'input' ).prop( 'checked', <?php echo $fs->apply_filters( 'default_to_anonymous_feedback', false ) ? 'true' : 'false' ?> );
|
573 |
|
574 |
// Hide, since by default there is no selected reason.
|
575 |
$anonymousFeedback.hide();
|
596 |
$modal.find('.message').text(message).show();
|
597 |
}
|
598 |
|
599 |
+
/**
|
600 |
+
* @author Xiaheng Chen (@xhchen)
|
601 |
+
*
|
602 |
+
* @since 2.4.2
|
603 |
+
*/
|
604 |
+
function changeDeactivateButtonText() {
|
605 |
+
if ( ! isOtherReasonSelected()) {
|
606 |
+
return;
|
607 |
+
}
|
608 |
|
609 |
+
var
|
610 |
+
$userReason = $modal.find('.reason-input input'),
|
611 |
+
$deactivateButton = $modal.find('.button-deactivate');
|
612 |
+
|
613 |
+
if (0 === $userReason.val().trim().length) {
|
614 |
+
// If the reason is empty, just change the text to 'Deactivate' (plugin) or 'Activate themeX' (theme).
|
615 |
+
$deactivateButton.html('<?php echo
|
616 |
+
$fs->is_plugin() ?
|
617 |
+
$deactivate_text :
|
618 |
+
sprintf( $activate_x_text, $theme_text )
|
619 |
+
?>');
|
620 |
+
} else {
|
621 |
+
$deactivateButton.html('<?php echo esc_js( $submit_deactivate_text ) ?>');
|
622 |
+
}
|
623 |
+
}
|
624 |
|
625 |
function showPanel(panelType) {
|
626 |
$modal.find( '.fs-modal-panel' ).removeClass( 'active' );
|
lib/freemius/templates/forms/email-address-update.php
ADDED
@@ -0,0 +1,347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
*
|
7 |
+
* @author Leo Fajardo (@leorw)
|
8 |
+
* @since 2.4.3
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var array $VARS
|
17 |
+
*/
|
18 |
+
$fs = freemius( $VARS['id'] );
|
19 |
+
$slug = $fs->get_slug();
|
20 |
+
|
21 |
+
$user = $fs->get_user();
|
22 |
+
$current_email_address = $user->email;
|
23 |
+
|
24 |
+
fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
|
25 |
+
?>
|
26 |
+
<script type="text/javascript">
|
27 |
+
( function ( $ ) {
|
28 |
+
var modalHtml =
|
29 |
+
'<div class="fs-modal fs-modal-email-address-update">'
|
30 |
+
+ ' <div class="fs-modal-dialog">'
|
31 |
+
+ ' <div class="fs-modal-header">'
|
32 |
+
+ ' <h4><?php fs_esc_attr_echo_inline( 'Email address update', 'email-address-update', $slug ) ?></h4>'
|
33 |
+
+ ' <a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="<?php echo esc_js( fs_text_x_inline( 'Dismiss', 'close window', 'dismiss', $slug ) ) ?>"></i></a>'
|
34 |
+
+ ' </div>'
|
35 |
+
+ ' <div class="fs-modal-body">'
|
36 |
+
+ ' <div class="fs-modal-panel active">'
|
37 |
+
+ ' <div class="notice notice-error inline fs-update-error-message"><p></p></div>'
|
38 |
+
+ ' <p><?php fs_echo_inline( 'Enter the new email address', 'enter-new-email-address' , $slug ) ?>:</p>'
|
39 |
+
+ ' <input type="text" class="fs-new-email-address-input" />'
|
40 |
+
+ ' <div class="fs-email-addresses-ownership-options" style="display: none">'
|
41 |
+
+ ' <p><?php echo sprintf(
|
42 |
+
fs_esc_html_inline( 'Are both %s and %s your email addresses?', 'email-addresses-ownership-confirmation' , $slug ),
|
43 |
+
sprintf( '<strong>%s</strong>', $current_email_address ),
|
44 |
+
'<strong class="fs-new-email-address"></strong>'
|
45 |
+
) ?></p>'
|
46 |
+
+ ' <ul>'
|
47 |
+
+ ' <li>'
|
48 |
+
+ ' <label>'
|
49 |
+
+ ' <span><input type="radio" name="email-addresses-ownership" value="both"/></span>'
|
50 |
+
+ ' <span><?php fs_echo_inline( 'Yes - both addresses are mine', 'both-addresses-are-mine', $slug ); ?></span>'
|
51 |
+
+ ' </label>'
|
52 |
+
+ ' </li>'
|
53 |
+
+ ' <li>'
|
54 |
+
+ ' <label>'
|
55 |
+
+ ' <span><input type="radio" name="email-addresses-ownership" value="current"/></span>'
|
56 |
+
+ ' <div><?php echo sprintf(
|
57 |
+
fs_esc_html_inline( "%s is my client's email address", 'client-email-address-confirmation', $slug ),
|
58 |
+
'<strong class="fs-new-email-address"></strong>'
|
59 |
+
) ?></span>'
|
60 |
+
+ ' </label>'
|
61 |
+
+ ' </li>'
|
62 |
+
+ ' <li>'
|
63 |
+
+ ' <label>'
|
64 |
+
+ ' <span><input type="radio" name="email-addresses-ownership" value="new"/></span>'
|
65 |
+
+ ' <div><?php echo sprintf(
|
66 |
+
fs_esc_html_inline( "%s is my email address", 'email-address-ownership-confirmation', $slug ),
|
67 |
+
'<strong class="fs-new-email-address"></strong>'
|
68 |
+
) ?></span>'
|
69 |
+
+ ' </label>'
|
70 |
+
+ ' </li>'
|
71 |
+
+ ' </ul>'
|
72 |
+
+ ' </div>'
|
73 |
+
+ ' <div class="fs-assets-transfership-options" style="display: none">'
|
74 |
+
+ ' <p><?php echo sprintf(
|
75 |
+
fs_esc_html_inline( 'Would you like to merge %s into %s?', 'accounts-merge-confirmation' , $slug ),
|
76 |
+
sprintf( '<strong>%s</strong>', $current_email_address ),
|
77 |
+
'<strong class="fs-new-email-address"></strong>'
|
78 |
+
) ?></p>'
|
79 |
+
+ ' <ul>'
|
80 |
+
+ ' <li>'
|
81 |
+
+ ' <label>'
|
82 |
+
+ ' <span><input type="radio" name="assets-transfer-type" value="all" /></span>'
|
83 |
+
+ ' <span><?php echo sprintf(
|
84 |
+
fs_esc_html_inline( 'Yes - move all my data and assets from %s to %s', 'move-all-data-and-assets-into-new-account', $slug ),
|
85 |
+
sprintf( '<strong>%s</strong>', $current_email_address ),
|
86 |
+
'<strong class="fs-new-email-address"></strong>'
|
87 |
+
) ?></span>'
|
88 |
+
+ ' </label>'
|
89 |
+
+ ' </li>'
|
90 |
+
+ ' <li>'
|
91 |
+
+ ' <label>'
|
92 |
+
+ ' <span><input type="radio" name="assets-transfer-type" value="plugin" /></span>'
|
93 |
+
+ ' <span><?php echo sprintf(
|
94 |
+
fs_esc_html_inline( "No - only move this site's data to %s", 'move-only-plugin-data-into-new-account', $slug ),
|
95 |
+
'<strong class="fs-new-email-address"></strong>'
|
96 |
+
) ?></span>'
|
97 |
+
+ ' </label>'
|
98 |
+
+ ' </li>'
|
99 |
+
+ ' </ul>'
|
100 |
+
+ ' </div>'
|
101 |
+
+ ' </div>'
|
102 |
+
+ ' </div>'
|
103 |
+
+ ' <div class="fs-modal-footer">'
|
104 |
+
+ ' <button class="button button-primary button-update" disabled><?php fs_esc_js_echo_inline( 'Update', 'update-email-address', $slug ) ?></button>'
|
105 |
+
+ ' <button class="button button-secondary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></button>'
|
106 |
+
+ ' </div>'
|
107 |
+
+ ' </div>'
|
108 |
+
+ '</div>',
|
109 |
+
$modal = $( modalHtml ),
|
110 |
+
$updateButton = $modal.find( '.button-update' ),
|
111 |
+
$updateResultMessage = $modal.find( '.fs-update-error-message' ),
|
112 |
+
selectedEmailAddressesOwnershipOption = null,
|
113 |
+
selectedAssetsTransfershipOption = null,
|
114 |
+
previousEmailAddress = '',
|
115 |
+
$body = $( 'body' );
|
116 |
+
|
117 |
+
$modal.appendTo( $body );
|
118 |
+
|
119 |
+
registerEventHandlers();
|
120 |
+
|
121 |
+
function registerEventHandlers() {
|
122 |
+
$body.on( 'click', '#fs_account_details .button-edit-email-address', function ( evt ) {
|
123 |
+
evt.preventDefault();
|
124 |
+
|
125 |
+
showModal( evt );
|
126 |
+
} );
|
127 |
+
|
128 |
+
$modal.on( 'input propertychange keyup paste delete cut', '.fs-new-email-address-input', function () {
|
129 |
+
var emailAddress = $( this ).val().trim();
|
130 |
+
|
131 |
+
if ( emailAddress === previousEmailAddress ) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
var isValidEmailAddressInput = isValidEmailAddress( emailAddress );
|
136 |
+
|
137 |
+
toggleOptions( isValidEmailAddressInput );
|
138 |
+
|
139 |
+
if ( ! isValidEmailAddressInput ) {
|
140 |
+
disableUpdateButton();
|
141 |
+
} else {
|
142 |
+
$modal.find( '.fs-new-email-address').text( emailAddress );
|
143 |
+
|
144 |
+
maybeEnableUpdateButton();
|
145 |
+
}
|
146 |
+
|
147 |
+
previousEmailAddress = emailAddress;
|
148 |
+
} );
|
149 |
+
|
150 |
+
$modal.on( 'blur', '.fs-new-email-address-input', function() {
|
151 |
+
var emailAddress = $( this ).val().trim(),
|
152 |
+
isValidEmailAddressInput = isValidEmailAddress( emailAddress );
|
153 |
+
|
154 |
+
toggleOptions( isValidEmailAddressInput );
|
155 |
+
|
156 |
+
if ( ! isValidEmailAddressInput ) {
|
157 |
+
disableUpdateButton();
|
158 |
+
}
|
159 |
+
} );
|
160 |
+
|
161 |
+
$modal.on( 'click', '.fs-close, .button-secondary', function () {
|
162 |
+
closeModal();
|
163 |
+
return false;
|
164 |
+
} );
|
165 |
+
|
166 |
+
$modal.on( 'click', '.fs-modal-footer .button-update', function ( evt ) {
|
167 |
+
if ( ! isValidEmailAddress( previousEmailAddress ) ) {
|
168 |
+
return;
|
169 |
+
}
|
170 |
+
|
171 |
+
if ( previousEmailAddress === '<?php echo $current_email_address ?>' ) {
|
172 |
+
closeModal();
|
173 |
+
return;
|
174 |
+
}
|
175 |
+
|
176 |
+
var transferType = 'transfer';
|
177 |
+
|
178 |
+
if ( 'current' === selectedEmailAddressesOwnershipOption ) {
|
179 |
+
transferType = 'transfer_to_client';
|
180 |
+
} else if (
|
181 |
+
'both' === selectedEmailAddressesOwnershipOption &&
|
182 |
+
'all' === selectedAssetsTransfershipOption
|
183 |
+
) {
|
184 |
+
transferType = 'merge';
|
185 |
+
}
|
186 |
+
|
187 |
+
$.ajax( {
|
188 |
+
url : ajaxurl,
|
189 |
+
method : 'POST',
|
190 |
+
data : {
|
191 |
+
action : '<?php echo $fs->get_ajax_action( 'update_email_address' ) ?>',
|
192 |
+
security : '<?php echo $fs->get_ajax_security( 'update_email_address' ) ?>',
|
193 |
+
module_id : '<?php echo $fs->get_id() ?>',
|
194 |
+
transfer_type: transferType,
|
195 |
+
email_address: previousEmailAddress
|
196 |
+
},
|
197 |
+
beforeSend: function () {
|
198 |
+
disableUpdateButton();
|
199 |
+
|
200 |
+
$updateButton.find( '.fs-modal-footer .button' ).prop( 'disabled', true );
|
201 |
+
$updateButton.text( 'Processing...' );
|
202 |
+
},
|
203 |
+
success : function( result ) {
|
204 |
+
if ( result.success ) {
|
205 |
+
// Redirect to the "Account" page.
|
206 |
+
window.location.reload();
|
207 |
+
} else {
|
208 |
+
if ('change_ownership' === result.error.code) {
|
209 |
+
window.location = result.error.url;
|
210 |
+
} else {
|
211 |
+
showError(result.error.message ? result.error.message : result.error);
|
212 |
+
resetUpdateButton();
|
213 |
+
}
|
214 |
+
}
|
215 |
+
},
|
216 |
+
error : function () {
|
217 |
+
showError( '<?php fs_esc_js_echo_inline( 'Unexpected error, try again in 5 minutes. If the error persists, please contact support.', 'unexpected-error', $slug ) ?>' );
|
218 |
+
|
219 |
+
resetUpdateButton();
|
220 |
+
}
|
221 |
+
} );
|
222 |
+
} );
|
223 |
+
|
224 |
+
$modal.on( 'click', 'input[type="radio"]', function () {
|
225 |
+
var $selectedOption = $( this ),
|
226 |
+
selectedOptionValue = $selectedOption.val();
|
227 |
+
|
228 |
+
// If the selection has not changed, do not proceed.
|
229 |
+
if (
|
230 |
+
selectedEmailAddressesOwnershipOption === selectedOptionValue ||
|
231 |
+
selectedAssetsTransfershipOption === selectedOptionValue
|
232 |
+
) {
|
233 |
+
return;
|
234 |
+
}
|
235 |
+
|
236 |
+
if ( 'assets-transfer-type' === $selectedOption.attr( 'name' ) ) {
|
237 |
+
selectedAssetsTransfershipOption = selectedOptionValue;
|
238 |
+
} else {
|
239 |
+
selectedEmailAddressesOwnershipOption = selectedOptionValue;
|
240 |
+
|
241 |
+
if ( 'both' !== selectedEmailAddressesOwnershipOption ) {
|
242 |
+
$modal.find( '.fs-assets-transfership-options' ).hide();
|
243 |
+
} else {
|
244 |
+
$modal.find( '.fs-assets-transfership-options' ).show();
|
245 |
+
$modal.find( '.fs-assets-transfership-options input[type="radio"]' ).prop('checked', false);
|
246 |
+
|
247 |
+
selectedAssetsTransfershipOption = null;
|
248 |
+
|
249 |
+
disableUpdateButton();
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( isValidEmailAddress( $( '.fs-new-email-address-input' ).val().trim() ) ) {
|
254 |
+
maybeEnableUpdateButton();
|
255 |
+
}
|
256 |
+
});
|
257 |
+
}
|
258 |
+
|
259 |
+
function showModal() {
|
260 |
+
resetModal();
|
261 |
+
|
262 |
+
// Display the dialog box.
|
263 |
+
$modal.addClass( 'active' );
|
264 |
+
$modal.find( '.fs-new-email-address-input' ).focus();
|
265 |
+
|
266 |
+
$( 'body' ).addClass( 'has-fs-modal' );
|
267 |
+
}
|
268 |
+
|
269 |
+
function closeModal() {
|
270 |
+
selectedEmailAddressesOwnershipOption = null;
|
271 |
+
|
272 |
+
disableUpdateButton();
|
273 |
+
|
274 |
+
$modal.removeClass( 'active' );
|
275 |
+
|
276 |
+
$( 'body' ).removeClass( 'has-fs-modal' );
|
277 |
+
}
|
278 |
+
|
279 |
+
function resetModal() {
|
280 |
+
hideError();
|
281 |
+
|
282 |
+
// Deselect all radio buttons.
|
283 |
+
$modal.find( 'input[type="radio"]' ).prop( 'checked', false );
|
284 |
+
|
285 |
+
// Clear the value of the email address text field.
|
286 |
+
$modal.find( 'input[type="text"]' ).val( '' );
|
287 |
+
|
288 |
+
toggleOptions( false );
|
289 |
+
|
290 |
+
disableUpdateButton();
|
291 |
+
|
292 |
+
$updateButton.text( <?php echo json_encode( fs_text_inline( 'Update', 'update-email-address', $slug ) ) ?> );
|
293 |
+
}
|
294 |
+
|
295 |
+
function resetUpdateButton() {
|
296 |
+
maybeEnableUpdateButton();
|
297 |
+
|
298 |
+
$updateButton.text( <?php echo json_encode( fs_text_inline( 'Update', 'update-email-address', $slug ) ) ?> );
|
299 |
+
}
|
300 |
+
|
301 |
+
function maybeEnableUpdateButton() {
|
302 |
+
if ( null === selectedEmailAddressesOwnershipOption ) {
|
303 |
+
return;
|
304 |
+
}
|
305 |
+
|
306 |
+
if (
|
307 |
+
'both' === selectedEmailAddressesOwnershipOption &&
|
308 |
+
null === selectedAssetsTransfershipOption
|
309 |
+
) {
|
310 |
+
return;
|
311 |
+
}
|
312 |
+
|
313 |
+
$updateButton.prop( 'disabled', false );
|
314 |
+
}
|
315 |
+
|
316 |
+
function disableUpdateButton() {
|
317 |
+
$updateButton.prop( 'disabled', true );
|
318 |
+
}
|
319 |
+
|
320 |
+
function hideError() {
|
321 |
+
$updateResultMessage.hide();
|
322 |
+
}
|
323 |
+
|
324 |
+
function showError( msg ) {
|
325 |
+
$updateResultMessage.find( ' > p' ).html( msg );
|
326 |
+
$updateResultMessage.show();
|
327 |
+
}
|
328 |
+
|
329 |
+
function isValidEmailAddress( emailAddress ) {
|
330 |
+
if ( '' === emailAddress ) {
|
331 |
+
return false;
|
332 |
+
}
|
333 |
+
|
334 |
+
return /[0-9a-zA-Z][a-zA-Z\+0-9\.\_\-]*@[0-9a-zA-Z\-]+(\.[a-zA-Z]{2,24}){1,3}/.test( emailAddress );
|
335 |
+
}
|
336 |
+
|
337 |
+
function toggleOptions( show ) {
|
338 |
+
$modal.find( '.fs-email-addresses-ownership-options' ).toggle( show );
|
339 |
+
|
340 |
+
if ( ! show ) {
|
341 |
+
$modal.find( '.fs-assets-transfership-options' ).hide();
|
342 |
+
} else if ( 'both' === selectedEmailAddressesOwnershipOption ) {
|
343 |
+
$modal.find( '.fs-assets-transfership-options' ).show();
|
344 |
+
}
|
345 |
+
}
|
346 |
+
} )( jQuery );
|
347 |
+
</script>
|
lib/freemius/templates/plugin-info/features.php
CHANGED
@@ -43,7 +43,7 @@
|
|
43 |
$support_feature->title = fs_text_inline( 'Support', $plugin->slug );
|
44 |
$features_plan_map[ $support_feature->id ] = array( 'feature' => $support_feature, 'plans' => array() );
|
45 |
} else {
|
46 |
-
|
47 |
}
|
48 |
|
49 |
$features_plan_map[ $support_feature->id ]['plans'][ $plan->id ] = $support_feature;
|
43 |
$support_feature->title = fs_text_inline( 'Support', $plugin->slug );
|
44 |
$features_plan_map[ $support_feature->id ] = array( 'feature' => $support_feature, 'plans' => array() );
|
45 |
} else {
|
46 |
+
$support_feature = $features_plan_map['support']['feature'];
|
47 |
}
|
48 |
|
49 |
$features_plan_map[ $support_feature->id ]['plans'][ $plan->id ] = $support_feature;
|
lib/freemius/templates/pricing.php
CHANGED
@@ -122,21 +122,22 @@
|
|
122 |
<div id="fs_pricing_wrapper" data-public-url="<?php echo trailingslashit( dirname( $pricing_js_url ) ) ?>"></div>
|
123 |
<?php
|
124 |
$pricing_config = array_merge( array(
|
125 |
-
'contact_url'
|
126 |
-
'is_network_admin'
|
127 |
-
'is_production'
|
128 |
-
'menu_slug'
|
129 |
-
'mode'
|
130 |
-
'fs_wp_endpoint_url'
|
131 |
-
'request_handler_url'
|
132 |
'admin-ajax.php?' . http_build_query( array(
|
133 |
'module_id' => $fs->get_id(),
|
134 |
'action' => $fs->get_ajax_action( 'pricing_ajax_action' ),
|
135 |
'security' => $fs->get_ajax_security( 'pricing_ajax_action' )
|
136 |
) )
|
137 |
),
|
138 |
-
'selector'
|
139 |
-
'unique_affix'
|
|
|
140 |
), $query_params );
|
141 |
|
142 |
wp_add_inline_script( 'freemius-pricing', 'Freemius.pricing.new( ' . json_encode( $pricing_config ) . ' )' );
|
@@ -206,4 +207,4 @@
|
|
206 |
'module_slug' => $slug,
|
207 |
'module_version' => $fs->get_plugin_version(),
|
208 |
);
|
209 |
-
fs_require_template( 'powered-by.php', $params );
|
122 |
<div id="fs_pricing_wrapper" data-public-url="<?php echo trailingslashit( dirname( $pricing_js_url ) ) ?>"></div>
|
123 |
<?php
|
124 |
$pricing_config = array_merge( array(
|
125 |
+
'contact_url' => $fs->contact_url(),
|
126 |
+
'is_network_admin' => fs_is_network_admin(),
|
127 |
+
'is_production' => ( defined( 'WP_FS__IS_PRODUCTION_MODE' ) ? WP_FS__IS_PRODUCTION_MODE : null ),
|
128 |
+
'menu_slug' => $fs->get_menu_slug(),
|
129 |
+
'mode' => 'dashboard',
|
130 |
+
'fs_wp_endpoint_url' => WP_FS__ADDRESS,
|
131 |
+
'request_handler_url' => admin_url(
|
132 |
'admin-ajax.php?' . http_build_query( array(
|
133 |
'module_id' => $fs->get_id(),
|
134 |
'action' => $fs->get_ajax_action( 'pricing_ajax_action' ),
|
135 |
'security' => $fs->get_ajax_security( 'pricing_ajax_action' )
|
136 |
) )
|
137 |
),
|
138 |
+
'selector' => '#fs_pricing_wrapper',
|
139 |
+
'unique_affix' => $fs->get_unique_affix(),
|
140 |
+
'show_annual_in_monthly' => $fs->apply_filter( 'pricing/show_annual_in_monthly', true ),
|
141 |
), $query_params );
|
142 |
|
143 |
wp_add_inline_script( 'freemius-pricing', 'Freemius.pricing.new( ' . json_encode( $pricing_config ) . ' )' );
|
207 |
'module_slug' => $slug,
|
208 |
'module_version' => $fs->get_plugin_version(),
|
209 |
);
|
210 |
+
fs_require_template( 'powered-by.php', $params );
|
lib/wp-content-aware-engine/bootstrap.php
CHANGED
@@ -12,7 +12,7 @@ defined('ABSPATH') || exit;
|
|
12 |
* Version of this WPCA
|
13 |
* @var string
|
14 |
*/
|
15 |
-
$this_wpca_version = '9.
|
16 |
|
17 |
/**
|
18 |
* Class to make sure the latest
|
12 |
* Version of this WPCA
|
13 |
* @var string
|
14 |
*/
|
15 |
+
$this_wpca_version = '9.5a';
|
16 |
|
17 |
/**
|
18 |
* Class to make sure the latest
|
lib/wp-content-aware-engine/core.php
CHANGED
@@ -116,12 +116,6 @@ if (!class_exists('WPCACore')) {
|
|
116 |
'untrashed_post',
|
117 |
[__CLASS__,'sync_group_untrashed']
|
118 |
);
|
119 |
-
add_action(
|
120 |
-
'add_meta_boxes',
|
121 |
-
[__CLASS__,'add_group_meta_box'],
|
122 |
-
10,
|
123 |
-
2
|
124 |
-
);
|
125 |
add_action(
|
126 |
'wpca/modules/save-data',
|
127 |
[__CLASS__,'save_condition_options'],
|
@@ -438,18 +432,27 @@ GROUP BY p.post_type, m.meta_key
|
|
438 |
$in_context_by_module_id = [];
|
439 |
foreach ($modules as $module) {
|
440 |
$id = $module->get_id();
|
441 |
-
$name = $module->get_query_name();
|
442 |
$in_context = apply_filters("wpca/module/$id/in-context", $module->in_context());
|
443 |
$in_context_by_module_id[$id] = $in_context;
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
}
|
|
|
|
|
|
|
453 |
}
|
454 |
|
455 |
$use_negated_conditions = self::get_option($post_type, 'legacy.negated_conditions', false);
|
@@ -662,24 +665,9 @@ GROUP BY p.post_type, m.meta_key
|
|
662 |
return self::$post_cache[$post_type];
|
663 |
}
|
664 |
|
665 |
-
/**
|
666 |
-
* Add meta box to manage condition groups
|
667 |
-
*
|
668 |
-
* @since 1.0
|
669 |
-
* @param string $post_type
|
670 |
-
* @param WP_Post $post
|
671 |
-
*/
|
672 |
-
public static function add_group_meta_box($post_type, $post)
|
673 |
-
{
|
674 |
-
if (is_null($post)) {
|
675 |
-
return;
|
676 |
-
}
|
677 |
-
self::render_group_meta_box($post, $post_type, 'normal', 'default');
|
678 |
-
}
|
679 |
-
|
680 |
public static function render_group_meta_box($post, $screen, $context = 'normal', $priority = 'default')
|
681 |
{
|
682 |
-
if (
|
683 |
return;
|
684 |
}
|
685 |
|
116 |
'untrashed_post',
|
117 |
[__CLASS__,'sync_group_untrashed']
|
118 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
add_action(
|
120 |
'wpca/modules/save-data',
|
121 |
[__CLASS__,'save_condition_options'],
|
432 |
$in_context_by_module_id = [];
|
433 |
foreach ($modules as $module) {
|
434 |
$id = $module->get_id();
|
|
|
435 |
$in_context = apply_filters("wpca/module/$id/in-context", $module->in_context());
|
436 |
$in_context_by_module_id[$id] = $in_context;
|
437 |
+
|
438 |
+
if(!$in_context) {
|
439 |
+
continue;
|
440 |
+
}
|
441 |
+
|
442 |
+
$data = $module->get_context_data();
|
443 |
+
|
444 |
+
if(empty($data)) {
|
445 |
+
$in_context_by_module_id[$id] = false;
|
446 |
+
continue;
|
447 |
+
}
|
448 |
+
|
449 |
+
if (is_array($data)) {
|
450 |
+
$name = $module->get_query_name();
|
451 |
+
$data = "($name.meta_value IS NULL OR $name.meta_value IN (".self::sql_prepare_in($data).'))';
|
452 |
}
|
453 |
+
$join[$id] = $module->db_join();
|
454 |
+
$where[$id] = apply_filters("wpca/module/$id/db-where", $data);
|
455 |
+
self::$filtered_modules[$post_type][] = $module;
|
456 |
}
|
457 |
|
458 |
$use_negated_conditions = self::get_option($post_type, 'legacy.negated_conditions', false);
|
665 |
return self::$post_cache[$post_type];
|
666 |
}
|
667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
public static function render_group_meta_box($post, $screen, $context = 'normal', $priority = 'default')
|
669 |
{
|
670 |
+
if (!($post instanceof WP_Post) || !self::types()->has($post->post_type)) {
|
671 |
return;
|
672 |
}
|
673 |
|
readme.txt
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
===
|
2 |
Contributors: intoxstudio, devinstitute, freemius
|
3 |
Donate link: #
|
4 |
Tags: custom sidebars, sidebar, hide sidebar, display widgets, widget, bbpress, buddypress, sidebar manager
|
5 |
Requires at least: 5.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.8
|
8 |
-
Stable tag: 3.16.
|
9 |
License: GPLv3
|
10 |
|
11 |
-
Display new sidebars
|
12 |
|
13 |
== Description ==
|
14 |
|
@@ -148,11 +148,11 @@ You can also select sidebars directly when you're editing a post or page.
|
|
148 |
|
149 |
[Click here to read more about Display Conditions](https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-simple/?utm_source=readme&utm_medium=referral&utm_content=faq&utm_campaign=cas).
|
150 |
|
151 |
-
=
|
152 |
|
153 |
Yes!
|
154 |
|
155 |
-
|
156 |
|
157 |
Moreover, the Pro version makes it possible to infuse widget areas into theme hooks, as well as insert areas between content paragraphs.
|
158 |
|
@@ -184,6 +184,12 @@ Of course! Check out the links below:
|
|
184 |
|
185 |
####Highlights
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
= 3.16.1 =
|
188 |
|
189 |
* [fixed] warning on admin dashboard
|
1 |
+
=== Lightweight Widget Area Plugin - Content Aware Sidebars ===
|
2 |
Contributors: intoxstudio, devinstitute, freemius
|
3 |
Donate link: #
|
4 |
Tags: custom sidebars, sidebar, hide sidebar, display widgets, widget, bbpress, buddypress, sidebar manager
|
5 |
Requires at least: 5.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.8
|
8 |
+
Stable tag: 3.16.2
|
9 |
License: GPLv3
|
10 |
|
11 |
+
Display new sidebars on any post, page, category etc. Works with Classic Widgets, Block Widgets, and all themes!
|
12 |
|
13 |
== Description ==
|
14 |
|
148 |
|
149 |
[Click here to read more about Display Conditions](https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-simple/?utm_source=readme&utm_medium=referral&utm_content=faq&utm_campaign=cas).
|
150 |
|
151 |
+
= Will CAS work with block-based Widgets? =
|
152 |
|
153 |
Yes!
|
154 |
|
155 |
+
If you prefer to manage widgets in the traditional way, you can use [Classic Widgets](https://wordpress.org/plugins/classic-widgets/) which CAS also supports.
|
156 |
|
157 |
Moreover, the Pro version makes it possible to infuse widget areas into theme hooks, as well as insert areas between content paragraphs.
|
158 |
|
184 |
|
185 |
####Highlights
|
186 |
|
187 |
+
= 3.16.2 =
|
188 |
+
|
189 |
+
* [fixed] compatibility improvements
|
190 |
+
* [updated] wp-content-aware-engine library
|
191 |
+
* [updated] freemius sdk
|
192 |
+
|
193 |
= 3.16.1 =
|
194 |
|
195 |
* [fixed] warning on admin dashboard
|